@nice-move/cli 0.11.23 → 0.11.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vendor.mjs DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=502;export const __webpack_ids__=[502];export const __webpack_modules__={442:e=>{const t="win32"===process.platform;function n(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 r(e,r){return t&&1===e&&!r.file?n(r.original,"spawn"):null}e.exports={hookChildProcess:function(e,n){if(!t)return;const o=e.emit;e.emit=function(t,i){if("exit"===t){const t=r(i,n);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:r,verifyENOENTSync:function(e,r){return t&&1===e&&!r.file?n(r.original,"spawnSync"):null},notFoundError:n}},600:(e,t,n)=>{const r=n(7257);e.exports=(e="")=>{const t=e.match(r);if(!t)return null;const[n,o]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i}},709:(e,t,n)=>{e.exports=o,o.sync=function(e,t){return i(r.statSync(e),t)};var r=n(9896);function o(e,t,n){r.stat(e,(function(e,r){n(e,!e&&i(r,t))}))}function i(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);return n&parseInt("001",8)||n&c&&o===s||n&a&&r===i||n&(a|c)&&0===i}(e,t)}},1880:(e,t,n)=>{const r=n(9896),o=n(600);e.exports=function(e){const t=Buffer.alloc(150);let n;try{n=r.openSync(e,"r"),r.readSync(n,t,0,150,0),r.closeSync(n)}catch(e){}return o(t.toString())}},1905:(e,t,n)=>{const r="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=n(6928),i=r?";":":",s=n(9344),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const n=t.colon||i,o=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],s=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=r?s.split(n):[""];return r&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},l=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:i,pathExtExe:l}=c(e,t),d=[],u=n=>new Promise(((i,s)=>{if(n===r.length)return t.all&&d.length?i(d):s(a(e));const c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=o.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;i(p(f,n,0))})),p=(e,n,r)=>new Promise(((o,a)=>{if(r===i.length)return o(u(n+1));const c=i[r];s(e+c,{pathExt:l},((i,s)=>{if(!i&&s){if(!t.all)return o(e+c);d.push(e+c)}return o(p(e,n,r+1))}))}));return n?u(0).then((e=>n(null,e)),n):u(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:i}=c(e,t),l=[];for(let a=0;a<n.length;a++){const c=n[a],d=/^".*"$/.test(c)?c.slice(1,-1):c,u=o.join(d,e),p=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;e<r.length;e++){const n=p+r[e];try{if(s.sync(n,{pathExt:i})){if(!t.all)return n;l.push(n)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},2077:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,n){return e=(e=`"${e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(t,"^$1"),n&&(e=e.replace(t,"^$1")),e}},3208:(e,t,n)=>{function r(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)}n.d(t,{Ho:()=>hl,Kc:()=>gl});var o=n(3136);const i=(e,t)=>{const n=c(s(e));if("string"!=typeof n)throw new TypeError(`${t} must be a string or a file URL: ${n}.`);return n},s=e=>a(e)?e.toString():e,a=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,c=e=>e instanceof URL?(0,o.fileURLToPath)(e):e,l=(e,t=[],n={})=>{const o=i(e,"First argument"),[s,a]=r(t)?[[],t]:[t,n];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some((e=>"object"==typeof e&&null!==e)))throw new TypeError(`Second argument must be an array of strings: ${s}`);const c=s.map(String),l=c.find((e=>e.includes("\0")));if(void 0!==l)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${l}`);if(!r(a))throw new TypeError(`Last argument must be an options object: ${a}`);return[o,c,a]};var d=n(1421),u=n(6193);const{toString:p}=Object.prototype,f=e=>"[object Uint8Array]"===p.call(e),m=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),b=new TextEncoder,h=e=>b.encode(e),g=new TextDecoder,y=e=>g.decode(e),w=e=>1===e.length&&f(e[0])?e[0]:S(v(e)),v=e=>e.map((e=>"string"==typeof e?h(e):e)),S=e=>{const t=new Uint8Array(x(e));let n=0;for(const r of e)t.set(r,n),n+=r.length;return t},x=e=>{let t=0;for(const n of e)t+=n.length;return t},E=({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}=T(o,e.raw[r]),c=O(n,i,s);if(r===t.length)return c;const l=t[r],d=Array.isArray(l)?l.map((e=>M(e))):[M(l)];return O(c,d,a)},T=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const n=[];let r=0;const o=D.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(D.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+=I[e]??1}}const i=r===e.length;return i||n.push(e.slice(r)),{nextTokens:n,leadingWhitespaces:o,trailingWhitespaces:i}},D=new Set([" ","\t","\r","\n"]),I={x:3,u:5},O=(e,t,n)=>n||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],M=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(r(e)&&("stdout"in e||"isMaxBuffer"in e))return N(e);if(e instanceof d.ChildProcess||"[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`)},N=({stdout:e})=>{if("string"==typeof e)return e;if(f(e))return y(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`)};var $=n(7975),C=n(1708);const A=e=>B.includes(e),B=[C.stdin,C.stdout,C.stderr],j=["stdin","stdout","stderr"],P=e=>j[e]??`stdio[${e}]`,R=(e,t)=>{const n=Array.from({length:k(e)+1}),r=L(e[t],n,t);return V(r,t)},k=({stdio:e})=>Array.isArray(e)?Math.max(e.length,j.length):j.length,L=(e,t,n)=>r(e)?U(e,t,n):t.fill(e),U=(e,t,n)=>{for(const r of Object.keys(e).sort(F))for(const o of W(r,n,t))t[o]=e[r];return t},F=(e,t)=>G(e)<G(t)?1:-1,G=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,W=(e,t,n)=>{if("ipc"===e)return[n.length-1];const r=_(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]},_=e=>{if("all"===e)return e;if(j.includes(e))return j.indexOf(e);const t=z.exec(e);return null!==t?Number(t[1]):void 0},z=/^fd(\d+)$/,V=(e,t)=>e.map((e=>void 0===e?H[t]:e)),H={lines:!1,buffer:!0,maxBuffer:1e8,verbose:(0,$.debuglog)("execa").enabled?"full":"none",stripFinalNewline:!0},K=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],q=(e,t)=>"ipc"===t?e.at(-1):e[t],Y=({verbose:e},t)=>"none"!==J(e,t),X=({verbose:e},t)=>!["none","short"].includes(J(e,t)),J=(e,t)=>void 0===t?Q(e):q(e,t),Q=e=>e.find((e=>Z(e)))??ee.findLast((t=>e.includes(t))),Z=e=>"function"==typeof e,ee=["none","short","full"],te=e=>(0,$.stripVTControlCharacters)(e).split("\n").map((e=>ne(e))).join("\n"),ne=e=>e.replaceAll(oe,(e=>re(e))),re=e=>{const t=ie[e];if(void 0!==t)return t;const n=e.codePointAt(0),r=n.toString(16);return n<=se?`\\u${r.padStart(4,"0")}`:`\\U${r}`},oe=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),ie={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},se=65535,ae=/^[\w./-]+$/,ce={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258c",squareRight:"\u2590",squareCenter:"\u25a0",bullet:"\u25cf",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203a",triangleUp:"\u25b2",triangleUpSmall:"\u25b4",triangleDown:"\u25bc",triangleDownSmall:"\u25be",triangleLeftSmall:"\u25c2",triangleRightSmall:"\u25b8",home:"\u2302",heart:"\u2665",musicNote:"\u266a",musicNoteBeamed:"\u266b",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221e",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xbd",oneThird:"\u2153",oneQuarter:"\xbc",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215b",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xbe",threeFifths:"\u2157",threeEighths:"\u215c",fourFifths:"\u2158",fiveSixths:"\u215a",fiveEighths:"\u215d",sevenEighths:"\u215e",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254c",lineDashed5:"\u254d",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257a",lineDashed10:"\u257c",lineDashed11:"\u257e",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250a",lineVerticalDashed3:"\u250b",lineVerticalDashed4:"\u254e",lineVerticalDashed5:"\u254f",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257b",lineVerticalDashed10:"\u257d",lineVerticalDashed11:"\u257f",lineDownLeft:"\u2510",lineDownLeftArc:"\u256e",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250c",lineDownRightArc:"\u256d",lineDownBoldRightBold:"\u250f",lineDownBoldRight:"\u250e",lineDownRightBold:"\u250d",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256f",lineUpBoldLeftBold:"\u251b",lineUpBoldLeft:"\u251a",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255d",lineUpDoubleLeft:"\u255c",lineUpLeftDouble:"\u255b",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255a",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252b",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252a",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251c",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251d",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251f",lineUpBoldDownRight:"\u251e",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255f",lineUpDownRightDouble:"\u255e",lineDownLeftRight:"\u252c",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252f",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252e",lineDownLeftBoldRight:"\u252d",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253b",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253a",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253c",lineUpBoldDownBoldLeftBoldRightBold:"\u254b",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254a",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253d",lineUpDownLeftRightBold:"\u253e",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253f",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256c",lineUpDoubleDownDoubleLeftRight:"\u256b",lineUpDownLeftDoubleRightDouble:"\u256a",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},le={tick:"\u2714",info:"\u2139",warning:"\u26a0",cross:"\u2718",squareSmall:"\u25fb",squareSmallFilled:"\u25fc",circle:"\u25ef",circleFilled:"\u25c9",circleDotted:"\u25cc",circleDouble:"\u25ce",circleCircle:"\u24de",circleCross:"\u24e7",circlePipe:"\u24be",radioOn:"\u25c9",radioOff:"\u25ef",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24e7",checkboxCircleOff:"\u24be",pointer:"\u276f",triangleUpOutline:"\u25b3",triangleLeft:"\u25c0",triangleRight:"\u25b6",lozenge:"\u25c6",lozengeOutline:"\u25c7",hamburger:"\u2630",smiley:"\u32e1",mustache:"\u0df4",star:"\u2605",play:"\u25b6",nodejs:"\u2b22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},de={...ce,...le},ue={...ce,tick:"\u221a",info:"i",warning:"\u203c",cross:"\xd7",squareSmall:"\u25a1",squareSmallFilled:"\u25a0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25cb)",circleCross:"(\xd7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25c4",triangleRight:"\u25ba",lozenge:"\u2666",lozengeOutline:"\u25ca",hamburger:"\u2261",smiley:"\u263a",mustache:"\u250c\u2500\u2510",star:"\u2736",play:"\u25ba",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},pe=function(){const{env:e}=C,{TERM:t,TERM_PROGRAM:n}=e;return"win32"!==C.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}()?de:ue;Object.entries(le);var fe=n(7066);const me=fe?.WriteStream?.prototype?.hasColors?.()??!1,be=(e,t)=>{if(!me)return e=>e;const n=`\x1b[${e}m`,r=`\x1b[${t}m`;return e=>{const t=e+"";let o=t.indexOf(r);if(-1===o)return n+t+r;let i=n,s=0;for(;-1!==o;)i+=t.slice(s,o)+n,s=o+r.length,o=t.indexOf(r,s);return i+=t.slice(s)+r,i}},he=(be(0,0),be(1,22)),ge=(be(2,22),be(3,23),be(4,24),be(53,55),be(7,27),be(8,28),be(9,29),be(30,39),be(31,39),be(32,39),be(33,39),be(34,39),be(35,39),be(36,39),be(37,39),be(90,39)),ye=(be(40,49),be(41,49),be(42,49),be(43,49),be(44,49),be(45,49),be(46,49),be(47,49),be(100,49),be(91,39)),we=(be(92,39),be(93,39)),ve=(be(94,39),be(95,39),be(96,39),be(97,39),be(101,49),be(102,49),be(103,49),be(104,49),be(105,49),be(106,49),be(107,49),e=>`${Se(e.getHours(),2)}:${Se(e.getMinutes(),2)}:${Se(e.getSeconds(),2)}.${Se(e.getMilliseconds(),3)}`),Se=(e,t)=>String(e).padStart(t,"0"),xe=({failed:e,reject:t})=>e?t?pe.cross:pe.warning:pe.tick,Ee={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:xe,duration:xe},Te=e=>e,De={command:()=>he,output:()=>Te,ipc:()=>Te,error:({reject:e})=>e?ye:we,duration:()=>ge},Ie=(e,t,n)=>{if(void 0===n)return e;const r=n(e,t);return"string"==typeof r?r:void 0},Oe=e=>e.endsWith("\n")?e:`${e}\n`,Me=({type:e,verboseMessage:t,fdNumber:n,verboseInfo:r,result:o})=>{const i=Ne({type:e,result:o,verboseInfo:r}),s=((e,t,n)=>{const r=(({verbose:e},t)=>{const n=J(e,t);return Z(n)?n:void 0})(t,n);return e.map((({verboseLine:e,verboseObject:t})=>Ie(e,t,r))).filter((e=>void 0!==e)).map((e=>Oe(e))).join("")})($e(t,i),r,n);""!==s&&console.warn(s.slice(0,-1))},Ne=({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}),$e=(e,t)=>e.split("\n").map((e=>Ce({...t,message:e}))),Ce=e=>({verboseLine:(({type:e,message:t,timestamp:n,piped:r,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=ve(n),c=Ee[e]({failed:i,reject:s,piped:r}),l=De[e]({reject:s});return`${ge(`[${a}]`)} ${ge(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),Ae=e=>{const t="string"==typeof e?e:(0,$.inspect)(e);return te(t).replaceAll("\t"," ".repeat(Be))},Be=2,je=e=>Y({verbose:e})?Pe++:void 0;let Pe=0n;const Re=()=>C.hrtime.bigint(),ke=e=>Number(C.hrtime.bigint()-e)/1e6,Le=(e,t,n)=>{const r=Re(),{command:o,escapedCommand:i}=((e,t)=>{const n=[e,...t];return{command:n.join(" "),escapedCommand:n.map((e=>{return t=ne(e),ae.test(t)?t:"win32"===C.platform?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`;var t})).join(" ")}})(e,t),s=((e,t,n)=>((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(!ee.includes(t)&&!Z(t)){const e=ee.map((e=>`'${e}'`)).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}})(e),{verbose:e,escapedCommand:t,commandId:je(e),rawOptions:n}))(R(n,"verbose"),i,{...n});return((e,t)=>{Y(t)&&Me({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:r,verboseInfo:s}};var Ue=n(6760),Fe=n(6507),Ge=n(7235);function We(e){return e instanceof URL?(0,o.fileURLToPath)(e):e}(0,$.promisify)(d.execFile);const _e=({env:e=C.env,...t}={})=>{e={...e};const n=(0,Ge.A)({env:e});return t.path=e[n],e[n]=(({cwd:e=C.cwd(),path:t=C.env[(0,Ge.A)()],preferLocal:n=!0,execPath:r=C.execPath,addExecPath:o=!0}={})=>{const i=Ue.resolve(We(e)),s=[],a=t.split(Ue.delimiter);return n&&((e,t,n)=>{for(const r of function(e){return{*[Symbol.iterator](){let t,n=Ue.resolve(We(e));for(;t!==n;)yield n,t=n,n=Ue.resolve(n,"..")}}}(n)){const n=Ue.join(r,"node_modules/.bin");t.includes(n)||e.push(n)}})(s,a,i),o&&((e,t,n,r)=>{const o=Ue.resolve(r,We(n),"..");t.includes(o)||e.push(o)})(s,a,r,i),""===t||t===Ue.delimiter?`${s.join(Ue.delimiter)}${t}`:[...s,t].join(Ue.delimiter)})(t),e};var ze=n(8500);class Ve extends Error{}const He=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Ke,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Ke=Symbol("isExecaError"),qe=e=>"[object Error]"===Object.prototype.toString.call(e);class Ye extends Error{}He(Ye,Ye.name);class Xe extends Error{}He(Xe,Xe.name);var Je=n(8161);const Qe=(e,t)=>({name:`SIGRT${t+1}`,number:Ze+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ze=34,et=[{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"}],tt=()=>{const e=(()=>{const e=64-Ze+1;return Array.from({length:e},Qe)})();return[...et,...e].map(nt)},nt=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=Je.constants,a=void 0!==s;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:o,standard:i}},rt=({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}],ot=(()=>{const e=tt();return Object.fromEntries(e.map(rt))})(),it=(e,t)=>{const n=t.find((({name:t})=>Je.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},st=((()=>{const e=tt(),t=Array.from({length:65},((t,n)=>((e,t)=>{const n=it(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}}})(n,e)));Object.assign({},...t)})(),e=>0===e?e:at(e,"`subprocess.kill()`'s argument")),at=(e,t)=>{if(Number.isInteger(e))return ct(e,t);if("string"==typeof e)return dt(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ut()}`)},ct=(e,t)=>{if(lt.has(e))return lt.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ut()}`)},lt=new Map(Object.entries(Je.constants.signals).reverse().map((([e,t])=>[t,e]))),dt=(e,t)=>{if(e in Je.constants.signals)return e;if(e.toUpperCase()in Je.constants.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${ut()}`)},ut=()=>`Available signal names: ${pt()}.\nAvailable signal numbers: ${ft()}.`,pt=()=>Object.keys(Je.constants.signals).sort().map((e=>`'${e}'`)).join(", "),ft=()=>[...new Set(Object.values(Je.constants.signals).sort(((e,t)=>e-t)))].join(", "),mt=e=>ot[e].description,bt=({kill:e,options:{forceKillAfterDelay:t,killSignal:n},onInternalError:r,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ht(s,a,n);gt(l,r);const d=e(c);return yt({kill:e,signal:c,forceKillAfterDelay:t,killSignal:n,killResult:d,context:o,controller:i}),d},ht=(e,t,n)=>{const[r=n,o]=qe(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&&!qe(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:st(r),error:o}},gt=(e,t)=>{void 0!==e&&t.reject(e)},yt=async({kill:e,signal:t,forceKillAfterDelay:n,killSignal:r,killResult:o,context:i,controller:s})=>{t===r&&o&&wt({kill:e,forceKillAfterDelay:n,context:i,controllerSignal:s.signal})},wt=async({kill:e,forceKillAfterDelay:t,context:n,controllerSignal:r})=>{if(!1!==t)try{await(0,ze.setTimeout)(t,void 0,{signal:r}),e("SIGKILL")&&(n.isForcefullyTerminated??=!0)}catch{}};var vt=n(8474);const St=async(e,t)=>{e.aborted||await(0,vt.once)(e,"abort",{signal:t})},xt=({subprocess:e,cancelSignal:t,gracefulCancel:n,context:r,controller:o})=>void 0===t||n?[]:[Et(e,t,r,o)],Et=async(e,t,n,{signal:r})=>{throw await St(t,r),n.terminationReason??="cancel",e.kill(),t.reason},Tt=({methodName:e,isSubprocess:t,ipc:n,isConnected:r})=>{Dt(e,t,n),It(e,t,r)},Dt=(e,t,n)=>{if(!n)throw new Error(`${$t(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},It=(e,t,n)=>{if(!n)throw new Error(`${$t(e,t)} cannot be used: the ${At(t)} has already exited or disconnected.`)},Ot=(e,t)=>new Error(`${$t("sendMessage",t)} failed when sending an acknowledgment response to the ${At(t)}.`,{cause:e}),Mt=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),Nt=["could not be cloned","circular structure","call stack size exceeded"],$t=(e,t,n="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Ct(t)}${e}(${n})`,Ct=e=>e?"":"subprocess.",At=e=>e?"parent process":"subprocess",Bt=e=>{e.connected&&e.disconnect()},jt=()=>{const e={},t=new Promise(((t,n)=>{Object.assign(e,{resolve:t,reject:n})}));return Object.assign(t,e)},Pt=(e,t="stdin")=>{const n=!0,{options:r,fileDescriptors:o}=kt.get(e),i=Lt(o,t,n),s=e.stdio[i];if(null===s)throw new TypeError(Gt(i,t,r,n));return s},Rt=(e,t="stdout")=>{const n=!1,{options:r,fileDescriptors:o}=kt.get(e),i=Lt(o,t,n),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Gt(i,t,r,n));return s},kt=new WeakMap,Lt=(e,t,n)=>{const r=Ut(t,n);return Ft(r,t,n,e),r},Ut=(e,t)=>{const n=_(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(`"${zt(t)}" must not be "${e}".\nIt must be ${r} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ft=(e,t,n,r)=>{const o=r[_t(e)];if(void 0===o)throw new TypeError(`"${zt(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(`"${zt(n)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&n)throw new TypeError(`"${zt(n)}" must not be ${t}. It must be a writable stream, not readable.`)},Gt=(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}=Wt(e,n);return`The "${o}: ${Vt(i)}" option is incompatible with using "${zt(r)}: ${Vt(t)}".\nPlease set this option with "pipe" instead.`},Wt=(e,{stdin:t,stdout:n,stderr:r,stdio:o})=>{const i=_t(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]}},_t=e=>"all"===e?1:e,zt=e=>e?"to":"from",Vt=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Ht=(e,t,n)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(r+t),(0,vt.addAbortListener)(n,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},Kt=(e,t)=>{t&&qt(e)},qt=e=>{e.refCounted()},Yt=(e,t)=>{t&&Xt(e)},Xt=e=>{e.unrefCounted()},Jt=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r},o)=>{if(cn(o)||In(o))return;Zt.has(e)||Zt.set(e,[]);const i=Zt.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await mn(e,r,o),await ze.scheduler.yield();const s=await an({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r});i.shift(),r.emit("message",s),r.emit("message:done")}},Qt=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r,boundOnMessage:o})=>{Mn();const i=Zt.get(e);for(;i?.length>0;)await(0,vt.once)(r,"message:done");e.removeListener("message",o),((e,t)=>{t&&(qt(e),qt(e))})(t,n),r.connected=!1,r.emit("disconnect")},Zt=new WeakMap,en=(e,t,n)=>{if(tn.has(e))return tn.get(e);const r=new vt.EventEmitter;return r.connected=!0,tn.set(e,r),nn({ipcEmitter:r,anyProcess:e,channel:t,isSubprocess:n}),r},tn=new WeakMap,nn=({ipcEmitter:e,anyProcess:t,channel:n,isSubprocess:r})=>{const o=Jt.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e});t.on("message",o),t.once("disconnect",Qt.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Xt(e),Xt(e))})(n,r)},rn=e=>{const t=tn.get(e);return void 0===t?null!==e.channel:t.connected};let on=0n;const sn=(e,t)=>{if(t?.type===pn&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&dn[t].resolve({isDeadlock:!0,hasListeners:!1})},an=async({wrappedMessage:e,anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:o})=>{if(e?.type!==pn||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:fn,message:hn(t,o)};try{await yn({anyProcess:t,channel:n,isSubprocess:r,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},cn=e=>{if(e?.type!==fn)return!1;const{id:t,message:n}=e;return dn[t]?.resolve({isDeadlock:!1,hasListeners:n}),!0},ln=async(e,t,n)=>{if(e?.type!==pn)return;const r=jt();dn[e.id]=r;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([r,un(t,n,o)]);e&&(e=>{throw new Error(`${$t("sendMessage",e)} failed: the ${At(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${$t("getOneMessage",e)},\n\t${$t("sendMessage",e,"message, {strict: true}")},\n]);`)})(n),i||(e=>{throw new Error(`${$t("sendMessage",e)} failed: the ${At(e)} is not listening to incoming messages.`)})(n)}finally{o.abort(),delete dn[e.id]}},dn={},un=async(e,t,{signal:n})=>{Ht(e,1,n),await(0,vt.once)(e,"disconnect",{signal:n}),(e=>{throw new Error(`${$t("sendMessage",e)} failed: the ${At(e)} exited without listening to incoming messages.`)})(t)},pn="execa:ipc:request",fn="execa:ipc:response",mn=async(e,t,n)=>{for(;!hn(e,t)&&bn.get(e)?.size>0;){const t=[...bn.get(e)];sn(t,n),await Promise.all(t.map((({onMessageSent:e})=>e)))}},bn=new WeakMap,hn=(e,t)=>t.listenerCount("message")>gn(e),gn=e=>kt.has(e)&&!q(kt.get(e).options.buffer,"ipc")?1:0,yn=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},o,{strict:i=!1}={})=>{const s="sendMessage";return Tt({methodName:s,isSubprocess:n,ipc:r,isConnected:e.connected}),wn({anyProcess:e,channel:t,methodName:s,isSubprocess:n,message:o,strict:i})},wn=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=en(e,t,n),s=hn(e,i);return{id:on++,type:pn,message:r,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:r,message:o,strict:i}),a=((e,t,n)=>{bn.has(e)||bn.set(e,new Set);const r=bn.get(e),o={onMessageSent:jt(),id:n?t.id:void 0};return r.add(o),{outgoingMessages:r,outgoingMessage:o}})(e,s,i);try{await vn({anyProcess:e,methodName:n,isSubprocess:r,wrappedMessage:s,message:o})}catch(t){throw Bt(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},vn=async({anyProcess:e,methodName:t,isSubprocess:n,wrappedMessage:r,message:o})=>{const i=Sn(e);try{await Promise.all([ln(r,e,n),i(r)])}catch(e){throw(({error:e,methodName:t,isSubprocess:n})=>{if("EPIPE"===e.code)throw new Error(`${$t(t,n)} cannot be used: the ${At(n)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:n}),(({error:e,methodName:t,isSubprocess:n,message:r})=>{if((({code:e,message:t})=>Mt.has(e)||Nt.some((e=>t.includes(e))))(e))throw new Error(`${$t(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}},Sn=e=>{if(xn.has(e))return xn.get(e);const t=(0,$.promisify)(e.send.bind(e));return xn.set(e,t),t},xn=new WeakMap,En=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>(await Tn({anyProcess:e,channel:t,isSubprocess:n,ipc:r}),Nn.signal),Tn=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>{Dn||(Dn=!0,r?null!==t?(en(e,t,n),await ze.scheduler.yield()):Mn():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let Dn=!1;const In=e=>e?.type===On&&(Nn.abort(e.message),!0),On="execa:ipc:cancel",Mn=()=>{Nn.abort(new Error(`\`cancelSignal\` aborted: the ${At(!0)} disconnected.`))},Nn=new AbortController,$n=({subprocess:e,cancelSignal:t,gracefulCancel:n,forceKillAfterDelay:r,context:o,controller:i})=>n?[Cn({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:o,controller:i})]:[],Cn=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:r,controller:{signal:o}})=>{await St(t,o);const i=An(t);throw await((e,t)=>{const n="cancelSignal";return It(n,!1,e.connected),vn({anyProcess:e,methodName:n,isSubprocess:!1,wrappedMessage:{type:On,message:t},message:t})})(e,i),wt({kill:e.kill,forceKillAfterDelay:n,context:r,controllerSignal:o}),r.terminationReason??="gracefulCancel",t.reason},An=({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},Bn=(e,t,n,r)=>0===t||void 0===t?[]:[jn(e,t,n,r)],jn=async(e,t,n,{signal:r})=>{throw await(0,ze.setTimeout)(t,void 0,{signal:r}),n.terminationReason??="timeout",e.kill(),new Ve};var Pn=n(8877);const Rn={advanced:e=>{try{(0,Pn.serialize)(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})}}},kn=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},Ln=new Set(["utf8","utf16le"]),Un=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Fn=new Set([...Ln,...Un]),Gn={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Wn=e=>"string"==typeof e?`"${e}"`:String(e);var _n=n(3024);const zn=()=>{try{return C.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},Vn=(e,t,n)=>{n.cwd=((e=zn())=>{const t=i(e,'The "cwd" option');return Ue.resolve(t)})(n.cwd);const[r,o,s]=((e,t,{node:n=!1,nodePath:r=C.execPath,nodeOptions:o=C.execArgv.filter((e=>!e.startsWith("--inspect"))),cwd:s,execPath:a,...c})=>{if(void 0!==a)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const l=i(r,'The "nodePath" option'),d=Ue.resolve(s,l),u={...c,nodePath:d,node:n,cwd:s};if(!n)return[e,t,u];if("node"===Ue.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[d,[...o,e,...t],{ipc:!0,...u,shell:!1}]})(e,t,n),{command:a,args:l,options:d}=Fe._parse(r,o,s),u=(e=>{const t={...e};for(const n of K)t[n]=R(e,n);return t})(d),p=Hn(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})`)})(p),(({encoding:e})=>{if(Fn.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Gn?Gn[t]:Fn.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Wn(e)}\`.\nPlease rename it to ${Wn(t)}.`);const n=[...Fn].map((e=>Wn(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${Wn(e)}\`.\nPlease rename it to one of: ${n}.`)})(p),(({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`.");Rn[n](e)}})(p),(({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)}`)})(p),(({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.")}})(p),p.shell=c(p.shell),p.env=Kn(p),p.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return at(e,t)})(p.killSignal),p.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return 5e3;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})(p.forceKillAfterDelay),p.lines=p.lines.map(((e,t)=>e&&!Un.has(p.encoding)&&p.buffer[t])),"win32"===C.platform&&"cmd"===Ue.basename(a,".exe")&&l.unshift("/q"),{file:a,commandArguments:l,options:p}},Hn=({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:d=!0,gracefulCancel:u=!1,ipcInput:p,ipc:f=void 0!==p||u,serialization:m="advanced",...b})=>({...b,extendEnv:e,preferLocal:t,cwd:n,localDirectory:r,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:d,gracefulCancel:u,ipcInput:p,ipc:f,serialization:m}),Kn=({env:e,extendEnv:t,preferLocal:n,node:r,localDirectory:o,nodePath:i})=>{const s=t?{...C.env,...e}:e;return n||r?_e({env:s,cwd:o,execPath:i,preferLocal:n,addExecPath:r}):s},qn=(e,t,n)=>n.shell&&t.length>0?[[e,...t].join(" "),[],n]:[e,t,n];function Yn(e){if("string"==typeof e)return Xn(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Jn(e)}const Xn=e=>e.at(-1)===Qn?e.slice(0,e.at(-2)===er?-2:-1):e,Jn=e=>e.at(-1)===Zn?e.subarray(0,e.at(-2)===tr?-2:-1):e,Qn="\n",Zn=Qn.codePointAt(0),er="\r",tr=er.codePointAt(0);function nr(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 rr(e,{checkOpen:t=!0}={}){return nr(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 or(e,{checkOpen:t=!0}={}){return nr(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 ir(e,t){return rr(e,t)&&or(e,t)}const sr=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class ar{#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 cr=Symbol();function lr(){return this[cr].next()}function dr(e){return this[cr].return(e)}Object.defineProperty(lr,"name",{value:"next"}),Object.defineProperty(dr,"name",{value:"return"});const ur=Object.create(sr,{next:{enumerable:!0,configurable:!0,writable:!0,value:lr},return:{enumerable:!0,configurable:!0,writable:!0,value:dr}});function pr({preventCancel:e=!1}={}){const t=this.getReader(),n=new ar(t,e),r=Object.create(ur);return r[cr]=n,r}const fr=e=>{if(or(e,{checkOpen:!1})&&void 0!==gr.on)return br(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===mr.call(e))return pr.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:mr}=Object.prototype,br=async function*(e){const t=new AbortController,n={};hr(e,t,n);try{for await(const[n]of gr.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()}},hr=async(e,t,n)=>{try{await gr.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){n.error=e}finally{t.abort()}},gr={},yr=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=fr(e),d=t();d.length=0;try{for await(const e of l){const t=n[xr(e)](e,d);vr({convertedChunk:t,state:d,getSize:r,truncateChunk:o,addChunk:i,maxBuffer:c})}return wr({state:d,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(d)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(d),t}},wr=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&vr({convertedChunk:s,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:i})},vr=({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 Sr(e,t,o,a);const c=r(e,i-t.length);throw void 0!==c&&Sr(c,t,o,i),new Tr},Sr=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},xr=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=Er.call(e);return"[object ArrayBuffer]"===n?"arrayBuffer":"[object DataView]"===n?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===Er.call(e.buffer)?"typedArray":"others"},{toString:Er}=Object.prototype;class Tr extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Dr=(e,t,n)=>{if(t.length!==n)return;const r=new Tr;throw r.maxBufferInfo={fdNumber:"ipc"},r},Ir=([,e])=>e,Or=({originalError:e,timedOut:t,timeout:n,isMaxBuffer:r,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:d,isForcefullyTerminated:u,forceKillAfterDelay:p,killSignal:f})=>{const m=Mr(u,p);return t?`Command timed out after ${n} milliseconds${m}`:d?void 0===s?`Command was gracefully canceled with exit code ${c}`:u?`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}=((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=q(t,n);return"ipc"===n?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:P(n),threshold:o,unit:r}})(e,t);return`Command's ${n} was larger than ${r} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:u?`Command was killed with ${f} (${mt(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Mr=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Nr=e=>"string"==typeof e?e:f(e)?y(e):"",$r=({command:e,escapedCommand:t,stdio:n,all:r,ipcOutput:o,options:{cwd:i},startTime:s})=>jr({command:e,escapedCommand:t,cwd:i,durationMs:ke(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:[]}),Cr=({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:s})=>Ar({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}),Ar=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:d,stdio:u,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:b=m,forceKillAfterDelay:h,killSignal:g,cwd:y,maxBuffer:w},isSync:v})=>{const{exitCode:S,signal:x,signalDescription:E}=Pr(l,d),{originalMessage:T,shortMessage:D,message:I}=(({stdio:e,all:t,ipcOutput:n,originalError:r,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:d,isMaxBuffer:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:b,timeout:h,cwd:g})=>{const y=r?.code,w=Or({originalError:r,timedOut:c,timeout:h,isMaxBuffer:u,maxBuffer:b,errorCode:y,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),v=((e,t)=>{if(e instanceof Ve)return;const n=qe(r=e)&&Ke in r?e.originalMessage:String(e?.message??e);var r;const o=te(((e,t)=>{if(t===zn())return e;let n;try{n=(0,_n.statSync)(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""===o?void 0:o})(r,g),S=`${w}: ${a}${void 0===v?"":`\n${v}`}`,x=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),n.map((e=>(e=>"string"==typeof e?e:(0,$.inspect)(e))(e))).join("\n")].map((e=>te(Yn((e=>Array.isArray(e)?e.map((e=>Yn(Nr(e)))).filter(Boolean).join("\n"):Nr(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:v,shortMessage:S,message:x}})({stdio:u,all:p,ipcOutput:f,originalError:e,signal:x,signalDescription:E,exitCode:S,escapedCommand:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:h,killSignal:g,maxBuffer:w,timeout:b,cwd:y}),O=((e,t,n)=>new(n?Xe:Ye)(t,e instanceof Ve?{}:{cause:e}))(e,I,v);return Object.assign(O,Br({error:O,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:x,signalDescription:E,stdio:u,all:p,ipcOutput:f,cwd:y,originalMessage:T,shortMessage:D})),O},Br=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:d,signalDescription:u,stdio:p,all:f,ipcOutput:m,cwd:b,originalMessage:h,shortMessage:g})=>jr({shortMessage:g,originalMessage:h,command:t,escapedCommand:n,cwd:b,durationMs:ke(r),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==d,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:d,signalDescription:u,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),jr=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),Pr=(e,t)=>{const n=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:n,signalDescription:void 0===n?void 0:mt(t)}},Rr=e=>Number.isFinite(e)?e:0;function kr(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=function(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(Rr(1e3*e)%1e3),nanoseconds:Math.trunc(Rr(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")}(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){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","\xb5s"),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 Lr=(e,t)=>{const n=`(done in ${kr(e.durationMs)})`;Me({type:"duration",verboseMessage:n,verboseInfo:t,result:e})},Ur=(e,t,{reject:n})=>{if(((e,t)=>{Y(t)&&(((e,t)=>{e.failed&&Me({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),Lr(e,t))})(e,t),e.failed&&n)throw e;return e},Fr=(e,t)=>Yr(e)?"asyncGenerator":Xr(e)?"generator":Qr(e)?"fileUrl":Zr(e)?"filePath":io(e)?"webStream":nr(e,{checkOpen:!1})?"native":f(e)?"uint8Array":ao(e)?"asyncIterable":co(e)?"iterable":so(e)?_r({transform:e},t):Jr(e)?Gr(e,t):"native",Gr=(e,t)=>ir(e.transform,{checkOpen:!1})?Wr(e,t):so(e.transform)?_r(e,t):Hr(e,t),Wr=(e,t)=>(zr(e,t,"Duplex stream"),"duplex"),_r=(e,t)=>(zr(e,t,"web TransformStream"),"webTransform"),zr=({final:e,binary:t,objectMode:n},r,o)=>{Vr(e,`${r}.final`,o),Vr(t,`${r}.binary`,o),Kr(n,`${r}.objectMode`)},Vr=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${n}.`)},Hr=({transform:e,final:t,binary:n,objectMode:r},o)=>{if(void 0!==e&&!qr(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(ir(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(so(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!qr(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return Kr(n,`${o}.binary`),Kr(r,`${o}.objectMode`),Yr(e)||Yr(t)?"asyncGenerator":"generator"},Kr=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},qr=e=>Yr(e)||Xr(e),Yr=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),Xr=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),Jr=e=>r(e)&&(void 0!==e.transform||void 0!==e.final),Qr=e=>"[object URL]"===Object.prototype.toString.call(e),Zr=e=>r(e)&&Object.keys(e).length>0&&Object.keys(e).every((e=>eo.has(e)))&&to(e.file),eo=new Set(["file","append"]),to=e=>"string"==typeof e,no=new Set(["ipc","ignore","inherit","overlapped","pipe"]),ro=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),oo=e=>"[object WritableStream]"===Object.prototype.toString.call(e),io=e=>ro(e)||oo(e),so=e=>ro(e?.readable)&&oo(e?.writable),ao=e=>lo(e)&&"function"==typeof e[Symbol.asyncIterator],co=e=>lo(e)&&"function"==typeof e[Symbol.iterator],lo=e=>"object"==typeof e&&null!==e,uo=new Set(["generator","asyncGenerator","duplex","webTransform"]),po=new Set(["fileUrl","filePath","fileNumber"]),fo=new Set(["fileUrl","filePath"]),mo=new Set([...fo,"webStream","nodeStream"]),bo=new Set(["webTransform","duplex"]),ho={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"},go=(e,t,n,r)=>"output"===r?yo(e,t,n):wo(e,t,n),yo=(e,t,n)=>{const r=0!==t&&n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:e??r}},wo=(e,t,n)=>{const r=0===t?!0===e:n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:t!==n.length-1&&(e??r)}},vo=(e,t,n,{encoding:r})=>{const o=e.filter((({type:e})=>uo.has(e))),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=So({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:n,encoding:r});return Do(i,n)},So=({stdioItem:e,stdioItem:{type:t},index:n,newTransforms:r,optionName:o,direction:i,encoding:s})=>"duplex"===t?xo({stdioItem:e,optionName:o}):"webTransform"===t?Eo({stdioItem:e,index:n,newTransforms:r,direction:i}):To({stdioItem:e,index:n,newTransforms:r,direction:i,encoding:s}),xo=({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}}},Eo=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:o,direction:i})=>{const{transform:s,objectMode:a}=r(t)?t:{transform:t},{writableObjectMode:c,readableObjectMode:l}=go(a,n,o,i);return{...e,value:{transform:s,writableObjectMode:c,readableObjectMode:l}}},To=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:o,direction:i,encoding:s})=>{const{transform:a,final:c,binary:l=!1,preserveNewlines:d=!1,objectMode:u}=r(t)?t:{transform:t},p=l||Un.has(s),{writableObjectMode:f,readableObjectMode:m}=go(u,n,o,i);return{...e,value:{transform:a,final:c,binary:p,preserveNewlines:d,writableObjectMode:f,readableObjectMode:m}}},Do=(e,t)=>"input"===t?e.reverse():e,Io=["input","output","output"],Oo=()=>{},Mo=()=>"input",No={generator:Oo,asyncGenerator:Oo,fileUrl:Oo,filePath:Oo,iterable:Mo,asyncIterable:Mo,uint8Array:Mo,webStream:e=>oo(e)?"output":"input",nodeStream:e=>or(e,{checkOpen:!1})?rr(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Oo,duplex:Oo,native(e){const t=$o(e);return void 0!==t?t:nr(e,{checkOpen:!1})?No.nodeStream(e):void 0}},$o=e=>[0,C.stdin].includes(e)?"input":[1,2,C.stdout,C.stderr].includes(e)?"output":void 0,Co=e=>j.some((t=>void 0!==e[t])),Ao=(e,t)=>Array.isArray(e)?e.map((e=>Ao(e,t))):null==e?t>=j.length?"ignore":"pipe":e,Bo=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),jo=({value:e,optionName:t,fdNumber:n,direction:r})=>{const o=Po(e,n);if(void 0!==o){if("output"===r)return{type:"fileNumber",value:o,optionName:t};if(fe.isatty(o))throw new TypeError(`The \`${t}: ${Vt(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:m((0,_n.readFileSync)(o)),optionName:t}}},Po=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const n=B.indexOf(e);return-1!==n?n:void 0},Ro=(e,t,n)=>{const r=B[e];if(void 0===r)throw new TypeError(`The \`${n}: ${t}\` option is invalid: no such standard stream.`);return r},ko=({input:e,inputFile:t},n)=>0===n?[...Lo(e),...Fo(t)]:[],Lo=e=>void 0===e?[]:[{type:Uo(e),value:e,optionName:"input"}],Uo=e=>{if(or(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(f(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},Fo=e=>void 0===e?[]:[{...Go(e),optionName:"inputFile"}],Go=e=>{if(Qr(e))return{type:"fileUrl",value:e};if(to(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},Wo=({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{const i=e.filter((e=>_o(e,n)));if(0===i.length)return;const s=i.find((e=>e.direction!==o));return zo(s,r,t),"output"===o?i[0].stream:void 0},_o=({type:e,value:t},n)=>"filePath"===e?t.file===n.file:"fileUrl"===e?t.href===n.href:t===n,zo=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${ho[n]} that is the same.`)},Vo=(e,t,n,r)=>{const o=(({stdio:e,ipc:t,buffer:n,...r},o,i)=>{const s=((e,t)=>{if(void 0===e)return j.map((e=>t[e]));if(Co(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${j.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,j.length);return Array.from({length:n},((t,n)=>e[n]))})(e,r).map(((e,t)=>Ao(e,t)));return i?((e,t,n)=>e.map(((e,r)=>t[r]||0===r||X(n,r)||!Bo(e)?e:"ignore")))(s,n,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,n,r),i=o.map(((e,n)=>Ho({stdioOption:e,fdNumber:n,options:t,isSync:r}))),s=ei({initialFileDescriptors:i,addProperties:e,options:t,isSync:r});return t.stdio=s.map((({stdioItems:e})=>oi(e))),s},Ho=({stdioOption:e,fdNumber:t,options:n,isSync:r})=>{const o=P(t),{stdioItems:i,isStdioArray:s}=Ko({stdioOption:e,fdNumber:t,options:n,optionName:o}),a=((e,t,n)=>{const r=e.map((e=>(({type:e,value:t},n)=>Io[n]??No[e](t))(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)??"output"})(i,t,o),c=i.map((e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:n,fdNumber:r,direction:o,isSync:i})=>n&&"native"===t?i?(({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r,direction:o})=>{const i=jo({value:t,optionName:n,fdNumber:r,direction:o});if(void 0!==i)return i;if(nr(t,{checkOpen:!1}))throw new TypeError(`The \`${n}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e})({stdioItem:e,fdNumber:r,direction:o}):(({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r})=>"inherit"===t?{type:"nodeStream",value:Ro(r,t,n),optionName:n}:"number"==typeof t?{type:"nodeStream",value:Ro(t,t,n),optionName:n}:nr(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:n}:e)({stdioItem:e,fdNumber:r}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:r}))),l=((e,t,n,r)=>[...e.filter((({type:e})=>!uo.has(e))),...vo(e,t,n,r)])(c,o,a,n),d=((e,t)=>{const n=e.findLast((({type:e})=>uo.has(e)));return void 0!==n&&("input"===t?n.value.writableObjectMode:n.value.readableObjectMode)})(l,a);return Zo(l,d),{direction:a,objectMode:d,stdioItems:l}},Ko=({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=>qo(e,r))),...ko(n,t)]),i=o.length>1;return Yo(o,i,r),Jo(o),{stdioItems:o,isStdioArray:i}},qo=(e,t)=>({type:Fr(e,t),value:e,optionName:t}),Yo=(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(Xo.has(t))throw new Error(`The \`${n}\` option must not include \`${t}\`.`)},Xo=new Set(["ignore","ipc"]),Jo=e=>{for(const t of e)Qo(t)},Qo=({type:e,value:t,optionName:n})=>{if((e=>Qr(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&&!no.has(t))(e,t))throw new TypeError(`The \`${n}: { file: '...' }\` option must be used instead of \`${n}: '...'\`.`)},Zo=(e,t)=>{if(!t)return;const n=e.find((({type:e})=>po.has(e)));if(void 0!==n)throw new TypeError(`The \`${n.optionName}\` option cannot use both files and transforms in objectMode.`)},ei=({initialFileDescriptors:e,addProperties:t,options:n,isSync:r})=>{const o=[];try{for(const i of e)o.push(ti({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:n,isSync:r}));return o}catch(e){throw ri(o),e}},ti=({fileDescriptor:{direction:e,objectMode:t,stdioItems:n},fileDescriptors:r,addProperties:o,options:i,isSync:s})=>{const a=n.map((t=>ni({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:r,isSync:s})));return{direction:e,objectMode:t,stdioItems:a}},ni=({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=((e,t)=>e.flatMap((({direction:e,stdioItems:n})=>n.filter((e=>e.type===t)).map((t=>({...t,direction:e}))))))(o,e);if(0!==s.length){if(!i)return mo.has(e)?Wo({otherStdioItems:s,type:e,value:t,optionName:n,direction:r}):void(bo.has(e)&&(({otherStdioItems:e,type:t,value:n,optionName:r})=>{const o=e.find((({value:{transform:e}})=>e===n.transform));zo(o,r,t)})({otherStdioItems:s,type:e,value:t,optionName:n}));(({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{fo.has(t)&&Wo({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})})({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)}},ri=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||A(e)||e.destroy()},oi=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"},ii=({type:e,optionName:t})=>{si(t,ho[e])},si=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},ai={generator(){},asyncGenerator:ii,webStream:ii,nodeStream:ii,webTransform:ii,duplex:ii,asyncIterable:ii,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||si(e,`"${t}"`),{})},ci={input:{...ai,fileUrl:({value:e})=>({contents:[m((0,_n.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[m((0,_n.readFileSync)(e))]}),fileNumber:ii,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...ai,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:ii,string:ii,uint8Array:ii}},li=(e,{stripFinalNewline:t},n)=>di(t,n)&&void 0!==e&&!Array.isArray(e)?Yn(e):e,di=(e,t)=>"all"===t?e[1]||e[2]:e[t];var ui=n(7075);const pi=(e,t,n,r)=>e||n?void 0:bi(t,r),fi=(e,t,n)=>n?e.flatMap((e=>mi(e,t))):mi(e,t),mi=(e,t)=>{const{transform:n,final:r}=bi(t,{});return[...n(e),...r()]},bi=(e,t)=>(t.previousChunks="",{transform:hi.bind(void 0,t,e),final:yi.bind(void 0,t)}),hi=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=gi(n,i,t,e);let a=n.slice(o+1,i+1-s);r.length>0&&(a=Si(r,a),r=""),yield a,o=i}o!==n.length-1&&(r=Si(r,n.slice(o+1))),e.previousChunks=r},gi=(e,t,n,r)=>n?0:(r.isWindowsNewline=0!==t&&"\r"===e[t-1],r.isWindowsNewline?2:1),yi=function*({previousChunks:e}){e.length>0&&(yield e)},wi=({binary:e,preserveNewlines:t,readableObjectMode:n,state:r})=>e||t||n?void 0:{transform:vi.bind(void 0,r)},vi=function*({isWindowsNewline:e=!1},t){const{unixNewline:n,windowsNewline:r,LF:o,concatBytes:i}="string"==typeof t?xi:Ei;if(t.at(-1)===o)return void(yield t);const s=e?r:n;yield i(t,s)},Si=(e,t)=>`${e}${t}`,xi={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Si},Ei={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}};var Ti=n(4573);const Di=(e,t)=>e?void 0:Ii.bind(void 0,t),Ii=function*(e,t){if("string"!=typeof t&&!f(t)&&!Ti.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Oi=(e,t)=>e?Mi.bind(void 0,t):Ni.bind(void 0,t),Mi=function*(e,t){$i(e,t),yield t},Ni=function*(e,t){if($i(e,t),"string"!=typeof t&&!f(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},$i=(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; }`)},Ci=(e,t,n)=>{if(n)return;if(e)return{transform:Ai.bind(void 0,new TextEncoder)};const r=new u.StringDecoder(t);return{transform:Bi.bind(void 0,r),final:ji.bind(void 0,r)}},Ai=function*(e,t){Ti.Buffer.isBuffer(t)?yield m(t):"string"==typeof t?yield e.encode(t):yield t},Bi=function*(e,t){yield f(t)?e.write(t):t},ji=function*(e){const t=e.end();""!==t&&(yield t)},Pi=(0,$.callbackify)((async(e,t,n,r)=>{t.currentIterable=e(...n);try{for await(const e of t.currentIterable)r.push(e)}finally{delete t.currentIterable}})),Ri=async function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=Fi}=t[n];for await(const o of r(e))yield*Ri(o,t,n+1)},ki=async function*(e){for(const[t,{final:n}]of Object.entries(e))yield*Li(n,Number(t),e)},Li=async function*(e,t,n){if(void 0!==e)for await(const r of e())yield*Ri(r,n,t+1)},Ui=(0,$.callbackify)((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),Fi=function*(e){yield e},Gi=(e,t,n,r)=>{try{for(const r of e(...t))n.push(r);r()}catch(e){r(e)}},Wi=(e,t)=>[...t.flatMap((t=>[..._i(t,e,0)])),...zi(e)],_i=function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=Hi}=t[n];for(const o of r(e))yield*_i(o,t,n+1)},zi=function*(e){for(const[t,{final:n}]of Object.entries(e))yield*Vi(n,Number(t),e)},Vi=function*(e,t,n){if(void 0!==e)for(const r of e())yield*_i(r,n,t+1)},Hi=function*(e){yield e},Ki=({value:e,value:{transform:t,final:n,writableObjectMode:r,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=Yi(e,s,i),l=Yr(t),d=Yr(n),u=l?Pi.bind(void 0,Ri,a):Gi.bind(void 0,_i),p=l||d?Pi.bind(void 0,ki,a):Gi.bind(void 0,zi),f=l||d?Ui.bind(void 0,a):void 0;return{stream:new ui.Transform({writableObjectMode:r,writableHighWaterMark:(0,ui.getDefaultHighWaterMark)(r),readableObjectMode:o,readableHighWaterMark:(0,ui.getDefaultHighWaterMark)(o),transform(e,t,n){u([e,c,0],this,n)},flush(e){p([c],this,e)},destroy:f})}},qi=(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=Yi(t,n,r);e=Wi(o,e)}return e},Yi=({transform:e,final:t,binary:n,writableObjectMode:r,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:Di(r,a)},Ci(n,s,r),pi(n,i,r,c),{transform:e,final:t},{transform:Oi(o,a)},wi({binary:n,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},Xi=(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 ${ho[e]} with synchronous methods.`)}const i=o.map((({contents:e})=>e)).map((e=>Ji(e,r)));n.input=w(i)},Ji=(e,t)=>{const n=qi(e,t,"utf8",!0);return Qi(n),w(n)},Qi=e=>{const t=e.find((e=>"string"!=typeof e&&!f(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}.`)},Zi=({stdioItems:e,encoding:t,verboseInfo:n,fdNumber:r})=>"all"!==r&&X(n,r)&&!Un.has(t)&&es(r)&&(e.some((({type:e,value:t})=>"native"===e&&ts.has(t)))||e.every((({type:e})=>uo.has(e)))),es=e=>1===e||2===e,ts=new Set(["pipe","overlapped"]),ns=e=>e._readableState.pipes.length>0,rs=(e,t,n)=>{const r=Ae(e);Me({type:"output",verboseMessage:r,fdNumber:t,verboseInfo:n})},os=(e,t,n,r)=>{try{return qi(e,t,n,!1)}catch(t){return r.error=t,e}},is=({chunks:e,objectMode:t,encoding:n,lines:r,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===n)return{serializedResult:w(e)};const s=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const n=new u.StringDecoder(t),r=e.map((e=>"string"==typeof e?h(e):e)).map((e=>n.write(e))),o=n.end();return""===o?r:[...r,o]})(e,t).join(""))(e,n);return r[i]?{serializedResult:s,finalResult:fi(s,!o[i],t)}:{serializedResult:s}},ss=({serializedResult:e,fdNumber:t,state:n,verboseInfo:r,encoding:o,stdioItems:i,objectMode:s})=>{if(!Zi({stdioItems:i,encoding:o,verboseInfo:r,fdNumber:t}))return;const a=fi(e,!1,s);try{((e,t,n)=>{for(const r of e)rs(r,t,n)})(a,t,r)}catch(e){n.error??=e}},as=(e,t,n)=>{for(const{path:r,append:o}of t.filter((({type:e})=>po.has(e)))){const t="string"==typeof r?r:r.toString();o||n.has(t)?(0,_n.appendFileSync)(r,e):(n.add(t),(0,_n.writeFileSync)(r,e))}},cs=async e=>{try{return await(0,vt.once)(e,"exit")}catch{return cs(e)}},ls=async e=>{const[t,n]=await e;if(!ds(t,n)&&us(t,n))throw new Ve;return[t,n]},ds=(e,t)=>void 0===e&&void 0===t,us=(e,t)=>0!==e||null!==t,ps=(e,t,n)=>void 0!==e?e:us(t,n)?new Ve:void 0,fs=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,ms=({ipc:e,ipcInput:t,detached:n,cancelSignal:r})=>{t&&bs("ipcInput"),e&&bs("ipc: true"),n&&bs("detached: true"),r&&bs("cancelSignal")},bs=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},hs=({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=gs({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:d,signal:u,timedOut:p,isMaxBuffer:b}=(({error:e,status:t,signal:n,output:r},{maxBuffer:o})=>{const i=ps(e,t,n),s="ETIMEDOUT"===i?.code,a=((e,t,n)=>"ENOBUFS"===e?.code&&null!==t&&t.some((e=>null!==e&&e.length>Ir(n))))(i,r,o);return{resultError:i,exitCode:t,signal:n,timedOut:s,isMaxBuffer:a}})(c,n),{output:h,error:g=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)=>(({result:e,fileDescriptors:t,fdNumber:n,state:r,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:d,maxBuffer:u})=>{if(null===e)return;const p=((e,t,n)=>{if(!t)return e;const r=Ir(n);return e.length>r?e.slice(0,r):e})(e,i,u),f=m(p),{stdioItems:b,objectMode:h}=t[n],g=os([f],b,c,r),{serializedResult:y,finalResult:w=y}=is({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:d,fdNumber:n});ss({serializedResult:y,fdNumber:n,state:r,verboseInfo:s,encoding:c,stdioItems:b,objectMode:h});const v=a[n]?w:void 0;try{return void 0===r.error&&as(y,b,o),v}catch(e){return r.error=e,v}})({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:r,verboseInfo:o},n))),...i}})({fileDescriptors:s,syncResult:c,options:n,isMaxBuffer:b,verboseInfo:i}),y=h.map(((e,t)=>li(e,n,t))),w=li((([,e,t],n)=>{if(n.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,li(t,n,"all")]:Array.isArray(t)?[li(e,n,"all"),...t]:f(e)&&f(t)?S([e,t]):`${e}${t}`})(h,n),n,"all");return ws({error:g,exitCode:d,signal:u,timedOut:p,isMaxBuffer:b,stdio:y,all:w,options:n,command:r,escapedCommand:o,startTime:a})},gs=({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const n of(e=>new Set(Object.entries(e).filter((([,{direction:e}])=>"input"===e)).map((([e])=>Number(e)))))(e))Xi(e,n,t)})(i,n);const r=ys(n);return(0,d.spawnSync)(...qn(e,t,r))}catch(e){return Cr({error:e,command:r,escapedCommand:o,fileDescriptors:i,options:n,startTime:s,isSync:!0})}},ys=({encoding:e,maxBuffer:t,...n})=>({...n,encoding:"buffer",maxBuffer:Ir(t)}),ws=({error:e,exitCode:t,signal:n,timedOut:r,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:d})=>void 0===e?$r({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:d}):Ar({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:d,isSync:!0}),vs=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0,filter:i}={})=>(Tt({methodName:"getOneMessage",isSubprocess:n,ipc:r,isConnected:rn(e)}),Ss({anyProcess:e,channel:t,isSubprocess:n,filter:i,reference:o})),Ss=async({anyProcess:e,channel:t,isSubprocess:n,filter:r,reference:o})=>{Kt(t,o);const i=en(e,t,n),s=new AbortController;try{return await Promise.race([xs(i,r,s),Es(i,n,s),Ts(i,n,s)])}catch(t){throw Bt(e),t}finally{s.abort(),Yt(t,o)}},xs=async(e,t,{signal:n})=>{if(void 0===t){const[t]=await(0,vt.once)(e,"message",{signal:n});return t}for await(const[r]of(0,vt.on)(e,"message",{signal:n}))if(t(r))return r},Es=async(e,t,{signal:n})=>{await(0,vt.once)(e,"disconnect",{signal:n}),(e=>{throw new Error(`${$t("getOneMessage",e)} could not complete: the ${At(e)} exited or disconnected.`)})(t)},Ts=async(e,t,{signal:n})=>{const[r]=await(0,vt.once)(e,"strict:error",{signal:n});throw Ot(r,t)},Ds=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0}={})=>Is({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:!n,reference:o}),Is=({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:o,reference:i})=>{Tt({methodName:"getEachMessage",isSubprocess:n,ipc:r,isConnected:rn(e)}),Kt(t,i);const s=en(e,t,n),a=new AbortController,c={};return Os(e,s,a),Ms({ipcEmitter:s,isSubprocess:n,controller:a,state:c}),Ns({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:n,shouldAwait:o,controller:a,state:c,reference:i})},Os=async(e,t,n)=>{try{await(0,vt.once)(t,"disconnect",{signal:n.signal}),n.abort()}catch{}},Ms=async({ipcEmitter:e,isSubprocess:t,controller:n,state:r})=>{try{const[o]=await(0,vt.once)(e,"strict:error",{signal:n.signal});r.error=Ot(o,t),n.abort()}catch{}},Ns=async function*({anyProcess:e,channel:t,ipcEmitter:n,isSubprocess:r,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of(0,vt.on)(n,"message",{signal:i.signal}))$s(s),yield e}catch{$s(s)}finally{i.abort(),Yt(t,a),r||Bt(e),o&&await e}},$s=({error:e})=>{if(e)throw e},Cs=(e,t,n)=>({sendMessage:yn.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getOneMessage:vs.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getEachMessage:Ds.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})}),As=()=>{const e=new ui.PassThrough;return e.end(),e},Bs=()=>new ui.Readable({read(){}}),js=()=>new ui.Writable({write(){}}),Ps=()=>new ui.Duplex({read(){},write(){}}),Rs=async(e,t,n)=>Ur(e,t,n),ks=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${ho[e]}.`)},Ls={fileNumber:ks,generator:Ki,asyncGenerator:Ki,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:n}}){const r=t||n;return{stream:ui.Duplex.fromWeb(e,{objectMode:r})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},Us={input:{...Ls,fileUrl:({value:e})=>({stream:(0,_n.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,_n.createReadStream)(e)}),webStream:({value:e})=>({stream:ui.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:ui.Readable.from(e)}),asyncIterable:({value:e})=>({stream:ui.Readable.from(e)}),string:({value:e})=>({stream:ui.Readable.from(e)}),uint8Array:({value:e})=>({stream:ui.Readable.from(Ti.Buffer.from(e))})},output:{...Ls,fileUrl:({value:e})=>({stream:(0,_n.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,_n.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:ui.Writable.fromWeb(e)}),iterable:ks,asyncIterable:ks,string:ks,uint8Array:ks}};var Fs=n(6466);function Gs(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Ks(t);const t=e.some((({readableObjectMode:e})=>e)),n=Ws(e,t),r=new _s({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(const t of e)r.add(t);return r}const Ws=(e,t)=>{if(0===e.length)return(0,ui.getDefaultHighWaterMark)(t);const n=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...n)};class _s extends ui.PassThrough{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#d=Symbol("unpipe");#u=new WeakMap;add(e){if(Ks(e),this.#s.has(e))return;this.#s.add(e),this.#l??=zs(this,this.#s,this.#d);const t=qs({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#d});this.#u.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Ks(e),!this.#s.has(e))return!1;const t=this.#u.get(e);return void 0!==t&&(this.#u.delete(e),e.unpipe(this),await t,!0)}}const zs=async(e,t,n)=>{oa(e,ia);const r=new AbortController;try{await Promise.race([Vs(e,r),Hs(e,t,n,r)])}finally{r.abort(),oa(e,-ia)}},Vs=async(e,{signal:t})=>{try{await(0,Fs.finished)(e,{signal:t,cleanup:!0})}catch(t){throw Zs(e,t),t}},Hs=async(e,t,n,{signal:r})=>{for await(const[o]of(0,vt.on)(e,"unpipe",{signal:r}))t.has(o)&&o.emit(n)},Ks=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},qs=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,onFinished:i,unpipeEvent:s})=>{oa(e,sa);const a=new AbortController;try{await Promise.race([Ys(i,t,a),Xs({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:a}),Js({stream:t,streams:n,ended:r,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),oa(e,-sa)}n.size>0&&n.size===r.size+o.size&&(0===r.size&&o.size>0?ta(e):Qs(e))},Ys=async(e,t,{signal:n})=>{try{await e,n.aborted||ta(t)}catch(e){n.aborted||Zs(t,e)}},Xs=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:{signal:i}})=>{try{await(0,Fs.finished)(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(r){if(i.aborted||!n.has(t))return;ea(r)?o.add(t):na(e,r)}},Js=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:o,controller:{signal:i}})=>{if(await(0,vt.once)(e,o,{signal:i}),!e.readable)return(0,vt.once)(i,"abort",{signal:i});t.delete(e),n.delete(e),r.delete(e)},Qs=e=>{e.writable&&e.end()},Zs=(e,t)=>{ea(t)?ta(e):na(e,t)},ea=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,ta=e=>{(e.readable||e.writable)&&e.destroy()},na=(e,t)=>{e.destroyed||(e.once("error",ra),e.destroy(t))},ra=()=>{},oa=(e,t)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&e.setMaxListeners(n+t)},ia=2,sa=1,aa=(e,t)=>{e.pipe(t),ca(e,t),da(e,t)},ca=async(e,t)=>{if(!A(e)&&!A(t)){try{await(0,Fs.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}la(t)}},la=e=>{e.writable&&e.end()},da=async(e,t)=>{if(!A(e)&&!A(t)){try{await(0,Fs.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}ua(e)}},ua=e=>{e.readable&&e.destroy()},pa=(e,t,n,r)=>{"output"===n?aa(e.stdio[r],t):aa(t,e.stdio[r]);const o=fa[r];void 0!==o&&(e[o]=t),e.stdio[r]=t},fa=["stdin","stdout","stderr"],ma=({subprocess:e,stream:t,direction:n,fdNumber:r,pipeGroups:o,controller:i})=>{if(void 0===t)return;ba(t,i);const[s,a]="output"===n?[t,e.stdio[r]]:[e.stdio[r],t],c=o.get(s)??[];o.set(s,[...c,a])},ba=(e,{signal:t})=>{A(e)&&Ht(e,ha,t)},ha=2;var ga=n(7017);const ya=(e,t,n,...r)=>{if(Array.isArray(n))return{destination:t(wa,e)(n,...r),pipeOptions:e};if("string"==typeof n||n instanceof URL||a(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]=l(n,...r);return{destination:t(wa)(o,i,s),pipeOptions:s}}if(kt.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}`)},wa=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),va=({error:e,fileDescriptors:t,sourceOptions:n,startTime:r})=>Cr({error:e,command:Sa,escapedCommand:Sa,fileDescriptors:t,options:n,startTime:r,isSync:!1}),Sa="source.pipe(destination)",xa=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},Ea=new WeakMap,Ta=(e,t)=>void 0===e?[]:[Da(e,t)],Da=async(e,{sourceStream:t,mergedStream:n,fileDescriptors:r,sourceOptions:o,startTime:i})=>{await(0,$.aborted)(e,t),await n.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw va({error:s,fileDescriptors:r,sourceOptions:o,startTime:i})},Ia=(e,...t)=>{if(r(t[0]))return Ia.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:n,...o}=(({source:e,sourcePromise:t,boundOptions:n,createNested:r},...o)=>{const i=Re(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:d}=((e,t,n)=>{try{const{destination:r,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=ya(e,t,...n);return{destination:r,destinationStream:Pt(r,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}})(n,r,o),{sourceStream:u,sourceError:p}=((e,t)=>{try{return{sourceStream:Rt(e,t)}}catch(e){return{sourceError:e}}})(e,l),{options:f,fileDescriptors:m}=kt.get(e);return{sourcePromise:t,sourceStream:u,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:d,fileDescriptors:m,startTime:i}})(e,...t),i=Oa({...o,destination:n});return i.pipe=Ia.bind(void 0,{...e,source:n,sourcePromise:i,boundOptions:{}}),i},Oa=async({sourcePromise:e,sourceStream:t,sourceOptions:n,sourceError:r,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const d=Ma(e,o);(({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=(({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r})=>void 0!==t&&void 0!==r?r:void 0!==r?(ua(e),r):void 0!==t?(la(n),t):void 0)({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r});if(void 0!==a)throw va({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:r,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:n,startTime:l});const u=new AbortController;try{const e=((e,t,n)=>{const r=Ea.has(t)?((e,t)=>{const n=Ea.get(t);return n.add(e),n})(e,t):((e,t)=>{const n=Gs([e]);return aa(n,t),Ea.set(t,n),n})(e,t);return Ht(e,2,n.signal),Ht(t,1,n.signal),(async e=>{try{await(0,Fs.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Ea.delete(e)})(t),r})(t,i,u);return await Promise.race([xa(d),...Ta(a,{sourceStream:t,mergedStream:e,sourceOptions:n,fileDescriptors:c,startTime:l})])}finally{u.abort()}},Ma=(e,t)=>Promise.allSettled([e,t]),Na=e=>e,$a=()=>{},Ca=({contents:e})=>e,Aa=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Ba=e=>e.length,ja={init:()=>({contents:[]}),convertChunk:{string:Na,buffer:Na,arrayBuffer:Na,dataView:Na,typedArray:Na,others:Na},getSize:()=>1,truncateChunk:$a,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:$a,finalize:Ca},Pa=new TextEncoder,Ra=e=>new Uint8Array(e),ka=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),La=e=>Ua**Math.ceil(Math.log(e)/Math.log(Ua)),Ua=2,Fa=()=>"resize"in ArrayBuffer.prototype,Ga={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>Pa.encode(e),buffer:Ra,arrayBuffer:Ra,dataView:ka,typedArray:ka,others:Aa},getSize:Ba,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:n},r)=>{const o=Fa()?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const n=new ArrayBuffer(t,{maxByteLength:La(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r):((e,t)=>{if(t<=e.byteLength)return e;const n=new ArrayBuffer(La(t));return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r);return new Uint8Array(o).set(e,n),o},getFinalChunk:$a,finalize:({contents:e,length:t})=>Fa()?e:e.slice(0,t)},Wa=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),_a={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Na,buffer:Wa,arrayBuffer:Wa,dataView:Wa,typedArray:Wa,others:Aa},getSize:Ba,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:Ca},za=({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:r,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Va(t,s),qa({stream:e,controller:s,binary:n,shouldEncode:!e.readableObjectMode&&r,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Va=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Ha=({stream:e,onStreamEnd:t,lines:n,encoding:r,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;Ka(t,s,e);const a=e.readableObjectMode&&!i;return qa({stream:e,controller:s,binary:"buffer"===r,shouldEncode:!a,encoding:r,shouldSplit:!a&&n,preserveNewlines:!o})},Ka=async(e,t,n)=>{try{await e}catch{n.destroy()}finally{t.abort()}},qa=({stream:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=(0,vt.on)(e,"data",{signal:t.signal,highWaterMark:Xa,highWatermark:Xa});return Ja({onStdoutChunk:a,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})},Ya=(0,ui.getDefaultHighWaterMark)(!0),Xa=Ya,Ja=async function*({onStdoutChunk:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Qa({binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*_i(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*zi(a)}},Qa=({binary:e,shouldEncode:t,encoding:n,shouldSplit:r,preserveNewlines:o})=>[Ci(e,n,!t),pi(e,o,!r,{})].filter(Boolean),Za=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:d})=>{const u=ec({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:a,verboseInfo:l,streamInfo:d});if(!o)return void await Promise.all([tc(e),u]);const p=di(c,n),f=Ha({stream:e,onStreamEnd:t,lines:s,encoding:r,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([nc({stream:e,iterable:f,fdNumber:n,encoding:r,maxBuffer:i,lines:s}),u]);return m},ec=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!Zi({stdioItems:s[n]?.stdioItems,encoding:r,verboseInfo:i,fdNumber:n}))return;const a=Ha({stream:e,onStreamEnd:t,lines:!0,encoding:r,stripFinalNewline:!0,allMixed:o});await(async(e,t,n,r)=>{for await(const o of e)ns(t)||rs(o,n,r)})(a,e,n,i)},tc=async e=>{await(0,ze.setImmediate)(),null===e.readableFlowing&&e.resume()},nc=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 yr(e,ja,t)}(n,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return yr(e,Ga,t)}(n,{maxBuffer:i})):await async function(e,t){return yr(e,_a,t)}(n,{maxBuffer:i})}catch(n){return oc((({error:e,stream:t,readableObjectMode:n,lines:r,encoding:o,fdNumber:i})=>{if(!(e instanceof Tr))throw e;if("all"===i)return e;const s=((e,t,n)=>e?"objects":t?"lines":"buffer"===n?"bytes":"characters")(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}))}},rc=async e=>{try{return await e}catch(e){return oc(e)}},oc=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===p.call(t)?new Uint8Array(e):e;var t},ic=async(e,t,n,{isSameDirection:r,stopOnExit:o=!1}={})=>{const i=sc(e,n),s=new AbortController;try{await Promise.race([...o?[n.exitPromise]:[],(0,Fs.finished)(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||lc(e,t,n,r)}finally{s.abort()}},sc=(e,{originalStreams:[t],subprocess:n})=>{const r={stdinCleanedUp:!1};return e===t&&ac(e,n,r),r},ac=(e,t,n)=>{const{_destroy:r}=e;e._destroy=(...o)=>{cc(t,n),r.call(e,...o)}},cc=({exitCode:e,signalCode:t},n)=>{null===e&&null===t||(n.stdinCleanedUp=!0)},lc=(e,t,n,r)=>{if(!dc(e,t,n,r))throw e},dc=(e,t,n,r=!0)=>n.propagating?fc(e)||pc(e):(n.propagating=!0,uc(n,t)===r?fc(e):pc(e)),uc=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,pc=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,fc=e=>"EPIPE"===e?.code,mc=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 d=ic(e,t,l);if(uc(l,t))return void await d;const[u]=await Promise.all([Za({stream:e,onStreamEnd:d,fdNumber:t,encoding:n,buffer:r,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),d]);return u},bc=({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}},hc=({all:e,stdout:t,stderr:n})=>e&&t&&n&&t.readableObjectMode!==n.readableObjectMode,gc=(e,t)=>{const n=Ae(e);Me({type:"ipc",verboseMessage:n,fdNumber:"ipc",verboseInfo:t})},yc=async(e,t)=>(await Promise.allSettled([e]),t),wc=async({subprocess:e,options:{encoding:t,buffer:n,maxBuffer:r,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:d,ipcInput:u},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:b,onInternalError:h,controller:g})=>{const y=(async(e,t)=>{const[n,r]=await(async e=>{const[t,n]=await Promise.allSettled([(0,vt.once)(e,"spawn"),(0,vt.once)(e,"exit")]);return"rejected"===t.status?[]:"rejected"===n.status?cs(e):n.value})(e);return t.isForcefullyTerminated??=!1,[n,r]})(e,p),w={originalStreams:b,fileDescriptors:m,subprocess:e,exitPromise:y,propagating:!1},v=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map(((e,c)=>mc({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:w}),S=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>mc({...bc(e,n),fdNumber:"all",encoding:t,maxBuffer:r[1]+r[2],lines:o[1]||o[2],allMixed:hc(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:w}),x=[],E=(async({subprocess:e,buffer:t,maxBuffer:n,ipc:r,ipcOutput:o,verboseInfo:i})=>{if(!r)return o;const s=(e=>X(e,"ipc"))(i),a=q(t,"ipc"),c=q(n,"ipc");for await(const t of Is({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:r,shouldAwait:!1,reference:!0}))a&&(Dr(0,o,c),o.push(t)),s&&gc(t,i);return o})({subprocess:e,buffer:n,maxBuffer:r,ipc:d,ipcOutput:x,verboseInfo:f}),T=vc(b,e,w),D=Sc(m,w);try{return await Promise.race([Promise.all([{},ls(y),Promise.all(v),S,E,kn(e,u),...T,...D]),h,xc(e,g),...Bn(e,i,p,g),...xt({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:g}),...$n({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:g})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},y,Promise.all(v.map((e=>rc(e)))),rc(S),yc(E,x),Promise.allSettled(T),Promise.allSettled(D)])}},vc=(e,t,n)=>e.map(((e,r)=>e===t.stdio[r]?void 0:ic(e,r,n))),Sc=(e,t)=>e.flatMap((({stdioItems:e},n)=>e.filter((({value:e,stream:t=e})=>nr(t,{checkOpen:!1})&&!A(t))).map((({type:e,value:r,stream:o=r})=>ic(o,n,t,{isSameDirection:uo.has(e),stopOnExit:"native"===e}))))),xc=async(e,{signal:t})=>{const[n]=await(0,vt.once)(e,"error",{signal:t});throw n},Ec=(e,t,n)=>{const r=e[n];r.has(t)||r.set(t,[]);const o=r.get(t),i=jt();return o.push(i),{resolve:i.resolve.bind(i),promises:o}},Tc=async({resolve:e,promises:t},n)=>{e();const[r]=await Promise.race([Promise.allSettled([!0,n]),Promise.all([!1,...t])]);return!r},Dc=async e=>{if(void 0!==e)try{await Ic(e)}catch{}},Ic=async e=>{await(0,Fs.finished)(e,{cleanup:!0,readable:!1,writable:!0})},Oc=async e=>{await(0,Fs.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Mc=async(e,t)=>{if(await e,t)throw t},Nc=(e,t,n)=>{n&&!pc(n)?e.destroy(n):t&&e.destroy()},$c=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Un.has(n),{subprocessStdout:a,waitReadableDestroy:c}=Cc(e,r,t),{readableEncoding:l,readableObjectMode:d,readableHighWaterMark:u}=Ac(a,s),{read:p,onStdoutDataDone:f}=Bc({subprocessStdout:a,subprocess:e,binary:s,encoding:n,preserveNewlines:i}),m=new ui.Readable({read:p,destroy:(0,$.callbackify)(Rc.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:u,objectMode:d,encoding:l});return Pc({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},Cc=(e,t,n)=>{const r=Rt(e,t);return{subprocessStdout:r,waitReadableDestroy:Ec(n,r,"readableDestroy")}},Ac=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n},r)=>r?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ya},Bc=({subprocessStdout:e,subprocess:t,binary:n,encoding:r,preserveNewlines:o})=>{const i=jt(),s=za({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:!n,encoding:r,preserveNewlines:o});return{read(){jc(this,s,i)},onStdoutDataDone:i}},jc=async(e,t,n)=>{try{const{value:r,done:o}=await t.next();o?n.resolve():e.push(r)}catch{}},Pc=async({subprocessStdout:e,onStdoutDataDone:t,readable:n,subprocess:r,subprocessStdin:o})=>{try{await Oc(e),await r,await Dc(o),await t,n.readable&&n.push(null)}catch(e){await Dc(o),kc(n,e)}},Rc=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:n},r)=>{await Tc(n,t)&&(kc(e,r),await Mc(t,r))},kc=(e,t)=>{Nc(e,e.readable,t)},Lc=({subprocess:e,concurrentStreams:t},{to:n}={})=>{const{subprocessStdin:r,waitWritableFinal:o,waitWritableDestroy:i}=Uc(e,n,t),s=new ui.Writable({...Fc(r,e,o),destroy:(0,$.callbackify)(zc.bind(void 0,{subprocessStdin:r,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:r.writableHighWaterMark,objectMode:r.writableObjectMode});return _c(r,s),s},Uc=(e,t,n)=>{const r=Pt(e,t);return{subprocessStdin:r,waitWritableFinal:Ec(n,r,"writableFinal"),waitWritableDestroy:Ec(n,r,"writableDestroy")}},Fc=(e,t,n)=>({write:Gc.bind(void 0,e),final:(0,$.callbackify)(Wc.bind(void 0,e,t,n))}),Gc=(e,t,n,r)=>{e.write(t,n)?r():e.once("drain",r)},Wc=async(e,t,n)=>{await Tc(n,t)&&(e.writable&&e.end(),await t)},_c=async(e,t,n)=>{try{await Ic(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await Oc(e)}catch{}})(n),Vc(t,e)}},zc=async({subprocessStdin:e,subprocess:t,waitWritableFinal:n,waitWritableDestroy:r},o)=>{await Tc(n,t),await Tc(r,t)&&(Vc(e,o),await Mc(t,o))},Vc=(e,t)=>{Nc(e,e.writable,t)},Hc=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Un.has(n),{subprocessStdout:c,waitReadableDestroy:l}=Cc(e,r,t),{subprocessStdin:d,waitWritableFinal:u,waitWritableDestroy:p}=Uc(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:b}=Ac(c,a),{read:h,onStdoutDataDone:g}=Bc({subprocessStdout:c,subprocess:e,binary:a,encoding:n,preserveNewlines:s}),y=new ui.Duplex({read:h,...Fc(d,e,u),destroy:(0,$.callbackify)(Kc.bind(void 0,{subprocessStdout:c,subprocessStdin:d,subprocess:e,waitReadableDestroy:l,waitWritableFinal:u,waitWritableDestroy:p})),readableHighWaterMark:b,writableHighWaterMark:d.writableHighWaterMark,readableObjectMode:m,writableObjectMode:d.writableObjectMode,encoding:f});return Pc({subprocessStdout:c,onStdoutDataDone:g,readable:y,subprocess:e,subprocessStdin:d}),_c(d,y,c),y},Kc=async({subprocessStdout:e,subprocessStdin:t,subprocess:n,waitReadableDestroy:r,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([Rc({subprocessStdout:e,subprocess:n,waitReadableDestroy:r},s),zc({subprocessStdin:t,subprocess:n,waitWritableFinal:o,waitWritableDestroy:i},s)])},qc=(e,t,{from:n,binary:r=!1,preserveNewlines:o=!1}={})=>{const i=r||Un.has(t),s=Rt(e,n),a=za({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Yc(a,s,e)},Yc=async function*(e,t,n){try{yield*e}finally{t.readable&&t.destroy(),await n}},Xc=(e,{encoding:t})=>{const n={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=$c.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.writable=Lc.bind(void 0,{subprocess:e,concurrentStreams:n}),e.duplex=Hc.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.iterable=qc.bind(void 0,e,t),e[Symbol.asyncIterator]=qc.bind(void 0,e,t,{})},Jc=(async()=>{})().constructor.prototype,Qc=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Jc,e)])),Zc=(e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=Le(e,t,n),{file:a,commandArguments:c,options:l}=Vn(e,t,n),d=el(l),u=((e,t)=>Vo(Us,e,t,!1))(d,s);return{file:a,commandArguments:c,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:d,fileDescriptors:u}},el=({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}},tl=({file:e,commandArguments:t,options:n,startTime:r,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=(0,d.spawn)(...qn(e,t,n))}catch(e){return(({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,verboseInfo:s})=>{ri(r);const a=new d.ChildProcess;((e,t)=>{const n=As(),r=As(),o=As(),i=Array.from({length:t.length-3},As),s=As(),a=[n,r,o,...i];Object.assign(e,{stdin:n,stdout:r,stderr:o,all:s,stdio:a})})(a,r),Object.assign(a,{readable:Bs,writable:js,duplex:Ps});const c=Cr({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:Rs(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:n,startTime:r,verboseInfo:o})}const l=new AbortController;(0,vt.setMaxListeners)(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})=>uo.has(e))))pa(e,t,s,o);for(const{stream:t}of i.filter((({type:e})=>!uo.has(e))))ma({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]:Gs(t);aa(n,e)}})(c,a,l),((e,{cleanup:t,detached:n},{signal:r})=>{if(!t||n)return;const o=(0,ga.cf)((()=>{e.kill()}));(0,vt.addAbortListener)(r,(()=>{o()}))})(c,n,l);const p={},f=jt();return c.kill=bt.bind(void 0,{kill:c.kill.bind(c),options:n,onInternalError:f,context:p,controller:l}),c.all=(({stdout:e,stderr:t},{all:n})=>n&&(e||t)?Gs([e,t].filter(Boolean)):void 0)(c,n),Xc(c,n),((e,{ipc:t})=>{Object.assign(e,Cs(e,!1,t))})(c,n),{subprocess:c,promise:nl({subprocess:c,options:n,startTime:r,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:p,onInternalError:f,controller:l})}},nl=async({subprocess:e,options:t,startTime:n,verboseInfo:r,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:d})=>{const[u,[p,f],m,b,h]=await wc({subprocess:e,options:t,context:c,verboseInfo:r,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:d});d.abort(),l.resolve();const g=m.map(((e,n)=>li(e,t,n))),y=li(b,t,"all"),w=rl({errorInfo:u,exitCode:p,signal:f,stdio:g,all:y,ipcOutput:h,context:c,options:t,command:s,escapedCommand:a,startTime:n});return Ur(w,r,t)},rl=({errorInfo:e,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:d})=>"error"in e?Ar({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 Tr,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,options:a,startTime:d,isSync:!1}):$r({command:c,escapedCommand:l,stdio:r,all:o,ipcOutput:i,options:a,startTime:d}),ol=(e,t)=>{const n=Object.fromEntries(Object.entries(t).map((([t,n])=>[t,il(t,e[t],n)])));return{...e,...n}},il=(e,t,n)=>sl.has(e)&&r(t)&&r(n)?{...t,...n}:n,sl=new Set(["env",...K]),al=(e,t,n,r)=>{const o=(e,t,r)=>al(e,t,n,r),i=(...i)=>cl({mapArguments:e,deepOptions:n,boundOptions:t,setBoundExeca:r,createNested:o},...i);return void 0!==r&&r(i,o,t),i},cl=({mapArguments:e,deepOptions:t={},boundOptions:n={},setBoundExeca:o,createNested:i},s,...a)=>{if(r(s))return i(e,ol(n,s),o);const{file:c,commandArguments:l,options:d,isSync:u}=ll({mapArguments:e,firstArgument:s,nextArguments:a,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:d}=((e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=Le(e,t,n),a=fs(n),{file:c,commandArguments:l,options:d}=Vn(e,t,a);ms(d);const u=((e,t)=>Vo(ci,e,t,!0))(d,s);return{file:c,commandArguments:l,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:d,fileDescriptors:u}})(e,t,n),u=hs({file:r,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:d,startTime:a});return Ur(u,c,l)})(c,l,d):((e,t,n,r)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:d,fileDescriptors:u}=Zc(e,t,n),{subprocess:p,promise:f}=tl({file:o,commandArguments:i,options:d,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:u});return p.pipe=Ia.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:r}),((e,t)=>{for(const[n,r]of Qc){const o=r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}})(p,f),kt.set(p,{options:d,fileDescriptors:u}),p})(c,l,d,i)},ll=({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=E({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,d]=l(...i),u=ol(ol(r,o),d),{file:p=a,commandArguments:f=c,options:m=u,isSync:b=!1}=e({file:a,commandArguments:c,options:u});return{file:p,commandArguments:f,options:m,isSync:b}},dl=(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]=ul(e);return{file:n,commandArguments:r}},ul=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(pl)){const t=n.at(-1);t&&t.endsWith("\\")?n[n.length-1]=`${t.slice(0,-1)} ${e}`:n.push(e)}return n},pl=/ +/g,fl=({options:e})=>({...ml(e),isSync:!0}),ml=e=>({options:{...bl(e),...e}}),bl=({input:e,inputFile:t,stdio:n})=>void 0===e&&void 0===t&&void 0===n?{stdin:"inherit"}:{},hl=al((()=>({}))),gl=al((()=>({isSync:!0}))),{sendMessage:yl,getOneMessage:wl,getEachMessage:vl,getCancelSignal:Sl}=(al((({file:e,commandArguments:t})=>dl(e,t))),al((({file:e,commandArguments:t})=>({...dl(e,t),isSync:!0}))),al((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),al((({options:e})=>ml(e)),{},{preferLocal:!0},((e,t,n)=>{e.sync=t(fl,n),e.s=e.sync})),(()=>{const e=C,t=!0,n=void 0!==C.channel;return{...Cs(e,t,n),getCancelSignal:En.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})}})())},3803:(e,t,n)=>{const r=n(6928),o=n(1905),i=n(9695);function s(e,t){const n=e.options.env||process.env,s=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=o.sync(e.command,{path:n[i({env:n})],pathExt:t?r.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=r.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return s(e)||s(e,!0)}},6507:(e,t,n)=>{const r=n(5317),o=n(8388),i=n(442);function s(e,t,n){const s=o(e,t,n),a=r.spawn(s.command,s.args,s.options);return i.hookChildProcess(a,s),a}e.exports=s,e.exports.spawn=s,e.exports.sync=function(e,t,n){const s=o(e,t,n),a=r.spawnSync(s.command,s.args,s.options);return a.error=a.error||i.verifyENOENTSync(a.status,s),a},e.exports._parse=o,e.exports._enoent=i},7017:(e,t,n)=>{n.d(t,{cf:()=>u});const r=[];r.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&r.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&r.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const o=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,i=Symbol.for("signal-exit emitter"),s=globalThis,a=Object.defineProperty.bind(Object);class c{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(s[i])return s[i];a(s,i,{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 l{}const d=globalThis.process,{onExit:u,load:p,unload:f}=(m=o(d)?new class extends l{#p="win32"===d.platform?"SIGINT":"SIGHUP";#f=new c;#m;#b;#h;#g={};#y=!1;constructor(e){super(),this.#m=e,this.#g={};for(const t of r)this.#g[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.#h=e.reallyExit,this.#b=e.emit}onExit(e,t){if(!o(this.#m))return()=>{};!1===this.#y&&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.#y){this.#y=!0,this.#f.count+=1;for(const e of r)try{const t=this.#g[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#w(e,...t),this.#m.reallyExit=e=>this.#v(e)}}unload(){this.#y&&(this.#y=!1,r.forEach((e=>{const t=this.#g[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}})),this.#m.emit=this.#b,this.#m.reallyExit=this.#h,this.#f.count-=1)}#v(e){return o(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#h.call(this.#m,this.#m.exitCode)):0}#w(e,...t){const n=this.#b;if("exit"===e&&o(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)}}(d):new class extends l{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>m.onExit(e,t),load:()=>m.load(),unload:()=>m.unload()});var m},7235:(e,t,n)=>{function r(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"}n.d(t,{A:()=>r})},7257:e=>{e.exports=/^#!(.*)/},8388:(e,t,n)=>{const r=n(6928),o=n(3803),i=n(2077),s=n(1880),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const d={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?d:function(e){if(!a)return e;const t=function(e){e.file=o(e);const t=e.file&&s(e.file);return t?(e.args.unshift(e.file),e.command=t,o(e)):e.file}(e),n=!c.test(t);if(e.options.forceShell||n){const n=l.test(t);e.command=r.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map((e=>i.argument(e,n)));const o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(d)}},8541:(e,t,n)=>{e.exports=i,i.sync=function(e,t){return o(r.statSync(e),e,t)};var r=n(9896);function o(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 i(e,t,n){r.stat(e,(function(r,i){n(r,!r&&o(i,e,t))}))}},9344:(e,t,n)=>{var r;function o(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){o(e,t||{},(function(e,t){e?r(e):n(t)}))}))}r(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}n(9896),r="win32"===process.platform||global.TESTING_WINDOWS?n(8541):n(709),e.exports=o,o.sync=function(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},9695:e=>{const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},9948:(e,t,n)=>{n.d(t,{kj:()=>l,t7:()=>d});var r=n(9896),o=n(3339),i=n(6928);n(7016);const s=process.cwd(),a=(0,o.createRequire)(import.meta.url);function c(e,t=s){return e.startsWith(".")?(0,i.resolve)(t,e):(0,i.isAbsolute)(e)?e:a.resolve(e)}function l(e){try{return(0,r.statSync)(c(e)),!0}catch{return!1}}function d(e,t={}){const n=function(){try{const e=(0,r.readFileSync)(c("./package.json"),"utf8");return JSON.parse(e)}catch{return{}}}();if(e){const{[e]:r=t}=n;return r}return n}}};