mirror of https://github.com/aminya/setup-cpp.git
4 lines
299 KiB
JavaScript
4 lines
299 KiB
JavaScript
#!/usr/bin/env node
|
||
function e(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}function r(){return Li||(Li=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.toCommandProperties=Ui.toCommandValue=void 0,Ui.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Ui.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}:{}}),Ui}function n(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 r;e.port?r=Number(e.port):"http:"===e.protocol?r=80:"https:"===e.protocol&&(r=443);const n=[e.hostname.toUpperCase()];"number"==typeof r&&n.push(`${n[0]}:${r}`);for(const i of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===i||n.some((e=>e===i||e.endsWith("."+i)||i.startsWith(".")&&e.endsWith(""+i))))return!0;return!1}(e))return;const r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Bi(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Bi("http://"+r)}}function i(){if(co)return Gi;co=1;var e=Gi&&Gi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.OidcClient=void 0;const t=so,r=function(){if(ao)return wo;ao=1;var e=wo&&wo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};return Object.defineProperty(wo,"__esModule",{value:!0}),wo.PersonalAccessTokenCredentialHandler=wo.BearerCredentialHandler=wo.BasicCredentialHandler=void 0,wo.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 e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 e(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo}(),n=u();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 r;return e(this,void 0,void 0,(function*(){const e=i.createHttpClient(),n=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===(r=n.result)||void 0===r?void 0:r.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,n.debug)("ID token url is "+e);const r=yield i.getCall(e);return(0,n.setSecret)(r),r}catch(e){throw Error("Error message: "+e.message)}}))}}return Gi.OidcClient=i,Gi}function o(){return uo||(uo=1,function(e){var t=go&&go.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.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 r=bn,n=In,{access:i,appendFile:o,writeFile:s}=n.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 i(t,n.constants.R_OK|n.constants.W_OK)}catch(r){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,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");return t?`<${e}${n}>${t}</${e}>`:`<${e}${n}>`}write(e){return t(this,void 0,void 0,(function*(){const t=!!(null==e?void 0:e.overwrite),r=yield this.filePath(),n=t?s:o;return yield n(r,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(r.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t}),n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=!1){const r=t?"ol":"ul",n=e.map((e=>this.wrap("li",e))).join(""),i=this.wrap(r,n);return this.addRaw(i).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:r,colspan:n,rowspan:i}=e,o=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(o,r,s)})).join("");return this.wrap("tr",t)})).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{},o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i}),s=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(s).addEOL()}addHeading(e,t){const r="h"+t,n=this.wrap(["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",e);return this.addRaw(n).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 r=Object.assign({},t&&{cite:t}),n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}};e.markdownSummary=a,e.summary=a}(go)),go}function s(){return fo||(fo=1,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 r,n=Ro&&Ro.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=Ro&&Ro.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Ro&&Ro.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=Ro&&Ro.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.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=o(In),c=o(An);e.chmod=(r=a.promises).chmod,e.copyFile=r.copyFile,e.lstat=r.lstat,e.mkdir=r.mkdir,e.open=r.open,e.readdir=r.readdir,e.readlink=r.readlink,e.rename=r.rename,e.rm=r.rm,e.rmdir=r.rmdir,e.stat=r.stat,e.symlink=r.symlink,e.unlink=r.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(r){if("ENOENT"===r.code)return!1;throw r}return!0}))},e.isDirectory=function(t,r=!1){return s(this,void 0,void 0,(function*(){return(r?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(r,n){return s(this,void 0,void 0,(function*(){let i;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(i))return r;const o=r;for(const a of n){r=o+a,i=void 0;try{i=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(i&&i.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const i of yield e.readdir(t))if(n===i.toUpperCase()){r=c.join(t,i);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(i))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Ro)),Ro}function a(){function e(e){return u(this,void 0,void 0,(function*(){if(p.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield p.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function t(e){return u(this,void 0,void 0,(function*(){l.ok(e,"a path argument must be provided"),yield p.mkdir(e,{recursive:!0})}))}function r(e){return u(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(p.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(f.delimiter))e&&t.push(e);if(p.isRooted(e)){const r=yield p.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(f.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(f.delimiter))e&&r.push(e);const n=[];for(const i of r){const r=yield p.tryGetExecutablePath(f.join(i,e),t);r&&n.push(r)}return n}))}function n(e,r,o,s){return u(this,void 0,void 0,(function*(){if(o>=255)return;o++,yield t(r);const a=yield p.readdir(e);for(const t of a){const a=`${e}/${t}`,c=`${r}/${t}`;(yield p.lstat(a)).isDirectory()?yield n(a,c,o,s):yield i(a,c,s)}yield p.chmod(r,(yield p.stat(e)).mode)}))}function i(e,t,r){return u(this,void 0,void 0,(function*(){if((yield p.lstat(e)).isSymbolicLink()){try{yield p.lstat(t),yield p.unlink(t)}catch(n){"EPERM"===n.code&&(yield p.chmod(t,"0666"),yield p.unlink(t))}const r=yield p.readlink(e);yield p.symlink(r,t,p.IS_WINDOWS?"junction":null)}else(yield p.exists(t))&&!r||(yield p.copyFile(e,t))}))}if(po)return Oo;po=1;var o=Oo&&Oo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=Oo&&Oo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=Oo&&Oo.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&o(t,e,r);return a(t,e),t},u=Oo&&Oo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.findInPath=Oo.which=Oo.mkdirP=Oo.rmRF=Oo.mv=Oo.cp=void 0;const l=Zn,f=c(An),p=c(s());return Oo.cp=function(e,t,r={}){return u(this,void 0,void 0,(function*(){const{force:o,recursive:s,copySourceDirectory:a}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),c=(yield p.exists(t))?yield p.stat(t):null;if(c&&c.isFile()&&!o)return;const u=c&&c.isDirectory()&&a?f.join(t,f.basename(e)):t;if(!(yield p.exists(e)))throw Error("no such file or directory: "+e);if((yield p.stat(e)).isDirectory()){if(!s)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield n(e,u,0,o)}else{if(""===f.relative(e,u))throw Error(`'${u}' and '${e}' are the same file`);yield i(e,u,o)}}))},Oo.mv=function(r,n,i={}){return u(this,void 0,void 0,(function*(){if(yield p.exists(n)){let t=!0;if((yield p.isDirectory(n))&&(n=f.join(n,f.basename(r)),t=yield p.exists(n)),t){if(null!=i.force&&!i.force)throw Error("Destination already exists");yield e(n)}}yield t(f.dirname(n)),yield p.rename(r,n)}))},Oo.rmRF=e,Oo.mkdirP=t,Oo.which=function e(t,n){return u(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(n){const r=yield e(t,!1);if(!r)throw Error(p.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 r}const i=yield r(t);return i&&i.length>0?i[0]:""}))},Oo.findInPath=r,Oo}function c(){function e(e,t,r){return i(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const i=n[0];return t=n.slice(1).concat(t||[]),new c.ToolRunner(i,t,r).exec()}))}if(mo)return bo;mo=1;var t=bo&&bo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=bo&&bo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=bo&&bo.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=bo&&bo.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(bo,"__esModule",{value:!0}),bo.getExecOutput=bo.exec=void 0;const o=Jn,c=n(function(){if(ho)return So;ho=1;var e=So&&So.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=So&&So.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=So&&So.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&Object.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=So&&So.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(So,"__esModule",{value:!0}),So.argStringToArray=So.ToolRunner=void 0;const i=r(bn),o=r(Yn),c=r(Qn),u=r(An),l=r(a()),f=r(s()),p=ei,d="win32"===process.platform;So.ToolRunner=class extends o.EventEmitter{constructor(e,t,r){if(super(),!e)throw Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){const r=this._getSpawnFileName(),n=this._getSpawnArgs(e);let i=t?"":"[command]";if(d)if(this._isCmdFile()){i+=r;for(const e of n)i+=" "+e}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n)i+=" "+e}else{i+=this._windowsQuoteCmdArg(r);for(const e of n)i+=" "+this._windowsQuoteCmdArg(e)}else{i+=r;for(const e of n)i+=" "+e}return i}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(i.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+i.EOL.length),o=n.indexOf(i.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_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 r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);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 r=!1;for(const o of e)if(t.some((e=>e===o))){r=!0;break}if(!r)return e;let n='"',i=!0;for(let o=e.length;o>0;o--)n+=e[o-1],i&&"\\"===e[o-1]?n+="\\":'"'===e[o-1]?(i=!0,n+='"'):i=!1;return n+='"',n.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='"',r=!0;for(let n=e.length;n>0;n--)t+=e[n-1],r&&"\\"===e[n-1]?t+="\\":'"'===e[n-1]?(r=!0,t+="\\"):r=!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 r={};return r.cwd=(e=e||{}).cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return n(this,void 0,void 0,(function*(){return!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||d&&this.toolPath.includes("\\"))&&(this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield l.which(this.toolPath,!0),new Promise(((e,t)=>n(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 r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+i.EOL);const n=new h(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield f.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),s=c.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let a="";s.stdout&&s.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let u="";if(s.stderr&&s.stderr.on("data",(e=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(e),u=this._processLineBuffer(e,u,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),s.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),s.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),s.on("close",(e=>{n.processExitCode=e,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()})),n.on("done",((r,n)=>{a.length>0&&this.emit("stdline",a),u.length>0&&this.emit("errline",u),s.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!s.stdin)throw Error("child process missing stdin");s.stdin.end(this.options.input)}}))))}))}},So.argStringToArray=function(e){function t(e){i&&'"'!==e&&(o+="\\"),o+=e,i=!1}const r=[];let n=!1,i=!1,o="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&i?t(a):"\\"===a&&n?i=!0:" "!==a||n?t(a):o.length>0&&(r.push(o),o=""):i?t(a):n=!n}return o.length>0&&r.push(o.trim()),r};class h extends o.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=p.setTimeout(h.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 So}());return bo.exec=e,bo.getExecOutput=function(t,r,n){var s,a;return i(this,void 0,void 0,(function*(){let i="",c="";const u=new o.StringDecoder("utf8"),l=new o.StringDecoder("utf8"),f=null===(s=null==n?void 0:n.listeners)||void 0===s?void 0:s.stdout,p=null===(a=null==n?void 0:n.listeners)||void 0===a?void 0:a.stderr,d=Object.assign(Object.assign({},null==n?void 0:n.listeners),{stdout:e=>{i+=u.write(e),f&&f(e)},stderr:e=>{c+=l.write(e),p&&p(e)}}),h=yield e(t,r,Object.assign(Object.assign({},n),{listeners:d}));return i+=u.end(),c+=l.end(),{exitCode:h,stdout:i,stderr:c}}))},bo}function u(){return vo||(vo=1,function(e){function t(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function n(e,t={}){(0,d.issueCommand)("error",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)}function s(e){(0,d.issue)("group",e)}function a(){(0,d.issue)("endgroup")}var u=Fi&&Fi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=Fi&&Fi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=Fi&&Fi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&u(t,e,r);return l(t,e),t},p=Fi&&Fi.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.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 d=function(){function e(e,t,r){const n=new a(e,t,r);process.stdout.write(""+n+o.EOL)}if(ki)return ji;ki=1;var t=ji&&ji.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=ji&&ji.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=ji&&ji.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(ji,"__esModule",{value:!0}),ji.issue=ji.issueCommand=void 0;const o=i(bn),s=r();ji.issueCommand=e,ji.issue=function(t,r=""){e(t,{},r)};class a{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(const n in this.properties)if(this.properties.hasOwnProperty(n)){const i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${t=i,(0,s.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,s.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}return ji}(),h=function(){if(Di)return Mi;Di=1;var e=Mi&&Mi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Mi&&Mi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Mi&&Mi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.prepareKeyValueMessage=Mi.issueFileCommand=void 0;const i=n(Rn),o=n(In),s=n(bn),a=r();return Mi.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!o.existsSync(r))throw Error("Missing file at path: "+r);o.appendFileSync(r,`${(0,a.toCommandValue)(t)}${s.EOL}`,{encoding:"utf8"})},Mi.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+i.randomUUID(),n=(0,a.toCommandValue)(t);if(e.includes(r))throw Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${s.EOL}${n}${s.EOL}${r}`},Mi}(),m=r(),y=f(bn),v=f(An),w=i();var g,E;(E=g||(e.ExitCode=g={}))[E.Success=0]="Success",E[E.Failure=1]="Failure",e.exportVariable=function(e,t){const r=(0,m.toCommandValue)(t);if(process.env[e]=r,process.env.GITHUB_ENV)return(0,h.issueFileCommand)("ENV",(0,h.prepareKeyValueMessage)(e,t));(0,d.issueCommand)("set-env",{name:e},r)},e.setSecret=function(e){(0,d.issueCommand)("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?(0,h.issueFileCommand)("PATH",e):(0,d.issueCommand)("add-path",{},e),process.env.PATH=`${e}${v.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,r){const n=t(e,r).split("\n").filter((e=>""!==e));return r&&!1===r.trimWhitespace?n:n.map((e=>e.trim()))},e.getBooleanInput=function(e,r){const n=t(e,r);if(["true","True","TRUE"].includes(n))return!0;if(["false","False","FALSE"].includes(n))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,h.issueFileCommand)("OUTPUT",(0,h.prepareKeyValueMessage)(e,t));process.stdout.write(y.EOL),(0,d.issueCommand)("set-output",{name:e},(0,m.toCommandValue)(t))},e.setCommandEcho=function(e){(0,d.issue)("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=g.Failure,n(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){(0,d.issueCommand)("debug",{},e)},e.error=n,e.warning=function(e,t={}){(0,d.issueCommand)("warning",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){(0,d.issueCommand)("notice",(0,m.toCommandProperties)(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+y.EOL)},e.startGroup=s,e.endGroup=a,e.group=function(e,t){return p(this,void 0,void 0,(function*(){let r;s(e);try{r=yield t()}finally{a()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return(0,h.issueFileCommand)("STATE",(0,h.prepareKeyValueMessage)(e,t));(0,d.issueCommand)("save-state",{name:e},(0,m.toCommandValue)(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return p(this,void 0,void 0,(function*(){return yield w.OidcClient.getIDToken(e)}))};var _=o();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return _.summary}});var b=o();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return b.markdownSummary}});var S=function(){if(lo)return Eo;lo=1;var e=Eo&&Eo.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Eo&&Eo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Eo&&Eo.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.toPlatformPath=Eo.toWin32Path=Eo.toPosixPath=void 0;const n=r(An);return Eo.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Eo.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Eo.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Eo}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return S.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return S.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return S.toPlatformPath}}),e.platform=f((yo||(yo=1,function(e){var t=_o&&_o.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=_o&&_o.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=_o&&_o.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=_o&&_o.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=_o&&_o.__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=o(bn),a=n(c());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 i(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield i(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,r,n;const{stdout:i}=yield a.getExecOutput("sw_vers",void 0,{silent:!0}),o=null!==(t=null===(e=i.match(/ProductVersion:\s*(.+)/))||void 0===e?void 0:e[1])&&void 0!==t?t:"";return{name:null!==(n=null===(r=i.match(/ProductName:\s*(.+)/))||void 0===r?void 0:r[1])&&void 0!==n?n:"",version:o}}:function*(){const{stdout:e}=yield a.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,r]=e.trim().split("\n");return{name:t,version:r}})),{platform:e.platform,arch:e.arch,isWindows:e.isWindows,isMacOS:e.isMacOS,isLinux:e.isLinux})}))}}(_o)),_o))}(Fi)),Fi}function l(e){return Po?Io.error(e):console.log(`[31m${e}[0m`)}function f(e){return Po?Io.warning(e):console.log(`[33m${e}[0m`)}function p(e){return Po?Io.notice(e):console.log(`[94m${e}[0m`)}function d(e){return Po?Io.info(e):console.log(e)}function h(){if(ko)return Lo;ko=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=An,r=e?";":":",n=function(){function e(r,n,i){if("function"==typeof n&&(i=n,n={}),!i){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(t,i){e(r,n||{},(function(e,r){e?i(e):t(r)}))}))}t(r,n||{},(function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),i(e,t)}))}return Ao||(Ao=1,t="win32"===process.platform||Ti.TESTING_WINDOWS?function(){function e(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;r.length>n;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function t(t,n,i){r.stat(t,(function(r,o){i(r,!r&&e(o,t,n))}))}if(xo)return To;xo=1,To=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=In;return To}():function(){function e(e,n,i){r.stat(e,(function(e,r){i(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,o=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),u=a|c;return r&parseInt("001",8)||r&c&&i===s||r&a&&n===o||r&u&&0===o}(e,t)}if($o)return No;$o=1,No=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=In;return No}(),Co=e,e.sync=function(e,r){try{return t.sync(e,r||{})}catch(n){if(r&&r.ignoreErrors||"EACCES"===n.code)return!1;throw n}}),Co;var t}(),i=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),o=(t,n)=>{const i=n.colon||r,o=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(n.path||process.env.PATH||"").split(i)],s=e?n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(i):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},s=(e,r,s)=>{"function"==typeof r&&(s=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:u}=o(e,r),l=[],f=n=>new Promise(((o,s)=>{if(n===a.length)return r.all&&l.length?o(l):s(i(e));const c=a[n],u=/^".*"$/.test(c)?c.slice(1,-1):c,f=t.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;o(p(d,n,0))})),p=(e,t,i)=>new Promise(((o,s)=>{if(i===c.length)return o(f(t+1));const a=c[i];n(e+a,{pathExt:u},((n,s)=>{if(!n&&s){if(!r.all)return o(e+a);l.push(e+a)}return o(p(e,t,i+1))}))}));return s?f(0).then((e=>s(null,e)),s):f(0)};return Lo=s,s.sync=(e,r)=>{r=r||{};const{pathEnv:s,pathExt:a,pathExtExe:c}=o(e,r),u=[];for(let i=0;s.length>i;i++){const o=s[i],f=/^".*"$/.test(o)?o.slice(1,-1):o,p=t.join(f,e),d=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let e=0;a.length>e;e++){const t=d+a[e];try{if(n.sync(t,{pathExt:c})){if(!r.all)return t;u.push(t)}}catch(l){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw i(e)},Lo}function m(){if(Wo)return zo;Wo=1;const e=An,t=function(){function e(e,i){const o=e.options.env||process.env,s=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(l){}let u;try{u=r.sync(e.command,{path:o[n({env:o})],pathExt:i?t.delimiter:void 0})}catch(f){}finally{c&&process.chdir(s)}return u&&(u=t.resolve(a?e.options.cwd:"",u)),u}if(jo)return Fo;jo=1;const t=An,r=h(),n=function(){if(Do)return Qo.exports;Do=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};return Qo.exports=e,Qo.exports.default=e,Qo.exports}();return Fo=function(t){return e(t)||e(t,!0)}}(),r=function(){if(Uo)return Zo;Uo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Zo.command=function(t){return t.replace(e,"^$1")},Zo.argument=function(t,r){return t=(t=`"${t=(t=(t=""+t).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Zo}(),n=function(){if(qo)return Vo;qo=1;const e=In,t=function(){if(Ho)return Bo;Ho=1;const e=Go?Mo:(Go=1,Mo=/^#!(.*)/);return Bo=(t="")=>{const r=t.match(e);if(!r)return null;const[n,i]=r[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?i:i?`${o} ${i}`:o}}();return Vo=function(r){const n=Buffer.alloc(150);let i;try{i=e.openSync(r,"r"),e.readSync(i,n,0,150,0),e.closeSync(i)}catch(o){}return t(""+n)}}(),i="win32"===process.platform,o=/\.(?:com|exe)$/i,s=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;return zo=function(a,c,u){c&&!Array.isArray(c)&&(u=c,c=null);const l={command:a,args:c=c?c.slice(0):[],options:u=Object.assign({},u),file:void 0,original:{command:a,args:c}};return u.shell?l:function(a){if(!i)return a;const c=function(e){e.file=t(e);const r=e.file&&n(e.file);return r?(e.args.unshift(e.file),e.command=r,t(e)):e.file}(a),u=!o.test(c);if(a.options.forceShell||u){const t=s.test(c);a.command=e.normalize(a.command),a.command=r.command(a.command),a.args=a.args.map((e=>r.argument(e,t)));const n=[a.command].concat(a.args).join(" ");a.args=["/d","/s","/c",`"${n}"`],a.command=process.env.comspec||"cmd.exe",a.options.windowsVerbatimArguments=!0}return a}(l)}}function y(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}function v(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function w(e){return v(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}function g(e,t,r){const n=ta(e,t,r),i=Xs(e,t),o=Ys(e,t);let s;ea(o,n.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})`)})(n.options);try{s=ni.spawn(n.file,n.args,n.options)}catch(p){const e=new ni.ChildProcess,t=Promise.reject(vs({error:p,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Vs(e,t),e}const a=(e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))})))(s),c=((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let i;const o=new Promise(((n,o)=>{i=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,o)}),t)})),s=n.finally((()=>{clearTimeout(i)}));return Promise.race([o,s])})(s,n.options,a),u=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const i=Ss((()=>{e.kill()}));return n.finally((()=>{i()}))})(s,n.options,c),l={isCanceled:!1};s.kill=Os.bind(null,s.kill.bind(s)),s.cancel=xs.bind(null,s,l);const f=cs((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,f,p]=await(async({stdout:t,stderr:r,all:n},{encoding:i,buffer:o,maxBuffer:s},a)=>{const c=Gs(t,{encoding:i,buffer:o,maxBuffer:s}),u=Gs(r,{encoding:i,buffer:o,maxBuffer:s}),l=Gs(n,{encoding:i,buffer:o,maxBuffer:2*s});try{return await Promise.all([a,c,u,l])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},Ms(t,c),Ms(r,u),Ms(n,l)])}})(s,n.options,u),d=ra(n.options,c),h=ra(n.options,f),m=ra(n.options,p);if(e||0!==t||null!==r){const c=vs({error:e,exitCode:t,signal:r,stdout:d,stderr:h,all:m,command:i,escapedCommand:o,parsed:n,timedOut:a,isCanceled:l.isCanceled||!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:i,escapedCommand:o,exitCode:0,stdout:d,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Us(e),fi(t)))(t);void 0!==r&&(v(r)?r.pipe(e.stdin):e.stdin.end(r))})(s,n.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=js();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Ns.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Ns.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Ns.bind(void 0,e,"all"))})(s),Vs(s,f),s}function E(e,t,r){const n=ta(e,t,r),i=Xs(e,t),o=Ys(e,t);ea(o,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Us(e),li(t)))(e);if(v(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=ni.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw vs({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=ra(n.options,a.stdout,a.error),u=ra(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=vs({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:i,escapedCommand:o,exitCode:0,stdout:c,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function _(){return sa||(sa=1,function(e){var t=ua&&ua.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=ua&&ua.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=ua&&ua.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=ua&&ua.__exportStar||function(e,r){for(var n in e)"default"===n||{}.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;const o=n(function(){if(na)return la;na=1,Object.defineProperty(la,"__esModule",{value:!0}),la.sync=la.isexe=void 0;const e=In,t=yi;la.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},la.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t)=>e.isFile()&&n(e,t),n=(e,t)=>{const r=t.uid??process.getuid?.(),n=t.groups??process.getgroups?.()??[],i=t.gid??process.getgid?.()??n[0];if(void 0===r||void 0===i)throw Error("cannot get uid or gid");const o=new Set([i,...n]),s=e.mode,a=e.uid,c=e.gid,u=parseInt("100",8),l=parseInt("010",8),f=u|l;return!!(s&parseInt("001",8)||s&l&&o.has(c)||s&u&&a===r||s&f&&0===r)};return la}());e.posix=o;const s=n(function(){if(ia)return fa;ia=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.sync=fa.isexe=void 0;const e=In,t=yi;fa.isexe=async(e,n={})=>{const{ignoreErrors:i=!1}=n;try{return r(await(0,t.stat)(e),e,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}},fa.sync=(t,n={})=>{const{ignoreErrors:i=!1}=n;try{return r((0,e.statSync)(t),t,n)}catch(o){if(i||"EACCES"===o.code)return!1;throw o}};const r=(e,t,r)=>e.isFile()&&((e,t)=>{const{pathExt:r=process.env.PATHEXT||""}=t,n=r.split(";");if(-1!==n.indexOf(""))return!0;for(let i=0;n.length>i;i++){const t=n[i].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);return fa}());e.win32=s,i((oa||(oa=1,Object.defineProperty(pa,"__esModule",{value:!0})),pa),e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:o;e.isexe=a.isexe,e.sync=a.sync}(ua)),ua}function b(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return g(function(){if(void 0===ha){const e=da.sync("pwsh",{nothrow:!0});null!==e&&(ha=e);const t=da.sync("powershell",{nothrow:!0});null!==t&&(ha=t)}if(void 0===ha)throw Error("Could not find powershell");return ha}(),[...t,"-c",e],r)}function S(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function O(){return null!==da.sync("sudo",{nothrow:!0})}function R(){return 0===process.getuid?.()||!!process.env.CI}function I(){return R()&&O()}function P(e){return I()?"sudo "+e:e}function T(e,t=[],r=va){return I()?function(e,t){const[r,...n]=Js(e);return E(r,n,t)}(N(e,t),r):E(e,$(t),r)}function x(e,t=[],r=va){return I()?function(e,t){const[r,...n]=Js(e);return g(r,n,t)}(N(e,t),r):g(e,$(t),r)}function N(e,t){return"sudo "+$([e,...t]).join(" ")}function $(e){return e.map((e=>`'${e}'`))}function C(){return"win32"===process.platform?wa():R()}async function A(e){if(("linux"===process.platform||"darwin"===process.platform)&&I()&&void 0!==process.env.SUDO_USER){let t=In.statSync(e).isDirectory();await x("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],va)}}function L(){if(Sa)return ba;Sa=1;var e=(_a?Ea:(_a=1,Ea=function(){}))();return ba=function(t){return t!==e&&null!==t}}function k(){if(Ra)return Oa;Ra=1;var e=L(),t=[].forEach,r=Object.create;return Oa=function(n){var i=r(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(t),i)})),i},Oa}function D(){if(ka)return La;ka=1;var e=function(){if(Aa)return Ca;Aa=1;var e=$a?Na:($a=1,Na=(Pa?Ia:(Pa=1,Ia=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}))()?Math.sign:xa?Ta:(xa=1,Ta=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1})),t=Math.abs,r=Math.floor;return Ca=function(n){return isNaN(n)?0:0!==(n=Number(n))&&isFinite(n)?e(n)*r(t(n)):n}}(),t=Math.max;return La=function(r){return t(0,e(r))}}function F(){if(Fa)return Da;Fa=1;var e=D();return Da=function(t,r,n){var i;return isNaN(t)?0>(i=r)?1:n&&i?i-1:i:!1!==t&&e(t)}}function j(){return Ua?ja:(Ua=1,ja=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e})}function U(){if(Ga)return Ma;Ga=1;var e=L();return Ma=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}function M(){return qa||(qa=1,Va=function(){if(Ha)return Ba;Ha=1;var e=j(),t=U(),r=function(){}.bind,n=function(){}.call,i=Object.keys,o={}.propertyIsEnumerable;return Ba=function(s,a){return function(c,u){var l,f=arguments[2],p=arguments[3];return c=Object(t(c)),e(u),l=i(c),p&&l.sort("function"==typeof p?r.call(p,c):void 0),"function"!=typeof s&&(s=l[s]),n.call(s,l,(function(e,t){return o.call(c,e)?n.call(u,f,c[e],e,c,t):a}))}},Ba}()("forEach")),Va}function G(){return za||(za=1),hl}function B(){return ic||(ic=1,nc=(Xa?Wa:(Xa=1,Wa=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}))()?Object.assign:function(){if(rc)return tc;rc=1;var e=ec?Za:(ec=1,Za=(Ka?Ya:(Ka=1,Ya=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Qa)return Ja;Qa=1;var e=L(),t=Object.keys;return Ja=function(r){return t(e(r)?Object(r):r)}}()),t=U(),r=Math.max;return tc=function(n,i){var o,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=i[e]}catch(t){o||(o=t)}},s=1;c>s;++s)e(i=arguments[s]).forEach(a);if(void 0!==o)throw o;return n},tc}()),nc}function H(){if(uc)return cc;uc=1;var e=U(),t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols;return cc=function(o,s){var a,c=Object(e(s));if(o=Object(e(o)),n(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),"function"==typeof i&&i(c).forEach((function(e){try{t(o,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return o}}function V(){if(lc)return yl.exports;lc=1;var e,t,r=D();try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(n){}return t=H(),e=function(){var e=[];return function(t){var r,n=0;if(e[t])return e[t];for(r=[];t--;)r.push("a"+(++n).toString(36));return Function("fn","return function ("+r.join(", ")+") { return fn.apply(this, arguments); };")}}(),yl.exports=function(i,o){var s;if(o=r(o),i.length===o)return i;s=e(o)(i);try{t(s,i)}catch(n){}return s},yl.exports}function q(){return pc?fc:(pc=1,fc=function(e){return null!=e})}function z(){if(Ec)return gc;Ec=1;var e=function(){if(wc)return vc;wc=1;var e=function(){if(yc)return mc;yc=1;var e=function(){if(hc)return dc;hc=1;var e=q(),t={object:!0,function:!0,undefined:!0};return dc=function(r){return!!e(r)&&hasOwnProperty.call(t,typeof r)}}();return mc=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(r){return!1}}}();return vc=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(r){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,r=function(){}.toString;return gc=function(n){return!!e(n)&&!t.test(r.call(n))}}function W(){if(Pc)return vl.exports;Pc=1;var e=q(),t=z(),r=B(),n=k(),i=(Ic||(Ic=1,Rc=function(){if(bc)return _c;bc=1;var e="razdwatrzy";return _c=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?"".contains:function(){if(Oc)return Sc;Oc=1;var e="".indexOf;return Sc=function(t){return e.call(this,t,arguments[1])>-1},Sc}()),Rc),o=vl.exports=function(t,o){var s,a,c,u,l;return 2>arguments.length||"string"!=typeof t?(u=o,o=t,t=null):u=arguments[2],e(t)?(s=i.call(t,"c"),a=i.call(t,"e"),c=i.call(t,"w")):(s=c=!0,a=!1),l={value:o,configurable:s,enumerable:a,writable:c},u?r(n(u),l):l};return o.gs=function(o,s,a){var c,u,l,f;return"string"!=typeof o?(l=a,a=s,s=o,o=null):l=arguments[3],e(s)?t(s)?e(a)?t(a)||(l=a,a=void 0):a=void 0:(l=s,s=a=void 0):s=void 0,e(o)?(c=i.call(o,"c"),u=i.call(o,"e")):(c=!0,u=!1),f={get:s,set:a,configurable:c,enumerable:u},l?r(n(l),f):f},vl.exports}function X(){return Dc?kc:(Dc=1,kc=(Cc?$c:(Cc=1,$c=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Lc)return Ac;Lc=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 Ac=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 Y(){if(Bc)return Gc;Bc=1;var e=Mc?Uc:(Mc=1,Uc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return Gc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function K(){return Qc?Jc:(Qc=1,Jc=function(){if(jc)return Fc;jc=1;var e=X(),t={object:!0,symbol:!0};return Fc=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?X().Symbol:function(){if(Kc)return Yc;Kc=1;var e,t,r,n=W(),i=Y(),o=X().Symbol,s=function(){if(Vc)return Hc;Vc=1;var e=W(),t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Hc=function(i){for(var o,s,a=0;n[i+(a||"")];)++a;return n[i+=a||""]=!0,t(r,o="@@"+i,e.gs(null,(function(r){s||(s=!0,t(this,o,e(r)),s=!1)}))),o}}(),a=function(){if(zc)return qc;zc=1;var e=W(),t=X().Symbol;return qc=function(r){return Object.defineProperties(r,{hasInstance:e("",t&&t.hasInstance||r("hasInstance")),isConcatSpreadable:e("",t&&t.isConcatSpreadable||r("isConcatSpreadable")),iterator:e("",t&&t.iterator||r("iterator")),match:e("",t&&t.match||r("match")),replace:e("",t&&t.replace||r("replace")),search:e("",t&&t.search||r("search")),species:e("",t&&t.species||r("species")),split:e("",t&&t.split||r("split")),toPrimitive:e("",t&&t.toPrimitive||r("toPrimitive")),toStringTag:e("",t&&t.toStringTag||r("toStringTag")),unscopables:e("",t&&t.unscopables||r("unscopables"))})}}(),c=function(){if(Xc)return Wc;Xc=1;var e=W(),t=Y(),r=Object.create(null);return Wc=function(n){return Object.defineProperties(n,{for:e((function(e){return r[e]?r[e]:r[e]=n(e+"")})),keyFor:e((function(e){var n;for(n in t(e),r)if(r[n]===e)return n}))})}}(),u=Object.create,l=Object.defineProperties,f=Object.defineProperty;if("function"==typeof o)try{o(),r=!0}catch(p){}else o=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},Yc=e=function e(i){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?o(i):(a=u(t.prototype),l(a,{__description__:n("",i=void 0===i?"":i+""),__name__:n("",s(i))}))},a(e),c(e),l(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),l(e.prototype,{toString:n((function(){return"Symbol ("+i(this).__description__+")"})),valueOf:n((function(){return i(this)}))}),f(e.prototype,e.toPrimitive,n("",(function(){var e=i(this);return"symbol"==typeof e?e:""+e}))),f(e.prototype,e.toStringTag,n("c","Symbol")),f(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),f(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),Yc}())}function J(){return cu?au:(cu=1,au=(Nc?xc:(Nc=1,xc=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}))()?Array.from:function(){if(su)return ou;su=1;var e=K().iterator,t=function(){if(eu)return Zc;eu=1;var e={}.toString,t=e.call(function(){return arguments}());return Zc=function(r){return e.call(r)===t}}(),r=function(){if(ru)return tu;ru=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return tu=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=D(),i=j(),o=U(),s=L(),a=function(){if(iu)return nu;iu=1;var e={}.toString,t=e.call("");return nu=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,u=function(){}.call,l={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;return ou=function(p){var d,h,m,y,v,w,g,E,_,b,S=arguments[1],O=arguments[2];if(p=Object(o(p)),s(S)&&i(S),this&&this!==Array&&r(this))d=this;else{if(!S){if(t(p))return 1!==(v=p.length)?Array.apply(null,p):((y=[,])[0]=p[0],y);if(c(p)){for(y=Array(v=p.length),h=0;v>h;++h)y[h]=p[h];return y}}y=[]}if(!c(p))if(void 0!==(_=p[e])){for(g=i(_).call(p),d&&(y=new d),E=g.next(),h=0;!E.done;)b=S?u.call(S,O,E.value,h):E.value,d?(l.value=b,f(y,h,l)):y[h]=b,E=g.next(),++h;v=h}else if(a(p)){for(v=p.length,d&&(y=new d),h=0,m=0;v>h;++h)b=p[h],v>h+1&&(55296>(w=b.charCodeAt(0))||w>56319||(b+=p[++h])),b=S?u.call(S,O,b,m):b,d?(l.value=b,f(y,m,l)):y[m]=b,++m;v=m}if(void 0===v)for(v=n(p.length),d&&(y=new d(v)),h=0;v>h;++h)b=S?u.call(S,O,p[h],h):p[h],d?(l.value=b,f(y,h,l)):y[h]=b;return d&&(l.value=null,y.length=v),y},ou}())}function Q(){if(yu)return mu;yu=1;var e,t,r,n,i,o=(ac||(ac=1,e=ml,t=B(),r=function(){if(sc)return oc;sc=1;var e=L(),t={function:!0,object:!0};return oc=function(r){return e(r)&&t[typeof r]||!1}}(),n=L(),i=Error.captureStackTrace,e.exports=function(o){var s=Error(o),a=arguments[1],c=arguments[2];return n(c)||r(a)&&(c=a,a=null),n(c)&&t(s,c),n(a)&&(s.code=a),i&&i(s,e.exports),s}),ml.exports),s=V(),a=W(),c=function(){return Tc||(Tc=1,e=wl,wl.exports,u=W(),l=j(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,y={}.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0},n=function(e,t){var n,o;return l(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e){var t,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;n=i[t];++t)f.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(o=Array((r=arguments.length)-1),t=1;r>t;++t)o[t-1]=arguments[t];f.call(i,this,o)}},s={on:r=function(e,t){var r;return l(t),y.call(this,"__ee__")?r=this.__ee__:(r=v.value=d(null),h(this,"__ee__",v),v.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:i=function(e,t){var r,n,i,o;if(l(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(o=0;i=n[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===n.length?r[e]=n[o?0:1]:n.splice(o,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},emit:o},a={on:u(r),once:u(n),off:u(i),emit:u(o)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s),wl.exports;var e,t,r,n,i,o,s,a,c,u,l,f,p,d,h,m,y,v}().methods,u=function(){if(pu)return fu;pu=1;var e,t=function(){if(lu)return uu;lu=1;var e=J(),t=Array.isArray;return uu=function(r){return t(r)?r:e(r)}}(),r=L(),n=j(),i=[].slice;return e=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(i.call(e,this.length))},fu=function(i){return(i=t(i)).forEach((function(e){r(e)&&n(e)})),e.bind(i)}}(),l=function(){if(hu)return du;hu=1;var e=j();return du=function(t){var r;return"function"==typeof t?{set:t,get:t}:(r={get:e(t.get)},void 0!==t.set?(r.set=e(t.set),t.delete&&(r.delete=e(t.delete)),t.clear&&(r.clear=e(t.clear)),r):(r.set=r.get,r))}}(),f=function(){}.apply,p=function(){}.call,d=Object.create,h=Object.defineProperties,m=c.on,y=c.emit;return mu=function(e,t,r){var n,i,c,v,w,g,E,_,b,S,O,R,I,P,T,x=d(null);return i=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(S=l(r.normalizer),c=S.get,v=S.set,w=S.delete,g=S.clear),null!=r.resolvers&&(T=u(r.resolvers)),P=c?s((function(t){var r,i,s=arguments;if(T&&(s=T(s)),null!==(r=c(s))&&hasOwnProperty.call(x,r))return O&&n.emit("get",r,s,this),x[r];if(i=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),null===r){if(null!==(r=c(s)))throw o("Circular invocation","CIRCULAR_INVOCATION");r=v(s)}else if(hasOwnProperty.call(x,r))throw o("Circular invocation","CIRCULAR_INVOCATION");return x[r]=i,R&&n.emit("set",r,null,i),i}),i):0===t?function(){var t;if(hasOwnProperty.call(x,"data"))return O&&n.emit("get","data",arguments,this),x.data;if(t=arguments.length?f.call(e,this,arguments):p.call(e,this),hasOwnProperty.call(x,"data"))throw o("Circular invocation","CIRCULAR_INVOCATION");return x.data=t,R&&n.emit("set","data",null,t),t}:function(t){var r,i,s=arguments;if(T&&(s=T(arguments)),i=s[0]+"",hasOwnProperty.call(x,i))return O&&n.emit("get",i,s,this),x[i];if(r=1===s.length?p.call(e,this,s[0]):f.call(e,this,s),hasOwnProperty.call(x,i))throw o("Circular invocation","CIRCULAR_INVOCATION");return x[i]=r,R&&n.emit("set",i,null,r),r},n={original:e,memoized:P,profileName:r.profileName,get:function(e){return T&&(e=T(e)),c?c(e):e[0]+""},has:function(e){return hasOwnProperty.call(x,e)},delete:function(e){var t;hasOwnProperty.call(x,e)&&(w&&w(e),t=x[e],delete x[e],I&&n.emit("delete",e,t))},clear:function(){var e=x;g&&g(),x=d(null),n.emit("clear",e)},on:function(e,t){return"get"===e?O=!0:"set"===e?R=!0:"delete"===e&&(I=!0),m.call(this,e,t)},emit:y,updateEnv:function(){e=n.original}},E=c?s((function(e){var t,r=arguments;T&&(r=T(r)),null!==(t=c(r))&&n.delete(t)}),i):0===t?function(){return n.delete("data")}:function(e){return T&&(e=T(arguments)[0]),n.delete(e)},_=s((function(){var e,r=arguments;return 0===t?x.data:(T&&(r=T(r)),e=c?c(r):r[0]+"",x[e])})),b=s((function(){var e,r=arguments;return 0===t?n.has("data"):(T&&(r=T(r)),null!==(e=c?c(r):r[0]+"")&&n.has(e))})),h(P,{__memoized__:a(!0),delete:a(E),clear:a(n.clear),_get:a(_),_has:a(b)}),n},mu}function Z(){if(Nu)return xu;Nu=1;var e=Tu?Pu:(Tu=1,Pu=(Ou?Su:(Ou=1,Su=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:Iu?Ru:(Iu=1,Ru=function(e){return e!=e})),t=D(),r=U(),n=[].indexOf,i={}.hasOwnProperty,o=Math.abs,s=Math.floor;return xu=function(a){var c,u,l;if(!e(a))return n.apply(this,arguments);for(u=t(r(this).length),c=l=isNaN(l=arguments[1])?0:0>l?t(this.length)-s(o(l)):s(l);u>c;++c)if(i.call(this,c)&&e(this[c]))return c;return-1},xu}function ee(){if(ju)return Fu;ju=1;var e=j(),t=M(),r=function(){}.call;return Fu=function(n,i){var o={},s=arguments[2];return e(i),t(n,(function(e,t,n,a){o[t]=r.call(i,s,e,t,n,a)})),o},Fu}function te(){if(Mu)return Uu;Mu=1;var e=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},t=function(t){var r,n,i=document.createTextNode(""),o=0;return new t((function(){var e;if(r)n&&(r=n.concat(r));else{if(!n)return;r=n}if(n=r,r=null,"function"==typeof n)return e=n,n=null,void e();for(i.data=o=++o%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(i,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,i.data=o=++o%2)}};return Uu=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 re(){return qu?Vu:(qu=1,Vu=function(e){return"function"==typeof e})}function ne(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return el||(el=1,_l.exports=e,_l.exports.default=e),_l.exports}function ie(){if(tl)return El;tl=1;var e=ee(),t=function(){if(Hu)return Bu;Hu=1;var e=[].forEach,t=Object.create;return Bu=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Bu}(),r=function(){if(Yu)return Xu;Yu=1;var e=U(),t=function(){if(Wu)return zu;Wu=1;var e=re();return zu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Xu=function(r){return t(e(r))}}(),n=function(){if(Zu)return Qu;Zu=1;var e=function(){if(Ju)return Ku;Ju=1;var e=re();return Ku=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return Qu=function(t){var r=e(t);return r.length>100&&(r=r.slice(0,99)+"…"),r.replace(/[\n\r\u2028\u2029]/g,(function(e){return JSON.stringify(e).slice(1,-1)}))}}(),i=ne(),o=te(),s=Object.create,a=t("then","then:finally","done","done:finally");return G().promise=function(t,c){var u=s(null),l=s(null),f=s(null);if(!0===t)t=null;else if(t=r(t),!a[t])throw new TypeError("'"+n(t)+"' is not valid promise mode");c.on("set",(function(e,r,n){var s=!1;if(!i(n))return l[e]=n,void c.emit("setasync",e,1);u[e]=1,f[e]=n;var a=function(t){var r=u[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.");r&&(delete u[e],l[e]=t,c.emit("setasync",e,r))},p=function(){s=!0,u[e]&&(delete u[e],delete f[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){o(p)};"function"==typeof(n=n.then((function(e){o(a.bind(this,e))}),h)).finally&&n.finally(h)}else if("done"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");n.done(a,p)}else if("done:finally"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof n.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");n.done(a),n.finally(p)}})),c.on("get",(function(e,t,r){var n;if(u[e])++u[e];else{var s=function(){c.emit("getasync",e,t,r)};i(n=f[e])?"function"==typeof n.done?n.done(s):n.then((function(){o(s)})):s()}})),c.on("delete",(function(e){if(delete f[e],u[e])delete u[e];else if(hasOwnProperty.call(l,e)){var t=l[e];delete l[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=l;l=s(null),u=s(null),f=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},El}async function oe(e){try{return await pi.access(e),!0}catch{return!1}}function se(e){const t=function(){if(I()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Ln("/Users/",process.env.SUDO_USER):Ln("/home/",process.env.SUDO_USER);{const e=Sn();if(""===e)return;return e}}();return void 0===t?e:e.replace(Pl,t)}async function ae(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 oe(e.rcPath)&&((await xl(e.rcPath,"utf8")).includes(t)||(await Tl(e.rcPath,`\n${t}\n`),d(`Added ${t} to ${e.rcPath}`)))}async function ce(e,t){await oe(t)&&((await xl(t,"utf-8")).includes(e)||(await Tl(t,e),d(`${e} was added to ${t}`)))}async function ue(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:$l,...r},i=function(e,t=!1){const r=t?kl(e):e;return Bl(r,'"',"\\")}(t??"",n.escapeSpace);try{if(Hl)try{if(!n.overwrite&&void 0!==process.env[e])return void d(`Environment variable ${e} is already defined. Skipping.`);Io.exportVariable(e,i)}catch(o){l(o),await le(e,i,n)}else await le(e,i,n)}catch(o){l(`${o}\nFailed to export environment variable ${e}=${i}. You should add it manually.`)}}async function le(e,t,r){const n=t??"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await b(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void d(`${e}='${n}' was set in the environment.`)):void d(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await Cl(r),void(r.overwrite?(await Vl(r.rcPath,`\nexport ${e}="${n}"\n`),d(`${e}="${n}" was added to "${r.rcPath}`)):(await Vl(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),d(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function fe(e,t={}){const r={rcPath:$l,...t};if(!function(e){return!!Wl.some((t=>t.test(e)))&&(process.env.PATH?.split(kn)??[]).includes(e)}(e)){process.env.PATH=`${e}${kn}${process.env.PATH}`;try{if(ql)try{Io.addPath(e)}catch(n){l(n),await pe(e,r)}else await pe(e,r)}catch(n){l(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function pe(e,t){switch(process.platform){case"win32":return await b(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void d(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await Cl(t),await zl(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void d(`"${e}" was added to "${t.rcPath}"`);default:return}}function de(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 he(){return Xl||(Xl=1,e=Jl,function(){function t(e,t,i){if(r(e),"object"!=typeof i)throw Error("List of variants should be specified as an object");var o=n[e](t);return void 0!==i[o]?i[o]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{de(__dirname+"/../locales/"+e+".js")}catch(t){throw Error("Failed to load the following locale: "+e)}}(e)}var n={};e.exports={create:function(e){return r(e),{pluralize:function(r,n){return t(e,r,n)}}},addLocale:function(e,t){n[e]=t},pluralize:t}}()),Jl.exports;var e}function me(){return Kl?Yl:(Kl=1,Yl=he())}function ye(){return hf?df:(hf=1,df={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})}function ve(){if(yf)return mf;yf=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return mf=e}function we(){return vf||(vf=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=ye(),o=ve(),s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,n]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),i=f++;o(e,i,t),l[e]=i,c[i]=t,u[i]=n,s[i]=RegExp(t,r?"g":void 0),a[i]=RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",p+"+"),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),h("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),h("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),h("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("COERCERTLFULL",c[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Kp,Kp.exports)),Kp.exports}function ge(){if(gf)return wf;gf=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return wf=r=>r?"object"!=typeof r?e:r:t}function Ee(){if(_f)return Ef;_f=1;const e=/^[0-9]+$/,t=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:r>t?-1:1};return Ef={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)}}function _e(){if(Sf)return bf;Sf=1;const e=ve(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=ye(),{safeRe:n,safeSrc:i,t:o}=we(),s=ge(),{compareIdentifiers:a}=Ee();class c{constructor(i,a){if(a=s(a),i instanceof c){if(i.loose===!!a.loose&&i.includePrerelease===!!a.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;const u=i.trim().match(a.loose?n[o.LOOSE]:n[o.FULL]);if(!u)throw new TypeError("Invalid Version: "+i);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>r||0>this.major)throw new TypeError("Invalid major version");if(this.minor>r||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>r||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=u[4]?u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&r>t)return t}return e})):[],this.build=u[5]?u[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(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 r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(e("prerelease compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return a(n,i)}while(++r)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(e("build compare",r,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return a(n,i)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){const e=RegExp(`^${this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]}$`),r=("-"+t).match(e);if(!r||r[1]!==t)throw Error("invalid identifier: "+t)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error("invalid increment argument: "+e)}return this.raw=this.format(),this.build.length&&(this.raw+="+"+this.build.join(".")),this}}return bf=c}function be(){if(Rf)return Of;Rf=1;const e=_e();return Of=(t,r,n=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(i){if(!n)return null;throw i}}}function Se(){if(Pf)return If;Pf=1;const e=be();return If=(t,r)=>{const n=e(t,r);return n?n.version:null}}function Oe(){if(kf)return Lf;kf=1;const e=_e();return Lf=(t,r)=>new e(t,r).major}function Re(){if(Hf)return Bf;Hf=1;const e=_e();return Bf=(t,r,n)=>new e(t,n).compare(new e(r,n))}function Ie(){if(Yf)return Xf;Yf=1;const e=_e();return Xf=(t,r,n)=>{const i=new e(t,n),o=new e(r,n);return i.compare(o)||i.compareBuild(o)}}function Pe(){if(tp)return ep;tp=1;const e=Re();return ep=(t,r,n)=>e(t,r,n)>0}function Te(){if(np)return rp;np=1;const e=Re();return rp=(t,r,n)=>0>e(t,r,n)}function xe(){if(op)return ip;op=1;const e=Re();return ip=(t,r,n)=>0===e(t,r,n)}function Ne(){if(ap)return sp;ap=1;const e=Re();return sp=(t,r,n)=>0!==e(t,r,n)}function $e(){if(up)return cp;up=1;const e=Re();return cp=(t,r,n)=>e(t,r,n)>=0}function Ce(){if(fp)return lp;fp=1;const e=Re();return lp=(t,r,n)=>0>=e(t,r,n)}function Ae(){if(dp)return pp;dp=1;const e=xe(),t=Ne(),r=Pe(),n=$e(),i=Te(),o=Ce();return pp=(s,a,c,u)=>{switch(a){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return r(s,c,u);case">=":return n(s,c,u);case"<":return i(s,c,u);case"<=":return o(s,c,u);default:throw new TypeError("Invalid operator: "+a)}}}function Le(){if(mp)return hp;mp=1;const e=_e(),t=be(),{safeRe:r,t:n}=we();return hp=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i+=""),"string"!=typeof i)return null;let s=null;if((o=o||{}).rtl){const e=o.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(o.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);return null===s?null:t(`${s[2]}.${s[3]||"0"}.${s[4]||"0"}${o.includePrerelease&&s[5]?"-"+s[5]:""}${o.includePrerelease&&s[6]?"+"+s[6]:""}`,o)}}function ke(){if(gp)return wp;gp=1;const e=/\s+/g;class t{constructor(r,o){if(o=n(o),r instanceof t)return r.loose===!!o.loose&&r.includePrerelease===!!o.includePrerelease?r:new t(r.raw,o);if(r instanceof i)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=r.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&&d))+":"+e,n=r.get(t);if(n)return n;const s=this.options.loose;e=e.replace(s?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE],P(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(a[c.TILDETRIM],l),o("tilde trim",e),e=e.replace(a[c.CARETTRIM],f),o("caret trim",e);let m=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),o("range list",m);const y=new Map,w=m.map((e=>new i(e,this.options)));for(const r of w){if(h(r))return[r];y.set(r.value,r)}y.size>1&&y.has("")&&y.delete("");const g=[...y.values()];return r.set(t,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>y(t,r)&&e.set.some((e=>y(e,r)&&t.every((t=>e.every((e=>t.intersects(e,r)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(t){return!1}for(let r=0;this.set.length>r;r++)if(T(this.set[r],e,this.options))return!0;return!1}}wp=t;const r=new(vp?yp:(vp=1,yp=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}})),n=ge(),i=De(),o=ve(),s=_e(),{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:f}=we(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:d}=ye(),h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},v=(e,t)=>(o("comp",e,t),e=_(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=S(e,t),o("xrange",e),e=R(e,t),o("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>e.replace(t.loose?a[c.TILDELOOSE]:a[c.TILDE],((t,r,n,i,s)=>{let a;return o("tilde",e,t,r,n,i,s),w(r)?a="":w(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(o("replaceTilde pr",s),a=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,o("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,i,s,a)=>{let c;return o("caret",e,t,n,i,s,a),w(n)?c="":w(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(s)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(o("replaceCaret pr",a),c="0"===n?"0"===i?`>=${n}.${i}.${s}-${a} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${a} <${+n+1}.0.0-0`):(o("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),o("caret return",c),c}))},S=(e,t)=>(o("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],((r,n,i,s,a,c)=>{o("xRange",e,r,n,i,s,a,c);const u=w(i),l=u||w(s),f=l||w(a);return"="===n&&f&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(s=0),a=0,">"===n?(n=">=",l?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+i}.${s}.${a}${c}`):l?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o("xRange return",r),r})),R=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),P=e=>(t,r,n,i,o,s,a,c,u,l,f,p)=>`${r=w(n)?"":w(i)?`>=${n}.0.0${e?"-0":""}`:w(o)?`>=${n}.${i}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=w(u)?"":w(l)?`<${+u+1}.0.0-0`:w(f)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${f}-${p}`:e?`<${u}.${l}.${+f+1}-0`:"<="+c}`.trim(),T=(e,t,r)=>{for(let n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;e.length>r;r++)if(o(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return wp}function De(){if(_p)return Ep;_p=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,i){if(i=r(i),n instanceof t){if(n.loose===!!i.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,i),this.options=i,this.loose=!!i.loose,this.parse(n),this.value=this.semver===e?"":this.operator+this.semver.version,s("comp",this)}parse(t){const r=t.match(this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR]);if(!r)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),this.semver=r[2]?new a(r[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(r){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,n).test(this.value):""===e.operator?""===e.value||new c(this.value,n).test(e.semver):!((n=r(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!n.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("="))&&!(o(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(o(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Ep=t;const r=ge(),{safeRe:n,t:i}=we(),o=Ae(),s=ve(),a=_e(),c=ke();return Ep}function Fe(){if(Sp)return bp;Sp=1;const e=ke();return bp=(t,r,n)=>{try{r=new e(r,n)}catch(i){return!1}return r.test(t)}}function je(){if(kp)return Lp;kp=1;const e=_e(),t=De(),{ANY:r}=t,n=ke(),i=Fe(),o=Pe(),s=Te(),a=Ce(),c=$e();return Lp=(u,l,f,p)=>{let d,h,m,y,v;switch(u=new e(u,p),l=new n(l,p),f){case">":d=o,h=a,m=s,y=">",v=">=";break;case"<":d=s,h=c,m=o,y="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,p))return!1;for(let e=0;l.set.length>e;++e){let n=null,i=null;if(l.set[e].forEach((e=>{e.semver===r&&(e=new t(">=0.0.0")),n=n||e,i=i||e,d(e.semver,n.semver,p)?n=e:m(e.semver,i.semver,p)&&(i=e)})),n.operator===y||n.operator===v)return!1;if((!i.operator||i.operator===y)&&h(u,i.semver))return!1;if(i.operator===v&&m(u,i.semver))return!1}return!0}}function Ue(){if(Wp)return zp;Wp=1;const e=we(),t=ye(),r=_e(),n=Ee(),i=be(),o=Se(),s=function(){if(xf)return Tf;xf=1;const e=be();return Tf=(t,r)=>{const n=e(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null}}(),a=function(){if($f)return Nf;$f=1;const e=_e();return Nf=(t,r,n,i,o)=>{"string"==typeof n&&(o=i,i=n,n=void 0);try{return new e(t instanceof e?t.version:t,n).inc(r,i,o).version}catch(s){return null}}}(),c=function(){if(Af)return Cf;Af=1;const e=be();return Cf=(t,r)=>{const n=e(t,null,!0),i=e(r,null,!0),o=n.compare(i);if(0===o)return null;const s=o>0,a=s?n:i,c=s?i:n,u=!!a.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(a))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"}}(),u=Oe(),l=function(){if(Ff)return Df;Ff=1;const e=_e();return Df=(t,r)=>new e(t,r).minor}(),f=function(){if(Uf)return jf;Uf=1;const e=_e();return jf=(t,r)=>new e(t,r).patch}(),p=function(){if(Gf)return Mf;Gf=1;const e=be();return Mf=(t,r)=>{const n=e(t,r);return n&&n.prerelease.length?n.prerelease:null}}(),d=Re(),h=function(){if(qf)return Vf;qf=1;const e=Re();return Vf=(t,r,n)=>e(r,t,n)}(),m=function(){if(Wf)return zf;Wf=1;const e=Re();return zf=(t,r)=>e(t,r,!0)}(),y=Ie(),v=function(){if(Jf)return Kf;Jf=1;const e=Ie();return Kf=(t,r)=>t.sort(((t,n)=>e(t,n,r)))}(),w=function(){if(Zf)return Qf;Zf=1;const e=Ie();return Qf=(t,r)=>t.sort(((t,n)=>e(n,t,r)))}(),g=Pe(),E=Te(),_=xe(),b=Ne(),S=$e(),O=Ce(),R=Ae(),I=Le(),P=De(),T=ke(),x=Fe(),N=function(){if(Rp)return Op;Rp=1;const e=ke();return Op=(t,r)=>new e(t,r).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}(),$=function(){if(Pp)return Ip;Pp=1;const e=_e(),t=ke();return Ip=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),C=function(){if(xp)return Tp;xp=1;const e=_e(),t=ke();return Tp=(r,n,i)=>{let o=null,s=null,a=null;try{a=new t(n,i)}catch(c){return null}return r.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new e(o,i)))})),o}}(),A=function(){if($p)return Np;$p=1;const e=_e(),t=ke(),r=Pe();return Np=(n,i)=>{n=new t(n,i);let o=new e("0.0.0");if(n.test(o))return o;if(o=new e("0.0.0-0"),n.test(o))return o;o=null;for(let t=0;n.set.length>t;++t){let i=null;n.set[t].forEach((t=>{const n=new e(t.semver.version);switch(t.operator){case">":0===n.prerelease.length?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":i&&!r(n,i)||(i=n);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+t.operator)}})),!i||o&&!r(o,i)||(o=i)}return o&&n.test(o)?o:null}}(),L=function(){if(Ap)return Cp;Ap=1;const e=ke();return Cp=(t,r)=>{try{return new e(t,r).range||"*"}catch(n){return null}}}(),k=je(),D=function(){if(Fp)return Dp;Fp=1;const e=je();return Dp=(t,r,n)=>e(t,r,">",n)}(),F=function(){if(Up)return jp;Up=1;const e=je();return jp=(t,r,n)=>e(t,r,"<",n)}(),j=function(){if(Gp)return Mp;Gp=1;const e=ke();return Mp=(t,r,n)=>(t=new e(t,n),r=new e(r,n),t.intersects(r,n))}(),U=function(){if(Hp)return Bp;Hp=1;const e=Fe(),t=Re();return Bp=(r,n,i)=>{const o=[];let s=null,a=null;const c=r.sort(((e,r)=>t(e,r,i)));for(const t of c)e(t,n,i)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)u.push(e===t?e:t||e!==c[0]?t?e===c[0]?"<="+t:`${e} - ${t}`:">="+e:"*");const l=u.join(" || ");return("string"==typeof n.raw?n.raw:n+"").length>l.length?l:n}}(),M=function(){if(qp)return Vp;qp=1;const e=ke(),t=De(),{ANY:r}=t,n=Fe(),i=Re(),o=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],a=(e,t,a)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r){if(1===t.length&&t[0].semver===r)return!0;e=a.includePrerelease?o:s}if(1===t.length&&t[0].semver===r){if(a.includePrerelease)return!0;t=s}const l=new Set;let f,p,d,h,m,y,v;for(const r of e)">"===r.operator||">="===r.operator?f=c(f,r,a):"<"===r.operator||"<="===r.operator?p=u(p,r,a):l.add(r.semver);if(l.size>1)return null;if(f&&p){if(d=i(f.semver,p.semver,a),d>0)return null;if(0===d&&(">="!==f.operator||"<="!==p.operator))return null}for(const r of l){if(f&&!n(r,f+"",a))return null;if(p&&!n(r,p+"",a))return null;for(const e of t)if(!n(r,e+"",a))return!1;return!0}let w=!(!p||a.includePrerelease||!p.semver.prerelease.length)&&p.semver,g=!(!f||a.includePrerelease||!f.semver.prerelease.length)&&f.semver;w&&1===w.prerelease.length&&"<"===p.operator&&0===w.prerelease[0]&&(w=!1);for(const r of t){if(v=v||">"===r.operator||">="===r.operator,y=y||"<"===r.operator||"<="===r.operator,f)if(g&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===g.major&&r.semver.minor===g.minor&&r.semver.patch===g.patch&&(g=!1),">"===r.operator||">="===r.operator){if(h=c(f,r,a),h===r&&h!==f)return!1}else if(">="===f.operator&&!n(f.semver,r+"",a))return!1;if(p)if(w&&r.semver.prerelease&&r.semver.prerelease.length&&r.semver.major===w.major&&r.semver.minor===w.minor&&r.semver.patch===w.patch&&(w=!1),"<"===r.operator||"<="===r.operator){if(m=u(p,r,a),m===r&&m!==p)return!1}else if("<="===p.operator&&!n(p.semver,r+"",a))return!1;if(!r.operator&&(p||f)&&0!==d)return!1}return!(f&&y&&!p&&0!==d||p&&v&&!f&&0!==d||g||w)},c=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};return Vp=(t,r,n={})=>{if(t===r)return!0;t=new e(t,n),r=new e(r,n);let i=!1;e:for(const e of t.set){for(const t of r.set){const r=a(e,t,n);if(i=i||null!==r,r)continue e}if(i)return!1}return!0}}();return zp={parse:i,valid:o,clean:s,inc:a,diff:c,major:u,minor:l,patch:f,prerelease:p,compare:d,rcompare:h,compareLoose:m,compareBuild:y,sort:v,rsort:w,gt:g,lt:E,eq:_,neq:b,gte:S,lte:O,cmp:R,coerce:I,Comparator:P,Range:T,satisfies:x,toComparators:N,maxSatisfying:$,minSatisfying:C,minVersion:A,validRange:L,outside:k,gtr:D,ltr:F,intersects:j,simplifyRange:U,subset:M,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers}}function Me(e){return null==e?[]:Array.isArray(e)?e:[e]}function Ge(e,t,r,n){var i,o=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(i=+r)==0?i:r),!!r)):0*(i=+r)==0?i:r;e[t]=null==o?s:Array.isArray(o)?o.concat(s):[o,s]}async function Be(e,t,r,n=40){td?await async function(e,t,r=40){await x("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Cl(r),await rd(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function He(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 Ve(){return null!==da.sync("nala",{nothrow:!0})}function qe(){let e;return e=Ve()?"nala":"apt-get",e}function ze(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function We(e){try{const{stdout:t}=await g("dpkg",["-s",e],{env:He("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Xe(e,t=qe()){return(await Promise.all(e.map((e=>Ye(e,t))))).filter((e=>void 0!==e))}async function Ye(e,t=qe()){const r=await async function(e,t){const{name:r,version:n,fallBackToLatest:i=!1}=t;switch(await Ke(e,r,n)){case sd.NameDashVersion:return`${r}-${n}`;case sd.NameEqualsVersion:return`${r}=${n}`;case sd.Name:if(void 0===n||""===n)return r;if(i)return f(`Could not find package '${r}' with version '${n}'. Installing the latest version.`),r;throw Error(`Could not find package '${r}' with version '${n}'`);default:throw Error(`Could not find package '${r}' ${n??"with unspecified version"}`)}}(t,e);return await We(r)?void 0:r}async function Ke(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await g("apt-cache",["search","--names-only",`^${ze(t)}-${ze(r)}$`],{env:He(e),stdio:"pipe"});if(""!==n.trim())return sd.NameDashVersion;try{const{stdout:n}=await g("apt-cache",["show",`${t}=${r}`],{env:He(e)});if(""===n.trim())return sd.NameEqualsVersion}catch{}}try{const{stdout:r}=await g("apt-cache",["show",t],{env:He(e),stdio:"pipe"});if(""!==r.trim())return sd.Name}catch{}return id?void 0===r||""===r?sd.Name:sd.None:(od(e),Ke(e,t,r))}async function Je(){if(await We("software-properties-common"))return;const e="apt-get";T(e,["install","-y","--fix-broken","-o",nd,"software-properties-common"],{...va,env:He(e)})}async function Qe(e,t=!1){try{const n=qe();for(const{name:t,version:r}of e)d(`Installing ${t} ${r??""} via ${n}`);t&&od.clear(),od(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>e.repository??[])))];await Promise.all(r.map((t=>async function(e,t=qe()){await cd(t),await Je(),T("add-apt-repository",["-y","--no-update",e],{...va,env:He(t)}),od.clear(),od(t)}(t,e))))}(n,e);const i=await Xe(e,n);if(0===i.length)return d("All packages are already installed"),{binDir:"/usr/bin/"};await cd(n);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?Ze(t):async function({key:e,keyServer:t=fd,fileName:r,keyStorePath:n=fd}){try{tt(r);const i=Ln(n,r);return await oe(i)||(et(),await x("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+i,"--keyserver",t,"--recv-keys",e]),await x("chmod",["644",i])),i}catch(i){return void f(`Failed to add apt key via server ${t}: ${i}`)}}(t))})))}(e),T(n,["install","--fix-broken","-y",...i],{...va,env:He(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;ud.some((e=>"string"==typeof r.stderr&&r.stderr.includes(e)))&&(f(`Failed to install packages ${i}. Retrying...`),T(n,["install","--fix-broken","-y","-o",nd,...i],{...va,env:He(n)}))}return{binDir:"/usr/bin/"}}catch(r){throw Error("Failed to install apt packages: "+(r instanceof Error?`${r.message}\n${r.stack}`:r+""))}}async function Ze({keyUrl:e,fileName:t,keyStorePath:r=ld}){try{tt(t);const n=Ln(r,t);if(!(await oe(n))){et(),await Qe([{name:"ca-certificates"}]);const r=Ln(On(),t),i=new ed.DownloaderHelper(e,On(),{fileName:t});i.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await i.start(),T("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),T("chmod",["644",n])}return n}catch(n){return void f(`Failed to add apt key via download ${e}: ${n}`)}}function et(){T("gpg",["-k"])}function tt(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function rt(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof pd)return{binDir:pd};const t=await da("brew",{nothrow:!0});if(null!==t)return pd=Dn(t),{binDir:pd};await Qe([{name:"ca-certificates"}]);const r=new ed.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",On(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),E("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),pd=nt(),await fe(pd,e.rcOptions),{binDir:pd}}function nt(){return Ln(ot(),"bin")}function it(){return Ln(nt(),"brew")}function ot(){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")}function st(e,t){return void 0!==t&&""!==t?`${e}@${t}`:e}async function at(e){try{const t=it();return(await g(t,["--prefix",e],{stdio:"pipe"})).stdout}catch{return}}async function ct(e,t,r={}){"overwrite"in r||(r.overwrite=!0),!0===r.cask&&(r.overwrite=!1),d(`Installing ${e} ${t??""} via brew`),vd&&null!==da.sync("brew",{nothrow:!0})||(await rt(),vd=!0);const n=it(),i=["install",st(e,t)];for(const[s,a]of Object.entries(r))"boolean"==typeof a&&a?i.push("--"+s):"string"==typeof a&&i.push("--"+s,a);E(n,i,{stdio:"inherit"});const o=await async function(e,t){const r=st(e,t),n=await at(r);if(void 0!==n)return n;const i=await at(e);return void 0!==i?i:function(e,t){const r=ot(),n=Ln(r,"opt",t);if(Tn(n))return n;const i=Ln(r,"opt",e);if(Tn(i))return i;const o=Ln(r,"Cellar",t);if(Tn(o))return o;const s=Ln(r,"Cellar",e);if(Tn(s))return s;const a=Ln(r,"lib",t);if(Tn(a))return a;const c=Ln(r,"lib",e);return Tn(c)?c:void 0}(e,r)}(e,t);return void 0===o?(f(`Failed to find installation directory for ${e} ${t}`),{binDir:nt(),installDir:void 0}):{installDir:o,binDir:Ln(o,"bin")}}function ut(){return"linux"===process.platform&&(void 0===dd&&(dd=null!==da.sync("dnf",{nothrow:!0})),dd)}function lt(){return"linux"===process.platform&&(void 0===hd&&(hd=null!==da.sync("pacman",{nothrow:!0})),hd)}function ft(){return"linux"===process.platform&&(void 0===md&&(md=null!==da.sync("apt-get",{nothrow:!0})),md)}async function pt(e,t,r){if("win32"!==process.platform)return;if("string"==typeof yd)return{binDir:yd};const n=da.sync("choco",{nothrow:!0});if(null!==n)return yd=Dn(n),{binDir:yd};let i="powershell.exe";const o=da.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==o&&(i=o),E(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 s=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await fe(s,Ay);const a=da.sync("choco",{nothrow:!0});return yd=null!==a?Dn(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await oe(yd)?{binDir:yd}:void 0}async function dt(e,t,r=[]){d(`Installing ${e} ${t??""} via chocolatey`),wd&&null!==da.sync("choco",{nothrow:!0})||(await pt(0,0,process),wd=!0);const n=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=n,void 0!==t&&""!==t)E("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{E("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(s){if(!s.message.includes("exit code 3010"))throw s;d(e+" might require a reboot for the completion of the installation.")}const o=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin";return await fe(o,Ay),{binDir:o}}async function ht(e){for(const{name:t,version:r}of e)d(`Installing ${t} ${r??""} via dnf`);return T("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0===t||""===t)return e;const{stdout:r}=await g("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;const{stdout:n}=await g("dnf",["search","-q",`${e}${t}`]);return""!==n.trim()?`${e}${t}`:(f(`Failed to install ${e} ${t} via dnf, trying without version`),e)}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function mt(e,t,r){d(`Installing ${e} ${t??""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===da.sync("yay",{nothrow:!0}))try{T("pacman",["-S","--noconfirm","base-devel","git"]);const e=Ln(On(),"yay");T("mkdir",["-p",e]),R()?(f("Creating a non-root user to build yay"),T("useradd",["-m","-G","wheel","builder"]),T("passwd",["-d","builder"]),T("chown",["-R","builder:builder",e]),T("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),bd=!0,E("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),E("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(E("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:On()}),E("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),E("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),gd||"yay"===r||(T(n,["-Sy","--noconfirm"]),gd=!0),Ed||"yay"===r||(T(n,["-S","--noconfirm","base-devel"]),Ed=!0);const i=e=>"yay"===r?R()&&bd?T("su",["-","builder","-c","yay -S --noconfirm "+e]):E(r,["-S","--noconfirm",e]):T(r??n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await g(e,["-Si",t]);for(const e of n.matchAll(_d))r.push(e[1])}catch(n){f(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{i(`${e}=${t}`)}catch{i(`${e}${t}`)}else d(`Failed to install ${e} ${t} via pacman, trying without version`),i(e)}else i(e);return{binDir:"/usr/bin/"}}function yt(e,t){return Object.keys(t).forEach((r=>{"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:()=>t[r]})})),e}function vt(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function wt(e,t=!0){return t?Fn(e):Fn(e,jn(e))}function gt(e){return Un(e).replace(RegExp(ze(Mn)+"$"),"")}function Et(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function _t(e,t){const r=jn(e),n=`${t}${Fn(e,r)}${r}`;return Ln(Dn(e),n)}function bt(e,t){const r=jn(e),n=`${Fn(e,r)}${t}${r}`;return Ln(Dn(e),n)}function St(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ot(e){return"win32"===process.platform?e:"./"+e}function Rt(e){const t=jn(e).length;return e.slice(0,-t)}function It(e,t){return Rd(e,t)}function Pt(e,t){const r=Gn(t,e);return!(!r||".."===r||r.startsWith(".."+Mn)||r===Bn(e))}function Tt(){return zd||(zd=1,function(e,t){function r(e){N[e]=$++}function n(e){for(var t=0;A.length>t;t++){var r=A[t][0],n=A[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>O)return null;if(!(t.loose?T[N.LOOSE]:T[N.FULL]).test(e))return null;try{return new o(e,t)}catch(r){return null}}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof o){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 o))return new o(e,t);S("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?T[N.LOOSE]:T[N.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>R||0>this.major)throw new TypeError("Invalid major version");if(this.minor>R||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>R||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=r[4]?r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&R>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=k.test(e),n=k.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1}function a(e,t,r){return new o(e,r).compare(new o(t,r))}function c(e,t,r){return a(e,t,r)>0}function u(e,t,r){return 0>a(e,t,r)}function l(e,t,r){return 0===a(e,t,r)}function f(e,t,r){return 0!==a(e,t,r)}function p(e,t,r){return a(e,t,r)>=0}function d(e,t,r){return 0>=a(e,t,r)}function h(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return l(e,r,n);case"!=":return f(e,r,n);case">":return c(e,r,n);case">=":return p(e,r,n);case"<":return u(e,r,n);case"<=":return d(e,r,n);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===D?"":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 v(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function w(e){return!e||"x"===e.toLowerCase()||"*"===e}function g(e,t,r,n,i,o,s,a,c,u,l,f,p){return((t=w(r)?"":w(n)?">="+r+".0.0":w(i)?">="+r+"."+n+".0":">="+t)+" "+(a=w(c)?"":w(u)?"<"+(+c+1)+".0.0":w(l)?"<"+c+"."+(+u+1)+".0":f?"<="+c+"."+u+"."+l+"-"+f:"<="+a)).trim()}function E(e,t,r){for(var n=0;e.length>n;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;e.length>n;n++)if(S(e[n].semver),e[n].semver!==D&&e[n].semver.prerelease.length>0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new y(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var i,s,a,l,f;switch(e=new o(e,n),t=new y(t,n),r){case">":i=c,s=d,a=u,l=">",f=">=";break;case"<":i=u,s=p,a=c,l="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_(e,t,n))return!1;for(var h=0;t.set.length>h;++h){var v=null,w=null;if(t.set[h].forEach((function(e){e.semver===D&&(e=new m(">=0.0.0")),w=w||e,i(e.semver,(v=v||e).semver,n)?v=e:a(e.semver,w.semver,n)&&(w=e)})),v.operator===l||v.operator===f)return!1;if((!w.operator||w.operator===l)&&s(e,w.semver))return!1;if(w.operator===f&&a(e,w.semver))return!1}return!0}var S;t=Zd.exports=o,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,R=Number.MAX_SAFE_INTEGER||9007199254740991,I=O-6,P=t.re=[],T=t.safeRe=[],x=t.src=[],N=t.tokens={},$=0,C="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",O],[C,I]];r("NUMERICIDENTIFIER"),x[N.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),x[N.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),x[N.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+C+"*",r("MAINVERSION"),x[N.MAINVERSION]="("+x[N.NUMERICIDENTIFIER]+")\\.("+x[N.NUMERICIDENTIFIER]+")\\.("+x[N.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),x[N.MAINVERSIONLOOSE]="("+x[N.NUMERICIDENTIFIERLOOSE]+")\\.("+x[N.NUMERICIDENTIFIERLOOSE]+")\\.("+x[N.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),x[N.PRERELEASEIDENTIFIER]="(?:"+x[N.NUMERICIDENTIFIER]+"|"+x[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),x[N.PRERELEASEIDENTIFIERLOOSE]="(?:"+x[N.NUMERICIDENTIFIERLOOSE]+"|"+x[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),x[N.PRERELEASE]="(?:-("+x[N.PRERELEASEIDENTIFIER]+"(?:\\."+x[N.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),x[N.PRERELEASELOOSE]="(?:-?("+x[N.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+x[N.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),x[N.BUILDIDENTIFIER]=C+"+",r("BUILD"),x[N.BUILD]="(?:\\+("+x[N.BUILDIDENTIFIER]+"(?:\\."+x[N.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),x[N.FULLPLAIN]="v?"+x[N.MAINVERSION]+x[N.PRERELEASE]+"?"+x[N.BUILD]+"?",x[N.FULL]="^"+x[N.FULLPLAIN]+"$",r("LOOSEPLAIN"),x[N.LOOSEPLAIN]="[v=\\s]*"+x[N.MAINVERSIONLOOSE]+x[N.PRERELEASELOOSE]+"?"+x[N.BUILD]+"?",r("LOOSE"),x[N.LOOSE]="^"+x[N.LOOSEPLAIN]+"$",r("GTLT"),x[N.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),x[N.XRANGEIDENTIFIERLOOSE]=x[N.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),x[N.XRANGEIDENTIFIER]=x[N.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),x[N.XRANGEPLAIN]="[v=\\s]*("+x[N.XRANGEIDENTIFIER]+")(?:\\.("+x[N.XRANGEIDENTIFIER]+")(?:\\.("+x[N.XRANGEIDENTIFIER]+")(?:"+x[N.PRERELEASE]+")?"+x[N.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),x[N.XRANGEPLAINLOOSE]="[v=\\s]*("+x[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+x[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+x[N.XRANGEIDENTIFIERLOOSE]+")(?:"+x[N.PRERELEASELOOSE]+")?"+x[N.BUILD]+"?)?)?",r("XRANGE"),x[N.XRANGE]="^"+x[N.GTLT]+"\\s*"+x[N.XRANGEPLAIN]+"$",r("XRANGELOOSE"),x[N.XRANGELOOSE]="^"+x[N.GTLT]+"\\s*"+x[N.XRANGEPLAINLOOSE]+"$",r("COERCE"),x[N.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),P[N.COERCERTL]=RegExp(x[N.COERCE],"g"),T[N.COERCERTL]=RegExp(n(x[N.COERCE]),"g"),r("LONETILDE"),x[N.LONETILDE]="(?:~>?)",r("TILDETRIM"),x[N.TILDETRIM]="(\\s*)"+x[N.LONETILDE]+"\\s+",P[N.TILDETRIM]=RegExp(x[N.TILDETRIM],"g"),T[N.TILDETRIM]=RegExp(n(x[N.TILDETRIM]),"g"),r("TILDE"),x[N.TILDE]="^"+x[N.LONETILDE]+x[N.XRANGEPLAIN]+"$",r("TILDELOOSE"),x[N.TILDELOOSE]="^"+x[N.LONETILDE]+x[N.XRANGEPLAINLOOSE]+"$",r("LONECARET"),x[N.LONECARET]="(?:\\^)",r("CARETTRIM"),x[N.CARETTRIM]="(\\s*)"+x[N.LONECARET]+"\\s+",P[N.CARETTRIM]=RegExp(x[N.CARETTRIM],"g"),T[N.CARETTRIM]=RegExp(n(x[N.CARETTRIM]),"g"),r("CARET"),x[N.CARET]="^"+x[N.LONECARET]+x[N.XRANGEPLAIN]+"$",r("CARETLOOSE"),x[N.CARETLOOSE]="^"+x[N.LONECARET]+x[N.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),x[N.COMPARATORLOOSE]="^"+x[N.GTLT]+"\\s*("+x[N.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),x[N.COMPARATOR]="^"+x[N.GTLT]+"\\s*("+x[N.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),x[N.COMPARATORTRIM]="(\\s*)"+x[N.GTLT]+"\\s*("+x[N.LOOSEPLAIN]+"|"+x[N.XRANGEPLAIN]+")",P[N.COMPARATORTRIM]=RegExp(x[N.COMPARATORTRIM],"g"),T[N.COMPARATORTRIM]=RegExp(n(x[N.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),x[N.HYPHENRANGE]="^\\s*("+x[N.XRANGEPLAIN]+")\\s+-\\s+("+x[N.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),x[N.HYPHENRANGELOOSE]="^\\s*("+x[N.XRANGEPLAINLOOSE]+")\\s+-\\s+("+x[N.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),x[N.STAR]="(<|>)?=?\\s*\\*";for(var L=0;$>L;L++)S(L,x[L]),P[L]||(P[L]=RegExp(x[L]),T[L]=RegExp(n(x[L])));t.parse=i,t.valid=function(e,t){var r=i(e,t);return r?r.version:null},t.clean=function(e,t){var r=i(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=o,o.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},o.prototype.toString=function(){return this.version},o.prototype.compare=function(e){return S("SemVer.compare",this.version,this.options,e),e instanceof o||(e=new o(e,this.options)),this.compareMain(e)||this.comparePre(e)},o.prototype.compareMain=function(e){return e instanceof o||(e=new o(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},o.prototype.comparePre=function(e){if(e instanceof o||(e=new o(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 r=this.prerelease[t],n=e.prerelease[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.prototype.compareBuild=function(e){e instanceof o||(e=new o(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(S("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return s(r,n)}while(++t)},o.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 r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&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,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new o(e,r).inc(t,n).version}catch(i){return null}},t.diff=function(e,t){if(l(e,t))return null;var r=i(e),n=i(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return o+a;return s},t.compareIdentifiers=s;var k=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new o(e,t).major},t.minor=function(e,t){return new o(e,t).minor},t.patch=function(e,t){return new o(e,t).patch},t.compare=a,t.compareLoose=function(e,t){return a(e,t,!0)},t.compareBuild=function(e,t,r){var n=new o(e,r),i=new o(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return a(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=c,t.lt=u,t.eq=l,t.neq=f,t.gte=p,t.lte=d,t.cmp=h,t.Comparator=m;var D={};m.prototype.parse=function(e){var t=e.match(this.options.loose?T[N.COMPARATORLOOSE]:T[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 o(t[2],this.options.loose):D},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(S("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if("string"==typeof e)try{e=new o(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 r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new y(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new y(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=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 n||i||o&&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?T[N.HYPHENRANGELOOSE]:T[N.HYPHENRANGE],g),S("hyphen replace",e),e=e.replace(T[N.COMPARATORTRIM],"$1$2$3"),S("comparator trim",e,T[N.COMPARATORTRIM]),e=(e=(e=e.replace(T[N.TILDETRIM],"$1~")).replace(T[N.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?T[N.COMPARATORLOOSE]:T[N.COMPARATOR],n=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?T[N.CARETLOOSE]:T[N.CARET],(function(t,r,n,i,o){var s;return S("caret",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":o?(S("replaceCaret pr",o),s="0"===r?"0"===n?">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+"-"+o+" <"+(+r+1)+".0.0"):(S("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+i+" <"+r+"."+n+"."+(+i+1):">="+r+"."+n+"."+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+i+" <"+(+r+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?T[N.TILDELOOSE]:T[N.TILDE],(function(t,r,n,i,o){var s;return S("tilde",e,t,r,n,i,o),w(r)?s="":w(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":w(i)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":o?(S("replaceTilde pr",o),s=">="+r+"."+n+"."+i+"-"+o+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+i+" <"+r+"."+(+n+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?T[N.XRANGELOOSE]:T[N.XRANGE],(function(r,n,i,o,s,a){S("xRange",e,r,n,i,o,s,a);var c=w(i),u=c||w(o),l=u||w(s);return"="===n&&l&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&l?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),r=n+i+"."+o+"."+s+a):u?r=">="+i+".0.0"+a+" <"+(+i+1)+".0.0"+a:l&&(r=">="+i+"."+o+".0"+a+" <"+i+"."+(+o+1)+".0"+a),S("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),S("xrange",e),e=function(e,t){return S("replaceStars",e,t),e.trim().replace(T[N.STAR],"")}(e,t),S("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(n=n.filter((function(e){return!!e.match(r)}))),n.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(r){return v(r,t)&&e.set.some((function(e){return v(e,t)&&r.every((function(r){return e.every((function(e){return r.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 o(e,this.options)}catch(r){return!1}for(var t=0;this.set.length>t;t++)if(E(this.set[t],e,this.options))return!0;return!1},t.satisfies=_,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var s=new y(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==i.compare(e)||(i=new o(n=e,r)))})),n},t.minVersion=function(e,t){e=new y(e,t);var r=new o("0.0.0");if(e.test(r))return r;if(r=new o("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;e.set.length>n;++n)e.set[n].forEach((function(e){var t=new o(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!c(r,t)||(r=t);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new y(e,t).range||"*"}catch(r){return null}},t.ltr=function(e,t,r){return b(e,t,"<",r)},t.gtr=function(e,t,r){return b(e,t,">",r)},t.outside=b,t.prerelease=function(e,t){var r=i(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new y(e,r),t=new y(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof o)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=T[N.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),T[N.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;T[N.COERCERTL].lastIndex=-1}else r=e.match(T[N.COERCE]);return null===r?null:i(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Zd.exports)),Zd.exports}function xt(){return oh||(oh=1,ym.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},ym.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}),ym}function Nt(){function e(e,t){Object.defineProperty(e,o,{get:function(){return t}})}function t(e){function n(e,t){return this instanceof n?(m.apply(this,arguments),this):n.apply(Object.create(n.prototype),arguments)}function i(e,t){return this instanceof i?(y.apply(this,arguments),this):i.apply(Object.create(i.prototype),arguments)}function o(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return g(t,n,i,(function(a,c){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)}c(e),e.gracefulify=t,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var s=e.readFile;e.readFile=function(e,t,n){return"function"==typeof t&&(n=t,t=null),function e(t,n,i,o){return s(t,n,(function(s){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?"function"==typeof i&&i.apply(this,arguments):r([e,[t,n,i],s,o||Date.now(),Date.now()])}))}(e,t,n)};var a=e.writeFile;e.writeFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return a(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)};var l=e.appendFile;l&&(e.appendFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o,s){return l(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var f=e.copyFile;f&&(e.copyFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=0),function e(t,n,i,o,s){return f(t,n,i,(function(a){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?"function"==typeof o&&o.apply(this,arguments):r([e,[t,n,i,o],a,s||Date.now(),Date.now()])}))}(e,t,n,i)});var p=e.readdir;e.readdir=function(e,t,n){function i(e,t,n,i){return function(s,a){!s||"EMFILE"!==s.code&&"ENFILE"!==s.code?(a&&a.sort&&a.sort(),"function"==typeof n&&n.call(this,s,a)):r([o,[e,t,n],s,i||Date.now(),Date.now()])}}"function"==typeof t&&(n=t,t=null);var o=d.test(process.version)?function(e,t,r,n){return p(e,i(e,t,r,n))}:function(e,t,r,n){return p(e,t,i(e,t,r,n))};return o(e,t,n)};var d=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var h=u(e);n=h.ReadStream,i=h.WriteStream}var m=e.ReadStream;m&&(n.prototype=Object.create(m.prototype),n.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var y=e.WriteStream;y&&(i.prototype=Object.create(y.prototype),i.prototype.open=function(){var e=this;o(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return n},set:function(e){n=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return i},set:function(e){i=e},enumerable:!0,configurable:!0});var v=n;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var w=i;Object.defineProperty(e,"FileWriteStream",{get:function(){return w},set:function(e){w=e},enumerable:!0,configurable:!0});var g=e.open;return e.open=o,e}function r(e){d("ENQUEUE",e[0].name,e[1]),a[o].push(e),i()}function n(){for(var e=Date.now(),t=0;a[o].length>t;++t)a[o][t].length>2&&(a[o][t][3]=e,a[o][t][4]=e);i()}function i(){if(clearTimeout(p),p=void 0,0!==a[o].length){var e=a[o].shift(),t=e[0],r=e[1],n=e[2],s=e[3],c=e[4];if(void 0===s)d("RETRY",t.name,r),t.apply(null,r);else if(6e4>Date.now()-s){var u=Date.now()-c;Math.min(1.2*Math.max(c-s,1),100)>u?a[o].push(e):(d("RETRY",t.name,r),t.apply(null,r.concat([s])))}else{d("TIMEOUT",t.name,r);var l=r.pop();"function"==typeof l&&l.call(null,n)}void 0===p&&(p=setTimeout(i,0))}}if(dh)return ph;dh=1;var o,s,a=In,c=function(){if(ah)return sh;ah=1;var e=Ri,t=process.cwd,r=null,n=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=t.call(process)),r};try{process.cwd()}catch(o){}if("function"==typeof process.chdir){var i=process.chdir;process.chdir=function(e){r=null,i.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,i)}return sh=function(t){function r(e){return e?function(r,n,i){return e.call(t,r,n,(function(e){l(e)&&(e=null),i&&i.apply(this,arguments)}))}:e}function i(e){return e?function(r,n){try{return e.call(t,r,n)}catch(o){if(!l(o))throw o}}:e}function s(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(e){l(e)&&(e=null),o&&o.apply(this,arguments)}))}:e}function a(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(o){if(!l(o))throw o}}:e}function c(e){return e?function(r,n,i){function o(e,t){t&&(0>t.uid&&(t.uid+=4294967296),0>t.gid&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function u(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i&&(0>i.uid&&(i.uid+=4294967296),0>i.gid&&(i.gid+=4294967296)),i}:e}function l(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var f;e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&((f=t).lchmod=function(t,r,n){f.open(t,e.O_WRONLY|e.O_SYMLINK,r,(function(e,t){e?n&&n(e):f.fchmod(t,r,(function(e){f.close(t,(function(t){n&&n(e||t)}))}))}))},f.lchmodSync=function(t,r){var n,i=f.openSync(t,e.O_WRONLY|e.O_SYMLINK,r),s=!0;try{n=f.fchmodSync(i,r),s=!1}finally{if(s)try{f.closeSync(i)}catch(o){}else f.closeSync(i)}return n}),t.lutimes||function(t){e.hasOwnProperty("O_SYMLINK")&&t.futimes?(t.lutimes=function(r,n,i,o){t.open(r,e.O_SYMLINK,(function(e,r){e?o&&o(e):t.futimes(r,n,i,(function(e){t.close(r,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(r,n,i){var s,a=t.openSync(r,e.O_SYMLINK),c=!0;try{s=t.futimesSync(a,n,i),c=!1}finally{if(c)try{t.closeSync(a)}catch(o){}else t.closeSync(a)}return s}):t.futimes&&(t.lutimes=function(e,t,r,n){n&&process.nextTick(n)},t.lutimesSync=function(){})}(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(e,t,r){r&&process.nextTick(r)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(e,t,r,n){n&&process.nextTick(n)},t.lchownSync=function(){}),"win32"===n&&(t.rename="function"!=typeof t.rename?t.rename:function(e){function r(r,n,i){var o=Date.now(),s=0;e(r,n,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&6e4>Date.now()-o)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?e(r,n,a):i(c)}))}),s),void(100>s&&(s+=10));i&&i(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.rename)),t.read="function"!=typeof t.read?t.read:function(e){function r(r,n,i,o,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,p){if(l&&"EAGAIN"===l.code&&10>u)return u++,e.call(t,r,n,i,o,s,c);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync="function"!=typeof t.readSync?t.readSync:function(e){return function(r,n,i,s,a){for(var c=0;;)try{return e.call(t,r,n,i,s,a)}catch(o){if("EAGAIN"===o.code&&10>c){c++;continue}throw o}}}(t.readSync)},sh}(),u=function(){if(uh)return ch;uh=1;var e=hi.Stream;return ch=function(t){return{ReadStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536;for(var s=Object.keys(i=i||{}),a=0,c=s.length;c>a;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}null===this.fd?t.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()})):process.nextTick((function(){o._read()}))},WriteStream:function r(n,i){if(!(this instanceof r))return new r(n,i);e.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0;for(var o=Object.keys(i=i||{}),s=0,a=o.length;a>s;s++){var c=o[s];this[c]=i[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(0>this.start)throw Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}(),l=function(){if(fh)return lh;fh=1,lh=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var r={__proto__:e(t)};else r=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})),r};var e=Object.getPrototypeOf||function(e){return e.__proto__};return lh}(),f=Kn;"function"==typeof Symbol&&"function"==typeof Symbol.for?(o=Symbol.for("graceful-fs.queue"),s=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",s="___graceful-fs.previous");var p,d=function(){};return f.debuglog?d=f.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=f.format.apply(f,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),a[o]||(e(a,Ti[o]||[]),a.close=function(e){function t(t,r){return e.call(a,t,(function(e){e||n(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,s,{value:e}),t}(a.close),a.closeSync=function(e){function t(t){e.apply(a,arguments),n()}return Object.defineProperty(t,s,{value:e}),t}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(a[o]),Zn.equal(a[o].length,0)}))),Ti[o]||e(Ti,a[o]),ph=t(l(a)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched&&(ph=t(a),a.__patched=!0),ph}function $t(){return hh||(hh=1,function(e){const t=xt().fromCallback,r=Nt(),n=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof r[e]));Object.assign(e,r),n.forEach((n=>{e[n]=t(r[n])})),e.exists=function(e,t){return"function"==typeof t?r.exists(e,t):new Promise((t=>r.exists(e,t)))},e.read=function(e,t,n,i,o,s){return"function"==typeof s?r.read(e,t,n,i,o,s):new Promise(((s,a)=>{r.read(e,t,n,i,o,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},e.write=function(e,t,...n){return"function"==typeof n[n.length-1]?r.write(e,t,...n):new Promise(((i,o)=>{r.write(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffer:r})}))}))},e.readv=function(e,t,...n){return"function"==typeof n[n.length-1]?r.readv(e,t,...n):new Promise(((i,o)=>{r.readv(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesRead:t,buffers:r})}))}))},e.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?r.writev(e,t,...n):new Promise(((i,o)=>{r.writev(e,t,...n,((e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffers:r})}))}))},"function"==typeof r.realpath.native?e.realpath.native=t(r.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(mm)),mm}function Ct(){if(mh)return wm;mh=1;const e=An;return wm.checkPath=function(t){if("win32"===process.platform&&/[<>:"|?*]/.test(t.replace(e.parse(t).root,""))){const e=Error("Path contains invalid characters: "+t);throw e.code="EINVAL",e}},wm}function At(){if(yh)return vm;yh=1;const e=$t(),{checkPath:t}=Ct(),r=e=>"number"==typeof e?e:{mode:511,...e}.mode;return vm.makeDir=async(n,i)=>(t(n),e.mkdir(n,{mode:r(i),recursive:!0})),vm.makeDirSync=(n,i)=>(t(n),e.mkdirSync(n,{mode:r(i),recursive:!0})),vm}function Lt(){if(wh)return vh;wh=1;const e=xt().fromPromise,{makeDir:t,makeDirSync:r}=At(),n=e(t);return vh={mkdirs:n,mkdirsSync:r,mkdirp:n,mkdirpSync:r,ensureDir:n,ensureDirSync:r}}function kt(){if(Eh)return gh;Eh=1;const e=xt().fromPromise,t=$t();return gh={pathExists:e((function(e){return t.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:t.existsSync}}function Dt(){if(bh)return _h;bh=1;const e=$t(),t=xt().fromPromise;return _h={utimesMillis:t((async function(t,r,n){const i=await e.open(t,"r+");let o=null;try{await e.futimes(i,r,n)}finally{try{await e.close(i)}catch(s){o=s}}if(o)throw o})),utimesMillisSync:function(t,r,n){const i=e.openSync(t,"r+");return e.futimesSync(i,r,n),e.closeSync(i)}}}function Ft(){function e(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function t(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e)),n=i.resolve(t).split(i.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function r(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}if(Oh)return Sh;Oh=1;const n=$t(),i=An,o=xt().fromPromise;return Sh={checkPaths:o((async function(o,s,a,c){const{srcStat:u,destStat:l}=await function(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}})),checkPathsSync:function(o,s,a,c){const{srcStat:u,destStat:l}=function(e,t,r){let i;const o=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=o(e);try{i=o(t)}catch(a){if("ENOENT"===a.code)return{srcStat:s,destStat:null};throw a}return{srcStat:s,destStat:i}}(o,s,c);if(l){if(e(u,l)){const e=i.basename(o),t=i.basename(s);if("move"===a&&e!==t&&e.toLowerCase()===t.toLowerCase())return{srcStat:u,destStat:l,isChangingCase:!0};throw Error("Source and destination must not be the same.")}if(u.isDirectory()&&!l.isDirectory())throw Error(`Cannot overwrite non-directory '${s}' with directory '${o}'.`);if(!u.isDirectory()&&l.isDirectory())throw Error(`Cannot overwrite directory '${s}' with non-directory '${o}'.`)}if(u.isDirectory()&&t(o,s))throw Error(r(o,s,a));return{srcStat:u,destStat:l}},checkParentPaths:o((async function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=await n.stat(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)})),checkParentPathsSync:function t(o,s,a,c){const u=i.resolve(i.dirname(o)),l=i.resolve(i.dirname(a));if(l===u||l===i.parse(l).root)return;let f;try{f=n.statSync(l,{bigint:!0})}catch(p){if("ENOENT"===p.code)return;throw p}if(e(s,f))throw Error(r(o,a,c));return t(o,s,l,c)},isSrcSubdir:t,areIdentical:e}}function jt(){async function e(e,t,r){return!r.filter||r.filter(e,t)}async function t(o,s,a,u){const l=u.dereference?n.stat:n.lstat,f=await l(s);if(f.isDirectory())return async function(r,o,s,a,u){o||await n.mkdir(a);const l=[];for await(const f of await n.opendir(s)){const r=i.join(s,f.name),n=i.join(a,f.name);l.push(e(r,n,u).then((e=>{if(e)return c.checkPaths(r,n,"copy",u).then((({destStat:e})=>t(e,r,n,u)))})))}await Promise.all(l),o||await n.chmod(a,r.mode)}(f,o,s,a,u);if(f.isFile()||f.isCharacterDevice()||f.isBlockDevice())return async function(e,t,i,o,s){if(!t)return r(e,i,o,s);if(s.overwrite)return await n.unlink(o),r(e,i,o,s);if(s.errorOnExist)throw Error(`'${o}' already exists`)}(f,o,s,a,u);if(f.isSymbolicLink())return async function(e,t,r,o){let s=await n.readlink(t);if(o.dereference&&(s=i.resolve(process.cwd(),s)),!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(u){if("EINVAL"===u.code||"UNKNOWN"===u.code)return n.symlink(s,r);throw u}if(o.dereference&&(a=i.resolve(process.cwd(),a)),c.isSrcSubdir(s,a))throw Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(o,s,a,u);if(f.isSocket())throw Error("Cannot copy a socket file: "+s);if(f.isFIFO())throw Error("Cannot copy a FIFO pipe: "+s);throw Error("Unknown file: "+s)}async function r(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}if(Ih)return Rh;Ih=1;const n=$t(),i=An,{mkdirs:o}=Lt(),{pathExists:s}=kt(),{utimesMillis:a}=Dt(),c=Ft();return Rh=async function(r,n,a={}){"function"==typeof a&&(a={filter:a}),a.clobber=!("clobber"in a)||!!a.clobber,a.overwrite="overwrite"in a?!!a.overwrite:a.clobber,a.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:u,destStat:l}=await c.checkPaths(r,n,"copy",a);if(await c.checkParentPaths(r,u,n,"copy"),!(await e(r,n,a)))return;const f=i.dirname(n);await s(f)||await o(f),await t(l,r,n,a)}}function Ut(){function e(e,i,a,c){const l=(c.dereference?o.statSync:o.lstatSync)(i);if(l.isDirectory())return function(e,t,i,s,a){return t?n(i,s,a):function(e,t,i,s){return o.mkdirSync(i),n(t,i,s),r(i,e)}(e.mode,i,s,a)}(l,e,i,a,c);if(l.isFile()||l.isCharacterDevice()||l.isBlockDevice())return function(e,r,n,i,s){return r?function(e,r,n,i){if(i.overwrite)return o.unlinkSync(n),t(e,r,n,i);if(i.errorOnExist)throw Error(`'${n}' already exists`)}(e,n,i,s):t(e,n,i,s)}(l,e,i,a,c);if(l.isSymbolicLink())return function(e,t,r,n){let i=o.readlinkSync(t);if(n.dereference&&(i=s.resolve(process.cwd(),i)),e){let e;try{e=o.readlinkSync(r)}catch(a){if("EINVAL"===a.code||"UNKNOWN"===a.code)return o.symlinkSync(i,r);throw a}if(n.dereference&&(e=s.resolve(process.cwd(),e)),u.isSrcSubdir(i,e))throw Error(`Cannot copy '${i}' to a subdirectory of itself, '${e}'.`);if(u.isSrcSubdir(e,i))throw Error(`Cannot overwrite '${e}' with '${i}'.`);return function(e,t){return o.unlinkSync(t),o.symlinkSync(e,t)}(i,r)}return o.symlinkSync(i,r)}(e,i,a,c);if(l.isSocket())throw Error("Cannot copy a socket file: "+i);if(l.isFIFO())throw Error("Cannot copy a FIFO pipe: "+i);throw Error("Unknown file: "+i)}function t(e,t,n,i){return o.copyFileSync(t,n),i.preserveTimestamps&&function(e,t,n){(function(e){return!(128&e)})(e)&&function(e,t){r(e,128|t)}(n,e),function(e,t){const r=o.statSync(e);c(t,r.atime,r.mtime)}(t,n)}(e.mode,t,n),r(n,e.mode)}function r(e,t){return o.chmodSync(e,t)}function n(e,t,r){const n=o.opendirSync(e);try{let o;for(;null!==(o=n.readSync());)i(o.name,e,t,r)}finally{n.closeSync()}}function i(t,r,n,i){const o=s.join(r,t),a=s.join(n,t);if(i.filter&&!i.filter(o,a))return;const{destStat:c}=u.checkPathsSync(o,a,"copy",i);return e(c,o,a,i)}if(Th)return Ph;Th=1;const o=Nt(),s=An,a=Lt().mkdirsSync,c=Dt().utimesMillisSync,u=Ft();return Ph=function(t,r,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:i,destStat:c}=u.checkPathsSync(t,r,"copy",n);if(u.checkParentPathsSync(t,i,r,"copy"),n.filter&&!n.filter(t,r))return;const l=s.dirname(r);return o.existsSync(l)||a(l),e(c,t,r,n)}}function Mt(){if(Nh)return xh;Nh=1;const e=xt().fromPromise;return xh={copy:e(jt()),copySync:Ut()}}function Gt(){if(Ch)return $h;Ch=1;const e=Nt(),t=xt().fromCallback;return $h={remove:t((function(t,r){e.rm(t,{recursive:!0,force:!0},r)})),removeSync:function(t){e.rmSync(t,{recursive:!0,force:!0})}}}function Bt(){function e(e){let t;try{t=r.readdirSync(e)}catch{return i.mkdirsSync(e)}t.forEach((t=>{t=n.join(e,t),o.removeSync(t)}))}if(Lh)return Ah;Lh=1;const t=xt().fromPromise,r=$t(),n=An,i=Lt(),o=Gt(),s=t((async function(e){let t;try{t=await r.readdir(e)}catch{return i.mkdirs(e)}return Promise.all(t.map((t=>o.remove(n.join(e,t)))))}));return Ah={emptyDirSync:e,emptydirSync:e,emptyDir:s,emptydir:s}}function Ht(){if(Dh)return kh;Dh=1;const e=xt().fromPromise,t=An,r=$t(),n=Lt();return kh={createFile:e((async function(e){let i;try{i=await r.stat(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);let s=null;try{s=await r.stat(o)}catch(a){if("ENOENT"===a.code)return await n.mkdirs(o),void(await r.writeFile(e,""));throw a}s.isDirectory()?await r.writeFile(e,""):await r.readdir(o)})),createFileSync:function(e){let i;try{i=r.statSync(e)}catch{}if(i&&i.isFile())return;const o=t.dirname(e);try{r.statSync(o).isDirectory()||r.readdirSync(o)}catch(s){if(!s||"ENOENT"!==s.code)throw s;n.mkdirsSync(o)}r.writeFileSync(e,"")}}}function Vt(){if(jh)return Fh;jh=1;const e=xt().fromPromise,t=An,r=$t(),n=Lt(),{pathExists:i}=kt(),{areIdentical:o}=Ft();return Fh={createLink:e((async function(e,s){let a,c;try{a=await r.lstat(s)}catch{}try{c=await r.lstat(e)}catch(l){throw l.message=l.message.replace("lstat","ensureLink"),l}if(a&&o(c,a))return;const u=t.dirname(s);await i(u)||await n.mkdirs(u),await r.link(e,s)})),createLinkSync:function(e,i){let s;try{s=r.lstatSync(i)}catch{}try{const t=r.lstatSync(e);if(s&&o(t,s))return}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}const a=t.dirname(i);return r.existsSync(a)||n.mkdirsSync(a),r.linkSync(e,i)}}}function qt(){if(Mh)return Uh;Mh=1;const e=An,t=$t(),{pathExists:r}=kt(),n=xt().fromPromise;return Uh={symlinkPaths:n((async function(n,i){if(e.isAbsolute(n)){try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:n}}const o=e.dirname(i),s=e.join(o,n);if(await r(s))return{toCwd:s,toDst:n};try{await t.lstat(n)}catch(a){throw a.message=a.message.replace("lstat","ensureSymlink"),a}return{toCwd:n,toDst:e.relative(o,n)}})),symlinkPathsSync:function(r,n){if(e.isAbsolute(r)){if(!t.existsSync(r))throw Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}const i=e.dirname(n),o=e.join(i,r);if(t.existsSync(o))return{toCwd:o,toDst:r};if(!t.existsSync(r))throw Error("relative srcpath does not exist");return{toCwd:r,toDst:e.relative(i,r)}}}}function zt(){if(Bh)return Gh;Bh=1;const e=$t(),t=xt().fromPromise;return Gh={symlinkType:t((async function(t,r){if(r)return r;let n;try{n=await e.lstat(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"})),symlinkTypeSync:function(t,r){if(r)return r;let n;try{n=e.lstatSync(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}}}function Wt(){if(Vh)return Hh;Vh=1;const e=xt().fromPromise,t=An,r=$t(),{mkdirs:n,mkdirsSync:i}=Lt(),{symlinkPaths:o,symlinkPathsSync:s}=qt(),{symlinkType:a,symlinkTypeSync:c}=zt(),{pathExists:u}=kt(),{areIdentical:l}=Ft();return Hh={createSymlink:e((async function(e,i,s){let c;try{c=await r.lstat(i)}catch{}if(c&&c.isSymbolicLink()){const[t,n]=await Promise.all([r.stat(e),r.stat(i)]);if(l(t,n))return}const f=await o(e,i);e=f.toDst;const p=await a(f.toCwd,s),d=t.dirname(i);return await u(d)||await n(d),r.symlink(e,i,p)})),createSymlinkSync:function(e,n,o){let a;try{a=r.lstatSync(n)}catch{}if(a&&a.isSymbolicLink()){const t=r.statSync(e),i=r.statSync(n);if(l(t,i))return}const u=s(e,n);e=u.toDst,o=c(u.toCwd,o);const f=t.dirname(n);return r.existsSync(f)||i(f),r.symlinkSync(e,n,o)}}}function Xt(){if(zh)return qh;zh=1;const{createFile:e,createFileSync:t}=Ht(),{createLink:r,createLinkSync:n}=Vt(),{createSymlink:i,createSymlinkSync:o}=Wt();return qh={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:r,createLinkSync:n,ensureLink:r,ensureLinkSync:n,createSymlink:i,createSymlinkSync:o,ensureSymlink:i,ensureSymlinkSync:o}}function Yt(){return Xh?Wh:(Xh=1,Wh={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const o=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}})}function Kt(){if(Qh)return Jh;Qh=1;const e=function(){if(Kh)return Yh;let e;Kh=1;try{e=Nt()}catch(s){e=In}const t=xt(),{stringify:r,stripBom:n}=Yt(),i=t.fromPromise((async function(r,i={}){"string"==typeof i&&(i={encoding:i});const o=i.fs||e,s=!("throws"in i)||i.throws;let a,c=await t.fromCallback(o.readFile)(r,i);c=n(c);try{a=JSON.parse(c,i?i.reviver:null)}catch(u){if(s)throw u.message=`${r}: ${u.message}`,u;return null}return a})),o=t.fromPromise((async function(n,i,o={}){const s=o.fs||e,a=r(i,o);await t.fromCallback(s.writeFile)(n,a,o)}));return Yh={readFile:i,readFileSync:function(t,r={}){"string"==typeof r&&(r={encoding:r});const i=r.fs||e,o=!("throws"in r)||r.throws;try{let e=i.readFileSync(t,r);return e=n(e),JSON.parse(e,r.reviver)}catch(s){if(o)throw s.message=`${t}: ${s.message}`,s;return null}},writeFile:o,writeFileSync:function(t,n,i={}){const o=i.fs||e,s=r(n,i);return o.writeFileSync(t,s,i)}}}();return Jh={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync}}function Jt(){if(em)return Zh;em=1;const e=xt().fromPromise,t=$t(),r=An,n=Lt(),i=kt().pathExists;return Zh={outputFile:e((async function(e,o,s="utf-8"){const a=r.dirname(e);return await i(a)||await n.mkdirs(a),t.writeFile(e,o,s)})),outputFileSync:function(e,...i){const o=r.dirname(e);t.existsSync(o)||n.mkdirsSync(o),t.writeFileSync(e,...i)}}}function Qt(){if(rm)return tm;rm=1;const{stringify:e}=Yt(),{outputFile:t}=Jt();return tm=async function(r,n,i={}){const o=e(n,i);await t(r,o,i)}}function Zt(){if(im)return nm;im=1;const{stringify:e}=Yt(),{outputFileSync:t}=Jt();return nm=function(r,n,i){const o=e(n,i);t(r,o,i)}}function er(){if(sm)return om;sm=1;const e=xt().fromPromise,t=Kt();return t.outputJson=e(Qt()),t.outputJsonSync=Zt(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,om=t}function tr(){if(cm)return am;cm=1;const e=$t(),t=An,{copy:r}=Mt(),{remove:n}=Gt(),{mkdirp:i}=Lt(),{pathExists:o}=kt(),s=Ft();return am=async function(a,c,u={}){const l=u.overwrite||u.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await s.checkPaths(a,c,"move",u);await s.checkParentPaths(a,f,c,"move");const d=t.dirname(c);return t.parse(d).root!==d&&await i(d),async function(t,i,s,a){if(!a)if(s)await n(i);else if(await o(i))throw Error("dest already exists.");try{await e.rename(t,i)}catch(c){if("EXDEV"!==c.code)throw c;await async function(e,t,i){const o={overwrite:i,errorOnExist:!0,preserveTimestamps:!0};return await r(e,t,o),n(e)}(t,i,s)}}(a,c,l,p)}}function rr(){function e(e,r,o){try{t.renameSync(e,r)}catch(s){if("EXDEV"!==s.code)throw s;return function(e,t,r){return n(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),i(e)}(e,r,o)}}if(lm)return um;lm=1;const t=Nt(),r=An,n=Mt().copySync,i=Gt().removeSync,o=Lt().mkdirpSync,s=Ft();return um=function(n,a,c){const u=(c=c||{}).overwrite||c.clobber||!1,{srcStat:l,isChangingCase:f=!1}=s.checkPathsSync(n,a,"move",c);return s.checkParentPathsSync(n,l,a,"move"),function(e){const t=r.dirname(e);return r.parse(t).root===t}(a)||o(r.dirname(a)),function(r,n,o,s){if(s)return e(r,n,o);if(o)return i(n),e(r,n,o);if(t.existsSync(n))throw Error("dest already exists.");return e(r,n,o)}(n,a,u,f)}}function nr(){if(pm)return fm;pm=1;const e=xt().fromPromise;return fm={move:e(tr()),moveSync:rr()}}function ir(){return hm?dm:(hm=1,dm={...$t(),...Mt(),...Bt(),...Xt(),...er(),...Lt(),...nr(),...Jt(),...kt(),...Gt()})}function or(e,t,r){switch(process.platform){case"win32":return dt("7zip",e);case"darwin":return ct("p7zip",e);case"linux":if(lt())return mt("p7zip",e);if(ut())return ht([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(ft())return Qe([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function sr(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||f(`Unknown archive type: ${t}. Defaulting to 7z`),4)}function ar(e){switch(e){case 0:case 1:case 2:return fr;case 3:return lr;default:return cr}}async function cr(e,t){const r=Fn(e);if(/.*\.tar\..+$/.test(r)){const n=Dn(e);await ur(e,n);const i=r.slice(0,-3),o=Ln(n,i);await ur(o,n),await vi(o);const s=i.slice(0,-4),a=Ln(n,s);d(`Moving ${a} to ${t}`),await gm.move(a,t,{overwrite:!0})}else await ur(e,t);return t}async function ur(e,t){d(`7z: extracting ${e} to ${t}`),await g(await async function(){return void 0===Em&&(null===da.sync("7z",{nothrow:!0})&&await or("",0,process),Em="7z"),Em}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await A(t)}async function lr(e,t){return null!==da.sync("7z",{nothrow:!0})?cr(e,t):null!==da.sync("unzip",{nothrow:!0})?(await g("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await A(t),t):cr(e,t)}async function fr(e,t,r=0,n=[]){await async function(e){switch(d("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(lt()?(await mt("gzip"),await mt("tar")):ut()?await ht([{name:"gzip"},{name:"tar"}]):ft()&&await Qe([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(lt()?(await mt("xz"),await mt("tar")):ut()?await ht([{name:"xz"},{name:"tar"}]):ft()&&await Qe([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(sr(e));try{await gm.mkdirp(t)}catch{}try{await g("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(i){"win32"===process.platform&&i.message.includes("Can't create '\\\\?\\C:")&&f(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await A(t),t}async function pr(e,t,r,n,i){d(`Installing ${e} ${t} ${i} via direct downloading`),process.env.RUNNER_TEMP=process.env.RUNNER_TEMP??On(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Ln(On(),"setup-cpp","hostedtoolcache");const{url:o,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:u}=await r(t,process.platform,i);if(_m)try{const r=rh.find(e,t);if(r){const n=Ln(r,c),i=Ln(n,s);if(await oe(Ln(i,a)))return d(`${e} ${t} was found in the cache at ${i}.`),await fe(i,Ay),{installDir:n,binDir:i}}}catch{}const l=Ln(n,c),p=Ln(l,s),h=Ln(p,a);return await async function(e,t,r,n,i,o,s,a){if((await Promise.all([oe(e),oe(t)])).includes(!1))try{const e=await async function(e,t,r){d(`Download ${e} ${t}`);return await ih((()=>{const e=Ln(process.env.RUNNER_TEMP??On(),`${Date.now()}-${Fn(r)}`);return rh.downloadTool(r,e)}),{name:r,max:4,backoffBase:2e3,report:e=>d(e)})}(r,n,i);d(`Extracting ${e} to ${o}`);const t=s??ar(sr(i));await t(e,o)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${i}: ${c}`)}if(d(`Add ${e} to PATH`),await fe(e,Ay),!(await oe(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await wi(t,"755")}catch(c){f(`Failed to make ${t} executable: ${c}`)}}(p,h,e,t,o,n,u,i),await async function(e,t,r){_m&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==En("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await rh.cacheDir(e,t,r))}(n,e,t),{installDir:l,binDir:p}}function dr(e,t,r){const n=Fd(e)??e;switch(t){case"win32":{const t=jd(n,"v3.19.6");let i;Ud.includes(r)?i=t?"win64-x64":"windows-x86_64":Md.includes(r)?i=t?"win32-x86":"windows-i386":Gd.includes(r)?i="windows-arm64":(d(`Trying unsupported arch '${r}' for cmake on Windows`),i="windows-"+r);const o=`cmake-${e}-${i}`;return{binRelativeDir:"bin/",binFileName:Et("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.zip`}}case"darwin":{const t=`cmake-${e}-${jd(n,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:Et("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=jd(n,"v3.19.8");let i;Gd.includes(r)?i=t?"Linux-aarch64":"linux-aarch64":Ud.includes(r)?i=t?"Linux-x86_64":"linux-x86_64":(d(`Trying unsupported arch '${r}' for cmake on Linux`),i="linux-"+r);const o=`cmake-${e}-${i}`;return{binRelativeDir:"bin/",binFileName:Et("cmake"),extractedFolderName:o,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${o}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function hr(e,t,r){return pr("cmake",e,dr,t,r)}async function mr(e,t,r=Gm){const n=await async function(e,t=Gm){try{const r=await Fm.getExecOutput(e,["--version"]),n=r.stdout||r.stderr||"",i=n.trim().match(t)?.[1];return Fd(i)??void 0}catch(r){return void console.error(r)}}(e,r);if(void 0===n||""===t)return!1;try{return-1!==jm(n,t)}catch{return Um(n,t)}}function yr(e){if(null===Mm(e))try{const t=Fd(e);if(null!==t)return d(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}function vr(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}function wr(e,t,r=null){return Er(t)?gr(e,r)??"":t}function gr(e,t=null){const r=Bm()[e];if(void 0===r)return;if("string"==typeof r)return r;const n=r[process.platform]??r.else;if(void 0===n)throw Error(`Platform "${process.platform}" not found in versions data for tool "${e}"`);if("string"==typeof n)return n;const i=n,o=ft()?"ubuntu":lt()?"archlinux":"else",s=i[o]??i.else;if(void 0===s)throw Error(`Distro "${o}" not found in versions data for tool "${e}"`);if("string"==typeof s)return s;const a=s,c=null!==t?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).filter((e=>!Number.isNaN(e))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0!==n?t[n]??t.else:t.else}(t,a):a.else;if(void 0===c)throw Error(`Architecture "${process.arch}" not found in versions data for tool "${e}"`);return"string"==typeof c?c:c[process.arch]??c.else}function Er(e){return"true"===e||void 0===e}async function _r(e,t,r){const n=await async function(e,t,r){const n=function(e){return e.startsWith(">")}(e)?"":e;let i,o=await br(t);if(void 0!==o){const e=Dn(o);i={bin:o,installDir:e,binDir:e}}else{if(Hm)try{d("Installing python in GitHub Actions");const{setupActionsPython:e}=await import("./assets/actions_python-b5WGf9Wg.mjs");if(await e(n,t,r),o=await br(t),void 0===o)throw Error("Python binary could not be found");const s=Dn(o);i={bin:o,installDir:s,binDir:s}}catch(s){f(""+s)}void 0===i&&(i=await async function(e,t){let r;switch(process.platform){case"win32":{e?await dt("python3",t,["--params=/InstallDir:"+e]):await dt("python3",t);const n=await br(e);if(void 0===n)throw Error("Python binary could not be found");const i=Dn(n);await fe(i,Ay),r={installDir:i,binDir:i,bin:n};break}case"darwin":{r=await ct("python3",t);const e=await g("brew",["--prefix","python"],{stdio:"pipe"}),n=Ln(e.stdout,"libexec","bin");await fe(n,Ay);break}case"linux":if(lt())r=await mt("python",t);else if(ut())r=await ht([{name:"python3",version:t}]);else{if(!ft())throw Error("Unsupported linux distributions");r=await Qe([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,n))}if(void 0===o||void 0===i.bin){if(o=await br(t),void 0===o)throw Error("Python binary could not be found");i={bin:o,installDir:Dn(o),binDir:Dn(o)}}return i}(e,t,r);Zn(void 0!==n.bin);const i=n.bin;await async function(e){if(await async function(e){try{return await g(e,["-m","venv","-h"],{stdio:"ignore"}),!0}catch{}return!1}(e))d("venv module already installed.");else try{await Ar("venv")}catch(t){d(`Failed to install venv: ${""+t}. Ignoring...`)}}(i);const o=await async function(e){const t=await Or();return void 0===t?(d("pip was not found. Installing pip"),await async function(e){await Ir(e)||(await Ar("pip"),await Ir(e))}(e),Or()):t}(i);if(void 0===o)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Cr(e)))try{await Ar("pipx",lt()),await xr(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){throw Error("pipx was not installed completely: "+t)}if(await Cr(e))return void(await g(e,["-m","pipx","ensurepath"],{stdio:"inherit"}));if(await async function(){return null!==await da("pipx",{nothrow:!0})}())return p("pipx module not found. Trying to install with pipx binary..."),void(await g("pipx",["ensurepath"],{stdio:"inherit"}));throw Error("pipx module or pipx binary not found. Corrput pipx installation.")}catch(t){p(`Failed to install pipx: ${""+t}. Ignoring...`)}}(i),await async function(e){try{await xr(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await xr(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){d(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(i),n}async function br(e){for(const t of["python","python3"]){const r=await Sr(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Hn(Sn()).root,t=(await gi(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Sr(t,Ln(e,r));if(void 0!==n)return n}}}async function Sr(e,t){try{const r=gr("python");if(void 0!==t){const n=Ln(t,Et(e));if(await oe(n)&&await mr(n,r))return n}const n=await da(e,{nothrow:!0,all:!0})??[];for(const e of n)if(await mr(e,r))return e}catch{}}async function Or(){for(const e of["pip3","pip"]){const t=await Rr(e);if(void 0!==t)return t}}async function Rr(e){try{const t=gr("pip"),r=await da(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await mr(e,t))return e}catch{}}async function Ir(e){try{return await g(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){d(""+t);try{return await g(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){d(""+r)}}return!1}function Pr(){if(!("version"in bn)||"function"!=typeof bn.version)return null;const e=bn.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 Tr(e,t,r={}){return xr(await async function(e){if(void 0!==Jm)return Jm;const t=e??wr("python",void 0,await Xm());return Jm=(await _r(t,"",process.arch)).bin,Jm}(r.pythonVersion),e,t,r)}async function xr(e,t,r,n={}){const{usePipx:i=!0,user:o=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=i&&!a&&await Cr(e),u=c?"pipx":"pip",l=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await g(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==r.exitCode||"string"!=typeof r.stdout)return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const e of Object.values(n.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,l):await async function(e,t){try{return 0===(await g(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,l);if(t)return{binDir:c?await Nr():await $r(e,l)}}const f=await async function(e,t){return 0===(await g(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,l);if(f)try{Io.info(`Installing ${t} ${r??""} via ${u}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,i=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&o?["--user"]:[],l=process.env;c&&o&&(l.PIPX_HOME=await Ym(),l.PIPX_BIN_DIR=await Km()),E(e,["-m",u,...i,...a,n],{stdio:"inherit",env:l})}catch(p){if(Io.info(`Failed to install ${t} via ${u}: ${p instanceof Error?`${p.message}\n${p.stack}`:p+""}`),null===await Ar(t))throw Error(`Failed to install ${t} via ${u}: ${p}.`)}else if(null===await Ar(t))throw Error(`Failed to install ${t} as it was not found via ${u} or the system package manager`);return{binDir:c?await Nr():await $r(e,l)}}function Nr(){return Km()}async function $r(e,t){const r=await Vm(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>oe(Ln(e,Et(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=da.sync(Et(t),{nothrow:!0});return null!==n?Dn(n):e[e.length-1]}(r,t);return await fe(n,Ay),n}async function Cr(e){return 0===(await g(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Ar(e,t=!0){if("linux"===process.platform){if(Io.info(`Installing ${e} via the system package manager`),lt())return mt(t?"python-"+e:e);if(ut())return ht([{name:t?"python3-"+e:e}]);if(ft())return Qe([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return["venv"].includes(e)?null:ct(e);return null}function Lr(e,t,r){return Tr("cmakelang[YAML]",e)}async function kr(e,t,r){switch(process.platform){case"win32":return await dt("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await fe(e,Ay),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return ct("graphviz",e);case"linux":if(lt())return mt("graphviz",e);if(ut())return ht([{name:"graphviz",version:e}]);if(ft())return Qe([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Dr(e,t){const{ArchiveHdi:r}=await import("./assets/index-DbYobIHH.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Ln(t,e.path))}))}function Fr(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:Et("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:Et("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:Et("doxygen"),extractedFolderName:t,extractFunction:Dr,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function jr(){if("darwin"===process.platform)try{const e=await Fm.getExecOutput("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ue("SDKROOT",t.trim(),Ay):l("SDKROOT not set")}catch(e){l(e)}}async function Ur(){const e=Ln(iy,"gcc_matcher.json");if(!(await oe(e)))return f("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");d("::add-matcher::"+e)}async function Mr(e){const t=await Ei(e,"utf-8");return JSON.parse(t)}function Gr(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const a of r)n.set(a,a);else for(const a of r){const e=t.filterMapTag(a);void 0!==e&&n.set(e,a)}if(0===n.size)return;const i=t.versionSatisfies??Um,o=function(e){if(null===Mm(e))try{const t=Fd(e);if(null!==t){const r=/^[<=>^~]/.test(t.version)?t.version:"^"+t.version;return d(`Coerced version '${e}' to '${r}'`),r}}catch(t){}return e}(t.version),s=[];for(const[a,c]of n.entries())i(a,o)&&s.push(c);if(0!==s.length)for(const a of s){let r=e[a];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=Br(a,r,t);if(void 0!==n)return n}}function Br(e,t,r){if(!(void 0!==r.keywords&&0!==r.keywords.length||void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length))return{tag:e,name:t[0]};let n=[];if(void 0!==r.keywords&&0!==r.keywords.length)for(const i of t)r.keywords.every((e=>!("string"!=typeof e||!i.includes(e))||Array.isArray(e)&&e.some((e=>i.includes(e)))))&&n.push(i);else n=t;if(0!==n.length){if(void 0!==r.optionalKeywords&&0!==r.optionalKeywords.length){const t=n.map((e=>{let t=0;for(const n of r.optionalKeywords)("string"==typeof n&&e.includes(n)||Array.isArray(n)&&n.some((t=>e.includes(t))))&&t++;return t})),i=Math.max(...t);return{tag:e,name:n[t.indexOf(i)]}}return{tag:e,name:n[0]}}}async function Hr(e,t,r){let n;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||(n=await dt("gcc-arm-embedded",e));try{n=await pr("g++",e,Vr,t,r)}catch(i){d(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),n=await async function(e,t){let r;if(await dt("mingw",e),"x64"===t&&await oe("C:/tools/mingw64/bin")?(r="C:/tools/mingw64/bin",await fe(r,Ay)):"ia32"===t&&await oe("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await fe(r,Ay)):await oe((process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(r=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin"),void 0!==r)return{binDir:r}}(e,r)}break;case"linux":if(lt())n=await mt("mingw-w64-gcc",e);else if(ut())n=await ht([{name:"mingw64-gcc",version:e}]);else{if(!ft())throw Error("Unsupported Linux distro for "+r);n=await Qe([{name:"mingw-w64",version:e}])}break;default:throw Error("Unsupported platform for "+r)}return void 0!==n&&await async function(e){const t=[];"win32"===process.platform&&t.push(ue("CC",Et(e+"/gcc"),Ay),ue("CXX",Et(e+"/g++"),Ay)),ty&&await Ur(),await Promise.all(t)}(n.binDir),n}async function Vr(e,t,r){if("win32"!==t)throw Error(`Unsupported platform '${t}'`);const n=await Mr(Ln(ry,"github_brechtsanders_winlibs_mingw.json")),i=qr(e),o=zr(e),s=Wr(e),a=Gr(n,{version:e,keywords:[{x64:"x86_64",ia32:"i386"}[r]??r],filterName:e=>!(void 0!==i&&i!==qr(e)||void 0!==o&&o!==zr(e)||void 0!==s&&s!==Wr(e)),versionSatisfies:(e,t)=>{const r=Fd(e);if(null===r)throw Error(`Invalid MinGW asset version: '${e}'`);return Um(r,t)&&(void 0===i||i===qr(e))&&(void 0===o||o===zr(e))}});if(void 0===a)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:Et("g++"),extractedFolderName:"mingw64",extractFunction:cr,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${a.tag}/${a.name}`}}function qr(e){const t=e.match(/(ucrt|msvcrt)/);return null!==t?t[1]:void 0}function zr(e){const t=e.match(/(posix|mcf)/);return null!==t?t[1]:void 0}function Wr(e){const t=e.match(/(seh|dwarf)/);return null!==t?t[1]:void 0}async function Xr(e,t,r,n=40){let i;switch(process.platform){case"win32":i=await Hr(e,t,r);break;case"darwin":i=await ct("gcc",e);break;case"linux":if(lt())i=await mt("gcc",e);else if(ut())i=await ht([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]);else if(ft())if(""===e)i=await Qe([{name:"gcc"},{name:"g++"}]);else try{i=await Qe([{name:"gcc",version:e},{name:"g++",version:e}])}catch(o){i=await Qe([{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"}}])}break;default:throw Error("Unsupported platform for "+r)}if(void 0!==i)return await async function(e,t,r=40){if("win32"===process.platform)return;const n=[];{const i=function(e){try{const t=yr(e),r=ey(t);return 5>r?e:""+r}catch{return e}}(e),[o,s]=await Promise.all([Yr("gcc",t,i),Yr("g++",t,i)]);n.push(ue("CC",o,Ay),ue("CXX",s,Ay)),ft()&&n.push(Be("cc",o,Ay,r),Be("cxx",s,Ay,r),Be("gcc",o,Ay,r),Be("g++",s,Ay,r))}n.push(jr()),ny&&await Ur(),await Promise.all(n)}(e,i.binDir,n),i}async function Yr(e,t,r){if(await oe(`${t}/${e}-${r}`))return Et(`${t}/${e}-${r}`);const n=RegExp(`^${ze(e)}-?([\\d\\.\\-]*)(?:\\.exe)?$`),i=(await gi(t)).filter((e=>n.test(e))).sort(((e,t)=>{const r=e.match(n)?.[1]??"",i=t.match(n)?.[1]??"";try{return function(e,t){const r=Fd(e),n=Fd(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(r,i)}catch{return 0}}));for(const o of i){const e=`${t}/${o}`;if(""===r||o.includes(r)||(await Kr(e))?.includes(r))return Et(e)}return await oe(`${t}/${e}`)?Et(`${t}/${e}`):Et(e)}async function Kr(e){try{const{stdout:t}=await g(e,["--version"],{stdio:"pipe"}),r=t.match(/(gcc|g\+\+).* \(.*\) ([\d.]+)/);if(null!==r)return r[2];f("Failed to parse gcc version from: "+t)}catch(t){l("Failed to get gcc version: "+t)}}function Jr(e){const t=Mm(e),r=null!==t?ey(t):e;return ue("GCOV",""!==r?"gcov-"+r:"gcov",Ay)}async function Qr(e,t,r){const n=await da("git",{nothrow:!0});if(null===n)switch(process.platform){case"win32":{const t=await dt("git",e),r=function(){const e=["C:/Program Files/Git/bin/git.exe","C:/Program Files (x86)/Git/bin/git.exe"];for(const t of e)if(Tn(t))return t;return f("Git not found in the default locations. Add git to PATH manually."),null}();return null!==r&&await fe(r,Ay),t}case"darwin":return ct("git",e);case"linux":if(lt())return mt("git",e);if(ut())return ht([{name:"git",version:e}]);if(ft())return Qe([{name:"git",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}else d("Git already installed at "+n)}async function Zr(e,t,r){const{keywords:n,optionalKeywords:i}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),Ud.includes(t)?(n.push("64"),n.push("x86_64")):(d(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),Ud.includes(t)?n.push("x86_64"):Gd.includes(t)?n.push("arm64"):(d(`Using arch ${t} for infer`),r.push(t));break;default:d(`Using ${e} ${t} for infer`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(t,r),o=Gr(await Mr(Ln(oy,"github_facebook_infer.json")),{version:e,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==o)return{url:`https://github.com/facebook/infer/releases/download/${o.tag}/${o.name}`,extractedFolderName:""+Fn(o.name,".tar.xz"),binRelativeDir:"bin",binFileName:Et("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${i}`)}function en(e,t,r){const n=function(e,t){switch(e){case"win32":return Ud.includes(t)||Md.includes(t)?"win":Gd.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Ud.includes(t)||Md.includes(t)?"linux":Gd.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:Et("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function tn(e,t,r){return pr("ninja",e,en,t,r)}function rn(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:Et("kcov")}}function nn(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Et("kcov"),extractFunction:on}}async function on(e,t){const r=await fr(e,t,1),n=await async function(){let e=da.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await hr(wr("cmake",void 0,await Xm()),Ln(se("~"),"cmake"),"");e=Ln(t,"cmake")}return null===da.sync("ninja",{nothrow:!0})&&await tn(wr("ninja",void 0,await Xm()),Ln(se("~"),"ninja"),""),e}();"linux"===process.platform&&(lt()?await Promise.all([mt("libdwarf"),mt("libcurl-openssl")]):ut()?await ht([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):ft()&&await Qe([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==da.sync("patch",{nothrow:!0})){const e=Ln(sy,"gcc13.patch");await g("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else d("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const i=Ln(r,"build");return await g(n,["-S",r,"-B",i,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await g(n,["--build",i,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function sn(){"darwin"===process.platform&&(null!==await da("clang",{nothrow:!0})&&null!==await da("clang++",{nothrow:!0})&&(p("Assuming clang is an Apple Clang compiler"),await Promise.all([ue("CC","clang",Ay),ue("CXX","clang++",Ay)])),Ii("Apple Clang automatic installation is not supported yet"))}async function an(e,t,r,n,i,o,s){void 0!==t&&await oe(t)&&(d(`Adding ${t} to PATH`),await ue("VCTargetsPath",t,Ay)),await uy.setupMSVCDevCmd(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),i,n,o,s,e)}async function cn(e,t,r,n,i,o,s,a=36e5){Io.startGroup(`Installing ${e} ${t}`);try{await async function(e,t,r,n,i,o){const s=xy.includes(e);let a;if("vcvarsall"===e)await an(wr(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await rt({rcOptions:Ay});else{const o=Ln(i,s?"llvm":e),c=wr(e,t,r),u=Ny[e];a=await u(c,o,n)}o.push(_n(e,a))}(e,t,r,n,i,o)}catch(c){l(c),c instanceof Error&&void 0!==c.stack&&l(c.stack),s.push(e+" failed to install")}Io.endGroup()}async function un(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:i}=await async function(e,t){const r=[],n=[];switch(e){case"win32":{n.push(".exe",".exe");const e=[];Ud.includes(t)?(e.push("win64"),n.push(["x86_64","X64"])):Md.includes(t)?e.push("win32"):Gd.includes(t)?e.push("woa64"):(d(`Using arch ${t} for LLVM`),e.push(t)),e.push("windows","Windows"),r.push(e);break}case"linux":{const e=["linux","Linux"];if(ft()){n.push("ubuntu");const e=await Xm();if(null!==e){n.push(""+e[0]);const t=10>e[1]?"0"+e[1]:""+e[1];n.push(`${e[0]}.${t}`),n.push(`${e[0]}.${t}.${e[2]}`)}}else ut()&&n.push("rhel");Ud.includes(t)?r.push(["x86_64","X64"]):Md.includes(t)?r.push("x86"):Gd.includes(t)?r.push("aarch64"):Bd.includes(t)?r.push("armv7a"):Hd.includes(t)?r.push("powerpc64le"):Vd.includes(t)?r.push("sparc64"):(d(`Using arch ${t} for LLVM`),r.push(t)),r.push(e);break}case"darwin":r.push(["apple","macos","macOS"]),Ud.includes(t)?n.push(["x86_64","X64"]):Gd.includes(t)?n.push(["arm64","ARM64"]):(d(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Ud.includes(t)?r.push("amd64"):Md.includes(t)?r.push("i386"):(d(`Using arch ${t} for LLVM`),r.push(t));break;case"solaris":r.push("solaris"),Ud.includes(t)?r.push("amd64"):qd.includes(t)?r.push("sparcv9"):(d(`Using arch ${t} for LLVM`),r.push(t));break;default:d(`Using ${e} ${t} for LLVM`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),o=Gr(await Mr(Ln(hy,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:i,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==o)return`https://github.com/llvm/llvm-project/releases/download/${o.tag}/${o.name}`;const s=Gr(await Mr(Ln(hy,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:i});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${i}`)}(t,r,e);return d("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:Et("clang"),extractFunction:"win32"===t?ar(sr(n)):(e,t)=>fr(e,t,1)}}async function ln(e,t,r){const n=await fn(e,t,r);return await wy(r),await async function(){if(!yy)return;const e=Ln(vy,"llvm_matcher.json");if(!(await oe(e)))return f("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");d("::add-matcher::"+e)}(),void 0!==n.installDir&&await async function(e,t){const r=process.env.LD_LIBRARY_PATH??"",n=process.env.DYLD_LIBRARY_PATH??"",i=fy(t),o=[ue("CC",Et(e+"/bin/clang"),Ay),ue("CXX",Et(e+"/bin/clang++"),Ay),ue("LLVM_PATH",e,Ay),ue("LD_LIBRARY_PATH",`${r}${kn}${e}/lib`,Ay),ue("DYLD_LIBRARY_PATH",`${n}${kn}${e}/lib`,Ay),ue("LLVM_LDFLAGS","-L"+vr(e+"/lib"),Ay),ue("LLVM_CPPFLAGS","-I"+vr(e+"/include"),Ay),await oe(`${e}/lib/clang/${t}/include`)?ue("LLVM_CPATH",`${e}/lib/clang/${t}/include`,Ay):await oe(`${e}/lib/clang/${i}/include`)?ue("LLVM_CPATH",`${e}/lib/clang/${i}/include`,Ay):Promise.resolve(),ue("LIBRARY_PATH",e+"/lib",Ay),jr()];if(ft()){const t=60;o.push(Be("cc",e+"/bin/clang",Ay,t),Be("cxx",e+"/bin/clang++",Ay,t),Be("clang",e+"/bin/clang",Ay),Be("clang++",e+"/bin/clang++",Ay),Be("lld",e+"/bin/lld",Ay),Be("ld.lld",e+"/bin/ld.lld",Ay),Be("llvm-ar",e+"/bin/llvm-ar",Ay))}await Promise.all(o)}(n.installDir,e),n}async function fn(e,t,r,n=dy.All){const i=await async function(e,t=0){if(ft())try{return await async function(e,t=0){const r=fy(e),n="/usr/lib/llvm-"+r;await Qe([{name:"ca-certificates"}]);const i=new ed.DownloaderHelper("https://apt.llvm.org/llvm.sh",On(),{fileName:"llvm.sh"});i.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await i.start();const o=await Ei(i.getDownloadPath(),"utf-8"),s=Ln(On(),"llvm-setup-cpp.sh");return await async function(e,t,r,n){let i=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);i=function(e){return e.replace(/add-apt-repository\s*(-y)?\s*"\${REPO_NAME}"/g,'add-apt-repository -y -n "${REPO_NAME}"\napt-get update -o '+nd)}(i),i=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,i,r),i=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${nd} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const r=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await g("dpkg",["-l",e],{env:He("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Pi("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(i),i=function(e){return Ve()?e.replace(/apt-get/g,"nala"):e}(i),await _i(t,i)}(o,s,r,t),await Je(),await Qe([{name:"lsb-release"},{name:"wget"},{name:"gnupg"}]),await wi(s,"755"),await x("bash",[s,""+r,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:ly}),await fe(n+"/bin",Ay),{installDir:""+n,binDir:n+"/bin",bin:n+"/bin/clang++"}}(e,t)}catch(r){Pi(`Failed to install llvm via system package manager ${r}. Trying to remove the repository`);try{T(Ln(py,"llvm_repo_remove.bash"),[""+fy(e)])}catch(n){Pi("Failed to remove llvm repository "+n)}}}(e,n);if(void 0!==i)return i;const o=await function(e){if("darwin"!==process.platform)return Promise.resolve(void 0);try{return async function(e){const t=fy(e),r=await ct("llvm",""+t);return await fe(r.binDir,Ay),r}(e)}catch(t){return void f("Failed to install llvm via brew: "+t)}}(e);return void 0!==o?o:async function(e,t,r){const n=await pr("llvm",e,un,t,r);return await my(fy(e)),n}(e,t,r)}function pn(e,t,r){return fn(e,t,r,dy.ClangFormat)}function dn(e,t,r){return fn(e,t,r)}async function hn(e,t,r,n,i,o){if("win32"!==process.platform)return;const s=uy.vsversion_to_versionnumber(e);d(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=uy.findVcvarsall(s);u=!0,d("Found the pre-installed version of MSVC at "+e)}catch{}if(!u)try{"14.0"===s?(a="14.0",await dt("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 dt("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 dt("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 dt("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):l(`The given MSVC versions ${e} is not supported yet.`)}catch(p){l(p)}await an(s,c,r,a,n,i,o),gy&&await async function(){const e=Ln(Ey,"msvc_matcher.json");if(!(await oe(e)))return f("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");d("::add-matcher::"+e)}()}async function mn(e,t,r){if("win32"===process.platform)return await dt("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await fe(e,Ay),e}()}}function yn(e,t,r){return{url:vn(t,r,e),binRelativeDir:"",binFileName:Et("pwsh"),extractedFolderName:""}}function vn(e,t,r){switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/PowerShell-${r}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${{arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t]??"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function wn(e,t,r){try{return await pr("pwsh",e,yn,t,r)}catch(n){return l(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await dt("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await fe(t,Ay),{binDir:t}}case"darwin":return ct("powershell",e,{cask:!0,overwrite:!1});case"linux":if(lt())return mt("powershell-bin",e,"yay");if(ut())return await ht([{name:"curl"}]),T("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),ht([{name:"powershell",version:e}]);if(ft()){await Qe([{name:"curl"}]);const t=await Xm();return T("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),T("dpkg",["-i","packages-microsoft-prod.deb"]),Qe([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function gn(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),i=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),o="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:Et("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${i}.${o}`}}function En(e){const t=Io.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function _n(e,t){let r=`✅ ${e} was installed successfully:`;return void 0===t||("installDir"in t&&(r+="\n- The installation directory is "+t.installDir),""!==t.binDir&&(r+="\n- The binary directory is "+t.binDir)),r}import bn,{homedir as Sn,tmpdir as On}from"os";import Rn from"crypto";import In,{promises as Pn,existsSync as Tn,mkdir as xn,stat as Nn,statSync as $n,mkdirSync as Cn}from"fs";import An,{join as Ln,delimiter as kn,dirname as Dn,basename as Fn,extname as jn,normalize as Un,sep as Mn,relative as Gn,resolve as Bn,parse as Hn}from"path";import*as Vn from"http";import qn from"http";import*as zn from"https";import Wn from"https";import"net";import Xn from"tls";import Yn from"events";import Kn from"util";import Jn from"string_decoder";import Qn from"child_process";import Zn from"assert";import ei from"timers";import{Buffer as ti}from"node:buffer";import ri from"node:path";import ni,{ChildProcess as ii}from"node:child_process";import oi from"node:process";import{fileURLToPath as si}from"node:url";import ai,{constants as ci}from"node:os";import{createWriteStream as ui,readFileSync as li,createReadStream as fi,promises as pi}from"node:fs";import di from"buffer";import hi from"stream";import{debuglog as mi}from"node:util";import yi,{rm as vi,chmod as wi,readdir as gi,readFile as Ei,writeFile as _i}from"fs/promises";import bi from"process";import Si,{fileURLToPath as Oi}from"url";import Ri from"constants";import{error as Ii,info as Pi}from"console";var Ti="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},xi={};const Ni=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{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"}];var $i,Ci=($i||($i=1,function(e){function t(e){return"string"==typeof e?!!n[e]:"env"in e?n[e.env]&&n[e.env].includes(e.includes):"any"in e?e.any.some((function(e){return!!n[e]})):Object.keys(e).every((function(t){return n[t]===e[t]}))}const r=Ni,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,e.id=null,r.forEach((function(r){const i=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));e[r.constant]=i,i&&(e.name=r.name,e.isPR=function(e){switch(typeof e.pr){case"string":return!!n[e.pr];case"object":return"env"in e.pr?"any"in e.pr?e.pr.any.some((function(t){return n[e.pr.env]===t})):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?e.pr.any.some((function(e){return!!n[e]})):t(e.pr);default:return null}}(r),e.id=r.constant)})),e.isCI=!("false"===n.CI||!(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name))}(xi)),xi);const Ai=e(Ci);var Li,ki,Di,Fi={},ji={},Ui={},Mi={},Gi={};class Bi 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 Hi,Vi,qi,zi,Wi,Xi,Yi,Ki,Ji={},Qi=(qi||(qi=1,Vi=function(){function e(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,i,o){for(var s=r(n,i,o),a=0,c=t.requests.length;c>a;++a){var u=t.requests[a];if(u.host===s.host&&u.port===s.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function t(t,r){var i=this;e.prototype.createSocket.call(i,t,(function(e){var s=t.request.getHeader("host"),a=n({},i.options,{socket:e,servername:s?s.replace(/:.*$/,""):t.host}),c=o.connect(0,a);i.sockets[i.sockets.indexOf(e)]=c,r(c)}))}function r(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function n(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var i=Object.keys(n),o=0,s=i.length;s>o;++o){var a=i[o];void 0!==n[a]&&(e[a]=n[a])}}return e}if(Hi)return Ji;Hi=1;var i,o=Xn,s=qn,a=Wn,c=Yn,u=Kn;return Ji.httpOverHttp=function(t){var r=new e(t);return r.request=s.request,r},Ji.httpsOverHttp=function(r){var n=new e(r);return n.request=s.request,n.createSocket=t,n.defaultPort=443,n},Ji.httpOverHttps=function(t){var r=new e(t);return r.request=a.request,r},Ji.httpsOverHttps=function(r){var n=new e(r);return n.request=a.request,n.createSocket=t,n.defaultPort=443,n},u.inherits(e,c.EventEmitter),e.prototype.addRequest=function(e,t,i,o){var s=this,a=n({request:e},s.options,r(t,i,o));this.maxSockets>s.sockets.length?s.createSocket(a,(function(t){function r(){s.emit("free",t,a)}function n(e){s.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)})):s.requests.push(a)},e.prototype.createSocket=function(e,t){function r(r,n,a){var u;return c.removeAllListeners(),n.removeAllListeners(),200!==r.statusCode?(i("tunneling socket could not be established, statusCode=%d",r.statusCode),n.destroy(),(u=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):a.length>0?(i("got illegal response body from proxy"),n.destroy(),(u=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",u),void o.removeSocket(s)):(i("tunneling connection has established"),o.sockets[o.sockets.indexOf(s)]=n,t(n))}var o=this,s={};o.sockets.push(s);var a=n({},o.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(a.localAddress=e.localAddress),a.proxyAuth&&(a.headers=a.headers||{},a.headers["Proxy-Authorization"]="Basic "+new Buffer(a.proxyAuth).toString("base64")),i("making CONNECT request");var c=o.request(a);c.useChunkedEncodingByDefault=!1,c.once("response",(function(e){e.upgrade=!0})),c.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),c.once("connect",r),c.once("error",(function(t){c.removeAllListeners(),i("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=Error("tunneling socket could not be established, cause="+t.message);r.code="ECONNRESET",e.request.emit("error",r),o.removeSocket(s)})),c.end()},e.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},i=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(){},Ji.debug=i,Ji}()),Vi);(Wi=zi||(zi={}))[Wi.OK=200]="OK",Wi[Wi.MultipleChoices=300]="MultipleChoices",Wi[Wi.MovedPermanently=301]="MovedPermanently",Wi[Wi.ResourceMoved=302]="ResourceMoved",Wi[Wi.SeeOther=303]="SeeOther",Wi[Wi.NotModified=304]="NotModified",Wi[Wi.UseProxy=305]="UseProxy",Wi[Wi.SwitchProxy=306]="SwitchProxy",Wi[Wi.TemporaryRedirect=307]="TemporaryRedirect",Wi[Wi.PermanentRedirect=308]="PermanentRedirect",Wi[Wi.BadRequest=400]="BadRequest",Wi[Wi.Unauthorized=401]="Unauthorized",Wi[Wi.PaymentRequired=402]="PaymentRequired",Wi[Wi.Forbidden=403]="Forbidden",Wi[Wi.NotFound=404]="NotFound",Wi[Wi.MethodNotAllowed=405]="MethodNotAllowed",Wi[Wi.NotAcceptable=406]="NotAcceptable",Wi[Wi.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Wi[Wi.RequestTimeout=408]="RequestTimeout",Wi[Wi.Conflict=409]="Conflict",Wi[Wi.Gone=410]="Gone",Wi[Wi.TooManyRequests=429]="TooManyRequests",Wi[Wi.InternalServerError=500]="InternalServerError",Wi[Wi.NotImplemented=501]="NotImplemented",Wi[Wi.BadGateway=502]="BadGateway",Wi[Wi.ServiceUnavailable=503]="ServiceUnavailable",Wi[Wi.GatewayTimeout=504]="GatewayTimeout",(Yi=Xi||(Xi={})).Accept="accept",Yi.ContentType="content-type",(Ki||(Ki={})).ApplicationJson="application/json";const Zi=[zi.MovedPermanently,zi.ResourceMoved,zi.SeeOther,zi.TemporaryRedirect,zi.PermanentRedirect],eo=[zi.BadGateway,zi.ServiceUnavailable,zi.GatewayTimeout],to=["OPTIONS","GET","DELETE","HEAD"];class ro extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,ro.prototype)}statusCode;result}class no{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 io{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,r){this.userAgent=e,this.handlers=t||[],this.requestOptions=r,r&&(null!=r.ignoreSslError&&(this._ignoreSslError=r.ignoreSslError),this._socketTimeout=r.socketTimeout,null!=r.allowRedirects&&(this._allowRedirects=r.allowRedirects),null!=r.allowRedirectDowngrade&&(this._allowRedirectDowngrade=r.allowRedirectDowngrade),null!=r.maxRedirects&&(this._maxRedirects=Math.max(r.maxRedirects,0)),null!=r.keepAlive&&(this._keepAlive=r.keepAlive),null!=r.allowRetries&&(this._allowRetries=r.allowRetries),null!=r.maxRetries&&(this._maxRetries=r.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,r){return this.request("POST",e,t,r||{})}async patch(e,t,r){return this.request("PATCH",e,t,r||{})}async put(e,t,r){return this.request("PUT",e,t,r||{})}async head(e,t){return this.request("HEAD",e,null,t||{})}async sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[Xi.Accept]=this._getExistingOrDefaultHeader(t,Xi.Accept,Ki.ApplicationJson);const r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xi.Accept]=this._getExistingOrDefaultHeader(r,Xi.Accept,Ki.ApplicationJson),r[Xi.ContentType]=this._getExistingOrDefaultHeader(r,Xi.ContentType,Ki.ApplicationJson);const i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xi.Accept]=this._getExistingOrDefaultHeader(r,Xi.Accept,Ki.ApplicationJson),r[Xi.ContentType]=this._getExistingOrDefaultHeader(r,Xi.ContentType,Ki.ApplicationJson);const i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Xi.Accept]=this._getExistingOrDefaultHeader(r,Xi.Accept,Ki.ApplicationJson),r[Xi.ContentType]=this._getExistingOrDefaultHeader(r,Xi.ContentType,Ki.ApplicationJson);const i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const i=new URL(t);let o=this._prepareRequest(e,i,n);const s=this._allowRetries&&to.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(o,r),a&&a.message&&a.message.statusCode===zi.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,o,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&Zi.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===i.protocol&&i.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!==i.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];o=this._prepareRequest(e,c,n),a=await this.requestRaw(o,r),t--}if(!a.message.statusCode||!eo.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(((r,n)=>{this.requestRawWithCallback(e,t,(function(e,t){e?n(e):t?r(t):n(Error("Unknown error"))}))}))}requestRawWithCallback(e,t,r){function n(e,t){i||(i=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let i=!1;const o=e.httpModule.request(e.options,(e=>{n(void 0,new no(e))}));let s;o.on("socket",(e=>{s=e})),o.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),o.on("error",(function(e){n(e)})),t&&"string"==typeof t&&o.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){o.end()})),t.pipe(o)):o.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=n(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i="https:"===n.parsedUrl.protocol;n.httpModule=i?zn:Vn;const o=i?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},oo(this.requestOptions.headers),oo(e||{})):oo(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=oo(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=n(e),i=r&&r.hostname;if(this._keepAlive&&i&&(t=this._proxyAgent),i||(t=this._agent),t)return t;const o="https:"===e.protocol;let s=100;if(this.requestOptions&&(s=this.requestOptions.maxSockets||Vn.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const i="https:"===r.protocol;n=o?i?Qi.httpsOverHttps:Qi.httpsOverHttp:i?Qi.httpOverHttps:Qi.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=o?new zn.Agent(e):new Vn.Agent(e),this._agent=t}return o&&this._ignoreSslError&&(t.options=Object.assign(t.options||{},{rejectUnauthorized:!1})),t}async _getProxyAgentDispatcher(e,t){let r;if(this._keepAlive&&(r=this._proxyAgentDispatcher),r)return r;const n="https:"===e.protocol;return r=new(await import("./assets/proxy-agent-BmRoX2ZW.mjs").then((e=>e.p)))({uri:t.href,pipelining:this._keepAlive?1:0,...(t.username||t.password)&&{token:"Basic "+Buffer.from(`${t.username}:${t.password}`).toString("base64")}}),this._proxyAgentDispatcher=r,n&&this._ignoreSslError&&(r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:!1})),r}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(r,n)=>{const i=e.message.statusCode||0,o={statusCode:i,result:null,headers:{}};let s,a;i===zi.NotFound&&r(o);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),o.result=s),o.headers=e.message.headers}catch(c){}if(i>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${i})`;const t=new ro(e,i);t.result=o.result,n(t)}else r(o)}))}}const oo=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),so=t(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return Xi},HttpClient:io,HttpClientError:ro,HttpClientResponse:no,get HttpCodes(){return zi},get MediaTypes(){return Ki},getProxyUrl:function(e){const t=n(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var ao,co,uo,lo,fo,po,ho,mo,yo,vo,wo={},go={},Eo={},_o={},bo={},So={},Oo={},Ro={},Io=u();const{GITHUB_ACTIONS:Po}=Ai;var To,xo,No,$o,Co,Ao,Lo,ko,Do,Fo,jo,Uo,Mo,Go,Bo,Ho,Vo,qo,zo,Wo,Xo,Yo,Ko,Jo={exports:{}},Qo={exports:{}},Zo={};const es=e(function(){function e(e,i,o){const s=r(e,i,o),a=t.spawn(s.command,s.args,s.options);return n.hookChildProcess(a,s),a}if(Ko)return Jo.exports;Ko=1;const t=Qn,r=m(),n=function(){function e(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 t(t,n){return r&&1===t&&!n.file?e(n.original,"spawn"):null}if(Yo)return Xo;Yo=1;const r="win32"===process.platform;return Xo={hookChildProcess:function(e,n){if(!r)return;const i=e.emit;e.emit=function(r,o){if("exit"===r){const r=t(o,n);if(r)return i.call(e,"error",r)}return i.apply(e,arguments)}},verifyENOENT:t,verifyENOENTSync:function(t,n){return r&&1===t&&!n.file?e(n.original,"spawnSync"):null},notFoundError:e},Xo}();return Jo.exports=e,Jo.exports.spawn=e,Jo.exports.sync=function(e,i,o){const s=r(e,i,o),a=t.spawnSync(s.command,s.args,s.options);return a.error=a.error||n.verifyENOENTSync(a.status,s),a},Jo.exports._parse=r,Jo.exports._enoent=n,Jo.exports}()),ts=({env:e=oi.env,...t}={})=>{const r=y({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=oi.cwd(),path:t=oi.env[y()],preferLocal:r=!0,execPath:n=oi.execPath,addExecPath:i=!0}={})=>{const o=e instanceof URL?si(e):e,s=ri.resolve(o),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(ri.join(t,"node_modules/.bin")),r=t,t=ri.resolve(t,"..")})(a,s),i&&((e,t,r)=>{const n=t instanceof URL?si(t):t;e.push(ri.resolve(r,n,".."))})(a,n,s),[...a,t].join(ri.delimiter)})(t),e},rs=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);!ns(i,o)&&n||Object.defineProperty(e,r,o)},ns=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)},is=(e,t)=>`/* Wrapped ${e}*/\n${t}`,os=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ss=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),as=new WeakMap,cs=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",o=function(...s){if(as.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${i}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))rs(e,t,i,r);((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,i=is.bind(null,n,""+t);Object.defineProperty(i,"name",ss),Object.defineProperty(e,"toString",{...os,value:i})})(e,t,n)}(o,e),as.set(o,n),o};cs.callCount=e=>{if(!as.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return as.get(e)};const us=(e,t)=>({name:"SIGRT"+(t+1),number:ls+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),ls=34,fs=[{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"}],ps=()=>{const e=Array.from({length:64-ls+1},us);return[...fs,...e].map(ds)},ds=({name:e,number:t,description:r,action:n,forced:i=!1,standard:o})=>{const{signals:{[e]:s}}=ci,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:i,standard:o}},hs=({name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:i,forced:o,standard:s}],ms=(()=>{const e=ps();return Object.fromEntries(e.map(hs))})(),ys=(e,t)=>{const r=t.find((({name:t})=>ci.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=ps(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=ys(e,t);if(void 0===r)return{};const{name:n,description:i,supported:o,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const vs=({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:f,cwd:p=oi.cwd()}}})=>{const d=void 0===(i=null===i?void 0:i)?void 0:ms[i].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${i})`:void 0!==o?"failed with exit code "+o:"failed")({timedOut:c,timeout:f,errorCode:n&&n.code,signal:i,signalDescription:d,exitCode:o=null===o?void 0:o,isCanceled:u}),m=`Command ${h}: ${s}`,y="[object Error]"==={}.toString.call(n),v=y?`${m}\n${n.message}`:m,w=[v,t,e].filter(Boolean).join("\n");return y?(n.originalMessage=n.message,n.message=w):n=Error(w),n.shortMessage=v,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=p,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=u,n.killed=l&&!c,n},ws=["stdin","stdout","stderr"];var gs,Es,_s={exports:{}},bs={exports:{}};const Ss=e(function(){if(Es)return _s.exports;Es=1;var e=Ti.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=Zn,i=(gs||(gs=1,(y=bs).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&y.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&y.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),bs.exports),o=/^win/i.test(e.platform),s=Yn;"function"!=typeof s&&(s=s.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new s).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),_s.exports=function(e,i){if(!t(Ti.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===l&&f();var o="exit";return i&&i.alwaysLast&&(o="afterexit"),r.on(o,e),function(){r.removeListener(o,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&a()}};var a=function(){l&&t(Ti.process)&&(l=!1,i.forEach((function(t){try{e.removeListener(t,u[t])}catch(r){}})),e.emit=h,e.reallyExit=p,r.count-=1)};_s.exports.unload=a;var c=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},u={};i.forEach((function(n){u[n]=function(){t(Ti.process)&&e.listeners(n).length===r.count&&(a(),c("exit",null,n),c("afterexit",null,n),o&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}})),_s.exports.signals=function(){return i};var l=!1,f=function(){!l&&t(Ti.process)&&(l=!0,r.count+=1,i=i.filter((function(t){try{return e.on(t,u[t]),!0}catch(r){return!1}})),e.emit=m,e.reallyExit=d)};_s.exports.load=f;var p=e.reallyExit,d=function(r){t(Ti.process)&&(e.exitCode=r||0,c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),p.call(e,e.exitCode))},h=e.emit,m=function(r,n){if("exit"===r&&t(Ti.process)){void 0!==n&&(e.exitCode=n);var i=h.apply(this,arguments);return c("exit",e.exitCode,null),c("afterexit",e.exitCode,null),i}return h.apply(this,arguments)}}else _s.exports=function(){return function(){}};var y;return _s.exports}()),Os=(e,t="SIGTERM",r={})=>{const n=e(t);return Rs(e,t,r,n),n},Rs=(e,t,r,n)=>{if(!Is(t,r,n))return;const i=Ts(r),o=setTimeout((()=>{e("SIGKILL")}),i);o.unref&&o.unref()},Is=(e,{forceKillAfterTimeout:t},r)=>Ps(e)&&!1!==t&&r,Ps=e=>e===ai.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Ts=({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},xs=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Ns=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(ui(r)),e;if(w(r))return e[t].pipe(r),e;if(!(e=>e instanceof ii&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!w(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var $s,Cs,As,Ls={exports:{}};const ks=e(function(){async function e(e,r){if(!e)throw Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,a=i(r);return await new Promise(((r,i)=>{const c=e=>{e&&a.getBufferedLength()<=t.MAX_LENGTH&&(e.bufferedData=a.getBufferedValue()),i(e)};(async()=>{try{await o(e,a),r()}catch(t){c(t)}})(),a.on("data",(()=>{a.getBufferedLength()>n&&c(new s)}))})),a.getBufferedValue()}if(As)return Ls.exports;As=1;const{constants:t}=di,r=hi,{promisify:n}=Kn,i=function(){if(Cs)return $s;Cs=1;const{PassThrough:e}=hi;return $s=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const i="buffer"===n;let o=!1;r?o=!(n||i):n=n||"utf8",i&&(n=null);const s=new e({objectMode:o});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",(e=>{c.push(e),o?a=c.length:a+=e.length})),s.getBufferedValue=()=>r?c:i?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}}(),o=n(r.pipeline);class s extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}return Ls.exports=e,Ls.exports.buffer=(t,r)=>e(t,{...r,encoding:"buffer"}),Ls.exports.array=(t,r)=>e(t,{...r,array:!0}),Ls.exports.MaxBufferError=s,Ls.exports}());var Ds,Fs;const js=e(function(){if(Fs)return Ds;Fs=1;const{PassThrough:e}=hi;return Ds=function(){function t(e){return Array.isArray(e)?(e.forEach(t),this):(n.push(e),e.once("end",r.bind(null,e)),e.once("error",i.emit.bind(i,"error")),e.pipe(i,{end:!1}),this)}function r(e){!(n=n.filter((function(t){return t!==e}))).length&&i.readable&&i.end()}var n=[],i=new e({objectMode:!0});return i.setMaxListeners(0),i.add=t,i.isEmpty=function(){return 0==n.length},i.on("unpipe",r),[].slice.call(arguments).forEach(t),i}}()),Us=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Ms=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Gs=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?ks(e,{encoding:t,maxBuffer:n}):ks.buffer(e,{maxBuffer:n})},Bs=(async()=>{})().constructor.prototype,Hs=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Bs,e)])),Vs=(e,t)=>{for(const[r,n]of Hs){const i="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}},qs=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],zs=/^[\w.-]+$/,Ws=/"/g,Xs=(e,t)=>qs(e,t).join(" "),Ys=(e,t)=>qs(e,t).map((e=>(e=>"string"!=typeof e||zs.test(e)?e:`"${e.replace(Ws,'\\"')}"`)(e))).join(" "),Ks=/ +/g,Js=e=>{const t=[];for(const r of e.trim().split(Ks)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},Qs=mi("execa").enabled,Zs=(e,t)=>(e+"").padStart(t,"0"),ea=(e,{verbose:t})=>{t&&oi.stderr.write(`[${(()=>{const e=new Date;return`${Zs(e.getHours(),2)}:${Zs(e.getMinutes(),2)}:${Zs(e.getSeconds(),2)}.${Zs(e.getMilliseconds(),3)}`})()}] ${e}\n`)},ta=(e,t,r={})=>{const n=es._parse(e,t,r);return e=n.command,t=n.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=n.options).cwd||oi.cwd(),execPath:oi.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Qs,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{const o=t?{...oi.env,...e}:e;return r?ts({env:o,cwd:n,execPath:i}):o})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return ws.map((t=>e[t]));if((e=>ws.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+ws.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,ws.length)},((e,r)=>t[r]))})(r),"win32"===oi.platform&&"cmd"===ri.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},ra=(e,t,r)=>"string"==typeof t||ti.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===r?void 0:"";var na,ia,oa,sa,aa,ca,ua={},la={},fa={},pa={};const da=e(function(){if(ca)return aa;ca=1;const{isexe:e,sync:t}=_(),{join:r,delimiter:n,sep:i,posix:o}=An,s="win32"===process.platform,a=RegExp(`[${o.sep}${i===o.sep?"":i}]`.replace(/(\\)/g,"\\$1")),c=RegExp("^\\."+a.source),u=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),l=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:i=n})=>{const o=e.match(a)?[""]:[...s?[process.cwd()]:[],...(t||"").split(i)];if(s){const t=r||[".EXE",".CMD",".BAT",".COM"].join(i),n=t.split(i).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==n[0]&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},f=(e,t)=>{const n=/^".*"$/.test(e)?e.slice(1,-1):e;return(!n&&c.test(t)?t.slice(0,2):"")+r(n,t)},p=async(t,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(t,r),s=[];for(const a of n){const n=f(a,t);for(const t of i){const i=n+t;if(await e(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(t)};return aa=p,p.sync=(e,r={})=>{const{pathEnv:n,pathExt:i,pathExtExe:o}=l(e,r),s=[];for(const a of n){const n=f(a,e);for(const e of i){const i=n+e;if(t(i,{pathExt:o,ignoreErrors:!0})){if(!r.all)return i;s.push(i)}}}if(r.all&&s.length)return s;if(r.nothrow)return null;throw u(e)},aa}());let ha;var ma,ya={};S(ya,"hasSudo",(()=>O)),S(ya,"isRoot",(()=>R)),S(ya,"isSudo",(()=>I)),S(ya,"prependSudo",(()=>P)),S(ya,"defaultExecOptions",(()=>va)),S(ya,"execRootSync",(()=>T)),S(ya,"execRoot",(()=>x));let va={stdio:"inherit",shell:!0};S(ma={},"isAdminWindows",(()=>wa)),S(ma,"isAdminPosix",(()=>ga)),S(ma,"isAdmin",(()=>C));let wa=async function(){if("win32"!==process.platform)return!1;try{return await g("fsutil",["dirty","query",process.env.systemdrive??""]),!0}catch(e){return"ENOENT"===e.code&&async function(){try{return await g("fltmc"),!0}catch{return!1}}()}},ga=R;var Ea,_a,ba,Sa,Oa,Ra,Ia,Pa,Ta,xa,Na,$a,Ca,Aa,La,ka,Da,Fa,ja,Ua,Ma,Ga,Ba,Ha,Va,qa;S({},"grantUserWriteAccess",(()=>A));var za,Wa,Xa,Ya,Ka,Ja,Qa,Za,ec,tc,rc,nc,ic,oc,sc,ac,cc,uc,lc,fc,pc,dc,hc,mc,yc,vc,wc,gc,Ec,_c,bc,Sc,Oc,Rc,Ic,Pc,Tc,xc,Nc,$c,Cc,Ac,Lc,kc,Dc,Fc,jc,Uc,Mc,Gc,Bc,Hc,Vc,qc,zc,Wc,Xc,Yc,Kc,Jc,Qc,Zc,eu,tu,ru,nu,iu,ou,su,au,cu,uu,lu,fu,pu,du,hu,mu,yu,vu,wu,gu,Eu,_u,bu,Su,Ou,Ru,Iu,Pu,Tu,xu,Nu,$u,Cu,Au,Lu,ku,Du,Fu,ju,Uu,Mu,Gu,Bu,Hu,Vu,qu,zu,Wu,Xu,Yu,Ku,Ju,Qu,Zu,el,tl,rl,nl,il,ol,sl,al,cl,ul,ll,fl,pl,dl,hl={},ml={exports:{}},yl={exports:{}},vl={exports:{}},wl={exports:{}},gl={},El={},_l={exports:{}},bl={},Sl={},Ol={},Rl={};const Il=e(function(){if(dl)return pl;dl=1;var e=k(),t=F(),r=function(){if(wu)return vu;wu=1;var e=j(),t=M(),r=G(),n=Q(),i=F();return vu=function o(s){var a,c,u;if(e(s),(a=Object(arguments[1])).async&&a.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(s,"__memoized__")&&!a.force?s:(c=i(a.length,s.length,a.async&&r.async),u=n(s,c,a),t(r,(function(e,t){a[t]&&e(a[t],u,a)})),o.__profiler__&&o.__profiler__(u),u.updateEnv(),u.memoized)},vu}();return pl=function(n){var i,o=e(arguments[1]);return o.normalizer||0!==(i=o.length=t(o.length,n.length,o.async))&&(o.primitive?!1===i?o.normalizer=Eu?gu:(Eu=1,gu=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}):i>1&&(o.normalizer=(bu?_u:(bu=1,_u=function(e){return e?function(t){for(var r=t[0]+"",n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}))(i)):o.normalizer=!1===i?function(){if(Cu)return $u;Cu=1;var e=Z(),t=Object.create;return $u=function(){var r=0,n=[],i=t(null);return{get:function(t){var r,i=0,o=n,s=t.length;if(0===s)return o[s]||null;if(o=o[s]){for(;s-1>i;){if(-1===(r=e.call(o[0],t[i])))return null;o=o[1][r],++i}return-1===(r=e.call(o[0],t[i]))?null:o[1][r]||null}return null},set:function(t){var o,s=0,a=n,c=t.length;if(0===c)a[c]=++r;else{for(a[c]||(a[c]=[[],[]]),a=a[c];c-1>s;)-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][o],++s;-1===(o=e.call(a[0],t[s]))&&(o=a[0].push(t[s])-1),a[1][o]=++r}return i[r]=t,r},delete:function(t){var r,o=0,s=n,a=i[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>o;){if(-1===(r=e.call(s[0],a[o])))return;u.push(s,r),s=s[1][r],++o}if(-1===(r=e.call(s[0],a[o])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&u.length;)r=u.pop(),(s=u.pop())[0].splice(r,1),s[1].splice(r,1)}delete i[t]},clear:function(){n=[],i=t(null)}}}}()():1===i?function(){if(Lu)return Au;Lu=1;var e=Z();return Au=function(){var t=0,r=[],n=[];return{get:function(t){var i=e.call(r,t[0]);return-1===i?null:n[i]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var i=e.call(n,t);-1!==i&&(r.splice(i,1),n.splice(i,1))},clear:function(){r=[],n=[]}}}}()():function(){if(Du)return ku;Du=1;var e=Z(),t=Object.create;return ku=function(r){var n=0,i=[[],[]],o=t(null);return{get:function(t){for(var n,o=0,s=i;r-1>o;){if(-1===(n=e.call(s[0],t[o])))return null;s=s[1][n],++o}return-1===(n=e.call(s[0],t[o]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=i;r-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]=++n,o[n]=t,n},delete:function(t){for(var n,s=0,a=i,c=[],u=o[t];r-1>s;){if(-1===(n=e.call(a[0],u[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],u[s]))){for(t=a[1][n],a[0].splice(n,1),a[1].splice(n,1);!a[0].length&&c.length;)n=c.pop(),(a=c.pop())[0].splice(n,1),a[1].splice(n,1);delete o[t]}},clear:function(){i=[[],[]],o=t(null)}}}}()(i)),o.async&&function(){if(Gu)return gl;Gu=1;var e=J(),t=ee(),r=H(),n=V(),i=te(),o=[].slice,s=function(){}.apply,a=Object.create;G().async=function(c,u){var l,f,p,d=a(null),h=a(null),m=u.memoized,y=u.original;u.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(l=r,t=o.call(t,0,-1)),m.apply(f=this,p=t)}),m);try{r(u.memoized,m)}catch(v){}u.on("get",(function(e){var t,r,n;if(l){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],l]:d[e].push(l),void(l=null);t=l,r=f,n=p,l=f=p=null,i((function(){var i;hasOwnProperty.call(h,e)?(i=h[e],u.emit("getasync",e,n,r),s.call(t,i.context,i.args)):(l=t,f=r,p=n,m.apply(r,n))}))}})),u.original=function(){var t,r,n,o;return l?(t=e(arguments),r=function t(r){var n,a,c=t.id;if(null!=c){if(delete t.id,n=d[c],delete d[c],n)return a=e(arguments),u.has(c)&&(r?u.delete(c):(h[c]={context:this,args:a},u.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?o=s.call(n,this,a):n.forEach((function(e){o=s.call(e,this,a)}),this),o}else i(s.bind(t,this,arguments))},n=l,l=f=p=null,t.push(r),o=s.call(y,this,t),r.cb=n,l=r,o):s.call(y,this,arguments)},u.on("set",(function(e){l?(d[e]?"function"==typeof d[e]?d[e]=[d[e],l.cb]:d[e].push(l.cb):d[e]=l.cb,delete l.cb,l.id=e,l=null):u.delete(e)})),u.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],u.emit("deleteasync",e,o.call(t.args,1)))})),u.on("clear",(function(){var e=h;h=a(null),u.emit("clearasync",t(e,(function(e){return o.call(e.args,1)})))}))}}(),o.promise&&ie(),o.dispose&&function(){if(rl)return bl;rl=1;var e=j(),t=M(),r=G(),n=function(){}.apply;r.dispose=function(i,o,s){var a;if(e(i),s.async&&r.async||s.promise&&r.promise)return o.on("deleteasync",a=function(e,t){n.call(i,null,t)}),void o.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));o.on("delete",a=function(e,t){i(t)}),o.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),o.maxAge&&function(){if(al)return Sl;al=1;var e=J(),t=M(),r=te(),n=ne(),i=function(){if(sl)return ol;sl=1;var e=D(),t=il?nl:(il=1,nl=2147483647);return ol=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),o=G(),s=Function.prototype,a=Math.max,c=Math.min,u=Object.create;o.maxAge=function(l,f,p){var d,h,m,y;(l=i(l))&&(d=u(null),f.on("set"+(h=p.async&&o.async||p.promise&&o.promise?"async":""),(function(e){d[e]=setTimeout((function(){f.delete(e)}),l),"function"==typeof d[e].unref&&d[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())})),f.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[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)*l,f.on("get"+h,(function(t,i,o){y[t]||(y[t]="nextTick",r((function(){var r;"nextTick"===y[t]&&(delete y[t],f.delete(t),p.async&&(i=e(i)).push(s),r=f.memoized.apply(o,i),p.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),f.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},y&&(t(y,(function(e){"nextTick"!==e&&clearTimeout(e)})),y={})})))}}(),o.max&&function(){if(ll)return Ol;ll=1;var e=D(),t=function(){if(ul)return cl;ul=1;var e=D(),t=Object.create,r={}.hasOwnProperty;return cl=function(n){var i,o=0,s=1,a=t(null),c=t(null),u=0;return n=e(n),{hit:function(e){var t=c[e],l=++u;if(a[l]=e,c[e]=l,!t){if(++o,n>=o)return;return i(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:i=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--o,s===t)){if(!o)return u=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){o=0,s=1,a=t(null),c=t(null),u=0}}}}(),r=G();r.max=function(n,i,o){var s,a,c;(n=e(n))&&(a=t(n),i.on("set"+(s=o.async&&r.async||o.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&i.delete(e)}),i.on("get"+s,c),i.on("delete"+s,a.delete),i.on("clear"+s,a.clear))}}(),o.refCounter&&function(){if(fl)return Rl;fl=1;var e=W(),t=G(),r=Object.create,n=Object.defineProperties;t.refCounter=function(i,o,s){var a,c;a=r(null),o.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),o.on("get"+c,(function(e){++a[e]})),o.on("delete"+c,(function(e){delete a[e]})),o.on("clear"+c,(function(){a={}})),n(o.memoized,{deleteRef:e((function(){var e=o.get(arguments);return null===e?null:a[e]?! --a[e]&&(o.delete(e),!0):null})),getRefCount:e((function(){var e=o.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),r(n,o)}}()),Pl=/^~(?=$|\/|\\)/,{appendFile:Tl,readFile:xl,writeFile:Nl}=Pn,$l=se("~/.bashrc"),Cl=Il((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([ae(e),ce(t,se("~/.bashrc")),ce(t,se("~/.profile"))])}catch(r){f(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0});var Al,Ll;const kl=e(function(){if(Ll)return Al;Ll=1;const e=bn,t="win32"!==e.platform(),r=e.release(),n=/(\d+\.\d+)\.(\d+)/;return Al=function(e){return t?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...n.exec(r).splice(1))?e:e.replace(/(\s+)/g,"%20")}}());var Dl,Fl,jl,Ul,Ml,Gl={exports:{}};const Bl=e((jl||(jl=1,Ul=function(){if(Fl)return Dl;Fl=1;var e=/[|\\{}()[\]^$+*?.]/g;return Dl=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Ml=function(e){return e.split("").reverse().join("")},Gl.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Ul(t)+"])(?!"+Ul(r)+")","g"),Ml(Ml(e).replace(n,"$1"+r)))}),Gl.exports)),{GITHUB_ACTIONS:Hl}=Ai,{appendFile:Vl}=Pn,{GITHUB_ACTIONS:ql}=Ai,{appendFile:zl}=Pn,Wl=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Xl,Yl,Kl,Jl={exports:{}};const Ql=e(me());var Zl;const ef=e((Zl||(Zl=1,he().addLocale("en",(function(e){var t=Math.floor(Math.abs(e)),r=(""+e).replace(/^[^.]*\.?/,"").length;return"string"==typeof e&&(e=parseInt(e,10)),1===t&&0===r?"one":"other"}))),{}));var tf,rf,nf,of,sf,af={exports:{}};const cf=e(sf?of:(sf=1,of=function(){function e(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;s[e]=r}}function t(e,t,n){const i=function(e){const t=s[e.locale];let r=e.unitTypeLookupOrder.slice();r.unshift(e.unitType),r=Array.from(new Set(r));let n=null;if(r.some((function(e){if(void 0!==t[e])return n=t[e],!0})),null===n)throw Error("Can not find any unit type data for locale: "+e.locale);return n}(n);return r.pluralize(n.locale,t,i[e]).replace("{0}",t)}if(nf)return rf;nf=1;const r=me(),n=tf?af.exports:(tf=1,af.exports=!("undefined"==typeof process||!process.versions||!process.versions.node)),i=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],o={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},s={};return rf={create:function(r){return r=Object.assign({},o,r||{}),{format:function(o,a,c){return function(r,o,a){if(function(t,r){const{autoload:i}=r;if(!s[t]){if(!n||!i)throw Error(`Missing locale: ${t}, you must load it manually before using it`);!function(t){try{e(de(`../locales/${t}.js`))}catch(r){throw Error(`Failed to load locale: ${t} from ../locales/${t}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${r}`)}}(t)}}(a.locale,{autoload:a.autoloadLocales}),!r)throw Error("Missing first date argument");if(!o)throw Error("Missing second date argument");const c=function(e,t){let r=t-e;const n=[];return i.some((function(e){const t=e[0],i=e[1],o=Math.floor(r/i);if(r-=o*i,n.push([t,o]),0>=r)return!0})),n}(r,o),u=[];for(const e of c){const[r,n]=e;if(n>0&&u.push(t(r,n,a)),u.length>=a.span)break}return u.join(a.delimiter)}(o,a,c=Object.assign({},r,c||{}))}}},addLocale:e,defaultConfig:o}}()));var uf,lf;const ff=e(lf?uf:(lf=1,uf={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"}}}})),pf={name:"setup-cpp",version:"1.1.1"};var df,hf,mf,yf,vf,wf,gf,Ef,_f,bf,Sf,Of,Rf,If,Pf,Tf,xf,Nf,$f,Cf,Af,Lf,kf,Df,Ff,jf,Uf,Mf,Gf,Bf,Hf,Vf,qf,zf,Wf,Xf,Yf,Kf,Jf,Qf,Zf,ep,tp,rp,np,ip,op,sp,ap,cp,up,lp,fp,pp,dp,hp,mp,yp,vp,wp,gp,Ep,_p,bp,Sp,Op,Rp,Ip,Pp,Tp,xp,Np,$p,Cp,Ap,Lp,kp,Dp,Fp,jp,Up,Mp,Gp,Bp,Hp,Vp,qp,zp,Wp,Xp,Yp,Kp={exports:{}};const Jp=e(function(){function e(e,t,r,n){return new(r||(r=Promise))((function(t,i){function o(e){try{a(n.next(e))}catch(t){i(t)}}function s(e){try{a(n.throw(e))}catch(t){i(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,s)}a((n=n.call(e)).next())}))}function t(e,t){function r(r){return function(c){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,r[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&o[3]>r[1])){a.label=r[1];break}if(6===r[0]&&o[1]>a.label){a.label=o[1],o=r;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}if(Yp)return Xp;Yp=1;var r=bi,n=Ue(),i=bn,o=An,s=In,a=Wn,c=r.env.npm_package_json,u=r.env.npm_config_user_agent,l=!(!u||!u.startsWith("npm")),f=!(!c||!c.endsWith("package.json")),p=l||f,d=!(!u||!u.startsWith("yarn")),h=p||d,m=i.homedir(),y=process.env.XDG_CONFIG_HOME||o.join(m,".config","simple-update-notifier"),v=function(e){return o.join(y,"".concat(e.replace("@","").replace("/","__"),".json"))},w=function(r,n){return e(void 0,0,void 0,(function(){var e;return t(this,(function(t){return e="https://registry.npmjs.org/-/package/".concat(r,"/dist-tags"),[2,new Promise((function(t,r){a.get(e,(function(e){var i="";e.on("data",(function(e){return i+=e})),e.on("end",(function(){try{var e=JSON.parse(i)[n];e||r(Error("Error getting version")),t(e)}catch(o){r(Error("Could not parse version response"))}}))})).on("error",(function(e){return r(e)}))}))]}))}))},g=function(r){var i=r.pkg,o=r.updateCheckInterval,a=void 0===o?864e5:o,c=r.distTag,u=void 0===c?"latest":c,l=r.alwaysRun,f=r.debug;return e(void 0,0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return s.existsSync(y)||s.mkdirSync(y,{recursive:!0}),e=function(e){var t=v(e);try{if(!s.existsSync(t))return;return JSON.parse(s.readFileSync(t,"utf8")).lastUpdateCheck}catch(r){return}}(i.name),l||!e||e<(new Date).getTime()-a?[4,w(i.name,u)]:[3,2];case 1:return o=t.sent(),c=v(i.name),s.writeFileSync(c,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),n.gt(o,i.version)?[2,o]:(f&&console.error("Latest version (".concat(o,") not newer than current version (").concat(i.version,")")),[3,3]);case 2:f&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(a,"ms but only ").concat((new Date).getTime()-e,"ms since last check.")),t.label=3;case 3:return[2,!1]}var c}))}))};return Xp=function(r){return e(void 0,0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:if(!r.alwaysRun&&(!process.stdout.isTTY||h&&!r.shouldNotifyInNpmScript))return r.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,g(r)];case 2:return(e=t.sent())&&console.error(function(e){for(var t=e.split("\n"),r=Math.max.apply(Math,t.map((function(e){return e.length}))),n=["┌".concat("─".repeat(r+2),"┐")],i=0,o=t;o.length>i;i++)n.push("│ ".concat(o[i].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(r.pkg.name," available!\nCurrent Version: ").concat(r.pkg.version,"\nLatest Version: ").concat(e))),[3,4];case 3:return n=t.sent(),r.debug&&n instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",n),[3,4];case 4:return[2]}}))}))}}());var Qp,Zp={},ed=(Qp||(Qp=1,function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function r(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 n="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},i=function(){function e(e,t){for(var r,n=0;t.length>n;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=t(In),s=Si,a=t(An),c=t(qn),u=t(Wn),l=Yn,f=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,n){var i=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 o=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return o.__validate(e,n)?(o.url=o.requestURL=e.trim(),o.state=f.IDLE,o.__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},o.__opts=Object.assign({},o.__defaultOpts),o.__pipes=[],o.__total=0,o.__downloaded=0,o.__progress=0,o.__retryCount=0,o.__retryTimeout=null,o.__resumeRetryCount=0,o.__states=f,o.__promise=null,o.__request=null,o.__response=null,o.__isAborted=!1,o.__isResumed=!1,o.__isResumable=!1,o.__isRedirected=!1,o.__destFolder=n,o.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},o.__fileName="",o.__filePath="",o.updateOptions(i),o):r(o)}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),i(t,[{key:"start",value:function(){var e=this,t=function(){return new Promise((function(t,r){e.__promise={resolve:t,reject:r},e.__start()}))};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then((function(r){var n=r.name,i=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&o.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===i?t():e.resumeFromFile(e.__filePath,{total:i,fileName:n}):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,r){o.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void o.unlink(e.__filePath,(function(n){return n?(e.__setState(e.__states.FAILED),e.emit("error",n),r(n)):(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,r=function(t){return e.__response?e.__response.unpipe(t):t.unpipe()};t?this.__pipes.find((function(e){return e.stream===t}))&&(r(t),this.__pipes=this.__pipes.filter((function(e){return e.stream!==t}))):(this.__pipes.forEach((function(e){return r(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,r){var n=function(t){e.__initProtocol(t);var r=Object.assign({},e.__headers);r.hasOwnProperty("range")&&delete r.range;var n=e.__getReqOptions("HEAD",t,r);return Object.assign({},e.__reqOptions,n)},i=function(o,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,o).href;return e.emit("redirected",c,o),i(c,n(c))}return 200===a.statusCode?void t({name:e.__getFileNameFromHeaders(a.headers,a),total:parseInt(a.headers["content-length"])||null}):r(Error("Response status was "+a.statusCode))}));c.on("error",(function(e){return r(e)})),c.on("timeout",(function(){return r(Error("timeout"))})),c.on("uncaughtException",(function(e){return r(e)})),c.end()};i(e.url,n(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,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__opts.override=!0,this.__filePath=e,(r.total&&r.fileName?Promise.resolve({name:r.fileName,total:r.total}):this.getTotalSize()).then((function(e){var n=e.name;return t.__total=r.total||e.total,t.__fileName=r.fileName||n,t.__downloaded=r.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,r){t.__promise={resolve:e,reject:r},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 r=this;return this.__protocol.request(this.__reqOptions,(function(n){if(r.__response=n,r.__isResumed||(r.__total=parseInt(n.headers["content-length"])||null,r.__resetStats()),r.__isRequireRedirect(n)){var i=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(i),r.emit("redirected",i,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var o=Error("Response status was "+n.statusCode);return o.status=n.statusCode||0,o.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",o),t(o)}(r.__opts.forceResume||n.headers.hasOwnProperty("accept-ranges")&&"none"!==n.headers["accept-ranges"])&&(r.__isResumable=!0),r.__startDownload(n,e,t)}))}},{key:"__startDownload",value:function(e,t,r){var i=this,s=e;if(this.__isResumed)this.__fileStream=o.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(),o.existsSync(this.__filePath)){var u=this.__getFilesizeInBytes(this.__filePath),l=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||u>=l))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:u}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=o.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 i.__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,r)),this.__fileStream.on("finish",this.__onFinished(t,r)),this.__fileStream.on("error",this.__onError(t,r))}},{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 r=this;return function(){r.__fileStream.close((function(n){if(n)return t(n);if(r.__hasFinished()){var i=!!r.__total&&r.__downloaded!==r.__total;if(i&&r.__isResumable&&r.__opts.resumeOnIncomplete&&r.__opts.resumeOnIncompleteMaxRetry>=r.__resumeRetryCount)return r.__resumeRetryCount++,r.emit("warning",Error("uncomplete download, retrying")),r.resume();r.__setState(r.__states.FINISHED),r.__pipes=[],r.emit("end",{fileName:r.__fileName,filePath:r.__filePath,totalSize:r.__total,incomplete:i,onDiskSize:r.__getFilesizeInBytes(r.__filePath),downloadedSize:r.__downloaded})}return e(r.__downloaded===r.__total)}))}}},{key:"__closeFileStream",value:function(){var e=this;return this.__fileStream?new Promise((function(t,r){e.__fileStream.close((function(e){return e?r(e):t(!0)}))})):Promise.resolve(!0)}},{key:"__onError",value:function(e,t){var r=this,n=!(2>=arguments.length||void 0===arguments[2])&&arguments[2];return function(e){return r.__pipes=[],n&&r.__requestAbort(),r.state===r.__states.STOPPED||r.state===r.__states.FAILED?void 0:r.__opts.retry?r.__retry(e).catch((function(n){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.emit("error",n||e),t(n||e)}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.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"!==n(this.__opts.retry))return Promise.reject(t||Error("wrong retry options"));var r=this.__opts.retry,i=r.delay,o=void 0===i?0:i,s=r.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())}),o)}))}))):Promise.reject(t||Error("reached the maximum retries"))}},{key:"__onTimeout",value:function(e,t){var r=this;return function(){return r.__requestAbort(),r.__opts.retry?r.__retry(Error("timeout")).catch((function(e){r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),e?t(e):(r.emit("timeout"),t(Error("timeout")))}))})):r.__removeFile().finally((function(){r.__setState(r.__states.FAILED),r.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 r="",n=e.hasOwnProperty("content-disposition"),i=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,o=!n||i?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||i||o?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(i||o||c)?(r=(r=e["content-disposition"]).trim(),i?r=i[1]:o?r=o[1]:c&&(r=c[1]),r=r.replace(/[/\\]/g,"")):r=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(r,t):r.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(e){var t=a.join(this.__destFolder,e),r=t;return this.__opts.override||this.state===this.__states.RESUMED||t!==(r=this.__uniqFileNameSync(r))&&this.emit("renamed",{path:r,fileName:r.split(a.sep).pop(),prevPath:t,prevFileName:t.split(a.sep).pop()}),r}},{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 r=a.join(this.__destFolder,e);return t&&t.headers||this.__response&&this.__response.headers?this.__opts.fileName(e,r,(t||this.__response).headers["content-type"]):this.__opts.fileName(e,r)}if("object"===n(this.__opts.fileName)){var i=this.__opts.fileName,o=i.name,s=!!i.hasOwnProperty("ext")&&i.ext;if("string"==typeof s)return o+"."+s;if("boolean"==typeof s){if(s)return o;var c=e.includes(".")?e.split(".").pop():"";return""===c?o:o+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,i=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===i?0:this.__downloaded/i*100,(this.__downloaded===i||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===i||n>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 r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new s.URL(t),i={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(i.headers=r),i}},{key:"__getFilesizeInBytes",value:function(e){try{return o.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(!o.existsSync(t))throw Error("Destination Folder must exist");if(!o.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{o.accessSync(t,o.constants.W_OK)}catch(r){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=u,t.agent=new u.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{o.accessSync(e,o.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,i=e.split(".").pop();return i!==e&&i.length>0?r=r.replace(i="."+i,""):i="",this.__uniqFileNameSync(r+" ("+ ++n+")"+i)}catch(s){return e}}},{key:"__removeFile",value:function(){var e=this;return new Promise((function(t){return e.__fileStream?void e.__fileStream.close((function(r){return r&&e.emit("warning",r),e.__opts.removeOnFail?o.access(e.__filePath,(function(n){return n?t():void o.unlink(e.__filePath,(function(n){n&&e.emit("warning",r),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}(l.EventEmitter)}(Zp)),Zp);const{GITHUB_ACTIONS:td}=Ai,{appendFile:rd}=Pn,nd="Dpkg::Lock::Timeout=300";let id=!1;const od=Il((function(e=qe()){T(e,["update","-o",nd],{...va,env:He(e)}),id=!0}));var sd,ad;(ad=sd||(sd={}))[ad.NameDashVersion=0]="NameDashVersion",ad[ad.NameEqualsVersion=1]="NameEqualsVersion",ad[ad.Name=2]="Name",ad[ad.None=3]="None";const cd=Il((async function(e){od(e);const t=await Xe([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&T(e,["install","-y","--fix-broken","-o",nd,...t],{...va,env:He(e)})}),{promise:!0}),ud=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],ld="/etc/apt/trusted.gpg.d",fd="keyserver.ubuntu.com";let pd,dd,hd,md,yd,vd=!1,wd=!1,gd=!1,Ed=!1;const _d=/Version\s*:\s*(.*)/g;let bd=!1;var Sd,Od;const Rd=e(function(){if(Od)return Sd;Od=1;var e=An;return Sd=function(t,r){if("string"!=typeof t)return t;if(0===t.length)return t;var n,i=e.basename(t,e.extname(t))+r,o=e.join(e.dirname(t),i);return(n=t.slice(0,2))==="."+e.sep||"./"===n?"."+e.sep+o:o}}());var Id={},Pd={};vt(Pd,"name",(()=>wt));var Td={};vt(Td,"normalizeTrim",(()=>gt));var xd={};vt(xd,"addExeExt",(()=>Et));var Nd={};vt(Nd,"addNamePrefix",(()=>_t));var $d={};vt($d,"addNameSuffix",(()=>bt));var Cd={};vt(Cd,"addShExt",(()=>St));var Ad={};vt(Ad,"addShRelativePrefix",(()=>Ot));var Ld={};vt(Ld,"removeExt",(()=>Rt));var kd={};vt(kd,"replaceExt",(()=>It));var Dd={};vt(Dd,"isPathInside",(()=>Pt)),yt(Id,Pd),yt(Id,Td),yt(Id,xd),yt(Id,Nd),yt(Id,$d),yt(Id,Cd),yt(Id,Ad),yt(Id,Ld),yt(Id,kd),yt(Id,Dd);const Fd=e(Le()),jd=e(Ce()),Ud=["x64","amd64","x86_64","win64","64","amd64_x86","amd64_arm64"],Md=["x86","i386","ia32","win32","32","x32"],Gd=["aarch64","arm64","woa64","arm"],Bd=["armv7","armv7a"],Hd=["powerpc64le","ppc64le"],Vd=["sparc64"],qd=["sparcv9"];var zd,Wd,Xd,Yd,Kd,Jd={},Qd={exports:{}},Zd={exports:{}},eh=Qd.exports,th={},rh=function(){function e(e,t){const r=[];t=t||_.arch();const n=b.join(s(),e);if(g.existsSync(n)){const e=g.readdirSync(n);for(const o of e)if(i(o)){const e=b.join(n,o,t||"");g.existsSync(e)&&g.existsSync(e+".complete")&&r.push(o)}}return r}function t(e){return m(this,void 0,void 0,(function*(){return e||(e=b.join(l(),w.randomUUID())),yield v.mkdirP(e),e}))}function r(e,t,r){return m(this,void 0,void 0,(function*(){const n=b.join(s(),e,O.clean(t)||t,r||"");y.debug("destination "+n);const i=n+".complete";return yield v.rmRF(n),yield v.rmRF(i),yield v.mkdirP(n),n}))}function n(e,t,r){const n=b.join(s(),e,O.clean(t)||t,r||"");g.writeFileSync(n+".complete",""),y.debug("finished caching tool")}function i(e){const t=O.clean(e)||"";y.debug("isExplicit: "+t);const r=null!=O.valid(t);return y.debug("explicit? "+r),r}function o(e,t){let r="";y.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>O.gt(e,t)?1:-1))).length-1;n>=0;n--){const i=e[n];if(O.satisfies(i,t)){r=i;break}}return y.debug(r?"matched: "+r:"match not found"),r}function s(){const e=process.env.RUNNER_TOOL_CACHE||"";return(0,P.ok)(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function l(){const e=process.env.RUNNER_TEMP||"";return(0,P.ok)(e,"Expected RUNNER_TEMP to be defined"),e}function f(e,t){const r=Ti[e];return void 0!==r?r:t}if(Yd)return Jd;Yd=1;var p=Jd&&Jd.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),d=Jd&&Jd.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=Jd&&Jd.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&p(t,e,r);return d(t,e),t},m=Jd&&Jd.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Jd,"__esModule",{value:!0}),Jd.evaluateVersions=Jd.isExplicitVersion=Jd.findFromManifest=Jd.getManifestFromRepo=Jd.findAllVersions=Jd.find=Jd.cacheFile=Jd.cacheDir=Jd.extractZip=Jd.extractXar=Jd.extractTar=Jd.extract7z=Jd.downloadTool=Jd.HTTPError=void 0;const y=h(u()),v=h(a()),w=h(Rn),g=h(In),E=h((Wd||(Wd=1,function(e,t){var r=eh&&eh.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=eh&&eh.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=eh&&eh.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t},o=eh&&eh.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const s=i(Tt()),a=u(),c=bn,l=Qn,f=In;t._findMatch=function(t,r,n,i){return o(this,void 0,void 0,(function*(){const o=c.platform();let u,l,f;for(const c of n){const n=c.version;if((0,a.debug)(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(f=c.files.find((t=>{(0,a.debug)(`${t.arch}===${i} && ${t.platform}===${o}`);let r=t.arch===i&&t.platform===o;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),f)){(0,a.debug)("matched "+c.version),l=c;break}}return l&&f&&(u=Object.assign({},l),u.files=[f]),u}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+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())){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r},t._readLinuxVersionFile=function(){const e="/etc/lsb-release",t="/etc/os-release";let r="";return f.existsSync(e)?r=""+f.readFileSync(e):f.existsSync(t)&&(r=""+f.readFileSync(t)),r}}(Qd,Qd.exports)),Qd.exports)),_=h(bn),b=h(An),S=h(so),O=h(Tt()),R=h(hi),I=h(Kn),P=Zn,T=c(),x=function(){if(Xd)return th;Xd=1;var e=th&&th.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=th&&th.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=th&&th.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n},n=th&&th.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(th,"__esModule",{value:!0}),th.RetryHelper=void 0;const i=r(u());return th.RetryHelper=class{constructor(e,t,r){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(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds")}execute(e,t){return n(this,void 0,void 0,(function*(){let r=1;for(;this.maxAttempts>r;){try{return yield e()}catch(n){if(t&&!t(n))throw n;i.info(n.message)}const o=this.getSleepAmount();i.info(`Waiting ${o} seconds before trying again`),yield this.sleep(o),r++}return yield e()}))}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}},th}();class N extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Jd.HTTPError=N;const $="win32"===process.platform,C="darwin"===process.platform;return Jd.downloadTool=function(e,t,r,n){return m(this,void 0,void 0,(function*(){t=t||b.join(l(),w.randomUUID()),yield v.mkdirP(b.dirname(t)),y.debug("Downloading "+e),y.debug("Destination "+t);const i=f("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=f("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new x.RetryHelper(3,i,o);return yield s.execute((()=>m(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return m(this,void 0,void 0,(function*(){if(g.existsSync(t))throw Error(`Destination file path ${t} already exists`);const i=new S.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(y.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const o=yield i.get(e,n);if(200!==o.message.statusCode){const t=new N(o.message.statusCode);throw y.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`),t}const s=I.promisify(R.pipeline),a=f("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message))();let c=!1;try{return yield s(a,g.createWriteStream(t)),y.debug("download complete"),c=!0,t}finally{if(!c){y.debug("download failed");try{yield v.rmRF(t)}catch(u){y.debug(`Failed to delete '${t}'. ${u.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof N&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},Jd.extract7z=function(e,r,n){return m(this,void 0,void 0,(function*(){(0,P.ok)($,"extract7z() not supported on current OS"),(0,P.ok)(e,'parameter "file" is required'),r=yield t(r);const i=process.cwd();if(process.chdir(r),n)try{const t=["x",y.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],r={silent:!0};yield(0,T.exec)(`"${n}"`,t,r)}finally{process.chdir(i)}else{const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${b.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${r.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],n={silent:!0};try{const e=yield v.which("powershell",!0);yield(0,T.exec)(`"${e}"`,t,n)}finally{process.chdir(i)}}return r}))},Jd.extractTar=function(e,r,n="xz"){return m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");r=yield t(r),y.debug("Checking tar --version");let i="";yield(0,T.exec)("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>i+=""+e,stderr:e=>i+=""+e}}),y.debug(i.trim());const o=i.toUpperCase().includes("GNU TAR");let s;s=n instanceof Array?n:[n],y.isDebug()&&!n.includes("v")&&s.push("-v");let a=r,c=e;return $&&o&&(s.push("--force-local"),a=r.replace(/\\/g,"/"),c=e.replace(/\\/g,"/")),o&&(s.push("--warning=no-unknown-keyword"),s.push("--overwrite")),s.push("-C",a,"-f",c),yield(0,T.exec)("tar",s),r}))},Jd.extractXar=function(e,r,n=[]){return m(this,void 0,void 0,(function*(){let i;(0,P.ok)(C,"extractXar() not supported on current OS"),(0,P.ok)(e,'parameter "file" is required'),r=yield t(r),i=n instanceof Array?n:[n],i.push("-x","-C",r,"-f",e),y.isDebug()&&i.push("-v");const o=yield v.which("xar",!0);var s;return yield(0,T.exec)(`"${o}"`,(s=i,Array.from(new Set(s)))),r}))},Jd.extractZip=function(e,r){return m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return r=yield t(r),$?yield function(e,t){return m(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=yield v.which("pwsh",!1);if(i){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('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];y.debug("Using pwsh at path: "+i),yield(0,T.exec)(`"${i}"`,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 '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],t=yield v.which("powershell",!0);y.debug("Using powershell at path: "+t),yield(0,T.exec)(`"${t}"`,e)}}))}(e,r):yield function(e,t){return m(this,void 0,void 0,(function*(){const r=yield v.which("unzip",!0),n=[e];y.isDebug()||n.unshift("-q"),n.unshift("-o"),yield(0,T.exec)(`"${r}"`,n,{cwd:t})}))}(e,r),r}))},Jd.cacheDir=function(e,t,i,o){return m(this,void 0,void 0,(function*(){if(i=O.clean(i)||i,o=o||_.arch(),y.debug(`Caching tool ${t} ${i} ${o}`),y.debug("source dir: "+e),!g.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const s=yield r(t,i,o);for(const t of g.readdirSync(e)){const r=b.join(e,t);yield v.cp(r,s,{recursive:!0})}return n(t,i,o),s}))},Jd.cacheFile=function(e,t,i,o,s){return m(this,void 0,void 0,(function*(){if(o=O.clean(o)||o,s=s||_.arch(),y.debug(`Caching tool ${i} ${o} ${s}`),y.debug("source file: "+e),!g.statSync(e).isFile())throw Error("sourceFile is not a file");const a=yield r(i,o,s),c=b.join(a,t);return y.debug("destination file "+c),yield v.cp(e,c),n(i,o,s),a}))},Jd.find=function(t,r,n){if(!t)throw Error("toolName parameter is required");if(!r)throw Error("versionSpec parameter is required");n=n||_.arch(),i(r)||(r=o(e(t,n),r));let a="";if(r){r=O.clean(r)||"";const e=b.join(s(),t,r,n);y.debug("checking cache: "+e),g.existsSync(e)&&g.existsSync(e+".complete")?(y.debug(`Found tool in cache ${t} ${r} ${n}`),a=e):y.debug("not found")}return a},Jd.findAllVersions=e,Jd.getManifestFromRepo=function(e,t,r,n="master"){return m(this,void 0,void 0,(function*(){let i=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new S.HttpClient("tool-cache"),a={};r&&(y.debug("set auth"),a.authorization=r);const c=yield s.getJson(o,a);if(!c.result)return i;let u="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){u=e.url;break}a.accept="application/vnd.github.VERSION.raw";let l=yield(yield s.get(u,a)).readBody();if(l){l=l.replace(/^\uFEFF/,"");try{i=JSON.parse(l)}catch(f){y.debug("Invalid json")}}return i}))},Jd.findFromManifest=function(e,t,r,n=_.arch()){return m(this,void 0,void 0,(function*(){return yield E._findMatch(e,t,r,n)}))},Jd.isExplicitVersion=i,Jd.evaluateVersions=o,Jd}(),nh={};const ih=e(function(){function e(e,t){const r=e+Math.random()*t*(Math.random()>.5?1:-1);return Math.max(0,r)}function t(n,i){if(!n||!i)throw Error("retry-as-promised must be passed a callback and a options set");const o={$current:"$current"in(i="number"==typeof i?{max:i}:i)?i.$current:1,max:i.max,timeout:i.timeout||void 0,match:i.match?Array.isArray(i.match)?i.match:[i.match]:[],backoffBase:void 0===i.backoffBase?100:i.backoffBase,backoffExponent:i.backoffExponent||1.1,backoffJitter:i.backoffJitter||0,report:i.report,name:i.name||n.name||"unknown"};return o.match&&!Array.isArray(o.match)&&(o.match=[o.match]),o.report&&o.report("Trying "+o.name+" #"+o.$current+" at "+(new Date).toLocaleTimeString(),o),new Promise((function(i,s){let a,c,u;o.timeout&&(a=setTimeout((function(){c&&clearTimeout(c),s(new r(o.name+" timed out",u))}),o.timeout)),Promise.resolve(n({current:o.$current})).then(i).then((function(){a&&clearTimeout(a),c&&clearTimeout(c)})).catch((function(r){a&&clearTimeout(a),c&&clearTimeout(c),u=r,o.report&&o.report(r&&""+r||r,o,r);var l=o.max>o.$current;if(!l)return s(r);if(l=0===o.match.length||o.match.some((function(e){return function(e,t){if("function"==typeof e)try{if(t instanceof e)return!0}catch(r){return!!e(t)}return e===""+t||e===t.message||e instanceof RegExp&&(e.test(t.message)||e.test(""+t))}(e,r)})),!l)return s(r);var f=o.backoffBase*Math.pow(o.backoffExponent,o.$current-1);const p=o.backoffJitter;void 0!==p&&(f=e(f,p)),o.$current++,o.report&&o.report(`Retrying ${o.name} (${o.$current})`,o),f?(o.report&&o.report(`Delaying retry of ${o.name} by ${f}`,o),c=setTimeout((function(){t(n,o).then(i).catch(s)}),f)):t(n,o).then(i).catch(s)}))}))}if(Kd)return nh;Kd=1,Object.defineProperty(nh,"__esModule",{value:!0}),nh.retryAsPromised=nh.applyJitter=nh.TimeoutError=void 0;class r extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}}return nh.TimeoutError=r,nh.applyJitter=e,nh.retryAsPromised=t,nh.default=t,nh}());var oh,sh,ah,ch,uh,lh,fh,ph,dh,hh,mh,yh,vh,wh,gh,Eh,_h,bh,Sh,Oh,Rh,Ih,Ph,Th,xh,Nh,$h,Ch,Ah,Lh,kh,Dh,Fh,jh,Uh,Mh,Gh,Bh,Hh,Vh,qh,zh,Wh,Xh,Yh,Kh,Jh,Qh,Zh,em,tm,rm,nm,im,om,sm,am,cm,um,lm,fm,pm,dm,hm,mm={},ym={},vm={},wm={},gm=ir();let Em;const{GITHUB_ACTIONS:_m}=Ai,bm=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,r=e.fs||{};return e.mkdir=e.mkdir||r.mkdir||xn,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,i)=>t.mkdir(e,r,((e,t)=>e?i(e):n(t))))),e.stat=e.stat||r.stat||Nn,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise(((r,n)=>t.stat(e,((e,t)=>e?n(e):r(t))))),e.statSync=e.statSync||r.statSync||$n,e.mkdirSync=e.mkdirSync||r.mkdirSync||Cn,t},Sm=(e,t,r)=>{const n=Dn(e),i={...bm(t),recursive:!1};if(n===e)try{return i.mkdirSync(e,i)}catch(o){if(o&&"EISDIR"!==o.code)throw o;return}try{return i.mkdirSync(e,i),r||e}catch(o){const t=o;if(t&&"ENOENT"===t.code)return Sm(e,i,Sm(n,i,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw o;try{if(!i.statSync(e).isDirectory())throw o}catch(s){throw o}}},Om=Object.assign((async(e,t,r)=>{const n=bm(t);n.recursive=!1;const i=Dn(e);return i===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const o=t;if(o&&"ENOENT"===o.code)return Om(i,n).then((t=>Om(e,n,t)));if(o&&"EEXIST"!==o.code&&"EROFS"!==o.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:Sm}),Rm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?Rm(e,Dn(t),t):void 0))},Im=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?Im(e,Dn(t),t):void 0}},Pm=(e,t)=>{const r=bm(t);if(r.recursive=!0,Dn(e)===e)return r.mkdirSync(e,r);const n=Im(r,e);try{return r.mkdirSync(e,r),n}catch(i){if(i&&"ENOENT"===i.code)return Sm(e,r);throw i}},Tm=Object.assign((async(e,t)=>{const r={...bm(t),recursive:!0};return Dn(e)===e?await r.mkdirAsync(e,r):Rm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Om(e,r);throw t}))))}),{sync:Pm}),xm=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Nm=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=Bn(e),"win32"===xm){const t=/[*|"<>?:]/,{root:r}=Hn(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},$m=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Cm=+$m[0]>10||10==+$m[0]&&+$m[1]>=12,Am=Cm?e=>bm(e).mkdirSync===Cn:()=>!1,Lm=Object.assign(Cm?e=>bm(e).mkdir===xn:()=>!1,{sync:Am}),km=(e,t)=>{e=Nm(e);const r=bm(t);return Am(r)?Pm(e,r):Sm(e,r)},Dm=Object.assign((async(e,t)=>{e=Nm(e);const r=bm(t);return Lm(r)?Tm(e,r):Om(e,r)}),{mkdirpSync:km,mkdirpNative:Tm,mkdirpNativeSync:Pm,mkdirpManual:Om,mkdirpManualSync:Sm,sync:km,native:Tm,nativeSync:Pm,manual:Om,manualSync:Sm,useNative:Lm,useNativeSync:Am});var Fm=c();const jm=e(Re()),Um=e(Fe()),Mm=e(Se()),Gm=/v?(\d\S*)/,Bm=Il((function(){const e="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),t=An.join(e,"versions.json");return JSON.parse(In.readFileSync(t,"utf-8"))})),{GITHUB_ACTIONS:Hm}=Ai,Vm=Il((async function(e){const t=[];"linux"===process.platform?t.push("/home/runner/.local/bin/"):"darwin"===process.platform&&t.push("/usr/local/bin/");const r=(await Fm.getExecOutput(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Ln(r,"Scripts"),Ln(r,"Scripts","bin"),Ln(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var qm,zm={},Wm=function(){if(qm)return zm;qm=1,Object.defineProperty(zm,"__esModule",{value:!0}),zm.getUbuntuVersion=void 0;const e=Qn;return zm.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const t=await(r="lsb_release",n=["-a"],new Promise(((t,i)=>{e.execFile(r,n,{encoding:"utf8",shell:!1},((e,o,s)=>{if(e)return"errno"in e&&"ENOENT"===e.code?void t(null):void i(Error(`Could not execute \`${r} ${n.join(" ")}\`: ${e} (stderr=${s})`));t(o)}))})));var r,n;if(null===t)return[];const i=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,s=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let a=null,c=null,u=!1;for(const e of t.split("\n")){const t=e.match(i);if(null!==t){if("Ubuntu"!==t[1])return[];u=!0}const r=e.match(o);r&&(a=r);const n=e.match(s);if(n&&(c=n),u&&a&&c)break}if(!u)return[];for(const e of[a,c])if(e){const t=[e[1],e[2]];return e[3]&&t.push(e[3]),t.map((e=>parseInt(e,10)))}return[]},zm}();const Xm=Il((async function(){try{if(ft()){try{null===da.sync("lsb_release",{nothrow:!0})&&await Qe([{name:"lsb-release"}])}catch{return Pr()}const e=await Wm.getUbuntuVersion();return 0===e.length?Pr():e}return null}catch(e){return f(""+e),null}}),{promise:!0}),Ym=Il((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=se("~/.local/pipx");if(await oe(t))return t;switch(process.platform){case"win32":e=se("~/AppData/Local/pipx");break;case"darwin":e=se("~/Library/Application Support/pipx");break;default:e=se("~/.local/share/pipx")}return await Dm(e),await Dm(Ln(e,"trash")),await Dm(Ln(e,"shared")),await Dm(Ln(e,"venv")),e}),{promise:!0}),Km=Il((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=se("~/.local/bin");return await fe(e,Ay),await Dm(e),e}),{promise:!0});let Jm;const Qm=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"]]]),Zm=Il((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||ai.release()).split(".")[0]);const[t,r]=Qm.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),ey=e(Oe()),{GITHUB_ACTIONS:ty}=Ai,ry="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),{GITHUB_ACTIONS:ny}=Ai,iy="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),oy="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),sy="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url));var ay,cy={},uy=function(){function e(e){return Object.values(m).includes(e)?e:e in m?m[e]:e}function t(e){if(Object.keys(m).includes(e))return e;for(const[t,r]of Object.entries(m))if(r===e)return t;return e}function r(e,t){try{return(""+s.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\"+e}catch(r){o.warning("vswhere failed: "+r)}return null}function n(n){const i=e(n);let s;if(i){const e=i.split(".")[0]+".9";s=`-version "${i},${e}"`}else s="-latest";let c=r("VC\\Auxiliary\\Build\\vcvarsall.bat",s);if(c&&a.existsSync(c))return o.info("Found with vswhere: "+c),c;o.info("Not found with vswhere");const u=n?[t(n)]:h;for(const e of p)for(const t of u)for(const r of d)if(c=`${e}\\Microsoft Visual Studio\\${t}\\${r}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,o.info("Trying standard location: "+c),a.existsSync(c))return o.info("Found standard location: "+c),c;if(o.info("Not found in standard locations"),c=f+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",a.existsSync(c))return o.info("Found VS 2015: "+c),c;throw o.info("Not found in VS 2015 location: "+c),Error("Microsoft Visual Studio not found")}function i(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}if(ay)return cy;ay=1;const o=u(),s=Qn,a=In,c=An,l=bi,f=l.env["ProgramFiles(x86)"],p=[l.env["ProgramFiles(x86)"],l.env.ProgramFiles],d=["Enterprise","Professional","Community","BuildTools"],h=["2022","2019","2017"],m={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};cy.vsversion_to_versionnumber=e,cy.vsversion_to_year=t;const y=f+"\\Microsoft Visual Studio\\Installer";return cy.findWithVswhere=r,cy.findVcvarsall=n,cy.setupMSVCDevCmd=function(e,t,r,a,u,f){if("win32"!=l.platform)return void o.info("This is not a Windows virtual environment, bye!");l.env.PATH+=c.delimiter+y;let p={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in p&&(e=p[e.toLowerCase()]);var d=[e];a&&!0===JSON.parse(a)&&d.push("uwp"),t&&d.push(t),r&&d.push("-vcvars_ver="+r),u&&!0===JSON.parse(u)&&d.push("-vcvars_spectre_libs=spectre");const h=`"${n(f)}" ${d.join(" ")}`;o.debug("vcvars command-line: "+h);const m=(""+s.execSync(`set && cls && ${h} && cls && set`,{shell:"cmd"})).split("\f"),v=m[0].split("\r\n"),w=m[1].split("\r\n"),g=m[2].split("\r\n"),E=w.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(E.length>0)throw Error("invalid parameters\r\n"+E.join("\r\n"));let _={};for(let n of v){const[e,t]=n.split("=");_[e]=t}o.startGroup("Environment variables");for(let n of g){if(!n.includes("="))continue;let[e,t]=n.split("=");t!==_[e]&&(o.info("Setting "+e),i(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),o.exportVariable(e,t))}o.endGroup(),o.info("Configured Developer Command Prompt")},cy}();const ly=36e5,fy=Il((function(e){const t=yr(e);return Number.parseInt(t.split(".")[0],10)})),py="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url));var dy=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(dy||{});const hy="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),my=Il((async function(e){if(ft())for(const n of["libtinfo5","libtinfo6"])try{await Qe([{name:n}])}catch(t){try{if("libtinfo5"===n){d(`Failed to install ${n}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${Ud.includes(process.arch)?"amd64":Gd.includes(process.arch)?"arm64":process.arch}.deb`,t="http://launchpadlibrarian.net/666971015/"+e,r=new ed.DownloaderHelper(t,On(),{fileName:e});r.on("error",(async e=>{d(`Failed to download ${t}: ${e}`),await r.stop()})),await r.start(),T("dpkg",["-i",Ln(On(),e)])}}catch(r){d(`Failed to install ${n}. Ignoring`)}}else lt()?await mt("ncurses5-compat-libs",void 0,"yay"):ut()&&await ht([{name:"ncurses-compat-libs"}])}),{promise:!0}),{GITHUB_ACTIONS:yy}=Ai,vy="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url)),wy=Il((async function(e){"linux"===process.platform&&await Xr(wr("gcc",void 0,await Xm()),"",e,40)}),{promise:!0}),{GITHUB_ACTIONS:gy}=Ai,Ey="string"==typeof __dirname?__dirname:An.dirname(Oi(import.meta.url));let _y,by=!1;const Sy={llvm:ln,clang:ln,"clang++":ln},Oy={gcc:Xr,"g++":Xr},Ry={mingw:Hr},Iy={msvc:hn,cl:hn,msbuild:hn,visualstudio:hn},Py={appleclang:sn,applellvm:sn,"apple-clang":sn,"apple-llvm":sn},Ty={cmakelang:Lr,"cmake-lint":Lr,"cmake-format":Lr,cmakelint:Lr,cmakeformat:Lr},xy=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],Ny={git:Qr,nala:async function(e,t,r){if(!ft())return;if("string"==typeof _y)return{binDir:_y};const n=da.sync("nala",{nothrow:!0});if(null!==n)return _y=Dn(n),{binDir:_y};await Qe([{name:"python3-apt"}]),_y="/usr/bin";try{const t=await Ye({name:"nala",version:e});if(void 0!==t)return await Qe([{name:t}]),{binDir:_y}}catch(i){d("Failed to install nala: "+i)}try{const e=await Ye({name:"nala-legacy"});if(void 0!==e)return await Qe([{name:e}],!0),{binDir:_y}}catch(i){d("Failed to install nala-legacy: "+i)}return await async function(){const e=new ed.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",On(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Ln(On(),"install-nala.sh"),r=await Ei(t,"utf8");await _i(t,r.replace(/sudo/g,"")),await Qe([{name:"wget"}]);try{T("bash",[t])}catch(i){l("Failed to install nala via installer: "+i),T("apt",["install","-y","-t","nala","nala"])}}(),{binDir:_y}},brew:rt,choco:pt,python:_r,powershell:wn,pwsh:wn,...Sy,...Oy,...Ry,...Iy,...Py,...Ty,cmake:hr,ninja:tn,vcpkg:async function(e,t,r){const n=await da("vcpkg",{nothrow:!0});return by&&null!==n?{binDir:Dn(n)}:(await Qr(""),"linux"===process.platform&&(lt()?await Promise.all([mt("curl"),mt("zip"),mt("unzip"),mt("tar"),mt("pkg-config")]):ut()?await ht([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}]):ft()&&await Qe([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"pkg-config"}])),await oe(Ln(t,St("bootstrap-vcpkg",".bat")))?p(`Vcpkg folder already exists at ${t}. Skipping the clone`):E("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Dn(t),stdio:"inherit"}),""!==e&&"true"!==e&&(d("Checking out vcpkg version "+e),E("git",["checkout",e],{cwd:t,stdio:"inherit"})),"linux"===process.platform&&r in Gd&&await ue("VCPKG_FORCE_SYSTEM_BINARIES","1"),E(St(Ot("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await A(t),await fe(t,Ay),by=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return dt("bazelisk",e);case"darwin":return ct("bazelisk",e);case"linux":if(lt())throw Error("installing bazel on Arch linux is not supported yet");if(ut())return await ht([{name:"dnf-plugins-core"}]),T("dnf",["copr","enable","vbatts/bazel"]),ht([{name:"bazel4"}]);if(ft())return T("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Ze({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`]),Qe([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Tr("conan",e)},meson:function(e,t,r){return Tr("meson",e)},gcovr:function(e,t,r){return Tr("gcovr",e)},opencppcoverage:mn,OpenCppCoverage:mn,ccache:function(e,t,r){switch(process.platform){case"win32":return dt("ccache",e);case"darwin":return ct("ccache",e);case"linux":if(lt())return mt("ccache",e);if(ut())return ht([{name:"ccache",version:e}]);if(ft())return Qe([{name:"ccache",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},sccache:function(e,t,r){switch(process.platform){case"win32":return dt("sccache",e);case"linux":case"darwin":return ct("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await ih((()=>dt("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>d(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 oe(Ln(e,"doxygen.exe")))return await fe(e,Ay),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await kr(wr("graphviz",void 0)),t}case"darwin":{const e=await ct("doxygen",void 0,{formula:!0});return Zm()[0]>11&&await kr(wr("graphviz",void 0)),e}case"linux":{let i;if(""===e||lt()||ut())if(lt())i=await mt("doxygen",e);else{if(ut())return ht([{name:"doxygen",version:e}]);if(!ft())throw Error("Unsupported linux distributions");i=await Qe([{name:"doxygen",version:e}])}else{if(!ft())throw Error("Unsupported linux distributions");try{i=await pr("doxygen",e,Fr,t,r);try{await Qe([{name:"libclang-cpp9"}])}catch(n){d("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){p(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),i=await Qe([{name:"doxygen"}])}}return await kr(wr("graphviz",void 0,await Xm())),i}default:throw Error("Unsupported platform")}},graphviz:kr,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await dt("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await fe(e,Ay),e}()};case"darwin":return ct("cppcheck",e);case"linux":if(lt())return mt("cppcheck",e);if(ut())return ht([{name:"ccache",version:e}]);if(ft())return Qe([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Tr("cpplint",e,{pythonVersion:">=3.8.0"})},flawfinder:function(e,t,r){return Tr("flawfinder",e)},lizard:function(e,t,r){return Tr("lizard",e)},infer:function(e,t,r){return pr("infer",e,Zr,t,r)},"clang-tidy":dn,clangtidy:dn,"clang-format":pn,clangformat:pn,vcvarsall:an,kcov:async function(e,t,r){if("linux"!==process.platform)return void d("Kcov is not supported on non-linux");const n=e.split("-");let i=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const o=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(i);let a;return 38===s&&(i="v38"),"binary"!==o||39>s?(a=await pr("kcov",i,nn,t,r),a):(a=await pr("kcov",i,rn,t,r),lt()?await mt("binutils"):ut()?await ht([{name:"binutils"}]):ft()&&await Qe([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return dt("make",e);case"darwin":{await ct("make",e);const t=Ln(ot(),"opt/make/libexec/gnubin");return await fe(t,Ay),{binDir:t}}case"linux":if(lt())return mt("make",e);if(ut())return ht([{name:"make",version:e}]);if(ft())return Qe([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return pr("task",e,gn,t,r)},sevenzip:or,"7zip":or,"7z":or},$y=Object.keys(Ny),Cy=["compiler","architecture","timeout",...$y],Ay={rcPath:se("~/.cpprc"),guard:"cpp"},Ly=/[.-]((?:\d{4}|\d+(?:\.\d+)*(?:-[\w.-]+)?(?:\+[\w.-]+)?)$)/;(async function(e){const t=Ci.GITHUB_ACTIONS?Promise.resolve():async function(){try{await Jp({pkg:pf})}catch(e){f("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),r=function(e){const t=Object.fromEntries(Cy.map((e=>[e,En(e)])));return function(e,t){var r,n,i,o,s,a={_:[]},c=0,u=0,l=0,f=(e=e||[]).length;const p=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=Me(t.string),t.boolean=Me(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Me(t.alias[r]),c=0;n.length>c;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(u=(n=t.alias[t.boolean[c]]||[]).length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(u=(n=t.alias[t.string[c]]||[]).length;u-- >0;)t.string.push(n[u]);if(h)for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[o])for(t[o].push(r),c=0;n.length>c;c++)t[o].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;f>c;c++){if("--"===(i=e[c])){a._=a._.concat(e.slice(++c));break}for(u=0;i.length>u&&45===i.charCodeAt(u);u++);if(0===u)a._.push(i);else if("no-"===i.substring(u,u+3)){if(o=i.substring(u+3),d&&!~m.indexOf(o))return t.unknown(i);a[o]=!1}else{for(l=u+1;i.length>l&&61!==i.charCodeAt(l);l++);for(o=i.substring(u,l),s=i.substring(++l)||c+1===f||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===u?[o]:o,l=0;n.length>l;l++){if(o=n[l],d&&!~m.indexOf(o))return t.unknown("-".repeat(u)+o);Ge(a,o,n.length>l+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...Cy,"timeout","node-package-manager"],default:t,alias:{h:"help",v:"version"},boolean:["help","version","setup-cpp"]})}(e);r.help&&(d('\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--nodePackageManager\t the node package manager to use (npm/yarn/pnpm) when installing setup-cpp globally\n--help\t show this help message\n--version\t show the version of setup-cpp\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, --git, --setup-cpp"},"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"])),r.version&&d(""+pf.version);const n=r.architecture??process.arch,i=process.env.SETUP_CPP_DIR??se("~"),o=[],s=[],a=cf.create({autoloadLocales:!0});let c,u;cf.addLocale(ff),Ql.addLocale(ef);const p=await Xm(),h=void 0!==r.compiler?function(e){try{const t=e.match(Ly);if(null===t)return{compiler:e,version:void 0};const r=t[1],n=e.slice(0,t.index).replace(/[.-]$/,"");return r.match(/^\d{4}$/)||null!==Mm(r)||d("Non-semver version format: "+r),{compiler:n,version:r}}catch(t){return l(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(r.compiler):void 0;if(!function(e,t,r){const n=void 0!==r&&t.includes(r.compiler),i=(n?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),o=i.filter((t=>!Er(n&&"compiler"===t&&void 0!==r?r.version:e[t]))),s=0!==o.length?n&&"compiler"===o[0]&&void 0!==r?r.version??"true":e[o[0]]??"true":"true";if(o.some((t=>n&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${s}`:e[t]!==s)))return!1;for(const a of i)e[a]=n&&"compiler"===a&&void 0!==r?`${r.compiler}-${s}`:s;return!0}(r,[...xy,"compiler"],h))return l("The same version must be used for llvm, clang-format and clang-tidy"),1;lt()&&"string"==typeof r.cppcheck&&"string"==typeof r.gcovr&&(d("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await mt("python-pygments"));let m=!1;for(const l of $y){const e=r[l];if(void 0===e||"false"===e)continue;const t=void 0!==r.timeout?60*Number.parseFloat(r.timeout)*1e3:void 0;if(c=Date.now(),await cn(l,e,p,n,i,o,s,t),u=Date.now(),d("took "+(a.format(c,u)||"0 seconds")),0!==s.length&&Ci.isCI){m=!0;break}}if(!m&&void 0!==h){const e=Date.now();await async function(e,t,r,n,i,o,s){let a;try{if(Io.startGroup(`Installing ${e} ${t??""}`),e in Sy)a=await ln(wr("llvm",t,r),Ln(n,"llvm"),i),await ue("GCOV","llvm-cov gcov",Ay);else if(e in Oy){const e=wr("gcc",t,r);a=await Xr(e,Ln(n,"gcc"),i),await Jr(e)}else if(e in Ry){const e=wr("mingw",t,r);a=await Hr(e,Ln(n,"gcc"),i),await Jr(e)}else e in Iy?a=await hn(wr("msvc",t,r),Ln(n,"msvc"),i):e in Py?await sn():(a=null,s.push("Unsupported compiler "+e))}catch(c){l(c),c instanceof Error&&l(c.stack??""),s.push(`Failed to install the ${e} compiler ${t}`)}null!==a&&o.push(_n(e,a)),Io.endGroup()}(h.compiler,h.version,p,i,n,o,s);const t=Date.now();d("took "+(a.format(e,t)||"0 seconds"))}await async function(e){if(await oe(e.rcPath)){const t=(await xl(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Nl(e.rcPath,r.join("\n")),await A(e.rcPath)}}(Ay),void 0===r["setup-cpp"]&&(r["setup-cpp"]=!(0===o.length&&0===s.length&&(r.version||r.help)));const y=r["setup-cpp"]?async function(e,t="npm"){try{if(null!==await da("setup-cpp",{nothrow:!0}))return;d(`Installing setup-cpp@${e} via ${t}...`),await g(t,["install","-g","setup-cpp@"+e],{stdio:"inherit",timeout:6e4})}catch(r){l(`Failed to install the setup-cpp@${e} CLI: ${r}. Ignoring...`)}}(pf.version,r["node-package-manager"]):Promise.resolve();await Promise.all([t,y]);for(const l of o)console.log(`[32m${l}[0m`);for(const f of s)l(f);if((0!==o.length||0!==s.length)&&(d("setup-cpp finished"),!Ci.GITHUB_ACTIONS))switch(process.platform){case"win32":f("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":f("Run `source ~/.cpprc` or restart your shell to update the environment.")}return 0===s.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{l("main() panicked!"),l(e),process.exitCode=1}));export{io as H,Io as a,Ai as b,Ti as c,Fm as e,e as g,d as i,oe as p,Ue as r,rh as t,f as w};
|
||
//# sourceMappingURL=setup-cpp.mjs.map
|