setup-cpp/dist/legacy/setup-cpp.js

4 lines
373 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env node
"use strict";function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}function t(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}function r(e,t,n){const r=new ro(e,t,n);process.stdout.write(""+r+to.EOL)}function o(e){const t="https:"===e.protocol;if(function(e){if(!e.hostname)return!1;if(function(e){const t=e.toLowerCase();return"localhost"===t||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}(e.hostname))return!0;const t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let n;e.port?n=Number(e.port):"http:"===e.protocol?n=80:"https:"===e.protocol&&(n=443);const r=[e.hostname.toUpperCase()];"number"==typeof n&&r.push(`${r[0]}:${n}`);for(const o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||r.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))return!0;return!1}(e))return;const n=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(n)try{return new ho(n)}catch{if(!n.startsWith("http://")&&!n.startsWith("https://"))return new ho("http://"+n)}}function i(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||vo.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,r,o){for(var i=a(n,r,o),s=0,c=t.requests.length;c>s;++s){var l=t.requests[s];if(l.host===i.host&&l.port===i.port)return t.requests.splice(s,1),void l.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function s(e,t){var n=this;i.prototype.createSocket.call(n,e,(function(r){var o=e.request.getHeader("host"),i=c({},n.options,{socket:r,servername:o?o.replace(/:.*$/,""):e.host}),s=go.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,t(s)}))}function a(e,t,n){return"string"==typeof e?{host:e,port:t,localAddress:n}:e}function c(e){for(var t=1,n=arguments.length;n>t;++t){var r=arguments[t];if("object"==typeof r)for(var o=Object.keys(r),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==r[a]&&(e[a]=r[a])}}return e}function l(){return Uo||(Uo=1,function(e){var t=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const n=br,r=_r,{access:o,appendFile:i,writeFile:s}=r.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY",e.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";const a=new class{constructor(){this._buffer=""}filePath(){return t(this,void 0,void 0,(function*(){if(this._filePath)return this._filePath;const t=process.env[e.SUMMARY_ENV_VAR];if(!t)throw Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield o(t,r.constants.R_OK|r.constants.W_OK)}catch(n){throw Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath}))}wrap(e,t,n={}){const r=Object.entries(n).map((([e,t])=>` ${e}="${t}"`)).join("");return t?`<${e}${r}>${t}</${e}>`:`<${e}${r}>`}write(e){return t(this,void 0,void 0,(function*(){const t=!!(null==e?void 0:e.overwrite),n=yield this.filePath(),r=t?s:i;return yield r(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()}))}clear(){return t(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:!0})}))}stringify(){return this._buffer}isEmptyBuffer(){return 0===this._buffer.length}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const n=Object.assign({},t&&{lang:t}),r=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(r).addEOL()}addList(e,t=!1){const n=t?"ol":"ul",r=e.map((e=>this.wrap("li",e))).join(""),o=this.wrap(n,r);return this.addRaw(o).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if("string"==typeof e)return this.wrap("td",e);const{header:t,data:n,colspan:r,rowspan:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},r&&{colspan:r}),o&&{rowspan:o});return this.wrap(i,n,s)})).join("");return this.wrap("tr",t)})).join(""),n=this.wrap("table",t);return this.addRaw(n).addEOL()}addDetails(e,t){const n=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(n).addEOL()}addImage(e,t,n){const{width:r,height:o}=n||{},i=Object.assign(Object.assign({},r&&{width:r}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(s).addEOL()}addHeading(e,t){const n="h"+t,r=this.wrap(["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",e);return this.addRaw(r).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const n=Object.assign({},t&&{cite:t}),r=this.wrap("blockquote",e,n);return this.addRaw(r).addEOL()}addLink(e,t){const n=this.wrap("a",e,{href:t});return this.addRaw(n).addEOL()}};e.markdownSummary=a,e.summary=a}(Bo)),Bo}function u(e){return Jo(this,void 0,void 0,(function*(){if(ei.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield ei.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function d(e){return Jo(this,void 0,void 0,(function*(){Qo.ok(e,"a path argument must be provided"),yield ei.mkdir(e,{recursive:!0})}))}function p(e){return Jo(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(ei.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(Zo.delimiter))e&&t.push(e);if(ei.isRooted(e)){const n=yield ei.tryGetExecutablePath(e,t);return n?[n]:[]}if(e.includes(Zo.sep))return[];const n=[];if(process.env.PATH)for(const e of process.env.PATH.split(Zo.delimiter))e&&n.push(e);const r=[];for(const o of n){const n=yield ei.tryGetExecutablePath(Zo.join(o,e),t);n&&r.push(n)}return r}))}function f(e,t,n,r){return Jo(this,void 0,void 0,(function*(){if(n>=255)return;n++,yield d(t);const o=yield ei.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield ei.lstat(o)).isDirectory()?yield f(o,s,n,r):yield h(o,s,r)}yield ei.chmod(t,(yield ei.stat(e)).mode)}))}function h(e,t,n){return Jo(this,void 0,void 0,(function*(){if((yield ei.lstat(e)).isSymbolicLink()){try{yield ei.lstat(t),yield ei.unlink(t)}catch(r){"EPERM"===r.code&&(yield ei.chmod(t,"0666"),yield ei.unlink(t))}const n=yield ei.readlink(e);yield ei.symlink(n,t,ei.IS_WINDOWS?"junction":null)}else(yield ei.exists(t))&&!n||(yield ei.copyFile(e,t))}))}function m(){function e(e,t,n){return o(this,void 0,void 0,(function*(){const r=s.argStringToArray(e);if(0===r.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=r[0];return t=r.slice(1).concat(t||[]),new s.ToolRunner(o,t,n).exec()}))}if(ni)return qo;ni=1;var t=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&t(r,e,o);return n(r,e),r},o=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(qo,"__esModule",{value:!0}),qo.getExecOutput=qo.exec=void 0;const i=Pr,s=r(function(){if(ti)return Vo;ti=1;var e=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Vr&&Vr.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var o in n)"default"!==o&&Object.hasOwnProperty.call(n,o)&&e(r,n,o);return t(r,n),r},r=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.argStringToArray=Vo.ToolRunner=void 0;const o=n(br),i=n(Ir),s=n(Nr),a=n(Sr),c=n(Wo),l=n(zo),u=Ar,d="win32"===process.platform;Vo.ToolRunner=class extends i.EventEmitter{constructor(e,t,n){if(super(),!e)throw Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){const n=this._getSpawnFileName(),r=this._getSpawnArgs(e);let o=t?"":"[command]";if(d)if(this._isCmdFile()){o+=n;for(const e of r)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${n}"`;for(const e of r)o+=" "+e}else{o+=this._windowsQuoteCmdArg(n);for(const e of r)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=n;for(const e of r)o+=" "+e}return o}_processLineBuffer(e,t,n){try{let r=t+""+e,i=r.indexOf(o.EOL);for(;i>-1;)n(r.substring(0,i)),r=r.substring(i+o.EOL.length),i=r.indexOf(o.EOL);return r}catch(r){return this._debug("error processing line. Failed with error "+r),""}}_getSpawnFileName(){return d&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(d&&this._isCmdFile()){let t='/D /S /C "'+this._windowsQuoteCmdArg(this.toolPath);for(const n of this.args)t+=" ",t+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let n=!1;for(const i of e)if(t.some((e=>e===i))){n=!0;break}if(!n)return e;let r='"',o=!0;for(let i=e.length;i>0;i--)r+=e[i-1],o&&"\\"===e[i-1]?r+="\\":'"'===e[i-1]?(o=!0,r+='"'):o=!1;return r+='"',r.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',n=!0;for(let r=e.length;r>0;r--)t+=e[r-1],n&&"\\"===e[r-1]?t+="\\":'"'===e[r-1]?(n=!0,t+="\\"):n=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){const t={cwd:(e=e||{}).cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){const n={};return n.cwd=(e=e||{}).cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${t}"`),n}exec(){return r(this,void 0,void 0,(function*(){return!l.isRooted(this.toolPath)&&(this.toolPath.includes("/")||d&&this.toolPath.includes("\\"))&&(this.toolPath=a.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield c.which(this.toolPath,!0),new Promise(((e,t)=>r(this,void 0,void 0,(function*(){this._debug("exec tool: "+this.toolPath),this._debug("arguments:");for(const e of this.args)this._debug(" "+e);const n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+o.EOL);const r=new p(n,this.toolPath);if(r.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield l.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const i=this._getSpawnFileName(),a=s.spawn(i,this._getSpawnArgs(n),this._getSpawnOptions(this.options,i));let c="";a.stdout&&a.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!n.silent&&n.outStream&&n.outStream.write(e),c=this._processLineBuffer(e,c,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let u="";if(a.stderr&&a.stderr.on("data",(e=>{r.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(e),u=this._processLineBuffer(e,u,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),a.on("error",(e=>{r.processError=e.message,r.processExited=!0,r.processClosed=!0,r.CheckComplete()})),a.on("exit",(e=>{r.processExitCode=e,r.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),r.CheckComplete()})),a.on("close",(e=>{r.processExitCode=e,r.processExited=!0,r.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),r.CheckComplete()})),r.on("done",((n,r)=>{c.length>0&&this.emit("stdline",c),u.length>0&&this.emit("errline",u),a.removeAllListeners(),n?t(n):e(r)})),this.options.input){if(!a.stdin)throw Error("child process missing stdin");a.stdin.end(this.options.input)}}))))}))}},Vo.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const n=[];let r=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&r?o=!0:" "!==a||r?t(a):i.length>0&&(n.push(i),i=""):o?t(a):r=!r}return i.length>0&&n.push(i.trim()),n};class p extends i.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=u.setTimeout(p.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):0===this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)):e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){e.done||(!e.processClosed&&e.processExited&&e._debug(`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`),e._setResult())}}return Vo}());return qo.exec=e,qo.getExecOutput=function(t,n,r){var s,a;return o(this,void 0,void 0,(function*(){let o="",c="";const l=new i.StringDecoder("utf8"),u=new i.StringDecoder("utf8"),d=null===(s=null==r?void 0:r.listeners)||void 0===s?void 0:s.stdout,p=null===(a=null==r?void 0:r.listeners)||void 0===a?void 0:a.stderr,f=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{o+=l.write(e),d&&d(e)},stderr:e=>{c+=u.write(e),p&&p(e)}}),h=yield e(t,n,Object.assign(Object.assign({},r),{listeners:f}));return o+=l.end(),c+=u.end(),{exitCode:h,stdout:o,stderr:c}}))},qo}function y(){return oi||(oi=1,function(e){function t(e,t){const n=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!n)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?n:n.trim()}function n(e,t={}){(0,u.issueCommand)("error",(0,p.toCommandProperties)(t),e instanceof Error?""+e:e)}function r(e){(0,u.issue)("group",e)}function o(){(0,u.issue)("endgroup")}var i=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},c=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.toPlatformPath=e.toWin32Path=e.toPosixPath=e.markdownSummary=e.summary=e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const u=Yr,d=oo,p=Jr,f=a(br),h=a(Sr),g=function(){if(ko)return fo;ko=1;var e=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(fo,"__esModule",{value:!0}),fo.OidcClient=void 0;const t=Lo,r=Mo,o=y();class i{static createHttpClient(e=!0,n=10){const o={allowRetries:e,maxRetries:n};return new t.HttpClient("actions/oidc-client",[new r.BearerCredentialHandler(i.getRequestToken())],o)}static getRequestToken(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){const e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(t){var n;return e(this,void 0,void 0,(function*(){const e=i.createHttpClient(),r=yield e.getJson(t).catch((e=>{throw Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)})),o=null===(n=r.result)||void 0===n?void 0:n.value;if(!o)throw Error("Response json body do not have ID Token field");return o}))}static getIDToken(t){return e(this,void 0,void 0,(function*(){try{let e=i.getIDTokenUrl();t&&(e=`${e}&audience=${encodeURIComponent(t)}`),(0,o.debug)("ID token url is "+e);const n=yield i.getCall(e);return(0,o.setSecret)(n),n}catch(n){throw Error("Error message: "+n.message)}}))}}return fo.OidcClient=i,fo}();var v,w;(w=v||(e.ExitCode=v={}))[w.Success=0]="Success",w[w.Failure=1]="Failure",e.exportVariable=function(e,t){const n=(0,p.toCommandValue)(t);if(process.env[e]=n,process.env.GITHUB_ENV)return(0,d.issueFileCommand)("ENV",(0,d.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("set-env",{name:e},n)},e.setSecret=function(e){(0,u.issueCommand)("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?(0,d.issueFileCommand)("PATH",e):(0,u.issueCommand)("add-path",{},e),process.env.PATH=`${e}${h.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,n){const r=t(e,n).split("\n").filter((e=>""!==e));return n&&!1===n.trimWhitespace?r:r.map((e=>e.trim()))},e.getBooleanInput=function(e,n){const r=t(e,n);if(["true","True","TRUE"].includes(r))return!0;if(["false","False","FALSE"].includes(r))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},e.setOutput=function(e,t){if(process.env.GITHUB_OUTPUT)return(0,d.issueFileCommand)("OUTPUT",(0,d.prepareKeyValueMessage)(e,t));process.stdout.write(f.EOL),(0,u.issueCommand)("set-output",{name:e},(0,p.toCommandValue)(t))},e.setCommandEcho=function(e){(0,u.issue)("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=v.Failure,n(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){(0,u.issueCommand)("debug",{},e)},e.error=n,e.warning=function(e,t={}){(0,u.issueCommand)("warning",(0,p.toCommandProperties)(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){(0,u.issueCommand)("notice",(0,p.toCommandProperties)(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+f.EOL)},e.startGroup=r,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let n;r(e);try{n=yield t()}finally{o()}return n}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return(0,d.issueFileCommand)("STATE",(0,d.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("save-state",{name:e},(0,p.toCommandValue)(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield g.OidcClient.getIDToken(e)}))};var b=l();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return b.summary}});var E=l();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var _=function(){if(Fo)return Go;Fo=1;var e=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Vr&&Vr.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var o in n)"default"!==o&&{}.hasOwnProperty.call(n,o)&&e(r,n,o);return t(r,n),r};Object.defineProperty(Go,"__esModule",{value:!0}),Go.toPlatformPath=Go.toWin32Path=Go.toPosixPath=void 0;const r=n(Sr);return Go.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Go.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Go.toPlatformPath=function(e){return e.replace(/[/\\]/g,r.sep)},Go}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return _.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return _.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return _.toPlatformPath}}),e.platform=a((ri||(ri=1,function(e){var t=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(r,e,o);return n(r,e),r},o=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getDetails=e.isLinux=e.isMacOS=e.isWindows=e.arch=e.platform=void 0;const s=i(br),a=r(m());e.platform=s.default.platform(),e.arch=s.default.arch(),e.isWindows="win32"===e.platform,e.isMacOS="darwin"===e.platform,e.isLinux="linux"===e.platform,e.getDetails=function(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield o(void 0,void 0,void 0,e.isWindows?function*(){const{stdout:e}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:t}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:t.trim(),version:e.trim()}}:e.isMacOS?function*(){var e,t,n,r;const{stdout:o}=yield a.getExecOutput("sw_vers",void 0,{silent:!0}),i=null!==(t=null===(e=o.match(/ProductVersion:\s*(.+)/))||void 0===e?void 0:e[1])&&void 0!==t?t:"";return{name:null!==(r=null===(n=o.match(/ProductName:\s*(.+)/))||void 0===n?void 0:n[1])&&void 0!==r?r:"",version:i}}:function*(){const{stdout:e}=yield a.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,n]=e.trim().split("\n");return{name:t,version:n}})),{platform:e.platform,arch:e.arch,isWindows:e.isWindows,isMacOS:e.isMacOS,isLinux:e.isLinux})}))}}(Ho)),Ho))}(Kr)),Kr}function g(e){return ai?si.error(e):console.log(`${e}`)}function v(e){return ai?si.warning(e):console.log(`${e}`)}function w(e){return ai?si.notice(e):console.log(`${e}`)}function b(e){return ai?si.info(e):console.log(e)}function E(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function _(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){_(e,t||{},(function(e,t){e?r(e):n(t)}))}))}Fs(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}function S(e,t){const n=e.options.env||process.env,r=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=ea.sync(e.command,{path:n[ta({env:n})],pathExt:t?Zs.delimiter:void 0})}catch(c){}finally{i&&process.chdir(r)}return s&&(s=Zs.resolve(o?e.options.cwd:"",s)),s}function O(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function x(e,t){return fa&&1===e&&!t.file?O(t.original,"spawn"):null}function T(e,t,n){const r=ma(e,t,n),o=ha.spawn(r.command,r.args,r.options);return ya.hookChildProcess(o,r),o}function I(e={}){const{env:t=process.env,platform:n=process.platform}=e;return"win32"!==n?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function R(e){return e instanceof URL?Lr.fileURLToPath(e):e}function P(e,t){this._id=e,this._clearFn=t}function N(e){if("string"==typeof e)return _l(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw Error("Input must be a string or a Uint8Array");return Sl(e)}function C(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 A(e,{checkOpen:t=!0}={}){return C(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 $(e,{checkOpen:t=!0}={}){return C(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 D(e,t){return A(e,t)&&$(e,t)}function L(){return this[Cl].next()}function k(e){return this[Cl].return(e)}function M({preventCancel:e=!1}={}){const t=this.getReader(),n=new Nl(t,e),r=Object.create(Al);return r[Cl]=n,r}function j(e,t){const n="bigint"==typeof e;if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const r=0>e?"-":"";e=0>e?-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(null!=i||(i=e+""),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length;i="0".repeat(Math.max(0,(o.length>0?2:1)-e))+i}else i+=t.verbose?" "+(s=n,1===(a=e)||1n===a?s:s+"s"):r;var s,a;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(gu(1e3*e)%1e3),nanoseconds:Math.trunc(gu(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(i(a/365n,"year","y"),i(a%365n,"day","d"),i(Number(s.hours),"hour","h"),i(Number(s.minutes),"minute","m"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&1e3>e){const e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(n,"millisecond","ms"),i(r,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=n+r/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=1>e?Math.ceil(e):Math.round(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const r=(Math.round(Math.floor((n?Number(e%86400000n):e)/1e3%60*10**(c="number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1)+1e-7))/10**c).toFixed(c),o=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}var c;if(0===o.length)return r+"0"+(t.verbose?" milliseconds":"ms");const l=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),r+o.join(l)}function U(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const o of e)_f(o);const t=e.some((({readableObjectMode:e})=>e)),n=gf(e,t),r=new vf({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(const o of e)r.add(o);return r}function F(e,t=["-NoProfile","-NoLogo","-NonInteractive"],n={stdio:"inherit"}){return Um(function(){if(void 0===Fy){const e=Uy.sync("pwsh",{nothrow:!0});null!==e&&(Fy=e);const t=Uy.sync("powershell",{nothrow:!0});null!==t&&(Fy=t)}if(void 0===Fy)throw Error("Could not find powershell");return Fy}(),[...t,"-c",e],n)}function B(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function G(e){return B(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function H(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,r=Zg(t);return await new Promise(((t,o)=>{const i=e=>{e&&r.getBufferedLength()<=Yg.MAX_LENGTH&&(e.bufferedData=r.getBufferedValue()),o(e)};(async()=>{try{await ev(e,r),t()}catch(n){i(n)}})(),r.on("data",(()=>{r.getBufferedLength()>n&&i(new tv)}))})),r.getBufferedValue()}function q(e,t,n){const r=Ev(e,t,n),o=hv(e,t),i=mv(e,t);let s;bv(i,r.options),(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(r.options);try{s=Nr.spawn(r.file,r.args,r.options)}catch(d){const e=new Nr.ChildProcess,t=Promise.reject(vg({error:d,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return uv(e,t),e}const a=(e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))})))(s),c=((e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const i=new Promise(((r,i)=>{o=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,i)}),t)})),s=r.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,r.options,a),l=(async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const o=Fg((()=>{e.kill()}));return r.finally((()=>{o()}))})(s,r.options,c);s.kill=Bg.bind(null,s.kill.bind(s)),s.cancel=Wg.bind(null,s,{isCanceled:!1});const u=lg((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:a},c,u,d]=await(async({stdout:t,stderr:n,all:r},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=av(t,{encoding:o,buffer:i,maxBuffer:s}),l=av(n,{encoding:o,buffer:i,maxBuffer:s}),u=av(r,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},sv(t,c),sv(n,l),sv(r,u)])}})(s,r.options,l),p=_v(r.options,c),f=_v(r.options,u),h=_v(r.options,d);if(e||0!==t||null!==n){const c=vg({error:e,exitCode:t,signal:n,stdout:p,stderr:f,all:h,command:o,escapedCommand:i,parsed:r,timedOut:a,isCanceled:!!r.options.signal&&r.options.signal.aborted,killed:s.killed});if(!r.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:p,stderr:f,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const n=(({input:e,inputFile:t})=>"string"!=typeof t?e:(iv(e),_r.createReadStream(t)))(t);void 0!==n&&(B(n)?n.pipe(e.stdin):e.stdin.end(n))})(s,r.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=ov();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n})(s,r.options),(e=>{null!==e.stdout&&(e.pipeStdout=zg.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=zg.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=zg.bind(void 0,e,"all"))})(s),uv(s,u),s}function V(e,t,n){const r=Ev(e,t,n),o=hv(e,t),i=mv(e,t);bv(i,r.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(iv(e),_r.readFileSync(t)))(e);if(B(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(r.options);let a;try{a=Nr.spawnSync(r.file,r.args,{...r.options,input:s})}catch(u){throw vg({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const c=_v(r.options,a.stdout,a.error),l=_v(r.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=vg({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,parsed:r,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!r.options.reject)return e;throw e}return{command:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function W(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function z(){return null!==tg.sync("sudo",{nothrow:!0})}function X(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function K(){return X()&&z()}function Y(e){return K()?"sudo "+e:e}function J(e,t=[],n=xv){return K()?function(e,t){const[n,...r]=gv(e);return V(n,r,t)}(Z(e,t),n):V(e,ee(t),n)}function Q(e,t=[],n=xv){return K()?function(e,t){const[n,...r]=gv(e);return q(n,r,t)}(Z(e,t),n):q(e,ee(t),n)}function Z(e,t){return"sudo "+ee([e,...t]).join(" ")}function ee(e){return e.map((e=>`'${e}'`))}function te(){return"win32"===process.platform?Tv():X()}async function ne(e){if(("linux"===process.platform||"darwin"===process.platform)&&K()&&void 0!==process.env.SUDO_USER){let t=_r.statSync(e).isDirectory();await Q("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],xv)}}function re(){if(gw)return yw;gw=1;var e=nw,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return yw=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),r(c).forEach((function(e){try{t(i,e,n(s,e))}catch(r){a=r}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,n(s,e))}catch(r){a=r}})),void 0!==a)throw a;return i}}function oe(){return Kw?Xw:(Kw=1,Xw=(Vw?qw:(Vw=1,qw=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(zw)return Ww;zw=1;var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};return Ww=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()}())}function ie(){if(tb)return eb;tb=1;var e=Zw?Qw:(Zw=1,Qw=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return eb=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function se(){return db?ub:(db=1,ub=function(){if(Jw)return Yw;Jw=1;var e=oe(),t={object:!0,symbol:!0};return Yw=function(){var n=e.Symbol;return"function"==typeof n&&(n("test symbol"),!!t[typeof n.iterator]&&!!t[typeof n.toPrimitive]&&!!t[typeof n.toStringTag])}}()()?oe().Symbol:function(){if(lb)return cb;lb=1;var e,t,n,r=Fw,o=ie(),i=oe().Symbol,s=function(){if(rb)return nb;rb=1;var e=Fw,t=Object.defineProperty,n=Object.prototype,r=(0,Object.create)(null);return nb=function(o){for(var i,s,a=0;r[o+(a||"")];)++a;return r[o+=a||""]=!0,t(n,i="@@"+o,e.gs(null,(function(n){s||(s=!0,t(this,i,e(n)),s=!1)}))),i}}(),a=function(){if(ib)return ob;ib=1;var e=Fw,t=oe().Symbol;return ob=function(n){return Object.defineProperties(n,{hasInstance:e("",t&&t.hasInstance||n("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||n("isConcatSpreadable")),iterator:e("",t&&t.iterator||n("iterator")),match:e("",t&&t.match||n("match")),replace:e("",t&&t.replace||n("replace")),search:e("",t&&t.search||n("search")),species:e("",t&&t.species||n("species")),split:e("",t&&t.split||n("split")),toPrimitive:e("",t&&t.toPrimitive||n("toPrimitive")),toStringTag:e("",t&&t.toStringTag||n("toStringTag")),unscopables:e("",t&&t.unscopables||n("unscopables"))})}}(),c=function(){if(ab)return sb;ab=1;var e=Fw,t=ie(),n=Object.create(null);return sb=function(r){return Object.defineProperties(r,{for:e((function(e){return n[e]?n[e]:n[e]=r(e+"")})),keyFor:e((function(e){var r;for(r in t(e),n)if(n[r]===e)return r}))})}}(),l=Object.create,u=Object.defineProperties,d=Object.defineProperty;if("function"==typeof i)try{i(),n=!0}catch(p){}else i=null;return t=function(n){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(n)},cb=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return n?i(o):(a=l(t.prototype),u(a,{__description__:r("",o=void 0===o?"":o+""),__name__:r("",s(o))}))},a(e),c(e),u(t.prototype,{constructor:r(e),toString:r("",(function(){return this.__name__}))}),u(e.prototype,{toString:r((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:r((function(){return o(this)}))}),d(e.prototype,e.toPrimitive,r("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),d(e.prototype,e.toStringTag,r("c","Symbol")),d(t.prototype,e.toStringTag,r("c",e.prototype[e.toStringTag])),d(t.prototype,e.toPrimitive,r("c",e.prototype[e.toPrimitive])),cb}())}function ae(){return Eb?bb:(Eb=1,bb=(Hw?Gw:(Hw=1,Gw=function(){var e,t,n=Array.from;return"function"==typeof n&&!(!(t=n(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}))()?Array.from:function(){if(wb)return vb;wb=1;var e=se().iterator,t=function(){if(fb)return pb;fb=1;var e={}.toString,t=e.call(function(){return arguments}());return pb=function(n){return e.call(n)===t}}(),n=function(){if(mb)return hb;mb=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return hb=function(n){return"function"==typeof n&&t(e.call(n))}}(),r=Jv,o=ew,i=nw,s=Gv,a=function(){if(gb)return yb;gb=1;var e={}.toString,t=e.call("");return yb=function(n){return"string"==typeof n||n&&"object"==typeof n&&(n instanceof String||e.call(n)===t)||!1}}(),c=Array.isArray,l=function(){}.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;return vb=function(p){var f,h,m,y,g,v,w,b,E,_,S=arguments[1],O=arguments[2];if(p=Object(i(p)),s(S)&&o(S),this&&this!==Array&&n(this))f=this;else{if(!S){if(t(p))return 1!==(g=p.length)?Array.apply(null,p):((y=[,])[0]=p[0],y);if(c(p)){for(y=Array(g=p.length),h=0;g>h;++h)y[h]=p[h];return y}}y=[]}if(!c(p))if(void 0!==(E=p[e])){for(w=o(E).call(p),f&&(y=new f),b=w.next(),h=0;!b.done;)_=S?l.call(S,O,b.value,h):b.value,f?(u.value=_,d(y,h,u)):y[h]=_,b=w.next(),++h;g=h}else if(a(p)){for(g=p.length,f&&(y=new f),h=0,m=0;g>h;++h)_=p[h],g>h+1&&(55296>(v=_.charCodeAt(0))||v>56319||(_+=p[++h])),_=S?l.call(S,O,_,m):_,f?(u.value=_,d(y,m,u)):y[m]=_,++m;g=m}if(void 0===g)for(g=r(p.length),f&&(y=new f(g)),h=0;g>h;++h)_=S?l.call(S,O,p[h],h):p[h],f?(u.value=_,d(y,h,u)):y[h]=_;return f&&(u.value=null,y.length=g),y},vb}())}function ce(){if(Fb)return Ub;Fb=1;var e=jb?Mb:(jb=1,Mb=(Db?$b:(Db=1,$b=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:kb?Lb:(kb=1,Lb=function(e){return e!=e})),t=Jv,n=nw,r=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return Ub=function(a){var c,l,u;if(!e(a))return r.apply(this,arguments);for(l=t(n(this).length),c=u=isNaN(u=arguments[1])?0:0>u?t(this.length)-s(i(u)):s(u);l>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},Ub}function le(){if(Xb)return zb;Xb=1;var e=ew,t=lw,n=function(){}.call;return zb=function(r,o){var i={},s=arguments[2];return e(o),t(r,(function(e,t,r,a){i[t]=n.call(o,s,e,t,r,a)})),i},zb}function ue(){if(Yb)return Kb;Yb=1;var e=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},t=function(t){var n,r,o=document.createTextNode(""),i=0;return new t((function(){var e;if(n)r&&(n=r.concat(n));else{if(!r)return;n=r}if(r=n,n=null,"function"==typeof r)return e=r,r=null,void e();for(o.data=i=++i%2;r;)e=r.shift(),r.length||(r=null),e()})).observe(o,{characterData:!0}),function(t){e(t),n?"function"==typeof n?n=[n,t]:n.push(t):(n=t,o.data=i=++i%2)}};return Kb=function(){if("object"==typeof process&&process&&"function"==typeof process.nextTick)return process.nextTick;if("function"==typeof queueMicrotask)return function(t){queueMicrotask(e(t))};if("object"==typeof document&&document){if("function"==typeof MutationObserver)return t(MutationObserver);if("function"==typeof WebKitMutationObserver)return t(WebKitMutationObserver)}return"function"==typeof setImmediate?function(t){setImmediate(e(t))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(t){setTimeout(e(t),0)}:null}()}function de(){return tE?eE:(tE=1,eE=function(e){return"function"==typeof e})}function pe(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return uE||(uE=1,BE.exports=e,BE.exports.default=e),BE.exports}function fe(){if(dE)return FE;dE=1;var e=le(),t=function(){if(Zb)return Qb;Zb=1;var e=[].forEach,t=Object.create;return Qb=function(n){var r=t(null);return e.call(arguments,(function(e){r[e]=!0})),r},Qb}(),n=function(){if(iE)return oE;iE=1;var e=nw,t=function(){if(rE)return nE;rE=1;var e=de();return nE=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(n){throw new TypeError("Passed argument cannot be stringifed")}}}();return oE=function(n){return t(e(n))}}(),r=function(){if(lE)return cE;lE=1;var e=function(){if(aE)return sE;aE=1;var e=de();return sE=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(n){return"<Non-coercible to string value>"}}}();return cE=function(t){var n=e(t);return n.length>100&&(n=n.slice(0,99)+"…"),n.replace(/[\n\r\u2028\u2029]/g,(function(e){return JSON.stringify(e).slice(1,-1)}))}}(),o=pe(),i=ue(),s=Object.create,a=t("then","then:finally","done","done:finally");return uw.promise=function(t,c){var l=s(null),u=s(null),d=s(null);if(!0===t)t=null;else if(t=n(t),!a[t])throw new TypeError("'"+r(t)+"' is not valid promise mode");c.on("set",(function(e,n,r){var s=!1;if(!o(r))return u[e]=r,void c.emit("setasync",e,1);l[e]=1,d[e]=r;var a=function(t){var n=l[e];if(s)throw Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");n&&(delete l[e],u[e]=t,c.emit("setasync",e,n))},p=function(){s=!0,l[e]&&(delete l[e],delete d[e],c.delete(e))},f=t;if(f||(f="then"),"then"===f){var h=function(){i(p)};"function"==typeof(r=r.then((function(e){i(a.bind(this,e))}),h)).finally&&r.finally(h)}else if("done"===f){if("function"!=typeof r.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");r.done(a,p)}else if("done:finally"===f){if("function"!=typeof r.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof r.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");r.done(a),r.finally(p)}})),c.on("get",(function(e,t,n){var r;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,n)};o(r=d[e])?"function"==typeof r.done?r.done(s):r.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete d[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),d=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},FE}async function he(e){try{return await _r.promises.access(e),!0}catch{return!1}}function me(e){const t=function(){if(K()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Sr.join("/Users/",process.env.SUDO_USER):Sr.join("/home/",process.env.SUDO_USER);{const e=br.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(JE,t)}async function ye(e){const t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`\n# Automatically Generated by envosman ${e.guard}\nexport SOURCE_${e.guard.toUpperCase()}RC=0\n`;await he(e.rcPath)&&((await ZE(e.rcPath,"utf8")).includes(t)||(await QE(e.rcPath,`\n${t}\n`),b(`Added ${t} to ${e.rcPath}`)))}async function ge(e,t){await he(t)&&((await ZE(t,"utf-8")).includes(e)||(await QE(t,e),b(`${e} was added to ${t}`)))}async function ve(e,t,n={}){const r={escapeSpace:!1,overwrite:!0,rcPath:t_,...n},o=function(e,t=!1){const n=t?a_(e):e;return f_(n,'"',"\\")}(null!=t?t:"",r.escapeSpace);try{if(h_)try{if(!r.overwrite&&void 0!==process.env[e])return void b(`Environment variable ${e} is already defined. Skipping.`);si.exportVariable(e,o)}catch(i){g(i),await we(e,o,r)}else await we(e,o,r)}catch(i){g(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function we(e,t,n){const r=null!=t?t:"";switch(process.platform){case"win32":return n.overwrite||void 0===process.env[e]?(await F(`[Environment]::SetEnvironmentVariable('${e}', '${r}', "User")`),void b(`${e}='${r}' was set in the environment.`)):void b(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await n_(n),void(n.overwrite?(await m_(n.rcPath,`\nexport ${e}="${r}"\n`),b(`${e}="${r}" was added to "${n.rcPath}`)):(await m_(n.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${r}"; fi\n`),b(`if not defined ${e} then ${e}="${r}" was added to "${n.rcPath}`)))}process.env[e]=r}async function be(e,t={}){const n={rcPath:t_,...t};if(!function(e){var t,n;return!!v_.some((t=>t.test(e)))&&(null!=(n=null==(t=process.env.PATH)?void 0:t.split(Sr.delimiter))?n:[]).includes(e)}(e)){process.env.PATH=`${e}${Sr.delimiter}${process.env.PATH}`;try{if(y_)try{si.addPath(e)}catch(r){g(r),await Ee(e,n)}else await Ee(e,n)}catch(r){g(`${r}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function Ee(e,t){switch(process.platform){case"win32":return await F(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void b(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await n_(t),await g_(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void b(`"${e}" was added to "${t.rcPath}"`);default:return}}function _e(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function Se(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:n}=t;P_[e]=n}}function Oe(e,t,n){const r=function(e){const t=P_[e.locale];let n=e.unitTypeLookupOrder.slice();n.unshift(e.unitType),n=Array.from(new Set(n));let r=null;if(n.some((function(e){if(void 0!==t[e])return r=t[e],!0})),null===r)throw Error("Can not find any unit type data for locale: "+e.locale);return r}(n);return x_.pluralize(n.locale,t,r[e]).replace("{0}",t)}function xe(){if(WS)return VS;WS=1;const e=/\s+/g;class t{constructor(n,i){if(i=r(i),n instanceof t)return n.loose===!!i.loose&&n.includePrerelease===!!i.includePrerelease?n:new t(n.raw,i);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&m(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;this.set.length>e;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;t.length>e;e++)e>0&&(this.formatted+=" "),this.formatted+=(""+t[e]).trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&f))+":"+e,r=n.get(t);if(r)return r;const s=this.options.loose;e=e.replace(s?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE],I(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],u),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],d),i("caret trim",e);let m=e.split(" ").map((e=>g(e,this.options))).join(" ").split(/\s+/).map((e=>T(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const y=new Map,v=m.map((e=>new o(e,this.options)));for(const n of v){if(h(n))return[n];y.set(n.value,n)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return n.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,n)&&e.set.some((e=>y(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(t){return!1}for(let n=0;this.set.length>n;n++)if(R(this.set[n],e,this.options))return!0;return!1}}VS=t;const n=new KS,r=j_,o=Te(),i=D_,s=K_,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:d}=L_,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:f}=$_,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},g=(e,t)=>(i("comp",e,t),e=E(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=S(e,t),i("xrange",e),e=x(e,t),i("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>e.replace(t.loose?a[c.TILDELOOSE]:a[c.TILDE],((t,n,r,o,s)=>{let a;return i("tilde",e,t,n,r,o,s),v(n)?a="":v(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:v(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${n}.${r}.${o}-${s} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,i("tilde return",a),a})),E=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{i("caret",e,t);const n=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,r,o,s,a)=>{let c;return i("caret",e,t,r,o,s,a),v(r)?c="":v(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(s)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===r?"0"===o?`>=${r}.${o}.${s}-${a} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${a} <${+r+1}.0.0-0`):(i("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),i("caret return",c),c}))},S=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((n,r,o,s,a,c)=>{i("xRange",e,n,r,o,s,a,c);const l=v(o),u=l||v(s),d=u||v(a);return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(s=0),a=0,">"===r?(r=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===r&&(r="<",u?o=+o+1:s=+s+1),"<"===r&&(c="-0"),n=`${r+o}.${s}.${a}${c}`):u?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",n),n})),x=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),T=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),I=e=>(t,n,r,o,i,s,a,c,l,u,d,p)=>`${n=v(r)?"":v(o)?`>=${r}.0.0${e?"-0":""}`:v(i)?`>=${r}.${o}.0${e?"-0":""}`:s?">="+n:`>=${n}${e?"-0":""}`} ${c=v(l)?"":v(u)?`<${+l+1}.0.0-0`:v(d)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${d}-${p}`:e?`<${l}.${u}.${+d+1}-0`:"<="+c}`.trim(),R=(e,t,n)=>{for(let r=0;e.length>r;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;e.length>n;n++)if(i(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return VS}function Te(){if(XS)return zS;XS=1;const e=Symbol();class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),s("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(t){const n=t.match(this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR]);if(!n)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),this.semver=n[2]?new a(n[2],this.options.loose):e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(n){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}zS=t;const n=j_,{safeRe:r,t:o}=L_,i=jS,s=D_,a=K_,c=xe();return zS}function Ie(e,t,n,r){return new(n||(n=Promise))((function(t,o){function i(e){try{a(r.next(e))}catch(t){o(t)}}function s(e){try{a(r.throw(e))}catch(t){o(t)}}function a(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,s)}a((r=r.call(e)).next())}))}function Re(e,t){function n(n){return function(c){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,n[0]&&(a=0)),a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&i[3]>n[1])){a.label=n[1];break}if(6===n[0]&&i[1]>a.label){a.label=i[1],i=n;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(c){n=[6,c],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,c])}}var r,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function Pe(e){return null==e?[]:Array.isArray(e)?e:[e]}function Ne(e,t,n,r){var o,i=e[t],s=~r.string.indexOf(t)?null==n||!0===n?"":n+"":"boolean"==typeof n?n:~r.boolean.indexOf(t)?"false"!==n&&("true"===n||(e._.push(0*(o=+n)==0?o:n),!!n)):0*(o=+n)==0?o:n;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function Ce(e,t,n,r=40){ox?await async function(e,t,n=40){await Q("update-alternatives",["--install","/usr/bin/"+e,e,t,""+n])}(e,t,r):(await n_(n),await ix(n.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${r}; fi\n`))}function Ae(e){const t={...process.env,DEBIAN_FRONTEND:"noninteractive"};return"nala"===e&&(void 0===t.LANG&&(t.LANG="C.UTF-8"),void 0===t.LC_ALL&&(t.LC_ALL="C.UTF-8")),t}function $e(){return null!==Uy.sync("nala",{nothrow:!0})}function De(){let e;return e=$e()?"nala":"apt-get",e}function Le(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function ke(e){try{const{stdout:t}=await Um("dpkg",["-s",e],{env:Ae("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Me(e,t=De()){return(await Promise.all(e.map((e=>je(e,t))))).filter((e=>void 0!==e))}async function je(e,t=De()){const n=await async function(e,t,n){switch(await Ue(e,t,n)){case lx.NameDashVersion:return`${t}-${n}`;case lx.NameEqualsVersion:return`${t}=${n}`;case lx.Name:return void 0!==n&&""!==n&&v(`Could not find package ${t} with version ${n}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${null!=n?n:""}`)}}(t,e.name,e.version);return await ke(n)?void 0:n}async function Ue(e,t,n){if(void 0!==n&&""!==n){const{stdout:r}=await Um("apt-cache",["search","--names-only",`^${Le(t)}-${Le(n)}$`],{env:Ae(e),stdio:"pipe"});if(""!==r.trim())return lx.NameDashVersion;try{const{stdout:r}=await Um("apt-cache",["show",`${t}=${n}`],{env:Ae(e)});if(""===r.trim())return lx.NameEqualsVersion}catch{}}try{const{stdout:n}=await Um("apt-cache",["show",t],{env:Ae(e),stdio:"pipe"});if(""!==n.trim())return lx.Name}catch{}return ax?lx.None:(cx(e),Ue(e,t,n))}async function Fe(e,t=!1){try{const r=De();for(const{name:t,version:n}of e)b(`Installing ${t} ${null!=n?n:""} via ${r}`);t&&cx(r),await async function(e,t){const n=[...new Set(t.flatMap((e=>{var t;return null!=(t=e.repository)?t:[]})))];await Promise.all(n.map((t=>async function(e,t=De()){await dx(t),await async function(e){await ke("software-properties-common")||J(e,["install","-y","--fix-broken","-o",sx,"software-properties-common"],{...xv,env:Ae(e)})}(t),J("add-apt-repository",["-y","--no-update",e],{...xv,env:Ae(t)}),cx.clear(),cx(t)}(t,e))))}(r,e);const o=await Me(e,r);if(0===o.length)return b("All packages are already installed"),{binDir:"/usr/bin/"};await dx(r);try{await async function(e){await Promise.all(e.map((async e=>{var t;void 0!==e.key&&await(t=e.key,"keyUrl"in t?Be(t):async function({key:e,keyServer:t=hx,fileName:n,keyStorePath:r=hx}){try{He(n);const o=Sr.join(r,n);return await he(o)||(Ge(),await Q("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await Q("chmod",["644",o])),o}catch(o){return void v(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),J(r,["install","--fix-broken","-y",...o],{...xv,env:Ae(r)})}catch(n){if(!function(e){return"string"==typeof e.stderr}(n))throw n;px.some((e=>"string"==typeof n.stderr&&n.stderr.includes(e)))&&(v(`Failed to install packages ${o}. Retrying...`),J(r,["install","--fix-broken","-y","-o",sx,...o],{...xv,env:Ae(r)}))}return{binDir:"/usr/bin/"}}catch(n){throw Error("Failed to install apt packages: "+(n instanceof Error?`${n.message}\n${n.stack}`:n+""))}}async function Be({keyUrl:e,fileName:t,keyStorePath:n=fx}){try{He(t);const r=Sr.join(n,t);if(!(await he(r))){Ge(),await Fe([{name:"ca-certificates"}]);const n=Sr.join(br.tmpdir(),t),o=new rx.DownloaderHelper(e,br.tmpdir(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),J("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+r,"--import",n]),J("chmod",["644",r])}return r}catch(r){return void v(`Failed to add apt key via download ${e}: ${r}`)}}function Ge(){J("gpg",["-k"])}function He(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function qe(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof mx)return{binDir:mx};const t=await Uy("brew",{nothrow:!0});if(null!==t)return mx=Sr.dirname(t),{binDir:mx};await Fe([{name:"ca-certificates"}]);const n=new rx.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",br.tmpdir(),{fileName:"install-brew.sh"});return n.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await n.start(),Fm("/bin/bash",[n.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),mx=Ve(),await be(mx,e.rcOptions),{binDir:mx}}function Ve(){return Sr.join(We(),"bin")}function We(){if("darwin"===process.platform)return"arm64"===process.arch?"/opt/homebrew":"/usr/local";if("linux"===process.platform)return"/home/linuxbrew/.linuxbrew";throw Error("Unsupported platform for brew")}async function ze(e,t,n={}){const r={overwrite:!0,cask:!1,args:[],...n};b(`Installing ${e} ${null!=t?t:""} via brew`),bx&&null!==Uy.sync("brew",{nothrow:!0})||(await qe(),bx=!0);const o=Ve(),i=Sr.join(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return r.overwrite&&s.push("--overwrite"),r.cask&&s.push("--cask"),Fm(i,s,{stdio:"inherit"}),{binDir:o}}function Xe(){return"linux"===process.platform&&(void 0===yx&&(yx=null!==tg.sync("dnf",{nothrow:!0})),yx)}function Ke(){return"linux"===process.platform&&(void 0===gx&&(gx=null!==tg.sync("pacman",{nothrow:!0})),gx)}function Ye(){return"linux"===process.platform&&(void 0===vx&&(vx=null!==tg.sync("apt-get",{nothrow:!0})),vx)}async function Je(e,t,n){var r;if("win32"!==process.platform)return;if("string"==typeof wx)return{binDir:wx};const o=tg.sync("choco",{nothrow:!0});if(null!==o)return wx=Sr.dirname(o),{binDir:wx};let i="powershell.exe";const s=tg.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(i=s),V(i,["-NoProfile","-InputFormat","None","-ExecutionPolicy","Bypass","-Command","[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"],{stdio:"inherit"});const a=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await be(a,oR);const c=tg.sync("choco",{nothrow:!0});return wx=null!==c?Sr.dirname(c):(null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin",await he(wx)?{binDir:wx}:void 0}async function Qe(e,t,n=[]){var r;b(`Installing ${e} ${null!=t?t:""} via chocolatey`),Ex&&null!==tg.sync("choco",{nothrow:!0})||(await Je(0,0,process),Ex=!0);const o=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=o,void 0!==t&&""!==t)V("choco",["install","-y",e,"--version="+t,...n],{env:i,extendEnv:!1,stdio:"inherit"});else try{V("choco",["install","-y",e,...n],{env:i,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;b(e+" might require a reboot for the completion of the installation.")}const s=(null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin";return await be(s,oR),{binDir:s}}async function Ze(e){for(const{name:t,version:n}of e)b(`Installing ${t} ${null!=n?n:""} via dnf`);return J("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:n}=await q("dnf",["search","-q",`${e}-${t}`]);if(""!==n.trim())return`${e}-${t}`;{const{stdout:n}=await q("dnf",["search","-q",`${e}${t}`]);if(""!==n.trim())return`${e}${t}`;v(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function et(e,t,n){b(`Installing ${e} ${null!=t?t:""} via pacman`);const r="pacman";"yay"===n&&function(){if(null===tg.sync("yay",{nothrow:!0}))try{J("pacman",["-S","--noconfirm","base-devel","git"]);const e=Sr.join(br.tmpdir(),"yay");J("mkdir",["-p",e]),X()?(v("Creating a non-root user to build yay"),J("useradd",["-m","-G","wheel","builder"]),J("passwd",["-d","builder"]),J("chown",["-R","builder:builder",e]),J("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),xx=!0,V("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),V("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(V("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:br.tmpdir()}),V("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),V("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),_x||"yay"===n||(J(r,["-Sy","--noconfirm"]),_x=!0),Sx||"yay"===n||(J(r,["-S","--noconfirm","base-devel"]),Sx=!0);const o=e=>"yay"===n?X()&&xx?J("su",["-","builder","-c","yay -S --noconfirm "+e]):V(n,["-S","--noconfirm",e]):J(null!=n?n:r,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const n=await async function(e,t){const n=[];try{const{stdout:r}=await q(e,["-Si",t]);for(const e of r.matchAll(Ox))n.push(e[1])}catch(r){v(`Failed to get available versions for ${t}: ${r}`)}return n}(r,e);if(n.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else b(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function tt(e,t){return Object.keys(t).forEach((n=>{"default"===n||"__esModule"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:()=>t[n]})})),e}function nt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function rt(e,t=!0){return t?Sr.basename(e):Sr.basename(e,Sr.extname(e))}function ot(e){return Sr.normalize(e).replace(RegExp(Le(Sr.sep)+"$"),"")}function it(e,t=".exe",n=""){return"win32"===process.platform?`${e}${t}`:`${e}${n}`}function st(e,t){const n=Sr.extname(e),r=`${t}${Sr.basename(e,n)}${n}`;return Sr.join(Sr.dirname(e),r)}function at(e,t){const n=Sr.extname(e),r=`${Sr.basename(e,n)}${t}${n}`;return Sr.join(Sr.dirname(e),r)}function ct(e,t=".cmd",n=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${n}`}function lt(e){return"win32"===process.platform?e:"./"+e}function ut(e){const t=Sr.extname(e).length;return e.slice(0,-t)}function dt(e,t){return Ix(e,t)}function pt(e,t){const n=Sr.relative(t,e);return!(!n||".."===n||n.startsWith(".."+Sr.sep)||n===Sr.resolve(e))}function ft(e,t){const n=[];t=t||yT.arch();const r=gT.join(wt(),e);if(hT.existsSync(r)){const e=hT.readdirSync(r);for(const o of e)if(gt(o)){const e=gT.join(r,o,t||"");hT.existsSync(e)&&hT.existsSync(e+".complete")&&n.push(o)}}return n}function ht(e){return uT(this,void 0,void 0,(function*(){return e||(e=gT.join(bt(),ST.default())),yield fT.mkdirP(e),e}))}function mt(e,t,n){return uT(this,void 0,void 0,(function*(){const r=gT.join(wt(),e,wT.clean(t)||t,n||"");pT.debug("destination "+r);const o=r+".complete";return yield fT.rmRF(r),yield fT.rmRF(o),yield fT.mkdirP(r),r}))}function yt(e,t,n){const r=gT.join(wt(),e,wT.clean(t)||t,n||"");hT.writeFileSync(r+".complete",""),pT.debug("finished caching tool")}function gt(e){const t=wT.clean(e)||"";pT.debug("isExplicit: "+t);const n=null!=wT.valid(t);return pT.debug("explicit? "+n),n}function vt(e,t){let n="";pT.debug(`evaluating ${e.length} versions`);for(let r=(e=e.sort(((e,t)=>wT.gt(e,t)?1:-1))).length-1;r>=0;r--){const o=e[r];if(wT.satisfies(o,t)){n=o;break}}return pT.debug(n?"matched: "+n:"match not found"),n}function wt(){const e=process.env.RUNNER_TOOL_CACHE||"";return _T.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function bt(){const e=process.env.RUNNER_TEMP||"";return _T.ok(e,"Expected RUNNER_TEMP to be defined"),e}function Et(e,t){const n=Vr[e];return void 0!==n?n:t}function _t(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const n={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return n.match&&!Array.isArray(n.match)&&(n.match=[n.match]),n.report&&n.report("Trying "+n.name+" #"+n.$current+" at "+(new Date).toLocaleTimeString(),n),new Promise((function(t,r){let o,i,s;n.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),r(new NT(n.name+" timed out",s))}),n.timeout)),Promise.resolve(e({current:n.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,n.report&&n.report(a&&""+a||a,n,a);var c=n.max>n.$current;if(!c)return r(a);if(c=0===n.match.length||n.match.some((function(e){return function(e,t){if("function"==typeof e)try{if(t instanceof e)return!0}catch(n){return!!e(t)}return e===""+t||e===t.message||e instanceof RegExp&&(e.test(t.message)||e.test(""+t))}(e,a)})),!c)return r(a);var l=n.backoffBase*Math.pow(n.backoffExponent,n.$current-1);n.$current++,n.report&&n.report(`Retrying ${n.name} (${n.$current})`,n),l?(n.report&&n.report(`Delaying retry of ${n.name} by ${l}`,n),i=setTimeout((function(){_t(e,n).then(t).catch(r)}),l)):_t(e,n).then(t).catch(r)}))}))}function St(e,t,n){switch(process.platform){case"win32":return Qe("7zip",e);case"darwin":return ze("p7zip",e);case"linux":if(Ke())return et("p7zip",e);if(Xe())return Ze([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(Ye())return Fe([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function Ot(e){const t=e.split(".").pop();return"tar"===t?0:"gz"===t||"tgz"===t?1:"xz"===t||"txz"===t?2:"zip"===t?3:("7z"===t||"exe"===t||v(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function xt(e,t){return await q(await async function(){return void 0===AT&&(null===tg.sync("7z",{nothrow:!0})&&await St("",0,process),AT="7z"),AT}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await ne(t),t}function Tt(e,t){return xt(e,t)}async function It(e,t){return null!==tg.sync("7z",{nothrow:!0})?xt(e,t):null!==tg.sync("unzip",{nothrow:!0})?(await q("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await ne(t),t):xt(e,t)}async function Rt(e,t,n=0,r=[]){await async function(e){switch(b("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(Ke()?(await et("gzip"),await et("tar")):Xe()?await Ze([{name:"gzip"},{name:"tar"}]):Ye()&&await Fe([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(Ke()?(await et("xz"),await et("tar")):Xe()?await Ze([{name:"xz"},{name:"tar"}]):Ye()&&await Fe([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(Ot(e));try{await ii(t)}catch{}try{await q("tar",["xf",e,"-C",t,"--strip-components="+n,...r],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&v(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await ne(t),t}async function Pt(e,t,n,r,o){var i,s;b(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=null!=(i=process.env.RUNNER_TEMP)?i:br.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:Sr.join(br.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:d}=await n(t,process.platform,o);if($T)try{const n=exports.find_1(e,t);if(n){const r=Sr.join(n,u),o=Sr.join(r,c);if(await he(Sr.join(o,l)))return b(`${e} ${t} was found in the cache at ${o}.`),await be(o,oR),{installDir:r,binDir:o}}}catch{}const p=Sr.join(r,u),f=Sr.join(p,c),h=Sr.join(f,l);return await async function(e,t,n,r,o,i,s,a){if((await Promise.all([he(e),he(t)])).includes(!1))try{const e=await async function(e,t,n){b(`Download ${e} ${t}`);const r=await CT((()=>{var e;const t=Sr.join(null!=(e=process.env.RUNNER_TEMP)?e:br.tmpdir(),`${Date.now()}-${Sr.basename(n)}`);return exports.downloadTool_1(n,t)}),{name:n,max:4,backoffBase:2e3,report:e=>b(e)});return r}(n,r,o);b(`Extracting ${e} to ${i}`);const t=null!=s?s:function(e){switch(e){case 0:case 1:case 2:return Rt;case 3:return It;default:return xt}}(Ot(o));await t(e,i)}catch(c){throw Error(`Failed to download ${n} ${r} ${a} from ${o}: ${c}`)}if(b(`Add ${e} to PATH`),await be(e,oR),!(await he(t)))throw Error(`Failed to find the binary ${t} after extracting ${n} ${r} ${a}`);if("win32"!==process.platform)try{await Wm(t,"755")}catch(c){v(`Failed to make ${t} executable: ${c}`)}}(f,h,e,t,a,r,d,o),await async function(e,t,n){$T&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==jn("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await exports.cacheDir_1(e,t,n))}(r,e,t),{installDir:p,binDir:f}}function Nt(e,t,n){var r;const o=null!=(r=qS(e))?r:e;switch(t){case"win32":{const t=CS(o,"v3.19.6");let r;Ux.includes(n)?r=t?"win64-x64":"windows-x86_64":Fx.includes(n)?r=t?"win32-x86":"windows-i386":Bx.includes(n)?r="windows-arm64":(b(`Trying unsupported arch '${n}' for cmake on Windows`),r="windows-"+n);const i=`cmake-${e}-${r}`;return{binRelativeDir:"bin/",binFileName:it("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${CS(o,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:it("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=CS(o,"v3.19.8");let r;Bx.includes(n)?r=t?"Linux-aarch64":"linux-aarch64":Ux.includes(n)?r=t?"Linux-x86_64":"linux-x86_64":(b(`Trying unsupported arch '${n}' for cmake on Linux`),r="linux-"+n);const i=`cmake-${e}-${r}`;return{binRelativeDir:"bin/",binFileName:it("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function Ct(e,t,n){return Pt("cmake",e,Nt,t,n)}async function At(e,t,n=YT){const r=await async function(e,t=YT){var n,r;try{const o=await KT.getExecOutput(e,["--version"]),i=null==(n=(o.stdout||o.stderr||"").trim().match(t))?void 0:n[1];return null!=(r=qS(i))?r:void 0}catch(o){return void console.error(o)}}(e,n);return void 0!==r&&""!==t&&-1!==pS(r,t)}function $t(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function Dt(e,t,n){const r=await async function(e,t,n){let r,o=await Lt(t);if(void 0!==o){const e=Sr.dirname(o);r={bin:o,installDir:e,binDir:e}}else{if(nI)try{b("Installing python in GitHub Actions");const{setupActionsPython:i}=await Promise.resolve().then((()=>require("./assets/actions_python-BOHOabo6.js")));if(await i(e,t,n),o=await Lt(t),void 0===o)throw Error("Python binary could not be found");const s=Sr.dirname(o);r={bin:o,installDir:s,binDir:s}}catch(i){v(""+i)}void 0===r&&(r=await async function(e,t){let n;switch(process.platform){case"win32":{e?await Qe("python3",t,["--params=/InstallDir:"+e]):await Qe("python3",t);const r=await Lt(e);if(void 0===r)throw Error("Python binary could not be found");const o=Sr.dirname(r);await be(o,oR),n={installDir:o,binDir:o,bin:r};break}case"darwin":{n=await ze("python3",t);const e=await q("brew",["--prefix","python"],{stdio:"pipe"}),r=Sr.join(e.stdout,"libexec","bin");await be(r,oR);break}case"linux":if(Ke())n=await et("python",t);else if(Xe())n=await Ze([{name:"python3",version:t}]);else{if(!Ye())throw Error("Unsupported linux distributions");n=await Fe([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return n}(t,e))}if(void 0===o||void 0===r.bin){if(o=await Lt(t),void 0===o)throw Error("Python binary could not be found");r={bin:o,installDir:Sr.dirname(o),binDir:Sr.dirname(o)}}return r}(e,t,n);Cr(void 0!==r.bin);const o=r.bin,i=await async function(e){const t=await Mt();return void 0===t?(b("pip was not found. Installing pip"),await async function(e){await Ut(e)||(await Xt("pip"),await Ut(e))}(e),Mt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await zt(e)))try{await qt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Xt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await q(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await async function(e){try{await qt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){v(`Failed to install venv: ${""+t}. Ignoring...`)}}(e)}catch(t){v(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await qt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await qt(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){v(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(o),r}async function Lt(e){for(const t of["python","python3"]){const n=await kt(t,e);if(void 0!==n)return n}if("win32"===process.platform){const e=Sr.parse(br.homedir()).root,t=(await ny(e)).filter((e=>e.startsWith("Python")));for(const n of t)for(const t of["python3","python"]){const r=await kt(t,Sr.join(e,n));if(void 0!==r)return r}}}async function kt(e,t){var n;try{if(void 0!==t){const n=Sr.join(t,it(e));if(await he(n)&&await At(n,eI))return n}const r=null!=(n=await tg(e,{nothrow:!0,all:!0}))?n:[];for(const e of r)if(await At(e,eI))return e}catch{}}async function Mt(){for(const e of["pip3","pip"]){const t=await jt(e);if(void 0!==t)return t}}async function jt(e){var t;try{const n=null!=(t=await tg(e,{nothrow:!0,all:!0}))?t:[];for(const e of n)if(await At(e,ZT))return e}catch{}}async function Ut(e){try{return await q(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){b(""+t);try{return await q(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(n){b(""+n)}}return!1}function Ft(e,t,n=null){var r;return Bt(t)&&"linux"===process.platform&&null!==n&&e in tI?function(e,t){const n=e[0],r=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>n>=e));return void 0===r?"":t[r]}(n,tI[e]):Bt(t)&&e in QT?null!=(r=QT[e])?r:"":"true"===t?"":null!=t?t:""}function Bt(e){return"true"===e||void 0===e}function Gt(){if(!("version"in br)||"function"!=typeof br.version)return null;const e=br.version().match(/(\d+)\.(\d+)\.(\d+)/);return null===e?null:[Number.parseInt(e[1],10),Number.parseInt(e[2],10),Number.parseInt(e[3],10)]}async function Ht(e,t,n={}){return qt(await async function(){return void 0!==uI||(uI=(await Dt(Ft("python",void 0,await aI()),"",process.arch)).bin),uI}(),e,t,n)}async function qt(e,t,n,r={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=r,c=o&&!a&&await zt(e),l=c?"pipx":"pip",u=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const n=await q(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==n.exitCode||"string"!=typeof n.stdout)return!1;const r=JSON.parse(n.stdout);if(t in r.venvs)return!0;for(const e of Object.values(r.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,u):await async function(e,t){try{return 0===(await q(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,u);if(t)return{binDir:c?await Vt():await Wt(e,u)}}const d=await async function(e,t){return 0===(await q(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,u);if(d)try{si.info(`Installing ${t} ${null!=n?n:""} via ${l}`);const r=void 0!==n&&""!==n?`${t}==${n}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],u=process.env;c&&i&&(u.PIPX_HOME=await cI(),u.PIPX_BIN_DIR=await lI()),V(e,["-m",l,...o,...a,r],{stdio:"inherit",env:u})}catch(p){if(si.info(`Failed to install ${t} via ${l}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await Xt(t))throw Error(`Failed to install ${t} via ${l}: ${p}.`)}else if(null===await Xt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);return{binDir:c?await Vt():await Wt(e,u)}}function Vt(){return lI()}async function Wt(e,t){const n=await rI(e),r=await async function(e,t){const n=(await Promise.all(e.map((e=>he(Sr.join(e,it(t))))))).findIndex((e=>e));if(-1!==n)return e[n];const r=tg.sync(it(t),{nothrow:!0});return null!==r?Sr.dirname(r):e[e.length-1]}(n,t);return await be(r,oR),r}async function zt(e){return 0===(await q(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Xt(e,t=!0){if("linux"===process.platform){if(si.info(`Installing ${e} via the system package manager`),Ke())return et(t?"python-"+e:e);if(Xe())return Ze([{name:t?"python3-"+e:e}]);if(Ye())return Fe([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return ze(e);return null}function Kt(e,t,n){return Ht("cmakelang[YAML]",e)}async function Yt(e,t,n){switch(process.platform){case"win32":return await Qe("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await be(e,oR),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return ze("graphviz",e);case"linux":if(Ke())return et("graphviz",e);if(Xe())return Ze([{name:"graphviz",version:e}]);if(Ye())return Fe([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Jt(e,t){const{ArchiveHdi:n}=await Promise.resolve().then((()=>require("./assets/hdi-Bqz5zNw7.js"))),r=new n(e);await r.read((async e=>{await e.extract(Sr.join(t,e.path))}))}function Qt(e,t,n){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:it("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:it("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.windows.x64.bin.zip`}}case"darwin":{const t="Doxygen-"+e;return{binRelativeDir:"Doxygen/Doxygen.app/Contents/Resources/",binFileName:it("doxygen"),extractedFolderName:t,extractFunction:Jt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Zt(){if("darwin"===process.platform)try{const e=await KT.getExecOutput("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ve("SDKROOT",t.trim(),oR):g("SDKROOT not set")}catch(e){g(e)}}async function en(){const e=Sr.join(yI,"gcc_matcher.json");if(!(await he(e)))return v("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");b("::add-matcher::"+e)}async function tn(e){const t=await ry(e,"utf-8");return JSON.parse(t)}function nn(e,t){var n;const r=Object.keys(e),o=new Map;if(void 0===t.filterMapTag)for(const c of r)o.set(c,c);else for(const c of r){const e=t.filterMapTag(c);void 0!==e&&o.set(e,c)}if(0===o.size)return;const i=null!=(n=t.versionSatisfies)?n:QS,s=function(e){if(null===eS(e))try{const t=qS(e);if(null!==t){const n=/^[<=>^~]/.test(t.version)?t.version:"^"+t.version;return b(`Coerced version '${e}' to '${n}'`),n}}catch(t){}return e}(t.version),a=[];for(const[c,l]of o.entries())i(c,s)&&a.push(l);if(0!==a.length)for(const c of a){let n=e[c];if(void 0===n)continue;if(void 0!==t.filterName&&(n=n.filter(t.filterName)),0===n.length)continue;const r=rn(c,n,t);if(void 0!==r)return r}}function rn(e,t,n){if(!(void 0!==n.keywords&&0!==n.keywords.length||void 0!==n.optionalKeywords&&0!==n.optionalKeywords.length))return{tag:e,name:t[0]};let r=[];if(void 0!==n.keywords&&0!==n.keywords.length)for(const o of t)n.keywords.every((e=>o.includes(e)))&&r.push(o);else r=t;if(0!==r.length){if(void 0!==n.optionalKeywords&&0!==n.optionalKeywords.length){const t=r.map((e=>{let t=0;for(const r of n.optionalKeywords)e.includes(r)&&t++;return t})),o=Math.max(...t);return{tag:e,name:r[t.indexOf(o)]}}return{tag:e,name:r[0]}}}async function on(e,t,n){let r;switch(process.platform){case"win32":"arm"!==n&&"arm64"!==n||(r=await Qe("gcc-arm-embedded",e));try{r=await Pt("g++",e,sn,t,n)}catch(o){b(`Failed to download g++ binary. ${o}. Falling back to chocolatey.`),r=await async function(e,t){var n,r;let o;if(await Qe("mingw",e),"x64"===t&&await he("C:/tools/mingw64/bin")?(o="C:/tools/mingw64/bin",await be(o,oR)):"ia32"===t&&await he("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await be(o,oR)):await he((null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(o=(null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin"),void 0!==o)return{binDir:o}}(e,n)}break;case"linux":if(Ke())r=await et("mingw-w64-gcc",e);else if(Xe())r=await Ze([{name:"mingw64-gcc",version:e}]);else{if(!Ye())throw Error("Unsupported Linux distro for "+n);r=await Fe([{name:"mingw-w64",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])}break;default:throw Error("Unsupported platform for "+n)}return void 0!==r&&await async function(e){const t=[];"win32"===process.platform&&t.push(ve("CC",it(e+"/gcc"),oR),ve("CXX",it(e+"/g++"),oR)),fI&&await en(),await Promise.all(t)}(r.binDir),r}async function sn(e,t,n){var r;if("win32"!==t)throw Error(`Unsupported platform '${t}'`);const o=await tn(Sr.join(hI,"github_brechtsanders_winlibs_mingw.json")),i=an(e),s=cn(e),a=ln(e),c=nn(o,{version:e,keywords:[null!=(r={x64:"x86_64",ia32:"i386"}[n])?r:n],filterName:e=>!(void 0!==i&&i!==an(e)||void 0!==s&&s!==cn(e)||void 0!==a&&a!==ln(e)),versionSatisfies:(e,t)=>{const n=qS(e);if(null===n)throw Error(`Invalid MinGW asset version: '${e}'`);return QS(n,t)&&(void 0===i||i===an(e))&&(void 0===s||s===cn(e))}});if(void 0===c)throw Error(`No asset found for version ${e} and arch ${n}`);return{binRelativeDir:"bin/",binFileName:it("g++"),extractedFolderName:"mingw64",extractFunction:xt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${c.tag}/${c.name}`}}function an(e){const t=e.match(/(ucrt|msvcrt)/);return null!==t?t[1]:void 0}function cn(e){const t=e.match(/(posix|mcf)/);return null!==t?t[1]:void 0}function ln(e){const t=e.match(/(seh|dwarf)/);return null!==t?t[1]:void 0}async function un(e,t,n,r=40){let o;switch(process.platform){case"win32":o=await on(e,t,n);break;case"darwin":o=await ze("gcc",e);break;case"linux":"x64"===n?Ke()?o=await et("gcc",e):Xe()?o=await Ze([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):Ye()&&(o=""===e?await Fe([{name:"gcc"},{name:"g++"}]):await Fe([{name:"gcc",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}},{name:"g++",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])):(b(`Install g++-multilib because gcc for ${n} was requested`),Ke()?o=await et("gcc-multilib",e):Ye()&&(o=""===e?await Fe([{name:"gcc-multilib"}]):await Fe([{name:"gcc-multilib",version:e,repository:"ppa:ubuntu-toolchain-r/test",key:{key:"1E9377A2BA9EF27F",fileName:"ubuntu-toolchain-r-test.gpg"}}])));break;default:throw Error("Unsupported platform for "+n)}if(void 0!==o)return await async function(e,t,n=40){var r;if("win32"===process.platform)return;const o=[];{let i=e;""===e&&(i=await async function(e,t){try{let n="gcc";if(await he(e+"/gcc"))n=e+"/gcc";else{const t=(await ny(e)).sort(((e,t)=>{var n,r,o,i;return function(e,t){const n=qS(e),r=qS(t);return null!==n&&null!==r?r.compare(n):t.localeCompare(e)}(null!=(r=null==(n=e.match(/^gcc-?(.*)(\.exe)?$/))?void 0:n[1])?r:"",null!=(i=null==(o=t.match(/^gcc-?(.*)(\.exe)?$/))?void 0:o[1])?i:"")}));for(const r of t)if(r.startsWith("gcc")){n=`${e}/${r}`;break}}const{stdout:r}=await q(n,["--version"],{stdio:"pipe"}),o=r.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(v("Failed to parse gcc version from: "+r),t)}catch(n){return g("Failed to get gcc version: "+n),t}}(t,i),b("Using gcc version "+i));const s=sS(null!=(r=qS(i))?r:i);5>s?(o.push(ve("CC",`${t}/gcc-${i}`,oR),ve("CXX",`${t}/g++-${i}`,oR)),Ye()&&o.push(Ce("cc",`${t}/gcc-${i}`,oR,n),Ce("cxx",`${t}/g++-${i}`,oR,n),Ce("gcc",`${t}/gcc-${i}`,oR,n),Ce("g++",`${t}/g++-${i}`,oR,n))):(o.push(ve("CC",`${t}/gcc-${s}`,oR),ve("CXX",`${t}/g++-${s}`,oR)),Ye()&&o.push(Ce("cc",`${t}/gcc-${s}`,oR,n),Ce("cxx",`${t}/g++-${s}`,oR,n),Ce("gcc",`${t}/gcc-${s}`,oR,n),Ce("g++",`${t}/g++-${s}`,oR,n)))}o.push(Zt()),mI&&await en(),await Promise.all(o)}(e,o.binDir,r),o}function dn(e){const t=eS(e),n=null!==t?sS(t):e;return ve("GCOV",""!==n?"gcov-"+n:"gcov",oR)}async function pn(e,t,n){const{keywords:r,optionalKeywords:o}=function(e,t){const n=[],r=[];switch(e){case"linux":n.push("linux"),Ux.includes(t)?(r.push("64"),r.push("x86_64")):(b(`Using arch ${t} for infer`),n.push(t));break;case"darwin":n.push("osx"),Ux.includes(t)?r.push("x86_64"):Bx.includes(t)?r.push("arm64"):(b(`Using arch ${t} for infer`),n.push(t));break;default:b(`Using ${e} ${t} for infer`),n.push(e,t)}return{keywords:n,optionalKeywords:r}}(t,n),i=nn(await tn(Sr.join(gI,"github_facebook_infer.json")),{version:e,keywords:r,optionalKeywords:o,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==i)return{url:`https://github.com/facebook/infer/releases/download/${i.tag}/${i.name}`,extractedFolderName:""+Sr.basename(i.name,".tar.xz"),binRelativeDir:"bin",binFileName:it("infer")};throw Error(`No asset found for version ${e} matching ${r} and ${o}`)}function fn(e,t,n){const r=function(e,t){switch(e){case"win32":return Ux.includes(t)||Fx.includes(t)?"win":Bx.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Ux.includes(t)||Fx.includes(t)?"linux":Bx.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,n);return{binRelativeDir:"",binFileName:it("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${r}.zip`}}function hn(e,t,n){return Pt("ninja",e,fn,t,n)}function mn(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:it("kcov")}}function yn(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:it("kcov"),extractFunction:gn}}async function gn(e,t){const n=await Rt(e,t,1),r=await async function(){let e=tg.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await Ct(Ft("cmake",void 0,await aI()),Sr.join(me("~"),"cmake"),"");e=Sr.join(t,"cmake")}return null===tg.sync("ninja",{nothrow:!0})&&await hn(Ft("ninja",void 0,await aI()),Sr.join(me("~"),"ninja"),""),e}();"linux"===process.platform&&(Ke()?await Promise.all([et("libdwarf"),et("libcurl-openssl")]):Xe()?await Ze([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):Ye()&&await Fe([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==tg.sync("patch",{nothrow:!0})){const e=Sr.join(vI,"gcc13.patch");await q("patch",["-N","-p1","-i",e],{cwd:n,stdio:"inherit"})}else b("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Sr.join(n,"build");return await q(r,["-S",n,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:n,stdio:"inherit"}),await q(r,["--build",o,"--config","Release"],{cwd:n,stdio:"inherit"}),n}async function vn(){"darwin"===process.platform&&(null!==await tg("clang",{nothrow:!0})&&null!==await tg("clang++",{nothrow:!0})&&(w("Assuming clang is an Apple Clang compiler"),await Promise.all([ve("CC","clang",oR),ve("CXX","clang++",oR)])),Ur.error("Apple Clang automatic installation is not supported yet"))}function wn(e){return Object.values(AI).includes(e)?e:e in AI?AI[e]:e}function bn(e){if(Object.keys(AI).includes(e))return e;for(const[t,n]of Object.entries(AI))if(n===e)return t;return e}function En(e){const t=wn(e);let n;if(t){const e=t.split(".")[0]+".9";n=`-version "${t},${e}"`}else n="-latest";let r=function(e,t){try{return(""+OI.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(n){SI.warning("vswhere failed: "+n)}return null}(0,n);if(r&&xI.existsSync(r))return SI.info("Found with vswhere: "+r),r;SI.info("Not found with vswhere");const o=e?[bn(e)]:CI;for(const i of PI)for(const e of o)for(const t of NI)if(r=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,SI.info("Trying standard location: "+r),xI.existsSync(r))return SI.info("Found standard location: "+r),r;if(SI.info("Not found in standard locations"),r=RI+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",xI.existsSync(r))return SI.info("Found VS 2015: "+r),r;throw SI.info("Not found in VS 2015 location: "+r),Error("Microsoft Visual Studio not found")}function _n(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function Sn(e,t,n,r,o,i,s){void 0!==t&&await he(t)&&(b(`Adding ${t} to PATH`),await ve("VCTargetsPath",t,oR)),await kI(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(n),o,r,i,s,e)}async function On(e,t,n,r,o,i,s,a=12e5){si.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:n,fallback:r,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof n||1!==Math.sign(n))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(_I(e)),e.addEventListener("abort",(()=>{c(_I(e))}))}if(n===1/0)return void e.then(a,c);const l=new wI;s=i.setTimeout.call(void 0,(()=>{if(r)try{a(r())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(l.message=null!=o?o:`Promise timed out after ${n} milliseconds`,c(l))}),n),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,n,r,o,i){const s=eR.includes(e);let a;if("vcvarsall"===e)await Sn(Ft(e,t,n),void 0,r,void 0,void 0,!1,!1);else if("brew"===e)a=await qe({rcOptions:oR});else{const i=Sr.join(o,s?"llvm":e),c=Ft(e,t,n),l=tR[e];a=await l(c,i,r)}i.push(Un(e,a))}(e,t,n,r,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){g(c),c instanceof Error&&void 0!==c.stack&&g(c.stack),s.push(e+" failed to install")}si.endGroup()}async function xn(e,t,n){const r=await async function(e,t,n){const{keywords:r,optionalKeywords:o}=await async function(e,t){const n=[],r=[];switch(e){case"win32":Ux.includes(t)?n.push("win64"):Fx.includes(t)?n.push("win32"):Bx.includes(t)?n.push("woa64"):(b(`Using arch ${t} for LLVM`),n.push(t));break;case"linux":if(n.push("linux"),Ye()){r.push("ubuntu");const e=await aI();if(null!==e){r.push(""+e[0]);const t=10>e[1]?"0"+e[1]:""+e[1];r.push(`${e[0]}.${t}`),r.push(`${e[0]}.${t}.${e[2]}`)}}else Xe()&&r.push("rhel");Ux.includes(t)?n.push("x86_64"):Fx.includes(t)?n.push("x86"):Bx.includes(t)?n.push("aarch64"):Gx.includes(t)?n.push("armv7a"):Hx.includes(t)?n.push("powerpc64le"):qx.includes(t)?n.push("sparc64"):(b(`Using arch ${t} for LLVM`),n.push(t));break;case"darwin":n.push("apple"),Ux.includes(t)?n.push("x86_64"):Bx.includes(t)?r.push("arm64"):(b(`Using arch ${t} for LLVM`),n.push(t));break;case"freebsd":n.push("freebsd"),Ux.includes(t)?n.push("amd64"):Fx.includes(t)?n.push("i386"):(b(`Using arch ${t} for LLVM`),n.push(t));break;default:b(`Using ${e} ${t} for LLVM`),n.push(e,t)}return{keywords:n,optionalKeywords:r}}(e,t),i=nn(await tn(Sr.join(jI,"github_llvm_llvm-project.json")),{version:n,keywords:r,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=nn(await tn(Sr.join(jI,"llvm_org_releases.json")),{version:n,keywords:r,optionalKeywords:o});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${n} matching ${r} and ${o}`)}(t,n,e);return b("Downloading LLVM from "+r),{url:r,extractedFolderName:"",binRelativeDir:"bin",binFileName:it("clang"),extractFunction:"win32"===t?Tt:(e,t)=>Rt(e,t,1)}}async function Tn(e,t,n){var r;const o=await BI(e,t,n);return await async function(e,t){var n,r;const o=null!=(n=process.env.LD_LIBRARY_PATH)?n:"",i=null!=(r=process.env.DYLD_LIBRARY_PATH)?r:"",s=Nn(t),a=[ve("CC",it(e+"/bin/clang"),oR),ve("CXX",it(e+"/bin/clang++"),oR),ve("LLVM_PATH",e,oR),ve("LD_LIBRARY_PATH",`${o}${Sr.delimiter}${e}/lib`,oR),ve("DYLD_LIBRARY_PATH",`${i}${Sr.delimiter}${e}/lib`,oR),ve("LLVM_LDFLAGS","-L"+$t(e+"/lib"),oR),ve("LLVM_CPPFLAGS","-I"+$t(e+"/include"),oR),await he(`${e}/lib/clang/${t}/include`)?ve("LLVM_CPATH",`${e}/lib/clang/${t}/include`,oR):await he(`${e}/lib/clang/${s}/include`)?ve("LLVM_CPATH",`${e}/lib/clang/${s}/include`,oR):Promise.resolve(),ve("LIBRARY_PATH",e+"/lib",oR),Zt()];if(Ye()){const t=60;a.push(Ce("cc",e+"/bin/clang",oR,t),Ce("cxx",e+"/bin/clang++",oR,t),Ce("clang",e+"/bin/clang",oR),Ce("clang++",e+"/bin/clang++",oR),Ce("lld",e+"/bin/lld",oR),Ce("ld.lld",e+"/bin/ld.lld",oR),Ce("llvm-ar",e+"/bin/llvm-ar",oR))}await Promise.all(a)}(null!=(r=o.installDir)?r:t,e),o}function In(e,t,n){return Pn(e,t,n,MI.ClangFormat)}function Rn(e,t,n){return Pn(e,t,n)}async function Pn(e,t,n,r=MI.All){const o=Nn(e);try{if(Ye())return await async function(e,t=0){const n="/usr/lib/llvm-"+e;await Fe([{name:"ca-certificates"}]);const r=new rx.DownloaderHelper("https://apt.llvm.org/llvm.sh",br.tmpdir(),{fileName:"llvm.sh"});r.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await r.start();const o=await ry(r.getDownloadPath(),"utf-8"),i=Sr.join(br.tmpdir(),"llvm-setup-cpp.sh"),s=await async function(e,t,n,r){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${sx} -y`)}(o),o=function(e,t,n){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+n):t}(r,o,n),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${sx} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const n=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await Um("dpkg",["-l",e],{env:Ae("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(n)&&(Ur.info("Removing conflicting package "+n),t=t.replace(e,""))}))),t}(o),o=function(e){return $e()?e.replace(/apt-get/g,"nala"):e}(o),await fy(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Fe(s),await Wm(i,"755"),await Q("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await be(n+"/bin",oR),{installDir:""+n,binDir:n+"/bin",bin:n+"/bin/clang++"}}(o,r)}catch(s){b("Failed to install llvm via system package manager "+s)}const i=await Pt("llvm",e,xn,t,n);return await GI(o),i}function Nn(e){const t=function(e){if(null===eS(e))try{const t=qS(e);if(null!==t)return b(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function Cn(){if(UI){const e=Sr.join(FI,"llvm_matcher.json");if(!(await he(e)))return v("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");b("::add-matcher::"+e)}}async function An(e,t,n,r,o,i){if("win32"!==process.platform)return;const s=$I(e);b(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=LI(s);l=!0,b("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Qe("visualcpp-build-tools","14.0.25420.1",["--ignore-dependencies"]),c="C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140"):"15.0"===s?(a="14.16",await Qe("visualstudio2017buildtools","15.9.41.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16"):"16.0"===s?(a="14.29",await Qe("visualstudio2019buildtools","16.11.7.0",[]),c="C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133"):"17.0"===s?(a=void 0,await Qe("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):g(`The given MSVC versions ${e} is not supported yet.`)}catch(u){g(u)}await Sn(s,c,n,a,r,o,i),qI&&await async function(){const e=Sr.join(VI,"msvc_matcher.json");if(!(await he(e)))return v("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");b("::add-matcher::"+e)}()}async function $n(e,t,n){if("win32"===process.platform)return await Qe("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await be(e,oR),e}()}}function Dn(e,t,n){return{url:Ln(t,n,e),binRelativeDir:"",binFileName:it("pwsh"),extractedFolderName:""}}function Ln(e,t,n){var r;switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${n}/PowerShell-${n}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${n}/powershell-${n}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${n}/powershell-${n}-${null!=(r={arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t])?r:"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function kn(e,t,n){try{return await Pt("pwsh",e,Dn,t,n)}catch(r){return g(`Failed to setup pwsh via download: ${r}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Qe("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await be(t,oR),{binDir:t}}case"darwin":return ze("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Ke())return et("powershell-bin",e,"yay");if(Xe())return await Ze([{name:"curl"}]),J("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),Ze([{name:"powershell",version:e}]);if(Ye()){await Fe([{name:"curl"}]);const t=await aI();return J("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),J("dpkg",["-i","packages-microsoft-prod.deb"]),Fe([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function Mn(e,t,n){const r=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(n),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:it("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${r}_${o}.${i}`}}function jn(e){const t=si.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function Un(e,t){let n=`${e} was installed successfully:`;return void 0===t||("installDir"in t&&(n+="\n- The installation directory is "+t.installDir),""!==t.binDir&&(n+="\n- The binary directory is "+t.binDir)),n}var Fn,Bn,Gn,Hn,qn,Vn,Wn,zn,Xn,Kn,Yn,Jn,Qn,Zn,er,tr,nr,rr,or,ir,sr,ar,cr,lr,ur,dr,pr,fr,hr=e=>{throw TypeError(e)},mr=(e,t,n)=>t.has(e)||hr("Cannot "+n),yr=(e,t,n)=>(mr(e,t,"read from private field"),n?n.call(e):t.get(e)),gr=(e,t,n)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),vr=(e,t,n,r)=>(mr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),wr=(e,t,n)=>(mr(e,t,"access private method"),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const br=require("os"),Er=require("crypto"),_r=require("fs"),Sr=require("path"),Or=require("http"),xr=require("https");require("net");const Tr=require("tls"),Ir=require("events"),Rr=require("util"),Pr=require("string_decoder"),Nr=require("child_process"),Cr=require("assert"),Ar=require("timers"),$r=require("buffer"),Dr=require("process"),Lr=require("url"),kr=require("stream"),Mr=require("tty"),jr=require("v8"),Ur=require("console");var Fr="undefined"!=typeof document?document.currentScript:null;const Br=e(_r),Gr=e(Or),Hr=e(xr),qr=e(kr);var Vr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Wr={};const zr=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}];!function(e){function t(e){return"string"==typeof e?!!r[e]:"env"in e?r[e.env]&&r[e.env].includes(e.includes):"any"in e?e.any.some((function(e){return!!r[e]})):Object.keys(e).every((function(t){return r[t]===e[t]}))}const n=zr,r=process.env;Object.defineProperty(e,"_vendors",{value:n.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,n.forEach((function(n){const o=(Array.isArray(n.env)?n.env:[n.env]).every((function(e){return t(e)}));if(e[n.constant]=o,o)switch(e.name=n.name,typeof n.pr){case"string":e.isPR=!!r[n.pr];break;case"object":e.isPR="env"in n.pr?n.pr.env in r&&r[n.pr.env]!==n.pr.ne:"any"in n.pr?n.pr.any.some((function(e){return!!r[e]})):t(n.pr);break;default:e.isPR=null}})),e.isCI=!("false"===r.CI||!(r.BUILD_ID||r.BUILD_NUMBER||r.CI||r.CI_APP_ID||r.CI_BUILD_ID||r.CI_BUILD_NUMBER||r.CI_NAME||r.CONTINUOUS_INTEGRATION||r.RUN_ID||e.name))}(Wr);const Xr=t(Wr);var Kr={},Yr={},Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.toCommandProperties=Jr.toCommandValue=void 0,Jr.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Jr.toCommandProperties=function(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}};var Qr=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Zr=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),eo=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&Qr(t,e,n);return Zr(t,e),t};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.issue=Yr.issueCommand=void 0;const to=eo(br),no=Jr;Yr.issueCommand=r,Yr.issue=function(e,t=""){r(e,{},t)};class ro{constructor(e,t,n){e||(e="missing.command"),this.command=e,this.properties=t,this.message=n}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let n=!0;for(const r in this.properties)if(this.properties.hasOwnProperty(r)){const o=this.properties[r];o&&(n?n=!1:e+=",",e+=`${r}=${t=o,(0,no.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+="::"+function(e){return(0,no.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var oo={},io=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),so=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ao=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&io(t,e,n);return so(t,e),t};Object.defineProperty(oo,"__esModule",{value:!0}),oo.prepareKeyValueMessage=oo.issueFileCommand=void 0;const co=ao(Er),lo=ao(_r),uo=ao(br),po=Jr;oo.issueFileCommand=function(e,t){const n=process.env["GITHUB_"+e];if(!n)throw Error("Unable to find environment variable for file command "+e);if(!lo.existsSync(n))throw Error("Missing file at path: "+n);lo.appendFileSync(n,`${(0,po.toCommandValue)(t)}${uo.EOL}`,{encoding:"utf8"})},oo.prepareKeyValueMessage=function(e,t){const n="ghadelimiter_"+co.randomUUID(),r=(0,po.toCommandValue)(t);if(e.includes(n))throw Error(`Unexpected input: name should not contain the delimiter "${n}"`);if(r.includes(n))throw Error(`Unexpected input: value should not contain the delimiter "${n}"`);return`${e}<<${n}${uo.EOL}${r}${uo.EOL}${n}`};var fo={};class ho extends URL{_decodedUsername;_decodedPassword;constructor(e,t){super(e,t),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var mo,yo={},go=Tr,vo=Or,wo=xr,bo=Ir,Eo=Rr;yo.httpOverHttp=function(e){var t=new i(e);return t.request=vo.request,t},yo.httpsOverHttp=function(e){var t=new i(e);return t.request=vo.request,t.createSocket=s,t.defaultPort=443,t},yo.httpOverHttps=function(e){var t=new i(e);return t.request=wo.request,t},yo.httpsOverHttps=function(e){var t=new i(e);return t.request=wo.request,t.createSocket=s,t.defaultPort=443,t},Eo.inherits(i,bo.EventEmitter),i.prototype.addRequest=function(e,t,n,r){var o=this,i=c({request:e},o.options,a(t,n,r));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function n(){o.emit("free",t,i)}function r(e){o.removeSocket(t),t.removeListener("free",n),t.removeListener("close",r),t.removeListener("agentRemove",r)}t.on("free",n),t.on("close",r),t.on("agentRemove",r),e.onSocket(t)})):o.requests.push(i)},i.prototype.createSocket=function(e,t){function n(n,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==n.statusCode?(mo("tunneling socket could not be established, statusCode=%d",n.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+n.statusCode)).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):a.length>0?(mo("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(o)):(mo("tunneling connection has established"),r.sockets[r.sockets.indexOf(o)]=i,t(i))}var r=this,o={};r.sockets.push(o);var i=c({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),mo("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,r){process.nextTick((function(){n(e,t,r)}))})),s.once("connect",n),s.once("error",(function(t){s.removeAllListeners(),mo("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=Error("tunneling socket could not be established, cause="+t.message);n.code="ECONNRESET",e.request.emit("error",n),r.removeSocket(o)})),s.end()},i.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,(function(e){n.request.onSocket(e)}))}},mo=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},yo.debug=mo;var _o,So,Oo,xo,To,Io=yo;(So=_o||(_o={}))[So.OK=200]="OK",So[So.MultipleChoices=300]="MultipleChoices",So[So.MovedPermanently=301]="MovedPermanently",So[So.ResourceMoved=302]="ResourceMoved",So[So.SeeOther=303]="SeeOther",So[So.NotModified=304]="NotModified",So[So.UseProxy=305]="UseProxy",So[So.SwitchProxy=306]="SwitchProxy",So[So.TemporaryRedirect=307]="TemporaryRedirect",So[So.PermanentRedirect=308]="PermanentRedirect",So[So.BadRequest=400]="BadRequest",So[So.Unauthorized=401]="Unauthorized",So[So.PaymentRequired=402]="PaymentRequired",So[So.Forbidden=403]="Forbidden",So[So.NotFound=404]="NotFound",So[So.MethodNotAllowed=405]="MethodNotAllowed",So[So.NotAcceptable=406]="NotAcceptable",So[So.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",So[So.RequestTimeout=408]="RequestTimeout",So[So.Conflict=409]="Conflict",So[So.Gone=410]="Gone",So[So.TooManyRequests=429]="TooManyRequests",So[So.InternalServerError=500]="InternalServerError",So[So.NotImplemented=501]="NotImplemented",So[So.BadGateway=502]="BadGateway",So[So.ServiceUnavailable=503]="ServiceUnavailable",So[So.GatewayTimeout=504]="GatewayTimeout",(xo=Oo||(Oo={})).Accept="accept",xo.ContentType="content-type",(To||(To={})).ApplicationJson="application/json";const Ro=[_o.MovedPermanently,_o.ResourceMoved,_o.SeeOther,_o.TemporaryRedirect,_o.PermanentRedirect],Po=[_o.BadGateway,_o.ServiceUnavailable,_o.GatewayTimeout],No=["OPTIONS","GET","DELETE","HEAD"];class Co extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Co.prototype)}statusCode;result}class Ao{constructor(e){this.message=e}message;async readBody(){return new Promise((async e=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])})),this.message.on("end",(()=>{e(""+t)}))}))}async readBodyBuffer(){return new Promise((async e=>{const t=[];this.message.on("data",(e=>{t.push(e)})),this.message.on("end",(()=>{e(Buffer.concat(t))}))}))}}class $o{userAgent;handlers;requestOptions;_ignoreSslError=!1;_socketTimeout;_allowRedirects=!0;_allowRedirectDowngrade=!1;_maxRedirects=50;_allowRetries=!1;_maxRetries=1;_agent;_proxyAgent;_proxyAgentDispatcher;_keepAlive=!1;_disposed=!1;constructor(e,t,n){this.userAgent=e,this.handlers=t||[],this.requestOptions=n,n&&(null!=n.ignoreSslError&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,null!=n.allowRedirects&&(this._allowRedirects=n.allowRedirects),null!=n.allowRedirectDowngrade&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),null!=n.maxRedirects&&(this._maxRedirects=Math.max(n.maxRedirects,0)),null!=n.keepAlive&&(this._keepAlive=n.keepAlive),null!=n.allowRetries&&(this._allowRetries=n.allowRetries),null!=n.maxRetries&&(this._maxRetries=n.maxRetries))}async options(e,t){return this.request("OPTIONS",e,null,t||{})}async get(e,t){return this.request("GET",e,null,t||{})}async del(e,t){return this.request("DELETE",e,null,t||{})}async post(e,t,n){return this.request("POST",e,t,n||{})}async patch(e,t,n){return this.request("PATCH",e,t,n||{})}async put(e,t,n){return this.request("PUT",e,t,n||{})}async head(e,t){return this.request("HEAD",e,null,t||{})}async sendStream(e,t,n,r){return this.request(e,t,n,r)}async getJson(e,t={}){t[Oo.Accept]=this._getExistingOrDefaultHeader(t,Oo.Accept,To.ApplicationJson);const n=await this.get(e,t);return this._processResponse(n,this.requestOptions)}async postJson(e,t,n={}){const r=JSON.stringify(t,null,2);n[Oo.Accept]=this._getExistingOrDefaultHeader(n,Oo.Accept,To.ApplicationJson),n[Oo.ContentType]=this._getExistingOrDefaultHeader(n,Oo.ContentType,To.ApplicationJson);const o=await this.post(e,r,n);return this._processResponse(o,this.requestOptions)}async putJson(e,t,n={}){const r=JSON.stringify(t,null,2);n[Oo.Accept]=this._getExistingOrDefaultHeader(n,Oo.Accept,To.ApplicationJson),n[Oo.ContentType]=this._getExistingOrDefaultHeader(n,Oo.ContentType,To.ApplicationJson);const o=await this.put(e,r,n);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,n={}){const r=JSON.stringify(t,null,2);n[Oo.Accept]=this._getExistingOrDefaultHeader(n,Oo.Accept,To.ApplicationJson),n[Oo.ContentType]=this._getExistingOrDefaultHeader(n,Oo.ContentType,To.ApplicationJson);const o=await this.patch(e,r,n);return this._processResponse(o,this.requestOptions)}async request(e,t,n,r){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,r);const s=this._allowRetries&&No.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,n),a&&a.message&&a.message.statusCode===_o.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,n):a}let t=this._maxRedirects;for(;a.message.statusCode&&Ro.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.protocol!==c.protocol&&!this._allowRedirectDowngrade)throw Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(await a.readBody(),c.hostname!==o.hostname)for(const e in r)"authorization"===e.toLowerCase()&&delete r[e];i=this._prepareRequest(e,c,r),a=await this.requestRaw(i,n),t--}if(!a.message.statusCode||!Po.includes(a.message.statusCode))return a;c+=1,s>c&&(await a.readBody(),await this._performExponentialBackoff(c))}while(s>c);return a}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}async requestRaw(e,t){return new Promise(((n,r)=>{this.requestRawWithCallback(e,t,(function(e,t){e?r(e):t?n(t):r(Error("Unknown error"))}))}))}requestRawWithCallback(e,t,n){function r(e,t){o||(o=!0,n(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{r(void 0,new Ao(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),r(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){r(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),n=o(t);if(n&&n.hostname)return await this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const r={};r.parsedUrl=t;const o="https:"===r.parsedUrl.protocol;r.httpModule=o?Hr:Gr;const i=o?443:80;if(r.options={},r.options.host=r.parsedUrl.hostname,r.options.port=r.parsedUrl.port?parseInt(r.parsedUrl.port):i,r.options.path=(r.parsedUrl.pathname||"")+(r.parsedUrl.search||""),r.options.method=e,r.options.headers=this._mergeHeaders(n),null!=this.userAgent&&(r.options.headers["user-agent"]=this.userAgent),r.options.agent=this._getAgent(r.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(r.options);return r}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},Do(this.requestOptions.headers),Do(e||{})):Do(e||{})}_getExistingOrDefaultHeader(e,t,n){let r;return this.requestOptions&&this.requestOptions.headers&&(r=Do(this.requestOptions.headers)[t]),e[t]||r||n}_getAgent(e){let t;const n=o(e),r=n&&n.hostname;if(this._keepAlive&&r&&(t=this._proxyAgent),r||(t=this._agent),t)return t;const i="https:"===e.protocol;let s=100;if(this.requestOptions&&(s=this.requestOptions.maxSockets||Gr.globalAgent.maxSockets),n&&n.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:{...(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`},host:n.hostname,port:n.port}};let r;const o="https:"===n.protocol;r=i?o?Io.httpsOverHttps:Io.httpsOverHttp:o?Io.httpOverHttps:Io.httpOverHttp,t=r(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=i?new Hr.Agent(e):new Gr.Agent(e),this._agent=t}return i&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}async _getProxyAgentDispatcher(e,t){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;const r="https:"===e.protocol;return n=new(await Promise.resolve().then((()=>require("./assets/proxy-agent-BtRxTz9r.js"))).then((e=>e.proxyAgent)))({uri:t.href,pipelining:this._keepAlive?1:0,...(t.username||t.password)&&{token:"Basic "+Buffer.from(`${t.username}:${t.password}`).toString("base64")}}),this._proxyAgentDispatcher=n,r&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}async _performExponentialBackoff(e){const t=5*Math.pow(2,e=Math.min(10,e));return new Promise((e=>setTimeout((()=>e()),t)))}async _processResponse(e,t){return new Promise((async(n,r)=>{const o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===_o.NotFound&&n(i);try{a=await e.readBody(),a&&a.length>0&&(s=t&&t.deserializeDates?JSON.parse(a,(function(e,t){if("string"==typeof t){const e=new Date(t);if(!isNaN(e.valueOf()))return e}return t})):JSON.parse(a),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new Co(e,o);t.result=i.result,r(t)}else n(i)}))}}const Do=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{}),Lo=n(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return Oo},HttpClient:$o,HttpClientError:Co,HttpClientResponse:Ao,get HttpCodes(){return _o},get MediaTypes(){return To},getProxyUrl:function(e){const t=o(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var ko,Mo={},jo=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.PersonalAccessTokenCredentialHandler=Mo.BearerCredentialHandler=Mo.BasicCredentialHandler=void 0,Mo.BasicCredentialHandler=class{constructor(e,t){this.username=e,this.password=t}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from(`${this.username}:${this.password}`).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return jo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Mo.BearerCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Bearer "+this.token}canHandleAuthentication(){return!1}handleAuthentication(){return jo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Mo.PersonalAccessTokenCredentialHandler=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(){return!1}handleAuthentication(){return jo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Uo,Fo,Bo={},Go={},Ho={},qo={},Vo={},Wo={},zo={};!function(e){function t(e){return(1&e.mode)>0||(8&e.mode)>0&&e.gid===process.getgid()||(64&e.mode)>0&&e.uid===process.getuid()}var n,r=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getCmdPath=e.tryGetExecutablePath=e.isRooted=e.isDirectory=e.exists=e.READONLY=e.UV_FS_O_EXLOCK=e.IS_WINDOWS=e.unlink=e.symlink=e.stat=e.rmdir=e.rm=e.rename=e.readlink=e.readdir=e.open=e.mkdir=e.lstat=e.copyFile=e.chmod=void 0;const a=i(_r),c=i(Sr);e.chmod=(n=a.promises).chmod,e.copyFile=n.copyFile,e.lstat=n.lstat,e.mkdir=n.mkdir,e.open=n.open,e.readdir=n.readdir,e.readlink=n.readlink,e.rename=n.rename,e.rm=n.rm,e.rmdir=n.rmdir,e.stat=n.stat,e.symlink=n.symlink,e.unlink=n.unlink,e.IS_WINDOWS="win32"===process.platform,e.UV_FS_O_EXLOCK=268435456,e.READONLY=a.constants.O_RDONLY,e.exists=function(t){return s(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(n){if("ENOENT"===n.code)return!1;throw n}return!0}))},e.isDirectory=function(t,n=!1){return s(this,void 0,void 0,(function*(){return(n?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){return t=t||"",e.IS_WINDOWS?(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\"):t.replace(/\/\/+/g,"/")}(t)))throw Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.tryGetExecutablePath=function(n,r){return s(this,void 0,void 0,(function*(){let o;try{o=yield e.stat(n)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${n}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(n).toUpperCase();if(r.some((t=>t.toUpperCase()===e)))return n}else if(t(o))return n;const i=n;for(const a of r){n=i+a,o=void 0;try{o=yield e.stat(n)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${n}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(n),r=c.basename(n).toUpperCase();for(const o of yield e.readdir(t))if(r===o.toUpperCase()){n=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${n}': ${s}`)}return n}if(t(o))return n}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(zo);var Xo=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Ko=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yo=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&Xo(t,e,n);return Ko(t,e),t},Jo=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.findInPath=Wo.which=ii=Wo.mkdirP=Wo.rmRF=Wo.mv=Wo.cp=void 0;const Qo=Cr,Zo=Yo(Sr),ei=Yo(zo);Wo.cp=function(e,t,n={}){return Jo(this,void 0,void 0,(function*(){const{force:r,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(n),s=(yield ei.exists(t))?yield ei.stat(t):null;if(s&&s.isFile()&&!r)return;const a=s&&s.isDirectory()&&i?Zo.join(t,Zo.basename(e)):t;if(!(yield ei.exists(e)))throw Error("no such file or directory: "+e);if((yield ei.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield f(e,a,0,r)}else{if(""===Zo.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield h(e,a,r)}}))},Wo.mv=function(e,t,n={}){return Jo(this,void 0,void 0,(function*(){if(yield ei.exists(t)){let r=!0;if((yield ei.isDirectory(t))&&(t=Zo.join(t,Zo.basename(e)),r=yield ei.exists(t)),r){if(null!=n.force&&!n.force)throw Error("Destination already exists");yield u(t)}}yield d(Zo.dirname(t)),yield ei.rename(e,t)}))},Wo.rmRF=u;var ti,ni,ri,oi,ii=Wo.mkdirP=d;Wo.which=function e(t,n){return Jo(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(n){const n=yield e(t,!1);if(!n)throw Error(ei.IS_WINDOWS?`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`:`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}const r=yield p(t);return r&&r.length>0?r[0]:""}))},Wo.findInPath=p;var si=y();const{GITHUB_ACTIONS:ai}=Xr,ci=(e,t)=>{const n=di(li(e));if("string"!=typeof n)throw new TypeError(`${t} must be a string or a file URL: ${n}.`);return n},li=e=>ui(e)?""+e:e,ui=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,di=e=>e instanceof URL?Lr.fileURLToPath(e):e,pi=(e,t=[],n={})=>{const r=ci(e,"First argument"),[o,i]=E(t)?[[],t]:[t,n];if(!Array.isArray(o))throw new TypeError("Second argument must be either an array of arguments or an options object: "+o);if(o.some((e=>"object"==typeof e&&null!==e)))throw new TypeError("Second argument must be an array of strings: "+o);const s=o.map(String),a=s.find((e=>e.includes("\0")));if(void 0!==a)throw new TypeError('Arguments cannot contain null bytes ("\\0"): '+a);if(!E(i))throw new TypeError("Last argument must be an options object: "+i);return[r,s,i]},{toString:fi}=Object.prototype,hi=e=>"[object Uint8Array]"===fi.call(e),mi=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),yi=new TextEncoder,gi=e=>yi.encode(e),vi=new TextDecoder,wi=e=>vi.decode(e),bi=e=>1===e.length&&hi(e[0])?e[0]:_i(Ei(e)),Ei=e=>e.map((e=>"string"==typeof e?gi(e):e)),_i=e=>{const t=new Uint8Array(Si(e));let n=0;for(const r of e)t.set(r,n),n+=r.length;return t},Si=e=>{let t=0;for(const n of e)t+=n.length;return t},Oi=({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}=xi(o,e.raw[r]),c=Ri(n,i,s);if(r===t.length)return c;const l=t[r],u=Array.isArray(l)?l.map((e=>Pi(e))):[Pi(l)];return Ri(c,u,a)},xi=(e,t)=>{var n;if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let o=0;const i=Ti.has(t[0]);for(let a=0,c=0;e.length>a;a+=1,c+=1){const i=t[c];if(Ti.has(i))o!==a&&r.push(e.slice(o,a)),o=a+1;else if("\\"===i){const e=t[c+1];"u"===e&&"{"===t[c+2]?c=t.indexOf("}",c+3):c+=null!=(n=Ii[e])?n:1}}const s=o===e.length;return s||r.push(e.slice(o)),{nextTokens:r,leadingWhitespaces:i,trailingWhitespaces:s}},Ti=new Set([" ","\t","\r","\n"]),Ii={x:3,u:5},Ri=(e,t,n)=>n||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Pi=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return e+"";if(E(e)&&("stdout"in e||"isMaxBuffer"in e))return Ni(e);if(e instanceof Nr.ChildProcess||"[object Promise]"==={}.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`)},Ni=({stdout:e})=>{if("string"==typeof e)return e;if(hi(e))return wi(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`)},Ci=e=>Ai.includes(e),Ai=[Dr.stdin,Dr.stdout,Dr.stderr],$i=["stdin","stdout","stderr"],Di=e=>{var t;return null!=(t=$i[e])?t:`stdio[${e}]`},Li=(e,t)=>{const n=Array.from({length:ki(e)+1}),r=Mi(e[t],n,t);return qi(r,t)},ki=({stdio:e})=>Array.isArray(e)?Math.max(e.length,$i.length):$i.length,Mi=(e,t,n)=>E(e)?ji(e,t,n):t.fill(e),ji=(e,t,n)=>{for(const r of Object.keys(e).sort(Ui))for(const o of Bi(r,n,t))t[o]=e[r];return t},Ui=(e,t)=>Fi(e)<Fi(t)?1:-1,Fi=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Bi=(e,t,n)=>{if("ipc"===e)return[n.length-1];const r=Gi(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]},Gi=e=>{if("all"===e)return e;if($i.includes(e))return $i.indexOf(e);const t=Hi.exec(e);return null!==t?Number(t[1]):void 0},Hi=/^fd(\d+)$/,qi=(e,t)=>e.map((e=>void 0===e?Vi[t]:e)),Vi={lines:!1,buffer:!0,maxBuffer:1e8,verbose:Rr.debuglog("execa").enabled?"full":"none",stripFinalNewline:!0},Wi=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],zi=(e,t)=>"ipc"===t?e.at(-1):e[t],Xi=({verbose:e},t)=>"none"!==Yi(e,t),Ki=({verbose:e},t)=>!["none","short"].includes(Yi(e,t)),Yi=(e,t)=>void 0===t?Ji(e):zi(e,t),Ji=e=>{var t;return null!=(t=e.find((e=>Qi(e))))?t:Zi.findLast((t=>e.includes(t)))},Qi=e=>"function"==typeof e,Zi=["none","short","full"],es=e=>Rr.stripVTControlCharacters(e).split("\n").map((e=>ts(e))).join("\n"),ts=e=>e.replaceAll(rs,(e=>ns(e))),ns=e=>{const t=os[e];if(void 0!==t)return t;const n=e.codePointAt(0),r=n.toString(16);return n>is?"\\U"+r:"\\u"+r.padStart(4,"0")},rs=(()=>{try{return RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),os={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},is=65535,ss=/^[\w./-]+$/,as={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"",ellipsis:"…",pointerSmall:"",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"",lineDashed13:"",lineDashed14:"",lineDashed15:"",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"",lineBackslash:"╲",lineSlash:""},cs={...as,tick:"✔",info:"",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},ls={...as,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},us=function(){const{env:e}=Dr,{TERM:t,TERM_PROGRAM:n}=e;return"win32"!==Dr.platform?"linux"!==t:!!e.WT_SESSION||!!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}()?cs:ls,ds=null!=(Hn=null==(Gn=null==(Bn=null==(Fn=null==Mr?void 0:Mr.WriteStream)?void 0:Fn.prototype)?void 0:Bn.hasColors)?void 0:Gn.call(Bn))&&Hn,ps=(e,t)=>{if(!ds)return e=>e;const n=`[${e}m`,r=`[${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}},fs=ps(1,22),hs=ps(90,39),ms=ps(91,39),ys=ps(93,39),gs=(e,t)=>(e+"").padStart(t,"0"),vs=({failed:e,reject:t})=>e?t?us.cross:us.warning:us.tick,ws={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:vs,duration:vs},bs=e=>e,Es={command:()=>fs,output:()=>bs,ipc:()=>bs,error:({reject:e})=>e?ms:ys,duration:()=>hs},_s=(e,t,n)=>{if(void 0===n)return e;const r=n(e,t);return"string"==typeof r?r:void 0},Ss=e=>e.endsWith("\n")?e:e+"\n",Os=({type:e,verboseMessage:t,fdNumber:n,verboseInfo:r,result:o})=>{const i=xs({type:e,result:o,verboseInfo:r}),s=((e,t,n)=>{const r=(({verbose:e},t)=>{const n=Yi(e,t);return Qi(n)?n:void 0})(t,n);return e.map((({verboseLine:e,verboseObject:t})=>_s(e,t,r))).filter((e=>void 0!==e)).map((e=>Ss(e))).join("")})(Ts(t,i),r,n);_r.writeFileSync(Rs,s)},xs=({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}),Ts=(e,t)=>e.split("\n").map((e=>Is({...t,message:e}))),Is=e=>({verboseLine:(({type:e,message:t,timestamp:n,piped:r,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=(e=>`${gs(e.getHours(),2)}:${gs(e.getMinutes(),2)}:${gs(e.getSeconds(),2)}.${gs(e.getMilliseconds(),3)}`)(n),c=ws[e]({failed:i,reject:s,piped:r}),l=Es[e]({reject:s});return`${hs(`[${a}]`)} ${hs(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),Rs=2,Ps=e=>{const t="string"==typeof e?e:Rr.inspect(e);return es(t).replaceAll("\t"," ".repeat(Ns))},Ns=2,Cs=e=>Xi({verbose:e})?As++:void 0;let As=0n;const $s=()=>Dr.hrtime.bigint(),Ds=e=>Number(Dr.hrtime.bigint()-e)/1e6,Ls=(e,t,n)=>{const r=$s(),{command:o,escapedCommand:i}=((e,t)=>{const n=[e,...t];return{command:n.join(" "),escapedCommand:n.map((e=>{return t=ts(e),ss.test(t)?t:"win32"===Dr.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(!Zi.includes(t)&&!Qi(t)){const e=Zi.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:Cs(e),rawOptions:n}))(Li(n,"verbose"),i,{...n});return((e,t)=>{Xi(t)&&Os({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:r,verboseInfo:s}};var ks,Ms,js,Us,Fs,Bs={exports:{}};Fs="win32"===process.platform||Vr.TESTING_WINDOWS?function(){function e(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;n.length>r;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function t(t,r,o){n.stat(t,(function(n,i){o(n,!n&&e(i,t,r))}))}if(Ms)return ks;Ms=1,ks=t,t.sync=function(t,r){return e(n.statSync(t),t,r)};var n=_r;return ks}():function(){function e(e,r,o){n.stat(e,(function(e,n){o(e,!e&&t(n,r))}))}function t(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=a|c;return n&parseInt("001",8)||n&c&&o===s||n&a&&r===i||n&l&&0===i}(e,t)}if(Us)return js;Us=1,js=e,e.sync=function(e,r){return t(n.statSync(e),r)};var n=_r;return js}();var Gs=_;_.sync=function(e,t){try{return Fs.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||"EACCES"===n.code)return!1;throw n}};const Hs="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,qs=Sr,Vs=Hs?";":":",Ws=Gs,zs=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Xs=(e,t)=>{const n=t.colon||Vs,r=e.match(/\//)||Hs&&e.match(/\\/)?[""]:[...Hs?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=Hs?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Hs?o.split(n):[""];return Hs&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:o}},Ks=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:o,pathExtExe:i}=Xs(e,t),s=[],a=n=>new Promise(((o,i)=>{if(n===r.length)return t.all&&s.length?o(s):i(zs(e));const a=r[n],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=qs.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(d,n,0))})),c=(e,n,r)=>new Promise(((l,u)=>{if(r===o.length)return l(a(n+1));const d=o[r];Ws(e+d,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return l(e+d);s.push(e+d)}return l(c(e,n,r+1))}))}));return n?a(0).then((e=>n(null,e)),n):a(0)};var Ys=Ks;Ks.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:o}=Xs(e,t),i=[];for(let a=0;n.length>a;a++){const c=n[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=qs.join(l,e),d=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;r.length>e;e++){const n=d+r[e];try{if(Ws.sync(n,{pathExt:o})){if(!t.all)return n;i.push(n)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw zs(e)};var Js={exports:{}};const Qs=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Js.exports=Qs,Js.exports.default=Qs;const Zs=Sr,ea=Ys,ta=Js.exports;var na={};const ra=/([()\][%!^"`<>&|;, *?])/g;na.command=function(e){return e.replace(ra,"^$1")},na.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(ra,"^$1"),t&&(e=e.replace(ra,"^$1")),e};const oa=/^#!(.*)/,ia=_r,sa=Sr,aa=function(e){return S(e)||S(e,!0)},ca=na,la=function(e){const t=Buffer.alloc(150);let n;try{n=ia.openSync(e,"r"),ia.readSync(n,t,0,150,0),ia.closeSync(n)}catch(r){}return((e="")=>{const t=e.match(oa);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?r:r?`${o} ${r}`:o})(""+t)},ua="win32"===process.platform,da=/\.(?:com|exe)$/i,pa=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,fa="win32"===process.platform,ha=Nr,ma=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:function(e){if(!ua)return e;const t=function(e){e.file=aa(e);const t=e.file&&la(e.file);return t?(e.args.unshift(e.file),e.command=t,aa(e)):e.file}(e),n=!da.test(t);if(e.options.forceShell||n){const n=pa.test(t);e.command=sa.normalize(e.command),e.command=ca.command(e.command),e.args=e.args.map((e=>ca.argument(e,n)));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(r)},ya={hookChildProcess:function(e,t){if(!fa)return;const n=e.emit;e.emit=function(r,o){if("exit"===r){const r=x(o,t);if(r)return n.call(e,"error",r)}return n.apply(e,arguments)}},verifyENOENT:x,verifyENOENTSync:function(e,t){return fa&&1===e&&!t.file?O(t.original,"spawnSync"):null},notFoundError:O};Bs.exports=T,Bs.exports.spawn=T,Bs.exports.sync=function(e,t,n){const r=ma(e,t,n),o=ha.spawnSync(r.command,r.args,r.options);return o.error=o.error||ya.verifyENOENTSync(o.status,r),o},Bs.exports._parse=ma,Bs.exports._enoent=ya;const ga=t(Bs.exports);Rr.promisify(Nr.execFile);const va=({env:e=Dr.env,...t}={})=>{const n=I({env:e={...e}});return t.path=e[n],e[n]=(({cwd:e=Dr.cwd(),path:t=Dr.env[I()],preferLocal:n=!0,execPath:r=Dr.execPath,addExecPath:o=!0}={})=>{const i=Sr.resolve(R(e)),s=[],a=t.split(Sr.delimiter);return n&&((e,t,n)=>{for(const r of function(e){return{*[Symbol.iterator](){let t,n=Sr.resolve(R(e));for(;t!==n;)yield n,t=n,n=Sr.resolve(n,"..")}}}(n)){const n=Sr.join(r,"node_modules/.bin");t.includes(n)||e.push(n)}})(s,a,i),o&&((e,t,n,r)=>{const o=Sr.resolve(r,R(n),"..");t.includes(o)||e.push(o)})(s,a,r,i),""===t||t===Sr.delimiter?`${s.join(Sr.delimiter)}${t}`:[...s,t].join(Sr.delimiter)})(t),e};var wa={};!function(e){function t(e){delete l[e]}function n(e){if(u)setTimeout(n,0,e);else{var r=l[e];if(r){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(r)}finally{t(e),u=!1}}}}if(!e.setImmediate){var r,o,i,s,a,c=1,l={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){process.nextTick((function(){n(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&n(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){n(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){n(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(n,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),n=0;t.length>n;n++)t[n]=arguments[n+1];return l[c]={callback:e,args:t},r(c),c++},p.clearImmediate=t}}("undefined"==typeof self?Vr:self);var ba=void 0!==Vr&&Vr||"undefined"!=typeof self&&self||window,Ea=function(){}.apply,_a=wa.setTimeout=function(){return new P(Ea.call(setTimeout,ba,arguments),clearTimeout)};wa.setInterval=function(){return new P(Ea.call(setInterval,ba,arguments),clearInterval)},wa.clearTimeout=wa.clearInterval=function(e){e&&e.close()},P.prototype.unref=P.prototype.ref=function(){},P.prototype.close=function(){this._clearFn.call(ba,this._id)},wa.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},wa.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},wa._unrefActive=wa.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0>t||(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))};var Sa=wa.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==Vr&&Vr.setImmediate||Vr&&Vr.setImmediate;wa.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==Vr&&Vr.clearImmediate||Vr&&Vr.clearImmediate;class Oa extends Error{}const xa=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Ta,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Ta=Symbol(),Ia=e=>"[object Error]"==={}.toString.call(e);class Ra extends Error{}xa(Ra,Ra.name);class Pa extends Error{}xa(Pa,Pa.name);const Na=(e,t)=>({name:"SIGRT"+(t+1),number:Ca+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ca=34,Aa=[{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"}],$a=()=>{const e=Array.from({length:64-Ca+1},Na);return[...Aa,...e].map(Da)},Da=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=br.constants,a=void 0!==s;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:o,standard:i}},La=({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}],ka=(()=>{const e=$a();return Object.fromEntries(e.map(La))})(),Ma=(e,t)=>{const n=t.find((({name:t})=>br.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))};(()=>{const e=$a(),t=Array.from({length:65},((t,n)=>((e,t)=>{const n=Ma(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)})();const ja=e=>0===e?e:Ua(e,"`subprocess.kill()`'s argument"),Ua=(e,t)=>{if(Number.isInteger(e))return Fa(e,t);if("string"==typeof e)return Ga(e,t);throw new TypeError(`Invalid ${t} ${e+""}: it must be a string or an integer.\n${Ha()}`)},Fa=(e,t)=>{if(Ba.has(e))return Ba.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${Ha()}`)},Ba=new Map(Object.entries(br.constants.signals).reverse().map((([e,t])=>[t,e]))),Ga=(e,t)=>{if(e in br.constants.signals)return e;if(e.toUpperCase()in br.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${Ha()}`)},Ha=()=>`Available signal names: ${qa()}.\nAvailable signal numbers: ${Va()}.`,qa=()=>Object.keys(br.constants.signals).sort().map((e=>`'${e}'`)).join(", "),Va=()=>[...new Set(Object.values(br.constants.signals).sort(((e,t)=>e-t)))].join(", "),Wa=e=>ka[e].description,za=({kill:e,options:{forceKillAfterDelay:t,killSignal:n},onInternalError:r,context:o,controller:i},s,a)=>{const{signal:c,error:l}=Xa(s,a,n);Ka(l,r);const u=e(c);return Ya({kill:e,signal:c,forceKillAfterDelay:t,killSignal:n,killResult:u,context:o,controller:i}),u},Xa=(e,t,n)=>{const[r=n,o]=Ia(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: "+r);if(void 0!==o&&!Ia(o))throw new TypeError("The second argument is optional. If specified, it must be an error instance: "+o);return{signal:ja(r),error:o}},Ka=(e,t)=>{void 0!==e&&t.reject(e)},Ya=async({kill:e,signal:t,forceKillAfterDelay:n,killSignal:r,killResult:o,context:i,controller:s})=>{t===r&&o&&Ja({kill:e,forceKillAfterDelay:n,context:i,controllerSignal:s.signal})},Ja=async({kill:e,forceKillAfterDelay:t,context:n,controllerSignal:r})=>{if(!1!==t)try{await _a(t,void 0,{signal:r}),e("SIGKILL")&&(null!=n.isForcefullyTerminated||(n.isForcefullyTerminated=!0))}catch{}},Qa=async(e,t)=>{e.aborted||await Ir.once(e,"abort",{signal:t})},Za=({subprocess:e,cancelSignal:t,gracefulCancel:n,context:r,controller:o})=>void 0===t||n?[]:[ec(e,t,r,o)],ec=async(e,t,n,{signal:r})=>{throw await Qa(t,r),null!=n.terminationReason||(n.terminationReason="cancel"),e.kill(),t.reason},tc=({methodName:e,isSubprocess:t,ipc:n,isConnected:r})=>{nc(e,t,n),rc(e,t,r)},nc=(e,t,n)=>{if(!n)throw Error(ac(e,t)+" can only be used if the `ipc` option is `true`.")},rc=(e,t,n)=>{if(!n)throw Error(`${ac(e,t)} cannot be used: the ${lc(t)} has already exited or disconnected.`)},oc=(e,t)=>Error(`${ac("sendMessage",t)} failed when sending an acknowledgment response to the ${lc(t)}.`,{cause:e}),ic=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),sc=["could not be cloned","circular structure","call stack size exceeded"],ac=(e,t,n="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${cc(t)}${e}(${n})`,cc=e=>e?"":"subprocess.",lc=e=>e?"parent process":"subprocess",uc=e=>{e.connected&&e.disconnect()},dc=()=>{const e={},t=new Promise(((t,n)=>{Object.assign(e,{resolve:t,reject:n})}));return Object.assign(t,e)},pc=(e,t="stdin")=>{const n=!0,{options:r,fileDescriptors:o}=hc.get(e),i=mc(o,t,n),s=e.stdio[i];if(null===s)throw new TypeError(vc(i,t,r,n));return s},fc=(e,t="stdout")=>{const n=!1,{options:r,fileDescriptors:o}=hc.get(e),i=mc(o,t,n),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(vc(i,t,r,n));return s},hc=new WeakMap,mc=(e,t,n)=>{const r=yc(t,n);return gc(r,t,n,e),r},yc=(e,t)=>{const n=Gi(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(`"${Ec(t)}" must not be "${e}".\nIt must be ${r} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},gc=(e,t,n,r)=>{const o=r[bc(e)];if(void 0===o)throw new TypeError(`"${Ec(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(`"${Ec(n)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&n)throw new TypeError(`"${Ec(n)}" must not be ${t}. It must be a writable stream, not readable.`)},vc=(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}=wc(e,n);return`The "${o}: ${_c(i)}" option is incompatible with using "${Ec(r)}: ${_c(t)}".\nPlease set this option with "pipe" instead.`},wc=(e,{stdin:t,stdout:n,stderr:r,stdio:o})=>{const i=bc(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]}},bc=e=>"all"===e?1:e,Ec=e=>e?"to":"from",_c=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?""+e:"Stream",Sc=(e,t,n)=>{const r=e.getMaxListeners();0!==r&&r!==1/0&&(e.setMaxListeners(r+t),Ir.addAbortListener(n,(()=>{e.setMaxListeners(e.getMaxListeners()-t)})))},Oc=(e,t)=>{t&&xc(e)},xc=e=>{e.refCounted()},Tc=(e,t)=>{t&&Ic(e)},Ic=e=>{e.unrefCounted()},Rc=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r},o)=>{if(jc(o)||nl(o))return;Nc.has(e)||Nc.set(e,[]);const i=Nc.get(e);if(i.push(o),1>=i.length)for(;i.length>0;){await qc(e,r,o),await wa.scheduler.yield();const s=await Mc({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r});i.shift(),r.emit("message",s),r.emit("message:done")}},Pc=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r,boundOnMessage:o})=>{ol();const i=Nc.get(e);for(;(null==i?void 0:i.length)>0;)await Ir.once(r,"message:done");e.removeListener("message",o),((e,t)=>{t&&(xc(e),xc(e))})(t,n),r.connected=!1,r.emit("disconnect")},Nc=new WeakMap,Cc=(e,t,n)=>{if(Ac.has(e))return Ac.get(e);const r=new Ir.EventEmitter;return r.connected=!0,Ac.set(e,r),$c({ipcEmitter:r,anyProcess:e,channel:t,isSubprocess:n}),r},Ac=new WeakMap,$c=({ipcEmitter:e,anyProcess:t,channel:n,isSubprocess:r})=>{const o=Rc.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e});t.on("message",o),t.once("disconnect",Pc.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Ic(e),Ic(e))})(n,r)},Dc=e=>{const t=Ac.get(e);return void 0===t?null!==e.channel:t.connected};let Lc=0n;const kc=(e,t)=>{if((null==t?void 0:t.type)===Gc&&!t.hasListeners)for(const{id:n}of e)void 0!==n&&Fc[n].resolve({isDeadlock:!0,hasListeners:!1})},Mc=async({wrappedMessage:e,anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:o})=>{if((null==e?void 0:e.type)!==Gc||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:Hc,message:Wc(t,o)};try{await Xc({anyProcess:t,channel:n,isSubprocess:r,ipc:!0},a)}catch(c){o.emit("strict:error",c)}return s},jc=e=>{var t;if((null==e?void 0:e.type)!==Hc)return!1;const{id:n,message:r}=e;return null==(t=Fc[n])||t.resolve({isDeadlock:!1,hasListeners:r}),!0},Uc=async(e,t,n)=>{if((null==e?void 0:e.type)!==Gc)return;const r=dc();Fc[e.id]=r;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([r,Bc(t,n,o)]);e&&(e=>{throw Error(`${ac("sendMessage",e)} failed: the ${lc(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${ac("getOneMessage",e)},\n\t${ac("sendMessage",e,"message, {strict: true}")},\n]);`)})(n),i||(e=>{throw Error(`${ac("sendMessage",e)} failed: the ${lc(e)} is not listening to incoming messages.`)})(n)}finally{o.abort(),delete Fc[e.id]}},Fc={},Bc=async(e,t,{signal:n})=>{Sc(e,1,n),await Ir.once(e,"disconnect",{signal:n}),(e=>{throw Error(`${ac("sendMessage",e)} failed: the ${lc(e)} exited without listening to incoming messages.`)})(t)},Gc="execa:ipc:request",Hc="execa:ipc:response",qc=async(e,t,n)=>{for(var r;!Wc(e,t)&&(null==(r=Vc.get(e))?void 0:r.size)>0;){const t=[...Vc.get(e)];kc(t,n),await Promise.all(t.map((({onMessageSent:e})=>e)))}},Vc=new WeakMap,Wc=(e,t)=>t.listenerCount("message")>zc(e),zc=e=>hc.has(e)&&!zi(hc.get(e).options.buffer,"ipc")?1:0,Xc=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},o,{strict:i=!1}={})=>{const s="sendMessage";return tc({methodName:s,isSubprocess:n,ipc:r,isConnected:e.connected}),Kc({anyProcess:e,channel:t,methodName:s,isSubprocess:n,message:o,strict:i})},Kc=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=Cc(e,t,n),s=Wc(e,i);return{id:Lc++,type:Gc,message:r,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:r,message:o,strict:i}),a=((e,t,n)=>{Vc.has(e)||Vc.set(e,new Set);const r=Vc.get(e),o={onMessageSent:dc(),id:n?t.id:void 0};return r.add(o),{outgoingMessages:r,outgoingMessage:o}})(e,s,i);try{await Yc({anyProcess:e,methodName:n,isSubprocess:r,wrappedMessage:s,message:o})}catch(c){throw uc(e),c}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},Yc=async({anyProcess:e,methodName:t,isSubprocess:n,wrappedMessage:r,message:o})=>{const i=Jc(e);try{await Promise.all([Uc(r,e,n),i(r)])}catch(s){throw(({error:e,methodName:t,isSubprocess:n})=>{if("EPIPE"===e.code)throw Error(`${ac(t,n)} cannot be used: the ${lc(n)} is disconnecting.`,{cause:e})})({error:s,methodName:t,isSubprocess:n}),(({error:e,methodName:t,isSubprocess:n,message:r})=>{if((({code:e,message:t})=>ic.has(e)||sc.some((e=>t.includes(e))))(e))throw Error(`${ac(t,n)}'s argument type is invalid: the message cannot be serialized: ${r+""}.`,{cause:e})})({error:s,methodName:t,isSubprocess:n,message:o}),s}},Jc=e=>{if(Qc.has(e))return Qc.get(e);const t=Rr.promisify(e.send.bind(e));return Qc.set(e,t),t},Qc=new WeakMap,Zc=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>(await el({anyProcess:e,channel:t,isSubprocess:n,ipc:r}),il.signal),el=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>{tl||(tl=!0,r?null!==t?(Cc(e,t,n),await wa.scheduler.yield()):ol():(()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let tl=!1;const nl=e=>(null==e?void 0:e.type)===rl&&(il.abort(e.message),!0),rl="execa:ipc:cancel",ol=()=>{il.abort(Error(`\`cancelSignal\` aborted: the ${lc(!0)} disconnected.`))},il=new AbortController,sl=({subprocess:e,cancelSignal:t,gracefulCancel:n,forceKillAfterDelay:r,context:o,controller:i})=>n?[al({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:o,controller:i})]:[],al=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:r,controller:{signal:o}})=>{await Qa(t,o);const i=cl(t);throw await((e,t)=>{const n="cancelSignal";return rc(n,!1,e.connected),Yc({anyProcess:e,methodName:n,isSubprocess:!1,wrappedMessage:{type:rl,message:t},message:t})})(e,i),Ja({kill:e.kill,forceKillAfterDelay:n,context:r,controllerSignal:o}),null!=r.terminationReason||(r.terminationReason="gracefulCancel"),t.reason},cl=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},ll=(e,t,n,r)=>0===t||void 0===t?[]:[ul(e,t,n,r)],ul=async(e,t,n,{signal:r})=>{throw await _a(t,void 0,{signal:r}),null!=n.terminationReason||(n.terminationReason="timeout"),e.kill(),new Oa},dl={advanced:e=>{try{jr.serialize(e)}catch(t){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},json:e=>{try{JSON.stringify(e)}catch(t){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}}},pl=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},fl=new Set(["utf8","utf16le"]),hl=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),ml=new Set([...fl,...hl]),yl={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},gl=e=>"string"==typeof e?`"${e}"`:e+"",vl=()=>{try{return Dr.cwd()}catch(e){throw e.message="The current directory does not exist.\n"+e.message,e}},wl=(e,t,n)=>{n.cwd=((e=vl())=>{const t=ci(e,'The "cwd" option');return Sr.resolve(t)})(n.cwd);const[r,o,i]=((e,t,{node:n=!1,nodePath:r=Dr.execPath,nodeOptions:o=Dr.execArgv.filter((e=>!e.startsWith("--inspect"))),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=ci(r,'The "nodePath" option'),l=Sr.resolve(i,c),u={...a,nodePath:l,node:n,cwd:i};if(!n)return[e,t,u];if("node"===Sr.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[l,[...o,e,...t],{ipc:!0,...u,shell:!1}]})(e,t,n),{command:s,args:a,options:c}=ga._parse(r,o,i),l=(e=>{const t={...e};for(const n of Wi)t[n]=Li(e,n);return t})(c),u=bl(l);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(u),(({encoding:e})=>{if(ml.has(e))return;const t=(e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in yl?yl[t]:ml.has(t)?t:void 0})(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${gl(e)}\`.\nPlease rename it to ${gl(t)}.`);const n=[...ml].map((e=>gl(e))).join(", ");throw new TypeError(`Invalid option \`encoding: ${gl(e)}\`.\nPlease rename it to one of: ${n}.`)})(u),(({ipcInput:e,ipc:t,serialization:n})=>{if(void 0!==e){if(!t)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");dl[n](e)}})(u),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!=={}.toString.call(e))throw Error("The `cancelSignal` option must be an AbortSignal: "+e)})(u),(({gracefulCancel:e,cancelSignal:t,ipc:n,serialization:r})=>{if(e){if(void 0===t)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!n)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===r)throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(u),u.shell=di(u.shell),u.env=El(u),u.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return Ua(e,t)})(u.killSignal),u.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(u.forceKillAfterDelay),u.lines=u.lines.map(((e,t)=>e&&!hl.has(u.encoding)&&u.buffer[t])),"win32"===Dr.platform&&"cmd"===Sr.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:u}},bl=({extendEnv:e=!0,preferLocal:t=!1,cwd:n,localDir:r=n,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:h="advanced",...m})=>({...m,extendEnv:e,preferLocal:t,cwd:n,localDirectory:r,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:h}),El=({env:e,extendEnv:t,preferLocal:n,node:r,localDirectory:o,nodePath:i})=>{const s=t?{...Dr.env,...e}:e;return n||r?va({env:s,cwd:o,execPath:i,preferLocal:n,addExecPath:r}):s},_l=e=>e.at(-1)===Ol?e.slice(0,e.at(-2)===Tl?-2:-1):e,Sl=e=>e.at(-1)===xl?e.subarray(0,e.at(-2)===Il?-2:-1):e,Ol="\n",xl=Ol.codePointAt(0),Tl="\r",Il=Tl.codePointAt(0);"promises"in qr&&"pipeline"in qr.promises||Rr.promisify(qr.pipeline);const Rl="promises"in qr&&"finished"in qr.promises?qr.promises.finished:Rr.promisify(qr.finished),Pl=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);let Nl=(Jn=class{constructor(e,t){gr(this,Xn),gr(this,qn),gr(this,Vn),gr(this,Wn,!1),gr(this,zn),vr(this,qn,e),vr(this,Vn,t)}next(){const e=()=>wr(this,Xn,Kn).call(this);return vr(this,zn,yr(this,zn)?yr(this,zn).then(e,e):e()),yr(this,zn)}return(e){const t=()=>wr(this,Xn,Yn).call(this,e);return yr(this,zn)?yr(this,zn).then(t,t):t()}},qn=new WeakMap,Vn=new WeakMap,Wn=new WeakMap,zn=new WeakMap,Xn=new WeakSet,Kn=async function(){if(yr(this,Wn))return{done:!0,value:void 0};let e;try{e=await yr(this,qn).read()}catch(t){throw vr(this,zn,void 0),vr(this,Wn,!0),yr(this,qn).releaseLock(),t}return e.done&&(vr(this,zn,void 0),vr(this,Wn,!0),yr(this,qn).releaseLock()),e},Yn=async function(e){if(yr(this,Wn))return{done:!0,value:e};if(vr(this,Wn,!0),!yr(this,Vn)){const t=yr(this,qn).cancel(e);return yr(this,qn).releaseLock(),await t,{done:!0,value:e}}return yr(this,qn).releaseLock(),{done:!0,value:e}},Jn);const Cl=Symbol();Object.defineProperty(L,"name",{value:"next"}),Object.defineProperty(k,"name",{value:"return"});const Al=Object.create(Pl,{next:{enumerable:!0,configurable:!0,writable:!0,value:L},return:{enumerable:!0,configurable:!0,writable:!0,value:k}}),$l=e=>{if($(e,{checkOpen:!1})&&void 0!==Ml.on)return Ll(e);if("function"==typeof(null==e?void 0:e[Symbol.asyncIterator]))return e;if("[object ReadableStream]"===Dl.call(e))return M.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Dl}=Object.prototype,Ll=async function*(e){const t=new AbortController,n={};kl(e,t,n);try{for await(const[n]of Ml.on(e,"data",{signal:t.signal}))yield n}catch(r){if(void 0!==n.error)throw n.error;if(!t.signal.aborted)throw r}finally{e.destroy()}},kl=async(e,t,n)=>{try{await Ml.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(r){n.error=r}finally{t.abort()}},Ml={},jl=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=1/0}={})=>{const l=$l(e),u=t();u.length=0;try{for await(const e of l){const t=n[Gl(e)](e,u);Fl({convertedChunk:t,state:u,getSize:r,truncateChunk:o,addChunk:i,maxBuffer:c})}return Ul({state:u,convertChunk:n,getSize:r,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(d){const e="object"==typeof d&&null!==d?d:Error(d);throw e.bufferedData=a(u),e}},Ul=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&Fl({convertedChunk:s,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:i})},Fl=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:o,maxBuffer:i})=>{const s=n(e),a=t.length+s;if(i>=a)return void Bl(e,t,o,a);const c=r(e,i-t.length);throw void 0!==c&&Bl(c,t,o,i),new ql},Bl=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},Gl=e=>{var t;const n=typeof e;if("string"===n)return"string";if("object"!==n||null===e)return"others";if(null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))return"buffer";const r=Hl.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===Hl.call(e.buffer)?"typedArray":"others"},{toString:Hl}=Object.prototype;let ql=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};const Vl=e=>e,Wl=()=>{},zl=({contents:e})=>e,Xl=e=>{throw Error("Streams in object mode are not supported: "+e)},Kl=e=>e.length,Yl={init:()=>({contents:[]}),convertChunk:{string:Vl,buffer:Vl,arrayBuffer:Vl,dataView:Vl,typedArray:Vl,others:Vl},getSize:()=>1,truncateChunk:Wl,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:Wl,finalize:zl},Jl=new TextEncoder,Ql=e=>new Uint8Array(e),Zl=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),eu=e=>tu**Math.ceil(Math.log(e)/Math.log(tu)),tu=2,nu=()=>"resize"in ArrayBuffer.prototype,ru={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>Jl.encode(e),buffer:Ql,arrayBuffer:Ql,dataView:Zl,typedArray:Zl,others:Xl},getSize:Kl,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:n},r)=>{const o=nu()?((e,t)=>{if(e.maxByteLength>=t)return e.resize(t),e;const n=new ArrayBuffer(t,{maxByteLength:eu(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r):((e,t)=>{if(e.byteLength>=t)return e;const n=new ArrayBuffer(eu(t));return new Uint8Array(n).set(new Uint8Array(e),0),n})(t,r);return new Uint8Array(o).set(e,n),o},getFinalChunk:Wl,finalize:({contents:e,length:t})=>nu()?e:e.slice(0,t)},ou=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),iu={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Vl,buffer:ou,arrayBuffer:ou,dataView:ou,typedArray:ou,others:Xl},getSize:Kl,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:zl},su=(e,t,n)=>{if(t.length!==n)return;const r=new ql;throw r.maxBufferInfo={fdNumber:"ipc"},r},au=([,e])=>e,cu=({originalError:e,timedOut:t,timeout:n,isMaxBuffer:r,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const h=lu(d,p);return t?`Command timed out after ${n} milliseconds${h}`:u?void 0===s?"Command was gracefully canceled with exit code "+c:d?"Command was gracefully canceled"+h:`Command was gracefully canceled with ${s} (${a})`:l?"Command was canceled"+h:r?`${((e,t)=>{const{streamName:n,threshold:r,unit:o}=((e,t)=>{if(void 0===(null==e?void 0:e.maxBufferInfo))return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:n,unit:r}}=e;delete e.maxBufferInfo;const o=zi(t,n);return"ipc"===n?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Di(n),threshold:o,unit:r}})(e,t);return`Command's ${n} was larger than ${r} ${o}`})(e,o)}${h}`:void 0!==i?`Command failed with ${i}${h}`:d?`Command was killed with ${f} (${Wa(f)})${h}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?"Command failed with exit code "+c:"Command failed"},lu=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",uu=e=>"string"==typeof e?e:hi(e)?wi(e):"",du=({command:e,escapedCommand:t,stdio:n,all:r,ipcOutput:o,options:{cwd:i},startTime:s})=>mu({command:e,escapedCommand:t,cwd:i,durationMs:Ds(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:[]}),pu=({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:s})=>fu({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}),fu=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:h,timeout:m=h,forceKillAfterDelay:y,killSignal:g,cwd:v,maxBuffer:w},isSync:b})=>{const{exitCode:E,signal:_,signalDescription:S}=yu(l,u),{originalMessage:O,shortMessage:x,message:T}=(({stdio:e,all:t,ipcOutput:n,originalError:r,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:h,maxBuffer:m,timeout:y,cwd:g})=>{const v=cu({originalError:r,timedOut:c,timeout:y,isMaxBuffer:d,maxBuffer:m,errorCode:null==r?void 0:r.code,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:h}),w=((e,t)=>{var n;if(e instanceof Oa)return;const r=Ia(o=e)&&Ta in o?e.originalMessage:(null!=(n=null==e?void 0:e.message)?n:e)+"";var o;const i=es(((e,t)=>{if(t===vl())return e;let n;try{n=_r.statSync(t)}catch(o){return`The "cwd" option is invalid: ${t}.\n${o.message}\n${e}`}return n.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===i?void 0:i})(r,g),b=`${v}: ${a}${void 0===w?"":"\n"+w}`,E=[b,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),n.map((e=>(e=>"string"==typeof e?e:Rr.inspect(e))(e))).join("\n")].map((e=>es(N((e=>Array.isArray(e)?e.map((e=>N(uu(e)))).filter(Boolean).join("\n"):uu(e))(e))))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:b,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:_,signalDescription:S,exitCode:E,escapedCommand:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:y,killSignal:g,maxBuffer:w,timeout:m,cwd:v}),I=((e,t,n)=>new(n?Pa:Ra)(t,e instanceof Oa?{}:{cause:e}))(e,T,b);return Object.assign(I,hu({error:I,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:E,signal:_,signalDescription:S,stdio:d,all:p,ipcOutput:f,cwd:v,originalMessage:O,shortMessage:x})),I},hu=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:h,cwd:m,originalMessage:y,shortMessage:g})=>{var v;return mu({shortMessage:g,originalMessage:y,command:t,escapedCommand:n,cwd:m,durationMs:Ds(r),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:null==(v=e.cause)?void 0:v.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:h,pipedFrom:[]})},mu=e=>Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),yu=(e,t)=>{const n=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:n,signalDescription:void 0===n?void 0:Wa(t)}},gu=e=>Number.isFinite(e)?e:0,vu=(e,t)=>{const n=`(done in ${j(e.durationMs)})`;Os({type:"duration",verboseMessage:n,verboseInfo:t,result:e})},wu=(e,t,{reject:n})=>{if(((e,t)=>{Xi(t)&&(((e,t)=>{e.failed&&Os({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),vu(e,t))})(e,t),e.failed&&n)throw e;return e},bu=(e,t)=>Pu(e)?"asyncGenerator":Nu(e)?"generator":Au(e)?"fileUrl":$u(e)?"filePath":ju(e)?"webStream":C(e,{checkOpen:!1})?"native":hi(e)?"uint8Array":Fu(e)?"asyncIterable":Bu(e)?"iterable":Uu(e)?Su({transform:e},t):Cu(e)?Eu(e,t):"native",Eu=(e,t)=>D(e.transform,{checkOpen:!1})?_u(e,t):Uu(e.transform)?Su(e,t):Tu(e,t),_u=(e,t)=>(Ou(e,t,"Duplex stream"),"duplex"),Su=(e,t)=>(Ou(e,t,"web TransformStream"),"webTransform"),Ou=({final:e,binary:t,objectMode:n},r,o)=>{xu(e,r+".final",o),xu(t,r+".binary",o),Iu(n,r+".objectMode")},xu=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${n}.`)},Tu=({transform:e,final:t,binary:n,objectMode:r},o)=>{if(void 0!==e&&!Ru(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(D(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Uu(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!Ru(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return Iu(n,o+".binary"),Iu(r,o+".objectMode"),Pu(e)||Pu(t)?"asyncGenerator":"generator"},Iu=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},Ru=e=>Pu(e)||Nu(e),Pu=e=>"[object AsyncGeneratorFunction]"==={}.toString.call(e),Nu=e=>"[object GeneratorFunction]"==={}.toString.call(e),Cu=e=>E(e)&&(void 0!==e.transform||void 0!==e.final),Au=e=>"[object URL]"==={}.toString.call(e),$u=e=>E(e)&&1===Object.keys(e).length&&Du(e.file),Du=e=>"string"==typeof e,Lu=new Set(["ipc","ignore","inherit","overlapped","pipe"]),ku=e=>"[object ReadableStream]"==={}.toString.call(e),Mu=e=>"[object WritableStream]"==={}.toString.call(e),ju=e=>ku(e)||Mu(e),Uu=e=>ku(null==e?void 0:e.readable)&&Mu(null==e?void 0:e.writable),Fu=e=>Gu(e)&&"function"==typeof e[Symbol.asyncIterator],Bu=e=>Gu(e)&&"function"==typeof e[Symbol.iterator],Gu=e=>"object"==typeof e&&null!==e,Hu=new Set(["generator","asyncGenerator","duplex","webTransform"]),qu=new Set(["fileUrl","filePath","fileNumber"]),Vu=new Set(["fileUrl","filePath"]),Wu=new Set([...Vu,"webStream","nodeStream"]),zu=new Set(["webTransform","duplex"]),Xu={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"},Ku=(e,t,n,r)=>"output"===r?Yu(e,t,n):Ju(e,t,n),Yu=(e,t,n)=>{const r=0!==t&&n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:null!=e?e:r}},Ju=(e,t,n)=>{const r=0===t?!0===e:n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:t!==n.length-1&&(null!=e?e:r)}},Qu=(e,t,n,{encoding:r})=>{const o=e.filter((({type:e})=>Hu.has(e))),i=Array.from({length:o.length});for(const[s,a]of Object.entries(o))i[s]=Zu({stdioItem:a,index:Number(s),newTransforms:i,optionName:t,direction:n,encoding:r});return rd(i,n)},Zu=({stdioItem:e,stdioItem:{type:t},index:n,newTransforms:r,optionName:o,direction:i,encoding:s})=>"duplex"===t?ed({stdioItem:e,optionName:o}):"webTransform"===t?td({stdioItem:e,index:n,newTransforms:r,direction:i}):nd({stdioItem:e,index:n,newTransforms:r,direction:i,encoding:s}),ed=({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}}},td=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:o})=>{const{transform:i,objectMode:s}=E(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ku(s,n,r,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},nd=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=E(t)?t:{transform:t},d=c||hl.has(i),{writableObjectMode:p,readableObjectMode:f}=Ku(u,n,r,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},rd=(e,t)=>"input"===t?e.reverse():e,od=["input","output","output"],id=()=>{},sd=()=>"input",ad={generator:id,asyncGenerator:id,fileUrl:id,filePath:id,iterable:sd,asyncIterable:sd,uint8Array:sd,webStream:e=>Mu(e)?"output":"input",nodeStream:e=>$(e,{checkOpen:!1})?A(e,{checkOpen:!1})?void 0:"input":"output",webTransform:id,duplex:id,native(e){const t=cd(e);return void 0!==t?t:C(e,{checkOpen:!1})?ad.nodeStream(e):void 0}},cd=e=>[0,Dr.stdin].includes(e)?"input":[1,2,Dr.stdout,Dr.stderr].includes(e)?"output":void 0,ld=e=>$i.some((t=>void 0!==e[t])),ud=(e,t)=>Array.isArray(e)?e.map((e=>ud(e,t))):null==e?$i.length>t?"pipe":"ignore":e,dd=e=>"pipe"===e||Array.isArray(e)&&e.every((e=>"pipe"===e)),pd=({value:e,optionName:t,fdNumber:n,direction:r})=>{const o=fd(e,n);if(void 0!==o){if("output"===r)return{type:"fileNumber",value:o,optionName:t};if(Mr.isatty(o))throw new TypeError(`The \`${t}: ${_c(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:mi(_r.readFileSync(o)),optionName:t}}},fd=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const n=Ai.indexOf(e);return-1!==n?n:void 0},hd=(e,t,n)=>{const r=Ai[e];if(void 0===r)throw new TypeError(`The \`${n}: ${t}\` option is invalid: no such standard stream.`);return r},md=({input:e,inputFile:t},n)=>0===n?[...yd(e),...vd(t)]:[],yd=e=>void 0===e?[]:[{type:gd(e),value:e,optionName:"input"}],gd=e=>{if($(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(hi(e))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},vd=e=>void 0===e?[]:[{...wd(e),optionName:"inputFile"}],wd=e=>{if(Au(e))return{type:"fileUrl",value:e};if(Du(e))return{type:"filePath",value:{file:e}};throw Error("The `inputFile` option must be a file path string or a file URL.")},bd=({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{const i=e.filter((e=>Ed(e,n)));if(0===i.length)return;const s=i.find((e=>e.direction!==o));return _d(s,r,t),"output"===o?i[0].stream:void 0},Ed=({type:e,value:t},n)=>"filePath"===e?t.file===n.file:"fileUrl"===e?t.href===n.href:t===n,_d=(e,t,n)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Xu[n]} that is the same.`)},Sd=(e,t,n,r)=>{const o=(({stdio:e,ipc:t,buffer:n,...r},o,i)=>{const s=((e,t)=>{if(void 0===e)return $i.map((e=>t[e]));if(ld(t))throw Error("It's not possible to provide `stdio` in combination with one of "+$i.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}\``);return Array.from({length:Math.max(e.length,$i.length)},((t,n)=>e[n]))})(e,r).map(((e,t)=>ud(e,t)));return i?((e,t,n)=>e.map(((e,r)=>t[r]||0===r||Ki(n,r)||!dd(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)=>Od({stdioOption:e,fdNumber:n,options:t,isSync:r}))),s=Ad({initialFileDescriptors:i,addProperties:e,options:t,isSync:r});return t.stdio=s.map((({stdioItems:e})=>kd(e))),s},Od=({stdioOption:e,fdNumber:t,options:n,isSync:r})=>{const o=Di(t),{stdioItems:i,isStdioArray:s}=xd({stdioOption:e,fdNumber:t,options:n,optionName:o}),a=((e,t,n)=>{var r;const o=e.map((e=>(({type:e,value:t},n)=>{var r;return null!=(r=od[n])?r:ad[e](t)})(e,t)));if(o.includes("input")&&o.includes("output"))throw new TypeError(`The \`${n}\` option must not be an array of both readable and writable values.`);return null!=(r=o.find(Boolean))?r:"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=pd({value:t,optionName:n,fdNumber:r,direction:o});if(void 0!==i)return i;if(C(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:hd(r,t,n),optionName:n}:"number"==typeof t?{type:"nodeStream",value:hd(t,t,n),optionName:n}:C(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})=>!Hu.has(e))),...Qu(e,t,n,r)])(c,o,a,n),u=((e,t)=>{const n=e.findLast((({type:e})=>Hu.has(e)));return void 0!==n&&("input"===t?n.value.writableObjectMode:n.value.readableObjectMode)})(l,a);return Cd(l,u),{direction:a,objectMode:u,stdioItems:l}},xd=({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=>Td(e,r))),...md(n,t)]),i=o.length>1;return Id(o,i,r),Pd(o),{stdioItems:o,isStdioArray:i}},Td=(e,t)=>({type:bu(e,t),value:e,optionName:t}),Id=(e,t,n)=>{if(0===e.length)throw new TypeError(`The \`${n}\` option must not be an empty array.`);if(t)for(const{value:r,optionName:o}of e)if(Rd.has(r))throw Error(`The \`${o}\` option must not include \`${r}\`.`)},Rd=new Set(["ignore","ipc"]),Pd=e=>{for(const t of e)Nd(t)},Nd=({type:e,value:t,optionName:n})=>{if((e=>Au(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&&!Lu.has(t))(e,t))throw new TypeError(`The \`${n}: { file: '...' }\` option must be used instead of \`${n}: '...'\`.`)},Cd=(e,t)=>{if(!t)return;const n=e.find((({type:e})=>qu.has(e)));if(void 0!==n)throw new TypeError(`The \`${n.optionName}\` option cannot use both files and transforms in objectMode.`)},Ad=({initialFileDescriptors:e,addProperties:t,options:n,isSync:r})=>{const o=[];try{for(const i of e)o.push($d({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:n,isSync:r}));return o}catch(i){throw Ld(o),i}},$d=({fileDescriptor:{direction:e,objectMode:t,stdioItems:n},fileDescriptors:r,addProperties:o,options:i,isSync:s})=>{const a=n.map((t=>Dd({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:r,isSync:s})));return{direction:e,objectMode:t,stdioItems:a}},Dd=({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 Wu.has(e)?bd({otherStdioItems:s,type:e,value:t,optionName:n,direction:r}):void(zu.has(e)&&(({otherStdioItems:e,type:t,value:n,optionName:r})=>{const o=e.find((({value:{transform:e}})=>e===n.transform));_d(o,r,t)})({otherStdioItems:s,type:e,value:t,optionName:n}));(({otherStdioItems:e,type:t,value:n,optionName:r,direction:o})=>{Vu.has(t)&&bd({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)}},Ld=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ci(e)||e.destroy()},kd=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"},Md=({type:e,optionName:t})=>{jd(t,Xu[e])},jd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Ud={generator(){},asyncGenerator:Md,webStream:Md,nodeStream:Md,webTransform:Md,duplex:Md,asyncIterable:Md,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||jd(e,`"${t}"`),{})},Fd={input:{...Ud,fileUrl:({value:e})=>({contents:[mi(_r.readFileSync(e))]}),filePath:({value:{file:e}})=>({contents:[mi(_r.readFileSync(e))]}),fileNumber:Md,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Ud,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e}})=>({path:e}),fileNumber:({value:e})=>({path:e}),iterable:Md,string:Md,uint8Array:Md}},Bd=(e,{stripFinalNewline:t},n)=>Gd(t,n)&&void 0!==e&&!Array.isArray(e)?N(e):e,Gd=(e,t)=>"all"===t?e[1]||e[2]:e[t],Hd=(e,t,n,r)=>e||n?void 0:Wd(t,r),qd=(e,t,n)=>n?e.flatMap((e=>Vd(e,t))):Vd(e,t),Vd=(e,t)=>{const{transform:n,final:r}=Wd(t,{});return[...n(e),...r()]},Wd=(e,t)=>(t.previousChunks="",{transform:zd.bind(void 0,t,e),final:Kd.bind(void 0,t)}),zd=function*(e,t,n){if("string"!=typeof n)return void(yield n);let{previousChunks:r}=e,o=-1;for(let i=0;n.length>i;i+=1)if("\n"===n[i]){const s=Xd(n,i,t,e);let a=n.slice(o+1,i+1-s);r.length>0&&(a=Qd(r,a),r=""),yield a,o=i}o!==n.length-1&&(r=Qd(r,n.slice(o+1))),e.previousChunks=r},Xd=(e,t,n,r)=>n?0:(r.isWindowsNewline=0!==t&&"\r"===e[t-1],r.isWindowsNewline?2:1),Kd=function*({previousChunks:e}){e.length>0&&(yield e)},Yd=({binary:e,preserveNewlines:t,readableObjectMode:n,state:r})=>e||t||n?void 0:{transform:Jd.bind(void 0,r)},Jd=function*({isWindowsNewline:e=!1},t){const{unixNewline:n,windowsNewline:r,LF:o,concatBytes:i}="string"==typeof t?Zd:ep;if(t.at(-1)===o)return void(yield t);const s=e?r:n;yield i(t,s)},Qd=(e,t)=>`${e}${t}`,Zd={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Qd},ep={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}},tp=(e,t)=>e?void 0:np.bind(void 0,t),np=function*(e,t){if("string"!=typeof t&&!hi(t)&&!$r.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},rp=(e,t)=>e?op.bind(void 0,t):ip.bind(void 0,t),op=function*(e,t){sp(e,t),yield t},ip=function*(e,t){if(sp(e,t),"string"!=typeof t&&!hi(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},sp=(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; }`)},ap=(e,t,n)=>{if(n)return;if(e)return{transform:cp.bind(void 0,new TextEncoder)};const r=new Pr.StringDecoder(t);return{transform:lp.bind(void 0,r),final:up.bind(void 0,r)}},cp=function*(e,t){$r.Buffer.isBuffer(t)?yield mi(t):"string"==typeof t?yield e.encode(t):yield t},lp=function*(e,t){yield hi(t)?e.write(t):t},up=function*(e){const t=e.end();""!==t&&(yield t)},dp=Rr.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}})),pp=async function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=yp}=t[n];for await(const o of r(e))yield*pp(o,t,n+1)},fp=async function*(e){for(const[t,{final:n}]of Object.entries(e))yield*hp(n,Number(t),e)},hp=async function*(e,t,n){if(void 0!==e)for await(const r of e())yield*pp(r,n,t+1)},mp=Rr.callbackify((async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())})),yp=function*(e){yield e},gp=(e,t,n,r)=>{try{for(const r of e(...t))n.push(r);r()}catch(o){r(o)}},vp=(e,t)=>[...t.flatMap((t=>[...wp(t,e,0)])),...bp(e)],wp=function*(e,t,n){if(n===t.length)return void(yield e);const{transform:r=_p}=t[n];for(const o of r(e))yield*wp(o,t,n+1)},bp=function*(e){for(const[t,{final:n}]of Object.entries(e))yield*Ep(n,Number(t),e)},Ep=function*(e,t,n){if(void 0!==e)for(const r of e())yield*wp(r,n,t+1)},_p=function*(e){yield e},Sp=({value:e,value:{transform:t,final:n,writableObjectMode:r,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=xp(e,s,i),l=Pu(t),u=Pu(n),d=l?dp.bind(void 0,pp,a):gp.bind(void 0,wp),p=l||u?dp.bind(void 0,fp,a):gp.bind(void 0,bp),f=l||u?mp.bind(void 0,a):void 0;return{stream:new kr.Transform({writableObjectMode:r,writableHighWaterMark:kr.getDefaultHighWaterMark(r),readableObjectMode:o,readableHighWaterMark:kr.getDefaultHighWaterMark(o),transform(e,t,n){d([e,c,0],this,n)},flush(e){p([c],this,e)},destroy:f})}},Op=(e,t,n,r)=>{const o=t.filter((({type:e})=>"generator"===e)),i=r?o.reverse():o;for(const{value:s,optionName:a}of i){const t=xp(s,n,a);e=vp(t,e)}return e},xp=({transform:e,final:t,binary:n,writableObjectMode:r,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:tp(r,a)},ap(n,s,r),Hd(n,i,r,c),{transform:e,final:t},{transform:rp(o,a)},Yd({binary:n,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},Tp=(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 ${Xu[e]} with synchronous methods.`)}const i=o.map((({contents:e})=>e)).map((e=>Ip(e,r)));n.input=bi(i)},Ip=(e,t)=>{const n=Op(e,t,"utf8",!0);return Rp(n),bi(n)},Rp=e=>{const t=e.find((e=>"string"!=typeof e&&!hi(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}.`)},Pp=({stdioItems:e,encoding:t,verboseInfo:n,fdNumber:r})=>"all"!==r&&Ki(n,r)&&!hl.has(t)&&Np(r)&&(e.some((({type:e,value:t})=>"native"===e&&Cp.has(t)))||e.every((({type:e})=>Hu.has(e)))),Np=e=>1===e||2===e,Cp=new Set(["pipe","overlapped"]),Ap=e=>e._readableState.pipes.length>0,$p=(e,t,n)=>{const r=Ps(e);Os({type:"output",verboseMessage:r,fdNumber:t,verboseInfo:n})},Dp=(e,t,n,r)=>{try{return Op(e,t,n,!1)}catch(o){return r.error=o,e}},Lp=({chunks:e,objectMode:t,encoding:n,lines:r,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===n)return{serializedResult:bi(e)};const s=((e,t)=>((e,t)=>{if("utf8"===t&&e.every((e=>"string"==typeof e)))return e;const n=new Pr.StringDecoder(t),r=e.map((e=>"string"==typeof e?gi(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:qd(s,!o[i],t)}:{serializedResult:s}},kp=({serializedResult:e,fdNumber:t,state:n,verboseInfo:r,encoding:o,stdioItems:i,objectMode:s})=>{if(!Pp({stdioItems:i,encoding:o,verboseInfo:r,fdNumber:t}))return;const a=qd(e,!1,s);try{((e,t,n)=>{for(const r of e)$p(r,t,n)})(a,t,r)}catch(c){null!=n.error||(n.error=c)}},Mp=(e,t,n)=>{for(const{path:r}of t.filter((({type:e})=>qu.has(e)))){const t="string"==typeof r?r:""+r;n.has(t)?_r.appendFileSync(r,e):(n.add(t),_r.writeFileSync(r,e))}},jp=async e=>{try{return await Ir.once(e,"exit")}catch{return jp(e)}},Up=async e=>{const[t,n]=await e;if(!Fp(t,n)&&Bp(t,n))throw new Oa;return[t,n]},Fp=(e,t)=>void 0===e&&void 0===t,Bp=(e,t)=>0!==e||null!==t,Gp=(e,t,n)=>void 0!==e?e:Bp(t,n)?new Oa:void 0,Hp=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,qp=({ipc:e,ipcInput:t,detached:n,cancelSignal:r})=>{t&&Vp("ipcInput"),e&&Vp("ipc: true"),n&&Vp("detached: true"),r&&Vp("cancelSignal")},Vp=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wp=({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=zp({file:e,commandArguments:t,options:n,command:r,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=(({error:e,status:t,signal:n,output:r},{maxBuffer:o})=>{const i=Gp(e,t,n),s="ETIMEDOUT"===(null==i?void 0:i.code),a=((e,t,n)=>"ENOBUFS"===(null==e?void 0:e.code)&&null!==t&&t.some((e=>null!==e&&e.length>au(n))))(i,r,o);return{resultError:i,exitCode:t,signal:n,timedOut:s,isMaxBuffer:a}})(c,n),{output:h,error:m=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:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,n)=>{if(!t)return e;const r=au(n);return e.length>r?e.slice(0,r):e})(e,i,d),f=mi(p),{stdioItems:h,objectMode:y}=t[n],g=Dp([f],h,c,r),{serializedResult:v,finalResult:w=v}=Lp({chunks:g,objectMode:y,encoding:c,lines:l,stripFinalNewline:u,fdNumber:n});kp({serializedResult:v,fdNumber:n,state:r,verboseInfo:s,encoding:c,stdioItems:h,objectMode:y});const b=a[n]?w:void 0;try{return void 0===r.error&&Mp(v,h,o),b}catch(m){return r.error=m,b}})({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:r,verboseInfo:o},n))),...i}})({fileDescriptors:s,syncResult:c,options:n,isMaxBuffer:f,verboseInfo:i}),y=h.map(((e,t)=>Bd(e,n,t))),g=Bd((([,e,t],n)=>{if(n.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Bd(t,n,"all")]:Array.isArray(t)?[Bd(e,n,"all"),...t]:hi(e)&&hi(t)?_i([e,t]):`${e}${t}`})(h,n),n,"all");return Kp({error:m,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:y,all:g,options:n,command:r,escapedCommand:o,startTime:a})},zp=({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))Tp(e,n,t)})(i,n);const r=Xp(n);return Nr.spawnSync(e,t,r)}catch(a){return pu({error:a,command:r,escapedCommand:o,fileDescriptors:i,options:n,startTime:s,isSync:!0})}},Xp=({encoding:e,maxBuffer:t,...n})=>({...n,encoding:"buffer",maxBuffer:au(t)}),Kp=({error:e,exitCode:t,signal:n,timedOut:r,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?du({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):fu({error:e,command:c,escapedCommand:l,timedOut:r,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:n,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),Yp=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0,filter:i}={})=>(tc({methodName:"getOneMessage",isSubprocess:n,ipc:r,isConnected:Dc(e)}),Jp({anyProcess:e,channel:t,isSubprocess:n,filter:i,reference:o})),Jp=async({anyProcess:e,channel:t,isSubprocess:n,filter:r,reference:o})=>{Oc(t,o);const i=Cc(e,t,n),s=new AbortController;try{return await Promise.race([Qp(i,r,s),Zp(i,n,s),ef(i,n,s)])}catch(a){throw uc(e),a}finally{s.abort(),Tc(t,o)}},Qp=async(e,t,{signal:n})=>{if(void 0===t){const[t]=await Ir.once(e,"message",{signal:n});return t}for await(const[r]of Ir.on(e,"message",{signal:n}))if(t(r))return r},Zp=async(e,t,{signal:n})=>{await Ir.once(e,"disconnect",{signal:n}),(e=>{throw Error(`${ac("getOneMessage",e)} could not complete: the ${lc(e)} exited or disconnected.`)})(t)},ef=async(e,t,{signal:n})=>{const[r]=await Ir.once(e,"strict:error",{signal:n});throw oc(r,t)},tf=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:o=!0}={})=>nf({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:!n,reference:o}),nf=({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:o,reference:i})=>{tc({methodName:"getEachMessage",isSubprocess:n,ipc:r,isConnected:Dc(e)}),Oc(t,i);const s=Cc(e,t,n),a=new AbortController,c={};return rf(e,s,a),of({ipcEmitter:s,isSubprocess:n,controller:a,state:c}),sf({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:n,shouldAwait:o,controller:a,state:c,reference:i})},rf=async(e,t,n)=>{try{await Ir.once(t,"disconnect",{signal:n.signal}),n.abort()}catch{}},of=async({ipcEmitter:e,isSubprocess:t,controller:n,state:r})=>{try{const[o]=await Ir.once(e,"strict:error",{signal:n.signal});r.error=oc(o,t),n.abort()}catch{}},sf=async function*({anyProcess:e,channel:t,ipcEmitter:n,isSubprocess:r,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of Ir.on(n,"message",{signal:i.signal}))af(s),yield e}catch{af(s)}finally{i.abort(),Tc(t,a),r||uc(e),o&&await e}},af=({error:e})=>{if(e)throw e},cf=(e,t,n)=>({sendMessage:Xc.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getOneMessage:Yp.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getEachMessage:tf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})}),lf=()=>{const e=new kr.PassThrough;return e.end(),e},uf=()=>new kr.Readable({read(){}}),df=()=>new kr.Writable({write(){}}),pf=()=>new kr.Duplex({read(){},write(){}}),ff=async(e,t,n)=>wu(e,t,n),hf=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Xu[e]}.`)},mf={fileNumber:hf,generator:Sp,asyncGenerator:Sp,nodeStream:({value:e})=>({stream:e}),webTransform:({value:{transform:e,writableObjectMode:t,readableObjectMode:n}})=>({stream:kr.Duplex.fromWeb(e,{objectMode:t||n})}),duplex:({value:{transform:e}})=>({stream:e}),native(){}},yf={input:{...mf,fileUrl:({value:e})=>({stream:_r.createReadStream(e)}),filePath:({value:{file:e}})=>({stream:_r.createReadStream(e)}),webStream:({value:e})=>({stream:kr.Readable.fromWeb(e)}),iterable:({value:e})=>({stream:kr.Readable.from(e)}),asyncIterable:({value:e})=>({stream:kr.Readable.from(e)}),string:({value:e})=>({stream:kr.Readable.from(e)}),uint8Array:({value:e})=>({stream:kr.Readable.from($r.Buffer.from(e))})},output:{...mf,fileUrl:({value:e})=>({stream:_r.createWriteStream(e)}),filePath:({value:{file:e}})=>({stream:_r.createWriteStream(e)}),webStream:({value:e})=>({stream:kr.Writable.fromWeb(e)}),iterable:hf,asyncIterable:hf,string:hf,uint8Array:hf}},gf=(e,t)=>{if(0===e.length)return kr.getDefaultHighWaterMark(t);const n=e.filter((({readableObjectMode:e})=>e===t)).map((({readableHighWaterMark:e})=>e));return Math.max(...n)};class vf extends kr.PassThrough{constructor(){super(...arguments),gr(this,Qn,new Set([])),gr(this,Zn,new Set([])),gr(this,er,new Set([])),gr(this,tr),gr(this,nr,Symbol()),gr(this,rr,new WeakMap)}add(e){if(_f(e),yr(this,Qn).has(e))return;yr(this,Qn).add(e),null!=yr(this,tr)||vr(this,tr,wf(this,yr(this,Qn),yr(this,nr)));const t=Sf({passThroughStream:this,stream:e,streams:yr(this,Qn),ended:yr(this,Zn),aborted:yr(this,er),onFinished:yr(this,tr),unpipeEvent:yr(this,nr)});yr(this,rr).set(e,t),e.pipe(this,{end:!1})}async remove(e){if(_f(e),!yr(this,Qn).has(e))return!1;const t=yr(this,rr).get(e);return void 0!==t&&(yr(this,rr).delete(e),e.unpipe(this),await t,!0)}}Qn=new WeakMap,Zn=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,rr=new WeakMap;const wf=async(e,t,n)=>{$f(e,Df);const r=new AbortController;try{await Promise.race([bf(e,r),Ef(e,t,n,r)])}finally{r.abort(),$f(e,-Df)}},bf=async(e,{signal:t})=>{try{await Rl(e,{signal:t,cleanup:!0})}catch(n){throw Rf(e,n),n}},Ef=async(e,t,n,{signal:r})=>{for await(const[o]of Ir.on(e,"unpipe",{signal:r}))t.has(o)&&o.emit(n)},_f=e=>{if("function"!=typeof(null==e?void 0:e.pipe))throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Sf=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,onFinished:i,unpipeEvent:s})=>{$f(e,Lf);const a=new AbortController;try{await Promise.race([Of(i,t,a),xf({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:a}),Tf({stream:t,streams:n,ended:r,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),$f(e,-Lf)}n.size>0&&n.size===r.size+o.size&&(0===r.size&&o.size>0?Nf(e):If(e))},Of=async(e,t,{signal:n})=>{try{await e,n.aborted||Nf(t)}catch(r){n.aborted||Rf(t,r)}},xf=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:o,controller:{signal:i}})=>{try{await Rl(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(s){if(i.aborted||!n.has(t))return;Pf(s)?o.add(t):Cf(e,s)}},Tf=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:o,controller:{signal:i}})=>{if(await Ir.once(e,o,{signal:i}),!e.readable)return Ir.once(i,"abort",{signal:i});t.delete(e),n.delete(e),r.delete(e)},If=e=>{e.writable&&e.end()},Rf=(e,t)=>{Pf(t)?Nf(e):Cf(e,t)},Pf=e=>"ERR_STREAM_PREMATURE_CLOSE"===(null==e?void 0:e.code),Nf=e=>{(e.readable||e.writable)&&e.destroy()},Cf=(e,t)=>{e.destroyed||(e.once("error",Af),e.destroy(t))},Af=()=>{},$f=(e,t)=>{const n=e.getMaxListeners();0!==n&&n!==1/0&&e.setMaxListeners(n+t)},Df=2,Lf=1,kf=(e,t)=>{e.pipe(t),Mf(e,t),Uf(e,t)},Mf=async(e,t)=>{if(!Ci(e)&&!Ci(t)){try{await Rl(e,{cleanup:!0,readable:!0,writable:!1})}catch{}jf(t)}},jf=e=>{e.writable&&e.end()},Uf=async(e,t)=>{if(!Ci(e)&&!Ci(t)){try{await Rl(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Ff(e)}},Ff=e=>{e.readable&&e.destroy()},Bf=(e,t,n,r)=>{"output"===n?kf(e.stdio[r],t):kf(t,e.stdio[r]);const o=Gf[r];void 0!==o&&(e[o]=t),e.stdio[r]=t},Gf=["stdin","stdout","stderr"],Hf=({subprocess:e,stream:t,direction:n,fdNumber:r,pipeGroups:o,controller:i})=>{var s;if(void 0===t)return;qf(t,i);const[a,c]="output"===n?[t,e.stdio[r]]:[e.stdio[r],t],l=null!=(s=o.get(a))?s:[];o.set(a,[...l,c])},qf=(e,{signal:t})=>{Ci(e)&&Sc(e,Vf,t)},Vf=2,Wf=[];Wf.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Wf.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Wf.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const zf=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,Xf=Symbol.for("signal-exit emitter"),Kf=globalThis,Yf=Object.defineProperty.bind(Object);class Jf{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Kf[Xf])return Kf[Xf];Yf(Kf,Xf,{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 Qf{}or=new WeakMap,ir=new WeakMap,sr=new WeakMap,ar=new WeakMap,cr=new WeakMap,lr=new WeakMap,ur=new WeakMap,dr=new WeakSet,pr=function(e){return zf(yr(this,sr))?(yr(this,sr).exitCode=e||0,yr(this,ir).emit("exit",yr(this,sr).exitCode,null),yr(this,cr).call(yr(this,sr),yr(this,sr).exitCode)):0},fr=function(e,...t){const n=yr(this,ar);if("exit"===e&&zf(yr(this,sr))){"number"==typeof t[0]&&(yr(this,sr).exitCode=t[0]);const r=n.call(yr(this,sr),e,...t);return yr(this,ir).emit("exit",yr(this,sr).exitCode,null),r}return n.call(yr(this,sr),e,...t)};const Zf=globalThis.process,{onExit:eh}=(th=zf(Zf)?new class extends Qf{constructor(e){super(),gr(this,dr),gr(this,or,"win32"===Zf.platform?"SIGINT":"SIGHUP"),gr(this,ir,new Jf),gr(this,sr),gr(this,ar),gr(this,cr),gr(this,lr,{}),gr(this,ur,!1),vr(this,sr,e),vr(this,lr,{});for(const t of Wf)yr(this,lr)[t]=()=>{const n=yr(this,sr).listeners(t);let{count:r}=yr(this,ir);if("object"==typeof e.__signal_exit_emitter__&&"number"==typeof e.__signal_exit_emitter__.count&&(r+=e.__signal_exit_emitter__.count),n.length===r){this.unload();const n=yr(this,ir).emit("exit",null,t),r="SIGHUP"===t?yr(this,or):t;n||e.kill(e.pid,r)}};vr(this,cr,e.reallyExit),vr(this,ar,e.emit)}onExit(e,t){if(!zf(yr(this,sr)))return()=>{};!1===yr(this,ur)&&this.load();const n=(null==t?void 0:t.alwaysLast)?"afterExit":"exit";return yr(this,ir).on(n,e),()=>{yr(this,ir).removeListener(n,e),0===yr(this,ir).listeners.exit.length&&0===yr(this,ir).listeners.afterExit.length&&this.unload()}}load(){if(!yr(this,ur)){vr(this,ur,!0),yr(this,ir).count+=1;for(const t of Wf)try{const e=yr(this,lr)[t];e&&yr(this,sr).on(t,e)}catch(e){}yr(this,sr).emit=(e,...t)=>wr(this,dr,fr).call(this,e,...t),yr(this,sr).reallyExit=e=>wr(this,dr,pr).call(this,e)}}unload(){yr(this,ur)&&(vr(this,ur,!1),Wf.forEach((e=>{const t=yr(this,lr)[e];if(!t)throw Error("Listener not defined for signal: "+e);try{yr(this,sr).removeListener(e,t)}catch(n){}})),yr(this,sr).emit=yr(this,ar),yr(this,sr).reallyExit=yr(this,cr),yr(this,ir).count-=1)}}(Zf):new class extends Qf{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>th.onExit(e,t),load:()=>th.load(),unload:()=>th.unload()});var th;const nh=(e,t,n,...r)=>{if(Array.isArray(n))return{destination:t(rh,e)(n,...r),pipeOptions:e};if("string"==typeof n||n instanceof URL||ui(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]=pi(n,...r);return{destination:t(rh)(o,i,s),pipeOptions:s}}if(hc.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)},rh=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),oh=({error:e,fileDescriptors:t,sourceOptions:n,startTime:r})=>pu({error:e,command:ih,escapedCommand:ih,fileDescriptors:t,options:n,startTime:r,isSync:!1}),ih="source.pipe(destination)",sh=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},ah=new WeakMap,ch=(e,t)=>void 0===e?[]:[lh(e,t)],lh=async(e,{sourceStream:t,mergedStream:n,fileDescriptors:r,sourceOptions:o,startTime:i})=>{throw await Rr.aborted(e,t),await n.remove(t),oh({error:Error("Pipe canceled by `unpipeSignal` option."),fileDescriptors:r,sourceOptions:o,startTime:i})},uh=(e,...t)=>{if(E(t[0]))return uh.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:n,...r}=(({source:e,sourcePromise:t,boundOptions:n,createNested:r},...o)=>{const i=$s(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=((e,t,n)=>{try{const{destination:r,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=nh(e,t,...n);return{destination:r,destinationStream:pc(r,i),from:o,unpipeSignal:s}}catch(r){return{destinationError:r}}})(n,r,o),{sourceStream:d,sourceError:p}=((e,t)=>{try{return{sourceStream:fc(e,t)}}catch(n){return{sourceError:n}}})(e,l),{options:f,fileDescriptors:h}=hc.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:h,startTime:i}})(e,...t),o=dh({...r,destination:n});return o.pipe=uh.bind(void 0,{...e,source:n,sourcePromise:o,boundOptions:{}}),o},dh=async({sourcePromise:e,sourceStream:t,sourceOptions:n,sourceError:r,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=ph(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?(Ff(e),r):void 0!==t?(jf(n),t):void 0)({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r});if(void 0!==a)throw oh({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:r,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:n,startTime:l});const d=new AbortController;try{const e=((e,t,n)=>{const r=ah.has(t)?((e,t)=>{const n=ah.get(t);return n.add(e),n})(e,t):((e,t)=>{const n=U([e]);return kf(n,t),ah.set(t,n),n})(e,t);return Sc(e,2,n.signal),Sc(t,1,n.signal),(async e=>{try{await Rl(e,{cleanup:!0,readable:!1,writable:!0})}catch{}ah.delete(e)})(t),r})(t,i,d);return await Promise.race([sh(u),...ch(a,{sourceStream:t,mergedStream:e,sourceOptions:n,fileDescriptors:c,startTime:l})])}finally{d.abort()}},ph=(e,t)=>Promise.allSettled([e,t]),fh=({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:r,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return hh(t,s),gh({stream:e,controller:s,binary:n,shouldEncode:!e.readableObjectMode&&r,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},hh=async(e,t)=>{try{await e}catch{}finally{t.abort()}},mh=({stream:e,onStreamEnd:t,lines:n,encoding:r,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;yh(t,s,e);const a=e.readableObjectMode&&!i;return gh({stream:e,controller:s,binary:"buffer"===r,shouldEncode:!a,encoding:r,shouldSplit:!a&&n,preserveNewlines:!o})},yh=async(e,t,n)=>{try{await e}catch{n.destroy()}finally{t.abort()}},gh=({stream:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=Ir.on(e,"data",{signal:t.signal,highWaterMark:wh,highWatermark:wh});return bh({onStdoutChunk:a,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s})},vh=kr.getDefaultHighWaterMark(!0),wh=vh,bh=async function*({onStdoutChunk:e,controller:t,binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Eh({binary:n,shouldEncode:r,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*wp(t,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*bp(a)}},Eh=({binary:e,shouldEncode:t,encoding:n,shouldSplit:r,preserveNewlines:o})=>[ap(e,n,!t),Hd(e,o,!r,{})].filter(Boolean),_h=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=Sh({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void(await Promise.all([Oh(e),d]));const p=Gd(c,n),f=mh({stream:e,onStreamEnd:t,lines:s,encoding:r,stripFinalNewline:p,allMixed:a}),[h]=await Promise.all([xh({stream:e,iterable:f,fdNumber:n,encoding:r,maxBuffer:i,lines:s}),d]);return h},Sh=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{var a;if(!Pp({stdioItems:null==(a=s[n])?void 0:a.stdioItems,encoding:r,verboseInfo:i,fdNumber:n}))return;const c=mh({stream:e,onStreamEnd:t,lines:!0,encoding:r,stripFinalNewline:!0,allMixed:o});await(async(e,t,n,r)=>{for await(const o of e)Ap(t)||$p(o,n,r)})(c,e,n,i)},Oh=async e=>{await Sa(),null===e.readableFlowing&&e.resume()},xh=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 jl(e,Yl,t)}(n,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return jl(e,ru,t)}(n,{maxBuffer:i})):await async function(e,t){return jl(e,iu,t)}(n,{maxBuffer:i})}catch(a){return Ih((({error:e,stream:t,readableObjectMode:n,lines:r,encoding:o,fdNumber:i})=>{if(!(e instanceof ql))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:a,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:r}))}},Th=async e=>{try{return await e}catch(t){return Ih(t)}},Ih=({bufferedData:e})=>"[object ArrayBuffer]"===fi.call(e)?new Uint8Array(e):e,Rh=async(e,t,n,{isSameDirection:r,stopOnExit:o=!1}={})=>{const i=Ph(e,n),s=new AbortController;try{await Promise.race([...o?[n.exitPromise]:[],Rl(e,{cleanup:!0,signal:s.signal})])}catch(a){i.stdinCleanedUp||Ah(a,t,n,r)}finally{s.abort()}},Ph=(e,{originalStreams:[t],subprocess:n})=>{const r={stdinCleanedUp:!1};return e===t&&Nh(e,n,r),r},Nh=(e,t,n)=>{const{_destroy:r}=e;e._destroy=(...o)=>{Ch(t,n),r.call(e,...o)}},Ch=({exitCode:e,signalCode:t},n)=>{null===e&&null===t||(n.stdinCleanedUp=!0)},Ah=(e,t,n,r)=>{if(!$h(e,t,n,r))throw e},$h=(e,t,n,r=!0)=>n.propagating?kh(e)||Lh(e):(n.propagating=!0,Dh(n,t)===r?kh(e):Lh(e)),Dh=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Lh=e=>"ERR_STREAM_PREMATURE_CLOSE"===(null==e?void 0:e.code),kh=e=>"EPIPE"===(null==e?void 0:e.code),Mh=async({stream:e,fdNumber:t,encoding:n,buffer:r,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Rh(e,t,l);if(Dh(l,t))return void(await u);const[d]=await Promise.all([_h({stream:e,onStreamEnd:u,fdNumber:t,encoding:n,buffer:r,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},jh=({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}},Uh=({all:e,stdout:t,stderr:n})=>e&&t&&n&&t.readableObjectMode!==n.readableObjectMode,Fh=(e,t)=>{const n=Ps(e);Os({type:"ipc",verboseMessage:n,fdNumber:"ipc",verboseInfo:t})},Bh=async(e,t)=>(await Promise.allSettled([e]),t),Gh=async({subprocess:e,options:{encoding:t,buffer:n,maxBuffer:r,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:h,originalStreams:m,onInternalError:y,controller:g})=>{const v=(async(e,t)=>{const[n,r]=await(async e=>{const[t,n]=await Promise.allSettled([Ir.once(e,"spawn"),Ir.once(e,"exit")]);return"rejected"===t.status?[]:"rejected"===n.status?jp(e):n.value})(e);return null!=t.isForcefullyTerminated||(t.isForcefullyTerminated=!1),[n,r]})(e,p),w={originalStreams:m,fileDescriptors:h,subprocess:e,exitPromise:v,propagating:!1},b=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map(((e,c)=>Mh({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}),E=(({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Mh({...jh(e,n),fdNumber:"all",encoding:t,maxBuffer:r[1]+r[2],lines:o[1]||o[2],allMixed:Uh(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:w}),_=[],S=(async({subprocess:e,buffer:t,maxBuffer:n,ipc:r,ipcOutput:o,verboseInfo:i})=>{if(!r)return o;const s=(e=>Ki(e,"ipc"))(i),a=zi(t,"ipc"),c=zi(n,"ipc");for await(const l of nf({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:r,shouldAwait:!1,reference:!0}))a&&(su(0,o,c),o.push(l)),s&&Fh(l,i);return o})({subprocess:e,buffer:n,maxBuffer:r,ipc:u,ipcOutput:_,verboseInfo:f}),O=Hh(m,e,w),x=qh(h,w);try{return await Promise.race([Promise.all([{},Up(v),Promise.all(b),E,S,pl(e,d),...O,...x]),y,Vh(e,g),...ll(e,i,p,g),...Za({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:g}),...sl({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:g})])}catch(T){return null!=p.terminationReason||(p.terminationReason="other"),Promise.all([{error:T},v,Promise.all(b.map((e=>Th(e)))),Th(E),Bh(S,_),Promise.allSettled(O),Promise.allSettled(x)])}},Hh=(e,t,n)=>e.map(((e,r)=>e===t.stdio[r]?void 0:Rh(e,r,n))),qh=(e,t)=>e.flatMap((({stdioItems:e},n)=>e.filter((({value:e,stream:t=e})=>C(t,{checkOpen:!1})&&!Ci(t))).map((({type:e,value:r,stream:o=r})=>Rh(o,n,t,{isSameDirection:Hu.has(e),stopOnExit:"native"===e}))))),Vh=async(e,{signal:t})=>{const[n]=await Ir.once(e,"error",{signal:t});throw n},Wh=(e,t,n)=>{const r=e[n];r.has(t)||r.set(t,[]);const o=r.get(t),i=dc();return o.push(i),{resolve:i.resolve.bind(i),promises:o}},zh=async({resolve:e,promises:t},n)=>{e();const[r]=await Promise.race([Promise.allSettled([!0,n]),Promise.all([!1,...t])]);return!r},Xh=async e=>{if(void 0!==e)try{await Kh(e)}catch{}},Kh=async e=>{await Rl(e,{cleanup:!0,readable:!1,writable:!0})},Yh=async e=>{await Rl(e,{cleanup:!0,readable:!0,writable:!1})},Jh=async(e,t)=>{if(await e,t)throw t},Qh=(e,t,n)=>{n&&!Lh(n)?e.destroy(n):t&&e.destroy()},Zh=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||hl.has(n),{subprocessStdout:a,waitReadableDestroy:c}=em(e,r,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=tm(a,s),{read:p,onStdoutDataDone:f}=nm({subprocessStdout:a,subprocess:e,binary:s,encoding:n,preserveNewlines:i}),h=new kr.Readable({read:p,destroy:Rr.callbackify(im.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return om({subprocessStdout:a,onStdoutDataDone:f,readable:h,subprocess:e}),h},em=(e,t,n)=>{const r=fc(e,t);return{subprocessStdout:r,waitReadableDestroy:Wh(n,r,"readableDestroy")}},tm=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n},r)=>r?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:vh},nm=({subprocessStdout:e,subprocess:t,binary:n,encoding:r,preserveNewlines:o})=>{const i=dc(),s=fh({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:!n,encoding:r,preserveNewlines:o});return{read(){rm(this,s,i)},onStdoutDataDone:i}},rm=async(e,t,n)=>{try{const{value:r,done:o}=await t.next();o?n.resolve():e.push(r)}catch{}},om=async({subprocessStdout:e,onStdoutDataDone:t,readable:n,subprocess:r,subprocessStdin:o})=>{try{await Yh(e),await r,await Xh(o),await t,n.readable&&n.push(null)}catch(i){await Xh(o),sm(n,i)}},im=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:n},r)=>{await zh(n,t)&&(sm(e,r),await Jh(t,r))},sm=(e,t)=>{Qh(e,e.readable,t)},am=({subprocess:e,concurrentStreams:t},{to:n}={})=>{const{subprocessStdin:r,waitWritableFinal:o,waitWritableDestroy:i}=cm(e,n,t),s=new kr.Writable({...lm(r,e,o),destroy:Rr.callbackify(fm.bind(void 0,{subprocessStdin:r,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:r.writableHighWaterMark,objectMode:r.writableObjectMode});return pm(r,s),s},cm=(e,t,n)=>{const r=pc(e,t);return{subprocessStdin:r,waitWritableFinal:Wh(n,r,"writableFinal"),waitWritableDestroy:Wh(n,r,"writableDestroy")}},lm=(e,t,n)=>({write:um.bind(void 0,e),final:Rr.callbackify(dm.bind(void 0,e,t,n))}),um=(e,t,n,r)=>{e.write(t,n)?r():e.once("drain",r)},dm=async(e,t,n)=>{await zh(n,t)&&(e.writable&&e.end(),await t)},pm=async(e,t,n)=>{try{await Kh(e),t.writable&&t.end()}catch(r){await(async e=>{if(void 0!==e)try{await Yh(e)}catch{}})(n),hm(t,r)}},fm=async({subprocessStdin:e,subprocess:t,waitWritableFinal:n,waitWritableDestroy:r},o)=>{await zh(n,t),await zh(r,t)&&(hm(e,o),await Jh(t,o))},hm=(e,t)=>{Qh(e,e.writable,t)},mm=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||hl.has(n),{subprocessStdout:c,waitReadableDestroy:l}=em(e,r,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=cm(e,o,t),{readableEncoding:f,readableObjectMode:h,readableHighWaterMark:m}=tm(c,a),{read:y,onStdoutDataDone:g}=nm({subprocessStdout:c,subprocess:e,binary:a,encoding:n,preserveNewlines:s}),v=new kr.Duplex({read:y,...lm(u,e,d),destroy:Rr.callbackify(ym.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:m,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:h,writableObjectMode:u.writableObjectMode,encoding:f});return om({subprocessStdout:c,onStdoutDataDone:g,readable:v,subprocess:e,subprocessStdin:u}),pm(u,v,c),v},ym=async({subprocessStdout:e,subprocessStdin:t,subprocess:n,waitReadableDestroy:r,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([im({subprocessStdout:e,subprocess:n,waitReadableDestroy:r},s),fm({subprocessStdin:t,subprocess:n,waitWritableFinal:o,waitWritableDestroy:i},s)])},gm=(e,t,{from:n,binary:r=!1,preserveNewlines:o=!1}={})=>{const i=r||hl.has(t),s=fc(e,n),a=fh({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return vm(a,s,e)},vm=async function*(e,t,n){try{yield*e}finally{t.readable&&t.destroy(),await n}},wm=(e,{encoding:t})=>{const n={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=Zh.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.writable=am.bind(void 0,{subprocess:e,concurrentStreams:n}),e.duplex=mm.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.iterable=gm.bind(void 0,e,t),e[Symbol.asyncIterator]=gm.bind(void 0,e,t,{})},bm=(async()=>{})().constructor.prototype,Em=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(bm,e)])),_m=(e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=Ls(e,t,n),{file:a,commandArguments:c,options:l}=wl(e,t,n),u=Sm(l),d=((e,t)=>Sd(yf,e,t,!1))(u,s);return{file:a,commandArguments:c,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Sm=({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}},Om=({file:e,commandArguments:t,options:n,startTime:r,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=Nr.spawn(e,t,n)}catch(f){return(({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,verboseInfo:s})=>{Ld(r);const a=new Nr.ChildProcess;((e,t)=>{const n=lf(),r=lf(),o=lf(),i=Array.from({length:t.length-3},lf),s=lf(),a=[n,r,o,...i];Object.assign(e,{stdin:n,stdout:r,stderr:o,all:s,stdio:a})})(a,r),Object.assign(a,{readable:uf,writable:df,duplex:pf});const c=pu({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:ff(c,s,o)}})({error:f,command:i,escapedCommand:s,fileDescriptors:a,options:n,startTime:r,verboseInfo:o})}const l=new AbortController;Ir.setMaxListeners(1/0,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})=>Hu.has(e))))Bf(e,t,s,o);for(const{stream:t}of i.filter((({type:e})=>!Hu.has(e))))Hf({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:r,controller:n})}for(const[o,i]of r.entries()){const e=1===i.length?i[0]:U(i);kf(e,o)}})(c,a,l),((e,{cleanup:t,detached:n},{signal:r})=>{if(!t||n)return;const o=eh((()=>{e.kill()}));Ir.addAbortListener(r,(()=>{o()}))})(c,n,l);const d={},p=dc();return c.kill=za.bind(void 0,{kill:c.kill.bind(c),options:n,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:n})=>n&&(e||t)?U([e,t].filter(Boolean)):void 0)(c,n),wm(c,n),((e,{ipc:t})=>{Object.assign(e,cf(e,!1,t))})(c,n),{subprocess:c,promise:xm({subprocess:c,options:n,startTime:r,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},xm=async({subprocess:e,options:t,startTime:n,verboseInfo:r,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],h,m,y]=await Gh({subprocess:e,options:t,context:c,verboseInfo:r,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const g=h.map(((e,n)=>Bd(e,t,n))),v=Bd(m,t,"all"),w=Tm({errorInfo:d,exitCode:p,signal:f,stdio:g,all:v,ipcOutput:y,context:c,options:t,command:s,escapedCommand:a,startTime:n});return wu(w,r,t)},Tm=({errorInfo:e,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?fu({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 ql,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:n,stdio:r,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):du({command:c,escapedCommand:l,stdio:r,all:o,ipcOutput:i,options:a,startTime:u}),Im=(e,t)=>{const n=Object.fromEntries(Object.entries(t).map((([t,n])=>[t,Rm(t,e[t],n)])));return{...e,...n}},Rm=(e,t,n)=>Pm.has(e)&&E(t)&&E(n)?{...t,...n}:n,Pm=new Set(["env",...Wi]),Nm=(e,t,n,r)=>{const o=(e,t,r)=>Nm(e,t,n,r),i=(...i)=>Cm({mapArguments:e,deepOptions:n,boundOptions:t,setBoundExeca:r,createNested:o},...i);return void 0!==r&&r(i,o,t),i},Cm=({mapArguments:e,deepOptions:t={},boundOptions:n={},setBoundExeca:r,createNested:o},i,...s)=>{if(E(i))return o(e,Im(n,i),r);const{file:a,commandArguments:c,options:l,isSync:u}=Am({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:n});return u?((e,t,n)=>{const{file:r,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=((e,t,n)=>{const{command:r,escapedCommand:o,startTime:i,verboseInfo:s}=Ls(e,t,n),a=Hp(n),{file:c,commandArguments:l,options:u}=wl(e,t,a);qp(u);const d=((e,t)=>Sd(Fd,e,t,!0))(u,s);return{file:c,commandArguments:l,command:r,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}})(e,t,n),d=Wp({file:r,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return wu(d,c,l)})(a,c,l):((e,t,n,r)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=_m(e,t,n),{subprocess:p,promise:f}=Om({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=uh.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:r}),((e,t)=>{for(const[n,r]of Em){const o=r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}})(p,f),hc.set(p,{options:u,fileDescriptors:d}),p})(a,c,l,o)},Am=({mapArguments:e,firstArgument:t,nextArguments:n,deepOptions:r,boundOptions:o})=>{const i=Array.isArray(s=t)&&Array.isArray(s.raw)?((e,t)=>{let n=[];for(const[i,s]of e.entries())n=Oi({templates:e,expressions:t,tokens:n,index:i,template:s});if(0===n.length)throw new TypeError("Template script must not be empty");const[r,...o]=n;return[r,o,{}]})(t,n):[t,...n];var s;const[a,c,l]=pi(...i),u=Im(Im(r,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:h=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:h}},$m=(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]=Dm(e);return{file:n,commandArguments:r}},Dm=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${e+""}.`);const t=e.trim();if(""===t)return[];const n=[];for(const r of t.split(Lm)){const e=n.at(-1);e&&e.endsWith("\\")?n[n.length-1]=`${e.slice(0,-1)} ${r}`:n.push(r)}return n},Lm=/ +/g,km=({options:e})=>({...Mm(e),isSync:!0}),Mm=e=>({options:{...jm(e),...e}}),jm=({input:e,inputFile:t,stdio:n})=>void 0===e&&void 0===t&&void 0===n?{stdin:"inherit"}:{},Um=Nm((()=>({}))),Fm=Nm((()=>({isSync:!0})));Nm((({file:e,commandArguments:t})=>$m(e,t))),Nm((({file:e,commandArguments:t})=>({...$m(e,t),isSync:!0}))),Nm((({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}})),Nm((({options:e})=>Mm(e)),{},{preferLocal:!0},((e,t,n)=>{e.sync=t(km,n),e.s=e.sync})),(()=>{const e=Dr,t=!0,n=void 0!==Dr.channel;cf(e,t,n),Zc.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})})();var Bm={},Gm={};const Hm=Br.promises,{access:qm,appendFile:Vm,chmod:Wm,chown:zm,copyFile:Xm,lchmod:Km,lchown:Ym,link:Jm,lstat:Qm,mkdir:Zm,mkdtemp:ey,open:ty,readdir:ny,readFile:ry,readlink:oy,realpath:iy,rename:sy,rmdir:ay,stat:cy,symlink:ly,truncate:uy,unlink:dy,utimes:py,writeFile:fy}=Br.promises,hy="rm"in Br.promises?Br.promises.rm:Rr.promisify(Br.unlink),my=n(Object.freeze(Object.defineProperty({__proto__:null,access:qm,appendFile:Vm,chmod:Wm,chown:zm,copyFile:Xm,default:Hm,lchmod:Km,lchown:Ym,link:Jm,lstat:Qm,mkdir:Zm,mkdtemp:ey,open:ty,readFile:ry,readdir:ny,readlink:oy,realpath:iy,rename:sy,rm:hy,rmdir:ay,stat:cy,symlink:ly,truncate:uy,unlink:dy,utimes:py,writeFile:fy},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.sync=Gm.isexe=void 0;const yy=_r,gy=my;Gm.isexe=async(e,t={})=>{const{ignoreErrors:n=!1}=t;try{return vy(await(0,gy.stat)(e),t)}catch(r){if(n||"EACCES"===r.code)return!1;throw r}},Gm.sync=(e,t={})=>{const{ignoreErrors:n=!1}=t;try{return vy((0,yy.statSync)(e),t)}catch(r){if(n||"EACCES"===r.code)return!1;throw r}};const vy=(e,t)=>e.isFile()&&wy(e,t),wy=(e,t)=>{var n,r,o,i,s,a,c,l;const u=null!=(r=t.uid)?r:null==(n=process.getuid)?void 0:n.call(process),d=null!=(s=null!=(i=t.groups)?i:null==(o=process.getgroups)?void 0:o.call(process))?s:[],p=null!=(l=null!=(c=t.gid)?c:null==(a=process.getgid)?void 0:a.call(process))?l:d[0];if(void 0===u||void 0===p)throw Error("cannot get uid or gid");const f=new Set([p,...d]),h=e.mode,m=e.uid,y=e.gid,g=parseInt("100",8),v=parseInt("010",8),w=g|v;return!!(h&parseInt("001",8)||h&v&&f.has(y)||h&g&&m===u||h&w&&0===u)};var by={};Object.defineProperty(by,"__esModule",{value:!0}),by.sync=by.isexe=void 0;const Ey=_r,_y=my;by.isexe=async(e,t={})=>{const{ignoreErrors:n=!1}=t;try{return Sy(await(0,_y.stat)(e),e,t)}catch(r){if(n||"EACCES"===r.code)return!1;throw r}},by.sync=(e,t={})=>{const{ignoreErrors:n=!1}=t;try{return Sy((0,Ey.statSync)(e),e,t)}catch(r){if(n||"EACCES"===r.code)return!1;throw r}};const Sy=(e,t,n)=>e.isFile()&&((e,t)=>{const{pathExt:n=process.env.PATHEXT||""}=t,r=n.split(";");if(-1!==r.indexOf(""))return!0;for(let o=0;r.length>o;o++){const t=r[o].toLowerCase(),n=e.substring(e.length-t.length).toLowerCase();if(t&&n===t)return!0}return!1})(t,n);var Oy={};Object.defineProperty(Oy,"__esModule",{value:!0}),function(e){var t=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(r,e,o);return n(r,e),r},o=Vr&&Vr.__exportStar||function(e,n){for(var r in e)"default"===r||{}.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;const i=r(Gm);e.posix=i;const s=r(by);e.win32=s,o(Oy,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Bm);const{isexe:xy,sync:Ty}=Bm,{join:Iy,delimiter:Ry,sep:Py,posix:Ny}=Sr,Cy="win32"===process.platform,Ay=RegExp(`[${Ny.sep}${Py===Ny.sep?"":Py}]`.replace(/(\\)/g,"\\$1")),$y=RegExp("^\\."+Ay.source),Dy=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Ly=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=Ry})=>{const o=e.match(Ay)?[""]:[...Cy?[process.cwd()]:[],...(t||"").split(r)];if(Cy){const t=n||[".EXE",".CMD",".BAT",".COM"].join(r),i=t.split(r).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},ky=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&$y.test(t)?t.slice(0,2):"")+Iy(n,t)},My=async(e,t={})=>{const{pathEnv:n,pathExt:r,pathExtExe:o}=Ly(e,t),i=[];for(const s of n){const n=ky(s,e);for(const e of r){const r=n+e;if(await xy(r,{pathExt:o,ignoreErrors:!0})){if(!t.all)return r;i.push(r)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Dy(e)};var jy=My;My.sync=(e,t={})=>{const{pathEnv:n,pathExt:r,pathExtExe:o}=Ly(e,t),i=[];for(const s of n){const n=ky(s,e);for(const e of r){const r=n+e;if(Ty(r,{pathExt:o,ignoreErrors:!0})){if(!t.all)return r;i.push(r)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Dy(e)};const Uy=t(jy);let Fy;const{isexe:By,sync:Gy}=Bm,{join:Hy,delimiter:qy,sep:Vy,posix:Wy}=Sr,zy="win32"===process.platform,Xy=RegExp(`[${Wy.sep}${Vy===Wy.sep?"":Vy}]`.replace(/(\\)/g,"\\$1")),Ky=RegExp("^\\."+Xy.source),Yy=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Jy=(e,{path:t=process.env.PATH,pathExt:n=process.env.PATHEXT,delimiter:r=qy})=>{const o=e.match(Xy)?[""]:[...zy?[process.cwd()]:[],...(t||"").split(r)];if(zy){const t=n||[".EXE",".CMD",".BAT",".COM"].join(r),i=t.split(r).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},Qy=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&Ky.test(t)?t.slice(0,2):"")+Hy(n,t)},Zy=async(e,t={})=>{const{pathEnv:n,pathExt:r,pathExtExe:o}=Jy(e,t),i=[];for(const s of n){const n=Qy(s,e);for(const e of r){const r=n+e;if(await By(r,{pathExt:o,ignoreErrors:!0})){if(!t.all)return r;i.push(r)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Yy(e)};var eg=Zy;Zy.sync=(e,t={})=>{const{pathEnv:n,pathExt:r,pathExtExe:o}=Jy(e,t),i=[];for(const s of n){const n=Qy(s,e);for(const e of r){const r=n+e;if(Gy(r,{pathExt:o,ignoreErrors:!0})){if(!t.all)return r;i.push(r)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Yy(e)};const tg=t(eg),ng=({env:e=Dr.env,...t}={})=>{const n=I({env:e={...e}});return t.path=e[n],e[n]=(({cwd:e=Dr.cwd(),path:t=Dr.env[I()],preferLocal:n=!0,execPath:r=Dr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?Lr.fileURLToPath(e):e,s=Sr.resolve(i),a=[];return n&&((e,t)=>{let n;for(;n!==t;)e.push(Sr.join(t,"node_modules/.bin")),n=t,t=Sr.resolve(t,"..")})(a,s),o&&((e,t,n)=>{const r=t instanceof URL?Lr.fileURLToPath(t):t;e.push(Sr.resolve(n,r,".."))})(a,r,s),[...a,t].join(Sr.delimiter)})(t),e},rg=(e,t,n,r)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!og(o,i)&&r||Object.defineProperty(e,n,i)},og=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},ig=(e,t)=>`/* Wrapped ${e}*/\n${t}`,sg=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ag=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),cg=new WeakMap,lg=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",i=function(...s){if(cg.set(i,++r),1===r)n=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return n};return function(e,t,{ignoreNonConfigurable:n=!1}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))rg(e,t,o,n);((e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)})(e,t),((e,t,n)=>{const r=""===n?"":`with ${n.trim()}() `,o=ig.bind(null,r,""+t);Object.defineProperty(o,"name",ag),Object.defineProperty(e,"toString",{...sg,value:o})})(e,t,r)}(i,e),cg.set(i,r),i};lg.callCount=e=>{if(!cg.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return cg.get(e)};const ug=(e,t)=>({name:"SIGRT"+(t+1),number:dg+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),dg=34,pg=[{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"}],fg=()=>{const e=Array.from({length:64-dg+1},ug);return[...pg,...e].map(hg)},hg=({name:e,number:t,description:n,action:r,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=br.constants,a=void 0!==s;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:o,standard:i}},mg=({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}],yg=(()=>{const e=fg();return Object.fromEntries(e.map(mg))})(),gg=(e,t)=>{const n=t.find((({name:t})=>br.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))};(()=>{const e=fg(),t=Array.from({length:65},((t,n)=>((e,t)=>{const n=gg(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)})();const vg=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d,cwd:p=Dr.cwd()}}})=>{const f=void 0===(o=null===o?void 0:o)?void 0:yg[o].description,h=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==n?"failed with "+n:void 0!==r?`was killed with ${r} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:d,errorCode:r&&r.code,signal:o,signalDescription:f,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,y="[object Error]"==={}.toString.call(r),g=y?`${m}\n${r.message}`:m,v=[g,t,e].filter(Boolean).join("\n");return y?(r.originalMessage=r.message,r.message=v):r=Error(v),r.shortMessage=g,r.command=s,r.escapedCommand=a,r.exitCode=i,r.signal=o,r.signalDescription=f,r.stdout=e,r.stderr=t,r.cwd=p,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=l,r.killed=u&&!c,r},wg=["stdin","stdout","stderr"];var bg,Eg={exports:{}},_g={exports:{}},Sg=Vr.process;const Og=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Og(Sg)){var xg,Tg=Cr,Ig=(bg||(bg=1,(Ug=_g).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&Ug.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Ug.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),_g.exports),Rg=/^win/i.test(Sg.platform),Pg=Ir;"function"!=typeof Pg&&(Pg=Pg.EventEmitter),Sg.__signal_exit_emitter__?xg=Sg.__signal_exit_emitter__:((xg=Sg.__signal_exit_emitter__=new Pg).count=0,xg.emitted={}),xg.infinite||(xg.setMaxListeners(1/0),xg.infinite=!0),Eg.exports=function(e,t){if(!Og(Vr.process))return function(){};Tg.equal(typeof e,"function","a callback must be provided for exit handler"),!1===$g&&Dg();var n="exit";return t&&t.alwaysLast&&(n="afterexit"),xg.on(n,e),function(){xg.removeListener(n,e),0===xg.listeners("exit").length&&0===xg.listeners("afterexit").length&&Ng()}};var Ng=function(){$g&&Og(Vr.process)&&($g=!1,Ig.forEach((function(e){try{Sg.removeListener(e,Ag[e])}catch(t){}})),Sg.emit=Mg,Sg.reallyExit=Lg,xg.count-=1)};Eg.exports.unload=Ng;var Cg=function(e,t,n){xg.emitted[e]||(xg.emitted[e]=!0,xg.emit(e,t,n))},Ag={};Ig.forEach((function(e){Ag[e]=function(){Og(Vr.process)&&Sg.listeners(e).length===xg.count&&(Ng(),Cg("exit",null,e),Cg("afterexit",null,e),Rg&&"SIGHUP"===e&&(e="SIGINT"),Sg.kill(Sg.pid,e))}})),Eg.exports.signals=function(){return Ig};var $g=!1,Dg=function(){!$g&&Og(Vr.process)&&($g=!0,xg.count+=1,Ig=Ig.filter((function(e){try{return Sg.on(e,Ag[e]),!0}catch(t){return!1}})),Sg.emit=jg,Sg.reallyExit=kg)};Eg.exports.load=Dg;var Lg=Sg.reallyExit,kg=function(e){Og(Vr.process)&&(Sg.exitCode=e||0,Cg("exit",Sg.exitCode,null),Cg("afterexit",Sg.exitCode,null),Lg.call(Sg,Sg.exitCode))},Mg=Sg.emit,jg=function(e,t){if("exit"===e&&Og(Vr.process)){void 0!==t&&(Sg.exitCode=t);var n=Mg.apply(this,arguments);return Cg("exit",Sg.exitCode,null),Cg("afterexit",Sg.exitCode,null),n}return Mg.apply(this,arguments)}}else Eg.exports=function(){return function(){}};var Ug;const Fg=t(Eg.exports),Bg=(e,t="SIGTERM",n={})=>{const r=e(t);return Gg(e,t,n,r),r},Gg=(e,t,n,r)=>{if(!Hg(t,n,r))return;const o=Vg(n),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Hg=(e,{forceKillAfterTimeout:t},n)=>qg(e)&&!1!==t&&n,qg=e=>e===br.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Vg=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||0>e)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Wg=(e,t)=>{e.kill()&&(t.isCanceled=!0)},zg=(e,t,n)=>{if("string"==typeof n)return e[t].pipe(_r.createWriteStream(n)),e;if(G(n))return e[t].pipe(n),e;if(!(e=>e instanceof Nr.ChildProcess&&"function"==typeof e.then)(n))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!G(n.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(n.stdin),n};var Xg={exports:{}};const{PassThrough:Kg}=kr,{constants:Yg}=$r,Jg=kr,{promisify:Qg}=Rr,Zg=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const r="buffer"===n;let o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);const i=new Kg({objectMode:o});n&&i.setEncoding(n);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:r?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},ev=Qg(Jg.pipeline);class tv extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Xg.exports=H,Xg.exports.buffer=(e,t)=>H(e,{...t,encoding:"buffer"}),Xg.exports.array=(e,t)=>H(e,{...t,array:!0}),Xg.exports.MaxBufferError=tv;const nv=t(Xg.exports),{PassThrough:rv}=kr,ov=t((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(n.push(o),o.once("end",t.bind(null,o)),o.once("error",r.emit.bind(r,"error")),o.pipe(r,{end:!1}),this)}function t(e){!(n=n.filter((function(t){return t!==e}))).length&&r.readable&&r.end()}var n=[],r=new rv({objectMode:!0});return r.setMaxListeners(0),r.add=e,r.isEmpty=function(){return 0==n.length},r.on("unpipe",t),[].slice.call(arguments).forEach(e),r})),iv=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},sv=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(n){return n.bufferedData}}},av=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?nv(e,{encoding:t,maxBuffer:r}):nv.buffer(e,{maxBuffer:r})},cv=(async()=>{})().constructor.prototype,lv=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(cv,e)])),uv=(e,t)=>{for(const[n,r]of lv){const o="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}},dv=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],pv=/^[\w.-]+$/,fv=/"/g,hv=(e,t)=>dv(e,t).join(" "),mv=(e,t)=>dv(e,t).map((e=>(e=>"string"!=typeof e||pv.test(e)?e:`"${e.replace(fv,'\\"')}"`)(e))).join(" "),yv=/ +/g,gv=e=>{const t=[];for(const n of e.trim().split(yv)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t},vv=Rr.debuglog("execa").enabled,wv=(e,t)=>(e+"").padStart(t,"0"),bv=(e,{verbose:t})=>{t&&Dr.stderr.write(`[${(()=>{const e=new Date;return`${wv(e.getHours(),2)}:${wv(e.getMinutes(),2)}:${wv(e.getSeconds(),2)}.${wv(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Ev=(e,t,n={})=>{const r=ga._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||Dr.cwd(),execPath:Dr.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:vv,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const i=t?{...Dr.env,...e}:e;return n?ng({env:i,cwd:r,execPath:o}):i})(n),n.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return wg.map((t=>e[t]));if((e=>wg.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+wg.map((e=>`\`${e}\``)).join(", "));if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);return Array.from({length:Math.max(t.length,wg.length)},((e,n)=>t[n]))})(n),"win32"===Dr.platform&&"cmd"===Sr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},_v=(e,t,n)=>"string"==typeof t||$r.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\r":13;return e[e.length-1]===("string"==typeof e?"\n":10)&&(e=e.slice(0,-1)),e[e.length-1]===t&&(e=e.slice(0,-1)),e}(t):t:void 0===n?void 0:"";var Sv,Ov={};W(Ov,"hasSudo",(()=>z)),W(Ov,"isRoot",(()=>X)),W(Ov,"isSudo",(()=>K)),W(Ov,"prependSudo",(()=>Y)),W(Ov,"defaultExecOptions",(()=>xv)),W(Ov,"execRootSync",(()=>J)),W(Ov,"execRoot",(()=>Q));let xv={stdio:"inherit",shell:!0};W(Sv={},"isAdminWindows",(()=>Tv)),W(Sv,"isAdminPosix",(()=>Iv)),W(Sv,"isAdmin",(()=>te));let Tv=async function(){var e;if("win32"!==process.platform)return!1;try{return await q("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await q("fltmc"),!0}catch{return!1}}()}},Iv=X;W({},"grantUserWriteAccess",(()=>ne));var Rv,Pv,Nv,Cv,Av,$v,Dv,Lv,kv,Mv,jv,Uv,Fv,Bv,Gv=function(e){return null!=e},Hv=Gv,qv=[].forEach,Vv=Object.create,Wv=function(e){var t=Vv(null);return qv.call(arguments,(function(e){Hv(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)})),t},zv="function"==typeof(Nv=Math.sign)&&1===Nv(10)&&-1===Nv(-20)?Math.sign:Pv?Rv:(Pv=1,Rv=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}),Xv=Math.abs,Kv=Math.floor,Yv=Math.max,Jv=function(e){return Yv(0,function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?zv(e)*Kv(Xv(e)):e}(e))},Qv=Jv,Zv=function(e,t,n){var r;return isNaN(e)?0>(r=t)?1:n&&r?r-1:r:!1!==e&&Qv(e)},ew=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},tw=Gv,nw=function(e){if(!tw(e))throw new TypeError("Cannot use null or undefined");return e},rw=ew,ow=nw,iw=function(){}.bind,sw=function(){}.call,aw=Object.keys,cw={}.propertyIsEnumerable,lw=(Cv="forEach",function(e,t){var n,r=arguments[2],o=arguments[3];return e=Object(ow(e)),rw(t),n=aw(e),o&&n.sort("function"==typeof o?iw.call(o,e):void 0),"function"!=typeof Cv&&(Cv=n[Cv]),sw.call(Cv,n,(function(n,o){return cw.call(e,n)?sw.call(t,r,e[n],n,e,o):undefined}))}),uw={},dw={exports:{}},pw="function"==typeof(Bv=Object.assign)&&(Bv(Fv={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Fv.foo+Fv.bar+Fv.trzy==="razdwatrzy")?Object.assign:function(){if(Uv)return jv;Uv=1;var e=Mv?kv:(Mv=1,kv=($v?Av:($v=1,Av=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Lv)return Dv;Lv=1;var e=Gv,t=Object.keys;return Dv=function(n){return t(e(n)?Object(n):n)}}()),t=nw,n=Math.max;return jv=function(r,o){var i,s,a,c=n(arguments.length,2);for(r=Object(t(r)),a=function(e){try{r[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return r},jv}(),fw=Gv,hw={function:!0,object:!0},mw=function(e){return fw(e)&&hw[typeof e]||!1};!function(e){var t=pw,n=mw,r=Gv,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),a=arguments[1],c=arguments[2];return r(c)||n(a)&&(c=a,a=null),r(c)&&t(s,c),r(a)&&(s.code=a),o&&o(s,e.exports),s}}(dw);var yw,gw,vw,ww,bw=dw.exports,Ew={exports:{}},_w=Jv;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(iR){}ww=re(),vw=function(){var e=[];return function(t){var n,r=0;if(e[t])return e[t];for(n=[];t--;)n.push("a"+(++r).toString(36));return Function("fn","return function ("+n.join(", ")+") { return fn.apply(this, arguments); };")}}(),Ew.exports=function(e,t){var n;if(t=_w(t),e.length===t)return e;n=vw(t)(e);try{ww(n,e)}catch(iR){}return n};var Sw,Ow,xw=Ew.exports,Tw={exports:{}},Iw=function(e){return null!=e},Rw=Iw,Pw={object:!0,function:!0,undefined:!0},Nw=function(e){if(!function(e){return!!Rw(e)&&hasOwnProperty.call(Pw,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},Cw=/^\s*class[\s{/}]/,Aw=function(){}.toString,$w="razdwatrzy",Dw="function"==typeof $w.contains&&!0===$w.contains("dwa")&&!1===$w.contains("foo")?"".contains:function(){if(Ow)return Sw;Ow=1;var e="".indexOf;return Sw=function(t){return e.call(this,t,arguments[1])>-1}}(),Lw=Iw,kw=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!Nw(e)}(e)&&!Cw.test(Aw.call(e))},Mw=pw,jw=Wv,Uw=Dw;(Tw.exports=function(e,t){var n,r,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],Lw(e)?(n=Uw.call(e,"c"),r=Uw.call(e,"e"),o=Uw.call(e,"w")):(n=o=!0,r=!1),s={value:t,configurable:n,enumerable:r,writable:o},i?Mw(jw(i),s):s}).gs=function(e,t,n){var r,o,i,s;return"string"!=typeof e?(i=n,n=t,t=e,e=null):i=arguments[3],Lw(t)?kw(t)?Lw(n)?kw(n)||(i=n,n=void 0):n=void 0:(i=t,t=n=void 0):t=void 0,Lw(e)?(r=Uw.call(e,"c"),o=Uw.call(e,"e")):(r=!0,o=!1),s={get:t,set:n,configurable:r,enumerable:o},i?Mw(jw(i),s):s};var Fw=Tw.exports,Bw={exports:{}};!function(e,t){var n,r,o,i,s,a,c,l=Fw,u=ew,d=function(){}.apply,p=function(){}.call,f=Object.create,h=Object.defineProperty,m=Object.defineProperties,y={}.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r,i;return u(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(u(t),!y.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((n=arguments.length)-1),t=1;n>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:p.call(o,this);break;case 2:p.call(o,this,arguments[1]);break;case 3:p.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((n=arguments.length)-1),t=1;n>t;++t)i[t-1]=arguments[t];d.call(o,this,i)}},s={on:n=function(e,t){var n;return u(t),y.call(this,"__ee__")?n=this.__ee__:(n=g.value=f(null),h(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o,emit:i},a={on:l(n),once:l(r),off:l(o),emit:l(i)},c=m({},a),e.exports=t=function(e){return null==e?f(c):m(Object(e),a)},t.methods=s}(Bw,Bw.exports);var Gw,Hw,qw,Vw,Ww,zw,Xw,Kw,Yw,Jw,Qw,Zw,eb,tb,nb,rb,ob,ib,sb,ab,cb,lb,ub,db,pb,fb,hb,mb,yb,gb,vb,wb,bb,Eb,_b,Sb=Bw.exports,Ob=ae(),xb=Array.isArray,Tb=Gv,Ib=ew,Rb=[].slice;_b=function(e){return this.map((function(t,n){return t?t(e[n]):e[n]})).concat(Rb.call(e,this.length))};var Pb,Nb,Cb,Ab,$b,Db,Lb,kb,Mb,jb,Ub,Fb,Bb,Gb,Hb,qb,Vb,Wb,zb,Xb,Kb,Yb,Jb,Qb,Zb,eE,tE,nE,rE,oE,iE,sE,aE,cE,lE,uE,dE,pE,fE,hE,mE,yE,gE,vE,wE,bE,EE,_E=ew,SE=bw,OE=xw,xE=Fw,TE=Sb.methods,IE=function(e){return(t=e,e=xb(t)?t:Ob(t)).forEach((function(e){Tb(e)&&Ib(e)})),_b.bind(e);var t},RE=function(){}.apply,PE=function(){}.call,NE=Object.create,CE=Object.defineProperties,AE=TE.on,$E=TE.emit,DE=ew,LE=lw,kE=uw,ME=function(e,t,n){var r,o,i,s,a,c,l,u,d,p,f,h,m,y,g,v=NE(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,n.normalizer&&(p=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:_E(e.get)},void 0!==e.set?(t.set=_E(e.set),e.delete&&(t.delete=_E(e.delete)),e.clear&&(t.clear=_E(e.clear)),t):(t.set=t.get,t))}(n.normalizer),i=p.get,s=p.set,a=p.delete,c=p.clear),null!=n.resolvers&&(g=IE(n.resolvers)),y=i?OE((function(t){var n,o,a=arguments;if(g&&(a=g(a)),null!==(n=i(a))&&hasOwnProperty.call(v,n))return f&&r.emit("get",n,a,this),v[n];if(o=1===a.length?PE.call(e,this,a[0]):RE.call(e,this,a),null===n){if(null!==(n=i(a)))throw SE("Circular invocation","CIRCULAR_INVOCATION");n=s(a)}else if(hasOwnProperty.call(v,n))throw SE("Circular invocation","CIRCULAR_INVOCATION");return v[n]=o,h&&r.emit("set",n,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(v,"data"))return f&&r.emit("get","data",arguments,this),v.data;if(t=arguments.length?RE.call(e,this,arguments):PE.call(e,this),hasOwnProperty.call(v,"data"))throw SE("Circular invocation","CIRCULAR_INVOCATION");return v.data=t,h&&r.emit("set","data",null,t),t}:function(t){var n,o,i=arguments;if(g&&(i=g(arguments)),o=i[0]+"",hasOwnProperty.call(v,o))return f&&r.emit("get",o,i,this),v[o];if(n=1===i.length?PE.call(e,this,i[0]):RE.call(e,this,i),hasOwnProperty.call(v,o))throw SE("Circular invocation","CIRCULAR_INVOCATION");return v[o]=n,h&&r.emit("set",o,null,n),n},r={original:e,memoized:y,profileName:n.profileName,get:function(e){return g&&(e=g(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(v,e)},delete:function(e){var t;hasOwnProperty.call(v,e)&&(a&&a(e),t=v[e],delete v[e],m&&r.emit("delete",e,t))},clear:function(){var e=v;c&&c(),v=NE(null),r.emit("clear",e)},on:function(e,t){return"get"===e?f=!0:"set"===e?h=!0:"delete"===e&&(m=!0),AE.call(this,e,t)},emit:$E,updateEnv:function(){e=r.original}},l=i?OE((function(e){var t,n=arguments;g&&(n=g(n)),null!==(t=i(n))&&r.delete(t)}),o):0===t?function(){return r.delete("data")}:function(e){return g&&(e=g(arguments)[0]),r.delete(e)},u=OE((function(){var e,n=arguments;return 0===t?v.data:(g&&(n=g(n)),e=i?i(n):n[0]+"",v[e])})),d=OE((function(){var e,n=arguments;return 0===t?r.has("data"):(g&&(n=g(n)),null!==(e=i?i(n):n[0]+"")&&r.has(e))})),CE(y,{__memoized__:xE(!0),delete:xE(l),clear:xE(r.clear),_get:xE(u),_has:xE(d)}),r},jE=Zv,UE={},FE={},BE={exports:{}},GE={},HE={},qE={},VE={},WE=Wv,zE=Zv,XE=function e(t){var n,r,o;if(DE(t),(n=Object(arguments[1])).async&&n.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!n.force?t:(r=jE(n.length,t.length,n.async&&kE.async),o=ME(t,r,n),LE(kE,(function(e,t){n[t]&&e(n[t],o,n)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},KE=function(e){var t,n=WE(arguments[1]);return n.normalizer||0!==(t=n.length=zE(n.length,e.length,n.async))&&(n.primitive?!1===t?n.normalizer=(Nb||(Nb=1,Pb=function(e){var t,n,r=e.length;if(!r)return"";for(t=e[n=0]+"";--r;)t+=""+e[++n];return t}),Pb):t>1&&(n.normalizer=(Ab||(Ab=1,Cb=function(e){return e?function(t){for(var n=t[0]+"",r=0,o=e;--o;)n+=""+t[++r];return n}:function(){return""}}),Cb)(t)):n.normalizer=!1===t?function(){if(Gb)return Bb;Gb=1;var e=ce(),t=Object.create;return Bb=function(){var n=0,r=[],o=t(null);return{get:function(t){var n,o=0,i=r,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(n=e.call(i[0],t[o])))return null;i=i[1][n],++o}return-1===(n=e.call(i[0],t[o]))?null:i[1][n]||null}return null},set:function(t){var i,s=0,a=r,c=t.length;if(0===c)a[c]=++n;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++n}return o[n]=t,n},delete:function(t){var n,i=0,s=r,a=o[t],c=a.length,l=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(n=e.call(s[0],a[i])))return;l.push(s,n),s=s[1][n],++i}if(-1===(n=e.call(s[0],a[i])))return;for(t=s[1][n],s[0].splice(n,1),s[1].splice(n,1);!s[0].length&&l.length;)n=l.pop(),(s=l.pop())[0].splice(n,1),s[1].splice(n,1)}delete o[t]},clear:function(){r=[],o=t(null)}}},Bb}()():1===t?function(){if(qb)return Hb;qb=1;var e=ce();return Hb=function(){var t=0,n=[],r=[];return{get:function(t){var o=e.call(n,t[0]);return-1===o?null:r[o]},set:function(e){return n.push(e[0]),r.push(++t),t},delete:function(t){var o=e.call(r,t);-1!==o&&(n.splice(o,1),r.splice(o,1))},clear:function(){n=[],r=[]}}}}()():function(){if(Wb)return Vb;Wb=1;var e=ce(),t=Object.create;return Vb=function(n){var r=0,o=[[],[]],i=t(null);return{get:function(t){for(var r,i=0,s=o;n-1>i;){if(-1===(r=e.call(s[0],t[i])))return null;s=s[1][r],++i}return-1===(r=e.call(s[0],t[i]))?null:s[1][r]||null},set:function(t){for(var s,a=0,c=o;n-1>a;)-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1,c[1].push([[],[]])),c=c[1][s],++a;return-1===(s=e.call(c[0],t[a]))&&(s=c[0].push(t[a])-1),c[1][s]=++r,i[r]=t,r},delete:function(t){for(var r,s=0,a=o,c=[],l=i[t];n-1>s;){if(-1===(r=e.call(a[0],l[s])))return;c.push(a,r),a=a[1][r],++s}if(-1!==(r=e.call(a[0],l[s]))){for(t=a[1][r],a[0].splice(r,1),a[1].splice(r,1);!a[0].length&&c.length;)r=c.pop(),(a=c.pop())[0].splice(r,1),a[1].splice(r,1);delete i[t]}},clear:function(){o=[[],[]],i=t(null)}}},Vb}()(t)),n.async&&function(){if(Jb)return UE;Jb=1;var e=ae(),t=le(),n=re(),r=xw,o=ue(),i=[].slice,s=function(){}.apply,a=Object.create;uw.async=function(c,l){var u,d,p,f=a(null),h=a(null),m=l.memoized,y=l.original;l.memoized=r((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(u=n,t=i.call(t,0,-1)),m.apply(d=this,p=t)}),m);try{n(l.memoized,m)}catch(iR){}l.on("get",(function(e){var t,n,r;if(u){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],u]:f[e].push(u),void(u=null);t=u,n=d,r=p,u=d=p=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],l.emit("getasync",e,r,n),s.call(t,o.context,o.args)):(u=t,d=n,p=r,m.apply(n,r))}))}})),l.original=function(){var t,n,r,i;return u?(t=e(arguments),n=function t(n){var r,a,c=t.id;if(null!=c){if(delete t.id,r=f[c],delete f[c],r)return a=e(arguments),l.has(c)&&(n?l.delete(c):(h[c]={context:this,args:a},l.emit("setasync",c,"function"==typeof r?1:r.length))),"function"==typeof r?i=s.call(r,this,a):r.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},r=u,u=d=p=null,t.push(n),i=s.call(y,this,t),n.cb=r,u=n,i):s.call(y,this,arguments)},l.on("set",(function(e){u?(f[e]?"function"==typeof f[e]?f[e]=[f[e],u.cb]:f[e].push(u.cb):f[e]=u.cb,delete u.cb,u.id=e,u=null):l.delete(e)})),l.on("delete",(function(e){var t;hasOwnProperty.call(f,e)||h[e]&&(t=h[e],delete h[e],l.emit("deleteasync",e,i.call(t.args,1)))})),l.on("clear",(function(){var e=h;h=a(null),l.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),n.promise&&fe(),n.dispose&&function(){if(pE)return GE;pE=1;var e=ew,t=lw,n=uw,r=function(){}.apply;n.dispose=function(o,i,s){var a;if(e(o),s.async&&n.async||s.promise&&n.promise)return i.on("deleteasync",a=function(e,t){r.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),n.maxAge&&function(){if(gE)return HE;gE=1;var e=ae(),t=lw,n=ue(),r=pe(),o=function(){if(yE)return mE;yE=1;var e=Jv,t=hE?fE:(hE=1,fE=2147483647);return mE=function(n){if((n=e(n))>t)throw new TypeError(n+" exceeds maximum possible timeout");return n}}(),i=uw,s=Function.prototype,a=Math.max,c=Math.min,l=Object.create;i.maxAge=function(u,d,p){var f,h,m,y;(u=o(u))&&(f=l(null),d.on("set"+(h=p.async&&i.async||p.promise&&i.promise?"async":""),(function(e){f[e]=setTimeout((function(){d.delete(e)}),u),"function"==typeof f[e].unref&&f[e].unref(),y&&(y[e]&&"nextTick"!==y[e]&&clearTimeout(y[e]),y[e]=setTimeout((function(){delete y[e]}),m),"function"==typeof y[e].unref&&y[e].unref())})),d.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],y&&("nextTick"!==y[e]&&clearTimeout(y[e]),delete y[e])})),p.preFetch&&(m=!0===p.preFetch||isNaN(p.preFetch)?.333:a(c(Number(p.preFetch),1),0))&&(y={},m=(1-m)*u,d.on("get"+h,(function(t,o,i){y[t]||(y[t]="nextTick",n((function(){var n;"nextTick"===y[t]&&(delete y[t],d.delete(t),p.async&&(o=e(o)).push(s),n=d.memoized.apply(i,o),p.promise&&r(n)&&("function"==typeof n.done?n.done(s,s):n.then(s,s)))})))}))),d.on("clear"+h,(function(){t(f,(function(e){clearTimeout(e)})),f={},y&&(t(y,(function(e){"nextTick"!==e&&clearTimeout(e)})),y={})})))}}(),n.max&&function(){if(bE)return qE;bE=1;var e=Jv,t=function(){if(wE)return vE;wE=1;var e=Jv,t=Object.create,n={}.hasOwnProperty;return vE=function(r){var o,i=0,s=1,a=t(null),c=t(null),l=0;return r=e(r),{hit:function(e){var t=c[e],u=++l;if(a[u]=e,c[e]=u,!t){if(++i,r>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!n.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return l=0,void(s=1);for(;!n.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),l=0}}}}(),n=uw;n.max=function(r,o,i){var s,a,c;(r=e(r))&&(a=t(r),o.on("set"+(s=i.async&&n.async||i.promise&&n.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),n.refCounter&&function(){if(EE)return VE;EE=1;var e=Fw,t=uw,n=Object.create,r=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=n(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),r(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),XE(e,n)};const YE=t(KE),JE=/^~(?=$|\/|\\)/,{appendFile:QE,readFile:ZE,writeFile:e_}=_r.promises,t_=me("~/.bashrc"),n_=YE((async function(e){const t=void 0===e.guard?`\nsource "${e.rcPath}"\n`:`\n# ${e.guard}\nif [[ "$SOURCE_${e.guard.toUpperCase()}RC" != 0 && -f "${e.rcPath}" ]]; then source "${e.rcPath}"; fi\n`;try{await Promise.all([ye(e),ge(t,me("~/.bashrc")),ge(t,me("~/.profile"))])}catch(n){v(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${n}`)}}),{promise:!0}),r_=br,o_="win32"!==r_.platform(),i_=r_.release(),s_=/(\d+\.\d+)\.(\d+)/,a_=t((function(e){return o_?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...s_.exec(i_).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var c_,l_,u_,d_,p_={exports:{}};u_=function(){if(l_)return c_;l_=1;var e=/[|\\{}()[\]^$+*?.]/g;return c_=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),d_=function(e){return e.split("").reverse().join("")},p_.exports=function(e,t,n){var r;return null==t&&(t="'"),null==n&&(n="\\"),"string"!=typeof e?e:(r=RegExp("(["+u_(t)+"])(?!"+u_(n)+")","g"),d_(d_(e).replace(r,"$1"+n)))};const f_=t(p_.exports),{GITHUB_ACTIONS:h_}=Xr,{appendFile:m_}=_r.promises,{GITHUB_ACTIONS:y_}=Xr,{appendFile:g_}=_r.promises,v_=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var w_={exports:{}};!function(e){!function(){function t(e,t,o){if(n(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=r[e](t);return void 0!==o[i]?o[i]:null}function n(e){(function(e){return void 0!==r[e]})(e)||function(e){try{_e(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var r={};e.exports={create:function(e){return n(e),{pluralize:function(n,r){return t(e,n,r)}}},addLocale:function(e,t){r[e]=t},pluralize:t}}()}(w_);var b_=w_.exports,E_=b_;const __=t(E_);var S_={};b_.addLocale("en",(function(e){var t=Math.floor(Math.abs(e)),n=(""+e).replace(/^[^.]*\.?/,"").length;return"string"==typeof e&&(e=parseInt(e,10)),1===t&&0===n?"one":"other"}));var O_={exports:{}};O_.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const x_=E_,T_=O_.exports,I_=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],R_={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},P_={},N_=t({create:function(e){return e=Object.assign({},R_,e||{}),{format:function(t,n,r){return function(e,t,n){if(function(e,t){const{autoload:n}=t;if(!P_[e]){if(!T_||!n)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{Se(_e(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(n.locale,{autoload:n.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const r=function(e,t){let n=t-e;const r=[];return I_.some((function(e){const t=e[0],o=e[1],i=Math.floor(n/o);if(n-=i*o,r.push([t,i]),0>=n)return!0})),r}(e,t),o=[];for(const i of r){const[e,t]=i;if(t>0&&o.push(Oe(e,t,n)),o.length>=n.span)break}return o.join(n.delimiter)}(t,n,r=Object.assign({},e,r||{}))}}},addLocale:Se,defaultConfig:R_}),C_=t({id:"en",data:{long:{years:{one:"{0} year",other:"{0} years"},months:{one:"{0} month",other:"{0} months"},weeks:{one:"{0} week",other:"{0} weeks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hour",other:"{0} hours"},minutes:{one:"{0} minute",other:"{0} minutes"},seconds:{one:"{0} second",other:"{0} seconds"}},narrow:{years:{one:"{0}y",other:"{0}y"},months:{one:"{0}m",other:"{0}m"},weeks:{one:"{0}w",other:"{0}w"},days:{one:"{0}d",other:"{0}d"},hours:{one:"{0}h",other:"{0}h"},minutes:{one:"{0}m",other:"{0}m"},seconds:{one:"{0}s",other:"{0}s"}},short:{years:{one:"{0} yr",other:"{0} yrs"},months:{one:"{0} mth",other:"{0} mths"},weeks:{one:"{0} wk",other:"{0} wks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hr",other:"{0} hr"},minutes:{one:"{0} min",other:"{0} min"},seconds:{one:"{0} sec",other:"{0} sec"}}}});var A_={exports:{}},$_={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},D_="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=$_,i=D_,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[d,r]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(t+"*").join(`${t}{0,${n}}`).split(t+"+").join(`${t}{1,${n}}`);return e})(t),o=u++;i(e,o,t),l[e]=o,c[o]=t,s[o]=RegExp(t,n?"g":void 0),a[o]=RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",d+"+"),f("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),f("FULL",`^${c[l.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),f("LOOSE",`^${c[l.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),f("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),f("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),f("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),f("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),f("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[l.COERCE],!0),f("COERCERTLFULL",c[l.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(A_,A_.exports);var L_=A_.exports;const k_=Object.freeze({loose:!0}),M_=Object.freeze({});var j_=e=>e?"object"!=typeof e?k_:e:M_;const U_=/^[0-9]+$/,F_=(e,t)=>{const n=U_.test(e),r=U_.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:t>e?-1:1};var B_={compareIdentifiers:F_,rcompareIdentifiers:(e,t)=>F_(t,e)};const G_=D_,{MAX_LENGTH:H_,MAX_SAFE_INTEGER:q_}=$_,{safeRe:V_,t:W_}=L_,z_=j_,{compareIdentifiers:X_}=B_;var K_=class e{constructor(t,n){if(n=z_(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>H_)throw new TypeError(`version is longer than ${H_} characters`);G_("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?V_[W_.LOOSE]:V_[W_.FULL]);if(!r)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>q_||0>this.major)throw new TypeError("Invalid major version");if(this.minor>q_||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>q_||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&q_>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(G_("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),X_(this.major,t.major)||X_(this.minor,t.minor)||X_(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(G_("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return X_(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(G_("build compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return X_(e,r)}while(++n)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===X_(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}};const Y_=K_;var J_=(e,t,n=!1)=>{if(e instanceof Y_)return e;try{return new Y_(e,t)}catch(r){if(!n)return null;throw r}};const Q_=J_;var Z_=(e,t)=>{const n=Q_(e,t);return n?n.version:null};const eS=t(Z_),tS=J_;const nS=K_;const rS=J_;const oS=K_;var iS=(e,t)=>new oS(e,t).major;const sS=t(iS),aS=K_;const cS=K_;const lS=J_;const uS=K_;var dS=(e,t,n)=>new uS(e,n).compare(new uS(t,n));const pS=t(dS),fS=dS;const hS=dS;const mS=K_;var yS=(e,t,n)=>{const r=new mS(e,n),o=new mS(t,n);return r.compare(o)||r.compareBuild(o)};const gS=yS;const vS=yS;const wS=dS;var bS=(e,t,n)=>wS(e,t,n)>0;const ES=dS;var _S=(e,t,n)=>0>ES(e,t,n);const SS=dS;var OS=(e,t,n)=>0===SS(e,t,n);const xS=dS;var TS=(e,t,n)=>0!==xS(e,t,n);const IS=dS;var RS=(e,t,n)=>IS(e,t,n)>=0;const PS=dS;var NS=(e,t,n)=>0>=PS(e,t,n);const CS=t(NS),AS=OS,$S=TS,DS=bS,LS=RS,kS=_S,MS=NS;var jS=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return AS(e,n,r);case"!=":return $S(e,n,r);case">":return DS(e,n,r);case">=":return LS(e,n,r);case"<":return kS(e,n,r);case"<=":return MS(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const US=K_,FS=J_,{safeRe:BS,t:GS}=L_;var HS=(e,t)=>{if(e instanceof US)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?BS[GS.COERCERTLFULL]:BS[GS.COERCERTL];let o;for(;(o=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&o.index+o[0].length===n.index+n[0].length||(n=o),r.lastIndex=o.index+o[1].length+o[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?BS[GS.COERCEFULL]:BS[GS.COERCE]);return null===n?null:FS(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}${t.includePrerelease&&n[5]?"-"+n[5]:""}${t.includePrerelease&&n[6]?"+"+n[6]:""}`,t)};const qS=t(HS);var VS,WS,zS,XS,KS=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};const YS=xe();var JS=(e,t,n)=>{try{t=new YS(t,n)}catch(r){return!1}return t.test(e)};const QS=t(JS),ZS=xe();const eO=K_,tO=xe();const nO=K_,rO=xe();const oO=K_,iO=xe(),sO=bS;const aO=xe();const cO=K_,lO=Te(),{ANY:uO}=lO,dO=xe(),pO=JS,fO=bS,hO=_S,mO=NS,yO=RS;var gO=(e,t,n,r)=>{let o,i,s,a,c;switch(e=new cO(e,r),t=new dO(t,r),n){case">":o=fO,i=mO,s=hO,a=">",c=">=";break;case"<":o=hO,i=yO,s=fO,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pO(e,t,r))return!1;for(let l=0;t.set.length>l;++l){let n=null,u=null;if(t.set[l].forEach((e=>{e.semver===uO&&(e=new lO(">=0.0.0")),n=n||e,u=u||e,o(e.semver,n.semver,r)?n=e:s(e.semver,u.semver,r)&&(u=e)})),n.operator===a||n.operator===c)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;if(u.operator===c&&s(e,u.semver))return!1}return!0};const vO=gO;const wO=gO;const bO=xe();const EO=JS,_O=dS,SO=xe(),OO=Te(),{ANY:xO}=OO,TO=JS,IO=dS,RO=[new OO(">=0.0.0-0")],PO=[new OO(">=0.0.0")],NO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===xO){if(1===t.length&&t[0].semver===xO)return!0;e=n.includePrerelease?RO:PO}if(1===t.length&&t[0].semver===xO){if(n.includePrerelease)return!0;t=PO}const r=new Set;let o,i,s,a,c,l,u;for(const f of e)">"===f.operator||">="===f.operator?o=CO(o,f,n):"<"===f.operator||"<="===f.operator?i=AO(i,f,n):r.add(f.semver);if(r.size>1)return null;if(o&&i){if(s=IO(o.semver,i.semver,n),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const f of r){if(o&&!TO(f,o+"",n))return null;if(i&&!TO(f,i+"",n))return null;for(const e of t)if(!TO(f,e+"",n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,p=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const f of t){if(u=u||">"===f.operator||">="===f.operator,l=l||"<"===f.operator||"<="===f.operator,o)if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),">"===f.operator||">="===f.operator){if(a=CO(o,f,n),a===f&&a!==o)return!1}else if(">="===o.operator&&!TO(o.semver,f+"",n))return!1;if(i)if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),"<"===f.operator||"<="===f.operator){if(c=AO(i,f,n),c===f&&c!==i)return!1}else if("<="===i.operator&&!TO(i.semver,f+"",n))return!1;if(!f.operator&&(i||o)&&0!==s)return!1}return!(o&&l&&!i&&0!==s||i&&u&&!o&&0!==s||p||d)},CO=(e,t,n)=>{if(!e)return t;const r=IO(e.semver,t.semver,n);return r>0?e:0>r||">"===t.operator&&">="===e.operator?t:e},AO=(e,t,n)=>{if(!e)return t;const r=IO(e.semver,t.semver,n);return 0>r?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};const $O=L_,DO=$_,LO=K_,kO=B_;var MO={parse:J_,valid:Z_,clean:(e,t)=>{const n=tS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},inc:(e,t,n,r,o)=>{"string"==typeof n&&(o=r,r=n,n=void 0);try{return new nS(e instanceof nS?e.version:e,n).inc(t,r,o).version}catch(i){return null}},diff:(e,t)=>{const n=rS(e,null,!0),r=rS(t,null,!0),o=n.compare(r);if(0===o)return null;const i=o>0,s=i?n:r,a=i?r:n,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return n.major!==r.major?l+"major":n.minor!==r.minor?l+"minor":n.patch!==r.patch?l+"patch":"prerelease"},major:iS,minor:(e,t)=>new aS(e,t).minor,patch:(e,t)=>new cS(e,t).patch,prerelease:(e,t)=>{const n=lS(e,t);return n&&n.prerelease.length?n.prerelease:null},compare:dS,rcompare:(e,t,n)=>fS(t,e,n),compareLoose:(e,t)=>hS(e,t,!0),compareBuild:yS,sort:(e,t)=>e.sort(((e,n)=>gS(e,n,t))),rsort:(e,t)=>e.sort(((e,n)=>vS(n,e,t))),gt:bS,lt:_S,eq:OS,neq:TS,gte:RS,lte:NS,cmp:jS,coerce:HS,Comparator:Te(),Range:xe(),satisfies:JS,toComparators:(e,t)=>new ZS(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,n)=>{let r=null,o=null,i=null;try{i=new tO(t,n)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new eO(r,n)))})),r},minSatisfying:(e,t,n)=>{let r=null,o=null,i=null;try{i=new rO(t,n)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new nO(r,n)))})),r},minVersion:(e,t)=>{e=new iO(e,t);let n=new oO("0.0.0");if(e.test(n))return n;if(n=new oO("0.0.0-0"),e.test(n))return n;n=null;for(let r=0;e.set.length>r;++r){let t=null;e.set[r].forEach((e=>{const n=new oO(e.semver.version);switch(e.operator){case">":0===n.prerelease.length?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":t&&!sO(n,t)||(t=n);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||n&&!sO(n,t)||(n=t)}return n&&e.test(n)?n:null},validRange:(e,t)=>{try{return new aO(e,t).range||"*"}catch(n){return null}},outside:gO,gtr:(e,t,n)=>vO(e,t,">",n),ltr:(e,t,n)=>wO(e,t,"<",n),intersects:(e,t,n)=>(e=new bO(e,n),t=new bO(t,n),e.intersects(t,n)),simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const s=e.sort(((e,t)=>_O(e,t,n)));for(const l of s)EO(l,t,n)?(i=l,o||(o=l)):(i&&r.push([o,i]),i=null,o=null);o&&r.push([o,null]);const a=[];for(const[l,u]of r)a.push(l===u?l:u||l!==s[0]?u?l===s[0]?"<="+u:`${l} - ${u}`:">="+l:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,n={})=>{if(e===t)return!0;e=new SO(e,n),t=new SO(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=NO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0},SemVer:LO,re:$O.re,src:$O.src,tokens:$O.t,SEMVER_SPEC_VERSION:DO.SEMVER_SPEC_VERSION,RELEASE_TYPES:DO.RELEASE_TYPES,compareIdentifiers:kO.compareIdentifiers,rcompareIdentifiers:kO.rcompareIdentifiers},jO=MO,UO=br,FO=Sr,BO=_r,GO=xr,HO=Dr.env.npm_package_json,qO=Dr.env.npm_config_user_agent,VO=!(!qO||!qO.startsWith("npm")),WO=!(!HO||!HO.endsWith("package.json")),zO=VO||WO,XO=!(!qO||!qO.startsWith("yarn")),KO=zO||XO,YO=UO.homedir(),JO=process.env.XDG_CONFIG_HOME||FO.join(YO,".config","simple-update-notifier"),QO=function(e){return FO.join(JO,"".concat(e.replace("@","").replace("/","__"),".json"))},ZO=function(e,t){return Ie(void 0,0,void 0,(function(){var n;return Re(this,(function(r){return n="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,r){GO.get(n,(function(n){var o="";n.on("data",(function(e){return o+=e})),n.on("end",(function(){try{var n=JSON.parse(o)[t];n||r(Error("Error getting version")),e(n)}catch(i){r(Error("Could not parse version response"))}}))})).on("error",(function(e){return r(e)}))}))]}))}))},ex=function(e){var t=e.pkg,n=e.updateCheckInterval,r=void 0===n?864e5:n,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return Ie(void 0,0,void 0,(function(){var n,o;return Re(this,(function(c){switch(c.label){case 0:return BO.existsSync(JO)||BO.mkdirSync(JO,{recursive:!0}),n=function(t){var n=QO(t);try{if(!BO.existsSync(n))return;return JSON.parse(BO.readFileSync(n,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!n||n<(new Date).getTime()-r?[4,ZO(t.name,i)]:[3,2];case 1:return o=c.sent(),l=QO(t.name),BO.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),jO.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(r,"ms but only ").concat((new Date).getTime()-n,"ms since last check.")),c.label=3;case 3:return[2,!1]}var l}))}))};const tx=t((function(e){return Ie(void 0,0,void 0,(function(){var t,n;return Re(this,(function(r){switch(r.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||KO&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,ex(e)];case 2:return(t=r.sent())&&console.error(function(e){for(var t=e.split("\n"),n=Math.max.apply(Math,t.map((function(e){return e.length}))),r=["┌".concat("─".repeat(n+2),"┐")],o=0,i=t;i.length>o;o++)r.push("│ ".concat(i[o].padEnd(n)," │"));return r.push("└".concat("─".repeat(n+2),"┘")),r.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return n=r.sent(),e.debug&&n instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",n),[3,4];case 4:return[2]}}))}))})),nx={name:"setup-cpp",version:"0.44.0"};var rx={};!function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n,r=0;t.length>r;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=t(_r),s=Lr,a=t(Sr),c=t(Or),l=t(xr),u=Ir,d=e.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"};e.DownloaderHelper=function(e){function t(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,r)?(i.url=i.requestURL=e.trim(),i.state=d.IDLE,i.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=d,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=r,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):n(i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"start",value:function(){var e=this,t=function(){return new Promise((function(t,n){e.__promise={resolve:t,reject:n},e.__start()}))};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then((function(n){var r=n.name,o=n.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(r),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,fileName:r}):t()})):t()}},{key:"pause",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return e.__setState(e.__states.PAUSED),e.emit("pause"),!0})))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var e=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__requestAbort(),this.__closeFileStream().then((function(){return e.__opts.removeOnStop?new Promise((function(t,n){i.access(e.__filePath,(function(r){return r?(e.__emitStop(),t(!0)):void i.unlink(e.__filePath,(function(r){return r?(e.__setState(e.__states.FAILED),e.emit("error",r),n(r)):(e.__emitStop(),void t(!0))}))}))})):(e.__emitStop(),Promise.resolve(!0))})))}},{key:"pipe",value:function(e){return this.__pipes.push({stream:e,options:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null}),e}},{key:"unpipe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=function(t){return e.__response?e.__response.unpipe(t):t.unpipe()};t?this.__pipes.find((function(e){return e.stream===t}))&&(n(t),this.__pipes=this.__pipes.filter((function(e){return e.stream!==t}))):(this.__pipes.forEach((function(e){return n(e.stream)})),this.__pipes=[])}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.__opts=Object.assign({},this.__opts,e),this.__headers=this.__opts.headers,this.__opts.timeout>-1&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),("number"!=typeof this.__opts.progressThrottle||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=t||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var e=this;return new Promise((function(t,n){var r=function(t){e.__initProtocol(t);var n=Object.assign({},e.__headers);n.hasOwnProperty("range")&&delete n.range;var r=e.__getReqOptions("HEAD",t,n);return Object.assign({},e.__reqOptions,r)},o=function(i,a){var c=e.__protocol.request(a,(function(a){if(e.__isRequireRedirect(a)){var c=/^https?:\/\//.test(a.headers.location)?a.headers.location:new s.URL(a.headers.location,i).href;return e.emit("redirected",c,i),o(c,r(c))}return 200===a.statusCode?void t({name:e.__getFileNameFromHeaders(a.headers,a),total:parseInt(a.headers["content-length"])||null}):n(Error("Response status was "+a.statusCode))}));c.on("error",(function(e){return n(e)})),c.on("timeout",(function(){return n(Error("timeout"))})),c.on("uncaughtException",(function(e){return n(e)})),c.end()};o(e.url,r(e.url))}))}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=e,(n.total&&n.fileName?Promise.resolve({name:n.fileName,total:n.total}):this.getTotalSize()).then((function(e){var r=e.name;return t.__total=n.total||e.total,t.__fileName=n.fileName||r,t.__downloaded=n.downloaded||t.__getFilesizeInBytes(t.__filePath),t.__reqOptions.headers.range="bytes="+t.__downloaded+"-",t.__isResumed=!0,t.__isResumable=!0,t.__setState(t.__states.RESUMED),t.emit("resume",t.__isResumed),new Promise((function(e,n){t.__promise={resolve:e,reject:n},t.__start()}))}))}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var e=this.__promise.resolve;return this.__promise=null,e(!0)}}},{key:"__downloadRequest",value:function(e,t){var n=this;return this.__protocol.request(this.__reqOptions,(function(r){if(n.__response=r,n.__isResumed||(n.__total=parseInt(r.headers["content-length"])||null,n.__resetStats()),n.__isRequireRedirect(r)){var o=/^https?:\/\//.test(r.headers.location)?r.headers.location:new s.URL(r.headers.location,n.url).href;return n.__isRedirected=!0,n.__initProtocol(o),n.emit("redirected",o,n.url),n.__start()}if(200!==r.statusCode&&206!==r.statusCode){var i=Error("Response status was "+r.statusCode);return i.status=r.statusCode||0,i.body=r.body||"",n.__setState(n.__states.FAILED),n.emit("error",i),t(i)}(n.__opts.forceResume||r.headers.hasOwnProperty("accept-ranges")&&"none"!==r.headers["accept-ranges"])&&(n.__isResumable=!0),n.__startDownload(r,e,t)}))}},{key:"__startDownload",value:function(e,t,n){var o=this,s=e;if(this.__isResumed)this.__fileStream=i.createWriteStream(this.__filePath,{flags:"a"});else{var c=this.__getFileNameFromHeaders(e.headers);if(this.__filePath=this.__getFilePath(c),this.__fileName=this.__filePath.split(a.sep).pop(),i.existsSync(this.__filePath)){var l=this.__getFilesizeInBytes(this.__filePath),u=this.__total?this.__total:0;if("object"===r(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||l>=u))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:l}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=i.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",(function(e){return o.__calculateStats(e.length)})),this.__pipes.forEach((function(e){s.pipe(e.stream,e.options),s=e.stream})),s.pipe(this.__fileStream),s.on("error",this.__onError(t,n)),this.__fileStream.on("finish",this.__onFinished(t,n)),this.__fileStream.on("error",this.__onError(t,n))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&-1===[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)}},{key:"__isRequireRedirect",value:function(e){return e.statusCode>300&&400>e.statusCode&&e.headers.hasOwnProperty("location")&&e.headers.location}},{key:"__onFinished",value:function(e,t){var n=this;return function(){n.__fileStream.close((function(r){if(r)return t(r);if(n.__hasFinished()){var o=!!n.__total&&n.__downloaded!==n.__total;if(o&&n.__isResumable&&n.__opts.resumeOnIncomplete&&n.__opts.resumeOnIncompleteMaxRetry>=n.__resumeRetryCount)return n.__resumeRetryCount++,n.emit("warning",Error("uncomplete download, retrying")),n.resume();n.__setState(n.__states.FINISHED),n.__pipes=[],n.emit("end",{fileName:n.__fileName,filePath:n.__filePath,totalSize:n.__total,incomplete:o,onDiskSize:n.__getFilesizeInBytes(n.__filePath),downloadedSize:n.__downloaded})}return e(n.__downloaded===n.__total)}))}}},{key:"__closeFileStream",value:function(){var e=this;return this.__fileStream?new Promise((function(t,n){e.__fileStream.close((function(e){return e?n(e):t(!0)}))})):Promise.resolve(!0)}},{key:"__onError",value:function(e,t){var n=this,r=!(2>=arguments.length||void 0===arguments[2])&&arguments[2];return function(e){return n.__pipes=[],r&&n.__requestAbort(),n.state===n.__states.STOPPED||n.state===n.__states.FAILED?void 0:n.__opts.retry?n.__retry(e).catch((function(r){n.__removeFile().finally((function(){n.__setState(n.__states.FAILED),n.emit("error",r||e),t(r||e)}))})):n.__removeFile().finally((function(){n.__setState(n.__states.FAILED),n.emit("error",e),t(e)}))}}},{key:"__retry",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.__opts.retry||"object"!==r(this.__opts.retry))return Promise.reject(t||Error("wrong retry options"));var n=this.__opts.retry,o=n.delay,i=void 0===o?0:o,s=n.maxRetries;return(void 0===s?999:s)>this.__retryCount?(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,t),this.__response&&(this.__response.unpipe(),this.__pipes.forEach((function(e){return e.stream.unpipe()}))),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then((function(){return new Promise((function(t){return e.__retryTimeout=setTimeout((function(){return t(e.__downloaded>0?e.resume():e.__start())}),i)}))}))):Promise.reject(t||Error("reached the maximum retries"))}},{key:"__onTimeout",value:function(e,t){var n=this;return function(){return n.__requestAbort(),n.__opts.retry?n.__retry(Error("timeout")).catch((function(e){n.__removeFile().finally((function(){n.__setState(n.__states.FAILED),e?t(e):(n.emit("timeout"),t(Error("timeout")))}))})):n.__removeFile().finally((function(){n.__setState(n.__states.FAILED),n.emit("timeout"),t(Error("timeout"))}))}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(e,t){var n="",r=e.hasOwnProperty("content-disposition"),o=r?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!r||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!r||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return r&&(o||i||c)?(n=(n=e["content-disposition"]).trim(),o?n=o[1]:i?n=i[1]:c&&(n=c[1]),n=n.replace(/[/\\]/g,"")):n=a.basename(new s.URL(this.requestURL).pathname).length>0?a.basename(new s.URL(this.requestURL).pathname):new s.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(n,t):n.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(e){var t=a.join(this.__destFolder,e),n=t;return this.__opts.override||this.state===this.__states.RESUMED||t!==(n=this.__uniqFileNameSync(n))&&this.emit("renamed",{path:n,fileName:n.split(a.sep).pop(),prevPath:t,prevFileName:t.split(a.sep).pop()}),n}},{key:"__getFileNameFromOpts",value:function(e,t){if(!this.__opts.fileName)return e;if("string"==typeof this.__opts.fileName)return this.__opts.fileName;if("function"==typeof this.__opts.fileName){var n=a.join(this.__destFolder,e);return t&&t.headers||this.__response&&this.__response.headers?this.__opts.fileName(e,n,(t||this.__response).headers["content-type"]):this.__opts.fileName(e,n)}if("object"===r(this.__opts.fileName)){var o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,n=t-this.__statsEstimate.time,r=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||n>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||r>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=t,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(e){this.state=e,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new s.URL(t),o={protocol:r.protocol,host:r.hostname,port:r.port,path:r.pathname+r.search,method:e};return n&&(o.headers=n),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.statSync(e,{throwIfNoEntry:!1}).size||0}catch(t){this.emit("warning",t)}return 0}},{key:"__validate",value:function(e,t){if("string"!=typeof e)throw Error("URL should be an string");if(""===e.trim())throw Error("URL couldn't be empty");if("string"!=typeof t)throw Error("Destination Folder should be an string");if(""===t.trim())throw Error("Destination Folder couldn't be empty");if(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.constants.W_OK)}catch(n){throw Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(e){var t=this.__getReqOptions(this.__opts.method,e,this.__headers);this.requestURL=e,e.indexOf("https://")>-1?(this.__protocol=l,t.agent=new l.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpsRequestOptions)):(this.__protocol=c,t.agent=new c.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},t,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(e){if("string"!=typeof e||""===e)return e;try{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),n=t?t[1].trim():e,r=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?n=n.replace(o="."+o,""):o="",this.__uniqFileNameSync(n+" ("+ ++r+")"+o)}catch(s){return e}}},{key:"__removeFile",value:function(){var e=this;return new Promise((function(t){return e.__fileStream?void e.__fileStream.close((function(n){return n&&e.emit("warning",n),e.__opts.removeOnFail?i.access(e.__filePath,(function(r){return r?t():void i.unlink(e.__filePath,(function(r){r&&e.emit("warning",n),t()}))})):void t()})):t()}))}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(u.EventEmitter)}(rx);const{GITHUB_ACTIONS:ox}=Xr,{appendFile:ix}=_r.promises,sx="Dpkg::Lock::Timeout=300";let ax=!1;const cx=YE((function(e=De()){J(e,"nala"!==e?["update","-y","-o",sx]:["update","-o",sx],{...xv,env:Ae(e)}),ax=!0}));var lx,ux;(ux=lx||(lx={}))[ux.NameDashVersion=0]="NameDashVersion",ux[ux.NameEqualsVersion=1]="NameEqualsVersion",ux[ux.Name=2]="Name",ux[ux.None=3]="None";const dx=YE((async function(e){cx(e);const t=await Me([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&J(e,["install","-y","--fix-broken","-o",sx,...t],{...xv,env:Ae(e)})}),{promise:!0}),px=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],fx="/etc/apt/trusted.gpg.d",hx="keyserver.ubuntu.com";let mx,yx,gx,vx,wx,bx=!1,Ex=!1,_x=!1,Sx=!1;const Ox=/Version\s*:\s*(.*)/g;let xx=!1;var Tx=Sr;const Ix=t((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var n,r=Tx.basename(e,Tx.extname(e))+t,o=Tx.join(Tx.dirname(e),r);return(n=e.slice(0,2))==="."+Tx.sep||"./"===n?"."+Tx.sep+o:o}));var Rx={},Px={};nt(Px,"name",(()=>rt));var Nx={};nt(Nx,"normalizeTrim",(()=>ot));var Cx={};nt(Cx,"addExeExt",(()=>it));var Ax={};nt(Ax,"addNamePrefix",(()=>st));var $x={};nt($x,"addNameSuffix",(()=>at));var Dx={};nt(Dx,"addShExt",(()=>ct));var Lx={};nt(Lx,"addShRelativePrefix",(()=>lt));var kx={};nt(kx,"removeExt",(()=>ut));var Mx={};nt(Mx,"replaceExt",(()=>dt));var jx={};nt(jx,"isPathInside",(()=>pt)),tt(Rx,Px),tt(Rx,Nx),tt(Rx,Cx),tt(Rx,Ax),tt(Rx,$x),tt(Rx,Dx),tt(Rx,Lx),tt(Rx,kx),tt(Rx,Mx),tt(Rx,jx);const Ux=["x64","amd64","x86_64","win64","64","amd64_x86"],Fx=["x86","i386","ia32","win32","32","x32"],Bx=["aarch64","arm64","woa64","arm"],Gx=["armv7","armv7a"],Hx=["powerpc64le","ppc64le"],qx=["sparc64"];var Vx={},Wx={exports:{}},zx={exports:{}};!function(e,t){function n(e){N[e]=C++}function r(e){for(var t=0;$.length>t;t++){var n=$[t][0],r=$[t][1];e=e.split(n+"*").join(n+"{0,"+r+"}").split(n+"+").join(n+"{1,"+r+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>O)return null;if(!(t.loose?R[N.LOOSE]:R[N.FULL]).test(e))return null;try{return new i(e,t)}catch(n){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>O)throw new TypeError("version is longer than "+O+" characters");if(!(this instanceof i))return new i(e,t);S("SemVer",e,t),this.options=t,this.loose=!!t.loose;var n=e.trim().match(t.loose?R[N.LOOSE]:R[N.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>x||0>this.major)throw new TypeError("Invalid major version");if(this.minor>x||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>x||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&x>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}function s(e,t){var n=L.test(e),r=L.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:t>e?-1:1}function a(e,t,n){return new i(e,n).compare(new i(t,n))}function c(e,t,n){return a(e,t,n)>0}function l(e,t,n){return 0>a(e,t,n)}function u(e,t,n){return 0===a(e,t,n)}function d(e,t,n){return 0!==a(e,t,n)}function p(e,t,n){return a(e,t,n)>=0}function f(e,t,n){return 0>=a(e,t,n)}function h(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return u(e,n,r);case"!=":return d(e,n,r);case">":return c(e,n,r);case">=":return p(e,n,r);case"<":return l(e,n,r);case"<=":return f(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function m(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof m){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof m))return new m(e,t);e=e.trim().split(/\s+/).join(" "),S("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,S("comp",this)}function y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof y)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new y(e.raw,t);if(e instanceof m)return new y(e.value,t);if(!(this instanceof y))return new y(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function g(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n}function v(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,n,r,o,i,s,a,c,l,u,d,p){return((t=v(n)?"":v(r)?">="+n+".0.0":v(o)?">="+n+"."+r+".0":">="+t)+" "+(a=v(c)?"":v(l)?"<"+(+c+1)+".0.0":v(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function b(e,t,n){for(var r=0;e.length>r;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(r=0;e.length>r;r++)if(S(e[r].semver),e[r].semver!==k&&e[r].semver.prerelease.length>0){var o=e[r].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function E(e,t,n){try{t=new y(t,n)}catch(r){return!1}return t.test(e)}function _(e,t,n,r){var o,s,a,u,d;switch(e=new i(e,r),t=new y(t,r),n){case">":o=c,s=f,a=l,u=">",d=">=";break;case"<":o=l,s=p,a=c,u="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(E(e,t,r))return!1;for(var h=0;t.set.length>h;++h){var g=null,v=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),v=v||e,o(e.semver,(g=g||e).semver,r)?g=e:a(e.semver,v.semver,r)&&(v=e)})),g.operator===u||g.operator===d)return!1;if((!v.operator||v.operator===u)&&s(e,v.semver))return!1;if(v.operator===d&&a(e,v.semver))return!1}return!0}var S;t=zx.exports=i,S="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=[].slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var O=256,x=Number.MAX_SAFE_INTEGER||9007199254740991,T=O-6,I=t.re=[],R=t.safeRe=[],P=t.src=[],N=t.tokens={},C=0,A="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",O],[A,T]];n("NUMERICIDENTIFIER"),P[N.NUMERICIDENTIFIER]="0|[1-9]\\d*",n("NUMERICIDENTIFIERLOOSE"),P[N.NUMERICIDENTIFIERLOOSE]="\\d+",n("NONNUMERICIDENTIFIER"),P[N.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+A+"*",n("MAINVERSION"),P[N.MAINVERSION]="("+P[N.NUMERICIDENTIFIER]+")\\.("+P[N.NUMERICIDENTIFIER]+")\\.("+P[N.NUMERICIDENTIFIER]+")",n("MAINVERSIONLOOSE"),P[N.MAINVERSIONLOOSE]="("+P[N.NUMERICIDENTIFIERLOOSE]+")\\.("+P[N.NUMERICIDENTIFIERLOOSE]+")\\.("+P[N.NUMERICIDENTIFIERLOOSE]+")",n("PRERELEASEIDENTIFIER"),P[N.PRERELEASEIDENTIFIER]="(?:"+P[N.NUMERICIDENTIFIER]+"|"+P[N.NONNUMERICIDENTIFIER]+")",n("PRERELEASEIDENTIFIERLOOSE"),P[N.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[N.NUMERICIDENTIFIERLOOSE]+"|"+P[N.NONNUMERICIDENTIFIER]+")",n("PRERELEASE"),P[N.PRERELEASE]="(?:-("+P[N.PRERELEASEIDENTIFIER]+"(?:\\."+P[N.PRERELEASEIDENTIFIER]+")*))",n("PRERELEASELOOSE"),P[N.PRERELEASELOOSE]="(?:-?("+P[N.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[N.PRERELEASEIDENTIFIERLOOSE]+")*))",n("BUILDIDENTIFIER"),P[N.BUILDIDENTIFIER]=A+"+",n("BUILD"),P[N.BUILD]="(?:\\+("+P[N.BUILDIDENTIFIER]+"(?:\\."+P[N.BUILDIDENTIFIER]+")*))",n("FULL"),n("FULLPLAIN"),P[N.FULLPLAIN]="v?"+P[N.MAINVERSION]+P[N.PRERELEASE]+"?"+P[N.BUILD]+"?",P[N.FULL]="^"+P[N.FULLPLAIN]+"$",n("LOOSEPLAIN"),P[N.LOOSEPLAIN]="[v=\\s]*"+P[N.MAINVERSIONLOOSE]+P[N.PRERELEASELOOSE]+"?"+P[N.BUILD]+"?",n("LOOSE"),P[N.LOOSE]="^"+P[N.LOOSEPLAIN]+"$",n("GTLT"),P[N.GTLT]="((?:<|>)?=?)",n("XRANGEIDENTIFIERLOOSE"),P[N.XRANGEIDENTIFIERLOOSE]=P[N.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",n("XRANGEIDENTIFIER"),P[N.XRANGEIDENTIFIER]=P[N.NUMERICIDENTIFIER]+"|x|X|\\*",n("XRANGEPLAIN"),P[N.XRANGEPLAIN]="[v=\\s]*("+P[N.XRANGEIDENTIFIER]+")(?:\\.("+P[N.XRANGEIDENTIFIER]+")(?:\\.("+P[N.XRANGEIDENTIFIER]+")(?:"+P[N.PRERELEASE]+")?"+P[N.BUILD]+"?)?)?",n("XRANGEPLAINLOOSE"),P[N.XRANGEPLAINLOOSE]="[v=\\s]*("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:"+P[N.PRERELEASELOOSE]+")?"+P[N.BUILD]+"?)?)?",n("XRANGE"),P[N.XRANGE]="^"+P[N.GTLT]+"\\s*"+P[N.XRANGEPLAIN]+"$",n("XRANGELOOSE"),P[N.XRANGELOOSE]="^"+P[N.GTLT]+"\\s*"+P[N.XRANGEPLAINLOOSE]+"$",n("COERCE"),P[N.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",n("COERCERTL"),I[N.COERCERTL]=RegExp(P[N.COERCE],"g"),R[N.COERCERTL]=RegExp(r(P[N.COERCE]),"g"),n("LONETILDE"),P[N.LONETILDE]="(?:~>?)",n("TILDETRIM"),P[N.TILDETRIM]="(\\s*)"+P[N.LONETILDE]+"\\s+",I[N.TILDETRIM]=RegExp(P[N.TILDETRIM],"g"),R[N.TILDETRIM]=RegExp(r(P[N.TILDETRIM]),"g"),n("TILDE"),P[N.TILDE]="^"+P[N.LONETILDE]+P[N.XRANGEPLAIN]+"$",n("TILDELOOSE"),P[N.TILDELOOSE]="^"+P[N.LONETILDE]+P[N.XRANGEPLAINLOOSE]+"$",n("LONECARET"),P[N.LONECARET]="(?:\\^)",n("CARETTRIM"),P[N.CARETTRIM]="(\\s*)"+P[N.LONECARET]+"\\s+",I[N.CARETTRIM]=RegExp(P[N.CARETTRIM],"g"),R[N.CARETTRIM]=RegExp(r(P[N.CARETTRIM]),"g"),n("CARET"),P[N.CARET]="^"+P[N.LONECARET]+P[N.XRANGEPLAIN]+"$",n("CARETLOOSE"),P[N.CARETLOOSE]="^"+P[N.LONECARET]+P[N.XRANGEPLAINLOOSE]+"$",n("COMPARATORLOOSE"),P[N.COMPARATORLOOSE]="^"+P[N.GTLT]+"\\s*("+P[N.LOOSEPLAIN]+")$|^$",n("COMPARATOR"),P[N.COMPARATOR]="^"+P[N.GTLT]+"\\s*("+P[N.FULLPLAIN]+")$|^$",n("COMPARATORTRIM"),P[N.COMPARATORTRIM]="(\\s*)"+P[N.GTLT]+"\\s*("+P[N.LOOSEPLAIN]+"|"+P[N.XRANGEPLAIN]+")",I[N.COMPARATORTRIM]=RegExp(P[N.COMPARATORTRIM],"g"),R[N.COMPARATORTRIM]=RegExp(r(P[N.COMPARATORTRIM]),"g"),n("HYPHENRANGE"),P[N.HYPHENRANGE]="^\\s*("+P[N.XRANGEPLAIN]+")\\s+-\\s+("+P[N.XRANGEPLAIN]+")\\s*$",n("HYPHENRANGELOOSE"),P[N.HYPHENRANGELOOSE]="^\\s*("+P[N.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[N.XRANGEPLAINLOOSE]+")\\s*$",n("STAR"),P[N.STAR]="(<|>)?=?\\s*\\*";for(var D=0;C>D;D++)S(D,P[D]),I[D]||(I[D]=RegExp(P[D]),R[D]=RegExp(r(P[D])));t.parse=o,t.valid=function(e,t){var n=o(e,t);return n?n.version:null},t.clean=function(e,t){var n=o(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return S("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],r=e.prerelease[t];if(S("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return s(n,r)}while(++t)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var n=this.build[t],r=e.build[t];if(S("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return s(n,r)}while(++t)},i.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new i(e,n).inc(t,r).version}catch(o){return null}},t.diff=function(e,t){if(u(e,t))return null;var n=o(e),r=o(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var s="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return i+a;return s},t.compareIdentifiers=s;var L=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(e,t).patch},t.compare=a,t.compareLoose=function(e,t){return a(e,t,!0)},t.compareBuild=function(e,t,n){var r=new i(e,n),o=new i(t,n);return r.compare(o)||r.compareBuild(o)},t.rcompare=function(e,t,n){return a(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compareBuild(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.compareBuild(r,e,n)}))},t.gt=c,t.lt=l,t.eq=u,t.neq=d,t.gte=p,t.lte=f,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?R[N.COMPARATORLOOSE]:R[N.COMPARATOR]);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),this.semver=t[2]?new i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(S("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(e,this.options)}catch(t){return!1}return h(e,this.operator,this.semver,this.options)},m.prototype.intersects=function(e,t){if(!(e instanceof m))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new y(e.value,t),E(this.value,n,t));if(""===e.operator)return""===e.value||(n=new y(this.value,t),E(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=h(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=h(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&s||a||c},t.Range=y,y.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},y.prototype.toString=function(){return this.range},y.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?R[N.HYPHENRANGELOOSE]:R[N.HYPHENRANGE],w),S("hyphen replace",e),e=e.replace(R[N.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,R[N.COMPARATORTRIM]),e=(e=(e=e.replace(R[N.TILDETRIM],"$1~")).replace(R[N.CARETTRIM],"$1^")).split(/\s+/).join(" ");var n=t?R[N.COMPARATORLOOSE]:R[N.COMPARATOR],r=e.split(" ").map((function(e){return function(e,t){return S("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return S("caret",e,t),e.replace(t.loose?R[N.CARETLOOSE]:R[N.CARET],(function(t,n,r,o,i){var s;return S("caret",e,t,n,r,o,i),v(n)?s="":v(r)?s=">="+n+".0.0 <"+(+n+1)+".0.0":v(o)?s="0"===n?">="+n+"."+r+".0 <"+n+"."+(+r+1)+".0":">="+n+"."+r+".0 <"+(+n+1)+".0.0":i?(S("replaceCaret pr",i),s="0"===n?"0"===r?">="+n+"."+r+"."+o+"-"+i+" <"+n+"."+r+"."+(+o+1):">="+n+"."+r+"."+o+"-"+i+" <"+n+"."+(+r+1)+".0":">="+n+"."+r+"."+o+"-"+i+" <"+(+n+1)+".0.0"):(S("no pr"),s="0"===n?"0"===r?">="+n+"."+r+"."+o+" <"+n+"."+r+"."+(+o+1):">="+n+"."+r+"."+o+" <"+n+"."+(+r+1)+".0":">="+n+"."+r+"."+o+" <"+(+n+1)+".0.0"),S("caret return",s),s}))}(e,t)})).join(" ")}(e,t),S("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?R[N.TILDELOOSE]:R[N.TILDE],(function(t,n,r,o,i){var s;return S("tilde",e,t,n,r,o,i),v(n)?s="":v(r)?s=">="+n+".0.0 <"+(+n+1)+".0.0":v(o)?s=">="+n+"."+r+".0 <"+n+"."+(+r+1)+".0":i?(S("replaceTilde pr",i),s=">="+n+"."+r+"."+o+"-"+i+" <"+n+"."+(+r+1)+".0"):s=">="+n+"."+r+"."+o+" <"+n+"."+(+r+1)+".0",S("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),S("tildes",e),e=function(e,t){return S("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?R[N.XRANGELOOSE]:R[N.XRANGE],(function(n,r,o,i,s,a){S("xRange",e,n,r,o,i,s,a);var c=v(o),l=c||v(i),u=l||v(s);return"="===r&&u&&(r=""),a=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&u?(l&&(i=0),s=0,">"===r?(r=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),n=r+o+"."+i+"."+s+a):l?n=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:u&&(n=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),S("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),S("xrange",e),e=function(e,t){return S("replaceStars",e,t),e.trim().replace(R[N.STAR],"")}(e,t),S("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(r=r.filter((function(e){return!!e.match(n)}))),r.map((function(e){return new m(e,this.options)}),this)},y.prototype.intersects=function(e,t){if(!(e instanceof y))throw new TypeError("a Range is required");return this.set.some((function(n){return g(n,t)&&e.set.some((function(e){return g(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new y(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},y.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(n){return!1}for(var t=0;this.set.length>t;t++)if(b(this.set[t],e,this.options))return!0;return!1},t.satisfies=E,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var s=new y(t,n)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(r&&-1!==o.compare(e)||(o=new i(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var s=new y(t,n)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(r&&1!==o.compare(e)||(o=new i(r=e,n)))})),r},t.minVersion=function(e,t){e=new y(e,t);var n=new i("0.0.0");if(e.test(n))return n;if(n=new i("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;e.set.length>r;++r)e.set[r].forEach((function(e){var t=new i(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!c(n,t)||(n=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new y(e,t).range||"*"}catch(n){return null}},t.ltr=function(e,t,n){return _(e,t,"<",n)},t.gtr=function(e,t,n){return _(e,t,">",n)},t.outside=_,t.prerelease=function(e,t){var n=o(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new y(e,n),t=new y(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=R[N.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),R[N.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;R[N.COERCERTL].lastIndex=-1}else n=e.match(R[N.COERCE]);return null===n?null:o(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}}(0,zx.exports);var Xx=zx.exports;!function(e,t){var n=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t},i=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=o(Xx),a=y(),c=br,l=Nr,u=_r;t._findMatch=function(t,n,r,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let l,u,d;for(const c of r){const r=c.version;if(a.debug(`check ${r} satisfies ${t}`),s.satisfies(r,t)&&(!n||c.stable===n)&&(d=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let n=t.arch===o&&t.platform===i;if(n&&t.platform_version){const r=e.exports._getOsVersion();n=r===t.platform_version||s.satisfies(r,t.platform_version)}return n})),d)){a.debug("matched "+c.version),u=c;break}}return u&&d&&(l=Object.assign({},u),l.files=[d]),l}))},t._getOsVersion=function(){const t=c.platform();let n="";if("darwin"===t)n=""+l.execSync("sw_vers -productVersion");else if("linux"===t){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(2===e.length&&("VERSION_ID"===e[0].trim()||"DISTRIB_RELEASE"===e[0].trim())){n=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return n},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let n="";return u.existsSync(e)?n=""+u.readFileSync(e):u.existsSync(t)&&(n=""+u.readFileSync(t)),n}}(Wx,Wx.exports);for(var Kx=Wx.exports,Yx=Er,Jx=[],Qx=0;256>Qx;++Qx)Jx[Qx]=(Qx+256).toString(16).substr(1);var Zx=function(){return Yx.randomBytes(16)},eT=function(e,t){var n=t||0;return""+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]+"-"+Jx[e[n++]]+Jx[e[n++]]+"-"+Jx[e[n++]]+Jx[e[n++]]+"-"+Jx[e[n++]]+Jx[e[n++]]+"-"+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]+Jx[e[n++]]},tT={},nT=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),rT=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),oT=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&nT(t,e,n);return rT(t,e),t},iT=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(tT,"__esModule",{value:!0}),tT.RetryHelper=void 0;const sT=oT(y());tT.RetryHelper=class{constructor(e,t,n){if(1>e)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return iT(this,void 0,void 0,(function*(){let n=1;for(;this.maxAttempts>n;){try{return yield e()}catch(r){if(t&&!t(r))throw r;sT.info(r.message)}const o=this.getSleepAmount();sT.info(`Waiting ${o} seconds before trying again`),yield this.sleep(o),n++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return iT(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var aT=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),cT=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),lT=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&aT(t,e,n);return cT(t,e),t},uT=Vr&&Vr.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},dT=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vx,"__esModule",{value:!0}),Vx.evaluateVersions=Vx.isExplicitVersion=exports.findFromManifest_1=Vx.findFromManifest=exports.getManifestFromRepo_1=Vx.getManifestFromRepo=Vx.findAllVersions=exports.find_1=Vx.find=Vx.cacheFile=exports.cacheDir_1=Vx.cacheDir=exports.extractZip_1=Vx.extractZip=Vx.extractXar=exports.extractTar_1=Vx.extractTar=Vx.extract7z=exports.downloadTool_1=Vx.downloadTool=exports.HTTPError_1=Vx.HTTPError=void 0;const pT=lT(y()),fT=lT(Wo),hT=lT(_r),mT=lT(Kx),yT=lT(br),gT=lT(Sr),vT=lT(Lo),wT=lT(Xx),bT=lT(kr),ET=lT(Rr),_T=Cr,ST=dT((function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Zx)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[r+i]=o[i];return t||eT(o)})),OT=m(),xT=tT;class TT extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}exports.HTTPError_1=Vx.HTTPError=TT;const IT="win32"===process.platform,RT="darwin"===process.platform;exports.downloadTool_1=Vx.downloadTool=function(e,t,n,r){return uT(this,void 0,void 0,(function*(){t=t||gT.join(bt(),ST.default()),yield fT.mkdirP(gT.dirname(t)),pT.debug("Downloading "+e),pT.debug("Destination "+t);const o=Et("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=Et("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new xT.RetryHelper(3,o,i);return yield s.execute((()=>uT(this,void 0,void 0,(function*(){return yield function(e,t,n,r){return uT(this,void 0,void 0,(function*(){if(hT.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new vT.HttpClient("actions/tool-cache",[],{allowRetries:!1});n&&(pT.debug("set auth"),void 0===r&&(r={}),r.authorization=n);const i=yield o.get(e,r);if(200!==i.message.statusCode){const t=new TT(i.message.statusCode);throw pT.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=ET.promisify(bT.pipeline),a=Et("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,hT.createWriteStream(t)),pT.debug("download complete"),c=!0,t}finally{if(!c){pT.debug("download failed");try{yield fT.rmRF(t)}catch(l){pT.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",n,r)}))),(e=>!(e instanceof TT&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},Vx.extract7z=function(e,t,n){return uT(this,void 0,void 0,(function*(){_T.ok(IT,"extract7z() not supported on current OS"),_T.ok(e,'parameter "file" is required'),t=yield ht(t);const r=process.cwd();if(process.chdir(t),n)try{const t=["x",pT.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],r={silent:!0};yield OT.exec(`"${n}"`,t,r)}finally{process.chdir(r)}else{const n=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${gT.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield fT.which("powershell",!0);yield OT.exec(`"${e}"`,n,o)}finally{process.chdir(r)}}return t}))},exports.extractTar_1=Vx.extractTar=function(e,t,n="xz"){return uT(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield ht(t),pT.debug("Checking tar --version");let r="";yield OT.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>r+=""+e,stderr:e=>r+=""+e}}),pT.debug(r.trim());const o=r.toUpperCase().includes("GNU TAR");let i;i=n instanceof Array?n:[n],pT.isDebug()&&!n.includes("v")&&i.push("-v");let s=t,a=e;return IT&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield OT.exec("tar",i),t}))},Vx.extractXar=function(e,t,n=[]){return uT(this,void 0,void 0,(function*(){let r;_T.ok(RT,"extractXar() not supported on current OS"),_T.ok(e,'parameter "file" is required'),t=yield ht(t),r=n instanceof Array?n:[n],r.push("-x","-C",t,"-f",e),pT.isDebug()&&r.push("-v");const o=yield fT.which("xar",!0);var i;return yield OT.exec(`"${o}"`,(i=r,Array.from(new Set(i)))),t}))},exports.extractZip_1=Vx.extractZip=function(e,t){return uT(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield ht(t),IT?yield function(e,t){return uT(this,void 0,void 0,(function*(){const n=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),r=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=yield fT.which("pwsh",!1);if(o){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force } else { throw $_ } } ;`].join(" ")];pT.debug("Using pwsh at path: "+o),yield OT.exec(`"${o}"`,e)}else{const e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${n}' -DestinationPath '${r}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${n}', '${r}', $true) }`].join(" ")],t=yield fT.which("powershell",!0);pT.debug("Using powershell at path: "+t),yield OT.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return uT(this,void 0,void 0,(function*(){const n=yield fT.which("unzip",!0),r=[e];pT.isDebug()||r.unshift("-q"),r.unshift("-o"),yield OT.exec(`"${n}"`,r,{cwd:t})}))}(e,t),t}))},exports.cacheDir_1=Vx.cacheDir=function(e,t,n,r){return uT(this,void 0,void 0,(function*(){if(n=wT.clean(n)||n,r=r||yT.arch(),pT.debug(`Caching tool ${t} ${n} ${r}`),pT.debug("source dir: "+e),!hT.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield mt(t,n,r);for(const t of hT.readdirSync(e)){const n=gT.join(e,t);yield fT.cp(n,o,{recursive:!0})}return yt(t,n,r),o}))},Vx.cacheFile=function(e,t,n,r,o){return uT(this,void 0,void 0,(function*(){if(r=wT.clean(r)||r,o=o||yT.arch(),pT.debug(`Caching tool ${n} ${r} ${o}`),pT.debug("source file: "+e),!hT.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield mt(n,r,o),s=gT.join(i,t);return pT.debug("destination file "+s),yield fT.cp(e,s),yt(n,r,o),i}))},exports.find_1=Vx.find=function(e,t,n){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");n=n||yT.arch(),gt(t)||(t=vt(ft(e,n),t));let r="";if(t){t=wT.clean(t)||"";const o=gT.join(wt(),e,t,n);pT.debug("checking cache: "+o),hT.existsSync(o)&&hT.existsSync(o+".complete")?(pT.debug(`Found tool in cache ${e} ${t} ${n}`),r=o):pT.debug("not found")}return r},Vx.findAllVersions=ft,exports.getManifestFromRepo_1=Vx.getManifestFromRepo=function(e,t,n,r="master"){return uT(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${r}`,s=new vT.HttpClient("tool-cache"),a={};n&&(pT.debug("set auth"),a.authorization=n);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(d){pT.debug("Invalid json")}}return o}))},exports.findFromManifest_1=Vx.findFromManifest=function(e,t,n,r=yT.arch()){return uT(this,void 0,void 0,(function*(){return yield mT._findMatch(e,t,n,r)}))},Vx.isExplicitVersion=gt,Vx.evaluateVersions=vt;var PT={};Object.defineProperty(PT,"__esModule",{value:!0}),PT.retryAsPromised=PT.TimeoutError=void 0;let NT=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};PT.TimeoutError=NT,PT.retryAsPromised=_t;var CT=PT.default=_t;let AT;const{GITHUB_ACTIONS:$T}=Xr,DT=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,n=e.fs||{};return e.mkdir=e.mkdir||n.mkdir||_r.mkdir,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,n)=>new Promise(((r,o)=>t.mkdir(e,n,((e,t)=>e?o(e):r(t))))),e.stat=e.stat||n.stat||_r.stat,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((n,r)=>t.stat(e,((e,t)=>e?r(e):n(t))))),e.statSync=e.statSync||n.statSync||_r.statSync,e.mkdirSync=e.mkdirSync||n.mkdirSync||_r.mkdirSync,t},LT=(e,t,n)=>{const r=Sr.dirname(e),o={...DT(t),recursive:!1};if(r===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),n||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return LT(e,o,LT(r,o,n));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},kT=Object.assign((async(e,t,n)=>{const r=DT(t);r.recursive=!1;const o=Sr.dirname(e);return o===e?r.mkdirAsync(e,r).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):r.mkdirAsync(e,r).then((()=>n||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return kT(o,r).then((t=>kT(e,r,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return r.statAsync(e).then((e=>{if(e.isDirectory())return n;throw t}),(()=>{throw t}))}))}),{sync:LT}),MT=async(e,t,n)=>{if(n!==t)return e.statAsync(t).then((e=>e.isDirectory()?n:void 0),(n=>n&&"ENOENT"===n.code?MT(e,Sr.dirname(t),t):void 0))},jT=(e,t,n)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(r){return r&&"ENOENT"===r.code?jT(e,Sr.dirname(t),t):void 0}},UT=(e,t)=>{const n=DT(t);if(n.recursive=!0,Sr.dirname(e)===e)return n.mkdirSync(e,n);const r=jT(n,e);try{return n.mkdirSync(e,n),r}catch(o){if(o&&"ENOENT"===o.code)return LT(e,n);throw o}},FT=Object.assign((async(e,t)=>{const n={...DT(t),recursive:!0};return Sr.dirname(e)===e?await n.mkdirAsync(e,n):MT(n,e).then((t=>n.mkdirAsync(e,n).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return kT(e,n);throw t}))))}),{sync:UT}),BT=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,GT=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=Sr.resolve(e),"win32"===BT){const t=/[*|"<>?:]/,{root:n}=Sr.parse(e);if(t.test(e.substring(n.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},HT=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),qT=+HT[0]>10||10==+HT[0]&&+HT[1]>=12,VT=qT?e=>DT(e).mkdirSync===_r.mkdirSync:()=>!1,WT=Object.assign(qT?e=>DT(e).mkdir===_r.mkdir:()=>!1,{sync:VT}),zT=(e,t)=>{e=GT(e);const n=DT(t);return VT(n)?UT(e,n):LT(e,n)},XT=Object.assign((async(e,t)=>{e=GT(e);const n=DT(t);return WT(n)?FT(e,n):kT(e,n)}),{mkdirpSync:zT,mkdirpNative:FT,mkdirpNativeSync:UT,mkdirpManual:kT,mkdirpManualSync:LT,sync:zT,native:FT,nativeSync:UT,manual:kT,manualSync:LT,useNative:WT,useNativeSync:VT});var KT=m();const YT=/v?(\d\S*)/,JT="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",QT={llvm:JT,clang:JT,"clang++":JT,"clang-tidy":JT,clangtidy:JT,"clang-format":JT,clangformat:JT,ninja:"1.12.1",cmake:"3.30.4",meson:"1.5.2",kcov:"42",task:"3.39.2",doxygen:Ke()?"1.12.0-2":"1.12.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},ZT="22.2.0",eI="3.7.9",tI={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},{GITHUB_ACTIONS:nI}=Xr,rI=YE((async function(e){const t=[];"linux"===process.platform?t.push("/home/runner/.local/bin/"):"darwin"===process.platform&&t.push("/usr/local/bin/");const n=(await KT.getExecOutput(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Sr.join(n,"Scripts"),Sr.join(n,"Scripts","bin"),Sr.join(n,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var oI={};Object.defineProperty(oI,"__esModule",{value:!0});var iI=oI.getUbuntuVersion=void 0;const sI=Nr;iI=oI.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",n=["-a"],new Promise(((e,r)=>{sI.execFile(t,n,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void r(Error(`Could not execute \`${t} ${n.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,n;if(null===e)return[];const r=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const l of e.split("\n")){const e=l.match(r);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=l.match(o);t&&(s=t);const n=l.match(i);if(n&&(a=n),c&&s&&a)break}if(!c)return[];for(const l of[s,a])if(l){const e=[l[1],l[2]];return l[3]&&e.push(l[3]),e.map((e=>parseInt(e,10)))}return[]};const aI=YE((async function(){try{if(Ye()){try{null===tg.sync("lsb_release",{nothrow:!0})&&await Fe([{name:"lsb-release"}])}catch{return Gt()}const e=await iI();return 0===e.length?Gt():e}return null}catch(e){return v(""+e),null}}),{promise:!0}),cI=YE((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=me("~/.local/pipx");if(await he(t))return t;switch(process.platform){case"win32":e=me("~/AppData/Local/pipx");break;case"darwin":e=me("~/Library/Application Support/pipx");break;default:e=me("~/.local/share/pipx")}return await XT(e),await XT(Sr.join(e,"trash")),await XT(Sr.join(e,"shared")),await XT(Sr.join(e,"venv")),e}),{promise:!0}),lI=YE((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=me("~/.local/bin");return await be(e,oR),await XT(e),e}),{promise:!0});let uI;const dI=new Map([[24,["Sequoia","15"]],[23,["Sonoma","14"]],[22,["Ventura","13"]],[21,["Monterey","12"]],[20,["Big Sur","11"]],[19,["Catalina","10.15"]],[18,["Mojave","10.14"]],[17,["High Sierra","10.13"]],[16,["Sierra","10.12"]],[15,["El Capitan","10.11"]],[14,["Yosemite","10.10"]],[13,["Mavericks","10.9"]],[12,["Mountain Lion","10.8"]],[11,["Lion","10.7"]],[10,["Snow Leopard","10.6"]],[9,["Leopard","10.5"]],[8,["Tiger","10.4"]],[7,["Panther","10.3"]],[6,["Jaguar","10.2"]],[5,["Puma","10.1"]]]),pI=YE((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||br.release()).split(".")[0]);const[t,n]=dI.get(e)||["Unknown",""];return{name:t,version:n}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),{GITHUB_ACTIONS:fI}=Xr,hI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href)),{GITHUB_ACTIONS:mI}=Xr,yI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href)),gI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href)),vI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href));class wI extends Error{constructor(e){super(e),this.name="TimeoutError"}}class bI extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const EI=e=>void 0===globalThis.DOMException?new bI(e):new DOMException(e),_I=e=>{const t=void 0===e.reason?EI("This operation was aborted."):e.reason;return t instanceof Error?t:EI(t)},SI=y(),OI=Nr,xI=_r,TI=Sr,II=Dr,RI=II.env["ProgramFiles(x86)"],PI=[II.env["ProgramFiles(x86)"],II.env.ProgramFiles],NI=["Enterprise","Professional","Community","BuildTools"],CI=["2022","2019","2017"],AI={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var $I=wn;const DI=RI+"\\Microsoft Visual Studio\\Installer";var LI=En,kI=function(e,t,n,r,o,i){if("win32"!=II.platform)return void SI.info("This is not a Windows virtual environment, bye!");II.env.PATH+=TI.delimiter+DI;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];r&&!0===JSON.parse(r)&&a.push("uwp"),t&&a.push(t),n&&a.push("-vcvars_ver="+n),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${En(i)}" ${a.join(" ")}`;SI.debug("vcvars command-line: "+c);const l=(""+OI.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),u=l[0].split("\r\n"),d=l[1].split("\r\n"),p=l[2].split("\r\n"),f=d.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(f.length>0)throw Error("invalid parameters\r\n"+f.join("\r\n"));let h={};for(let m of u){const[e,t]=m.split("=");h[e]=t}SI.startGroup("Environment variables");for(let m of p){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(SI.info("Setting "+e),_n(e)&&(t=t.split(";").filter((function(e,t,n){return n.indexOf(e)===t})).join(";")),SI.exportVariable(e,t))}SI.endGroup(),SI.info("Configured Developer Command Prompt")},MI=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(MI||{});const jI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href)),{GITHUB_ACTIONS:UI}=Xr,FI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href)),BI=YE((async function(e,t,n){const[r,o]=await Promise.all([Pn(e,t,n),Cn()]);return await HI(n),r}),{promise:!0}),GI=YE((async function(e){if(Ye())if(e>10)await Fe([{name:"libtinfo-dev"}]);else try{await Fe([{name:"libtinfo5"}])}catch(t){b(`Failed to install libtinfo5 ${t}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${Ux.includes(process.arch)?"amd64":Bx.includes(process.arch)?"arm64":process.arch}.deb`,n="http://launchpadlibrarian.net/666971015/"+e,r=new rx.DownloaderHelper(n,br.tmpdir(),{fileName:e});r.on("error",(e=>{throw Error(`Failed to download ${n}: ${e}`)})),await r.start(),J("dpkg",["-i",Sr.join(br.tmpdir(),e)])}else Ke()?await et("ncurses5-compat-libs",void 0,"yay"):Xe()&&await Ze([{name:"ncurses-compat-libs"}])}),{promise:!0}),HI=YE((async function(e){"linux"===process.platform&&await un(Ft("gcc",void 0,await aI()),"",e,40)}),{promise:!0}),{GITHUB_ACTIONS:qI}=Xr,VI="string"==typeof __dirname?__dirname:Sr.dirname(Lr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Fr&&Fr.src||new URL("setup-cpp.js",document.baseURI).href));let WI,zI=!1;const XI={llvm:Tn,clang:Tn,"clang++":Tn},KI={gcc:un,"g++":un},YI={mingw:on},JI={msvc:An,cl:An,msbuild:An,visualstudio:An},QI={appleclang:vn,applellvm:vn,"apple-clang":vn,"apple-llvm":vn},ZI={cmakelang:Kt,"cmake-lint":Kt,"cmake-format":Kt,cmakelint:Kt,cmakeformat:Kt},eR=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],tR={nala:async function(e,t,n){if(!Ye())return;if("string"==typeof WI)return{binDir:WI};const r=tg.sync("nala",{nothrow:!0});if(null!==r)return WI=Sr.dirname(r),{binDir:WI};await Fe([{name:"python3-apt"}]),WI="/usr/bin";try{const t=await je({name:"nala",version:e});if(void 0!==t)return await Fe([{name:t}]),{binDir:WI}}catch(o){b("Failed to install nala: "+o)}try{const e=await je({name:"nala-legacy"});if(void 0!==e)return await Fe([{name:e}],!0),{binDir:WI}}catch(o){b("Failed to install nala-legacy: "+o)}return await async function(){const e=new rx.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",br.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Sr.join(br.tmpdir(),"install-nala.sh"),n=await ry(t,"utf8");await fy(t,n.replace(/sudo/g,"")),await Fe([{name:"wget"}]);try{J("bash",[t])}catch(o){g("Failed to install nala via installer: "+o),J("apt",["install","-y","-t","nala","nala"])}}(),{binDir:WI}},brew:qe,choco:Je,python:Dt,powershell:kn,pwsh:kn,...XI,...KI,...YI,...JI,...QI,...ZI,cmake:Ct,ninja:hn,vcpkg:async function(e,t,n){return zI&&null!==tg.sync("vcpkg",{nothrow:!0})?{binDir:Sr.dirname(tg.sync("vcpkg"))}:("linux"===process.platform&&(Ke()?await Promise.all([et("curl"),et("zip"),et("unzip"),et("tar"),et("git"),et("pkg-config")]):Xe()?await Ze([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):Ye()&&await Fe([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await he(Sr.join(t,ct("bootstrap-vcpkg",".bat")))?w(`Vcpkg folder already exists at ${t}. Skipping the clone`):V("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Sr.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(b("Checking out vcpkg version "+e),V("git",["checkout",e],{cwd:t,stdio:"inherit"})),V(ct(lt("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await ne(t),await be(t,oR),zI=!0,{binDir:t})},bazel:async function(e,t,n){switch(process.platform){case"win32":return Qe("bazelisk",e);case"darwin":return ze("bazelisk",e);case"linux":if(Ke())throw Error("installing bazel on Arch linux is not supported yet");if(Xe())return await Ze([{name:"dnf-plugins-core"}]),J("dnf",["copr","enable","vbatts/bazel"]),Ze([{name:"bazel4"}]);if(Ye())return J("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Be({fileName:"bazel-archive-keyring.gpg",keyUrl:"https://bazel.build/bazel-release.pub.gpg"})}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`]),Fe([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,n){return Ht("conan",e)},meson:function(e,t,n){return Ht("meson",e)},gcovr:function(e,t,n){return Ht("gcovr",e)},opencppcoverage:$n,OpenCppCoverage:$n,ccache:function(e,t,n){switch(process.platform){case"win32":return Qe("ccache",e);case"darwin":return ze("ccache",e);case"linux":if(Ke())return et("ccache",e);if(Xe())return Ze([{name:"ccache",version:e}]);if(Ye())return Fe([{name:"ccache",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},sccache:function(e,t,n){switch(process.platform){case"win32":return Qe("sccache",e);case"linux":case"darwin":return ze("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,n){switch(process.platform){case"win32":{await CT((()=>Qe("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>b(e)});const t={binDir:await async function(){if("win32"===process.platform){for(const e of["C:/ProgramData/chocolatey/bin","C:/Program Files/doxygen/bin","C:/Program Files (x86)/doxygen"])if(await he(Sr.join(e,"doxygen.exe")))return await be(e,oR),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Yt(Ft("graphviz",void 0)),t}case"darwin":{const e=await ze("doxygen",void 0);return pI()[0]>11&&await Yt(Ft("graphviz",void 0)),e}case"linux":{let o;if(""===e||Ke()||Xe())if(Ke())o=await et("doxygen",e);else{if(Xe())return Ze([{name:"doxygen",version:e}]);if(!Ye())throw Error("Unsupported linux distributions");o=await Fe([{name:"doxygen",version:e}])}else{if(!Ye())throw Error("Unsupported linux distributions");try{o=await Pt("doxygen",e,Qt,t,n);try{await Fe([{name:"libclang-cpp9"}])}catch(r){b("Failed to download libclang-cpp9 that might be needed for running doxygen. "+r)}}catch(r){w(`Failed to download doxygen binary. ${r}. Falling back to apt-get.`),o=await Fe([{name:"doxygen"}])}}return await Yt(Ft("graphviz",void 0,await aI())),o}default:throw Error("Unsupported platform")}},graphviz:Yt,cppcheck:async function(e,t,n){switch(process.platform){case"win32":return await Qe("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await be(e,oR),e}()};case"darwin":return ze("cppcheck",e);case"linux":if(Ke())return et("cppcheck",e);if(Xe())return Ze([{name:"ccache",version:e}]);if(Ye())return Fe([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,n){return Ht("cpplint",e)},flawfinder:function(e,t,n){return Ht("flawfinder",e)},lizard:function(e,t,n){return Ht("lizard",e)},infer:function(e,t,n){return Pt("infer",e,pn,t,n)},"clang-tidy":Rn,clangtidy:Rn,"clang-format":In,clangformat:In,vcvarsall:Sn,kcov:async function(e,t,n){if("linux"!==process.platform)return void b("Kcov is not supported on non-linux");const r=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(r[0]);const i=r[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await Pt("kcov",o,yn,t,n),a):(a=await Pt("kcov",o,mn,t,n),Ke()?await et("binutils"):Xe()?await Ze([{name:"binutils"}]):Ye()&&await Fe([{name:"libbinutils"}]),a)},make:async function(e,t,n){switch(process.platform){case"win32":return Qe("make",e);case"darwin":{await ze("make",e);const t=Sr.join(We(),"opt/make/libexec/gnubin");return await be(t,oR),{binDir:t}}case"linux":if(Ke())return et("make",e);if(Xe())return Ze([{name:"make",version:e}]);if(Ye())return Fe([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,n){return Pt("task",e,Mn,t,n)},sevenzip:St,"7zip":St,"7z":St},nR=Object.keys(tR),rR=["compiler","architecture","timeout",...nR],oR={rcPath:me("~/.cpprc"),guard:"cpp"};(async function(e){var t,n,r;let o=Promise.resolve();Wr.GITHUB_ACTIONS||(o=async function(){try{await tx({pkg:nx})}catch(e){v("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const i=function(e){return function(e,t){var n,r,o,i,s,a={_:[]},c=0,l=0,u=0,d=(e=e||[]).length;const p=void 0!==(t=t||{}).alias,f=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=Pe(t.string),t.boolean=Pe(t.boolean),p)for(n in t.alias)for(r=t.alias[n]=Pe(t.alias[n]),c=0;r.length>c;c++)(t.alias[r[c]]=r.concat(n)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(l=(r=t.alias[t.boolean[c]]||[]).length;l-- >0;)t.boolean.push(r[l]);for(c=t.string.length;c-- >0;)for(l=(r=t.alias[t.string[c]]||[]).length;l-- >0;)t.string.push(r[l]);if(h)for(n in t.default)if(i=typeof t.default[n],r=t.alias[n]=t.alias[n]||[],void 0!==t[i])for(t[i].push(n),c=0;r.length>c;c++)t[i].push(r[c]);const m=f?Object.keys(t.alias):[];for(c=0;d>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(l=0;o.length>l&&45===o.charCodeAt(l);l++);if(0===l)a._.push(o);else if("no-"===o.substring(l,l+3)){if(i=o.substring(l+3),f&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(u=l+1;o.length>u&&61!==o.charCodeAt(u);u++);for(i=o.substring(l,u),s=o.substring(++u)||c+1===d||45===(""+e[c+1]).charCodeAt(0)||e[++c],r=2===l?[i]:i,u=0;r.length>u;u++){if(i=r[u],f&&!~m.indexOf(i))return t.unknown("-".repeat(l)+i);Ne(a,i,r.length>u+1||s,t)}}}if(h)for(n in t.default)void 0===a[n]&&(a[n]=t.default[n]);if(p)for(n in a)for(r=t.alias[n]||[];r.length>0;)a[r.shift()]=a[n];return a}(e,{string:[...rR,"timeout"],default:Object.fromEntries(rR.map((e=>[e,jn(e)]))),alias:{h:"help"},boolean:"help"})}(e);i.help&&(b('\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\t the <compiler> to install.\n \t You can specify the version instead of specifying just the name e.g: --compiler \'llvm-13.0.0\'\n--$tool_name\t pass "true" or pass the <version> you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},"analyzer/linter":{tools:"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const s=null!=(t=i.architecture)?t:process.arch,a=null!=(n=process.env.SETUP_CPP_DIR)?n:me("~"),c=[],l=[],u=N_.create({autoloadLocales:!0});let d,p;N_.addLocale(C_),__.addLocale(S_);const f=await aI(),h=void 0!==i.compiler?function(e){try{const t=e.split("-"),n=t[0];if(1 in t){const e=t[1];return null===eS(e)&&b(`Invalid semver version ${e} used for the compiler.`),{compiler:n,version:e}}return{compiler:n,version:void 0}}catch(t){return g(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(i.compiler):void 0;if(!function(e,t,n){var r,o;const i=void 0!==n&&t.includes(n.compiler),s=(i?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),a=s.filter((t=>!Bt(i&&"compiler"===t&&void 0!==n?n.version:e[t]))),c=0!==a.length?i&&"compiler"===a[0]&&void 0!==n?null!=(r=n.version)?r:"true":null!=(o=e[a[0]])?o:"true":"true";if(a.some((t=>i&&"compiler"===t&&void 0!==n?e.compiler!==`${n.compiler}-${c}`:e[t]!==c)))return!1;for(const l of s)e[l]=i&&"compiler"===l&&void 0!==n?`${n.compiler}-${c}`:c;return!0}(i,[...eR,"compiler"],h))return g("The same version must be used for llvm, clang-format and clang-tidy"),1;Ke()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(b("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await et("python-pygments"));let m=!1;for(const y of nR){if(Wr.isCI&&0!==l.length){m=!0;break}const e=i[y];void 0!==e&&(d=Date.now(),await On(y,e,f,s,a,c,l,60*Number.parseFloat(null!=(r=i.timeout)?r:"20")*1e3),p=Date.now(),b("took "+(u.format(d,p)||"0 seconds")))}if(!m&&void 0!==h){const e=Date.now();await async function(e,t,n,r,o,i,s){let a;try{if(si.startGroup(`Installing ${e} ${null!=t?t:""}`),e in XI)a=await Tn(Ft("llvm",t,n),Sr.join(r,"llvm"),o),await ve("GCOV","llvm-cov gcov",oR);else if(e in KI){const e=Ft("gcc",t,n);a=await un(e,Sr.join(r,"gcc"),o),await dn(e)}else if(e in YI){const e=Ft("mingw",t,n);a=await on(e,Sr.join(r,"gcc"),o),await dn(e)}else e in JI?a=await An(Ft("msvc",t,n),Sr.join(r,"msvc"),o):e in QI?await vn():(a=null,s.push("Unsupported compiler "+e))}catch(c){g(c),s.push(`Failed to install the ${e} ${t}`)}null!==a&&i.push(Un(e,a)),si.endGroup()}(h.compiler,h.version,f,a,s,c,l);const t=Date.now();b("took "+(u.format(e,t)||"0 seconds"))}if(await async function(e){if(await he(e.rcPath)){const t=(await ZE(e.rcPath,"utf-8")).split("\n"),n=[...new Set(t.reverse())].reverse();await e_(e.rcPath,n.join("\n")),await ne(e.rcPath)}}(oR),0===c.length&&0===l.length)return v("setup-cpp was called without any arguments. Nothing to do."),0;for(const y of c)console.log(`${y}`);for(const y of l)g(y);if(b("setup-cpp finished"),!Wr.GITHUB_ACTIONS)switch(process.platform){case"win32":v("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":v("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await o,0===l.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{g("main() panicked!"),g(e),process.exitCode=1})),exports.HttpClient=$o,exports.ciInfo=Xr,exports.commonjsGlobal=Vr,exports.coreExports=si,exports.execExports=KT,exports.getAugmentedNamespace=n,exports.getDefaultExportFromCjs=t,exports.info=b,exports.pathExists=he,exports.semver=MO,exports.warning=v;
//# sourceMappingURL=setup-cpp.js.map