UNPKG

setup-cpp

Version:

Install all the tools required for building and testing C++/C projects.

7 lines 325 kB
#!/usr/bin/env node import up from"process";import it,{homedir as lp,tmpdir as Ue}from"os";import ue,{join as J,resolve as Ia,delimiter as mn,basename as er,extname as In,normalize as Lm,sep as fp,dirname as be,relative as Dm,parse as dp}from"path";import je,{promises as Pn,existsSync as Qt,mkdir as pp,stat as km,statSync as Fm,mkdirSync as hp}from"fs";import*as uc from"https";import Pa from"https";import mp from"crypto";import*as Vn from"http";import yp from"http";import"net";import qm from"tls";import Tn from"events";import xn from"util";import Um from"string_decoder";import Fr from"child_process";import qr from"assert";import jm from"timers";import{Buffer as Mm}from"node:buffer";import dr from"node:path";import ga,{ChildProcess as Gm}from"node:child_process";import Tt from"node:process";import{fileURLToPath as vp}from"node:url";import wp,{constants as gp}from"node:os";import Vm,{createWriteStream as Bm,createReadStream as Hm,readFileSync as zm,promises as Wm}from"node:fs";import Xm from"buffer";import Ur from"stream";import{debuglog as Km}from"node:util";import _p,{readFile as pr,appendFile as Ym,writeFile as yn,chmod as Ep,readdir as Sp}from"fs/promises";import Jm,{fileURLToPath as Lt}from"url";import Qm from"constants";import{error as Zm,info as _a}from"console";function Bn(e){return e==null?[]:Array.isArray(e)?e:[e]}function ey(e,t,r,n){var i,o=e[t],s=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);e[t]=o==null?s:Array.isArray(o)?o.concat(s):[o,s]}function ty(e,t){e=e||[],t=t||{};var r,n,i,o,s,l={_:[]},u=0,a=0,c=0,m=e.length;const p=t.alias!==void 0,w=t.unknown!==void 0,E=t.default!==void 0;if(t.alias=t.alias||{},t.string=Bn(t.string),t.boolean=Bn(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Bn(t.alias[r]),u=0;u<n.length;u++)(t.alias[n[u]]=n.concat(r)).splice(u,1);for(u=t.boolean.length;u-- >0;)for(n=t.alias[t.boolean[u]]||[],a=n.length;a-- >0;)t.boolean.push(n[a]);for(u=t.string.length;u-- >0;)for(n=t.alias[t.string[u]]||[],a=n.length;a-- >0;)t.string.push(n[a]);if(E){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),u=0;u<n.length;u++)t[o].push(n[u])}const d=w?Object.keys(t.alias):[];for(u=0;u<m;u++){if(i=e[u],i==="--"){l._=l._.concat(e.slice(++u));break}for(a=0;a<i.length&&i.charCodeAt(a)===45;a++);if(a===0)l._.push(i);else if(i.substring(a,a+3)==="no-"){if(o=i.substring(a+3),w&&!~d.indexOf(o))return t.unknown(i);l[o]=!1}else{for(c=a+1;c<i.length&&i.charCodeAt(c)!==61;c++);for(o=i.substring(a,c),s=i.substring(++c)||u+1===m||(""+e[u+1]).charCodeAt(0)===45||e[++u],n=a===2?[o]:o,c=0;c<n.length;c++){if(o=n[c],w&&!~d.indexOf(o))return t.unknown("-".repeat(a)+o);ey(l,o,c+1<n.length||s,t)}}}if(E)for(r in t.default)l[r]===void 0&&(l[r]=t.default[r]);if(p)for(r in l)for(n=t.alias[r]||[];n.length>0;)l[n.shift()]=l[r];return l}var at=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ry(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?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(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var Hr={exports:{}},Hn,lc;function An(){if(lc)return Hn;lc=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,i=t-6;return Hn={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Hn}var zn,fc;function Cn(){return fc||(fc=1,zn=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),zn}var dc;function jr(){return dc||(dc=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=An(),o=Cn();t=e.exports={};const s=t.re=[],l=t.safeRe=[],u=t.src=[],a=t.safeSrc=[],c=t.t={};let m=0;const p="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",i],[p,n]],E=f=>{for(const[h,y]of w)f=f.split(`${h}*`).join(`${h}{0,${y}}`).split(`${h}+`).join(`${h}{1,${y}}`);return f},d=(f,h,y)=>{const v=E(h),S=m++;o(f,S,h),c[f]=S,u[S]=h,a[S]=v,s[S]=new RegExp(h,y?"g":void 0),l[S]=new RegExp(v,y?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),d("FULL",`^${u[c.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),d("LOOSE",`^${u[c.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),d("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",`${u[c.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",u[c.COERCEPLAIN]+`(?:${u[c.PRERELEASE]})?(?:${u[c.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",u[c.COERCE],!0),d("COERCERTLFULL",u[c.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Hr,Hr.exports)),Hr.exports}var Wn,pc;function Ta(){if(pc)return Wn;pc=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Wn=n=>n?typeof n!="object"?e:n:t,Wn}var Xn,hc;function bp(){if(hc)return Xn;hc=1;const e=/^[0-9]+$/,t=(n,i)=>{const o=e.test(n),s=e.test(i);return o&&s&&(n=+n,i=+i),n===i?0:o&&!s?-1:s&&!o?1:n<i?-1:1};return Xn={compareIdentifiers:t,rcompareIdentifiers:(n,i)=>t(i,n)},Xn}var Kn,mc;function We(){if(mc)return Kn;mc=1;const e=Cn(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=An(),{safeRe:n,t:i}=jr(),o=Ta(),{compareIdentifiers:s}=bp();class l{constructor(a,c){if(c=o(c),a instanceof l){if(a.loose===!!c.loose&&a.includePrerelease===!!c.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const m=a.trim().match(c.loose?n[i.LOOSE]:n[i.FULL]);if(!m)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){const w=+p;if(w>=0&&w<r)return w}return p}):this.prerelease=[],this.build=m[5]?m[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(a){if(e("SemVer.compare",this.version,this.options,a),!(a instanceof l)){if(typeof a=="string"&&a===this.version)return 0;a=new l(a,this.options)}return a.version===this.version?0:this.compareMain(a)||this.comparePre(a)}compareMain(a){return a instanceof l||(a=new l(a,this.options)),s(this.major,a.major)||s(this.minor,a.minor)||s(this.patch,a.patch)}comparePre(a){if(a instanceof l||(a=new l(a,this.options)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;let c=0;do{const m=this.prerelease[c],p=a.prerelease[c];if(e("prerelease compare",c,m,p),m===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(m===void 0)return-1;if(m===p)continue;return s(m,p)}while(++c)}compareBuild(a){a instanceof l||(a=new l(a,this.options));let c=0;do{const m=this.build[c],p=a.build[c];if(e("build compare",c,m,p),m===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(m===void 0)return-1;if(m===p)continue;return s(m,p)}while(++c)}inc(a,c,m){if(a.startsWith("pre")){if(!c&&m===!1)throw new Error("invalid increment argument: identifier is empty");if(c){const p=`-${c}`.match(this.options.loose?n[i.PRERELEASELOOSE]:n[i.PRERELEASE]);if(!p||p[1]!==c)throw new Error(`invalid identifier: ${c}`)}}switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",c,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",c,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",c,m),this.inc("pre",c,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",c,m),this.inc("pre",c,m);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const p=Number(m)?1:0;if(this.prerelease.length===0)this.prerelease=[p];else{let w=this.prerelease.length;for(;--w>=0;)typeof this.prerelease[w]=="number"&&(this.prerelease[w]++,w=-2);if(w===-1){if(c===this.prerelease.join(".")&&m===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(p)}}if(c){let w=[c,p];m===!1&&(w=[c]),s(this.prerelease[0],c)===0?isNaN(this.prerelease[1])&&(this.prerelease=w):this.prerelease=w}break}default:throw new Error(`invalid increment argument: ${a}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Kn=l,Kn}var Yn,yc;function vr(){if(yc)return Yn;yc=1;const e=We();return Yn=(r,n,i=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(o){if(!i)return null;throw o}},Yn}var Jn,vc;function Rp(){if(vc)return Jn;vc=1;const e=vr();return Jn=(r,n)=>{const i=e(r,n);return i?i.version:null},Jn}var Qn,wc;function ny(){if(wc)return Qn;wc=1;const e=vr();return Qn=(r,n)=>{const i=e(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null},Qn}var Zn,gc;function iy(){if(gc)return Zn;gc=1;const e=We();return Zn=(r,n,i,o,s)=>{typeof i=="string"&&(s=o,o=i,i=void 0);try{return new e(r instanceof e?r.version:r,i).inc(n,o,s).version}catch{return null}},Zn}var ei,_c;function sy(){if(_c)return ei;_c=1;const e=vr();return ei=(r,n)=>{const i=e(r,null,!0),o=e(n,null,!0),s=i.compare(o);if(s===0)return null;const l=s>0,u=l?i:o,a=l?o:i,c=!!u.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(u)===0)return a.minor&&!a.patch?"minor":"patch"}const p=c?"pre":"";return i.major!==o.major?p+"major":i.minor!==o.minor?p+"minor":i.patch!==o.patch?p+"patch":"prerelease"},ei}var ti,Ec;function $p(){if(Ec)return ti;Ec=1;const e=We();return ti=(r,n)=>new e(r,n).major,ti}var ri,Sc;function oy(){if(Sc)return ri;Sc=1;const e=We();return ri=(r,n)=>new e(r,n).minor,ri}var ni,bc;function ay(){if(bc)return ni;bc=1;const e=We();return ni=(r,n)=>new e(r,n).patch,ni}var ii,Rc;function cy(){if(Rc)return ii;Rc=1;const e=vr();return ii=(r,n)=>{const i=e(r,n);return i&&i.prerelease.length?i.prerelease:null},ii}var si,$c;function ft(){if($c)return si;$c=1;const e=We();return si=(r,n,i)=>new e(r,i).compare(new e(n,i)),si}var oi,Oc;function uy(){if(Oc)return oi;Oc=1;const e=ft();return oi=(r,n,i)=>e(n,r,i),oi}var ai,Ic;function ly(){if(Ic)return ai;Ic=1;const e=ft();return ai=(r,n)=>e(r,n,!0),ai}var ci,Pc;function xa(){if(Pc)return ci;Pc=1;const e=We();return ci=(r,n,i)=>{const o=new e(r,i),s=new e(n,i);return o.compare(s)||o.compareBuild(s)},ci}var ui,Tc;function fy(){if(Tc)return ui;Tc=1;const e=xa();return ui=(r,n)=>r.sort((i,o)=>e(i,o,n)),ui}var li,xc;function dy(){if(xc)return li;xc=1;const e=xa();return li=(r,n)=>r.sort((i,o)=>e(o,i,n)),li}var fi,Ac;function Nn(){if(Ac)return fi;Ac=1;const e=ft();return fi=(r,n,i)=>e(r,n,i)>0,fi}var di,Cc;function Aa(){if(Cc)return di;Cc=1;const e=ft();return di=(r,n,i)=>e(r,n,i)<0,di}var pi,Nc;function Op(){if(Nc)return pi;Nc=1;const e=ft();return pi=(r,n,i)=>e(r,n,i)===0,pi}var hi,Lc;function Ip(){if(Lc)return hi;Lc=1;const e=ft();return hi=(r,n,i)=>e(r,n,i)!==0,hi}var mi,Dc;function Ca(){if(Dc)return mi;Dc=1;const e=ft();return mi=(r,n,i)=>e(r,n,i)>=0,mi}var yi,kc;function Ln(){if(kc)return yi;kc=1;const e=ft();return yi=(r,n,i)=>e(r,n,i)<=0,yi}var vi,Fc;function Pp(){if(Fc)return vi;Fc=1;const e=Op(),t=Ip(),r=Nn(),n=Ca(),i=Aa(),o=Ln();return vi=(l,u,a,c)=>{switch(u){case"===":return typeof l=="object"&&(l=l.version),typeof a=="object"&&(a=a.version),l===a;case"!==":return typeof l=="object"&&(l=l.version),typeof a=="object"&&(a=a.version),l!==a;case"":case"=":case"==":return e(l,a,c);case"!=":return t(l,a,c);case">":return r(l,a,c);case">=":return n(l,a,c);case"<":return i(l,a,c);case"<=":return o(l,a,c);default:throw new TypeError(`Invalid operator: ${u}`)}},vi}var wi,qc;function Tp(){if(qc)return wi;qc=1;const e=We(),t=vr(),{safeRe:r,t:n}=jr();return wi=(o,s)=>{if(o instanceof e)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;s=s||{};let l=null;if(!s.rtl)l=o.match(s.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const w=s.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let E;for(;(E=w.exec(o))&&(!l||l.index+l[0].length!==o.length);)(!l||E.index+E[0].length!==l.index+l[0].length)&&(l=E),w.lastIndex=E.index+E[1].length+E[2].length;w.lastIndex=-1}if(l===null)return null;const u=l[2],a=l[3]||"0",c=l[4]||"0",m=s.includePrerelease&&l[5]?`-${l[5]}`:"",p=s.includePrerelease&&l[6]?`+${l[6]}`:"";return t(`${u}.${a}.${c}${m}${p}`,s)},wi}var gi,Uc;function py(){if(Uc)return gi;Uc=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const o=this.map.keys().next().value;this.delete(o)}this.map.set(r,n)}return this}}return gi=e,gi}var _i,jc;function _t(){if(jc)return _i;jc=1;const e=/\s+/g;class t{constructor(T,F){if(F=i(F),T instanceof t)return T.loose===!!F.loose&&T.includePrerelease===!!F.includePrerelease?T:new t(T.raw,F);if(T instanceof o)return this.raw=T.value,this.set=[[T]],this.formatted=void 0,this;if(this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease,this.raw=T.trim().replace(e," "),this.set=this.raw.split("||").map(U=>this.parseRange(U.trim())).filter(U=>U.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const U=this.set[0];if(this.set=this.set.filter(k=>!d(k[0])),this.set.length===0)this.set=[U];else if(this.set.length>1){for(const k of this.set)if(k.length===1&&f(k[0])){this.set=[k];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let T=0;T<this.set.length;T++){T>0&&(this.formatted+="||");const F=this.set[T];for(let U=0;U<F.length;U++)U>0&&(this.formatted+=" "),this.formatted+=F[U].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(T){const U=((this.options.includePrerelease&&w)|(this.options.loose&&E))+":"+T,k=n.get(U);if(k)return k;const G=this.options.loose,C=G?u[a.HYPHENRANGELOOSE]:u[a.HYPHENRANGE];T=T.replace(C,K(this.options.includePrerelease)),s("hyphen replace",T),T=T.replace(u[a.COMPARATORTRIM],c),s("comparator trim",T),T=T.replace(u[a.TILDETRIM],m),s("tilde trim",T),T=T.replace(u[a.CARETTRIM],p),s("caret trim",T);let H=T.split(" ").map(X=>y(X,this.options)).join(" ").split(/\s+/).map(X=>M(X,this.options));G&&(H=H.filter(X=>(s("loose invalid filter",X,this.options),!!X.match(u[a.COMPARATORLOOSE])))),s("range list",H);const W=new Map,re=H.map(X=>new o(X,this.options));for(const X of re){if(d(X))return[X];W.set(X.value,X)}W.size>1&&W.has("")&&W.delete("");const ce=[...W.values()];return n.set(U,ce),ce}intersects(T,F){if(!(T instanceof t))throw new TypeError("a Range is required");return this.set.some(U=>h(U,F)&&T.set.some(k=>h(k,F)&&U.every(G=>k.every(C=>G.intersects(C,F)))))}test(T){if(!T)return!1;if(typeof T=="string")try{T=new l(T,this.options)}catch{return!1}for(let F=0;F<this.set.length;F++)if(Q(this.set[F],T,this.options))return!0;return!1}}_i=t;const r=py(),n=new r,i=Ta(),o=Dn(),s=Cn(),l=We(),{safeRe:u,t:a,comparatorTrimReplace:c,tildeTrimReplace:m,caretTrimReplace:p}=jr(),{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:E}=An(),d=x=>x.value==="<0.0.0-0",f=x=>x.value==="",h=(x,T)=>{let F=!0;const U=x.slice();let k=U.pop();for(;F&&U.length;)F=U.every(G=>k.intersects(G,T)),k=U.pop();return F},y=(x,T)=>(s("comp",x,T),x=b(x,T),s("caret",x),x=S(x,T),s("tildes",x),x=$(x,T),s("xrange",x),x=A(x,T),s("stars",x),x),v=x=>!x||x.toLowerCase()==="x"||x==="*",S=(x,T)=>x.trim().split(/\s+/).map(F=>_(F,T)).join(" "),_=(x,T)=>{const F=T.loose?u[a.TILDELOOSE]:u[a.TILDE];return x.replace(F,(U,k,G,C,H)=>{s("tilde",x,U,k,G,C,H);let W;return v(k)?W="":v(G)?W=`>=${k}.0.0 <${+k+1}.0.0-0`:v(C)?W=`>=${k}.${G}.0 <${k}.${+G+1}.0-0`:H?(s("replaceTilde pr",H),W=`>=${k}.${G}.${C}-${H} <${k}.${+G+1}.0-0`):W=`>=${k}.${G}.${C} <${k}.${+G+1}.0-0`,s("tilde return",W),W})},b=(x,T)=>x.trim().split(/\s+/).map(F=>g(F,T)).join(" "),g=(x,T)=>{s("caret",x,T);const F=T.loose?u[a.CARETLOOSE]:u[a.CARET],U=T.includePrerelease?"-0":"";return x.replace(F,(k,G,C,H,W)=>{s("caret",x,k,G,C,H,W);let re;return v(G)?re="":v(C)?re=`>=${G}.0.0${U} <${+G+1}.0.0-0`:v(H)?G==="0"?re=`>=${G}.${C}.0${U} <${G}.${+C+1}.0-0`:re=`>=${G}.${C}.0${U} <${+G+1}.0.0-0`:W?(s("replaceCaret pr",W),G==="0"?C==="0"?re=`>=${G}.${C}.${H}-${W} <${G}.${C}.${+H+1}-0`:re=`>=${G}.${C}.${H}-${W} <${G}.${+C+1}.0-0`:re=`>=${G}.${C}.${H}-${W} <${+G+1}.0.0-0`):(s("no pr"),G==="0"?C==="0"?re=`>=${G}.${C}.${H}${U} <${G}.${C}.${+H+1}-0`:re=`>=${G}.${C}.${H}${U} <${G}.${+C+1}.0-0`:re=`>=${G}.${C}.${H} <${+G+1}.0.0-0`),s("caret return",re),re})},$=(x,T)=>(s("replaceXRanges",x,T),x.split(/\s+/).map(F=>I(F,T)).join(" ")),I=(x,T)=>{x=x.trim();const F=T.loose?u[a.XRANGELOOSE]:u[a.XRANGE];return x.replace(F,(U,k,G,C,H,W)=>{s("xRange",x,U,k,G,C,H,W);const re=v(G),ce=re||v(C),X=ce||v(H),ie=X;return k==="="&&ie&&(k=""),W=T.includePrerelease?"-0":"",re?k===">"||k==="<"?U="<0.0.0-0":U="*":k&&ie?(ce&&(C=0),H=0,k===">"?(k=">=",ce?(G=+G+1,C=0,H=0):(C=+C+1,H=0)):k==="<="&&(k="<",ce?G=+G+1:C=+C+1),k==="<"&&(W="-0"),U=`${k+G}.${C}.${H}${W}`):ce?U=`>=${G}.0.0${W} <${+G+1}.0.0-0`:X&&(U=`>=${G}.${C}.0${W} <${G}.${+C+1}.0-0`),s("xRange return",U),U})},A=(x,T)=>(s("replaceStars",x,T),x.trim().replace(u[a.STAR],"")),M=(x,T)=>(s("replaceGTE0",x,T),x.trim().replace(u[T.includePrerelease?a.GTE0PRE:a.GTE0],"")),K=x=>(T,F,U,k,G,C,H,W,re,ce,X,ie)=>(v(U)?F="":v(k)?F=`>=${U}.0.0${x?"-0":""}`:v(G)?F=`>=${U}.${k}.0${x?"-0":""}`:C?F=`>=${F}`:F=`>=${F}${x?"-0":""}`,v(re)?W="":v(ce)?W=`<${+re+1}.0.0-0`:v(X)?W=`<${re}.${+ce+1}.0-0`:ie?W=`<=${re}.${ce}.${X}-${ie}`:x?W=`<${re}.${ce}.${+X+1}-0`:W=`<=${W}`,`${F} ${W}`.trim()),Q=(x,T,F)=>{for(let U=0;U<x.length;U++)if(!x[U].test(T))return!1;if(T.prerelease.length&&!F.includePrerelease){for(let U=0;U<x.length;U++)if(s(x[U].semver),x[U].semver!==o.ANY&&x[U].semver.prerelease.length>0){const k=x[U].semver;if(k.major===T.major&&k.minor===T.minor&&k.patch===T.patch)return!0}return!1}return!0};return _i}var Ei,Mc;function Dn(){if(Mc)return Ei;Mc=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,m){if(m=r(m),c instanceof t){if(c.loose===!!m.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),s("comparator",c,m),this.options=m,this.loose=!!m.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(c){const m=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],p=c.match(m);if(!p)throw new TypeError(`Invalid comparator: ${c}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new l(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(s("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new l(c,this.options)}catch{return!1}return o(c,this.operator,this.semver,this.options)}intersects(c,m){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(c.value,m).test(this.value):c.operator===""?c.value===""?!0:new u(this.value,m).test(c.semver):(m=r(m),m.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||o(this.semver,"<",c.semver,m)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||o(this.semver,">",c.semver,m)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Ei=t;const r=Ta(),{safeRe:n,t:i}=jr(),o=Pp(),s=Cn(),l=We(),u=_t();return Ei}var Si,Gc;function Mr(){if(Gc)return Si;Gc=1;const e=_t();return Si=(r,n,i)=>{try{n=new e(n,i)}catch{return!1}return n.test(r)},Si}var bi,Vc;function hy(){if(Vc)return bi;Vc=1;const e=_t();return bi=(r,n)=>new e(r,n).set.map(i=>i.map(o=>o.value).join(" ").trim().split(" ")),bi}var Ri,Bc;function my(){if(Bc)return Ri;Bc=1;const e=We(),t=_t();return Ri=(n,i,o)=>{let s=null,l=null,u=null;try{u=new t(i,o)}catch{return null}return n.forEach(a=>{u.test(a)&&(!s||l.compare(a)===-1)&&(s=a,l=new e(s,o))}),s},Ri}var $i,Hc;function yy(){if(Hc)return $i;Hc=1;const e=We(),t=_t();return $i=(n,i,o)=>{let s=null,l=null,u=null;try{u=new t(i,o)}catch{return null}return n.forEach(a=>{u.test(a)&&(!s||l.compare(a)===1)&&(s=a,l=new e(s,o))}),s},$i}var Oi,zc;function vy(){if(zc)return Oi;zc=1;const e=We(),t=_t(),r=Nn();return Oi=(i,o)=>{i=new t(i,o);let s=new e("0.0.0");if(i.test(s)||(s=new e("0.0.0-0"),i.test(s)))return s;s=null;for(let l=0;l<i.set.length;++l){const u=i.set[l];let a=null;u.forEach(c=>{const m=new e(c.semver.version);switch(c.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!a||r(m,a))&&(a=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),a&&(!s||r(s,a))&&(s=a)}return s&&i.test(s)?s:null},Oi}var Ii,Wc;function wy(){if(Wc)return Ii;Wc=1;const e=_t();return Ii=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},Ii}var Pi,Xc;function Na(){if(Xc)return Pi;Xc=1;const e=We(),t=Dn(),{ANY:r}=t,n=_t(),i=Mr(),o=Nn(),s=Aa(),l=Ln(),u=Ca();return Pi=(c,m,p,w)=>{c=new e(c,w),m=new n(m,w);let E,d,f,h,y;switch(p){case">":E=o,d=l,f=s,h=">",y=">=";break;case"<":E=s,d=u,f=o,h="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(c,m,w))return!1;for(let v=0;v<m.set.length;++v){const S=m.set[v];let _=null,b=null;if(S.forEach(g=>{g.semver===r&&(g=new t(">=0.0.0")),_=_||g,b=b||g,E(g.semver,_.semver,w)?_=g:f(g.semver,b.semver,w)&&(b=g)}),_.operator===h||_.operator===y||(!b.operator||b.operator===h)&&d(c,b.semver))return!1;if(b.operator===y&&f(c,b.semver))return!1}return!0},Pi}var Ti,Kc;function gy(){if(Kc)return Ti;Kc=1;const e=Na();return Ti=(r,n,i)=>e(r,n,">",i),Ti}var xi,Yc;function _y(){if(Yc)return xi;Yc=1;const e=Na();return xi=(r,n,i)=>e(r,n,"<",i),xi}var Ai,Jc;function Ey(){if(Jc)return Ai;Jc=1;const e=_t();return Ai=(r,n,i)=>(r=new e(r,i),n=new e(n,i),r.intersects(n,i)),Ai}var Ci,Qc;function Sy(){if(Qc)return Ci;Qc=1;const e=Mr(),t=ft();return Ci=(r,n,i)=>{const o=[];let s=null,l=null;const u=r.sort((p,w)=>t(p,w,i));for(const p of u)e(p,n,i)?(l=p,s||(s=p)):(l&&o.push([s,l]),l=null,s=null);s&&o.push([s,null]);const a=[];for(const[p,w]of o)p===w?a.push(p):!w&&p===u[0]?a.push("*"):w?p===u[0]?a.push(`<=${w}`):a.push(`${p} - ${w}`):a.push(`>=${p}`);const c=a.join(" || "),m=typeof n.raw=="string"?n.raw:String(n);return c.length<m.length?c:n},Ci}var Ni,Zc;function by(){if(Zc)return Ni;Zc=1;const e=_t(),t=Dn(),{ANY:r}=t,n=Mr(),i=ft(),o=(m,p,w={})=>{if(m===p)return!0;m=new e(m,w),p=new e(p,w);let E=!1;e:for(const d of m.set){for(const f of p.set){const h=u(d,f,w);if(E=E||h!==null,h)continue e}if(E)return!1}return!0},s=[new t(">=0.0.0-0")],l=[new t(">=0.0.0")],u=(m,p,w)=>{if(m===p)return!0;if(m.length===1&&m[0].semver===r){if(p.length===1&&p[0].semver===r)return!0;w.includePrerelease?m=s:m=l}if(p.length===1&&p[0].semver===r){if(w.includePrerelease)return!0;p=l}const E=new Set;let d,f;for(const $ of m)$.operator===">"||$.operator===">="?d=a(d,$,w):$.operator==="<"||$.operator==="<="?f=c(f,$,w):E.add($.semver);if(E.size>1)return null;let h;if(d&&f){if(h=i(d.semver,f.semver,w),h>0)return null;if(h===0&&(d.operator!==">="||f.operator!=="<="))return null}for(const $ of E){if(d&&!n($,String(d),w)||f&&!n($,String(f),w))return null;for(const I of p)if(!n($,String(I),w))return!1;return!0}let y,v,S,_,b=f&&!w.includePrerelease&&f.semver.prerelease.length?f.semver:!1,g=d&&!w.includePrerelease&&d.semver.prerelease.length?d.semver:!1;b&&b.prerelease.length===1&&f.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(const $ of p){if(_=_||$.operator===">"||$.operator===">=",S=S||$.operator==="<"||$.operator==="<=",d){if(g&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===g.major&&$.semver.minor===g.minor&&$.semver.patch===g.patch&&(g=!1),$.operator===">"||$.operator===">="){if(y=a(d,$,w),y===$&&y!==d)return!1}else if(d.operator===">="&&!n(d.semver,String($),w))return!1}if(f){if(b&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===b.major&&$.semver.minor===b.minor&&$.semver.patch===b.patch&&(b=!1),$.operator==="<"||$.operator==="<="){if(v=c(f,$,w),v===$&&v!==f)return!1}else if(f.operator==="<="&&!n(f.semver,String($),w))return!1}if(!$.operator&&(f||d)&&h!==0)return!1}return!(d&&S&&!f&&h!==0||f&&_&&!d&&h!==0||g||b)},a=(m,p,w)=>{if(!m)return p;const E=i(m.semver,p.semver,w);return E>0?m:E<0||p.operator===">"&&m.operator===">="?p:m},c=(m,p,w)=>{if(!m)return p;const E=i(m.semver,p.semver,w);return E<0?m:E>0||p.operator==="<"&&m.operator==="<="?p:m};return Ni=o,Ni}var Li,eu;function Ry(){if(eu)return Li;eu=1;const e=jr(),t=An(),r=We(),n=bp(),i=vr(),o=Rp(),s=ny(),l=iy(),u=sy(),a=$p(),c=oy(),m=ay(),p=cy(),w=ft(),E=uy(),d=ly(),f=xa(),h=fy(),y=dy(),v=Nn(),S=Aa(),_=Op(),b=Ip(),g=Ca(),$=Ln(),I=Pp(),A=Tp(),M=Dn(),K=_t(),Q=Mr(),x=hy(),T=my(),F=yy(),U=vy(),k=wy(),G=Na(),C=gy(),H=_y(),W=Ey(),re=Sy(),ce=by();return Li={parse:i,valid:o,clean:s,inc:l,diff:u,major:a,minor:c,patch:m,prerelease:p,compare:w,rcompare:E,compareLoose:d,compareBuild:f,sort:h,rsort:y,gt:v,lt:S,eq:_,neq:b,gte:g,lte:$,cmp:I,coerce:A,Comparator:M,Range:K,satisfies:Q,toComparators:x,maxSatisfying:T,minSatisfying:F,minVersion:U,validRange:k,outside:G,gtr:C,ltr:H,intersects:W,simplifyRange:re,subset:ce,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},Li}var Di,tu;function $y(){if(tu)return Di;tu=1;var e=up,t=Ry(),r=it,n=ue,i=je,o=Pa;function s(I,A,M,K){function Q(x){return x instanceof M?x:new M(function(T){T(x)})}return new(M||(M=Promise))(function(x,T){function F(G){try{k(K.next(G))}catch(C){T(C)}}function U(G){try{k(K.throw(G))}catch(C){T(C)}}function k(G){G.done?x(G.value):Q(G.value).then(F,U)}k((K=K.apply(I,[])).next())})}function l(I,A){var M={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},K,Q,x,T;return T={next:F(0),throw:F(1),return:F(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function F(k){return function(G){return U([k,G])}}function U(k){if(K)throw new TypeError("Generator is already executing.");for(;T&&(T=0,k[0]&&(M=0)),M;)try{if(K=1,Q&&(x=k[0]&2?Q.return:k[0]?Q.throw||((x=Q.return)&&x.call(Q),0):Q.next)&&!(x=x.call(Q,k[1])).done)return x;switch(Q=0,x&&(k=[k[0]&2,x.value]),k[0]){case 0:case 1:x=k;break;case 4:return M.label++,{value:k[1],done:!1};case 5:M.label++,Q=k[1],k=[0];continue;case 7:k=M.ops.pop(),M.trys.pop();continue;default:if(x=M.trys,!(x=x.length>0&&x[x.length-1])&&(k[0]===6||k[0]===2)){M=0;continue}if(k[0]===3&&(!x||k[1]>x[0]&&k[1]<x[3])){M.label=k[1];break}if(k[0]===6&&M.label<x[1]){M.label=x[1],x=k;break}if(x&&M.label<x[2]){M.label=x[2],M.ops.push(k);break}x[2]&&M.ops.pop(),M.trys.pop();continue}k=A.call(I,M)}catch(G){k=[6,G],Q=0}finally{K=x=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}}var u=e.env.npm_package_json,a=e.env.npm_config_user_agent,c=!!(a&&a.startsWith("npm")),m=!!(u&&u.endsWith("package.json")),p=c||m,w=!!(a&&a.startsWith("yarn")),E=p||w,d=r.homedir(),f=process.env.XDG_CONFIG_HOME||n.join(d,".config","simple-update-notifier"),h=function(I){return n.join(f,"".concat(I.replace("@","").replace("/","__"),".json"))},y=function(){i.existsSync(f)||i.mkdirSync(f,{recursive:!0})},v=function(I){var A=h(I);try{if(!i.existsSync(A))return;var M=JSON.parse(i.readFileSync(A,"utf8"));return M.lastUpdateCheck}catch{return}},S=function(I){var A=h(I);i.writeFileSync(A,JSON.stringify({lastUpdateCheck:new Date().getTime()}))},_=function(I,A){return s(void 0,void 0,void 0,function(){var M;return l(this,function(K){return M="https://registry.npmjs.org/-/package/".concat(I,"/dist-tags"),[2,new Promise(function(Q,x){o.get(M,function(T){var F="";T.on("data",function(U){return F+=U}),T.on("end",function(){try{var U=JSON.parse(F),k=U[A];k||x(new Error("Error getting version")),Q(k)}catch{x(new Error("Could not parse version response"))}})}).on("error",function(T){return x(T)})})]})})},b=function(I){var A=I.pkg,M=I.updateCheckInterval,K=M===void 0?1e3*60*60*24:M,Q=I.distTag,x=Q===void 0?"latest":Q,T=I.alwaysRun,F=I.debug;return s(void 0,void 0,void 0,function(){var U,k;return l(this,function(G){switch(G.label){case 0:return y(),U=v(A.name),T||!U||U<new Date().getTime()-K?[4,_(A.name,x)]:[3,2];case 1:return k=G.sent(),S(A.name),t.gt(k,A.version)?[2,k]:(F&&console.error("Latest version (".concat(k,") not newer than current version (").concat(A.version,")")),[3,3]);case 2:F&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(K,"ms but only ").concat(new Date().getTime()-U,"ms since last check.")),G.label=3;case 3:return[2,!1]}})})},g=function(I){for(var A=I.split(` `),M=Math.max.apply(Math,A.map(function(F){return F.length})),K=["┌".concat("─".repeat(M+2),"┐")],Q=0,x=A;Q<x.length;Q++){var T=x[Q];K.push("│ ".concat(T.padEnd(M)," │"))}return K.push("└".concat("─".repeat(M+2),"┘")),K.join(` `)},$=function(I){return s(void 0,void 0,void 0,function(){var A,M;return l(this,function(K){switch(K.label){case 0:if(!I.alwaysRun&&(!process.stdout.isTTY||E&&!I.shouldNotifyInNpmScript))return I.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];K.label=1;case 1:return K.trys.push([1,3,,4]),[4,b(I)];case 2:return A=K.sent(),A&&console.error(g("New version of ".concat(I.pkg.name,` available! Current Version: `).concat(I.pkg.version,` Latest Version: `).concat(A))),[3,4];case 3:return M=K.sent(),I.debug&&M instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",M),[3,4];case 4:return[2]}})})};return Di=$,Di}var Oy=$y();const Iy=$e(Oy),Py="setup-cpp",Ty="1.7.2",La={name:Py,version:Ty};var dt={},Je={},Gt={},ru;function Da(){if(ru)return Gt;ru=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.toCommandProperties=Gt.toCommandValue=void 0;function e(r){return r==null?"":typeof r=="string"||r instanceof String?r:JSON.stringify(r)}Gt.toCommandValue=e;function t(r){return Object.keys(r).length?{title:r.title,file:r.file,line:r.startLine,endLine:r.endLine,col:r.startColumn,endColumn:r.endColumn}:{}}return Gt.toCommandProperties=t,Gt}var nu;function xy(){if(nu)return Je;nu=1;var e=Je&&Je.__createBinding||(Object.create?function(m,p,w,E){E===void 0&&(E=w);var d=Object.getOwnPropertyDescriptor(p,w);(!d||("get"in d?!p.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return p[w]}}),Object.defineProperty(m,E,d)}:function(m,p,w,E){E===void 0&&(E=w),m[E]=p[w]}),t=Je&&Je.__setModuleDefault||(Object.create?function(m,p){Object.defineProperty(m,"default",{enumerable:!0,value:p})}:function(m,p){m.default=p}),r=Je&&Je.__importStar||function(m){if(m&&m.__esModule)return m;var p={};if(m!=null)for(var w in m)w!=="default"&&Object.prototype.hasOwnProperty.call(m,w)&&e(p,m,w);return t(p,m),p};Object.defineProperty(Je,"__esModule",{value:!0}),Je.issue=Je.issueCommand=void 0;const n=r(it),i=Da();function o(m,p,w){const E=new u(m,p,w);process.stdout.write(E.toString()+n.EOL)}Je.issueCommand=o;function s(m,p=""){o(m,{},p)}Je.issue=s;const l="::";class u{constructor(p,w,E){p||(p="missing.command"),this.command=p,this.properties=w,this.message=E}toString(){let p=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){p+=" ";let w=!0;for(const E in this.properties)if(this.properties.hasOwnProperty(E)){const d=this.properties[E];d&&(w?w=!1:p+=",",p+=`${E}=${c(d)}`)}}return p+=`${l}${a(this.message)}`,p}}function a(m){return(0,i.toCommandValue)(m).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function c(m){return(0,i.toCommandValue)(m).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}return Je}var Qe={},iu;function Ay(){if(iu)return Qe;iu=1;var e=Qe&&Qe.__createBinding||(Object.create?function(a,c,m,p){p===void 0&&(p=m);var w=Object.getOwnPropertyDescriptor(c,m);(!w||("get"in w?!c.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return c[m]}}),Object.defineProperty(a,p,w)}:function(a,c,m,p){p===void 0&&(p=m),a[p]=c[m]}),t=Qe&&Qe.__setModuleDefault||(Object.create?function(a,c){Object.defineProperty(a,"default",{enumerable:!0,value:c})}:function(a,c){a.default=c}),r=Qe&&Qe.__importStar||function(a){if(a&&a.__esModule)return a;var c={};if(a!=null)for(var m in a)m!=="default"&&Object.prototype.hasOwnProperty.call(a,m)&&e(c,a,m);return t(c,a),c};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.prepareKeyValueMessage=Qe.issueFileCommand=void 0;const n=r(mp),i=r(je),o=r(it),s=Da();function l(a,c){const m=process.env[`GITHUB_${a}`];if(!m)throw new Error(`Unable to find environment variable for file command ${a}`);if(!i.existsSync(m))throw new Error(`Missing file at path: ${m}`);i.appendFileSync(m,`${(0,s.toCommandValue)(c)}${o.EOL}`,{encoding:"utf8"})}Qe.issueFileCommand=l;function u(a,c){const m=`ghadelimiter_${n.randomUUID()}`,p=(0,s.toCommandValue)(c);if(a.includes(m))throw new Error(`Unexpected input: name should not contain the delimiter "${m}"`);if(p.includes(m))throw new Error(`Unexpected input: value should not contain the delimiter "${m}"`);return`${a}<<${m}${o.EOL}${p}${o.EOL}${m}`}return Qe.prepareKeyValueMessage=u,Qe}var Vt={};function Ea(e){const t=e.protocol==="https:";if(Cy(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 su(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new su(`http://${r}`)}else return}function Cy(e){if(!e.hostname)return!1;const t=e.hostname;if(Ny(t))return!0;const r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;e.port?n=Number(e.port):e.protocol==="http:"?n=80:e.protocol==="https:"&&(n=443);const i=[e.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(const o of r.split(",").map(s=>s.trim().toUpperCase()).filter(s=>s))if(o==="*"||i.some(s=>s===o||s.endsWith(`.${o}`)||o.startsWith(".")&&s.endsWith(`${o}`)))return!0;return!1}function Ny(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class su extends URL{_decodedUsername;_decodedPassword;constructor(t,r){super(t,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var Bt={},ou;function Ly(){if(ou)return Bt;ou=1;var e=qm,t=yp,r=Pa,n=Tn,i=xn;Bt.httpOverHttp=o,Bt.httpsOverHttp=s,Bt.httpOverHttps=l,Bt.httpsOverHttps=u;function o(E){var d=new a(E);return d.request=t.request,d}function s(E){var d=new a(E);return d.request=t.request,d.createSocket=c,d.defaultPort=443,d}function l(E){var d=new a(E);return d.request=r.request,d}function u(E){var d=new a(E);return d.request=r.request,d.createSocket=c,d.defaultPort=443,d}function a(E){var d=this;d.options=E||{},d.proxyOptions=d.options.proxy||{},d.maxSockets=d.options.maxSockets||t.Agent.defaultMaxSockets,d.requests=[],d.sockets=[],d.on("free",function(h,y,v,S){for(var _=m(y,v,S),b=0,g=d.requests.length;b<g;++b){var $=d.requests[b];if($.host===_.host&&$.port===_.port){d.requests.splice(b,1),$.request.onSocket(h);return}}h.destroy(),d.removeSocket(h)})}i.inherits(a,n.EventEmitter),a.prototype.addRequest=function(d,f,h,y){var v=this,S=p({request:d},v.options,m(f,h,y));if(v.sockets.length>=this.maxSockets){v.requests.push(S);return}v.createSocket(S,function(_){_.on("free",b),_.on("close",g),_.on("agentRemove",g),d.onSocket(_);function b(){v.emit("free",_,S)}function g($){v.removeSocket(_),_.removeListener("free",b),_.removeListener("close",g),_.removeListener("agentRemove",g)}})},a.prototype.createSocket=function(d,f){var h=this,y={};h.sockets.push(y);var v=p({},h.proxyOptions,{method:"CONNECT",path:d.host+":"+d.port,agent:!1,headers:{host:d.host+":"+d.port}});d.localAddress&&(v.localAddress=d.localAddress),v.proxyAuth&&(v.headers=v.headers||{},v.headers["Proxy-Authorization"]="Basic "+new Buffer(v.proxyAuth).toString("base64")),w("making CONNECT request");var S=h.request(v);S.useChunkedEncodingByDefault=!1,S.once("response",_),S.once("upgrade",b),S.once("connect",g),S.once("error",$),S.end();function _(I){I.upgrade=!0}function b(I,A,M){process.nextTick(function(){g(I,A,M)})}function g(I,A,M){if(S.removeAllListeners(),A.removeAllListeners(),I.statusCode!==200){w("tunneling socket could not be established, statusCode=%d",I.statusCode),A.destroy();var K=new Error("tunneling socket could not be established, statusCode="+I.statusCode);K.code="ECONNRESET",d.request.emit("error",K),h.removeSocket(y);return}if(M.length>0){w("got illegal response body from proxy"),A.destroy();var K=new Error("got illegal response body from proxy");K.code="ECONNRESET",d.request.emit("error",K),h.removeSocket(y);return}return w("tunneling connection has established"),h.sockets[h.sockets.indexOf(y)]=A,f(A)}function $(I){S.removeAllListeners(),w(`tunneling socket could not be established, cause=%s `,I.message,I.stack);var A=new Error("tunneling socket could not be established, cause="+I.message);A.code="ECONNRESET",d.request.emit("error",A),h.removeSocket(y)}},a.prototype.removeSocket=function(d){var f=this.sockets.indexOf(d);if(f!==-1){this.sockets.splice(f,1);var h=this.requests.shift();h&&this.createSocket(h,function(y){h.request.onSocket(y)})}};function c(E,d){var f=this;a.prototype.createSocket.call(f,E,function(h){var y=E.request.getHeader("host"),v=p({},f.options,{socket:h,servername:y?y.replace(/:.*$/,""):E.host}),S=e.connect(0,v);f.sockets[f.sockets.indexOf(h)]=S,d(S)})}function m(E,d,f){return typeof E=="string"?{host:E,port:d,localAddress:f}:E}function p(E){for(var d=1,f=arguments.length;d<f;++d){var h=arguments[d];if(typeof h=="object")for(var y=Object.keys(h),v=0,S=y.length;v<S;++v){var _=y[v];h[_]!==void 0&&(E[_]=h[_])}}return E}var w;return process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?w=function(){var E=Array.prototype.slice.call(arguments);typeof E[0]=="string"?E[0]="TUNNEL: "+E[0]:E.unshift("TUNNEL:"),console.error.apply(console,E)}:w=function(){},Bt.debug=w,Bt}var ki,au;function Dy(){return au||(au=1,ki=Ly()),ki}var zr=Dy(),tt;(function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout"})(tt||(tt={}));var qe;(function(e){e.Accept="accept",e.ContentType="content-type"})(qe||(qe={}));var Ot;(function(e){e.ApplicationJson="application/json"})(Ot||(Ot={}));function ky(e){const t=Ea(new URL(e));return t?t.href:""}const Fy=[tt.MovedPermanently,tt.ResourceMoved,tt.SeeOther,tt.TemporaryRedirect,tt.PermanentRedirect],qy=[tt.BadGateway,tt.ServiceUnavailable,tt.GatewayTimeout],Uy=["OPTIONS","GET","DELETE","HEAD"],jy=10,My=5;class kn extends Error{constructor(t,r){super(t),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,kn.prototype)}statusCode;result}class xp{constructor(t){this.message=t}message;async readBody(){return new Promise(async t=>{let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{t(r.toString())})})}async readBodyBuffer(){return new Promise(async t=>{const r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{t(Buffer.concat(r))})})}}function Gy(e){return new URL(e).protocol==="https:"}class Vy{userAgent;handlers;requestOptions;_ignoreSslError=!1;_socketTimeout;_allowRedirects=!0;_allowRedirectDowngrade=!1;_maxRedirects=50;_allowRetries=!1;_maxRetries=1;_agent;_proxyAgent;_proxyAgentDispatcher;_keepAlive=!1;_disposed=!1;constructor(t,r,n){this.userAgent=t,this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}async options(t,r){return this.request("OPTIONS",t,null,r||{})}async get(t,r){return this.request("GET",t,null,r||{})}async del(t,r){return this.request("DELETE",t,null,r||{})}async post(t,r,n){return this.request("POST",t,r,n||{})}async patch(t,r,n){return this.request("PATCH",t,r,n||{})}async put(t,r,n){return this.request("PUT",t,r,n||{})}async head(t,r){return this.request("HEAD",t,null,r||{})}async sendStream(t,r,n,i){return this.request(t,r,n,i)}async getJson(t,r={}){r[qe.Accept]=this._getExistingOrDefaultHeader(r,qe.Accept,Ot.ApplicationJson);const n=await this.get(t,r);return this._processResponse(n,this.requestOptions)}async postJson(t,r,n={}){const i=JSON.stringify(r,null,2);n[qe.Accept]=this._getExistingOrDefaultHeader(n,qe.Accept,Ot.ApplicationJson),n[qe.ContentType]=this._getExistingOrDefaultHeader(n,qe.ContentType,Ot.ApplicationJson);const o=await this.post(t,i,n);return this._processResponse(o,this.requestOptions)}async putJson(t,r,n={}){const i=JSON.stringify(r,null,2);n[qe.Accept]=this._getExistingOrDefaultHeader(n,qe.Accept,Ot.ApplicationJson),n[qe.ContentType]=this._getExistingOrDefaultHeader(n,qe.ContentType,Ot.ApplicationJson);const o=await this.put(t,i,n);return this._processResponse(o,this.requestOptions)}async patchJson(t,r,n={}){const i=JSON.stringify(r,null,2);n[qe.Accept]=this._getExistingOrDefaultHeader(n,qe.Accept,Ot.ApplicationJson),n[qe.ContentType]=this._getExistingOrDefaultHeader(n,qe.ContentType,Ot.ApplicationJson);const o=await this.patch(t,i,n);return this._processResponse(o,this.requestOptions)}async request(t,r,n,i){if(this._disposed)throw new Error("Client has already been disposed.");const o=new URL(r);let s=this._prepareRequest(t,o,i);const l=this._allowRetries&&Uy.includes(t)?this._maxRetries+1:1;let u=0,a;do{if(a=await this.requestRaw(s,n),a&&a.message&&a.message.statusCode===tt.Unauthorized){let m;for(const p of this.handlers)if(p.canHandleAuthentication(a)){m=p;break}return m?m.handleAuthentication(this,s,n):a}let c=this._maxRedirects;for(;a.message.statusCode&&Fy.includes(a.message.statusCode)&&this._allowRedirects&&c>0;){const m=a.message.headers.location;if(!m)break;const p=new URL(m);if(o.protocol==="https:"&&o.protocol!==p.protocol&&!this._allowRedirectDowngrade)throw new 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(),p.hostname!==o.hostname)for(const w in i)w.toLowerCase()==="authorization"&&delete i[w];s=this._prepareRequest(t,p,i),a=await this.requestRaw(s,n),c--}if(!a.message.statusCode||!qy.includes(a.message.statusCode))return a;u+=1,u<l&&(await a.readBody(),await this._performExponentialBackoff(u))}while(u<l);return a}dispose(){this._agent&&this._agent.destroy(),this._disposed=!0}async requestRaw(t,r){return new Promise((n,i)=>{function o(s,l){s?i(s):l?n(l):i(new Error("Unknown error"))}this.requestRawWithCallback(t,r,o)})}requestRawWithCallback(t,r,n){typeof r=="string"&&(t.options.headers||(t.options.headers={}),t.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let i=!1;function o(u,a){i||(i=!0,n(u,a))}const s=t.httpModule.request(t.options,u=>{const a=new xp(u);o(void 0,a)});let l;s.on("socket",u=>{l=u}),s.setTimeout(this._socketTimeout||3*6e4,()=>{l&&l.end(),o(new Error(`Request timeout: ${t.options.path}`))}),s.on("error",function(u){o(u)}),r&&typeof r=="string"&&s.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){s.end()}),r.pipe(s)):s.end()}getAgent(t){const r=new URL(t);return this._getAgent(r)}async getAgentDispatcher(t){const r=new URL(t),n=Ea(r);if(n&&n.hostname)return await this._getProxyAgentDispatcher(r,n)}_prepareRequest(t,r,n){const i={};i.parsedUrl=r;const o=i.parsedUrl.protocol==="https:";i.httpModule=o?uc:Vn;const s=o?443:80;if(i.options={},i.options.host=i.parsedUrl.hostname,i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):s,i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||""),i.options.method=t,i.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(i.options.headers["user-agent"]=this.userAgent),i.options.agent=this._getAgent(i.parsedUrl),this.handlers)for(const l of this.handlers)l.prepareRequest(i.options);return i}_mergeHeaders(t){return this.requestOptions&&this.requestOptions.headers?Object.assign({},Wr(this.requestOptions.headers),Wr(t||{})):Wr(t||{})}_getExistingOrDefaultHeader(t,r,n){let i;return this.requestOptions&&this.requestOptions.headers&&(i=Wr(this.requestOptions.headers)[r]),t[r]||i||n}_getAgent(t){let r;const n=Ea(t),i=n&&n.hostname;if(this._keepAlive&&i&&(r=this._proxyAgent),i||(r=this._agent),r)return r;const o=t.proto