${n.message}`:m,E=[v,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;};var eY={};const eJ=["stdin","stdout","stderr"],eQ=e=>eJ.some(t=>void 0!==e[t]),eZ=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return eJ.map(t=>e[t]);if(eQ(e))throw Error(`It'snotpossibletoprovide\`stdio\` in combination with one of ${eJ.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);letr=Math.max(t.length,eJ.length);returnArray.from({length:r},(e,r)=>t[r]);};(eY=eZ).node=e=>{lett=eZ(e);return"ipc"===t?"ipc":void0===t||"string"==typeoft?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"];};vare0={},e1={},e2=G.process;conste3=function(e){returne&&"object"==typeofe&&"function"==typeofe.removeListener&&"function"==typeofe.emit&&"function"==typeofe.reallyExit&&"function"==typeofe.listeners&&"function"==typeofe.kill&&"number"==typeofe.pid&&"function"==typeofe.on;};if(e3(e2)){vare4,e6,e5=V("1YMV0"),e8=/^win/i.test(e2.platform),e9=w;"function"!=typeofe9&&(e9=e9.EventEmitter),e2.__signal_exit_emitter__?e6=e2.__signal_exit_emitter__:((e6=e2.__signal_exit_emitter__=newe9()).count=0,e6.emitted={}),e6.infinite||(e6.setMaxListeners(1/0),e6.infinite=!0);vare7=function(){tr&&e3(G.process)&&(tr=!1,e5.forEach(function(e){try{e2.removeListener(e,tt[e]);}catch(e){}}),e2.emit=ts,e2.reallyExit=ti,e6.count-=1);};(e1=function(e,t){if(!e3(G.process))returnfunction(){};x.equal(typeofe,"function","a callback must be provided for exit handler"),!1===tr&&tn();varr="exit";returnt&&t.alwaysLast&&(r="afterexit"),e6.on(r,e),function(){e6.removeListener(r,e),0===e6.listeners("exit").length&&0===e6.listeners("afterexit").length&&e7();};}).unload=e7;varte=function(e,t,r){e6.emitted[e]||(e6.emitted[e]=!0,e6.emit(e,t,r));},tt={};e5.forEach(function(e){tt[e]=function(){e3(G.process)&&e2.listeners(e).length===e6.count&&(e7(),te("exit",null,e),te("afterexit",null,e),e8&&"SIGHUP"===e&&(e="SIGINT"),e2.kill(e2.pid,e));};}),e1.signals=function(){returne5;};vartr=!1,tn=function(){!tr&&e3(G.process)&&(tr=!0,e6.count+=1,e5=e5.filter(function(e){try{returne2.on(e,tt[e]),!0;}catch(e){return!1;}}),e2.emit=ta,e2.reallyExit=to);};e1.load=tn;varti=e2.reallyExit,to=function(e){e3(G.process)&&(e2.exitCode=e||0,te("exit",e2.exitCode,null),te("afterexit",e2.exitCode,null),ti.call(e2,e2.exitCode));},ts=e2.emit,ta=function(e,t){if(!("exit"===e&&e3(G.process)))returnts.apply(this,arguments);void0!==t&&(e2.exitCode=t);varr=ts.apply(this,arguments);returnte("exit",e2.exitCode,null),te("afterexit",e2.exitCode,null),r;};}elsee1=function(){returnfunction(){};};consttl=(e,t,r,n)=>{if(!tc(t,r,n))return;leti=tp(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},tc=(e,{forceKillAfterTimeout:t},r)=>tu(e)&&!1!==t&&r,tu=e=>e===f.constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),tp=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},td=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},tf=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=e1(()=>{e.kill();});returnn.finally(()=>{i();});};varth=(e0={spawnedKill:(e,t="SIGTERM",r={})=>{letn=e(t);returntl(e,t,r,n),n;},spawnedCancel:(e,t)=>{letr=e.kill();r&&(t.isCanceled=!0);},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;if(0===t||void0===t)returnn;leto=newPromise((n,o)=>{i=setTimeout(()=>{td(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});returnPromise.race([o,s]);},validateTimeout:({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected
${t}`,rO=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),r$=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),rT=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=rR.bind(null,n,t.toString());Object.defineProperty(i,"name",r$),Object.defineProperty(e,"toString",{...rO,value:i});},rC=new WeakMap(),rA=(e,t={})=>{let r;if("function"!=typeof e)throw TypeError("Expected a function");let n=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(rC.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function\`${i}\` can only be called once`);returnr;};return!function(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(letnofReflect.ownKeys(t))rb(e,t,n,r);rI(e,t),rT(e,t,n);}(o,e),rC.set(o,n),o;};rA.callCount=e=>{if(!rC.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnrC.get(e);};constr_=()=>Array.from({length:rL-rN+1},rP),rP=(e,t)=>({name:`SIGRT${t+1}`,number:rN+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),rN=34,rL=64,rD=[{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:"termina
${n.message}`:m,E=[v,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;},rV=["stdin","stdout","stderr"],rX=e=>rV.some(t=>void 0!==e[t]),rq=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return rV.map(t=>e[t]);if(rX(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${rV.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,rV.length);return Array.from({length:r},(e,r)=>t[r]);},rK=(e,t="SIGTERM",r={})=>{let n=e(t);return rz(e,t,r,n),n;},rz=(e,t,r,n)=>{if(!rW(t,r,n))return;let i=rJ(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},rW=(e,{forceKillAfterTimeout:t},r)=>rY(e)&&!1!==t&&r,rY=e=>e===F(D).constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),rJ=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e;},rQ=(e,t)=>{let r=e.kill();r&&(t.isCanceled=!0);},rZ=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},r0=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{let i;if(0===t||void 0===t)return n;let o=new Promise((n,o)=>{i=setTimeout(()=>{rZ(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});return Promise.race([o,s]);},r1=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);},r2=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=F(e1)(()=>{e.kill();});return n.finally(()=>{i();});};function r3(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe;}function r4(e){return r3(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState;}const r6=e=>e instanceof P.ChildProcess&&"function"==typeof e.then,r5=(e,t,r)=>{if("string"==typeof r)return e[t].pipe((0,S.createWriteStream)(r)),e;if(r4(r))return e[t].pipe(r),e;if(!r6(r))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!r4(r.stdin))throw TypeError("The target child process'sstdinmustbeavailable.");return e[t].pipe(r.stdin),r;},r8=e=>{null!==e.stdout&&(e.pipeStdout=r5.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=r5.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=r5.bind(void 0,e,"all"));},r9=e=>{if(void 0!==e)throw TypeError("The`input`and`inputFile`optionscannotbebothset.");},r7=({input:e,inputFile:t})=>"string"!=typeof t?e:(r9(e),(0,S.readFileSync)(t)),ne=e=>{let t=r7(e);if(r3(t))throw TypeError("The`input`optioncannotbeastreaminsyncmode");return t;},nt=({input:e,inputFile:t})=>"string"!=typeof t?e:(r9(e),(0,S.createReadStream)(t)),nr=(e,t)=>{let r=nt(t);void 0!==r&&(r3(r)?r.pipe(e.stdin):e.stdin.end(r));},nn=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=F(tA)();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},ni=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t;}catch(e){return e.bufferedData;}}},no=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?F(tb)(e,{encoding:t,maxBuffer:n}):F(tb).buffer(e,{maxBuffer:n});},ns=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{let a=no(e,{encoding:n,buffer:i,maxBuffer:o}),l=no(t,{encoding:n,buffer:i,maxBuffer:o}),c=no(r,{encoding:n,buffer:i,maxBuffer:2*o});try{return await Promise.all([s,a,l,c]);}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},ni(e,a),ni(t,l),ni(r,c)]);}},na=(async()=>{})().constructor.prototype,nl=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(na,e)]),nc=(e,t)=>{for(let[r,n]of nl){let i="function"==typ
`),(0,rv.info)(`${e}="${n}"wasaddedto"${nV}`));return;}process.env[e]=n;}async function nq(e){switch(process.platform){case"win32":await nP(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),(0,rv.info)(`"${e}" was added to the PATH.`);return;case"linux":case"darwin":awaitnz(),(0,m.appendFileSync)(nV,`
${n.message}`:g,y=[E,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=y):n=Error(y),n.shortMessage=E,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=f,n.stdout=e,n.stderr=t,n.cwd=d,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=c,n.killed=u&&!l,n;},nQ=["stdin","stdout","stderr"],nZ=e=>nQ.some(t=>void 0!==e[t]),n0=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return nQ.map(t=>e[t]);if(nZ(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${nQ.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,nQ.length);return Array.from({length:r},(e,r)=>t[r]);},n1=(e,t="SIGTERM",r={})=>{let n=e(t);return n2(e,t,r,n),n;},n2=(e,t,r,n)=>{if(!n3(t,r,n))return;let i=n6(r),o=setTimeout(()=>{e("SIGKILL");},i);o.unref&&o.unref();},n3=(e,{forceKillAfterTimeout:t},r)=>n4(e)&&!1!==t&&r,n4=e=>e===F(D).constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),n6=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e;},n5=(e,t)=>{let r=e.kill();r&&(t.isCanceled=!0);},n8=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},n9=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{let i;if(0===t||void 0===t)return n;let o=new Promise((n,o)=>{i=setTimeout(()=>{n8(e,r,o);},t);}),s=n.finally(()=>{clearTimeout(i);});return Promise.race([o,s]);},n7=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);},ie=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=F(e1)(()=>{e.kill();});return n.finally(()=>{i();});},it=e=>e instanceof P.ChildProcess&&"function"==typeof e.then,ir=(e,t,r)=>{if("string"==typeof r)return e[t].pipe((0,S.createWriteStream)(r)),e;if(r4(r))return e[t].pipe(r),e;if(!it(r))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!r4(r.stdin))throw TypeError("The target child process'sstdinmustbeavailable.");return e[t].pipe(r.stdin),r;},ii=e=>{null!==e.stdout&&(e.pipeStdout=ir.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=ir.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=ir.bind(void 0,e,"all"));},io=e=>{if(void 0!==e)throw TypeError("The`input`and`inputFile`optionscannotbebothset.");},is=({input:e,inputFile:t})=>"string"!=typeof t?e:(io(e),(0,S.readFileSync)(t)),ia=e=>{let t=is(e);if(r3(t))throw TypeError("The`input`optioncannotbeastreaminsyncmode");return t;},il=({input:e,inputFile:t})=>"string"!=typeof t?e:(io(e),(0,S.createReadStream)(t)),ic=(e,t)=>{let r=il(t);void 0!==r&&(r3(r)?r.pipe(e.stdin):e.stdin.end(r));},iu=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=F(tA)();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r;},ip=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t;}catch(e){return e.bufferedData;}}},id=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?F(tb)(e,{encoding:t,maxBuffer:n}):F(tb).buffer(e,{maxBuffer:n});},ih=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},s)=>{let a=id(e,{encoding:n,buffer:i,maxBuffer:o}),l=id(t,{encoding:n,buffer:i,maxBuffer:o}),c=id(r,{encoding:n,buffer:i,maxBuffer:2*o});try{return await Promise.all([s,a,l,c]);}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},ip(e,a),ip(t,l),ip(r,c)]);}},im=(async()=>{})().constructor.prototype,ig=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(im,e)]),iv=(e,t)=>{for(let[r,n]of ig){let i="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i});}},iE=e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r});}),e.on("er
`);},iL=({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...F(N).env,...e}:e;return r?rx({env:o,cwd:n,execPath:i}):o;},iD=(e,t,r={})=>{let n=F(el)._parse(e,t,r);return e=n.command,t=n.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=n.options).cwd||F(N).cwd(),execPath:F(N).execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:iA,...r}).env=iL(r),r.stdio=n0(r),"win32"===F(N).platform&&"cmd"===F(_).basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n};},ik=(e,t,r)=>"string"==typeof t||(0,A.Buffer).isBuffer(t)?e.stripFinalNewline?ry(t):t:void 0===r?void 0:"";function iU(e,t,r){let n;let i=iD(e,t,r),o=iS(e,t),s=iI(e,t);iN(s,i.options),n7(i.options);try{n=F(P).spawn(i.file,i.args,i.options);}catch(r){let e=new(F(P).ChildProcess)(),t=Promise.reject(nJ({error:r,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return iv(e,t),e;}let a=iE(n),l=n9(n,i.options,a),c=ie(n,i.options,l),u={isCanceled:!1};n.kill=n1.bind(null,n.kill.bind(n)),n.cancel=n5.bind(null,n,u);let p=async()=>{let[{error:e,exitCode:t,signal:r,timedOut:a},l,p,d]=await ih(n,i.options,c),f=ik(i.options,l),h=ik(i.options,p),m=ik(i.options,d);if(e||0!==t||null!==r){let l=nJ({error:e,exitCode:t,signal:r,stdout:f,stderr:h,all:m,command:o,escapedCommand:s,parsed:i,timedOut:a,isCanceled:u.isCanceled||!!i.options.signal&&i.options.signal.aborted,killed:n.killed});if(!i.options.reject)return l;throw l;}return{command:o,escapedCommand:s,exitCode:0,stdout:f,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};},d=rA(p);return ic(n,i.options),n.all=iu(n,i.options),ii(n),iv(n,d),n;}function ij(e,t,r){let n;let i=iD(e,t,r),o=iS(e,t),s=iI(e,t);iN(s,i.options);let a=ia(i.options);try{n=F(P).spawnSync(i.file,i.args,{...i.options,input:a});}catch(e){throw nJ({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1});}let l=ik(i.options,n.stdout,n.error),c=ik(i.options,n.stderr,n.error);if(n.error||0!==n.status||null!==n.signal){let e=nJ({stdout:l,stderr:c,error:n.error,signal:n.signal,exitCode:n.status,command:o,escapedCommand:s,parsed:i,timedOut:n.error&&"ETIMEDOUT"===n.error.code,isCanceled:!1,killed:null!==n.signal});if(!i.options.reject)return e;throw e;}return{command:o,escapedCommand:s,exitCode:0,stdout:l,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};}const iM=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},iF=(e={})=>({preferLocal:!0,...iM(e),...e});!function e(t){function r(n,...i){if(!Array.isArray(n))return e({...t,...n});let[o,...s]=iC(n,i);return iU(o,s,iF(t));}return r.sync=(e,...r)=>{if(!Array.isArray(e))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[n,...i]=iC(e,r);return ij(n,i,iF(t));},r;}();var iG=V("9ag04"),q=V("ER74K"),iB={},iH=h.join,iV=h.delimiter,iX=h.sep,iq=h.posix;const iK="win32"===process.platform,iz=new RegExp(`[${iq.sep}${iX===iq.sep?"":iX}]`.replace(/(\\)/g,"\\$1")),iW=RegExp(`^\\.${iz.source}`),iY=e=>Object.assign(Error(`notfound:${e}`),{code:"ENOENT"}),iJ=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=iV})=>{let i=e.match(iz)?[""]:[...(iK?[process.cwd()]:[]),...(t||"").split(n)];if(iK){let t=r||[".EXE",".CMD",".BAT",".COM"].join(n),o=t.split(n).reduce((e,t)=>(e.push(t),e.push(t.toLowerCase()),e),[]);return e.includes(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:t};}return{pathEnv:i,pathExt:[""]};},iQ=(e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e,n=!r&&iW.test(t)?t.slice(0,2):"";return n+iH(r,t);},iZ=async(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=iJ(e,t),o=[];for(let s of r){let r=iQ(s,e);for(let e of n){let n=r+e,s=await er(n,{pathExt:i,ignoreErrors:!0});if(s){if(!t.all)return n;o.push(n);}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw iY(e);};iB=iZ,iZ.sync=(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=iJ(e,t),o=[];for(let s of r){let r=iQ(s,e);for(let e of n){let n=r+e,s=er
`),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--cppcache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));let o=i.architecture??process.arch,s=process.env.SETUP_CPP_DIR??t5(""),a=[],l=[],c=W.create({autoloadLocales:!0});W.addLocale(F(Y)),K.addLocale(F(z));let u=await sJ();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!sK(e[t])),i=n.length>=1?e[n[0]]:"true";return!n.some(t=>e[t]!==i)&&(r.forEach(t=>{e[t]=i;}),!0);}(i,["llvm","clangtidy","clangformat"]))return(0,q.error)("The same version must be used for llvm, clangformat and clangtidy"),1;oh()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&((0,q.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await ob("python-pygments"));let p=!1,d=!1;for(let e of lA){if(X.isCI&&0!==l.length){d=!0;break;}let n=i[e];void 0!==n&&(t=Date.now(),p=await aJ(e,n,u,o,s,a,l,6e4*parseFloat(i.timeout??"20")),r=Date.now(),(0,q.info)(`took${c.format(t,r)||"0 seconds"}`));}if(!d){let e=i.compiler;if(void 0!==e){let t=Date.now();await lN(e,u,s,o,a,p,l);let r=Date.now();(0,q.info)(`took${c.format(t,r)||"0 seconds"}`);}}if(await nW(),0===a.length&&0===l.length)return(0,q.warning)("setup-cpp was called without any arguments. Nothing to do."),0;if(a.forEach(e=>(0,q.success)(e)),l.forEach(e=>(0,q.error)(e)),(0,q.info)("setup-cpp finished"),!X.GITHUB_ACTIONS)switch(process.platform){case"win32":(0,q.warning)("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":(0,q.warning)("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");}returnawaitn,0===l.length?0:1;})(process.argv).then(e=>{process.exitCode=e;}).catch(e=>{(0,q.error)("main()panicked!"),(0,q.error)(e),process.exitCode=1;});