helm-viewer 0.16.0 → 0.20.0
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/README.md +7 -7
- package/bin/helm-template.mjs +4 -4
- package/binary/fsevents.node +0 -0
- package/binary/index.js +9 -9
- package/eslint.config.mjs +46 -0
- package/package.json +28 -16
package/binary/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(()=>{var __webpack_modules__={5575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8569);const i=r(5388);const s="!";const o={returnIndex:false};const arrify=e=>Array.isArray(e)?e:[e];const createPattern=(e,t)=>{if(typeof e==="function"){return e}if(typeof e==="string"){const r=n(e,t);return t=>e===t||r(t)}if(e instanceof RegExp){return t=>e.test(t)}return e=>false};const matchPatterns=(e,t,r,n)=>{const s=Array.isArray(r);const o=s?r[0]:r;if(!s&&typeof o!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o))}const a=i(o,false);for(let e=0;e<t.length;e++){const r=t[e];if(r(a)){return n?-1:false}}const c=s&&[a].concat(r.slice(1));for(let t=0;t<e.length;t++){const r=e[t];if(s?r(...c):r(a)){return n?t:true}}return n?-1:false};const anymatch=(e,t,r=o)=>{if(e==null){throw new TypeError("anymatch: specify first argument")}const i=typeof r==="boolean"?{returnIndex:r}:r;const a=i.returnIndex||false;const c=arrify(e);const l=c.filter((e=>typeof e==="string"&&e.charAt(0)===s)).map((e=>e.slice(1))).map((e=>n(e,i)));const u=c.filter((e=>typeof e!=="string"||typeof e==="string"&&e.charAt(0)!==s)).map((e=>createPattern(e,i)));if(t==null){return(e,t=false)=>{const r=typeof t==="boolean"?t:false;return matchPatterns(u,l,e,r)}}return matchPatterns(u,l,t,a)};anymatch.default=anymatch;e.exports=anymatch},329:(e,t,r)=>{e.exports=r(5133)},610:(e,t,r)=>{"use strict";const n=r(8750);const i=r(9434);const s=r(5873);const o=r(6477);const braces=(e,t={})=>{let r=[];if(Array.isArray(e)){for(let n of e){let e=braces.create(n,t);if(Array.isArray(e)){r.push(...e)}else{r.push(e)}}}else{r=[].concat(braces.create(e,t))}if(t&&t.expand===true&&t.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(e,t={})=>o(e,t);braces.stringify=(e,t={})=>{if(typeof e==="string"){return n(braces.parse(e,t),t)}return n(e,t)};braces.compile=(e,t={})=>{if(typeof e==="string"){e=braces.parse(e,t)}return i(e,t)};braces.expand=(e,t={})=>{if(typeof e==="string"){e=braces.parse(e,t)}let r=s(e,t);if(t.noempty===true){r=r.filter(Boolean)}if(t.nodupes===true){r=[...new Set(r)]}return r};braces.create=(e,t={})=>{if(e===""||e.length<3){return[e]}return t.expand!==true?braces.compile(e,t):braces.expand(e,t)};e.exports=braces},9434:(e,t,r)=>{"use strict";const n=r(6330);const i=r(5207);const compile=(e,t={})=>{let walk=(e,r={})=>{let s=i.isInvalidBrace(r);let o=e.invalid===true&&t.escapeInvalid===true;let a=s===true||o===true;let c=t.escapeInvalid===true?"\\":"";let l="";if(e.isOpen===true){return c+e.value}if(e.isClose===true){return c+e.value}if(e.type==="open"){return a?c+e.value:"("}if(e.type==="close"){return a?c+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":a?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let r=i.reduce(e.nodes);let s=n(...r,{...t,wrap:false,toRegex:true});if(s.length!==0){return r.length>1&&s.length>1?`(${s})`:s}}if(e.nodes){for(let t of e.nodes){l+=walk(t,e)}}return l};return walk(e)};e.exports=compile},8774:e=>{"use strict";e.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5873:(e,t,r)=>{"use strict";const n=r(6330);const i=r(8750);const s=r(5207);const append=(e="",t="",r=false)=>{let n=[];e=[].concat(e);t=[].concat(t);if(!t.length)return e;if(!e.length){return r?s.flatten(t).map((e=>`{${e}}`)):t}for(let i of e){if(Array.isArray(i)){for(let e of i){n.push(append(e,t,r))}}else{for(let e of t){if(r===true&&typeof e==="string")e=`{${e}}`;n.push(Array.isArray(e)?append(i,e,r):i+e)}}}return s.flatten(n)};const expand=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit;let walk=(e,o={})=>{e.queue=[];let a=o;let c=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;c=a.queue}if(e.invalid||e.dollar){c.push(append(c.pop(),i(e,t)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){c.push(append(c.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let o=s.reduce(e.nodes);if(s.exceedsLimit(...o,t.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=n(...o,t);if(a.length===0){a=i(e,t)}c.push(append(c.pop(),a));e.nodes=[];return}let l=s.encloseBrace(e);let u=e.queue;let f=e;while(f.type!=="brace"&&f.type!=="root"&&f.parent){f=f.parent;u=f.queue}for(let t=0;t<e.nodes.length;t++){let r=e.nodes[t];if(r.type==="comma"&&e.type==="brace"){if(t===1)u.push("");u.push("");continue}if(r.type==="close"){c.push(append(c.pop(),u,l));continue}if(r.value&&r.type!=="open"){u.push(append(u.pop(),r.value));continue}if(r.nodes){walk(r,e)}}return u};return s.flatten(walk(e))};e.exports=expand},6477:(e,t,r)=>{"use strict";const n=r(8750);const{MAX_LENGTH:i,CHAR_BACKSLASH:s,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:f,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:v,CHAR_NO_BREAK_SPACE:_,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=r(8774);const parse=(e,t={})=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}let r=t||{};let y=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;if(e.length>y){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${y})`)}let w={type:"root",input:e,nodes:[]};let b=[w];let E=w;let S=w;let x=0;let A=e.length;let k=0;let C=0;let R;let O={};const advance=()=>e[k++];const push=e=>{if(e.type==="text"&&S.type==="dot"){S.type="text"}if(S&&S.type==="text"&&e.type==="text"){S.value+=e.value;return}E.nodes.push(e);e.parent=E;e.prev=S;S=e;return e};push({type:"bos"});while(k<A){E=b[b.length-1];R=advance();if(R===g||R===_){continue}if(R===s){push({type:"text",value:(t.keepEscaping?R:"")+advance()});continue}if(R===p){push({type:"text",value:"\\"+R});continue}if(R===d){x++;let e=true;let t;while(k<A&&(t=advance())){R+=t;if(t===d){x++;continue}if(t===s){R+=advance();continue}if(t===p){x--;if(x===0){break}}}push({type:"text",value:R});continue}if(R===l){E=push({type:"paren",nodes:[]});b.push(E);push({type:"text",value:R});continue}if(R===u){if(E.type!=="paren"){push({type:"text",value:R});continue}E=b.pop();push({type:"text",value:R});E=b[b.length-1];continue}if(R===m||R===v||R===o){let e=R;let r;if(t.keepQuotes!==true){R=""}while(k<A&&(r=advance())){if(r===s){R+=r+advance();continue}if(r===e){if(t.keepQuotes===true)R+=r;break}R+=r}push({type:"text",value:R});continue}if(R===f){C++;let e=S.value&&S.value.slice(-1)==="$"||E.dollar===true;let t={type:"brace",open:true,close:false,dollar:e,depth:C,commas:0,ranges:0,nodes:[]};E=push(t);b.push(E);push({type:"open",value:R});continue}if(R===h){if(E.type!=="brace"){push({type:"text",value:R});continue}let e="close";E=b.pop();E.close=true;push({type:e,value:R});C--;E=b[b.length-1];continue}if(R===a&&C>0){if(E.ranges>0){E.ranges=0;let e=E.nodes.shift();E.nodes=[e,{type:"text",value:n(E)}]}push({type:"comma",value:R});E.commas++;continue}if(R===c&&C>0&&E.commas===0){let e=E.nodes;if(C===0||e.length===0){push({type:"text",value:R});continue}if(S.type==="dot"){E.range=[];S.value+=R;S.type="range";if(E.nodes.length!==3&&E.nodes.length!==5){E.invalid=true;E.ranges=0;S.type="text";continue}E.ranges++;E.args=[];continue}if(S.type==="range"){e.pop();let t=e[e.length-1];t.value+=S.value+R;S=t;E.ranges--;continue}push({type:"dot",value:R});continue}push({type:"text",value:R})}do{E=b.pop();if(E.type!=="root"){E.nodes.forEach((e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}}));let e=b[b.length-1];let t=e.nodes.indexOf(E);e.nodes.splice(t,1,...E.nodes)}}while(b.length>0);push({type:"eos"});return w};e.exports=parse},8750:(e,t,r)=>{"use strict";const n=r(5207);e.exports=(e,t={})=>{let stringify=(e,r={})=>{let i=t.escapeInvalid&&n.isInvalidBrace(r);let s=e.invalid===true&&t.escapeInvalid===true;let o="";if(e.value){if((i||s)&&n.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let t of e.nodes){o+=stringify(t)}}return o};return stringify(e)}},5207:(e,t)=>{"use strict";t.isInteger=e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false};t.find=(e,t)=>e.nodes.find((e=>e.type===t));t.exceedsLimit=(e,r,n=1,i)=>{if(i===false)return false;if(!t.isInteger(e)||!t.isInteger(r))return false;return(Number(r)-Number(e))/Number(n)>=i};t.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];if(!n)return;if(r&&n.type===r||n.type==="open"||n.type==="close"){if(n.escaped!==true){n.value="\\"+n.value;n.escaped=true}}};t.encloseBrace=e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false};t.isInvalidBrace=e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false};t.isOpenOrClose=e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true};t.reduce=e=>e.reduce(((e,t)=>{if(t.type==="text")e.push(t.value);if(t.type==="range")t.type="text";return e}),[]);t.flatten=(...e)=>{const t=[];const flat=e=>{for(let r=0;r<e.length;r++){let n=e[r];Array.isArray(n)?flat(n,t):n!==void 0&&t.push(n)}return t};flat(e);return t}},2677:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(2361);const i=r(7147);const s=r(1017);const{promisify:o}=r(3837);const a=r(9556);const c=r(5575)["default"];const l=r(4655);const u=r(4466);const f=r(610);const h=r(5388);const d=r(1335);const p=r(1771);const{EV_ALL:m,EV_READY:v,EV_ADD:_,EV_CHANGE:g,EV_UNLINK:y,EV_ADD_DIR:w,EV_UNLINK_DIR:b,EV_RAW:E,EV_ERROR:S,STR_CLOSE:x,STR_END:A,BACK_SLASH_RE:k,DOUBLE_SLASH_RE:C,SLASH_OR_BACK_SLASH_RE:R,DOT_RE:O,REPLACER_RE:T,SLASH:I,SLASH_SLASH:P,BRACE_START:N,BANG:L,ONE_DOT:B,TWO_DOTS:H,GLOBSTAR:D,SLASH_GLOBSTAR:M,ANYMATCH_OPTS:W,STRING_TYPE:j,FUNCTION_TYPE:U,EMPTY_STR:G,EMPTY_FN:z,isWindows:Y,isMacos:V,isIBMi:X}=r(4494);const K=o(i.stat);const q=o(i.readdir);const arrify=(e=[])=>Array.isArray(e)?e:[e];const flatten=(e,t=[])=>{e.forEach((e=>{if(Array.isArray(e)){flatten(e,t)}else{t.push(e)}}));return t};const unifyPaths=e=>{const t=flatten(arrify(e));if(!t.every((e=>typeof e===j))){throw new TypeError(`Non-string provided as watch path: ${t}`)}return t.map(normalizePathToUnix)};const toUnix=e=>{let t=e.replace(k,I);let r=false;if(t.startsWith(P)){r=true}while(t.match(C)){t=t.replace(C,I)}if(r){t=I+t}return t};const normalizePathToUnix=e=>toUnix(s.normalize(toUnix(e)));const normalizeIgnored=(e=G)=>t=>{if(typeof t!==j)return t;return normalizePathToUnix(s.isAbsolute(t)?t:s.join(e,t))};const getAbsolutePath=(e,t)=>{if(s.isAbsolute(e)){return e}if(e.startsWith(L)){return L+s.join(t,e.slice(1))}return s.join(t,e)};const undef=(e,t)=>e[t]===undefined;class DirEntry{constructor(e,t){this.path=e;this._removeWatcher=t;this.items=new Set}add(e){const{items:t}=this;if(!t)return;if(e!==B&&e!==H)t.add(e)}async remove(e){const{items:t}=this;if(!t)return;t.delete(e);if(t.size>0)return;const r=this.path;try{await q(r)}catch(e){if(this._removeWatcher){this._removeWatcher(s.dirname(r),s.basename(r))}}}has(e){const{items:t}=this;if(!t)return;return t.has(e)}getChildren(){const{items:e}=this;if(!e)return;return[...e.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const Q="stat";const Z="lstat";class WatchHelper{constructor(e,t,r,n){this.fsw=n;this.path=e=e.replace(T,G);this.watchPath=t;this.fullWatchPath=s.resolve(t);this.hasGlob=t!==e;if(e===G)this.hasGlob=false;this.globSymlink=this.hasGlob&&r?undefined:false;this.globFilter=this.hasGlob?c(e,undefined,W):false;this.dirParts=this.getDirParts(e);this.dirParts.forEach((e=>{if(e.length>1)e.pop()}));this.followSymlinks=r;this.statMethod=r?Q:Z}checkGlobSymlink(e){if(this.globSymlink===undefined){this.globSymlink=e.fullParentDir===this.fullWatchPath?false:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return e.fullPath}entryPath(e){return s.join(this.watchPath,s.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);const r=this.entryPath(e);const n=this.hasGlob&&typeof this.globFilter===U?this.globFilter(r):true;return n&&this.fsw._isntIgnored(r,t)&&this.fsw._hasReadPermissions(t)}getDirParts(e){if(!this.hasGlob)return[];const t=[];const r=e.includes(N)?f.expand(e):[e];r.forEach((e=>{t.push(s.relative(this.watchPath,e).split(R))}));return t}filterDir(e){if(this.hasGlob){const t=this.getDirParts(this.checkGlobSymlink(e));let r=false;this.unmatchedGlob=!this.dirParts.some((e=>e.every(((e,n)=>{if(e===D)r=true;return r||!t[0][n]||c(e,t[0][n],W)}))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class FSWatcher extends n{constructor(e){super();const t={};if(e)Object.assign(t,e);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(undef(t,"persistent"))t.persistent=true;if(undef(t,"ignoreInitial"))t.ignoreInitial=false;if(undef(t,"ignorePermissionErrors"))t.ignorePermissionErrors=false;if(undef(t,"interval"))t.interval=100;if(undef(t,"binaryInterval"))t.binaryInterval=300;if(undef(t,"disableGlobbing"))t.disableGlobbing=false;t.enableBinaryInterval=t.binaryInterval!==t.interval;if(undef(t,"useFsEvents"))t.useFsEvents=!t.usePolling;const r=p.canUse();if(!r)t.useFsEvents=false;if(undef(t,"usePolling")&&!t.useFsEvents){t.usePolling=V}if(X){t.usePolling=true}const n=process.env.CHOKIDAR_USEPOLLING;if(n!==undefined){const e=n.toLowerCase();if(e==="false"||e==="0"){t.usePolling=false}else if(e==="true"||e==="1"){t.usePolling=true}else{t.usePolling=!!e}}const i=process.env.CHOKIDAR_INTERVAL;if(i){t.interval=Number.parseInt(i,10)}if(undef(t,"atomic"))t.atomic=!t.usePolling&&!t.useFsEvents;if(t.atomic)this._pendingUnlinks=new Map;if(undef(t,"followSymlinks"))t.followSymlinks=true;if(undef(t,"awaitWriteFinish"))t.awaitWriteFinish=false;if(t.awaitWriteFinish===true)t.awaitWriteFinish={};const s=t.awaitWriteFinish;if(s){if(!s.stabilityThreshold)s.stabilityThreshold=2e3;if(!s.pollInterval)s.pollInterval=100;this._pendingWrites=new Map}if(t.ignored)t.ignored=arrify(t.ignored);let o=0;this._emitReady=()=>{o++;if(o>=this._readyCount){this._emitReady=z;this._readyEmitted=true;process.nextTick((()=>this.emit(v)))}};this._emitRaw=(...e)=>this.emit(E,...e);this._readyEmitted=false;this.options=t;if(t.useFsEvents){this._fsEventsHandler=new p(this)}else{this._nodeFsHandler=new d(this)}Object.freeze(t)}add(e,t,r){const{cwd:n,disableGlobbing:i}=this.options;this.closed=false;let o=unifyPaths(e);if(n){o=o.map((e=>{const t=getAbsolutePath(e,n);if(i||!u(e)){return t}return h(t)}))}o=o.filter((e=>{if(e.startsWith(L)){this._ignoredPaths.add(e.slice(1));return false}this._ignoredPaths.delete(e);this._ignoredPaths.delete(e+M);this._userIgnored=undefined;return true}));if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=o.length;if(this.options.persistent)this._readyCount+=o.length;o.forEach((e=>this._fsEventsHandler._addToFsEvents(e)))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=o.length;Promise.all(o.map((async e=>{const n=await this._nodeFsHandler._addToNodeFs(e,!r,0,0,t);if(n)this._emitReady();return n}))).then((e=>{if(this.closed)return;e.filter((e=>e)).forEach((e=>{this.add(s.dirname(e),s.basename(t||e))}))}))}return this}unwatch(e){if(this.closed)return this;const t=unifyPaths(e);const{cwd:r}=this.options;t.forEach((e=>{if(!s.isAbsolute(e)&&!this._closers.has(e)){if(r)e=s.join(r,e);e=s.resolve(e)}this._closePath(e);this._ignoredPaths.add(e);if(this._watched.has(e)){this._ignoredPaths.add(e+M)}this._userIgnored=undefined}));return this}close(){if(this.closed)return this._closePromise;this.closed=true;this.removeAllListeners();const e=[];this._closers.forEach((t=>t.forEach((t=>{const r=t();if(r instanceof Promise)e.push(r)}))));this._streams.forEach((e=>e.destroy()));this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach((e=>e.dispose()));["closers","watched","streams","symlinkPaths","throttled"].forEach((e=>{this[`_${e}`].clear()}));this._closePromise=e.length?Promise.all(e).then((()=>undefined)):Promise.resolve();return this._closePromise}getWatched(){const e={};this._watched.forEach(((t,r)=>{const n=this.options.cwd?s.relative(this.options.cwd,r):r;e[n||B]=t.getChildren().sort()}));return e}emitWithAll(e,t){this.emit(...t);if(e!==S)this.emit(m,...t)}async _emit(e,t,r,n,i){if(this.closed)return;const o=this.options;if(Y)t=s.normalize(t);if(o.cwd)t=s.relative(o.cwd,t);const a=[e,t];if(i!==undefined)a.push(r,n,i);else if(n!==undefined)a.push(r,n);else if(r!==undefined)a.push(r);const c=o.awaitWriteFinish;let l;if(c&&(l=this._pendingWrites.get(t))){l.lastChange=new Date;return this}if(o.atomic){if(e===y){this._pendingUnlinks.set(t,a);setTimeout((()=>{this._pendingUnlinks.forEach(((e,t)=>{this.emit(...e);this.emit(m,...e);this._pendingUnlinks.delete(t)}))}),typeof o.atomic==="number"?o.atomic:100);return this}if(e===_&&this._pendingUnlinks.has(t)){e=a[0]=g;this._pendingUnlinks.delete(t)}}if(c&&(e===_||e===g)&&this._readyEmitted){const awfEmit=(t,r)=>{if(t){e=a[0]=S;a[1]=t;this.emitWithAll(e,a)}else if(r){if(a.length>2){a[2]=r}else{a.push(r)}this.emitWithAll(e,a)}};this._awaitWriteFinish(t,c.stabilityThreshold,e,awfEmit);return this}if(e===g){const e=!this._throttle(g,t,50);if(e)return this}if(o.alwaysStat&&r===undefined&&(e===_||e===w||e===g)){const e=o.cwd?s.join(o.cwd,t):t;let r;try{r=await K(e)}catch(e){}if(!r||this.closed)return;a.push(r)}this.emitWithAll(e,a);return this}_handleError(e){const t=e&&e.code;if(e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")){this.emit(S,e)}return e||this.closed}_throttle(e,t,r){if(!this._throttled.has(e)){this._throttled.set(e,new Map)}const n=this._throttled.get(e);const i=n.get(t);if(i){i.count++;return false}let s;const clear=()=>{const e=n.get(t);const r=e?e.count:0;n.delete(t);clearTimeout(s);if(e)clearTimeout(e.timeoutObject);return r};s=setTimeout(clear,r);const o={timeoutObject:s,clear:clear,count:0};n.set(t,o);return o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,r,n){let o;let a=e;if(this.options.cwd&&!s.isAbsolute(e)){a=s.join(this.options.cwd,e)}const c=new Date;const awaitWriteFinish=r=>{i.stat(a,((i,s)=>{if(i||!this._pendingWrites.has(e)){if(i&&i.code!=="ENOENT")n(i);return}const a=Number(new Date);if(r&&s.size!==r.size){this._pendingWrites.get(e).lastChange=a}const c=this._pendingWrites.get(e);const l=a-c.lastChange;if(l>=t){this._pendingWrites.delete(e);n(undefined,s)}else{o=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval,s)}}))};if(!this._pendingWrites.has(e)){this._pendingWrites.set(e,{lastChange:c,cancelWait:()=>{this._pendingWrites.delete(e);clearTimeout(o);return r}});o=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,t){if(this.options.atomic&&O.test(e))return true;if(!this._userIgnored){const{cwd:e}=this.options;const t=this.options.ignored;const r=t&&t.map(normalizeIgnored(e));const n=arrify(r).filter((e=>typeof e===j&&!u(e))).map((e=>e+M));const i=this._getGlobIgnored().map(normalizeIgnored(e)).concat(r,n);this._userIgnored=c(i,undefined,W)}return this._userIgnored([e,t])}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e,t){const r=t||this.options.disableGlobbing||!u(e)?e:l(e);const n=this.options.followSymlinks;return new WatchHelper(e,r,n,this)}_getWatchedDir(e){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const t=s.resolve(e);if(!this._watched.has(t))this._watched.set(t,new DirEntry(t,this._boundRemove));return this._watched.get(t)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return true;const t=e&&Number.parseInt(e.mode,10);const r=t&511;const n=Number.parseInt(r.toString(8)[0],10);return Boolean(4&n)}_remove(e,t,r){const n=s.join(e,t);const i=s.resolve(n);r=r!=null?r:this._watched.has(n)||this._watched.has(i);if(!this._throttle("remove",n,100))return;if(!r&&!this.options.useFsEvents&&this._watched.size===1){this.add(e,t,true)}const o=this._getWatchedDir(n);const a=o.getChildren();a.forEach((e=>this._remove(n,e)));const c=this._getWatchedDir(e);const l=c.has(t);c.remove(t);if(this._symlinkPaths.has(i)){this._symlinkPaths.delete(i)}let u=n;if(this.options.cwd)u=s.relative(this.options.cwd,n);if(this.options.awaitWriteFinish&&this._pendingWrites.has(u)){const e=this._pendingWrites.get(u).cancelWait();if(e===_)return}this._watched.delete(n);this._watched.delete(i);const f=r?b:y;if(l&&!this._isIgnored(n))this._emit(f,n);if(!this.options.useFsEvents){this._closePath(n)}}_closePath(e){this._closeFile(e);const t=s.dirname(e);this._getWatchedDir(t).remove(s.basename(e))}_closeFile(e){const t=this._closers.get(e);if(!t)return;t.forEach((e=>e()));this._closers.delete(e)}_addPathCloser(e,t){if(!t)return;let r=this._closers.get(e);if(!r){r=[];this._closers.set(e,r)}r.push(t)}_readdirp(e,t){if(this.closed)return;const r={type:m,alwaysStat:true,lstat:true,...t};let n=a(e,r);this._streams.add(n);n.once(x,(()=>{n=undefined}));n.once(A,(()=>{if(n){this._streams.delete(n);n=undefined}}));return n}}t.FSWatcher=FSWatcher;const watch=(e,t)=>{const r=new FSWatcher(t);r.add(e);return r};t.watch=watch},4494:(e,t,r)=>{"use strict";const{sep:n}=r(1017);const{platform:i}=process;const s=r(2037);t.EV_ALL="all";t.EV_READY="ready";t.EV_ADD="add";t.EV_CHANGE="change";t.EV_ADD_DIR="addDir";t.EV_UNLINK="unlink";t.EV_UNLINK_DIR="unlinkDir";t.EV_RAW="raw";t.EV_ERROR="error";t.STR_DATA="data";t.STR_END="end";t.STR_CLOSE="close";t.FSEVENT_CREATED="created";t.FSEVENT_MODIFIED="modified";t.FSEVENT_DELETED="deleted";t.FSEVENT_MOVED="moved";t.FSEVENT_CLONED="cloned";t.FSEVENT_UNKNOWN="unknown";t.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;t.FSEVENT_TYPE_FILE="file";t.FSEVENT_TYPE_DIRECTORY="directory";t.FSEVENT_TYPE_SYMLINK="symlink";t.KEY_LISTENERS="listeners";t.KEY_ERR="errHandlers";t.KEY_RAW="rawEmitters";t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW];t.DOT_SLASH=`.${n}`;t.BACK_SLASH_RE=/\\/g;t.DOUBLE_SLASH_RE=/\/\//;t.SLASH_OR_BACK_SLASH_RE=/[/\\]/;t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;t.REPLACER_RE=/^\.[/\\]/;t.SLASH="/";t.SLASH_SLASH="//";t.BRACE_START="{";t.BANG="!";t.ONE_DOT=".";t.TWO_DOTS="..";t.STAR="*";t.GLOBSTAR="**";t.ROOT_GLOBSTAR="/**/*";t.SLASH_GLOBSTAR="/**";t.DIR_SUFFIX="Dir";t.ANYMATCH_OPTS={dot:true};t.STRING_TYPE="string";t.FUNCTION_TYPE="function";t.EMPTY_STR="";t.EMPTY_FN=()=>{};t.IDENTITY_FN=e=>e;t.isWindows=i==="win32";t.isMacos=i==="darwin";t.isLinux=i==="linux";t.isIBMi=s.type()==="OS400"},1771:(e,t,r)=>{"use strict";const n=r(7147);const i=r(1017);const{promisify:s}=r(3837);let o;try{o=r(6289)}catch(e){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(e)}if(o){const e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){const t=Number.parseInt(e[1],10);const r=Number.parseInt(e[2],10);if(t===8&&r<16){o=undefined}}}const{EV_ADD:a,EV_CHANGE:c,EV_ADD_DIR:l,EV_UNLINK:u,EV_ERROR:f,STR_DATA:h,STR_END:d,FSEVENT_CREATED:p,FSEVENT_MODIFIED:m,FSEVENT_DELETED:v,FSEVENT_MOVED:_,FSEVENT_UNKNOWN:g,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:y,FSEVENT_TYPE_FILE:w,FSEVENT_TYPE_DIRECTORY:b,FSEVENT_TYPE_SYMLINK:E,ROOT_GLOBSTAR:S,DIR_SUFFIX:x,DOT_SLASH:A,FUNCTION_TYPE:k,EMPTY_FN:C,IDENTITY_FN:R}=r(4494);const Depth=e=>isNaN(e)?{}:{depth:e};const O=s(n.stat);const T=s(n.lstat);const I=s(n.realpath);const P={stat:O,lstat:T};const N=new Map;const L=10;const B=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const createFSEventsInstance=(e,t)=>{const r=o.watch(e,t);return{stop:r}};function setFSEventsListener(e,t,r,n){let s=i.extname(t)?i.dirname(t):t;const a=i.dirname(s);let c=N.get(s);if(couldConsolidate(a)){s=a}const l=i.resolve(e);const u=l!==t;const filteredListener=(e,n,s)=>{if(u)e=e.replace(t,l);if(e===l||!e.indexOf(l+i.sep))r(e,n,s)};let f=false;for(const e of N.keys()){if(t.indexOf(i.resolve(e)+i.sep)===0){s=e;c=N.get(s);f=true;break}}if(c||f){c.listeners.add(filteredListener)}else{c={listeners:new Set([filteredListener]),rawEmitter:n,watcher:createFSEventsInstance(s,((e,t)=>{if(!c.listeners.size)return;if(t&y)return;const r=o.getInfo(e,t);c.listeners.forEach((n=>{n(e,t,r)}));c.rawEmitter(r.event,e,r)}))};N.set(s,c)}return()=>{const e=c.listeners;e.delete(filteredListener);if(!e.size){N.delete(s);if(c.watcher)return c.watcher.stop().then((()=>{c.rawEmitter=c.watcher=undefined;Object.freeze(c)}))}}}const couldConsolidate=e=>{let t=0;for(const r of N.keys()){if(r.indexOf(e)===0){t++;if(t>=L){return true}}}return false};const canUse=()=>o&&N.size<128;const calcDepth=(e,t)=>{let r=0;while(!e.indexOf(t)&&(e=i.dirname(e))!==t)r++;return r};const sameTypes=(e,t)=>e.type===b&&t.isDirectory()||e.type===E&&t.isSymbolicLink()||e.type===w&&t.isFile();class FsEventsHandler{constructor(e){this.fsw=e}checkIgnored(e,t){const r=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,t)){r.add(e);if(t&&t.isDirectory()){r.add(e+S)}return true}r.delete(e);r.delete(e+S)}addOrChange(e,t,r,n,i,s,o,l){const u=i.has(s)?c:a;this.handleEvent(u,e,t,r,n,i,s,o,l)}async checkExists(e,t,r,n,i,s,o,a){try{const c=await O(e);if(this.fsw.closed)return;if(sameTypes(o,c)){this.addOrChange(e,t,r,n,i,s,o,a)}else{this.handleEvent(u,e,t,r,n,i,s,o,a)}}catch(c){if(c.code==="EACCES"){this.addOrChange(e,t,r,n,i,s,o,a)}else{this.handleEvent(u,e,t,r,n,i,s,o,a)}}}handleEvent(e,t,r,n,i,s,o,c,f){if(this.fsw.closed||this.checkIgnored(t))return;if(e===u){const e=c.type===b;if(e||s.has(o)){this.fsw._remove(i,o,e)}}else{if(e===a){if(c.type===b)this.fsw._getWatchedDir(t);if(c.type===E&&f.followSymlinks){const e=f.depth===undefined?undefined:calcDepth(r,n)+1;return this._addToFsEvents(t,false,true,e)}this.fsw._getWatchedDir(i).add(o)}const s=c.type===b?e+x:e;this.fsw._emit(s,t);if(s===l)this._addToFsEvents(t,false,true)}}_watchWithFsEvents(e,t,r,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const s=this.fsw.options;const watchCallback=async(o,a,c)=>{if(this.fsw.closed)return;if(s.depth!==undefined&&calcDepth(o,t)>s.depth)return;const l=r(i.join(e,i.relative(e,o)));if(n&&!n(l))return;const f=i.dirname(l);const h=i.basename(l);const d=this.fsw._getWatchedDir(c.type===b?l:f);if(B.has(a)||c.event===g){if(typeof s.ignored===k){let e;try{e=await O(l)}catch(e){}if(this.fsw.closed)return;if(this.checkIgnored(l,e))return;if(sameTypes(c,e)){this.addOrChange(l,o,t,f,d,h,c,s)}else{this.handleEvent(u,l,o,t,f,d,h,c,s)}}else{this.checkExists(l,o,t,f,d,h,c,s)}}else{switch(c.event){case p:case m:return this.addOrChange(l,o,t,f,d,h,c,s);case v:case _:return this.checkExists(l,o,t,f,d,h,c,s)}}};const o=setFSEventsListener(e,t,watchCallback,this.fsw._emitRaw);this.fsw._emitReady();return o}async _handleFsEventsSymlink(e,t,r,n){if(this.fsw.closed||this.fsw._symlinkPaths.has(t))return;this.fsw._symlinkPaths.set(t,true);this.fsw._incrReadyCount();try{const t=await I(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(t)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(t||e,(n=>{let s=e;if(t&&t!==A){s=n.replace(t,e)}else if(n!==A){s=i.join(e,n)}return r(s)}),false,n)}catch(e){if(this.fsw._handleError(e)){return this.fsw._emitReady()}}}emitAdd(e,t,r,n,s){const o=r(e);const c=t.isDirectory();const u=this.fsw._getWatchedDir(i.dirname(o));const f=i.basename(o);if(c)this.fsw._getWatchedDir(o);if(u.has(f))return;u.add(f);if(!n.ignoreInitial||s===true){this.fsw._emit(c?l:a,o,t)}}initWatch(e,t,r,n){if(this.fsw.closed)return;const s=this._watchWithFsEvents(r.watchPath,i.resolve(e||r.watchPath),n,r.globFilter);this.fsw._addPathCloser(t,s)}async _addToFsEvents(e,t,r,n){if(this.fsw.closed){return}const s=this.fsw.options;const o=typeof t===k?t:R;const a=this.fsw._getWatchHelpers(e);try{const t=await P[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,t)){throw null}if(t.isDirectory()){if(!a.globFilter)this.emitAdd(o(e),t,o,s,r);if(n&&n>s.depth)return;this.fsw._readdirp(a.watchPath,{fileFilter:e=>a.filterPath(e),directoryFilter:e=>a.filterDir(e),...Depth(s.depth-(n||0))}).on(h,(e=>{if(this.fsw.closed){return}if(e.stats.isDirectory()&&!a.filterPath(e))return;const t=i.join(a.watchPath,e.path);const{fullPath:n}=e;if(a.followSymlinks&&e.stats.isSymbolicLink()){const e=s.depth===undefined?undefined:calcDepth(t,i.resolve(a.watchPath))+1;this._handleFsEventsSymlink(t,n,o,e)}else{this.emitAdd(t,e.stats,o,s,r)}})).on(f,C).on(d,(()=>{this.fsw._emitReady()}))}else{this.emitAdd(a.watchPath,t,o,s,r);this.fsw._emitReady()}}catch(e){if(!e||this.fsw._handleError(e)){this.fsw._emitReady();this.fsw._emitReady()}}if(s.persistent&&r!==true){if(typeof t===k){this.initWatch(undefined,e,a,o)}else{let t;try{t=await I(a.watchPath)}catch(e){}this.initWatch(t,e,a,o)}}}}e.exports=FsEventsHandler;e.exports.canUse=canUse},1335:(e,t,r)=>{"use strict";const n=r(7147);const i=r(1017);const{promisify:s}=r(3837);const o=r(1436);const{isWindows:a,isLinux:c,EMPTY_FN:l,EMPTY_STR:u,KEY_LISTENERS:f,KEY_ERR:h,KEY_RAW:d,HANDLER_KEYS:p,EV_CHANGE:m,EV_ADD:v,EV_ADD_DIR:_,EV_ERROR:g,STR_DATA:y,STR_END:w,BRACE_START:b,STAR:E}=r(4494);const S="watch";const x=s(n.open);const A=s(n.stat);const k=s(n.lstat);const C=s(n.close);const R=s(n.realpath);const O={lstat:k,stat:A};const foreach=(e,t)=>{if(e instanceof Set){e.forEach(t)}else{t(e)}};const addAndConvert=(e,t,r)=>{let n=e[t];if(!(n instanceof Set)){e[t]=n=new Set([n])}n.add(r)};const clearItem=e=>t=>{const r=e[t];if(r instanceof Set){r.clear()}else{delete e[t]}};const delFromSet=(e,t,r)=>{const n=e[t];if(n instanceof Set){n.delete(r)}else if(n===r){delete e[t]}};const isEmptySet=e=>e instanceof Set?e.size===0:!e;const T=new Map;function createFsWatchInstance(e,t,r,s,o){const handleEvent=(t,n)=>{r(e);o(t,n,{watchedPath:e});if(n&&e!==n){fsWatchBroadcast(i.resolve(e,n),f,i.join(e,n))}};try{return n.watch(e,t,handleEvent)}catch(e){s(e)}}const fsWatchBroadcast=(e,t,r,n,i)=>{const s=T.get(e);if(!s)return;foreach(s[t],(e=>{e(r,n,i)}))};const setFsWatchListener=(e,t,r,n)=>{const{listener:i,errHandler:s,rawEmitter:o}=n;let c=T.get(t);let l;if(!r.persistent){l=createFsWatchInstance(e,r,i,s,o);return l.close.bind(l)}if(c){addAndConvert(c,f,i);addAndConvert(c,h,s);addAndConvert(c,d,o)}else{l=createFsWatchInstance(e,r,fsWatchBroadcast.bind(null,t,f),s,fsWatchBroadcast.bind(null,t,d));if(!l)return;l.on(g,(async r=>{const n=fsWatchBroadcast.bind(null,t,h);c.watcherUnusable=true;if(a&&r.code==="EPERM"){try{const t=await x(e,"r");await C(t);n(r)}catch(e){}}else{n(r)}}));c={listeners:i,errHandlers:s,rawEmitters:o,watcher:l};T.set(t,c)}return()=>{delFromSet(c,f,i);delFromSet(c,h,s);delFromSet(c,d,o);if(isEmptySet(c.listeners)){c.watcher.close();T.delete(t);p.forEach(clearItem(c));c.watcher=undefined;Object.freeze(c)}}};const I=new Map;const setFsWatchFileListener=(e,t,r,i)=>{const{listener:s,rawEmitter:o}=i;let a=I.get(t);let c=new Set;let l=new Set;const u=a&&a.options;if(u&&(u.persistent<r.persistent||u.interval>r.interval)){c=a.listeners;l=a.rawEmitters;n.unwatchFile(t);a=undefined}if(a){addAndConvert(a,f,s);addAndConvert(a,d,o)}else{a={listeners:s,rawEmitters:o,options:r,watcher:n.watchFile(t,r,((r,n)=>{foreach(a.rawEmitters,(e=>{e(m,t,{curr:r,prev:n})}));const i=r.mtimeMs;if(r.size!==n.size||i>n.mtimeMs||i===0){foreach(a.listeners,(t=>t(e,r)))}}))};I.set(t,a)}return()=>{delFromSet(a,f,s);delFromSet(a,d,o);if(isEmptySet(a.listeners)){I.delete(t);n.unwatchFile(t);a.options=a.watcher=undefined;Object.freeze(a)}}};class NodeFsHandler{constructor(e){this.fsw=e;this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){const r=this.fsw.options;const n=i.dirname(e);const s=i.basename(e);const a=this.fsw._getWatchedDir(n);a.add(s);const c=i.resolve(e);const u={persistent:r.persistent};if(!t)t=l;let f;if(r.usePolling){u.interval=r.enableBinaryInterval&&o(s)?r.binaryInterval:r.interval;f=setFsWatchFileListener(e,c,u,{listener:t,rawEmitter:this.fsw._emitRaw})}else{f=setFsWatchListener(e,c,u,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return f}_handleFile(e,t,r){if(this.fsw.closed){return}const n=i.dirname(e);const s=i.basename(e);const o=this.fsw._getWatchedDir(n);let a=t;if(o.has(s))return;const listener=async(t,r)=>{if(!this.fsw._throttle(S,e,5))return;if(!r||r.mtimeMs===0){try{const r=await A(e);if(this.fsw.closed)return;const n=r.atimeMs;const i=r.mtimeMs;if(!n||n<=i||i!==a.mtimeMs){this.fsw._emit(m,e,r)}if(c&&a.ino!==r.ino){this.fsw._closeFile(t);a=r;this.fsw._addPathCloser(t,this._watchWithNodeFs(e,listener))}else{a=r}}catch(e){this.fsw._remove(n,s)}}else if(o.has(s)){const t=r.atimeMs;const n=r.mtimeMs;if(!t||t<=n||n!==a.mtimeMs){this.fsw._emit(m,e,r)}a=r}};const l=this._watchWithNodeFs(e,listener);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(v,e,0))return;this.fsw._emit(v,e,t)}return l}async _handleSymlink(e,t,r,n){if(this.fsw.closed){return}const i=e.fullPath;const s=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await R(r)}catch(e){this.fsw._emitReady();return true}if(this.fsw.closed)return;if(s.has(n)){if(this.fsw._symlinkPaths.get(i)!==t){this.fsw._symlinkPaths.set(i,t);this.fsw._emit(m,r,e.stats)}}else{s.add(n);this.fsw._symlinkPaths.set(i,t);this.fsw._emit(v,r,e.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(i)){return true}this.fsw._symlinkPaths.set(i,true)}_handleRead(e,t,r,n,s,o,a){e=i.join(e,u);if(!r.hasGlob){a=this.fsw._throttle("readdir",e,1e3);if(!a)return}const c=this.fsw._getWatchedDir(r.path);const l=new Set;let f=this.fsw._readdirp(e,{fileFilter:e=>r.filterPath(e),directoryFilter:e=>r.filterDir(e),depth:0}).on(y,(async a=>{if(this.fsw.closed){f=undefined;return}const u=a.path;let h=i.join(e,u);l.add(u);if(a.stats.isSymbolicLink()&&await this._handleSymlink(a,e,h,u)){return}if(this.fsw.closed){f=undefined;return}if(u===n||!n&&!c.has(u)){this.fsw._incrReadyCount();h=i.join(s,i.relative(s,h));this._addToNodeFs(h,t,r,o+1)}})).on(g,this._boundHandleError);return new Promise((t=>f.once(w,(()=>{if(this.fsw.closed){f=undefined;return}const u=a?a.clear():false;t();c.getChildren().filter((t=>t!==e&&!l.has(t)&&(!r.hasGlob||r.filterPath({fullPath:i.resolve(e,t)})))).forEach((t=>{this.fsw._remove(e,t)}));f=undefined;if(u)this._handleRead(e,false,r,n,s,o,a)}))))}async _handleDir(e,t,r,n,s,o,a){const c=this.fsw._getWatchedDir(i.dirname(e));const l=c.has(i.basename(e));if(!(r&&this.fsw.options.ignoreInitial)&&!s&&!l){if(!o.hasGlob||o.globFilter(e))this.fsw._emit(_,e,t)}c.add(i.basename(e));this.fsw._getWatchedDir(e);let u;let f;const h=this.fsw.options.depth;if((h==null||n<=h)&&!this.fsw._symlinkPaths.has(a)){if(!s){await this._handleRead(e,r,o,s,e,n,u);if(this.fsw.closed)return}f=this._watchWithNodeFs(e,((t,r)=>{if(r&&r.mtimeMs===0)return;this._handleRead(t,false,o,s,e,n,u)}))}return f}async _addToNodeFs(e,t,r,n,s){const o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed){o();return false}const a=this.fsw._getWatchHelpers(e,n);if(!a.hasGlob&&r){a.hasGlob=r.hasGlob;a.globFilter=r.globFilter;a.filterPath=e=>r.filterPath(e);a.filterDir=e=>r.filterDir(e)}try{const r=await O[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,r)){o();return false}const c=this.fsw.options.followSymlinks&&!e.includes(E)&&!e.includes(b);let l;if(r.isDirectory()){const o=i.resolve(e);const u=c?await R(e):e;if(this.fsw.closed)return;l=await this._handleDir(a.watchPath,r,t,n,s,a,u);if(this.fsw.closed)return;if(o!==u&&u!==undefined){this.fsw._symlinkPaths.set(o,u)}}else if(r.isSymbolicLink()){const s=c?await R(e):e;if(this.fsw.closed)return;const o=i.dirname(a.watchPath);this.fsw._getWatchedDir(o).add(a.watchPath);this.fsw._emit(v,a.watchPath,r);l=await this._handleDir(o,r,t,n,e,a,s);if(this.fsw.closed)return;if(s!==undefined){this.fsw._symlinkPaths.set(i.resolve(e),s)}}else{l=this._handleFile(a.watchPath,r,t)}o();this.fsw._addPathCloser(e,l);return false}catch(t){if(this.fsw._handleError(t)){o();return e}}}}e.exports=NodeFsHandler},2746:(e,t,r)=>{"use strict";const n=r(2081);const i=r(6855);const s=r(4101);function spawn(e,t,r){const o=i(e,t,r);const a=n.spawn(o.command,o.args,o.options);s.hookChildProcess(a,o);return a}function spawnSync(e,t,r){const o=i(e,t,r);const a=n.spawnSync(o.command,o.args,o.options);a.error=a.error||s.verifyENOENTSync(a.status,o);return a}e.exports=spawn;e.exports.spawn=spawn;e.exports.sync=spawnSync;e.exports._parse=i;e.exports._enoent=s},4101:e=>{"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,r){if(!t){return}const n=e.emit;e.emit=function(t,i){if(t==="exit"){const t=verifyENOENT(i,r,"spawn");if(t){return n.call(e,"error",t)}}return n.apply(e,arguments)}}function verifyENOENT(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},6855:(e,t,r)=>{"use strict";const n=r(1017);const i=r(7274);const s=r(4274);const o=r(1252);const a=process.platform==="win32";const c=/\.(?:com|exe)$/i;const l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(e){e.file=i(e);const t=e.file&&o(e.file);if(t){e.args.unshift(e.file);e.command=t;return i(e)}return e.file}function parseNonShell(e){if(!a){return e}const t=detectShebang(e);const r=!c.test(t);if(e.options.forceShell||r){const r=l.test(t);e.command=n.normalize(e.command);e.command=s.command(e.command);e.args=e.args.map((e=>s.argument(e,r)));const i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parse(e,t,r){if(t&&!Array.isArray(t)){r=t;t=null}t=t?t.slice(0):[];r=Object.assign({},r);const n={command:e,args:t,options:r,file:undefined,original:{command:e,args:t}};return r.shell?n:parseNonShell(n)}e.exports=parse},4274:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,r){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(r){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},1252:(e,t,r)=>{"use strict";const n=r(7147);const i=r(7032);function readShebang(e){const t=150;const r=Buffer.alloc(t);let s;try{s=n.openSync(e,"r");n.readSync(s,r,0,t,0);n.closeSync(s)}catch(e){}return i(r.toString())}e.exports=readShebang},7274:(e,t,r)=>{"use strict";const n=r(1017);const i=r(4207);const s=r(539);function resolveCommandAttempt(e,t){const r=e.options.env||process.env;const o=process.cwd();const a=e.options.cwd!=null;const c=a&&process.chdir!==undefined&&!process.chdir.disabled;if(c){try{process.chdir(e.options.cwd)}catch(e){}}let l;try{l=i.sync(e.command,{path:r[s({env:r})],pathExt:t?n.delimiter:undefined})}catch(e){}finally{if(c){process.chdir(o)}}if(l){l=n.resolve(a?e.options.cwd:"",l)}return l}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},4819:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.BlockCipher;var i=t.algo;var s=[];var o=[];var a=[];var c=[];var l=[];var u=[];var f=[];var h=[];var d=[];var p=[];(function(){var e=[];for(var t=0;t<256;t++){if(t<128){e[t]=t<<1}else{e[t]=t<<1^283}}var r=0;var n=0;for(var t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^i&255^99;s[r]=i;o[i]=r;var m=e[r];var v=e[m];var _=e[v];var g=e[i]*257^i*16843008;a[r]=g<<24|g>>>8;c[r]=g<<16|g>>>16;l[r]=g<<8|g>>>24;u[r]=g;var g=_*16843009^v*65537^m*257^r*16843008;f[i]=g<<24|g>>>8;h[i]=g<<16|g>>>16;d[i]=g<<8|g>>>24;p[i]=g;if(!r){r=n=1}else{r=m^e[e[e[_^m]]];n^=e[e[n]]}}})();var m=[0,1,2,4,8,16,32,64,128,27,54];var v=i.AES=n.extend({_doReset:function(){var e;if(this._nRounds&&this._keyPriorReset===this._key){return}var t=this._keyPriorReset=this._key;var r=t.words;var n=t.sigBytes/4;var i=this._nRounds=n+6;var o=(i+1)*4;var a=this._keySchedule=[];for(var c=0;c<o;c++){if(c<n){a[c]=r[c]}else{e=a[c-1];if(!(c%n)){e=e<<8|e>>>24;e=s[e>>>24]<<24|s[e>>>16&255]<<16|s[e>>>8&255]<<8|s[e&255];e^=m[c/n|0]<<24}else if(n>6&&c%n==4){e=s[e>>>24]<<24|s[e>>>16&255]<<16|s[e>>>8&255]<<8|s[e&255]}a[c]=a[c-n]^e}}var l=this._invKeySchedule=[];for(var u=0;u<o;u++){var c=o-u;if(u%4){var e=a[c]}else{var e=a[c-4]}if(u<4||c<=4){l[u]=e}else{l[u]=f[s[e>>>24]]^h[s[e>>>16&255]]^d[s[e>>>8&255]]^p[s[e&255]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,c,l,u,s)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3];e[t+3]=r;this._doCryptBlock(e,t,this._invKeySchedule,f,h,d,p,o);var r=e[t+1];e[t+1]=e[t+3];e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,s,o,a){var c=this._nRounds;var l=e[t]^r[0];var u=e[t+1]^r[1];var f=e[t+2]^r[2];var h=e[t+3]^r[3];var d=4;for(var p=1;p<c;p++){var m=n[l>>>24]^i[u>>>16&255]^s[f>>>8&255]^o[h&255]^r[d++];var v=n[u>>>24]^i[f>>>16&255]^s[h>>>8&255]^o[l&255]^r[d++];var _=n[f>>>24]^i[h>>>16&255]^s[l>>>8&255]^o[u&255]^r[d++];var g=n[h>>>24]^i[l>>>16&255]^s[u>>>8&255]^o[f&255]^r[d++];l=m;u=v;f=_;h=g}var m=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[f>>>8&255]<<8|a[h&255])^r[d++];var v=(a[u>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[l&255])^r[d++];var _=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[u&255])^r[d++];var g=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[f&255])^r[d++];e[t]=m;e[t+1]=v;e[t+2]=_;e[t+3]=g},keySize:256/32});t.AES=n._createHelper(v)})();return e.AES}))},482:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.BlockCipher;var i=t.algo;const s=16;const o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731];const a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function F(e,t){let r=t>>24&255;let n=t>>16&255;let i=t>>8&255;let s=t&255;let o=e.sbox[0][r]+e.sbox[1][n];o=o^e.sbox[2][i];o=o+e.sbox[3][s];return o}function BlowFish_Encrypt(e,t,r){let n=t;let i=r;let o;for(let t=0;t<s;++t){n=n^e.pbox[t];i=F(e,n)^i;o=n;n=i;i=o}o=n;n=i;i=o;i=i^e.pbox[s];n=n^e.pbox[s+1];return{left:n,right:i}}function BlowFish_Decrypt(e,t,r){let n=t;let i=r;let o;for(let t=s+1;t>1;--t){n=n^e.pbox[t];i=F(e,n)^i;o=n;n=i;i=o}o=n;n=i;i=o;i=i^e.pbox[1];n=n^e.pbox[0];return{left:n,right:i}}function BlowFishInit(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++){e.sbox[t][r]=a[t][r]}}let n=0;for(let i=0;i<s+2;i++){e.pbox[i]=o[i]^t[n];n++;if(n>=r){n=0}}let i=0;let c=0;let l=0;for(let t=0;t<s+2;t+=2){l=BlowFish_Encrypt(e,i,c);i=l.left;c=l.right;e.pbox[t]=i;e.pbox[t+1]=c}for(let t=0;t<4;t++){for(let r=0;r<256;r+=2){l=BlowFish_Encrypt(e,i,c);i=l.left;c=l.right;e.sbox[t][r]=i;e.sbox[t][r+1]=c}}return true}var l=i.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset===this._key){return}var e=this._keyPriorReset=this._key;var t=e.words;var r=e.sigBytes/4;BlowFishInit(c,t,r)},encryptBlock:function(e,t){var r=BlowFish_Encrypt(c,e[t],e[t+1]);e[t]=r.left;e[t+1]=r.right},decryptBlock:function(e,t){var r=BlowFish_Decrypt(c,e[t],e[t+1]);e[t]=r.left;e[t+1]=r.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(l)})();return e.Blowfish}))},714:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(4727))}else{}})(this,(function(e){e.lib.Cipher||function(t){var r=e;var n=r.lib;var i=n.Base;var s=n.WordArray;var o=n.BufferedBlockAlgorithm;var a=r.enc;var c=a.Utf8;var l=a.Base64;var u=r.algo;var f=u.EvpKDF;var h=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r);this._xformMode=e;this._key=t;this.reset()},reset:function(){o.reset.call(this);this._doReset()},process:function(e){this._append(e);return this._process()},finalize:function(e){if(e){this._append(e)}var t=this._doFinalize();return t},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function selectCipherStrategy(e){if(typeof e=="string"){return k}else{return S}}return function(e){return{encrypt:function(t,r,n){return selectCipherStrategy(r).encrypt(e,t,r,n)},decrypt:function(t,r,n){return selectCipherStrategy(r).decrypt(e,t,r,n)}}}}()});var d=n.StreamCipher=h.extend({_doFinalize:function(){var e=this._process(!!"flush");return e},blockSize:1});var p=r.mode={};var m=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e;this._iv=t}});var v=p.CBC=function(){var e=m.extend();e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;xorBlock.call(this,e,t,n);r.encryptBlock(e,t);this._prevBlock=e.slice(t,t+n)}});e.Decryptor=e.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=e.slice(t,t+n);r.decryptBlock(e,t);xorBlock.call(this,e,t,n);this._prevBlock=i}});function xorBlock(e,r,n){var i;var s=this._iv;if(s){i=s;this._iv=t}else{i=this._prevBlock}for(var o=0;o<n;o++){e[r+o]^=i[o]}}return e}();var _=r.pad={};var g=_.Pkcs7={pad:function(e,t){var r=t*4;var n=r-e.sigBytes%r;var i=n<<24|n<<16|n<<8|n;var o=[];for(var a=0;a<n;a+=4){o.push(i)}var c=s.create(o,n);e.concat(c)},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};var y=n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:v,padding:g}),reset:function(){var e;h.reset.call(this);var t=this.cfg;var r=t.iv;var n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE){e=n.createEncryptor}else{e=n.createDecryptor;this._minBufferSize=1}if(this._mode&&this._mode.__creator==e){this._mode.init(this,r&&r.words)}else{this._mode=e.call(n,this,r&&r.words);this._mode.__creator=e}},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e;var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);e=this._process(!!"flush")}else{e=this._process(!!"flush");t.unpad(e)}return e},blockSize:128/32});var w=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}});var b=r.format={};var E=b.OpenSSL={stringify:function(e){var t;var r=e.ciphertext;var n=e.salt;if(n){t=s.create([1398893684,1701076831]).concat(n).concat(r)}else{t=r}return t.toString(l)},parse:function(e){var t;var r=l.parse(e);var n=r.words;if(n[0]==1398893684&&n[1]==1701076831){t=s.create(n.slice(2,4));n.splice(0,4);r.sigBytes-=16}return w.create({ciphertext:r,salt:t})}};var S=n.SerializableCipher=i.extend({cfg:i.extend({format:E}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n);var s=i.finalize(t);var o=i.cfg;return w.create({ciphertext:s,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n);t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){if(typeof e=="string"){return t.parse(e,this)}else{return e}}});var x=r.kdf={};var A=x.OpenSSL={execute:function(e,t,r,n,i){if(!n){n=s.random(64/8)}if(!i){var o=f.create({keySize:t+r}).compute(e,n)}else{var o=f.create({keySize:t+r,hasher:i}).compute(e,n)}var a=s.create(o.words.slice(t),r*4);o.sigBytes=t*4;return w.create({key:o,iv:a,salt:n})}};var k=n.PasswordBasedCipher=S.extend({cfg:S.cfg.extend({kdf:A}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=n.kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var s=S.encrypt.call(this,e,t,i.key,n);s.mixIn(i);return s},decrypt:function(e,t,r,n){n=this.cfg.extend(n);t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);n.iv=i.iv;var s=S.decrypt.call(this,e,t,i.key,n);return s}})}()}))},425:function(e,t,r){(function(r,n){if(true){e.exports=t=n()}else{}})(this,(function(){var e=e||function(e,t){var n;if(typeof window!=="undefined"&&window.crypto){n=window.crypto}if(typeof self!=="undefined"&&self.crypto){n=self.crypto}if(typeof globalThis!=="undefined"&&globalThis.crypto){n=globalThis.crypto}if(!n&&typeof window!=="undefined"&&window.msCrypto){n=window.msCrypto}if(!n&&typeof global!=="undefined"&&global.crypto){n=global.crypto}if(!n&&"function"==="function"){try{n=r(6113)}catch(e){}}var cryptoSecureRandomInt=function(){if(n){if(typeof n.getRandomValues==="function"){try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}}if(typeof n.randomBytes==="function"){try{return n.randomBytes(4).readInt32LE()}catch(e){}}}throw new Error("Native crypto module could not be used to get secure random number.")};var i=Object.create||function(){function F(){}return function(e){var t;F.prototype=e;t=new F;F.prototype=null;return t}}();var s={};var o=s.lib={};var a=o.Base=function(){return{extend:function(e){var t=i(this);if(e){t.mixIn(e)}if(!t.hasOwnProperty("init")||this.init===t.init){t.init=function(){t.$super.init.apply(this,arguments)}}t.init.prototype=t;t.$super=this;return t},create:function(){var e=this.extend();e.init.apply(e,arguments);return e},init:function(){},mixIn:function(e){for(var t in e){if(e.hasOwnProperty(t)){this[t]=e[t]}}if(e.hasOwnProperty("toString")){this.toString=e.toString}},clone:function(){return this.init.prototype.extend(this)}}}();var c=o.WordArray=a.extend({init:function(e,r){e=this.words=e||[];if(r!=t){this.sigBytes=r}else{this.sigBytes=e.length*4}},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words;var r=e.words;var n=this.sigBytes;var i=e.sigBytes;this.clamp();if(n%4){for(var s=0;s<i;s++){var o=r[s>>>2]>>>24-s%4*8&255;t[n+s>>>2]|=o<<24-(n+s)%4*8}}else{for(var a=0;a<i;a+=4){t[n+a>>>2]=r[a>>>2]}}this.sigBytes+=i;return this},clamp:function(){var t=this.words;var r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8;t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);e.words=this.words.slice(0);return e},random:function(e){var t=[];for(var r=0;r<e;r+=4){t.push(cryptoSecureRandomInt())}return new c.init(t,e)}});var l=s.enc={};var u=l.Hex={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i++){var s=t[i>>>2]>>>24-i%4*8&255;n.push((s>>>4).toString(16));n.push((s&15).toString(16))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var n=0;n<t;n+=2){r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4}return new c.init(r,t/2)}};var f=l.Latin1={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i++){var s=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var n=0;n<t;n++){r[n>>>2]|=(e.charCodeAt(n)&255)<<24-n%4*8}return new c.init(r,t)}};var h=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}};var d=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init;this._nDataBytes=0},_append:function(e){if(typeof e=="string"){e=h.parse(e)}this._data.concat(e);this._nDataBytes+=e.sigBytes},_process:function(t){var r;var n=this._data;var i=n.words;var s=n.sigBytes;var o=this.blockSize;var a=o*4;var l=s/a;if(t){l=e.ceil(l)}else{l=e.max((l|0)-this._minBufferSize,0)}var u=l*o;var f=e.min(u*4,s);if(u){for(var h=0;h<u;h+=o){this._doProcessBlock(i,h)}r=i.splice(0,u);n.sigBytes-=f}return new c.init(r,f)},clone:function(){var e=a.clone.call(this);e._data=this._data.clone();return e},_minBufferSize:0});var p=o.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e);this.reset()},reset:function(){d.reset.call(this);this._doReset()},update:function(e){this._append(e);this._process();return this},finalize:function(e){if(e){this._append(e)}var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new m.HMAC.init(e,r).finalize(t)}}});var m=s.algo={};return s}(Math);return e}))},8025:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var s=i.Base64={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=this._map;e.clamp();var i=[];for(var s=0;s<r;s+=3){var o=t[s>>>2]>>>24-s%4*8&255;var a=t[s+1>>>2]>>>24-(s+1)%4*8&255;var c=t[s+2>>>2]>>>24-(s+2)%4*8&255;var l=o<<16|a<<8|c;for(var u=0;u<4&&s+u*.75<r;u++){i.push(n.charAt(l>>>6*(3-u)&63))}}var f=n.charAt(64);if(f){while(i.length%4){i.push(f)}}return i.join("")},parse:function(e){var t=e.length;var r=this._map;var n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<r.length;i++){n[r.charCodeAt(i)]=i}}var s=r.charAt(64);if(s){var o=e.indexOf(s);if(o!==-1){t=o}}return parseLoop(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function parseLoop(e,t,r){var i=[];var s=0;for(var o=0;o<t;o++){if(o%4){var a=r[e.charCodeAt(o-1)]<<o%4*2;var c=r[e.charCodeAt(o)]>>>6-o%4*2;var l=a|c;i[s>>>2]|=l<<24-s%4*8;s++}}return n.create(i,s)}})();return e.enc.Base64}))},9349:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var s=i.Base64url={stringify:function(e,t){if(t===undefined){t=true}var r=e.words;var n=e.sigBytes;var i=t?this._safe_map:this._map;e.clamp();var s=[];for(var o=0;o<n;o+=3){var a=r[o>>>2]>>>24-o%4*8&255;var c=r[o+1>>>2]>>>24-(o+1)%4*8&255;var l=r[o+2>>>2]>>>24-(o+2)%4*8&255;var u=a<<16|c<<8|l;for(var f=0;f<4&&o+f*.75<n;f++){s.push(i.charAt(u>>>6*(3-f)&63))}}var h=i.charAt(64);if(h){while(s.length%4){s.push(h)}}return s.join("")},parse:function(e,t){if(t===undefined){t=true}var r=e.length;var n=t?this._safe_map:this._map;var i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s<n.length;s++){i[n.charCodeAt(s)]=s}}var o=n.charAt(64);if(o){var a=e.indexOf(o);if(a!==-1){r=a}}return parseLoop(e,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function parseLoop(e,t,r){var i=[];var s=0;for(var o=0;o<t;o++){if(o%4){var a=r[e.charCodeAt(o-1)]<<o%4*2;var c=r[e.charCodeAt(o)]>>>6-o%4*2;var l=a|c;i[s>>>2]|=l<<24-s%4*8;s++}}return n.create(i,s)}})();return e.enc.Base64url}))},6974:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.enc;var s=i.Utf16=i.Utf16BE={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i+=2){var s=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var i=0;i<t;i++){r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16}return n.create(r,t*2)}};i.Utf16LE={stringify:function(e){var t=e.words;var r=e.sigBytes;var n=[];for(var i=0;i<r;i+=2){var s=swapEndian(t[i>>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){var t=e.length;var r=[];for(var i=0;i<t;i++){r[i>>>1]|=swapEndian(e.charCodeAt(i)<<16-i%2*16)}return n.create(r,t*2)}};function swapEndian(e){return e<<8&4278255360|e>>>8&16711935}})();return e.enc.Utf16}))},4727:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(7156),r(1192))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=r.WordArray;var s=t.algo;var o=s.MD5;var a=s.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var r;var n=this.cfg;var s=n.hasher.create();var o=i.create();var a=o.words;var c=n.keySize;var l=n.iterations;while(a.length<c){if(r){s.update(r)}r=s.update(e).finalize(t);s.reset();for(var u=1;u<l;u++){r=s.finalize(r);s.reset()}o.concat(r)}o.sigBytes=c*4;return o}});t.EvpKDF=function(e,t,r){return a.create(r).compute(e,t)}})();return e.EvpKDF}))},9204:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.CipherParams;var s=r.enc;var o=s.Hex;var a=r.format;var c=a.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}}})();return e.format.Hex}))},1192:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=t.enc;var s=i.Utf8;var o=t.algo;var a=o.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init;if(typeof t=="string"){t=s.parse(t)}var r=e.blockSize;var n=r*4;if(t.sigBytes>n){t=e.finalize(t)}t.clamp();var i=this._oKey=t.clone();var o=this._iKey=t.clone();var a=i.words;var c=o.words;for(var l=0;l<r;l++){a[l]^=1549556828;c[l]^=909522486}i.sigBytes=o.sigBytes=n;this.reset()},reset:function(){var e=this._hasher;e.reset();e.update(this._iKey)},update:function(e){this._hasher.update(e);return this},finalize:function(e){var t=this._hasher;var r=t.finalize(e);t.reset();var n=t.finalize(this._oKey.clone().concat(r));return n}})})()}))},4134:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(5474),r(3281),r(6974),r(8025),r(9349),r(250),r(7156),r(3941),r(1081),r(2034),r(4861),r(7800),r(2513),r(1192),r(1476),r(4727),r(714),r(8180),r(9762),r(595),r(2462),r(5643),r(2295),r(5149),r(9573),r(8727),r(9610),r(9204),r(4819),r(3644),r(4353),r(2104),r(6424),r(482))}else{}})(this,(function(e){return e}))},3281:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){if(typeof ArrayBuffer!="function"){return}var t=e;var r=t.lib;var n=r.WordArray;var i=n.init;var s=n.init=function(e){if(e instanceof ArrayBuffer){e=new Uint8Array(e)}if(e instanceof Int8Array||typeof Uint8ClampedArray!=="undefined"&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array){e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}if(e instanceof Uint8Array){var t=e.byteLength;var r=[];for(var n=0;n<t;n++){r[n>>>2]|=e[n]<<24-n%4*8}i.call(this,r,t)}else{i.apply(this,arguments)}};s.prototype=n})();return e.lib.WordArray}))},250:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var s=n.Hasher;var o=r.algo;var a=[];(function(){for(var e=0;e<64;e++){a[e]=t.abs(t.sin(e+1))*4294967296|0}})();var c=o.MD5=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r;var i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words;var o=e[t+0];var c=e[t+1];var l=e[t+2];var u=e[t+3];var f=e[t+4];var h=e[t+5];var d=e[t+6];var p=e[t+7];var m=e[t+8];var v=e[t+9];var _=e[t+10];var g=e[t+11];var y=e[t+12];var w=e[t+13];var b=e[t+14];var E=e[t+15];var S=s[0];var x=s[1];var A=s[2];var k=s[3];S=FF(S,x,A,k,o,7,a[0]);k=FF(k,S,x,A,c,12,a[1]);A=FF(A,k,S,x,l,17,a[2]);x=FF(x,A,k,S,u,22,a[3]);S=FF(S,x,A,k,f,7,a[4]);k=FF(k,S,x,A,h,12,a[5]);A=FF(A,k,S,x,d,17,a[6]);x=FF(x,A,k,S,p,22,a[7]);S=FF(S,x,A,k,m,7,a[8]);k=FF(k,S,x,A,v,12,a[9]);A=FF(A,k,S,x,_,17,a[10]);x=FF(x,A,k,S,g,22,a[11]);S=FF(S,x,A,k,y,7,a[12]);k=FF(k,S,x,A,w,12,a[13]);A=FF(A,k,S,x,b,17,a[14]);x=FF(x,A,k,S,E,22,a[15]);S=GG(S,x,A,k,c,5,a[16]);k=GG(k,S,x,A,d,9,a[17]);A=GG(A,k,S,x,g,14,a[18]);x=GG(x,A,k,S,o,20,a[19]);S=GG(S,x,A,k,h,5,a[20]);k=GG(k,S,x,A,_,9,a[21]);A=GG(A,k,S,x,E,14,a[22]);x=GG(x,A,k,S,f,20,a[23]);S=GG(S,x,A,k,v,5,a[24]);k=GG(k,S,x,A,b,9,a[25]);A=GG(A,k,S,x,u,14,a[26]);x=GG(x,A,k,S,m,20,a[27]);S=GG(S,x,A,k,w,5,a[28]);k=GG(k,S,x,A,l,9,a[29]);A=GG(A,k,S,x,p,14,a[30]);x=GG(x,A,k,S,y,20,a[31]);S=HH(S,x,A,k,h,4,a[32]);k=HH(k,S,x,A,m,11,a[33]);A=HH(A,k,S,x,g,16,a[34]);x=HH(x,A,k,S,b,23,a[35]);S=HH(S,x,A,k,c,4,a[36]);k=HH(k,S,x,A,f,11,a[37]);A=HH(A,k,S,x,p,16,a[38]);x=HH(x,A,k,S,_,23,a[39]);S=HH(S,x,A,k,w,4,a[40]);k=HH(k,S,x,A,o,11,a[41]);A=HH(A,k,S,x,u,16,a[42]);x=HH(x,A,k,S,d,23,a[43]);S=HH(S,x,A,k,v,4,a[44]);k=HH(k,S,x,A,y,11,a[45]);A=HH(A,k,S,x,E,16,a[46]);x=HH(x,A,k,S,l,23,a[47]);S=II(S,x,A,k,o,6,a[48]);k=II(k,S,x,A,p,10,a[49]);A=II(A,k,S,x,b,15,a[50]);x=II(x,A,k,S,h,21,a[51]);S=II(S,x,A,k,y,6,a[52]);k=II(k,S,x,A,u,10,a[53]);A=II(A,k,S,x,_,15,a[54]);x=II(x,A,k,S,c,21,a[55]);S=II(S,x,A,k,m,6,a[56]);k=II(k,S,x,A,E,10,a[57]);A=II(A,k,S,x,d,15,a[58]);x=II(x,A,k,S,w,21,a[59]);S=II(S,x,A,k,f,6,a[60]);k=II(k,S,x,A,g,10,a[61]);A=II(A,k,S,x,l,15,a[62]);x=II(x,A,k,S,v,21,a[63]);s[0]=s[0]+S|0;s[1]=s[1]+x|0;s[2]=s[2]+A|0;s[3]=s[3]+k|0},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var i=e.sigBytes*8;r[i>>>5]|=128<<24-i%32;var s=t.floor(n/4294967296);var o=n;r[(i+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;r[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;e.sigBytes=(r.length+1)*4;this._process();var a=this._hash;var c=a.words;for(var l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return a},clone:function(){var e=s.clone.call(this);e._hash=this._hash.clone();return e}});function FF(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<<s|a>>>32-s)+t}function GG(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<<s|a>>>32-s)+t}function HH(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<<s|a>>>32-s)+t}function II(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<<s|a>>>32-s)+t}r.MD5=s._createHelper(c);r.HmacMD5=s._createHmacHelper(c)})(Math);return e.MD5}))},8180:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;generateKeystreamAndEncrypt.call(this,e,t,n,r);this._prevBlock=e.slice(t,t+n)}});t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=e.slice(t,t+n);generateKeystreamAndEncrypt.call(this,e,t,n,r);this._prevBlock=i}});function generateKeystreamAndEncrypt(e,t,r,n){var i;var s=this._iv;if(s){i=s.slice(0);this._iv=undefined}else{i=this._prevBlock}n.encryptBlock(i,0);for(var o=0;o<r;o++){e[t+o]^=i[o]}}return t}();return e.mode.CFB}))},595:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){
|
|
1
|
+
(()=>{var __webpack_modules__={2739:(r,n,s)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});const a=s(4006);const l=s(6133);const u="!";const f={returnIndex:false};const arrify=r=>Array.isArray(r)?r:[r];const createPattern=(r,n)=>{if(typeof r==="function"){return r}if(typeof r==="string"){const s=a(r,n);return n=>r===n||s(n)}if(r instanceof RegExp){return n=>r.test(n)}return r=>false};const matchPatterns=(r,n,s,a)=>{const u=Array.isArray(s);const f=u?s[0]:s;if(!u&&typeof f!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(f))}const d=l(f,false);for(let r=0;r<n.length;r++){const s=n[r];if(s(d)){return a?-1:false}}const p=u&&[d].concat(s.slice(1));for(let n=0;n<r.length;n++){const s=r[n];if(u?s(...p):s(d)){return a?n:true}}return a?-1:false};const anymatch=(r,n,s=f)=>{if(r==null){throw new TypeError("anymatch: specify first argument")}const l=typeof s==="boolean"?{returnIndex:s}:s;const d=l.returnIndex||false;const p=arrify(r);const m=p.filter((r=>typeof r==="string"&&r.charAt(0)===u)).map((r=>r.slice(1))).map((r=>a(r,l)));const g=p.filter((r=>typeof r!=="string"||typeof r==="string"&&r.charAt(0)!==u)).map((r=>createPattern(r,l)));if(n==null){return(r,n=false)=>{const s=typeof n==="boolean"?n:false;return matchPatterns(g,m,r,s)}}return matchPatterns(g,m,n,d)};anymatch.default=anymatch;r.exports=anymatch},3242:(r,n,s)=>{r.exports=s(6548)},748:(r,n,s)=>{"use strict";const a=s(3317);const l=s(1113);const u=s(5290);const f=s(507);const braces=(r,n={})=>{let s=[];if(Array.isArray(r)){for(const a of r){const r=braces.create(a,n);if(Array.isArray(r)){s.push(...r)}else{s.push(r)}}}else{s=[].concat(braces.create(r,n))}if(n&&n.expand===true&&n.nodupes===true){s=[...new Set(s)]}return s};braces.parse=(r,n={})=>f(r,n);braces.stringify=(r,n={})=>{if(typeof r==="string"){return a(braces.parse(r,n),n)}return a(r,n)};braces.compile=(r,n={})=>{if(typeof r==="string"){r=braces.parse(r,n)}return l(r,n)};braces.expand=(r,n={})=>{if(typeof r==="string"){r=braces.parse(r,n)}let s=u(r,n);if(n.noempty===true){s=s.filter(Boolean)}if(n.nodupes===true){s=[...new Set(s)]}return s};braces.create=(r,n={})=>{if(r===""||r.length<3){return[r]}return n.expand!==true?braces.compile(r,n):braces.expand(r,n)};r.exports=braces},1113:(r,n,s)=>{"use strict";const a=s(877);const l=s(2257);const compile=(r,n={})=>{const walk=(r,s={})=>{const u=l.isInvalidBrace(s);const f=r.invalid===true&&n.escapeInvalid===true;const d=u===true||f===true;const p=n.escapeInvalid===true?"\\":"";let m="";if(r.isOpen===true){return p+r.value}if(r.isClose===true){console.log("node.isClose",p,r.value);return p+r.value}if(r.type==="open"){return d?p+r.value:"("}if(r.type==="close"){return d?p+r.value:")"}if(r.type==="comma"){return r.prev.type==="comma"?"":d?r.value:"|"}if(r.value){return r.value}if(r.nodes&&r.ranges>0){const s=l.reduce(r.nodes);const u=a(...s,{...n,wrap:false,toRegex:true,strictZeros:true});if(u.length!==0){return s.length>1&&u.length>1?`(${u})`:u}}if(r.nodes){for(const n of r.nodes){m+=walk(n,r)}}return m};return walk(r)};r.exports=compile},2477:r=>{"use strict";r.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5290:(r,n,s)=>{"use strict";const a=s(877);const l=s(3317);const u=s(2257);const append=(r="",n="",s=false)=>{const a=[];r=[].concat(r);n=[].concat(n);if(!n.length)return r;if(!r.length){return s?u.flatten(n).map((r=>`{${r}}`)):n}for(const l of r){if(Array.isArray(l)){for(const r of l){a.push(append(r,n,s))}}else{for(let r of n){if(s===true&&typeof r==="string")r=`{${r}}`;a.push(Array.isArray(r)?append(l,r,s):l+r)}}}return u.flatten(a)};const expand=(r,n={})=>{const s=n.rangeLimit===undefined?1e3:n.rangeLimit;const walk=(r,f={})=>{r.queue=[];let d=f;let p=f.queue;while(d.type!=="brace"&&d.type!=="root"&&d.parent){d=d.parent;p=d.queue}if(r.invalid||r.dollar){p.push(append(p.pop(),l(r,n)));return}if(r.type==="brace"&&r.invalid!==true&&r.nodes.length===2){p.push(append(p.pop(),["{}"]));return}if(r.nodes&&r.ranges>0){const f=u.reduce(r.nodes);if(u.exceedsLimit(...f,n.step,s)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let d=a(...f,n);if(d.length===0){d=l(r,n)}p.push(append(p.pop(),d));r.nodes=[];return}const m=u.encloseBrace(r);let g=r.queue;let y=r;while(y.type!=="brace"&&y.type!=="root"&&y.parent){y=y.parent;g=y.queue}for(let n=0;n<r.nodes.length;n++){const s=r.nodes[n];if(s.type==="comma"&&r.type==="brace"){if(n===1)g.push("");g.push("");continue}if(s.type==="close"){p.push(append(p.pop(),g,m));continue}if(s.value&&s.type!=="open"){g.push(append(g.pop(),s.value));continue}if(s.nodes){walk(s,r)}}return g};return u.flatten(walk(r))};r.exports=expand},507:(r,n,s)=>{"use strict";const a=s(3317);const{MAX_LENGTH:l,CHAR_BACKSLASH:u,CHAR_BACKTICK:f,CHAR_COMMA:d,CHAR_DOT:p,CHAR_LEFT_PARENTHESES:m,CHAR_RIGHT_PARENTHESES:g,CHAR_LEFT_CURLY_BRACE:y,CHAR_RIGHT_CURLY_BRACE:v,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_RIGHT_SQUARE_BRACKET:w,CHAR_DOUBLE_QUOTE:_,CHAR_SINGLE_QUOTE:S,CHAR_NO_BREAK_SPACE:E,CHAR_ZERO_WIDTH_NOBREAK_SPACE:x}=s(2477);const parse=(r,n={})=>{if(typeof r!=="string"){throw new TypeError("Expected a string")}const s=n||{};const A=typeof s.maxLength==="number"?Math.min(l,s.maxLength):l;if(r.length>A){throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${A})`)}const k={type:"root",input:r,nodes:[]};const C=[k];let O=k;let T=k;let R=0;const I=r.length;let N=0;let B=0;let D;const advance=()=>r[N++];const push=r=>{if(r.type==="text"&&T.type==="dot"){T.type="text"}if(T&&T.type==="text"&&r.type==="text"){T.value+=r.value;return}O.nodes.push(r);r.parent=O;r.prev=T;T=r;return r};push({type:"bos"});while(N<I){O=C[C.length-1];D=advance();if(D===x||D===E){continue}if(D===u){push({type:"text",value:(n.keepEscaping?D:"")+advance()});continue}if(D===w){push({type:"text",value:"\\"+D});continue}if(D===b){R++;let r;while(N<I&&(r=advance())){D+=r;if(r===b){R++;continue}if(r===u){D+=advance();continue}if(r===w){R--;if(R===0){break}}}push({type:"text",value:D});continue}if(D===m){O=push({type:"paren",nodes:[]});C.push(O);push({type:"text",value:D});continue}if(D===g){if(O.type!=="paren"){push({type:"text",value:D});continue}O=C.pop();push({type:"text",value:D});O=C[C.length-1];continue}if(D===_||D===S||D===f){const r=D;let s;if(n.keepQuotes!==true){D=""}while(N<I&&(s=advance())){if(s===u){D+=s+advance();continue}if(s===r){if(n.keepQuotes===true)D+=s;break}D+=s}push({type:"text",value:D});continue}if(D===y){B++;const r=T.value&&T.value.slice(-1)==="$"||O.dollar===true;const n={type:"brace",open:true,close:false,dollar:r,depth:B,commas:0,ranges:0,nodes:[]};O=push(n);C.push(O);push({type:"open",value:D});continue}if(D===v){if(O.type!=="brace"){push({type:"text",value:D});continue}const r="close";O=C.pop();O.close=true;push({type:r,value:D});B--;O=C[C.length-1];continue}if(D===d&&B>0){if(O.ranges>0){O.ranges=0;const r=O.nodes.shift();O.nodes=[r,{type:"text",value:a(O)}]}push({type:"comma",value:D});O.commas++;continue}if(D===p&&B>0&&O.commas===0){const r=O.nodes;if(B===0||r.length===0){push({type:"text",value:D});continue}if(T.type==="dot"){O.range=[];T.value+=D;T.type="range";if(O.nodes.length!==3&&O.nodes.length!==5){O.invalid=true;O.ranges=0;T.type="text";continue}O.ranges++;O.args=[];continue}if(T.type==="range"){r.pop();const n=r[r.length-1];n.value+=T.value+D;T=n;O.ranges--;continue}push({type:"dot",value:D});continue}push({type:"text",value:D})}do{O=C.pop();if(O.type!=="root"){O.nodes.forEach((r=>{if(!r.nodes){if(r.type==="open")r.isOpen=true;if(r.type==="close")r.isClose=true;if(!r.nodes)r.type="text";r.invalid=true}}));const r=C[C.length-1];const n=r.nodes.indexOf(O);r.nodes.splice(n,1,...O.nodes)}}while(C.length>0);push({type:"eos"});return k};r.exports=parse},3317:(r,n,s)=>{"use strict";const a=s(2257);r.exports=(r,n={})=>{const stringify=(r,s={})=>{const l=n.escapeInvalid&&a.isInvalidBrace(s);const u=r.invalid===true&&n.escapeInvalid===true;let f="";if(r.value){if((l||u)&&a.isOpenOrClose(r)){return"\\"+r.value}return r.value}if(r.value){return r.value}if(r.nodes){for(const n of r.nodes){f+=stringify(n)}}return f};return stringify(r)}},2257:(r,n)=>{"use strict";n.isInteger=r=>{if(typeof r==="number"){return Number.isInteger(r)}if(typeof r==="string"&&r.trim()!==""){return Number.isInteger(Number(r))}return false};n.find=(r,n)=>r.nodes.find((r=>r.type===n));n.exceedsLimit=(r,s,a=1,l)=>{if(l===false)return false;if(!n.isInteger(r)||!n.isInteger(s))return false;return(Number(s)-Number(r))/Number(a)>=l};n.escapeNode=(r,n=0,s)=>{const a=r.nodes[n];if(!a)return;if(s&&a.type===s||a.type==="open"||a.type==="close"){if(a.escaped!==true){a.value="\\"+a.value;a.escaped=true}}};n.encloseBrace=r=>{if(r.type!=="brace")return false;if(r.commas>>0+r.ranges>>0===0){r.invalid=true;return true}return false};n.isInvalidBrace=r=>{if(r.type!=="brace")return false;if(r.invalid===true||r.dollar)return true;if(r.commas>>0+r.ranges>>0===0){r.invalid=true;return true}if(r.open!==true||r.close!==true){r.invalid=true;return true}return false};n.isOpenOrClose=r=>{if(r.type==="open"||r.type==="close"){return true}return r.open===true||r.close===true};n.reduce=r=>r.reduce(((r,n)=>{if(n.type==="text")r.push(n.value);if(n.type==="range")n.type="text";return r}),[]);n.flatten=(...r)=>{const n=[];const flat=r=>{for(let s=0;s<r.length;s++){const a=r[s];if(Array.isArray(a)){flat(a);continue}if(a!==undefined){n.push(a)}}return n};flat(r);return n}},5315:(r,n,s)=>{"use strict";const{EventEmitter:a}=s(4434);const l=s(9896);const u=s(6928);const{promisify:f}=s(9023);const d=s(7525);const p=s(2739)["default"];const m=s(8505);const g=s(1925);const y=s(748);const v=s(6133);const b=s(3897);const w=s(8748);const{EV_ALL:_,EV_READY:S,EV_ADD:E,EV_CHANGE:x,EV_UNLINK:A,EV_ADD_DIR:k,EV_UNLINK_DIR:C,EV_RAW:O,EV_ERROR:T,STR_CLOSE:R,STR_END:I,BACK_SLASH_RE:N,DOUBLE_SLASH_RE:B,SLASH_OR_BACK_SLASH_RE:D,DOT_RE:P,REPLACER_RE:L,SLASH:M,SLASH_SLASH:$,BRACE_START:W,BANG:H,ONE_DOT:j,TWO_DOTS:U,GLOBSTAR:G,SLASH_GLOBSTAR:z,ANYMATCH_OPTS:V,STRING_TYPE:Y,FUNCTION_TYPE:K,EMPTY_STR:q,EMPTY_FN:X,isWindows:Q,isMacos:Z,isIBMi:J}=s(8550);const ee=f(l.stat);const te=f(l.readdir);const arrify=(r=[])=>Array.isArray(r)?r:[r];const flatten=(r,n=[])=>{r.forEach((r=>{if(Array.isArray(r)){flatten(r,n)}else{n.push(r)}}));return n};const unifyPaths=r=>{const n=flatten(arrify(r));if(!n.every((r=>typeof r===Y))){throw new TypeError(`Non-string provided as watch path: ${n}`)}return n.map(normalizePathToUnix)};const toUnix=r=>{let n=r.replace(N,M);let s=false;if(n.startsWith($)){s=true}while(n.match(B)){n=n.replace(B,M)}if(s){n=M+n}return n};const normalizePathToUnix=r=>toUnix(u.normalize(toUnix(r)));const normalizeIgnored=(r=q)=>n=>{if(typeof n!==Y)return n;return normalizePathToUnix(u.isAbsolute(n)?n:u.join(r,n))};const getAbsolutePath=(r,n)=>{if(u.isAbsolute(r)){return r}if(r.startsWith(H)){return H+u.join(n,r.slice(1))}return u.join(n,r)};const undef=(r,n)=>r[n]===undefined;class DirEntry{constructor(r,n){this.path=r;this._removeWatcher=n;this.items=new Set}add(r){const{items:n}=this;if(!n)return;if(r!==j&&r!==U)n.add(r)}async remove(r){const{items:n}=this;if(!n)return;n.delete(r);if(n.size>0)return;const s=this.path;try{await te(s)}catch(r){if(this._removeWatcher){this._removeWatcher(u.dirname(s),u.basename(s))}}}has(r){const{items:n}=this;if(!n)return;return n.has(r)}getChildren(){const{items:r}=this;if(!r)return;return[...r.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const re="stat";const ne="lstat";class WatchHelper{constructor(r,n,s,a){this.fsw=a;this.path=r=r.replace(L,q);this.watchPath=n;this.fullWatchPath=u.resolve(n);this.hasGlob=n!==r;if(r===q)this.hasGlob=false;this.globSymlink=this.hasGlob&&s?undefined:false;this.globFilter=this.hasGlob?p(r,undefined,V):false;this.dirParts=this.getDirParts(r);this.dirParts.forEach((r=>{if(r.length>1)r.pop()}));this.followSymlinks=s;this.statMethod=s?re:ne}checkGlobSymlink(r){if(this.globSymlink===undefined){this.globSymlink=r.fullParentDir===this.fullWatchPath?false:{realPath:r.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return r.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return r.fullPath}entryPath(r){return u.join(this.watchPath,u.relative(this.watchPath,this.checkGlobSymlink(r)))}filterPath(r){const{stats:n}=r;if(n&&n.isSymbolicLink())return this.filterDir(r);const s=this.entryPath(r);const a=this.hasGlob&&typeof this.globFilter===K?this.globFilter(s):true;return a&&this.fsw._isntIgnored(s,n)&&this.fsw._hasReadPermissions(n)}getDirParts(r){if(!this.hasGlob)return[];const n=[];const s=r.includes(W)?y.expand(r):[r];s.forEach((r=>{n.push(u.relative(this.watchPath,r).split(D))}));return n}filterDir(r){if(this.hasGlob){const n=this.getDirParts(this.checkGlobSymlink(r));let s=false;this.unmatchedGlob=!this.dirParts.some((r=>r.every(((r,a)=>{if(r===G)s=true;return s||!n[0][a]||p(r,n[0][a],V)}))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(r),r.stats)}}class FSWatcher extends a{constructor(r){super();const n={};if(r)Object.assign(n,r);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(undef(n,"persistent"))n.persistent=true;if(undef(n,"ignoreInitial"))n.ignoreInitial=false;if(undef(n,"ignorePermissionErrors"))n.ignorePermissionErrors=false;if(undef(n,"interval"))n.interval=100;if(undef(n,"binaryInterval"))n.binaryInterval=300;if(undef(n,"disableGlobbing"))n.disableGlobbing=false;n.enableBinaryInterval=n.binaryInterval!==n.interval;if(undef(n,"useFsEvents"))n.useFsEvents=!n.usePolling;const s=w.canUse();if(!s)n.useFsEvents=false;if(undef(n,"usePolling")&&!n.useFsEvents){n.usePolling=Z}if(J){n.usePolling=true}const a=process.env.CHOKIDAR_USEPOLLING;if(a!==undefined){const r=a.toLowerCase();if(r==="false"||r==="0"){n.usePolling=false}else if(r==="true"||r==="1"){n.usePolling=true}else{n.usePolling=!!r}}const l=process.env.CHOKIDAR_INTERVAL;if(l){n.interval=Number.parseInt(l,10)}if(undef(n,"atomic"))n.atomic=!n.usePolling&&!n.useFsEvents;if(n.atomic)this._pendingUnlinks=new Map;if(undef(n,"followSymlinks"))n.followSymlinks=true;if(undef(n,"awaitWriteFinish"))n.awaitWriteFinish=false;if(n.awaitWriteFinish===true)n.awaitWriteFinish={};const u=n.awaitWriteFinish;if(u){if(!u.stabilityThreshold)u.stabilityThreshold=2e3;if(!u.pollInterval)u.pollInterval=100;this._pendingWrites=new Map}if(n.ignored)n.ignored=arrify(n.ignored);let f=0;this._emitReady=()=>{f++;if(f>=this._readyCount){this._emitReady=X;this._readyEmitted=true;process.nextTick((()=>this.emit(S)))}};this._emitRaw=(...r)=>this.emit(O,...r);this._readyEmitted=false;this.options=n;if(n.useFsEvents){this._fsEventsHandler=new w(this)}else{this._nodeFsHandler=new b(this)}Object.freeze(n)}add(r,n,s){const{cwd:a,disableGlobbing:l}=this.options;this.closed=false;let f=unifyPaths(r);if(a){f=f.map((r=>{const n=getAbsolutePath(r,a);if(l||!g(r)){return n}return v(n)}))}f=f.filter((r=>{if(r.startsWith(H)){this._ignoredPaths.add(r.slice(1));return false}this._ignoredPaths.delete(r);this._ignoredPaths.delete(r+z);this._userIgnored=undefined;return true}));if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=f.length;if(this.options.persistent)this._readyCount+=f.length;f.forEach((r=>this._fsEventsHandler._addToFsEvents(r)))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=f.length;Promise.all(f.map((async r=>{const a=await this._nodeFsHandler._addToNodeFs(r,!s,0,0,n);if(a)this._emitReady();return a}))).then((r=>{if(this.closed)return;r.filter((r=>r)).forEach((r=>{this.add(u.dirname(r),u.basename(n||r))}))}))}return this}unwatch(r){if(this.closed)return this;const n=unifyPaths(r);const{cwd:s}=this.options;n.forEach((r=>{if(!u.isAbsolute(r)&&!this._closers.has(r)){if(s)r=u.join(s,r);r=u.resolve(r)}this._closePath(r);this._ignoredPaths.add(r);if(this._watched.has(r)){this._ignoredPaths.add(r+z)}this._userIgnored=undefined}));return this}close(){if(this.closed)return this._closePromise;this.closed=true;this.removeAllListeners();const r=[];this._closers.forEach((n=>n.forEach((n=>{const s=n();if(s instanceof Promise)r.push(s)}))));this._streams.forEach((r=>r.destroy()));this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach((r=>r.dispose()));["closers","watched","streams","symlinkPaths","throttled"].forEach((r=>{this[`_${r}`].clear()}));this._closePromise=r.length?Promise.all(r).then((()=>undefined)):Promise.resolve();return this._closePromise}getWatched(){const r={};this._watched.forEach(((n,s)=>{const a=this.options.cwd?u.relative(this.options.cwd,s):s;r[a||j]=n.getChildren().sort()}));return r}emitWithAll(r,n){this.emit(...n);if(r!==T)this.emit(_,...n)}async _emit(r,n,s,a,l){if(this.closed)return;const f=this.options;if(Q)n=u.normalize(n);if(f.cwd)n=u.relative(f.cwd,n);const d=[r,n];if(l!==undefined)d.push(s,a,l);else if(a!==undefined)d.push(s,a);else if(s!==undefined)d.push(s);const p=f.awaitWriteFinish;let m;if(p&&(m=this._pendingWrites.get(n))){m.lastChange=new Date;return this}if(f.atomic){if(r===A){this._pendingUnlinks.set(n,d);setTimeout((()=>{this._pendingUnlinks.forEach(((r,n)=>{this.emit(...r);this.emit(_,...r);this._pendingUnlinks.delete(n)}))}),typeof f.atomic==="number"?f.atomic:100);return this}if(r===E&&this._pendingUnlinks.has(n)){r=d[0]=x;this._pendingUnlinks.delete(n)}}if(p&&(r===E||r===x)&&this._readyEmitted){const awfEmit=(n,s)=>{if(n){r=d[0]=T;d[1]=n;this.emitWithAll(r,d)}else if(s){if(d.length>2){d[2]=s}else{d.push(s)}this.emitWithAll(r,d)}};this._awaitWriteFinish(n,p.stabilityThreshold,r,awfEmit);return this}if(r===x){const r=!this._throttle(x,n,50);if(r)return this}if(f.alwaysStat&&s===undefined&&(r===E||r===k||r===x)){const r=f.cwd?u.join(f.cwd,n):n;let s;try{s=await ee(r)}catch(r){}if(!s||this.closed)return;d.push(s)}this.emitWithAll(r,d);return this}_handleError(r){const n=r&&r.code;if(r&&n!=="ENOENT"&&n!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||n!=="EPERM"&&n!=="EACCES")){this.emit(T,r)}return r||this.closed}_throttle(r,n,s){if(!this._throttled.has(r)){this._throttled.set(r,new Map)}const a=this._throttled.get(r);const l=a.get(n);if(l){l.count++;return false}let u;const clear=()=>{const r=a.get(n);const s=r?r.count:0;a.delete(n);clearTimeout(u);if(r)clearTimeout(r.timeoutObject);return s};u=setTimeout(clear,s);const f={timeoutObject:u,clear:clear,count:0};a.set(n,f);return f}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(r,n,s,a){let f;let d=r;if(this.options.cwd&&!u.isAbsolute(r)){d=u.join(this.options.cwd,r)}const p=new Date;const awaitWriteFinish=s=>{l.stat(d,((l,u)=>{if(l||!this._pendingWrites.has(r)){if(l&&l.code!=="ENOENT")a(l);return}const d=Number(new Date);if(s&&u.size!==s.size){this._pendingWrites.get(r).lastChange=d}const p=this._pendingWrites.get(r);const m=d-p.lastChange;if(m>=n){this._pendingWrites.delete(r);a(undefined,u)}else{f=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval,u)}}))};if(!this._pendingWrites.has(r)){this._pendingWrites.set(r,{lastChange:p,cancelWait:()=>{this._pendingWrites.delete(r);clearTimeout(f);return s}});f=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(r,n){if(this.options.atomic&&P.test(r))return true;if(!this._userIgnored){const{cwd:r}=this.options;const n=this.options.ignored;const s=n&&n.map(normalizeIgnored(r));const a=arrify(s).filter((r=>typeof r===Y&&!g(r))).map((r=>r+z));const l=this._getGlobIgnored().map(normalizeIgnored(r)).concat(s,a);this._userIgnored=p(l,undefined,V)}return this._userIgnored([r,n])}_isntIgnored(r,n){return!this._isIgnored(r,n)}_getWatchHelpers(r,n){const s=n||this.options.disableGlobbing||!g(r)?r:m(r);const a=this.options.followSymlinks;return new WatchHelper(r,s,a,this)}_getWatchedDir(r){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const n=u.resolve(r);if(!this._watched.has(n))this._watched.set(n,new DirEntry(n,this._boundRemove));return this._watched.get(n)}_hasReadPermissions(r){if(this.options.ignorePermissionErrors)return true;const n=r&&Number.parseInt(r.mode,10);const s=n&511;const a=Number.parseInt(s.toString(8)[0],10);return Boolean(4&a)}_remove(r,n,s){const a=u.join(r,n);const l=u.resolve(a);s=s!=null?s:this._watched.has(a)||this._watched.has(l);if(!this._throttle("remove",a,100))return;if(!s&&!this.options.useFsEvents&&this._watched.size===1){this.add(r,n,true)}const f=this._getWatchedDir(a);const d=f.getChildren();d.forEach((r=>this._remove(a,r)));const p=this._getWatchedDir(r);const m=p.has(n);p.remove(n);if(this._symlinkPaths.has(l)){this._symlinkPaths.delete(l)}let g=a;if(this.options.cwd)g=u.relative(this.options.cwd,a);if(this.options.awaitWriteFinish&&this._pendingWrites.has(g)){const r=this._pendingWrites.get(g).cancelWait();if(r===E)return}this._watched.delete(a);this._watched.delete(l);const y=s?C:A;if(m&&!this._isIgnored(a))this._emit(y,a);if(!this.options.useFsEvents){this._closePath(a)}}_closePath(r){this._closeFile(r);const n=u.dirname(r);this._getWatchedDir(n).remove(u.basename(r))}_closeFile(r){const n=this._closers.get(r);if(!n)return;n.forEach((r=>r()));this._closers.delete(r)}_addPathCloser(r,n){if(!n)return;let s=this._closers.get(r);if(!s){s=[];this._closers.set(r,s)}s.push(n)}_readdirp(r,n){if(this.closed)return;const s={type:_,alwaysStat:true,lstat:true,...n};let a=d(r,s);this._streams.add(a);a.once(R,(()=>{a=undefined}));a.once(I,(()=>{if(a){this._streams.delete(a);a=undefined}}));return a}}n.FSWatcher=FSWatcher;const watch=(r,n)=>{const s=new FSWatcher(n);s.add(r);return s};n.watch=watch},8550:(r,n,s)=>{"use strict";const{sep:a}=s(6928);const{platform:l}=process;const u=s(857);n.EV_ALL="all";n.EV_READY="ready";n.EV_ADD="add";n.EV_CHANGE="change";n.EV_ADD_DIR="addDir";n.EV_UNLINK="unlink";n.EV_UNLINK_DIR="unlinkDir";n.EV_RAW="raw";n.EV_ERROR="error";n.STR_DATA="data";n.STR_END="end";n.STR_CLOSE="close";n.FSEVENT_CREATED="created";n.FSEVENT_MODIFIED="modified";n.FSEVENT_DELETED="deleted";n.FSEVENT_MOVED="moved";n.FSEVENT_CLONED="cloned";n.FSEVENT_UNKNOWN="unknown";n.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;n.FSEVENT_TYPE_FILE="file";n.FSEVENT_TYPE_DIRECTORY="directory";n.FSEVENT_TYPE_SYMLINK="symlink";n.KEY_LISTENERS="listeners";n.KEY_ERR="errHandlers";n.KEY_RAW="rawEmitters";n.HANDLER_KEYS=[n.KEY_LISTENERS,n.KEY_ERR,n.KEY_RAW];n.DOT_SLASH=`.${a}`;n.BACK_SLASH_RE=/\\/g;n.DOUBLE_SLASH_RE=/\/\//;n.SLASH_OR_BACK_SLASH_RE=/[/\\]/;n.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;n.REPLACER_RE=/^\.[/\\]/;n.SLASH="/";n.SLASH_SLASH="//";n.BRACE_START="{";n.BANG="!";n.ONE_DOT=".";n.TWO_DOTS="..";n.STAR="*";n.GLOBSTAR="**";n.ROOT_GLOBSTAR="/**/*";n.SLASH_GLOBSTAR="/**";n.DIR_SUFFIX="Dir";n.ANYMATCH_OPTS={dot:true};n.STRING_TYPE="string";n.FUNCTION_TYPE="function";n.EMPTY_STR="";n.EMPTY_FN=()=>{};n.IDENTITY_FN=r=>r;n.isWindows=l==="win32";n.isMacos=l==="darwin";n.isLinux=l==="linux";n.isIBMi=u.type()==="OS400"},8748:(r,n,s)=>{"use strict";const a=s(9896);const l=s(6928);const{promisify:u}=s(9023);let f;try{f=s(4210)}catch(r){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(r)}if(f){const r=process.version.match(/v(\d+)\.(\d+)/);if(r&&r[1]&&r[2]){const n=Number.parseInt(r[1],10);const s=Number.parseInt(r[2],10);if(n===8&&s<16){f=undefined}}}const{EV_ADD:d,EV_CHANGE:p,EV_ADD_DIR:m,EV_UNLINK:g,EV_ERROR:y,STR_DATA:v,STR_END:b,FSEVENT_CREATED:w,FSEVENT_MODIFIED:_,FSEVENT_DELETED:S,FSEVENT_MOVED:E,FSEVENT_UNKNOWN:x,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:A,FSEVENT_TYPE_FILE:k,FSEVENT_TYPE_DIRECTORY:C,FSEVENT_TYPE_SYMLINK:O,ROOT_GLOBSTAR:T,DIR_SUFFIX:R,DOT_SLASH:I,FUNCTION_TYPE:N,EMPTY_FN:B,IDENTITY_FN:D}=s(8550);const Depth=r=>isNaN(r)?{}:{depth:r};const P=u(a.stat);const L=u(a.lstat);const M=u(a.realpath);const $={stat:P,lstat:L};const W=new Map;const H=10;const j=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const createFSEventsInstance=(r,n)=>{const s=f.watch(r,n);return{stop:s}};function setFSEventsListener(r,n,s,a){let u=l.extname(n)?l.dirname(n):n;const d=l.dirname(u);let p=W.get(u);if(couldConsolidate(d)){u=d}const m=l.resolve(r);const g=m!==n;const filteredListener=(r,a,u)=>{if(g)r=r.replace(n,m);if(r===m||!r.indexOf(m+l.sep))s(r,a,u)};let y=false;for(const r of W.keys()){if(n.indexOf(l.resolve(r)+l.sep)===0){u=r;p=W.get(u);y=true;break}}if(p||y){p.listeners.add(filteredListener)}else{p={listeners:new Set([filteredListener]),rawEmitter:a,watcher:createFSEventsInstance(u,((r,n)=>{if(!p.listeners.size)return;if(n&A)return;const s=f.getInfo(r,n);p.listeners.forEach((a=>{a(r,n,s)}));p.rawEmitter(s.event,r,s)}))};W.set(u,p)}return()=>{const r=p.listeners;r.delete(filteredListener);if(!r.size){W.delete(u);if(p.watcher)return p.watcher.stop().then((()=>{p.rawEmitter=p.watcher=undefined;Object.freeze(p)}))}}}const couldConsolidate=r=>{let n=0;for(const s of W.keys()){if(s.indexOf(r)===0){n++;if(n>=H){return true}}}return false};const canUse=()=>f&&W.size<128;const calcDepth=(r,n)=>{let s=0;while(!r.indexOf(n)&&(r=l.dirname(r))!==n)s++;return s};const sameTypes=(r,n)=>r.type===C&&n.isDirectory()||r.type===O&&n.isSymbolicLink()||r.type===k&&n.isFile();class FsEventsHandler{constructor(r){this.fsw=r}checkIgnored(r,n){const s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(r,n)){s.add(r);if(n&&n.isDirectory()){s.add(r+T)}return true}s.delete(r);s.delete(r+T)}addOrChange(r,n,s,a,l,u,f,m){const g=l.has(u)?p:d;this.handleEvent(g,r,n,s,a,l,u,f,m)}async checkExists(r,n,s,a,l,u,f,d){try{const p=await P(r);if(this.fsw.closed)return;if(sameTypes(f,p)){this.addOrChange(r,n,s,a,l,u,f,d)}else{this.handleEvent(g,r,n,s,a,l,u,f,d)}}catch(p){if(p.code==="EACCES"){this.addOrChange(r,n,s,a,l,u,f,d)}else{this.handleEvent(g,r,n,s,a,l,u,f,d)}}}handleEvent(r,n,s,a,l,u,f,p,y){if(this.fsw.closed||this.checkIgnored(n))return;if(r===g){const r=p.type===C;if(r||u.has(f)){this.fsw._remove(l,f,r)}}else{if(r===d){if(p.type===C)this.fsw._getWatchedDir(n);if(p.type===O&&y.followSymlinks){const r=y.depth===undefined?undefined:calcDepth(s,a)+1;return this._addToFsEvents(n,false,true,r)}this.fsw._getWatchedDir(l).add(f)}const u=p.type===C?r+R:r;this.fsw._emit(u,n);if(u===m)this._addToFsEvents(n,false,true)}}_watchWithFsEvents(r,n,s,a){if(this.fsw.closed||this.fsw._isIgnored(r))return;const u=this.fsw.options;const watchCallback=async(f,d,p)=>{if(this.fsw.closed)return;if(u.depth!==undefined&&calcDepth(f,n)>u.depth)return;const m=s(l.join(r,l.relative(r,f)));if(a&&!a(m))return;const y=l.dirname(m);const v=l.basename(m);const b=this.fsw._getWatchedDir(p.type===C?m:y);if(j.has(d)||p.event===x){if(typeof u.ignored===N){let r;try{r=await P(m)}catch(r){}if(this.fsw.closed)return;if(this.checkIgnored(m,r))return;if(sameTypes(p,r)){this.addOrChange(m,f,n,y,b,v,p,u)}else{this.handleEvent(g,m,f,n,y,b,v,p,u)}}else{this.checkExists(m,f,n,y,b,v,p,u)}}else{switch(p.event){case w:case _:return this.addOrChange(m,f,n,y,b,v,p,u);case S:case E:return this.checkExists(m,f,n,y,b,v,p,u)}}};const f=setFSEventsListener(r,n,watchCallback,this.fsw._emitRaw);this.fsw._emitReady();return f}async _handleFsEventsSymlink(r,n,s,a){if(this.fsw.closed||this.fsw._symlinkPaths.has(n))return;this.fsw._symlinkPaths.set(n,true);this.fsw._incrReadyCount();try{const n=await M(r);if(this.fsw.closed)return;if(this.fsw._isIgnored(n)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(n||r,(a=>{let u=r;if(n&&n!==I){u=a.replace(n,r)}else if(a!==I){u=l.join(r,a)}return s(u)}),false,a)}catch(r){if(this.fsw._handleError(r)){return this.fsw._emitReady()}}}emitAdd(r,n,s,a,u){const f=s(r);const p=n.isDirectory();const g=this.fsw._getWatchedDir(l.dirname(f));const y=l.basename(f);if(p)this.fsw._getWatchedDir(f);if(g.has(y))return;g.add(y);if(!a.ignoreInitial||u===true){this.fsw._emit(p?m:d,f,n)}}initWatch(r,n,s,a){if(this.fsw.closed)return;const u=this._watchWithFsEvents(s.watchPath,l.resolve(r||s.watchPath),a,s.globFilter);this.fsw._addPathCloser(n,u)}async _addToFsEvents(r,n,s,a){if(this.fsw.closed){return}const u=this.fsw.options;const f=typeof n===N?n:D;const d=this.fsw._getWatchHelpers(r);try{const n=await $[d.statMethod](d.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(d.watchPath,n)){throw null}if(n.isDirectory()){if(!d.globFilter)this.emitAdd(f(r),n,f,u,s);if(a&&a>u.depth)return;this.fsw._readdirp(d.watchPath,{fileFilter:r=>d.filterPath(r),directoryFilter:r=>d.filterDir(r),...Depth(u.depth-(a||0))}).on(v,(r=>{if(this.fsw.closed){return}if(r.stats.isDirectory()&&!d.filterPath(r))return;const n=l.join(d.watchPath,r.path);const{fullPath:a}=r;if(d.followSymlinks&&r.stats.isSymbolicLink()){const r=u.depth===undefined?undefined:calcDepth(n,l.resolve(d.watchPath))+1;this._handleFsEventsSymlink(n,a,f,r)}else{this.emitAdd(n,r.stats,f,u,s)}})).on(y,B).on(b,(()=>{this.fsw._emitReady()}))}else{this.emitAdd(d.watchPath,n,f,u,s);this.fsw._emitReady()}}catch(r){if(!r||this.fsw._handleError(r)){this.fsw._emitReady();this.fsw._emitReady()}}if(u.persistent&&s!==true){if(typeof n===N){this.initWatch(undefined,r,d,f)}else{let n;try{n=await M(d.watchPath)}catch(r){}this.initWatch(n,r,d,f)}}}}r.exports=FsEventsHandler;r.exports.canUse=canUse},3897:(r,n,s)=>{"use strict";const a=s(9896);const l=s(6928);const{promisify:u}=s(9023);const f=s(3950);const{isWindows:d,isLinux:p,EMPTY_FN:m,EMPTY_STR:g,KEY_LISTENERS:y,KEY_ERR:v,KEY_RAW:b,HANDLER_KEYS:w,EV_CHANGE:_,EV_ADD:S,EV_ADD_DIR:E,EV_ERROR:x,STR_DATA:A,STR_END:k,BRACE_START:C,STAR:O}=s(8550);const T="watch";const R=u(a.open);const I=u(a.stat);const N=u(a.lstat);const B=u(a.close);const D=u(a.realpath);const P={lstat:N,stat:I};const foreach=(r,n)=>{if(r instanceof Set){r.forEach(n)}else{n(r)}};const addAndConvert=(r,n,s)=>{let a=r[n];if(!(a instanceof Set)){r[n]=a=new Set([a])}a.add(s)};const clearItem=r=>n=>{const s=r[n];if(s instanceof Set){s.clear()}else{delete r[n]}};const delFromSet=(r,n,s)=>{const a=r[n];if(a instanceof Set){a.delete(s)}else if(a===s){delete r[n]}};const isEmptySet=r=>r instanceof Set?r.size===0:!r;const L=new Map;function createFsWatchInstance(r,n,s,u,f){const handleEvent=(n,a)=>{s(r);f(n,a,{watchedPath:r});if(a&&r!==a){fsWatchBroadcast(l.resolve(r,a),y,l.join(r,a))}};try{return a.watch(r,n,handleEvent)}catch(r){u(r)}}const fsWatchBroadcast=(r,n,s,a,l)=>{const u=L.get(r);if(!u)return;foreach(u[n],(r=>{r(s,a,l)}))};const setFsWatchListener=(r,n,s,a)=>{const{listener:l,errHandler:u,rawEmitter:f}=a;let p=L.get(n);let m;if(!s.persistent){m=createFsWatchInstance(r,s,l,u,f);return m.close.bind(m)}if(p){addAndConvert(p,y,l);addAndConvert(p,v,u);addAndConvert(p,b,f)}else{m=createFsWatchInstance(r,s,fsWatchBroadcast.bind(null,n,y),u,fsWatchBroadcast.bind(null,n,b));if(!m)return;m.on(x,(async s=>{const a=fsWatchBroadcast.bind(null,n,v);p.watcherUnusable=true;if(d&&s.code==="EPERM"){try{const n=await R(r,"r");await B(n);a(s)}catch(r){}}else{a(s)}}));p={listeners:l,errHandlers:u,rawEmitters:f,watcher:m};L.set(n,p)}return()=>{delFromSet(p,y,l);delFromSet(p,v,u);delFromSet(p,b,f);if(isEmptySet(p.listeners)){p.watcher.close();L.delete(n);w.forEach(clearItem(p));p.watcher=undefined;Object.freeze(p)}}};const M=new Map;const setFsWatchFileListener=(r,n,s,l)=>{const{listener:u,rawEmitter:f}=l;let d=M.get(n);let p=new Set;let m=new Set;const g=d&&d.options;if(g&&(g.persistent<s.persistent||g.interval>s.interval)){p=d.listeners;m=d.rawEmitters;a.unwatchFile(n);d=undefined}if(d){addAndConvert(d,y,u);addAndConvert(d,b,f)}else{d={listeners:u,rawEmitters:f,options:s,watcher:a.watchFile(n,s,((s,a)=>{foreach(d.rawEmitters,(r=>{r(_,n,{curr:s,prev:a})}));const l=s.mtimeMs;if(s.size!==a.size||l>a.mtimeMs||l===0){foreach(d.listeners,(n=>n(r,s)))}}))};M.set(n,d)}return()=>{delFromSet(d,y,u);delFromSet(d,b,f);if(isEmptySet(d.listeners)){M.delete(n);a.unwatchFile(n);d.options=d.watcher=undefined;Object.freeze(d)}}};class NodeFsHandler{constructor(r){this.fsw=r;this._boundHandleError=n=>r._handleError(n)}_watchWithNodeFs(r,n){const s=this.fsw.options;const a=l.dirname(r);const u=l.basename(r);const d=this.fsw._getWatchedDir(a);d.add(u);const p=l.resolve(r);const g={persistent:s.persistent};if(!n)n=m;let y;if(s.usePolling){g.interval=s.enableBinaryInterval&&f(u)?s.binaryInterval:s.interval;y=setFsWatchFileListener(r,p,g,{listener:n,rawEmitter:this.fsw._emitRaw})}else{y=setFsWatchListener(r,p,g,{listener:n,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return y}_handleFile(r,n,s){if(this.fsw.closed){return}const a=l.dirname(r);const u=l.basename(r);const f=this.fsw._getWatchedDir(a);let d=n;if(f.has(u))return;const listener=async(n,s)=>{if(!this.fsw._throttle(T,r,5))return;if(!s||s.mtimeMs===0){try{const s=await I(r);if(this.fsw.closed)return;const a=s.atimeMs;const l=s.mtimeMs;if(!a||a<=l||l!==d.mtimeMs){this.fsw._emit(_,r,s)}if(p&&d.ino!==s.ino){this.fsw._closeFile(n);d=s;this.fsw._addPathCloser(n,this._watchWithNodeFs(r,listener))}else{d=s}}catch(r){this.fsw._remove(a,u)}}else if(f.has(u)){const n=s.atimeMs;const a=s.mtimeMs;if(!n||n<=a||a!==d.mtimeMs){this.fsw._emit(_,r,s)}d=s}};const m=this._watchWithNodeFs(r,listener);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(r)){if(!this.fsw._throttle(S,r,0))return;this.fsw._emit(S,r,n)}return m}async _handleSymlink(r,n,s,a){if(this.fsw.closed){return}const l=r.fullPath;const u=this.fsw._getWatchedDir(n);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let n;try{n=await D(s)}catch(r){this.fsw._emitReady();return true}if(this.fsw.closed)return;if(u.has(a)){if(this.fsw._symlinkPaths.get(l)!==n){this.fsw._symlinkPaths.set(l,n);this.fsw._emit(_,s,r.stats)}}else{u.add(a);this.fsw._symlinkPaths.set(l,n);this.fsw._emit(S,s,r.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(l)){return true}this.fsw._symlinkPaths.set(l,true)}_handleRead(r,n,s,a,u,f,d){r=l.join(r,g);if(!s.hasGlob){d=this.fsw._throttle("readdir",r,1e3);if(!d)return}const p=this.fsw._getWatchedDir(s.path);const m=new Set;let y=this.fsw._readdirp(r,{fileFilter:r=>s.filterPath(r),directoryFilter:r=>s.filterDir(r),depth:0}).on(A,(async d=>{if(this.fsw.closed){y=undefined;return}const g=d.path;let v=l.join(r,g);m.add(g);if(d.stats.isSymbolicLink()&&await this._handleSymlink(d,r,v,g)){return}if(this.fsw.closed){y=undefined;return}if(g===a||!a&&!p.has(g)){this.fsw._incrReadyCount();v=l.join(u,l.relative(u,v));this._addToNodeFs(v,n,s,f+1)}})).on(x,this._boundHandleError);return new Promise((n=>y.once(k,(()=>{if(this.fsw.closed){y=undefined;return}const g=d?d.clear():false;n();p.getChildren().filter((n=>n!==r&&!m.has(n)&&(!s.hasGlob||s.filterPath({fullPath:l.resolve(r,n)})))).forEach((n=>{this.fsw._remove(r,n)}));y=undefined;if(g)this._handleRead(r,false,s,a,u,f,d)}))))}async _handleDir(r,n,s,a,u,f,d){const p=this.fsw._getWatchedDir(l.dirname(r));const m=p.has(l.basename(r));if(!(s&&this.fsw.options.ignoreInitial)&&!u&&!m){if(!f.hasGlob||f.globFilter(r))this.fsw._emit(E,r,n)}p.add(l.basename(r));this.fsw._getWatchedDir(r);let g;let y;const v=this.fsw.options.depth;if((v==null||a<=v)&&!this.fsw._symlinkPaths.has(d)){if(!u){await this._handleRead(r,s,f,u,r,a,g);if(this.fsw.closed)return}y=this._watchWithNodeFs(r,((n,s)=>{if(s&&s.mtimeMs===0)return;this._handleRead(n,false,f,u,r,a,g)}))}return y}async _addToNodeFs(r,n,s,a,u){const f=this.fsw._emitReady;if(this.fsw._isIgnored(r)||this.fsw.closed){f();return false}const d=this.fsw._getWatchHelpers(r,a);if(!d.hasGlob&&s){d.hasGlob=s.hasGlob;d.globFilter=s.globFilter;d.filterPath=r=>s.filterPath(r);d.filterDir=r=>s.filterDir(r)}try{const s=await P[d.statMethod](d.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(d.watchPath,s)){f();return false}const p=this.fsw.options.followSymlinks&&!r.includes(O)&&!r.includes(C);let m;if(s.isDirectory()){const f=l.resolve(r);const g=p?await D(r):r;if(this.fsw.closed)return;m=await this._handleDir(d.watchPath,s,n,a,u,d,g);if(this.fsw.closed)return;if(f!==g&&g!==undefined){this.fsw._symlinkPaths.set(f,g)}}else if(s.isSymbolicLink()){const u=p?await D(r):r;if(this.fsw.closed)return;const f=l.dirname(d.watchPath);this.fsw._getWatchedDir(f).add(d.watchPath);this.fsw._emit(S,d.watchPath,s);m=await this._handleDir(f,s,n,a,r,d,u);if(this.fsw.closed)return;if(u!==undefined){this.fsw._symlinkPaths.set(l.resolve(r),u)}}else{m=this._handleFile(d.watchPath,s,n)}f();this.fsw._addPathCloser(r,m);return false}catch(n){if(this.fsw._handleError(n)){f();return r}}}}r.exports=NodeFsHandler},546:(r,n,s)=>{"use strict";const a=s(5317);const l=s(7877);const u=s(6469);function spawn(r,n,s){const f=l(r,n,s);const d=a.spawn(f.command,f.args,f.options);u.hookChildProcess(d,f);return d}function spawnSync(r,n,s){const f=l(r,n,s);const d=a.spawnSync(f.command,f.args,f.options);d.error=d.error||u.verifyENOENTSync(d.status,f);return d}r.exports=spawn;r.exports.spawn=spawn;r.exports.sync=spawnSync;r.exports._parse=l;r.exports._enoent=u},6469:r=>{"use strict";const n=process.platform==="win32";function notFoundError(r,n){return Object.assign(new Error(`${n} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${n} ${r.command}`,path:r.command,spawnargs:r.args})}function hookChildProcess(r,s){if(!n){return}const a=r.emit;r.emit=function(n,l){if(n==="exit"){const n=verifyENOENT(l,s);if(n){return a.call(r,"error",n)}}return a.apply(r,arguments)}}function verifyENOENT(r,s){if(n&&r===1&&!s.file){return notFoundError(s.original,"spawn")}return null}function verifyENOENTSync(r,s){if(n&&r===1&&!s.file){return notFoundError(s.original,"spawnSync")}return null}r.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},7877:(r,n,s)=>{"use strict";const a=s(6928);const l=s(4866);const u=s(2164);const f=s(599);const d=process.platform==="win32";const p=/\.(?:com|exe)$/i;const m=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(r){r.file=l(r);const n=r.file&&f(r.file);if(n){r.args.unshift(r.file);r.command=n;return l(r)}return r.file}function parseNonShell(r){if(!d){return r}const n=detectShebang(r);const s=!p.test(n);if(r.options.forceShell||s){const s=m.test(n);r.command=a.normalize(r.command);r.command=u.command(r.command);r.args=r.args.map((r=>u.argument(r,s)));const l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`];r.command=process.env.comspec||"cmd.exe";r.options.windowsVerbatimArguments=true}return r}function parse(r,n,s){if(n&&!Array.isArray(n)){s=n;n=null}n=n?n.slice(0):[];s=Object.assign({},s);const a={command:r,args:n,options:s,file:undefined,original:{command:r,args:n}};return s.shell?a:parseNonShell(a)}r.exports=parse},2164:r=>{"use strict";const n=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(r){r=r.replace(n,"^$1");return r}function escapeArgument(r,s){r=`${r}`;r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');r=r.replace(/(?=(\\+?)?)\1$/,"$1$1");r=`"${r}"`;r=r.replace(n,"^$1");if(s){r=r.replace(n,"^$1")}return r}r.exports.command=escapeCommand;r.exports.argument=escapeArgument},599:(r,n,s)=>{"use strict";const a=s(9896);const l=s(9152);function readShebang(r){const n=150;const s=Buffer.alloc(n);let u;try{u=a.openSync(r,"r");a.readSync(u,s,0,n,0);a.closeSync(u)}catch(r){}return l(s.toString())}r.exports=readShebang},4866:(r,n,s)=>{"use strict";const a=s(6928);const l=s(6848);const u=s(6689);function resolveCommandAttempt(r,n){const s=r.options.env||process.env;const f=process.cwd();const d=r.options.cwd!=null;const p=d&&process.chdir!==undefined&&!process.chdir.disabled;if(p){try{process.chdir(r.options.cwd)}catch(r){}}let m;try{m=l.sync(r.command,{path:s[u({env:s})],pathExt:n?a.delimiter:undefined})}catch(r){}finally{if(p){process.chdir(f)}}if(m){m=a.resolve(d?r.options.cwd:"",m)}return m}function resolveCommand(r){return resolveCommandAttempt(r)||resolveCommandAttempt(r,true)}r.exports=resolveCommand},7576:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.BlockCipher;var l=n.algo;var u=[];var f=[];var d=[];var p=[];var m=[];var g=[];var y=[];var v=[];var b=[];var w=[];(function(){var r=[];for(var n=0;n<256;n++){if(n<128){r[n]=n<<1}else{r[n]=n<<1^283}}var s=0;var a=0;for(var n=0;n<256;n++){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^l&255^99;u[s]=l;f[l]=s;var _=r[s];var S=r[_];var E=r[S];var x=r[l]*257^l*16843008;d[s]=x<<24|x>>>8;p[s]=x<<16|x>>>16;m[s]=x<<8|x>>>24;g[s]=x;var x=E*16843009^S*65537^_*257^s*16843008;y[l]=x<<24|x>>>8;v[l]=x<<16|x>>>16;b[l]=x<<8|x>>>24;w[l]=x;if(!s){s=a=1}else{s=_^r[r[r[E^_]]];a^=r[r[a]]}}})();var _=[0,1,2,4,8,16,32,64,128,27,54];var S=l.AES=a.extend({_doReset:function(){var r;if(this._nRounds&&this._keyPriorReset===this._key){return}var n=this._keyPriorReset=this._key;var s=n.words;var a=n.sigBytes/4;var l=this._nRounds=a+6;var f=(l+1)*4;var d=this._keySchedule=[];for(var p=0;p<f;p++){if(p<a){d[p]=s[p]}else{r=d[p-1];if(!(p%a)){r=r<<8|r>>>24;r=u[r>>>24]<<24|u[r>>>16&255]<<16|u[r>>>8&255]<<8|u[r&255];r^=_[p/a|0]<<24}else if(a>6&&p%a==4){r=u[r>>>24]<<24|u[r>>>16&255]<<16|u[r>>>8&255]<<8|u[r&255]}d[p]=d[p-a]^r}}var m=this._invKeySchedule=[];for(var g=0;g<f;g++){var p=f-g;if(g%4){var r=d[p]}else{var r=d[p-4]}if(g<4||p<=4){m[g]=r}else{m[g]=y[u[r>>>24]]^v[u[r>>>16&255]]^b[u[r>>>8&255]]^w[u[r&255]]}}},encryptBlock:function(r,n){this._doCryptBlock(r,n,this._keySchedule,d,p,m,g,u)},decryptBlock:function(r,n){var s=r[n+1];r[n+1]=r[n+3];r[n+3]=s;this._doCryptBlock(r,n,this._invKeySchedule,y,v,b,w,f);var s=r[n+1];r[n+1]=r[n+3];r[n+3]=s},_doCryptBlock:function(r,n,s,a,l,u,f,d){var p=this._nRounds;var m=r[n]^s[0];var g=r[n+1]^s[1];var y=r[n+2]^s[2];var v=r[n+3]^s[3];var b=4;for(var w=1;w<p;w++){var _=a[m>>>24]^l[g>>>16&255]^u[y>>>8&255]^f[v&255]^s[b++];var S=a[g>>>24]^l[y>>>16&255]^u[v>>>8&255]^f[m&255]^s[b++];var E=a[y>>>24]^l[v>>>16&255]^u[m>>>8&255]^f[g&255]^s[b++];var x=a[v>>>24]^l[m>>>16&255]^u[g>>>8&255]^f[y&255]^s[b++];m=_;g=S;y=E;v=x}var _=(d[m>>>24]<<24|d[g>>>16&255]<<16|d[y>>>8&255]<<8|d[v&255])^s[b++];var S=(d[g>>>24]<<24|d[y>>>16&255]<<16|d[v>>>8&255]<<8|d[m&255])^s[b++];var E=(d[y>>>24]<<24|d[v>>>16&255]<<16|d[m>>>8&255]<<8|d[g&255])^s[b++];var x=(d[v>>>24]<<24|d[m>>>16&255]<<16|d[g>>>8&255]<<8|d[y&255])^s[b++];r[n]=_;r[n+1]=S;r[n+2]=E;r[n+3]=x},keySize:256/32});n.AES=a._createHelper(S)})();return r.AES}))},7049:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.BlockCipher;var l=n.algo;const u=16;const f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731];const d=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var p={pbox:[],sbox:[]};function F(r,n){let s=n>>24&255;let a=n>>16&255;let l=n>>8&255;let u=n&255;let f=r.sbox[0][s]+r.sbox[1][a];f=f^r.sbox[2][l];f=f+r.sbox[3][u];return f}function BlowFish_Encrypt(r,n,s){let a=n;let l=s;let f;for(let n=0;n<u;++n){a=a^r.pbox[n];l=F(r,a)^l;f=a;a=l;l=f}f=a;a=l;l=f;l=l^r.pbox[u];a=a^r.pbox[u+1];return{left:a,right:l}}function BlowFish_Decrypt(r,n,s){let a=n;let l=s;let f;for(let n=u+1;n>1;--n){a=a^r.pbox[n];l=F(r,a)^l;f=a;a=l;l=f}f=a;a=l;l=f;l=l^r.pbox[1];a=a^r.pbox[0];return{left:a,right:l}}function BlowFishInit(r,n,s){for(let n=0;n<4;n++){r.sbox[n]=[];for(let s=0;s<256;s++){r.sbox[n][s]=d[n][s]}}let a=0;for(let l=0;l<u+2;l++){r.pbox[l]=f[l]^n[a];a++;if(a>=s){a=0}}let l=0;let p=0;let m=0;for(let n=0;n<u+2;n+=2){m=BlowFish_Encrypt(r,l,p);l=m.left;p=m.right;r.pbox[n]=l;r.pbox[n+1]=p}for(let n=0;n<4;n++){for(let s=0;s<256;s+=2){m=BlowFish_Encrypt(r,l,p);l=m.left;p=m.right;r.sbox[n][s]=l;r.sbox[n][s+1]=p}}return true}var m=l.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset===this._key){return}var r=this._keyPriorReset=this._key;var n=r.words;var s=r.sigBytes/4;BlowFishInit(p,n,s)},encryptBlock:function(r,n){var s=BlowFish_Encrypt(p,r[n],r[n+1]);r[n]=s.left;r[n+1]=s.right},decryptBlock:function(r,n){var s=BlowFish_Decrypt(p,r[n],r[n+1]);r[n]=s.left;r[n+1]=s.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=a._createHelper(m)})();return r.Blowfish}))},170:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(7831))}else{}})(this,(function(r){r.lib.Cipher||function(n){var s=r;var a=s.lib;var l=a.Base;var u=a.WordArray;var f=a.BufferedBlockAlgorithm;var d=s.enc;var p=d.Utf8;var m=d.Base64;var g=s.algo;var y=g.EvpKDF;var v=a.Cipher=f.extend({cfg:l.extend(),createEncryptor:function(r,n){return this.create(this._ENC_XFORM_MODE,r,n)},createDecryptor:function(r,n){return this.create(this._DEC_XFORM_MODE,r,n)},init:function(r,n,s){this.cfg=this.cfg.extend(s);this._xformMode=r;this._key=n;this.reset()},reset:function(){f.reset.call(this);this._doReset()},process:function(r){this._append(r);return this._process()},finalize:function(r){if(r){this._append(r)}var n=this._doFinalize();return n},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function selectCipherStrategy(r){if(typeof r=="string"){return N}else{return T}}return function(r){return{encrypt:function(n,s,a){return selectCipherStrategy(s).encrypt(r,n,s,a)},decrypt:function(n,s,a){return selectCipherStrategy(s).decrypt(r,n,s,a)}}}}()});var b=a.StreamCipher=v.extend({_doFinalize:function(){var r=this._process(!!"flush");return r},blockSize:1});var w=s.mode={};var _=a.BlockCipherMode=l.extend({createEncryptor:function(r,n){return this.Encryptor.create(r,n)},createDecryptor:function(r,n){return this.Decryptor.create(r,n)},init:function(r,n){this._cipher=r;this._iv=n}});var S=w.CBC=function(){var r=_.extend();r.Encryptor=r.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;xorBlock.call(this,r,n,a);s.encryptBlock(r,n);this._prevBlock=r.slice(n,n+a)}});r.Decryptor=r.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;var l=r.slice(n,n+a);s.decryptBlock(r,n);xorBlock.call(this,r,n,a);this._prevBlock=l}});function xorBlock(r,s,a){var l;var u=this._iv;if(u){l=u;this._iv=n}else{l=this._prevBlock}for(var f=0;f<a;f++){r[s+f]^=l[f]}}return r}();var E=s.pad={};var x=E.Pkcs7={pad:function(r,n){var s=n*4;var a=s-r.sigBytes%s;var l=a<<24|a<<16|a<<8|a;var f=[];for(var d=0;d<a;d+=4){f.push(l)}var p=u.create(f,a);r.concat(p)},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}};var A=a.BlockCipher=v.extend({cfg:v.cfg.extend({mode:S,padding:x}),reset:function(){var r;v.reset.call(this);var n=this.cfg;var s=n.iv;var a=n.mode;if(this._xformMode==this._ENC_XFORM_MODE){r=a.createEncryptor}else{r=a.createDecryptor;this._minBufferSize=1}if(this._mode&&this._mode.__creator==r){this._mode.init(this,s&&s.words)}else{this._mode=r.call(a,this,s&&s.words);this._mode.__creator=r}},_doProcessBlock:function(r,n){this._mode.processBlock(r,n)},_doFinalize:function(){var r;var n=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){n.pad(this._data,this.blockSize);r=this._process(!!"flush")}else{r=this._process(!!"flush");n.unpad(r)}return r},blockSize:128/32});var k=a.CipherParams=l.extend({init:function(r){this.mixIn(r)},toString:function(r){return(r||this.formatter).stringify(this)}});var C=s.format={};var O=C.OpenSSL={stringify:function(r){var n;var s=r.ciphertext;var a=r.salt;if(a){n=u.create([1398893684,1701076831]).concat(a).concat(s)}else{n=s}return n.toString(m)},parse:function(r){var n;var s=m.parse(r);var a=s.words;if(a[0]==1398893684&&a[1]==1701076831){n=u.create(a.slice(2,4));a.splice(0,4);s.sigBytes-=16}return k.create({ciphertext:s,salt:n})}};var T=a.SerializableCipher=l.extend({cfg:l.extend({format:O}),encrypt:function(r,n,s,a){a=this.cfg.extend(a);var l=r.createEncryptor(s,a);var u=l.finalize(n);var f=l.cfg;return k.create({ciphertext:u,key:s,iv:f.iv,algorithm:r,mode:f.mode,padding:f.padding,blockSize:r.blockSize,formatter:a.format})},decrypt:function(r,n,s,a){a=this.cfg.extend(a);n=this._parse(n,a.format);var l=r.createDecryptor(s,a).finalize(n.ciphertext);return l},_parse:function(r,n){if(typeof r=="string"){return n.parse(r,this)}else{return r}}});var R=s.kdf={};var I=R.OpenSSL={execute:function(r,n,s,a,l){if(!a){a=u.random(64/8)}if(!l){var f=y.create({keySize:n+s}).compute(r,a)}else{var f=y.create({keySize:n+s,hasher:l}).compute(r,a)}var d=u.create(f.words.slice(n),s*4);f.sigBytes=n*4;return k.create({key:f,iv:d,salt:a})}};var N=a.PasswordBasedCipher=T.extend({cfg:T.cfg.extend({kdf:I}),encrypt:function(r,n,s,a){a=this.cfg.extend(a);var l=a.kdf.execute(s,r.keySize,r.ivSize,a.salt,a.hasher);a.iv=l.iv;var u=T.encrypt.call(this,r,n,l.key,a);u.mixIn(l);return u},decrypt:function(r,n,s,a){a=this.cfg.extend(a);n=this._parse(n,a.format);var l=a.kdf.execute(s,r.keySize,r.ivSize,n.salt,a.hasher);a.iv=l.iv;var u=T.decrypt.call(this,r,n,l.key,a);return u}})}()}))},4028:function(r,n,s){(function(s,a){if(true){r.exports=n=a()}else{}})(this,(function(){var r=r||function(r,n){var a;if(typeof window!=="undefined"&&window.crypto){a=window.crypto}if(typeof self!=="undefined"&&self.crypto){a=self.crypto}if(typeof globalThis!=="undefined"&&globalThis.crypto){a=globalThis.crypto}if(!a&&typeof window!=="undefined"&&window.msCrypto){a=window.msCrypto}if(!a&&typeof global!=="undefined"&&global.crypto){a=global.crypto}if(!a&&"function"==="function"){try{a=s(6982)}catch(r){}}var cryptoSecureRandomInt=function(){if(a){if(typeof a.getRandomValues==="function"){try{return a.getRandomValues(new Uint32Array(1))[0]}catch(r){}}if(typeof a.randomBytes==="function"){try{return a.randomBytes(4).readInt32LE()}catch(r){}}}throw new Error("Native crypto module could not be used to get secure random number.")};var l=Object.create||function(){function F(){}return function(r){var n;F.prototype=r;n=new F;F.prototype=null;return n}}();var u={};var f=u.lib={};var d=f.Base=function(){return{extend:function(r){var n=l(this);if(r){n.mixIn(r)}if(!n.hasOwnProperty("init")||this.init===n.init){n.init=function(){n.$super.init.apply(this,arguments)}}n.init.prototype=n;n.$super=this;return n},create:function(){var r=this.extend();r.init.apply(r,arguments);return r},init:function(){},mixIn:function(r){for(var n in r){if(r.hasOwnProperty(n)){this[n]=r[n]}}if(r.hasOwnProperty("toString")){this.toString=r.toString}},clone:function(){return this.init.prototype.extend(this)}}}();var p=f.WordArray=d.extend({init:function(r,s){r=this.words=r||[];if(s!=n){this.sigBytes=s}else{this.sigBytes=r.length*4}},toString:function(r){return(r||g).stringify(this)},concat:function(r){var n=this.words;var s=r.words;var a=this.sigBytes;var l=r.sigBytes;this.clamp();if(a%4){for(var u=0;u<l;u++){var f=s[u>>>2]>>>24-u%4*8&255;n[a+u>>>2]|=f<<24-(a+u)%4*8}}else{for(var d=0;d<l;d+=4){n[a+d>>>2]=s[d>>>2]}}this.sigBytes+=l;return this},clamp:function(){var n=this.words;var s=this.sigBytes;n[s>>>2]&=4294967295<<32-s%4*8;n.length=r.ceil(s/4)},clone:function(){var r=d.clone.call(this);r.words=this.words.slice(0);return r},random:function(r){var n=[];for(var s=0;s<r;s+=4){n.push(cryptoSecureRandomInt())}return new p.init(n,r)}});var m=u.enc={};var g=m.Hex={stringify:function(r){var n=r.words;var s=r.sigBytes;var a=[];for(var l=0;l<s;l++){var u=n[l>>>2]>>>24-l%4*8&255;a.push((u>>>4).toString(16));a.push((u&15).toString(16))}return a.join("")},parse:function(r){var n=r.length;var s=[];for(var a=0;a<n;a+=2){s[a>>>3]|=parseInt(r.substr(a,2),16)<<24-a%8*4}return new p.init(s,n/2)}};var y=m.Latin1={stringify:function(r){var n=r.words;var s=r.sigBytes;var a=[];for(var l=0;l<s;l++){var u=n[l>>>2]>>>24-l%4*8&255;a.push(String.fromCharCode(u))}return a.join("")},parse:function(r){var n=r.length;var s=[];for(var a=0;a<n;a++){s[a>>>2]|=(r.charCodeAt(a)&255)<<24-a%4*8}return new p.init(s,n)}};var v=m.Utf8={stringify:function(r){try{return decodeURIComponent(escape(y.stringify(r)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(r){return y.parse(unescape(encodeURIComponent(r)))}};var b=f.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(r){if(typeof r=="string"){r=v.parse(r)}this._data.concat(r);this._nDataBytes+=r.sigBytes},_process:function(n){var s;var a=this._data;var l=a.words;var u=a.sigBytes;var f=this.blockSize;var d=f*4;var m=u/d;if(n){m=r.ceil(m)}else{m=r.max((m|0)-this._minBufferSize,0)}var g=m*f;var y=r.min(g*4,u);if(g){for(var v=0;v<g;v+=f){this._doProcessBlock(l,v)}s=l.splice(0,g);a.sigBytes-=y}return new p.init(s,y)},clone:function(){var r=d.clone.call(this);r._data=this._data.clone();return r},_minBufferSize:0});var w=f.Hasher=b.extend({cfg:d.extend(),init:function(r){this.cfg=this.cfg.extend(r);this.reset()},reset:function(){b.reset.call(this);this._doReset()},update:function(r){this._append(r);this._process();return this},finalize:function(r){if(r){this._append(r)}var n=this._doFinalize();return n},blockSize:512/32,_createHelper:function(r){return function(n,s){return new r.init(s).finalize(n)}},_createHmacHelper:function(r){return function(n,s){return new _.HMAC.init(r,s).finalize(n)}}});var _=u.algo={};return u}(Math);return r}))},5135:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=n.enc;var u=l.Base64={stringify:function(r){var n=r.words;var s=r.sigBytes;var a=this._map;r.clamp();var l=[];for(var u=0;u<s;u+=3){var f=n[u>>>2]>>>24-u%4*8&255;var d=n[u+1>>>2]>>>24-(u+1)%4*8&255;var p=n[u+2>>>2]>>>24-(u+2)%4*8&255;var m=f<<16|d<<8|p;for(var g=0;g<4&&u+g*.75<s;g++){l.push(a.charAt(m>>>6*(3-g)&63))}}var y=a.charAt(64);if(y){while(l.length%4){l.push(y)}}return l.join("")},parse:function(r){var n=r.length;var s=this._map;var a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var l=0;l<s.length;l++){a[s.charCodeAt(l)]=l}}var u=s.charAt(64);if(u){var f=r.indexOf(u);if(f!==-1){n=f}}return parseLoop(r,n,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function parseLoop(r,n,s){var l=[];var u=0;for(var f=0;f<n;f++){if(f%4){var d=s[r.charCodeAt(f-1)]<<f%4*2;var p=s[r.charCodeAt(f)]>>>6-f%4*2;var m=d|p;l[u>>>2]|=m<<24-u%4*8;u++}}return a.create(l,u)}})();return r.enc.Base64}))},7330:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=n.enc;var u=l.Base64url={stringify:function(r,n){if(n===undefined){n=true}var s=r.words;var a=r.sigBytes;var l=n?this._safe_map:this._map;r.clamp();var u=[];for(var f=0;f<a;f+=3){var d=s[f>>>2]>>>24-f%4*8&255;var p=s[f+1>>>2]>>>24-(f+1)%4*8&255;var m=s[f+2>>>2]>>>24-(f+2)%4*8&255;var g=d<<16|p<<8|m;for(var y=0;y<4&&f+y*.75<a;y++){u.push(l.charAt(g>>>6*(3-y)&63))}}var v=l.charAt(64);if(v){while(u.length%4){u.push(v)}}return u.join("")},parse:function(r,n){if(n===undefined){n=true}var s=r.length;var a=n?this._safe_map:this._map;var l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var u=0;u<a.length;u++){l[a.charCodeAt(u)]=u}}var f=a.charAt(64);if(f){var d=r.indexOf(f);if(d!==-1){s=d}}return parseLoop(r,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function parseLoop(r,n,s){var l=[];var u=0;for(var f=0;f<n;f++){if(f%4){var d=s[r.charCodeAt(f-1)]<<f%4*2;var p=s[r.charCodeAt(f)]>>>6-f%4*2;var m=d|p;l[u>>>2]|=m<<24-u%4*8;u++}}return a.create(l,u)}})();return r.enc.Base64url}))},7244:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=n.enc;var u=l.Utf16=l.Utf16BE={stringify:function(r){var n=r.words;var s=r.sigBytes;var a=[];for(var l=0;l<s;l+=2){var u=n[l>>>2]>>>16-l%4*8&65535;a.push(String.fromCharCode(u))}return a.join("")},parse:function(r){var n=r.length;var s=[];for(var l=0;l<n;l++){s[l>>>1]|=r.charCodeAt(l)<<16-l%2*16}return a.create(s,n*2)}};l.Utf16LE={stringify:function(r){var n=r.words;var s=r.sigBytes;var a=[];for(var l=0;l<s;l+=2){var u=swapEndian(n[l>>>2]>>>16-l%4*8&65535);a.push(String.fromCharCode(u))}return a.join("")},parse:function(r){var n=r.length;var s=[];for(var l=0;l<n;l++){s[l>>>1]|=swapEndian(r.charCodeAt(l)<<16-l%2*16)}return a.create(s,n*2)}};function swapEndian(r){return r<<8&4278255360|r>>>8&16711935}})();return r.enc.Utf16}))},7831:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(9542),s(6616))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.Base;var l=s.WordArray;var u=n.algo;var f=u.MD5;var d=u.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:f,iterations:1}),init:function(r){this.cfg=this.cfg.extend(r)},compute:function(r,n){var s;var a=this.cfg;var u=a.hasher.create();var f=l.create();var d=f.words;var p=a.keySize;var m=a.iterations;while(d.length<p){if(s){u.update(s)}s=u.update(r).finalize(n);u.reset();for(var g=1;g<m;g++){s=u.finalize(s);u.reset()}f.concat(s)}f.sigBytes=p*4;return f}});n.EvpKDF=function(r,n,s){return d.create(s).compute(r,n)}})();return r.EvpKDF}))},6312:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){(function(n){var s=r;var a=s.lib;var l=a.CipherParams;var u=s.enc;var f=u.Hex;var d=s.format;var p=d.Hex={stringify:function(r){return r.ciphertext.toString(f)},parse:function(r){var n=f.parse(r);return l.create({ciphertext:n})}}})();return r.format.Hex}))},6616:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.Base;var l=n.enc;var u=l.Utf8;var f=n.algo;var d=f.HMAC=a.extend({init:function(r,n){r=this._hasher=new r.init;if(typeof n=="string"){n=u.parse(n)}var s=r.blockSize;var a=s*4;if(n.sigBytes>a){n=r.finalize(n)}n.clamp();var l=this._oKey=n.clone();var f=this._iKey=n.clone();var d=l.words;var p=f.words;for(var m=0;m<s;m++){d[m]^=1549556828;p[m]^=909522486}l.sigBytes=f.sigBytes=a;this.reset()},reset:function(){var r=this._hasher;r.reset();r.update(this._iKey)},update:function(r){this._hasher.update(r);return this},finalize:function(r){var n=this._hasher;var s=n.finalize(r);n.reset();var a=n.finalize(this._oKey.clone().concat(s));return a}})})()}))},4163:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(9201),s(4603),s(7244),s(5135),s(7330),s(6219),s(9542),s(8340),s(8901),s(9313),s(8048),s(3100),s(9739),s(6616),s(446),s(7831),s(170),s(8780),s(9454),s(7429),s(9784),s(4327),s(9464),s(5520),s(9747),s(3776),s(8659),s(6312),s(7576),s(4967),s(7706),s(2471),s(6303),s(7049))}else{}})(this,(function(r){return r}))},4603:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){if(typeof ArrayBuffer!="function"){return}var n=r;var s=n.lib;var a=s.WordArray;var l=a.init;var u=a.init=function(r){if(r instanceof ArrayBuffer){r=new Uint8Array(r)}if(r instanceof Int8Array||typeof Uint8ClampedArray!=="undefined"&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array){r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}if(r instanceof Uint8Array){var n=r.byteLength;var s=[];for(var a=0;a<n;a++){s[a>>>2]|=r[a]<<24-a%4*8}l.call(this,s,n)}else{l.apply(this,arguments)}};u.prototype=a})();return r.lib.WordArray}))},6219:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(n){var s=r;var a=s.lib;var l=a.WordArray;var u=a.Hasher;var f=s.algo;var d=[];(function(){for(var r=0;r<64;r++){d[r]=n.abs(n.sin(r+1))*4294967296|0}})();var p=f.MD5=u.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(r,n){for(var s=0;s<16;s++){var a=n+s;var l=r[a];r[a]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var u=this._hash.words;var f=r[n+0];var p=r[n+1];var m=r[n+2];var g=r[n+3];var y=r[n+4];var v=r[n+5];var b=r[n+6];var w=r[n+7];var _=r[n+8];var S=r[n+9];var E=r[n+10];var x=r[n+11];var A=r[n+12];var k=r[n+13];var C=r[n+14];var O=r[n+15];var T=u[0];var R=u[1];var I=u[2];var N=u[3];T=FF(T,R,I,N,f,7,d[0]);N=FF(N,T,R,I,p,12,d[1]);I=FF(I,N,T,R,m,17,d[2]);R=FF(R,I,N,T,g,22,d[3]);T=FF(T,R,I,N,y,7,d[4]);N=FF(N,T,R,I,v,12,d[5]);I=FF(I,N,T,R,b,17,d[6]);R=FF(R,I,N,T,w,22,d[7]);T=FF(T,R,I,N,_,7,d[8]);N=FF(N,T,R,I,S,12,d[9]);I=FF(I,N,T,R,E,17,d[10]);R=FF(R,I,N,T,x,22,d[11]);T=FF(T,R,I,N,A,7,d[12]);N=FF(N,T,R,I,k,12,d[13]);I=FF(I,N,T,R,C,17,d[14]);R=FF(R,I,N,T,O,22,d[15]);T=GG(T,R,I,N,p,5,d[16]);N=GG(N,T,R,I,b,9,d[17]);I=GG(I,N,T,R,x,14,d[18]);R=GG(R,I,N,T,f,20,d[19]);T=GG(T,R,I,N,v,5,d[20]);N=GG(N,T,R,I,E,9,d[21]);I=GG(I,N,T,R,O,14,d[22]);R=GG(R,I,N,T,y,20,d[23]);T=GG(T,R,I,N,S,5,d[24]);N=GG(N,T,R,I,C,9,d[25]);I=GG(I,N,T,R,g,14,d[26]);R=GG(R,I,N,T,_,20,d[27]);T=GG(T,R,I,N,k,5,d[28]);N=GG(N,T,R,I,m,9,d[29]);I=GG(I,N,T,R,w,14,d[30]);R=GG(R,I,N,T,A,20,d[31]);T=HH(T,R,I,N,v,4,d[32]);N=HH(N,T,R,I,_,11,d[33]);I=HH(I,N,T,R,x,16,d[34]);R=HH(R,I,N,T,C,23,d[35]);T=HH(T,R,I,N,p,4,d[36]);N=HH(N,T,R,I,y,11,d[37]);I=HH(I,N,T,R,w,16,d[38]);R=HH(R,I,N,T,E,23,d[39]);T=HH(T,R,I,N,k,4,d[40]);N=HH(N,T,R,I,f,11,d[41]);I=HH(I,N,T,R,g,16,d[42]);R=HH(R,I,N,T,b,23,d[43]);T=HH(T,R,I,N,S,4,d[44]);N=HH(N,T,R,I,A,11,d[45]);I=HH(I,N,T,R,O,16,d[46]);R=HH(R,I,N,T,m,23,d[47]);T=II(T,R,I,N,f,6,d[48]);N=II(N,T,R,I,w,10,d[49]);I=II(I,N,T,R,C,15,d[50]);R=II(R,I,N,T,v,21,d[51]);T=II(T,R,I,N,A,6,d[52]);N=II(N,T,R,I,g,10,d[53]);I=II(I,N,T,R,E,15,d[54]);R=II(R,I,N,T,p,21,d[55]);T=II(T,R,I,N,_,6,d[56]);N=II(N,T,R,I,O,10,d[57]);I=II(I,N,T,R,b,15,d[58]);R=II(R,I,N,T,k,21,d[59]);T=II(T,R,I,N,y,6,d[60]);N=II(N,T,R,I,x,10,d[61]);I=II(I,N,T,R,m,15,d[62]);R=II(R,I,N,T,S,21,d[63]);u[0]=u[0]+T|0;u[1]=u[1]+R|0;u[2]=u[2]+I|0;u[3]=u[3]+N|0},_doFinalize:function(){var r=this._data;var s=r.words;var a=this._nDataBytes*8;var l=r.sigBytes*8;s[l>>>5]|=128<<24-l%32;var u=n.floor(a/4294967296);var f=a;s[(l+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360;s[(l+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;r.sigBytes=(s.length+1)*4;this._process();var d=this._hash;var p=d.words;for(var m=0;m<4;m++){var g=p[m];p[m]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}return d},clone:function(){var r=u.clone.call(this);r._hash=this._hash.clone();return r}});function FF(r,n,s,a,l,u,f){var d=r+(n&s|~n&a)+l+f;return(d<<u|d>>>32-u)+n}function GG(r,n,s,a,l,u,f){var d=r+(n&a|s&~a)+l+f;return(d<<u|d>>>32-u)+n}function HH(r,n,s,a,l,u,f){var d=r+(n^s^a)+l+f;return(d<<u|d>>>32-u)+n}function II(r,n,s,a,l,u,f){var d=r+(s^(n|~a))+l+f;return(d<<u|d>>>32-u)+n}s.MD5=u._createHelper(p);s.HmacMD5=u._createHmacHelper(p)})(Math);return r.MD5}))},8780:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.mode.CFB=function(){var n=r.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;generateKeystreamAndEncrypt.call(this,r,n,a,s);this._prevBlock=r.slice(n,n+a)}});n.Decryptor=n.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;var l=r.slice(n,n+a);generateKeystreamAndEncrypt.call(this,r,n,a,s);this._prevBlock=l}});function generateKeystreamAndEncrypt(r,n,s,a){var l;var u=this._iv;if(u){l=u.slice(0);this._iv=undefined}else{l=this._prevBlock}a.encryptBlock(l,0);for(var f=0;f<s;f++){r[n+f]^=l[f]}}return n}();return r.mode.CFB}))},7429:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){
|
|
2
2
|
/** @preserve
|
|
3
3
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
4
4
|
* derived from CryptoJS.mode.CTR
|
|
5
5
|
* Jan Hruby jhruby.web@gmail.com
|
|
6
6
|
*/
|
|
7
|
-
e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function incWord(e){if((e>>24&255)===255){var t=e>>16&255;var r=e>>8&255;var n=e&255;if(t===255){t=0;if(r===255){r=0;if(n===255){n=0}else{++n}}else{++r}}else{++t}e=0;e+=t<<16;e+=r<<8;e+=n}else{e+=1<<24}return e}function incCounter(e){if((e[0]=incWord(e[0]))===0){e[1]=incWord(e[1])}return e}var r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=this._iv;var s=this._counter;if(i){s=this._counter=i.slice(0);this._iv=undefined}incCounter(s);var o=s.slice(0);r.encryptBlock(o,0);for(var a=0;a<n;a++){e[t+a]^=o[a]}}});t.Decryptor=r;return t}();return e.mode.CTRGladman}))},9762:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend();var r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=this._iv;var s=this._counter;if(i){s=this._counter=i.slice(0);this._iv=undefined}var o=s.slice(0);r.encryptBlock(o,0);s[n-1]=s[n-1]+1|0;for(var a=0;a<n;a++){e[t+a]^=o[a]}}});t.Decryptor=r;return t}();return e.mode.CTR}))},5643:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}});t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}});return t}();return e.mode.ECB}))},2462:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend();var r=t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher;var n=r.blockSize;var i=this._iv;var s=this._keystream;if(i){s=this._keystream=i.slice(0);this._iv=undefined}r.encryptBlock(s,0);for(var o=0;o<n;o++){e[t+o]^=s[o]}}});t.Decryptor=r;return t}();return e.mode.OFB}))},2295:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes;var n=t*4;var i=n-r%n;var s=r+i-1;e.clamp();e.words[s>>>2]|=i<<24-s%4*8;e.sigBytes+=i},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};return e.pad.Ansix923}))},5149:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.pad.Iso10126={pad:function(t,r){var n=r*4;var i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}};return e.pad.Iso10126}))},9573:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1));e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t);t.sigBytes--}};return e.pad.Iso97971}))},9610:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.pad.NoPadding={pad:function(){},unpad:function(){}};return e.pad.NoPadding}))},8727:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(714))}else{}})(this,(function(e){e.pad.ZeroPadding={pad:function(e,t){var r=t*4;e.clamp();e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words;var r=e.sigBytes-1;for(var r=e.sigBytes-1;r>=0;r--){if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}}};return e.pad.ZeroPadding}))},1476:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(3941),r(1192))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Base;var i=r.WordArray;var s=t.algo;var o=s.SHA256;var a=s.HMAC;var c=s.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var r=this.cfg;var n=a.create(r.hasher,e);var s=i.create();var o=i.create([1]);var c=s.words;var l=o.words;var u=r.keySize;var f=r.iterations;while(c.length<u){var h=n.update(t).finalize(o);n.reset();var d=h.words;var p=d.length;var m=h;for(var v=1;v<f;v++){m=n.finalize(m);n.reset();var _=m.words;for(var g=0;g<p;g++){d[g]^=_[g]}}s.concat(h);l[0]++}s.sigBytes=u*4;return s}});t.PBKDF2=function(e,t,r){return c.create(r).compute(e,t)}})();return e.PBKDF2}))},6424:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var s=[];var o=[];var a=[];var c=i.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words;var t=this.cfg.iv;var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];var n=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var i=0;i<4;i++){nextState.call(this)}for(var i=0;i<8;i++){n[i]^=r[i+4&7]}if(t){var s=t.words;var o=s[0];var a=s[1];var c=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var l=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var u=c>>>16|l&4294901760;var f=l<<16|c&65535;n[0]^=c;n[1]^=u;n[2]^=l;n[3]^=f;n[4]^=c;n[5]^=u;n[6]^=l;n[7]^=f;for(var i=0;i<4;i++){nextState.call(this)}}},_doProcessBlock:function(e,t){var r=this._X;nextState.call(this);s[0]=r[0]^r[5]>>>16^r[3]<<16;s[1]=r[2]^r[7]>>>16^r[5]<<16;s[2]=r[4]^r[1]>>>16^r[7]<<16;s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++){s[n]=(s[n]<<8|s[n]>>>24)&16711935|(s[n]<<24|s[n]>>>8)&4278255360;e[t+n]^=s[n]}},blockSize:128/32,ivSize:64/32});function nextState(){var e=this._X;var t=this._C;for(var r=0;r<8;r++){o[r]=t[r]}t[0]=t[0]+1295307597+this._b|0;t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0;t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0;t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0;t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0;t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0;t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0;t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0;this._b=t[7]>>>0<o[7]>>>0?1:0;for(var r=0;r<8;r++){var n=e[r]+t[r];var i=n&65535;var s=n>>>16;var c=((i*i>>>17)+i*s>>>15)+s*s;var l=((n&4294901760)*n|0)+((n&65535)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0;e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0;e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0;e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0;e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0;e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0;e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0;e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(c)})();return e.RabbitLegacy}))},2104:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var s=[];var o=[];var a=[];var c=i.Rabbit=n.extend({_doReset:function(){var e=this._key.words;var t=this.cfg.iv;for(var r=0;r<4;r++){e[r]=(e[r]<<8|e[r]>>>24)&16711935|(e[r]<<24|e[r]>>>8)&4278255360}var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16];var i=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var r=0;r<4;r++){nextState.call(this)}for(var r=0;r<8;r++){i[r]^=n[r+4&7]}if(t){var s=t.words;var o=s[0];var a=s[1];var c=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var l=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var u=c>>>16|l&4294901760;var f=l<<16|c&65535;i[0]^=c;i[1]^=u;i[2]^=l;i[3]^=f;i[4]^=c;i[5]^=u;i[6]^=l;i[7]^=f;for(var r=0;r<4;r++){nextState.call(this)}}},_doProcessBlock:function(e,t){var r=this._X;nextState.call(this);s[0]=r[0]^r[5]>>>16^r[3]<<16;s[1]=r[2]^r[7]>>>16^r[5]<<16;s[2]=r[4]^r[1]>>>16^r[7]<<16;s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++){s[n]=(s[n]<<8|s[n]>>>24)&16711935|(s[n]<<24|s[n]>>>8)&4278255360;e[t+n]^=s[n]}},blockSize:128/32,ivSize:64/32});function nextState(){var e=this._X;var t=this._C;for(var r=0;r<8;r++){o[r]=t[r]}t[0]=t[0]+1295307597+this._b|0;t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0;t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0;t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0;t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0;t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0;t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0;t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0;this._b=t[7]>>>0<o[7]>>>0?1:0;for(var r=0;r<8;r++){var n=e[r]+t[r];var i=n&65535;var s=n>>>16;var c=((i*i>>>17)+i*s>>>15)+s*s;var l=((n&4294901760)*n|0)+((n&65535)*n|0);a[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0;e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0;e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0;e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0;e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0;e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0;e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0;e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(c)})();return e.Rabbit}))},4353:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.StreamCipher;var i=t.algo;var s=i.RC4=n.extend({_doReset:function(){var e=this._key;var t=e.words;var r=e.sigBytes;var n=this._S=[];for(var i=0;i<256;i++){n[i]=i}for(var i=0,s=0;i<256;i++){var o=i%r;var a=t[o>>>2]>>>24-o%4*8&255;s=(s+n[i]+a)%256;var c=n[i];n[i]=n[s];n[s]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=generateKeystreamWord.call(this)},keySize:256/32,ivSize:0});function generateKeystreamWord(){var e=this._S;var t=this._i;var r=this._j;var n=0;for(var i=0;i<4;i++){t=(t+1)%256;r=(r+e[t])%256;var s=e[t];e[t]=e[r];e[r]=s;n|=e[(e[t]+e[r])%256]<<24-i*8}this._i=t;this._j=r;return n}t.RC4=n._createHelper(s);var o=i.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--){generateKeystreamWord.call(this)}}});t.RC4Drop=n._createHelper(o)})();return e.RC4}))},2513:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){
|
|
7
|
+
r.mode.CTRGladman=function(){var n=r.lib.BlockCipherMode.extend();function incWord(r){if((r>>24&255)===255){var n=r>>16&255;var s=r>>8&255;var a=r&255;if(n===255){n=0;if(s===255){s=0;if(a===255){a=0}else{++a}}else{++s}}else{++n}r=0;r+=n<<16;r+=s<<8;r+=a}else{r+=1<<24}return r}function incCounter(r){if((r[0]=incWord(r[0]))===0){r[1]=incWord(r[1])}return r}var s=n.Encryptor=n.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;var l=this._iv;var u=this._counter;if(l){u=this._counter=l.slice(0);this._iv=undefined}incCounter(u);var f=u.slice(0);s.encryptBlock(f,0);for(var d=0;d<a;d++){r[n+d]^=f[d]}}});n.Decryptor=s;return n}();return r.mode.CTRGladman}))},9454:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.mode.CTR=function(){var n=r.lib.BlockCipherMode.extend();var s=n.Encryptor=n.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;var l=this._iv;var u=this._counter;if(l){u=this._counter=l.slice(0);this._iv=undefined}var f=u.slice(0);s.encryptBlock(f,0);u[a-1]=u[a-1]+1|0;for(var d=0;d<a;d++){r[n+d]^=f[d]}}});n.Decryptor=s;return n}();return r.mode.CTR}))},4327:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.mode.ECB=function(){var n=r.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}});n.Decryptor=n.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}});return n}();return r.mode.ECB}))},9784:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.mode.OFB=function(){var n=r.lib.BlockCipherMode.extend();var s=n.Encryptor=n.extend({processBlock:function(r,n){var s=this._cipher;var a=s.blockSize;var l=this._iv;var u=this._keystream;if(l){u=this._keystream=l.slice(0);this._iv=undefined}s.encryptBlock(u,0);for(var f=0;f<a;f++){r[n+f]^=u[f]}}});n.Decryptor=s;return n}();return r.mode.OFB}))},9464:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.pad.AnsiX923={pad:function(r,n){var s=r.sigBytes;var a=n*4;var l=a-s%a;var u=s+l-1;r.clamp();r.words[u>>>2]|=l<<24-u%4*8;r.sigBytes+=l},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}};return r.pad.Ansix923}))},5520:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.pad.Iso10126={pad:function(n,s){var a=s*4;var l=a-n.sigBytes%a;n.concat(r.lib.WordArray.random(l-1)).concat(r.lib.WordArray.create([l<<24],1))},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}};return r.pad.Iso10126}))},9747:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.pad.Iso97971={pad:function(n,s){n.concat(r.lib.WordArray.create([2147483648],1));r.pad.ZeroPadding.pad(n,s)},unpad:function(n){r.pad.ZeroPadding.unpad(n);n.sigBytes--}};return r.pad.Iso97971}))},8659:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.pad.NoPadding={pad:function(){},unpad:function(){}};return r.pad.NoPadding}))},3776:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(170))}else{}})(this,(function(r){r.pad.ZeroPadding={pad:function(r,n){var s=n*4;r.clamp();r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){var n=r.words;var s=r.sigBytes-1;for(var s=r.sigBytes-1;s>=0;s--){if(n[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}}};return r.pad.ZeroPadding}))},446:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(8340),s(6616))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.Base;var l=s.WordArray;var u=n.algo;var f=u.SHA256;var d=u.HMAC;var p=u.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:f,iterations:25e4}),init:function(r){this.cfg=this.cfg.extend(r)},compute:function(r,n){var s=this.cfg;var a=d.create(s.hasher,r);var u=l.create();var f=l.create([1]);var p=u.words;var m=f.words;var g=s.keySize;var y=s.iterations;while(p.length<g){var v=a.update(n).finalize(f);a.reset();var b=v.words;var w=b.length;var _=v;for(var S=1;S<y;S++){_=a.finalize(_);a.reset();var E=_.words;for(var x=0;x<w;x++){b[x]^=E[x]}}u.concat(v);m[0]++}u.sigBytes=g*4;return u}});n.PBKDF2=function(r,n,s){return p.create(s).compute(r,n)}})();return r.PBKDF2}))},6303:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.StreamCipher;var l=n.algo;var u=[];var f=[];var d=[];var p=l.RabbitLegacy=a.extend({_doReset:function(){var r=this._key.words;var n=this.cfg.iv;var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16];var a=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var l=0;l<4;l++){nextState.call(this)}for(var l=0;l<8;l++){a[l]^=s[l+4&7]}if(n){var u=n.words;var f=u[0];var d=u[1];var p=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;var m=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;var g=p>>>16|m&4294901760;var y=m<<16|p&65535;a[0]^=p;a[1]^=g;a[2]^=m;a[3]^=y;a[4]^=p;a[5]^=g;a[6]^=m;a[7]^=y;for(var l=0;l<4;l++){nextState.call(this)}}},_doProcessBlock:function(r,n){var s=this._X;nextState.call(this);u[0]=s[0]^s[5]>>>16^s[3]<<16;u[1]=s[2]^s[7]>>>16^s[5]<<16;u[2]=s[4]^s[1]>>>16^s[7]<<16;u[3]=s[6]^s[3]>>>16^s[1]<<16;for(var a=0;a<4;a++){u[a]=(u[a]<<8|u[a]>>>24)&16711935|(u[a]<<24|u[a]>>>8)&4278255360;r[n+a]^=u[a]}},blockSize:128/32,ivSize:64/32});function nextState(){var r=this._X;var n=this._C;for(var s=0;s<8;s++){f[s]=n[s]}n[0]=n[0]+1295307597+this._b|0;n[1]=n[1]+3545052371+(n[0]>>>0<f[0]>>>0?1:0)|0;n[2]=n[2]+886263092+(n[1]>>>0<f[1]>>>0?1:0)|0;n[3]=n[3]+1295307597+(n[2]>>>0<f[2]>>>0?1:0)|0;n[4]=n[4]+3545052371+(n[3]>>>0<f[3]>>>0?1:0)|0;n[5]=n[5]+886263092+(n[4]>>>0<f[4]>>>0?1:0)|0;n[6]=n[6]+1295307597+(n[5]>>>0<f[5]>>>0?1:0)|0;n[7]=n[7]+3545052371+(n[6]>>>0<f[6]>>>0?1:0)|0;this._b=n[7]>>>0<f[7]>>>0?1:0;for(var s=0;s<8;s++){var a=r[s]+n[s];var l=a&65535;var u=a>>>16;var p=((l*l>>>17)+l*u>>>15)+u*u;var m=((a&4294901760)*a|0)+((a&65535)*a|0);d[s]=p^m}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0;r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0;r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0;r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0;r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0;r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0;r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0;r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}n.RabbitLegacy=a._createHelper(p)})();return r.RabbitLegacy}))},2471:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.StreamCipher;var l=n.algo;var u=[];var f=[];var d=[];var p=l.Rabbit=a.extend({_doReset:function(){var r=this._key.words;var n=this.cfg.iv;for(var s=0;s<4;s++){r[s]=(r[s]<<8|r[s]>>>24)&16711935|(r[s]<<24|r[s]>>>8)&4278255360}var a=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16];var l=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var s=0;s<4;s++){nextState.call(this)}for(var s=0;s<8;s++){l[s]^=a[s+4&7]}if(n){var u=n.words;var f=u[0];var d=u[1];var p=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;var m=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;var g=p>>>16|m&4294901760;var y=m<<16|p&65535;l[0]^=p;l[1]^=g;l[2]^=m;l[3]^=y;l[4]^=p;l[5]^=g;l[6]^=m;l[7]^=y;for(var s=0;s<4;s++){nextState.call(this)}}},_doProcessBlock:function(r,n){var s=this._X;nextState.call(this);u[0]=s[0]^s[5]>>>16^s[3]<<16;u[1]=s[2]^s[7]>>>16^s[5]<<16;u[2]=s[4]^s[1]>>>16^s[7]<<16;u[3]=s[6]^s[3]>>>16^s[1]<<16;for(var a=0;a<4;a++){u[a]=(u[a]<<8|u[a]>>>24)&16711935|(u[a]<<24|u[a]>>>8)&4278255360;r[n+a]^=u[a]}},blockSize:128/32,ivSize:64/32});function nextState(){var r=this._X;var n=this._C;for(var s=0;s<8;s++){f[s]=n[s]}n[0]=n[0]+1295307597+this._b|0;n[1]=n[1]+3545052371+(n[0]>>>0<f[0]>>>0?1:0)|0;n[2]=n[2]+886263092+(n[1]>>>0<f[1]>>>0?1:0)|0;n[3]=n[3]+1295307597+(n[2]>>>0<f[2]>>>0?1:0)|0;n[4]=n[4]+3545052371+(n[3]>>>0<f[3]>>>0?1:0)|0;n[5]=n[5]+886263092+(n[4]>>>0<f[4]>>>0?1:0)|0;n[6]=n[6]+1295307597+(n[5]>>>0<f[5]>>>0?1:0)|0;n[7]=n[7]+3545052371+(n[6]>>>0<f[6]>>>0?1:0)|0;this._b=n[7]>>>0<f[7]>>>0?1:0;for(var s=0;s<8;s++){var a=r[s]+n[s];var l=a&65535;var u=a>>>16;var p=((l*l>>>17)+l*u>>>15)+u*u;var m=((a&4294901760)*a|0)+((a&65535)*a|0);d[s]=p^m}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0;r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0;r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0;r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0;r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0;r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0;r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0;r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}n.Rabbit=a._createHelper(p)})();return r.Rabbit}))},7706:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.StreamCipher;var l=n.algo;var u=l.RC4=a.extend({_doReset:function(){var r=this._key;var n=r.words;var s=r.sigBytes;var a=this._S=[];for(var l=0;l<256;l++){a[l]=l}for(var l=0,u=0;l<256;l++){var f=l%s;var d=n[f>>>2]>>>24-f%4*8&255;u=(u+a[l]+d)%256;var p=a[l];a[l]=a[u];a[u]=p}this._i=this._j=0},_doProcessBlock:function(r,n){r[n]^=generateKeystreamWord.call(this)},keySize:256/32,ivSize:0});function generateKeystreamWord(){var r=this._S;var n=this._i;var s=this._j;var a=0;for(var l=0;l<4;l++){n=(n+1)%256;s=(s+r[n])%256;var u=r[n];r[n]=r[s];r[s]=u;a|=r[(r[n]+r[s])%256]<<24-l*8}this._i=n;this._j=s;return a}n.RC4=a._createHelper(u);var f=l.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var r=this.cfg.drop;r>0;r--){generateKeystreamWord.call(this)}}});n.RC4Drop=a._createHelper(f)})();return r.RC4}))},9739:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){
|
|
8
8
|
/** @preserve
|
|
9
9
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
10
10
|
|
|
@@ -15,43 +15,43 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function incWo
|
|
|
15
15
|
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
17
17
|
*/
|
|
18
|
-
(function(t){var r=e;var n=r.lib;var i=n.WordArray;var s=n.Hasher;var o=r.algo;var a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]);var c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]);var l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]);var u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]);var f=i.create([0,1518500249,1859775393,2400959708,2840853838]);var h=i.create([1352829926,1548603684,1836072691,2053994217,0]);var d=o.RIPEMD160=s.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r;var i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words;var o=f.words;var d=h.words;var p=a.words;var m=c.words;var v=l.words;var _=u.words;var g,y,w,b,E;var S,x,A,k,C;S=g=s[0];x=y=s[1];A=w=s[2];k=b=s[3];C=E=s[4];var R;for(var r=0;r<80;r+=1){R=g+e[t+p[r]]|0;if(r<16){R+=f1(y,w,b)+o[0]}else if(r<32){R+=f2(y,w,b)+o[1]}else if(r<48){R+=f3(y,w,b)+o[2]}else if(r<64){R+=f4(y,w,b)+o[3]}else{R+=f5(y,w,b)+o[4]}R=R|0;R=rotl(R,v[r]);R=R+E|0;g=E;E=b;b=rotl(w,10);w=y;y=R;R=S+e[t+m[r]]|0;if(r<16){R+=f5(x,A,k)+d[0]}else if(r<32){R+=f4(x,A,k)+d[1]}else if(r<48){R+=f3(x,A,k)+d[2]}else if(r<64){R+=f2(x,A,k)+d[3]}else{R+=f1(x,A,k)+d[4]}R=R|0;R=rotl(R,_[r]);R=R+C|0;S=C;C=k;k=rotl(A,10);A=x;x=R}R=s[1]+w+k|0;s[1]=s[2]+b+C|0;s[2]=s[3]+E+S|0;s[3]=s[4]+g+x|0;s[4]=s[0]+y+A|0;s[0]=R},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+64>>>9<<4)+14]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360;e.sigBytes=(t.length+1)*4;this._process();var i=this._hash;var s=i.words;for(var o=0;o<5;o++){var a=s[o];s[o]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}return i},clone:function(){var e=s.clone.call(this);e._hash=this._hash.clone();return e}});function f1(e,t,r){return e^t^r}function f2(e,t,r){return e&t|~e&r}function f3(e,t,r){return(e|~t)^r}function f4(e,t,r){return e&r|t&~r}function f5(e,t,r){return e^(t|~r)}function rotl(e,t){return e<<t|e>>>32-t}r.RIPEMD160=s._createHelper(d);r.HmacRIPEMD160=s._createHmacHelper(d)})(Math);return e.RIPEMD160}))},7156:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=r.Hasher;var s=t.algo;var o=[];var a=s.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var s=r[2];var a=r[3];var c=r[4];for(var l=0;l<80;l++){if(l<16){o[l]=e[t+l]|0}else{var u=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=u<<1|u>>>31}var f=(n<<5|n>>>27)+c+o[l];if(l<20){f+=(i&s|~i&a)+1518500249}else if(l<40){f+=(i^s^a)+1859775393}else if(l<60){f+=(i&s|i&a|s&a)-1894007588}else{f+=(i^s^a)-899497514}c=a;a=s;s=i<<30|i>>>2;i=n;n=f}r[0]=r[0]+n|0;r[1]=r[1]+i|0;r[2]=r[2]+s|0;r[3]=r[3]+a|0;r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296);t[(n+64>>>9<<4)+15]=r;e.sigBytes=t.length*4;this._process();return this._hash},clone:function(){var e=i.clone.call(this);e._hash=this._hash.clone();return e}});t.SHA1=i._createHelper(a);t.HmacSHA1=i._createHmacHelper(a)})();return e.SHA1}))},1081:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(3941))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=t.algo;var s=i.SHA256;var o=i.SHA224=s.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);e.sigBytes-=4;return e}});t.SHA224=s._createHelper(o);t.HmacSHA224=s._createHmacHelper(o)})();return e.SHA224}))},3941:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var s=n.Hasher;var o=r.algo;var a=[];var c=[];(function(){function isPrime(e){var r=t.sqrt(e);for(var n=2;n<=r;n++){if(!(e%n)){return false}}return true}function getFractionalBits(e){return(e-(e|0))*4294967296|0}var e=2;var r=0;while(r<64){if(isPrime(e)){if(r<8){a[r]=getFractionalBits(t.pow(e,1/2))}c[r]=getFractionalBits(t.pow(e,1/3));r++}e++}})();var l=[];var u=o.SHA256=s.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var s=r[2];var o=r[3];var a=r[4];var u=r[5];var f=r[6];var h=r[7];for(var d=0;d<64;d++){if(d<16){l[d]=e[t+d]|0}else{var p=l[d-15];var m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3;var v=l[d-2];var _=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[d]=m+l[d-7]+_+l[d-16]}var g=a&u^~a&f;var y=n&i^n&s^i&s;var w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22);var b=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25);var E=h+b+g+c[d]+l[d];var S=w+y;h=f;f=u;u=a;a=o+E|0;o=s;s=i;i=n;n=E+S|0}r[0]=r[0]+n|0;r[1]=r[1]+i|0;r[2]=r[2]+s|0;r[3]=r[3]+o|0;r[4]=r[4]+a|0;r[5]=r[5]+u|0;r[6]=r[6]+f|0;r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var i=e.sigBytes*8;r[i>>>5]|=128<<24-i%32;r[(i+64>>>9<<4)+14]=t.floor(n/4294967296);r[(i+64>>>9<<4)+15]=n;e.sigBytes=r.length*4;this._process();return this._hash},clone:function(){var e=s.clone.call(this);e._hash=this._hash.clone();return e}});r.SHA256=s._createHelper(u);r.HmacSHA256=s._createHmacHelper(u)})(Math);return e.SHA256}))},7800:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(5474))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.WordArray;var s=n.Hasher;var o=r.x64;var a=o.Word;var c=r.algo;var l=[];var u=[];var f=[];(function(){var e=1,t=0;for(var r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=t%5;var i=(2*e+3*t)%5;e=n;t=i}for(var e=0;e<5;e++){for(var t=0;t<5;t++){u[e+5*t]=t+(2*e+3*t)%5*5}}var s=1;for(var o=0;o<24;o++){var c=0;var h=0;for(var d=0;d<7;d++){if(s&1){var p=(1<<d)-1;if(p<32){h^=1<<p}else{c^=1<<p-32}}if(s&128){s=s<<1^113}else{s<<=1}}f[o]=a.create(c,h)}})();var h=[];(function(){for(var e=0;e<25;e++){h[e]=a.create()}})();var d=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){var e=this._state=[];for(var t=0;t<25;t++){e[t]=new a.init}this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){var r=this._state;var n=this.blockSize/2;for(var i=0;i<n;i++){var s=e[t+2*i];var o=e[t+2*i+1];s=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;o=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var a=r[i];a.high^=o;a.low^=s}for(var c=0;c<24;c++){for(var d=0;d<5;d++){var p=0,m=0;for(var v=0;v<5;v++){var a=r[d+5*v];p^=a.high;m^=a.low}var _=h[d];_.high=p;_.low=m}for(var d=0;d<5;d++){var g=h[(d+4)%5];var y=h[(d+1)%5];var w=y.high;var b=y.low;var p=g.high^(w<<1|b>>>31);var m=g.low^(b<<1|w>>>31);for(var v=0;v<5;v++){var a=r[d+5*v];a.high^=p;a.low^=m}}for(var E=1;E<25;E++){var p;var m;var a=r[E];var S=a.high;var x=a.low;var A=l[E];if(A<32){p=S<<A|x>>>32-A;m=x<<A|S>>>32-A}else{p=x<<A-32|S>>>64-A;m=S<<A-32|x>>>64-A}var k=h[u[E]];k.high=p;k.low=m}var C=h[0];var R=r[0];C.high=R.high;C.low=R.low;for(var d=0;d<5;d++){for(var v=0;v<5;v++){var E=d+5*v;var a=r[E];var O=h[E];var T=h[(d+1)%5+5*v];var I=h[(d+2)%5+5*v];a.high=O.high^~T.high&I.high;a.low=O.low^~T.low&I.low}}var a=r[0];var P=f[c];a.high^=P.high;a.low^=P.low}},_doFinalize:function(){var e=this._data;var r=e.words;var n=this._nDataBytes*8;var s=e.sigBytes*8;var o=this.blockSize*32;r[s>>>5]|=1<<24-s%32;r[(t.ceil((s+1)/o)*o>>>5)-1]|=128;e.sigBytes=r.length*4;this._process();var a=this._state;var c=this.cfg.outputLength/8;var l=c/8;var u=[];for(var f=0;f<l;f++){var h=a[f];var d=h.high;var p=h.low;d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;p=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360;u.push(p);u.push(d)}return new i.init(u,c)},clone:function(){var e=s.clone.call(this);var t=e._state=this._state.slice(0);for(var r=0;r<25;r++){t[r]=t[r].clone()}return e}});r.SHA3=s._createHelper(d);r.HmacSHA3=s._createHmacHelper(d)})(Math);return e.SHA3}))},4861:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(5474),r(2034))}else{}})(this,(function(e){(function(){var t=e;var r=t.x64;var n=r.Word;var i=r.WordArray;var s=t.algo;var o=s.SHA512;var a=s.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);e.sigBytes-=16;return e}});t.SHA384=o._createHelper(a);t.HmacSHA384=o._createHmacHelper(a)})();return e.SHA384}))},2034:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(5474))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.Hasher;var i=t.x64;var s=i.Word;var o=i.WordArray;var a=t.algo;function X64Word_create(){return s.create.apply(s,arguments)}var c=[X64Word_create(1116352408,3609767458),X64Word_create(1899447441,602891725),X64Word_create(3049323471,3964484399),X64Word_create(3921009573,2173295548),X64Word_create(961987163,4081628472),X64Word_create(1508970993,3053834265),X64Word_create(2453635748,2937671579),X64Word_create(2870763221,3664609560),X64Word_create(3624381080,2734883394),X64Word_create(310598401,1164996542),X64Word_create(607225278,1323610764),X64Word_create(1426881987,3590304994),X64Word_create(1925078388,4068182383),X64Word_create(2162078206,991336113),X64Word_create(2614888103,633803317),X64Word_create(3248222580,3479774868),X64Word_create(3835390401,2666613458),X64Word_create(4022224774,944711139),X64Word_create(264347078,2341262773),X64Word_create(604807628,2007800933),X64Word_create(770255983,1495990901),X64Word_create(1249150122,1856431235),X64Word_create(1555081692,3175218132),X64Word_create(1996064986,2198950837),X64Word_create(2554220882,3999719339),X64Word_create(2821834349,766784016),X64Word_create(2952996808,2566594879),X64Word_create(3210313671,3203337956),X64Word_create(3336571891,1034457026),X64Word_create(3584528711,2466948901),X64Word_create(113926993,3758326383),X64Word_create(338241895,168717936),X64Word_create(666307205,1188179964),X64Word_create(773529912,1546045734),X64Word_create(1294757372,1522805485),X64Word_create(1396182291,2643833823),X64Word_create(1695183700,2343527390),X64Word_create(1986661051,1014477480),X64Word_create(2177026350,1206759142),X64Word_create(2456956037,344077627),X64Word_create(2730485921,1290863460),X64Word_create(2820302411,3158454273),X64Word_create(3259730800,3505952657),X64Word_create(3345764771,106217008),X64Word_create(3516065817,3606008344),X64Word_create(3600352804,1432725776),X64Word_create(4094571909,1467031594),X64Word_create(275423344,851169720),X64Word_create(430227734,3100823752),X64Word_create(506948616,1363258195),X64Word_create(659060556,3750685593),X64Word_create(883997877,3785050280),X64Word_create(958139571,3318307427),X64Word_create(1322822218,3812723403),X64Word_create(1537002063,2003034995),X64Word_create(1747873779,3602036899),X64Word_create(1955562222,1575990012),X64Word_create(2024104815,1125592928),X64Word_create(2227730452,2716904306),X64Word_create(2361852424,442776044),X64Word_create(2428436474,593698344),X64Word_create(2756734187,3733110249),X64Word_create(3204031479,2999351573),X64Word_create(3329325298,3815920427),X64Word_create(3391569614,3928383900),X64Word_create(3515267271,566280711),X64Word_create(3940187606,3454069534),X64Word_create(4118630271,4000239992),X64Word_create(116418474,1914138554),X64Word_create(174292421,2731055270),X64Word_create(289380356,3203993006),X64Word_create(460393269,320620315),X64Word_create(685471733,587496836),X64Word_create(852142971,1086792851),X64Word_create(1017036298,365543100),X64Word_create(1126000580,2618297676),X64Word_create(1288033470,3409855158),X64Word_create(1501505948,4234509866),X64Word_create(1607167915,987167468),X64Word_create(1816402316,1246189591)];var l=[];(function(){for(var e=0;e<80;e++){l[e]=X64Word_create()}})();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(e,t){var r=this._hash.words;var n=r[0];var i=r[1];var s=r[2];var o=r[3];var a=r[4];var u=r[5];var f=r[6];var h=r[7];var d=n.high;var p=n.low;var m=i.high;var v=i.low;var _=s.high;var g=s.low;var y=o.high;var w=o.low;var b=a.high;var E=a.low;var S=u.high;var x=u.low;var A=f.high;var k=f.low;var C=h.high;var R=h.low;var O=d;var T=p;var I=m;var P=v;var N=_;var L=g;var B=y;var H=w;var D=b;var M=E;var W=S;var j=x;var U=A;var G=k;var z=C;var Y=R;for(var V=0;V<80;V++){var X;var K;var q=l[V];if(V<16){K=q.high=e[t+V*2]|0;X=q.low=e[t+V*2+1]|0}else{var Q=l[V-15];var Z=Q.high;var J=Q.low;var ee=(Z>>>1|J<<31)^(Z>>>8|J<<24)^Z>>>7;var te=(J>>>1|Z<<31)^(J>>>8|Z<<24)^(J>>>7|Z<<25);var re=l[V-2];var ne=re.high;var ie=re.low;var se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6;var oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26);var ae=l[V-7];var ce=ae.high;var le=ae.low;var ue=l[V-16];var fe=ue.high;var he=ue.low;X=te+le;K=ee+ce+(X>>>0<te>>>0?1:0);X=X+oe;K=K+se+(X>>>0<oe>>>0?1:0);X=X+he;K=K+fe+(X>>>0<he>>>0?1:0);q.high=K;q.low=X}var de=D&W^~D&U;var pe=M&j^~M&G;var me=O&I^O&N^I&N;var ve=T&P^T&L^P&L;var _e=(O>>>28|T<<4)^(O<<30|T>>>2)^(O<<25|T>>>7);var ge=(T>>>28|O<<4)^(T<<30|O>>>2)^(T<<25|O>>>7);var ye=(D>>>14|M<<18)^(D>>>18|M<<14)^(D<<23|M>>>9);var we=(M>>>14|D<<18)^(M>>>18|D<<14)^(M<<23|D>>>9);var be=c[V];var Ee=be.high;var Se=be.low;var xe=Y+we;var Ae=z+ye+(xe>>>0<Y>>>0?1:0);var xe=xe+pe;var Ae=Ae+de+(xe>>>0<pe>>>0?1:0);var xe=xe+Se;var Ae=Ae+Ee+(xe>>>0<Se>>>0?1:0);var xe=xe+X;var Ae=Ae+K+(xe>>>0<X>>>0?1:0);var ke=ge+ve;var Ce=_e+me+(ke>>>0<ge>>>0?1:0);z=U;Y=G;U=W;G=j;W=D;j=M;M=H+xe|0;D=B+Ae+(M>>>0<H>>>0?1:0)|0;B=N;H=L;N=I;L=P;I=O;P=T;T=xe+ke|0;O=Ae+Ce+(T>>>0<xe>>>0?1:0)|0}p=n.low=p+T;n.high=d+O+(p>>>0<T>>>0?1:0);v=i.low=v+P;i.high=m+I+(v>>>0<P>>>0?1:0);g=s.low=g+L;s.high=_+N+(g>>>0<L>>>0?1:0);w=o.low=w+H;o.high=y+B+(w>>>0<H>>>0?1:0);E=a.low=E+M;a.high=b+D+(E>>>0<M>>>0?1:0);x=u.low=x+j;u.high=S+W+(x>>>0<j>>>0?1:0);k=f.low=k+G;f.high=A+U+(k>>>0<G>>>0?1:0);R=h.low=R+Y;h.high=C+z+(R>>>0<Y>>>0?1:0)},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+128>>>10<<5)+30]=Math.floor(r/4294967296);t[(n+128>>>10<<5)+31]=r;e.sigBytes=t.length*4;this._process();var i=this._hash.toX32();return i},clone:function(){var e=n.clone.call(this);e._hash=this._hash.clone();return e},blockSize:1024/32});t.SHA512=n._createHelper(u);t.HmacSHA512=n._createHmacHelper(u)})();return e.SHA512}))},3644:function(e,t,r){(function(n,i,s){if(true){e.exports=t=i(r(425),r(8025),r(250),r(4727),r(714))}else{}})(this,(function(e){(function(){var t=e;var r=t.lib;var n=r.WordArray;var i=r.BlockCipher;var s=t.algo;var o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4];var a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32];var c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];var l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}];var u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];var f=s.DES=i.extend({_doReset:function(){var e=this._key;var t=e.words;var r=[];for(var n=0;n<56;n++){var i=o[n]-1;r[n]=t[i>>>5]>>>31-i%32&1}var s=this._subKeys=[];for(var l=0;l<16;l++){var u=s[l]=[];var f=c[l];for(var n=0;n<24;n++){u[n/6|0]|=r[(a[n]-1+f)%28]<<31-n%6;u[4+(n/6|0)]|=r[28+(a[n+24]-1+f)%28]<<31-n%6}u[0]=u[0]<<1|u[0]>>>31;for(var n=1;n<7;n++){u[n]=u[n]>>>(n-1)*4+3}u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(var n=0;n<16;n++){h[n]=s[15-n]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t];this._rBlock=e[t+1];exchangeLR.call(this,4,252645135);exchangeLR.call(this,16,65535);exchangeRL.call(this,2,858993459);exchangeRL.call(this,8,16711935);exchangeLR.call(this,1,1431655765);for(var n=0;n<16;n++){var i=r[n];var s=this._lBlock;var o=this._rBlock;var a=0;for(var c=0;c<8;c++){a|=l[c][((o^i[c])&u[c])>>>0]}this._lBlock=o;this._rBlock=s^a}var f=this._lBlock;this._lBlock=this._rBlock;this._rBlock=f;exchangeLR.call(this,1,1431655765);exchangeRL.call(this,8,16711935);exchangeRL.call(this,2,858993459);exchangeLR.call(this,16,65535);exchangeLR.call(this,4,252645135);e[t]=this._lBlock;e[t+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function exchangeLR(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r;this._lBlock^=r<<e}function exchangeRL(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r;this._rBlock^=r<<e}t.DES=i._createHelper(f);var h=s.TripleDES=i.extend({_doReset:function(){var e=this._key;var t=e.words;if(t.length!==2&&t.length!==4&&t.length<6){throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.")}var r=t.slice(0,2);var i=t.length<4?t.slice(0,2):t.slice(2,4);var s=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=f.createEncryptor(n.create(r));this._des2=f.createEncryptor(n.create(i));this._des3=f.createEncryptor(n.create(s))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t);this._des2.decryptBlock(e,t);this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t);this._des2.encryptBlock(e,t);this._des1.decryptBlock(e,t)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=i._createHelper(h)})();return e.TripleDES}))},5474:function(e,t,r){(function(n,i){if(true){e.exports=t=i(r(425))}else{}})(this,(function(e){(function(t){var r=e;var n=r.lib;var i=n.Base;var s=n.WordArray;var o=r.x64={};var a=o.Word=i.extend({init:function(e,t){this.high=e;this.low=t}});var c=o.WordArray=i.extend({init:function(e,r){e=this.words=e||[];if(r!=t){this.sigBytes=r}else{this.sigBytes=e.length*8}},toX32:function(){var e=this.words;var t=e.length;var r=[];for(var n=0;n<t;n++){var i=e[n];r.push(i.high);r.push(i.low)}return s.create(r,this.sigBytes)},clone:function(){var e=i.clone.call(this);var t=e.words=this.words.slice(0);var r=t.length;for(var n=0;n<r;n++){t[n]=t[n].clone()}return e}})})();return e}))},961:e=>{"use strict";e.exports=(e,t,r)=>{const define=r=>Object.defineProperty(e,t,{value:r,enumerable:true,writable:true});Object.defineProperty(e,t,{configurable:true,enumerable:true,get(){const e=r();define(e);return e},set(e){define(e)}});return e}},6330:(e,t,r)=>{"use strict";
|
|
18
|
+
(function(n){var s=r;var a=s.lib;var l=a.WordArray;var u=a.Hasher;var f=s.algo;var d=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]);var p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]);var m=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]);var g=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]);var y=l.create([0,1518500249,1859775393,2400959708,2840853838]);var v=l.create([1352829926,1548603684,1836072691,2053994217,0]);var b=f.RIPEMD160=u.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,n){for(var s=0;s<16;s++){var a=n+s;var l=r[a];r[a]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var u=this._hash.words;var f=y.words;var b=v.words;var w=d.words;var _=p.words;var S=m.words;var E=g.words;var x,A,k,C,O;var T,R,I,N,B;T=x=u[0];R=A=u[1];I=k=u[2];N=C=u[3];B=O=u[4];var D;for(var s=0;s<80;s+=1){D=x+r[n+w[s]]|0;if(s<16){D+=f1(A,k,C)+f[0]}else if(s<32){D+=f2(A,k,C)+f[1]}else if(s<48){D+=f3(A,k,C)+f[2]}else if(s<64){D+=f4(A,k,C)+f[3]}else{D+=f5(A,k,C)+f[4]}D=D|0;D=rotl(D,S[s]);D=D+O|0;x=O;O=C;C=rotl(k,10);k=A;A=D;D=T+r[n+_[s]]|0;if(s<16){D+=f5(R,I,N)+b[0]}else if(s<32){D+=f4(R,I,N)+b[1]}else if(s<48){D+=f3(R,I,N)+b[2]}else if(s<64){D+=f2(R,I,N)+b[3]}else{D+=f1(R,I,N)+b[4]}D=D|0;D=rotl(D,E[s]);D=D+B|0;T=B;B=N;N=rotl(I,10);I=R;R=D}D=u[1]+k+N|0;u[1]=u[2]+C+B|0;u[2]=u[3]+O+T|0;u[3]=u[4]+x+R|0;u[4]=u[0]+A+I|0;u[0]=D},_doFinalize:function(){var r=this._data;var n=r.words;var s=this._nDataBytes*8;var a=r.sigBytes*8;n[a>>>5]|=128<<24-a%32;n[(a+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;r.sigBytes=(n.length+1)*4;this._process();var l=this._hash;var u=l.words;for(var f=0;f<5;f++){var d=u[f];u[f]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return l},clone:function(){var r=u.clone.call(this);r._hash=this._hash.clone();return r}});function f1(r,n,s){return r^n^s}function f2(r,n,s){return r&n|~r&s}function f3(r,n,s){return(r|~n)^s}function f4(r,n,s){return r&s|n&~s}function f5(r,n,s){return r^(n|~s)}function rotl(r,n){return r<<n|r>>>32-n}s.RIPEMD160=u._createHelper(b);s.HmacRIPEMD160=u._createHmacHelper(b)})(Math);return r.RIPEMD160}))},9542:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=s.Hasher;var u=n.algo;var f=[];var d=u.SHA1=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,n){var s=this._hash.words;var a=s[0];var l=s[1];var u=s[2];var d=s[3];var p=s[4];for(var m=0;m<80;m++){if(m<16){f[m]=r[n+m]|0}else{var g=f[m-3]^f[m-8]^f[m-14]^f[m-16];f[m]=g<<1|g>>>31}var y=(a<<5|a>>>27)+p+f[m];if(m<20){y+=(l&u|~l&d)+1518500249}else if(m<40){y+=(l^u^d)+1859775393}else if(m<60){y+=(l&u|l&d|u&d)-1894007588}else{y+=(l^u^d)-899497514}p=d;d=u;u=l<<30|l>>>2;l=a;a=y}s[0]=s[0]+a|0;s[1]=s[1]+l|0;s[2]=s[2]+u|0;s[3]=s[3]+d|0;s[4]=s[4]+p|0},_doFinalize:function(){var r=this._data;var n=r.words;var s=this._nDataBytes*8;var a=r.sigBytes*8;n[a>>>5]|=128<<24-a%32;n[(a+64>>>9<<4)+14]=Math.floor(s/4294967296);n[(a+64>>>9<<4)+15]=s;r.sigBytes=n.length*4;this._process();return this._hash},clone:function(){var r=l.clone.call(this);r._hash=this._hash.clone();return r}});n.SHA1=l._createHelper(d);n.HmacSHA1=l._createHmacHelper(d)})();return r.SHA1}))},8901:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(8340))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=n.algo;var u=l.SHA256;var f=l.SHA224=u.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var r=u._doFinalize.call(this);r.sigBytes-=4;return r}});n.SHA224=u._createHelper(f);n.HmacSHA224=u._createHmacHelper(f)})();return r.SHA224}))},8340:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(n){var s=r;var a=s.lib;var l=a.WordArray;var u=a.Hasher;var f=s.algo;var d=[];var p=[];(function(){function isPrime(r){var s=n.sqrt(r);for(var a=2;a<=s;a++){if(!(r%a)){return false}}return true}function getFractionalBits(r){return(r-(r|0))*4294967296|0}var r=2;var s=0;while(s<64){if(isPrime(r)){if(s<8){d[s]=getFractionalBits(n.pow(r,1/2))}p[s]=getFractionalBits(n.pow(r,1/3));s++}r++}})();var m=[];var g=f.SHA256=u.extend({_doReset:function(){this._hash=new l.init(d.slice(0))},_doProcessBlock:function(r,n){var s=this._hash.words;var a=s[0];var l=s[1];var u=s[2];var f=s[3];var d=s[4];var g=s[5];var y=s[6];var v=s[7];for(var b=0;b<64;b++){if(b<16){m[b]=r[n+b]|0}else{var w=m[b-15];var _=(w<<25|w>>>7)^(w<<14|w>>>18)^w>>>3;var S=m[b-2];var E=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;m[b]=_+m[b-7]+E+m[b-16]}var x=d&g^~d&y;var A=a&l^a&u^l&u;var k=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22);var C=(d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25);var O=v+C+x+p[b]+m[b];var T=k+A;v=y;y=g;g=d;d=f+O|0;f=u;u=l;l=a;a=O+T|0}s[0]=s[0]+a|0;s[1]=s[1]+l|0;s[2]=s[2]+u|0;s[3]=s[3]+f|0;s[4]=s[4]+d|0;s[5]=s[5]+g|0;s[6]=s[6]+y|0;s[7]=s[7]+v|0},_doFinalize:function(){var r=this._data;var s=r.words;var a=this._nDataBytes*8;var l=r.sigBytes*8;s[l>>>5]|=128<<24-l%32;s[(l+64>>>9<<4)+14]=n.floor(a/4294967296);s[(l+64>>>9<<4)+15]=a;r.sigBytes=s.length*4;this._process();return this._hash},clone:function(){var r=u.clone.call(this);r._hash=this._hash.clone();return r}});s.SHA256=u._createHelper(g);s.HmacSHA256=u._createHmacHelper(g)})(Math);return r.SHA256}))},3100:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(9201))}else{}})(this,(function(r){(function(n){var s=r;var a=s.lib;var l=a.WordArray;var u=a.Hasher;var f=s.x64;var d=f.Word;var p=s.algo;var m=[];var g=[];var y=[];(function(){var r=1,n=0;for(var s=0;s<24;s++){m[r+5*n]=(s+1)*(s+2)/2%64;var a=n%5;var l=(2*r+3*n)%5;r=a;n=l}for(var r=0;r<5;r++){for(var n=0;n<5;n++){g[r+5*n]=n+(2*r+3*n)%5*5}}var u=1;for(var f=0;f<24;f++){var p=0;var v=0;for(var b=0;b<7;b++){if(u&1){var w=(1<<b)-1;if(w<32){v^=1<<w}else{p^=1<<w-32}}if(u&128){u=u<<1^113}else{u<<=1}}y[f]=d.create(p,v)}})();var v=[];(function(){for(var r=0;r<25;r++){v[r]=d.create()}})();var b=p.SHA3=u.extend({cfg:u.cfg.extend({outputLength:512}),_doReset:function(){var r=this._state=[];for(var n=0;n<25;n++){r[n]=new d.init}this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,n){var s=this._state;var a=this.blockSize/2;for(var l=0;l<a;l++){var u=r[n+2*l];var f=r[n+2*l+1];u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360;f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360;var d=s[l];d.high^=f;d.low^=u}for(var p=0;p<24;p++){for(var b=0;b<5;b++){var w=0,_=0;for(var S=0;S<5;S++){var d=s[b+5*S];w^=d.high;_^=d.low}var E=v[b];E.high=w;E.low=_}for(var b=0;b<5;b++){var x=v[(b+4)%5];var A=v[(b+1)%5];var k=A.high;var C=A.low;var w=x.high^(k<<1|C>>>31);var _=x.low^(C<<1|k>>>31);for(var S=0;S<5;S++){var d=s[b+5*S];d.high^=w;d.low^=_}}for(var O=1;O<25;O++){var w;var _;var d=s[O];var T=d.high;var R=d.low;var I=m[O];if(I<32){w=T<<I|R>>>32-I;_=R<<I|T>>>32-I}else{w=R<<I-32|T>>>64-I;_=T<<I-32|R>>>64-I}var N=v[g[O]];N.high=w;N.low=_}var B=v[0];var D=s[0];B.high=D.high;B.low=D.low;for(var b=0;b<5;b++){for(var S=0;S<5;S++){var O=b+5*S;var d=s[O];var P=v[O];var L=v[(b+1)%5+5*S];var M=v[(b+2)%5+5*S];d.high=P.high^~L.high&M.high;d.low=P.low^~L.low&M.low}}var d=s[0];var $=y[p];d.high^=$.high;d.low^=$.low}},_doFinalize:function(){var r=this._data;var s=r.words;var a=this._nDataBytes*8;var u=r.sigBytes*8;var f=this.blockSize*32;s[u>>>5]|=1<<24-u%32;s[(n.ceil((u+1)/f)*f>>>5)-1]|=128;r.sigBytes=s.length*4;this._process();var d=this._state;var p=this.cfg.outputLength/8;var m=p/8;var g=[];for(var y=0;y<m;y++){var v=d[y];var b=v.high;var w=v.low;b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;g.push(w);g.push(b)}return new l.init(g,p)},clone:function(){var r=u.clone.call(this);var n=r._state=this._state.slice(0);for(var s=0;s<25;s++){n[s]=n[s].clone()}return r}});s.SHA3=u._createHelper(b);s.HmacSHA3=u._createHmacHelper(b)})(Math);return r.SHA3}))},8048:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(9201),s(9313))}else{}})(this,(function(r){(function(){var n=r;var s=n.x64;var a=s.Word;var l=s.WordArray;var u=n.algo;var f=u.SHA512;var d=u.SHA384=f.extend({_doReset:function(){this._hash=new l.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var r=f._doFinalize.call(this);r.sigBytes-=16;return r}});n.SHA384=f._createHelper(d);n.HmacSHA384=f._createHmacHelper(d)})();return r.SHA384}))},9313:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(9201))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.Hasher;var l=n.x64;var u=l.Word;var f=l.WordArray;var d=n.algo;function X64Word_create(){return u.create.apply(u,arguments)}var p=[X64Word_create(1116352408,3609767458),X64Word_create(1899447441,602891725),X64Word_create(3049323471,3964484399),X64Word_create(3921009573,2173295548),X64Word_create(961987163,4081628472),X64Word_create(1508970993,3053834265),X64Word_create(2453635748,2937671579),X64Word_create(2870763221,3664609560),X64Word_create(3624381080,2734883394),X64Word_create(310598401,1164996542),X64Word_create(607225278,1323610764),X64Word_create(1426881987,3590304994),X64Word_create(1925078388,4068182383),X64Word_create(2162078206,991336113),X64Word_create(2614888103,633803317),X64Word_create(3248222580,3479774868),X64Word_create(3835390401,2666613458),X64Word_create(4022224774,944711139),X64Word_create(264347078,2341262773),X64Word_create(604807628,2007800933),X64Word_create(770255983,1495990901),X64Word_create(1249150122,1856431235),X64Word_create(1555081692,3175218132),X64Word_create(1996064986,2198950837),X64Word_create(2554220882,3999719339),X64Word_create(2821834349,766784016),X64Word_create(2952996808,2566594879),X64Word_create(3210313671,3203337956),X64Word_create(3336571891,1034457026),X64Word_create(3584528711,2466948901),X64Word_create(113926993,3758326383),X64Word_create(338241895,168717936),X64Word_create(666307205,1188179964),X64Word_create(773529912,1546045734),X64Word_create(1294757372,1522805485),X64Word_create(1396182291,2643833823),X64Word_create(1695183700,2343527390),X64Word_create(1986661051,1014477480),X64Word_create(2177026350,1206759142),X64Word_create(2456956037,344077627),X64Word_create(2730485921,1290863460),X64Word_create(2820302411,3158454273),X64Word_create(3259730800,3505952657),X64Word_create(3345764771,106217008),X64Word_create(3516065817,3606008344),X64Word_create(3600352804,1432725776),X64Word_create(4094571909,1467031594),X64Word_create(275423344,851169720),X64Word_create(430227734,3100823752),X64Word_create(506948616,1363258195),X64Word_create(659060556,3750685593),X64Word_create(883997877,3785050280),X64Word_create(958139571,3318307427),X64Word_create(1322822218,3812723403),X64Word_create(1537002063,2003034995),X64Word_create(1747873779,3602036899),X64Word_create(1955562222,1575990012),X64Word_create(2024104815,1125592928),X64Word_create(2227730452,2716904306),X64Word_create(2361852424,442776044),X64Word_create(2428436474,593698344),X64Word_create(2756734187,3733110249),X64Word_create(3204031479,2999351573),X64Word_create(3329325298,3815920427),X64Word_create(3391569614,3928383900),X64Word_create(3515267271,566280711),X64Word_create(3940187606,3454069534),X64Word_create(4118630271,4000239992),X64Word_create(116418474,1914138554),X64Word_create(174292421,2731055270),X64Word_create(289380356,3203993006),X64Word_create(460393269,320620315),X64Word_create(685471733,587496836),X64Word_create(852142971,1086792851),X64Word_create(1017036298,365543100),X64Word_create(1126000580,2618297676),X64Word_create(1288033470,3409855158),X64Word_create(1501505948,4234509866),X64Word_create(1607167915,987167468),X64Word_create(1816402316,1246189591)];var m=[];(function(){for(var r=0;r<80;r++){m[r]=X64Word_create()}})();var g=d.SHA512=a.extend({_doReset:function(){this._hash=new f.init([new u.init(1779033703,4089235720),new u.init(3144134277,2227873595),new u.init(1013904242,4271175723),new u.init(2773480762,1595750129),new u.init(1359893119,2917565137),new u.init(2600822924,725511199),new u.init(528734635,4215389547),new u.init(1541459225,327033209)])},_doProcessBlock:function(r,n){var s=this._hash.words;var a=s[0];var l=s[1];var u=s[2];var f=s[3];var d=s[4];var g=s[5];var y=s[6];var v=s[7];var b=a.high;var w=a.low;var _=l.high;var S=l.low;var E=u.high;var x=u.low;var A=f.high;var k=f.low;var C=d.high;var O=d.low;var T=g.high;var R=g.low;var I=y.high;var N=y.low;var B=v.high;var D=v.low;var P=b;var L=w;var M=_;var $=S;var W=E;var H=x;var j=A;var U=k;var G=C;var z=O;var V=T;var Y=R;var K=I;var q=N;var X=B;var Q=D;for(var Z=0;Z<80;Z++){var J;var ee;var te=m[Z];if(Z<16){ee=te.high=r[n+Z*2]|0;J=te.low=r[n+Z*2+1]|0}else{var re=m[Z-15];var ne=re.high;var se=re.low;var ie=(ne>>>1|se<<31)^(ne>>>8|se<<24)^ne>>>7;var oe=(se>>>1|ne<<31)^(se>>>8|ne<<24)^(se>>>7|ne<<25);var ae=m[Z-2];var ce=ae.high;var le=ae.low;var ue=(ce>>>19|le<<13)^(ce<<3|le>>>29)^ce>>>6;var fe=(le>>>19|ce<<13)^(le<<3|ce>>>29)^(le>>>6|ce<<26);var de=m[Z-7];var pe=de.high;var he=de.low;var me=m[Z-16];var ge=me.high;var ye=me.low;J=oe+he;ee=ie+pe+(J>>>0<oe>>>0?1:0);J=J+fe;ee=ee+ue+(J>>>0<fe>>>0?1:0);J=J+ye;ee=ee+ge+(J>>>0<ye>>>0?1:0);te.high=ee;te.low=J}var ve=G&V^~G&K;var be=z&Y^~z&q;var we=P&M^P&W^M&W;var _e=L&$^L&H^$&H;var Se=(P>>>28|L<<4)^(P<<30|L>>>2)^(P<<25|L>>>7);var Ee=(L>>>28|P<<4)^(L<<30|P>>>2)^(L<<25|P>>>7);var xe=(G>>>14|z<<18)^(G>>>18|z<<14)^(G<<23|z>>>9);var Ae=(z>>>14|G<<18)^(z>>>18|G<<14)^(z<<23|G>>>9);var ke=p[Z];var Ce=ke.high;var Oe=ke.low;var Te=Q+Ae;var Re=X+xe+(Te>>>0<Q>>>0?1:0);var Te=Te+be;var Re=Re+ve+(Te>>>0<be>>>0?1:0);var Te=Te+Oe;var Re=Re+Ce+(Te>>>0<Oe>>>0?1:0);var Te=Te+J;var Re=Re+ee+(Te>>>0<J>>>0?1:0);var Ie=Ee+_e;var Ne=Se+we+(Ie>>>0<Ee>>>0?1:0);X=K;Q=q;K=V;q=Y;V=G;Y=z;z=U+Te|0;G=j+Re+(z>>>0<U>>>0?1:0)|0;j=W;U=H;W=M;H=$;M=P;$=L;L=Te+Ie|0;P=Re+Ne+(L>>>0<Te>>>0?1:0)|0}w=a.low=w+L;a.high=b+P+(w>>>0<L>>>0?1:0);S=l.low=S+$;l.high=_+M+(S>>>0<$>>>0?1:0);x=u.low=x+H;u.high=E+W+(x>>>0<H>>>0?1:0);k=f.low=k+U;f.high=A+j+(k>>>0<U>>>0?1:0);O=d.low=O+z;d.high=C+G+(O>>>0<z>>>0?1:0);R=g.low=R+Y;g.high=T+V+(R>>>0<Y>>>0?1:0);N=y.low=N+q;y.high=I+K+(N>>>0<q>>>0?1:0);D=v.low=D+Q;v.high=B+X+(D>>>0<Q>>>0?1:0)},_doFinalize:function(){var r=this._data;var n=r.words;var s=this._nDataBytes*8;var a=r.sigBytes*8;n[a>>>5]|=128<<24-a%32;n[(a+128>>>10<<5)+30]=Math.floor(s/4294967296);n[(a+128>>>10<<5)+31]=s;r.sigBytes=n.length*4;this._process();var l=this._hash.toX32();return l},clone:function(){var r=a.clone.call(this);r._hash=this._hash.clone();return r},blockSize:1024/32});n.SHA512=a._createHelper(g);n.HmacSHA512=a._createHmacHelper(g)})();return r.SHA512}))},4967:function(r,n,s){(function(a,l,u){if(true){r.exports=n=l(s(4028),s(5135),s(6219),s(7831),s(170))}else{}})(this,(function(r){(function(){var n=r;var s=n.lib;var a=s.WordArray;var l=s.BlockCipher;var u=n.algo;var f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4];var d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32];var p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];var m=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}];var g=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];var y=u.DES=l.extend({_doReset:function(){var r=this._key;var n=r.words;var s=[];for(var a=0;a<56;a++){var l=f[a]-1;s[a]=n[l>>>5]>>>31-l%32&1}var u=this._subKeys=[];for(var m=0;m<16;m++){var g=u[m]=[];var y=p[m];for(var a=0;a<24;a++){g[a/6|0]|=s[(d[a]-1+y)%28]<<31-a%6;g[4+(a/6|0)]|=s[28+(d[a+24]-1+y)%28]<<31-a%6}g[0]=g[0]<<1|g[0]>>>31;for(var a=1;a<7;a++){g[a]=g[a]>>>(a-1)*4+3}g[7]=g[7]<<5|g[7]>>>27}var v=this._invSubKeys=[];for(var a=0;a<16;a++){v[a]=u[15-a]}},encryptBlock:function(r,n){this._doCryptBlock(r,n,this._subKeys)},decryptBlock:function(r,n){this._doCryptBlock(r,n,this._invSubKeys)},_doCryptBlock:function(r,n,s){this._lBlock=r[n];this._rBlock=r[n+1];exchangeLR.call(this,4,252645135);exchangeLR.call(this,16,65535);exchangeRL.call(this,2,858993459);exchangeRL.call(this,8,16711935);exchangeLR.call(this,1,1431655765);for(var a=0;a<16;a++){var l=s[a];var u=this._lBlock;var f=this._rBlock;var d=0;for(var p=0;p<8;p++){d|=m[p][((f^l[p])&g[p])>>>0]}this._lBlock=f;this._rBlock=u^d}var y=this._lBlock;this._lBlock=this._rBlock;this._rBlock=y;exchangeLR.call(this,1,1431655765);exchangeRL.call(this,8,16711935);exchangeRL.call(this,2,858993459);exchangeLR.call(this,16,65535);exchangeLR.call(this,4,252645135);r[n]=this._lBlock;r[n+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function exchangeLR(r,n){var s=(this._lBlock>>>r^this._rBlock)&n;this._rBlock^=s;this._lBlock^=s<<r}function exchangeRL(r,n){var s=(this._rBlock>>>r^this._lBlock)&n;this._lBlock^=s;this._rBlock^=s<<r}n.DES=l._createHelper(y);var v=u.TripleDES=l.extend({_doReset:function(){var r=this._key;var n=r.words;if(n.length!==2&&n.length!==4&&n.length<6){throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.")}var s=n.slice(0,2);var l=n.length<4?n.slice(0,2):n.slice(2,4);var u=n.length<6?n.slice(0,2):n.slice(4,6);this._des1=y.createEncryptor(a.create(s));this._des2=y.createEncryptor(a.create(l));this._des3=y.createEncryptor(a.create(u))},encryptBlock:function(r,n){this._des1.encryptBlock(r,n);this._des2.decryptBlock(r,n);this._des3.encryptBlock(r,n)},decryptBlock:function(r,n){this._des3.decryptBlock(r,n);this._des2.encryptBlock(r,n);this._des1.decryptBlock(r,n)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=l._createHelper(v)})();return r.TripleDES}))},9201:function(r,n,s){(function(a,l){if(true){r.exports=n=l(s(4028))}else{}})(this,(function(r){(function(n){var s=r;var a=s.lib;var l=a.Base;var u=a.WordArray;var f=s.x64={};var d=f.Word=l.extend({init:function(r,n){this.high=r;this.low=n}});var p=f.WordArray=l.extend({init:function(r,s){r=this.words=r||[];if(s!=n){this.sigBytes=s}else{this.sigBytes=r.length*8}},toX32:function(){var r=this.words;var n=r.length;var s=[];for(var a=0;a<n;a++){var l=r[a];s.push(l.high);s.push(l.low)}return u.create(s,this.sigBytes)},clone:function(){var r=l.clone.call(this);var n=r.words=this.words.slice(0);var s=n.length;for(var a=0;a<s;a++){n[a]=n[a].clone()}return r}})})();return r}))},877:(r,n,s)=>{"use strict";
|
|
19
19
|
/*!
|
|
20
20
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
21
21
|
*
|
|
22
22
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
23
23
|
* Licensed under the MIT License.
|
|
24
|
-
*/const
|
|
24
|
+
*/const a=s(9023);const l=s(7551);const isObject=r=>r!==null&&typeof r==="object"&&!Array.isArray(r);const transform=r=>n=>r===true?Number(n):String(n);const isValidValue=r=>typeof r==="number"||typeof r==="string"&&r!=="";const isNumber=r=>Number.isInteger(+r);const zeros=r=>{let n=`${r}`;let s=-1;if(n[0]==="-")n=n.slice(1);if(n==="0")return false;while(n[++s]==="0");return s>0};const stringify=(r,n,s)=>{if(typeof r==="string"||typeof n==="string"){return true}return s.stringify===true};const pad=(r,n,s)=>{if(n>0){let s=r[0]==="-"?"-":"";if(s)r=r.slice(1);r=s+r.padStart(s?n-1:n,"0")}if(s===false){return String(r)}return r};const toMaxLen=(r,n)=>{let s=r[0]==="-"?"-":"";if(s){r=r.slice(1);n--}while(r.length<n)r="0"+r;return s?"-"+r:r};const toSequence=(r,n,s)=>{r.negatives.sort(((r,n)=>r<n?-1:r>n?1:0));r.positives.sort(((r,n)=>r<n?-1:r>n?1:0));let a=n.capture?"":"?:";let l="";let u="";let f;if(r.positives.length){l=r.positives.map((r=>toMaxLen(String(r),s))).join("|")}if(r.negatives.length){u=`-(${a}${r.negatives.map((r=>toMaxLen(String(r),s))).join("|")})`}if(l&&u){f=`${l}|${u}`}else{f=l||u}if(n.wrap){return`(${a}${f})`}return f};const toRange=(r,n,s,a)=>{if(s){return l(r,n,{wrap:false,...a})}let u=String.fromCharCode(r);if(r===n)return u;let f=String.fromCharCode(n);return`[${u}-${f}]`};const toRegex=(r,n,s)=>{if(Array.isArray(r)){let n=s.wrap===true;let a=s.capture?"":"?:";return n?`(${a}${r.join("|")})`:r.join("|")}return l(r,n,s)};const rangeError=(...r)=>new RangeError("Invalid range arguments: "+a.inspect(...r));const invalidRange=(r,n,s)=>{if(s.strictRanges===true)throw rangeError([r,n]);return[]};const invalidStep=(r,n)=>{if(n.strictRanges===true){throw new TypeError(`Expected step "${r}" to be a number`)}return[]};const fillNumbers=(r,n,s=1,a={})=>{let l=Number(r);let u=Number(n);if(!Number.isInteger(l)||!Number.isInteger(u)){if(a.strictRanges===true)throw rangeError([r,n]);return[]}if(l===0)l=0;if(u===0)u=0;let f=l>u;let d=String(r);let p=String(n);let m=String(s);s=Math.max(Math.abs(s),1);let g=zeros(d)||zeros(p)||zeros(m);let y=g?Math.max(d.length,p.length,m.length):0;let v=g===false&&stringify(r,n,a)===false;let b=a.transform||transform(v);if(a.toRegex&&s===1){return toRange(toMaxLen(r,y),toMaxLen(n,y),true,a)}let w={negatives:[],positives:[]};let push=r=>w[r<0?"negatives":"positives"].push(Math.abs(r));let _=[];let S=0;while(f?l>=u:l<=u){if(a.toRegex===true&&s>1){push(l)}else{_.push(pad(b(l,S),y,v))}l=f?l-s:l+s;S++}if(a.toRegex===true){return s>1?toSequence(w,a,y):toRegex(_,null,{wrap:false,...a})}return _};const fillLetters=(r,n,s=1,a={})=>{if(!isNumber(r)&&r.length>1||!isNumber(n)&&n.length>1){return invalidRange(r,n,a)}let l=a.transform||(r=>String.fromCharCode(r));let u=`${r}`.charCodeAt(0);let f=`${n}`.charCodeAt(0);let d=u>f;let p=Math.min(u,f);let m=Math.max(u,f);if(a.toRegex&&s===1){return toRange(p,m,false,a)}let g=[];let y=0;while(d?u>=f:u<=f){g.push(l(u,y));u=d?u-s:u+s;y++}if(a.toRegex===true){return toRegex(g,null,{wrap:false,options:a})}return g};const fill=(r,n,s,a={})=>{if(n==null&&isValidValue(r)){return[r]}if(!isValidValue(r)||!isValidValue(n)){return invalidRange(r,n,a)}if(typeof s==="function"){return fill(r,n,1,{transform:s})}if(isObject(s)){return fill(r,n,0,s)}let l={...a};if(l.capture===true)l.wrap=true;s=s||l.step||1;if(!isNumber(s)){if(s!=null&&!isObject(s))return invalidStep(s,l);return fill(r,n,1,s)}if(isNumber(r)&&isNumber(n)){return fillNumbers(r,n,s,l)}return fillLetters(r,n,Math.max(Math.abs(s),1),l)};r.exports=fill},4210:(r,n,s)=>{"use strict";if(process.platform!=="darwin"){throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`)}const a=s(2555);const l=a.constants;function watch(r,n,s){if(typeof r!=="string"){throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof r}`)}if("function"===typeof n&&"undefined"===typeof s){s=n;n=a.flags.SinceNow}if(typeof n!=="number"){throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof n}`)}if(typeof s!=="function"){throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof s}`)}let l=a.start(a.global,r,n,s);if(!l)throw new Error(`could not watch: ${r}`);return()=>{const r=l?Promise.resolve(l).then(a.stop):Promise.resolve(undefined);l=undefined;return r}}function getInfo(r,n){return{path:r,flags:n,event:getEventType(n),type:getFileType(n),changes:getFileChanges(n)}}function getFileType(r){if(l.ItemIsFile&r)return"file";if(l.ItemIsDir&r)return"directory";if(l.MustScanSubDirs&r)return"directory";if(l.ItemIsSymlink&r)return"symlink"}function anyIsTrue(r){for(let n in r){if(r[n])return true}return false}function getEventType(r){if(l.ItemRemoved&r)return"deleted";if(l.ItemRenamed&r)return"moved";if(l.ItemCreated&r)return"created";if(l.ItemModified&r)return"modified";if(l.RootChanged&r)return"root-changed";if(l.ItemCloned&r)return"cloned";if(anyIsTrue(r))return"modified";return"unknown"}function getFileChanges(r){return{inode:!!(l.ItemInodeMetaMod&r),finder:!!(l.ItemFinderInfoMod&r),access:!!(l.ItemChangeOwner&r),xattrs:!!(l.ItemXattrMod&r)}}n.watch=watch;n.getInfo=getInfo;n.constants=l},8505:(r,n,s)=>{"use strict";var a=s(1925);var l=s(6928).posix.dirname;var u=s(857).platform()==="win32";var f="/";var d=/\\/g;var p=/[\{\[].*[\}\]]$/;var m=/(^|[^\\])([\{\[]|\([^\)]+$)/;var g=/\\([\!\*\?\|\[\]\(\)\{\}])/g;r.exports=function globParent(r,n){var s=Object.assign({flipBackslashes:true},n);if(s.flipBackslashes&&u&&r.indexOf(f)<0){r=r.replace(d,f)}if(p.test(r)){r+=f}r+="a";do{r=l(r)}while(a(r)||m.test(r));return r.replace(g,"$1")}},3950:(r,n,s)=>{"use strict";const a=s(6928);const l=s(3242);const u=new Set(l);r.exports=r=>u.has(a.extname(r).slice(1).toLowerCase())},5540:r=>{
|
|
25
25
|
/*!
|
|
26
26
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
27
27
|
*
|
|
28
28
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
29
29
|
* Licensed under the MIT License.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
r.exports=function isExtglob(r){if(typeof r!=="string"||r===""){return false}var n;while(n=/(\\).|([@?!+*]\(.*\))/g.exec(r)){if(n[2])return true;r=r.slice(n.index+n[0].length)}return false}},1925:(r,n,s)=>{
|
|
32
32
|
/*!
|
|
33
33
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
34
34
|
*
|
|
35
35
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
36
36
|
* Released under the MIT License.
|
|
37
37
|
*/
|
|
38
|
-
var
|
|
38
|
+
var a=s(5540);var l={"{":"}","(":")","[":"]"};var strictCheck=function(r){if(r[0]==="!"){return true}var n=0;var s=-2;var a=-2;var u=-2;var f=-2;var d=-2;while(n<r.length){if(r[n]==="*"){return true}if(r[n+1]==="?"&&/[\].+)]/.test(r[n])){return true}if(a!==-1&&r[n]==="["&&r[n+1]!=="]"){if(a<n){a=r.indexOf("]",n)}if(a>n){if(d===-1||d>a){return true}d=r.indexOf("\\",n);if(d===-1||d>a){return true}}}if(u!==-1&&r[n]==="{"&&r[n+1]!=="}"){u=r.indexOf("}",n);if(u>n){d=r.indexOf("\\",n);if(d===-1||d>u){return true}}}if(f!==-1&&r[n]==="("&&r[n+1]==="?"&&/[:!=]/.test(r[n+2])&&r[n+3]!==")"){f=r.indexOf(")",n);if(f>n){d=r.indexOf("\\",n);if(d===-1||d>f){return true}}}if(s!==-1&&r[n]==="("&&r[n+1]!=="|"){if(s<n){s=r.indexOf("|",n)}if(s!==-1&&r[s+1]!==")"){f=r.indexOf(")",s);if(f>s){d=r.indexOf("\\",s);if(d===-1||d>f){return true}}}}if(r[n]==="\\"){var p=r[n+1];n+=2;var m=l[p];if(m){var g=r.indexOf(m,n);if(g!==-1){n=g+1}}if(r[n]==="!"){return true}}else{n++}}return false};var relaxedCheck=function(r){if(r[0]==="!"){return true}var n=0;while(n<r.length){if(/[*?{}()[\]]/.test(r[n])){return true}if(r[n]==="\\"){var s=r[n+1];n+=2;var a=l[s];if(a){var u=r.indexOf(a,n);if(u!==-1){n=u+1}}if(r[n]==="!"){return true}}else{n++}}return false};r.exports=function isGlob(r,n){if(typeof r!=="string"||r===""){return false}if(a(r)){return true}var s=strictCheck;if(n&&n.strict===false){s=relaxedCheck}return s(r)}},3102:r=>{"use strict";
|
|
39
39
|
/*!
|
|
40
40
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
41
41
|
*
|
|
42
42
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
43
43
|
* Released under the MIT License.
|
|
44
|
-
*/e.exports=function(e){if(typeof e==="number"){return e-e===0}if(typeof e==="string"&&e.trim()!==""){return Number.isFinite?Number.isFinite(+e):isFinite(+e)}return false}},2559:(e,t,r)=>{"use strict";const n=r(2037);const i=r(7147);const s=r(8768);const isWsl=()=>{if(process.platform!=="linux"){return false}if(n.release().toLowerCase().includes("microsoft")){if(s()){return false}return true}try{return i.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!s():false}catch(e){return false}};if(process.env.__IS_WSL_TEST__){e.exports=isWsl}else{e.exports=isWsl()}},7126:(e,t,r)=>{var n=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(2001)}else{i=r(9728)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,n){isexe(e,t||{},(function(e,t){if(e){n(e)}else{r(t)}}))}))}i(e,t||{},(function(e,n){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;n=false}}r(e,n)}))}function sync(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},9728:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var n=r(7147);function isexe(e,t,r){n.stat(e,(function(e,n){r(e,e?false:checkStat(n,t))}))}function sync(e,t){return checkStat(n.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var r=e.mode;var n=e.uid;var i=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var c=parseInt("010",8);var l=parseInt("001",8);var u=a|c;var f=r&l||r&c&&i===o||r&a&&n===s||r&u&&s===0;return f}},2001:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var n=r(7147);function checkPathExt(e,t){var r=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(e,t,r){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,r)}function isexe(e,t,r){n.stat(e,(function(n,i){r(n,n?false:checkStat(i,e,t))}))}function sync(e,t){return checkStat(n.statSync(e),e,t)}},1917:(e,t,r)=>{"use strict";var n=r(1161);var i=r(8866);function renamed(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=r(6073);e.exports.Schema=r(1082);e.exports.FAILSAFE_SCHEMA=r(8562);e.exports.JSON_SCHEMA=r(1035);e.exports.CORE_SCHEMA=r(2011);e.exports.DEFAULT_SCHEMA=r(8759);e.exports.load=n.load;e.exports.loadAll=n.loadAll;e.exports.dump=i.dump;e.exports.YAMLException=r(8179);e.exports.types={binary:r(7900),float:r(2705),map:r(6150),null:r(721),pairs:r(6860),set:r(9548),timestamp:r(9212),bool:r(4993),int:r(1615),merge:r(6104),omap:r(9046),seq:r(7283),str:r(3619)};e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},6829:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r<n;r+=1){i=s[r];e[i]=t[i]}}return e}function repeat(e,t){var r="",n;for(n=0;n<t;n+=1){r+=e}return r}function isNegativeZero(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}e.exports.isNothing=isNothing;e.exports.isObject=isObject;e.exports.toArray=toArray;e.exports.repeat=repeat;e.exports.isNegativeZero=isNegativeZero;e.exports.extend=extend},8866:(e,t,r)=>{"use strict";var n=r(6829);var i=r(8179);var s=r(8759);var o=Object.prototype.toString;var a=Object.prototype.hasOwnProperty;var c=65279;var l=9;var u=10;var f=13;var h=32;var d=33;var p=34;var m=35;var v=37;var _=38;var g=39;var y=42;var w=44;var b=45;var E=58;var S=61;var x=62;var A=63;var k=64;var C=91;var R=93;var O=96;var T=123;var I=124;var P=125;var N={};N[0]="\\0";N[7]="\\a";N[8]="\\b";N[9]="\\t";N[10]="\\n";N[11]="\\v";N[12]="\\f";N[13]="\\r";N[27]="\\e";N[34]='\\"';N[92]="\\\\";N[133]="\\N";N[160]="\\_";N[8232]="\\L";N[8233]="\\P";var L=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,t){var r,n,i,s,o,c,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i<s;i+=1){o=n[i];c=String(t[o]);if(o.slice(0,2)==="!!"){o="tag:yaml.org,2002:"+o.slice(2)}l=e.compiledTypeMap["fallback"][o];if(l&&a.call(l.styleAliases,c)){c=l.styleAliases[c]}r[o]=c}return r}function encodeHex(e){var t,r,s;t=e.toString(16).toUpperCase();if(e<=255){r="x";s=2}else if(e<=65535){r="u";s=4}else if(e<=4294967295){r="U";s=8}else{throw new i("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+n.repeat("0",s-t.length)+t}var H=1,D=2;function State(e){this.schema=e["schema"]||s;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=n.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=compileStyleMap(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.quotingType=e["quotingType"]==='"'?D:H;this.forceQuotes=e["forceQuotes"]||false;this.replacer=typeof e["replacer"]==="function"?e["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(e,t){var r=n.repeat(" ",t),i=0,s=-1,o="",a,c=e.length;while(i<c){s=e.indexOf("\n",i);if(s===-1){a=e.slice(i);i=c}else{a=e.slice(i,s+1);i=s+1}if(a.length&&a!=="\n")o+=r;o+=a}return o}function generateNextLine(e,t){return"\n"+n.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1){i=e.implicitTypes[r];if(i.resolve(t)){return true}}return false}function isWhitespace(e){return e===h||e===l}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==c||65536<=e&&e<=1114111}function isNsCharOrWhitespace(e){return isPrintable(e)&&e!==c&&e!==f&&e!==u}function isPlainSafe(e,t,r){var n=isNsCharOrWhitespace(e);var i=n&&!isWhitespace(e);return(r?n:n&&e!==w&&e!==C&&e!==R&&e!==T&&e!==P)&&e!==m&&!(t===E&&!i)||isNsCharOrWhitespace(t)&&!isWhitespace(t)&&e===m||t===E&&i}function isPlainSafeFirst(e){return isPrintable(e)&&e!==c&&!isWhitespace(e)&&e!==b&&e!==A&&e!==E&&e!==w&&e!==C&&e!==R&&e!==T&&e!==P&&e!==m&&e!==_&&e!==y&&e!==d&&e!==I&&e!==S&&e!==x&&e!==g&&e!==p&&e!==v&&e!==k&&e!==O}function isPlainSafeLast(e){return!isWhitespace(e)&&e!==E}function codePointAt(e,t){var r=e.charCodeAt(t),n;if(r>=55296&&r<=56319&&t+1<e.length){n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){return(r-55296)*1024+n-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var M=1,W=2,j=3,U=4,G=5;function chooseScalarStyle(e,t,r,n,i,s,o,a){var c;var l=0;var f=null;var h=false;var d=false;var p=n!==-1;var m=-1;var v=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||o){for(c=0;c<e.length;l>=65536?c+=2:c++){l=codePointAt(e,c);if(!isPrintable(l)){return G}v=v&&isPlainSafe(l,f,a);f=l}}else{for(c=0;c<e.length;l>=65536?c+=2:c++){l=codePointAt(e,c);if(l===u){h=true;if(p){d=d||c-m-1>n&&e[m+1]!==" ";m=c}}else if(!isPrintable(l)){return G}v=v&&isPlainSafe(l,f,a);f=l}d=d||p&&(c-m-1>n&&e[m+1]!==" ")}if(!h&&!d){if(v&&!o&&!i(e)){return M}return s===D?G:W}if(r>9&&needIndentIndicator(e)){return G}if(!o){return d?U:j}return s===D?G:W}function writeScalar(e,t,r,n,s){e.dump=function(){if(t.length===0){return e.quotingType===D?'""':"''"}if(!e.noCompatMode){if(L.indexOf(t)!==-1||B.test(t)){return e.quotingType===D?'"'+t+'"':"'"+t+"'"}}var o=e.indent*Math.max(1,r);var a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);var c=n||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,c,e.indent,a,testAmbiguity,e.quotingType,e.forceQuotes&&!n,s)){case M:return t;case W:return"'"+t.replace(/'/g,"''")+"'";case j:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case U:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,a),o));case G:return'"'+escapeString(t,a)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var n=e.indexOf("\n");n=n!==-1?n:e.length;r.lastIndex=n;return foldLine(e.slice(0,n),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var a=o[1],c=o[2];s=c[0]===" ";n+=a+(!i&&!s&&c!==""?"\n":"")+foldLine(c,t);i=s}return n}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,a=0;var c="";while(n=r.exec(e)){a=n.index;if(a-i>t){s=o>i?o:a;c+="\n"+e.slice(i,s);i=s+1}o=a}c+="\n";if(e.length-i>t&&o>i){c+=e.slice(i,o)+"\n"+e.slice(o+1)}else{c+=e.slice(i)}return c.slice(1)}function escapeString(e){var t="";var r=0;var n;for(var i=0;i<e.length;r>=65536?i+=2:i++){r=codePointAt(e,i);n=N[r];if(!n&&isPrintable(r)){t+=e[i];if(r>=65536)t+=e[i+1]}else{t+=n||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var n="",i=e.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1){a=r[s];if(e.replacer){a=e.replacer.call(r,String(s),a)}if(writeNode(e,t,a,false,false)||typeof a==="undefined"&&writeNode(e,t,null,false,false)){if(n!=="")n+=","+(!e.condenseFlow?" ":"");n+=e.dump}}e.tag=i;e.dump="["+n+"]"}function writeBlockSequence(e,t,r,n){var i="",s=e.tag,o,a,c;for(o=0,a=r.length;o<a;o+=1){c=r[o];if(e.replacer){c=e.replacer.call(r,String(o),c)}if(writeNode(e,t+1,c,true,true,false,true)||typeof c==="undefined"&&writeNode(e,t+1,null,true,true,false,true)){if(!n||i!==""){i+=generateNextLine(e,t)}if(e.dump&&u===e.dump.charCodeAt(0)){i+="-"}else{i+="- "}i+=e.dump}}e.tag=s;e.dump=i||"[]"}function writeFlowMapping(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,a,c,l,u;for(o=0,a=s.length;o<a;o+=1){u="";if(n!=="")u+=", ";if(e.condenseFlow)u+='"';c=s[o];l=r[c];if(e.replacer){l=e.replacer.call(r,c,l)}if(!writeNode(e,t,c,false,false)){continue}if(e.dump.length>1024)u+="? ";u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}u+=e.dump;n+=u}e.tag=i;e.dump="{"+n+"}"}function writeBlockMapping(e,t,r,n){var s="",o=e.tag,a=Object.keys(r),c,l,f,h,d,p;if(e.sortKeys===true){a.sort()}else if(typeof e.sortKeys==="function"){a.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(c=0,l=a.length;c<l;c+=1){p="";if(!n||s!==""){p+=generateNextLine(e,t)}f=a[c];h=r[f];if(e.replacer){h=e.replacer.call(r,f,h)}if(!writeNode(e,t+1,f,true,true,true)){continue}d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(d){if(e.dump&&u===e.dump.charCodeAt(0)){p+="?"}else{p+="? "}}p+=e.dump;if(d){p+=generateNextLine(e,t)}if(!writeNode(e,t+1,h,true,d)){continue}if(e.dump&&u===e.dump.charCodeAt(0)){p+=":"}else{p+=": "}p+=e.dump;s+=p}e.tag=o;e.dump=s||"{}"}function detectType(e,t,r){var n,s,c,l,u,f;s=r?e.explicitTypes:e.implicitTypes;for(c=0,l=s.length;c<l;c+=1){u=s[c];if((u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t==="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(r){if(u.multi&&u.representName){e.tag=u.representName(t)}else{e.tag=u.tag}}else{e.tag="?"}if(u.represent){f=e.styleMap[u.tag]||u.defaultStyle;if(o.call(u.represent)==="[object Function]"){n=u.represent(t,f)}else if(a.call(u.represent,f)){n=u.represent[f](t,f)}else{throw new i("!<"+u.tag+'> tag resolver accepts not "'+f+'" style')}e.dump=n}return true}}return false}function writeNode(e,t,r,n,s,a,c){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var l=o.call(e.dump);var u=n;var f;if(n){n=e.flowLevel<0||e.flowLevel>t}var h=l==="[object Object]"||l==="[object Array]",d,p;if(h){d=e.duplicates.indexOf(r);p=d!==-1}if(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0){s=false}if(p&&e.usedDuplicates[d]){e.dump="*ref_"+d}else{if(h&&p&&!e.usedDuplicates[d]){e.usedDuplicates[d]=true}if(l==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,s);if(p){e.dump="&ref_"+d+e.dump}}else{writeFlowMapping(e,t,e.dump);if(p){e.dump="&ref_"+d+" "+e.dump}}}else if(l==="[object Array]"){if(n&&e.dump.length!==0){if(e.noArrayIndent&&!c&&t>0){writeBlockSequence(e,t-1,e.dump,s)}else{writeBlockSequence(e,t,e.dump,s)}if(p){e.dump="&ref_"+d+e.dump}}else{writeFlowSequence(e,t,e.dump);if(p){e.dump="&ref_"+d+" "+e.dump}}}else if(l==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,a,u)}}else if(l==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+l)}if(e.tag!==null&&e.tag!=="?"){f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){f="!"+f}else if(f.slice(0,18)==="tag:yaml.org,2002:"){f="!!"+f.slice(18)}else{f="!<"+f+">"}e.dump=f+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],n=[],i,s;inspectNode(e,r,n);for(i=0,s=n.length;i<s;i+=1){t.duplicates.push(r[n[i]])}t.usedDuplicates=new Array(s)}function inspectNode(e,t,r){var n,i,s;if(e!==null&&typeof e==="object"){i=t.indexOf(e);if(i!==-1){if(r.indexOf(i)===-1){r.push(i)}}else{t.push(e);if(Array.isArray(e)){for(i=0,s=e.length;i<s;i+=1){inspectNode(e[i],t,r)}}else{n=Object.keys(e);for(i=0,s=n.length;i<s;i+=1){inspectNode(e[n[i]],t,r)}}}}}function dump(e,t){t=t||{};var r=new State(t);if(!r.noRefs)getDuplicateReferences(e,r);var n=e;if(r.replacer){n=r.replacer.call({"":n},"",n)}if(writeNode(r,0,n,true,true))return r.dump+"\n";return""}e.exports.dump=dump},8179:e=>{"use strict";function formatError(e,t){var r="",n=e.reason||"(unknown reason)";if(!e.mark)return n;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!t&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return n+" "+r}function YAMLException(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},1161:(e,t,r)=>{"use strict";var n=r(6829);var i=r(8179);var s=r(6975);var o=r(8759);var a=Object.prototype.hasOwnProperty;var c=1;var l=2;var u=3;var f=4;var h=1;var d=2;var p=3;var m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var v=/[\x85\u2028\u2029]/;var _=/[,\[\]\{\}]/;var g=/^(?:!|!!|![a-z\-]+!)$/i;var y=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var w=new Array(256);var b=new Array(256);for(var E=0;E<256;E++){w[E]=simpleEscapeSequence(E)?1:0;b[E]=simpleEscapeSequence(E)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||o;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=s(r);return new i(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var S={YAML:function handleYamlDirective(e,t,r){var n,i,s;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(n===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(n[1],10);s=parseInt(n[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=s<2;if(s!==1&&s!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var n,i;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}n=r[0];i=r[1];if(!g.test(n)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(a.call(e.tagMap,n)){throwError(e,'there is a previously declared suffix for "'+n+'" tag handle')}if(!y.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{i=decodeURIComponent(i)}catch(t){throwError(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function captureSegment(e,t,r,n){var i,s,o,a;if(t<r){a=e.input.slice(t,r);if(n){for(i=0,s=a.length;i<s;i+=1){o=a.charCodeAt(i);if(!(o===9||32<=o&&o<=1114111)){throwError(e,"expected valid JSON character")}}}else if(m.test(a)){throwError(e,"the stream contains non-printable characters")}e.result+=a}}function mergeMappings(e,t,r,i){var s,o,c,l;if(!n.isObject(r)){throwError(e,"cannot merge mappings; the provided source object is unacceptable")}s=Object.keys(r);for(c=0,l=s.length;c<l;c+=1){o=s[c];if(!a.call(t,o)){t[o]=r[o];i[o]=true}}}function storeMappingPair(e,t,r,n,i,s,o,c,l){var u,f;if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(u=0,f=i.length;u<f;u+=1){if(Array.isArray(i[u])){throwError(e,"nested arrays are not supported inside keys")}if(typeof i==="object"&&_class(i[u])==="[object Object]"){i[u]="[object Object]"}}}if(typeof i==="object"&&_class(i)==="[object Object]"){i="[object Object]"}i=String(i);if(t===null){t={}}if(n==="tag:yaml.org,2002:merge"){if(Array.isArray(s)){for(u=0,f=s.length;u<f;u+=1){mergeMappings(e,t,s[u],r)}}else{mergeMappings(e,t,s,r)}}else{if(!e.json&&!a.call(r,i)&&a.call(t,i)){e.line=o||e.line;e.lineStart=c||e.lineStart;e.position=l||e.position;throwError(e,"duplicated mapping key")}if(i==="__proto__"){Object.defineProperty(t,i,{configurable:true,enumerable:true,writable:true,value:s})}else{t[i]=s}delete r[i]}return t}function readLineBreak(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{throwError(e,"a line break is expected")}e.line+=1;e.lineStart=e.position;e.firstTabInLine=-1}function skipSeparationSpace(e,t,r){var n=0,i=e.input.charCodeAt(e.position);while(i!==0){while(is_WHITE_SPACE(i)){if(i===9&&e.firstTabInLine===-1){e.firstTabInLine=e.position}i=e.input.charCodeAt(++e.position)}if(t&&i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==10&&i!==13&&i!==0)}if(is_EOL(i)){readLineBreak(e);i=e.input.charCodeAt(e.position);n++;e.lineIndent=0;while(i===32){e.lineIndent++;i=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&n!==0&&e.lineIndent<r){throwWarning(e,"deficient indentation")}return n}function testDocumentSeparator(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||is_WS_OR_EOL(r)){return true}}return false}function writeFoldedLines(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=n.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var n,i,s,o,a,c,l,u,f=e.kind,h=e.result,d;d=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(d)||is_FLOW_INDICATOR(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96){return false}if(d===63||d===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;a=false;while(d!==0){if(d===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){break}}else if(d===35){n=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(n)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(d)){break}else if(is_EOL(d)){c=e.line;l=e.lineStart;u=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){a=true;d=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=c;e.lineStart=l;e.lineIndent=u;break}}if(a){captureSegment(e,s,o,false);writeFoldedLines(e,e.line-c);s=o=e.position;a=false}if(!is_WHITE_SPACE(d)){o=e.position+1}d=e.input.charCodeAt(++e.position)}captureSegment(e,s,o,false);if(e.result){return true}e.kind=f;e.result=h;return false}function readSingleQuotedScalar(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,n,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,n,i,s,o,a;a=e.input.charCodeAt(e.position);if(a!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((a=e.input.charCodeAt(e.position))!==0){if(a===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(a===92){captureSegment(e,r,e.position,true);a=e.input.charCodeAt(++e.position);if(is_EOL(a)){skipSeparationSpace(e,false,t)}else if(a<256&&w[a]){e.result+=b[a];e.position++}else if((o=escapedHexLen(a))>0){i=o;s=0;for(;i>0;i--){a=e.input.charCodeAt(++e.position);if((o=fromHexCode(a))>=0){s=(s<<4)+o}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(s);e.position++}else{throwError(e,"unknown escape sequence")}r=n=e.position}else if(is_EOL(a)){captureSegment(e,r,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,n,i,s,o=e.tag,a,l=e.anchor,u,f,h,d,p,m=Object.create(null),v,_,g,y;y=e.input.charCodeAt(e.position);if(y===91){f=93;p=false;a=[]}else if(y===123){f=125;p=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}y=e.input.charCodeAt(++e.position);while(y!==0){skipSeparationSpace(e,true,t);y=e.input.charCodeAt(e.position);if(y===f){e.position++;e.tag=o;e.anchor=l;e.kind=p?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(y===44){throwError(e,"expected the node content, but found ','")}_=v=g=null;h=d=false;if(y===63){u=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(u)){h=d=true;e.position++;skipSeparationSpace(e,true,t)}}n=e.line;i=e.lineStart;s=e.position;composeNode(e,t,c,false,true);_=e.tag;v=e.result;skipSeparationSpace(e,true,t);y=e.input.charCodeAt(e.position);if((d||e.line===n)&&y===58){h=true;y=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,c,false,true);g=e.result}if(p){storeMappingPair(e,a,m,_,v,g,n,i,s)}else if(h){a.push(storeMappingPair(e,null,m,_,v,g,n,i,s))}else{a.push(v)}skipSeparationSpace(e,true,t);y=e.input.charCodeAt(e.position);if(y===44){r=true;y=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,i,s=h,o=false,a=false,c=t,l=0,u=false,f,m;m=e.input.charCodeAt(e.position);if(m===124){i=false}else if(m===62){i=true}else{return false}e.kind="scalar";e.result="";while(m!==0){m=e.input.charCodeAt(++e.position);if(m===43||m===45){if(h===s){s=m===43?p:d}else{throwError(e,"repeat of a chomping mode identifier")}}else if((f=fromDecimalCode(m))>=0){if(f===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!a){c=t+f-1;a=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(m)){do{m=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(m));if(m===35){do{m=e.input.charCodeAt(++e.position)}while(!is_EOL(m)&&m!==0)}}while(m!==0){readLineBreak(e);e.lineIndent=0;m=e.input.charCodeAt(e.position);while((!a||e.lineIndent<c)&&m===32){e.lineIndent++;m=e.input.charCodeAt(++e.position)}if(!a&&e.lineIndent>c){c=e.lineIndent}if(is_EOL(m)){l++;continue}if(e.lineIndent<c){if(s===p){e.result+=n.repeat("\n",o?1+l:l)}else if(s===h){if(o){e.result+="\n"}}break}if(i){if(is_WHITE_SPACE(m)){u=true;e.result+=n.repeat("\n",o?1+l:l)}else if(u){u=false;e.result+=n.repeat("\n",l+1)}else if(l===0){if(o){e.result+=" "}}else{e.result+=n.repeat("\n",l)}}else{e.result+=n.repeat("\n",o?1+l:l)}o=true;a=true;l=0;r=e.position;while(!is_EOL(m)&&m!==0){m=e.input.charCodeAt(++e.position)}captureSegment(e,r,e.position,false)}return true}function readBlockSequence(e,t){var r,n=e.tag,i=e.anchor,s=[],o,a=false,c;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=s}c=e.input.charCodeAt(e.position);while(c!==0){if(e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}if(c!==45){break}o=e.input.charCodeAt(e.position+1);if(!is_WS_OR_EOL(o)){break}a=true;e.position++;if(skipSeparationSpace(e,true,-1)){if(e.lineIndent<=t){s.push(null);c=e.input.charCodeAt(e.position);continue}}r=e.line;composeNode(e,t,u,false,true);s.push(e.result);skipSeparationSpace(e,true,-1);c=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&c!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(a){e.tag=n;e.anchor=i;e.kind="sequence";e.result=s;return true}return false}function readBlockMapping(e,t,r){var n,i,s,o,a,c,u=e.tag,h=e.anchor,d={},p=Object.create(null),m=null,v=null,_=null,g=false,y=false,w;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=d}w=e.input.charCodeAt(e.position);while(w!==0){if(!g&&e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}n=e.input.charCodeAt(e.position+1);s=e.line;if((w===63||w===58)&&is_WS_OR_EOL(n)){if(w===63){if(g){storeMappingPair(e,d,p,m,v,null,o,a,c);m=v=_=null}y=true;g=true;i=true}else if(g){g=false;i=true}else{throwError(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;w=n}else{o=e.line;a=e.lineStart;c=e.position;if(!composeNode(e,r,l,false,true)){break}if(e.line===s){w=e.input.charCodeAt(e.position);while(is_WHITE_SPACE(w)){w=e.input.charCodeAt(++e.position)}if(w===58){w=e.input.charCodeAt(++e.position);if(!is_WS_OR_EOL(w)){throwError(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(g){storeMappingPair(e,d,p,m,v,null,o,a,c);m=v=_=null}y=true;g=false;i=false;m=e.tag;v=e.result}else if(y){throwError(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=u;e.anchor=h;return true}}else if(y){throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=u;e.anchor=h;return true}}if(e.line===s||e.lineIndent>t){if(g){o=e.line;a=e.lineStart;c=e.position}if(composeNode(e,t,f,true,i)){if(g){v=e.result}else{_=e.result}}if(!g){storeMappingPair(e,d,p,m,v,_,o,a,c);m=v=_=null}skipSeparationSpace(e,true,-1);w=e.input.charCodeAt(e.position)}if((e.line===s||e.lineIndent>t)&&w!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(g){storeMappingPair(e,d,p,m,v,null,o,a,c)}if(y){e.tag=u;e.anchor=h;e.kind="mapping";e.result=d}return y}function readTagProperty(e){var t,r=false,n=false,i,s,o;o=e.input.charCodeAt(e.position);if(o!==33)return false;if(e.tag!==null){throwError(e,"duplication of a tag property")}o=e.input.charCodeAt(++e.position);if(o===60){r=true;o=e.input.charCodeAt(++e.position)}else if(o===33){n=true;i="!!";o=e.input.charCodeAt(++e.position)}else{i="!"}t=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&o!==62);if(e.position<e.length){s=e.input.slice(t,e.position);o=e.input.charCodeAt(++e.position)}else{throwError(e,"unexpected end of the stream within a verbatim tag")}}else{while(o!==0&&!is_WS_OR_EOL(o)){if(o===33){if(!n){i=e.input.slice(t-1,e.position+1);if(!g.test(i)){throwError(e,"named tag handle cannot contain such characters")}n=true;t=e.position+1}else{throwError(e,"tag suffix cannot contain exclamation marks")}}o=e.input.charCodeAt(++e.position)}s=e.input.slice(t,e.position);if(_.test(s)){throwError(e,"tag suffix cannot contain flow indicator characters")}}if(s&&!y.test(s)){throwError(e,"tag name cannot contain such characters: "+s)}try{s=decodeURIComponent(s)}catch(t){throwError(e,"tag name is malformed: "+s)}if(r){e.tag=s}else if(a.call(e.tagMap,i)){e.tag=e.tagMap[i]+s}else if(i==="!"){e.tag="!"+s}else if(i==="!!"){e.tag="tag:yaml.org,2002:"+s}else{throwError(e,'undeclared tag handle "'+i+'"')}return true}function readAnchorProperty(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){throwError(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}function readAlias(e){var t,r,n;n=e.input.charCodeAt(e.position);if(n!==42)return false;n=e.input.charCodeAt(++e.position);t=e.position;while(n!==0&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n)){n=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!a.call(e.anchorMap,r)){throwError(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];skipSeparationSpace(e,true,-1);return true}function composeNode(e,t,r,n,i){var s,o,h,d=1,p=false,m=false,v,_,g,y,w,b;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;s=o=h=f===r||u===r;if(n){if(skipSeparationSpace(e,true,-1)){p=true;if(e.lineIndent>t){d=1}else if(e.lineIndent===t){d=0}else if(e.lineIndent<t){d=-1}}}if(d===1){while(readTagProperty(e)||readAnchorProperty(e)){if(skipSeparationSpace(e,true,-1)){p=true;h=s;if(e.lineIndent>t){d=1}else if(e.lineIndent===t){d=0}else if(e.lineIndent<t){d=-1}}else{h=false}}}if(h){h=p||i}if(d===1||f===r){if(c===r||l===r){w=t}else{w=t+1}b=e.position-e.lineStart;if(d===1){if(h&&(readBlockSequence(e,b)||readBlockMapping(e,b,w))||readFlowCollection(e,w)){m=true}else{if(o&&readBlockScalar(e,w)||readSingleQuotedScalar(e,w)||readDoubleQuotedScalar(e,w)){m=true}else if(readAlias(e)){m=true;if(e.tag!==null||e.anchor!==null){throwError(e,"alias node should not have any properties")}}else if(readPlainScalar(e,w,c===r)){m=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(d===0){m=h&&readBlockSequence(e,b)}}if(e.tag===null){if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}else if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){throwError(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(v=0,_=e.implicitTypes.length;v<_;v+=1){y=e.implicitTypes[v];if(y.resolve(e.result)){e.result=y.construct(e.result);e.tag=y.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(e.tag!=="!"){if(a.call(e.typeMap[e.kind||"fallback"],e.tag)){y=e.typeMap[e.kind||"fallback"][e.tag]}else{y=null;g=e.typeMap.multi[e.kind||"fallback"];for(v=0,_=g.length;v<_;v+=1){if(e.tag.slice(0,g[v].tag.length)===g[v].tag){y=g[v];break}}}if(!y){throwError(e,"unknown tag !<"+e.tag+">")}if(e.result!==null&&y.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"')}if(!y.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=y.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||m}function readDocument(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((o=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){throwError(e,"directive name must not be less than one character in length")}while(o!==0){while(is_WHITE_SPACE(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!is_EOL(o));break}if(is_EOL(o))break;r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)readLineBreak(e);if(a.call(S,n)){S[n](e,n,i)}else{throwWarning(e,'unknown document directive "'+n+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(s){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,f,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&v.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position<e.length-1){throwError(e,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new State(e,t);var n=e.indexOf("\0");if(n!==-1){r.position=n;throwError(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){readDocument(r)}return r.documents}function loadAll(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var n=loadDocuments(e,r);if(typeof t!=="function"){return n}for(var i=0,s=n.length;i<s;i+=1){t(n[i])}}function load(e,t){var r=loadDocuments(e,t);if(r.length===0){return undefined}else if(r.length===1){return r[0]}throw new i("expected a single document in the stream, but found more")}e.exports.loadAll=loadAll;e.exports.load=load},1082:(e,t,r)=>{"use strict";var n=r(8179);var i=r(6073);function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=n}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(collectType)}return e}function Schema(e){return this.extend(e)}Schema.prototype.extend=function extend(e){var t=[];var r=[];if(e instanceof i){r.push(e)}else if(Array.isArray(e)){r=r.concat(e)}else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit))){if(e.implicit)t=t.concat(e.implicit);if(e.explicit)r=r.concat(e.explicit)}else{throw new n("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}t.forEach((function(e){if(!(e instanceof i)){throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(e.loadKind&&e.loadKind!=="scalar"){throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(e.multi){throw new n("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));r.forEach((function(e){if(!(e instanceof i)){throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var s=Object.create(Schema.prototype);s.implicit=(this.implicit||[]).concat(t);s.explicit=(this.explicit||[]).concat(r);s.compiledImplicit=compileList(s,"implicit");s.compiledExplicit=compileList(s,"explicit");s.compiledTypeMap=compileMap(s.compiledImplicit,s.compiledExplicit);return s};e.exports=Schema},2011:(e,t,r)=>{"use strict";e.exports=r(1035)},8759:(e,t,r)=>{"use strict";e.exports=r(2011).extend({implicit:[r(9212),r(6104)],explicit:[r(7900),r(9046),r(6860),r(9548)]})},8562:(e,t,r)=>{"use strict";var n=r(1082);e.exports=new n({explicit:[r(3619),r(7283),r(6150)]})},1035:(e,t,r)=>{"use strict";e.exports=r(8562).extend({implicit:[r(721),r(4993),r(1615),r(2705)]})},6975:(e,t,r)=>{"use strict";var n=r(6829);function getLine(e,t,r,n,i){var s="";var o="";var a=Math.floor(i/2)-1;if(n-t>a){s=" ... ";t=n-a+s.length}if(r-n>a){o=" ...";r=n+a-o.length}return{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+s.length}}function padStart(e,t){return n.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var i=[0];var s=[];var o;var a=-1;while(o=r.exec(e.buffer)){s.push(o.index);i.push(o.index+o[0].length);if(e.position<=o.index&&a<0){a=i.length-2}}if(a<0)a=i.length-1;var c="",l,u;var f=Math.min(e.line+t.linesAfter,s.length).toString().length;var h=t.maxLength-(t.indent+f+3);for(l=1;l<=t.linesBefore;l++){if(a-l<0)break;u=getLine(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),h);c=n.repeat(" ",t.indent)+padStart((e.line-l+1).toString(),f)+" | "+u.str+"\n"+c}u=getLine(e.buffer,i[a],s[a],e.position,h);c+=n.repeat(" ",t.indent)+padStart((e.line+1).toString(),f)+" | "+u.str+"\n";c+=n.repeat("-",t.indent+f+3+u.pos)+"^"+"\n";for(l=1;l<=t.linesAfter;l++){if(a+l>=s.length)break;u=getLine(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),h);c+=n.repeat(" ",t.indent)+padStart((e.line+l+1).toString(),f)+" | "+u.str+"\n"}return c.replace(/\n$/,"")}e.exports=makeSnippet},6073:(e,t,r)=>{"use strict";var n=r(8179);var i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var s=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type(e,t){t=t||{};Object.keys(t).forEach((function(t){if(i.indexOf(t)===-1){throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(s.indexOf(this.kind)===-1){throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},7900:(e,t,r)=>{"use strict";var n=r(6073);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,n=0,s=e.length,o=i;for(r=0;r<s;r++){t=o.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;n+=6}return n%8===0}function constructYamlBinary(e){var t,r,n=e.replace(/[\r\n=]/g,""),s=n.length,o=i,a=0,c=[];for(t=0;t<s;t++){if(t%4===0&&t){c.push(a>>16&255);c.push(a>>8&255);c.push(a&255)}a=a<<6|o.indexOf(n.charAt(t))}r=s%4*6;if(r===0){c.push(a>>16&255);c.push(a>>8&255);c.push(a&255)}else if(r===18){c.push(a>>10&255);c.push(a>>2&255)}else if(r===12){c.push(a>>4&255)}return new Uint8Array(c)}function representYamlBinary(e){var t="",r=0,n,s,o=e.length,a=i;for(n=0;n<o;n++){if(n%3===0&&n){t+=a[r>>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}r=(r<<8)+e[n]}s=o%3;if(s===0){t+=a[r>>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}else if(s===2){t+=a[r>>10&63];t+=a[r>>4&63];t+=a[r<<2&63];t+=a[64]}else if(s===1){t+=a[r>>2&63];t+=a[r<<4&63];t+=a[64];t+=a[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4993:(e,t,r)=>{"use strict";var n=r(6073);function resolveYamlBoolean(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},2705:(e,t,r)=>{"use strict";var n=r(6829);var i=r(6073);var s=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!s.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var o=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(n.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return o.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||n.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},1615:(e,t,r)=>{"use strict";var n=r(6829);var i=r(6073);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(i!=="0"&&i!=="1")return false;n=true}return n&&i!=="_"}if(i==="x"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!isHexCode(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}if(i==="o"){r++;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!isOctCode(e.charCodeAt(r)))return false;n=true}return n&&i!=="_"}}if(i==="_")return false;for(;r<t;r++){i=e[r];if(i==="_")continue;if(!isDecCode(e.charCodeAt(r))){return false}n=true}if(!n||i==="_")return false;return true}function constructYamlInteger(e){var t=e,r=1,n;if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}n=t[0];if(n==="-"||n==="+"){if(n==="-")r=-1;t=t.slice(1);n=t[0]}if(t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function isInteger(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!n.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},6150:(e,t,r)=>{"use strict";var n=r(6073);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},6104:(e,t,r)=>{"use strict";var n=r(6073);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},721:(e,t,r)=>{"use strict";var n=r(6073);function resolveYamlNull(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},9046:(e,t,r)=>{"use strict";var n=r(6073);var i=Object.prototype.hasOwnProperty;var s=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,n,o,a,c,l=e;for(r=0,n=l.length;r<n;r+=1){o=l[r];c=false;if(s.call(o)!=="[object Object]")return false;for(a in o){if(i.call(o,a)){if(!c)c=true;else return false}}if(!c)return false;if(t.indexOf(a)===-1)t.push(a);else return false}return true}function constructYamlOmap(e){return e!==null?e:[]}e.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},6860:(e,t,r)=>{"use strict";var n=r(6073);var i=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,n,s,o,a=e;o=new Array(a.length);for(t=0,r=a.length;t<r;t+=1){n=a[t];if(i.call(n)!=="[object Object]")return false;s=Object.keys(n);if(s.length!==1)return false;o[t]=[s[0],n[s[0]]]}return true}function constructYamlPairs(e){if(e===null)return[];var t,r,n,i,s,o=e;s=new Array(o.length);for(t=0,r=o.length;t<r;t+=1){n=o[t];i=Object.keys(n);s[t]=[i[0],n[i[0]]]}return s}e.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},7283:(e,t,r)=>{"use strict";var n=r(6073);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},9548:(e,t,r)=>{"use strict";var n=r(6073);var i=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(i.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3619:(e,t,r)=>{"use strict";var n=r(6073);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},9212:(e,t,r)=>{"use strict";var n=r(6073);var i=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var s=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(i.exec(e)!==null)return true;if(s.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,n,o,a,c,l,u=0,f=null,h,d,p;t=i.exec(e);if(t===null)t=s.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;o=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,o))}a=+t[4];c=+t[5];l=+t[6];if(t[7]){u=t[7].slice(0,3);while(u.length<3){u+="0"}u=+u}if(t[9]){h=+t[10];d=+(t[11]||0);f=(h*60+d)*6e4;if(t[9]==="-")f=-f}p=new Date(Date.UTC(r,n,o,a,c,l,u));if(f)p.setTime(p.getTime()-f);return p}function representYamlTimestamp(e){return e.toISOString()}e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},2621:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2781);e.exports=function(){var e=[];var t=new n({objectMode:true});t.setMaxListeners(0);t.add=add;t.isEmpty=isEmpty;t.on("unpipe",remove);Array.prototype.slice.call(arguments).forEach(add);return t;function add(r){if(Array.isArray(r)){r.forEach(add);return this}e.push(r);r.once("end",remove.bind(null,r));r.once("error",t.emit.bind(t,"error"));r.pipe(t,{end:false});return this}function isEmpty(){return e.length==0}function remove(r){e=e.filter((function(e){return e!==r}));if(!e.length&&t.readable){t.end()}}}},5388:e=>{
|
|
44
|
+
*/r.exports=function(r){if(typeof r==="number"){return r-r===0}if(typeof r==="string"&&r.trim()!==""){return Number.isFinite?Number.isFinite(+r):isFinite(+r)}return false}},2940:(r,n,s)=>{var a=s(9896);var l;if(process.platform==="win32"||global.TESTING_WINDOWS){l=s(9225)}else{l=s(1025)}r.exports=isexe;isexe.sync=sync;function isexe(r,n,s){if(typeof n==="function"){s=n;n={}}if(!s){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(s,a){isexe(r,n||{},(function(r,n){if(r){a(r)}else{s(n)}}))}))}l(r,n||{},(function(r,a){if(r){if(r.code==="EACCES"||n&&n.ignoreErrors){r=null;a=false}}s(r,a)}))}function sync(r,n){try{return l.sync(r,n||{})}catch(r){if(n&&n.ignoreErrors||r.code==="EACCES"){return false}else{throw r}}}},1025:(r,n,s)=>{r.exports=isexe;isexe.sync=sync;var a=s(9896);function isexe(r,n,s){a.stat(r,(function(r,a){s(r,r?false:checkStat(a,n))}))}function sync(r,n){return checkStat(a.statSync(r),n)}function checkStat(r,n){return r.isFile()&&checkMode(r,n)}function checkMode(r,n){var s=r.mode;var a=r.uid;var l=r.gid;var u=n.uid!==undefined?n.uid:process.getuid&&process.getuid();var f=n.gid!==undefined?n.gid:process.getgid&&process.getgid();var d=parseInt("100",8);var p=parseInt("010",8);var m=parseInt("001",8);var g=d|p;var y=s&m||s&p&&l===f||s&d&&a===u||s&g&&u===0;return y}},9225:(r,n,s)=>{r.exports=isexe;isexe.sync=sync;var a=s(9896);function checkPathExt(r,n){var s=n.pathExt!==undefined?n.pathExt:process.env.PATHEXT;if(!s){return true}s=s.split(";");if(s.indexOf("")!==-1){return true}for(var a=0;a<s.length;a++){var l=s[a].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l){return true}}return false}function checkStat(r,n,s){if(!r.isSymbolicLink()&&!r.isFile()){return false}return checkPathExt(n,s)}function isexe(r,n,s){a.stat(r,(function(a,l){s(a,a?false:checkStat(l,r,n))}))}function sync(r,n){return checkStat(a.statSync(r),r,n)}},4281:(r,n,s)=>{"use strict";var a=s(1950);var l=s(9980);function renamed(r,n){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. "+"Use yaml."+n+" instead, which is now safe by default.")}}r.exports.Type=s(9557);r.exports.Schema=s(2046);r.exports.FAILSAFE_SCHEMA=s(9832);r.exports.JSON_SCHEMA=s(8927);r.exports.CORE_SCHEMA=s(5746);r.exports.DEFAULT_SCHEMA=s(7336);r.exports.load=a.load;r.exports.loadAll=a.loadAll;r.exports.dump=l.dump;r.exports.YAMLException=s(1248);r.exports.types={binary:s(8149),float:s(7584),map:s(7316),null:s(4333),pairs:s(6267),set:s(8758),timestamp:s(8966),bool:s(7296),int:s(2271),merge:s(6854),omap:s(8649),seq:s(7161),str:s(3929)};r.exports.safeLoad=renamed("safeLoad","load");r.exports.safeLoadAll=renamed("safeLoadAll","loadAll");r.exports.safeDump=renamed("safeDump","dump")},9816:r=>{"use strict";function isNothing(r){return typeof r==="undefined"||r===null}function isObject(r){return typeof r==="object"&&r!==null}function toArray(r){if(Array.isArray(r))return r;else if(isNothing(r))return[];return[r]}function extend(r,n){var s,a,l,u;if(n){u=Object.keys(n);for(s=0,a=u.length;s<a;s+=1){l=u[s];r[l]=n[l]}}return r}function repeat(r,n){var s="",a;for(a=0;a<n;a+=1){s+=r}return s}function isNegativeZero(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}r.exports.isNothing=isNothing;r.exports.isObject=isObject;r.exports.toArray=toArray;r.exports.repeat=repeat;r.exports.isNegativeZero=isNegativeZero;r.exports.extend=extend},9980:(r,n,s)=>{"use strict";var a=s(9816);var l=s(1248);var u=s(7336);var f=Object.prototype.toString;var d=Object.prototype.hasOwnProperty;var p=65279;var m=9;var g=10;var y=13;var v=32;var b=33;var w=34;var _=35;var S=37;var E=38;var x=39;var A=42;var k=44;var C=45;var O=58;var T=61;var R=62;var I=63;var N=64;var B=91;var D=93;var P=96;var L=123;var M=124;var $=125;var W={};W[0]="\\0";W[7]="\\a";W[8]="\\b";W[9]="\\t";W[10]="\\n";W[11]="\\v";W[12]="\\f";W[13]="\\r";W[27]="\\e";W[34]='\\"';W[92]="\\\\";W[133]="\\N";W[160]="\\_";W[8232]="\\L";W[8233]="\\P";var H=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var j=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(r,n){var s,a,l,u,f,p,m;if(n===null)return{};s={};a=Object.keys(n);for(l=0,u=a.length;l<u;l+=1){f=a[l];p=String(n[f]);if(f.slice(0,2)==="!!"){f="tag:yaml.org,2002:"+f.slice(2)}m=r.compiledTypeMap["fallback"][f];if(m&&d.call(m.styleAliases,p)){p=m.styleAliases[p]}s[f]=p}return s}function encodeHex(r){var n,s,u;n=r.toString(16).toUpperCase();if(r<=255){s="x";u=2}else if(r<=65535){s="u";u=4}else if(r<=4294967295){s="U";u=8}else{throw new l("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+s+a.repeat("0",u-n.length)+n}var U=1,G=2;function State(r){this.schema=r["schema"]||u;this.indent=Math.max(1,r["indent"]||2);this.noArrayIndent=r["noArrayIndent"]||false;this.skipInvalid=r["skipInvalid"]||false;this.flowLevel=a.isNothing(r["flowLevel"])?-1:r["flowLevel"];this.styleMap=compileStyleMap(this.schema,r["styles"]||null);this.sortKeys=r["sortKeys"]||false;this.lineWidth=r["lineWidth"]||80;this.noRefs=r["noRefs"]||false;this.noCompatMode=r["noCompatMode"]||false;this.condenseFlow=r["condenseFlow"]||false;this.quotingType=r["quotingType"]==='"'?G:U;this.forceQuotes=r["forceQuotes"]||false;this.replacer=typeof r["replacer"]==="function"?r["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(r,n){var s=a.repeat(" ",n),l=0,u=-1,f="",d,p=r.length;while(l<p){u=r.indexOf("\n",l);if(u===-1){d=r.slice(l);l=p}else{d=r.slice(l,u+1);l=u+1}if(d.length&&d!=="\n")f+=s;f+=d}return f}function generateNextLine(r,n){return"\n"+a.repeat(" ",r.indent*n)}function testImplicitResolving(r,n){var s,a,l;for(s=0,a=r.implicitTypes.length;s<a;s+=1){l=r.implicitTypes[s];if(l.resolve(n)){return true}}return false}function isWhitespace(r){return r===v||r===m}function isPrintable(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==p||65536<=r&&r<=1114111}function isNsCharOrWhitespace(r){return isPrintable(r)&&r!==p&&r!==y&&r!==g}function isPlainSafe(r,n,s){var a=isNsCharOrWhitespace(r);var l=a&&!isWhitespace(r);return(s?a:a&&r!==k&&r!==B&&r!==D&&r!==L&&r!==$)&&r!==_&&!(n===O&&!l)||isNsCharOrWhitespace(n)&&!isWhitespace(n)&&r===_||n===O&&l}function isPlainSafeFirst(r){return isPrintable(r)&&r!==p&&!isWhitespace(r)&&r!==C&&r!==I&&r!==O&&r!==k&&r!==B&&r!==D&&r!==L&&r!==$&&r!==_&&r!==E&&r!==A&&r!==b&&r!==M&&r!==T&&r!==R&&r!==x&&r!==w&&r!==S&&r!==N&&r!==P}function isPlainSafeLast(r){return!isWhitespace(r)&&r!==O}function codePointAt(r,n){var s=r.charCodeAt(n),a;if(s>=55296&&s<=56319&&n+1<r.length){a=r.charCodeAt(n+1);if(a>=56320&&a<=57343){return(s-55296)*1024+a-56320+65536}}return s}function needIndentIndicator(r){var n=/^\n* /;return n.test(r)}var z=1,V=2,Y=3,K=4,q=5;function chooseScalarStyle(r,n,s,a,l,u,f,d){var p;var m=0;var y=null;var v=false;var b=false;var w=a!==-1;var _=-1;var S=isPlainSafeFirst(codePointAt(r,0))&&isPlainSafeLast(codePointAt(r,r.length-1));if(n||f){for(p=0;p<r.length;m>=65536?p+=2:p++){m=codePointAt(r,p);if(!isPrintable(m)){return q}S=S&&isPlainSafe(m,y,d);y=m}}else{for(p=0;p<r.length;m>=65536?p+=2:p++){m=codePointAt(r,p);if(m===g){v=true;if(w){b=b||p-_-1>a&&r[_+1]!==" ";_=p}}else if(!isPrintable(m)){return q}S=S&&isPlainSafe(m,y,d);y=m}b=b||w&&(p-_-1>a&&r[_+1]!==" ")}if(!v&&!b){if(S&&!f&&!l(r)){return z}return u===G?q:V}if(s>9&&needIndentIndicator(r)){return q}if(!f){return b?K:Y}return u===G?q:V}function writeScalar(r,n,s,a,u){r.dump=function(){if(n.length===0){return r.quotingType===G?'""':"''"}if(!r.noCompatMode){if(H.indexOf(n)!==-1||j.test(n)){return r.quotingType===G?'"'+n+'"':"'"+n+"'"}}var f=r.indent*Math.max(1,s);var d=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-f);var p=a||r.flowLevel>-1&&s>=r.flowLevel;function testAmbiguity(n){return testImplicitResolving(r,n)}switch(chooseScalarStyle(n,p,r.indent,d,testAmbiguity,r.quotingType,r.forceQuotes&&!a,u)){case z:return n;case V:return"'"+n.replace(/'/g,"''")+"'";case Y:return"|"+blockHeader(n,r.indent)+dropEndingNewline(indentString(n,f));case K:return">"+blockHeader(n,r.indent)+dropEndingNewline(indentString(foldString(n,d),f));case q:return'"'+escapeString(n,d)+'"';default:throw new l("impossible error: invalid scalar style")}}()}function blockHeader(r,n){var s=needIndentIndicator(r)?String(n):"";var a=r[r.length-1]==="\n";var l=a&&(r[r.length-2]==="\n"||r==="\n");var u=l?"+":a?"":"-";return s+u+"\n"}function dropEndingNewline(r){return r[r.length-1]==="\n"?r.slice(0,-1):r}function foldString(r,n){var s=/(\n+)([^\n]*)/g;var a=function(){var a=r.indexOf("\n");a=a!==-1?a:r.length;s.lastIndex=a;return foldLine(r.slice(0,a),n)}();var l=r[0]==="\n"||r[0]===" ";var u;var f;while(f=s.exec(r)){var d=f[1],p=f[2];u=p[0]===" ";a+=d+(!l&&!u&&p!==""?"\n":"")+foldLine(p,n);l=u}return a}function foldLine(r,n){if(r===""||r[0]===" ")return r;var s=/ [^ ]/g;var a;var l=0,u,f=0,d=0;var p="";while(a=s.exec(r)){d=a.index;if(d-l>n){u=f>l?f:d;p+="\n"+r.slice(l,u);l=u+1}f=d}p+="\n";if(r.length-l>n&&f>l){p+=r.slice(l,f)+"\n"+r.slice(f+1)}else{p+=r.slice(l)}return p.slice(1)}function escapeString(r){var n="";var s=0;var a;for(var l=0;l<r.length;s>=65536?l+=2:l++){s=codePointAt(r,l);a=W[s];if(!a&&isPrintable(s)){n+=r[l];if(s>=65536)n+=r[l+1]}else{n+=a||encodeHex(s)}}return n}function writeFlowSequence(r,n,s){var a="",l=r.tag,u,f,d;for(u=0,f=s.length;u<f;u+=1){d=s[u];if(r.replacer){d=r.replacer.call(s,String(u),d)}if(writeNode(r,n,d,false,false)||typeof d==="undefined"&&writeNode(r,n,null,false,false)){if(a!=="")a+=","+(!r.condenseFlow?" ":"");a+=r.dump}}r.tag=l;r.dump="["+a+"]"}function writeBlockSequence(r,n,s,a){var l="",u=r.tag,f,d,p;for(f=0,d=s.length;f<d;f+=1){p=s[f];if(r.replacer){p=r.replacer.call(s,String(f),p)}if(writeNode(r,n+1,p,true,true,false,true)||typeof p==="undefined"&&writeNode(r,n+1,null,true,true,false,true)){if(!a||l!==""){l+=generateNextLine(r,n)}if(r.dump&&g===r.dump.charCodeAt(0)){l+="-"}else{l+="- "}l+=r.dump}}r.tag=u;r.dump=l||"[]"}function writeFlowMapping(r,n,s){var a="",l=r.tag,u=Object.keys(s),f,d,p,m,g;for(f=0,d=u.length;f<d;f+=1){g="";if(a!=="")g+=", ";if(r.condenseFlow)g+='"';p=u[f];m=s[p];if(r.replacer){m=r.replacer.call(s,p,m)}if(!writeNode(r,n,p,false,false)){continue}if(r.dump.length>1024)g+="? ";g+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" ");if(!writeNode(r,n,m,false,false)){continue}g+=r.dump;a+=g}r.tag=l;r.dump="{"+a+"}"}function writeBlockMapping(r,n,s,a){var u="",f=r.tag,d=Object.keys(s),p,m,y,v,b,w;if(r.sortKeys===true){d.sort()}else if(typeof r.sortKeys==="function"){d.sort(r.sortKeys)}else if(r.sortKeys){throw new l("sortKeys must be a boolean or a function")}for(p=0,m=d.length;p<m;p+=1){w="";if(!a||u!==""){w+=generateNextLine(r,n)}y=d[p];v=s[y];if(r.replacer){v=r.replacer.call(s,y,v)}if(!writeNode(r,n+1,y,true,true,true)){continue}b=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024;if(b){if(r.dump&&g===r.dump.charCodeAt(0)){w+="?"}else{w+="? "}}w+=r.dump;if(b){w+=generateNextLine(r,n)}if(!writeNode(r,n+1,v,true,b)){continue}if(r.dump&&g===r.dump.charCodeAt(0)){w+=":"}else{w+=": "}w+=r.dump;u+=w}r.tag=f;r.dump=u||"{}"}function detectType(r,n,s){var a,u,p,m,g,y;u=s?r.explicitTypes:r.implicitTypes;for(p=0,m=u.length;p<m;p+=1){g=u[p];if((g.instanceOf||g.predicate)&&(!g.instanceOf||typeof n==="object"&&n instanceof g.instanceOf)&&(!g.predicate||g.predicate(n))){if(s){if(g.multi&&g.representName){r.tag=g.representName(n)}else{r.tag=g.tag}}else{r.tag="?"}if(g.represent){y=r.styleMap[g.tag]||g.defaultStyle;if(f.call(g.represent)==="[object Function]"){a=g.represent(n,y)}else if(d.call(g.represent,y)){a=g.represent[y](n,y)}else{throw new l("!<"+g.tag+'> tag resolver accepts not "'+y+'" style')}r.dump=a}return true}}return false}function writeNode(r,n,s,a,u,d,p){r.tag=null;r.dump=s;if(!detectType(r,s,false)){detectType(r,s,true)}var m=f.call(r.dump);var g=a;var y;if(a){a=r.flowLevel<0||r.flowLevel>n}var v=m==="[object Object]"||m==="[object Array]",b,w;if(v){b=r.duplicates.indexOf(s);w=b!==-1}if(r.tag!==null&&r.tag!=="?"||w||r.indent!==2&&n>0){u=false}if(w&&r.usedDuplicates[b]){r.dump="*ref_"+b}else{if(v&&w&&!r.usedDuplicates[b]){r.usedDuplicates[b]=true}if(m==="[object Object]"){if(a&&Object.keys(r.dump).length!==0){writeBlockMapping(r,n,r.dump,u);if(w){r.dump="&ref_"+b+r.dump}}else{writeFlowMapping(r,n,r.dump);if(w){r.dump="&ref_"+b+" "+r.dump}}}else if(m==="[object Array]"){if(a&&r.dump.length!==0){if(r.noArrayIndent&&!p&&n>0){writeBlockSequence(r,n-1,r.dump,u)}else{writeBlockSequence(r,n,r.dump,u)}if(w){r.dump="&ref_"+b+r.dump}}else{writeFlowSequence(r,n,r.dump);if(w){r.dump="&ref_"+b+" "+r.dump}}}else if(m==="[object String]"){if(r.tag!=="?"){writeScalar(r,r.dump,n,d,g)}}else if(m==="[object Undefined]"){return false}else{if(r.skipInvalid)return false;throw new l("unacceptable kind of an object to dump "+m)}if(r.tag!==null&&r.tag!=="?"){y=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21");if(r.tag[0]==="!"){y="!"+y}else if(y.slice(0,18)==="tag:yaml.org,2002:"){y="!!"+y.slice(18)}else{y="!<"+y+">"}r.dump=y+" "+r.dump}}return true}function getDuplicateReferences(r,n){var s=[],a=[],l,u;inspectNode(r,s,a);for(l=0,u=a.length;l<u;l+=1){n.duplicates.push(s[a[l]])}n.usedDuplicates=new Array(u)}function inspectNode(r,n,s){var a,l,u;if(r!==null&&typeof r==="object"){l=n.indexOf(r);if(l!==-1){if(s.indexOf(l)===-1){s.push(l)}}else{n.push(r);if(Array.isArray(r)){for(l=0,u=r.length;l<u;l+=1){inspectNode(r[l],n,s)}}else{a=Object.keys(r);for(l=0,u=a.length;l<u;l+=1){inspectNode(r[a[l]],n,s)}}}}}function dump(r,n){n=n||{};var s=new State(n);if(!s.noRefs)getDuplicateReferences(r,s);var a=r;if(s.replacer){a=s.replacer.call({"":a},"",a)}if(writeNode(s,0,a,true,true))return s.dump+"\n";return""}r.exports.dump=dump},1248:r=>{"use strict";function formatError(r,n){var s="",a=r.reason||"(unknown reason)";if(!r.mark)return a;if(r.mark.name){s+='in "'+r.mark.name+'" '}s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")";if(!n&&r.mark.snippet){s+="\n\n"+r.mark.snippet}return a+" "+s}function YAMLException(r,n){Error.call(this);this.name="YAMLException";this.reason=r;this.mark=n;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(r){return this.name+": "+formatError(this,r)};r.exports=YAMLException},1950:(r,n,s)=>{"use strict";var a=s(9816);var l=s(1248);var u=s(9440);var f=s(7336);var d=Object.prototype.hasOwnProperty;var p=1;var m=2;var g=3;var y=4;var v=1;var b=2;var w=3;var _=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var S=/[\x85\u2028\u2029]/;var E=/[,\[\]\{\}]/;var x=/^(?:!|!!|![a-z\-]+!)$/i;var A=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(r){return Object.prototype.toString.call(r)}function is_EOL(r){return r===10||r===13}function is_WHITE_SPACE(r){return r===9||r===32}function is_WS_OR_EOL(r){return r===9||r===32||r===10||r===13}function is_FLOW_INDICATOR(r){return r===44||r===91||r===93||r===123||r===125}function fromHexCode(r){var n;if(48<=r&&r<=57){return r-48}n=r|32;if(97<=n&&n<=102){return n-97+10}return-1}function escapedHexLen(r){if(r===120){return 2}if(r===117){return 4}if(r===85){return 8}return 0}function fromDecimalCode(r){if(48<=r&&r<=57){return r-48}return-1}function simpleEscapeSequence(r){return r===48?"\0":r===97?"":r===98?"\b":r===116?"\t":r===9?"\t":r===110?"\n":r===118?"\v":r===102?"\f":r===114?"\r":r===101?"":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"
":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}function charFromCodepoint(r){if(r<=65535){return String.fromCharCode(r)}return String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var k=new Array(256);var C=new Array(256);for(var O=0;O<256;O++){k[O]=simpleEscapeSequence(O)?1:0;C[O]=simpleEscapeSequence(O)}function State(r,n){this.input=r;this.filename=n["filename"]||null;this.schema=n["schema"]||f;this.onWarning=n["onWarning"]||null;this.legacy=n["legacy"]||false;this.json=n["json"]||false;this.listener=n["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=r.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(r,n){var s={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};s.snippet=u(s);return new l(n,s)}function throwError(r,n){throw generateError(r,n)}function throwWarning(r,n){if(r.onWarning){r.onWarning.call(null,generateError(r,n))}}var T={YAML:function handleYamlDirective(r,n,s){var a,l,u;if(r.version!==null){throwError(r,"duplication of %YAML directive")}if(s.length!==1){throwError(r,"YAML directive accepts exactly one argument")}a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]);if(a===null){throwError(r,"ill-formed argument of the YAML directive")}l=parseInt(a[1],10);u=parseInt(a[2],10);if(l!==1){throwError(r,"unacceptable YAML version of the document")}r.version=s[0];r.checkLineBreaks=u<2;if(u!==1&&u!==2){throwWarning(r,"unsupported YAML version of the document")}},TAG:function handleTagDirective(r,n,s){var a,l;if(s.length!==2){throwError(r,"TAG directive accepts exactly two arguments")}a=s[0];l=s[1];if(!x.test(a)){throwError(r,"ill-formed tag handle (first argument) of the TAG directive")}if(d.call(r.tagMap,a)){throwError(r,'there is a previously declared suffix for "'+a+'" tag handle')}if(!A.test(l)){throwError(r,"ill-formed tag prefix (second argument) of the TAG directive")}try{l=decodeURIComponent(l)}catch(n){throwError(r,"tag prefix is malformed: "+l)}r.tagMap[a]=l}};function captureSegment(r,n,s,a){var l,u,f,d;if(n<s){d=r.input.slice(n,s);if(a){for(l=0,u=d.length;l<u;l+=1){f=d.charCodeAt(l);if(!(f===9||32<=f&&f<=1114111)){throwError(r,"expected valid JSON character")}}}else if(_.test(d)){throwError(r,"the stream contains non-printable characters")}r.result+=d}}function mergeMappings(r,n,s,l){var u,f,p,m;if(!a.isObject(s)){throwError(r,"cannot merge mappings; the provided source object is unacceptable")}u=Object.keys(s);for(p=0,m=u.length;p<m;p+=1){f=u[p];if(!d.call(n,f)){n[f]=s[f];l[f]=true}}}function storeMappingPair(r,n,s,a,l,u,f,p,m){var g,y;if(Array.isArray(l)){l=Array.prototype.slice.call(l);for(g=0,y=l.length;g<y;g+=1){if(Array.isArray(l[g])){throwError(r,"nested arrays are not supported inside keys")}if(typeof l==="object"&&_class(l[g])==="[object Object]"){l[g]="[object Object]"}}}if(typeof l==="object"&&_class(l)==="[object Object]"){l="[object Object]"}l=String(l);if(n===null){n={}}if(a==="tag:yaml.org,2002:merge"){if(Array.isArray(u)){for(g=0,y=u.length;g<y;g+=1){mergeMappings(r,n,u[g],s)}}else{mergeMappings(r,n,u,s)}}else{if(!r.json&&!d.call(s,l)&&d.call(n,l)){r.line=f||r.line;r.lineStart=p||r.lineStart;r.position=m||r.position;throwError(r,"duplicated mapping key")}if(l==="__proto__"){Object.defineProperty(n,l,{configurable:true,enumerable:true,writable:true,value:u})}else{n[l]=u}delete s[l]}return n}function readLineBreak(r){var n;n=r.input.charCodeAt(r.position);if(n===10){r.position++}else if(n===13){r.position++;if(r.input.charCodeAt(r.position)===10){r.position++}}else{throwError(r,"a line break is expected")}r.line+=1;r.lineStart=r.position;r.firstTabInLine=-1}function skipSeparationSpace(r,n,s){var a=0,l=r.input.charCodeAt(r.position);while(l!==0){while(is_WHITE_SPACE(l)){if(l===9&&r.firstTabInLine===-1){r.firstTabInLine=r.position}l=r.input.charCodeAt(++r.position)}if(n&&l===35){do{l=r.input.charCodeAt(++r.position)}while(l!==10&&l!==13&&l!==0)}if(is_EOL(l)){readLineBreak(r);l=r.input.charCodeAt(r.position);a++;r.lineIndent=0;while(l===32){r.lineIndent++;l=r.input.charCodeAt(++r.position)}}else{break}}if(s!==-1&&a!==0&&r.lineIndent<s){throwWarning(r,"deficient indentation")}return a}function testDocumentSeparator(r){var n=r.position,s;s=r.input.charCodeAt(n);if((s===45||s===46)&&s===r.input.charCodeAt(n+1)&&s===r.input.charCodeAt(n+2)){n+=3;s=r.input.charCodeAt(n);if(s===0||is_WS_OR_EOL(s)){return true}}return false}function writeFoldedLines(r,n){if(n===1){r.result+=" "}else if(n>1){r.result+=a.repeat("\n",n-1)}}function readPlainScalar(r,n,s){var a,l,u,f,d,p,m,g,y=r.kind,v=r.result,b;b=r.input.charCodeAt(r.position);if(is_WS_OR_EOL(b)||is_FLOW_INDICATOR(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96){return false}if(b===63||b===45){l=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(l)||s&&is_FLOW_INDICATOR(l)){return false}}r.kind="scalar";r.result="";u=f=r.position;d=false;while(b!==0){if(b===58){l=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(l)||s&&is_FLOW_INDICATOR(l)){break}}else if(b===35){a=r.input.charCodeAt(r.position-1);if(is_WS_OR_EOL(a)){break}}else if(r.position===r.lineStart&&testDocumentSeparator(r)||s&&is_FLOW_INDICATOR(b)){break}else if(is_EOL(b)){p=r.line;m=r.lineStart;g=r.lineIndent;skipSeparationSpace(r,false,-1);if(r.lineIndent>=n){d=true;b=r.input.charCodeAt(r.position);continue}else{r.position=f;r.line=p;r.lineStart=m;r.lineIndent=g;break}}if(d){captureSegment(r,u,f,false);writeFoldedLines(r,r.line-p);u=f=r.position;d=false}if(!is_WHITE_SPACE(b)){f=r.position+1}b=r.input.charCodeAt(++r.position)}captureSegment(r,u,f,false);if(r.result){return true}r.kind=y;r.result=v;return false}function readSingleQuotedScalar(r,n){var s,a,l;s=r.input.charCodeAt(r.position);if(s!==39){return false}r.kind="scalar";r.result="";r.position++;a=l=r.position;while((s=r.input.charCodeAt(r.position))!==0){if(s===39){captureSegment(r,a,r.position,true);s=r.input.charCodeAt(++r.position);if(s===39){a=r.position;r.position++;l=r.position}else{return true}}else if(is_EOL(s)){captureSegment(r,a,l,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));a=l=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a single quoted scalar")}else{r.position++;l=r.position}}throwError(r,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(r,n){var s,a,l,u,f,d;d=r.input.charCodeAt(r.position);if(d!==34){return false}r.kind="scalar";r.result="";r.position++;s=a=r.position;while((d=r.input.charCodeAt(r.position))!==0){if(d===34){captureSegment(r,s,r.position,true);r.position++;return true}else if(d===92){captureSegment(r,s,r.position,true);d=r.input.charCodeAt(++r.position);if(is_EOL(d)){skipSeparationSpace(r,false,n)}else if(d<256&&k[d]){r.result+=C[d];r.position++}else if((f=escapedHexLen(d))>0){l=f;u=0;for(;l>0;l--){d=r.input.charCodeAt(++r.position);if((f=fromHexCode(d))>=0){u=(u<<4)+f}else{throwError(r,"expected hexadecimal character")}}r.result+=charFromCodepoint(u);r.position++}else{throwError(r,"unknown escape sequence")}s=a=r.position}else if(is_EOL(d)){captureSegment(r,s,a,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));s=a=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a double quoted scalar")}else{r.position++;a=r.position}}throwError(r,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(r,n){var s=true,a,l,u,f=r.tag,d,m=r.anchor,g,y,v,b,w,_=Object.create(null),S,E,x,A;A=r.input.charCodeAt(r.position);if(A===91){y=93;w=false;d=[]}else if(A===123){y=125;w=true;d={}}else{return false}if(r.anchor!==null){r.anchorMap[r.anchor]=d}A=r.input.charCodeAt(++r.position);while(A!==0){skipSeparationSpace(r,true,n);A=r.input.charCodeAt(r.position);if(A===y){r.position++;r.tag=f;r.anchor=m;r.kind=w?"mapping":"sequence";r.result=d;return true}else if(!s){throwError(r,"missed comma between flow collection entries")}else if(A===44){throwError(r,"expected the node content, but found ','")}E=S=x=null;v=b=false;if(A===63){g=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(g)){v=b=true;r.position++;skipSeparationSpace(r,true,n)}}a=r.line;l=r.lineStart;u=r.position;composeNode(r,n,p,false,true);E=r.tag;S=r.result;skipSeparationSpace(r,true,n);A=r.input.charCodeAt(r.position);if((b||r.line===a)&&A===58){v=true;A=r.input.charCodeAt(++r.position);skipSeparationSpace(r,true,n);composeNode(r,n,p,false,true);x=r.result}if(w){storeMappingPair(r,d,_,E,S,x,a,l,u)}else if(v){d.push(storeMappingPair(r,null,_,E,S,x,a,l,u))}else{d.push(S)}skipSeparationSpace(r,true,n);A=r.input.charCodeAt(r.position);if(A===44){s=true;A=r.input.charCodeAt(++r.position)}else{s=false}}throwError(r,"unexpected end of the stream within a flow collection")}function readBlockScalar(r,n){var s,l,u=v,f=false,d=false,p=n,m=0,g=false,y,_;_=r.input.charCodeAt(r.position);if(_===124){l=false}else if(_===62){l=true}else{return false}r.kind="scalar";r.result="";while(_!==0){_=r.input.charCodeAt(++r.position);if(_===43||_===45){if(v===u){u=_===43?w:b}else{throwError(r,"repeat of a chomping mode identifier")}}else if((y=fromDecimalCode(_))>=0){if(y===0){throwError(r,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!d){p=n+y-1;d=true}else{throwError(r,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(_)){do{_=r.input.charCodeAt(++r.position)}while(is_WHITE_SPACE(_));if(_===35){do{_=r.input.charCodeAt(++r.position)}while(!is_EOL(_)&&_!==0)}}while(_!==0){readLineBreak(r);r.lineIndent=0;_=r.input.charCodeAt(r.position);while((!d||r.lineIndent<p)&&_===32){r.lineIndent++;_=r.input.charCodeAt(++r.position)}if(!d&&r.lineIndent>p){p=r.lineIndent}if(is_EOL(_)){m++;continue}if(r.lineIndent<p){if(u===w){r.result+=a.repeat("\n",f?1+m:m)}else if(u===v){if(f){r.result+="\n"}}break}if(l){if(is_WHITE_SPACE(_)){g=true;r.result+=a.repeat("\n",f?1+m:m)}else if(g){g=false;r.result+=a.repeat("\n",m+1)}else if(m===0){if(f){r.result+=" "}}else{r.result+=a.repeat("\n",m)}}else{r.result+=a.repeat("\n",f?1+m:m)}f=true;d=true;m=0;s=r.position;while(!is_EOL(_)&&_!==0){_=r.input.charCodeAt(++r.position)}captureSegment(r,s,r.position,false)}return true}function readBlockSequence(r,n){var s,a=r.tag,l=r.anchor,u=[],f,d=false,p;if(r.firstTabInLine!==-1)return false;if(r.anchor!==null){r.anchorMap[r.anchor]=u}p=r.input.charCodeAt(r.position);while(p!==0){if(r.firstTabInLine!==-1){r.position=r.firstTabInLine;throwError(r,"tab characters must not be used in indentation")}if(p!==45){break}f=r.input.charCodeAt(r.position+1);if(!is_WS_OR_EOL(f)){break}d=true;r.position++;if(skipSeparationSpace(r,true,-1)){if(r.lineIndent<=n){u.push(null);p=r.input.charCodeAt(r.position);continue}}s=r.line;composeNode(r,n,g,false,true);u.push(r.result);skipSeparationSpace(r,true,-1);p=r.input.charCodeAt(r.position);if((r.line===s||r.lineIndent>n)&&p!==0){throwError(r,"bad indentation of a sequence entry")}else if(r.lineIndent<n){break}}if(d){r.tag=a;r.anchor=l;r.kind="sequence";r.result=u;return true}return false}function readBlockMapping(r,n,s){var a,l,u,f,d,p,g=r.tag,v=r.anchor,b={},w=Object.create(null),_=null,S=null,E=null,x=false,A=false,k;if(r.firstTabInLine!==-1)return false;if(r.anchor!==null){r.anchorMap[r.anchor]=b}k=r.input.charCodeAt(r.position);while(k!==0){if(!x&&r.firstTabInLine!==-1){r.position=r.firstTabInLine;throwError(r,"tab characters must not be used in indentation")}a=r.input.charCodeAt(r.position+1);u=r.line;if((k===63||k===58)&&is_WS_OR_EOL(a)){if(k===63){if(x){storeMappingPair(r,b,w,_,S,null,f,d,p);_=S=E=null}A=true;x=true;l=true}else if(x){x=false;l=true}else{throwError(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}r.position+=1;k=a}else{f=r.line;d=r.lineStart;p=r.position;if(!composeNode(r,s,m,false,true)){break}if(r.line===u){k=r.input.charCodeAt(r.position);while(is_WHITE_SPACE(k)){k=r.input.charCodeAt(++r.position)}if(k===58){k=r.input.charCodeAt(++r.position);if(!is_WS_OR_EOL(k)){throwError(r,"a whitespace character is expected after the key-value separator within a block mapping")}if(x){storeMappingPair(r,b,w,_,S,null,f,d,p);_=S=E=null}A=true;x=false;l=false;_=r.tag;S=r.result}else if(A){throwError(r,"can not read an implicit mapping pair; a colon is missed")}else{r.tag=g;r.anchor=v;return true}}else if(A){throwError(r,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{r.tag=g;r.anchor=v;return true}}if(r.line===u||r.lineIndent>n){if(x){f=r.line;d=r.lineStart;p=r.position}if(composeNode(r,n,y,true,l)){if(x){S=r.result}else{E=r.result}}if(!x){storeMappingPair(r,b,w,_,S,E,f,d,p);_=S=E=null}skipSeparationSpace(r,true,-1);k=r.input.charCodeAt(r.position)}if((r.line===u||r.lineIndent>n)&&k!==0){throwError(r,"bad indentation of a mapping entry")}else if(r.lineIndent<n){break}}if(x){storeMappingPair(r,b,w,_,S,null,f,d,p)}if(A){r.tag=g;r.anchor=v;r.kind="mapping";r.result=b}return A}function readTagProperty(r){var n,s=false,a=false,l,u,f;f=r.input.charCodeAt(r.position);if(f!==33)return false;if(r.tag!==null){throwError(r,"duplication of a tag property")}f=r.input.charCodeAt(++r.position);if(f===60){s=true;f=r.input.charCodeAt(++r.position)}else if(f===33){a=true;l="!!";f=r.input.charCodeAt(++r.position)}else{l="!"}n=r.position;if(s){do{f=r.input.charCodeAt(++r.position)}while(f!==0&&f!==62);if(r.position<r.length){u=r.input.slice(n,r.position);f=r.input.charCodeAt(++r.position)}else{throwError(r,"unexpected end of the stream within a verbatim tag")}}else{while(f!==0&&!is_WS_OR_EOL(f)){if(f===33){if(!a){l=r.input.slice(n-1,r.position+1);if(!x.test(l)){throwError(r,"named tag handle cannot contain such characters")}a=true;n=r.position+1}else{throwError(r,"tag suffix cannot contain exclamation marks")}}f=r.input.charCodeAt(++r.position)}u=r.input.slice(n,r.position);if(E.test(u)){throwError(r,"tag suffix cannot contain flow indicator characters")}}if(u&&!A.test(u)){throwError(r,"tag name cannot contain such characters: "+u)}try{u=decodeURIComponent(u)}catch(n){throwError(r,"tag name is malformed: "+u)}if(s){r.tag=u}else if(d.call(r.tagMap,l)){r.tag=r.tagMap[l]+u}else if(l==="!"){r.tag="!"+u}else if(l==="!!"){r.tag="tag:yaml.org,2002:"+u}else{throwError(r,'undeclared tag handle "'+l+'"')}return true}function readAnchorProperty(r){var n,s;s=r.input.charCodeAt(r.position);if(s!==38)return false;if(r.anchor!==null){throwError(r,"duplication of an anchor property")}s=r.input.charCodeAt(++r.position);n=r.position;while(s!==0&&!is_WS_OR_EOL(s)&&!is_FLOW_INDICATOR(s)){s=r.input.charCodeAt(++r.position)}if(r.position===n){throwError(r,"name of an anchor node must contain at least one character")}r.anchor=r.input.slice(n,r.position);return true}function readAlias(r){var n,s,a;a=r.input.charCodeAt(r.position);if(a!==42)return false;a=r.input.charCodeAt(++r.position);n=r.position;while(a!==0&&!is_WS_OR_EOL(a)&&!is_FLOW_INDICATOR(a)){a=r.input.charCodeAt(++r.position)}if(r.position===n){throwError(r,"name of an alias node must contain at least one character")}s=r.input.slice(n,r.position);if(!d.call(r.anchorMap,s)){throwError(r,'unidentified alias "'+s+'"')}r.result=r.anchorMap[s];skipSeparationSpace(r,true,-1);return true}function composeNode(r,n,s,a,l){var u,f,v,b=1,w=false,_=false,S,E,x,A,k,C;if(r.listener!==null){r.listener("open",r)}r.tag=null;r.anchor=null;r.kind=null;r.result=null;u=f=v=y===s||g===s;if(a){if(skipSeparationSpace(r,true,-1)){w=true;if(r.lineIndent>n){b=1}else if(r.lineIndent===n){b=0}else if(r.lineIndent<n){b=-1}}}if(b===1){while(readTagProperty(r)||readAnchorProperty(r)){if(skipSeparationSpace(r,true,-1)){w=true;v=u;if(r.lineIndent>n){b=1}else if(r.lineIndent===n){b=0}else if(r.lineIndent<n){b=-1}}else{v=false}}}if(v){v=w||l}if(b===1||y===s){if(p===s||m===s){k=n}else{k=n+1}C=r.position-r.lineStart;if(b===1){if(v&&(readBlockSequence(r,C)||readBlockMapping(r,C,k))||readFlowCollection(r,k)){_=true}else{if(f&&readBlockScalar(r,k)||readSingleQuotedScalar(r,k)||readDoubleQuotedScalar(r,k)){_=true}else if(readAlias(r)){_=true;if(r.tag!==null||r.anchor!==null){throwError(r,"alias node should not have any properties")}}else if(readPlainScalar(r,k,p===s)){_=true;if(r.tag===null){r.tag="?"}}if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}else if(b===0){_=v&&readBlockSequence(r,C)}}if(r.tag===null){if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}else if(r.tag==="?"){if(r.result!==null&&r.kind!=="scalar"){throwError(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"')}for(S=0,E=r.implicitTypes.length;S<E;S+=1){A=r.implicitTypes[S];if(A.resolve(r.result)){r.result=A.construct(r.result);r.tag=A.tag;if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}break}}}else if(r.tag!=="!"){if(d.call(r.typeMap[r.kind||"fallback"],r.tag)){A=r.typeMap[r.kind||"fallback"][r.tag]}else{A=null;x=r.typeMap.multi[r.kind||"fallback"];for(S=0,E=x.length;S<E;S+=1){if(r.tag.slice(0,x[S].tag.length)===x[S].tag){A=x[S];break}}}if(!A){throwError(r,"unknown tag !<"+r.tag+">")}if(r.result!==null&&A.kind!==r.kind){throwError(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+A.kind+'", not "'+r.kind+'"')}if(!A.resolve(r.result,r.tag)){throwError(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}else{r.result=A.construct(r.result,r.tag);if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}if(r.listener!==null){r.listener("close",r)}return r.tag!==null||r.anchor!==null||_}function readDocument(r){var n=r.position,s,a,l,u=false,f;r.version=null;r.checkLineBreaks=r.legacy;r.tagMap=Object.create(null);r.anchorMap=Object.create(null);while((f=r.input.charCodeAt(r.position))!==0){skipSeparationSpace(r,true,-1);f=r.input.charCodeAt(r.position);if(r.lineIndent>0||f!==37){break}u=true;f=r.input.charCodeAt(++r.position);s=r.position;while(f!==0&&!is_WS_OR_EOL(f)){f=r.input.charCodeAt(++r.position)}a=r.input.slice(s,r.position);l=[];if(a.length<1){throwError(r,"directive name must not be less than one character in length")}while(f!==0){while(is_WHITE_SPACE(f)){f=r.input.charCodeAt(++r.position)}if(f===35){do{f=r.input.charCodeAt(++r.position)}while(f!==0&&!is_EOL(f));break}if(is_EOL(f))break;s=r.position;while(f!==0&&!is_WS_OR_EOL(f)){f=r.input.charCodeAt(++r.position)}l.push(r.input.slice(s,r.position))}if(f!==0)readLineBreak(r);if(d.call(T,a)){T[a](r,a,l)}else{throwWarning(r,'unknown document directive "'+a+'"')}}skipSeparationSpace(r,true,-1);if(r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45){r.position+=3;skipSeparationSpace(r,true,-1)}else if(u){throwError(r,"directives end mark is expected")}composeNode(r,r.lineIndent-1,y,false,true);skipSeparationSpace(r,true,-1);if(r.checkLineBreaks&&S.test(r.input.slice(n,r.position))){throwWarning(r,"non-ASCII line breaks are interpreted as content")}r.documents.push(r.result);if(r.position===r.lineStart&&testDocumentSeparator(r)){if(r.input.charCodeAt(r.position)===46){r.position+=3;skipSeparationSpace(r,true,-1)}return}if(r.position<r.length-1){throwError(r,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(r,n){r=String(r);n=n||{};if(r.length!==0){if(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13){r+="\n"}if(r.charCodeAt(0)===65279){r=r.slice(1)}}var s=new State(r,n);var a=r.indexOf("\0");if(a!==-1){s.position=a;throwError(s,"null byte is not allowed in input")}s.input+="\0";while(s.input.charCodeAt(s.position)===32){s.lineIndent+=1;s.position+=1}while(s.position<s.length-1){readDocument(s)}return s.documents}function loadAll(r,n,s){if(n!==null&&typeof n==="object"&&typeof s==="undefined"){s=n;n=null}var a=loadDocuments(r,s);if(typeof n!=="function"){return a}for(var l=0,u=a.length;l<u;l+=1){n(a[l])}}function load(r,n){var s=loadDocuments(r,n);if(s.length===0){return undefined}else if(s.length===1){return s[0]}throw new l("expected a single document in the stream, but found more")}r.exports.loadAll=loadAll;r.exports.load=load},2046:(r,n,s)=>{"use strict";var a=s(1248);var l=s(9557);function compileList(r,n){var s=[];r[n].forEach((function(r){var n=s.length;s.forEach((function(s,a){if(s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi){n=a}}));s[n]=r}));return s}function compileMap(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,s;function collectType(n){if(n.multi){r.multi[n.kind].push(n);r.multi["fallback"].push(n)}else{r[n.kind][n.tag]=r["fallback"][n.tag]=n}}for(n=0,s=arguments.length;n<s;n+=1){arguments[n].forEach(collectType)}return r}function Schema(r){return this.extend(r)}Schema.prototype.extend=function extend(r){var n=[];var s=[];if(r instanceof l){s.push(r)}else if(Array.isArray(r)){s=s.concat(r)}else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit))){if(r.implicit)n=n.concat(r.implicit);if(r.explicit)s=s.concat(r.explicit)}else{throw new a("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}n.forEach((function(r){if(!(r instanceof l)){throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(r.loadKind&&r.loadKind!=="scalar"){throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(r.multi){throw new a("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));s.forEach((function(r){if(!(r instanceof l)){throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var u=Object.create(Schema.prototype);u.implicit=(this.implicit||[]).concat(n);u.explicit=(this.explicit||[]).concat(s);u.compiledImplicit=compileList(u,"implicit");u.compiledExplicit=compileList(u,"explicit");u.compiledTypeMap=compileMap(u.compiledImplicit,u.compiledExplicit);return u};r.exports=Schema},5746:(r,n,s)=>{"use strict";r.exports=s(8927)},7336:(r,n,s)=>{"use strict";r.exports=s(5746).extend({implicit:[s(8966),s(6854)],explicit:[s(8149),s(8649),s(6267),s(8758)]})},9832:(r,n,s)=>{"use strict";var a=s(2046);r.exports=new a({explicit:[s(3929),s(7161),s(7316)]})},8927:(r,n,s)=>{"use strict";r.exports=s(9832).extend({implicit:[s(4333),s(7296),s(2271),s(7584)]})},9440:(r,n,s)=>{"use strict";var a=s(9816);function getLine(r,n,s,a,l){var u="";var f="";var d=Math.floor(l/2)-1;if(a-n>d){u=" ... ";n=a-d+u.length}if(s-a>d){f=" ...";s=a+d-f.length}return{str:u+r.slice(n,s).replace(/\t/g,"→")+f,pos:a-n+u.length}}function padStart(r,n){return a.repeat(" ",n-r.length)+r}function makeSnippet(r,n){n=Object.create(n||null);if(!r.buffer)return null;if(!n.maxLength)n.maxLength=79;if(typeof n.indent!=="number")n.indent=1;if(typeof n.linesBefore!=="number")n.linesBefore=3;if(typeof n.linesAfter!=="number")n.linesAfter=2;var s=/\r?\n|\r|\0/g;var l=[0];var u=[];var f;var d=-1;while(f=s.exec(r.buffer)){u.push(f.index);l.push(f.index+f[0].length);if(r.position<=f.index&&d<0){d=l.length-2}}if(d<0)d=l.length-1;var p="",m,g;var y=Math.min(r.line+n.linesAfter,u.length).toString().length;var v=n.maxLength-(n.indent+y+3);for(m=1;m<=n.linesBefore;m++){if(d-m<0)break;g=getLine(r.buffer,l[d-m],u[d-m],r.position-(l[d]-l[d-m]),v);p=a.repeat(" ",n.indent)+padStart((r.line-m+1).toString(),y)+" | "+g.str+"\n"+p}g=getLine(r.buffer,l[d],u[d],r.position,v);p+=a.repeat(" ",n.indent)+padStart((r.line+1).toString(),y)+" | "+g.str+"\n";p+=a.repeat("-",n.indent+y+3+g.pos)+"^"+"\n";for(m=1;m<=n.linesAfter;m++){if(d+m>=u.length)break;g=getLine(r.buffer,l[d+m],u[d+m],r.position-(l[d]-l[d+m]),v);p+=a.repeat(" ",n.indent)+padStart((r.line+m+1).toString(),y)+" | "+g.str+"\n"}return p.replace(/\n$/,"")}r.exports=makeSnippet},9557:(r,n,s)=>{"use strict";var a=s(1248);var l=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var u=["scalar","sequence","mapping"];function compileStyleAliases(r){var n={};if(r!==null){Object.keys(r).forEach((function(s){r[s].forEach((function(r){n[String(r)]=s}))}))}return n}function Type(r,n){n=n||{};Object.keys(n).forEach((function(n){if(l.indexOf(n)===-1){throw new a('Unknown option "'+n+'" is met in definition of "'+r+'" YAML type.')}}));this.options=n;this.tag=r;this.kind=n["kind"]||null;this.resolve=n["resolve"]||function(){return true};this.construct=n["construct"]||function(r){return r};this.instanceOf=n["instanceOf"]||null;this.predicate=n["predicate"]||null;this.represent=n["represent"]||null;this.representName=n["representName"]||null;this.defaultStyle=n["defaultStyle"]||null;this.multi=n["multi"]||false;this.styleAliases=compileStyleAliases(n["styleAliases"]||null);if(u.indexOf(this.kind)===-1){throw new a('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}}r.exports=Type},8149:(r,n,s)=>{"use strict";var a=s(9557);var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(r){if(r===null)return false;var n,s,a=0,u=r.length,f=l;for(s=0;s<u;s++){n=f.indexOf(r.charAt(s));if(n>64)continue;if(n<0)return false;a+=6}return a%8===0}function constructYamlBinary(r){var n,s,a=r.replace(/[\r\n=]/g,""),u=a.length,f=l,d=0,p=[];for(n=0;n<u;n++){if(n%4===0&&n){p.push(d>>16&255);p.push(d>>8&255);p.push(d&255)}d=d<<6|f.indexOf(a.charAt(n))}s=u%4*6;if(s===0){p.push(d>>16&255);p.push(d>>8&255);p.push(d&255)}else if(s===18){p.push(d>>10&255);p.push(d>>2&255)}else if(s===12){p.push(d>>4&255)}return new Uint8Array(p)}function representYamlBinary(r){var n="",s=0,a,u,f=r.length,d=l;for(a=0;a<f;a++){if(a%3===0&&a){n+=d[s>>18&63];n+=d[s>>12&63];n+=d[s>>6&63];n+=d[s&63]}s=(s<<8)+r[a]}u=f%3;if(u===0){n+=d[s>>18&63];n+=d[s>>12&63];n+=d[s>>6&63];n+=d[s&63]}else if(u===2){n+=d[s>>10&63];n+=d[s>>4&63];n+=d[s<<2&63];n+=d[64]}else if(u===1){n+=d[s>>2&63];n+=d[s<<4&63];n+=d[64];n+=d[64]}return n}function isBinary(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}r.exports=new a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},7296:(r,n,s)=>{"use strict";var a=s(9557);function resolveYamlBoolean(r){if(r===null)return false;var n=r.length;return n===4&&(r==="true"||r==="True"||r==="TRUE")||n===5&&(r==="false"||r==="False"||r==="FALSE")}function constructYamlBoolean(r){return r==="true"||r==="True"||r==="TRUE"}function isBoolean(r){return Object.prototype.toString.call(r)==="[object Boolean]"}r.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})},7584:(r,n,s)=>{"use strict";var a=s(9816);var l=s(9557);var u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(r){if(r===null)return false;if(!u.test(r)||r[r.length-1]==="_"){return false}return true}function constructYamlFloat(r){var n,s;n=r.replace(/_/g,"").toLowerCase();s=n[0]==="-"?-1:1;if("+-".indexOf(n[0])>=0){n=n.slice(1)}if(n===".inf"){return s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(n===".nan"){return NaN}return s*parseFloat(n,10)}var f=/^[-+]?[0-9]+e/;function representYamlFloat(r,n){var s;if(isNaN(r)){switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===r){switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===r){switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(a.isNegativeZero(r)){return"-0.0"}s=r.toString(10);return f.test(s)?s.replace("e",".e"):s}function isFloat(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||a.isNegativeZero(r))}r.exports=new l("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},2271:(r,n,s)=>{"use strict";var a=s(9816);var l=s(9557);function isHexCode(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function isOctCode(r){return 48<=r&&r<=55}function isDecCode(r){return 48<=r&&r<=57}function resolveYamlInteger(r){if(r===null)return false;var n=r.length,s=0,a=false,l;if(!n)return false;l=r[s];if(l==="-"||l==="+"){l=r[++s]}if(l==="0"){if(s+1===n)return true;l=r[++s];if(l==="b"){s++;for(;s<n;s++){l=r[s];if(l==="_")continue;if(l!=="0"&&l!=="1")return false;a=true}return a&&l!=="_"}if(l==="x"){s++;for(;s<n;s++){l=r[s];if(l==="_")continue;if(!isHexCode(r.charCodeAt(s)))return false;a=true}return a&&l!=="_"}if(l==="o"){s++;for(;s<n;s++){l=r[s];if(l==="_")continue;if(!isOctCode(r.charCodeAt(s)))return false;a=true}return a&&l!=="_"}}if(l==="_")return false;for(;s<n;s++){l=r[s];if(l==="_")continue;if(!isDecCode(r.charCodeAt(s))){return false}a=true}if(!a||l==="_")return false;return true}function constructYamlInteger(r){var n=r,s=1,a;if(n.indexOf("_")!==-1){n=n.replace(/_/g,"")}a=n[0];if(a==="-"||a==="+"){if(a==="-")s=-1;n=n.slice(1);a=n[0]}if(n==="0")return 0;if(a==="0"){if(n[1]==="b")return s*parseInt(n.slice(2),2);if(n[1]==="x")return s*parseInt(n.slice(2),16);if(n[1]==="o")return s*parseInt(n.slice(2),8)}return s*parseInt(n,10)}function isInteger(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1===0&&!a.isNegativeZero(r))}r.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},7316:(r,n,s)=>{"use strict";var a=s(9557);r.exports=new a("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})},6854:(r,n,s)=>{"use strict";var a=s(9557);function resolveYamlMerge(r){return r==="<<"||r===null}r.exports=new a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},4333:(r,n,s)=>{"use strict";var a=s(9557);function resolveYamlNull(r){if(r===null)return true;var n=r.length;return n===1&&r==="~"||n===4&&(r==="null"||r==="Null"||r==="NULL")}function constructYamlNull(){return null}function isNull(r){return r===null}r.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},8649:(r,n,s)=>{"use strict";var a=s(9557);var l=Object.prototype.hasOwnProperty;var u=Object.prototype.toString;function resolveYamlOmap(r){if(r===null)return true;var n=[],s,a,f,d,p,m=r;for(s=0,a=m.length;s<a;s+=1){f=m[s];p=false;if(u.call(f)!=="[object Object]")return false;for(d in f){if(l.call(f,d)){if(!p)p=true;else return false}}if(!p)return false;if(n.indexOf(d)===-1)n.push(d);else return false}return true}function constructYamlOmap(r){return r!==null?r:[]}r.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},6267:(r,n,s)=>{"use strict";var a=s(9557);var l=Object.prototype.toString;function resolveYamlPairs(r){if(r===null)return true;var n,s,a,u,f,d=r;f=new Array(d.length);for(n=0,s=d.length;n<s;n+=1){a=d[n];if(l.call(a)!=="[object Object]")return false;u=Object.keys(a);if(u.length!==1)return false;f[n]=[u[0],a[u[0]]]}return true}function constructYamlPairs(r){if(r===null)return[];var n,s,a,l,u,f=r;u=new Array(f.length);for(n=0,s=f.length;n<s;n+=1){a=f[n];l=Object.keys(a);u[n]=[l[0],a[l[0]]]}return u}r.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},7161:(r,n,s)=>{"use strict";var a=s(9557);r.exports=new a("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})},8758:(r,n,s)=>{"use strict";var a=s(9557);var l=Object.prototype.hasOwnProperty;function resolveYamlSet(r){if(r===null)return true;var n,s=r;for(n in s){if(l.call(s,n)){if(s[n]!==null)return false}}return true}function constructYamlSet(r){return r!==null?r:{}}r.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3929:(r,n,s)=>{"use strict";var a=s(9557);r.exports=new a("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})},8966:(r,n,s)=>{"use strict";var a=s(9557);var l=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var u=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(r){if(r===null)return false;if(l.exec(r)!==null)return true;if(u.exec(r)!==null)return true;return false}function constructYamlTimestamp(r){var n,s,a,f,d,p,m,g=0,y=null,v,b,w;n=l.exec(r);if(n===null)n=u.exec(r);if(n===null)throw new Error("Date resolve error");s=+n[1];a=+n[2]-1;f=+n[3];if(!n[4]){return new Date(Date.UTC(s,a,f))}d=+n[4];p=+n[5];m=+n[6];if(n[7]){g=n[7].slice(0,3);while(g.length<3){g+="0"}g=+g}if(n[9]){v=+n[10];b=+(n[11]||0);y=(v*60+b)*6e4;if(n[9]==="-")y=-y}w=new Date(Date.UTC(s,a,f,d,p,m,g));if(y)w.setTime(w.getTime()-y);return w}function representYamlTimestamp(r){return r.toISOString()}r.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},6133:r=>{
|
|
45
45
|
/*!
|
|
46
46
|
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
47
47
|
*
|
|
48
48
|
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
49
49
|
* Released under the MIT License.
|
|
50
50
|
*/
|
|
51
|
-
e.exports=function(e,t){if(typeof e!=="string"){throw new TypeError("expected path to be a string")}if(e==="\\"||e==="/")return"/";var r=e.length;if(r<=1)return e;var n="";if(r>4&&e[3]==="\\"){var i=e[2];if((i==="?"||i===".")&&e.slice(0,2)==="\\\\"){e=e.slice(2);n="//"}}var s=e.split(/[/\\]+/);if(t!==false&&s[s.length-1]===""){s.pop()}return n+s.join("/")}},5768:(e,t,r)=>{const n=r(1017);const i=r(2081);const{promises:s,constants:o}=r(7147);const a=r(2559);const c=r(8768);const l=r(961);const u=r.ab+"xdg-open";const{platform:f,arch:h}=process;const hasContainerEnv=()=>{try{s.statSync("/run/.containerenv");return true}catch{return false}};let d;function isInsideContainer(){if(d===undefined){d=hasContainerEnv()||c()}return d}const p=(()=>{const e="/mnt/";let t;return async function(){if(t){return t}const r="/etc/wsl.conf";let n=false;try{await s.access(r,o.F_OK);n=true}catch{}if(!n){return e}const i=await s.readFile(r,{encoding:"utf8"});const a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);if(!a){return e}t=a.groups.mountPoint.trim();t=t.endsWith("/")?t:`${t}/`;return t}})();const pTryEach=async(e,t)=>{let r;for(const n of e){try{return await t(n)}catch(e){r=e}}throw r};const baseOpen=async e=>{e={wait:false,background:false,newInstance:false,allowNonzeroExitCode:false,...e};if(Array.isArray(e.app)){return pTryEach(e.app,(t=>baseOpen({...e,app:t})))}let{name:t,arguments:n=[]}=e.app||{};n=[...n];if(Array.isArray(t)){return pTryEach(t,(t=>baseOpen({...e,app:{name:t,arguments:n}})))}let c;const l=[];const h={};if(f==="darwin"){c="open";if(e.wait){l.push("--wait-apps")}if(e.background){l.push("--background")}if(e.newInstance){l.push("--new")}if(t){l.push("-a",t)}}else if(f==="win32"||a&&!isInsideContainer()&&!t){const r=await p();c=a?`${r}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;l.push("-NoProfile","-NonInteractive","–ExecutionPolicy","Bypass","-EncodedCommand");if(!a){h.windowsVerbatimArguments=true}const i=["Start"];if(e.wait){i.push("-Wait")}if(t){i.push(`"\`"${t}\`""`,"-ArgumentList");if(e.target){n.unshift(e.target)}}else if(e.target){i.push(`"${e.target}"`)}if(n.length>0){n=n.map((e=>`"\`"${e}\`""`));i.push(n.join(","))}e.target=Buffer.from(i.join(" "),"utf16le").toString("base64")}else{if(t){c=t}else{const e=!__dirname||__dirname==="/";let t=false;try{await s.access(r.ab+"xdg-open",o.X_OK);t=true}catch{}const n=process.versions.electron||f==="android"||e||!t;c=n?"xdg-open":u}if(n.length>0){l.push(...n)}if(!e.wait){h.stdio="ignore";h.detached=true}}if(e.target){l.push(e.target)}if(f==="darwin"&&n.length>0){l.push("--args",...n)}const d=i.spawn(c,l,h);if(e.wait){return new Promise(((t,r)=>{d.once("error",r);d.once("close",(n=>{if(!e.allowNonzeroExitCode&&n>0){r(new Error(`Exited with code ${n}`));return}t(d)}))}))}d.unref();return d};const open=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a `target`")}return baseOpen({...t,target:e})};const openApp=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a `name`")}const{arguments:r=[]}=t||{};if(r!==undefined&&r!==null&&!Array.isArray(r)){throw new TypeError("Expected `appArguments` as Array type")}return baseOpen({...t,app:{name:e,arguments:r}})};function detectArchBinary(e){if(typeof e==="string"||Array.isArray(e)){return e}const{[h]:t}=e;if(!t){throw new Error(`${h} is not supported`)}return t}function detectPlatformBinary({[f]:e},{wsl:t}){if(t&&a){return detectArchBinary(t)}if(!e){throw new Error(`${f} is not supported`)}return detectArchBinary(e)}const m={};l(m,"chrome",(()=>detectPlatformBinary({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}})));l(m,"firefox",(()=>detectPlatformBinary({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"})));l(m,"edge",(()=>detectPlatformBinary({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"})));open.apps=m;open.openApp=openApp;e.exports=open},539:e=>{"use strict";const pathKey=(e={})=>{const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"};e.exports=pathKey;e.exports["default"]=pathKey},8569:(e,t,r)=>{"use strict";e.exports=r(3322)},6099:(e,t,r)=>{"use strict";const n=r(1017);const i="\\\\/";const s=`[^${i}]`;const o="\\.";const a="\\+";const c="\\?";const l="\\/";const u="(?=.)";const f="[^/]";const h=`(?:${l}|$)`;const d=`(?:^|${l})`;const p=`${o}{1,2}${h}`;const m=`(?!${o})`;const v=`(?!${d}${p})`;const _=`(?!${o}{0,1}${h})`;const g=`(?!${p})`;const y=`[^.${l}]`;const w=`${f}*?`;const b={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:u,QMARK:f,END_ANCHOR:h,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:v,NO_DOT_SLASH:_,NO_DOTS_SLASH:g,QMARK_NO_DOT:y,STAR:w,START_ANCHOR:d};const E={...b,SLASH_LITERAL:`[${i}]`,QMARK:s,STAR:`${s}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const S={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:S,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?E:b}}},2139:(e,t,r)=>{"use strict";const n=r(6099);const i=r(479);const{MAX_LENGTH:s,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=n;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>i.escapeRegex(e))).join("..")}return r};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=l[e]||e;const r={...t};const u=typeof r.maxLength==="number"?Math.min(s,r.maxLength):s;let f=e.length;if(f>u){throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${u}`)}const h={type:"bos",value:"",output:r.prepend||""};const d=[h];const p=r.capture?"":"?:";const m=i.isWindows(t);const v=n.globChars(m);const _=n.extglobChars(v);const{DOT_LITERAL:g,PLUS_LITERAL:y,SLASH_LITERAL:w,ONE_CHAR:b,DOTS_SLASH:E,NO_DOT:S,NO_DOT_SLASH:x,NO_DOTS_SLASH:A,QMARK:k,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:O}=v;const globstar=e=>`(${p}(?:(?!${O}${e.dot?E:g}).)*?)`;const T=r.dot?"":S;const I=r.dot?k:C;let P=r.bash===true?globstar(r):R;if(r.capture){P=`(${P})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const N={input:e,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:d};e=i.removePrefix(e,N);f=e.length;const L=[];const B=[];const H=[];let D=h;let M;const eos=()=>N.index===f-1;const W=N.peek=(t=1)=>e[N.index+t];const j=N.advance=()=>e[++N.index]||"";const remaining=()=>e.slice(N.index+1);const consume=(e="",t=0)=>{N.consumed+=e;N.index+=t};const append=e=>{N.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(W()==="!"&&(W(2)!=="("||W(3)==="?")){j();N.start++;e++}if(e%2===0){return false}N.negated=true;N.start++;return true};const increment=e=>{N[e]++;H.push(e)};const decrement=e=>{N[e]--;H.pop()};const push=e=>{if(D.type==="globstar"){const t=N.braces>0&&(e.type==="comma"||e.type==="brace");const r=e.extglob===true||L.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!r){N.output=N.output.slice(0,-D.output.length);D.type="star";D.value="*";D.output=P;N.output+=D.output}}if(L.length&&e.type!=="paren"){L[L.length-1].inner+=e.value}if(e.value||e.output)append(e);if(D&&D.type==="text"&&e.type==="text"){D.value+=e.value;D.output=(D.output||"")+e.value;return}e.prev=D;d.push(e);D=e};const extglobOpen=(e,t)=>{const n={..._[t],conditions:1,inner:""};n.prev=D;n.parens=N.parens;n.output=N.output;const i=(r.capture?"(":"")+n.open;increment("parens");push({type:e,value:t,output:N.output?"":b});push({type:"paren",extglob:true,value:j(),output:i});L.push(n)};const extglobClose=e=>{let n=e.close+(r.capture?")":"");let i;if(e.type==="negate"){let s=P;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){s=globstar(r)}if(s!==P||eos()||/^\)+$/.test(remaining())){n=e.close=`)$))${s}`}if(e.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const r=parse(i,{...t,fastpaths:false}).output;n=e.close=`)${r})${s})`}if(e.prev.type==="bos"){N.negatedExtglob=true}}push({type:"paren",extglob:true,value:M,output:n});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=false;let s=e.replace(c,((e,t,r,i,s,o)=>{if(i==="\\"){n=true;return e}if(i==="?"){if(t){return t+i+(s?k.repeat(s.length):"")}if(o===0){return I+(s?k.repeat(s.length):"")}return k.repeat(r.length)}if(i==="."){return g.repeat(r.length)}if(i==="*"){if(t){return t+i+(s?P:"")}return P}return t?e:`\\${e}`}));if(n===true){if(r.unescape===true){s=s.replace(/\\/g,"")}else{s=s.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(s===e&&r.contains===true){N.output=e;return N}N.output=i.wrapOutput(s,N,t);return N}while(!eos()){M=j();if(M==="\0"){continue}if(M==="\\"){const e=W();if(e==="/"&&r.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){M+="\\";push({type:"text",value:M});continue}const t=/^\\+/.exec(remaining());let n=0;if(t&&t[0].length>2){n=t[0].length;N.index+=n;if(n%2!==0){M+="\\"}}if(r.unescape===true){M=j()}else{M+=j()}if(N.brackets===0){push({type:"text",value:M});continue}}if(N.brackets>0&&(M!=="]"||D.value==="["||D.value==="[^")){if(r.posix!==false&&M===":"){const e=D.value.slice(1);if(e.includes("[")){D.posix=true;if(e.includes(":")){const e=D.value.lastIndexOf("[");const t=D.value.slice(0,e);const r=D.value.slice(e+2);const n=o[r];if(n){D.value=t+n;N.backtrack=true;j();if(!h.output&&d.indexOf(D)===1){h.output=b}continue}}}}if(M==="["&&W()!==":"||M==="-"&&W()==="]"){M=`\\${M}`}if(M==="]"&&(D.value==="["||D.value==="[^")){M=`\\${M}`}if(r.posix===true&&M==="!"&&D.value==="["){M="^"}D.value+=M;append({value:M});continue}if(N.quotes===1&&M!=='"'){M=i.escapeRegex(M);D.value+=M;append({value:M});continue}if(M==='"'){N.quotes=N.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:M})}continue}if(M==="("){increment("parens");push({type:"paren",value:M});continue}if(M===")"){if(N.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=L[L.length-1];if(e&&N.parens===e.parens+1){extglobClose(L.pop());continue}push({type:"paren",value:M,output:N.parens?")":"\\)"});decrement("parens");continue}if(M==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}M=`\\${M}`}else{increment("brackets")}push({type:"bracket",value:M});continue}if(M==="]"){if(r.nobracket===true||D&&D.type==="bracket"&&D.value.length===1){push({type:"text",value:M,output:`\\${M}`});continue}if(N.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:M,output:`\\${M}`});continue}decrement("brackets");const e=D.value.slice(1);if(D.posix!==true&&e[0]==="^"&&!e.includes("/")){M=`/${M}`}D.value+=M;append({value:M});if(r.literalBrackets===false||i.hasRegexChars(e)){continue}const t=i.escapeRegex(D.value);N.output=N.output.slice(0,-D.value.length);if(r.literalBrackets===true){N.output+=t;D.value=t;continue}D.value=`(${p}${t}|${D.value})`;N.output+=D.value;continue}if(M==="{"&&r.nobrace!==true){increment("braces");const e={type:"brace",value:M,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};B.push(e);push(e);continue}if(M==="}"){const e=B[B.length-1];if(r.nobrace===true||!e){push({type:"text",value:M,output:M});continue}let t=")";if(e.dots===true){const e=d.slice();const n=[];for(let t=e.length-1;t>=0;t--){d.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){n.unshift(e[t].value)}}t=expandRange(n,r);N.backtrack=true}if(e.comma!==true&&e.dots!==true){const r=N.output.slice(0,e.outputIndex);const n=N.tokens.slice(e.tokensIndex);e.value=e.output="\\{";M=t="\\}";N.output=r;for(const e of n){N.output+=e.output||e.value}}push({type:"brace",value:M,output:t});decrement("braces");B.pop();continue}if(M==="|"){if(L.length>0){L[L.length-1].conditions++}push({type:"text",value:M});continue}if(M===","){let e=M;const t=B[B.length-1];if(t&&H[H.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:M,output:e});continue}if(M==="/"){if(D.type==="dot"&&N.index===N.start+1){N.start=N.index+1;N.consumed="";N.output="";d.pop();D=h;continue}push({type:"slash",value:M,output:w});continue}if(M==="."){if(N.braces>0&&D.type==="dot"){if(D.value===".")D.output=g;const e=B[B.length-1];D.type="dots";D.output+=M;D.value+=M;e.dots=true;continue}if(N.braces+N.parens===0&&D.type!=="bos"&&D.type!=="slash"){push({type:"text",value:M,output:g});continue}push({type:"dot",value:M,output:g});continue}if(M==="?"){const e=D&&D.value==="(";if(!e&&r.noextglob!==true&&W()==="("&&W(2)!=="?"){extglobOpen("qmark",M);continue}if(D&&D.type==="paren"){const e=W();let t=M;if(e==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(D.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${M}`}push({type:"text",value:M,output:t});continue}if(r.dot!==true&&(D.type==="slash"||D.type==="bos")){push({type:"qmark",value:M,output:C});continue}push({type:"qmark",value:M,output:k});continue}if(M==="!"){if(r.noextglob!==true&&W()==="("){if(W(2)!=="?"||!/[!=<:]/.test(W(3))){extglobOpen("negate",M);continue}}if(r.nonegate!==true&&N.index===0){negate();continue}}if(M==="+"){if(r.noextglob!==true&&W()==="("&&W(2)!=="?"){extglobOpen("plus",M);continue}if(D&&D.value==="("||r.regex===false){push({type:"plus",value:M,output:y});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||N.parens>0){push({type:"plus",value:M});continue}push({type:"plus",value:y});continue}if(M==="@"){if(r.noextglob!==true&&W()==="("&&W(2)!=="?"){push({type:"at",extglob:true,value:M,output:""});continue}push({type:"text",value:M});continue}if(M!=="*"){if(M==="$"||M==="^"){M=`\\${M}`}const e=a.exec(remaining());if(e){M+=e[0];N.index+=e[0].length}push({type:"text",value:M});continue}if(D&&(D.type==="globstar"||D.star===true)){D.type="star";D.star=true;D.value+=M;D.output=P;N.backtrack=true;N.globstar=true;consume(M);continue}let t=remaining();if(r.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",M);continue}if(D.type==="star"){if(r.noglobstar===true){consume(M);continue}const n=D.prev;const i=n.prev;const s=n.type==="slash"||n.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!s||t[0]&&t[0]!=="/")){push({type:"star",value:M,output:""});continue}const a=N.braces>0&&(n.type==="comma"||n.type==="brace");const c=L.length&&(n.type==="pipe"||n.type==="paren");if(!s&&n.type!=="paren"&&!a&&!c){push({type:"star",value:M,output:""});continue}while(t.slice(0,3)==="/**"){const r=e[N.index+4];if(r&&r!=="/"){break}t=t.slice(3);consume("/**",3)}if(n.type==="bos"&&eos()){D.type="globstar";D.value+=M;D.output=globstar(r);N.output=D.output;N.globstar=true;consume(M);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&!o&&eos()){N.output=N.output.slice(0,-(n.output+D.output).length);n.output=`(?:${n.output}`;D.type="globstar";D.output=globstar(r)+(r.strictSlashes?")":"|$)");D.value+=M;N.globstar=true;N.output+=n.output+D.output;consume(M);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";N.output=N.output.slice(0,-(n.output+D.output).length);n.output=`(?:${n.output}`;D.type="globstar";D.output=`${globstar(r)}${w}|${w}${e})`;D.value+=M;N.output+=n.output+D.output;N.globstar=true;consume(M+j());push({type:"slash",value:"/",output:""});continue}if(n.type==="bos"&&t[0]==="/"){D.type="globstar";D.value+=M;D.output=`(?:^|${w}|${globstar(r)}${w})`;N.output=D.output;N.globstar=true;consume(M+j());push({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-D.output.length);D.type="globstar";D.output=globstar(r);D.value+=M;N.output+=D.output;N.globstar=true;consume(M);continue}const n={type:"star",value:M,output:P};if(r.bash===true){n.output=".*?";if(D.type==="bos"||D.type==="slash"){n.output=T+n.output}push(n);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&r.regex===true){n.output=M;push(n);continue}if(N.index===N.start||D.type==="slash"||D.type==="dot"){if(D.type==="dot"){N.output+=x;D.output+=x}else if(r.dot===true){N.output+=A;D.output+=A}else{N.output+=T;D.output+=T}if(W()!=="*"){N.output+=b;D.output+=b}}push(n)}while(N.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));N.output=i.escapeLast(N.output,"[");decrement("brackets")}while(N.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));N.output=i.escapeLast(N.output,"(");decrement("parens")}while(N.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));N.output=i.escapeLast(N.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(D.type==="star"||D.type==="bracket")){push({type:"maybe_slash",value:"",output:`${w}?`})}if(N.backtrack===true){N.output="";for(const e of N.tokens){N.output+=e.output!=null?e.output:e.value;if(e.suffix){N.output+=e.suffix}}}return N};parse.fastpaths=(e,t)=>{const r={...t};const o=typeof r.maxLength==="number"?Math.min(s,r.maxLength):s;const a=e.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}e=l[e]||e;const c=i.isWindows(t);const{DOT_LITERAL:u,SLASH_LITERAL:f,ONE_CHAR:h,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:v,STAR:_,START_ANCHOR:g}=n.globChars(c);const y=r.dot?m:p;const w=r.dot?v:p;const b=r.capture?"":"?:";const E={negated:false,prefix:""};let S=r.bash===true?".*?":_;if(r.capture){S=`(${S})`}const globstar=e=>{if(e.noglobstar===true)return S;return`(${b}(?:(?!${g}${e.dot?d:u}).)*?)`};const create=e=>{switch(e){case"*":return`${y}${h}${S}`;case".*":return`${u}${h}${S}`;case"*.*":return`${y}${S}${u}${h}${S}`;case"*/*":return`${y}${S}${f}${h}${w}${S}`;case"**":return y+globstar(r);case"**/*":return`(?:${y}${globstar(r)}${f})?${w}${h}${S}`;case"**/*.*":return`(?:${y}${globstar(r)}${f})?${w}${S}${u}${h}${S}`;case"**/.*":return`(?:${y}${globstar(r)}${f})?${u}${h}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=create(t[1]);if(!r)return;return r+u+t[2]}}};const x=i.removePrefix(e,E);let A=create(x);if(A&&r.strictSlashes!==true){A+=`${f}?`}return A};e.exports=parse},3322:(e,t,r)=>{"use strict";const n=r(1017);const i=r(2429);const s=r(2139);const o=r(479);const a=r(6099);const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,r=false)=>{if(Array.isArray(e)){const n=e.map((e=>picomatch(e,t,r)));const arrayMatcher=e=>{for(const t of n){const r=t(e);if(r)return r}return false};return arrayMatcher}const n=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!n){throw new TypeError("Expected pattern to be a non-empty string")}const i=t||{};const s=o.isWindows(t);const a=n?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const c=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,e,r)}const matcher=(r,n=false)=>{const{isMatch:o,match:l,output:u}=picomatch.test(r,a,t,{glob:e,posix:s});const f={glob:e,state:c,regex:a,posix:s,input:r,output:u,match:l,isMatch:o};if(typeof i.onResult==="function"){i.onResult(f)}if(o===false){f.isMatch=false;return n?f:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(f)}f.isMatch=false;return n?f:false}if(typeof i.onMatch==="function"){i.onMatch(f)}return n?f:true};if(r){matcher.state=c}return matcher};picomatch.test=(e,t,r,{glob:n,posix:i}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const s=r||{};const a=s.format||(i?o.toPosixSlashes:null);let c=e===n;let l=c&&a?a(e):e;if(c===false){l=a?a(e):e;c=l===n}if(c===false||s.capture===true){if(s.matchBase===true||s.basename===true){c=picomatch.matchBase(e,t,r,i)}else{c=t.exec(l)}}return{isMatch:Boolean(c),match:c,output:l}};picomatch.matchBase=(e,t,r,i=o.isWindows(r))=>{const s=t instanceof RegExp?t:picomatch.makeRe(t,r);return s.test(n.basename(e))};picomatch.isMatch=(e,t,r)=>picomatch(t,r)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return s(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>i(e,t);picomatch.compileRe=(e,t,r=false,n=false)=>{if(r===true){return e.output}const i=t||{};const s=i.contains?"":"^";const o=i.contains?"":"$";let a=`${s}(?:${e.output})${o}`;if(e&&e.negated===true){a=`^(?!${a}).*$`}const c=picomatch.toRegex(a,t);if(n===true){c.state=e}return c};picomatch.makeRe=(e,t={},r=false,n=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){i.output=s.fastpaths(e,t)}if(!i.output){i=s(e,t)}return picomatch.compileRe(i,t,r,n)};picomatch.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=a;e.exports=picomatch},2429:(e,t,r)=>{"use strict";const n=r(479);const{CHAR_ASTERISK:i,CHAR_AT:s,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:g}=r(6099);const isPathSeparator=e=>e===u||e===o;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan=(e,t)=>{const r=t||{};const y=e.length-1;const w=r.parts===true||r.scanToEnd===true;const b=[];const E=[];const S=[];let x=e;let A=-1;let k=0;let C=0;let R=false;let O=false;let T=false;let I=false;let P=false;let N=false;let L=false;let B=false;let H=false;let D=false;let M=0;let W;let j;let U={value:"",depth:0,isGlob:false};const eos=()=>A>=y;const peek=()=>x.charCodeAt(A+1);const advance=()=>{W=j;return x.charCodeAt(++A)};while(A<y){j=advance();let e;if(j===o){L=U.backslashes=true;j=advance();if(j===f){N=true}continue}if(N===true||j===f){M++;while(eos()!==true&&(j=advance())){if(j===o){L=U.backslashes=true;advance();continue}if(j===f){M++;continue}if(N!==true&&j===c&&(j=advance())===c){R=U.isBrace=true;T=U.isGlob=true;D=true;if(w===true){continue}break}if(N!==true&&j===a){R=U.isBrace=true;T=U.isGlob=true;D=true;if(w===true){continue}break}if(j===v){M--;if(M===0){N=false;R=U.isBrace=true;D=true;break}}}if(w===true){continue}break}if(j===u){b.push(A);E.push(U);U={value:"",depth:0,isGlob:false};if(D===true)continue;if(W===c&&A===k+1){k+=2;continue}C=A+1;continue}if(r.noext!==true){const e=j===p||j===s||j===i||j===m||j===l;if(e===true&&peek()===h){T=U.isGlob=true;I=U.isExtglob=true;D=true;if(j===l&&A===k){H=true}if(w===true){while(eos()!==true&&(j=advance())){if(j===o){L=U.backslashes=true;j=advance();continue}if(j===_){T=U.isGlob=true;D=true;break}}continue}break}}if(j===i){if(W===i)P=U.isGlobstar=true;T=U.isGlob=true;D=true;if(w===true){continue}break}if(j===m){T=U.isGlob=true;D=true;if(w===true){continue}break}if(j===d){while(eos()!==true&&(e=advance())){if(e===o){L=U.backslashes=true;advance();continue}if(e===g){O=U.isBracket=true;T=U.isGlob=true;D=true;break}}if(w===true){continue}break}if(r.nonegate!==true&&j===l&&A===k){B=U.negated=true;k++;continue}if(r.noparen!==true&&j===h){T=U.isGlob=true;if(w===true){while(eos()!==true&&(j=advance())){if(j===h){L=U.backslashes=true;j=advance();continue}if(j===_){D=true;break}}continue}break}if(T===true){D=true;if(w===true){continue}break}}if(r.noext===true){I=false;T=false}let G=x;let z="";let Y="";if(k>0){z=x.slice(0,k);x=x.slice(k);C-=k}if(G&&T===true&&C>0){G=x.slice(0,C);Y=x.slice(C)}else if(T===true){G="";Y=x}else{G=x}if(G&&G!==""&&G!=="/"&&G!==x){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(Y)Y=n.removeBackslashes(Y);if(G&&L===true){G=n.removeBackslashes(G)}}const V={prefix:z,input:e,start:k,base:G,glob:Y,isBrace:R,isBracket:O,isGlob:T,isExtglob:I,isGlobstar:P,negated:B,negatedExtglob:H};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){E.push(U)}V.tokens=E}if(r.parts===true||r.tokens===true){let t;for(let n=0;n<b.length;n++){const i=t?t+1:k;const s=b[n];const o=e.slice(i,s);if(r.tokens){if(n===0&&k!==0){E[n].isPrefix=true;E[n].value=z}else{E[n].value=o}depth(E[n]);V.maxDepth+=E[n].depth}if(n!==0||o!==""){S.push(o)}t=s}if(t&&t+1<e.length){const n=e.slice(t+1);S.push(n);if(r.tokens){E[E.length-1].value=n;depth(E[E.length-1]);V.maxDepth+=E[E.length-1].depth}}V.slashes=b;V.parts=S}return V};e.exports=scan},479:(e,t,r)=>{"use strict";const n=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(6099);t.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);t.hasRegexChars=e=>a.test(e);t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e);t.escapeRegex=e=>e.replace(c,"\\$1");t.toPosixSlashes=e=>e.replace(s,"/");t.removeBackslashes=e=>e.replace(o,(e=>e==="\\"?"":e));t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};t.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return i===true||n.sep==="\\"};t.escapeLast=(e,r,n)=>{const i=e.lastIndexOf(r,n);if(i===-1)return e;if(e[i-1]==="\\")return t.escapeLast(e,r,i-1);return`${e.slice(0,i)}\\${e.slice(i)}`};t.removePrefix=(e,t={})=>{let r=e;if(r.startsWith("./")){r=r.slice(2);t.prefix="./"}return r};t.wrapOutput=(e,t={},r={})=>{const n=r.contains?"":"^";const i=r.contains?"":"$";let s=`${n}(?:${e})${i}`;if(t.negated===true){s=`(?:^(?!${s}).*$)`}return s}},9556:(e,t,r)=>{"use strict";const n=r(7147);const{Readable:i}=r(2781);const s=r(1017);const{promisify:o}=r(3837);const a=r(8569);const c=o(n.readdir);const l=o(n.stat);const u=o(n.lstat);const f=o(n.realpath);const h="!";const d="READDIRP_RECURSIVE_ERROR";const p=new Set(["ENOENT","EPERM","EACCES","ELOOP",d]);const m="files";const v="directories";const _="files_directories";const g="all";const y=[m,v,_,g];const isNormalFlowError=e=>p.has(e.code);const[w,b]=process.versions.node.split(".").slice(0,2).map((e=>Number.parseInt(e,10)));const E=process.platform==="win32"&&(w>10||w===10&&b>=5);const normalizeFilter=e=>{if(e===undefined)return;if(typeof e==="function")return e;if(typeof e==="string"){const t=a(e.trim());return e=>t(e.basename)}if(Array.isArray(e)){const t=[];const r=[];for(const n of e){const e=n.trim();if(e.charAt(0)===h){r.push(a(e.slice(1)))}else{t.push(a(e))}}if(r.length>0){if(t.length>0){return e=>t.some((t=>t(e.basename)))&&!r.some((t=>t(e.basename)))}return e=>!r.some((t=>t(e.basename)))}return e=>t.some((t=>t(e.basename)))}};class ReaddirpStream extends i{static get defaultOptions(){return{root:".",fileFilter:e=>true,directoryFilter:e=>true,type:m,lstat:false,depth:2147483648,alwaysStat:false}}constructor(e={}){super({objectMode:true,autoDestroy:true,highWaterMark:e.highWaterMark||4096});const t={...ReaddirpStream.defaultOptions,...e};const{root:r,type:i}=t;this._fileFilter=normalizeFilter(t.fileFilter);this._directoryFilter=normalizeFilter(t.directoryFilter);const o=t.lstat?u:l;if(E){this._stat=e=>o(e,{bigint:true})}else{this._stat=o}this._maxDepth=t.depth;this._wantsDir=[v,_,g].includes(i);this._wantsFile=[m,_,g].includes(i);this._wantsEverything=i===g;this._root=s.resolve(r);this._isDirent="Dirent"in n&&!t.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};this.parents=[this._exploreDir(r,1)];this.reading=false;this.parent=undefined}async _read(e){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&e>0){const{path:t,depth:r,files:n=[]}=this.parent||{};if(n.length>0){const i=n.splice(0,e).map((e=>this._formatEntry(e,t)));for(const t of await Promise.all(i)){if(this.destroyed)return;const n=await this._getEntryType(t);if(n==="directory"&&this._directoryFilter(t)){if(r<=this._maxDepth){this.parents.push(this._exploreDir(t.fullPath,r+1))}if(this._wantsDir){this.push(t);e--}}else if((n==="file"||this._includeAsFile(t))&&this._fileFilter(t)){if(this._wantsFile){this.push(t);e--}}}}else{const e=this.parents.pop();if(!e){this.push(null);break}this.parent=await e;if(this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=false}}async _exploreDir(e,t){let r;try{r=await c(e,this._rdOptions)}catch(e){this._onError(e)}return{files:r,depth:t,path:e}}async _formatEntry(e,t){let r;try{const n=this._isDirent?e.name:e;const i=s.resolve(s.join(t,n));r={path:s.relative(this._root,i),fullPath:i,basename:n};r[this._statsProp]=this._isDirent?e:await this._stat(i)}catch(e){this._onError(e)}return r}_onError(e){if(isNormalFlowError(e)&&!this.destroyed){this.emit("warn",e)}else{this.destroy(e)}}async _getEntryType(e){const t=e&&e[this._statsProp];if(!t){return}if(t.isFile()){return"file"}if(t.isDirectory()){return"directory"}if(t&&t.isSymbolicLink()){const t=e.fullPath;try{const e=await f(t);const r=await u(e);if(r.isFile()){return"file"}if(r.isDirectory()){const r=e.length;if(t.startsWith(e)&&t.substr(r,1)===s.sep){const r=new Error(`Circular symlink detected: "${t}" points to "${e}"`);r.code=d;return this._onError(r)}return"directory"}}catch(e){this._onError(e)}}}_includeAsFile(e){const t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}}const readdirp=(e,t={})=>{let r=t.entryType||t.type;if(r==="both")r=_;if(r)t.type=r;if(!e){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof e!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(r&&!y.includes(r)){throw new Error(`readdirp: Invalid type passed. Use one of ${y.join(", ")}`)}t.root=e;return new ReaddirpStream(t)};const readdirpPromise=(e,t={})=>new Promise(((r,n)=>{const i=[];readdirp(e,t).on("data",(e=>i.push(e))).on("end",(()=>r(i))).on("error",(e=>n(e)))}));readdirp.promise=readdirpPromise;readdirp.ReaddirpStream=ReaddirpStream;readdirp.default=readdirp;e.exports=readdirp},7032:(e,t,r)=>{"use strict";const n=r(2638);e.exports=(e="")=>{const t=e.match(n);if(!t){return null}const[r,i]=t[0].replace(/#! ?/,"").split(" ");const s=r.split("/").pop();if(s==="env"){return i}return i?`${s} ${i}`:s}},2638:e=>{"use strict";e.exports=/^#!(.*)/},1861:(e,t,r)=>{"use strict";
|
|
51
|
+
r.exports=function(r,n){if(typeof r!=="string"){throw new TypeError("expected path to be a string")}if(r==="\\"||r==="/")return"/";var s=r.length;if(s<=1)return r;var a="";if(s>4&&r[3]==="\\"){var l=r[2];if((l==="?"||l===".")&&r.slice(0,2)==="\\\\"){r=r.slice(2);a="//"}}var u=r.split(/[/\\]+/);if(n!==false&&u[u.length-1]===""){u.pop()}return a+u.join("/")}},6689:r=>{"use strict";const pathKey=(r={})=>{const n=r.env||process.env;const s=r.platform||process.platform;if(s!=="win32"){return"PATH"}return Object.keys(n).reverse().find((r=>r.toUpperCase()==="PATH"))||"Path"};r.exports=pathKey;r.exports["default"]=pathKey},4006:(r,n,s)=>{"use strict";r.exports=s(8016)},5595:(r,n,s)=>{"use strict";const a=s(6928);const l="\\\\/";const u=`[^${l}]`;const f="\\.";const d="\\+";const p="\\?";const m="\\/";const g="(?=.)";const y="[^/]";const v=`(?:${m}|$)`;const b=`(?:^|${m})`;const w=`${f}{1,2}${v}`;const _=`(?!${f})`;const S=`(?!${b}${w})`;const E=`(?!${f}{0,1}${v})`;const x=`(?!${w})`;const A=`[^.${m}]`;const k=`${y}*?`;const C={DOT_LITERAL:f,PLUS_LITERAL:d,QMARK_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:g,QMARK:y,END_ANCHOR:v,DOTS_SLASH:w,NO_DOT:_,NO_DOTS:S,NO_DOT_SLASH:E,NO_DOTS_SLASH:x,QMARK_NO_DOT:A,STAR:k,START_ANCHOR:b};const O={...C,SLASH_LITERAL:`[${l}]`,QMARK:u,STAR:`${u}*?`,DOTS_SLASH:`${f}{1,2}(?:[${l}]|$)`,NO_DOT:`(?!${f})`,NO_DOTS:`(?!(?:^|[${l}])${f}{1,2}(?:[${l}]|$))`,NO_DOT_SLASH:`(?!${f}{0,1}(?:[${l}]|$))`,NO_DOTS_SLASH:`(?!${f}{1,2}(?:[${l}]|$))`,QMARK_NO_DOT:`[^.${l}]`,START_ANCHOR:`(?:^|[${l}])`,END_ANCHOR:`(?:[${l}]|$)`};const T={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};r.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:T,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:a.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===true?O:C}}},8265:(r,n,s)=>{"use strict";const a=s(5595);const l=s(4059);const{MAX_LENGTH:u,POSIX_REGEX_SOURCE:f,REGEX_NON_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:m}=a;const expandRange=(r,n)=>{if(typeof n.expandRange==="function"){return n.expandRange(...r,n)}r.sort();const s=`[${r.join("-")}]`;try{new RegExp(s)}catch(n){return r.map((r=>l.escapeRegex(r))).join("..")}return s};const syntaxError=(r,n)=>`Missing ${r}: "${n}" - use "\\\\${n}" to match literal characters`;const parse=(r,n)=>{if(typeof r!=="string"){throw new TypeError("Expected a string")}r=m[r]||r;const s={...n};const g=typeof s.maxLength==="number"?Math.min(u,s.maxLength):u;let y=r.length;if(y>g){throw new SyntaxError(`Input length: ${y}, exceeds maximum allowed length: ${g}`)}const v={type:"bos",value:"",output:s.prepend||""};const b=[v];const w=s.capture?"":"?:";const _=l.isWindows(n);const S=a.globChars(_);const E=a.extglobChars(S);const{DOT_LITERAL:x,PLUS_LITERAL:A,SLASH_LITERAL:k,ONE_CHAR:C,DOTS_SLASH:O,NO_DOT:T,NO_DOT_SLASH:R,NO_DOTS_SLASH:I,QMARK:N,QMARK_NO_DOT:B,STAR:D,START_ANCHOR:P}=S;const globstar=r=>`(${w}(?:(?!${P}${r.dot?O:x}).)*?)`;const L=s.dot?"":T;const M=s.dot?N:B;let $=s.bash===true?globstar(s):D;if(s.capture){$=`(${$})`}if(typeof s.noext==="boolean"){s.noextglob=s.noext}const W={input:r,index:-1,start:0,dot:s.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:b};r=l.removePrefix(r,W);y=r.length;const H=[];const j=[];const U=[];let G=v;let z;const eos=()=>W.index===y-1;const V=W.peek=(n=1)=>r[W.index+n];const Y=W.advance=()=>r[++W.index]||"";const remaining=()=>r.slice(W.index+1);const consume=(r="",n=0)=>{W.consumed+=r;W.index+=n};const append=r=>{W.output+=r.output!=null?r.output:r.value;consume(r.value)};const negate=()=>{let r=1;while(V()==="!"&&(V(2)!=="("||V(3)==="?")){Y();W.start++;r++}if(r%2===0){return false}W.negated=true;W.start++;return true};const increment=r=>{W[r]++;U.push(r)};const decrement=r=>{W[r]--;U.pop()};const push=r=>{if(G.type==="globstar"){const n=W.braces>0&&(r.type==="comma"||r.type==="brace");const s=r.extglob===true||H.length&&(r.type==="pipe"||r.type==="paren");if(r.type!=="slash"&&r.type!=="paren"&&!n&&!s){W.output=W.output.slice(0,-G.output.length);G.type="star";G.value="*";G.output=$;W.output+=G.output}}if(H.length&&r.type!=="paren"){H[H.length-1].inner+=r.value}if(r.value||r.output)append(r);if(G&&G.type==="text"&&r.type==="text"){G.value+=r.value;G.output=(G.output||"")+r.value;return}r.prev=G;b.push(r);G=r};const extglobOpen=(r,n)=>{const a={...E[n],conditions:1,inner:""};a.prev=G;a.parens=W.parens;a.output=W.output;const l=(s.capture?"(":"")+a.open;increment("parens");push({type:r,value:n,output:W.output?"":C});push({type:"paren",extglob:true,value:Y(),output:l});H.push(a)};const extglobClose=r=>{let a=r.close+(s.capture?")":"");let l;if(r.type==="negate"){let u=$;if(r.inner&&r.inner.length>1&&r.inner.includes("/")){u=globstar(s)}if(u!==$||eos()||/^\)+$/.test(remaining())){a=r.close=`)$))${u}`}if(r.inner.includes("*")&&(l=remaining())&&/^\.[^\\/.]+$/.test(l)){const s=parse(l,{...n,fastpaths:false}).output;a=r.close=`)${s})${u})`}if(r.prev.type==="bos"){W.negatedExtglob=true}}push({type:"paren",extglob:true,value:z,output:a});decrement("parens")};if(s.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(r)){let a=false;let u=r.replace(p,((r,n,s,l,u,f)=>{if(l==="\\"){a=true;return r}if(l==="?"){if(n){return n+l+(u?N.repeat(u.length):"")}if(f===0){return M+(u?N.repeat(u.length):"")}return N.repeat(s.length)}if(l==="."){return x.repeat(s.length)}if(l==="*"){if(n){return n+l+(u?$:"")}return $}return n?r:`\\${r}`}));if(a===true){if(s.unescape===true){u=u.replace(/\\/g,"")}else{u=u.replace(/\\+/g,(r=>r.length%2===0?"\\\\":r?"\\":""))}}if(u===r&&s.contains===true){W.output=r;return W}W.output=l.wrapOutput(u,W,n);return W}while(!eos()){z=Y();if(z==="\0"){continue}if(z==="\\"){const r=V();if(r==="/"&&s.bash!==true){continue}if(r==="."||r===";"){continue}if(!r){z+="\\";push({type:"text",value:z});continue}const n=/^\\+/.exec(remaining());let a=0;if(n&&n[0].length>2){a=n[0].length;W.index+=a;if(a%2!==0){z+="\\"}}if(s.unescape===true){z=Y()}else{z+=Y()}if(W.brackets===0){push({type:"text",value:z});continue}}if(W.brackets>0&&(z!=="]"||G.value==="["||G.value==="[^")){if(s.posix!==false&&z===":"){const r=G.value.slice(1);if(r.includes("[")){G.posix=true;if(r.includes(":")){const r=G.value.lastIndexOf("[");const n=G.value.slice(0,r);const s=G.value.slice(r+2);const a=f[s];if(a){G.value=n+a;W.backtrack=true;Y();if(!v.output&&b.indexOf(G)===1){v.output=C}continue}}}}if(z==="["&&V()!==":"||z==="-"&&V()==="]"){z=`\\${z}`}if(z==="]"&&(G.value==="["||G.value==="[^")){z=`\\${z}`}if(s.posix===true&&z==="!"&&G.value==="["){z="^"}G.value+=z;append({value:z});continue}if(W.quotes===1&&z!=='"'){z=l.escapeRegex(z);G.value+=z;append({value:z});continue}if(z==='"'){W.quotes=W.quotes===1?0:1;if(s.keepQuotes===true){push({type:"text",value:z})}continue}if(z==="("){increment("parens");push({type:"paren",value:z});continue}if(z===")"){if(W.parens===0&&s.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const r=H[H.length-1];if(r&&W.parens===r.parens+1){extglobClose(H.pop());continue}push({type:"paren",value:z,output:W.parens?")":"\\)"});decrement("parens");continue}if(z==="["){if(s.nobracket===true||!remaining().includes("]")){if(s.nobracket!==true&&s.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}z=`\\${z}`}else{increment("brackets")}push({type:"bracket",value:z});continue}if(z==="]"){if(s.nobracket===true||G&&G.type==="bracket"&&G.value.length===1){push({type:"text",value:z,output:`\\${z}`});continue}if(W.brackets===0){if(s.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:z,output:`\\${z}`});continue}decrement("brackets");const r=G.value.slice(1);if(G.posix!==true&&r[0]==="^"&&!r.includes("/")){z=`/${z}`}G.value+=z;append({value:z});if(s.literalBrackets===false||l.hasRegexChars(r)){continue}const n=l.escapeRegex(G.value);W.output=W.output.slice(0,-G.value.length);if(s.literalBrackets===true){W.output+=n;G.value=n;continue}G.value=`(${w}${n}|${G.value})`;W.output+=G.value;continue}if(z==="{"&&s.nobrace!==true){increment("braces");const r={type:"brace",value:z,output:"(",outputIndex:W.output.length,tokensIndex:W.tokens.length};j.push(r);push(r);continue}if(z==="}"){const r=j[j.length-1];if(s.nobrace===true||!r){push({type:"text",value:z,output:z});continue}let n=")";if(r.dots===true){const r=b.slice();const a=[];for(let n=r.length-1;n>=0;n--){b.pop();if(r[n].type==="brace"){break}if(r[n].type!=="dots"){a.unshift(r[n].value)}}n=expandRange(a,s);W.backtrack=true}if(r.comma!==true&&r.dots!==true){const s=W.output.slice(0,r.outputIndex);const a=W.tokens.slice(r.tokensIndex);r.value=r.output="\\{";z=n="\\}";W.output=s;for(const r of a){W.output+=r.output||r.value}}push({type:"brace",value:z,output:n});decrement("braces");j.pop();continue}if(z==="|"){if(H.length>0){H[H.length-1].conditions++}push({type:"text",value:z});continue}if(z===","){let r=z;const n=j[j.length-1];if(n&&U[U.length-1]==="braces"){n.comma=true;r="|"}push({type:"comma",value:z,output:r});continue}if(z==="/"){if(G.type==="dot"&&W.index===W.start+1){W.start=W.index+1;W.consumed="";W.output="";b.pop();G=v;continue}push({type:"slash",value:z,output:k});continue}if(z==="."){if(W.braces>0&&G.type==="dot"){if(G.value===".")G.output=x;const r=j[j.length-1];G.type="dots";G.output+=z;G.value+=z;r.dots=true;continue}if(W.braces+W.parens===0&&G.type!=="bos"&&G.type!=="slash"){push({type:"text",value:z,output:x});continue}push({type:"dot",value:z,output:x});continue}if(z==="?"){const r=G&&G.value==="(";if(!r&&s.noextglob!==true&&V()==="("&&V(2)!=="?"){extglobOpen("qmark",z);continue}if(G&&G.type==="paren"){const r=V();let n=z;if(r==="<"&&!l.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(G.value==="("&&!/[!=<:]/.test(r)||r==="<"&&!/<([!=]|\w+>)/.test(remaining())){n=`\\${z}`}push({type:"text",value:z,output:n});continue}if(s.dot!==true&&(G.type==="slash"||G.type==="bos")){push({type:"qmark",value:z,output:B});continue}push({type:"qmark",value:z,output:N});continue}if(z==="!"){if(s.noextglob!==true&&V()==="("){if(V(2)!=="?"||!/[!=<:]/.test(V(3))){extglobOpen("negate",z);continue}}if(s.nonegate!==true&&W.index===0){negate();continue}}if(z==="+"){if(s.noextglob!==true&&V()==="("&&V(2)!=="?"){extglobOpen("plus",z);continue}if(G&&G.value==="("||s.regex===false){push({type:"plus",value:z,output:A});continue}if(G&&(G.type==="bracket"||G.type==="paren"||G.type==="brace")||W.parens>0){push({type:"plus",value:z});continue}push({type:"plus",value:A});continue}if(z==="@"){if(s.noextglob!==true&&V()==="("&&V(2)!=="?"){push({type:"at",extglob:true,value:z,output:""});continue}push({type:"text",value:z});continue}if(z!=="*"){if(z==="$"||z==="^"){z=`\\${z}`}const r=d.exec(remaining());if(r){z+=r[0];W.index+=r[0].length}push({type:"text",value:z});continue}if(G&&(G.type==="globstar"||G.star===true)){G.type="star";G.star=true;G.value+=z;G.output=$;W.backtrack=true;W.globstar=true;consume(z);continue}let n=remaining();if(s.noextglob!==true&&/^\([^?]/.test(n)){extglobOpen("star",z);continue}if(G.type==="star"){if(s.noglobstar===true){consume(z);continue}const a=G.prev;const l=a.prev;const u=a.type==="slash"||a.type==="bos";const f=l&&(l.type==="star"||l.type==="globstar");if(s.bash===true&&(!u||n[0]&&n[0]!=="/")){push({type:"star",value:z,output:""});continue}const d=W.braces>0&&(a.type==="comma"||a.type==="brace");const p=H.length&&(a.type==="pipe"||a.type==="paren");if(!u&&a.type!=="paren"&&!d&&!p){push({type:"star",value:z,output:""});continue}while(n.slice(0,3)==="/**"){const s=r[W.index+4];if(s&&s!=="/"){break}n=n.slice(3);consume("/**",3)}if(a.type==="bos"&&eos()){G.type="globstar";G.value+=z;G.output=globstar(s);W.output=G.output;W.globstar=true;consume(z);continue}if(a.type==="slash"&&a.prev.type!=="bos"&&!f&&eos()){W.output=W.output.slice(0,-(a.output+G.output).length);a.output=`(?:${a.output}`;G.type="globstar";G.output=globstar(s)+(s.strictSlashes?")":"|$)");G.value+=z;W.globstar=true;W.output+=a.output+G.output;consume(z);continue}if(a.type==="slash"&&a.prev.type!=="bos"&&n[0]==="/"){const r=n[1]!==void 0?"|$":"";W.output=W.output.slice(0,-(a.output+G.output).length);a.output=`(?:${a.output}`;G.type="globstar";G.output=`${globstar(s)}${k}|${k}${r})`;G.value+=z;W.output+=a.output+G.output;W.globstar=true;consume(z+Y());push({type:"slash",value:"/",output:""});continue}if(a.type==="bos"&&n[0]==="/"){G.type="globstar";G.value+=z;G.output=`(?:^|${k}|${globstar(s)}${k})`;W.output=G.output;W.globstar=true;consume(z+Y());push({type:"slash",value:"/",output:""});continue}W.output=W.output.slice(0,-G.output.length);G.type="globstar";G.output=globstar(s);G.value+=z;W.output+=G.output;W.globstar=true;consume(z);continue}const a={type:"star",value:z,output:$};if(s.bash===true){a.output=".*?";if(G.type==="bos"||G.type==="slash"){a.output=L+a.output}push(a);continue}if(G&&(G.type==="bracket"||G.type==="paren")&&s.regex===true){a.output=z;push(a);continue}if(W.index===W.start||G.type==="slash"||G.type==="dot"){if(G.type==="dot"){W.output+=R;G.output+=R}else if(s.dot===true){W.output+=I;G.output+=I}else{W.output+=L;G.output+=L}if(V()!=="*"){W.output+=C;G.output+=C}}push(a)}while(W.brackets>0){if(s.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));W.output=l.escapeLast(W.output,"[");decrement("brackets")}while(W.parens>0){if(s.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));W.output=l.escapeLast(W.output,"(");decrement("parens")}while(W.braces>0){if(s.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));W.output=l.escapeLast(W.output,"{");decrement("braces")}if(s.strictSlashes!==true&&(G.type==="star"||G.type==="bracket")){push({type:"maybe_slash",value:"",output:`${k}?`})}if(W.backtrack===true){W.output="";for(const r of W.tokens){W.output+=r.output!=null?r.output:r.value;if(r.suffix){W.output+=r.suffix}}}return W};parse.fastpaths=(r,n)=>{const s={...n};const f=typeof s.maxLength==="number"?Math.min(u,s.maxLength):u;const d=r.length;if(d>f){throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${f}`)}r=m[r]||r;const p=l.isWindows(n);const{DOT_LITERAL:g,SLASH_LITERAL:y,ONE_CHAR:v,DOTS_SLASH:b,NO_DOT:w,NO_DOTS:_,NO_DOTS_SLASH:S,STAR:E,START_ANCHOR:x}=a.globChars(p);const A=s.dot?_:w;const k=s.dot?S:w;const C=s.capture?"":"?:";const O={negated:false,prefix:""};let T=s.bash===true?".*?":E;if(s.capture){T=`(${T})`}const globstar=r=>{if(r.noglobstar===true)return T;return`(${C}(?:(?!${x}${r.dot?b:g}).)*?)`};const create=r=>{switch(r){case"*":return`${A}${v}${T}`;case".*":return`${g}${v}${T}`;case"*.*":return`${A}${T}${g}${v}${T}`;case"*/*":return`${A}${T}${y}${v}${k}${T}`;case"**":return A+globstar(s);case"**/*":return`(?:${A}${globstar(s)}${y})?${k}${v}${T}`;case"**/*.*":return`(?:${A}${globstar(s)}${y})?${k}${T}${g}${v}${T}`;case"**/.*":return`(?:${A}${globstar(s)}${y})?${g}${v}${T}`;default:{const n=/^(.*?)\.(\w+)$/.exec(r);if(!n)return;const s=create(n[1]);if(!s)return;return s+g+n[2]}}};const R=l.removePrefix(r,O);let I=create(R);if(I&&s.strictSlashes!==true){I+=`${y}?`}return I};r.exports=parse},8016:(r,n,s)=>{"use strict";const a=s(6928);const l=s(1781);const u=s(8265);const f=s(4059);const d=s(5595);const isObject=r=>r&&typeof r==="object"&&!Array.isArray(r);const picomatch=(r,n,s=false)=>{if(Array.isArray(r)){const a=r.map((r=>picomatch(r,n,s)));const arrayMatcher=r=>{for(const n of a){const s=n(r);if(s)return s}return false};return arrayMatcher}const a=isObject(r)&&r.tokens&&r.input;if(r===""||typeof r!=="string"&&!a){throw new TypeError("Expected pattern to be a non-empty string")}const l=n||{};const u=f.isWindows(n);const d=a?picomatch.compileRe(r,n):picomatch.makeRe(r,n,false,true);const p=d.state;delete d.state;let isIgnored=()=>false;if(l.ignore){const r={...n,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(l.ignore,r,s)}const matcher=(s,a=false)=>{const{isMatch:f,match:m,output:g}=picomatch.test(s,d,n,{glob:r,posix:u});const y={glob:r,state:p,regex:d,posix:u,input:s,output:g,match:m,isMatch:f};if(typeof l.onResult==="function"){l.onResult(y)}if(f===false){y.isMatch=false;return a?y:false}if(isIgnored(s)){if(typeof l.onIgnore==="function"){l.onIgnore(y)}y.isMatch=false;return a?y:false}if(typeof l.onMatch==="function"){l.onMatch(y)}return a?y:true};if(s){matcher.state=p}return matcher};picomatch.test=(r,n,s,{glob:a,posix:l}={})=>{if(typeof r!=="string"){throw new TypeError("Expected input to be a string")}if(r===""){return{isMatch:false,output:""}}const u=s||{};const d=u.format||(l?f.toPosixSlashes:null);let p=r===a;let m=p&&d?d(r):r;if(p===false){m=d?d(r):r;p=m===a}if(p===false||u.capture===true){if(u.matchBase===true||u.basename===true){p=picomatch.matchBase(r,n,s,l)}else{p=n.exec(m)}}return{isMatch:Boolean(p),match:p,output:m}};picomatch.matchBase=(r,n,s,l=f.isWindows(s))=>{const u=n instanceof RegExp?n:picomatch.makeRe(n,s);return u.test(a.basename(r))};picomatch.isMatch=(r,n,s)=>picomatch(n,s)(r);picomatch.parse=(r,n)=>{if(Array.isArray(r))return r.map((r=>picomatch.parse(r,n)));return u(r,{...n,fastpaths:false})};picomatch.scan=(r,n)=>l(r,n);picomatch.compileRe=(r,n,s=false,a=false)=>{if(s===true){return r.output}const l=n||{};const u=l.contains?"":"^";const f=l.contains?"":"$";let d=`${u}(?:${r.output})${f}`;if(r&&r.negated===true){d=`^(?!${d}).*$`}const p=picomatch.toRegex(d,n);if(a===true){p.state=r}return p};picomatch.makeRe=(r,n={},s=false,a=false)=>{if(!r||typeof r!=="string"){throw new TypeError("Expected a non-empty string")}let l={negated:false,fastpaths:true};if(n.fastpaths!==false&&(r[0]==="."||r[0]==="*")){l.output=u.fastpaths(r,n)}if(!l.output){l=u(r,n)}return picomatch.compileRe(l,n,s,a)};picomatch.toRegex=(r,n)=>{try{const s=n||{};return new RegExp(r,s.flags||(s.nocase?"i":""))}catch(r){if(n&&n.debug===true)throw r;return/$^/}};picomatch.constants=d;r.exports=picomatch},1781:(r,n,s)=>{"use strict";const a=s(4059);const{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:f,CHAR_COMMA:d,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:m,CHAR_FORWARD_SLASH:g,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:w,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:S,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:x}=s(5595);const isPathSeparator=r=>r===g||r===f;const depth=r=>{if(r.isPrefix!==true){r.depth=r.isGlobstar?Infinity:1}};const scan=(r,n)=>{const s=n||{};const A=r.length-1;const k=s.parts===true||s.scanToEnd===true;const C=[];const O=[];const T=[];let R=r;let I=-1;let N=0;let B=0;let D=false;let P=false;let L=false;let M=false;let $=false;let W=false;let H=false;let j=false;let U=false;let G=false;let z=0;let V;let Y;let K={value:"",depth:0,isGlob:false};const eos=()=>I>=A;const peek=()=>R.charCodeAt(I+1);const advance=()=>{V=Y;return R.charCodeAt(++I)};while(I<A){Y=advance();let r;if(Y===f){H=K.backslashes=true;Y=advance();if(Y===y){W=true}continue}if(W===true||Y===y){z++;while(eos()!==true&&(Y=advance())){if(Y===f){H=K.backslashes=true;advance();continue}if(Y===y){z++;continue}if(W!==true&&Y===p&&(Y=advance())===p){D=K.isBrace=true;L=K.isGlob=true;G=true;if(k===true){continue}break}if(W!==true&&Y===d){D=K.isBrace=true;L=K.isGlob=true;G=true;if(k===true){continue}break}if(Y===S){z--;if(z===0){W=false;D=K.isBrace=true;G=true;break}}}if(k===true){continue}break}if(Y===g){C.push(I);O.push(K);K={value:"",depth:0,isGlob:false};if(G===true)continue;if(V===p&&I===N+1){N+=2;continue}B=I+1;continue}if(s.noext!==true){const r=Y===w||Y===u||Y===l||Y===_||Y===m;if(r===true&&peek()===v){L=K.isGlob=true;M=K.isExtglob=true;G=true;if(Y===m&&I===N){U=true}if(k===true){while(eos()!==true&&(Y=advance())){if(Y===f){H=K.backslashes=true;Y=advance();continue}if(Y===E){L=K.isGlob=true;G=true;break}}continue}break}}if(Y===l){if(V===l)$=K.isGlobstar=true;L=K.isGlob=true;G=true;if(k===true){continue}break}if(Y===_){L=K.isGlob=true;G=true;if(k===true){continue}break}if(Y===b){while(eos()!==true&&(r=advance())){if(r===f){H=K.backslashes=true;advance();continue}if(r===x){P=K.isBracket=true;L=K.isGlob=true;G=true;break}}if(k===true){continue}break}if(s.nonegate!==true&&Y===m&&I===N){j=K.negated=true;N++;continue}if(s.noparen!==true&&Y===v){L=K.isGlob=true;if(k===true){while(eos()!==true&&(Y=advance())){if(Y===v){H=K.backslashes=true;Y=advance();continue}if(Y===E){G=true;break}}continue}break}if(L===true){G=true;if(k===true){continue}break}}if(s.noext===true){M=false;L=false}let q=R;let X="";let Q="";if(N>0){X=R.slice(0,N);R=R.slice(N);B-=N}if(q&&L===true&&B>0){q=R.slice(0,B);Q=R.slice(B)}else if(L===true){q="";Q=R}else{q=R}if(q&&q!==""&&q!=="/"&&q!==R){if(isPathSeparator(q.charCodeAt(q.length-1))){q=q.slice(0,-1)}}if(s.unescape===true){if(Q)Q=a.removeBackslashes(Q);if(q&&H===true){q=a.removeBackslashes(q)}}const Z={prefix:X,input:r,start:N,base:q,glob:Q,isBrace:D,isBracket:P,isGlob:L,isExtglob:M,isGlobstar:$,negated:j,negatedExtglob:U};if(s.tokens===true){Z.maxDepth=0;if(!isPathSeparator(Y)){O.push(K)}Z.tokens=O}if(s.parts===true||s.tokens===true){let n;for(let a=0;a<C.length;a++){const l=n?n+1:N;const u=C[a];const f=r.slice(l,u);if(s.tokens){if(a===0&&N!==0){O[a].isPrefix=true;O[a].value=X}else{O[a].value=f}depth(O[a]);Z.maxDepth+=O[a].depth}if(a!==0||f!==""){T.push(f)}n=u}if(n&&n+1<r.length){const a=r.slice(n+1);T.push(a);if(s.tokens){O[O.length-1].value=a;depth(O[O.length-1]);Z.maxDepth+=O[O.length-1].depth}}Z.slashes=C;Z.parts=T}return Z};r.exports=scan},4059:(r,n,s)=>{"use strict";const a=s(6928);const l=process.platform==="win32";const{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:f,REGEX_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_GLOBAL:p}=s(5595);n.isObject=r=>r!==null&&typeof r==="object"&&!Array.isArray(r);n.hasRegexChars=r=>d.test(r);n.isRegexChar=r=>r.length===1&&n.hasRegexChars(r);n.escapeRegex=r=>r.replace(p,"\\$1");n.toPosixSlashes=r=>r.replace(u,"/");n.removeBackslashes=r=>r.replace(f,(r=>r==="\\"?"":r));n.supportsLookbehinds=()=>{const r=process.version.slice(1).split(".").map(Number);if(r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10){return true}return false};n.isWindows=r=>{if(r&&typeof r.windows==="boolean"){return r.windows}return l===true||a.sep==="\\"};n.escapeLast=(r,s,a)=>{const l=r.lastIndexOf(s,a);if(l===-1)return r;if(r[l-1]==="\\")return n.escapeLast(r,s,l-1);return`${r.slice(0,l)}\\${r.slice(l)}`};n.removePrefix=(r,n={})=>{let s=r;if(s.startsWith("./")){s=s.slice(2);n.prefix="./"}return s};n.wrapOutput=(r,n={},s={})=>{const a=s.contains?"":"^";const l=s.contains?"":"$";let u=`${a}(?:${r})${l}`;if(n.negated===true){u=`(?:^(?!${u}).*$)`}return u}},7525:(r,n,s)=>{"use strict";const a=s(9896);const{Readable:l}=s(2203);const u=s(6928);const{promisify:f}=s(9023);const d=s(4006);const p=f(a.readdir);const m=f(a.stat);const g=f(a.lstat);const y=f(a.realpath);const v="!";const b="READDIRP_RECURSIVE_ERROR";const w=new Set(["ENOENT","EPERM","EACCES","ELOOP",b]);const _="files";const S="directories";const E="files_directories";const x="all";const A=[_,S,E,x];const isNormalFlowError=r=>w.has(r.code);const[k,C]=process.versions.node.split(".").slice(0,2).map((r=>Number.parseInt(r,10)));const O=process.platform==="win32"&&(k>10||k===10&&C>=5);const normalizeFilter=r=>{if(r===undefined)return;if(typeof r==="function")return r;if(typeof r==="string"){const n=d(r.trim());return r=>n(r.basename)}if(Array.isArray(r)){const n=[];const s=[];for(const a of r){const r=a.trim();if(r.charAt(0)===v){s.push(d(r.slice(1)))}else{n.push(d(r))}}if(s.length>0){if(n.length>0){return r=>n.some((n=>n(r.basename)))&&!s.some((n=>n(r.basename)))}return r=>!s.some((n=>n(r.basename)))}return r=>n.some((n=>n(r.basename)))}};class ReaddirpStream extends l{static get defaultOptions(){return{root:".",fileFilter:r=>true,directoryFilter:r=>true,type:_,lstat:false,depth:2147483648,alwaysStat:false}}constructor(r={}){super({objectMode:true,autoDestroy:true,highWaterMark:r.highWaterMark||4096});const n={...ReaddirpStream.defaultOptions,...r};const{root:s,type:l}=n;this._fileFilter=normalizeFilter(n.fileFilter);this._directoryFilter=normalizeFilter(n.directoryFilter);const f=n.lstat?g:m;if(O){this._stat=r=>f(r,{bigint:true})}else{this._stat=f}this._maxDepth=n.depth;this._wantsDir=[S,E,x].includes(l);this._wantsFile=[_,E,x].includes(l);this._wantsEverything=l===x;this._root=u.resolve(s);this._isDirent="Dirent"in a&&!n.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};this.parents=[this._exploreDir(s,1)];this.reading=false;this.parent=undefined}async _read(r){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&r>0){const{path:n,depth:s,files:a=[]}=this.parent||{};if(a.length>0){const l=a.splice(0,r).map((r=>this._formatEntry(r,n)));for(const n of await Promise.all(l)){if(this.destroyed)return;const a=await this._getEntryType(n);if(a==="directory"&&this._directoryFilter(n)){if(s<=this._maxDepth){this.parents.push(this._exploreDir(n.fullPath,s+1))}if(this._wantsDir){this.push(n);r--}}else if((a==="file"||this._includeAsFile(n))&&this._fileFilter(n)){if(this._wantsFile){this.push(n);r--}}}}else{const r=this.parents.pop();if(!r){this.push(null);break}this.parent=await r;if(this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=false}}async _exploreDir(r,n){let s;try{s=await p(r,this._rdOptions)}catch(r){this._onError(r)}return{files:s,depth:n,path:r}}async _formatEntry(r,n){let s;try{const a=this._isDirent?r.name:r;const l=u.resolve(u.join(n,a));s={path:u.relative(this._root,l),fullPath:l,basename:a};s[this._statsProp]=this._isDirent?r:await this._stat(l)}catch(r){this._onError(r)}return s}_onError(r){if(isNormalFlowError(r)&&!this.destroyed){this.emit("warn",r)}else{this.destroy(r)}}async _getEntryType(r){const n=r&&r[this._statsProp];if(!n){return}if(n.isFile()){return"file"}if(n.isDirectory()){return"directory"}if(n&&n.isSymbolicLink()){const n=r.fullPath;try{const r=await y(n);const s=await g(r);if(s.isFile()){return"file"}if(s.isDirectory()){const s=r.length;if(n.startsWith(r)&&n.substr(s,1)===u.sep){const s=new Error(`Circular symlink detected: "${n}" points to "${r}"`);s.code=b;return this._onError(s)}return"directory"}}catch(r){this._onError(r)}}}_includeAsFile(r){const n=r&&r[this._statsProp];return n&&this._wantsEverything&&!n.isDirectory()}}const readdirp=(r,n={})=>{let s=n.entryType||n.type;if(s==="both")s=E;if(s)n.type=s;if(!r){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof r!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(s&&!A.includes(s)){throw new Error(`readdirp: Invalid type passed. Use one of ${A.join(", ")}`)}n.root=r;return new ReaddirpStream(n)};const readdirpPromise=(r,n={})=>new Promise(((s,a)=>{const l=[];readdirp(r,n).on("data",(r=>l.push(r))).on("end",(()=>s(l))).on("error",(r=>a(r)))}));readdirp.promise=readdirpPromise;readdirp.ReaddirpStream=ReaddirpStream;readdirp.default=readdirp;r.exports=readdirp},9152:(r,n,s)=>{"use strict";const a=s(7334);r.exports=(r="")=>{const n=r.match(a);if(!n){return null}const[s,l]=n[0].replace(/#! ?/,"").split(" ");const u=s.split("/").pop();if(u==="env"){return l}return l?`${u} ${l}`:u}},7334:r=>{"use strict";r.exports=/^#!(.*)/},7551:(r,n,s)=>{"use strict";
|
|
52
52
|
/*!
|
|
53
53
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
54
54
|
*
|
|
55
55
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
56
56
|
* Released under the MIT License.
|
|
57
|
-
*/const n=r(5680);const toRegexRange=(e,t,r)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(n(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let s=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let c=String(i.wrap);let l=e+":"+t+"="+s+o+a+c;if(toRegexRange.cache.hasOwnProperty(l)){return toRegexRange.cache[l].result}let u=Math.min(e,t);let f=Math.max(e,t);if(Math.abs(u-f)===1){let r=e+"|"+t;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let h=hasPadding(e)||hasPadding(t);let d={min:e,max:t,a:u,b:f};let p=[];let m=[];if(h){d.isPadded=h;d.maxLen=String(d.max).length}if(u<0){let e=f<0?Math.abs(f):1;m=splitToPatterns(e,Math.abs(u),d,i);u=d.a=0}if(f>=0){p=splitToPatterns(u,f,d,i)}d.negatives=m;d.positives=p;d.result=collatePatterns(m,p,i);if(i.capture===true){d.result=`(${d.result})`}else if(i.wrap!==false&&p.length+m.length>1){d.result=`(?:${d.result})`}toRegexRange.cache[l]=d;return d.result};function collatePatterns(e,t,r){let n=filterPatterns(e,t,"-",false,r)||[];let i=filterPatterns(t,e,"",false,r)||[];let s=filterPatterns(e,t,"-?",true,r)||[];let o=n.concat(s).concat(i);return o.join("|")}function splitToRanges(e,t){let r=1;let n=1;let i=countNines(e,r);let s=new Set([t]);while(e<=i&&i<=t){s.add(i);r+=1;i=countNines(e,r)}i=countZeros(t+1,n)-1;while(e<i&&i<=t){s.add(i);n+=1;i=countZeros(t+1,n)-1}s=[...s];s.sort(compare);return s}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let n=zip(e,t);let i=n.length;let s="";let o=0;for(let e=0;e<i;e++){let[t,i]=n[e];if(t===i){s+=t}else if(t!=="0"||i!=="9"){s+=toCharacterClass(t,i,r)}else{o++}}if(o){s+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:s,count:[o],digits:i}}function splitToPatterns(e,t,r,n){let i=splitToRanges(e,t);let s=[];let o=e;let a;for(let e=0;e<i.length;e++){let t=i[e];let c=rangeToPattern(String(o),String(t),n);let l="";if(!r.isPadded&&a&&a.pattern===c.pattern){if(a.count.length>1){a.count.pop()}a.count.push(c.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){l=padZeros(t,r,n)}c.string=l+c.pattern+toQuantifier(c.count);s.push(c);o=t+1;a=c}return s}function filterPatterns(e,t,r,n,i){let s=[];for(let i of e){let{string:e}=i;if(!n&&!contains(t,"string",e)){s.push(r+e)}if(n&&contains(t,"string",e)){s.push(r+e)}}return s}function zip(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let n=Math.abs(t.maxLen-String(e).length);let i=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},4207:(e,t,r)=>{const n=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const s=n?";":":";const o=r(7126);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||s;const i=e.match(/\//)||n&&e.match(/\\/)?[""]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=n?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=n?o.split(r):[""];if(n){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:n,pathExt:s,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=r=>new Promise(((s,o)=>{if(r===n.length)return t.all&&c.length?s(c):o(getNotFoundError(e));const a=n[r];const l=/^".*"$/.test(a)?a.slice(1,-1):a;const u=i.join(l,e);const f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;s(subStep(f,r,0))}));const subStep=(e,r,n)=>new Promise(((i,l)=>{if(n===s.length)return i(step(r+1));const u=s[n];o(e+u,{pathExt:a},((s,o)=>{if(!s&&o){if(t.all)c.push(e+u);else return i(e+u)}return i(subStep(e,r,n+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:s}=getPathInfo(e,t);const a=[];for(let c=0;c<r.length;c++){const l=r[c];const u=/^".*"$/.test(l)?l.slice(1,-1):l;const f=i.join(u,e);const h=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let e=0;e<n.length;e++){const r=h+n[e];try{const e=o.sync(r,{pathExt:s});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},8867:(e,t,r)=>{"use strict";const n=r(1518);n.createWebSocketStream=r(1658);n.Server=r(8887);n.Receiver=r(5066);n.Sender=r(6947);n.WebSocket=n;n.WebSocketServer=n.Server;e.exports=n},9436:(e,t,r)=>{"use strict";const{EMPTY_BUFFER:n}=r(5949);const i=Buffer[Symbol.species];function concat(e,t){if(e.length===0)return n;if(e.length===1)return e[0];const r=Buffer.allocUnsafe(t);let s=0;for(let t=0;t<e.length;t++){const n=e[t];r.set(n,s);s+=n.length}if(s<t){return new i(r.buffer,r.byteOffset,s)}return r}function _mask(e,t,r,n,i){for(let s=0;s<i;s++){r[n+s]=e[s]^t[s&3]}}function _unmask(e,t){for(let r=0;r<e.length;r++){e[r]^=t[r&3]}}function toArrayBuffer(e){if(e.length===e.buffer.byteLength){return e.buffer}return e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function toBuffer(e){toBuffer.readOnly=true;if(Buffer.isBuffer(e))return e;let t;if(e instanceof ArrayBuffer){t=new i(e)}else if(ArrayBuffer.isView(e)){t=new i(e.buffer,e.byteOffset,e.byteLength)}else{t=Buffer.from(e);toBuffer.readOnly=false}return t}e.exports={concat:concat,mask:_mask,toArrayBuffer:toArrayBuffer,toBuffer:toBuffer,unmask:_unmask};if(!process.env.WS_NO_BUFFER_UTIL){try{const t=r(1269);e.exports.mask=function(e,r,n,i,s){if(s<48)_mask(e,r,n,i,s);else t.mask(e,r,n,i,s)};e.exports.unmask=function(e,r){if(e.length<32)_unmask(e,r);else t.unmask(e,r)}}catch(e){}}},5949:e=>{"use strict";e.exports={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:()=>{}}},4561:(e,t,r)=>{"use strict";const{kForOnEventAttribute:n,kListener:i}=r(5949);const s=Symbol("kCode");const o=Symbol("kData");const a=Symbol("kError");const c=Symbol("kMessage");const l=Symbol("kReason");const u=Symbol("kTarget");const f=Symbol("kType");const h=Symbol("kWasClean");class Event{constructor(e){this[u]=null;this[f]=e}get target(){return this[u]}get type(){return this[f]}}Object.defineProperty(Event.prototype,"target",{enumerable:true});Object.defineProperty(Event.prototype,"type",{enumerable:true});class CloseEvent extends Event{constructor(e,t={}){super(e);this[s]=t.code===undefined?0:t.code;this[l]=t.reason===undefined?"":t.reason;this[h]=t.wasClean===undefined?false:t.wasClean}get code(){return this[s]}get reason(){return this[l]}get wasClean(){return this[h]}}Object.defineProperty(CloseEvent.prototype,"code",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"reason",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"wasClean",{enumerable:true});class ErrorEvent extends Event{constructor(e,t={}){super(e);this[a]=t.error===undefined?null:t.error;this[c]=t.message===undefined?"":t.message}get error(){return this[a]}get message(){return this[c]}}Object.defineProperty(ErrorEvent.prototype,"error",{enumerable:true});Object.defineProperty(ErrorEvent.prototype,"message",{enumerable:true});class MessageEvent extends Event{constructor(e,t={}){super(e);this[o]=t.data===undefined?null:t.data}get data(){return this[o]}}Object.defineProperty(MessageEvent.prototype,"data",{enumerable:true});const d={addEventListener(e,t,r={}){for(const s of this.listeners(e)){if(!r[n]&&s[i]===t&&!s[n]){return}}let s;if(e==="message"){s=function onMessage(e,r){const n=new MessageEvent("message",{data:r?e:e.toString()});n[u]=this;callListener(t,this,n)}}else if(e==="close"){s=function onClose(e,r){const n=new CloseEvent("close",{code:e,reason:r.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});n[u]=this;callListener(t,this,n)}}else if(e==="error"){s=function onError(e){const r=new ErrorEvent("error",{error:e,message:e.message});r[u]=this;callListener(t,this,r)}}else if(e==="open"){s=function onOpen(){const e=new Event("open");e[u]=this;callListener(t,this,e)}}else{return}s[n]=!!r[n];s[i]=t;if(r.once){this.once(e,s)}else{this.on(e,s)}},removeEventListener(e,t){for(const r of this.listeners(e)){if(r[i]===t&&!r[n]){this.removeListener(e,r);break}}}};e.exports={CloseEvent:CloseEvent,ErrorEvent:ErrorEvent,Event:Event,EventTarget:d,MessageEvent:MessageEvent};function callListener(e,t,r){if(typeof e==="object"&&e.handleEvent){e.handleEvent.call(e,r)}else{e.call(t,r)}}},2035:(e,t,r)=>{"use strict";const{tokenChars:n}=r(6279);function push(e,t,r){if(e[t]===undefined)e[t]=[r];else e[t].push(r)}function parse(e){const t=Object.create(null);let r=Object.create(null);let i=false;let s=false;let o=false;let a;let c;let l=-1;let u=-1;let f=-1;let h=0;for(;h<e.length;h++){u=e.charCodeAt(h);if(a===undefined){if(f===-1&&n[u]===1){if(l===-1)l=h}else if(h!==0&&(u===32||u===9)){if(f===-1&&l!==-1)f=h}else if(u===59||u===44){if(l===-1){throw new SyntaxError(`Unexpected character at index ${h}`)}if(f===-1)f=h;const n=e.slice(l,f);if(u===44){push(t,n,r);r=Object.create(null)}else{a=n}l=f=-1}else{throw new SyntaxError(`Unexpected character at index ${h}`)}}else if(c===undefined){if(f===-1&&n[u]===1){if(l===-1)l=h}else if(u===32||u===9){if(f===-1&&l!==-1)f=h}else if(u===59||u===44){if(l===-1){throw new SyntaxError(`Unexpected character at index ${h}`)}if(f===-1)f=h;push(r,e.slice(l,f),true);if(u===44){push(t,a,r);r=Object.create(null);a=undefined}l=f=-1}else if(u===61&&l!==-1&&f===-1){c=e.slice(l,h);l=f=-1}else{throw new SyntaxError(`Unexpected character at index ${h}`)}}else{if(s){if(n[u]!==1){throw new SyntaxError(`Unexpected character at index ${h}`)}if(l===-1)l=h;else if(!i)i=true;s=false}else if(o){if(n[u]===1){if(l===-1)l=h}else if(u===34&&l!==-1){o=false;f=h}else if(u===92){s=true}else{throw new SyntaxError(`Unexpected character at index ${h}`)}}else if(u===34&&e.charCodeAt(h-1)===61){o=true}else if(f===-1&&n[u]===1){if(l===-1)l=h}else if(l!==-1&&(u===32||u===9)){if(f===-1)f=h}else if(u===59||u===44){if(l===-1){throw new SyntaxError(`Unexpected character at index ${h}`)}if(f===-1)f=h;let n=e.slice(l,f);if(i){n=n.replace(/\\/g,"");i=false}push(r,c,n);if(u===44){push(t,a,r);r=Object.create(null);a=undefined}c=undefined;l=f=-1}else{throw new SyntaxError(`Unexpected character at index ${h}`)}}}if(l===-1||o||u===32||u===9){throw new SyntaxError("Unexpected end of input")}if(f===-1)f=h;const d=e.slice(l,f);if(a===undefined){push(t,d,r)}else{if(c===undefined){push(r,d,true)}else if(i){push(r,c,d.replace(/\\/g,""))}else{push(r,c,d)}push(t,a,r)}return t}function format(e){return Object.keys(e).map((t=>{let r=e[t];if(!Array.isArray(r))r=[r];return r.map((e=>[t].concat(Object.keys(e).map((t=>{let r=e[t];if(!Array.isArray(r))r=[r];return r.map((e=>e===true?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")}e.exports={format:format,parse:parse}},1356:e=>{"use strict";const t=Symbol("kDone");const r=Symbol("kRun");class Limiter{constructor(e){this[t]=()=>{this.pending--;this[r]()};this.concurrency=e||Infinity;this.jobs=[];this.pending=0}add(e){this.jobs.push(e);this[r]()}[r](){if(this.pending===this.concurrency)return;if(this.jobs.length){const e=this.jobs.shift();this.pending++;e(this[t])}}}e.exports=Limiter},6684:(e,t,r)=>{"use strict";const n=r(9796);const i=r(9436);const s=r(1356);const{kStatusCode:o}=r(5949);const a=Buffer[Symbol.species];const c=Buffer.from([0,0,255,255]);const l=Symbol("permessage-deflate");const u=Symbol("total-length");const f=Symbol("callback");const h=Symbol("buffers");const d=Symbol("error");let p;class PerMessageDeflate{constructor(e,t,r){this._maxPayload=r|0;this._options=e||{};this._threshold=this._options.threshold!==undefined?this._options.threshold:1024;this._isServer=!!t;this._deflate=null;this._inflate=null;this.params=null;if(!p){const e=this._options.concurrencyLimit!==undefined?this._options.concurrencyLimit:10;p=new s(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};if(this._options.serverNoContextTakeover){e.server_no_context_takeover=true}if(this._options.clientNoContextTakeover){e.client_no_context_takeover=true}if(this._options.serverMaxWindowBits){e.server_max_window_bits=this._options.serverMaxWindowBits}if(this._options.clientMaxWindowBits){e.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits==null){e.client_max_window_bits=true}return e}accept(e){e=this.normalizeParams(e);this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e);return this.params}cleanup(){if(this._inflate){this._inflate.close();this._inflate=null}if(this._deflate){const e=this._deflate[f];this._deflate.close();this._deflate=null;if(e){e(new Error("The deflate stream was closed while data was being processed"))}}}acceptAsServer(e){const t=this._options;const r=e.find((e=>{if(t.serverNoContextTakeover===false&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===false||typeof t.serverMaxWindowBits==="number"&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==="number"&&!e.client_max_window_bits){return false}return true}));if(!r){throw new Error("None of the extension offers can be accepted")}if(t.serverNoContextTakeover){r.server_no_context_takeover=true}if(t.clientNoContextTakeover){r.client_no_context_takeover=true}if(typeof t.serverMaxWindowBits==="number"){r.server_max_window_bits=t.serverMaxWindowBits}if(typeof t.clientMaxWindowBits==="number"){r.client_max_window_bits=t.clientMaxWindowBits}else if(r.client_max_window_bits===true||t.clientMaxWindowBits===false){delete r.client_max_window_bits}return r}acceptAsClient(e){const t=e[0];if(this._options.clientNoContextTakeover===false&&t.client_no_context_takeover){throw new Error('Unexpected parameter "client_no_context_takeover"')}if(!t.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number"){t.client_max_window_bits=this._options.clientMaxWindowBits}}else if(this._options.clientMaxWindowBits===false||typeof this._options.clientMaxWindowBits==="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits){throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}return t}normalizeParams(e){e.forEach((e=>{Object.keys(e).forEach((t=>{let r=e[t];if(r.length>1){throw new Error(`Parameter "${t}" must have only a single value`)}r=r[0];if(t==="client_max_window_bits"){if(r!==true){const e=+r;if(!Number.isInteger(e)||e<8||e>15){throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}r=e}else if(!this._isServer){throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}}else if(t==="server_max_window_bits"){const e=+r;if(!Number.isInteger(e)||e<8||e>15){throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}r=e}else if(t==="client_no_context_takeover"||t==="server_no_context_takeover"){if(r!==true){throw new TypeError(`Invalid value for parameter "${t}": ${r}`)}}else{throw new Error(`Unknown parameter "${t}"`)}e[t]=r}))}));return e}decompress(e,t,r){p.add((n=>{this._decompress(e,t,((e,t)=>{n();r(e,t)}))}))}compress(e,t,r){p.add((n=>{this._compress(e,t,((e,t)=>{n();r(e,t)}))}))}_decompress(e,t,r){const s=this._isServer?"client":"server";if(!this._inflate){const e=`${s}_max_window_bits`;const t=typeof this.params[e]!=="number"?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t});this._inflate[l]=this;this._inflate[u]=0;this._inflate[h]=[];this._inflate.on("error",inflateOnError);this._inflate.on("data",inflateOnData)}this._inflate[f]=r;this._inflate.write(e);if(t)this._inflate.write(c);this._inflate.flush((()=>{const e=this._inflate[d];if(e){this._inflate.close();this._inflate=null;r(e);return}const n=i.concat(this._inflate[h],this._inflate[u]);if(this._inflate._readableState.endEmitted){this._inflate.close();this._inflate=null}else{this._inflate[u]=0;this._inflate[h]=[];if(t&&this.params[`${s}_no_context_takeover`]){this._inflate.reset()}}r(null,n)}))}_compress(e,t,r){const s=this._isServer?"server":"client";if(!this._deflate){const e=`${s}_max_window_bits`;const t=typeof this.params[e]!=="number"?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t});this._deflate[u]=0;this._deflate[h]=[];this._deflate.on("data",deflateOnData)}this._deflate[f]=r;this._deflate.write(e);this._deflate.flush(n.Z_SYNC_FLUSH,(()=>{if(!this._deflate){return}let e=i.concat(this._deflate[h],this._deflate[u]);if(t){e=new a(e.buffer,e.byteOffset,e.length-4)}this._deflate[f]=null;this._deflate[u]=0;this._deflate[h]=[];if(t&&this.params[`${s}_no_context_takeover`]){this._deflate.reset()}r(null,e)}))}}e.exports=PerMessageDeflate;function deflateOnData(e){this[h].push(e);this[u]+=e.length}function inflateOnData(e){this[u]+=e.length;if(this[l]._maxPayload<1||this[u]<=this[l]._maxPayload){this[h].push(e);return}this[d]=new RangeError("Max payload size exceeded");this[d].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";this[d][o]=1009;this.removeListener("data",inflateOnData);this.reset()}function inflateOnError(e){this[l]._inflate=null;e[o]=1007;this[f](e)}},5066:(e,t,r)=>{"use strict";const{Writable:n}=r(2781);const i=r(6684);const{BINARY_TYPES:s,EMPTY_BUFFER:o,kStatusCode:a,kWebSocket:c}=r(5949);const{concat:l,toArrayBuffer:u,unmask:f}=r(9436);const{isValidStatusCode:h,isValidUTF8:d}=r(6279);const p=Buffer[Symbol.species];const m=0;const v=1;const _=2;const g=3;const y=4;const w=5;const b=6;class Receiver extends n{constructor(e={}){super();this._allowSynchronousEvents=e.allowSynchronousEvents!==undefined?e.allowSynchronousEvents:true;this._binaryType=e.binaryType||s[0];this._extensions=e.extensions||{};this._isServer=!!e.isServer;this._maxPayload=e.maxPayload|0;this._skipUTF8Validation=!!e.skipUTF8Validation;this[c]=undefined;this._bufferedBytes=0;this._buffers=[];this._compressed=false;this._payloadLength=0;this._mask=undefined;this._fragmented=0;this._masked=false;this._fin=false;this._opcode=0;this._totalPayloadLength=0;this._messageLength=0;this._fragments=[];this._errored=false;this._loop=false;this._state=m}_write(e,t,r){if(this._opcode===8&&this._state==m)return r();this._bufferedBytes+=e.length;this._buffers.push(e);this.startLoop(r)}consume(e){this._bufferedBytes-=e;if(e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e);return new p(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const r=this._buffers[0];const n=t.length-e;if(e>=r.length){t.set(this._buffers.shift(),n)}else{t.set(new Uint8Array(r.buffer,r.byteOffset,e),n);this._buffers[0]=new p(r.buffer,r.byteOffset+e,r.length-e)}e-=r.length}while(e>0);return t}startLoop(e){this._loop=true;do{switch(this._state){case m:this.getInfo(e);break;case v:this.getPayloadLength16(e);break;case _:this.getPayloadLength64(e);break;case g:this.getMask();break;case y:this.getData(e);break;case w:case b:this._loop=false;return}}while(this._loop);if(!this._errored)e()}getInfo(e){if(this._bufferedBytes<2){this._loop=false;return}const t=this.consume(2);if((t[0]&48)!==0){const t=this.createError(RangeError,"RSV2 and RSV3 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(t);return}const r=(t[0]&64)===64;if(r&&!this._extensions[i.extensionName]){const t=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");e(t);return}this._fin=(t[0]&128)===128;this._opcode=t[0]&15;this._payloadLength=t[1]&127;if(this._opcode===0){if(r){const t=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");e(t);return}if(!this._fragmented){const t=this.createError(RangeError,"invalid opcode 0",true,1002,"WS_ERR_INVALID_OPCODE");e(t);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){const t=this.createError(RangeError,`invalid opcode ${this._opcode}`,true,1002,"WS_ERR_INVALID_OPCODE");e(t);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){const t=this.createError(RangeError,"FIN must be set",true,1002,"WS_ERR_EXPECTED_FIN");e(t);return}if(r){const t=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");e(t);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){const t=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,true,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(t);return}}else{const t=this.createError(RangeError,`invalid opcode ${this._opcode}`,true,1002,"WS_ERR_INVALID_OPCODE");e(t);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;this._masked=(t[1]&128)===128;if(this._isServer){if(!this._masked){const t=this.createError(RangeError,"MASK must be set",true,1002,"WS_ERR_EXPECTED_MASK");e(t);return}}else if(this._masked){const t=this.createError(RangeError,"MASK must be clear",true,1002,"WS_ERR_UNEXPECTED_MASK");e(t);return}if(this._payloadLength===126)this._state=v;else if(this._payloadLength===127)this._state=_;else this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=false;return}this._payloadLength=this.consume(2).readUInt16BE(0);this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=false;return}const t=this.consume(8);const r=t.readUInt32BE(0);if(r>Math.pow(2,53-32)-1){const t=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",false,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(t);return}this._payloadLength=r*Math.pow(2,32)+t.readUInt32BE(4);this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8){this._totalPayloadLength+=this._payloadLength;if(this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){const t=this.createError(RangeError,"Max payload size exceeded",false,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}}if(this._masked)this._state=g;else this._state=y}getMask(){if(this._bufferedBytes<4){this._loop=false;return}this._mask=this.consume(4);this._state=y}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=false;return}t=this.consume(this._payloadLength);if(this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0){f(t,this._mask)}}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=w;this.decompress(t,e);return}if(t.length){this._messageLength=this._totalPayloadLength;this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){const r=this._extensions[i.extensionName];r.decompress(e,this._fin,((e,r)=>{if(e)return t(e);if(r.length){this._messageLength+=r.length;if(this._messageLength>this._maxPayload&&this._maxPayload>0){const e=this.createError(RangeError,"Max payload size exceeded",false,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(e);return}this._fragments.push(r)}this.dataMessage(t);if(this._state===m)this.startLoop(t)}))}dataMessage(e){if(!this._fin){this._state=m;return}const t=this._messageLength;const r=this._fragments;this._totalPayloadLength=0;this._messageLength=0;this._fragmented=0;this._fragments=[];if(this._opcode===2){let n;if(this._binaryType==="nodebuffer"){n=l(r,t)}else if(this._binaryType==="arraybuffer"){n=u(l(r,t))}else{n=r}if(this._allowSynchronousEvents){this.emit("message",n,true);this._state=m}else{this._state=b;setImmediate((()=>{this.emit("message",n,true);this._state=m;this.startLoop(e)}))}}else{const n=l(r,t);if(!this._skipUTF8Validation&&!d(n)){const t=this.createError(Error,"invalid UTF-8 sequence",true,1007,"WS_ERR_INVALID_UTF8");e(t);return}if(this._state===w||this._allowSynchronousEvents){this.emit("message",n,false);this._state=m}else{this._state=b;setImmediate((()=>{this.emit("message",n,false);this._state=m;this.startLoop(e)}))}}}controlMessage(e,t){if(this._opcode===8){if(e.length===0){this._loop=false;this.emit("conclude",1005,o);this.end()}else{const r=e.readUInt16BE(0);if(!h(r)){const e=this.createError(RangeError,`invalid status code ${r}`,true,1002,"WS_ERR_INVALID_CLOSE_CODE");t(e);return}const n=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!d(n)){const e=this.createError(Error,"invalid UTF-8 sequence",true,1007,"WS_ERR_INVALID_UTF8");t(e);return}this._loop=false;this.emit("conclude",r,n);this.end()}this._state=m;return}if(this._allowSynchronousEvents){this.emit(this._opcode===9?"ping":"pong",e);this._state=m}else{this._state=b;setImmediate((()=>{this.emit(this._opcode===9?"ping":"pong",e);this._state=m;this.startLoop(t)}))}}createError(e,t,r,n,i){this._loop=false;this._errored=true;const s=new e(r?`Invalid WebSocket frame: ${t}`:t);Error.captureStackTrace(s,this.createError);s.code=i;s[a]=n;return s}}e.exports=Receiver},6947:(e,t,r)=>{"use strict";const{Duplex:n}=r(2781);const{randomFillSync:i}=r(6113);const s=r(6684);const{EMPTY_BUFFER:o}=r(5949);const{isValidStatusCode:a}=r(6279);const{mask:c,toBuffer:l}=r(9436);const u=Symbol("kByteLength");const f=Buffer.alloc(4);class Sender{constructor(e,t,r){this._extensions=t||{};if(r){this._generateMask=r;this._maskBuffer=Buffer.alloc(4)}this._socket=e;this._firstFragment=true;this._compress=false;this._bufferedBytes=0;this._deflating=false;this._queue=[]}static frame(e,t){let r;let n=false;let s=2;let o=false;if(t.mask){r=t.maskBuffer||f;if(t.generateMask){t.generateMask(r)}else{i(r,0,4)}o=(r[0]|r[1]|r[2]|r[3])===0;s=6}let a;if(typeof e==="string"){if((!t.mask||o)&&t[u]!==undefined){a=t[u]}else{e=Buffer.from(e);a=e.length}}else{a=e.length;n=t.mask&&t.readOnly&&!o}let l=a;if(a>=65536){s+=8;l=127}else if(a>125){s+=2;l=126}const h=Buffer.allocUnsafe(n?a+s:s);h[0]=t.fin?t.opcode|128:t.opcode;if(t.rsv1)h[0]|=64;h[1]=l;if(l===126){h.writeUInt16BE(a,2)}else if(l===127){h[2]=h[3]=0;h.writeUIntBE(a,4,6)}if(!t.mask)return[h,e];h[1]|=128;h[s-4]=r[0];h[s-3]=r[1];h[s-2]=r[2];h[s-1]=r[3];if(o)return[h,e];if(n){c(e,r,h,s,a);return[h]}c(e,r,e,0,a);return[h,e]}close(e,t,r,n){let i;if(e===undefined){i=o}else if(typeof e!=="number"||!a(e)){throw new TypeError("First argument must be a valid error code number")}else if(t===undefined||!t.length){i=Buffer.allocUnsafe(2);i.writeUInt16BE(e,0)}else{const r=Buffer.byteLength(t);if(r>123){throw new RangeError("The message must not be greater than 123 bytes")}i=Buffer.allocUnsafe(2+r);i.writeUInt16BE(e,0);if(typeof t==="string"){i.write(t,2)}else{i.set(t,2)}}const s={[u]:i.length,fin:true,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:false,rsv1:false};if(this._deflating){this.enqueue([this.dispatch,i,false,s,n])}else{this.sendFrame(Sender.frame(i,s),n)}}ping(e,t,r){let n;let i;if(typeof e==="string"){n=Buffer.byteLength(e);i=false}else{e=l(e);n=e.length;i=l.readOnly}if(n>125){throw new RangeError("The data size must not be greater than 125 bytes")}const s={[u]:n,fin:true,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:false};if(this._deflating){this.enqueue([this.dispatch,e,false,s,r])}else{this.sendFrame(Sender.frame(e,s),r)}}pong(e,t,r){let n;let i;if(typeof e==="string"){n=Buffer.byteLength(e);i=false}else{e=l(e);n=e.length;i=l.readOnly}if(n>125){throw new RangeError("The data size must not be greater than 125 bytes")}const s={[u]:n,fin:true,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:false};if(this._deflating){this.enqueue([this.dispatch,e,false,s,r])}else{this.sendFrame(Sender.frame(e,s),r)}}send(e,t,r){const n=this._extensions[s.extensionName];let i=t.binary?2:1;let o=t.compress;let a;let c;if(typeof e==="string"){a=Buffer.byteLength(e);c=false}else{e=l(e);a=e.length;c=l.readOnly}if(this._firstFragment){this._firstFragment=false;if(o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]){o=a>=n._threshold}this._compress=o}else{o=false;i=0}if(t.fin)this._firstFragment=true;if(n){const n={[u]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};if(this._deflating){this.enqueue([this.dispatch,e,this._compress,n,r])}else{this.dispatch(e,this._compress,n,r)}}else{this.sendFrame(Sender.frame(e,{[u]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:false}),r)}}dispatch(e,t,r,n){if(!t){this.sendFrame(Sender.frame(e,r),n);return}const i=this._extensions[s.extensionName];this._bufferedBytes+=r[u];this._deflating=true;i.compress(e,r.fin,((e,t)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");if(typeof n==="function")n(e);for(let t=0;t<this._queue.length;t++){const r=this._queue[t];const n=r[r.length-1];if(typeof n==="function")n(e)}return}this._bufferedBytes-=r[u];this._deflating=false;r.readOnly=false;this.sendFrame(Sender.frame(t,r),n);this.dequeue()}))}dequeue(){while(!this._deflating&&this._queue.length){const e=this._queue.shift();this._bufferedBytes-=e[3][u];Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][u];this._queue.push(e)}sendFrame(e,t){if(e.length===2){this._socket.cork();this._socket.write(e[0]);this._socket.write(e[1],t);this._socket.uncork()}else{this._socket.write(e[0],t)}}}e.exports=Sender},1658:(e,t,r)=>{"use strict";const{Duplex:n}=r(2781);function emitClose(e){e.emit("close")}function duplexOnEnd(){if(!this.destroyed&&this._writableState.finished){this.destroy()}}function duplexOnError(e){this.removeListener("error",duplexOnError);this.destroy();if(this.listenerCount("error")===0){this.emit("error",e)}}function createWebSocketStream(e,t){let r=true;const i=new n({...t,autoDestroy:false,emitClose:false,objectMode:false,writableObjectMode:false});e.on("message",(function message(t,r){const n=!r&&i._readableState.objectMode?t.toString():t;if(!i.push(n))e.pause()}));e.once("error",(function error(e){if(i.destroyed)return;r=false;i.destroy(e)}));e.once("close",(function close(){if(i.destroyed)return;i.push(null)}));i._destroy=function(t,n){if(e.readyState===e.CLOSED){n(t);process.nextTick(emitClose,i);return}let s=false;e.once("error",(function error(e){s=true;n(e)}));e.once("close",(function close(){if(!s)n(t);process.nextTick(emitClose,i)}));if(r)e.terminate()};i._final=function(t){if(e.readyState===e.CONNECTING){e.once("open",(function open(){i._final(t)}));return}if(e._socket===null)return;if(e._socket._writableState.finished){t();if(i._readableState.endEmitted)i.destroy()}else{e._socket.once("finish",(function finish(){t()}));e.close()}};i._read=function(){if(e.isPaused)e.resume()};i._write=function(t,r,n){if(e.readyState===e.CONNECTING){e.once("open",(function open(){i._write(t,r,n)}));return}e.send(t,n)};i.on("end",duplexOnEnd);i.on("error",duplexOnError);return i}e.exports=createWebSocketStream},6668:(e,t,r)=>{"use strict";const{tokenChars:n}=r(6279);function parse(e){const t=new Set;let r=-1;let i=-1;let s=0;for(s;s<e.length;s++){const o=e.charCodeAt(s);if(i===-1&&n[o]===1){if(r===-1)r=s}else if(s!==0&&(o===32||o===9)){if(i===-1&&r!==-1)i=s}else if(o===44){if(r===-1){throw new SyntaxError(`Unexpected character at index ${s}`)}if(i===-1)i=s;const n=e.slice(r,i);if(t.has(n)){throw new SyntaxError(`The "${n}" subprotocol is duplicated`)}t.add(n);r=i=-1}else{throw new SyntaxError(`Unexpected character at index ${s}`)}}if(r===-1||i!==-1){throw new SyntaxError("Unexpected end of input")}const o=e.slice(r,s);if(t.has(o)){throw new SyntaxError(`The "${o}" subprotocol is duplicated`)}t.add(o);return t}e.exports={parse:parse}},6279:(e,t,r)=>{"use strict";const{isUtf8:n}=r(4300);const i=[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];function isValidStatusCode(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function _isValidUTF8(e){const t=e.length;let r=0;while(r<t){if((e[r]&128)===0){r++}else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192){return false}r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160){return false}r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244){return false}r+=4}else{return false}}return true}e.exports={isValidStatusCode:isValidStatusCode,isValidUTF8:_isValidUTF8,tokenChars:i};if(n){e.exports.isValidUTF8=function(e){return e.length<24?_isValidUTF8(e):n(e)}}else if(!process.env.WS_NO_UTF_8_VALIDATE){try{const t=r(4592);e.exports.isValidUTF8=function(e){return e.length<32?_isValidUTF8(e):t(e)}}catch(e){}}},8887:(e,t,r)=>{"use strict";const n=r(2361);const i=r(3685);const{Duplex:s}=r(2781);const{createHash:o}=r(6113);const a=r(2035);const c=r(6684);const l=r(6668);const u=r(1518);const{GUID:f,kWebSocket:h}=r(5949);const d=/^[+/0-9A-Za-z]{22}==$/;const p=0;const m=1;const v=2;class WebSocketServer extends n{constructor(e,t){super();e={allowSynchronousEvents:true,autoPong:true,maxPayload:100*1024*1024,skipUTF8Validation:false,perMessageDeflate:false,handleProtocols:null,clientTracking:true,verifyClient:null,noServer:false,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e};if(e.port==null&&!e.server&&!e.noServer||e.port!=null&&(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(e.port!=null){this._server=i.createServer(((e,t)=>{const r=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"});t.end(r)}));this._server.listen(e.port,e.host,e.backlog,t)}else if(e.server){this._server=e.server}if(this._server){const e=this.emit.bind(this,"connection");this._removeListeners=addListeners(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,r,n)=>{this.handleUpgrade(t,r,n,e)}})}if(e.perMessageDeflate===true)e.perMessageDeflate={};if(e.clientTracking){this.clients=new Set;this._shouldEmitClose=false}this.options=e;this._state=p}address(){if(this.options.noServer){throw new Error('The server is operating in "noServer" mode')}if(!this._server)return null;return this._server.address()}close(e){if(this._state===v){if(e){this.once("close",(()=>{e(new Error("The server is not running"))}))}process.nextTick(emitClose,this);return}if(e)this.once("close",e);if(this._state===m)return;this._state=m;if(this.options.noServer||this.options.server){if(this._server){this._removeListeners();this._removeListeners=this._server=null}if(this.clients){if(!this.clients.size){process.nextTick(emitClose,this)}else{this._shouldEmitClose=true}}else{process.nextTick(emitClose,this)}}else{const e=this._server;this._removeListeners();this._removeListeners=this._server=null;e.close((()=>{emitClose(this)}))}}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");const r=t!==-1?e.url.slice(0,t):e.url;if(r!==this.options.path)return false}return true}handleUpgrade(e,t,r,n){t.on("error",socketOnError);const i=e.headers["sec-websocket-key"];const s=+e.headers["sec-websocket-version"];if(e.method!=="GET"){const r="Invalid HTTP method";abortHandshakeOrEmitwsClientError(this,e,t,405,r);return}if(e.headers.upgrade.toLowerCase()!=="websocket"){const r="Invalid Upgrade header";abortHandshakeOrEmitwsClientError(this,e,t,400,r);return}if(!i||!d.test(i)){const r="Missing or invalid Sec-WebSocket-Key header";abortHandshakeOrEmitwsClientError(this,e,t,400,r);return}if(s!==8&&s!==13){const r="Missing or invalid Sec-WebSocket-Version header";abortHandshakeOrEmitwsClientError(this,e,t,400,r);return}if(!this.shouldHandle(e)){abortHandshake(t,400);return}const o=e.headers["sec-websocket-protocol"];let u=new Set;if(o!==undefined){try{u=l.parse(o)}catch(r){const n="Invalid Sec-WebSocket-Protocol header";abortHandshakeOrEmitwsClientError(this,e,t,400,n);return}}const f=e.headers["sec-websocket-extensions"];const h={};if(this.options.perMessageDeflate&&f!==undefined){const r=new c(this.options.perMessageDeflate,true,this.options.maxPayload);try{const e=a.parse(f);if(e[c.extensionName]){r.accept(e[c.extensionName]);h[c.extensionName]=r}}catch(r){const n="Invalid or unacceptable Sec-WebSocket-Extensions header";abortHandshakeOrEmitwsClientError(this,e,t,400,n);return}}if(this.options.verifyClient){const o={origin:e.headers[`${s===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(o,((s,o,a,c)=>{if(!s){return abortHandshake(t,o||401,a,c)}this.completeUpgrade(h,i,u,e,t,r,n)}));return}if(!this.options.verifyClient(o))return abortHandshake(t,401)}this.completeUpgrade(h,i,u,e,t,r,n)}completeUpgrade(e,t,r,n,i,s,l){if(!i.readable||!i.writable)return i.destroy();if(i[h]){throw new Error("server.handleUpgrade() was called more than once with the same "+"socket, possibly due to a misconfiguration")}if(this._state>p)return abortHandshake(i,503);const u=o("sha1").update(t+f).digest("base64");const d=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${u}`];const m=new this.options.WebSocket(null,undefined,this.options);if(r.size){const e=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;if(e){d.push(`Sec-WebSocket-Protocol: ${e}`);m._protocol=e}}if(e[c.extensionName]){const t=e[c.extensionName].params;const r=a.format({[c.extensionName]:[t]});d.push(`Sec-WebSocket-Extensions: ${r}`);m._extensions=e}this.emit("headers",d,n);i.write(d.concat("\r\n").join("\r\n"));i.removeListener("error",socketOnError);m.setSocket(i,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation});if(this.clients){this.clients.add(m);m.on("close",(()=>{this.clients.delete(m);if(this._shouldEmitClose&&!this.clients.size){process.nextTick(emitClose,this)}}))}l(m,n)}}e.exports=WebSocketServer;function addListeners(e,t){for(const r of Object.keys(t))e.on(r,t[r]);return function removeListeners(){for(const r of Object.keys(t)){e.removeListener(r,t[r])}}}function emitClose(e){e._state=v;e.emit("close")}function socketOnError(){this.destroy()}function abortHandshake(e,t,r,n){r=r||i.STATUS_CODES[t];n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...n};e.once("finish",e.destroy);e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(n).map((e=>`${e}: ${n[e]}`)).join("\r\n")+"\r\n\r\n"+r)}function abortHandshakeOrEmitwsClientError(e,t,r,n,i){if(e.listenerCount("wsClientError")){const n=new Error(i);Error.captureStackTrace(n,abortHandshakeOrEmitwsClientError);e.emit("wsClientError",n,r,t)}else{abortHandshake(r,n,i)}}},1518:(e,t,r)=>{"use strict";const n=r(2361);const i=r(5687);const s=r(3685);const o=r(1808);const a=r(4404);const{randomBytes:c,createHash:l}=r(6113);const{Duplex:u,Readable:f}=r(2781);const{URL:h}=r(7310);const d=r(6684);const p=r(5066);const m=r(6947);const{BINARY_TYPES:v,EMPTY_BUFFER:_,GUID:g,kForOnEventAttribute:y,kListener:w,kStatusCode:b,kWebSocket:E,NOOP:S}=r(5949);const{EventTarget:{addEventListener:x,removeEventListener:A}}=r(4561);const{format:k,parse:C}=r(2035);const{toBuffer:R}=r(9436);const O=30*1e3;const T=Symbol("kAborted");const I=[8,13];const P=["CONNECTING","OPEN","CLOSING","CLOSED"];const N=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class WebSocket extends n{constructor(e,t,r){super();this._binaryType=v[0];this._closeCode=1006;this._closeFrameReceived=false;this._closeFrameSent=false;this._closeMessage=_;this._closeTimer=null;this._extensions={};this._paused=false;this._protocol="";this._readyState=WebSocket.CONNECTING;this._receiver=null;this._sender=null;this._socket=null;if(e!==null){this._bufferedAmount=0;this._isServer=false;this._redirects=0;if(t===undefined){t=[]}else if(!Array.isArray(t)){if(typeof t==="object"&&t!==null){r=t;t=[]}else{t=[t]}}initAsClient(this,e,t,r)}else{this._autoPong=r.autoPong;this._isServer=true}}get binaryType(){return this._binaryType}set binaryType(e){if(!v.includes(e))return;this._binaryType=e;if(this._receiver)this._receiver._binaryType=e}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}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(e,t,r){const n=new p({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new m(e,this._extensions,r.generateMask);this._receiver=n;this._socket=e;n[E]=this;e[E]=this;n.on("conclude",receiverOnConclude);n.on("drain",receiverOnDrain);n.on("error",receiverOnError);n.on("message",receiverOnMessage);n.on("ping",receiverOnPing);n.on("pong",receiverOnPong);if(e.setTimeout)e.setTimeout(0);if(e.setNoDelay)e.setNoDelay();if(t.length>0)e.unshift(t);e.on("close",socketOnClose);e.on("data",socketOnData);e.on("end",socketOnEnd);e.on("error",socketOnError);this._readyState=WebSocket.OPEN;this.emit("open")}emitClose(){if(!this._socket){this._readyState=WebSocket.CLOSED;this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[d.extensionName]){this._extensions[d.extensionName].cleanup()}this._receiver.removeAllListeners();this._readyState=WebSocket.CLOSED;this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState===WebSocket.CLOSED)return;if(this.readyState===WebSocket.CONNECTING){const e="WebSocket was closed before the connection was established";abortHandshake(this,this._req,e);return}if(this.readyState===WebSocket.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)){this._socket.end()}return}this._readyState=WebSocket.CLOSING;this._sender.close(e,t,!this._isServer,(e=>{if(e)return;this._closeFrameSent=true;if(this._closeFrameReceived||this._receiver._writableState.errorEmitted){this._socket.end()}}));this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),O)}pause(){if(this.readyState===WebSocket.CONNECTING||this.readyState===WebSocket.CLOSED){return}this._paused=true;this._socket.pause()}ping(e,t,r){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof e==="function"){r=e;e=t=undefined}else if(typeof t==="function"){r=t;t=undefined}if(typeof e==="number")e=e.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,e,r);return}if(t===undefined)t=!this._isServer;this._sender.ping(e||_,t,r)}pong(e,t,r){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof e==="function"){r=e;e=t=undefined}else if(typeof t==="function"){r=t;t=undefined}if(typeof e==="number")e=e.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,e,r);return}if(t===undefined)t=!this._isServer;this._sender.pong(e||_,t,r)}resume(){if(this.readyState===WebSocket.CONNECTING||this.readyState===WebSocket.CLOSED){return}this._paused=false;if(!this._receiver._writableState.needDrain)this._socket.resume()}send(e,t,r){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof t==="function"){r=t;t={}}if(typeof e==="number")e=e.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,e,r);return}const n={binary:typeof e!=="string",mask:!this._isServer,compress:true,fin:true,...t};if(!this._extensions[d.extensionName]){n.compress=false}this._sender.send(e||_,n,r)}terminate(){if(this.readyState===WebSocket.CLOSED)return;if(this.readyState===WebSocket.CONNECTING){const e="WebSocket was closed before the connection was established";abortHandshake(this,this._req,e);return}if(this._socket){this._readyState=WebSocket.CLOSING;this._socket.destroy()}}}Object.defineProperty(WebSocket,"CONNECTING",{enumerable:true,value:P.indexOf("CONNECTING")});Object.defineProperty(WebSocket.prototype,"CONNECTING",{enumerable:true,value:P.indexOf("CONNECTING")});Object.defineProperty(WebSocket,"OPEN",{enumerable:true,value:P.indexOf("OPEN")});Object.defineProperty(WebSocket.prototype,"OPEN",{enumerable:true,value:P.indexOf("OPEN")});Object.defineProperty(WebSocket,"CLOSING",{enumerable:true,value:P.indexOf("CLOSING")});Object.defineProperty(WebSocket.prototype,"CLOSING",{enumerable:true,value:P.indexOf("CLOSING")});Object.defineProperty(WebSocket,"CLOSED",{enumerable:true,value:P.indexOf("CLOSED")});Object.defineProperty(WebSocket.prototype,"CLOSED",{enumerable:true,value:P.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(WebSocket.prototype,e,{enumerable:true})}));["open","error","close","message"].forEach((e=>{Object.defineProperty(WebSocket.prototype,`on${e}`,{enumerable:true,get(){for(const t of this.listeners(e)){if(t[y])return t[w]}return null},set(t){for(const t of this.listeners(e)){if(t[y]){this.removeListener(e,t);break}}if(typeof t!=="function")return;this.addEventListener(e,t,{[y]:true})}})}));WebSocket.prototype.addEventListener=x;WebSocket.prototype.removeEventListener=A;e.exports=WebSocket;function initAsClient(e,t,r,n){const o={allowSynchronousEvents:true,autoPong:true,protocolVersion:I[1],maxPayload:100*1024*1024,skipUTF8Validation:false,perMessageDeflate:true,followRedirects:false,maxRedirects:10,...n,socketPath:undefined,hostname:undefined,protocol:undefined,timeout:undefined,method:"GET",host:undefined,path:undefined,port:undefined};e._autoPong=o.autoPong;if(!I.includes(o.protocolVersion)){throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} `+`(supported versions: ${I.join(", ")})`)}let a;if(t instanceof h){a=t}else{try{a=new h(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}}if(a.protocol==="http:"){a.protocol="ws:"}else if(a.protocol==="https:"){a.protocol="wss:"}e._url=a.href;const u=a.protocol==="wss:";const f=a.protocol==="ws+unix:";let p;if(a.protocol!=="ws:"&&!u&&!f){p='The URL\'s protocol must be one of "ws:", "wss:", '+'"http:", "https", or "ws+unix:"'}else if(f&&!a.pathname){p="The URL's pathname is empty"}else if(a.hash){p="The URL contains a fragment identifier"}if(p){const t=new SyntaxError(p);if(e._redirects===0){throw t}else{emitErrorAndClose(e,t);return}}const m=u?443:80;const v=c(16).toString("base64");const _=u?i.request:s.request;const y=new Set;let w;o.createConnection=o.createConnection||(u?tlsConnect:netConnect);o.defaultPort=o.defaultPort||m;o.port=a.port||m;o.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname;o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":v,Connection:"Upgrade",Upgrade:"websocket"};o.path=a.pathname+a.search;o.timeout=o.handshakeTimeout;if(o.perMessageDeflate){w=new d(o.perMessageDeflate!==true?o.perMessageDeflate:{},false,o.maxPayload);o.headers["Sec-WebSocket-Extensions"]=k({[d.extensionName]:w.offer()})}if(r.length){for(const e of r){if(typeof e!=="string"||!N.test(e)||y.has(e)){throw new SyntaxError("An invalid or duplicated subprotocol was specified")}y.add(e)}o.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(o.origin){if(o.protocolVersion<13){o.headers["Sec-WebSocket-Origin"]=o.origin}else{o.headers.Origin=o.origin}}if(a.username||a.password){o.auth=`${a.username}:${a.password}`}if(f){const e=o.path.split(":");o.socketPath=e[0];o.path=e[1]}let b;if(o.followRedirects){if(e._redirects===0){e._originalIpc=f;e._originalSecure=u;e._originalHostOrSocketPath=f?o.socketPath:a.host;const t=n&&n.headers;n={...n,headers:{}};if(t){for(const[e,r]of Object.entries(t)){n.headers[e.toLowerCase()]=r}}}else if(e.listenerCount("redirect")===0){const t=f?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:false:e._originalIpc?false:a.host===e._originalHostOrSocketPath;if(!t||e._originalSecure&&!u){delete o.headers.authorization;delete o.headers.cookie;if(!t)delete o.headers.host;o.auth=undefined}}if(o.auth&&!n.headers.authorization){n.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")}b=e._req=_(o);if(e._redirects){e.emit("redirect",e.url,b)}}else{b=e._req=_(o)}if(o.timeout){b.on("timeout",(()=>{abortHandshake(e,b,"Opening handshake has timed out")}))}b.on("error",(t=>{if(b===null||b[T])return;b=e._req=null;emitErrorAndClose(e,t)}));b.on("response",(i=>{const s=i.headers.location;const a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++e._redirects>o.maxRedirects){abortHandshake(e,b,"Maximum redirects exceeded");return}b.abort();let i;try{i=new h(s,t)}catch(t){const r=new SyntaxError(`Invalid URL: ${s}`);emitErrorAndClose(e,r);return}initAsClient(e,i,r,n)}else if(!e.emit("unexpected-response",b,i)){abortHandshake(e,b,`Unexpected server response: ${i.statusCode}`)}}));b.on("upgrade",((t,r,n)=>{e.emit("upgrade",t);if(e.readyState!==WebSocket.CONNECTING)return;b=e._req=null;if(t.headers.upgrade.toLowerCase()!=="websocket"){abortHandshake(e,r,"Invalid Upgrade header");return}const i=l("sha1").update(v+g).digest("base64");if(t.headers["sec-websocket-accept"]!==i){abortHandshake(e,r,"Invalid Sec-WebSocket-Accept header");return}const s=t.headers["sec-websocket-protocol"];let a;if(s!==undefined){if(!y.size){a="Server sent a subprotocol but none was requested"}else if(!y.has(s)){a="Server sent an invalid subprotocol"}}else if(y.size){a="Server sent no subprotocol"}if(a){abortHandshake(e,r,a);return}if(s)e._protocol=s;const c=t.headers["sec-websocket-extensions"];if(c!==undefined){if(!w){const t="Server sent a Sec-WebSocket-Extensions header but no extension "+"was requested";abortHandshake(e,r,t);return}let t;try{t=C(c)}catch(t){const n="Invalid Sec-WebSocket-Extensions header";abortHandshake(e,r,n);return}const n=Object.keys(t);if(n.length!==1||n[0]!==d.extensionName){const t="Server indicated an extension that was not requested";abortHandshake(e,r,t);return}try{w.accept(t[d.extensionName])}catch(t){const n="Invalid Sec-WebSocket-Extensions header";abortHandshake(e,r,n);return}e._extensions[d.extensionName]=w}e.setSocket(r,n,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}));if(o.finishRequest){o.finishRequest(b,e)}else{b.end()}}function emitErrorAndClose(e,t){e._readyState=WebSocket.CLOSING;e.emit("error",t);e.emitClose()}function netConnect(e){e.path=e.socketPath;return o.connect(e)}function tlsConnect(e){e.path=undefined;if(!e.servername&&e.servername!==""){e.servername=o.isIP(e.host)?"":e.host}return a.connect(e)}function abortHandshake(e,t,r){e._readyState=WebSocket.CLOSING;const n=new Error(r);Error.captureStackTrace(n,abortHandshake);if(t.setHeader){t[T]=true;t.abort();if(t.socket&&!t.socket.destroyed){t.socket.destroy()}process.nextTick(emitErrorAndClose,e,n)}else{t.destroy(n);t.once("error",e.emit.bind(e,"error"));t.once("close",e.emitClose.bind(e))}}function sendAfterClose(e,t,r){if(t){const r=R(t).length;if(e._socket)e._sender._bufferedBytes+=r;else e._bufferedAmount+=r}if(r){const t=new Error(`WebSocket is not open: readyState ${e.readyState} `+`(${P[e.readyState]})`);process.nextTick(r,t)}}function receiverOnConclude(e,t){const r=this[E];r._closeFrameReceived=true;r._closeMessage=t;r._closeCode=e;if(r._socket[E]===undefined)return;r._socket.removeListener("data",socketOnData);process.nextTick(resume,r._socket);if(e===1005)r.close();else r.close(e,t)}function receiverOnDrain(){const e=this[E];if(!e.isPaused)e._socket.resume()}function receiverOnError(e){const t=this[E];if(t._socket[E]!==undefined){t._socket.removeListener("data",socketOnData);process.nextTick(resume,t._socket);t.close(e[b])}t.emit("error",e)}function receiverOnFinish(){this[E].emitClose()}function receiverOnMessage(e,t){this[E].emit("message",e,t)}function receiverOnPing(e){const t=this[E];if(t._autoPong)t.pong(e,!this._isServer,S);t.emit("ping",e)}function receiverOnPong(e){this[E].emit("pong",e)}function resume(e){e.resume()}function socketOnClose(){const e=this[E];this.removeListener("close",socketOnClose);this.removeListener("data",socketOnData);this.removeListener("end",socketOnEnd);e._readyState=WebSocket.CLOSING;let t;if(!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null){e._receiver.write(t)}e._receiver.end();this[E]=undefined;clearTimeout(e._closeTimer);if(e._receiver._writableState.finished||e._receiver._writableState.errorEmitted){e.emitClose()}else{e._receiver.on("error",receiverOnFinish);e._receiver.on("finish",receiverOnFinish)}}function socketOnData(e){if(!this[E]._receiver.write(e)){this.pause()}}function socketOnEnd(){const e=this[E];e._readyState=WebSocket.CLOSING;e._receiver.end();this.end()}function socketOnError(){const e=this[E];this.removeListener("error",socketOnError);this.on("error",S);if(e){e._readyState=WebSocket.CLOSING;this.destroy()}}},1529:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.helmChartModifiedEvent=void 0;const i=n(r(2361));t.helmChartModifiedEvent=new i.default},9145:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.checkNodeVersion=void 0;const i=n(r(385));function checkNodeVersion(){const[e]=process.version.split(".");if(parseInt(e.replace("v",""),10)<20){console.log("");console.log(i.default.redBright(`🚨 Node.js version >= 20 is required. Version ${process.version} detected.`));console.log("");process.exit(1)}}t.checkNodeVersion=checkNodeVersion},5020:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.computeSources=t.computeTemplated=t.computeChart=void 0;const s=r(6113);const o=r(798);const a=r(7147);const c=i(r(1917));const l=r(1017);const u=r(2037);const f=i(r(385));function computeChart(e,t){return n(this,arguments,void 0,(function*(e,t,r=[]){let n;try{n=yield computeCommands(t,r,e)}catch(i){if(i===null||i===void 0?void 0:i.stderr.includes("You may need to run `helm dependency build`")){console.log(f.default.greenBright(`⬇️ Trying to refresh helm dependencies. Might be long...`));const i=(0,o.$)({cwd:e});yield i`helm dependency build`;n=yield computeCommands(t,r,e)}}const{templated:i}=yield computeTemplated(n);const{sources:s}=yield computeSources(n,e);const{version:a,name:l}=c.default.load(s["Chart.yaml"]);return{name:l,version:a,templated:i,sources:s}}))}t.computeChart=computeChart;function computeTemplated(e){return n(this,void 0,void 0,(function*(){var t;const r={templated:{}};const n=e.split("---");for(const e of n){const n=c.default.load(e);if(n){if(!r["templated"][n.kind]){r["templated"][n.kind]={}}r["templated"][n.kind][(t=n===null||n===void 0?void 0:n.metadata)===null||t===void 0?void 0:t.name]=e}}return r}))}t.computeTemplated=computeTemplated;function computeCommands(e){return n(this,arguments,void 0,(function*(e,t=[],r){let n;if(t.length===0){({stdout:n}=yield(0,o.$)`helm template --name-template ${e} ${r}`)}else if(t.length===1){({stdout:n}=yield(0,o.$)`helm template --name-template ${e} ${r} --values ${t.at(0)}`)}else if(t.length===2){({stdout:n}=yield(0,o.$)`helm template --name-template ${e} ${r} --values ${t.at(0)} --values ${t.at(1)}`)}return n}))}function computeSources(e,t){return n(this,void 0,void 0,(function*(){var r;const n=`${(0,u.tmpdir)()}/${(0,s.randomUUID)()}`;(0,a.mkdirSync)(n,{recursive:true});(0,a.mkdirSync)(`${n}/sources`,{recursive:true});(0,a.mkdirSync)(`${n}/templated`,{recursive:true});const i={sources:{}};const o=e.split("---");for(const e of o){const t=c.default.load(e);if(t){const i=t.kind+"-"+((r=t===null||t===void 0?void 0:t.metadata)===null||r===void 0?void 0:r.name);(0,a.writeFileSync)(`${n}/templated/${i}.yaml`,e)}}const f=(0,a.readdirSync)(t);for(const e of f.filter((e=>!e.includes("tgz")))){const r=(0,l.join)(t,e);if(!(0,a.statSync)(r).isDirectory()){const t=(0,a.readFileSync)(r);i["sources"][e]=String(t)}}return i}))}t.computeSources=computeSources},5492:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.computeUrls=void 0;function computeUrls(){let e="https://helm-viewer.vercel.app";let t="https://helm-viewer.vercel.app";if(process.env.NODE_ENV==="development"){e="http://localhost:3000";t="http://localhost:3000"}if(process.env.BACKEND_ENDPOINT){e=process.env.BACKEND_ENDPOINT.replace(/\/$/,"");t=process.env.BACKEND_ENDPOINT.replace(/\/$/,"")}if(process.env.BACKEND_READ_ENDPOINT){t=process.env.BACKEND_READ_ENDPOINT.replace(/\/$/,"")}return{remoteURL:e,remoteReadURL:t}}t.computeUrls=computeUrls},7017:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.decrypt=t.encrypt=void 0;const i=n(r(4134));function encrypt(e,t){return i.default.AES.encrypt(e,t).toString()}t.encrypt=encrypt;function decrypt(e,t){const r=i.default.AES.decrypt(e,t);return r.toString(i.default.enc.Utf8)}t.decrypt=decrypt},7893:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.watchHelmChartFilesModifications=void 0;const s=i(r(2677));const o=r(1529);function watchHelmChartFilesModifications(e){return n(this,void 0,void 0,(function*(){s.default.watch(e).on("all",((e,t)=>{o.helmChartModifiedEvent.emit("changed",t)}))}))}t.watchHelmChartFilesModifications=watchHelmChartFilesModifications},2620:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.isChartFolder=void 0;const i=n(r(7561));function isChartFolder(e){const t=i.default.readdirSync(e);return t.includes("Chart.yaml")}t.isChartFolder=isChartFolder},6601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getArguments=void 0;const n=r(7852);const i=r(7261);function getArguments(){return(0,i.parseArgs)({options:{watch:{type:"boolean",short:"w",default:false},push:{type:"boolean",short:"p",default:false},encryptionKey:{type:"string",short:"k",default:(0,n.nanoid)().slice(0,10)},browser:{type:"string",short:"b",default:"default"},values:{type:"string",short:"v",multiple:true,default:[]},help:{type:"boolean",short:"h",default:false},name:{type:"string",short:"n",default:"release-name"}},allowPositionals:true})}t.getArguments=getArguments},8597:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.serverFileTemporary=void 0;const i=n(r(3685));const s=n(r(385));function serverFileTemporary(e,t){return new Promise((r=>{const n=i.default.createServer(((i,o)=>{const a={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"OPTIONS, POST, GET"};if(i.method==="OPTIONS"){o.writeHead(200,a);o.end();return}o.writeHead(200,a);o.end(JSON.stringify(e),"utf-8");console.log(s.default.cyanBright(`Closing server on port ${t}...`));n.close((()=>{r(undefined)}));setTimeout((()=>{n.emit("close")}),100)}));n.listen(t)}))}t.serverFileTemporary=serverFileTemporary},5989:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.startWebsocketServer=void 0;const s=i(r(385));const o=r(8867);const a=r(1529);const c=r(5020);function startWebsocketServer(e,t){const r=new o.WebSocketServer({port:12096});console.log(s.default.cyanBright(`⚡️ Web socket started on 12096`));console.log(s.default.cyanBright(`Don't touch this terminal anymore and see your chart change directly in the browser`));r.on("connection",(function connection(r){r.on("error",console.error);a.helmChartModifiedEvent.addListener("changed",(i=>n(this,void 0,void 0,(function*(){try{const n=yield(0,c.computeChart)(e,t);r.send(JSON.stringify({filePath:i,chartContentUpdated:n,error:null}))}catch(e){r.send(JSON.stringify({filePath:null,chartContentUpdated:null,error:e.stderr}))}}))))}))}t.startWebsocketServer=startWebsocketServer},6144:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=r(2620);const o=r(7147);const a=r(6113);const c=i(r(385));const l=r(2037);const u=r(8597);const f=i(r(5768));const h=i(r(1917));const d=r(7017);const p=i(r(7147));const m=r(5989);const v=r(7893);const _=r(6601);const g=r(5020);const y=r(7852);const w=r(9145);const b=r(5492);const{remoteReadURL:E,remoteURL:S}=(0,b.computeUrls)();function run(){return n(this,void 0,void 0,(function*(){var e,t;(0,w.checkNodeVersion)();const r=(0,_.getArguments)();if(r.values.help){console.log(`\nhelm-viewer v0.16.0\n\n -b/--browser: allow to open with a specific browser (firefox, chromium)\n -h/--help: displays this menu\n -k/--encryptionKey: specify the encryption key\n -n/--name: provide a release name to Helm\n -p/--push: push the result of the build online and returns an URL\n -v/--values: provide values files for the chart, can be provided several times\n -w/--watch: activate the watch mode\n\n # When you are in a chart helm folder\n helm-viewer\n \n # To target a specific path\n helm-viewer path/of/the/chart\n \n # To compute the chart with an external values file\n helm-viewer path/of/the/chart --values path/of/the/values/file1 --values path/of/the/values/file2\n \n # To get a public link (with encrypted data)\n helm-viewer path/of/the/chart --push\n `);process.exit(0)}const n=(e=r.positionals.at(0))!==null&&e!==void 0?e:process.cwd();const i=r.values.values;console.log(c.default.cyanBright(`⚡️ Path detected ${n}`));console.log(i.length>0?c.default.greenBright(`🔑 Values detected : ${i.join(",")}`):c.default.yellowBright(`⚠️ No value detected, computing with default values in the Chart`));const u=`${(0,l.tmpdir)()}/${(0,a.randomUUID)()}`;(0,o.mkdirSync)(u,{recursive:true});(0,o.mkdirSync)(`${u}/sources`,{recursive:true});(0,o.mkdirSync)(`${u}/templated`,{recursive:true});if(!(0,s.isChartFolder)(n)){console.log("Not a chart folder");process.exit(1)}let f;try{f=yield(0,g.computeChart)(n,r.values.name,i)}catch(e){console.log("\n");console.log(c.default.bgRedBright("The computation of the chart failed. (message below)"));console.log(e.message);console.log("\n");process.exit(1)}if(r.values.push){yield pushOnlineFunction(f,r.values.encryptionKey)}else{yield serveLocally(f,n,r.values.watch,(t=r.values.browser)!==null&&t!==void 0?t:null,r.values.name)}process.exit(0)}))}function pushOnlineFunction(e,t){return n(this,void 0,void 0,(function*(){const r=(0,y.nanoid)();const{version:n,name:i}=h.default.load(e.sources["Chart.yaml"]);const s={chartVersion:n,chartName:i,content:(0,d.encrypt)(JSON.stringify(e),t)};yield fetch(`${S}/api/chart-upload`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:JSON.stringify(s),chartId:r})});console.log("");console.log(`${E}?id=${r}&k=${t}&o=t`);console.log("");p.default.writeFileSync(".helm-viewer-url",`${E}?id=${r}&k=${t}&o=t`)}))}function serveLocally(e,t,r,i,s){return n(this,void 0,void 0,(function*(){const n=(0,y.nanoid)();if(process.env.NODE_ENV==="development"){(0,f.default)(`${S}?id=${n}`,{app:{name:"firefox"}})}else{if(i!=="default"){(0,f.default)(`${S}?id=${n}`,{app:{name:i}})}else{(0,f.default)(`${S}?id=${n}`)}}const{version:o,name:a}=h.default.load(e.sources["Chart.yaml"]);yield Promise.all([(0,u.serverFileTemporary)(JSON.stringify(e),12094),(0,u.serverFileTemporary)({chartName:a,chartVersion:o},12095)]);if(r){(0,m.startWebsocketServer)(t,s);(0,v.watchHelmChartFilesModifications)(t);yield new Promise((e=>setTimeout(e,1e8)))}}))}run()},2982:(e,t,r)=>{e.exports=require(r.ab+"fsevents.node")},1269:module=>{module.exports=eval("require")("bufferutil")},4592:module=>{module.exports=eval("require")("utf-8-validate")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},7561:e=>{"use strict";e.exports=require("node:fs")},612:e=>{"use strict";e.exports=require("node:os")},7742:e=>{"use strict";e.exports=require("node:process")},7261:e=>{"use strict";e.exports=require("node:util")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},385:(e,t,r)=>{"use strict";r.r(t);r.d(t,{Chalk:()=>Chalk,backgroundColorNames:()=>a,backgroundColors:()=>a,chalkStderr:()=>R,colorNames:()=>c,colors:()=>c,default:()=>O,foregroundColorNames:()=>o,foregroundColors:()=>o,modifierNames:()=>s,modifiers:()=>s,supportsColor:()=>g,supportsColorStderr:()=>y});const n=10;const wrapAnsi16=(e=0)=>t=>`[${t+e}m`;const wrapAnsi256=(e=0)=>t=>`[${38+e};5;${t}m`;const wrapAnsi16m=(e=0)=>(t,r,n)=>`[${38+e};2;${t};${r};${n}m`;const i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const s=Object.keys(i.modifier);const o=Object.keys(i.color);const a=Object.keys(i.bgColor);const c=[...o,...a];function assembleStyles(){const e=new Map;for(const[t,r]of Object.entries(i)){for(const[t,n]of Object.entries(r)){i[t]={open:`[${n[0]}m`,close:`[${n[1]}m`};r[t]=i[t];e.set(n[0],n[1])}Object.defineProperty(i,t,{value:r,enumerable:false})}Object.defineProperty(i,"codes",{value:e,enumerable:false});i.color.close="[39m";i.bgColor.close="[49m";i.color.ansi=wrapAnsi16();i.color.ansi256=wrapAnsi256();i.color.ansi16m=wrapAnsi16m();i.bgColor.ansi=wrapAnsi16(n);i.bgColor.ansi256=wrapAnsi256(n);i.bgColor.ansi16m=wrapAnsi16m(n);Object.defineProperties(i,{rgbToAnsi256:{value(e,t,r){if(e===t&&t===r){if(e<8){return 16}if(e>248){return 231}return Math.round((e-8)/247*24)+232}return 16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5)},enumerable:false},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t){return[0,0,0]}let[r]=t;if(r.length===3){r=[...r].map((e=>e+e)).join("")}const n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,n&255]},enumerable:false},hexToAnsi256:{value:e=>i.rgbToAnsi256(...i.hexToRgb(e)),enumerable:false},ansi256ToAnsi:{value(e){if(e<8){return 30+e}if(e<16){return 90+(e-8)}let t;let r;let n;if(e>=232){t=((e-232)*10+8)/255;r=t;n=t}else{e-=16;const i=e%36;t=Math.floor(e/36)/5;r=Math.floor(i/6)/5;n=i%6/5}const i=Math.max(t,r,n)*2;if(i===0){return 30}let s=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(t));if(i===2){s+=60}return s},enumerable:false},rgbToAnsi:{value:(e,t,r)=>i.ansi256ToAnsi(i.rgbToAnsi256(e,t,r)),enumerable:false},hexToAnsi:{value:e=>i.ansi256ToAnsi(i.hexToAnsi256(e)),enumerable:false}});return i}const l=assembleStyles();const u=l;var f=r(7742);var h=r(612);const d=require("node:tty");function hasFlag(e,t=(globalThis.Deno?globalThis.Deno.args:f.argv)){const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}const{env:p}=f;let m;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){m=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){m=1}function envForceColor(){if("FORCE_COLOR"in p){if(p.FORCE_COLOR==="true"){return 1}if(p.FORCE_COLOR==="false"){return 0}return p.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(p.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function _supportsColor(e,{streamIsTTY:t,sniffFlags:r=true}={}){const n=envForceColor();if(n!==undefined){m=n}const i=r?m:n;if(i===0){return 0}if(r){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in p&&"AGENT_NAME"in p){return 1}if(e&&!t&&i===undefined){return 0}const s=i||0;if(p.TERM==="dumb"){return s}if(f.platform==="win32"){const e=h.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in p){if("GITHUB_ACTIONS"in p||"GITEA_ACTIONS"in p){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((e=>e in p))||p.CI_NAME==="codeship"){return 1}return s}if("TEAMCITY_VERSION"in p){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION)?1:0}if(p.COLORTERM==="truecolor"){return 3}if(p.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in p){const e=Number.parseInt((p.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(p.TERM_PROGRAM){case"iTerm.app":{return e>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(p.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM)){return 1}if("COLORTERM"in p){return 1}return s}function createSupportsColor(e,t={}){const r=_supportsColor(e,{streamIsTTY:e&&e.isTTY,...t});return translateLevel(r)}const v={stdout:createSupportsColor({isTTY:d.isatty(1)}),stderr:createSupportsColor({isTTY:d.isatty(2)})};const _=v;function stringReplaceAll(e,t,r){let n=e.indexOf(t);if(n===-1){return e}const i=t.length;let s=0;let o="";do{o+=e.slice(s,n)+t+r;s=n+i;n=e.indexOf(t,s)}while(n!==-1);o+=e.slice(s);return o}function stringEncaseCRLFWithFirstIndex(e,t,r,n){let i=0;let s="";do{const o=e[n-1]==="\r";s+=e.slice(i,o?n-1:n)+t+(o?"\r\n":"\n")+r;i=n+1;n=e.indexOf("\n",i)}while(n!==-1);s+=e.slice(i);return s}const{stdout:g,stderr:y}=_;const w=Symbol("GENERATOR");const b=Symbol("STYLER");const E=Symbol("IS_EMPTY");const S=["ansi","ansi","ansi256","ansi16m"];const x=Object.create(null);const applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const r=g?g.level:0;e.level=t.level===undefined?r:t.level};class Chalk{constructor(e){return chalkFactory(e)}}const chalkFactory=e=>{const chalk=(...e)=>e.join(" ");applyOptions(chalk,e);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(e){return chalkFactory(e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[e,t]of Object.entries(u)){x[e]={get(){const r=createBuilder(this,createStyler(t.open,t.close,this[b]),this[E]);Object.defineProperty(this,e,{value:r});return r}}}x.visible={get(){const e=createBuilder(this,this[b],true);Object.defineProperty(this,"visible",{value:e});return e}};const getModelAnsi=(e,t,r,...n)=>{if(e==="rgb"){if(t==="ansi16m"){return u[r].ansi16m(...n)}if(t==="ansi256"){return u[r].ansi256(u.rgbToAnsi256(...n))}return u[r].ansi(u.rgbToAnsi(...n))}if(e==="hex"){return getModelAnsi("rgb",t,r,...u.hexToRgb(...n))}return u[r][e](...n)};const A=["rgb","hex","ansi256"];for(const e of A){x[e]={get(){const{level:t}=this;return function(...r){const n=createStyler(getModelAnsi(e,S[t],"color",...r),u.color.close,this[b]);return createBuilder(this,n,this[E])}}};const t="bg"+e[0].toUpperCase()+e.slice(1);x[t]={get(){const{level:t}=this;return function(...r){const n=createStyler(getModelAnsi(e,S[t],"bgColor",...r),u.bgColor.close,this[b]);return createBuilder(this,n,this[E])}}}}const k=Object.defineProperties((()=>{}),{...x,level:{enumerable:true,get(){return this[w].level},set(e){this[w].level=e}}});const createStyler=(e,t,r)=>{let n;let i;if(r===undefined){n=e;i=t}else{n=r.openAll+e;i=t+r.closeAll}return{open:e,close:t,openAll:n,closeAll:i,parent:r}};const createBuilder=(e,t,r)=>{const builder=(...e)=>applyStyle(builder,e.length===1?""+e[0]:e.join(" "));Object.setPrototypeOf(builder,k);builder[w]=e;builder[b]=t;builder[E]=r;return builder};const applyStyle=(e,t)=>{if(e.level<=0||!t){return e[E]?"":t}let r=e[b];if(r===undefined){return t}const{openAll:n,closeAll:i}=r;if(t.includes("")){while(r!==undefined){t=stringReplaceAll(t,r.close,r.open);r=r.parent}}const s=t.indexOf("\n");if(s!==-1){t=stringEncaseCRLFWithFirstIndex(t,i,n,s)}return n+t+i};Object.defineProperties(createChalk.prototype,x);const C=createChalk();const R=createChalk({level:y?y.level:0});const O=C},798:(e,t,r)=>{"use strict";r.r(t);r.d(t,{$:()=>V,execa:()=>execa,execaCommand:()=>execaCommand,execaCommandSync:()=>execaCommandSync,execaNode:()=>execaNode,execaSync:()=>execaSync});const n=require("node:buffer");const i=require("node:path");const s=require("node:child_process");var o=r(7742);var a=r(2746);function stripFinalNewline(e){const t=typeof e==="string"?"\n":"\n".charCodeAt();const r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,-1)}if(e[e.length-1]===r){e=e.slice(0,-1)}return e}const c=require("node:url");function pathKey(e={}){const{env:t=process.env,platform:r=process.platform}=e;if(r!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"}function npmRunPath(e={}){const{cwd:t=o.cwd(),path:r=o.env[pathKey()],execPath:n=o.execPath}=e;let s;const a=t instanceof URL?c.fileURLToPath(t):t;let l=i.resolve(a);const u=[];while(s!==l){u.push(i.join(l,"node_modules/.bin"));s=l;l=i.resolve(l,"..")}u.push(i.resolve(a,n,".."));return[...u,r].join(i.delimiter)}function npmRunPathEnv({env:e=o.env,...t}={}){e={...e};const r=pathKey({env:e});t.path=e[r];e[r]=npmRunPath(t);return e}const copyProperty=(e,t,r,n)=>{if(r==="length"||r==="prototype"){return}if(r==="arguments"||r==="caller"){return}const i=Object.getOwnPropertyDescriptor(e,r);const s=Object.getOwnPropertyDescriptor(t,r);if(!canCopyProperty(i,s)&&n){return}Object.defineProperty(e,r,s)};const canCopyProperty=function(e,t){return e===undefined||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)};const changePrototype=(e,t)=>{const r=Object.getPrototypeOf(t);if(r===Object.getPrototypeOf(e)){return}Object.setPrototypeOf(e,r)};const wrappedToString=(e,t)=>`/* Wrapped ${e}*/\n${t}`;const l=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const u=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(e,t,r)=>{const n=r===""?"":`with ${r.trim()}() `;const i=wrappedToString.bind(null,n,t.toString());Object.defineProperty(i,"name",u);Object.defineProperty(e,"toString",{...l,value:i})};function mimicFunction(e,t,{ignoreNonConfigurable:r=false}={}){const{name:n}=e;for(const n of Reflect.ownKeys(t)){copyProperty(e,t,n,r)}changePrototype(e,t);changeToString(e,t,n);return e}const f=new WeakMap;const onetime=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let n=0;const i=e.displayName||e.name||"<anonymous>";const onetime=function(...s){f.set(onetime,++n);if(n===1){r=e.apply(this,s);e=null}else if(t.throw===true){throw new Error(`Function \`${i}\` can only be called once`)}return r};mimicFunction(onetime,e);f.set(onetime,n);return onetime};onetime.callCount=e=>{if(!f.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return f.get(e)};const h=onetime;var d=r(612);const getRealtimeSignals=()=>{const e=m-p+1;return Array.from({length:e},getRealtimeSignal)};const getRealtimeSignal=(e,t)=>({name:`SIGRT${t+1}`,number:p+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"});const p=34;const m=64;const v=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:true},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:true},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:true},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];const getSignals=()=>{const e=getRealtimeSignals();const t=[...v,...e].map(normalizeSignal);return t};const normalizeSignal=({name:e,number:t,description:r,action:n,forced:i=false,standard:s})=>{const{signals:{[e]:o}}=d.constants;const a=o!==undefined;const c=a?o:t;return{name:e,number:c,description:r,supported:a,action:n,forced:i,standard:s}};const getSignalsByName=()=>{const e=getSignals();return Object.fromEntries(e.map(getSignalByName))};const getSignalByName=({name:e,number:t,description:r,supported:n,action:i,forced:s,standard:o})=>[e,{name:e,number:t,description:r,supported:n,action:i,forced:s,standard:o}];const _=getSignalsByName();const getSignalsByNumber=()=>{const e=getSignals();const t=m+1;const r=Array.from({length:t},((t,r)=>getSignalByNumber(r,e)));return Object.assign({},...r)};const getSignalByNumber=(e,t)=>{const r=findSignalByNumber(e,t);if(r===undefined){return{}}const{name:n,description:i,supported:s,action:o,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:s,action:o,forced:a,standard:c}}};const findSignalByNumber=(e,t)=>{const r=t.find((({name:t})=>d.constants.signals[t]===e));if(r!==undefined){return r}return t.find((t=>t.number===e))};const g=getSignalsByNumber();const getErrorPrefix=({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:s,isCanceled:o})=>{if(e){return`timed out after ${t} milliseconds`}if(o){return"was canceled"}if(r!==undefined){return`failed with ${r}`}if(n!==undefined){return`was killed with ${n} (${i})`}if(s!==undefined){return`failed with exit code ${s}`}return"failed"};const makeError=({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:f,parsed:{options:{timeout:h,cwd:d=o.cwd()}}})=>{s=s===null?undefined:s;i=i===null?undefined:i;const p=i===undefined?undefined:_[i].description;const m=n&&n.code;const v=getErrorPrefix({timedOut:l,timeout:h,errorCode:m,signal:i,signalDescription:p,exitCode:s,isCanceled:u});const g=`Command ${v}: ${a}`;const y=Object.prototype.toString.call(n)==="[object Error]";const w=y?`${g}\n${n.message}`:g;const b=[w,t,e].filter(Boolean).join("\n");if(y){n.originalMessage=n.message;n.message=b}else{n=new Error(b)}n.shortMessage=w;n.command=a;n.escapedCommand=c;n.exitCode=s;n.signal=i;n.signalDescription=p;n.stdout=e;n.stderr=t;n.cwd=d;if(r!==undefined){n.all=r}if("bufferedData"in n){delete n.bufferedData}n.failed=true;n.timedOut=Boolean(l);n.isCanceled=u;n.killed=f&&!l;return n};const y=["stdin","stdout","stderr"];const hasAlias=e=>y.some((t=>e[t]!==undefined));const normalizeStdio=e=>{if(!e){return}const{stdio:t}=e;if(t===undefined){return y.map((t=>e[t]))}if(hasAlias(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${y.map((e=>`\`${e}\``)).join(", ")}`)}if(typeof t==="string"){return t}if(!Array.isArray(t)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``)}const r=Math.max(t.length,y.length);return Array.from({length:r},((e,r)=>t[r]))};const normalizeStdioNode=e=>{const t=normalizeStdio(e);if(t==="ipc"){return"ipc"}if(t===undefined||typeof t==="string"){return[t,t,t,"ipc"]}if(t.includes("ipc")){return t}return[...t,"ipc"]};const w=[];w.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32"){w.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){w.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")}const processOk=e=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function";const b=Symbol.for("signal-exit emitter");const E=globalThis;const S=Object.defineProperty.bind(Object);class Emitter{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(E[b]){return E[b]}S(E,b,{value:this,writable:false,enumerable:false,configurable:false})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e];const n=r.indexOf(t);if(n===-1){return}if(n===0&&r.length===1){r.length=0}else{r.splice(n,1)}}emit(e,t,r){if(this.emitted[e]){return false}this.emitted[e]=true;let n=false;for(const i of this.listeners[e]){n=i(t,r)===true||n}if(e==="exit"){n=this.emit("afterExit",t,r)||n}return n}}class SignalExitBase{}const signalExitWrap=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}});class SignalExitFallback extends SignalExitBase{onExit(){return()=>{}}load(){}unload(){}}class SignalExit extends SignalExitBase{#e=x.platform==="win32"?"SIGINT":"SIGHUP";#t=new Emitter;#r;#n;#i;#s={};#o=false;constructor(e){super();this.#r=e;this.#s={};for(const t of w){this.#s[t]=()=>{const r=this.#r.listeners(t);let{count:n}=this.#t;const i=e;if(typeof i.__signal_exit_emitter__==="object"&&typeof i.__signal_exit_emitter__.count==="number"){n+=i.__signal_exit_emitter__.count}if(r.length===n){this.unload();const r=this.#t.emit("exit",null,t);const n=t==="SIGHUP"?this.#e:t;if(!r)e.kill(e.pid,n)}}}this.#i=e.reallyExit;this.#n=e.emit}onExit(e,t){if(!processOk(this.#r)){return()=>{}}if(this.#o===false){this.load()}const r=t?.alwaysLast?"afterExit":"exit";this.#t.on(r,e);return()=>{this.#t.removeListener(r,e);if(this.#t.listeners["exit"].length===0&&this.#t.listeners["afterExit"].length===0){this.unload()}}}load(){if(this.#o){return}this.#o=true;this.#t.count+=1;for(const e of w){try{const t=this.#s[e];if(t)this.#r.on(e,t)}catch(e){}}this.#r.emit=(e,...t)=>this.#a(e,...t);this.#r.reallyExit=e=>this.#c(e)}unload(){if(!this.#o){return}this.#o=false;w.forEach((e=>{const t=this.#s[e];if(!t){throw new Error("Listener not defined for signal: "+e)}try{this.#r.removeListener(e,t)}catch(e){}}));this.#r.emit=this.#n;this.#r.reallyExit=this.#i;this.#t.count-=1}#c(e){if(!processOk(this.#r)){return 0}this.#r.exitCode=e||0;this.#t.emit("exit",this.#r.exitCode,null);return this.#i.call(this.#r,this.#r.exitCode)}#a(e,...t){const r=this.#n;if(e==="exit"&&processOk(this.#r)){if(typeof t[0]==="number"){this.#r.exitCode=t[0]}const n=r.call(this.#r,e,...t);this.#t.emit("exit",this.#r.exitCode,null);return n}else{return r.call(this.#r,e,...t)}}}const x=globalThis.process;const{onExit:A,load:k,unload:C}=signalExitWrap(processOk(x)?new SignalExit(x):new SignalExitFallback);const R=1e3*5;const spawnedKill=(e,t="SIGTERM",r={})=>{const n=e(t);setKillTimeout(e,t,r,n);return n};const setKillTimeout=(e,t,r,n)=>{if(!shouldForceKill(t,r,n)){return}const i=getForceKillAfterTimeout(r);const s=setTimeout((()=>{e("SIGKILL")}),i);if(s.unref){s.unref()}};const shouldForceKill=(e,{forceKillAfterTimeout:t},r)=>isSigterm(e)&&t!==false&&r;const isSigterm=e=>e===d.constants.signals.SIGTERM||typeof e==="string"&&e.toUpperCase()==="SIGTERM";const getForceKillAfterTimeout=({forceKillAfterTimeout:e=true})=>{if(e===true){return R}if(!Number.isFinite(e)||e<0){throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}return e};const spawnedCancel=(e,t)=>{const r=e.kill();if(r){t.isCanceled=true}};const timeoutKill=(e,t,r)=>{e.kill(t);r(Object.assign(new Error("Timed out"),{timedOut:true,signal:t}))};const setupTimeout=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===undefined){return n}let i;const s=new Promise(((n,s)=>{i=setTimeout((()=>{timeoutKill(e,r,s)}),t)}));const o=n.finally((()=>{clearTimeout(i)}));return Promise.race([s,o])};const validateTimeout=({timeout:e})=>{if(e!==undefined&&(!Number.isFinite(e)||e<0)){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}};const setExitHandler=async(e,{cleanup:t,detached:r},n)=>{if(!t||r){return n}const i=A((()=>{e.kill()}));return n.finally((()=>{i()}))};var O=r(7561);function isStream(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"}function isWritableStream(e){return isStream(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"}function isReadableStream(e){return isStream(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"}function isDuplexStream(e){return isWritableStream(e)&&isReadableStream(e)}function isTransformStream(e){return isDuplexStream(e)&&typeof e._transform==="function"}const isExecaChildProcess=e=>e instanceof s.ChildProcess&&typeof e.then==="function";const pipeToTarget=(e,t,r)=>{if(typeof r==="string"){e[t].pipe((0,O.createWriteStream)(r));return e}if(isWritableStream(r)){e[t].pipe(r);return e}if(!isExecaChildProcess(r)){throw new TypeError("The second argument must be a string, a stream or an Execa child process.")}if(!isWritableStream(r.stdin)){throw new TypeError("The target child process's stdin must be available.")}e[t].pipe(r.stdin);return r};const addPipeMethods=e=>{if(e.stdout!==null){e.pipeStdout=pipeToTarget.bind(undefined,e,"stdout")}if(e.stderr!==null){e.pipeStderr=pipeToTarget.bind(undefined,e,"stderr")}if(e.all!==undefined){e.pipeAll=pipeToTarget.bind(undefined,e,"all")}};const T=require("node:timers/promises");const contents_getStreamContents=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:i,addChunk:s,getFinalChunk:o,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{if(!isAsyncIterable(e)){throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.")}const l=t();l.length=0;try{for await(const t of e){const e=getChunkType(t);const o=r[e](t,l);appendChunk({convertedChunk:o,state:l,getSize:n,truncateChunk:i,addChunk:s,maxBuffer:c})}appendFinalChunk({state:l,convertChunk:r,getSize:n,truncateChunk:i,addChunk:s,getFinalChunk:o,maxBuffer:c});return a(l)}catch(e){e.bufferedData=a(l);throw e}};const appendFinalChunk=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:i,maxBuffer:s})=>{const o=i(e);if(o!==undefined){appendChunk({convertedChunk:o,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:s})}};const appendChunk=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:i,maxBuffer:s})=>{const o=r(e);const a=t.length+o;if(a<=s){addNewChunk(e,t,i,a);return}const c=n(e,s-t.length);if(c!==undefined){addNewChunk(c,t,i,s)}throw new MaxBufferError};const addNewChunk=(e,t,r,n)=>{t.contents=r(e,t,n);t.length=n};const isAsyncIterable=e=>typeof e==="object"&&e!==null&&typeof e[Symbol.asyncIterator]==="function";const getChunkType=e=>{const t=typeof e;if(t==="string"){return"string"}if(t!=="object"||e===null){return"others"}if(globalThis.Buffer?.isBuffer(e)){return"buffer"}const r=I.call(e);if(r==="[object ArrayBuffer]"){return"arrayBuffer"}if(r==="[object DataView]"){return"dataView"}if(Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&I.call(e.buffer)==="[object ArrayBuffer]"){return"typedArray"}return"others"};const{toString:I}=Object.prototype;class MaxBufferError extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const identity=e=>e;const noop=()=>undefined;const getContentsProp=({contents:e})=>e;const throwObjectStream=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)};const getLengthProp=e=>e.length;async function getStreamAsArray(e,t){return getStreamContents(e,P,t)}const initArray=()=>({contents:[]});const increment=()=>1;const addArrayChunk=(e,{contents:t})=>{t.push(e);return t};const P={init:initArray,convertChunk:{string:identity,buffer:identity,arrayBuffer:identity,dataView:identity,typedArray:identity,others:identity},getSize:increment,truncateChunk:noop,addChunk:addArrayChunk,getFinalChunk:noop,finalize:getContentsProp};async function getStreamAsArrayBuffer(e,t){return contents_getStreamContents(e,B,t)}const initArrayBuffer=()=>({contents:new ArrayBuffer(0)});const useTextEncoder=e=>N.encode(e);const N=new TextEncoder;const useUint8Array=e=>new Uint8Array(e);const useUint8ArrayWithOffset=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);const truncateArrayBufferChunk=(e,t)=>e.slice(0,t);const addArrayBufferChunk=(e,{contents:t,length:r},n)=>{const i=hasArrayBufferResize()?resizeArrayBuffer(t,n):resizeArrayBufferSlow(t,n);new Uint8Array(i).set(e,r);return i};const resizeArrayBufferSlow=(e,t)=>{if(t<=e.byteLength){return e}const r=new ArrayBuffer(getNewContentsLength(t));new Uint8Array(r).set(new Uint8Array(e),0);return r};const resizeArrayBuffer=(e,t)=>{if(t<=e.maxByteLength){e.resize(t);return e}const r=new ArrayBuffer(t,{maxByteLength:getNewContentsLength(t)});new Uint8Array(r).set(new Uint8Array(e),0);return r};const getNewContentsLength=e=>L**Math.ceil(Math.log(e)/Math.log(L));const L=2;const finalizeArrayBuffer=({contents:e,length:t})=>hasArrayBufferResize()?e:e.slice(0,t);const hasArrayBufferResize=()=>"resize"in ArrayBuffer.prototype;const B={init:initArrayBuffer,convertChunk:{string:useTextEncoder,buffer:useUint8Array,arrayBuffer:useUint8Array,dataView:useUint8ArrayWithOffset,typedArray:useUint8ArrayWithOffset,others:throwObjectStream},getSize:getLengthProp,truncateChunk:truncateArrayBufferChunk,addChunk:addArrayBufferChunk,getFinalChunk:noop,finalize:finalizeArrayBuffer};async function getStreamAsBuffer(e,t){if(!("Buffer"in globalThis)){throw new Error("getStreamAsBuffer() is only supported in Node.js")}try{return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(e,t))}catch(e){if(e.bufferedData!==undefined){e.bufferedData=arrayBufferToNodeBuffer(e.bufferedData)}throw e}}const arrayBufferToNodeBuffer=e=>globalThis.Buffer.from(e);async function getStreamAsString(e,t){return contents_getStreamContents(e,H,t)}const initString=()=>({contents:"",textDecoder:new TextDecoder});const useTextDecoder=(e,{textDecoder:t})=>t.decode(e,{stream:true});const addStringChunk=(e,{contents:t})=>t+e;const truncateStringChunk=(e,t)=>e.slice(0,t);const getFinalStringChunk=({textDecoder:e})=>{const t=e.decode();return t===""?undefined:t};const H={init:initString,convertChunk:{string:identity,buffer:useTextDecoder,arrayBuffer:useTextDecoder,dataView:useTextDecoder,typedArray:useTextDecoder,others:throwObjectStream},getSize:getLengthProp,truncateChunk:truncateStringChunk,addChunk:addStringChunk,getFinalChunk:getFinalStringChunk,finalize:getContentsProp};var D=r(2621);const validateInputOptions=e=>{if(e!==undefined){throw new TypeError("The `input` and `inputFile` options cannot be both set.")}};const getInputSync=({input:e,inputFile:t})=>{if(typeof t!=="string"){return e}validateInputOptions(e);return(0,O.readFileSync)(t)};const handleInputSync=e=>{const t=getInputSync(e);if(isStream(t)){throw new TypeError("The `input` option cannot be a stream in sync mode")}return t};const getInput=({input:e,inputFile:t})=>{if(typeof t!=="string"){return e}validateInputOptions(e);return(0,O.createReadStream)(t)};const handleInput=(e,t)=>{const r=getInput(t);if(r===undefined){return}if(isStream(r)){r.pipe(e.stdin)}else{e.stdin.end(r)}};const makeAllStream=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr){return}const r=D();if(e.stdout){r.add(e.stdout)}if(e.stderr){r.add(e.stderr)}return r};const getBufferedData=async(e,t)=>{if(!e||t===undefined){return}await(0,T.setTimeout)(0);e.destroy();try{return await t}catch(e){return e.bufferedData}};const getStreamPromise=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!e||!r){return}if(t==="utf8"||t==="utf-8"){return getStreamAsString(e,{maxBuffer:n})}if(t===null||t==="buffer"){return getStreamAsBuffer(e,{maxBuffer:n})}return applyEncoding(e,n,t)};const applyEncoding=async(e,t,r)=>{const n=await getStreamAsBuffer(e,{maxBuffer:t});return n.toString(r)};const getSpawnedResult=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:s},o)=>{const a=getStreamPromise(e,{encoding:n,buffer:i,maxBuffer:s});const c=getStreamPromise(t,{encoding:n,buffer:i,maxBuffer:s});const l=getStreamPromise(r,{encoding:n,buffer:i,maxBuffer:s*2});try{return await Promise.all([o,a,c,l])}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},getBufferedData(e,a),getBufferedData(t,c),getBufferedData(r,l)])}};const M=(async()=>{})().constructor.prototype;const W=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(M,e)]));const mergePromise=(e,t)=>{for(const[r,n]of W){const i=typeof t==="function"?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}};const getSpawnedPromise=e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})}));e.on("error",(e=>{r(e)}));if(e.stdin){e.stdin.on("error",(e=>{r(e)}))}}));const normalizeArgs=(e,t=[])=>{if(!Array.isArray(t)){return[e]}return[e,...t]};const j=/^[\w.-]+$/;const escapeArg=e=>{if(typeof e!=="string"||j.test(e)){return e}return`"${e.replaceAll('"','\\"')}"`};const joinCommand=(e,t)=>normalizeArgs(e,t).join(" ");const getEscapedCommand=(e,t)=>normalizeArgs(e,t).map((e=>escapeArg(e))).join(" ");const U=/ +/g;const parseCommand=e=>{const t=[];for(const r of e.trim().split(U)){const e=t.at(-1);if(e&&e.endsWith("\\")){t[t.length-1]=`${e.slice(0,-1)} ${r}`}else{t.push(r)}}return t};const parseExpression=e=>{const t=typeof e;if(t==="string"){return e}if(t==="number"){return String(e)}if(t==="object"&&e!==null&&!(e instanceof s.ChildProcess)&&"stdout"in e){const t=typeof e.stdout;if(t==="string"){return e.stdout}if(n.Buffer.isBuffer(e.stdout)){return e.stdout.toString()}throw new TypeError(`Unexpected "${t}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)};const concatTokens=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)];const parseTemplate=({templates:e,expressions:t,tokens:r,index:n,template:i})=>{const s=i??e.raw[n];const o=s.split(U).filter(Boolean);const a=concatTokens(r,o,s.startsWith(" "));if(n===t.length){return a}const c=t[n];const l=Array.isArray(c)?c.map((e=>parseExpression(e))):[parseExpression(c)];return concatTokens(a,l,s.endsWith(" "))};const parseTemplates=(e,t)=>{let r=[];for(const[n,i]of e.entries()){r=parseTemplate({templates:e,expressions:t,tokens:r,index:n,template:i})}return r};var G=r(7261);const z=(0,G.debuglog)("execa").enabled;const padField=(e,t)=>String(e).padStart(t,"0");const getTimestamp=()=>{const e=new Date;return`${padField(e.getHours(),2)}:${padField(e.getMinutes(),2)}:${padField(e.getSeconds(),2)}.${padField(e.getMilliseconds(),3)}`};const logCommand=(e,{verbose:t})=>{if(!t){return}o.stderr.write(`[${getTimestamp()}] ${e}\n`)};const Y=1e3*1e3*100;const getEnv=({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{const s=t?{...o.env,...e}:e;if(r){return npmRunPathEnv({env:s,cwd:n,execPath:i})}return s};const handleArguments=(e,t,r={})=>{const n=a._parse(e,t,r);e=n.command;t=n.args;r=n.options;r={maxBuffer:Y,buffer:true,stripFinalNewline:true,extendEnv:true,preferLocal:false,localDir:r.cwd||o.cwd(),execPath:o.execPath,encoding:"utf8",reject:true,cleanup:true,all:false,windowsHide:true,verbose:z,...r};r.env=getEnv(r);r.stdio=normalizeStdio(r);if(o.platform==="win32"&&i.basename(e,".exe")==="cmd"){t.unshift("/q")}return{file:e,args:t,options:r,parsed:n}};const handleOutput=(e,t,r)=>{if(typeof t!=="string"&&!n.Buffer.isBuffer(t)){return r===undefined?undefined:""}if(e.stripFinalNewline){return stripFinalNewline(t)}return t};function execa(e,t,r){const n=handleArguments(e,t,r);const i=joinCommand(e,t);const o=getEscapedCommand(e,t);logCommand(o,n.options);validateTimeout(n.options);let a;try{a=s.spawn(n.file,n.args,n.options)}catch(e){const t=new s.ChildProcess;const r=Promise.reject(makeError({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:false,isCanceled:false,killed:false}));mergePromise(t,r);return t}const c=getSpawnedPromise(a);const l=setupTimeout(a,n.options,c);const u=setExitHandler(a,n.options,l);const f={isCanceled:false};a.kill=spawnedKill.bind(null,a.kill.bind(a));a.cancel=spawnedCancel.bind(null,a,f);const handlePromise=async()=>{const[{error:e,exitCode:t,signal:r,timedOut:s},c,l,h]=await getSpawnedResult(a,n.options,u);const d=handleOutput(n.options,c);const p=handleOutput(n.options,l);const m=handleOutput(n.options,h);if(e||t!==0||r!==null){const c=makeError({error:e,exitCode:t,signal:r,stdout:d,stderr:p,all:m,command:i,escapedCommand:o,parsed:n,timedOut:s,isCanceled:f.isCanceled||(n.options.signal?n.options.signal.aborted:false),killed:a.killed});if(!n.options.reject){return c}throw c}return{command:i,escapedCommand:o,exitCode:0,stdout:d,stderr:p,all:m,failed:false,timedOut:false,isCanceled:false,killed:false}};const d=h(handlePromise);handleInput(a,n.options);a.all=makeAllStream(a,n.options);addPipeMethods(a);mergePromise(a,d);return a}function execaSync(e,t,r){const n=handleArguments(e,t,r);const i=joinCommand(e,t);const o=getEscapedCommand(e,t);logCommand(o,n.options);const a=handleInputSync(n.options);let c;try{c=s.spawnSync(n.file,n.args,{...n.options,input:a})}catch(e){throw makeError({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:false,isCanceled:false,killed:false})}const l=handleOutput(n.options,c.stdout,c.error);const u=handleOutput(n.options,c.stderr,c.error);if(c.error||c.status!==0||c.signal!==null){const e=makeError({stdout:l,stderr:u,error:c.error,signal:c.signal,exitCode:c.status,command:i,escapedCommand:o,parsed:n,timedOut:c.error&&c.error.code==="ETIMEDOUT",isCanceled:false,killed:c.signal!==null});if(!n.options.reject){return e}throw e}return{command:i,escapedCommand:o,exitCode:0,stdout:l,stderr:u,failed:false,timedOut:false,isCanceled:false,killed:false}}const normalizeScriptStdin=({input:e,inputFile:t,stdio:r})=>e===undefined&&t===undefined&&r===undefined?{stdin:"inherit"}:{};const normalizeScriptOptions=(e={})=>({preferLocal:true,...normalizeScriptStdin(e),...e});function create$(e){function $(t,...r){if(!Array.isArray(t)){return create$({...e,...t})}const[n,...i]=parseTemplates(t,r);return execa(n,i,normalizeScriptOptions(e))}$.sync=(t,...r)=>{if(!Array.isArray(t)){throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.")}const[n,...i]=parseTemplates(t,r);return execaSync(n,i,normalizeScriptOptions(e))};return $}const V=create$();function execaCommand(e,t){const[r,...n]=parseCommand(e);return execa(r,n,t)}function execaCommandSync(e,t){const[r,...n]=parseCommand(e);return execaSync(r,n,t)}function execaNode(e,t,r={}){if(t&&!Array.isArray(t)&&typeof t==="object"){r=t;t=[]}const n=normalizeStdioNode(r);const i=o.execArgv.filter((e=>!e.startsWith("--inspect")));const{nodePath:s=o.execPath,nodeOptions:a=i}=r;return execa(s,[...a,e,...Array.isArray(t)?t:[]],{...r,stdin:undefined,stdout:undefined,stderr:undefined,stdio:n,shell:false})}},7852:(e,t,r)=>{"use strict";r.r(t);r.d(t,{customAlphabet:()=>customAlphabet,customRandom:()=>customRandom,nanoid:()=>nanoid,random:()=>random,urlAlphabet:()=>i});const n=require("node:crypto");const i="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";const s=128;let o,a;function fillPool(e){if(!o||o.length<e){o=Buffer.allocUnsafe(e*s);n.webcrypto.getRandomValues(o);a=0}else if(a+e>o.length){n.webcrypto.getRandomValues(o);a=0}a+=e}function random(e){fillPool(e-=0);return o.subarray(a-e,a)}function customRandom(e,t,r){let n=(2<<31-Math.clz32(e.length-1|1))-1;let i=Math.ceil(1.6*n*t/e.length);return(s=t)=>{let o="";while(true){let t=r(i);let a=i;while(a--){o+=e[t[a]&n]||"";if(o.length===s)return o}}}}function customAlphabet(e,t=21){return customRandom(e,t,random)}function nanoid(e=21){fillPool(e-=0);let t="";for(let r=a-e;r<a;r++){t+=i[o[r]&63]}return t}},5133:e=>{"use strict";e.exports=JSON.parse('["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(6144);module.exports=__webpack_exports__})();
|
|
57
|
+
*/const a=s(3102);const toRegexRange=(r,n,s)=>{if(a(r)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(n===void 0||r===n){return String(r)}if(a(n)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let l={relaxZeros:true,...s};if(typeof l.strictZeros==="boolean"){l.relaxZeros=l.strictZeros===false}let u=String(l.relaxZeros);let f=String(l.shorthand);let d=String(l.capture);let p=String(l.wrap);let m=r+":"+n+"="+u+f+d+p;if(toRegexRange.cache.hasOwnProperty(m)){return toRegexRange.cache[m].result}let g=Math.min(r,n);let y=Math.max(r,n);if(Math.abs(g-y)===1){let s=r+"|"+n;if(l.capture){return`(${s})`}if(l.wrap===false){return s}return`(?:${s})`}let v=hasPadding(r)||hasPadding(n);let b={min:r,max:n,a:g,b:y};let w=[];let _=[];if(v){b.isPadded=v;b.maxLen=String(b.max).length}if(g<0){let r=y<0?Math.abs(y):1;_=splitToPatterns(r,Math.abs(g),b,l);g=b.a=0}if(y>=0){w=splitToPatterns(g,y,b,l)}b.negatives=_;b.positives=w;b.result=collatePatterns(_,w,l);if(l.capture===true){b.result=`(${b.result})`}else if(l.wrap!==false&&w.length+_.length>1){b.result=`(?:${b.result})`}toRegexRange.cache[m]=b;return b.result};function collatePatterns(r,n,s){let a=filterPatterns(r,n,"-",false,s)||[];let l=filterPatterns(n,r,"",false,s)||[];let u=filterPatterns(r,n,"-?",true,s)||[];let f=a.concat(u).concat(l);return f.join("|")}function splitToRanges(r,n){let s=1;let a=1;let l=countNines(r,s);let u=new Set([n]);while(r<=l&&l<=n){u.add(l);s+=1;l=countNines(r,s)}l=countZeros(n+1,a)-1;while(r<l&&l<=n){u.add(l);a+=1;l=countZeros(n+1,a)-1}u=[...u];u.sort(compare);return u}function rangeToPattern(r,n,s){if(r===n){return{pattern:r,count:[],digits:0}}let a=zip(r,n);let l=a.length;let u="";let f=0;for(let r=0;r<l;r++){let[n,l]=a[r];if(n===l){u+=n}else if(n!=="0"||l!=="9"){u+=toCharacterClass(n,l,s)}else{f++}}if(f){u+=s.shorthand===true?"\\d":"[0-9]"}return{pattern:u,count:[f],digits:l}}function splitToPatterns(r,n,s,a){let l=splitToRanges(r,n);let u=[];let f=r;let d;for(let r=0;r<l.length;r++){let n=l[r];let p=rangeToPattern(String(f),String(n),a);let m="";if(!s.isPadded&&d&&d.pattern===p.pattern){if(d.count.length>1){d.count.pop()}d.count.push(p.count[0]);d.string=d.pattern+toQuantifier(d.count);f=n+1;continue}if(s.isPadded){m=padZeros(n,s,a)}p.string=m+p.pattern+toQuantifier(p.count);u.push(p);f=n+1;d=p}return u}function filterPatterns(r,n,s,a,l){let u=[];for(let l of r){let{string:r}=l;if(!a&&!contains(n,"string",r)){u.push(s+r)}if(a&&contains(n,"string",r)){u.push(s+r)}}return u}function zip(r,n){let s=[];for(let a=0;a<r.length;a++)s.push([r[a],n[a]]);return s}function compare(r,n){return r>n?1:n>r?-1:0}function contains(r,n,s){return r.some((r=>r[n]===s))}function countNines(r,n){return Number(String(r).slice(0,-n)+"9".repeat(n))}function countZeros(r,n){return r-r%Math.pow(10,n)}function toQuantifier(r){let[n=0,s=""]=r;if(s||n>1){return`{${n+(s?","+s:"")}}`}return""}function toCharacterClass(r,n,s){return`[${r}${n-r===1?"":"-"}${n}]`}function hasPadding(r){return/^-?(0+)\d/.test(r)}function padZeros(r,n,s){if(!n.isPadded){return r}let a=Math.abs(n.maxLen-String(r).length);let l=s.relaxZeros!==false;switch(a){case 0:return"";case 1:return l?"0?":"0";case 2:return l?"0{0,2}":"00";default:{return l?`0{0,${a}}`:`0{${a}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};r.exports=toRegexRange},6848:(r,n,s)=>{const a=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const l=s(6928);const u=a?";":":";const f=s(2940);const getNotFoundError=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"});const getPathInfo=(r,n)=>{const s=n.colon||u;const l=r.match(/\//)||a&&r.match(/\\/)?[""]:[...a?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(s)];const f=a?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const d=a?f.split(s):[""];if(a){if(r.indexOf(".")!==-1&&d[0]!=="")d.unshift("")}return{pathEnv:l,pathExt:d,pathExtExe:f}};const which=(r,n,s)=>{if(typeof n==="function"){s=n;n={}}if(!n)n={};const{pathEnv:a,pathExt:u,pathExtExe:d}=getPathInfo(r,n);const p=[];const step=s=>new Promise(((u,f)=>{if(s===a.length)return n.all&&p.length?u(p):f(getNotFoundError(r));const d=a[s];const m=/^".*"$/.test(d)?d.slice(1,-1):d;const g=l.join(m,r);const y=!m&&/^\.[\\\/]/.test(r)?r.slice(0,2)+g:g;u(subStep(y,s,0))}));const subStep=(r,s,a)=>new Promise(((l,m)=>{if(a===u.length)return l(step(s+1));const g=u[a];f(r+g,{pathExt:d},((u,f)=>{if(!u&&f){if(n.all)p.push(r+g);else return l(r+g)}return l(subStep(r,s,a+1))}))}));return s?step(0).then((r=>s(null,r)),s):step(0)};const whichSync=(r,n)=>{n=n||{};const{pathEnv:s,pathExt:a,pathExtExe:u}=getPathInfo(r,n);const d=[];for(let p=0;p<s.length;p++){const m=s[p];const g=/^".*"$/.test(m)?m.slice(1,-1):m;const y=l.join(g,r);const v=!g&&/^\.[\\\/]/.test(r)?r.slice(0,2)+y:y;for(let r=0;r<a.length;r++){const s=v+a[r];try{const r=f.sync(s,{pathExt:u});if(r){if(n.all)d.push(s);else return s}}catch(r){}}}if(n.all&&d.length)return d;if(n.nothrow)return null;throw getNotFoundError(r)};r.exports=which;which.sync=whichSync},1354:(r,n,s)=>{"use strict";const a=s(6681);a.createWebSocketStream=s(6412);a.Server=s(129);a.Receiver=s(893);a.Sender=s(7389);a.WebSocket=a;a.WebSocketServer=a.Server;r.exports=a},5803:(r,n,s)=>{"use strict";const{EMPTY_BUFFER:a}=s(1791);const l=Buffer[Symbol.species];function concat(r,n){if(r.length===0)return a;if(r.length===1)return r[0];const s=Buffer.allocUnsafe(n);let u=0;for(let n=0;n<r.length;n++){const a=r[n];s.set(a,u);u+=a.length}if(u<n){return new l(s.buffer,s.byteOffset,u)}return s}function _mask(r,n,s,a,l){for(let u=0;u<l;u++){s[a+u]=r[u]^n[u&3]}}function _unmask(r,n){for(let s=0;s<r.length;s++){r[s]^=n[s&3]}}function toArrayBuffer(r){if(r.length===r.buffer.byteLength){return r.buffer}return r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function toBuffer(r){toBuffer.readOnly=true;if(Buffer.isBuffer(r))return r;let n;if(r instanceof ArrayBuffer){n=new l(r)}else if(ArrayBuffer.isView(r)){n=new l(r.buffer,r.byteOffset,r.byteLength)}else{n=Buffer.from(r);toBuffer.readOnly=false}return n}r.exports={concat:concat,mask:_mask,toArrayBuffer:toArrayBuffer,toBuffer:toBuffer,unmask:_unmask};if(!process.env.WS_NO_BUFFER_UTIL){try{const n=s(8327);r.exports.mask=function(r,s,a,l,u){if(u<48)_mask(r,s,a,l,u);else n.mask(r,s,a,l,u)};r.exports.unmask=function(r,s){if(r.length<32)_unmask(r,s);else n.unmask(r,s)}}catch(r){}}},1791:r=>{"use strict";const n=["nodebuffer","arraybuffer","fragments"];const s=typeof Blob!=="undefined";if(s)n.push("blob");r.exports={BINARY_TYPES:n,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:s,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},4634:(r,n,s)=>{"use strict";const{kForOnEventAttribute:a,kListener:l}=s(1791);const u=Symbol("kCode");const f=Symbol("kData");const d=Symbol("kError");const p=Symbol("kMessage");const m=Symbol("kReason");const g=Symbol("kTarget");const y=Symbol("kType");const v=Symbol("kWasClean");class Event{constructor(r){this[g]=null;this[y]=r}get target(){return this[g]}get type(){return this[y]}}Object.defineProperty(Event.prototype,"target",{enumerable:true});Object.defineProperty(Event.prototype,"type",{enumerable:true});class CloseEvent extends Event{constructor(r,n={}){super(r);this[u]=n.code===undefined?0:n.code;this[m]=n.reason===undefined?"":n.reason;this[v]=n.wasClean===undefined?false:n.wasClean}get code(){return this[u]}get reason(){return this[m]}get wasClean(){return this[v]}}Object.defineProperty(CloseEvent.prototype,"code",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"reason",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"wasClean",{enumerable:true});class ErrorEvent extends Event{constructor(r,n={}){super(r);this[d]=n.error===undefined?null:n.error;this[p]=n.message===undefined?"":n.message}get error(){return this[d]}get message(){return this[p]}}Object.defineProperty(ErrorEvent.prototype,"error",{enumerable:true});Object.defineProperty(ErrorEvent.prototype,"message",{enumerable:true});class MessageEvent extends Event{constructor(r,n={}){super(r);this[f]=n.data===undefined?null:n.data}get data(){return this[f]}}Object.defineProperty(MessageEvent.prototype,"data",{enumerable:true});const b={addEventListener(r,n,s={}){for(const u of this.listeners(r)){if(!s[a]&&u[l]===n&&!u[a]){return}}let u;if(r==="message"){u=function onMessage(r,s){const a=new MessageEvent("message",{data:s?r:r.toString()});a[g]=this;callListener(n,this,a)}}else if(r==="close"){u=function onClose(r,s){const a=new CloseEvent("close",{code:r,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[g]=this;callListener(n,this,a)}}else if(r==="error"){u=function onError(r){const s=new ErrorEvent("error",{error:r,message:r.message});s[g]=this;callListener(n,this,s)}}else if(r==="open"){u=function onOpen(){const r=new Event("open");r[g]=this;callListener(n,this,r)}}else{return}u[a]=!!s[a];u[l]=n;if(s.once){this.once(r,u)}else{this.on(r,u)}},removeEventListener(r,n){for(const s of this.listeners(r)){if(s[l]===n&&!s[a]){this.removeListener(r,s);break}}}};r.exports={CloseEvent:CloseEvent,ErrorEvent:ErrorEvent,Event:Event,EventTarget:b,MessageEvent:MessageEvent};function callListener(r,n,s){if(typeof r==="object"&&r.handleEvent){r.handleEvent.call(r,s)}else{r.call(n,s)}}},1335:(r,n,s)=>{"use strict";const{tokenChars:a}=s(6615);function push(r,n,s){if(r[n]===undefined)r[n]=[s];else r[n].push(s)}function parse(r){const n=Object.create(null);let s=Object.create(null);let l=false;let u=false;let f=false;let d;let p;let m=-1;let g=-1;let y=-1;let v=0;for(;v<r.length;v++){g=r.charCodeAt(v);if(d===undefined){if(y===-1&&a[g]===1){if(m===-1)m=v}else if(v!==0&&(g===32||g===9)){if(y===-1&&m!==-1)y=v}else if(g===59||g===44){if(m===-1){throw new SyntaxError(`Unexpected character at index ${v}`)}if(y===-1)y=v;const a=r.slice(m,y);if(g===44){push(n,a,s);s=Object.create(null)}else{d=a}m=y=-1}else{throw new SyntaxError(`Unexpected character at index ${v}`)}}else if(p===undefined){if(y===-1&&a[g]===1){if(m===-1)m=v}else if(g===32||g===9){if(y===-1&&m!==-1)y=v}else if(g===59||g===44){if(m===-1){throw new SyntaxError(`Unexpected character at index ${v}`)}if(y===-1)y=v;push(s,r.slice(m,y),true);if(g===44){push(n,d,s);s=Object.create(null);d=undefined}m=y=-1}else if(g===61&&m!==-1&&y===-1){p=r.slice(m,v);m=y=-1}else{throw new SyntaxError(`Unexpected character at index ${v}`)}}else{if(u){if(a[g]!==1){throw new SyntaxError(`Unexpected character at index ${v}`)}if(m===-1)m=v;else if(!l)l=true;u=false}else if(f){if(a[g]===1){if(m===-1)m=v}else if(g===34&&m!==-1){f=false;y=v}else if(g===92){u=true}else{throw new SyntaxError(`Unexpected character at index ${v}`)}}else if(g===34&&r.charCodeAt(v-1)===61){f=true}else if(y===-1&&a[g]===1){if(m===-1)m=v}else if(m!==-1&&(g===32||g===9)){if(y===-1)y=v}else if(g===59||g===44){if(m===-1){throw new SyntaxError(`Unexpected character at index ${v}`)}if(y===-1)y=v;let a=r.slice(m,y);if(l){a=a.replace(/\\/g,"");l=false}push(s,p,a);if(g===44){push(n,d,s);s=Object.create(null);d=undefined}p=undefined;m=y=-1}else{throw new SyntaxError(`Unexpected character at index ${v}`)}}}if(m===-1||f||g===32||g===9){throw new SyntaxError("Unexpected end of input")}if(y===-1)y=v;const b=r.slice(m,y);if(d===undefined){push(n,b,s)}else{if(p===undefined){push(s,b,true)}else if(l){push(s,p,b.replace(/\\/g,""))}else{push(s,p,b)}push(n,d,s)}return n}function format(r){return Object.keys(r).map((n=>{let s=r[n];if(!Array.isArray(s))s=[s];return s.map((r=>[n].concat(Object.keys(r).map((n=>{let s=r[n];if(!Array.isArray(s))s=[s];return s.map((r=>r===true?n:`${n}=${r}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")}r.exports={format:format,parse:parse}},958:r=>{"use strict";const n=Symbol("kDone");const s=Symbol("kRun");class Limiter{constructor(r){this[n]=()=>{this.pending--;this[s]()};this.concurrency=r||Infinity;this.jobs=[];this.pending=0}add(r){this.jobs.push(r);this[s]()}[s](){if(this.pending===this.concurrency)return;if(this.jobs.length){const r=this.jobs.shift();this.pending++;r(this[n])}}}r.exports=Limiter},4376:(r,n,s)=>{"use strict";const a=s(3106);const l=s(5803);const u=s(958);const{kStatusCode:f}=s(1791);const d=Buffer[Symbol.species];const p=Buffer.from([0,0,255,255]);const m=Symbol("permessage-deflate");const g=Symbol("total-length");const y=Symbol("callback");const v=Symbol("buffers");const b=Symbol("error");let w;class PerMessageDeflate{constructor(r,n,s){this._maxPayload=s|0;this._options=r||{};this._threshold=this._options.threshold!==undefined?this._options.threshold:1024;this._isServer=!!n;this._deflate=null;this._inflate=null;this.params=null;if(!w){const r=this._options.concurrencyLimit!==undefined?this._options.concurrencyLimit:10;w=new u(r)}}static get extensionName(){return"permessage-deflate"}offer(){const r={};if(this._options.serverNoContextTakeover){r.server_no_context_takeover=true}if(this._options.clientNoContextTakeover){r.client_no_context_takeover=true}if(this._options.serverMaxWindowBits){r.server_max_window_bits=this._options.serverMaxWindowBits}if(this._options.clientMaxWindowBits){r.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits==null){r.client_max_window_bits=true}return r}accept(r){r=this.normalizeParams(r);this.params=this._isServer?this.acceptAsServer(r):this.acceptAsClient(r);return this.params}cleanup(){if(this._inflate){this._inflate.close();this._inflate=null}if(this._deflate){const r=this._deflate[y];this._deflate.close();this._deflate=null;if(r){r(new Error("The deflate stream was closed while data was being processed"))}}}acceptAsServer(r){const n=this._options;const s=r.find((r=>{if(n.serverNoContextTakeover===false&&r.server_no_context_takeover||r.server_max_window_bits&&(n.serverMaxWindowBits===false||typeof n.serverMaxWindowBits==="number"&&n.serverMaxWindowBits>r.server_max_window_bits)||typeof n.clientMaxWindowBits==="number"&&!r.client_max_window_bits){return false}return true}));if(!s){throw new Error("None of the extension offers can be accepted")}if(n.serverNoContextTakeover){s.server_no_context_takeover=true}if(n.clientNoContextTakeover){s.client_no_context_takeover=true}if(typeof n.serverMaxWindowBits==="number"){s.server_max_window_bits=n.serverMaxWindowBits}if(typeof n.clientMaxWindowBits==="number"){s.client_max_window_bits=n.clientMaxWindowBits}else if(s.client_max_window_bits===true||n.clientMaxWindowBits===false){delete s.client_max_window_bits}return s}acceptAsClient(r){const n=r[0];if(this._options.clientNoContextTakeover===false&&n.client_no_context_takeover){throw new Error('Unexpected parameter "client_no_context_takeover"')}if(!n.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number"){n.client_max_window_bits=this._options.clientMaxWindowBits}}else if(this._options.clientMaxWindowBits===false||typeof this._options.clientMaxWindowBits==="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits){throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}return n}normalizeParams(r){r.forEach((r=>{Object.keys(r).forEach((n=>{let s=r[n];if(s.length>1){throw new Error(`Parameter "${n}" must have only a single value`)}s=s[0];if(n==="client_max_window_bits"){if(s!==true){const r=+s;if(!Number.isInteger(r)||r<8||r>15){throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}s=r}else if(!this._isServer){throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}}else if(n==="server_max_window_bits"){const r=+s;if(!Number.isInteger(r)||r<8||r>15){throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}s=r}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(s!==true){throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}}else{throw new Error(`Unknown parameter "${n}"`)}r[n]=s}))}));return r}decompress(r,n,s){w.add((a=>{this._decompress(r,n,((r,n)=>{a();s(r,n)}))}))}compress(r,n,s){w.add((a=>{this._compress(r,n,((r,n)=>{a();s(r,n)}))}))}_decompress(r,n,s){const u=this._isServer?"client":"server";if(!this._inflate){const r=`${u}_max_window_bits`;const n=typeof this.params[r]!=="number"?a.Z_DEFAULT_WINDOWBITS:this.params[r];this._inflate=a.createInflateRaw({...this._options.zlibInflateOptions,windowBits:n});this._inflate[m]=this;this._inflate[g]=0;this._inflate[v]=[];this._inflate.on("error",inflateOnError);this._inflate.on("data",inflateOnData)}this._inflate[y]=s;this._inflate.write(r);if(n)this._inflate.write(p);this._inflate.flush((()=>{const r=this._inflate[b];if(r){this._inflate.close();this._inflate=null;s(r);return}const a=l.concat(this._inflate[v],this._inflate[g]);if(this._inflate._readableState.endEmitted){this._inflate.close();this._inflate=null}else{this._inflate[g]=0;this._inflate[v]=[];if(n&&this.params[`${u}_no_context_takeover`]){this._inflate.reset()}}s(null,a)}))}_compress(r,n,s){const u=this._isServer?"server":"client";if(!this._deflate){const r=`${u}_max_window_bits`;const n=typeof this.params[r]!=="number"?a.Z_DEFAULT_WINDOWBITS:this.params[r];this._deflate=a.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:n});this._deflate[g]=0;this._deflate[v]=[];this._deflate.on("data",deflateOnData)}this._deflate[y]=s;this._deflate.write(r);this._deflate.flush(a.Z_SYNC_FLUSH,(()=>{if(!this._deflate){return}let r=l.concat(this._deflate[v],this._deflate[g]);if(n){r=new d(r.buffer,r.byteOffset,r.length-4)}this._deflate[y]=null;this._deflate[g]=0;this._deflate[v]=[];if(n&&this.params[`${u}_no_context_takeover`]){this._deflate.reset()}s(null,r)}))}}r.exports=PerMessageDeflate;function deflateOnData(r){this[v].push(r);this[g]+=r.length}function inflateOnData(r){this[g]+=r.length;if(this[m]._maxPayload<1||this[g]<=this[m]._maxPayload){this[v].push(r);return}this[b]=new RangeError("Max payload size exceeded");this[b].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";this[b][f]=1009;this.removeListener("data",inflateOnData);this.reset()}function inflateOnError(r){this[m]._inflate=null;r[f]=1007;this[y](r)}},893:(r,n,s)=>{"use strict";const{Writable:a}=s(2203);const l=s(4376);const{BINARY_TYPES:u,EMPTY_BUFFER:f,kStatusCode:d,kWebSocket:p}=s(1791);const{concat:m,toArrayBuffer:g,unmask:y}=s(5803);const{isValidStatusCode:v,isValidUTF8:b}=s(6615);const w=Buffer[Symbol.species];const _=0;const S=1;const E=2;const x=3;const A=4;const k=5;const C=6;class Receiver extends a{constructor(r={}){super();this._allowSynchronousEvents=r.allowSynchronousEvents!==undefined?r.allowSynchronousEvents:true;this._binaryType=r.binaryType||u[0];this._extensions=r.extensions||{};this._isServer=!!r.isServer;this._maxPayload=r.maxPayload|0;this._skipUTF8Validation=!!r.skipUTF8Validation;this[p]=undefined;this._bufferedBytes=0;this._buffers=[];this._compressed=false;this._payloadLength=0;this._mask=undefined;this._fragmented=0;this._masked=false;this._fin=false;this._opcode=0;this._totalPayloadLength=0;this._messageLength=0;this._fragments=[];this._errored=false;this._loop=false;this._state=_}_write(r,n,s){if(this._opcode===8&&this._state==_)return s();this._bufferedBytes+=r.length;this._buffers.push(r);this.startLoop(s)}consume(r){this._bufferedBytes-=r;if(r===this._buffers[0].length)return this._buffers.shift();if(r<this._buffers[0].length){const n=this._buffers[0];this._buffers[0]=new w(n.buffer,n.byteOffset+r,n.length-r);return new w(n.buffer,n.byteOffset,r)}const n=Buffer.allocUnsafe(r);do{const s=this._buffers[0];const a=n.length-r;if(r>=s.length){n.set(this._buffers.shift(),a)}else{n.set(new Uint8Array(s.buffer,s.byteOffset,r),a);this._buffers[0]=new w(s.buffer,s.byteOffset+r,s.length-r)}r-=s.length}while(r>0);return n}startLoop(r){this._loop=true;do{switch(this._state){case _:this.getInfo(r);break;case S:this.getPayloadLength16(r);break;case E:this.getPayloadLength64(r);break;case x:this.getMask();break;case A:this.getData(r);break;case k:case C:this._loop=false;return}}while(this._loop);if(!this._errored)r()}getInfo(r){if(this._bufferedBytes<2){this._loop=false;return}const n=this.consume(2);if((n[0]&48)!==0){const n=this.createError(RangeError,"RSV2 and RSV3 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_2_3");r(n);return}const s=(n[0]&64)===64;if(s&&!this._extensions[l.extensionName]){const n=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");r(n);return}this._fin=(n[0]&128)===128;this._opcode=n[0]&15;this._payloadLength=n[1]&127;if(this._opcode===0){if(s){const n=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");r(n);return}if(!this._fragmented){const n=this.createError(RangeError,"invalid opcode 0",true,1002,"WS_ERR_INVALID_OPCODE");r(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){const n=this.createError(RangeError,`invalid opcode ${this._opcode}`,true,1002,"WS_ERR_INVALID_OPCODE");r(n);return}this._compressed=s}else if(this._opcode>7&&this._opcode<11){if(!this._fin){const n=this.createError(RangeError,"FIN must be set",true,1002,"WS_ERR_EXPECTED_FIN");r(n);return}if(s){const n=this.createError(RangeError,"RSV1 must be clear",true,1002,"WS_ERR_UNEXPECTED_RSV_1");r(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){const n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,true,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");r(n);return}}else{const n=this.createError(RangeError,`invalid opcode ${this._opcode}`,true,1002,"WS_ERR_INVALID_OPCODE");r(n);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;this._masked=(n[1]&128)===128;if(this._isServer){if(!this._masked){const n=this.createError(RangeError,"MASK must be set",true,1002,"WS_ERR_EXPECTED_MASK");r(n);return}}else if(this._masked){const n=this.createError(RangeError,"MASK must be clear",true,1002,"WS_ERR_UNEXPECTED_MASK");r(n);return}if(this._payloadLength===126)this._state=S;else if(this._payloadLength===127)this._state=E;else this.haveLength(r)}getPayloadLength16(r){if(this._bufferedBytes<2){this._loop=false;return}this._payloadLength=this.consume(2).readUInt16BE(0);this.haveLength(r)}getPayloadLength64(r){if(this._bufferedBytes<8){this._loop=false;return}const n=this.consume(8);const s=n.readUInt32BE(0);if(s>Math.pow(2,53-32)-1){const n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",false,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");r(n);return}this._payloadLength=s*Math.pow(2,32)+n.readUInt32BE(4);this.haveLength(r)}haveLength(r){if(this._payloadLength&&this._opcode<8){this._totalPayloadLength+=this._payloadLength;if(this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){const n=this.createError(RangeError,"Max payload size exceeded",false,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(n);return}}if(this._masked)this._state=x;else this._state=A}getMask(){if(this._bufferedBytes<4){this._loop=false;return}this._mask=this.consume(4);this._state=A}getData(r){let n=f;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=false;return}n=this.consume(this._payloadLength);if(this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0){y(n,this._mask)}}if(this._opcode>7){this.controlMessage(n,r);return}if(this._compressed){this._state=k;this.decompress(n,r);return}if(n.length){this._messageLength=this._totalPayloadLength;this._fragments.push(n)}this.dataMessage(r)}decompress(r,n){const s=this._extensions[l.extensionName];s.decompress(r,this._fin,((r,s)=>{if(r)return n(r);if(s.length){this._messageLength+=s.length;if(this._messageLength>this._maxPayload&&this._maxPayload>0){const r=this.createError(RangeError,"Max payload size exceeded",false,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(r);return}this._fragments.push(s)}this.dataMessage(n);if(this._state===_)this.startLoop(n)}))}dataMessage(r){if(!this._fin){this._state=_;return}const n=this._messageLength;const s=this._fragments;this._totalPayloadLength=0;this._messageLength=0;this._fragmented=0;this._fragments=[];if(this._opcode===2){let a;if(this._binaryType==="nodebuffer"){a=m(s,n)}else if(this._binaryType==="arraybuffer"){a=g(m(s,n))}else if(this._binaryType==="blob"){a=new Blob(s)}else{a=s}if(this._allowSynchronousEvents){this.emit("message",a,true);this._state=_}else{this._state=C;setImmediate((()=>{this.emit("message",a,true);this._state=_;this.startLoop(r)}))}}else{const a=m(s,n);if(!this._skipUTF8Validation&&!b(a)){const n=this.createError(Error,"invalid UTF-8 sequence",true,1007,"WS_ERR_INVALID_UTF8");r(n);return}if(this._state===k||this._allowSynchronousEvents){this.emit("message",a,false);this._state=_}else{this._state=C;setImmediate((()=>{this.emit("message",a,false);this._state=_;this.startLoop(r)}))}}}controlMessage(r,n){if(this._opcode===8){if(r.length===0){this._loop=false;this.emit("conclude",1005,f);this.end()}else{const s=r.readUInt16BE(0);if(!v(s)){const r=this.createError(RangeError,`invalid status code ${s}`,true,1002,"WS_ERR_INVALID_CLOSE_CODE");n(r);return}const a=new w(r.buffer,r.byteOffset+2,r.length-2);if(!this._skipUTF8Validation&&!b(a)){const r=this.createError(Error,"invalid UTF-8 sequence",true,1007,"WS_ERR_INVALID_UTF8");n(r);return}this._loop=false;this.emit("conclude",s,a);this.end()}this._state=_;return}if(this._allowSynchronousEvents){this.emit(this._opcode===9?"ping":"pong",r);this._state=_}else{this._state=C;setImmediate((()=>{this.emit(this._opcode===9?"ping":"pong",r);this._state=_;this.startLoop(n)}))}}createError(r,n,s,a,l){this._loop=false;this._errored=true;const u=new r(s?`Invalid WebSocket frame: ${n}`:n);Error.captureStackTrace(u,this.createError);u.code=l;u[d]=a;return u}}r.exports=Receiver},7389:(r,n,s)=>{"use strict";const{Duplex:a}=s(2203);const{randomFillSync:l}=s(6982);const u=s(4376);const{EMPTY_BUFFER:f,kWebSocket:d,NOOP:p}=s(1791);const{isBlob:m,isValidStatusCode:g}=s(6615);const{mask:y,toBuffer:v}=s(5803);const b=Symbol("kByteLength");const w=Buffer.alloc(4);const _=8*1024;let S;let E=_;const x=0;const A=1;const k=2;class Sender{constructor(r,n,s){this._extensions=n||{};if(s){this._generateMask=s;this._maskBuffer=Buffer.alloc(4)}this._socket=r;this._firstFragment=true;this._compress=false;this._bufferedBytes=0;this._queue=[];this._state=x;this.onerror=p;this[d]=undefined}static frame(r,n){let s;let a=false;let u=2;let f=false;if(n.mask){s=n.maskBuffer||w;if(n.generateMask){n.generateMask(s)}else{if(E===_){if(S===undefined){S=Buffer.alloc(_)}l(S,0,_);E=0}s[0]=S[E++];s[1]=S[E++];s[2]=S[E++];s[3]=S[E++]}f=(s[0]|s[1]|s[2]|s[3])===0;u=6}let d;if(typeof r==="string"){if((!n.mask||f)&&n[b]!==undefined){d=n[b]}else{r=Buffer.from(r);d=r.length}}else{d=r.length;a=n.mask&&n.readOnly&&!f}let p=d;if(d>=65536){u+=8;p=127}else if(d>125){u+=2;p=126}const m=Buffer.allocUnsafe(a?d+u:u);m[0]=n.fin?n.opcode|128:n.opcode;if(n.rsv1)m[0]|=64;m[1]=p;if(p===126){m.writeUInt16BE(d,2)}else if(p===127){m[2]=m[3]=0;m.writeUIntBE(d,4,6)}if(!n.mask)return[m,r];m[1]|=128;m[u-4]=s[0];m[u-3]=s[1];m[u-2]=s[2];m[u-1]=s[3];if(f)return[m,r];if(a){y(r,s,m,u,d);return[m]}y(r,s,r,0,d);return[m,r]}close(r,n,s,a){let l;if(r===undefined){l=f}else if(typeof r!=="number"||!g(r)){throw new TypeError("First argument must be a valid error code number")}else if(n===undefined||!n.length){l=Buffer.allocUnsafe(2);l.writeUInt16BE(r,0)}else{const s=Buffer.byteLength(n);if(s>123){throw new RangeError("The message must not be greater than 123 bytes")}l=Buffer.allocUnsafe(2+s);l.writeUInt16BE(r,0);if(typeof n==="string"){l.write(n,2)}else{l.set(n,2)}}const u={[b]:l.length,fin:true,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:false,rsv1:false};if(this._state!==x){this.enqueue([this.dispatch,l,false,u,a])}else{this.sendFrame(Sender.frame(l,u),a)}}ping(r,n,s){let a;let l;if(typeof r==="string"){a=Buffer.byteLength(r);l=false}else if(m(r)){a=r.size;l=false}else{r=v(r);a=r.length;l=v.readOnly}if(a>125){throw new RangeError("The data size must not be greater than 125 bytes")}const u={[b]:a,fin:true,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:l,rsv1:false};if(m(r)){if(this._state!==x){this.enqueue([this.getBlobData,r,false,u,s])}else{this.getBlobData(r,false,u,s)}}else if(this._state!==x){this.enqueue([this.dispatch,r,false,u,s])}else{this.sendFrame(Sender.frame(r,u),s)}}pong(r,n,s){let a;let l;if(typeof r==="string"){a=Buffer.byteLength(r);l=false}else if(m(r)){a=r.size;l=false}else{r=v(r);a=r.length;l=v.readOnly}if(a>125){throw new RangeError("The data size must not be greater than 125 bytes")}const u={[b]:a,fin:true,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:l,rsv1:false};if(m(r)){if(this._state!==x){this.enqueue([this.getBlobData,r,false,u,s])}else{this.getBlobData(r,false,u,s)}}else if(this._state!==x){this.enqueue([this.dispatch,r,false,u,s])}else{this.sendFrame(Sender.frame(r,u),s)}}send(r,n,s){const a=this._extensions[u.extensionName];let l=n.binary?2:1;let f=n.compress;let d;let p;if(typeof r==="string"){d=Buffer.byteLength(r);p=false}else if(m(r)){d=r.size;p=false}else{r=v(r);d=r.length;p=v.readOnly}if(this._firstFragment){this._firstFragment=false;if(f&&a&&a.params[a._isServer?"server_no_context_takeover":"client_no_context_takeover"]){f=d>=a._threshold}this._compress=f}else{f=false;l=0}if(n.fin)this._firstFragment=true;const g={[b]:d,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:l,readOnly:p,rsv1:f};if(m(r)){if(this._state!==x){this.enqueue([this.getBlobData,r,this._compress,g,s])}else{this.getBlobData(r,this._compress,g,s)}}else if(this._state!==x){this.enqueue([this.dispatch,r,this._compress,g,s])}else{this.dispatch(r,this._compress,g,s)}}getBlobData(r,n,s,a){this._bufferedBytes+=s[b];this._state=k;r.arrayBuffer().then((r=>{if(this._socket.destroyed){const r=new Error("The socket was closed while the blob was being read");process.nextTick(callCallbacks,this,r,a);return}this._bufferedBytes-=s[b];const l=v(r);if(!n){this._state=x;this.sendFrame(Sender.frame(l,s),a);this.dequeue()}else{this.dispatch(l,n,s,a)}})).catch((r=>{process.nextTick(onError,this,r,a)}))}dispatch(r,n,s,a){if(!n){this.sendFrame(Sender.frame(r,s),a);return}const l=this._extensions[u.extensionName];this._bufferedBytes+=s[b];this._state=A;l.compress(r,s.fin,((r,n)=>{if(this._socket.destroyed){const r=new Error("The socket was closed while data was being compressed");callCallbacks(this,r,a);return}this._bufferedBytes-=s[b];this._state=x;s.readOnly=false;this.sendFrame(Sender.frame(n,s),a);this.dequeue()}))}dequeue(){while(this._state===x&&this._queue.length){const r=this._queue.shift();this._bufferedBytes-=r[3][b];Reflect.apply(r[0],this,r.slice(1))}}enqueue(r){this._bufferedBytes+=r[3][b];this._queue.push(r)}sendFrame(r,n){if(r.length===2){this._socket.cork();this._socket.write(r[0]);this._socket.write(r[1],n);this._socket.uncork()}else{this._socket.write(r[0],n)}}}r.exports=Sender;function callCallbacks(r,n,s){if(typeof s==="function")s(n);for(let s=0;s<r._queue.length;s++){const a=r._queue[s];const l=a[a.length-1];if(typeof l==="function")l(n)}}function onError(r,n,s){callCallbacks(r,n,s);r.onerror(n)}},6412:(r,n,s)=>{"use strict";const{Duplex:a}=s(2203);function emitClose(r){r.emit("close")}function duplexOnEnd(){if(!this.destroyed&&this._writableState.finished){this.destroy()}}function duplexOnError(r){this.removeListener("error",duplexOnError);this.destroy();if(this.listenerCount("error")===0){this.emit("error",r)}}function createWebSocketStream(r,n){let s=true;const l=new a({...n,autoDestroy:false,emitClose:false,objectMode:false,writableObjectMode:false});r.on("message",(function message(n,s){const a=!s&&l._readableState.objectMode?n.toString():n;if(!l.push(a))r.pause()}));r.once("error",(function error(r){if(l.destroyed)return;s=false;l.destroy(r)}));r.once("close",(function close(){if(l.destroyed)return;l.push(null)}));l._destroy=function(n,a){if(r.readyState===r.CLOSED){a(n);process.nextTick(emitClose,l);return}let u=false;r.once("error",(function error(r){u=true;a(r)}));r.once("close",(function close(){if(!u)a(n);process.nextTick(emitClose,l)}));if(s)r.terminate()};l._final=function(n){if(r.readyState===r.CONNECTING){r.once("open",(function open(){l._final(n)}));return}if(r._socket===null)return;if(r._socket._writableState.finished){n();if(l._readableState.endEmitted)l.destroy()}else{r._socket.once("finish",(function finish(){n()}));r.close()}};l._read=function(){if(r.isPaused)r.resume()};l._write=function(n,s,a){if(r.readyState===r.CONNECTING){r.once("open",(function open(){l._write(n,s,a)}));return}r.send(n,a)};l.on("end",duplexOnEnd);l.on("error",duplexOnError);return l}r.exports=createWebSocketStream},3332:(r,n,s)=>{"use strict";const{tokenChars:a}=s(6615);function parse(r){const n=new Set;let s=-1;let l=-1;let u=0;for(u;u<r.length;u++){const f=r.charCodeAt(u);if(l===-1&&a[f]===1){if(s===-1)s=u}else if(u!==0&&(f===32||f===9)){if(l===-1&&s!==-1)l=u}else if(f===44){if(s===-1){throw new SyntaxError(`Unexpected character at index ${u}`)}if(l===-1)l=u;const a=r.slice(s,l);if(n.has(a)){throw new SyntaxError(`The "${a}" subprotocol is duplicated`)}n.add(a);s=l=-1}else{throw new SyntaxError(`Unexpected character at index ${u}`)}}if(s===-1||l!==-1){throw new SyntaxError("Unexpected end of input")}const f=r.slice(s,u);if(n.has(f)){throw new SyntaxError(`The "${f}" subprotocol is duplicated`)}n.add(f);return n}r.exports={parse:parse}},6615:(r,n,s)=>{"use strict";const{isUtf8:a}=s(181);const{hasBlob:l}=s(1791);const u=[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];function isValidStatusCode(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function _isValidUTF8(r){const n=r.length;let s=0;while(s<n){if((r[s]&128)===0){s++}else if((r[s]&224)===192){if(s+1===n||(r[s+1]&192)!==128||(r[s]&254)===192){return false}s+=2}else if((r[s]&240)===224){if(s+2>=n||(r[s+1]&192)!==128||(r[s+2]&192)!==128||r[s]===224&&(r[s+1]&224)===128||r[s]===237&&(r[s+1]&224)===160){return false}s+=3}else if((r[s]&248)===240){if(s+3>=n||(r[s+1]&192)!==128||(r[s+2]&192)!==128||(r[s+3]&192)!==128||r[s]===240&&(r[s+1]&240)===128||r[s]===244&&r[s+1]>143||r[s]>244){return false}s+=4}else{return false}}return true}function isBlob(r){return l&&typeof r==="object"&&typeof r.arrayBuffer==="function"&&typeof r.type==="string"&&typeof r.stream==="function"&&(r[Symbol.toStringTag]==="Blob"||r[Symbol.toStringTag]==="File")}r.exports={isBlob:isBlob,isValidStatusCode:isValidStatusCode,isValidUTF8:_isValidUTF8,tokenChars:u};if(a){r.exports.isValidUTF8=function(r){return r.length<24?_isValidUTF8(r):a(r)}}else if(!process.env.WS_NO_UTF_8_VALIDATE){try{const n=s(2414);r.exports.isValidUTF8=function(r){return r.length<32?_isValidUTF8(r):n(r)}}catch(r){}}},129:(r,n,s)=>{"use strict";const a=s(4434);const l=s(8611);const{Duplex:u}=s(2203);const{createHash:f}=s(6982);const d=s(1335);const p=s(4376);const m=s(3332);const g=s(6681);const{GUID:y,kWebSocket:v}=s(1791);const b=/^[+/0-9A-Za-z]{22}==$/;const w=0;const _=1;const S=2;class WebSocketServer extends a{constructor(r,n){super();r={allowSynchronousEvents:true,autoPong:true,maxPayload:100*1024*1024,skipUTF8Validation:false,perMessageDeflate:false,handleProtocols:null,clientTracking:true,verifyClient:null,noServer:false,backlog:null,server:null,host:null,path:null,port:null,WebSocket:g,...r};if(r.port==null&&!r.server&&!r.noServer||r.port!=null&&(r.server||r.noServer)||r.server&&r.noServer){throw new TypeError('One and only one of the "port", "server", or "noServer" options '+"must be specified")}if(r.port!=null){this._server=l.createServer(((r,n)=>{const s=l.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"});n.end(s)}));this._server.listen(r.port,r.host,r.backlog,n)}else if(r.server){this._server=r.server}if(this._server){const r=this.emit.bind(this,"connection");this._removeListeners=addListeners(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,a)=>{this.handleUpgrade(n,s,a,r)}})}if(r.perMessageDeflate===true)r.perMessageDeflate={};if(r.clientTracking){this.clients=new Set;this._shouldEmitClose=false}this.options=r;this._state=w}address(){if(this.options.noServer){throw new Error('The server is operating in "noServer" mode')}if(!this._server)return null;return this._server.address()}close(r){if(this._state===S){if(r){this.once("close",(()=>{r(new Error("The server is not running"))}))}process.nextTick(emitClose,this);return}if(r)this.once("close",r);if(this._state===_)return;this._state=_;if(this.options.noServer||this.options.server){if(this._server){this._removeListeners();this._removeListeners=this._server=null}if(this.clients){if(!this.clients.size){process.nextTick(emitClose,this)}else{this._shouldEmitClose=true}}else{process.nextTick(emitClose,this)}}else{const r=this._server;this._removeListeners();this._removeListeners=this._server=null;r.close((()=>{emitClose(this)}))}}shouldHandle(r){if(this.options.path){const n=r.url.indexOf("?");const s=n!==-1?r.url.slice(0,n):r.url;if(s!==this.options.path)return false}return true}handleUpgrade(r,n,s,a){n.on("error",socketOnError);const l=r.headers["sec-websocket-key"];const u=r.headers.upgrade;const f=+r.headers["sec-websocket-version"];if(r.method!=="GET"){const s="Invalid HTTP method";abortHandshakeOrEmitwsClientError(this,r,n,405,s);return}if(u===undefined||u.toLowerCase()!=="websocket"){const s="Invalid Upgrade header";abortHandshakeOrEmitwsClientError(this,r,n,400,s);return}if(l===undefined||!b.test(l)){const s="Missing or invalid Sec-WebSocket-Key header";abortHandshakeOrEmitwsClientError(this,r,n,400,s);return}if(f!==8&&f!==13){const s="Missing or invalid Sec-WebSocket-Version header";abortHandshakeOrEmitwsClientError(this,r,n,400,s);return}if(!this.shouldHandle(r)){abortHandshake(n,400);return}const g=r.headers["sec-websocket-protocol"];let y=new Set;if(g!==undefined){try{y=m.parse(g)}catch(s){const a="Invalid Sec-WebSocket-Protocol header";abortHandshakeOrEmitwsClientError(this,r,n,400,a);return}}const v=r.headers["sec-websocket-extensions"];const w={};if(this.options.perMessageDeflate&&v!==undefined){const s=new p(this.options.perMessageDeflate,true,this.options.maxPayload);try{const r=d.parse(v);if(r[p.extensionName]){s.accept(r[p.extensionName]);w[p.extensionName]=s}}catch(s){const a="Invalid or unacceptable Sec-WebSocket-Extensions header";abortHandshakeOrEmitwsClientError(this,r,n,400,a);return}}if(this.options.verifyClient){const u={origin:r.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(r.socket.authorized||r.socket.encrypted),req:r};if(this.options.verifyClient.length===2){this.options.verifyClient(u,((u,f,d,p)=>{if(!u){return abortHandshake(n,f||401,d,p)}this.completeUpgrade(w,l,y,r,n,s,a)}));return}if(!this.options.verifyClient(u))return abortHandshake(n,401)}this.completeUpgrade(w,l,y,r,n,s,a)}completeUpgrade(r,n,s,a,l,u,m){if(!l.readable||!l.writable)return l.destroy();if(l[v]){throw new Error("server.handleUpgrade() was called more than once with the same "+"socket, possibly due to a misconfiguration")}if(this._state>w)return abortHandshake(l,503);const g=f("sha1").update(n+y).digest("base64");const b=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${g}`];const _=new this.options.WebSocket(null,undefined,this.options);if(s.size){const r=this.options.handleProtocols?this.options.handleProtocols(s,a):s.values().next().value;if(r){b.push(`Sec-WebSocket-Protocol: ${r}`);_._protocol=r}}if(r[p.extensionName]){const n=r[p.extensionName].params;const s=d.format({[p.extensionName]:[n]});b.push(`Sec-WebSocket-Extensions: ${s}`);_._extensions=r}this.emit("headers",b,a);l.write(b.concat("\r\n").join("\r\n"));l.removeListener("error",socketOnError);_.setSocket(l,u,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation});if(this.clients){this.clients.add(_);_.on("close",(()=>{this.clients.delete(_);if(this._shouldEmitClose&&!this.clients.size){process.nextTick(emitClose,this)}}))}m(_,a)}}r.exports=WebSocketServer;function addListeners(r,n){for(const s of Object.keys(n))r.on(s,n[s]);return function removeListeners(){for(const s of Object.keys(n)){r.removeListener(s,n[s])}}}function emitClose(r){r._state=S;r.emit("close")}function socketOnError(){this.destroy()}function abortHandshake(r,n,s,a){s=s||l.STATUS_CODES[n];a={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...a};r.once("finish",r.destroy);r.end(`HTTP/1.1 ${n} ${l.STATUS_CODES[n]}\r\n`+Object.keys(a).map((r=>`${r}: ${a[r]}`)).join("\r\n")+"\r\n\r\n"+s)}function abortHandshakeOrEmitwsClientError(r,n,s,a,l){if(r.listenerCount("wsClientError")){const a=new Error(l);Error.captureStackTrace(a,abortHandshakeOrEmitwsClientError);r.emit("wsClientError",a,s,n)}else{abortHandshake(s,a,l)}}},6681:(r,n,s)=>{"use strict";const a=s(4434);const l=s(5692);const u=s(8611);const f=s(9278);const d=s(4756);const{randomBytes:p,createHash:m}=s(6982);const{Duplex:g,Readable:y}=s(2203);const{URL:v}=s(7016);const b=s(4376);const w=s(893);const _=s(7389);const{isBlob:S}=s(6615);const{BINARY_TYPES:E,EMPTY_BUFFER:x,GUID:A,kForOnEventAttribute:k,kListener:C,kStatusCode:O,kWebSocket:T,NOOP:R}=s(1791);const{EventTarget:{addEventListener:I,removeEventListener:N}}=s(4634);const{format:B,parse:D}=s(1335);const{toBuffer:P}=s(5803);const L=30*1e3;const M=Symbol("kAborted");const $=[8,13];const W=["CONNECTING","OPEN","CLOSING","CLOSED"];const H=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class WebSocket extends a{constructor(r,n,s){super();this._binaryType=E[0];this._closeCode=1006;this._closeFrameReceived=false;this._closeFrameSent=false;this._closeMessage=x;this._closeTimer=null;this._errorEmitted=false;this._extensions={};this._paused=false;this._protocol="";this._readyState=WebSocket.CONNECTING;this._receiver=null;this._sender=null;this._socket=null;if(r!==null){this._bufferedAmount=0;this._isServer=false;this._redirects=0;if(n===undefined){n=[]}else if(!Array.isArray(n)){if(typeof n==="object"&&n!==null){s=n;n=[]}else{n=[n]}}initAsClient(this,r,n,s)}else{this._autoPong=s.autoPong;this._isServer=true}}get binaryType(){return this._binaryType}set binaryType(r){if(!E.includes(r))return;this._binaryType=r;if(this._receiver)this._receiver._binaryType=r}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}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(r,n,s){const a=new w({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation});const l=new _(r,this._extensions,s.generateMask);this._receiver=a;this._sender=l;this._socket=r;a[T]=this;l[T]=this;r[T]=this;a.on("conclude",receiverOnConclude);a.on("drain",receiverOnDrain);a.on("error",receiverOnError);a.on("message",receiverOnMessage);a.on("ping",receiverOnPing);a.on("pong",receiverOnPong);l.onerror=senderOnError;if(r.setTimeout)r.setTimeout(0);if(r.setNoDelay)r.setNoDelay();if(n.length>0)r.unshift(n);r.on("close",socketOnClose);r.on("data",socketOnData);r.on("end",socketOnEnd);r.on("error",socketOnError);this._readyState=WebSocket.OPEN;this.emit("open")}emitClose(){if(!this._socket){this._readyState=WebSocket.CLOSED;this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[b.extensionName]){this._extensions[b.extensionName].cleanup()}this._receiver.removeAllListeners();this._readyState=WebSocket.CLOSED;this.emit("close",this._closeCode,this._closeMessage)}close(r,n){if(this.readyState===WebSocket.CLOSED)return;if(this.readyState===WebSocket.CONNECTING){const r="WebSocket was closed before the connection was established";abortHandshake(this,this._req,r);return}if(this.readyState===WebSocket.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)){this._socket.end()}return}this._readyState=WebSocket.CLOSING;this._sender.close(r,n,!this._isServer,(r=>{if(r)return;this._closeFrameSent=true;if(this._closeFrameReceived||this._receiver._writableState.errorEmitted){this._socket.end()}}));setCloseTimer(this)}pause(){if(this.readyState===WebSocket.CONNECTING||this.readyState===WebSocket.CLOSED){return}this._paused=true;this._socket.pause()}ping(r,n,s){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof r==="function"){s=r;r=n=undefined}else if(typeof n==="function"){s=n;n=undefined}if(typeof r==="number")r=r.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,r,s);return}if(n===undefined)n=!this._isServer;this._sender.ping(r||x,n,s)}pong(r,n,s){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof r==="function"){s=r;r=n=undefined}else if(typeof n==="function"){s=n;n=undefined}if(typeof r==="number")r=r.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,r,s);return}if(n===undefined)n=!this._isServer;this._sender.pong(r||x,n,s)}resume(){if(this.readyState===WebSocket.CONNECTING||this.readyState===WebSocket.CLOSED){return}this._paused=false;if(!this._receiver._writableState.needDrain)this._socket.resume()}send(r,n,s){if(this.readyState===WebSocket.CONNECTING){throw new Error("WebSocket is not open: readyState 0 (CONNECTING)")}if(typeof n==="function"){s=n;n={}}if(typeof r==="number")r=r.toString();if(this.readyState!==WebSocket.OPEN){sendAfterClose(this,r,s);return}const a={binary:typeof r!=="string",mask:!this._isServer,compress:true,fin:true,...n};if(!this._extensions[b.extensionName]){a.compress=false}this._sender.send(r||x,a,s)}terminate(){if(this.readyState===WebSocket.CLOSED)return;if(this.readyState===WebSocket.CONNECTING){const r="WebSocket was closed before the connection was established";abortHandshake(this,this._req,r);return}if(this._socket){this._readyState=WebSocket.CLOSING;this._socket.destroy()}}}Object.defineProperty(WebSocket,"CONNECTING",{enumerable:true,value:W.indexOf("CONNECTING")});Object.defineProperty(WebSocket.prototype,"CONNECTING",{enumerable:true,value:W.indexOf("CONNECTING")});Object.defineProperty(WebSocket,"OPEN",{enumerable:true,value:W.indexOf("OPEN")});Object.defineProperty(WebSocket.prototype,"OPEN",{enumerable:true,value:W.indexOf("OPEN")});Object.defineProperty(WebSocket,"CLOSING",{enumerable:true,value:W.indexOf("CLOSING")});Object.defineProperty(WebSocket.prototype,"CLOSING",{enumerable:true,value:W.indexOf("CLOSING")});Object.defineProperty(WebSocket,"CLOSED",{enumerable:true,value:W.indexOf("CLOSED")});Object.defineProperty(WebSocket.prototype,"CLOSED",{enumerable:true,value:W.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((r=>{Object.defineProperty(WebSocket.prototype,r,{enumerable:true})}));["open","error","close","message"].forEach((r=>{Object.defineProperty(WebSocket.prototype,`on${r}`,{enumerable:true,get(){for(const n of this.listeners(r)){if(n[k])return n[C]}return null},set(n){for(const n of this.listeners(r)){if(n[k]){this.removeListener(r,n);break}}if(typeof n!=="function")return;this.addEventListener(r,n,{[k]:true})}})}));WebSocket.prototype.addEventListener=I;WebSocket.prototype.removeEventListener=N;r.exports=WebSocket;function initAsClient(r,n,s,a){const f={allowSynchronousEvents:true,autoPong:true,protocolVersion:$[1],maxPayload:100*1024*1024,skipUTF8Validation:false,perMessageDeflate:true,followRedirects:false,maxRedirects:10,...a,socketPath:undefined,hostname:undefined,protocol:undefined,timeout:undefined,method:"GET",host:undefined,path:undefined,port:undefined};r._autoPong=f.autoPong;if(!$.includes(f.protocolVersion)){throw new RangeError(`Unsupported protocol version: ${f.protocolVersion} `+`(supported versions: ${$.join(", ")})`)}let d;if(n instanceof v){d=n}else{try{d=new v(n)}catch(r){throw new SyntaxError(`Invalid URL: ${n}`)}}if(d.protocol==="http:"){d.protocol="ws:"}else if(d.protocol==="https:"){d.protocol="wss:"}r._url=d.href;const g=d.protocol==="wss:";const y=d.protocol==="ws+unix:";let w;if(d.protocol!=="ws:"&&!g&&!y){w='The URL\'s protocol must be one of "ws:", "wss:", '+'"http:", "https", or "ws+unix:"'}else if(y&&!d.pathname){w="The URL's pathname is empty"}else if(d.hash){w="The URL contains a fragment identifier"}if(w){const n=new SyntaxError(w);if(r._redirects===0){throw n}else{emitErrorAndClose(r,n);return}}const _=g?443:80;const S=p(16).toString("base64");const E=g?l.request:u.request;const x=new Set;let k;f.createConnection=f.createConnection||(g?tlsConnect:netConnect);f.defaultPort=f.defaultPort||_;f.port=d.port||_;f.host=d.hostname.startsWith("[")?d.hostname.slice(1,-1):d.hostname;f.headers={...f.headers,"Sec-WebSocket-Version":f.protocolVersion,"Sec-WebSocket-Key":S,Connection:"Upgrade",Upgrade:"websocket"};f.path=d.pathname+d.search;f.timeout=f.handshakeTimeout;if(f.perMessageDeflate){k=new b(f.perMessageDeflate!==true?f.perMessageDeflate:{},false,f.maxPayload);f.headers["Sec-WebSocket-Extensions"]=B({[b.extensionName]:k.offer()})}if(s.length){for(const r of s){if(typeof r!=="string"||!H.test(r)||x.has(r)){throw new SyntaxError("An invalid or duplicated subprotocol was specified")}x.add(r)}f.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(f.origin){if(f.protocolVersion<13){f.headers["Sec-WebSocket-Origin"]=f.origin}else{f.headers.Origin=f.origin}}if(d.username||d.password){f.auth=`${d.username}:${d.password}`}if(y){const r=f.path.split(":");f.socketPath=r[0];f.path=r[1]}let C;if(f.followRedirects){if(r._redirects===0){r._originalIpc=y;r._originalSecure=g;r._originalHostOrSocketPath=y?f.socketPath:d.host;const n=a&&a.headers;a={...a,headers:{}};if(n){for(const[r,s]of Object.entries(n)){a.headers[r.toLowerCase()]=s}}}else if(r.listenerCount("redirect")===0){const n=y?r._originalIpc?f.socketPath===r._originalHostOrSocketPath:false:r._originalIpc?false:d.host===r._originalHostOrSocketPath;if(!n||r._originalSecure&&!g){delete f.headers.authorization;delete f.headers.cookie;if(!n)delete f.headers.host;f.auth=undefined}}if(f.auth&&!a.headers.authorization){a.headers.authorization="Basic "+Buffer.from(f.auth).toString("base64")}C=r._req=E(f);if(r._redirects){r.emit("redirect",r.url,C)}}else{C=r._req=E(f)}if(f.timeout){C.on("timeout",(()=>{abortHandshake(r,C,"Opening handshake has timed out")}))}C.on("error",(n=>{if(C===null||C[M])return;C=r._req=null;emitErrorAndClose(r,n)}));C.on("response",(l=>{const u=l.headers.location;const d=l.statusCode;if(u&&f.followRedirects&&d>=300&&d<400){if(++r._redirects>f.maxRedirects){abortHandshake(r,C,"Maximum redirects exceeded");return}C.abort();let l;try{l=new v(u,n)}catch(n){const s=new SyntaxError(`Invalid URL: ${u}`);emitErrorAndClose(r,s);return}initAsClient(r,l,s,a)}else if(!r.emit("unexpected-response",C,l)){abortHandshake(r,C,`Unexpected server response: ${l.statusCode}`)}}));C.on("upgrade",((n,s,a)=>{r.emit("upgrade",n);if(r.readyState!==WebSocket.CONNECTING)return;C=r._req=null;const l=n.headers.upgrade;if(l===undefined||l.toLowerCase()!=="websocket"){abortHandshake(r,s,"Invalid Upgrade header");return}const u=m("sha1").update(S+A).digest("base64");if(n.headers["sec-websocket-accept"]!==u){abortHandshake(r,s,"Invalid Sec-WebSocket-Accept header");return}const d=n.headers["sec-websocket-protocol"];let p;if(d!==undefined){if(!x.size){p="Server sent a subprotocol but none was requested"}else if(!x.has(d)){p="Server sent an invalid subprotocol"}}else if(x.size){p="Server sent no subprotocol"}if(p){abortHandshake(r,s,p);return}if(d)r._protocol=d;const g=n.headers["sec-websocket-extensions"];if(g!==undefined){if(!k){const n="Server sent a Sec-WebSocket-Extensions header but no extension "+"was requested";abortHandshake(r,s,n);return}let n;try{n=D(g)}catch(n){const a="Invalid Sec-WebSocket-Extensions header";abortHandshake(r,s,a);return}const a=Object.keys(n);if(a.length!==1||a[0]!==b.extensionName){const n="Server indicated an extension that was not requested";abortHandshake(r,s,n);return}try{k.accept(n[b.extensionName])}catch(n){const a="Invalid Sec-WebSocket-Extensions header";abortHandshake(r,s,a);return}r._extensions[b.extensionName]=k}r.setSocket(s,a,{allowSynchronousEvents:f.allowSynchronousEvents,generateMask:f.generateMask,maxPayload:f.maxPayload,skipUTF8Validation:f.skipUTF8Validation})}));if(f.finishRequest){f.finishRequest(C,r)}else{C.end()}}function emitErrorAndClose(r,n){r._readyState=WebSocket.CLOSING;r._errorEmitted=true;r.emit("error",n);r.emitClose()}function netConnect(r){r.path=r.socketPath;return f.connect(r)}function tlsConnect(r){r.path=undefined;if(!r.servername&&r.servername!==""){r.servername=f.isIP(r.host)?"":r.host}return d.connect(r)}function abortHandshake(r,n,s){r._readyState=WebSocket.CLOSING;const a=new Error(s);Error.captureStackTrace(a,abortHandshake);if(n.setHeader){n[M]=true;n.abort();if(n.socket&&!n.socket.destroyed){n.socket.destroy()}process.nextTick(emitErrorAndClose,r,a)}else{n.destroy(a);n.once("error",r.emit.bind(r,"error"));n.once("close",r.emitClose.bind(r))}}function sendAfterClose(r,n,s){if(n){const s=S(n)?n.size:P(n).length;if(r._socket)r._sender._bufferedBytes+=s;else r._bufferedAmount+=s}if(s){const n=new Error(`WebSocket is not open: readyState ${r.readyState} `+`(${W[r.readyState]})`);process.nextTick(s,n)}}function receiverOnConclude(r,n){const s=this[T];s._closeFrameReceived=true;s._closeMessage=n;s._closeCode=r;if(s._socket[T]===undefined)return;s._socket.removeListener("data",socketOnData);process.nextTick(resume,s._socket);if(r===1005)s.close();else s.close(r,n)}function receiverOnDrain(){const r=this[T];if(!r.isPaused)r._socket.resume()}function receiverOnError(r){const n=this[T];if(n._socket[T]!==undefined){n._socket.removeListener("data",socketOnData);process.nextTick(resume,n._socket);n.close(r[O])}if(!n._errorEmitted){n._errorEmitted=true;n.emit("error",r)}}function receiverOnFinish(){this[T].emitClose()}function receiverOnMessage(r,n){this[T].emit("message",r,n)}function receiverOnPing(r){const n=this[T];if(n._autoPong)n.pong(r,!this._isServer,R);n.emit("ping",r)}function receiverOnPong(r){this[T].emit("pong",r)}function resume(r){r.resume()}function senderOnError(r){const n=this[T];if(n.readyState===WebSocket.CLOSED)return;if(n.readyState===WebSocket.OPEN){n._readyState=WebSocket.CLOSING;setCloseTimer(n)}this._socket.end();if(!n._errorEmitted){n._errorEmitted=true;n.emit("error",r)}}function setCloseTimer(r){r._closeTimer=setTimeout(r._socket.destroy.bind(r._socket),L)}function socketOnClose(){const r=this[T];this.removeListener("close",socketOnClose);this.removeListener("data",socketOnData);this.removeListener("end",socketOnEnd);r._readyState=WebSocket.CLOSING;let n;if(!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(n=r._socket.read())!==null){r._receiver.write(n)}r._receiver.end();this[T]=undefined;clearTimeout(r._closeTimer);if(r._receiver._writableState.finished||r._receiver._writableState.errorEmitted){r.emitClose()}else{r._receiver.on("error",receiverOnFinish);r._receiver.on("finish",receiverOnFinish)}}function socketOnData(r){if(!this[T]._receiver.write(r)){this.pause()}}function socketOnEnd(){const r=this[T];r._readyState=WebSocket.CLOSING;r._receiver.end();this.end()}function socketOnError(){const r=this[T];this.removeListener("error",socketOnError);this.on("error",R);if(r){r._readyState=WebSocket.CLOSING;this.destroy()}}},2294:function(r,n,s){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.helmChartModifiedEvent=void 0;const l=a(s(4434));n.helmChartModifiedEvent=new l.default},9235:function(r,n,s){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.checkNodeVersion=checkNodeVersion;const l=a(s(6797));function checkNodeVersion(){const[r]=process.version.split(".");if(parseInt(r.replace("v",""),10)<20){console.log("");console.log(l.default.redBright(`🚨 Node.js version >= 20 is required. Version ${process.version} detected.`));console.log("");process.exit(1)}}},805:function(r,n,s){"use strict";var a=this&&this.__awaiter||function(r,n,s,a){function adopt(r){return r instanceof s?r:new s((function(n){n(r)}))}return new(s||(s=Promise))((function(s,l){function fulfilled(r){try{step(a.next(r))}catch(r){l(r)}}function rejected(r){try{step(a["throw"](r))}catch(r){l(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((a=a.apply(r,n||[])).next())}))};var l=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.computeChart=computeChart;n.computeTemplated=computeTemplated;n.computeSources=computeSources;const u=l(s(6797));const f=s(6982);const d=s(8986);const p=s(9896);const m=l(s(4281));const g=s(857);const y=s(6928);function computeChart(r,n){return a(this,arguments,void 0,(function*(r,n,s=[]){let a;try{a=yield computeCommands(n,s,r)}catch(l){if(l===null||l===void 0?void 0:l.stderr.includes("You may need to run `helm dependency build`")){console.log(u.default.greenBright(`⬇️ Trying to refresh helm dependencies. Might be long...`));const l=(0,d.$)({cwd:r});yield l`helm dependency build`;a=yield computeCommands(n,s,r)}}const{templated:l}=yield computeTemplated(a);const{sources:f}=yield computeSources(a,r);const{version:p,name:g}=m.default.load(f["Chart.yaml"]);return{name:g,version:p,templated:l,sources:f}}))}function computeTemplated(r){return a(this,void 0,void 0,(function*(){var n;const s={templated:{}};const a=r.split("---");for(const r of a){const a=m.default.load(r);if(a){if(!s["templated"][a.kind]){s["templated"][a.kind]={}}s["templated"][a.kind][(n=a===null||a===void 0?void 0:a.metadata)===null||n===void 0?void 0:n.name]=r}}return s}))}function computeCommands(r){return a(this,arguments,void 0,(function*(r,n=[],s){let a;if(n.length===0){({stdout:a}=yield(0,d.$)`helm template --name-template ${r} ${s}`)}else if(n.length===1){({stdout:a}=yield(0,d.$)`helm template --name-template ${r} ${s} --values ${n.at(0)}`)}else if(n.length===2){({stdout:a}=yield(0,d.$)`helm template --name-template ${r} ${s} --values ${n.at(0)} --values ${n.at(1)}`)}return a}))}function computeSources(r,n){return a(this,void 0,void 0,(function*(){var s;const a=`${(0,g.tmpdir)()}/${(0,f.randomUUID)()}`;(0,p.mkdirSync)(a,{recursive:true});(0,p.mkdirSync)(`${a}/sources`,{recursive:true});(0,p.mkdirSync)(`${a}/templated`,{recursive:true});const l={sources:{}};const u=r.split("---");for(const r of u){const n=m.default.load(r);if(n){const l=n.kind+"-"+((s=n===null||n===void 0?void 0:n.metadata)===null||s===void 0?void 0:s.name);(0,p.writeFileSync)(`${a}/templated/${l}.yaml`,r)}}const d=(0,p.readdirSync)(n);for(const r of d.filter((r=>!r.includes("tgz")))){const s=(0,y.join)(n,r);if(!(0,p.statSync)(s).isDirectory()){const n=(0,p.readFileSync)(s);l["sources"][r]=String(n)}}return l}))}},2843:(r,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.computeUrls=computeUrls;function computeUrls(){let r="https://helm-viewer.vercel.app";let n="https://helm-viewer.vercel.app";if(process.env.NODE_ENV==="development"){r="http://localhost:3000";n="http://localhost:3000"}if(process.env.BACKEND_ENDPOINT){r=process.env.BACKEND_ENDPOINT.replace(/\/$/,"");n=process.env.BACKEND_ENDPOINT.replace(/\/$/,"")}if(process.env.BACKEND_READ_ENDPOINT){n=process.env.BACKEND_READ_ENDPOINT.replace(/\/$/,"")}return{remoteURL:r,remoteReadURL:n}}},3968:function(r,n,s){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.encrypt=encrypt;n.decrypt=decrypt;const l=a(s(4163));function encrypt(r,n){return l.default.AES.encrypt(r,n).toString()}function decrypt(r,n){const s=l.default.AES.decrypt(r,n);return s.toString(l.default.enc.Utf8)}},1618:function(r,n,s){"use strict";var a=this&&this.__awaiter||function(r,n,s,a){function adopt(r){return r instanceof s?r:new s((function(n){n(r)}))}return new(s||(s=Promise))((function(s,l){function fulfilled(r){try{step(a.next(r))}catch(r){l(r)}}function rejected(r){try{step(a["throw"](r))}catch(r){l(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((a=a.apply(r,n||[])).next())}))};var l=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.watchHelmChartFilesModifications=watchHelmChartFilesModifications;const u=l(s(5315));const f=s(2294);function watchHelmChartFilesModifications(r){return a(this,void 0,void 0,(function*(){u.default.watch(r).on("all",((r,n)=>{f.helmChartModifiedEvent.emit("changed",n)}))}))}},1513:function(r,n,s){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.isChartFolder=isChartFolder;const l=a(s(3024));function isChartFolder(r){const n=l.default.readdirSync(r);return n.includes("Chart.yaml")}},9521:(r,n,s)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.getArguments=getArguments;const a=s(7975);const l=s(3469);function getArguments(){return(0,a.parseArgs)({options:{watch:{type:"boolean",short:"w",default:false},push:{type:"boolean",short:"p",default:false},encryptionKey:{type:"string",short:"k",default:(0,l.nanoid)().slice(0,10)},browser:{type:"string",short:"b",default:"default"},values:{type:"string",short:"v",multiple:true,default:[]},help:{type:"boolean",short:"h",default:false},name:{type:"string",short:"n",default:"release-name"}},allowPositionals:true})}},7499:function(r,n,s){"use strict";var a=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.serverFileTemporary=serverFileTemporary;const l=a(s(6797));const u=a(s(8611));function serverFileTemporary(r,n){return new Promise((s=>{const a=u.default.createServer(((u,f)=>{const d={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"OPTIONS, POST, GET"};if(u.method==="OPTIONS"){f.writeHead(200,d);f.end();return}f.writeHead(200,d);f.end(JSON.stringify(r),"utf-8");console.log(l.default.cyanBright(`Closing server on port ${n}...`));a.close((()=>{s(undefined)}));setTimeout((()=>{a.emit("close")}),100)}));a.listen(n)}))}},5328:function(r,n,s){"use strict";var a=this&&this.__awaiter||function(r,n,s,a){function adopt(r){return r instanceof s?r:new s((function(n){n(r)}))}return new(s||(s=Promise))((function(s,l){function fulfilled(r){try{step(a.next(r))}catch(r){l(r)}}function rejected(r){try{step(a["throw"](r))}catch(r){l(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((a=a.apply(r,n||[])).next())}))};var l=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});n.startWebsocketServer=startWebsocketServer;const u=l(s(6797));const f=s(1354);const d=s(2294);const p=s(805);function startWebsocketServer(r,n){const s=new f.WebSocketServer({port:12096});console.log(u.default.cyanBright(`⚡️ Web socket started on 12096`));console.log(u.default.cyanBright(`Don't touch this terminal anymore and see your chart change directly in the browser`));s.on("connection",(function connection(s){s.on("error",console.error);d.helmChartModifiedEvent.addListener("changed",(l=>a(this,void 0,void 0,(function*(){try{const a=yield(0,p.computeChart)(r,n);s.send(JSON.stringify({filePath:l,chartContentUpdated:a,error:null}))}catch(r){s.send(JSON.stringify({filePath:null,chartContentUpdated:null,error:r.stderr}))}}))))}))}},9407:function(r,n,s){"use strict";var a=this&&this.__createBinding||(Object.create?function(r,n,s,a){if(a===undefined)a=s;var l=Object.getOwnPropertyDescriptor(n,s);if(!l||("get"in l?!n.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return n[s]}}}Object.defineProperty(r,a,l)}:function(r,n,s,a){if(a===undefined)a=s;r[a]=n[s]});var l=this&&this.__setModuleDefault||(Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:true,value:n})}:function(r,n){r["default"]=n});var u=this&&this.__importStar||function(){var ownKeys=function(r){ownKeys=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))n[n.length]=s;return n};return ownKeys(r)};return function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var s=ownKeys(r),u=0;u<s.length;u++)if(s[u]!=="default")a(n,r,s[u]);l(n,r);return n}}();var f=this&&this.__awaiter||function(r,n,s,a){function adopt(r){return r instanceof s?r:new s((function(n){n(r)}))}return new(s||(s=Promise))((function(s,l){function fulfilled(r){try{step(a.next(r))}catch(r){l(r)}}function rejected(r){try{step(a["throw"](r))}catch(r){l(r)}}function step(r){r.done?s(r.value):adopt(r.value).then(fulfilled,rejected)}step((a=a.apply(r,n||[])).next())}))};var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:true});const p=s(3024);const m=d(s(6797));const g=s(6982);const y=u(s(9896));const v=d(s(4281));const b=s(3469);const w=d(s(2));const _=s(857);const S=s(9235);const E=s(805);const x=s(2843);const A=s(3968);const k=s(1618);const C=s(1513);const O=s(9521);const T=s(7499);const R=s(5328);const{remoteReadURL:I,remoteURL:N}=(0,x.computeUrls)();function run(){return f(this,void 0,void 0,(function*(){var r;(0,S.checkNodeVersion)();const n=(0,O.getArguments)();const s=JSON.parse((0,p.readFileSync)("package.json","utf8")).version;if(n.values.help){console.log(`\nhelm-viewer v${s}\n\n -b/--browser: allow to open with a specific browser (firefox, chromium) | HELM_VIEWER_FAVORITE_BROWSER\n -h/--help: displays this menu\n -k/--encryptionKey: specify the encryption key\n -n/--name: provide a release name to Helm\n -p/--push: push the result of the build online and returns an URL\n -v/--values: provide values files for the chart, can be provided several times\n -w/--watch: activate the watch mode\n\n # When you are in a chart helm folder\n helm-viewer\n \n # To target a specific path\n helm-viewer path/of/the/chart\n \n # To compute the chart with an external values file\n helm-viewer path/of/the/chart --values path/of/the/values/file1 --values path/of/the/values/file2\n \n # To get a public link (with encrypted data)\n helm-viewer path/of/the/chart --push\n `);process.exit(0)}const a=(r=n.positionals.at(0))!==null&&r!==void 0?r:process.cwd();const l=n.values.values;console.log(m.default.cyanBright(`⚡️ Path detected ${a}`));console.log(l.length>0?m.default.greenBright(`🔑 Values detected : ${l.join(",")}`):m.default.yellowBright(`⚠️ No value detected, computing with default values in the Chart`));const u=`${(0,_.tmpdir)()}/${(0,g.randomUUID)()}`;(0,y.mkdirSync)(u,{recursive:true});(0,y.mkdirSync)(`${u}/sources`,{recursive:true});(0,y.mkdirSync)(`${u}/templated`,{recursive:true});if(!(0,C.isChartFolder)(a)){console.log("Not a chart folder");process.exit(1)}let f;try{f=yield(0,E.computeChart)(a,n.values.name,l)}catch(r){console.log("\n");console.log(m.default.bgRedBright("The computation of the chart failed. (message below)"));console.log(r.message);console.log("\n");process.exit(1)}let d=null;if(process.env.HELM_VIEWER_FAVORITE_BROWSER){d=process.env.HELM_VIEWER_FAVORITE_BROWSER}if(n.values.browser){d=n.values.browser}if(n.values.push){yield pushOnlineFunction(f,n.values.encryptionKey)}else{yield serveLocally(f,a,n.values.watch,d,n.values.name)}process.exit(0)}))}function pushOnlineFunction(r,n){return f(this,void 0,void 0,(function*(){const s=(0,b.nanoid)();const{version:a,name:l}=v.default.load(r.sources["Chart.yaml"]);const u={chartVersion:a,chartName:l,content:(0,A.encrypt)(JSON.stringify(r),n)};yield fetch(`${N}/api/chart-upload`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:JSON.stringify(u),chartId:s})});console.log("");console.log(`${I}?id=${s}&k=${n}&o=t`);console.log("");y.default.writeFileSync(".helm-viewer-url",`${I}?id=${s}&k=${n}&o=t`)}))}function serveLocally(r,n,s,a,l){return f(this,void 0,void 0,(function*(){const u=(0,b.nanoid)();if(process.env.NODE_ENV==="development"){(0,w.default)(`${N}?id=${u}`,{app:{name:"firefox"}})}else{if(a!=="default"){(0,w.default)(`${N}?id=${u}`,{app:{name:a}})}else{(0,w.default)(`${N}?id=${u}`)}}const{version:f,name:d}=v.default.load(r.sources["Chart.yaml"]);yield Promise.all([(0,T.serverFileTemporary)(r,12094),(0,T.serverFileTemporary)({chartName:d,chartVersion:f},12095)]);if(s){(0,R.startWebsocketServer)(n,l);(0,k.watchHelmChartFilesModifications)(n);yield new Promise((r=>setTimeout(r,1e8)))}}))}run()},2555:(r,n,s)=>{r.exports=require(s.ab+"fsevents.node")},8327:module=>{module.exports=eval("require")("bufferutil")},2414:module=>{module.exports=eval("require")("utf-8-validate")},181:r=>{"use strict";r.exports=require("buffer")},5317:r=>{"use strict";r.exports=require("child_process")},6982:r=>{"use strict";r.exports=require("crypto")},4434:r=>{"use strict";r.exports=require("events")},9896:r=>{"use strict";r.exports=require("fs")},8611:r=>{"use strict";r.exports=require("http")},5692:r=>{"use strict";r.exports=require("https")},9278:r=>{"use strict";r.exports=require("net")},4573:r=>{"use strict";r.exports=require("node:buffer")},1421:r=>{"use strict";r.exports=require("node:child_process")},3024:r=>{"use strict";r.exports=require("node:fs")},8161:r=>{"use strict";r.exports=require("node:os")},6760:r=>{"use strict";r.exports=require("node:path")},1708:r=>{"use strict";r.exports=require("node:process")},7066:r=>{"use strict";r.exports=require("node:tty")},3136:r=>{"use strict";r.exports=require("node:url")},7975:r=>{"use strict";r.exports=require("node:util")},857:r=>{"use strict";r.exports=require("os")},6928:r=>{"use strict";r.exports=require("path")},2203:r=>{"use strict";r.exports=require("stream")},4756:r=>{"use strict";r.exports=require("tls")},7016:r=>{"use strict";r.exports=require("url")},9023:r=>{"use strict";r.exports=require("util")},3106:r=>{"use strict";r.exports=require("zlib")},6797:(r,n,s)=>{"use strict";s.r(n);s.d(n,{Chalk:()=>Chalk,backgroundColorNames:()=>d,backgroundColors:()=>d,chalkStderr:()=>D,colorNames:()=>p,colors:()=>p,default:()=>P,foregroundColorNames:()=>f,foregroundColors:()=>f,modifierNames:()=>u,modifiers:()=>u,supportsColor:()=>x,supportsColorStderr:()=>A});const a=10;const wrapAnsi16=(r=0)=>n=>`[${n+r}m`;const wrapAnsi256=(r=0)=>n=>`[${38+r};5;${n}m`;const wrapAnsi16m=(r=0)=>(n,s,a)=>`[${38+r};2;${n};${s};${a}m`;const l={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const u=Object.keys(l.modifier);const f=Object.keys(l.color);const d=Object.keys(l.bgColor);const p=[...f,...d];function assembleStyles(){const r=new Map;for(const[n,s]of Object.entries(l)){for(const[n,a]of Object.entries(s)){l[n]={open:`[${a[0]}m`,close:`[${a[1]}m`};s[n]=l[n];r.set(a[0],a[1])}Object.defineProperty(l,n,{value:s,enumerable:false})}Object.defineProperty(l,"codes",{value:r,enumerable:false});l.color.close="[39m";l.bgColor.close="[49m";l.color.ansi=wrapAnsi16();l.color.ansi256=wrapAnsi256();l.color.ansi16m=wrapAnsi16m();l.bgColor.ansi=wrapAnsi16(a);l.bgColor.ansi256=wrapAnsi256(a);l.bgColor.ansi16m=wrapAnsi16m(a);Object.defineProperties(l,{rgbToAnsi256:{value(r,n,s){if(r===n&&n===s){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}return 16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(s/255*5)},enumerable:false},hexToRgb:{value(r){const n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!n){return[0,0,0]}let[s]=n;if(s.length===3){s=[...s].map((r=>r+r)).join("")}const a=Number.parseInt(s,16);return[a>>16&255,a>>8&255,a&255]},enumerable:false},hexToAnsi256:{value:r=>l.rgbToAnsi256(...l.hexToRgb(r)),enumerable:false},ansi256ToAnsi:{value(r){if(r<8){return 30+r}if(r<16){return 90+(r-8)}let n;let s;let a;if(r>=232){n=((r-232)*10+8)/255;s=n;a=n}else{r-=16;const l=r%36;n=Math.floor(r/36)/5;s=Math.floor(l/6)/5;a=l%6/5}const l=Math.max(n,s,a)*2;if(l===0){return 30}let u=30+(Math.round(a)<<2|Math.round(s)<<1|Math.round(n));if(l===2){u+=60}return u},enumerable:false},rgbToAnsi:{value:(r,n,s)=>l.ansi256ToAnsi(l.rgbToAnsi256(r,n,s)),enumerable:false},hexToAnsi:{value:r=>l.ansi256ToAnsi(l.hexToAnsi256(r)),enumerable:false}});return l}const m=assembleStyles();const g=m;var y=s(1708);var v=s(8161);var b=s(7066);function hasFlag(r,n=(globalThis.Deno?globalThis.Deno.args:y.argv)){const s=r.startsWith("-")?"":r.length===1?"-":"--";const a=n.indexOf(s+r);const l=n.indexOf("--");return a!==-1&&(l===-1||a<l)}const{env:w}=y;let _;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){_=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){_=1}function envForceColor(){if("FORCE_COLOR"in w){if(w.FORCE_COLOR==="true"){return 1}if(w.FORCE_COLOR==="false"){return 0}return w.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(w.FORCE_COLOR,10),3)}}function translateLevel(r){if(r===0){return false}return{level:r,hasBasic:true,has256:r>=2,has16m:r>=3}}function _supportsColor(r,{streamIsTTY:n,sniffFlags:s=true}={}){const a=envForceColor();if(a!==undefined){_=a}const l=s?_:a;if(l===0){return 0}if(s){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if("TF_BUILD"in w&&"AGENT_NAME"in w){return 1}if(r&&!n&&l===undefined){return 0}const u=l||0;if(w.TERM==="dumb"){return u}if(y.platform==="win32"){const r=v.release().split(".");if(Number(r[0])>=10&&Number(r[2])>=10586){return Number(r[2])>=14931?3:2}return 1}if("CI"in w){if("GITHUB_ACTIONS"in w||"GITEA_ACTIONS"in w){return 3}if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((r=>r in w))||w.CI_NAME==="codeship"){return 1}return u}if("TEAMCITY_VERSION"in w){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0}if(w.COLORTERM==="truecolor"){return 3}if(w.TERM==="xterm-kitty"){return 3}if("TERM_PROGRAM"in w){const r=Number.parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":{return r>=3?3:2}case"Apple_Terminal":{return 2}}}if(/-256(color)?$/i.test(w.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM)){return 1}if("COLORTERM"in w){return 1}return u}function createSupportsColor(r,n={}){const s=_supportsColor(r,{streamIsTTY:r&&r.isTTY,...n});return translateLevel(s)}const S={stdout:createSupportsColor({isTTY:b.isatty(1)}),stderr:createSupportsColor({isTTY:b.isatty(2)})};const E=S;function stringReplaceAll(r,n,s){let a=r.indexOf(n);if(a===-1){return r}const l=n.length;let u=0;let f="";do{f+=r.slice(u,a)+n+s;u=a+l;a=r.indexOf(n,u)}while(a!==-1);f+=r.slice(u);return f}function stringEncaseCRLFWithFirstIndex(r,n,s,a){let l=0;let u="";do{const f=r[a-1]==="\r";u+=r.slice(l,f?a-1:a)+n+(f?"\r\n":"\n")+s;l=a+1;a=r.indexOf("\n",l)}while(a!==-1);u+=r.slice(l);return u}const{stdout:x,stderr:A}=E;const k=Symbol("GENERATOR");const C=Symbol("STYLER");const O=Symbol("IS_EMPTY");const T=["ansi","ansi","ansi256","ansi16m"];const R=Object.create(null);const applyOptions=(r,n={})=>{if(n.level&&!(Number.isInteger(n.level)&&n.level>=0&&n.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const s=x?x.level:0;r.level=n.level===undefined?s:n.level};class Chalk{constructor(r){return chalkFactory(r)}}const chalkFactory=r=>{const chalk=(...r)=>r.join(" ");applyOptions(chalk,r);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(r){return chalkFactory(r)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[r,n]of Object.entries(g)){R[r]={get(){const s=createBuilder(this,createStyler(n.open,n.close,this[C]),this[O]);Object.defineProperty(this,r,{value:s});return s}}}R.visible={get(){const r=createBuilder(this,this[C],true);Object.defineProperty(this,"visible",{value:r});return r}};const getModelAnsi=(r,n,s,...a)=>{if(r==="rgb"){if(n==="ansi16m"){return g[s].ansi16m(...a)}if(n==="ansi256"){return g[s].ansi256(g.rgbToAnsi256(...a))}return g[s].ansi(g.rgbToAnsi(...a))}if(r==="hex"){return getModelAnsi("rgb",n,s,...g.hexToRgb(...a))}return g[s][r](...a)};const I=["rgb","hex","ansi256"];for(const r of I){R[r]={get(){const{level:n}=this;return function(...s){const a=createStyler(getModelAnsi(r,T[n],"color",...s),g.color.close,this[C]);return createBuilder(this,a,this[O])}}};const n="bg"+r[0].toUpperCase()+r.slice(1);R[n]={get(){const{level:n}=this;return function(...s){const a=createStyler(getModelAnsi(r,T[n],"bgColor",...s),g.bgColor.close,this[C]);return createBuilder(this,a,this[O])}}}}const N=Object.defineProperties((()=>{}),{...R,level:{enumerable:true,get(){return this[k].level},set(r){this[k].level=r}}});const createStyler=(r,n,s)=>{let a;let l;if(s===undefined){a=r;l=n}else{a=s.openAll+r;l=n+s.closeAll}return{open:r,close:n,openAll:a,closeAll:l,parent:s}};const createBuilder=(r,n,s)=>{const builder=(...r)=>applyStyle(builder,r.length===1?""+r[0]:r.join(" "));Object.setPrototypeOf(builder,N);builder[k]=r;builder[C]=n;builder[O]=s;return builder};const applyStyle=(r,n)=>{if(r.level<=0||!n){return r[O]?"":n}let s=r[C];if(s===undefined){return n}const{openAll:a,closeAll:l}=s;if(n.includes("")){while(s!==undefined){n=stringReplaceAll(n,s.close,s.open);s=s.parent}}const u=n.indexOf("\n");if(u!==-1){n=stringEncaseCRLFWithFirstIndex(n,l,a,u)}return a+n+l};Object.defineProperties(createChalk.prototype,R);const B=createChalk();const D=createChalk({level:A?A.level:0});const P=B},8986:(r,n,s)=>{"use strict";s.r(n);s.d(n,{$:()=>Rr,ExecaError:()=>ExecaError,ExecaSyncError:()=>ExecaSyncError,execa:()=>Ar,execaCommand:()=>Cr,execaCommandSync:()=>Or,execaNode:()=>Tr,execaSync:()=>kr,getCancelSignal:()=>Dr,getEachMessage:()=>Br,getOneMessage:()=>Nr,parseCommandString:()=>parseCommandString,sendMessage:()=>Ir});function isPlainObject(r){if(typeof r!=="object"||r===null){return false}const n=Object.getPrototypeOf(r);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)}var a=s(3136);const safeNormalizeFileUrl=(r,n)=>{const s=normalizeFileUrl(normalizeDenoExecPath(r));if(typeof s!=="string"){throw new TypeError(`${n} must be a string or a file URL: ${s}.`)}return s};const normalizeDenoExecPath=r=>isDenoExecPath(r)?r.toString():r;const isDenoExecPath=r=>typeof r!=="string"&&r&&Object.getPrototypeOf(r)===String.prototype;const normalizeFileUrl=r=>r instanceof URL?(0,a.fileURLToPath)(r):r;const normalizeParameters=(r,n=[],s={})=>{const a=safeNormalizeFileUrl(r,"First argument");const[l,u]=isPlainObject(n)?[[],n]:[n,s];if(!Array.isArray(l)){throw new TypeError(`Second argument must be either an array of arguments or an options object: ${l}`)}if(l.some((r=>typeof r==="object"&&r!==null))){throw new TypeError(`Second argument must be an array of strings: ${l}`)}const f=l.map(String);const d=f.find((r=>r.includes("\0")));if(d!==undefined){throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${d}`)}if(!isPlainObject(u)){throw new TypeError(`Last argument must be an options object: ${u}`)}return[a,f,u]};var l=s(1421);const u=require("node:string_decoder");const{toString:f}=Object.prototype;const isArrayBuffer=r=>f.call(r)==="[object ArrayBuffer]";const isUint8Array=r=>f.call(r)==="[object Uint8Array]";const bufferToUint8Array=r=>new Uint8Array(r.buffer,r.byteOffset,r.byteLength);const d=new TextEncoder;const stringToUint8Array=r=>d.encode(r);const p=new TextDecoder;const uint8ArrayToString=r=>p.decode(r);const joinToString=(r,n)=>{const s=uint8ArraysToStrings(r,n);return s.join("")};const uint8ArraysToStrings=(r,n)=>{if(n==="utf8"&&r.every((r=>typeof r==="string"))){return r}const s=new u.StringDecoder(n);const a=r.map((r=>typeof r==="string"?stringToUint8Array(r):r)).map((r=>s.write(r)));const l=s.end();return l===""?a:[...a,l]};const joinToUint8Array=r=>{if(r.length===1&&isUint8Array(r[0])){return r[0]}return concatUint8Arrays(stringsToUint8Arrays(r))};const stringsToUint8Arrays=r=>r.map((r=>typeof r==="string"?stringToUint8Array(r):r));const concatUint8Arrays=r=>{const n=new Uint8Array(getJoinLength(r));let s=0;for(const a of r){n.set(a,s);s+=a.length}return n};const getJoinLength=r=>{let n=0;for(const s of r){n+=s.length}return n};const isTemplateString=r=>Array.isArray(r)&&Array.isArray(r.raw);const parseTemplates=(r,n)=>{let s=[];for(const[a,l]of r.entries()){s=parseTemplate({templates:r,expressions:n,tokens:s,index:a,template:l})}if(s.length===0){throw new TypeError("Template script must not be empty")}const[a,...l]=s;return[a,l,{}]};const parseTemplate=({templates:r,expressions:n,tokens:s,index:a,template:l})=>{if(l===undefined){throw new TypeError(`Invalid backslash sequence: ${r.raw[a]}`)}const{nextTokens:u,leadingWhitespaces:f,trailingWhitespaces:d}=splitByWhitespaces(l,r.raw[a]);const p=concatTokens(s,u,f);if(a===n.length){return p}const m=n[a];const g=Array.isArray(m)?m.map((r=>parseExpression(r))):[parseExpression(m)];return concatTokens(p,g,d)};const splitByWhitespaces=(r,n)=>{if(n.length===0){return{nextTokens:[],leadingWhitespaces:false,trailingWhitespaces:false}}const s=[];let a=0;const l=m.has(n[0]);for(let l=0,u=0;l<r.length;l+=1,u+=1){const f=n[u];if(m.has(f)){if(a!==l){s.push(r.slice(a,l))}a=l+1}else if(f==="\\"){const r=n[u+1];if(r==="u"&&n[u+2]==="{"){u=n.indexOf("}",u+3)}else{u+=g[r]??1}}}const u=a===r.length;if(!u){s.push(r.slice(a))}return{nextTokens:s,leadingWhitespaces:l,trailingWhitespaces:u}};const m=new Set([" ","\t","\r","\n"]);const g={x:3,u:5};const concatTokens=(r,n,s)=>s||r.length===0||n.length===0?[...r,...n]:[...r.slice(0,-1),`${r.at(-1)}${n[0]}`,...n.slice(1)];const parseExpression=r=>{const n=typeof r;if(n==="string"){return r}if(n==="number"){return String(r)}if(isPlainObject(r)&&("stdout"in r||"isMaxBuffer"in r)){return getSubprocessResult(r)}if(r instanceof l.ChildProcess||Object.prototype.toString.call(r)==="[object Promise]"){throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.")}throw new TypeError(`Unexpected "${n}" in template expression`)};const getSubprocessResult=({stdout:r})=>{if(typeof r==="string"){return r}if(isUint8Array(r)){return uint8ArrayToString(r)}if(r===undefined){throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.')}throw new TypeError(`Unexpected "${typeof r}" stdout in template expression`)};var y=s(7975);var v=s(1708);const isStandardStream=r=>b.includes(r);const b=[v.stdin,v.stdout,v.stderr];const w=["stdin","stdout","stderr"];const getStreamName=r=>w[r]??`stdio[${r}]`;const normalizeFdSpecificOptions=r=>{const n={...r};for(const s of x){n[s]=normalizeFdSpecificOption(r,s)}return n};const normalizeFdSpecificOption=(r,n)=>{const s=Array.from({length:getStdioLength(r)+1});const a=normalizeFdSpecificValue(r[n],s,n);return addDefaultValue(a,n)};const getStdioLength=({stdio:r})=>Array.isArray(r)?Math.max(r.length,w.length):w.length;const normalizeFdSpecificValue=(r,n,s)=>isPlainObject(r)?normalizeOptionObject(r,n,s):n.fill(r);const normalizeOptionObject=(r,n,s)=>{for(const a of Object.keys(r).sort(compareFdName)){for(const l of parseFdName(a,s,n)){n[l]=r[a]}}return n};const compareFdName=(r,n)=>getFdNameOrder(r)<getFdNameOrder(n)?1:-1;const getFdNameOrder=r=>{if(r==="stdout"||r==="stderr"){return 0}return r==="all"?2:1};const parseFdName=(r,n,s)=>{if(r==="ipc"){return[s.length-1]}const a=parseFd(r);if(a===undefined||a===0){throw new TypeError(`"${n}.${r}" is invalid.\nIt must be "${n}.stdout", "${n}.stderr", "${n}.all", "${n}.ipc", or "${n}.fd3", "${n}.fd4" (and so on).`)}if(a>=s.length){throw new TypeError(`"${n}.${r}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`)}return a==="all"?[1,2]:[a]};const parseFd=r=>{if(r==="all"){return r}if(w.includes(r)){return w.indexOf(r)}const n=_.exec(r);if(n!==null){return Number(n[1])}};const _=/^fd(\d+)$/;const addDefaultValue=(r,n)=>r.map((r=>r===undefined?E[n]:r));const S=(0,y.debuglog)("execa").enabled?"full":"none";const E={lines:false,buffer:true,maxBuffer:1e3*1e3*100,verbose:S,stripFinalNewline:true};const x=["lines","buffer","maxBuffer","verbose","stripFinalNewline"];const getFdSpecificValue=(r,n)=>n==="ipc"?r.at(-1):r[n];const isVerbose=({verbose:r},n)=>getFdVerbose(r,n)!=="none";const isFullVerbose=({verbose:r},n)=>!["none","short"].includes(getFdVerbose(r,n));const getVerboseFunction=({verbose:r},n)=>{const s=getFdVerbose(r,n);return isVerboseFunction(s)?s:undefined};const getFdVerbose=(r,n)=>n===undefined?getFdGenericVerbose(r):getFdSpecificValue(r,n);const getFdGenericVerbose=r=>r.find((r=>isVerboseFunction(r)))??A.findLast((n=>r.includes(n)));const isVerboseFunction=r=>typeof r==="function";const A=["none","short","full"];const joinCommand=(r,n)=>{const s=[r,...n];const a=s.join(" ");const l=s.map((r=>quoteString(escapeControlCharacters(r)))).join(" ");return{command:a,escapedCommand:l}};const escapeLines=r=>(0,y.stripVTControlCharacters)(r).split("\n").map((r=>escapeControlCharacters(r))).join("\n");const escapeControlCharacters=r=>r.replaceAll(k,(r=>escapeControlCharacter(r)));const escapeControlCharacter=r=>{const n=C[r];if(n!==undefined){return n}const s=r.codePointAt(0);const a=s.toString(16);return s<=O?`\\u${a.padStart(4,"0")}`:`\\U${a}`};const getSpecialCharRegExp=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}};const k=getSpecialCharRegExp();const C={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};const O=65535;const quoteString=r=>{if(T.test(r)){return r}return v.platform==="win32"?`"${r.replaceAll('"','""')}"`:`'${r.replaceAll("'","'\\''")}'`};const T=/^[\w./-]+$/;function isUnicodeSupported(){const{env:r}=v;const{TERM:n,TERM_PROGRAM:s}=r;if(v.platform!=="win32"){return n!=="linux"}return Boolean(r.WT_SESSION)||Boolean(r.TERMINUS_SUBLIME)||r.ConEmuTask==="{cmd::Cmder}"||s==="Terminus-Sublime"||s==="vscode"||n==="xterm-256color"||n==="alacritty"||n==="rxvt-unicode"||n==="rxvt-unicode-256color"||r.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const R={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"};const I={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"};const N={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"};const B={...R,...I};const D={...R,...N};const P=isUnicodeSupported();const L=P?B:D;const M=L;const $=Object.entries(I);const replaceSymbols=(r,{useFallback:n=!P}={})=>{if(n){for(const[n,s]of $){r=r.replaceAll(s,D[n])}}return r};var W=s(7066);const H=W?.WriteStream?.prototype?.hasColors?.()??false;const format=(r,n)=>{if(!H){return r=>r}const s=`[${r}m`;const a=`[${n}m`;return r=>{const n=r+"";let l=n.indexOf(a);if(l===-1){return s+n+a}let u=s;let f=0;while(l!==-1){u+=n.slice(f,l)+s;f=l+a.length;l=n.indexOf(a,f)}u+=n.slice(f)+a;return u}};const j=format(0,0);const U=format(1,22);const G=format(2,22);const z=format(3,23);const V=format(4,24);const Y=format(53,55);const K=format(7,27);const q=format(8,28);const X=format(9,29);const Q=format(30,39);const Z=format(31,39);const J=format(32,39);const ee=format(33,39);const te=format(34,39);const re=format(35,39);const ne=format(36,39);const se=format(37,39);const ie=format(90,39);const oe=format(40,49);const ae=format(41,49);const ce=format(42,49);const le=format(43,49);const ue=format(44,49);const fe=format(45,49);const de=format(46,49);const pe=format(47,49);const he=format(100,49);const me=format(91,39);const ge=format(92,39);const ye=format(93,39);const ve=format(94,39);const be=format(95,39);const we=format(96,39);const _e=format(97,39);const Se=format(101,49);const Ee=format(102,49);const xe=format(103,49);const Ae=format(104,49);const ke=format(105,49);const Ce=format(106,49);const Oe=format(107,49);const defaultVerboseFunction=({type:r,message:n,timestamp:s,piped:a,commandId:l,result:{failed:u=false}={},options:{reject:f=true}})=>{const d=serializeTimestamp(s);const p=Te[r]({failed:u,reject:f,piped:a});const m=Re[r]({reject:f});return`${ie(`[${d}]`)} ${ie(`[${l}]`)} ${m(p)} ${m(n)}`};const serializeTimestamp=r=>`${padField(r.getHours(),2)}:${padField(r.getMinutes(),2)}:${padField(r.getSeconds(),2)}.${padField(r.getMilliseconds(),3)}`;const padField=(r,n)=>String(r).padStart(n,"0");const getFinalIcon=({failed:r,reject:n})=>{if(!r){return M.tick}return n?M.cross:M.warning};const Te={command:({piped:r})=>r?"|":"$",output:()=>" ",ipc:()=>"*",error:getFinalIcon,duration:getFinalIcon};const identity=r=>r;const Re={command:()=>U,output:()=>identity,ipc:()=>identity,error:({reject:r})=>r?me:ye,duration:()=>ie};const applyVerboseOnLines=(r,n,s)=>{const a=getVerboseFunction(n,s);return r.map((({verboseLine:r,verboseObject:n})=>applyVerboseFunction(r,n,a))).filter((r=>r!==undefined)).map((r=>appendNewline(r))).join("")};const applyVerboseFunction=(r,n,s)=>{if(s===undefined){return r}const a=s(r,n);if(typeof a==="string"){return a}};const appendNewline=r=>r.endsWith("\n")?r:`${r}\n`;const verboseLog=({type:r,verboseMessage:n,fdNumber:s,verboseInfo:a,result:l})=>{const u=getVerboseObject({type:r,result:l,verboseInfo:a});const f=getPrintedLines(n,u);const d=applyVerboseOnLines(f,a,s);if(d!==""){console.warn(d.slice(0,-1))}};const getVerboseObject=({type:r,result:n,verboseInfo:{escapedCommand:s,commandId:a,rawOptions:{piped:l=false,...u}}})=>({type:r,escapedCommand:s,commandId:`${a}`,timestamp:new Date,piped:l,result:n,options:u});const getPrintedLines=(r,n)=>r.split("\n").map((r=>getPrintedLine({...n,message:r})));const getPrintedLine=r=>{const n=defaultVerboseFunction(r);return{verboseLine:n,verboseObject:r}};const serializeVerboseMessage=r=>{const n=typeof r==="string"?r:(0,y.inspect)(r);const s=escapeLines(n);return s.replaceAll("\t"," ".repeat(Ie))};const Ie=2;const logCommand=(r,n)=>{if(!isVerbose(n)){return}verboseLog({type:"command",verboseMessage:r,verboseInfo:n})};const getVerboseInfo=(r,n,s)=>{validateVerbose(r);const a=getCommandId(r);return{verbose:r,escapedCommand:n,commandId:a,rawOptions:s}};const getCommandId=r=>isVerbose({verbose:r})?Ne++:undefined;let Ne=0n;const validateVerbose=r=>{for(const n of r){if(n===false){throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".')}if(n===true){throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".')}if(!A.includes(n)&&!isVerboseFunction(n)){const r=A.map((r=>`'${r}'`)).join(", ");throw new TypeError(`The "verbose" option must not be ${n}. Allowed values are: ${r} or a function.`)}}};const getStartTime=()=>v.hrtime.bigint();const getDurationMs=r=>Number(v.hrtime.bigint()-r)/1e6;const handleCommand=(r,n,s)=>{const a=getStartTime();const{command:l,escapedCommand:u}=joinCommand(r,n);const f=normalizeFdSpecificOption(s,"verbose");const d=getVerboseInfo(f,u,{...s});logCommand(u,d);return{command:l,escapedCommand:u,startTime:a,verboseInfo:d}};var Be=s(6760);var De=s(546);function pathKey(r={}){const{env:n=process.env,platform:s=process.platform}=r;if(s!=="win32"){return"PATH"}return Object.keys(n).reverse().find((r=>r.toUpperCase()==="PATH"))||"Path"}const Pe=(0,y.promisify)(l.execFile);function toPath(r){return r instanceof URL?(0,a.fileURLToPath)(r):r}function rootDirectory(r){return path.parse(toPath(r)).root}function traversePathUp(r){return{*[Symbol.iterator](){let n=Be.resolve(toPath(r));let s;while(s!==n){yield n;s=n;n=Be.resolve(n,"..")}}}}const Le=null&&10*1024*1024;async function execFile(r,n,s={}){return Pe(r,n,{maxBuffer:Le,...s})}function execFileSync(r,n=[],s={}){return execFileSyncOriginal(r,n,{maxBuffer:Le,encoding:"utf8",stdio:"pipe",...s})}const npmRunPath=({cwd:r=v.cwd(),path:n=v.env[pathKey()],preferLocal:s=true,execPath:a=v.execPath,addExecPath:l=true}={})=>{const u=Be.resolve(toPath(r));const f=[];const d=n.split(Be.delimiter);if(s){applyPreferLocal(f,d,u)}if(l){applyExecPath(f,d,a,u)}return n===""||n===Be.delimiter?`${f.join(Be.delimiter)}${n}`:[...f,n].join(Be.delimiter)};const applyPreferLocal=(r,n,s)=>{for(const a of traversePathUp(s)){const s=Be.join(a,"node_modules/.bin");if(!n.includes(s)){r.push(s)}}};const applyExecPath=(r,n,s,a)=>{const l=Be.resolve(a,toPath(s),"..");if(!n.includes(l)){r.push(l)}};const npmRunPathEnv=({env:r=v.env,...n}={})=>{r={...r};const s=pathKey({env:r});n.path=r[s];r[s]=npmRunPath(n);return r};const Me=require("node:timers/promises");const getFinalError=(r,n,s)=>{const a=s?ExecaSyncError:ExecaError;const l=r instanceof DiscardedError?{}:{cause:r};return new a(n,l)};class DiscardedError extends Error{}const setErrorName=(r,n)=>{Object.defineProperty(r.prototype,"name",{value:n,writable:true,enumerable:false,configurable:true});Object.defineProperty(r.prototype,Fe,{value:true,writable:false,enumerable:false,configurable:false})};const isExecaError=r=>isErrorInstance(r)&&Fe in r;const Fe=Symbol("isExecaError");const isErrorInstance=r=>Object.prototype.toString.call(r)==="[object Error]";class ExecaError extends Error{}setErrorName(ExecaError,ExecaError.name);class ExecaSyncError extends Error{}setErrorName(ExecaSyncError,ExecaSyncError.name);var $e=s(8161);const getRealtimeSignals=()=>{const r=He-We+1;return Array.from({length:r},getRealtimeSignal)};const getRealtimeSignal=(r,n)=>({name:`SIGRT${n+1}`,number:We+n,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"});const We=34;const He=64;const je=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:true},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:true},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:true},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];const getSignals=()=>{const r=getRealtimeSignals();const n=[...je,...r].map(normalizeSignal);return n};const normalizeSignal=({name:r,number:n,description:s,action:a,forced:l=false,standard:u})=>{const{signals:{[r]:f}}=$e.constants;const d=f!==undefined;const p=d?f:n;return{name:r,number:p,description:s,supported:d,action:a,forced:l,standard:u}};const getSignalsByName=()=>{const r=getSignals();return Object.fromEntries(r.map(getSignalByName))};const getSignalByName=({name:r,number:n,description:s,supported:a,action:l,forced:u,standard:f})=>[r,{name:r,number:n,description:s,supported:a,action:l,forced:u,standard:f}];const Ue=getSignalsByName();const getSignalsByNumber=()=>{const r=getSignals();const n=He+1;const s=Array.from({length:n},((n,s)=>getSignalByNumber(s,r)));return Object.assign({},...s)};const getSignalByNumber=(r,n)=>{const s=findSignalByNumber(r,n);if(s===undefined){return{}}const{name:a,description:l,supported:u,action:f,forced:d,standard:p}=s;return{[r]:{name:a,number:r,description:l,supported:u,action:f,forced:d,standard:p}}};const findSignalByNumber=(r,n)=>{const s=n.find((({name:n})=>$e.constants.signals[n]===r));if(s!==undefined){return s}return n.find((n=>n.number===r))};const Ge=getSignalsByNumber();const normalizeKillSignal=r=>{const n="option `killSignal`";if(r===0){throw new TypeError(`Invalid ${n}: 0 cannot be used.`)}return signal_normalizeSignal(r,n)};const normalizeSignalArgument=r=>r===0?r:signal_normalizeSignal(r,"`subprocess.kill()`'s argument");const signal_normalizeSignal=(r,n)=>{if(Number.isInteger(r)){return normalizeSignalInteger(r,n)}if(typeof r==="string"){return normalizeSignalName(r,n)}throw new TypeError(`Invalid ${n} ${String(r)}: it must be a string or an integer.\n${getAvailableSignals()}`)};const normalizeSignalInteger=(r,n)=>{if(ze.has(r)){return ze.get(r)}throw new TypeError(`Invalid ${n} ${r}: this signal integer does not exist.\n${getAvailableSignals()}`)};const getSignalsIntegerToName=()=>new Map(Object.entries($e.constants.signals).reverse().map((([r,n])=>[n,r])));const ze=getSignalsIntegerToName();const normalizeSignalName=(r,n)=>{if(r in $e.constants.signals){return r}if(r.toUpperCase()in $e.constants.signals){throw new TypeError(`Invalid ${n} '${r}': please rename it to '${r.toUpperCase()}'.`)}throw new TypeError(`Invalid ${n} '${r}': this signal name does not exist.\n${getAvailableSignals()}`)};const getAvailableSignals=()=>`Available signal names: ${getAvailableSignalNames()}.\nAvailable signal numbers: ${getAvailableSignalIntegers()}.`;const getAvailableSignalNames=()=>Object.keys($e.constants.signals).sort().map((r=>`'${r}'`)).join(", ");const getAvailableSignalIntegers=()=>[...new Set(Object.values($e.constants.signals).sort(((r,n)=>r-n)))].join(", ");const getSignalDescription=r=>Ue[r].description;const normalizeForceKillAfterDelay=r=>{if(r===false){return r}if(r===true){return Ve}if(!Number.isFinite(r)||r<0){throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${r}\` (${typeof r})`)}return r};const Ve=1e3*5;const subprocessKill=({kill:r,options:{forceKillAfterDelay:n,killSignal:s},onInternalError:a,context:l,controller:u},f,d)=>{const{signal:p,error:m}=parseKillArguments(f,d,s);emitKillError(m,a);const g=r(p);setKillTimeout({kill:r,signal:p,forceKillAfterDelay:n,killSignal:s,killResult:g,context:l,controller:u});return g};const parseKillArguments=(r,n,s)=>{const[a=s,l]=isErrorInstance(r)?[undefined,r]:[r,n];if(typeof a!=="string"&&!Number.isInteger(a)){throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(a)}`)}if(l!==undefined&&!isErrorInstance(l)){throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${l}`)}return{signal:normalizeSignalArgument(a),error:l}};const emitKillError=(r,n)=>{if(r!==undefined){n.reject(r)}};const setKillTimeout=async({kill:r,signal:n,forceKillAfterDelay:s,killSignal:a,killResult:l,context:u,controller:f})=>{if(n===a&&l){killOnTimeout({kill:r,forceKillAfterDelay:s,context:u,controllerSignal:f.signal})}};const killOnTimeout=async({kill:r,forceKillAfterDelay:n,context:s,controllerSignal:a})=>{if(n===false){return}try{await(0,Me.setTimeout)(n,undefined,{signal:a});if(r("SIGKILL")){s.isForcefullyTerminated??=true}}catch{}};const Ye=require("node:events");const onAbortedSignal=async(r,n)=>{if(!r.aborted){await(0,Ye.once)(r,"abort",{signal:n})}};const validateCancelSignal=({cancelSignal:r})=>{if(r!==undefined&&Object.prototype.toString.call(r)!=="[object AbortSignal]"){throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(r)}`)}};const throwOnCancel=({subprocess:r,cancelSignal:n,gracefulCancel:s,context:a,controller:l})=>n===undefined||s?[]:[terminateOnCancel(r,n,a,l)];const terminateOnCancel=async(r,n,s,{signal:a})=>{await onAbortedSignal(n,a);s.terminationReason??="cancel";r.kill();throw n.reason};const validateIpcMethod=({methodName:r,isSubprocess:n,ipc:s,isConnected:a})=>{validateIpcOption(r,n,s);validateConnection(r,n,a)};const validateIpcOption=(r,n,s)=>{if(!s){throw new Error(`${getMethodName(r,n)} can only be used if the \`ipc\` option is \`true\`.`)}};const validateConnection=(r,n,s)=>{if(!s){throw new Error(`${getMethodName(r,n)} cannot be used: the ${getOtherProcessName(n)} has already exited or disconnected.`)}};const throwOnEarlyDisconnect=r=>{throw new Error(`${getMethodName("getOneMessage",r)} could not complete: the ${getOtherProcessName(r)} exited or disconnected.`)};const throwOnStrictDeadlockError=r=>{throw new Error(`${getMethodName("sendMessage",r)} failed: the ${getOtherProcessName(r)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${getMethodName("getOneMessage",r)},\n\t${getMethodName("sendMessage",r,"message, {strict: true}")},\n]);`)};const getStrictResponseError=(r,n)=>new Error(`${getMethodName("sendMessage",n)} failed when sending an acknowledgment response to the ${getOtherProcessName(n)}.`,{cause:r});const throwOnMissingStrict=r=>{throw new Error(`${getMethodName("sendMessage",r)} failed: the ${getOtherProcessName(r)} is not listening to incoming messages.`)};const throwOnStrictDisconnect=r=>{throw new Error(`${getMethodName("sendMessage",r)} failed: the ${getOtherProcessName(r)} exited without listening to incoming messages.`)};const getAbortDisconnectError=()=>new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);const throwOnMissingParent=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")};const handleEpipeError=({error:r,methodName:n,isSubprocess:s})=>{if(r.code==="EPIPE"){throw new Error(`${getMethodName(n,s)} cannot be used: the ${getOtherProcessName(s)} is disconnecting.`,{cause:r})}};const handleSerializationError=({error:r,methodName:n,isSubprocess:s,message:a})=>{if(isSerializationError(r)){throw new Error(`${getMethodName(n,s)}'s argument type is invalid: the message cannot be serialized: ${String(a)}.`,{cause:r})}};const isSerializationError=({code:r,message:n})=>Ke.has(r)||qe.some((r=>n.includes(r)));const Ke=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]);const qe=["could not be cloned","circular structure","call stack size exceeded"];const getMethodName=(r,n,s="")=>r==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${getNamespaceName(n)}${r}(${s})`;const getNamespaceName=r=>r?"":"subprocess.";const getOtherProcessName=r=>r?"parent process":"subprocess";const disconnect=r=>{if(r.connected){r.disconnect()}};const createDeferred=()=>{const r={};const n=new Promise(((n,s)=>{Object.assign(r,{resolve:n,reject:s})}));return Object.assign(n,r)};const getToStream=(r,n="stdin")=>{const s=true;const{options:a,fileDescriptors:l}=Xe.get(r);const u=getFdNumber(l,n,s);const f=r.stdio[u];if(f===null){throw new TypeError(getInvalidStdioOptionMessage(u,n,a,s))}return f};const getFromStream=(r,n="stdout")=>{const s=false;const{options:a,fileDescriptors:l}=Xe.get(r);const u=getFdNumber(l,n,s);const f=u==="all"?r.all:r.stdio[u];if(f===null||f===undefined){throw new TypeError(getInvalidStdioOptionMessage(u,n,a,s))}return f};const Xe=new WeakMap;const getFdNumber=(r,n,s)=>{const a=parseFdNumber(n,s);validateFdNumber(a,n,s,r);return a};const parseFdNumber=(r,n)=>{const s=parseFd(r);if(s!==undefined){return s}const{validOptions:a,defaultValue:l}=n?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${getOptionName(n)}" must not be "${r}".\nIt must be ${a} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${l}".`)};const validateFdNumber=(r,n,s,a)=>{const l=a[getUsedDescriptor(r)];if(l===undefined){throw new TypeError(`"${getOptionName(s)}" must not be ${n}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`)}if(l.direction==="input"&&!s){throw new TypeError(`"${getOptionName(s)}" must not be ${n}. It must be a readable stream, not writable.`)}if(l.direction!=="input"&&s){throw new TypeError(`"${getOptionName(s)}" must not be ${n}. It must be a writable stream, not readable.`)}};const getInvalidStdioOptionMessage=(r,n,s,a)=>{if(r==="all"&&!s.all){return'The "all" option must be true to use "from: \'all\'".'}const{optionName:l,optionValue:u}=getInvalidStdioOption(r,s);return`The "${l}: ${serializeOptionValue(u)}" option is incompatible with using "${getOptionName(a)}: ${serializeOptionValue(n)}".\nPlease set this option with "pipe" instead.`};const getInvalidStdioOption=(r,{stdin:n,stdout:s,stderr:a,stdio:l})=>{const u=getUsedDescriptor(r);if(u===0&&n!==undefined){return{optionName:"stdin",optionValue:n}}if(u===1&&s!==undefined){return{optionName:"stdout",optionValue:s}}if(u===2&&a!==undefined){return{optionName:"stderr",optionValue:a}}return{optionName:`stdio[${u}]`,optionValue:l[u]}};const getUsedDescriptor=r=>r==="all"?1:r;const getOptionName=r=>r?"to":"from";const serializeOptionValue=r=>{if(typeof r==="string"){return`'${r}'`}return typeof r==="number"?`${r}`:"Stream"};const incrementMaxListeners=(r,n,s)=>{const a=r.getMaxListeners();if(a===0||a===Number.POSITIVE_INFINITY){return}r.setMaxListeners(a+n);(0,Ye.addAbortListener)(s,(()=>{r.setMaxListeners(r.getMaxListeners()-n)}))};const addReference=(r,n)=>{if(n){addReferenceCount(r)}};const addReferenceCount=r=>{r.refCounted()};const removeReference=(r,n)=>{if(n){removeReferenceCount(r)}};const removeReferenceCount=r=>{r.unrefCounted()};const undoAddedReferences=(r,n)=>{if(n){removeReferenceCount(r);removeReferenceCount(r)}};const redoAddedReferences=(r,n)=>{if(n){addReferenceCount(r);addReferenceCount(r)}};const onMessage=async({anyProcess:r,channel:n,isSubprocess:s,ipcEmitter:a},l)=>{if(handleStrictResponse(l)||handleAbort(l)){return}if(!Qe.has(r)){Qe.set(r,[])}const u=Qe.get(r);u.push(l);if(u.length>1){return}while(u.length>0){await waitForOutgoingMessages(r,a,l);await Me.scheduler.yield();const f=await handleStrictRequest({wrappedMessage:u[0],anyProcess:r,channel:n,isSubprocess:s,ipcEmitter:a});u.shift();a.emit("message",f);a.emit("message:done")}};const onDisconnect=async({anyProcess:r,channel:n,isSubprocess:s,ipcEmitter:a,boundOnMessage:l})=>{abortOnDisconnect();const u=Qe.get(r);while(u?.length>0){await(0,Ye.once)(a,"message:done")}r.removeListener("message",l);redoAddedReferences(n,s);a.connected=false;a.emit("disconnect")};const Qe=new WeakMap;const getIpcEmitter=(r,n,s)=>{if(Ze.has(r)){return Ze.get(r)}const a=new Ye.EventEmitter;a.connected=true;Ze.set(r,a);forwardEvents({ipcEmitter:a,anyProcess:r,channel:n,isSubprocess:s});return a};const Ze=new WeakMap;const forwardEvents=({ipcEmitter:r,anyProcess:n,channel:s,isSubprocess:a})=>{const l=onMessage.bind(undefined,{anyProcess:n,channel:s,isSubprocess:a,ipcEmitter:r});n.on("message",l);n.once("disconnect",onDisconnect.bind(undefined,{anyProcess:n,channel:s,isSubprocess:a,ipcEmitter:r,boundOnMessage:l}));undoAddedReferences(s,a)};const isConnected=r=>{const n=Ze.get(r);return n===undefined?r.channel!==null:n.connected};const handleSendStrict=({anyProcess:r,channel:n,isSubprocess:s,message:a,strict:l})=>{if(!l){return a}const u=getIpcEmitter(r,n,s);const f=hasMessageListeners(r,u);return{id:Je++,type:tt,message:a,hasListeners:f}};let Je=0n;const validateStrictDeadlock=(r,n)=>{if(n?.type!==tt||n.hasListeners){return}for(const{id:n}of r){if(n!==undefined){et[n].resolve({isDeadlock:true,hasListeners:false})}}};const handleStrictRequest=async({wrappedMessage:r,anyProcess:n,channel:s,isSubprocess:a,ipcEmitter:l})=>{if(r?.type!==tt||!n.connected){return r}const{id:u,message:f}=r;const d={id:u,type:rt,message:hasMessageListeners(n,l)};try{await sendMessage({anyProcess:n,channel:s,isSubprocess:a,ipc:true},d)}catch(r){l.emit("strict:error",r)}return f};const handleStrictResponse=r=>{if(r?.type!==rt){return false}const{id:n,message:s}=r;et[n]?.resolve({isDeadlock:false,hasListeners:s});return true};const waitForStrictResponse=async(r,n,s)=>{if(r?.type!==tt){return}const a=createDeferred();et[r.id]=a;const l=new AbortController;try{const{isDeadlock:r,hasListeners:u}=await Promise.race([a,throwOnDisconnect(n,s,l)]);if(r){throwOnStrictDeadlockError(s)}if(!u){throwOnMissingStrict(s)}}finally{l.abort();delete et[r.id]}};const et={};const throwOnDisconnect=async(r,n,{signal:s})=>{incrementMaxListeners(r,1,s);await(0,Ye.once)(r,"disconnect",{signal:s});throwOnStrictDisconnect(n)};const tt="execa:ipc:request";const rt="execa:ipc:response";const startSendMessage=(r,n,s)=>{if(!nt.has(r)){nt.set(r,new Set)}const a=nt.get(r);const l=createDeferred();const u=s?n.id:undefined;const f={onMessageSent:l,id:u};a.add(f);return{outgoingMessages:a,outgoingMessage:f}};const endSendMessage=({outgoingMessages:r,outgoingMessage:n})=>{r.delete(n);n.onMessageSent.resolve()};const waitForOutgoingMessages=async(r,n,s)=>{while(!hasMessageListeners(r,n)&&nt.get(r)?.size>0){const n=[...nt.get(r)];validateStrictDeadlock(n,s);await Promise.all(n.map((({onMessageSent:r})=>r)))}};const nt=new WeakMap;const hasMessageListeners=(r,n)=>n.listenerCount("message")>getMinListenerCount(r);const getMinListenerCount=r=>Xe.has(r)&&!getFdSpecificValue(Xe.get(r).options.buffer,"ipc")?1:0;const sendMessage=({anyProcess:r,channel:n,isSubprocess:s,ipc:a},l,{strict:u=false}={})=>{const f="sendMessage";validateIpcMethod({methodName:f,isSubprocess:s,ipc:a,isConnected:r.connected});return sendMessageAsync({anyProcess:r,channel:n,methodName:f,isSubprocess:s,message:l,strict:u})};const sendMessageAsync=async({anyProcess:r,channel:n,methodName:s,isSubprocess:a,message:l,strict:u})=>{const f=handleSendStrict({anyProcess:r,channel:n,isSubprocess:a,message:l,strict:u});const d=startSendMessage(r,f,u);try{await sendOneMessage({anyProcess:r,methodName:s,isSubprocess:a,wrappedMessage:f,message:l})}catch(n){disconnect(r);throw n}finally{endSendMessage(d)}};const sendOneMessage=async({anyProcess:r,methodName:n,isSubprocess:s,wrappedMessage:a,message:l})=>{const u=getSendMethod(r);try{await Promise.all([waitForStrictResponse(a,r,s),u(a)])}catch(r){handleEpipeError({error:r,methodName:n,isSubprocess:s});handleSerializationError({error:r,methodName:n,isSubprocess:s,message:l});throw r}};const getSendMethod=r=>{if(st.has(r)){return st.get(r)}const n=(0,y.promisify)(r.send.bind(r));st.set(r,n);return n};const st=new WeakMap;const sendAbort=(r,n)=>{const s="cancelSignal";validateConnection(s,false,r.connected);return sendOneMessage({anyProcess:r,methodName:s,isSubprocess:false,wrappedMessage:{type:ot,message:n},message:n})};const getCancelSignal=async({anyProcess:r,channel:n,isSubprocess:s,ipc:a})=>{await startIpc({anyProcess:r,channel:n,isSubprocess:s,ipc:a});return at.signal};const startIpc=async({anyProcess:r,channel:n,isSubprocess:s,ipc:a})=>{if(it){return}it=true;if(!a){throwOnMissingParent();return}if(n===null){abortOnDisconnect();return}getIpcEmitter(r,n,s);await Me.scheduler.yield()};let it=false;const handleAbort=r=>{if(r?.type!==ot){return false}at.abort(r.message);return true};const ot="execa:ipc:cancel";const abortOnDisconnect=()=>{at.abort(getAbortDisconnectError())};const at=new AbortController;const validateGracefulCancel=({gracefulCancel:r,cancelSignal:n,ipc:s,serialization:a})=>{if(!r){return}if(n===undefined){throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.")}if(!s){throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.")}if(a==="json"){throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}};const throwOnGracefulCancel=({subprocess:r,cancelSignal:n,gracefulCancel:s,forceKillAfterDelay:a,context:l,controller:u})=>s?[sendOnAbort({subprocess:r,cancelSignal:n,forceKillAfterDelay:a,context:l,controller:u})]:[];const sendOnAbort=async({subprocess:r,cancelSignal:n,forceKillAfterDelay:s,context:a,controller:{signal:l}})=>{await onAbortedSignal(n,l);const u=getReason(n);await sendAbort(r,u);killOnTimeout({kill:r.kill,forceKillAfterDelay:s,context:a,controllerSignal:l});a.terminationReason??="gracefulCancel";throw n.reason};const getReason=({reason:r})=>{if(!(r instanceof DOMException)){return r}const n=new Error(r.message);Object.defineProperty(n,"stack",{value:r.stack,enumerable:false,configurable:true,writable:true});return n};const validateTimeout=({timeout:r})=>{if(r!==undefined&&(!Number.isFinite(r)||r<0)){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${r}\` (${typeof r})`)}};const throwOnTimeout=(r,n,s,a)=>n===0||n===undefined?[]:[killAfterTimeout(r,n,s,a)];const killAfterTimeout=async(r,n,s,{signal:a})=>{await(0,Me.setTimeout)(n,undefined,{signal:a});s.terminationReason??="timeout";r.kill();throw new DiscardedError};const mapNode=({options:r})=>{if(r.node===false){throw new TypeError('The "node" option cannot be false with `execaNode()`.')}return{options:{...r,node:true}}};const handleNodeOption=(r,n,{node:s=false,nodePath:a=v.execPath,nodeOptions:l=v.execArgv.filter((r=>!r.startsWith("--inspect"))),cwd:u,execPath:f,...d})=>{if(f!==undefined){throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.')}const p=safeNormalizeFileUrl(a,'The "nodePath" option');const m=Be.resolve(u,p);const g={...d,nodePath:m,node:s,cwd:u};if(!s){return[r,n,g]}if(Be.basename(r,".exe")==="node"){throw new TypeError('When the "node" option is true, the first argument does not need to be "node".')}return[m,[...l,r,...n],{ipc:true,...g,shell:false}]};const ct=require("node:v8");const validateIpcInputOption=({ipcInput:r,ipc:n,serialization:s})=>{if(r===undefined){return}if(!n){throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.")}lt[s](r)};const validateAdvancedInput=r=>{try{(0,ct.serialize)(r)}catch(r){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:r})}};const validateJsonInput=r=>{try{JSON.stringify(r)}catch(r){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:r})}};const lt={advanced:validateAdvancedInput,json:validateJsonInput};const sendIpcInput=async(r,n)=>{if(n===undefined){return}await r.sendMessage(n)};const validateEncoding=({encoding:r})=>{if(dt.has(r)){return}const n=getCorrectEncoding(r);if(n!==undefined){throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(r)}\`.\nPlease rename it to ${serializeEncoding(n)}.`)}const s=[...dt].map((r=>serializeEncoding(r))).join(", ");throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(r)}\`.\nPlease rename it to one of: ${s}.`)};const ut=new Set(["utf8","utf16le"]);const ft=new Set(["buffer","hex","base64","base64url","latin1","ascii"]);const dt=new Set([...ut,...ft]);const getCorrectEncoding=r=>{if(r===null){return"buffer"}if(typeof r!=="string"){return}const n=r.toLowerCase();if(n in pt){return pt[n]}if(dt.has(n)){return n}};const pt={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"};const serializeEncoding=r=>typeof r==="string"?`"${r}"`:String(r);var ht=s(3024);const normalizeCwd=(r=getDefaultCwd())=>{const n=safeNormalizeFileUrl(r,'The "cwd" option');return Be.resolve(n)};const getDefaultCwd=()=>{try{return v.cwd()}catch(r){r.message=`The current directory does not exist.\n${r.message}`;throw r}};const fixCwdError=(r,n)=>{if(n===getDefaultCwd()){return r}let s;try{s=(0,ht.statSync)(n)}catch(s){return`The "cwd" option is invalid: ${n}.\n${s.message}\n${r}`}if(!s.isDirectory()){return`The "cwd" option is not a directory: ${n}.\n${r}`}return r};const normalizeOptions=(r,n,s)=>{s.cwd=normalizeCwd(s.cwd);const[a,l,u]=handleNodeOption(r,n,s);const{command:f,args:d,options:p}=De._parse(a,l,u);const m=normalizeFdSpecificOptions(p);const g=addDefaultOptions(m);validateTimeout(g);validateEncoding(g);validateIpcInputOption(g);validateCancelSignal(g);validateGracefulCancel(g);g.shell=normalizeFileUrl(g.shell);g.env=getEnv(g);g.killSignal=normalizeKillSignal(g.killSignal);g.forceKillAfterDelay=normalizeForceKillAfterDelay(g.forceKillAfterDelay);g.lines=g.lines.map(((r,n)=>r&&!ft.has(g.encoding)&&g.buffer[n]));if(v.platform==="win32"&&Be.basename(f,".exe")==="cmd"){d.unshift("/q")}return{file:f,commandArguments:d,options:g}};const addDefaultOptions=({extendEnv:r=true,preferLocal:n=false,cwd:s,localDir:a=s,encoding:l="utf8",reject:u=true,cleanup:f=true,all:d=false,windowsHide:p=true,killSignal:m="SIGTERM",forceKillAfterDelay:g=true,gracefulCancel:y=false,ipcInput:v,ipc:b=v!==undefined||y,serialization:w="advanced",..._})=>({..._,extendEnv:r,preferLocal:n,cwd:s,localDirectory:a,encoding:l,reject:u,cleanup:f,all:d,windowsHide:p,killSignal:m,forceKillAfterDelay:g,gracefulCancel:y,ipcInput:v,ipc:b,serialization:w});const getEnv=({env:r,extendEnv:n,preferLocal:s,node:a,localDirectory:l,nodePath:u})=>{const f=n?{...v.env,...r}:r;if(s||a){return npmRunPathEnv({env:f,cwd:l,execPath:u,preferLocal:s,addExecPath:a})}return f};function strip_final_newline_stripFinalNewline(r){if(typeof r==="string"){return stripFinalNewlineString(r)}if(!(ArrayBuffer.isView(r)&&r.BYTES_PER_ELEMENT===1)){throw new Error("Input must be a string or a Uint8Array")}return stripFinalNewlineBinary(r)}const stripFinalNewlineString=r=>r.at(-1)===mt?r.slice(0,r.at(-2)===yt?-2:-1):r;const stripFinalNewlineBinary=r=>r.at(-1)===gt?r.subarray(0,r.at(-2)===vt?-2:-1):r;const mt="\n";const gt=mt.codePointAt(0);const yt="\r";const vt=yt.codePointAt(0);function isStream(r,{checkOpen:n=true}={}){return r!==null&&typeof r==="object"&&(r.writable||r.readable||!n||r.writable===undefined&&r.readable===undefined)&&typeof r.pipe==="function"}function isWritableStream(r,{checkOpen:n=true}={}){return isStream(r,{checkOpen:n})&&(r.writable||!n)&&typeof r.write==="function"&&typeof r.end==="function"&&typeof r.writable==="boolean"&&typeof r.writableObjectMode==="boolean"&&typeof r.destroy==="function"&&typeof r.destroyed==="boolean"}function isReadableStream(r,{checkOpen:n=true}={}){return isStream(r,{checkOpen:n})&&(r.readable||!n)&&typeof r.read==="function"&&typeof r.readable==="boolean"&&typeof r.readableObjectMode==="boolean"&&typeof r.destroy==="function"&&typeof r.destroyed==="boolean"}function isDuplexStream(r,n){return isWritableStream(r,n)&&isReadableStream(r,n)}function isTransformStream(r,n){return isDuplexStream(r,n)&&typeof r._transform==="function"}const bt=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class c{#e;#t;#r=!1;#n=void 0;constructor(r,n){this.#e=r,this.#t=n}next(){const e=()=>this.#s();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(r){const t=()=>this.#i(r);return this.#n?this.#n.then(t,t):t()}async#s(){if(this.#r)return{done:!0,value:void 0};let r;try{r=await this.#e.read()}catch(r){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),r}return r.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),r}async#i(r){if(this.#r)return{done:!0,value:r};if(this.#r=!0,!this.#t){const n=this.#e.cancel(r);return this.#e.releaseLock(),await n,{done:!0,value:r}}return this.#e.releaseLock(),{done:!0,value:r}}}const wt=Symbol();function i(){return this[wt].next()}Object.defineProperty(i,"name",{value:"next"});function o(r){return this[wt].return(r)}Object.defineProperty(o,"name",{value:"return"});const _t=Object.create(bt,{next:{enumerable:!0,configurable:!0,writable:!0,value:i},return:{enumerable:!0,configurable:!0,writable:!0,value:o}});function h({preventCancel:r=!1}={}){const n=this.getReader(),s=new c(n,r),a=Object.create(_t);return a[wt]=s,a}const getAsyncIterable=r=>{if(isReadableStream(r,{checkOpen:false})&&Et.on!==undefined){return getStreamIterable(r)}if(typeof r?.[Symbol.asyncIterator]==="function"){return r}if(St.call(r)==="[object ReadableStream]"){return h.call(r)}throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")};const{toString:St}=Object.prototype;const getStreamIterable=async function*(r){const n=new AbortController;const s={};handleStreamEnd(r,n,s);try{for await(const[s]of Et.on(r,"data",{signal:n.signal})){yield s}}catch(r){if(s.error!==undefined){throw s.error}else if(!n.signal.aborted){throw r}}finally{r.destroy()}};const handleStreamEnd=async(r,n,s)=>{try{await Et.finished(r,{cleanup:true,readable:true,writable:false,error:false})}catch(r){s.error=r}finally{n.abort()}};const Et={};const getStreamContents=async(r,{init:n,convertChunk:s,getSize:a,truncateChunk:l,addChunk:u,getFinalChunk:f,finalize:d},{maxBuffer:p=Number.POSITIVE_INFINITY}={})=>{const m=getAsyncIterable(r);const g=n();g.length=0;try{for await(const r of m){const n=getChunkType(r);const f=s[n](r,g);appendChunk({convertedChunk:f,state:g,getSize:a,truncateChunk:l,addChunk:u,maxBuffer:p})}appendFinalChunk({state:g,convertChunk:s,getSize:a,truncateChunk:l,addChunk:u,getFinalChunk:f,maxBuffer:p});return d(g)}catch(r){const n=typeof r==="object"&&r!==null?r:new Error(r);n.bufferedData=d(g);throw n}};const appendFinalChunk=({state:r,getSize:n,truncateChunk:s,addChunk:a,getFinalChunk:l,maxBuffer:u})=>{const f=l(r);if(f!==undefined){appendChunk({convertedChunk:f,state:r,getSize:n,truncateChunk:s,addChunk:a,maxBuffer:u})}};const appendChunk=({convertedChunk:r,state:n,getSize:s,truncateChunk:a,addChunk:l,maxBuffer:u})=>{const f=s(r);const d=n.length+f;if(d<=u){addNewChunk(r,n,l,d);return}const p=a(r,u-n.length);if(p!==undefined){addNewChunk(p,n,l,u)}throw new MaxBufferError};const addNewChunk=(r,n,s,a)=>{n.contents=s(r,n,a);n.length=a};const getChunkType=r=>{const n=typeof r;if(n==="string"){return"string"}if(n!=="object"||r===null){return"others"}if(globalThis.Buffer?.isBuffer(r)){return"buffer"}const s=xt.call(r);if(s==="[object ArrayBuffer]"){return"arrayBuffer"}if(s==="[object DataView]"){return"dataView"}if(Number.isInteger(r.byteLength)&&Number.isInteger(r.byteOffset)&&xt.call(r.buffer)==="[object ArrayBuffer]"){return"typedArray"}return"others"};const{toString:xt}=Object.prototype;class MaxBufferError extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const handleMaxBuffer=({error:r,stream:n,readableObjectMode:s,lines:a,encoding:l,fdNumber:u})=>{if(!(r instanceof MaxBufferError)){throw r}if(u==="all"){return r}const f=getMaxBufferUnit(s,a,l);r.maxBufferInfo={fdNumber:u,unit:f};n.destroy();throw r};const getMaxBufferUnit=(r,n,s)=>{if(r){return"objects"}if(n){return"lines"}if(s==="buffer"){return"bytes"}return"characters"};const checkIpcMaxBuffer=(r,n,s)=>{if(n.length!==s){return}const a=new MaxBufferError;a.maxBufferInfo={fdNumber:"ipc"};throw a};const getMaxBufferMessage=(r,n)=>{const{streamName:s,threshold:a,unit:l}=getMaxBufferInfo(r,n);return`Command's ${s} was larger than ${a} ${l}`};const getMaxBufferInfo=(r,n)=>{if(r?.maxBufferInfo===undefined){return{streamName:"output",threshold:n[1],unit:"bytes"}}const{maxBufferInfo:{fdNumber:s,unit:a}}=r;delete r.maxBufferInfo;const l=getFdSpecificValue(n,s);if(s==="ipc"){return{streamName:"IPC output",threshold:l,unit:"messages"}}return{streamName:getStreamName(s),threshold:l,unit:a}};const isMaxBufferSync=(r,n,s)=>r?.code==="ENOBUFS"&&n!==null&&n.some((r=>r!==null&&r.length>getMaxBufferSync(s)));const truncateMaxBufferSync=(r,n,s)=>{if(!n){return r}const a=getMaxBufferSync(s);return r.length>a?r.slice(0,a):r};const getMaxBufferSync=([,r])=>r;const createMessages=({stdio:r,all:n,ipcOutput:s,originalError:a,signal:l,signalDescription:u,exitCode:f,escapedCommand:d,timedOut:p,isCanceled:m,isGracefullyCanceled:g,isMaxBuffer:y,isForcefullyTerminated:v,forceKillAfterDelay:b,killSignal:w,maxBuffer:_,timeout:S,cwd:E})=>{const x=a?.code;const A=getErrorPrefix({originalError:a,timedOut:p,timeout:S,isMaxBuffer:y,maxBuffer:_,errorCode:x,signal:l,signalDescription:u,exitCode:f,isCanceled:m,isGracefullyCanceled:g,isForcefullyTerminated:v,forceKillAfterDelay:b,killSignal:w});const k=getOriginalMessage(a,E);const C=k===undefined?"":`\n${k}`;const O=`${A}: ${d}${C}`;const T=n===undefined?[r[2],r[1]]:[n];const R=[O,...T,...r.slice(3),s.map((r=>serializeIpcMessage(r))).join("\n")].map((r=>escapeLines(strip_final_newline_stripFinalNewline(serializeMessagePart(r))))).filter(Boolean).join("\n\n");return{originalMessage:k,shortMessage:O,message:R}};const getErrorPrefix=({originalError:r,timedOut:n,timeout:s,isMaxBuffer:a,maxBuffer:l,errorCode:u,signal:f,signalDescription:d,exitCode:p,isCanceled:m,isGracefullyCanceled:g,isForcefullyTerminated:y,forceKillAfterDelay:v,killSignal:b})=>{const w=getForcefulSuffix(y,v);if(n){return`Command timed out after ${s} milliseconds${w}`}if(g){if(f===undefined){return`Command was gracefully canceled with exit code ${p}`}return y?`Command was gracefully canceled${w}`:`Command was gracefully canceled with ${f} (${d})`}if(m){return`Command was canceled${w}`}if(a){return`${getMaxBufferMessage(r,l)}${w}`}if(u!==undefined){return`Command failed with ${u}${w}`}if(y){return`Command was killed with ${b} (${getSignalDescription(b)})${w}`}if(f!==undefined){return`Command was killed with ${f} (${d})`}if(p!==undefined){return`Command failed with exit code ${p}`}return"Command failed"};const getForcefulSuffix=(r,n)=>r?` and was forcefully terminated after ${n} milliseconds`:"";const getOriginalMessage=(r,n)=>{if(r instanceof DiscardedError){return}const s=isExecaError(r)?r.originalMessage:String(r?.message??r);const a=escapeLines(fixCwdError(s,n));return a===""?undefined:a};const serializeIpcMessage=r=>typeof r==="string"?r:(0,y.inspect)(r);const serializeMessagePart=r=>Array.isArray(r)?r.map((r=>strip_final_newline_stripFinalNewline(serializeMessageItem(r)))).filter(Boolean).join("\n"):serializeMessageItem(r);const serializeMessageItem=r=>{if(typeof r==="string"){return r}if(isUint8Array(r)){return uint8ArrayToString(r)}return""};const makeSuccessResult=({command:r,escapedCommand:n,stdio:s,all:a,ipcOutput:l,options:{cwd:u},startTime:f})=>omitUndefinedProperties({command:r,escapedCommand:n,cwd:u,durationMs:getDurationMs(f),failed:false,timedOut:false,isCanceled:false,isGracefullyCanceled:false,isTerminated:false,isMaxBuffer:false,isForcefullyTerminated:false,exitCode:0,stdout:s[1],stderr:s[2],all:a,stdio:s,ipcOutput:l,pipedFrom:[]});const makeEarlyError=({error:r,command:n,escapedCommand:s,fileDescriptors:a,options:l,startTime:u,isSync:f})=>makeError({error:r,command:n,escapedCommand:s,startTime:u,timedOut:false,isCanceled:false,isGracefullyCanceled:false,isMaxBuffer:false,isForcefullyTerminated:false,stdio:Array.from({length:a.length}),ipcOutput:[],options:l,isSync:f});const makeError=({error:r,command:n,escapedCommand:s,startTime:a,timedOut:l,isCanceled:u,isGracefullyCanceled:f,isMaxBuffer:d,isForcefullyTerminated:p,exitCode:m,signal:g,stdio:y,all:v,ipcOutput:b,options:{timeoutDuration:w,timeout:_=w,forceKillAfterDelay:S,killSignal:E,cwd:x,maxBuffer:A},isSync:k})=>{const{exitCode:C,signal:O,signalDescription:T}=normalizeExitPayload(m,g);const{originalMessage:R,shortMessage:I,message:N}=createMessages({stdio:y,all:v,ipcOutput:b,originalError:r,signal:O,signalDescription:T,exitCode:C,escapedCommand:s,timedOut:l,isCanceled:u,isGracefullyCanceled:f,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:S,killSignal:E,maxBuffer:A,timeout:_,cwd:x});const B=getFinalError(r,N,k);Object.assign(B,getErrorProperties({error:B,command:n,escapedCommand:s,startTime:a,timedOut:l,isCanceled:u,isGracefullyCanceled:f,isMaxBuffer:d,isForcefullyTerminated:p,exitCode:C,signal:O,signalDescription:T,stdio:y,all:v,ipcOutput:b,cwd:x,originalMessage:R,shortMessage:I}));return B};const getErrorProperties=({error:r,command:n,escapedCommand:s,startTime:a,timedOut:l,isCanceled:u,isGracefullyCanceled:f,isMaxBuffer:d,isForcefullyTerminated:p,exitCode:m,signal:g,signalDescription:y,stdio:v,all:b,ipcOutput:w,cwd:_,originalMessage:S,shortMessage:E})=>omitUndefinedProperties({shortMessage:E,originalMessage:S,command:n,escapedCommand:s,cwd:_,durationMs:getDurationMs(a),failed:true,timedOut:l,isCanceled:u,isGracefullyCanceled:f,isTerminated:g!==undefined,isMaxBuffer:d,isForcefullyTerminated:p,exitCode:m,signal:g,signalDescription:y,code:r.cause?.code,stdout:v[1],stderr:v[2],all:b,stdio:v,ipcOutput:w,pipedFrom:[]});const omitUndefinedProperties=r=>Object.fromEntries(Object.entries(r).filter((([,r])=>r!==undefined)));const normalizeExitPayload=(r,n)=>{const s=r===null?undefined:r;const a=n===null?undefined:n;const l=a===undefined?undefined:getSignalDescription(n);return{exitCode:s,signal:a,signalDescription:l}};const toZeroIfInfinity=r=>Number.isFinite(r)?r:0;function parseNumber(r){return{days:Math.trunc(r/864e5),hours:Math.trunc(r/36e5%24),minutes:Math.trunc(r/6e4%60),seconds:Math.trunc(r/1e3%60),milliseconds:Math.trunc(r%1e3),microseconds:Math.trunc(toZeroIfInfinity(r*1e3)%1e3),nanoseconds:Math.trunc(toZeroIfInfinity(r*1e6)%1e3)}}function parseBigint(r){return{days:r/86400000n,hours:r/3600000n%24n,minutes:r/60000n%60n,seconds:r/1000n%60n,milliseconds:r%1000n,microseconds:0n,nanoseconds:0n}}function parseMilliseconds(r){switch(typeof r){case"number":{if(Number.isFinite(r)){return parseNumber(r)}break}case"bigint":{return parseBigint(r)}}throw new TypeError("Expected a finite number or bigint")}const isZero=r=>r===0||r===0n;const pluralize=(r,n)=>n===1||n===1n?r:`${r}s`;const At=1e-7;const kt=24n*60n*60n*1000n;function prettyMilliseconds(r,n){const s=typeof r==="bigint";if(!s&&!Number.isFinite(r)){throw new TypeError("Expected a finite number or bigint")}n={...n};const a=r<0?"-":"";r=r<0?-r:r;if(n.colonNotation){n.compact=false;n.formatSubMilliseconds=false;n.separateMilliseconds=false;n.verbose=false}if(n.compact){n.unitCount=1;n.secondsDecimalDigits=0;n.millisecondsDecimalDigits=0}let l=[];const floorDecimals=(r,n)=>{const s=Math.floor(r*10**n+At);const a=Math.round(s)/10**n;return a.toFixed(n)};const add=(r,s,a,u)=>{if((l.length===0||!n.colonNotation)&&isZero(r)&&!(n.colonNotation&&a==="m")){return}u??=String(r);if(n.colonNotation){const r=u.includes(".")?u.split(".")[0].length:u.length;const n=l.length>0?2:1;u="0".repeat(Math.max(0,n-r))+u}else{u+=n.verbose?" "+pluralize(s,r):a}l.push(u)};const u=parseMilliseconds(r);const f=BigInt(u.days);if(n.hideYearAndDays){add(BigInt(f)*24n+BigInt(u.hours),"hour","h")}else{if(n.hideYear){add(f,"day","d")}else{add(f/365n,"year","y");add(f%365n,"day","d")}add(Number(u.hours),"hour","h")}add(Number(u.minutes),"minute","m");if(!n.hideSeconds){if(n.separateMilliseconds||n.formatSubMilliseconds||!n.colonNotation&&r<1e3){const r=Number(u.seconds);const s=Number(u.milliseconds);const a=Number(u.microseconds);const l=Number(u.nanoseconds);add(r,"second","s");if(n.formatSubMilliseconds){add(s,"millisecond","ms");add(a,"microsecond","µs");add(l,"nanosecond","ns")}else{const r=s+a/1e3+l/1e6;const u=typeof n.millisecondsDecimalDigits==="number"?n.millisecondsDecimalDigits:0;const f=r>=1?Math.round(r):Math.ceil(r);const d=u?r.toFixed(u):f;add(Number.parseFloat(d),"millisecond","ms",d)}}else{const a=(s?Number(r%kt):r)/1e3%60;const l=typeof n.secondsDecimalDigits==="number"?n.secondsDecimalDigits:1;const u=floorDecimals(a,l);const f=n.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");add(Number.parseFloat(f),"second","s",f)}}if(l.length===0){return a+"0"+(n.verbose?" milliseconds":"ms")}const d=n.colonNotation?":":" ";if(typeof n.unitCount==="number"){l=l.slice(0,Math.max(n.unitCount,1))}return a+l.join(d)}const logError=(r,n)=>{if(r.failed){verboseLog({type:"error",verboseMessage:r.shortMessage,verboseInfo:n,result:r})}};const logResult=(r,n)=>{if(!isVerbose(n)){return}logError(r,n);logDuration(r,n)};const logDuration=(r,n)=>{const s=`(done in ${prettyMilliseconds(r.durationMs)})`;verboseLog({type:"duration",verboseMessage:s,verboseInfo:n,result:r})};const handleResult=(r,n,{reject:s})=>{logResult(r,n);if(r.failed&&s){throw r}return r};const getStdioItemType=(r,n)=>{if(isAsyncGenerator(r)){return"asyncGenerator"}if(isSyncGenerator(r)){return"generator"}if(isUrl(r)){return"fileUrl"}if(isFilePathObject(r)){return"filePath"}if(isWebStream(r)){return"webStream"}if(isStream(r,{checkOpen:false})){return"native"}if(isUint8Array(r)){return"uint8Array"}if(isAsyncIterableObject(r)){return"asyncIterable"}if(isIterableObject(r)){return"iterable"}if(type_isTransformStream(r)){return getTransformStreamType({transform:r},n)}if(isTransformOptions(r)){return getTransformObjectType(r,n)}return"native"};const getTransformObjectType=(r,n)=>{if(isDuplexStream(r.transform,{checkOpen:false})){return getDuplexType(r,n)}if(type_isTransformStream(r.transform)){return getTransformStreamType(r,n)}return getGeneratorObjectType(r,n)};const getDuplexType=(r,n)=>{validateNonGeneratorType(r,n,"Duplex stream");return"duplex"};const getTransformStreamType=(r,n)=>{validateNonGeneratorType(r,n,"web TransformStream");return"webTransform"};const validateNonGeneratorType=({final:r,binary:n,objectMode:s},a,l)=>{checkUndefinedOption(r,`${a}.final`,l);checkUndefinedOption(n,`${a}.binary`,l);checkBooleanOption(s,`${a}.objectMode`)};const checkUndefinedOption=(r,n,s)=>{if(r!==undefined){throw new TypeError(`The \`${n}\` option can only be defined when using a generator, not a ${s}.`)}};const getGeneratorObjectType=({transform:r,final:n,binary:s,objectMode:a},l)=>{if(r!==undefined&&!isGenerator(r)){throw new TypeError(`The \`${l}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`)}if(isDuplexStream(n,{checkOpen:false})){throw new TypeError(`The \`${l}.final\` option must not be a Duplex stream.`)}if(type_isTransformStream(n)){throw new TypeError(`The \`${l}.final\` option must not be a web TransformStream.`)}if(n!==undefined&&!isGenerator(n)){throw new TypeError(`The \`${l}.final\` option must be a generator.`)}checkBooleanOption(s,`${l}.binary`);checkBooleanOption(a,`${l}.objectMode`);return isAsyncGenerator(r)||isAsyncGenerator(n)?"asyncGenerator":"generator"};const checkBooleanOption=(r,n)=>{if(r!==undefined&&typeof r!=="boolean"){throw new TypeError(`The \`${n}\` option must use a boolean.`)}};const isGenerator=r=>isAsyncGenerator(r)||isSyncGenerator(r);const isAsyncGenerator=r=>Object.prototype.toString.call(r)==="[object AsyncGeneratorFunction]";const isSyncGenerator=r=>Object.prototype.toString.call(r)==="[object GeneratorFunction]";const isTransformOptions=r=>isPlainObject(r)&&(r.transform!==undefined||r.final!==undefined);const isUrl=r=>Object.prototype.toString.call(r)==="[object URL]";const isRegularUrl=r=>isUrl(r)&&r.protocol!=="file:";const isFilePathObject=r=>isPlainObject(r)&&Object.keys(r).length>0&&Object.keys(r).every((r=>Ct.has(r)))&&isFilePathString(r.file);const Ct=new Set(["file","append"]);const isFilePathString=r=>typeof r==="string";const isUnknownStdioString=(r,n)=>r==="native"&&typeof n==="string"&&!Ot.has(n);const Ot=new Set(["ipc","ignore","inherit","overlapped","pipe"]);const type_isReadableStream=r=>Object.prototype.toString.call(r)==="[object ReadableStream]";const type_isWritableStream=r=>Object.prototype.toString.call(r)==="[object WritableStream]";const isWebStream=r=>type_isReadableStream(r)||type_isWritableStream(r);const type_isTransformStream=r=>type_isReadableStream(r?.readable)&&type_isWritableStream(r?.writable);const isAsyncIterableObject=r=>isObject(r)&&typeof r[Symbol.asyncIterator]==="function";const isIterableObject=r=>isObject(r)&&typeof r[Symbol.iterator]==="function";const isObject=r=>typeof r==="object"&&r!==null;const Tt=new Set(["generator","asyncGenerator","duplex","webTransform"]);const Rt=new Set(["fileUrl","filePath","fileNumber"]);const It=new Set(["fileUrl","filePath"]);const Nt=new Set([...It,"webStream","nodeStream"]);const Bt=new Set(["webTransform","duplex"]);const Dt={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};const getTransformObjectModes=(r,n,s,a)=>a==="output"?getOutputObjectModes(r,n,s):getInputObjectModes(r,n,s);const getOutputObjectModes=(r,n,s)=>{const a=n!==0&&s[n-1].value.readableObjectMode;const l=r??a;return{writableObjectMode:a,readableObjectMode:l}};const getInputObjectModes=(r,n,s)=>{const a=n===0?r===true:s[n-1].value.readableObjectMode;const l=n!==s.length-1&&(r??a);return{writableObjectMode:a,readableObjectMode:l}};const getFdObjectMode=(r,n)=>{const s=r.findLast((({type:r})=>Tt.has(r)));if(s===undefined){return false}return n==="input"?s.value.writableObjectMode:s.value.readableObjectMode};const normalizeTransforms=(r,n,s,a)=>[...r.filter((({type:r})=>!Tt.has(r))),...getTransforms(r,n,s,a)];const getTransforms=(r,n,s,{encoding:a})=>{const l=r.filter((({type:r})=>Tt.has(r)));const u=Array.from({length:l.length});for(const[r,f]of Object.entries(l)){u[r]=normalizeTransform({stdioItem:f,index:Number(r),newTransforms:u,optionName:n,direction:s,encoding:a})}return sortTransforms(u,s)};const normalizeTransform=({stdioItem:r,stdioItem:{type:n},index:s,newTransforms:a,optionName:l,direction:u,encoding:f})=>{if(n==="duplex"){return normalizeDuplex({stdioItem:r,optionName:l})}if(n==="webTransform"){return normalizeTransformStream({stdioItem:r,index:s,newTransforms:a,direction:u})}return normalizeGenerator({stdioItem:r,index:s,newTransforms:a,direction:u,encoding:f})};const normalizeDuplex=({stdioItem:r,stdioItem:{value:{transform:n,transform:{writableObjectMode:s,readableObjectMode:a},objectMode:l=a}},optionName:u})=>{if(l&&!a){throw new TypeError(`The \`${u}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`)}if(!l&&a){throw new TypeError(`The \`${u}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`)}return{...r,value:{transform:n,writableObjectMode:s,readableObjectMode:a}}};const normalizeTransformStream=({stdioItem:r,stdioItem:{value:n},index:s,newTransforms:a,direction:l})=>{const{transform:u,objectMode:f}=isPlainObject(n)?n:{transform:n};const{writableObjectMode:d,readableObjectMode:p}=getTransformObjectModes(f,s,a,l);return{...r,value:{transform:u,writableObjectMode:d,readableObjectMode:p}}};const normalizeGenerator=({stdioItem:r,stdioItem:{value:n},index:s,newTransforms:a,direction:l,encoding:u})=>{const{transform:f,final:d,binary:p=false,preserveNewlines:m=false,objectMode:g}=isPlainObject(n)?n:{transform:n};const y=p||ft.has(u);const{writableObjectMode:v,readableObjectMode:b}=getTransformObjectModes(g,s,a,l);return{...r,value:{transform:f,final:d,binary:y,preserveNewlines:m,writableObjectMode:v,readableObjectMode:b}}};const sortTransforms=(r,n)=>n==="input"?r.reverse():r;const getStreamDirection=(r,n,s)=>{const a=r.map((r=>getStdioItemDirection(r,n)));if(a.includes("input")&&a.includes("output")){throw new TypeError(`The \`${s}\` option must not be an array of both readable and writable values.`)}return a.find(Boolean)??Mt};const getStdioItemDirection=({type:r,value:n},s)=>Pt[s]??Lt[r](n);const Pt=["input","output","output"];const anyDirection=()=>undefined;const alwaysInput=()=>"input";const Lt={generator:anyDirection,asyncGenerator:anyDirection,fileUrl:anyDirection,filePath:anyDirection,iterable:alwaysInput,asyncIterable:alwaysInput,uint8Array:alwaysInput,webStream:r=>type_isWritableStream(r)?"output":"input",nodeStream(r){if(!isReadableStream(r,{checkOpen:false})){return"output"}return isWritableStream(r,{checkOpen:false})?undefined:"input"},webTransform:anyDirection,duplex:anyDirection,native(r){const n=getStandardStreamDirection(r);if(n!==undefined){return n}if(isStream(r,{checkOpen:false})){return Lt.nodeStream(r)}}};const getStandardStreamDirection=r=>{if([0,v.stdin].includes(r)){return"input"}if([1,2,v.stdout,v.stderr].includes(r)){return"output"}};const Mt="output";const normalizeIpcStdioArray=(r,n)=>n&&!r.includes("ipc")?[...r,"ipc"]:r;const normalizeStdioOption=({stdio:r,ipc:n,buffer:s,...a},l,u)=>{const f=getStdioArray(r,a).map(((r,n)=>stdio_option_addDefaultValue(r,n)));return u?normalizeStdioSync(f,s,l):normalizeIpcStdioArray(f,n)};const getStdioArray=(r,n)=>{if(r===undefined){return w.map((r=>n[r]))}if(hasAlias(n)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${w.map((r=>`\`${r}\``)).join(", ")}`)}if(typeof r==="string"){return[r,r,r]}if(!Array.isArray(r)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``)}const s=Math.max(r.length,w.length);return Array.from({length:s},((n,s)=>r[s]))};const hasAlias=r=>w.some((n=>r[n]!==undefined));const stdio_option_addDefaultValue=(r,n)=>{if(Array.isArray(r)){return r.map((r=>stdio_option_addDefaultValue(r,n)))}if(r===null||r===undefined){return n>=w.length?"ignore":"pipe"}return r};const normalizeStdioSync=(r,n,s)=>r.map(((r,a)=>!n[a]&&a!==0&&!isFullVerbose(s,a)&&isOutputPipeOnly(r)?"ignore":r));const isOutputPipeOnly=r=>r==="pipe"||Array.isArray(r)&&r.every((r=>r==="pipe"));const handleNativeStream=({stdioItem:r,stdioItem:{type:n},isStdioArray:s,fdNumber:a,direction:l,isSync:u})=>{if(!s||n!=="native"){return r}return u?handleNativeStreamSync({stdioItem:r,fdNumber:a,direction:l}):handleNativeStreamAsync({stdioItem:r,fdNumber:a})};const handleNativeStreamSync=({stdioItem:r,stdioItem:{value:n,optionName:s},fdNumber:a,direction:l})=>{const u=getTargetFd({value:n,optionName:s,fdNumber:a,direction:l});if(u!==undefined){return u}if(isStream(n,{checkOpen:false})){throw new TypeError(`The \`${s}: Stream\` option cannot both be an array and include a stream with synchronous methods.`)}return r};const getTargetFd=({value:r,optionName:n,fdNumber:s,direction:a})=>{const l=getTargetFdNumber(r,s);if(l===undefined){return}if(a==="output"){return{type:"fileNumber",value:l,optionName:n}}if(W.isatty(l)){throw new TypeError(`The \`${n}: ${serializeOptionValue(r)}\` option is invalid: it cannot be a TTY with synchronous methods.`)}return{type:"uint8Array",value:bufferToUint8Array((0,ht.readFileSync)(l)),optionName:n}};const getTargetFdNumber=(r,n)=>{if(r==="inherit"){return n}if(typeof r==="number"){return r}const s=b.indexOf(r);if(s!==-1){return s}};const handleNativeStreamAsync=({stdioItem:r,stdioItem:{value:n,optionName:s},fdNumber:a})=>{if(n==="inherit"){return{type:"nodeStream",value:getStandardStream(a,n,s),optionName:s}}if(typeof n==="number"){return{type:"nodeStream",value:getStandardStream(n,n,s),optionName:s}}if(isStream(n,{checkOpen:false})){return{type:"nodeStream",value:n,optionName:s}}return r};const getStandardStream=(r,n,s)=>{const a=b[r];if(a===undefined){throw new TypeError(`The \`${s}: ${n}\` option is invalid: no such standard stream.`)}return a};const handleInputOptions=({input:r,inputFile:n},s)=>s===0?[...handleInputOption(r),...handleInputFileOption(n)]:[];const handleInputOption=r=>r===undefined?[]:[{type:getInputType(r),value:r,optionName:"input"}];const getInputType=r=>{if(isReadableStream(r,{checkOpen:false})){return"nodeStream"}if(typeof r==="string"){return"string"}if(isUint8Array(r)){return"uint8Array"}throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")};const handleInputFileOption=r=>r===undefined?[]:[{...getInputFileType(r),optionName:"inputFile"}];const getInputFileType=r=>{if(isUrl(r)){return{type:"fileUrl",value:r}}if(isFilePathString(r)){return{type:"filePath",value:{file:r}}}throw new Error("The `inputFile` option must be a file path string or a file URL.")};const filterDuplicates=r=>r.filter(((n,s)=>r.every(((r,a)=>n.value!==r.value||s>=a||n.type==="generator"||n.type==="asyncGenerator"))));const getDuplicateStream=({stdioItem:{type:r,value:n,optionName:s},direction:a,fileDescriptors:l,isSync:u})=>{const f=getOtherStdioItems(l,r);if(f.length===0){return}if(u){validateDuplicateStreamSync({otherStdioItems:f,type:r,value:n,optionName:s,direction:a});return}if(Nt.has(r)){return getDuplicateStreamInstance({otherStdioItems:f,type:r,value:n,optionName:s,direction:a})}if(Bt.has(r)){validateDuplicateTransform({otherStdioItems:f,type:r,value:n,optionName:s})}};const getOtherStdioItems=(r,n)=>r.flatMap((({direction:r,stdioItems:s})=>s.filter((r=>r.type===n)).map((n=>({...n,direction:r})))));const validateDuplicateStreamSync=({otherStdioItems:r,type:n,value:s,optionName:a,direction:l})=>{if(It.has(n)){getDuplicateStreamInstance({otherStdioItems:r,type:n,value:s,optionName:a,direction:l})}};const getDuplicateStreamInstance=({otherStdioItems:r,type:n,value:s,optionName:a,direction:l})=>{const u=r.filter((r=>hasSameValue(r,s)));if(u.length===0){return}const f=u.find((r=>r.direction!==l));throwOnDuplicateStream(f,a,n);return l==="output"?u[0].stream:undefined};const hasSameValue=({type:r,value:n},s)=>{if(r==="filePath"){return n.file===s.file}if(r==="fileUrl"){return n.href===s.href}return n===s};const validateDuplicateTransform=({otherStdioItems:r,type:n,value:s,optionName:a})=>{const l=r.find((({value:{transform:r}})=>r===s.transform));throwOnDuplicateStream(l,a,n)};const throwOnDuplicateStream=(r,n,s)=>{if(r!==undefined){throw new TypeError(`The \`${r.optionName}\` and \`${n}\` options must not target ${Dt[s]} that is the same.`)}};const handleStdio=(r,n,s,a)=>{const l=normalizeStdioOption(n,s,a);const u=l.map(((r,s)=>getFileDescriptor({stdioOption:r,fdNumber:s,options:n,isSync:a})));const f=getFinalFileDescriptors({initialFileDescriptors:u,addProperties:r,options:n,isSync:a});n.stdio=f.map((({stdioItems:r})=>forwardStdio(r)));return f};const getFileDescriptor=({stdioOption:r,fdNumber:n,options:s,isSync:a})=>{const l=getStreamName(n);const{stdioItems:u,isStdioArray:f}=initializeStdioItems({stdioOption:r,fdNumber:n,options:s,optionName:l});const d=getStreamDirection(u,n,l);const p=u.map((r=>handleNativeStream({stdioItem:r,isStdioArray:f,fdNumber:n,direction:d,isSync:a})));const m=normalizeTransforms(p,l,d,s);const g=getFdObjectMode(m,d);validateFileObjectMode(m,g);return{direction:d,objectMode:g,stdioItems:m}};const initializeStdioItems=({stdioOption:r,fdNumber:n,options:s,optionName:a})=>{const l=Array.isArray(r)?r:[r];const u=[...l.map((r=>initializeStdioItem(r,a))),...handleInputOptions(s,n)];const f=filterDuplicates(u);const d=f.length>1;validateStdioArray(f,d,a);validateStreams(f);return{stdioItems:f,isStdioArray:d}};const initializeStdioItem=(r,n)=>({type:getStdioItemType(r,n),value:r,optionName:n});const validateStdioArray=(r,n,s)=>{if(r.length===0){throw new TypeError(`The \`${s}\` option must not be an empty array.`)}if(!n){return}for(const{value:n,optionName:s}of r){if(Ft.has(n)){throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}}};const Ft=new Set(["ignore","ipc"]);const validateStreams=r=>{for(const n of r){validateFileStdio(n)}};const validateFileStdio=({type:r,value:n,optionName:s})=>{if(isRegularUrl(n)){throw new TypeError(`The \`${s}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`)}if(isUnknownStdioString(r,n)){throw new TypeError(`The \`${s}: { file: '...' }\` option must be used instead of \`${s}: '...'\`.`)}};const validateFileObjectMode=(r,n)=>{if(!n){return}const s=r.find((({type:r})=>Rt.has(r)));if(s!==undefined){throw new TypeError(`The \`${s.optionName}\` option cannot use both files and transforms in objectMode.`)}};const getFinalFileDescriptors=({initialFileDescriptors:r,addProperties:n,options:s,isSync:a})=>{const l=[];try{for(const u of r){l.push(getFinalFileDescriptor({fileDescriptor:u,fileDescriptors:l,addProperties:n,options:s,isSync:a}))}return l}catch(r){cleanupCustomStreams(l);throw r}};const getFinalFileDescriptor=({fileDescriptor:{direction:r,objectMode:n,stdioItems:s},fileDescriptors:a,addProperties:l,options:u,isSync:f})=>{const d=s.map((n=>addStreamProperties({stdioItem:n,addProperties:l,direction:r,options:u,fileDescriptors:a,isSync:f})));return{direction:r,objectMode:n,stdioItems:d}};const addStreamProperties=({stdioItem:r,addProperties:n,direction:s,options:a,fileDescriptors:l,isSync:u})=>{const f=getDuplicateStream({stdioItem:r,direction:s,fileDescriptors:l,isSync:u});if(f!==undefined){return{...r,stream:f}}return{...r,...n[s][r.type](r,a)}};const cleanupCustomStreams=r=>{for(const{stdioItems:n}of r){for(const{stream:r}of n){if(r!==undefined&&!isStandardStream(r)){r.destroy()}}}};const forwardStdio=r=>{if(r.length>1){return r.some((({value:r})=>r==="overlapped"))?"overlapped":"pipe"}const[{type:n,value:s}]=r;return n==="native"?s:"pipe"};const handleStdioSync=(r,n)=>handleStdio(Wt,r,n,true);const forbiddenIfSync=({type:r,optionName:n})=>{throwInvalidSyncValue(n,Dt[r])};const forbiddenNativeIfSync=({optionName:r,value:n})=>{if(n==="ipc"||n==="overlapped"){throwInvalidSyncValue(r,`"${n}"`)}return{}};const throwInvalidSyncValue=(r,n)=>{throw new TypeError(`The \`${r}\` option cannot be ${n} with synchronous methods.`)};const $t={generator(){},asyncGenerator:forbiddenIfSync,webStream:forbiddenIfSync,nodeStream:forbiddenIfSync,webTransform:forbiddenIfSync,duplex:forbiddenIfSync,asyncIterable:forbiddenIfSync,native:forbiddenNativeIfSync};const Wt={input:{...$t,fileUrl:({value:r})=>({contents:[bufferToUint8Array((0,ht.readFileSync)(r))]}),filePath:({value:{file:r}})=>({contents:[bufferToUint8Array((0,ht.readFileSync)(r))]}),fileNumber:forbiddenIfSync,iterable:({value:r})=>({contents:[...r]}),string:({value:r})=>({contents:[r]}),uint8Array:({value:r})=>({contents:[r]})},output:{...$t,fileUrl:({value:r})=>({path:r}),filePath:({value:{file:r,append:n}})=>({path:r,append:n}),fileNumber:({value:r})=>({path:r}),iterable:forbiddenIfSync,string:forbiddenIfSync,uint8Array:forbiddenIfSync}};const stripNewline=(r,{stripFinalNewline:n},s)=>getStripFinalNewline(n,s)&&r!==undefined&&!Array.isArray(r)?strip_final_newline_stripFinalNewline(r):r;const getStripFinalNewline=(r,n)=>n==="all"?r[1]||r[2]:r[n];const Ht=require("node:stream");const getSplitLinesGenerator=(r,n,s,a)=>r||s?undefined:initializeSplitLines(n,a);const splitLinesSync=(r,n,s)=>s?r.flatMap((r=>splitLinesItemSync(r,n))):splitLinesItemSync(r,n);const splitLinesItemSync=(r,n)=>{const{transform:s,final:a}=initializeSplitLines(n,{});return[...s(r),...a()]};const initializeSplitLines=(r,n)=>{n.previousChunks="";return{transform:splitGenerator.bind(undefined,n,r),final:linesFinal.bind(undefined,n)}};const splitGenerator=function*(r,n,s){if(typeof s!=="string"){yield s;return}let{previousChunks:a}=r;let l=-1;for(let u=0;u<s.length;u+=1){if(s[u]==="\n"){const f=getNewlineLength(s,u,n,r);let d=s.slice(l+1,u+1-f);if(a.length>0){d=concatString(a,d);a=""}yield d;l=u}}if(l!==s.length-1){a=concatString(a,s.slice(l+1))}r.previousChunks=a};const getNewlineLength=(r,n,s,a)=>{if(s){return 0}a.isWindowsNewline=n!==0&&r[n-1]==="\r";return a.isWindowsNewline?2:1};const linesFinal=function*({previousChunks:r}){if(r.length>0){yield r}};const getAppendNewlineGenerator=({binary:r,preserveNewlines:n,readableObjectMode:s,state:a})=>r||n||s?undefined:{transform:appendNewlineGenerator.bind(undefined,a)};const appendNewlineGenerator=function*({isWindowsNewline:r=false},n){const{unixNewline:s,windowsNewline:a,LF:l,concatBytes:u}=typeof n==="string"?jt:Ut;if(n.at(-1)===l){yield n;return}const f=r?a:s;yield u(n,f)};const concatString=(r,n)=>`${r}${n}`;const jt={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:concatString};const concatUint8Array=(r,n)=>{const s=new Uint8Array(r.length+n.length);s.set(r,0);s.set(n,r.length);return s};const Ut={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:concatUint8Array};var Gt=s(4573);const getValidateTransformInput=(r,n)=>r?undefined:validateStringTransformInput.bind(undefined,n);const validateStringTransformInput=function*(r,n){if(typeof n!=="string"&&!isUint8Array(n)&&!Gt.Buffer.isBuffer(n)){throw new TypeError(`The \`${r}\` option's transform must use "objectMode: true" to receive as input: ${typeof n}.`)}yield n};const getValidateTransformReturn=(r,n)=>r?validateObjectTransformReturn.bind(undefined,n):validateStringTransformReturn.bind(undefined,n);const validateObjectTransformReturn=function*(r,n){validateEmptyReturn(r,n);yield n};const validateStringTransformReturn=function*(r,n){validateEmptyReturn(r,n);if(typeof n!=="string"&&!isUint8Array(n)){throw new TypeError(`The \`${r}\` option's function must yield a string or an Uint8Array, not ${typeof n}.`)}yield n};const validateEmptyReturn=(r,n)=>{if(n===null||n===undefined){throw new TypeError(`The \`${r}\` option's function must not call \`yield ${n}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)}};const getEncodingTransformGenerator=(r,n,s)=>{if(s){return}if(r){return{transform:encodingUint8ArrayGenerator.bind(undefined,new TextEncoder)}}const a=new u.StringDecoder(n);return{transform:encodingStringGenerator.bind(undefined,a),final:encodingStringFinal.bind(undefined,a)}};const encodingUint8ArrayGenerator=function*(r,n){if(Gt.Buffer.isBuffer(n)){yield bufferToUint8Array(n)}else if(typeof n==="string"){yield r.encode(n)}else{yield n}};const encodingStringGenerator=function*(r,n){yield isUint8Array(n)?r.write(n):n};const encodingStringFinal=function*(r){const n=r.end();if(n!==""){yield n}};const zt=(0,y.callbackify)((async(r,n,s,a)=>{n.currentIterable=r(...s);try{for await(const r of n.currentIterable){a.push(r)}}finally{delete n.currentIterable}}));const transformChunk=async function*(r,n,s){if(s===n.length){yield r;return}const{transform:a=identityGenerator}=n[s];for await(const l of a(r)){yield*transformChunk(l,n,s+1)}};const finalChunks=async function*(r){for(const[n,{final:s}]of Object.entries(r)){yield*generatorFinalChunks(s,Number(n),r)}};const generatorFinalChunks=async function*(r,n,s){if(r===undefined){return}for await(const a of r()){yield*transformChunk(a,s,n+1)}};const Vt=(0,y.callbackify)((async({currentIterable:r},n)=>{if(r!==undefined){await(n?r.throw(n):r.return());return}if(n){throw n}}));const identityGenerator=function*(r){yield r};const pushChunksSync=(r,n,s,a)=>{try{for(const a of r(...n)){s.push(a)}a()}catch(r){a(r)}};const runTransformSync=(r,n)=>[...n.flatMap((n=>[...transformChunkSync(n,r,0)])),...finalChunksSync(r)];const transformChunkSync=function*(r,n,s){if(s===n.length){yield r;return}const{transform:a=run_sync_identityGenerator}=n[s];for(const l of a(r)){yield*transformChunkSync(l,n,s+1)}};const finalChunksSync=function*(r){for(const[n,{final:s}]of Object.entries(r)){yield*generatorFinalChunksSync(s,Number(n),r)}};const generatorFinalChunksSync=function*(r,n,s){if(r===undefined){return}for(const a of r()){yield*transformChunkSync(a,s,n+1)}};const run_sync_identityGenerator=function*(r){yield r};const generatorToStream=({value:r,value:{transform:n,final:s,writableObjectMode:a,readableObjectMode:l},optionName:u},{encoding:f})=>{const d={};const p=addInternalGenerators(r,f,u);const m=isAsyncGenerator(n);const g=isAsyncGenerator(s);const y=m?zt.bind(undefined,transformChunk,d):pushChunksSync.bind(undefined,transformChunkSync);const v=m||g?zt.bind(undefined,finalChunks,d):pushChunksSync.bind(undefined,finalChunksSync);const b=m||g?Vt.bind(undefined,d):undefined;const w=new Ht.Transform({writableObjectMode:a,writableHighWaterMark:(0,Ht.getDefaultHighWaterMark)(a),readableObjectMode:l,readableHighWaterMark:(0,Ht.getDefaultHighWaterMark)(l),transform(r,n,s){y([r,p,0],this,s)},flush(r){v([p],this,r)},destroy:b});return{stream:w}};const runGeneratorsSync=(r,n,s,a)=>{const l=n.filter((({type:r})=>r==="generator"));const u=a?l.reverse():l;for(const{value:n,optionName:a}of u){const l=addInternalGenerators(n,s,a);r=runTransformSync(l,r)}return r};const addInternalGenerators=({transform:r,final:n,binary:s,writableObjectMode:a,readableObjectMode:l,preserveNewlines:u},f,d)=>{const p={};return[{transform:getValidateTransformInput(a,d)},getEncodingTransformGenerator(s,f,a),getSplitLinesGenerator(s,u,a,p),{transform:r,final:n},{transform:getValidateTransformReturn(l,d)},getAppendNewlineGenerator({binary:s,preserveNewlines:u,readableObjectMode:l,state:p})].filter(Boolean)};const addInputOptionsSync=(r,n)=>{for(const s of getInputFdNumbers(r)){addInputOptionSync(r,s,n)}};const getInputFdNumbers=r=>new Set(Object.entries(r).filter((([,{direction:r}])=>r==="input")).map((([r])=>Number(r))));const addInputOptionSync=(r,n,s)=>{const{stdioItems:a}=r[n];const l=a.filter((({contents:r})=>r!==undefined));if(l.length===0){return}if(n!==0){const[{type:r,optionName:n}]=l;throw new TypeError(`Only the \`stdin\` option, not \`${n}\`, can be ${Dt[r]} with synchronous methods.`)}const u=l.map((({contents:r})=>r));const f=u.map((r=>applySingleInputGeneratorsSync(r,a)));s.input=joinToUint8Array(f)};const applySingleInputGeneratorsSync=(r,n)=>{const s=runGeneratorsSync(r,n,"utf8",true);validateSerializable(s);return joinToUint8Array(s)};const validateSerializable=r=>{const n=r.find((r=>typeof r!=="string"&&!isUint8Array(r)));if(n!==undefined){throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${n}.`)}};const shouldLogOutput=({stdioItems:r,encoding:n,verboseInfo:s,fdNumber:a})=>a!=="all"&&isFullVerbose(s,a)&&!ft.has(n)&&fdUsesVerbose(a)&&(r.some((({type:r,value:n})=>r==="native"&&Yt.has(n)))||r.every((({type:r})=>Tt.has(r))));const fdUsesVerbose=r=>r===1||r===2;const Yt=new Set(["pipe","overlapped"]);const logLines=async(r,n,s,a)=>{for await(const l of r){if(!isPipingStream(n)){logLine(l,s,a)}}};const logLinesSync=(r,n,s)=>{for(const a of r){logLine(a,n,s)}};const isPipingStream=r=>r._readableState.pipes.length>0;const logLine=(r,n,s)=>{const a=serializeVerboseMessage(r);verboseLog({type:"output",verboseMessage:a,fdNumber:n,verboseInfo:s})};const transformOutputSync=({fileDescriptors:r,syncResult:{output:n},options:s,isMaxBuffer:a,verboseInfo:l})=>{if(n===null){return{output:Array.from({length:3})}}const u={};const f=new Set([]);const d=n.map(((n,d)=>transformOutputResultSync({result:n,fileDescriptors:r,fdNumber:d,state:u,outputFiles:f,isMaxBuffer:a,verboseInfo:l},s)));return{output:d,...u}};const transformOutputResultSync=({result:r,fileDescriptors:n,fdNumber:s,state:a,outputFiles:l,isMaxBuffer:u,verboseInfo:f},{buffer:d,encoding:p,lines:m,stripFinalNewline:g,maxBuffer:y})=>{if(r===null){return}const v=truncateMaxBufferSync(r,u,y);const b=bufferToUint8Array(v);const{stdioItems:w,objectMode:_}=n[s];const S=runOutputGeneratorsSync([b],w,p,a);const{serializedResult:E,finalResult:x=E}=serializeChunks({chunks:S,objectMode:_,encoding:p,lines:m,stripFinalNewline:g,fdNumber:s});logOutputSync({serializedResult:E,fdNumber:s,state:a,verboseInfo:f,encoding:p,stdioItems:w,objectMode:_});const A=d[s]?x:undefined;try{if(a.error===undefined){writeToFiles(E,w,l)}return A}catch(r){a.error=r;return A}};const runOutputGeneratorsSync=(r,n,s,a)=>{try{return runGeneratorsSync(r,n,s,false)}catch(n){a.error=n;return r}};const serializeChunks=({chunks:r,objectMode:n,encoding:s,lines:a,stripFinalNewline:l,fdNumber:u})=>{if(n){return{serializedResult:r}}if(s==="buffer"){return{serializedResult:joinToUint8Array(r)}}const f=joinToString(r,s);if(a[u]){return{serializedResult:f,finalResult:splitLinesSync(f,!l[u],n)}}return{serializedResult:f}};const logOutputSync=({serializedResult:r,fdNumber:n,state:s,verboseInfo:a,encoding:l,stdioItems:u,objectMode:f})=>{if(!shouldLogOutput({stdioItems:u,encoding:l,verboseInfo:a,fdNumber:n})){return}const d=splitLinesSync(r,false,f);try{logLinesSync(d,n,a)}catch(r){s.error??=r}};const writeToFiles=(r,n,s)=>{for(const{path:a,append:l}of n.filter((({type:r})=>Rt.has(r)))){const n=typeof a==="string"?a:a.toString();if(l||s.has(n)){(0,ht.appendFileSync)(a,r)}else{s.add(n);(0,ht.writeFileSync)(a,r)}}};const getAllSync=([,r,n],s)=>{if(!s.all){return}if(r===undefined){return n}if(n===undefined){return r}if(Array.isArray(r)){return Array.isArray(n)?[...r,...n]:[...r,stripNewline(n,s,"all")]}if(Array.isArray(n)){return[stripNewline(r,s,"all"),...n]}if(isUint8Array(r)&&isUint8Array(n)){return concatUint8Arrays([r,n])}return`${r}${n}`};const waitForExit=async(r,n)=>{const[s,a]=await waitForExitOrError(r);n.isForcefullyTerminated??=false;return[s,a]};const waitForExitOrError=async r=>{const[n,s]=await Promise.allSettled([(0,Ye.once)(r,"spawn"),(0,Ye.once)(r,"exit")]);if(n.status==="rejected"){return[]}return s.status==="rejected"?waitForSubprocessExit(r):s.value};const waitForSubprocessExit=async r=>{try{return await(0,Ye.once)(r,"exit")}catch{return waitForSubprocessExit(r)}};const waitForSuccessfulExit=async r=>{const[n,s]=await r;if(!isSubprocessErrorExit(n,s)&&isFailedExit(n,s)){throw new DiscardedError}return[n,s]};const isSubprocessErrorExit=(r,n)=>r===undefined&&n===undefined;const isFailedExit=(r,n)=>r!==0||n!==null;const getExitResultSync=({error:r,status:n,signal:s,output:a},{maxBuffer:l})=>{const u=getResultError(r,n,s);const f=u?.code==="ETIMEDOUT";const d=isMaxBufferSync(u,a,l);return{resultError:u,exitCode:n,signal:s,timedOut:f,isMaxBuffer:d}};const getResultError=(r,n,s)=>{if(r!==undefined){return r}return isFailedExit(n,s)?new DiscardedError:undefined};const execaCoreSync=(r,n,s)=>{const{file:a,commandArguments:l,command:u,escapedCommand:f,startTime:d,verboseInfo:p,options:m,fileDescriptors:g}=handleSyncArguments(r,n,s);const y=spawnSubprocessSync({file:a,commandArguments:l,options:m,command:u,escapedCommand:f,verboseInfo:p,fileDescriptors:g,startTime:d});return handleResult(y,p,m)};const handleSyncArguments=(r,n,s)=>{const{command:a,escapedCommand:l,startTime:u,verboseInfo:f}=handleCommand(r,n,s);const d=normalizeSyncOptions(s);const{file:p,commandArguments:m,options:g}=normalizeOptions(r,n,d);validateSyncOptions(g);const y=handleStdioSync(g,f);return{file:p,commandArguments:m,command:a,escapedCommand:l,startTime:u,verboseInfo:f,options:g,fileDescriptors:y}};const normalizeSyncOptions=r=>r.node&&!r.ipc?{...r,ipc:false}:r;const validateSyncOptions=({ipc:r,ipcInput:n,detached:s,cancelSignal:a})=>{if(n){throwInvalidSyncOption("ipcInput")}if(r){throwInvalidSyncOption("ipc: true")}if(s){throwInvalidSyncOption("detached: true")}if(a){throwInvalidSyncOption("cancelSignal")}};const throwInvalidSyncOption=r=>{throw new TypeError(`The "${r}" option cannot be used with synchronous methods.`)};const spawnSubprocessSync=({file:r,commandArguments:n,options:s,command:a,escapedCommand:l,verboseInfo:u,fileDescriptors:f,startTime:d})=>{const p=runSubprocessSync({file:r,commandArguments:n,options:s,command:a,escapedCommand:l,fileDescriptors:f,startTime:d});if(p.failed){return p}const{resultError:m,exitCode:g,signal:y,timedOut:v,isMaxBuffer:b}=getExitResultSync(p,s);const{output:w,error:_=m}=transformOutputSync({fileDescriptors:f,syncResult:p,options:s,isMaxBuffer:b,verboseInfo:u});const S=w.map(((r,n)=>stripNewline(r,s,n)));const E=stripNewline(getAllSync(w,s),s,"all");return getSyncResult({error:_,exitCode:g,signal:y,timedOut:v,isMaxBuffer:b,stdio:S,all:E,options:s,command:a,escapedCommand:l,startTime:d})};const runSubprocessSync=({file:r,commandArguments:n,options:s,command:a,escapedCommand:u,fileDescriptors:f,startTime:d})=>{try{addInputOptionsSync(f,s);const a=normalizeSpawnSyncOptions(s);return(0,l.spawnSync)(r,n,a)}catch(r){return makeEarlyError({error:r,command:a,escapedCommand:u,fileDescriptors:f,options:s,startTime:d,isSync:true})}};const normalizeSpawnSyncOptions=({encoding:r,maxBuffer:n,...s})=>({...s,encoding:"buffer",maxBuffer:getMaxBufferSync(n)});const getSyncResult=({error:r,exitCode:n,signal:s,timedOut:a,isMaxBuffer:l,stdio:u,all:f,options:d,command:p,escapedCommand:m,startTime:g})=>r===undefined?makeSuccessResult({command:p,escapedCommand:m,stdio:u,all:f,ipcOutput:[],options:d,startTime:g}):makeError({error:r,command:p,escapedCommand:m,timedOut:a,isCanceled:false,isGracefullyCanceled:false,isMaxBuffer:l,isForcefullyTerminated:false,exitCode:n,signal:s,stdio:u,all:f,ipcOutput:[],options:d,startTime:g,isSync:true});const getOneMessage=({anyProcess:r,channel:n,isSubprocess:s,ipc:a},{reference:l=true,filter:u}={})=>{validateIpcMethod({methodName:"getOneMessage",isSubprocess:s,ipc:a,isConnected:isConnected(r)});return getOneMessageAsync({anyProcess:r,channel:n,isSubprocess:s,filter:u,reference:l})};const getOneMessageAsync=async({anyProcess:r,channel:n,isSubprocess:s,filter:a,reference:l})=>{addReference(n,l);const u=getIpcEmitter(r,n,s);const f=new AbortController;try{return await Promise.race([getMessage(u,a,f),get_one_throwOnDisconnect(u,s,f),throwOnStrictError(u,s,f)])}catch(n){disconnect(r);throw n}finally{f.abort();removeReference(n,l)}};const getMessage=async(r,n,{signal:s})=>{if(n===undefined){const[n]=await(0,Ye.once)(r,"message",{signal:s});return n}for await(const[a]of(0,Ye.on)(r,"message",{signal:s})){if(n(a)){return a}}};const get_one_throwOnDisconnect=async(r,n,{signal:s})=>{await(0,Ye.once)(r,"disconnect",{signal:s});throwOnEarlyDisconnect(n)};const throwOnStrictError=async(r,n,{signal:s})=>{const[a]=await(0,Ye.once)(r,"strict:error",{signal:s});throw getStrictResponseError(a,n)};const getEachMessage=({anyProcess:r,channel:n,isSubprocess:s,ipc:a},{reference:l=true}={})=>loopOnMessages({anyProcess:r,channel:n,isSubprocess:s,ipc:a,shouldAwait:!s,reference:l});const loopOnMessages=({anyProcess:r,channel:n,isSubprocess:s,ipc:a,shouldAwait:l,reference:u})=>{validateIpcMethod({methodName:"getEachMessage",isSubprocess:s,ipc:a,isConnected:isConnected(r)});addReference(n,u);const f=getIpcEmitter(r,n,s);const d=new AbortController;const p={};stopOnDisconnect(r,f,d);abortOnStrictError({ipcEmitter:f,isSubprocess:s,controller:d,state:p});return iterateOnMessages({anyProcess:r,channel:n,ipcEmitter:f,isSubprocess:s,shouldAwait:l,controller:d,state:p,reference:u})};const stopOnDisconnect=async(r,n,s)=>{try{await(0,Ye.once)(n,"disconnect",{signal:s.signal});s.abort()}catch{}};const abortOnStrictError=async({ipcEmitter:r,isSubprocess:n,controller:s,state:a})=>{try{const[l]=await(0,Ye.once)(r,"strict:error",{signal:s.signal});a.error=getStrictResponseError(l,n);s.abort()}catch{}};const iterateOnMessages=async function*({anyProcess:r,channel:n,ipcEmitter:s,isSubprocess:a,shouldAwait:l,controller:u,state:f,reference:d}){try{for await(const[r]of(0,Ye.on)(s,"message",{signal:u.signal})){throwIfStrictError(f);yield r}}catch{throwIfStrictError(f)}finally{u.abort();removeReference(n,d);if(!a){disconnect(r)}if(l){await r}}};const throwIfStrictError=({error:r})=>{if(r){throw r}};const addIpcMethods=(r,{ipc:n})=>{Object.assign(r,getIpcMethods(r,false,n))};const getIpcExport=()=>{const r=v;const n=true;const s=v.channel!==undefined;return{...getIpcMethods(r,n,s),getCancelSignal:getCancelSignal.bind(undefined,{anyProcess:r,channel:r.channel,isSubprocess:n,ipc:s})}};const getIpcMethods=(r,n,s)=>({sendMessage:sendMessage.bind(undefined,{anyProcess:r,channel:r.channel,isSubprocess:n,ipc:s}),getOneMessage:getOneMessage.bind(undefined,{anyProcess:r,channel:r.channel,isSubprocess:n,ipc:s}),getEachMessage:getEachMessage.bind(undefined,{anyProcess:r,channel:r.channel,isSubprocess:n,ipc:s})});const handleEarlyError=({error:r,command:n,escapedCommand:s,fileDescriptors:a,options:u,startTime:f,verboseInfo:d})=>{cleanupCustomStreams(a);const p=new l.ChildProcess;createDummyStreams(p,a);Object.assign(p,{readable:readable,writable:writable,duplex:duplex});const m=makeEarlyError({error:r,command:n,escapedCommand:s,fileDescriptors:a,options:u,startTime:f,isSync:false});const g=handleDummyPromise(m,d,u);return{subprocess:p,promise:g}};const createDummyStreams=(r,n)=>{const s=createDummyStream();const a=createDummyStream();const l=createDummyStream();const u=Array.from({length:n.length-3},createDummyStream);const f=createDummyStream();const d=[s,a,l,...u];Object.assign(r,{stdin:s,stdout:a,stderr:l,all:f,stdio:d})};const createDummyStream=()=>{const r=new Ht.PassThrough;r.end();return r};const readable=()=>new Ht.Readable({read(){}});const writable=()=>new Ht.Writable({write(){}});const duplex=()=>new Ht.Duplex({read(){},write(){}});const handleDummyPromise=async(r,n,s)=>handleResult(r,n,s);const handleStdioAsync=(r,n)=>handleStdio(qt,r,n,false);const forbiddenIfAsync=({type:r,optionName:n})=>{throw new TypeError(`The \`${n}\` option cannot be ${Dt[r]}.`)};const Kt={fileNumber:forbiddenIfAsync,generator:generatorToStream,asyncGenerator:generatorToStream,nodeStream:({value:r})=>({stream:r}),webTransform({value:{transform:r,writableObjectMode:n,readableObjectMode:s}}){const a=n||s;const l=Ht.Duplex.fromWeb(r,{objectMode:a});return{stream:l}},duplex:({value:{transform:r}})=>({stream:r}),native(){}};const qt={input:{...Kt,fileUrl:({value:r})=>({stream:(0,ht.createReadStream)(r)}),filePath:({value:{file:r}})=>({stream:(0,ht.createReadStream)(r)}),webStream:({value:r})=>({stream:Ht.Readable.fromWeb(r)}),iterable:({value:r})=>({stream:Ht.Readable.from(r)}),asyncIterable:({value:r})=>({stream:Ht.Readable.from(r)}),string:({value:r})=>({stream:Ht.Readable.from(r)}),uint8Array:({value:r})=>({stream:Ht.Readable.from(Gt.Buffer.from(r))})},output:{...Kt,fileUrl:({value:r})=>({stream:(0,ht.createWriteStream)(r)}),filePath:({value:{file:r,append:n}})=>({stream:(0,ht.createWriteStream)(r,n?{flags:"a"}:{})}),webStream:({value:r})=>({stream:Ht.Writable.fromWeb(r)}),iterable:forbiddenIfAsync,asyncIterable:forbiddenIfAsync,string:forbiddenIfAsync,uint8Array:forbiddenIfAsync}};const Xt=require("node:stream/promises");function mergeStreams(r){if(!Array.isArray(r)){throw new TypeError(`Expected an array, got \`${typeof r}\`.`)}for(const n of r){validateStream(n)}const n=r.some((({readableObjectMode:r})=>r));const s=getHighWaterMark(r,n);const a=new MergedStream({objectMode:n,writableHighWaterMark:s,readableHighWaterMark:s});for(const n of r){a.add(n)}return a}const getHighWaterMark=(r,n)=>{if(r.length===0){return(0,Ht.getDefaultHighWaterMark)(n)}const s=r.filter((({readableObjectMode:r})=>r===n)).map((({readableHighWaterMark:r})=>r));return Math.max(...s)};class MergedStream extends Ht.PassThrough{#o=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#f=new WeakMap;add(r){validateStream(r);if(this.#o.has(r)){return}this.#o.add(r);this.#l??=onMergedStreamFinished(this,this.#o,this.#u);const n=endWhenStreamsDone({passThroughStream:this,stream:r,streams:this.#o,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#f.set(r,n);r.pipe(this,{end:false})}async remove(r){validateStream(r);if(!this.#o.has(r)){return false}const n=this.#f.get(r);if(n===undefined){return false}this.#f.delete(r);r.unpipe(this);await n;return true}}const onMergedStreamFinished=async(r,n,s)=>{updateMaxListeners(r,Qt);const a=new AbortController;try{await Promise.race([onMergedStreamEnd(r,a),onInputStreamsUnpipe(r,n,s,a)])}finally{a.abort();updateMaxListeners(r,-Qt)}};const onMergedStreamEnd=async(r,{signal:n})=>{try{await(0,Xt.finished)(r,{signal:n,cleanup:true})}catch(n){errorOrAbortStream(r,n);throw n}};const onInputStreamsUnpipe=async(r,n,s,{signal:a})=>{for await(const[l]of(0,Ye.on)(r,"unpipe",{signal:a})){if(n.has(l)){l.emit(s)}}};const validateStream=r=>{if(typeof r?.pipe!=="function"){throw new TypeError(`Expected a readable stream, got: \`${typeof r}\`.`)}};const endWhenStreamsDone=async({passThroughStream:r,stream:n,streams:s,ended:a,aborted:l,onFinished:u,unpipeEvent:f})=>{updateMaxListeners(r,Zt);const d=new AbortController;try{await Promise.race([afterMergedStreamFinished(u,n,d),onInputStreamEnd({passThroughStream:r,stream:n,streams:s,ended:a,aborted:l,controller:d}),onInputStreamUnpipe({stream:n,streams:s,ended:a,aborted:l,unpipeEvent:f,controller:d})])}finally{d.abort();updateMaxListeners(r,-Zt)}if(s.size>0&&s.size===a.size+l.size){if(a.size===0&&l.size>0){abortStream(r)}else{endStream(r)}}};const afterMergedStreamFinished=async(r,n,{signal:s})=>{try{await r;if(!s.aborted){abortStream(n)}}catch(r){if(!s.aborted){errorOrAbortStream(n,r)}}};const onInputStreamEnd=async({passThroughStream:r,stream:n,streams:s,ended:a,aborted:l,controller:{signal:u}})=>{try{await(0,Xt.finished)(n,{signal:u,cleanup:true,readable:true,writable:false});if(s.has(n)){a.add(n)}}catch(a){if(u.aborted||!s.has(n)){return}if(isAbortError(a)){l.add(n)}else{errorStream(r,a)}}};const onInputStreamUnpipe=async({stream:r,streams:n,ended:s,aborted:a,unpipeEvent:l,controller:{signal:u}})=>{await(0,Ye.once)(r,l,{signal:u});if(!r.readable){return(0,Ye.once)(u,"abort",{signal:u})}n.delete(r);s.delete(r);a.delete(r)};const endStream=r=>{if(r.writable){r.end()}};const errorOrAbortStream=(r,n)=>{if(isAbortError(n)){abortStream(r)}else{errorStream(r,n)}};const isAbortError=r=>r?.code==="ERR_STREAM_PREMATURE_CLOSE";const abortStream=r=>{if(r.readable||r.writable){r.destroy()}};const errorStream=(r,n)=>{if(!r.destroyed){r.once("error",noop);r.destroy(n)}};const noop=()=>{};const updateMaxListeners=(r,n)=>{const s=r.getMaxListeners();if(s!==0&&s!==Number.POSITIVE_INFINITY){r.setMaxListeners(s+n)}};const Qt=2;const Zt=1;const pipeStreams=(r,n)=>{r.pipe(n);onSourceFinish(r,n);onDestinationFinish(r,n)};const onSourceFinish=async(r,n)=>{if(isStandardStream(r)||isStandardStream(n)){return}try{await(0,Xt.finished)(r,{cleanup:true,readable:true,writable:false})}catch{}endDestinationStream(n)};const endDestinationStream=r=>{if(r.writable){r.end()}};const onDestinationFinish=async(r,n)=>{if(isStandardStream(r)||isStandardStream(n)){return}try{await(0,Xt.finished)(n,{cleanup:true,readable:false,writable:true})}catch{}abortSourceStream(r)};const abortSourceStream=r=>{if(r.readable){r.destroy()}};const pipeOutputAsync=(r,n,s)=>{const a=new Map;for(const[l,{stdioItems:u,direction:f}]of Object.entries(n)){for(const{stream:n}of u.filter((({type:r})=>Tt.has(r)))){pipeTransform(r,n,f,l)}for(const{stream:n}of u.filter((({type:r})=>!Tt.has(r)))){pipeStdioItem({subprocess:r,stream:n,direction:f,fdNumber:l,pipeGroups:a,controller:s})}}for(const[r,n]of a.entries()){const s=n.length===1?n[0]:mergeStreams(n);pipeStreams(s,r)}};const pipeTransform=(r,n,s,a)=>{if(s==="output"){pipeStreams(r.stdio[a],n)}else{pipeStreams(n,r.stdio[a])}const l=Jt[a];if(l!==undefined){r[l]=n}r.stdio[a]=n};const Jt=["stdin","stdout","stderr"];const pipeStdioItem=({subprocess:r,stream:n,direction:s,fdNumber:a,pipeGroups:l,controller:u})=>{if(n===undefined){return}setStandardStreamMaxListeners(n,u);const[f,d]=s==="output"?[n,r.stdio[a]]:[r.stdio[a],n];const p=l.get(f)??[];l.set(f,[...p,d])};const setStandardStreamMaxListeners=(r,{signal:n})=>{if(isStandardStream(r)){incrementMaxListeners(r,er,n)}};const er=2;const tr=[];tr.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32"){tr.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){tr.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")}const processOk=r=>!!r&&typeof r==="object"&&typeof r.removeListener==="function"&&typeof r.emit==="function"&&typeof r.reallyExit==="function"&&typeof r.listeners==="function"&&typeof r.kill==="function"&&typeof r.pid==="number"&&typeof r.on==="function";const rr=Symbol.for("signal-exit emitter");const nr=globalThis;const sr=Object.defineProperty.bind(Object);class Emitter{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(nr[rr]){return nr[rr]}sr(nr,rr,{value:this,writable:false,enumerable:false,configurable:false})}on(r,n){this.listeners[r].push(n)}removeListener(r,n){const s=this.listeners[r];const a=s.indexOf(n);if(a===-1){return}if(a===0&&s.length===1){s.length=0}else{s.splice(a,1)}}emit(r,n,s){if(this.emitted[r]){return false}this.emitted[r]=true;let a=false;for(const l of this.listeners[r]){a=l(n,s)===true||a}if(r==="exit"){a=this.emit("afterExit",n,s)||a}return a}}class SignalExitBase{}const signalExitWrap=r=>({onExit(n,s){return r.onExit(n,s)},load(){return r.load()},unload(){return r.unload()}});class SignalExitFallback extends SignalExitBase{onExit(){return()=>{}}load(){}unload(){}}class SignalExit extends SignalExitBase{#d=ir.platform==="win32"?"SIGINT":"SIGHUP";#p=new Emitter;#h;#m;#g;#y={};#v=false;constructor(r){super();this.#h=r;this.#y={};for(const n of tr){this.#y[n]=()=>{const s=this.#h.listeners(n);let{count:a}=this.#p;const l=r;if(typeof l.__signal_exit_emitter__==="object"&&typeof l.__signal_exit_emitter__.count==="number"){a+=l.__signal_exit_emitter__.count}if(s.length===a){this.unload();const s=this.#p.emit("exit",null,n);const a=n==="SIGHUP"?this.#d:n;if(!s)r.kill(r.pid,a)}}}this.#g=r.reallyExit;this.#m=r.emit}onExit(r,n){if(!processOk(this.#h)){return()=>{}}if(this.#v===false){this.load()}const s=n?.alwaysLast?"afterExit":"exit";this.#p.on(s,r);return()=>{this.#p.removeListener(s,r);if(this.#p.listeners["exit"].length===0&&this.#p.listeners["afterExit"].length===0){this.unload()}}}load(){if(this.#v){return}this.#v=true;this.#p.count+=1;for(const r of tr){try{const n=this.#y[r];if(n)this.#h.on(r,n)}catch(r){}}this.#h.emit=(r,...n)=>this.#b(r,...n);this.#h.reallyExit=r=>this.#w(r)}unload(){if(!this.#v){return}this.#v=false;tr.forEach((r=>{const n=this.#y[r];if(!n){throw new Error("Listener not defined for signal: "+r)}try{this.#h.removeListener(r,n)}catch(r){}}));this.#h.emit=this.#m;this.#h.reallyExit=this.#g;this.#p.count-=1}#w(r){if(!processOk(this.#h)){return 0}this.#h.exitCode=r||0;this.#p.emit("exit",this.#h.exitCode,null);return this.#g.call(this.#h,this.#h.exitCode)}#b(r,...n){const s=this.#m;if(r==="exit"&&processOk(this.#h)){if(typeof n[0]==="number"){this.#h.exitCode=n[0]}const a=s.call(this.#h,r,...n);this.#p.emit("exit",this.#h.exitCode,null);return a}else{return s.call(this.#h,r,...n)}}}const ir=globalThis.process;const{onExit:or,load:ar,unload:cr}=signalExitWrap(processOk(ir)?new SignalExit(ir):new SignalExitFallback);const cleanupOnExit=(r,{cleanup:n,detached:s},{signal:a})=>{if(!n||s){return}const l=or((()=>{r.kill()}));(0,Ye.addAbortListener)(a,(()=>{l()}))};const normalizePipeArguments=({source:r,sourcePromise:n,boundOptions:s,createNested:a},...l)=>{const u=getStartTime();const{destination:f,destinationStream:d,destinationError:p,from:m,unpipeSignal:g}=getDestinationStream(s,a,l);const{sourceStream:y,sourceError:v}=getSourceStream(r,m);const{options:b,fileDescriptors:w}=Xe.get(r);return{sourcePromise:n,sourceStream:y,sourceOptions:b,sourceError:v,destination:f,destinationStream:d,destinationError:p,unpipeSignal:g,fileDescriptors:w,startTime:u}};const getDestinationStream=(r,n,s)=>{try{const{destination:a,pipeOptions:{from:l,to:u,unpipeSignal:f}={}}=getDestination(r,n,...s);const d=getToStream(a,u);return{destination:a,destinationStream:d,from:l,unpipeSignal:f}}catch(r){return{destinationError:r}}};const getDestination=(r,n,s,...a)=>{if(Array.isArray(s)){const l=n(mapDestinationArguments,r)(s,...a);return{destination:l,pipeOptions:r}}if(typeof s==="string"||s instanceof URL||isDenoExecPath(s)){if(Object.keys(r).length>0){throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).')}const[l,u,f]=normalizeParameters(s,...a);const d=n(mapDestinationArguments)(l,u,f);return{destination:d,pipeOptions:f}}if(Xe.has(s)){if(Object.keys(r).length>0){throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).")}return{destination:s,pipeOptions:a[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${s}`)};const mapDestinationArguments=({options:r})=>({options:{...r,stdin:"pipe",piped:true}});const getSourceStream=(r,n)=>{try{const s=getFromStream(r,n);return{sourceStream:s}}catch(r){return{sourceError:r}}};const handlePipeArgumentsError=({sourceStream:r,sourceError:n,destinationStream:s,destinationError:a,fileDescriptors:l,sourceOptions:u,startTime:f})=>{const d=getPipeArgumentsError({sourceStream:r,sourceError:n,destinationStream:s,destinationError:a});if(d!==undefined){throw createNonCommandError({error:d,fileDescriptors:l,sourceOptions:u,startTime:f})}};const getPipeArgumentsError=({sourceStream:r,sourceError:n,destinationStream:s,destinationError:a})=>{if(n!==undefined&&a!==undefined){return a}if(a!==undefined){abortSourceStream(r);return a}if(n!==undefined){endDestinationStream(s);return n}};const createNonCommandError=({error:r,fileDescriptors:n,sourceOptions:s,startTime:a})=>makeEarlyError({error:r,command:lr,escapedCommand:lr,fileDescriptors:n,options:s,startTime:a,isSync:false});const lr="source.pipe(destination)";const waitForBothSubprocesses=async r=>{const[{status:n,reason:s,value:a=s},{status:l,reason:u,value:f=u}]=await r;if(!f.pipedFrom.includes(a)){f.pipedFrom.push(a)}if(l==="rejected"){throw f}if(n==="rejected"){throw a}return f};const pipeSubprocessStream=(r,n,s)=>{const a=ur.has(n)?pipeMoreSubprocessStream(r,n):pipeFirstSubprocessStream(r,n);incrementMaxListeners(r,fr,s.signal);incrementMaxListeners(n,dr,s.signal);cleanupMergedStreamsMap(n);return a};const pipeFirstSubprocessStream=(r,n)=>{const s=mergeStreams([r]);pipeStreams(s,n);ur.set(n,s);return s};const pipeMoreSubprocessStream=(r,n)=>{const s=ur.get(n);s.add(r);return s};const cleanupMergedStreamsMap=async r=>{try{await(0,Xt.finished)(r,{cleanup:true,readable:false,writable:true})}catch{}ur.delete(r)};const ur=new WeakMap;const fr=2;const dr=1;const unpipeOnAbort=(r,n)=>r===undefined?[]:[unpipeOnSignalAbort(r,n)];const unpipeOnSignalAbort=async(r,{sourceStream:n,mergedStream:s,fileDescriptors:a,sourceOptions:l,startTime:u})=>{await(0,y.aborted)(r,n);await s.remove(n);const f=new Error("Pipe canceled by `unpipeSignal` option.");throw createNonCommandError({error:f,fileDescriptors:a,sourceOptions:l,startTime:u})};const pipeToSubprocess=(r,...n)=>{if(isPlainObject(n[0])){return pipeToSubprocess.bind(undefined,{...r,boundOptions:{...r.boundOptions,...n[0]}})}const{destination:s,...a}=normalizePipeArguments(r,...n);const l=handlePipePromise({...a,destination:s});l.pipe=pipeToSubprocess.bind(undefined,{...r,source:s,sourcePromise:l,boundOptions:{}});return l};const handlePipePromise=async({sourcePromise:r,sourceStream:n,sourceOptions:s,sourceError:a,destination:l,destinationStream:u,destinationError:f,unpipeSignal:d,fileDescriptors:p,startTime:m})=>{const g=getSubprocessPromises(r,l);handlePipeArgumentsError({sourceStream:n,sourceError:a,destinationStream:u,destinationError:f,fileDescriptors:p,sourceOptions:s,startTime:m});const y=new AbortController;try{const r=pipeSubprocessStream(n,u,y);return await Promise.race([waitForBothSubprocesses(g),...unpipeOnAbort(d,{sourceStream:n,mergedStream:r,sourceOptions:s,fileDescriptors:p,startTime:m})])}finally{y.abort()}};const getSubprocessPromises=(r,n)=>Promise.allSettled([r,n]);const utils_identity=r=>r;const utils_noop=()=>undefined;const getContentsProperty=({contents:r})=>r;const throwObjectStream=r=>{throw new Error(`Streams in object mode are not supported: ${String(r)}`)};const getLengthProperty=r=>r.length;async function getStreamAsArray(r,n){return getStreamContents(r,pr,n)}const initArray=()=>({contents:[]});const increment=()=>1;const addArrayChunk=(r,{contents:n})=>{n.push(r);return n};const pr={init:initArray,convertChunk:{string:utils_identity,buffer:utils_identity,arrayBuffer:utils_identity,dataView:utils_identity,typedArray:utils_identity,others:utils_identity},getSize:increment,truncateChunk:utils_noop,addChunk:addArrayChunk,getFinalChunk:utils_noop,finalize:getContentsProperty};async function getStreamAsArrayBuffer(r,n){return getStreamContents(r,gr,n)}const initArrayBuffer=()=>({contents:new ArrayBuffer(0)});const useTextEncoder=r=>hr.encode(r);const hr=new TextEncoder;const useUint8Array=r=>new Uint8Array(r);const useUint8ArrayWithOffset=r=>new Uint8Array(r.buffer,r.byteOffset,r.byteLength);const truncateArrayBufferChunk=(r,n)=>r.slice(0,n);const addArrayBufferChunk=(r,{contents:n,length:s},a)=>{const l=hasArrayBufferResize()?resizeArrayBuffer(n,a):resizeArrayBufferSlow(n,a);new Uint8Array(l).set(r,s);return l};const resizeArrayBufferSlow=(r,n)=>{if(n<=r.byteLength){return r}const s=new ArrayBuffer(getNewContentsLength(n));new Uint8Array(s).set(new Uint8Array(r),0);return s};const resizeArrayBuffer=(r,n)=>{if(n<=r.maxByteLength){r.resize(n);return r}const s=new ArrayBuffer(n,{maxByteLength:getNewContentsLength(n)});new Uint8Array(s).set(new Uint8Array(r),0);return s};const getNewContentsLength=r=>mr**Math.ceil(Math.log(r)/Math.log(mr));const mr=2;const finalizeArrayBuffer=({contents:r,length:n})=>hasArrayBufferResize()?r:r.slice(0,n);const hasArrayBufferResize=()=>"resize"in ArrayBuffer.prototype;const gr={init:initArrayBuffer,convertChunk:{string:useTextEncoder,buffer:useUint8Array,arrayBuffer:useUint8Array,dataView:useUint8ArrayWithOffset,typedArray:useUint8ArrayWithOffset,others:throwObjectStream},getSize:getLengthProperty,truncateChunk:truncateArrayBufferChunk,addChunk:addArrayBufferChunk,getFinalChunk:utils_noop,finalize:finalizeArrayBuffer};async function getStreamAsString(r,n){return getStreamContents(r,yr,n)}const initString=()=>({contents:"",textDecoder:new TextDecoder});const useTextDecoder=(r,{textDecoder:n})=>n.decode(r,{stream:true});const addStringChunk=(r,{contents:n})=>n+r;const truncateStringChunk=(r,n)=>r.slice(0,n);const getFinalStringChunk=({textDecoder:r})=>{const n=r.decode();return n===""?undefined:n};const yr={init:initString,convertChunk:{string:utils_identity,buffer:useTextDecoder,arrayBuffer:useTextDecoder,dataView:useTextDecoder,typedArray:useTextDecoder,others:throwObjectStream},getSize:getLengthProperty,truncateChunk:truncateStringChunk,addChunk:addStringChunk,getFinalChunk:getFinalStringChunk,finalize:getContentsProperty};const iterateOnSubprocessStream=({subprocessStdout:r,subprocess:n,binary:s,shouldEncode:a,encoding:l,preserveNewlines:u})=>{const f=new AbortController;stopReadingOnExit(n,f);return iterateOnStream({stream:r,controller:f,binary:s,shouldEncode:!r.readableObjectMode&&a,encoding:l,shouldSplit:!r.readableObjectMode,preserveNewlines:u})};const stopReadingOnExit=async(r,n)=>{try{await r}catch{}finally{n.abort()}};const iterateForResult=({stream:r,onStreamEnd:n,lines:s,encoding:a,stripFinalNewline:l,allMixed:u})=>{const f=new AbortController;stopReadingOnStreamEnd(n,f,r);const d=r.readableObjectMode&&!u;return iterateOnStream({stream:r,controller:f,binary:a==="buffer",shouldEncode:!d,encoding:a,shouldSplit:!d&&s,preserveNewlines:!l})};const stopReadingOnStreamEnd=async(r,n,s)=>{try{await r}catch{s.destroy()}finally{n.abort()}};const iterateOnStream=({stream:r,controller:n,binary:s,shouldEncode:a,encoding:l,shouldSplit:u,preserveNewlines:f})=>{const d=(0,Ye.on)(r,"data",{signal:n.signal,highWaterMark:br,highWatermark:br});return iterateOnData({onStdoutChunk:d,controller:n,binary:s,shouldEncode:a,encoding:l,shouldSplit:u,preserveNewlines:f})};const vr=(0,Ht.getDefaultHighWaterMark)(true);const br=vr;const iterateOnData=async function*({onStdoutChunk:r,controller:n,binary:s,shouldEncode:a,encoding:l,shouldSplit:u,preserveNewlines:f}){const d=getGenerators({binary:s,shouldEncode:a,encoding:l,shouldSplit:u,preserveNewlines:f});try{for await(const[n]of r){yield*transformChunkSync(n,d,0)}}catch(r){if(!n.signal.aborted){throw r}}finally{yield*finalChunksSync(d)}};const getGenerators=({binary:r,shouldEncode:n,encoding:s,shouldSplit:a,preserveNewlines:l})=>[getEncodingTransformGenerator(r,s,!n),getSplitLinesGenerator(r,l,!a,{})].filter(Boolean);const getStreamOutput=async({stream:r,onStreamEnd:n,fdNumber:s,encoding:a,buffer:l,maxBuffer:u,lines:f,allMixed:d,stripFinalNewline:p,verboseInfo:m,streamInfo:g})=>{const y=logOutputAsync({stream:r,onStreamEnd:n,fdNumber:s,encoding:a,allMixed:d,verboseInfo:m,streamInfo:g});if(!l){await Promise.all([resumeStream(r),y]);return}const v=getStripFinalNewline(p,s);const b=iterateForResult({stream:r,onStreamEnd:n,lines:f,encoding:a,stripFinalNewline:v,allMixed:d});const[w]=await Promise.all([contents_getStreamContents({stream:r,iterable:b,fdNumber:s,encoding:a,maxBuffer:u,lines:f}),y]);return w};const logOutputAsync=async({stream:r,onStreamEnd:n,fdNumber:s,encoding:a,allMixed:l,verboseInfo:u,streamInfo:{fileDescriptors:f}})=>{if(!shouldLogOutput({stdioItems:f[s]?.stdioItems,encoding:a,verboseInfo:u,fdNumber:s})){return}const d=iterateForResult({stream:r,onStreamEnd:n,lines:true,encoding:a,stripFinalNewline:true,allMixed:l});await logLines(d,r,s,u)};const resumeStream=async r=>{await(0,Me.setImmediate)();if(r.readableFlowing===null){r.resume()}};const contents_getStreamContents=async({stream:r,stream:{readableObjectMode:n},iterable:s,fdNumber:a,encoding:l,maxBuffer:u,lines:f})=>{try{if(n||f){return await getStreamAsArray(s,{maxBuffer:u})}if(l==="buffer"){return new Uint8Array(await getStreamAsArrayBuffer(s,{maxBuffer:u}))}return await getStreamAsString(s,{maxBuffer:u})}catch(s){return handleBufferedData(handleMaxBuffer({error:s,stream:r,readableObjectMode:n,lines:f,encoding:l,fdNumber:a}))}};const getBufferedData=async r=>{try{return await r}catch(r){return handleBufferedData(r)}};const handleBufferedData=({bufferedData:r})=>isArrayBuffer(r)?new Uint8Array(r):r;const waitForStream=async(r,n,s,{isSameDirection:a,stopOnExit:l=false}={})=>{const u=handleStdinDestroy(r,s);const f=new AbortController;try{await Promise.race([...l?[s.exitPromise]:[],(0,Xt.finished)(r,{cleanup:true,signal:f.signal})])}catch(r){if(!u.stdinCleanedUp){handleStreamError(r,n,s,a)}}finally{f.abort()}};const handleStdinDestroy=(r,{originalStreams:[n],subprocess:s})=>{const a={stdinCleanedUp:false};if(r===n){spyOnStdinDestroy(r,s,a)}return a};const spyOnStdinDestroy=(r,n,s)=>{const{_destroy:a}=r;r._destroy=(...l)=>{setStdinCleanedUp(n,s);a.call(r,...l)}};const setStdinCleanedUp=({exitCode:r,signalCode:n},s)=>{if(r!==null||n!==null){s.stdinCleanedUp=true}};const handleStreamError=(r,n,s,a)=>{if(!shouldIgnoreStreamError(r,n,s,a)){throw r}};const shouldIgnoreStreamError=(r,n,s,a=true)=>{if(s.propagating){return isStreamEpipe(r)||isStreamAbort(r)}s.propagating=true;return isInputFileDescriptor(s,n)===a?isStreamEpipe(r):isStreamAbort(r)};const isInputFileDescriptor=({fileDescriptors:r},n)=>n!=="all"&&r[n].direction==="input";const isStreamAbort=r=>r?.code==="ERR_STREAM_PREMATURE_CLOSE";const isStreamEpipe=r=>r?.code==="EPIPE";const waitForStdioStreams=({subprocess:r,encoding:n,buffer:s,maxBuffer:a,lines:l,stripFinalNewline:u,verboseInfo:f,streamInfo:d})=>r.stdio.map(((r,p)=>waitForSubprocessStream({stream:r,fdNumber:p,encoding:n,buffer:s[p],maxBuffer:a[p],lines:l[p],allMixed:false,stripFinalNewline:u,verboseInfo:f,streamInfo:d})));const waitForSubprocessStream=async({stream:r,fdNumber:n,encoding:s,buffer:a,maxBuffer:l,lines:u,allMixed:f,stripFinalNewline:d,verboseInfo:p,streamInfo:m})=>{if(!r){return}const g=waitForStream(r,n,m);if(isInputFileDescriptor(m,n)){await g;return}const[y]=await Promise.all([getStreamOutput({stream:r,onStreamEnd:g,fdNumber:n,encoding:s,buffer:a,maxBuffer:l,lines:u,allMixed:f,stripFinalNewline:d,verboseInfo:p,streamInfo:m}),g]);return y};const makeAllStream=({stdout:r,stderr:n},{all:s})=>s&&(r||n)?mergeStreams([r,n].filter(Boolean)):undefined;const waitForAllStream=({subprocess:r,encoding:n,buffer:s,maxBuffer:a,lines:l,stripFinalNewline:u,verboseInfo:f,streamInfo:d})=>waitForSubprocessStream({...getAllStream(r,s),fdNumber:"all",encoding:n,maxBuffer:a[1]+a[2],lines:l[1]||l[2],allMixed:getAllMixed(r),stripFinalNewline:u,verboseInfo:f,streamInfo:d});const getAllStream=({stdout:r,stderr:n,all:s},[,a,l])=>{const u=a||l;if(!u){return{stream:s,buffer:u}}if(!a){return{stream:n,buffer:u}}if(!l){return{stream:r,buffer:u}}return{stream:s,buffer:u}};const getAllMixed=({all:r,stdout:n,stderr:s})=>r&&n&&s&&n.readableObjectMode!==s.readableObjectMode;const shouldLogIpc=r=>isFullVerbose(r,"ipc");const logIpcOutput=(r,n)=>{const s=serializeVerboseMessage(r);verboseLog({type:"ipc",verboseMessage:s,fdNumber:"ipc",verboseInfo:n})};const waitForIpcOutput=async({subprocess:r,buffer:n,maxBuffer:s,ipc:a,ipcOutput:l,verboseInfo:u})=>{if(!a){return l}const f=shouldLogIpc(u);const d=getFdSpecificValue(n,"ipc");const p=getFdSpecificValue(s,"ipc");for await(const n of loopOnMessages({anyProcess:r,channel:r.channel,isSubprocess:false,ipc:a,shouldAwait:false,reference:true})){if(d){checkIpcMaxBuffer(r,l,p);l.push(n)}if(f){logIpcOutput(n,u)}}return l};const getBufferedIpcOutput=async(r,n)=>{await Promise.allSettled([r]);return n};const waitForSubprocessResult=async({subprocess:r,options:{encoding:n,buffer:s,maxBuffer:a,lines:l,timeoutDuration:u,cancelSignal:f,gracefulCancel:d,forceKillAfterDelay:p,stripFinalNewline:m,ipc:g,ipcInput:y},context:v,verboseInfo:b,fileDescriptors:w,originalStreams:_,onInternalError:S,controller:E})=>{const x=waitForExit(r,v);const A={originalStreams:_,fileDescriptors:w,subprocess:r,exitPromise:x,propagating:false};const k=waitForStdioStreams({subprocess:r,encoding:n,buffer:s,maxBuffer:a,lines:l,stripFinalNewline:m,verboseInfo:b,streamInfo:A});const C=waitForAllStream({subprocess:r,encoding:n,buffer:s,maxBuffer:a,lines:l,stripFinalNewline:m,verboseInfo:b,streamInfo:A});const O=[];const T=waitForIpcOutput({subprocess:r,buffer:s,maxBuffer:a,ipc:g,ipcOutput:O,verboseInfo:b});const R=waitForOriginalStreams(_,r,A);const I=waitForCustomStreamsEnd(w,A);try{return await Promise.race([Promise.all([{},waitForSuccessfulExit(x),Promise.all(k),C,T,sendIpcInput(r,y),...R,...I]),S,throwOnSubprocessError(r,E),...throwOnTimeout(r,u,v,E),...throwOnCancel({subprocess:r,cancelSignal:f,gracefulCancel:d,context:v,controller:E}),...throwOnGracefulCancel({subprocess:r,cancelSignal:f,gracefulCancel:d,forceKillAfterDelay:p,context:v,controller:E})])}catch(r){v.terminationReason??="other";return Promise.all([{error:r},x,Promise.all(k.map((r=>getBufferedData(r)))),getBufferedData(C),getBufferedIpcOutput(T,O),Promise.allSettled(R),Promise.allSettled(I)])}};const waitForOriginalStreams=(r,n,s)=>r.map(((r,a)=>r===n.stdio[a]?undefined:waitForStream(r,a,s)));const waitForCustomStreamsEnd=(r,n)=>r.flatMap((({stdioItems:r},s)=>r.filter((({value:r,stream:n=r})=>isStream(n,{checkOpen:false})&&!isStandardStream(n))).map((({type:r,value:a,stream:l=a})=>waitForStream(l,s,n,{isSameDirection:Tt.has(r),stopOnExit:r==="native"})))));const throwOnSubprocessError=async(r,{signal:n})=>{const[s]=await(0,Ye.once)(r,"error",{signal:n});throw s};const initializeConcurrentStreams=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap});const addConcurrentStream=(r,n,s)=>{const a=r[s];if(!a.has(n)){a.set(n,[])}const l=a.get(n);const u=createDeferred();l.push(u);const f=u.resolve.bind(u);return{resolve:f,promises:l}};const waitForConcurrentStreams=async({resolve:r,promises:n},s)=>{r();const[a]=await Promise.race([Promise.allSettled([true,s]),Promise.all([false,...n])]);return!a};const safeWaitForSubprocessStdin=async r=>{if(r===undefined){return}try{await waitForSubprocessStdin(r)}catch{}};const safeWaitForSubprocessStdout=async r=>{if(r===undefined){return}try{await waitForSubprocessStdout(r)}catch{}};const waitForSubprocessStdin=async r=>{await(0,Xt.finished)(r,{cleanup:true,readable:false,writable:true})};const waitForSubprocessStdout=async r=>{await(0,Xt.finished)(r,{cleanup:true,readable:true,writable:false})};const waitForSubprocess=async(r,n)=>{await r;if(n){throw n}};const destroyOtherStream=(r,n,s)=>{if(s&&!isStreamAbort(s)){r.destroy(s)}else if(n){r.destroy()}};const createReadable=({subprocess:r,concurrentStreams:n,encoding:s},{from:a,binary:l=true,preserveNewlines:u=true}={})=>{const f=l||ft.has(s);const{subprocessStdout:d,waitReadableDestroy:p}=getSubprocessStdout(r,a,n);const{readableEncoding:m,readableObjectMode:g,readableHighWaterMark:v}=getReadableOptions(d,f);const{read:b,onStdoutDataDone:w}=getReadableMethods({subprocessStdout:d,subprocess:r,binary:f,encoding:s,preserveNewlines:u});const _=new Ht.Readable({read:b,destroy:(0,y.callbackify)(onReadableDestroy.bind(undefined,{subprocessStdout:d,subprocess:r,waitReadableDestroy:p})),highWaterMark:v,objectMode:g,encoding:m});onStdoutFinished({subprocessStdout:d,onStdoutDataDone:w,readable:_,subprocess:r});return _};const getSubprocessStdout=(r,n,s)=>{const a=getFromStream(r,n);const l=addConcurrentStream(s,a,"readableDestroy");return{subprocessStdout:a,waitReadableDestroy:l}};const getReadableOptions=({readableEncoding:r,readableObjectMode:n,readableHighWaterMark:s},a)=>a?{readableEncoding:r,readableObjectMode:n,readableHighWaterMark:s}:{readableEncoding:r,readableObjectMode:true,readableHighWaterMark:vr};const getReadableMethods=({subprocessStdout:r,subprocess:n,binary:s,encoding:a,preserveNewlines:l})=>{const u=createDeferred();const f=iterateOnSubprocessStream({subprocessStdout:r,subprocess:n,binary:s,shouldEncode:!s,encoding:a,preserveNewlines:l});return{read(){onRead(this,f,u)},onStdoutDataDone:u}};const onRead=async(r,n,s)=>{try{const{value:a,done:l}=await n.next();if(l){s.resolve()}else{r.push(a)}}catch{}};const onStdoutFinished=async({subprocessStdout:r,onStdoutDataDone:n,readable:s,subprocess:a,subprocessStdin:l})=>{try{await waitForSubprocessStdout(r);await a;await safeWaitForSubprocessStdin(l);await n;if(s.readable){s.push(null)}}catch(r){await safeWaitForSubprocessStdin(l);destroyOtherReadable(s,r)}};const onReadableDestroy=async({subprocessStdout:r,subprocess:n,waitReadableDestroy:s},a)=>{if(await waitForConcurrentStreams(s,n)){destroyOtherReadable(r,a);await waitForSubprocess(n,a)}};const destroyOtherReadable=(r,n)=>{destroyOtherStream(r,r.readable,n)};const createWritable=({subprocess:r,concurrentStreams:n},{to:s}={})=>{const{subprocessStdin:a,waitWritableFinal:l,waitWritableDestroy:u}=getSubprocessStdin(r,s,n);const f=new Ht.Writable({...getWritableMethods(a,r,l),destroy:(0,y.callbackify)(onWritableDestroy.bind(undefined,{subprocessStdin:a,subprocess:r,waitWritableFinal:l,waitWritableDestroy:u})),highWaterMark:a.writableHighWaterMark,objectMode:a.writableObjectMode});onStdinFinished(a,f);return f};const getSubprocessStdin=(r,n,s)=>{const a=getToStream(r,n);const l=addConcurrentStream(s,a,"writableFinal");const u=addConcurrentStream(s,a,"writableDestroy");return{subprocessStdin:a,waitWritableFinal:l,waitWritableDestroy:u}};const getWritableMethods=(r,n,s)=>({write:onWrite.bind(undefined,r),final:(0,y.callbackify)(onWritableFinal.bind(undefined,r,n,s))});const onWrite=(r,n,s,a)=>{if(r.write(n,s)){a()}else{r.once("drain",a)}};const onWritableFinal=async(r,n,s)=>{if(await waitForConcurrentStreams(s,n)){if(r.writable){r.end()}await n}};const onStdinFinished=async(r,n,s)=>{try{await waitForSubprocessStdin(r);if(n.writable){n.end()}}catch(r){await safeWaitForSubprocessStdout(s);destroyOtherWritable(n,r)}};const onWritableDestroy=async({subprocessStdin:r,subprocess:n,waitWritableFinal:s,waitWritableDestroy:a},l)=>{await waitForConcurrentStreams(s,n);if(await waitForConcurrentStreams(a,n)){destroyOtherWritable(r,l);await waitForSubprocess(n,l)}};const destroyOtherWritable=(r,n)=>{destroyOtherStream(r,r.writable,n)};const createDuplex=({subprocess:r,concurrentStreams:n,encoding:s},{from:a,to:l,binary:u=true,preserveNewlines:f=true}={})=>{const d=u||ft.has(s);const{subprocessStdout:p,waitReadableDestroy:m}=getSubprocessStdout(r,a,n);const{subprocessStdin:g,waitWritableFinal:v,waitWritableDestroy:b}=getSubprocessStdin(r,l,n);const{readableEncoding:w,readableObjectMode:_,readableHighWaterMark:S}=getReadableOptions(p,d);const{read:E,onStdoutDataDone:x}=getReadableMethods({subprocessStdout:p,subprocess:r,binary:d,encoding:s,preserveNewlines:f});const A=new Ht.Duplex({read:E,...getWritableMethods(g,r,v),destroy:(0,y.callbackify)(onDuplexDestroy.bind(undefined,{subprocessStdout:p,subprocessStdin:g,subprocess:r,waitReadableDestroy:m,waitWritableFinal:v,waitWritableDestroy:b})),readableHighWaterMark:S,writableHighWaterMark:g.writableHighWaterMark,readableObjectMode:_,writableObjectMode:g.writableObjectMode,encoding:w});onStdoutFinished({subprocessStdout:p,onStdoutDataDone:x,readable:A,subprocess:r,subprocessStdin:g});onStdinFinished(g,A,p);return A};const onDuplexDestroy=async({subprocessStdout:r,subprocessStdin:n,subprocess:s,waitReadableDestroy:a,waitWritableFinal:l,waitWritableDestroy:u},f)=>{await Promise.all([onReadableDestroy({subprocessStdout:r,subprocess:s,waitReadableDestroy:a},f),onWritableDestroy({subprocessStdin:n,subprocess:s,waitWritableFinal:l,waitWritableDestroy:u},f)])};const createIterable=(r,n,{from:s,binary:a=false,preserveNewlines:l=false}={})=>{const u=a||ft.has(n);const f=getFromStream(r,s);const d=iterateOnSubprocessStream({subprocessStdout:f,subprocess:r,binary:u,shouldEncode:true,encoding:n,preserveNewlines:l});return iterateOnStdoutData(d,f,r)};const iterateOnStdoutData=async function*(r,n,s){try{yield*r}finally{if(n.readable){n.destroy()}await s}};const addConvertedStreams=(r,{encoding:n})=>{const s=initializeConcurrentStreams();r.readable=createReadable.bind(undefined,{subprocess:r,concurrentStreams:s,encoding:n});r.writable=createWritable.bind(undefined,{subprocess:r,concurrentStreams:s});r.duplex=createDuplex.bind(undefined,{subprocess:r,concurrentStreams:s,encoding:n});r.iterable=createIterable.bind(undefined,r,n);r[Symbol.asyncIterator]=createIterable.bind(undefined,r,n,{})};const mergePromise=(r,n)=>{for(const[s,a]of _r){const l=a.value.bind(n);Reflect.defineProperty(r,s,{...a,value:l})}};const wr=(async()=>{})().constructor.prototype;const _r=["then","catch","finally"].map((r=>[r,Reflect.getOwnPropertyDescriptor(wr,r)]));const execaCoreAsync=(r,n,s,a)=>{const{file:l,commandArguments:u,command:f,escapedCommand:d,startTime:p,verboseInfo:m,options:g,fileDescriptors:y}=handleAsyncArguments(r,n,s);const{subprocess:v,promise:b}=spawnSubprocessAsync({file:l,commandArguments:u,options:g,startTime:p,verboseInfo:m,command:f,escapedCommand:d,fileDescriptors:y});v.pipe=pipeToSubprocess.bind(undefined,{source:v,sourcePromise:b,boundOptions:{},createNested:a});mergePromise(v,b);Xe.set(v,{options:g,fileDescriptors:y});return v};const handleAsyncArguments=(r,n,s)=>{const{command:a,escapedCommand:l,startTime:u,verboseInfo:f}=handleCommand(r,n,s);const{file:d,commandArguments:p,options:m}=normalizeOptions(r,n,s);const g=handleAsyncOptions(m);const y=handleStdioAsync(g,f);return{file:d,commandArguments:p,command:a,escapedCommand:l,startTime:u,verboseInfo:f,options:g,fileDescriptors:y}};const handleAsyncOptions=({timeout:r,signal:n,...s})=>{if(n!==undefined){throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.')}return{...s,timeoutDuration:r}};const spawnSubprocessAsync=({file:r,commandArguments:n,options:s,startTime:a,verboseInfo:u,command:f,escapedCommand:d,fileDescriptors:p})=>{let m;try{m=(0,l.spawn)(r,n,s)}catch(r){return handleEarlyError({error:r,command:f,escapedCommand:d,fileDescriptors:p,options:s,startTime:a,verboseInfo:u})}const g=new AbortController;(0,Ye.setMaxListeners)(Number.POSITIVE_INFINITY,g.signal);const y=[...m.stdio];pipeOutputAsync(m,p,g);cleanupOnExit(m,s,g);const v={};const b=createDeferred();m.kill=subprocessKill.bind(undefined,{kill:m.kill.bind(m),options:s,onInternalError:b,context:v,controller:g});m.all=makeAllStream(m,s);addConvertedStreams(m,s);addIpcMethods(m,s);const w=handlePromise({subprocess:m,options:s,startTime:a,verboseInfo:u,fileDescriptors:p,originalStreams:y,command:f,escapedCommand:d,context:v,onInternalError:b,controller:g});return{subprocess:m,promise:w}};const handlePromise=async({subprocess:r,options:n,startTime:s,verboseInfo:a,fileDescriptors:l,originalStreams:u,command:f,escapedCommand:d,context:p,onInternalError:m,controller:g})=>{const[y,[v,b],w,_,S]=await waitForSubprocessResult({subprocess:r,options:n,context:p,verboseInfo:a,fileDescriptors:l,originalStreams:u,onInternalError:m,controller:g});g.abort();m.resolve();const E=w.map(((r,s)=>stripNewline(r,n,s)));const x=stripNewline(_,n,"all");const A=getAsyncResult({errorInfo:y,exitCode:v,signal:b,stdio:E,all:x,ipcOutput:S,context:p,options:n,command:f,escapedCommand:d,startTime:s});return handleResult(A,a,n)};const getAsyncResult=({errorInfo:r,exitCode:n,signal:s,stdio:a,all:l,ipcOutput:u,context:f,options:d,command:p,escapedCommand:m,startTime:g})=>"error"in r?makeError({error:r.error,command:p,escapedCommand:m,timedOut:f.terminationReason==="timeout",isCanceled:f.terminationReason==="cancel"||f.terminationReason==="gracefulCancel",isGracefullyCanceled:f.terminationReason==="gracefulCancel",isMaxBuffer:r.error instanceof MaxBufferError,isForcefullyTerminated:f.isForcefullyTerminated,exitCode:n,signal:s,stdio:a,all:l,ipcOutput:u,options:d,startTime:g,isSync:false}):makeSuccessResult({command:p,escapedCommand:m,stdio:a,all:l,ipcOutput:u,options:d,startTime:g});const mergeOptions=(r,n)=>{const s=Object.fromEntries(Object.entries(n).map((([n,s])=>[n,mergeOption(n,r[n],s)])));return{...r,...s}};const mergeOption=(r,n,s)=>{if(Sr.has(r)&&isPlainObject(n)&&isPlainObject(s)){return{...n,...s}}return s};const Sr=new Set(["env",...x]);const createExeca=(r,n,s,a)=>{const createNested=(r,n,a)=>createExeca(r,n,s,a);const boundExeca=(...l)=>callBoundExeca({mapArguments:r,deepOptions:s,boundOptions:n,setBoundExeca:a,createNested:createNested},...l);if(a!==undefined){a(boundExeca,createNested,n)}return boundExeca};const callBoundExeca=({mapArguments:r,deepOptions:n={},boundOptions:s={},setBoundExeca:a,createNested:l},u,...f)=>{if(isPlainObject(u)){return l(r,mergeOptions(s,u),a)}const{file:d,commandArguments:p,options:m,isSync:g}=parseArguments({mapArguments:r,firstArgument:u,nextArguments:f,deepOptions:n,boundOptions:s});return g?execaCoreSync(d,p,m):execaCoreAsync(d,p,m,l)};const parseArguments=({mapArguments:r,firstArgument:n,nextArguments:s,deepOptions:a,boundOptions:l})=>{const u=isTemplateString(n)?parseTemplates(n,s):[n,...s];const[f,d,p]=normalizeParameters(...u);const m=mergeOptions(mergeOptions(a,l),p);const{file:g=f,commandArguments:y=d,options:v=m,isSync:b=false}=r({file:f,commandArguments:d,options:m});return{file:g,commandArguments:y,options:v,isSync:b}};const mapCommandAsync=({file:r,commandArguments:n})=>parseCommand(r,n);const mapCommandSync=({file:r,commandArguments:n})=>({...parseCommand(r,n),isSync:true});const parseCommand=(r,n)=>{if(n.length>0){throw new TypeError(`The command and its arguments must be passed as a single string: ${r} ${n}.`)}const[s,...a]=parseCommandString(r);return{file:s,commandArguments:a}};const parseCommandString=r=>{if(typeof r!=="string"){throw new TypeError(`The command must be a string: ${String(r)}.`)}const n=r.trim();if(n===""){return[]}const s=[];for(const r of n.split(Er)){const n=s.at(-1);if(n&&n.endsWith("\\")){s[s.length-1]=`${n.slice(0,-1)} ${r}`}else{s.push(r)}}return s};const Er=/ +/g;const setScriptSync=(r,n,s)=>{r.sync=n(mapScriptSync,s);r.s=r.sync};const mapScriptAsync=({options:r})=>getScriptOptions(r);const mapScriptSync=({options:r})=>({...getScriptOptions(r),isSync:true});const getScriptOptions=r=>({options:{...getScriptStdinOption(r),...r}});const getScriptStdinOption=({input:r,inputFile:n,stdio:s})=>r===undefined&&n===undefined&&s===undefined?{stdin:"inherit"}:{};const xr={preferLocal:true};const Ar=createExeca((()=>({})));const kr=createExeca((()=>({isSync:true})));const Cr=createExeca(mapCommandAsync);const Or=createExeca(mapCommandSync);const Tr=createExeca(mapNode);const Rr=createExeca(mapScriptAsync,{},xr,setScriptSync);const{sendMessage:Ir,getOneMessage:Nr,getEachMessage:Br,getCancelSignal:Dr}=getIpcExport()},3469:(r,n,s)=>{"use strict";s.r(n);s.d(n,{customAlphabet:()=>customAlphabet,customRandom:()=>customRandom,nanoid:()=>nanoid,random:()=>random,urlAlphabet:()=>l});const a=require("node:crypto");const l="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";const u=128;let f,d;function fillPool(r){if(!f||f.length<r){f=Buffer.allocUnsafe(r*u);a.webcrypto.getRandomValues(f);d=0}else if(d+r>f.length){a.webcrypto.getRandomValues(f);d=0}d+=r}function random(r){fillPool(r|=0);return f.subarray(d-r,d)}function customRandom(r,n,s){let a=(2<<31-Math.clz32(r.length-1|1))-1;let l=Math.ceil(1.6*a*n/r.length);return(u=n)=>{let f="";while(true){let n=s(l);let d=l;while(d--){f+=r[n[d]&a]||"";if(f.length>=u)return f}}}}function customAlphabet(r,n=21){return customRandom(r,n,random)}function nanoid(r=21){fillPool(r|=0);let n="";for(let s=d-r;s<d;s++){n+=l[f[s]&63]}return n}},2:(r,n,s)=>{"use strict";s.r(n);s.d(n,{apps:()=>I,default:()=>N,openApp:()=>openApp});var a=s(1708);var l=s(4573);var u=s(6760);var f=s(3136);var d=s(1421);const p=require("node:fs/promises");var m=s(8161);var g=s(3024);let y;function hasDockerEnv(){try{g.statSync("/.dockerenv");return true}catch{return false}}function hasDockerCGroup(){try{return g.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return false}}function isDocker(){if(y===undefined){y=hasDockerEnv()||hasDockerCGroup()}return y}let v;const hasContainerEnv=()=>{try{g.statSync("/run/.containerenv");return true}catch{return false}};function isInsideContainer(){if(v===undefined){v=hasContainerEnv()||isDocker()}return v}const isWsl=()=>{if(a.platform!=="linux"){return false}if(m.release().toLowerCase().includes("microsoft")){if(isInsideContainer()){return false}return true}try{return g.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!isInsideContainer():false}catch{return false}};const b=a.env.__IS_WSL_TEST__?isWsl:isWsl();function defineLazyProperty(r,n,s){const define=s=>Object.defineProperty(r,n,{value:s,enumerable:true,writable:true});Object.defineProperty(r,n,{configurable:true,enumerable:true,get(){const r=s();define(r);return r},set(r){define(r)}});return r}var w=s(7975);const _=(0,w.promisify)(d.execFile);async function defaultBrowserId(){if(a.platform!=="darwin"){throw new Error("macOS only")}const{stdout:r}=await _("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);const n=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(r);return n?.groups.id??"com.apple.Safari"}const S=(0,w.promisify)(d.execFile);async function runAppleScript(r,{humanReadableOutput:n=true}={}){if(a.platform!=="darwin"){throw new Error("macOS only")}const s=n?[]:["-ss"];const{stdout:l}=await S("osascript",["-e",r,s]);return l.trim()}function runAppleScriptSync(r,{humanReadableOutput:n=true}={}){if(process.platform!=="darwin"){throw new Error("macOS only")}const s=n?[]:["-ss"];const a=execFileSync("osascript",["-e",r,...s],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500});return a.trim()}async function bundleName(r){return runAppleScript(`tell application "Finder" to set app_path to application file id "${r}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}const E=(0,w.promisify)(d.execFile);const x={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}};class UnknownBrowserError extends Error{}async function defaultBrowser(r=E){const{stdout:n}=await r("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]);const s=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(n);if(!s){throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(n)}`)}const{id:a}=s.groups;const l=x[a];if(!l){throw new UnknownBrowserError(`Unknown browser ID: ${a}`)}return l}const A=(0,w.promisify)(d.execFile);const titleize=r=>r.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,(r=>r.toUpperCase()));async function default_browser_defaultBrowser(){if(a.platform==="darwin"){const r=await defaultBrowserId();const n=await bundleName(r);return{name:n,id:r}}if(a.platform==="linux"){const{stdout:r}=await A("xdg-mime",["query","default","x-scheme-handler/http"]);const n=r.trim();const s=titleize(n.replace(/.desktop$/,"").replace("-"," "));return{name:s,id:n}}if(a.platform==="win32"){return defaultBrowser()}throw new Error("Only macOS, Linux, and Windows are supported")}const k=u.dirname((0,f.fileURLToPath)(import.meta.url));const C=u.join(k,"xdg-open");const{platform:O,arch:T}=a;const R=(()=>{const r="/mnt/";let n;return async function(){if(n){return n}const s="/etc/wsl.conf";let a=false;try{await p.access(s,p.constants.F_OK);a=true}catch{}if(!a){return r}const l=await p.readFile(s,{encoding:"utf8"});const u=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(l);if(!u){return r}n=u.groups.mountPoint.trim();n=n.endsWith("/")?n:`${n}/`;return n}})();const pTryEach=async(r,n)=>{let s;for(const a of r){try{return await n(a)}catch(r){s=r}}throw s};const baseOpen=async r=>{r={wait:false,background:false,newInstance:false,allowNonzeroExitCode:false,...r};if(Array.isArray(r.app)){return pTryEach(r.app,(n=>baseOpen({...r,app:n})))}let{name:n,arguments:s=[]}=r.app??{};s=[...s];if(Array.isArray(n)){return pTryEach(n,(n=>baseOpen({...r,app:{name:n,arguments:s}})))}if(n==="browser"||n==="browserPrivate"){const a={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","microsoft-edge.desktop":"edge"};const l={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"};const u=await default_browser_defaultBrowser();if(u.id in a){const f=a[u.id];if(n==="browserPrivate"){s.push(l[f])}return baseOpen({...r,app:{name:I[f],arguments:s}})}throw new Error(`${u.name} is not supported as a default browser`)}let u;const f=[];const m={};if(O==="darwin"){u="open";if(r.wait){f.push("--wait-apps")}if(r.background){f.push("--background")}if(r.newInstance){f.push("--new")}if(n){f.push("-a",n)}}else if(O==="win32"||b&&!isInsideContainer()&&!n){const d=await R();u=b?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${a.env.SYSTEMROOT||a.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`;f.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand");if(!b){m.windowsVerbatimArguments=true}const p=["Start"];if(r.wait){p.push("-Wait")}if(n){p.push(`"\`"${n}\`""`);if(r.target){s.push(r.target)}}else if(r.target){p.push(`"${r.target}"`)}if(s.length>0){s=s.map((r=>`"\`"${r}\`""`));p.push("-ArgumentList",s.join(","))}r.target=l.Buffer.from(p.join(" "),"utf16le").toString("base64")}else{if(n){u=n}else{const r=!k||k==="/";let n=false;try{await p.access(C,p.constants.X_OK);n=true}catch{}const s=a.versions.electron??(O==="android"||r||!n);u=s?"xdg-open":C}if(s.length>0){f.push(...s)}if(!r.wait){m.stdio="ignore";m.detached=true}}if(O==="darwin"&&s.length>0){f.push("--args",...s)}if(r.target){f.push(r.target)}const g=d.spawn(u,f,m);if(r.wait){return new Promise(((n,s)=>{g.once("error",s);g.once("close",(a=>{if(!r.allowNonzeroExitCode&&a>0){s(new Error(`Exited with code ${a}`));return}n(g)}))}))}g.unref();return g};const open_open=(r,n)=>{if(typeof r!=="string"){throw new TypeError("Expected a `target`")}return baseOpen({...n,target:r})};const openApp=(r,n)=>{if(typeof r!=="string"&&!Array.isArray(r)){throw new TypeError("Expected a valid `name`")}const{arguments:s=[]}=n??{};if(s!==undefined&&s!==null&&!Array.isArray(s)){throw new TypeError("Expected `appArguments` as Array type")}return baseOpen({...n,app:{name:r,arguments:s}})};function detectArchBinary(r){if(typeof r==="string"||Array.isArray(r)){return r}const{[T]:n}=r;if(!n){throw new Error(`${T} is not supported`)}return n}function detectPlatformBinary({[O]:r},{wsl:n}){if(n&&b){return detectArchBinary(n)}if(!r){throw new Error(`${O} is not supported`)}return detectArchBinary(r)}const I={};defineLazyProperty(I,"chrome",(()=>detectPlatformBinary({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}})));defineLazyProperty(I,"firefox",(()=>detectPlatformBinary({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"})));defineLazyProperty(I,"edge",(()=>detectPlatformBinary({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"})));defineLazyProperty(I,"browser",(()=>"browser"));defineLazyProperty(I,"browserPrivate",(()=>"browserPrivate"));const N=open_open},6548:r=>{"use strict";r.exports=JSON.parse('["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]')}};var __webpack_module_cache__={};function __nccwpck_require__(r){var n=__webpack_module_cache__[r];if(n!==undefined){return n.exports}var s=__webpack_module_cache__[r]={exports:{}};var a=true;try{__webpack_modules__[r].call(s.exports,s,s.exports,__nccwpck_require__);a=false}finally{if(a)delete __webpack_module_cache__[r]}return s.exports}(()=>{__nccwpck_require__.d=(r,n)=>{for(var s in n){if(__nccwpck_require__.o(n,s)&&!__nccwpck_require__.o(r,s)){Object.defineProperty(r,s,{enumerable:true,get:n[s]})}}}})();(()=>{__nccwpck_require__.o=(r,n)=>Object.prototype.hasOwnProperty.call(r,n)})();(()=>{__nccwpck_require__.r=r=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(r,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(9407);module.exports=__webpack_exports__})();
|