Repository navigation
Expand file tree
/
Copy pathMakefile.js
More file actions
36 lines (36 loc) · 251 KB
/
Copy pathMakefile.js
File metadata and controls
36 lines (36 loc) · 251 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// source hash: b7f72fe7430af06893464ea7320b10ae231e8d94
/* eslint-disable */
// prettier-ignore
import e from"os";import t from"fs";import n from"path";import r from"util";import o from"stream";import i from"events";import s from"child_process";import a from"assert";import c from"buffer";import l from"node:path";import u from"node:module";import{statSync as d,readFileSync as p,appendFileSync as f,writeFileSync as m,createWriteStream as h,createReadStream as g,readdirSync as y,existsSync as b,mkdirSync as v}from"node:fs";import{fileURLToPath as w}from"node:url";import{ChildProcess as S,execFile as E,spawnSync as _,spawn as x}from"node:child_process";import{StringDecoder as A}from"node:string_decoder";import{debuglog as T,stripVTControlCharacters as O,inspect as R,promisify as C,callbackify as k,aborted as P}from"node:util";import I,{platform as D,hrtime as L,execPath as M,execArgv as N}from"node:process";import $ from"node:tty";import{setTimeout as j,scheduler as B,setImmediate as F}from"node:timers/promises";import{constants as H}from"node:os";import{once as U,addAbortListener as G,EventEmitter as W,on as V,setMaxListeners as K}from"node:events";import{serialize as q}from"node:v8";import{Transform as z,getDefaultHighWaterMark as X,Duplex as Y,Writable as Q,Readable as Z,PassThrough as J}from"node:stream";import{Buffer as ee}from"node:buffer";import{finished as te}from"node:stream/promises";var ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe,ie={},se={},ae={exports:{}},ce={},le={},ue={},de={};function pe(){if(oe)return de;return oe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.splitWhen=de.flatten=void 0,de.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},de.splitWhen=function(e,t){const n=[[]];let r=0;for(const o of e)t(o)?(r++,n[r]=[]):n[r].push(o);return n},de}var fe,me={};function he(){if(fe)return me;return fe=1,Object.defineProperty(me,"__esModule",{value:!0}),me.isEnoentCodeError=void 0,me.isEnoentCodeError=function(e){return"ENOENT"===e.code},me}var ge,ye={};var be,ve={};function we(){if(be)return ve;be=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.convertPosixPathToPattern=ve.convertWindowsPathToPattern=ve.convertPathToPattern=ve.escapePosixPath=ve.escapeWindowsPath=ve.escape=ve.removeLeadingDotSegment=ve.makeAbsolute=ve.unixify=void 0;const t=n,r="win32"===e.platform(),o=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,i=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function c(e){return e.replace(i,"\\$2")}function l(e){return e.replace(o,"\\$2")}function u(e){return c(e).replace(s,"//$1").replace(a,"/")}function d(e){return l(e)}return ve.unixify=function(e){return e.replace(/\\/g,"/")},ve.makeAbsolute=function(e,n){return t.resolve(e,n)},ve.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},ve.escape=r?c:l,ve.escapeWindowsPath=c,ve.escapePosixPath=l,ve.convertPathToPattern=r?u:d,ve.convertWindowsPathToPattern=u,ve.convertPosixPathToPattern=d,ve}var Se,Ee,_e,xe,Ae,Te,Oe={};
/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/function Re(){return Ee?Se:(Ee=1,Se=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1})}
/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function Ce(){if(xe)return _e;xe=1;var e=Re(),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,o=-2,i=-2,s=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==o&&"["===e[n]&&"]"!==e[n+1]&&(o<n&&(o=e.indexOf("]",n)),o>n)){if(-1===a||a>o)return!0;if(-1===(a=e.indexOf("\\",n))||a>o)return!0}if(-1!==i&&"{"===e[n]&&"}"!==e[n+1]&&(i=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==s&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(s=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>s))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(s=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>s)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var l=t[c];if(l){var u=e.indexOf(l,n);-1!==u&&(n=u+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var o=t[r];if(o){var i=e.indexOf(o,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return _e=function(t,o){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return o&&!1===o.strict&&(i=r),i(t)}}function ke(){if(Te)return Ae;Te=1;var t=Ce(),r=n.posix.dirname,o="win32"===e.platform(),i=/\\/g,s=/[\{\[].*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Ae=function(e,n){Object.assign({flipBackslashes:!0},n).flipBackslashes&&o&&e.indexOf("/")<0&&(e=e.replace(i,"/")),s.test(e)&&(e+="/"),e+="a";do{e=r(e)}while(t(e)||a.test(e));return e.replace(c,"$1")}}var Pe,Ie,De,Le,Me,Ne,$e,je,Be,Fe,He,Ue,Ge,We,Ve,Ke,qe,ze,Xe,Ye={};function Qe(){return Pe||(Pe=1,(e=Ye).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,o)=>!1!==o&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){const o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}),Ye;var e}function Ze(){if(De)return Ie;De=1;const e=Qe();return Ie=(t,n={})=>{const r=(t,o={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(o),s=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||s)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)},Ie}
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/function Je(){return Me?Le:(Me=1,Le=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))})}
/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/function et(){if($e)return Ne;$e=1;const e=Je(),t=(n,i,s)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===e(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...s};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let l=Math.min(n,i),u=Math.max(n,i);if(1===Math.abs(l-u)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=d(n)||d(i),f={min:n,max:i,a:l,b:u},m=[],h=[];if(p&&(f.isPadded=p,f.maxLen=String(f.max).length),l<0){h=r(u<0?Math.abs(u):1,Math.abs(l),f,a),l=f.a=0}return u>=0&&(m=r(l,u,f,a)),f.negatives=h,f.positives=m,f.result=function(e,t){let n=o(e,t,"-",!1)||[],r=o(t,e,"",!1)||[],i=o(e,t,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(h,m),!0===a.capture?f.result=`(${f.result})`:!1!==a.wrap&&m.length+h.length>1&&(f.result=`(?:${f.result})`),t.cache[c]=f,f.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,i="",s=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?i+=t:"0"!==t||"9"!==n?i+=u(t,n):s++}return s&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function r(e,t,r,o){let s,u=function(e,t){let n=1,r=1,o=a(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=a(e,n);for(o=c(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=c(t+1,r)-1;return s=[...s],s.sort(i),s}(e,t),d=[],f=e;for(let e=0;e<u.length;e++){let t=u[e],i=n(String(f),String(t),o),a="";r.isPadded||!s||s.pattern!==i.pattern?(r.isPadded&&(a=p(t,r,o)),i.string=a+i.pattern+l(i.count),d.push(i),f=t+1,s=i):(s.count.length>1&&s.count.pop(),s.count.push(i.count[0]),s.string=s.pattern+l(s.count),f=t+1)}return d}function o(e,t,n,r,o){let i=[];for(let o of e){let{string:e}=o;r||s(t,"string",e)||i.push(n+e),r&&s(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function s(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function l(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function u(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function d(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Ne=t}
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/function tt(){if(Be)return je;Be=1;const e=r,t=et(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,i=e=>Number.isInteger(+e),s=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},a=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},c=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},l=(e,n,r,o)=>{if(r)return t(e,n,{wrap:!1,...o});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},u=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},d=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,n)=>{if(!0===n.strictRanges)throw d([e,t]);return[]},f=(e,t,n=1,r={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(!0===r.strictRanges)throw d([e,t]);return[]}0===o&&(o=0),0===i&&(i=0);let p=o>i,f=String(e),m=String(t),h=String(n);n=Math.max(Math.abs(n),1);let g=s(f)||s(m)||s(h),y=g?Math.max(f.length,m.length,h.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),v=r.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(r.toRegex&&1===n)return l(c(e,y),c(t,y),!0,r);let w={negatives:[],positives:[]},S=e=>w[e<0?"negatives":"positives"].push(Math.abs(e)),E=[],_=0;for(;p?o>=i:o<=i;)!0===r.toRegex&&n>1?S(o):E.push(a(v(o,_),y,b)),o=p?o-n:o+n,_++;return!0===r.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let r,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>c(String(e),n)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>c(String(e),n)).join("|")})`),r=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${r})`:r})(w,r,y):u(E,null,{wrap:!1,...r}):E},m=(e,t,r,s={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return p(e,t,s);if("function"==typeof r)return m(e,t,1,{transform:r});if(n(r))return m(e,t,0,r);let a={...s};return!0===a.capture&&(a.wrap=!0),r=r||a.step||1,i(r)?i(e)&&i(t)?f(e,t,r,a):((e,t,n=1,r={})=>{if(!i(e)&&e.length>1||!i(t)&&t.length>1)return p(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),c=s>a,d=Math.min(s,a),f=Math.max(s,a);if(r.toRegex&&1===n)return l(d,f,!1,r);let m=[],h=0;for(;c?s>=a:s<=a;)m.push(o(s,h)),s=c?s-n:s+n,h++;return!0===r.toRegex?u(m,null,{wrap:!1,options:r}):m})(e,t,Math.max(Math.abs(r),1),a):null==r||n(r)?m(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,a)};return je=m}function nt(){if(qe)return Ke;qe=1;const e=Ze(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:m,CHAR_ZERO_WIDTH_NOBREAK_SPACE:h}=Ve?We:(Ve=1,We={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"});return Ke=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const w={type:"root",input:g,nodes:[]},S=[w];let E=w,_=w,x=0;const A=g.length;let T,O=0,R=0;const C=()=>g[O++],k=e=>{if("text"===e.type&&"dot"===_.type&&(_.type="text"),!_||"text"!==_.type||"text"!==e.type)return E.nodes.push(e),e.parent=E,e.prev=_,_=e,e;_.value+=e.value};for(k({type:"bos"});O<A;)if(E=S[S.length-1],T=C(),T!==h&&T!==m)if(T!==n)if(T!==d){if(T===u){let e;for(x++;O<A&&(e=C());)if(T+=e,e!==u)if(e!==n){if(e===d&&(x--,0===x))break}else T+=C();else x++;k({type:"text",value:T});continue}if(T!==s)if(T!==a){if(T===p||T===f||T===r){const e=T;let t;for(!0!==y.keepQuotes&&(T="");O<A&&(t=C());)if(t!==n){if(t===e){!0===y.keepQuotes&&(T+=t);break}T+=t}else T+=t+C();k({type:"text",value:T});continue}if(T===c){R++;const e=_.value&&"$"===_.value.slice(-1)||!0===E.dollar;E=k({type:"brace",open:!0,close:!1,dollar:e,depth:R,commas:0,ranges:0,nodes:[]}),S.push(E),k({type:"open",value:T});continue}if(T===l){if("brace"!==E.type){k({type:"text",value:T});continue}const e="close";E=S.pop(),E.close=!0,k({type:e,value:T}),R--,E=S[S.length-1];continue}if(T===o&&R>0){if(E.ranges>0){E.ranges=0;const t=E.nodes.shift();E.nodes=[t,{type:"text",value:e(E)}]}k({type:"comma",value:T}),E.commas++}else{if(T===i&&R>0&&0===E.commas){const e=E.nodes;if(0===R||0===e.length){k({type:"text",value:T});continue}if("dot"===_.type){if(E.range=[],_.value+=T,_.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,_.type="text";continue}E.ranges++,E.args=[];continue}if("range"===_.type){e.pop();const t=e[e.length-1];t.value+=_.value+T,_=t,E.ranges--;continue}k({type:"dot",value:T});continue}k({type:"text",value:T})}}else{if("paren"!==E.type){k({type:"text",value:T});continue}E=S.pop(),k({type:"text",value:T}),E=S[S.length-1]}else E=k({type:"paren",nodes:[]}),S.push(E),k({type:"text",value:T})}else k({type:"text",value:"\\"+T});else k({type:"text",value:(y.keepEscaping?T:"")+C()});do{if(E=S.pop(),"root"!==E.type){E.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=S[S.length-1],t=e.nodes.indexOf(E);e.nodes.splice(t,1,...E.nodes)}}while(S.length>0);return k({type:"eos"}),w},Ke}function rt(){if(Xe)return ze;Xe=1;const e=Ze(),t=function(){if(He)return Fe;He=1;const e=tt(),t=Qe();return Fe=(n,r={})=>{const o=(n,i={})=>{const s=t.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,c=!0===s||!0===a,l=!0===r.escapeInvalid?"\\":"";let u="";if(!0===n.isOpen)return l+n.value;if(!0===n.isClose)return console.log("node.isClose",l,n.value),l+n.value;if("open"===n.type)return c?l+n.value:"(";if("close"===n.type)return c?l+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const o=t.reduce(n.nodes),i=e(...o,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)u+=o(e,n);return u};return o(n)},Fe}(),n=function(){if(Ge)return Ue;Ge=1;const e=tt(),t=Ze(),n=Qe(),r=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(r(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?r(n,e,o):n+e);return n.flatten(i)};return Ue=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,c={})=>{o.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(o.invalid||o.dollar)return void u.push(r(u.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void u.push(r(u.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=n.reduce(o.nodes);if(n.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(o,i)),u.push(r(u.pop(),c)),void(o.nodes=[])}const d=n.encloseBrace(o);let p=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,p=f.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(r(p.pop(),t.value)):t.nodes&&a(t,o):u.push(r(u.pop(),p,d)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(o))},Ue}(),r=nt(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return o.parse=(e,t={})=>r(e,t),o.stringify=(t,n={})=>e("string"==typeof t?o.parse(t,n):t,n),o.compile=(e,n={})=>("string"==typeof e&&(e=o.parse(e,n)),t(e,n)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ze=o}var ot,it,st,at,ct,lt,ut,dt,pt,ft,mt,ht,gt,yt,bt={};function vt(){if(it)return ot;it=1;const e=n,t="\\\\/",r=`[^${t}]`,o="\\.",i="\\/",s="[^/]",a=`(?:${i}|$)`,c=`(?:^|${i})`,l=`${o}{1,2}${a}`,u={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:a,DOTS_SLASH:l,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${c}${l})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${s}*?`,START_ANCHOR:c},d={...u,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${o}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${t}])${o}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:u}}function wt(){return st||(st=1,function(e){const t=n,r="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=vt();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(a,"\\$1"),e.toPosixSlashes=e=>e.replace(o,"/"),e.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===t.sep,e.escapeLast=(t,n,r)=>{const o=t.lastIndexOf(n,r);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,n,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(bt)),bt}function St(){if(ut)return lt;ut=1;const e=vt(),t=wt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=e=>{const t=[];let n=0,r=0,o=0,i="",s=!1;for(const a of e)if(!0!==s)if("\\"!==a)if('"'!==a){if(0===o)if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n)if("("===a)r++;else if(")"===a&&r>0)r--;else if("|"===a&&0===r){t.push(i),i="";continue}i+=a}else o=1===o?0:1,i+=a;else i+=a,s=!0;else i+=a,s=!1;return t.push(i),t},u=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(const n of e)if(!0!==t)if("\\"!==n){if(/[?*+@!()[\]{}]/.test(n))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,r=0,o=0,i=!1;for(let s=1;s<e.length;s++){const a=e[s];if(!0!==i)if("\\"!==a)if('"'!==a){if(1!==o)if("["!==a){if("]"===a&&n>0)n--;else if(!(n>0))if("("!==a){if(")"===a&&(r--,0===r)){if(!0===t&&s!==e.length-1)return;return{type:e[0],body:e.slice(2,s),end:s}}}else r++}else n++}else o=1===o?0:1;else i=!0;else i=!1}},p=e=>{let n=0;const r=[];for(;n<e.length;){const t=d(e.slice(n),!1);if(!t||"*"!==t.type)return;const o=l(t.body).map(e=>e.trim());if(1!==o.length)return;const i=u(o[0]);if(!i||1!==i.length)return;r.push(i),n+=t.end+1}if(r.length<1)return;return`${1===r.length?t.escapeRegex(r[0]):`[${r.map(e=>t.escapeRegex(e)).join("")}]`}*`},f=e=>{let t=0,n=e.trim(),r=d(n);for(;r;)t++,n=r.body.trim(),r=d(n);return t},m=(t,n)=>{if(!1===n.maxExtglobRecursion)return{risky:!1};const r="number"==typeof n.maxExtglobRecursion?n.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=l(t).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){const r=t[e],o=t[n],i=r[0];if(i&&r===i.repeat(r.length)&&o===i.repeat(o.length)&&(r===o||r.startsWith(o)||o.startsWith(r)))return!0}return!1})(o)))return{risky:!0};for(const e of o){const t=p(e);if(t)return{risky:!0,safeOutput:t};if(f(e)>r)return{risky:!0}}return{risky:!1}},h=(l,u)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const d={...u},p="number"==typeof d.maxLength?Math.min(n,d.maxLength):n;let f=l.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const g={type:"bos",value:"",output:d.prepend||""},y=[g],b=d.capture?"":"?:",v=t.isWindows(u),w=e.globChars(v),S=e.extglobChars(w),{DOT_LITERAL:E,PLUS_LITERAL:_,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:T,NO_DOT:O,NO_DOT_SLASH:R,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:D}=w,L=e=>`(${b}(?:(?!${D}${e.dot?T:E}).)*?)`,M=d.dot?"":O,N=d.dot?k:P;let $=!0===d.bash?L(d):I;d.capture&&($=`(${$})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const j={input:l,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};l=t.removePrefix(l,j),f=l.length;const B=[],F=[],H=[];let U,G=g;const W=()=>j.index===f-1,V=j.peek=(e=1)=>l[j.index+e],K=j.advance=()=>l[++j.index]||"",q=()=>l.slice(j.index+1),z=(e="",t=0)=>{j.consumed+=e,j.index+=t},X=e=>{j.output+=null!=e.output?e.output:e.value,z(e.value)},Y=()=>{let e=1;for(;"!"===V()&&("("!==V(2)||"?"===V(3));)K(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},Q=e=>{j[e]++,H.push(e)},Z=e=>{j[e]--,H.pop()},J=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=$,j.output+=G.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&X(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,y.push(e),G=e},ee=(e,t)=>{const n={...S[t],conditions:1,inner:""};n.prev=G,n.parens=j.parens,n.output=j.output,n.startIndex=j.index,n.tokensIndex=y.length;const r=(d.capture?"(":"")+n.open;Q("parens"),J({type:e,value:t,output:j.output?"":A}),J({type:"paren",extglob:!0,value:K(),output:r}),B.push(n)},te=e=>{const n=l.slice(e.startIndex,j.index+1),r=l.slice(e.startIndex+2,j.index),o=m(r,d);if(("plus"===e.type||"star"===e.type)&&o.risky){const r=o.safeOutput?(e.output?"":A)+(d.capture?`(${o.safeOutput})`:o.safeOutput):void 0,i=y[e.tokensIndex];i.type="text",i.value=n,i.output=r||t.escapeRegex(n);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return j.output=e.output+i.output,j.backtrack=!0,J({type:"paren",extglob:!0,value:U,output:""}),void Z("parens")}let i,s=e.close+(d.capture?")":"");if("negate"===e.type){let t=$;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=L(d)),(t!==$||W()||/^\)+$/.test(q()))&&(s=e.close=`)$))${t}`),e.inner.includes("*")&&(i=q())&&/^\.[^\\/.]+$/.test(i)){const n=h(i,{...u,fastpaths:!1}).output;s=e.close=`)${n})${t})`}"bos"===e.prev.type&&(j.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:U,output:s}),Z("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?n?n+o+(i?k.repeat(i.length):""):0===s?N+(i?k.repeat(i.length):""):k.repeat(r.length):"."===o?E.repeat(r.length):"*"===o?n?n+o+(i?$:""):$:n?t:`\\${t}`);return!0===e&&(n=!0===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===d.contains?(j.output=l,j):(j.output=t.wrapOutput(n,j,u),j)}for(;!W();){if(U=K(),"\0"===U)continue;if("\\"===U){const e=V();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){U+="\\",J({type:"text",value:U});continue}const t=/^\\+/.exec(q());let n=0;if(t&&t[0].length>2&&(n=t[0].length,j.index+=n,n%2!=0&&(U+="\\")),!0===d.unescape?U=K():U+=K(),0===j.brackets){J({type:"text",value:U});continue}}if(j.brackets>0&&("]"!==U||"["===G.value||"[^"===G.value)){if(!1!==d.posix&&":"===U){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),n=G.value.slice(e+2),o=r[n];if(o){G.value=t+o,j.backtrack=!0,K(),g.output||1!==y.indexOf(G)||(g.output=A);continue}}}("["===U&&":"!==V()||"-"===U&&"]"===V())&&(U=`\\${U}`),"]"!==U||"["!==G.value&&"[^"!==G.value||(U=`\\${U}`),!0===d.posix&&"!"===U&&"["===G.value&&(U="^"),G.value+=U,X({value:U});continue}if(1===j.quotes&&'"'!==U){U=t.escapeRegex(U),G.value+=U,X({value:U});continue}if('"'===U){j.quotes=1===j.quotes?0:1,!0===d.keepQuotes&&J({type:"text",value:U});continue}if("("===U){Q("parens"),J({type:"paren",value:U});continue}if(")"===U){if(0===j.parens&&!0===d.strictBrackets)throw new SyntaxError(c("opening","("));const e=B[B.length-1];if(e&&j.parens===e.parens+1){te(B.pop());continue}J({type:"paren",value:U,output:j.parens?")":"\\)"}),Z("parens");continue}if("["===U){if(!0!==d.nobracket&&q().includes("]"))Q("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));U=`\\${U}`}J({type:"bracket",value:U});continue}if("]"===U){if(!0===d.nobracket||G&&"bracket"===G.type&&1===G.value.length){J({type:"text",value:U,output:`\\${U}`});continue}if(0===j.brackets){if(!0===d.strictBrackets)throw new SyntaxError(c("opening","["));J({type:"text",value:U,output:`\\${U}`});continue}Z("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(U=`/${U}`),G.value+=U,X({value:U}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===d.literalBrackets){j.output+=n,G.value=n;continue}G.value=`(${b}${n}|${G.value})`,j.output+=G.value;continue}if("{"===U&&!0!==d.nobrace){Q("braces");const e={type:"brace",value:U,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};F.push(e),J(e);continue}if("}"===U){const e=F[F.length-1];if(!0===d.nobrace||!e){J({type:"text",value:U,output:U});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,d),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=j.output.slice(0,e.outputIndex),r=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",U=t="\\}",j.output=n;for(const e of r)j.output+=e.output||e.value}J({type:"brace",value:U,output:t}),Z("braces"),F.pop();continue}if("|"===U){B.length>0&&B[B.length-1].conditions++,J({type:"text",value:U});continue}if(","===U){let e=U;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),J({type:"comma",value:U,output:e});continue}if("/"===U){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",y.pop(),G=g;continue}J({type:"slash",value:U,output:x});continue}if("."===U){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=E);const e=F[F.length-1];G.type="dots",G.output+=U,G.value+=U,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){J({type:"text",value:U,output:E});continue}J({type:"dot",value:U,output:E});continue}if("?"===U){if(!(G&&"("===G.value)&&!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("qmark",U);continue}if(G&&"paren"===G.type){const e=V();let n=U;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(n=`\\${U}`),J({type:"text",value:U,output:n});continue}if(!0!==d.dot&&("slash"===G.type||"bos"===G.type)){J({type:"qmark",value:U,output:P});continue}J({type:"qmark",value:U,output:k});continue}if("!"===U){if(!0!==d.noextglob&&"("===V()&&("?"!==V(2)||!/[!=<:]/.test(V(3)))){ee("negate",U);continue}if(!0!==d.nonegate&&0===j.index){Y();continue}}if("+"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("plus",U);continue}if(G&&"("===G.value||!1===d.regex){J({type:"plus",value:U,output:_});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){J({type:"plus",value:U});continue}J({type:"plus",value:_});continue}if("@"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){J({type:"at",extglob:!0,value:U,output:""});continue}J({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const e=o.exec(q());e&&(U+=e[0],j.index+=e[0].length),J({type:"text",value:U});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=U,G.output=$,j.backtrack=!0,j.globstar=!0,z(U);continue}let e=q();if(!0!==d.noextglob&&/^\([^?]/.test(e)){ee("star",U);continue}if("star"===G.type){if(!0===d.noglobstar){z(U);continue}const t=G.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!r||e[0]&&"/"!==e[0])){J({type:"star",value:U,output:""});continue}const i=j.braces>0&&("comma"===t.type||"brace"===t.type),s=B.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!s){J({type:"star",value:U,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[j.index+4];if(t&&"/"!==t)break;e=e.slice(3),z("/**",3)}if("bos"===t.type&&W()){G.type="globstar",G.value+=U,G.output=L(d),j.output=G.output,j.globstar=!0,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&W()){j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=L(d)+(d.strictSlashes?")":"|$)"),G.value+=U,j.globstar=!0,j.output+=t.output+G.output,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=`${L(d)}${x}|${x}${n})`,G.value+=U,j.output+=t.output+G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){G.type="globstar",G.value+=U,G.output=`(?:^|${x}|${L(d)}${x})`,j.output=G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=L(d),G.value+=U,j.output+=G.output,j.globstar=!0,z(U);continue}const n={type:"star",value:U,output:$};!0!==d.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==d.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=R,G.output+=R):!0===d.dot?(j.output+=C,G.output+=C):(j.output+=M,G.output+=M),"*"!==V()&&(j.output+=A,G.output+=A)),J(n)):(n.output=U,J(n)):(n.output=".*?","bos"!==G.type&&"slash"!==G.type||(n.output=M+n.output),J(n))}for(;j.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));j.output=t.escapeLast(j.output,"["),Z("brackets")}for(;j.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing",")"));j.output=t.escapeLast(j.output,"("),Z("parens")}for(;j.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","}"));j.output=t.escapeLast(j.output,"{"),Z("braces")}if(!0===d.strictSlashes||"star"!==G.type&&"bracket"!==G.type||J({type:"maybe_slash",value:"",output:`${x}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};return h.fastpaths=(r,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=r.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);r=s[r]||r;const l=t.isWindows(o),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(l),v=i.dot?h:m,w=i.dot?g:m,S=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const _=e=>!0===e.noglobstar?E:`(${S}(?:(?!${b}${e.dot?f:u}).)*?)`,x=e=>{switch(e){case"*":return`${v}${p}${E}`;case".*":return`${u}${p}${E}`;case"*.*":return`${v}${E}${u}${p}${E}`;case"*/*":return`${v}${E}${d}${p}${w}${E}`;case"**":return v+_(i);case"**/*":return`(?:${v}${_(i)}${d})?${w}${p}${E}`;case"**/*.*":return`(?:${v}${_(i)}${d})?${w}${E}${u}${p}${E}`;case"**/.*":return`(?:${v}${_(i)}${d})?${u}${p}${E}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=x(t[1]);if(!n)return;return n+u+t[2]}}},A=t.removePrefix(r,{negated:!1,prefix:""});let T=x(A);return T&&!0!==i.strictSlashes&&(T+=`${d}?`),T},lt=h}function Et(){if(pt)return dt;pt=1;const e=n,t=function(){if(ct)return at;ct=1;const e=wt(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=vt(),g=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return at=(b,v)=>{const w=v||{},S=b.length-1,E=!0===w.parts||!0===w.scanToEnd,_=[],x=[],A=[];let T,O,R=b,C=-1,k=0,P=0,I=!1,D=!1,L=!1,M=!1,N=!1,$=!1,j=!1,B=!1,F=!1,H=!1,U=0,G={value:"",depth:0,isGlob:!1};const W=()=>C>=S,V=()=>R.charCodeAt(C+1),K=()=>(T=O,R.charCodeAt(++C));for(;C<S;){let e;if(O=K(),O!==r){if(!0===$||O===c){for(U++;!0!==W()&&(O=K());)if(O!==r)if(O!==c){if(!0!==$&&O===i&&(O=K())===i){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(!0!==$&&O===o){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===f&&(U--,0===U)){$=!1,I=G.isBrace=!0,H=!0;break}}else U++;else j=G.backslashes=!0,K();if(!0===E)continue;break}if(O!==a){if(!0!==w.noext&&!0==(O===d||O===n||O===t||O===p||O===s)&&V()===l){if(L=G.isGlob=!0,M=G.isExtglob=!0,H=!0,O===s&&C===k&&(F=!0),!0===E){for(;!0!==W()&&(O=K());)if(O!==r){if(O===m){L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(O===t){if(T===t&&(N=G.isGlobstar=!0),L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===p){if(L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===u){for(;!0!==W()&&(e=K());)if(e!==r){if(e===h){D=G.isBracket=!0,L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,K();if(!0===E)continue;break}if(!0===w.nonegate||O!==s||C!==k){if(!0!==w.noparen&&O===l){if(L=G.isGlob=!0,!0===E){for(;!0!==W()&&(O=K());)if(O!==l){if(O===m){H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(!0===L){if(H=!0,!0===E)continue;break}}else B=G.negated=!0,k++}else{if(_.push(C),x.push(G),G={value:"",depth:0,isGlob:!1},!0===H)continue;if(T===i&&C===k+1){k+=2;continue}P=C+1}}else j=G.backslashes=!0,O=K(),O===c&&($=!0)}!0===w.noext&&(M=!1,L=!1);let q=R,z="",X="";k>0&&(z=R.slice(0,k),R=R.slice(k),P-=k),q&&!0===L&&P>0?(q=R.slice(0,P),X=R.slice(P)):!0===L?(q="",X=R):q=R,q&&""!==q&&"/"!==q&&q!==R&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===w.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===j&&(q=e.removeBackslashes(q)));const Y={prefix:z,input:b,start:k,base:q,glob:X,isBrace:I,isBracket:D,isGlob:L,isExtglob:M,isGlobstar:N,negated:B,negatedExtglob:F};if(!0===w.tokens&&(Y.maxDepth=0,g(O)||x.push(G),Y.tokens=x),!0===w.parts||!0===w.tokens){let e;for(let t=0;t<_.length;t++){const n=e?e+1:k,r=_[t],o=b.slice(n,r);w.tokens&&(0===t&&0!==k?(x[t].isPrefix=!0,x[t].value=z):x[t].value=o,y(x[t]),Y.maxDepth+=x[t].depth),0===t&&""===o||A.push(o),e=r}if(e&&e+1<b.length){const t=b.slice(e+1);A.push(t),w.tokens&&(x[x.length-1].value=t,y(x[x.length-1]),Y.maxDepth+=x[x.length-1].depth)}Y.slashes=_,Y.parts=A}return Y},at}(),r=St(),o=wt(),i=vt(),s=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>s(e,t,n)),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=o.isWindows(t),l=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=l.state;delete l.state;let d=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};d=s(a.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:o,match:i,output:p}=s.test(n,l,t,{glob:e,posix:c}),f={glob:e,state:u,regex:l,posix:c,input:n,output:p,match:i,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):d(n)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof a.onMatch&&a.onMatch(f),!r||f)};return n&&(p.state=u),p};return s.test=(e,t,n,{glob:r,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(i?o.toPosixSlashes:null);let l=e===r,u=l&&c?c(e):e;return!1===l&&(u=c?c(e):e,l=u===r),!1!==l&&!0!==a.capture||(l=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,n,i):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},s.matchBase=(t,n,r,i=o.isWindows(r))=>(n instanceof RegExp?n:s.makeRe(n,r)).test(e.basename(t)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,n)=>t(e,n),s.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const l=s.toRegex(c,t);return!0===r&&(l.state=e),l},s.makeRe=(e,t={},n=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=r.fastpaths(e,t)),i.output||(i=r(e,t)),s.compileRe(i,t,n,o)},s.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=i,dt=s}function _t(){return mt?ft:(mt=1,ft=Et())}function xt(){if(yt)return Oe;yt=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.isAbsolute=Oe.partitionAbsoluteAndRelative=Oe.removeDuplicateSlashes=Oe.matchAny=Oe.convertPatternsToRe=Oe.makeRe=Oe.getPatternParts=Oe.expandBraceExpansion=Oe.expandPatternsWithBraceExpansion=Oe.isAffectDepthOfReadingPattern=Oe.endsWithSlashGlobStar=Oe.hasGlobStar=Oe.getBaseDirectory=Oe.isPatternRelatedToParentDirectory=Oe.getPatternsOutsideCurrentDirectory=Oe.getPatternsInsideCurrentDirectory=Oe.getPositivePatterns=Oe.getNegativePatterns=Oe.isPositivePattern=Oe.isNegativePattern=Oe.convertToNegativePattern=Oe.convertToPositivePattern=Oe.isDynamicPattern=Oe.isStaticPattern=void 0;const e=n,t=ke(),o=function(){if(gt)return ht;gt=1;const e=r,t=rt(),n=_t(),o=wt(),i=e=>""===e||"./"===e,s=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},a=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,c=e=>{s.add(e.output),r&&r.onResult&&r.onResult(e)};for(let s=0;s<t.length;s++){let l=n(String(t[s]),{...r,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let l=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(r&&0===l.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return l};return a.match=a,a.matcher=(e,t)=>n(e,t),a.any=a.isMatch=(e,t,r)=>n(t,r)(e),a.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],i=new Set(a(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||r.add(e);return[...r]},a.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>a.contains(t,e,r));if("string"==typeof n){if(i(t)||i(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return a.isMatch(t,n,{...r,contains:!0})},a.matchKeys=(e,t,n)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=a(Object.keys(e),t,n),i={};for(let t of r)i[t]=e[t];return i},a.some=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(o.some(e=>t(e)))return!0}return!1},a.every=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!o.every(e=>t(e)))return!1}return!0},a.all=(t,r,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,o)(t))},a.capture=(e,t,r)=>{let i=o.isWindows(r),s=n.makeRe(String(e),{...r,capture:!0}).exec(i?o.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},a.makeRe=(...e)=>n.makeRe(...e),a.scan=(...e)=>n.scan(...e),a.parse=(e,r)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),r))o.push(n.parse(e,r));return o},a.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!s(e)?[e]:t(e,n)},a.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return a.braces(e,{...t,expand:!0})},a.hasBraces=s,ht=a}(),i=/[*?]|^!/,s=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,c=/[!*+?@]\([^(]*\)/,l=/,|\.\./,u=/(?!^)\/{2,}/g;function d(e,t={}){return!p(e,t)}function p(e,t={}){return""!==e&&(!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(i.test(e)||s.test(e)||a.test(e))||(!(!1===t.extglob||!c.test(e))||!(!1===t.braceExpansion||!function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const r=e.slice(t,n);return l.test(r)}(e)))))}function f(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!f(e)}function h(e){return e.startsWith("..")||e.startsWith("./..")}function g(e){return e.endsWith("/**")}function y(e){const t=o.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function b(e,t){return o.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return Oe.isStaticPattern=d,Oe.isDynamicPattern=p,Oe.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Oe.convertToNegativePattern=function(e){return"!"+e},Oe.isNegativePattern=f,Oe.isPositivePattern=m,Oe.getNegativePatterns=function(e){return e.filter(f)},Oe.getPositivePatterns=function(e){return e.filter(m)},Oe.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!h(e))},Oe.getPatternsOutsideCurrentDirectory=function(e){return e.filter(h)},Oe.isPatternRelatedToParentDirectory=h,Oe.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Oe.hasGlobStar=function(e){return e.includes("**")},Oe.endsWithSlashGlobStar=g,Oe.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return g(t)||d(n)},Oe.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(y(t)),[])},Oe.expandBraceExpansion=y,Oe.getPatternParts=function(e,t){let{parts:n}=o.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===n.length&&(n=[e]),n[0].startsWith("/")&&(n[0]=n[0].slice(1),n.unshift("")),n},Oe.makeRe=b,Oe.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},Oe.matchAny=function(e,t){return t.some(t=>t.test(e))},Oe.removeDuplicateSlashes=function(e){return e.replace(u,"/")},Oe.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)v(r)?t.push(r):n.push(r);return[t,n]},Oe.isAbsolute=v,Oe}var At,Tt,Ot,Rt={};function Ct(){if(Tt)return At;Tt=1;const e=o.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return At=function(){const r=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,c=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0);null==s.highWaterMark&&(s.highWaterMark=65536);const l=e(s);function u(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],s));return d(),this}function d(){if(i)return;i=!0;let e=r.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,d())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",r),n()}function r(e){l.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",r),e.pipe(l,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);n()}function p(){i=!1,l.emit("queueDrain"),a&&l.end()}l.setMaxListeners(0),l.add=u,l.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&u.apply(null,o);return l},At}var kt,Pt,It,Dt={};function Lt(){if(kt)return Dt;return kt=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.isEmpty=Dt.isString=void 0,Dt.isString=function(e){return"string"==typeof e},Dt.isEmpty=function(e){return""===e},Dt}function Mt(){if(Pt)return ue;Pt=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;const e=pe();ue.array=e;const t=he();ue.errno=t;const n=function(){if(ge)return ye;ge=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ye.createDirentFromStats=function(t,n){return new e(t,n)},ye}();ue.fs=n;const r=we();ue.path=r;const o=xt();ue.pattern=o;const i=function(){if(Ot)return Rt;Ot=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.merge=void 0;const e=Ct();function t(e){e.forEach(e=>e.emit("close"))}return Rt.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},Rt}();ue.stream=i;const s=Lt();return ue.string=s,ue}var Nt,$t={},jt={},Bt={},Ft={},Ht={},Ut={},Gt={},Wt={},Vt={};function Kt(){if(Nt)return Vt;function e(e,t){e(t)}function t(e,t){e(null,t)}return Nt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(n,r,o){r.fs.lstat(n,(i,s)=>{null===i?s.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(o,n):void t(o,s);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Vt}var qt,zt={};var Xt,Yt,Qt,Zt,Jt,en,tn,nn={},rn={};function on(){if(Yt)return nn;Yt=1,Object.defineProperty(nn,"__esModule",{value:!0});const e=(Xt||(Xt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const n=t;e.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(rn)),rn);return nn.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},nn}function sn(){if(Qt)return Wt;Qt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.statSync=Wt.stat=Wt.Settings=void 0;const e=Kt(),t=(qt||(qt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.read=void 0,zt.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),zt),n=on();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Wt.Settings=n.default,Wt.stat=function(t,n,o){"function"!=typeof n?e.read(t,r(n),o):e.read(t,r(),n)},Wt.statSync=function(e,n){const o=r(n);return t.read(e,o)},Wt}
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */function an(){if(Jt)return Zt;let e;return Jt=1,Zt="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:ne):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var cn,ln={};function un(){if(cn)return ln;cn=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),r=t>10,o=10===t&&n>=10;return ln.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||o,ln}var dn,pn,fn={},mn={};function hn(){if(pn)return fn;pn=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.fs=void 0;const e=function(){if(dn)return mn;dn=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return mn.createDirentFromStats=function(t,n){return new e(t,n)},mn}();return fn.fs=e,fn}var gn,yn,bn={};function vn(){if(gn)return bn;return gn=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.joinPathSegments=void 0,bn.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t},bn}function wn(){if(yn)return Gt;yn=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=sn(),t=function(){if(tn)return en;tn=1,en=function(t,n){let r,o,i,s=!0;function a(t){function o(){n&&n(t,r),n=null}s?e(o):o()}function c(e,t,n){r[e]=n,(0===--o||t)&&a(t)}Array.isArray(t)?(r=[],o=t.length):(i=Object.keys(t),r={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),s=!1};const e=an();return en}(),n=un(),r=hn(),o=vn();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void n(o):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(n,i,s){i.fs.readdir(n,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void n(e);const a={name:t,path:s,dirent:r.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),n(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):i(e,t,r)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var Sn,En={};var _n,xn,An,Tn={},On={};function Rn(){return _n||(_n=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const n=t;e.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(On)),On}function Cn(){if(An)return Ut;An=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=wn(),t=function(){if(Sn)return En;Sn=1,Object.defineProperty(En,"__esModule",{value:!0}),En.readdir=En.readdirWithFileTypes=En.read=void 0;const e=sn(),t=un(),n=hn(),r=vn();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:r.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=r.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:n.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return En.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,n):i(e,n)},En.readdirWithFileTypes=o,En.readdir=i,En}(),r=function(){if(xn)return Tn;xn=1,Object.defineProperty(Tn,"__esModule",{value:!0});const e=n,t=sn(),r=Rn();return Tn.default=class{constructor(n={}){this._options=n,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=r.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Tn}();function o(e={}){return e instanceof r.default?e:new r.default(e)}return Ut.Settings=r.default,Ut.scandir=function(t,n,r){"function"!=typeof n?e.read(t,o(n),r):e.read(t,o(),n)},Ut.scandirSync=function(e,n){const r=o(n);return t.read(e,r)},Ut}var kn,Pn,In,Dn={exports:{}};function Ln(){if(In)return Dn.exports;In=1;var e=(Pn||(Pn=1,kn=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}}),kn);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(r),a=null,c=null,l=0,u=null,d={push:function(e,r){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=r||n,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:n,saturated:n,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=r||n,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:n,kill:function(){a=null,c=null,d.drain=n},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=n},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,r=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=n,e.errorHandler=null,o&&o(new Error("abort"),i),r.call(s,new Error("abort")),e.release(e),e=t}d.drain=n}};return d;function p(e){e&&s.release(e);var n=a;n&&l<=i?d.paused?l--:(c===a&&(c=null),a=n.next,n.next=null,o.call(t,n.value,n.worked),null===c&&d.empty()):0===--l&&d.drain()}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,r){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,s),o.call(e.context,t,r),e.release(e)}}return Dn.exports=t,Dn.exports.promise=function(e,r,o){"function"==typeof e&&(o=r,r=e,e=null);var i=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){s(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Dn.exports}var Mn,Nn={};function $n(){if(Mn)return Nn;return Mn=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.joinPathSegments=Nn.replacePathSegmentSeparator=Nn.isAppliedFilter=Nn.isFatalError=void 0,Nn.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Nn.isAppliedFilter=function(e,t){return null===e||e(t)},Nn.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Nn.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t},Nn}var jn,Bn,Fn,Hn={};function Un(){if(jn)return Hn;jn=1,Object.defineProperty(Hn,"__esModule",{value:!0});const e=$n();return Hn.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},Hn}function Gn(){if(Bn)return Ht;Bn=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Cn(),n=Ln(),r=$n(),o=Un();class s extends o.default{constructor(r,o){super(r,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Wn,Vn={};var Kn,qn,zn={},Xn={};function Yn(){if(qn)return zn;qn=1,Object.defineProperty(zn,"__esModule",{value:!0});const e=function(){if(Kn)return Xn;Kn=1,Object.defineProperty(Xn,"__esModule",{value:!0});const e=Cn(),t=$n(),n=Un();class r extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const r=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return Xn.default=r,Xn}();return zn.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},zn}var Qn,Zn,Jn={};function er(){if(Zn)return Bt;Zn=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Fn)return Ft;Fn=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Gn();return Ft.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Wn)return Vn;Wn=1,Object.defineProperty(Vn,"__esModule",{value:!0});const e=o,t=Gn();return Vn.default=class{constructor(n,r){this._root=n,this._settings=r,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Vn}(),r=Yn(),i=function(){if(Qn)return Jn;Qn=1,Object.defineProperty(Jn,"__esModule",{value:!0});const e=n,t=Cn();return Jn.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Jn}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,n,r){"function"!=typeof n?new e.default(t,s(n)).read(r):new e.default(t,s()).read(n)},Bt.walkSync=function(e,t){const n=s(t);return new r.default(e,n).read()},Bt.walkStream=function(e,n){const r=s(n);return new t.default(e,r).read()},Bt}var tr,nr={};function rr(){if(tr)return nr;tr=1,Object.defineProperty(nr,"__esModule",{value:!0});const e=n,t=sn(),r=Mt();return nr.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const n={name:t,path:t,dirent:r.fs.createDirentFromStats(t,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!r.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},nr}var or,ir,sr={};function ar(){if(or)return sr;or=1,Object.defineProperty(sr,"__esModule",{value:!0});const e=o,t=sn(),n=er(),r=rr();class i extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&o.push(t),e===r.length-1&&o.end(),s()}).catch(s);for(let e=0;e<r.length;e++)o.write(e);return o}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,r)=>null===e?t(r):n(e))})}}return sr.default=i,sr}var cr,lr,ur,dr={},pr={},fr={},mr={};function hr(){if(lr)return fr;lr=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=function(){if(cr)return mr;cr=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=Mt();return mr.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mr}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return fr.default=t,fr}var gr,yr={};var br,vr={};var wr,Sr,Er,_r={};function xr(){if(Sr)return dr;Sr=1,Object.defineProperty(dr,"__esModule",{value:!0});const e=n,t=function(){if(ur)return pr;ur=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=Mt(),t=hr();return pr.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),o=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,r,o){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},pr}(),r=function(){if(gr)return yr;gr=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=Mt();return yr.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,o]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(r),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&(!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(t,n,r){if(0===n.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const o=e.pattern.matchAny(t,n);return!o&&r?e.pattern.matchAny(t+"/",n):o}},yr}(),o=function(){if(br)return vr;br=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=Mt();return vr.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vr}(),i=function(){if(wr)return _r;wr=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Mt();return _r.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},_r}();return dr.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new r.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dr}function Ar(){if(Er)return $t;Er=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(ir)return jt;ir=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=er(),t=rr(),n=ar();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return jt.default=r,jt}(),t=xr();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return $t.default=n,$t}var Tr,Or={};var Rr,Cr,kr={},Pr={};function Ir(){if(Cr)return kr;Cr=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=function(){if(Rr)return Pr;Rr=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=sn(),t=er(),n=rr();class r extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const r of e){const e=this._getFullEntryPath(r),o=this._getEntry(e,r,t);null!==o&&t.entryFilter(o)&&n.push(o)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pr.default=r,Pr}(),t=xr();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return kr.default=n,kr}var Dr,Lr,Mr,Nr,$r,jr,Br,Fr,Hr,Ur,Gr={};function Wr(){if(Mr)return Lr;Mr=1;const n=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,n,r)),"."in d?o.push(a(".",l,n,r)):o.push(...s(d,n,r)),o}function r(t){return e.pattern.getPositivePatterns(t)}function o(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function s(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,o){return{dynamic:o,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=r(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=n(d,u,!1),m=n(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=n,le.getPositivePatterns=r,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),r=Ar(),i=function(){if(Tr)return Or;Tr=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=o,t=ar(),n=xr();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),o=this.api(n,t,r),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",r.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Or.default=r,Or}(),s=Ir(),a=(Dr||(Dr=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const r=t,o=e,i=Math.max(o.cpus().length,1);n.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:r.lstat,lstatSync:r.lstatSync,stat:r.stat,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},n.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},n.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gr)),Gr),c=Mt();async function l(e,t){d(e);const n=u(e,r.default,t),o=await Promise.all(n);return c.array.flatten(o)}function u(e,t,r){const o=[].concat(e),i=new a.default(r),s=n.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const n=u(e,s.default,t);return c.array.flatten(n)}function r(e,t){d(e);const n=u(e,i.default,t);return c.stream.merge(n)}var o,l;e.glob=e,e.globSync=t,e.globStream=r,e.async=e,e.sync=t,e.stream=r,e.generateTasks=function(e,t){d(e);const r=[].concat(e),o=new a.default(t);return n.generate(r,o)},e.isDynamicPattern=function(e,t){d(e);const n=new a.default(t);return c.pattern.isDynamicPattern(e,n)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Lr=l}function Vr(){if(Nr)return ce;Nr=1;var n=e,r=t,o=Wr(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,n){if("string"!=typeof e)throw new Error("msg must be a string");var r={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(n)?n.code=t:d(t)?n=t:"number"==typeof t?n={code:t}:"number"!=typeof t&&(n={}),n=Object.assign({},r,n),u.errorCode||(u.errorCode=n.code);var o=f(n.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,n.fatal){var i=new Error(o);throw i.code=n.code,i}if(e.length>0&&!n.silent&&p(o),!n.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,n){var r;return e instanceof Array?((r=e).stdout=e.join("\n"),e.length>0&&(r.stdout+="\n")):(r=new String(e)).stdout=e,r.stderr=t,r.code=n,_.forEach(function(e){r[e]=s[e].bind(r)}),r}function y(e,t,n){if(n=n||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(n))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var r={};if(Object.keys(t).forEach(function(e){var n=t[e];"!"!==n[0]&&(r[n]=!1)}),""===e)return r;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?r[o.slice(1)]=!1:r[o]=!0}else h("option not recognized: "+e,n)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];r[s]=e[o]}else h("option not recognized: "+i,n)}else o in r?r[o]=e[o]:h("option not recognized: {"+o+":...}",n)});return r}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var n,r=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(n){var r=t[n];n in l.globOptions&&(e[r]=l.globOptions[n])});var n={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(n).forEach(function(t){var r=n[t];t in l.globOptions&&(e[r]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{n=o.sync(e,r)}catch(t){n=[e]}n=n.length>0?n.sort():[e],r.nodir&&(n=n.filter(function(e){return!w(e).isDirectory()})),t=t.concat(n)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return r.lstatSync.apply(r,arguments)}function S(e,t,r){return r=r||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===r.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=n.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==r.allowGlobbing||(i=i.slice(0,r.globStart).concat(b(i.slice(r.globStart))));try{d(r.cmdOptions)&&(i[0]=y(i[0],r.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||r.handlesFatalDynamically)throw e}return r.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{r.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;r.chmodSync(e,"0666"),r.unlinkSync(e)}},ce.statFollowLinks=function(){return r.statSync.apply(r,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var n="",r=0;r<t;r++)n+=e(1);return n}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,n){if(n=n||{},Object.keys(n).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof n[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof n[e]+"' for option '"+e+"'")}),n=Object.assign({},E,n),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");n.pipeOnly?(n.canReceivePipe=!0,s[e]=S(e,t,n)):i[e]=S(e,t,n),n.canReceivePipe&&_.push(e)},ce}function Kr(){if(jr)return $r;jr=1;var e=t,n=Vr();function r(t,r){var i=n.readFromPipe();return r||i||n.error("no paths given"),(r=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?n.statFollowLinks(t).isDirectory()&&n.error(t+": Is a directory"):n.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),n=t.pop();t=t.map(function(e,t){return o(t+1,e)}),n.length&&(n=o(t.length+1,n));return t.push(n),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return n.register("cat",r,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$r=r}function qr(){if(Fr)return Br;Fr=1;var t=e,n=Vr();function r(e,r){r||(r=t.homedir()),"-"===r&&(process.env.OLDPWD?r=process.env.OLDPWD:n.error("could not find previous directory"));try{var o=process.cwd();process.chdir(r),process.env.OLDPWD=o}catch(e){var i;try{n.statFollowLinks(r),i="not a directory: "+r}catch(e){i="no such file or directory: "+r}i&&n.error(i)}return""}return n.register("cd",r,{}),Br=r}var zr,Xr,Yr,Qr,Zr,Jr,eo,to,no={exports:{}},ro={exports:{}};function oo(){if(Xr)return zr;Xr=1,zr=r,r.sync=function(t,r){return n(e.statSync(t),t,r)};var e=t;function n(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function r(t,r,o){e.stat(t,function(e,i){o(e,!e&&n(i,t,r))})}return zr}function io(){if(Qr)return Yr;Qr=1,Yr=n,n.sync=function(t,n){return r(e.statSync(t),n)};var e=t;function n(t,n,o){e.stat(t,function(e,t){o(e,!e&&r(t,n))})}function r(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=n&l||n&c&&o===s||n&a&&r===i||n&u&&0===i;return d}(e,t)}return Yr}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=n,r=e?";":":",o=function(){if(Jr)return Zr;var e;function t(n,r,o){if("function"==typeof r&&(o=r,r={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(n,r||{},function(t,n){t?o(t):e(n)})})}e(n,r||{},function(e,t){e&&("EACCES"===e.code||r&&r.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jr=1,e="win32"===process.platform||ne.TESTING_WINDOWS?oo():io(),Zr=t,t.sync=function(t,n){try{return e.sync(t,n||{})}catch(e){if(n&&n.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zr}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,n)=>{const o=n.colon||r,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(o)],s=e?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,n,r)=>{"function"==typeof n&&(r=n,n={}),n||(n={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,n),u=[],d=r=>new Promise((o,s)=>{if(r===a.length)return n.all&&u.length?o(u):s(i(e));const c=a[r],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,r,0))}),p=(e,t,r)=>new Promise((i,s)=>{if(r===c.length)return i(d(t+1));const a=c[r];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!n.all)return i(e+a);u.push(e+a)}return i(p(e,t,r+1))})});return r?d(0).then(e=>r(null,e),r):d(0)};return eo=a,a.sync=(e,n)=>{n=n||{};const{pathEnv:r,pathExt:a,pathExtExe:c}=s(e,n),l=[];for(let i=0;i<r.length;i++){const s=r[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!n.all)return t;l.push(t)}}catch(e){}}}if(n.all&&l.length)return l;if(n.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const n=t.match(e);if(!n)return null;const[r,o]=n[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=n,r=function(){if(lo)return co;lo=1;const e=n,t=so(),r=po();function o(n,o){const i=n.options.env||process.env,s=process.cwd(),a=null!=n.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(n.options.cwd)}catch(e){}let l;try{l=t.sync(n.command,{path:i[r({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?n.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,n){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),n&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,n=Co();return bo=function(t){const r=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,r,0,150,0),e.closeSync(o)}catch(e){}return n(r.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const n=function(e){e.file=r(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}(t),l=!a.test(n);if(t.options.forceShell||l){const r=c.test(n);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,r));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:l(r)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(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 n(n,r){return e&&1===n&&!r.file?t(r.original,"spawn"):null}return Eo={hookChildProcess:function(t,r){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=n(i,r);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:n,verifyENOENTSync:function(n,r){return e&&1===n&&!r.file?t(r.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return ro.exports;xo=1;const e=s,t=ko(),n=Po();function r(r,o,i){const s=t(r,o,i),a=e.spawn(s.command,s.args,s.options);return n.hookChildProcess(a,s),a}return ro.exports=r,ro.exports.spawn=r,ro.exports.sync=function(r,o,i){const s=t(r,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||n.verifyENOENTSync(a.status,s),a},ro.exports._parse=t,ro.exports._enoent=n,ro.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,n=(n,r={})=>{if("function"!=typeof n)throw new TypeError("Expected a function");let o,i=0;const s=n.displayName||n.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=n.apply(this,e),n=null;else if(!0===r.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,n),t.set(a,i),a};return $o.exports=n,$o.exports.default=n,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const r=n-t+1;return Array.from({length:r},e)};const e=function(e,n){return{name:`SIGRT${n+1}`,number:t+n,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,n=64;return Yo.SIGRTMAX=n,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,n=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{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:!0},{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:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{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"}]),Wo),r=Qo();Go.getSignals=function(){const e=(0,r.getRealtimeSignals)();return[...n.SIGNALS,...e].map(o)};const o=function({name:e,number:n,description:r,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:n,description:r,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,n=Zo(),r=Qo();const o=function(e,{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:a}}},i=(0,n.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const n=a(e,t);if(void 0===n)return{};const{name:r,description:o,supported:i,action:s,forced:c,standard:l}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,n){const r=n.find(({name:n})=>t.constants.signals[n]===e);return void 0!==r?r:n.find(t=>t.number===e)},c=function(){const e=(0,n.getSignals)(),t=r.SIGRTMAX+1,o=Array.from({length:t},(t,n)=>s(n,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:n,all:r,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,n,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=n,void 0!==r&&(o.all=r),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ni(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:n}=t;if(void 0===n)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof n)return n;if(!Array.isArray(n))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``);const r=Math.max(n.length,e.length);return Array.from({length:r},(e,t)=>n[t])};return ti.exports=t,ti.exports.node=e=>{const n=t(e);return"ipc"===n?"ipc":void 0===n||"string"==typeof n?[n,n,n,"ipc"]:n.includes("ipc")?n:[...n,"ipc"]},ti.exports}var ri,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ri||(ri=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,n=function(){if(oi)return li.exports;oi=1;var e=ne.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var n,r=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?n=e.__signal_exit_emitter__:((n=e.__signal_exit_emitter__=new c).count=0,n.emitted={}),n.infinite||(n.setMaxListeners(1/0),n.infinite=!0),li.exports=function(e,o){if(!t(ne.process))return function(){};r.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),n.on(i,e),function(){n.removeListener(i,e),0===n.listeners("exit").length&&0===n.listeners("afterexit").length&&l()}};var l=function(){p&&t(ne.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,n.count-=1)};li.exports.unload=l;var u=function(e,t,r){n.emitted[e]||(n.emitted[e]=!0,n.emit(e,t,r))},d={};o.forEach(function(r){d[r]=function(){t(ne.process)&&e.listeners(r).length===n.count&&(l(),u("exit",null,r),u("afterexit",null,r),s&&"SIGHUP"===r&&(r="SIGINT"),e.kill(e.pid,r))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(ne.process)&&(p=!0,n.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(n){t(ne.process)&&(e.exitCode=n||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(n,r){if("exit"===n&&t(ne.process)){void 0!==r&&(e.exitCode=r);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),r=(e,t,n,r)=>{if(!o(t,n,r))return;const i=c(n),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},n)=>s(e)&&!1!==t&&n,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;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};return ii={spawnedKill:(e,t="SIGTERM",n={})=>{const o=e(t);return r(e,t,n,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const i=new Promise((r,i)=>{o=setTimeout(()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,i)},t)}),s=r.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:r},o)=>{if(!t||r)return o;const i=n(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:n}=t;let{encoding:r}=t;const o="buffer"===r;let i=!1;n?i=!(r||o):r=r||"utf8",o&&(r=null);const s=new e({objectMode:i});r&&s.setEncoding(r);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>n?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:n}=r,i=ki(),s=n(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,n){if(!t)throw new Error("Expected a stream");n={maxBuffer:1/0,...n};const{maxBuffer:r}=n,o=i(n);return await new Promise((n,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),n()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>r&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],n=new e({objectMode:!0});return n.setMaxListeners(0),n.add=r,n.isEmpty=function(){return 0==t.length},n.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(r),n;function r(e){return Array.isArray(e)?(e.forEach(r),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",n.emit.bind(n,"error")),e.pipe(n,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&n.readable&&n.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),n=Ii(),r=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:n,buffer:r,maxBuffer:o})=>{if(e&&r)return n?t(e,{encoding:n,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,n)=>{void 0!==n&&void 0!==t.stdin&&(e(n)?n.pipe(t.stdin):t.stdin.end(n))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=n();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(n,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},r(e,l),r(t,u),r(n,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,n=/"/g,r=/ +/g;return Ei={joinCommand:(t,n)=>e(t,n).join(" "),getEscapedCommand:(r,o)=>e(r,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(n,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const n of e.trim().split(r)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}}}function Mi(){if(xi)return no.exports;xi=1;const e=n,t=s,r=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=n,r=po(),o=e=>{let n;e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;n!==o;)i.push(t.join(o,"node_modules/.bin")),n=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const n={...(t={env:process.env,...t}).env},o=r({env:n});return t.path=n[o],n[o]=e.exports(t),n}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ni(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,n)=>{for(const[r,o]of t){const t="function"==typeof n?(...e)=>Reflect.apply(o.value,n(),e):o.value.bind(n);Reflect.defineProperty(e,r,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,n)=>{e.on("exit",(e,n)=>{t({exitCode:e,signal:n})}),e.on("error",e=>{n(e)}),e.stdin&&e.stdin.on("error",e=>{n(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,n,o={})=>{const s=r._parse(t,n,o);return t=s.command,n=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;return n?i.env({env:s,cwd:r,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&n.unshift("/q"),{file:t,args:n,options:o,parsed:s}},A=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===n?void 0:"",T=(e,n,r)=>{const o=x(e,n,r),i=S(e,n),s=_(e,n);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const n=new t.ChildProcess,r=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(n,r)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:n,timedOut:r},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==n){const a=c({error:e,exitCode:t,signal:n,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:r,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return no.exports=T,no.exports.sync=(e,n,r)=>{const o=x(e,n,r),i=S(e,n),s=_(e,n);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},no.exports.command=(e,t)=>{const[n,...r]=E(e);return T(n,r,t)},no.exports.commandSync=(e,t)=>{const[n,...r]=E(e);return T.sync(n,r,t)},no.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=l.node(n),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=n;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})},no.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vr();function n(n,r,o,i){if(r||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(r,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${r}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+r+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",n,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=n}function $i(){if(Ri)return Oi;Ri=1;var e=t,r=n,o=Vr();function i(t,n,r){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(r.update&&o.statFollowLinks(t).mtime<e.statSync(n).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!r.followsymlink){try{o.statNoFollowLinks(n),o.unlinkSync(n)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,n,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(n,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+n)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;r.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,n,r,c){if(c||(c={}),!(r>=o.config.maxdepth)){r++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(n)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=n+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,r,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,r,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(n,u.atime,u.mtime),e.chmodSync(n,u.mode)}}function a(t,n){if(o.statNoFollowLinks(n).isSymbolicLink()&&o.statFollowLinks(n).isDirectory()){var r=e.realpathSync(t),i=e.realpathSync(n);if(new RegExp(i).test(r))return!0}return!1}function c(t,n,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(n=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(n.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(n.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?r.join(a,r.basename(c)):a;try{o.statFollowLinks(r.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=r.normalize(a+"/"+r.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var n=e[t];return e.slice(0,t).some(function(e){return r.basename(e)===r.basename(n)})}(n,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===r.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,ns,rs,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var n,r=e,o=t,i=Vr();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return n||(n=s(r.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return n},Ns.clearCache=function(){n=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=n;function t(){return e.resolve(process.cwd())}return Vr().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=n,r=t,o=s,i=Vr(),a=$s().tempDir,c=js(),l=20971520;function u(t,n,s){n=n||{};var u=i.readFromPipe();if("function"==typeof n&&(s=n,n={async:!0}),"object"==typeof n&&"function"==typeof s&&(n.async=!0),n=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},n),!t)try{i.error("must specify command")}catch(e){if(n.fatal)throw e;return}return n.async?function(e,t,n,r){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,n){r&&(e?void 0===e.code?r(1,t,n):r(e.code,t,n):r(0,t,n))});return n&&s.stdin.end(n),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,n,u,s):function(t,n,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(n.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());n=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},n),r.existsSync(d)&&i.unlinkSync(d),r.existsSync(p)&&i.unlinkSync(p),r.existsSync(f)&&i.unlinkSync(f),n.cwd=e.resolve(n.cwd);var m={command:t,execOptions:n,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){r.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];n.silent?n.stdio="ignore":n.stdio=[0,1,2];var y=0;try{delete n.shell,o.execFileSync(i.config.execPath,g,n)}catch(e){y=e.status||1}var b="",v="";"buffer"===n.encoding?(b=r.readFileSync(f),v=r.readFileSync(p)):(b=r.readFileSync(f,n.encoding),v=r.readFileSync(p,n.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:n.fatal}),i.ShellString(b,v,y)}(t,n,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=n,r=t,o=Wr(),i=Vr();function s(t,n){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),n=n?[].slice.call(arguments,1):["."];var s=[];function a(e,n,r){var o,a;"win32"===process.platform&&(n=n.replace(/\\/g,"/")),t.long?(r=r||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=n,(a=r).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(n)}return n.forEach(function(n){var s;try{if((s=t.link?i.statFollowLinks(n):i.statNoFollowLinks(n)).isSymbolicLink())try{var c=i.statFollowLinks(n);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+n,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(n+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(n,t)&&a(t,e.relative(n,t))}):t.all?r.readdirSync(n).forEach(function(t){a(e.join(n,t),t)}):r.readdirSync(n).forEach(function(t){"."!==t[0]&&a(e.join(n,t),t)}):a(n,n,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,n=Vr();function r(t,r){var o=[],i=n.readFromPipe();r||i||n.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),r=[].slice.call(arguments,s),i&&r.unshift("-");var a=!1;return r.forEach(function(r){if("-"!==r){if(!e.existsSync(r))return void n.error("no such file or directory: "+r,{continue:!0});if(n.statFollowLinks(r).isDirectory())return void n.error("error reading '"+r+"': Is a directory",{continue:!0})}var s;s="-"===r?i:t.numLines<0?e.readFileSync(r,"utf8"):function(t,r){for(var o=n.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<r;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(r,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return n.register("head",r,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=r}function Us(){if(os)return rs;os=1;var e=t,r=n,o=Vr();function i(t){var n=r.dirname(t);n===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(n)||i(n);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,n){return n||o.error("no paths given"),"string"==typeof n&&(n=[].slice.call(arguments,1)),n.forEach(function(n){try{var s=o.statNoFollowLinks(n);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+n+": File exists",{continue:!0}):o.error("path already exists: "+n,{continue:!0}))}catch(e){}var a=r.dirname(n);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(r.resolve(n)):e.mkdirSync(n,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+n+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),rs=s}function Gs(){if(ss)return is;ss=1;var e=t,n=Vr();function r(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(n.statNoFollowLinks(l).isDirectory())r(l,i);else if(i||o(l))try{n.unlinkSync(l)}catch(e){n.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){n.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var n=!0;try{var r=e.openSync(t,"a");e.closeSync(r)}catch(e){n=!1}return n}function i(e,t){return t||n.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=n.statNoFollowLinks(s)}catch(r){return void(e.force||n.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?n.unlinkSync(e):n.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?r(e,t.force):n.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=n.statFollowLinks(e)}catch(t){return void n.unlinkSync(e)}o.isFile()?n.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?r(e,t.force,!0):n.error("path is a directory",{continue:!0}):n.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){n.unlinkSync(e)}(t)}),""}return n.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,r=n,o=Vr(),i=$i(),s=Gs();function a(t,n,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(n=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof n?n=[n]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(n.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),n.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=r.normalize(a+"/"+r.basename(c))),e.existsSync(u)&&function(e,t){var n=e[t];return e.slice(0,t).some(function(e){return r.basename(e)===r.basename(n)})}(n,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(r.resolve(c)!==r.dirname(r.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,r=n,o=Vr();function i(t,n){n||o.error("wrong arguments"),e.existsSync(r.dirname(n))||o.error("no such file or directory: "+r.dirname(n));try{return e.writeFileSync(n,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+n,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,r=n,o=Vr();function i(t,n){n||o.error("wrong arguments"),e.existsSync(r.dirname(n))||o.error("no such file or directory: "+r.dirname(n));try{return e.appendFileSync(n,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+n,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,n=Vr();function r(t,r){return r?"string"==typeof r?r=[].slice.call(arguments,1):n.error("file arg should be a string file path or an Array of string file paths"):n.error("no files given"),r.forEach(function(r){!function(t,r){var i=o(r);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(r,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||n.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(r,c,a)}(t,r)}),""}function o(e){try{return n.statFollowLinks(e)}catch(e){return null}}return n.register("touch",r,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=r}function zs(){if(Ts)return As;Ts=1;var e=t,n=Vr();function r(t,r,o){var i=n.readFromPipe();i||(r||n.error("no input given"),e.existsSync(r)?n.statFollowLinks(r).isDirectory()&&n.error("error reading '"+r+"'"):n.error(r+": No such file or directory")),o&&e.existsSync(o)&&n.statFollowLinks(o).isDirectory()&&n.error(o+": Is a directory");var s=(r?e.readFileSync(r,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,n){return 0===e.length?[{count:1,ln:n}]:0===function(e,n){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(n.toLocaleLowerCase()):e.localeCompare(n)}(e[0].ln,n)?[{count:e[0].count+1,ln:n}].concat(e.slice(1)):[{count:1,ln:n}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var n=""+t;return n.length<e&&(n=Array(e-n.length+1).join(" ")+n),n}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new n.ShellString(a).to(o),""):a}return n.register("uniq",r,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=r}function Xs(){if(Rs)return Os;Rs=1;var e=t,r=n,o=Vr();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(r.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var n=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(r.resolve(t));else{var d=[""];if(n)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=r.resolve(s[p],t);n&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vr();return ae.exports=e.shell,Kr(),qr(),function(){if(Ur)return Hr;Ur=1;var e,r=t,o=n,i=Vr(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,n){var a;return n||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),n=[].slice.call(arguments,2),e.recursive?(a=[],n.forEach(function e(t){var n=i.statNoFollowLinks(t);n.isSymbolicLink()||(a.push(t),n.isDirectory()&&r.readdirSync(t).forEach(function(n){e(t+"/"+n)}))})):a=n,a.forEach(function(n){if(n=o.resolve(n),r.existsSync(n)||i.error("File not found: "+n),!e.recursive||!i.statNoFollowLinks(n).isSymbolicLink()){var a=i.statFollowLinks(n),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(n).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(n+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(n+" -> "+d.toString(8)),r.chmodSync(n,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(n).isDirectory()&&(d|=s.SETUID+s.SETGID&l),r.chmodSync(n,d))}}),""}i.register("chmod",a,{}),Hr=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=n,t=Vr(),r=qr();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(n,c){i(n)&&(c=n,n=""),n=t.parseOptions(n,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else n["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return n["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),r("",c)),o=l,u(n.quiet?"-q":"")}function l(n,a){if(i(n)&&(a=n,n=""),n=t.parseOptions(n,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),n["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());r("",c)}return u(n.quiet?"-q":"")}function u(e,n){if(i(e)&&(n=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var r=a();return n?((n=s(n))<0&&(n=r.length+n),e.quiet||t.log(r[n]),r[n]):(e.quiet||t.log(r.join(" ")),r)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=r.format,t=Vr();function n(n){var r=[].slice.call(arguments,n?0:1),o={};try{o=t.parseOptions(r[0],{e:"escapes",n:"no_newline"},{silent:!0}),r[0]&&r.shift()}catch(e){t.state.error=null}var i=e.apply(null,r);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",n,{allowGlobbing:!1}),Bi=n}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=n,t=Vr(),r=Fs();function o(n,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&r({recursive:!0,all:!0,link:n.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,n=Vr();function r(t,r,o){var i=n.readFromPipe();o||i||n.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&n.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&n.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&n.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),r=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(r=new RegExp(r,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(r)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,n){var o=e.match(r);if(t.inverse&&!o||!t.inverse&&o){var i=n+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(n-t.beforeContext,0),n).forEach(function(e,t,r){var o=""+(n-r.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(n+1,Math.min(n+t.afterContext+1,a.length-1)).forEach(function(e,t){var r=""+(n+1+t+1);s.hasOwnProperty(r)||(s[r]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var n=e[0],r=e[1].line,o=e[1].match;return t.lineNumber?n+(o?":":"-")+r:r}).join("\n")}))}}else n.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==n.state.errorCode&&n.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}n.register("grep",r,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=r}(),Hs(),function(){if(ns)return ts;ns=1;var e=t,r=n,o=Vr();function i(t,n,i){n&&i||o.error("Missing <source> and/or <dest>"),n=String(n);var s=r.normalize(n).replace(RegExp(r.sep+"$"),""),a=r.resolve(n)===s;if(i=r.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:r.resolve(process.cwd(),r.dirname(i),n);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:n,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(n)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(n,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,n=Vr();function r(t,r,o,i){var s=n.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():n.error("invalid replacement string")),"string"==typeof r&&(r=RegExp(r)),i||s||n.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(r,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else n.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}n.register("sed",r,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=r}(),function(){if(ps)return ds;ps=1;var e=Vr();function t(t){if(!t){var n=[].slice.call(arguments,0);n.length<2&&e.error("must provide an argument"),t=n[1]}var r="+"===t[0];r&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),r&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(n){r!==t[n]&&(e.config[n]=t[n])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,n=Vr();function r(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var n=e.toLowerCase(),r=t.toLowerCase();return n===r?-1*e.localeCompare(t):n.localeCompare(r)}function i(e,t){var n=r(e),i=r(t);return n.hasOwnProperty("num")&&i.hasOwnProperty("num")&&n.num!==i.num?n.num-i.num:o(n.value,i.value)}function s(t,r){var s=n.readFromPipe();r||s||n.error("no files given"),r=[].slice.call(arguments,1),s&&r.unshift("-");var a=r.reduce(function(t,r){if("-"!==r){if(!e.existsSync(r))return n.error("no such file or directory: "+r,{continue:!0}),t;if(n.statFollowLinks(r).isDirectory())return n.error("read failed: "+r+": Is a directory",{continue:!0}),t}var o="-"===r?s:e.readFileSync(r,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}n.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,n=Vr();function r(t,r){var o=[],i=n.readFromPipe();r||i||n.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),r=[].slice.call(arguments,s),i&&r.unshift("-");var c=!1;return r.forEach(function(r){if("-"!==r){if(!e.existsSync(r))return void n.error("no such file or directory: "+r,{continue:!0});if(n.statFollowLinks(r).isDirectory())return void n.error("error reading '"+r+"': Is a directory",{continue:!0})}var s=("-"===r?i:e.readFileSync(r,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}n.register("tail",r,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=r}(),$s(),function(){if(bs)return ys;bs=1;var e=t,n=Vr();function r(t,r){r||n.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||n.error("could not interpret expression"),t.link)try{return n.statNoFollowLinks(r).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(r))return!1;if(t.exists)return!0;var i=n.statFollowLinks(r);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}n.register("test",r,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=r}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vr();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vr();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vr();Object.keys(e).forEach(function(t){ne[t]=e[t]});var n=Vs();String.prototype.to=t.wrap("to",n);var r=Ks();String.prototype.toEnd=t.wrap("toEnd",r)}(),ne.config.fatal=!0,ne.target={};var e,t=process.argv.slice(2),n=t.indexOf("--");n>-1&&(e=t.slice(n+1,t.length),t=t.slice(0,n)),setTimeout(function(){var n;if(1!==t.length||"--help"!==t[0]){for(n in ne.target)(function(e,t){ne.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(n,ne.target[n]);t.length>0?t.forEach(function(t){t in ne.target?ne.target[t](e):console.log("no such target: "+t)}):"all"in ne.target&&ne.target.all(e)}else for(n in console.log("Available targets:"),ne.target)console.log(" "+n)},0)}();const Zs=(e,t)=>{const n=ta(Js(e));if("string"!=typeof n)throw new TypeError(`${t} must be a string or a file URL: ${n}.`);return n},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,na=(e,t=[],n={})=>{const r=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,n];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[r,s,i]},{toString:ra}=Object.prototype,oa=e=>"[object Uint8Array]"===ra.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const n=new A(t),r=e.map(e=>"string"==typeof e?aa(e):e).map(e=>n.write(e)),o=n.end();return""===o?r:[...r,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let n=0;for(const r of e)t.set(r,n),n+=r.length;return t},ma=e=>{let t=0;for(const n of e)t+=n.length;return t},ha=({templates:e,expressions:t,tokens:n,index:r,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[r]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[r]),c=va(n,i,s);if(r===t.length)return c;const l=t[r],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const n=[];let r=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))r!==o&&n.push(e.slice(r,o)),r=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=r===e.length;return i||n.push(e.slice(r)),{nextTokens:n,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,n)=>n||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const n=Array.from({length:Oa(e)+1}),r=Ra(e[t],n,t);return Ma(r,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,n)=>Qs(e)?Ca(e,t,n):t.fill(e),Ca=(e,t,n)=>{for(const r of Object.keys(e).sort(ka))for(const o of Ia(r,n,t))t[o]=e[r];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,n)=>{if("ipc"===e)return[n.length-1];const r=Da(e);if(void 0===r||0===r)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(r>=n.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===r?[1,2]:[r]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const n=e.codePointAt(0),r=n.toString(16);return n<=Ya?`\\u${r.padStart(4,"0")}`:`\\U${r}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={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:"╱"},ec={...Ja,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:"⅒"},tc={...Ja,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"},nc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:n}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===n||"vscode"===n||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),rc=nc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const n=`[${e}m`,r=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(r);if(-1===i)return n+o+r;let s=n,a=0;const c=(22===t?r:"")+n;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+r.length,i=o.indexOf(r,a);return s+=o.slice(a)+r,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?rc.cross:rc.warning:rc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,n)=>{const r=(({verbose:e},t)=>{const n=Ha(e,t);return Ga(n)?n:void 0})(t,n);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,r)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,n)=>{if(void 0===n)return e;const r=n(e,t);return"string"==typeof r?r:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:n,verboseInfo:r,result:o})=>{const i=wc({type:e,result:o,verboseInfo:r}),s=Sc(t,i),a=gc(s,r,n);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:n,commandId:r,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:n,commandId:`${r}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:n,piped:r,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(n),c=fc[e]({failed:i,reject:s,piped:r}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,n)=>{const r=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const n=[e,...t];return{command:n.join(" "),escapedCommand:n.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,n)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:n}))(Ta(n,"verbose"),i,{...n});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:r,verboseInfo:s}};var Pc=re(Io());function Ic(e={}){const{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,n)=>{for(const r of function(e){return{*[Symbol.iterator](){let t,n=l.resolve(Dc(e));for(;t!==n;)yield n,t=n,n=l.resolve(n,"..")}}}(n)){const n=l.join(r,"node_modules/.bin");t.includes(n)||e.push(n)}},Mc=(e,t,n,r)=>{const o=l.resolve(r,Dc(n),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const n=Ic({env:e={...e}});return t.path=e[n],e[n]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:n=!0,execPath:r=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return n&&Lc(s,a,i),o&&Mc(s,a,r,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{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:!0},{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:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{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"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:o,standard:i}},Xc=({name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:n,supported:r,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const n=Zc(e,t);if(void 0===n)return{};const{name:r,description:o,supported:i,action:s,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const n=t.find(({name:t})=>H.signals[t]===e);return void 0!==n?n:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,n=Array.from({length:t},(t,n)=>Qc(n,e));Object.assign({},...n)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return rl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(nl.has(e))return nl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},nl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),rl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:n},onInternalError:r,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,n);dl(l,r);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:n,killResult:u,context:o,controller:i}),u},ul=(e,t,n)=>{const[r=n,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof r&&!Number.isInteger(r))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(r)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(r),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:n,killSignal:r,killResult:o,context:i,controller:s})=>{t===r&&o&&fl({kill:e,forceKillAfterDelay:n,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:n,controllerSignal:r})=>{if(!1!==t)try{await j(t,void 0,{signal:r}),e("SIGKILL")&&(n.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:n,context:r,controller:o})=>void 0===t||n?[]:[gl(e,t,r,o)],gl=async(e,t,n,{signal:r})=>{throw await ml(t,r),n.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:n,isConnected:r})=>{bl(e,t,n),vl(e,t,r)},bl=(e,t,n)=>{if(!n)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,n)=>{if(!n)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,n="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${n})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,n)=>{Object.assign(e,{resolve:t,reject:n})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const n=!0,{options:r,fileDescriptors:o}=Pl.get(e),i=Il(o,t,n),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,r,n));return s},kl=(e,t="stdout")=>{const n=!1,{options:r,fileDescriptors:o}=Pl.get(e),i=Il(o,t,n),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,r,n));return s},Pl=new WeakMap,Il=(e,t,n)=>{const r=Dl(t,n);return Ll(r,t,n,e),r},Dl=(e,t)=>{const n=Da(e);if(void 0!==n)return n;const{validOptions:r,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${r} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,n,r)=>{const o=r[$l(e)];if(void 0===o)throw new TypeError(`"${jl(n)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!n)throw new TypeError(`"${jl(n)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&n)throw new TypeError(`"${jl(n)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,n,r)=>{if("all"===e&&!n.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,n);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(r)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:n,stderr:r,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==n?{optionName:"stdout",optionValue:n}:2===i&&void 0!==r?{optionName:"stderr",optionValue:r}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,n)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(r+t),G(n,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,r,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r});i.shift(),r.emit("message",s),r.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(r,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,n),r.connected=!1,r.emit("disconnect")},ql=new WeakMap,zl=(e,t,n)=>{if(Xl.has(e))return Xl.get(e);const r=new W;return r.connected=!0,Xl.set(e,r),Yl({ipcEmitter:r,anyProcess:e,channel:t,isSubprocess:n}),r},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:n,isSubprocess:r})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(n,r)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&ru[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:n,isSubprocess:r,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:n}=e;return ru[t]?.resolve({isDeadlock:!1,hasListeners:n}),!0},nu=async(e,t,n)=>{if(e?.type!==iu)return;const r=Rl();ru[e.id]=r;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([r,ou(t,n,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} 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${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(n),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(n)}finally{o.abort(),delete ru[e.id]}},ru={},ou=async(e,t,{signal:n})=>{Fl(e,1,n),await U(e,"disconnect",{signal:n}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,n)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,n),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:n,ipc:r,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:n,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:n,isSubprocess:r,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:n,message:r,strict:o})=>{if(!o)return r;const i=zl(e,t,n),s=lu(e,i);return{id:Zl++,type:iu,message:r,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:r,message:o,strict:i}),a=((e,t,n)=>{cu.has(e)||cu.set(e,new Set);const r=cu.get(e),o={onMessageSent:Rl(),id:n?t.id:void 0};return r.add(o),{outgoingMessages:r,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:n,isSubprocess:r,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:n,wrappedMessage:r,message:o})=>{const i=mu(e);try{await Promise.all([nu(r,e,n),i(r)])}catch(e){throw(({error:e,methodName:t,isSubprocess:n})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,n)} cannot be used: the ${Tl(n)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:n}),(({error:e,methodName:t,isSubprocess:n,message:r})=>{if(Sl(e))throw new Error(`${xl(t,n)}'s argument type is invalid: the message cannot be serialized: ${String(r)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:n,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>(await yu({anyProcess:e,channel:t,isSubprocess:n,ipc:r}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>{bu||(bu=!0,r?null!==t?(zl(e,t,n),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:n,forceKillAfterDelay:r,context:o,controller:i})=>n?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:r,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const n="cancelSignal";return vl(n,!1,e.connected),fu({anyProcess:e,methodName:n,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:n,context:r,controllerSignal:o}),r.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,n,r)=>0===t||void 0===t?[]:[Ou(e,t,n,r)],Ou=async(e,t,n,{signal:r})=>{throw await j(t,void 0,{signal:r}),n.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,n)=>{n.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(n.cwd);const[r,o,i]=((e,t,{node:n=!1,nodePath:r=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(r,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:n,cwd:i};if(!n)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,n),{command:s,args:a,options:c}=Pc._parse(r,o,i),u=(e=>{const t={...e};for(const n of $a)t[n]=Ta(e,n);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const n=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${n}.`)})(d),(({ipcInput:e,ipc:t,serialization:n})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[n](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:n,serialization:r})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!n)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===r)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:n,localDir:r=n,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:n,localDirectory:r,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:n,node:r,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return n||r?Nc({env:s,cwd:o,execPath:i,preferLocal:n,addExecPath:r}):s},Fu=(e,t,n)=>n.shell&&t.length>0?[[e,...t].join(" "),[],n]:[e,t,n];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#n=!1;#r=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#r=this.#r?this.#r.then(e,e):e(),this.#r}return(e){const t=()=>this.#i(e);return this.#r?this.#r.then(t,t):t()}async#o(){if(this.#n)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#r=void 0,this.#n=!0,this.#e.releaseLock(),e}return e.done&&(this.#r=void 0,this.#n=!0,this.#e.releaseLock()),e}async#i(e){if(this.#n)return{done:!0,value:e};if(this.#n=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function nd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(nd,"name",{value:"return"});const rd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:nd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),n=new Ju(t,e),r=Object.create(rd);return r[ed]=n,r}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,n={};cd(e,t,n);try{for await(const[n]of ld.on(e,"data",{signal:t.signal}))yield n}catch(e){if(void 0!==n.error)throw n.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,n)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){n.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=n[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:r,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:o,maxBuffer:i})=>{const s=n(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=r(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const n=hd.call(e);return"[object ArrayBuffer]"===n?"arrayBuffer":"[object DataView]"===n?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const n=new ArrayBuffer(Rd(t));return new Uint8Array(n).set(new Uint8Array(e),0),n},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const n=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:n},r)=>{const o=kd()?Od(t,r):Td(t,r);return new Uint8Array(o).set(e,n),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,n)=>e?"objects":t?"lines":"buffer"===n?"bytes":"characters",Md=(e,t,n)=>{if(t.length!==n)return;const r=new gd;throw r.maxBufferInfo={fdNumber:"ipc"},r},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:n,unit:r}}=e;delete e.maxBufferInfo;const o=ja(t,n);return"ipc"===n?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(n),threshold:o,unit:r}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:n,isMaxBuffer:r,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${n} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:r?`${((e,t)=>{const{streamName:n,threshold:r,unit:o}=Nd(e,t);return`Command's ${n} was larger than ${r} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const n=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),r=Va(((e,t)=>{if(t===Nu())return e;let n;try{n=d(t)}catch(n){return`The "cwd" option is invalid: ${t}.\n${n.message}\n${e}`}return n.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(n,t));return""===r?void 0:r},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:n,all:r,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:n[1],stderr:n[2],all:r,stdio:n,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:n,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:r.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:n,originalError:r,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=r?.code,v=jd({originalError:r,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(r,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),n.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,n)=>new(n?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:n,cwd:h,durationMs:Cc(r),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const n=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:n,signalDescription:void 0===n?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const n="bigint"==typeof e;if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const r=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,n,r,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===r){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(n,e):r;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(n,"millisecond","ms"),i(r,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=n+r/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const r=((e,t)=>{const n=Math.floor(e*10**t+1e-7);return(Math.round(n)/10**t).toFixed(t)})((n?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return r+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),r+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const n=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:n,verboseInfo:t,result:e})},tp=(e,t,{reject:n})=>{if(Jd(e,t),e.failed&&n)throw e;return e},np=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?rp(e,t):"native",rp=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:n},r,o)=>{ap(e,`${r}.final`,o),ap(t,`${r}.binary`,o),lp(n,`${r}.objectMode`)},ap=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${n}.`)},cp=({transform:e,final:t,binary:n,objectMode:r},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(n,`${o}.binary`),lp(r,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={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"},Ip=(e,t,n,r)=>"output"===r?Dp(e,t,n):Lp(e,t,n),Dp=(e,t,n)=>{const r=0!==t&&n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:e??r}},Lp=(e,t,n)=>{const r=0===t?!0===e:n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:t!==n.length-1&&(e??r)}},Mp=(e,t,n,{encoding:r})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:n,encoding:r});return Fp(i,n)},Np=({stdioItem:e,stdioItem:{type:t},index:n,newTransforms:r,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:n,newTransforms:r,direction:i}):Bp({stdioItem:e,index:n,newTransforms:r,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:n,readableObjectMode:r},objectMode:o=r}},optionName:i})=>{if(o&&!r)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&r)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:n,readableObjectMode:r}}},jp=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,n,r,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,n,r,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},n)=>Up[n]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const n=Math.max(e.length,xa.length);return Array.from({length:n},(t,n)=>e[n])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,n)=>e.map((e,r)=>t[r]||0===r||Fa(n,r)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r,direction:o})=>{const i=ef({value:t,optionName:n,fdNumber:r,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${n}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:n,direction:r})=>{const o=tf(e,n);if(void 0!==o){if("output"===r)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const n=_a.indexOf(e);return-1!==n?n:void 0},nf=({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r})=>"inherit"===t?{type:"nodeStream",value:rf(r,t,n),optionName:n}:"number"==typeof t?{type:"nodeStream",value:rf(t,t,n),optionName:n}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:n}:e,rf=(e,t,n)=>{const r=_a[e];if(void 0===r)throw new TypeError(`The \`${n}: ${t}\` option is invalid: no such standard stream.`);return r},of=({input:e,inputFile:t},n)=>0===n?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:n})=>n.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})},pf=({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{const i=e.filter(e=>ff(e,n));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,r,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},n)=>"filePath"===e?t.file===n.file:"fileUrl"===e?t.href===n.href:t===n,mf=({otherStdioItems:e,type:t,value:n,optionName:r})=>{const o=e.find(({value:{transform:e}})=>e===n.transform);hf(o,r,t)},hf=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[n]} that is the same.`)},gf=(e,t,n,r)=>{const o=(({stdio:e,ipc:t,buffer:n,...r},o,i)=>{const s=zp(e,r).map((e,t)=>Yp(e,t));return i?Qp(s,n,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,n,r),i=o.map((e,n)=>yf({stdioOption:e,fdNumber:n,options:t,isSync:r})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:r});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:n,isSync:r})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:n,optionName:o}),a=((e,t,n)=>{const r=e.map(e=>Hp(e,t));if(r.includes("input")&&r.includes("output"))throw new TypeError(`The \`${n}\` option must not be an array of both readable and writable values.`);return r.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:n,fdNumber:r,direction:o,isSync:i})=>n&&"native"===t?i?Jp({stdioItem:e,fdNumber:r,direction:o}):nf({stdioItem:e,fdNumber:r}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:r})),l=((e,t,n,r)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,n,r)])(c,o,a,n),u=((e,t)=>{const n=e.findLast(({type:e})=>Tp.has(e));return void 0!==n&&("input"===t?n.value.writableObjectMode:n.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:n,optionName:r})=>{const o=(e=>e.filter((t,n)=>e.every((e,r)=>t.value!==e.value||n>=r||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,r)),...of(n,t)]),i=o.length>1;return wf(o,i,r),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:np(e,t),value:e,optionName:t}),wf=(e,t,n)=>{if(0===e.length)throw new TypeError(`The \`${n}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:n}of e)if(Sf.has(t))throw new Error(`The \`${n}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:n})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${n}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${n}: { file: '...' }\` option must be used instead of \`${n}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const n=e.find(({type:e})=>Op.has(e));if(void 0!==n)throw new TypeError(`The \`${n.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:n,isSync:r})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:n,isSync:r}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:n},fileDescriptors:r,addProperties:o,options:i,isSync:s})=>{const a=n.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:r,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:n,options:r,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:n},direction:r,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:n,direction:r}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:n}));df({otherStdioItems:s,type:e,value:t,optionName:n,direction:r})}})({stdioItem:e,direction:n,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[n][e.type](e,r)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:n}]=e;return"native"===t?n:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},n)=>Mf(t,n)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,n,r)=>e||n?void 0:Bf(t,r),$f=(e,t,n)=>n?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:n,final:r}=Bf(t,{});return[...n(e),...r()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,n){if("string"!=typeof n)return void(yield n);let{previousChunks:r}=e,o=-1;for(let i=0;i<n.length;i+=1)if("\n"===n[i]){const s=Hf(n,i,t,e);let a=n.slice(o+1,i+1-s);r.length>0&&(a=Vf(r,a),r=""),yield a,o=i}o!==n.length-1&&(r=Vf(r,n.slice(o+1))),e.previousChunks=r},Hf=(e,t,n,r)=>n?0:(r.isWindowsNewline=0!==t&&"\r"===e[t-1],r.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:n,state:r})=>e||t||n?void 0:{transform:Wf.bind(void 0,r)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:n,windowsNewline:r,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?r:n;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,n)=>{if(n)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const r=new A(t);return{transform:nm.bind(void 0,r),final:rm.bind(void 0,r)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},nm=function*(e,t){yield oa(t)?e.write(t):t},rm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,n,r)=>{t.currentIterable=e(...n);try{for await(const e of t.currentIterable)r.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=lm}=t[n];for await(const o of r(e))yield*im(o,t,n+1)},sm=async function*(e){for(const[t,{final:n}]of Object.entries(e))yield*am(n,Number(t),e)},am=async function*(e,t,n){if(void 0!==e)for await(const r of e())yield*im(r,n,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,n,r)=>{try{for(const r of e(...t))n.push(r);r()}catch(e){r(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=hm}=t[n];for(const o of r(e))yield*pm(o,t,n+1)},fm=function*(e){for(const[t,{final:n}]of Object.entries(e))yield*mm(n,Number(t),e)},mm=function*(e,t,n){if(void 0!==e)for(const r of e())yield*pm(r,n,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:n,writableObjectMode:r,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(n),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:r,writableHighWaterMark:X(r),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,n){d([e,c,0],this,n)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,n,r)=>{const o=t.filter(({type:e})=>"generator"===e),i=r?o.reverse():o;for(const{value:t,optionName:r}of i){const o=bm(t,n,r);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:n,writableObjectMode:r,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(r,a)},em(n,s,r),Nf(n,i,r,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:n,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,n)=>{const{stdioItems:r}=e[t],o=r.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,r));n.input=da(i)},Sm=(e,t)=>{const n=ym(e,t,"utf8",!0);return Em(n),da(n)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)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: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:n,fdNumber:r})=>"all"!==r&&Fa(n,r)&&!Pu.has(t)&&xm(r)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,n)=>{const r=_c(e);vc({type:"output",verboseMessage:r,fdNumber:t,verboseInfo:n})},Rm=({result:e,fileDescriptors:t,fdNumber:n,state:r,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,n)=>{if(!t)return e;const r=$d(n);return e.length>r?e.slice(0,r):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[n],g=Cm([f],m,c,r),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:n});Pm({serializedResult:y,fdNumber:n,state:r,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[n]?b:void 0;try{return void 0===r.error&&Im(y,m,o),v}catch(e){return r.error=e,v}},Cm=(e,t,n,r)=>{try{return ym(e,t,n,!1)}catch(t){return r.error=t,e}},km=({chunks:e,objectMode:t,encoding:n,lines:r,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===n)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,n);return r[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:n,verboseInfo:r,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:r,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,n)=>{for(const r of e)Om(r,t,n)})(a,t,r)}catch(e){n.error??=e}},Im=(e,t,n)=>{for(const{path:r,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof r?r:r.toString();o||n.has(t)?f(r,e):(n.add(t),m(r,e))}},Dm=async e=>{const[t,n]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===n.status?Lm(e):n.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,n]=await e;if(!Nm(t,n)&&$m(t,n))throw new $c;return[t,n]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:n,output:r},{maxBuffer:o})=>{const i=Bm(e,t,n),s="ETIMEDOUT"===i?.code,a=((e,t,n)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(n)))(i,r,o);return{resultError:i,exitCode:t,signal:n,timedOut:s,isMaxBuffer:a}},Bm=(e,t,n)=>void 0!==e?e:$m(t,n)?new $c:void 0,Fm=(e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,n),a=Hm(n),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:n,cancelSignal:r})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),n&&Gm("detached: true"),r&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,n),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:n,isMaxBuffer:r,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:r,verboseInfo:o},n)),...i}})({fileDescriptors:s,syncResult:c,options:n,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,n,t)),y=Lf((([,e,t],n)=>{if(n.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,n,"all")]:Array.isArray(t)?[Lf(e,n,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,n),n,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:n,command:r,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const n of vm(e))wm(e,n,t)})(i,n);const r=Km(n);return _(...Fu(e,t,r))}catch(e){return Vd({error:e,command:r,escapedCommand:o,fileDescriptors:i,options:n,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...n})=>({...n,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:n,timedOut:r,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:r,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:n,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:n,ipc:r,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:n,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:n,filter:r,reference:o})=>{Hl(t,o);const i=zl(e,t,n),s=new AbortController;try{return await Promise.race([Ym(i,r,s),Qm(i,n,s),Zm(i,n,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:n})=>{if(void 0===t){const[t]=await U(e,"message",{signal:n});return t}for await(const[r]of V(e,"message",{signal:n}))if(t(r))return r},Qm=async(e,t,{signal:n})=>{await U(e,"disconnect",{signal:n}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:n})=>{const[r]=await U(e,"strict:error",{signal:n});throw wl(r,t)},Jm=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:!n,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:n,ipc:r,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,n),a=new AbortController,c={};return th(e,s,a),nh({ipcEmitter:s,isSubprocess:n,controller:a,state:c}),rh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:n,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,n)=>{try{await U(t,"disconnect",{signal:n.signal}),n.abort()}catch{}},nh=async({ipcEmitter:e,isSubprocess:t,controller:n,state:r})=>{try{const[o]=await U(e,"strict:error",{signal:n.signal});r.error=wl(o,t),n.abort()}catch{}},rh=async function*({anyProcess:e,channel:t,ipcEmitter:n,isSubprocess:r,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(n,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),r||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,n)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})}),sh=(e,t)=>{const n=ah(),r=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[n,r,o,...i];Object.assign(e,{stdin:n,stdout:r,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,n)=>tp(e,t,n),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:n}}){const r=t||n;return{stream:Y.fromWeb(e,{objectMode:r})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),n=gh(e,t),r=new yh({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(const t of e)r.add(t);return r}const gh=(e,t)=>{if(0===e.length)return X(t);const n=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...n)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,n)=>{Ih(e,Dh);const r=new AbortController;try{await Promise.race([vh(e,r),wh(e,t,n,r)])}finally{r.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,n,{signal:r})=>{for await(const[o]of V(e,"unpipe",{signal:r}))t.has(o)&&o.emit(n)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:a}),Ah({stream:t,streams:n,ended:r,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}n.size>0&&n.size===r.size+o.size&&(0===r.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:n})=>{try{await e,n.aborted||Ch(t)}catch(e){n.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(r){if(i.aborted||!n.has(t))return;Rh(r)?o.add(t):kh(e,r)}},Ah=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),n.delete(e),r.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&e.setMaxListeners(n+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,n,r)=>{"output"===n?Mh(e.stdio[r],t):Mh(t,e.stdio[r]);const o=Hh[r];void 0!==o&&(e[o]=t),e.stdio[r]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:n,fdNumber:r,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===n?[t,e.stdio[r]]:[e.stdio[r],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const o of this.listeners[e])r=!0===o(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const n=this.#m.listeners(t);let{count:r}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(r+=o.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#f.emit("exit",null,t),r="SIGHUP"===t?this.#p:t;n||e.kill(e.pid,r)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#f.on(n,e),()=>{this.#f.removeListener(n,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const n=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const r=n.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),r}return n.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,n)=>{try{const{destination:r,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=ng(e,t,...n);return{destination:r,destinationStream:Cl(r,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},ng=(e,t,n,...r)=>{if(Array.isArray(n)){return{destination:t(rg,e)(n,...r),pipeOptions:e}}if("string"==typeof n||n instanceof URL||ea(n)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=na(n,...r);return{destination:t(rg)(o,i,s),pipeOptions:s}}if(Pl.has(n)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:n,pipeOptions:r[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${n}`)},rg=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r})=>void 0!==t&&void 0!==r?r:void 0!==r?(Bh(e),r):void 0!==t?($h(n),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:n,startTime:r})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:n,startTime:r,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:n,value:r=n},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(r)||s.pipedFrom.push(r),"rejected"===o)throw s;if("rejected"===t)throw r;return s},lg=(e,t)=>{const n=hh([e]);return Mh(n,t),pg.set(t,n),n},ug=(e,t)=>{const n=pg.get(t);return n.add(e),n},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:n,fileDescriptors:r,sourceOptions:o,startTime:i})=>{await P(e,t),await n.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:r,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:n,...r}=(({source:e,sourcePromise:t,boundOptions:n,createNested:r},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(n,r,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...r,destination:n});return o.pipe=yg.bind(void 0,{...e,source:n,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:n,sourceError:r,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:r,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:n,startTime:l});const d=new AbortController;try{const e=((e,t,n)=>{const r=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,n.signal),Fl(t,mg,n.signal),dg(t),r})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:n,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:r,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:n,shouldEncode:!e.readableObjectMode&&r,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:n,encoding:r,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===r,shouldEncode:!a,encoding:r,shouldSplit:!a&&n,preserveNewlines:!o})},_g=async(e,t,n)=>{try{await e}catch{n.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:n,shouldSplit:r,preserveNewlines:o})=>[em(e,n,!t),Nf(e,o,!r,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,n),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:r,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:n,encoding:r,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[n]?.stdioItems,encoding:r,verboseInfo:i,fdNumber:n}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:r,stripFinalNewline:!0,allMixed:o});await(async(e,t,n,r)=>{for await(const o of e)Tm(t)||Om(o,n,r)})(a,e,n,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:n,fdNumber:r,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(n,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(n,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(n,{maxBuffer:i})}catch(n){return Lg((({error:e,stream:t,readableObjectMode:n,lines:r,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(n,r,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:n,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:r}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===ra.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,n,{isSameDirection:r,stopOnExit:o=!1}={})=>{const i=Ng(e,n),s=new AbortController;try{await Promise.race([...o?[n.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,n,r)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:n})=>{const r={stdinCleanedUp:!1};return e===t&&$g(e,n,r),r},$g=(e,t,n)=>{const{_destroy:r}=e;e._destroy=(...o)=>{jg(t,n),r.call(e,...o)}},jg=({exitCode:e,signalCode:t},n)=>{null===e&&null===t||(n.stdinCleanedUp=!0)},Bg=(e,t,n,r)=>{if(!Fg(e,t,n,r))throw e},Fg=(e,t,n,r=!0)=>n.propagating?Gg(e)||Ug(e):(n.propagating=!0,Hg(n,t)===r?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:n,buffer:r,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:n,buffer:r,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:n},[,r,o])=>{const i=r||o;return i?r?o?{stream:n,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:n,buffer:i}},Kg=({all:e,stdout:t,stderr:n})=>e&&t&&n&&t.readableObjectMode!==n.readableObjectMode,qg=(e,t)=>{const n=_c(e);vc({type:"ipc",verboseMessage:n,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:n,ipc:r,ipcOutput:o,verboseInfo:i})=>{if(!r)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(n,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:r,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:n,maxBuffer:r,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[n,r]=await Dm(e);return t.isForcefullyTerminated??=!1,[n,r]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:n[c],maxBuffer:r[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,n),fdNumber:"all",encoding:t,maxBuffer:r[1]+r[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:n,maxBuffer:r,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,n)=>e.map((e,r)=>e===t.stdio[r]?void 0:Mg(e,r,n)),Zg=(e,t)=>e.flatMap(({stdioItems:e},n)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:r,stream:o=r})=>Mg(o,n,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[n]=await U(e,"error",{signal:t});throw n},ey=(e,t,n)=>{const r=e[n];r.has(t)||r.set(t,[]);const o=r.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},n)=>{e();const[r]=await Promise.race([Promise.allSettled([!0,n]),Promise.all([!1,...t])]);return!r},ny=async e=>{if(void 0!==e)try{await ry(e)}catch{}},ry=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,n)=>{n&&!Ug(n)?e.destroy(n):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(n),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,r,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:n,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,n)=>{const r=kl(e,t);return{subprocessStdout:r,waitReadableDestroy:ey(n,r,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n},r)=>r?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:n,encoding:r,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:!n,encoding:r,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,n)=>{try{const{value:r,done:o}=await t.next();o?n.resolve():e.push(r)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:n,subprocess:r,subprocessStdin:o})=>{try{await oy(e),await r,await ny(o),await t,n.readable&&n.push(null)}catch(e){await ny(o),my(n,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:n},r)=>{await ty(n,t)&&(my(e,r),await iy(t,r))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:n}={})=>{const{subprocessStdin:r,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,n,t),s=new Q({...yy(r,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:r,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:r.writableHighWaterMark,objectMode:r.writableObjectMode});return wy(r,s),s},gy=(e,t,n)=>{const r=Cl(e,t);return{subprocessStdin:r,waitWritableFinal:ey(n,r,"writableFinal"),waitWritableDestroy:ey(n,r,"writableDestroy")}},yy=(e,t,n)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,n))}),by=(e,t,n,r)=>{e.write(t,n)?r():e.once("drain",r)},vy=async(e,t,n)=>{await ty(n,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,n)=>{try{await ry(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(n),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:n,waitWritableDestroy:r},o)=>{await ty(n,t),await ty(r,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(n),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,r,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:n,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:n,waitReadableDestroy:r,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:n,waitReadableDestroy:r},s),Sy({subprocessStdin:t,subprocess:n,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:n,binary:r=!1,preserveNewlines:o=!1}={})=>{const i=r||Pu.has(t),s=kl(e,n),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,n){try{yield*e}finally{t.readable&&t.destroy(),await n}},Oy=(e,{encoding:t})=>{const n={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:n}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,n,r)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,n),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:r}),((e,t)=>{for(const[n,r]of Cy){const o=r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,n),{file:a,commandArguments:c,options:l}=$u(e,t,n),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...n})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...n,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:n,startTime:r,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,n))}catch(e){return(({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,verboseInfo:s})=>{Rf(r);const a=new S;sh(a,r),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:n,startTime:r,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,n)=>{const r=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:r,controller:n})}for(const[e,t]of r.entries()){const n=1===t.length?t[0]:hh(t);Mh(n,e)}})(c,a,l),((e,{cleanup:t,detached:n},{signal:r})=>{if(!t||n)return;const o=Jh(()=>{e.kill()});G(r,()=>{o()})})(c,n,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:n,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:n})=>n&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,n),Oy(c,n),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,n);return{subprocess:c,promise:Ly({subprocess:c,options:n,startTime:r,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:n,verboseInfo:r,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:r,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,n)=>Lf(e,t,n)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:n});return tp(v,r,t)},My=({errorInfo:e,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:r,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const n=Object.fromEntries(Object.entries(t).map(([t,n])=>[t,$y(t,e[t],n)]));return{...e,...n}},$y=(e,t,n)=>jy.has(e)&&Qs(t)&&Qs(n)?{...t,...n}:n,jy=new Set(["env",...$a]),By=(e,t,n,r)=>{const o=(e,t,r)=>By(e,t,n,r),i=(...i)=>Fy({mapArguments:e,deepOptions:n,boundOptions:t,setBoundExeca:r,createNested:o},...i);return void 0!==r&&r(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:n={},setBoundExeca:r,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(n,i),r);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:n});return u?((e,t,n)=>{const{file:r,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,n),d=Wm({file:r,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:n,deepOptions:r,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let n=[];for(const[r,o]of e.entries())n=ha({templates:e,expressions:t,tokens:n,index:r,template:o});if(0===n.length)throw new TypeError("Template script must not be empty");const[r,...o]=n;return[r,o,{}]})(t,n):[t,...n]);var s;const[a,c,l]=na(...i),u=Ny(Ny(r,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[n,...r]=Gy(e);return{file:n,commandArguments:r}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const n=[];for(const e of t.split(Wy)){const t=n.at(-1);t&&t.endsWith("\\")?n[n.length-1]=`${t.slice(0,-1)} ${e}`:n.push(e)}return n},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:n})=>void 0===e&&void 0===t&&void 0===n?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,n)=>{e.sync=t(Vy,n),e.s=e.sync}),(()=>{const e=I,t=!0,n=void 0!==I.channel;ih(e,t,n),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,n,r){return Reflect.set(e,t,n,r)},get:function(e,t,n){return console.log(`make ${t}`),Reflect.get(e,t,n)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,n,r=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:r?"inherit":void 0,cwd:n&&l.resolve(n),env:process.env}).stdout}catch(n){throw r&&0!==n.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${n.exitCode}`)),o||process.exit(n.exitCode)),n}}function tb(e,t,n,r){return eb(Zy,e,t,n,r)}function nb(e,t,n){return eb(Jy,e,t,n)}function rb(e,t){const n=process.env;process.env={...n,...t},e(),process.env=n}function ob(e){Yy["bootstrap-only"](),rb(()=>{Yy["prepublish-build"](),e()},{IS_PUBLISH:"true"})}function ib(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],n=y("packages").filter(e=>b(`packages/${e}/package.json`)),r=[];for(let e=0,t=16;e<n.length;e+=t)n.length-e===1?r.push([`packages/${n[e]}/**/*`]):r.push([`packages/{${n.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(r.push(o),process.env.ESLINT_GO_BRRRR)rb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const n of r)try{rb(()=>tb(["eslint",...n,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function sb(e,t,n){const r="./build/"+e.toLowerCase();Xy.rm("-rf",r),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),n=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!n)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return n}(e),t,r]),eb("git",["sparse-checkout","set",...n],r)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),rb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",nb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){nb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){ob(()=>Yy.test())},Yy["prepublish-no-lint"]=function(){ob(()=>Yy["test-only"]())},Yy["prepublish-no-test"]=function(){ob(()=>{})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),nb(["scripts/generators/npm-ignore.ts"]),rb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),rb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){rb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),nb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){nb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){nb(["scripts/generators/tsconfig.ts"]),nb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",nb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){nb(["scripts/clone-license.ts"])},Yy.lint=function(){rb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ib(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ib(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){rb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ib("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),rb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),rb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){sb("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){sb("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){sb("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};