lete,t,r,n,i,o,s,a;functionl(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0});}functionc(e){returne&&e.__esModule?e.default:e;}functionu(e,t,r){if("function"==typeoft&&(r=t,t={}),!r){if("function"!=typeofPromise)throwTypeError("callback not provided");returnnewPromise(function(r,n){u(e,t||{},function(e,t){e?n(e):r(t);});});}rX(e,t||{},function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n);});}functionp(e,t){letr;letn=e.options.env||process.env,i=process.cwd(),o=null!=e.options.cwd,s=o&&void0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd);}catch(e){}try{r=rz.sync(e.command,{path:n[rW({env:n})],pathExt:t?iW.delimiter:void0});}catch(e){}finally{s&&process.chdir(i);}returnr&&(r=iW.resolve(o?e.options.cwd:"",r)),r;}functionf(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args});}functiond(e,t){returni8&&1===e&&!t.file?f(t.original,"spawn"):null;}functionh(e,t,r){letn=rH(e,t,r),i=rE.spawn(n.command,n.args,n.options);returnr0.hookChildProcess(i,n),i;}functionm(e={}){let{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path";}functionv(e){returnnull!==e&&"object"==typeofe&&"function"==typeofe.pipe;}functiong(e){returnv(e)&&!1!==e.writable&&"function"==typeofe._write&&"object"==typeofe._writableState;}asyncfunctiony(e,t){if(!e)throwError("Expected a stream");let{maxBuffer:r}=t={maxBuffer:1/0,...t},n=r5(t);returnawaitnewPromise((t,i)=>{leto=e=>{e&&n.getBufferedLength()<=r6.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),i(e);};(async()=>{try{awaitoQ(e,n),t();}catch(e){o(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&o(newo0());});}),n.getBufferedValue();}functionE(e,t,r){letn;leti=sy(e,t,r),o=ss(e,t),s=sa(e,t);sv(s,i.options),oW(i.options);try{n=c(rO).spawn(i.file,i.args,i.options);}catch(t){lete=new(c(rO).ChildProcess)();returnsr(e,Promise.reject(o_({error:t,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}))),e;}leta=sn(n),l=oX(n,i.options,a),u=oY(n,i.options,l),p={isCanceled:!1};n.kill=oM.bind(null,n.kill.bind(n)),n.cancel=oz.bind(null,n,p);letf=r1(async()=>{let[{error:e,exitCode:t,signal:r,timedOut:a},l,c,f]=awaito9(n,i.options,u),d=sE(i.options,l),h=sE(i.options,c),m=sE(i.options,f);if(e||0!==t||null!==r){letl=o_({error:e,exitCode:t,signal:r,stdout:d,stderr:h,all:m,command:o,escapedCommand:s,parsed:i,timedOut:a,isCanceled:p.isCanceled||!!i.options.signal&&i.options.signal.aborted,killed:n.killed});if(!i.options.reject)returnl;throwl;}return{command:o,escapedCommand:s,exitCode:0,stdout:d,stderr:h,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};});returno6(n,i.options),n.all=o8(n,i.options),oZ(n),sr(n,f),n;}functionw(e,t,r){letn;leti=sy(e,t,r),o=ss(e,t),s=sa(e,t);sv(s,i.options);leta=o3(i.options);try{n=c(rO).spawnSync(i.file,i.args,{...i.options,input:a});}catch(e){throwo_({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1});}letl=sE(i.options,n.stdout,n.error),u=sE(i.options,n.stderr,n.error);if(n.error||0!==n.status||null!==n.signal){lete=o_({stdout:l,stderr:u,error:n.error,signal:n.signal,exitCode:n.status,command:o,escapedCommand:s,parsed:i,timedOut:n.error&&"ETIMEDOUT"===n.error.code,isCanceled:!1,killed:null!==n.signal});if(!i.options.reject)returne;throwe;}return{command:o,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1};}function_(t,r=["-NoProfile","-NoLogo","-NonInteractive"],n={stdio:"inherit"}){returnE(function(){if(void0===e){lett=c(nt).sync("pwsh",{nothrow:!0});null!==t&&(e=t);letr=c(nt).sync("powershell",{nothrow:!0});null!==r&&(e=r);}if(void0===e)throwError("Could not find powershell");returne;}(),[...r,"-c",t],n);}functionb(){vare,t;return((null===(e=(t=process).getuid)||void0===e?void0:e.call(t))===0||!!process.en
`;try{await Promise.all([N(e),A(t,T("~/.bashrc")),A(t,T("~/.profile"))]);}catch(e){(0,rM.warning)(`Failedtoadd${t}to.profileor.bashrc.Youshouldadditmanually:${e}`);}}async function N(e){let t=void 0===e.guard?"\n# Automatically Generated by envosman\n":`
`));}function z(e){let 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 V(){return null!==c(nt).sync("nala",{nothrow:!0});}function X(){let e;return V()?"nala":"apt-get";}async function W(e){try{let{stdout:t}=await E("dpkg",["-s",e],{env:z("apt-get"),stdio:"pipe"});if("string"!=typeof t)return!1;return t.split("\n").some(e=>e.startsWith("Status: install ok installed"));}catch{return!1;}}async function Y(e){try{let{stdout:t}=await E("dpkg",["-l",e],{env:z("apt-get"),stdio:"pipe"});if("string"!=typeof t)return!1;return t.split("\n").some(e=>e.startsWith("ii"));}catch{return!1;}}async function J(e,t=X()){return(await Promise.all(e.map(e=>K(e,t)))).filter(e=>void 0!==e);}async function K(e,t=X()){let r=await Q(t,e.name,e.version);return(await W(r))?void 0:r;}async function Z(e,t,r){if(void 0!==r&&""!==r){let{stdout:n}=await E("apt-cache",["search","--names-only",`^${(0,ip.default)(t)}-${(0,ip.default)(r)}$`],{env:z(e),stdio:"pipe"});if(""!==n.trim())return 0;try{let{stdout:n}=await E("apt-cache",["show",`${t}=${r}`],{env:z(e)});if(""===n.trim())return 1;}catch{}}try{let{stdout:r}=await E("apt-cache",["show",t],{env:z(e),stdio:"pipe"});if(""!==r.trim())return 2;}catch{}return s1?3:(s2(e),Z(e,t,r));}async function Q(e,t,r){switch(await Z(e,t,r)){case 0:return`${t}-${r}`;case 1:return`${t}=${r}`;case 2:return void 0!==r&&""!==r&&(0,rM.warning)(`Couldnotfindpackage${t}withversion${r}.Installingthelatestversion.`),t;default:throw Error(`Couldnotfindpackage${t}${null!=r?r:""}`);}}async function ee(e){s2(e);let t=await J([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&x(e,["install","-y","--fix-broken","-o",s0,...t],{...sM,env:z(e)});}async function et(e,t=X()){await s3(t),await er(t),x("add-apt-repository",["-y","--no-update",e],{...sM,env:z(t)}),s2.clear(),s2(t);}async function er(e){(await W("software-properties-common"))||x(e,["install","-y","--fix-broken","-o",s0,"software-properties-common"],{...sM,env:z(e)});}async function en(e,t=!1){let r=X();for(let{name:t,version:n}of e)(0,rM.info)(`Installing${t}${null!=n?n:""}via${r}`);t&&s2(r),await ei(r,e);let n=await J(e,r);if(0===n.length)return(0,rM.info)("All packages are already installed"),{binDir:"/usr/bin/"};await s3(r);try{await eo(e),x(r,["install","--fix-broken","-y",...n],{...sM,env:z(r)});}catch(e){if("string"==typeof e.stderr)s4.some(t=>e.stderr.includes(t))&&((0,rM.warning)(`Failedtoinstallpackages${n}.Retrying...`),x(r,["install","--fix-broken","-y","-o",s0,...n],{...sM,env:z(r)}));else throw e;}return{binDir:"/usr/bin/"};}async function ei(e,t){let r=[...new Set(t.flatMap(e=>{var t;return null!==(t=e.repository)&&void 0!==t?t:[];}))];await Promise.all(r.map(t=>et(t,e)));}async function eo(e){await Promise.all(e.map(async e=>{var t;void 0!==e.key&&(await("keyUrl"in(t=e.key)?ea(t):es(t)));}));}async function es({key:e,keyServer:t=s8,fileName:r,keyStorePath:n=s8}){try{ec(r);let i=(0,iW.join)(n,r);return(await(0,nM.pathExists)(i))||(el(),await O("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+i,"--keyserver",t,"--recv-keys",e]),await O("chmod",["644",i])),i;}catch(e){(0,rM.warning)(`Failedtoaddaptkeyviaserver${t}:${e}`);return;}}async function ea({keyUrl:e,fileName:t,keyStorePath:r=s6}){try{ec(t);let n=(0,iW.join)(r,t);if(!(await(0,nM.pathExists)(n))){el(),await en([{name:"ca-certificates"}]);let r=(0,iW.join)((0,iX.tmpdir)(),t),i=new ir.DownloaderHelper(e,(0,iX.tmpdir)(),{fileName:t});i.on("error",t=>{throw Error(`Failedtodownload${e}:${t}`);}),await i.start(),x("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),x("chmod",["644",n]);}return n;}catch(t){(0,rM.warning)(`Failedtoaddaptkeyviadownload${e}:${t}`);return;}}function el(){x("gpg",["-k"]);}function ec(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e);}async function eu(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof t)return{binDir:t};let
apt-getupdate-o${s0}-y`),a=r,c=1===o?s.replace(/ -y \$PKG/g," -y clang-format-"+a):s,l=c=await tV(c),c=V()?l.replace(/apt-get/g,"nala"):l,await(0,nn.writeFile)(t,c),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}];}async function tV(e){let t=e.replace(/apt-get install -y/g,`apt-getinstall-oDpkg::Options::="--force-overwrite"-o${s0}-y--fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map(async e=>{let r=e.replace("$LLVM_VERSION","*");(await Y(r))&&((0,rC.info)("Removing conflicting package "+r),t=t.replace(e,""));})),t;}function tX(e,t,r){let n=`${t}${e}${r}`;return`https://github.com/llvm/llvm-project/releases/download/llvmorg-${e}/${n}`;}function tW(e,t,r){let n=`${t}${e}${r}`;return`https://releases.llvm.org/${e}/${n}`;}async function tY(e){let t;if(a2.has(e))return null;let r="LLVM-",n=c(iv)(e,"3.7.0")?"-win32.exe":"-win64.exe",i=c(iv)(e,"9.0.1"),o=!1;return i&&(t=tW(e,r,n),(await iL(t))||(o=!0)),(o||!i)&&(t=tX(e,r,n)),t;}function tJ(e,t){switch(e){case"darwin":return function(e){if(a3.has(e))return null;let t="9.0.0"===e?"-darwin-apple":"-apple-darwin",r="clang+llvm-",n=`-x86_64${t}.tar.xz`;return c(iv)(e,"9.0.1")?tW(e,r,n):tX(e,r,n);}(t);case"linux":return function(e){let t,r,n=e,i=a4.get(n);if(void 0!==i&&(n=i),n.includes("ubuntu")){let e=n.replace(/-ubuntu-.*/,"");if(!a1.has(e))throw Error("Unsupported Ubuntu version: "+e);t=n.replace(e,""),n=eW(a1,e)[0];}else""!==n&&n in a6?t=a6[n]:(t=a6[a8],(0,rM.warning)(`Falling back to LLVM version ${a8} ${t} for the Ubuntu.`));let o="clang+llvm-";return(r="5.0.0"===n?`-linux-x86_64${t}.tar.xz`:t.includes("-rhel86")?`-x86_64-unknown-linux-gnu${t}.tar.xz`:`-x86_64-linux-gnu${t}.tar.xz`,c(iv)(n,"9.0.1"))?tW(n,o,r):tX(n,o,r);}(t);case"win32":return tY(t);default:return null;}}async function tK(e,t,r){let[n,i]=await eY(a1,t,e,tJ);return(0,rM.info)("specific llvm version: "+n),{url:i,extractedFolderName:"",binRelativeDir:"bin",binFileName:(0,ih.addExeExt)("clang"),extractFunction:"win32"===t?ej:(e,t)=>eU(e,t,1)};}async function tZ(e,t,r){var n;let i=await a5(e,t,r);return await t3(null!==(n=i.installDir)&&void 0!==n?n:t),i;}async function tQ(e,t,r){let[n,i]=await Promise.all([t0(e,t,r),t4()]);return await a9(r),n;}async function t0(e,t,r,n=iq.All){let i=Number.parseInt(function(e){if(null===c(iD)(e))try{let t=c(im)(e);if(null!==t)return(0,rM.info)(`Coerced version '${e}' to '${t}'`),t.version;}catch(e){}return e;}(e).split(".")[0],10);try{if(em())return await tq(i,n);}catch(e){(0,rM.info)("Failed to install llvm via system package manager "+e);}let o=await eG("llvm",e,tK,t,r);return await a7(i),o;}async function t1(e){em()&&(e<=10?await en([{name:"libtinfo5"}]):await en([{name:"libtinfo-dev"}]));}async function t2(e){"linux"===process.platform&&(await tI(tr("gcc",void 0,await aF()),"",e,40));}async function t3(e){var t,r;let n=null!==(t=process.env.LD_LIBRARY_PATH)&&void 0!==t?t:"",i=null!==(r=process.env.DYLD_LIBRARY_PATH)&&void 0!==r?r:"",o=[C("LLVM_PATH",e,li),C("LD_LIBRARY_PATH",`${e}/lib${iW.delimiter}${n}`,li),C("DYLD_LIBRARY_PATH",`${e}/lib${iW.delimiter}${i}`,li),C("LDFLAGS",`-L"${e}/lib"`,li),C("CPPFLAGS",`-I"${e}/include"`,li),C("CC",(0,ih.addExeExt)(`${e}/bin/clang`),li),C("CXX",(0,ih.addExeExt)(`${e}/bin/clang++`),li),C("LIBRARY_PATH",`${e}/lib`,li),tO()];em()&&o.push(q("cc",`${e}/bin/clang`,li,60),q("cxx",`${e}/bin/clang++`,li,60),q("clang",`${e}/bin/clang`,li),q("clang++",`${e}/bin/clang++`,li),q("lld",`${e}/bin/lld`,li),q("ld.lld",`${e}/bin/ld.lld`,li),q("llvm-ar",`${e}/bin/llvm-ar`,li)),await Promise.all(o);}async function t4(){if(rU.GITHUB_ACTIONS){let e=(0,ih.join)(iz,"llvm_matcher.json");if(!(await(0,nM.pathExists)(e)))return(0,rM.warning)("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");(0,rM.info)("::add-matcher::"+e);}}async function t6(e,t,r){switch(process.platform){case"win32":return eg("make",e);case"darwin":return await ef("make",e),await k("/usr/local/opt/make/libexec/gnubin",li),{binDir:"/usr/l
`),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));let l=null!==(t=a.architecture)&&void 0!==t?t:process.arch,u=null!==(r=process.env.SETUP_CPP_DIR)&&void 0!==r?r:T("~"),p=[],f=[],d=nz.create({autoloadLocales:!0});nz.addLocale(c(nV)),nH.addLocale(c(nq));let h=await aF();if(!function(e,t){let r=t.filter(t=>void 0!==e[t]),n=r.filter(t=>!tn(e[t])),i=n.length>=1?e[n[0]]:"true";if(n.some(t=>e[t]!==i))return!1;for(let t of r)e[t]=i;return!0;}(a,["llvm","clangtidy","clangformat"]))return(0,rM.error)("The same version must be used for llvm, clangformat and clangtidy"),1;eh()&&"string"==typeof a.cppcheck&&"string"==typeof a.gcovr&&((0,rM.info)("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await e_("python-pygments"));let m=!1,v=!1;for(let e of lr){if(rU.isCI&&0!==f.length){v=!0;break;}let t=a[e];void 0!==t&&(i=Date.now(),m=await tB(e,t,h,l,u,p,f,6e4*Number.parseFloat(null!==(n=a.timeout)&&void 0!==n?n:"20")),o=Date.now(),(0,rM.info)("took "+(d.format(i,o)||"0 seconds")));}if(!v){let e=a.compiler;if(void 0!==e){let t=Date.now();await rc(e,h,u,l,p,m,f);let r=Date.now();(0,rM.info)("took "+(d.format(t,r)||"0 seconds"));}}if(await $(li),0===p.length&&0===f.length)return(0,rM.warning)("setup-cpp was called without any arguments. Nothing to do."),0;for(let e of p)(0,rM.success)(e);for(let e of f)(0,rM.error)(e);if((0,rM.info)("setup-cpp finished"),!rU.GITHUB_ACTIONS)switch(process.platform){case"win32":(0,rM.warning)("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":(0,rM.warning)("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");}returnawaits,0===f.length?0:1;}varrp,rf,rd,rh,rm,rv,rg,ry,rE,rw,r_,rb,rx,rO,rS,rR,rI,rT,rP,rN,rA,r$,rC,rL,rk,rD,rj,rF,rU,rM,rG,rB,rH,rq,rz,rV,rX,rW,rY,rJ,rK,rZ,rQ,r0,r1,r2,r3,r4,r6,r8,r5,r7,r9,ne,nt,nr,nn,ni,no,ns,na,nl,nc,nu,np,nf,nd,nh,nm,nv,ng,ny,nE,nw,n_,nb,nx,nO,nS,nR,nI,nT,nP,nN,nA,n$,nC,nL,nk,nD,nj,nF,nU,nM,nG,nB,nH,nq,nz,nV,nX,nW,nY,nJ,nK,nZ,nQ,n0,n1,n2,n3,n4,n6,n8,n5,n7,n9,ie,it,ir,ii,io,is,ia,il,ic,iu,ip,id,ih,im,iv,ig,iy,iE,iw,i_,ib,ix,iO,iS,iR,iI,iT,iP,iN,iA,i$,iC,iL,ik,iD,ij,iF,iU,iM,iG,iB,iH,iq,iz,iV,iX=require("os"),iW=require("path"),iY=require("fs"),iJ=require("crypto"),iK=require("http"),iZ=require("https");require("net"),rh=require("tls"),rm=require("events"),rv=require("assert"),rg=require("util"),ry=require("fs"),rE=require("child_process"),rw=require("string_decoder"),r_=require("timers"),rb=require("buffer"),rx=require("path"),rO=require("child_process"),rS=require("process"),rR=require("url"),rI=require("os"),rT=require("buffer"),rP=require("stream"),rN=require("util"),rA=require("process"),r$=require("url"),rC=require("console"),rk={},rD={},null==(rj=(rL=globalThis).parcelRequire810d)&&((rj=function(e){if(einrk)returnrk[e].exports;if(einrD){vart=rD[e];deleterD[e];varr={id:e,exports:{}};returnrk[e]=r,t.call(r.exports,r,r.exports),r.exports;}varn=Error("Cannotfindmodule'"+e+"'");thrown.code="MODULE_NOT_FOUND",n;}).register=function(e,t){rD[e]=t;},rL.parcelRequire810d=rj),(rF=rj.register)("dKklS",function(e,t){varr;functionn(e){return"string"==typeofe?!!i[e]:"env"ine?i[e.env]&&i[e.env].includes(e.includes):"any"ine?e.any.some(function(e){return!!i[e];}):Object.keys(e).every(function(t){returni[t]===e[t];});}r=rj("ksAXT");leti=process.env;Object.defineProperty(e.exports,"_vendors",{value:r.map(function(e){returne.constant;})}),e.exports.name=null,e.exports.isPR=null,r.forEach(function(t){letr=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){returnn(e);});if(e.exports[t.constant]=r,r)switch(e.exports.name=t.name,typeoft.pr){
ErrorMessage:${e.message}`);})).result)||void 0===t?void 0:t.value;if(!n)throw Error("Response json body do not have ID Token field");return n;});}static getIDToken(e){return r(this,void 0,void 0,function*(){try{let t=s.getIDTokenUrl();if(e){let r=encodeURIComponent(e);t=`${t}&audience=${r}`;}o.debug("ID token url is "+t);let r=yield s.getCall(t);return o.setSecret(r),r;}catch(e){throw Error("Error message: "+e.message);}});}}e.exports.OidcClient=s;}),rF("3bZps",function(e,t){var r,n,i,o,s,a,l,c,u;r=e.exports&&e.exports.__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=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),i=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&r(t,e,i);return n(t,e),t;},o=e.exports&&e.exports.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e));}catch(e){o(e);}}function a(e){try{l(n.throw(e));}catch(e){o(e);}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t);})).then(s,a);}l((n=n.apply(e,t||[])).next());});},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.HttpClient=e.exports.isHttps=e.exports.HttpClientResponse=e.exports.HttpClientError=e.exports.getProxyUrl=e.exports.MediaTypes=e.exports.Headers=e.exports.HttpCodes=void 0;let p=i(iK),f=i(iZ),d=i(rj("iZzl4")),h=i(rj("bbp3j"));(c=s||(e.exports.HttpCodes=s={}))[c.OK=200]="OK",c[c.MultipleChoices=300]="MultipleChoices",c[c.MovedPermanently=301]="MovedPermanently",c[c.ResourceMoved=302]="ResourceMoved",c[c.SeeOther=303]="SeeOther",c[c.NotModified=304]="NotModified",c[c.UseProxy=305]="UseProxy",c[c.SwitchProxy=306]="SwitchProxy",c[c.TemporaryRedirect=307]="TemporaryRedirect",c[c.PermanentRedirect=308]="PermanentRedirect",c[c.BadRequest=400]="BadRequest",c[c.Unauthorized=401]="Unauthorized",c[c.PaymentRequired=402]="PaymentRequired",c[c.Forbidden=403]="Forbidden",c[c.NotFound=404]="NotFound",c[c.MethodNotAllowed=405]="MethodNotAllowed",c[c.NotAcceptable=406]="NotAcceptable",c[c.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",c[c.RequestTimeout=408]="RequestTimeout",c[c.Conflict=409]="Conflict",c[c.Gone=410]="Gone",c[c.TooManyRequests=429]="TooManyRequests",c[c.InternalServerError=500]="InternalServerError",c[c.NotImplemented=501]="NotImplemented",c[c.BadGateway=502]="BadGateway",c[c.ServiceUnavailable=503]="ServiceUnavailable",c[c.GatewayTimeout=504]="GatewayTimeout",(u=a||(e.exports.Headers=a={})).Accept="accept",u.ContentType="content-type",(l||(e.exports.MediaTypes=l={})).ApplicationJson="application/json",e.exports.getProxyUrl=function(e){let t=d.getProxyUrl(new URL(e));return t?t.href:"";};let m=[s.MovedPermanently,s.ResourceMoved,s.SeeOther,s.TemporaryRedirect,s.PermanentRedirect],v=[s.BadGateway,s.ServiceUnavailable,s.GatewayTimeout],g=["OPTIONS","GET","DELETE","HEAD"];class y extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,y.prototype);}}e.exports.HttpClientError=y;class E{constructor(e){this.message=e;}readBody(){return o(this,void 0,void 0,function*(){return new Promise(e=>o(this,void 0,void 0,function*(){let t=Buffer.alloc(0);this.message.on("data",e=>{t=Buffer.concat([t,e]);}),this.message.on("end",()=>{e(t.toString());});}));});}readBodyBuffer(){return o(this,void 0,void 0,function*(){return new Promise(e=>o(this,void 0,void 0,function*(){let t=[];this.message.on("data",e=>{t.push(e);}),this.message.on("end",()=>{e(Buffer.concat(t));});}));});}}e.exports.HttpClientResponse=E,e.exports.isHttps=function(e){return"https:"===new URL(e).protocol;},e.exports.HttpClient=class{const
${t}`,oo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),os=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),oa=(e,t,r)=>{let n=""===r?"":`with${r.trim()}()`,i=oi.bind(null,n,t.toString());Object.defineProperty(i,"name",os),Object.defineProperty(e,"toString",{...oo,value:i});},ol=new WeakMap(),oc=(e,t={})=>{let r;if("function"!=typeof e)throw TypeError("Expected a function");let n=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(ol.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function\`${i}\` can only be called once`);returnr;};return!function(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(letnofReflect.ownKeys(t))ot(e,t,n,r);on(e,t),oa(e,t,n);}(o,e),ol.set(o,n),o;};oc.callCount=e=>{if(!ol.has(e))throwError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnol.get(e);},r1=oc;constou=()=>Array.from({length:od-of+1},op),op=(e,t)=>({name:"SIGRT"+(t+1),number:of+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),of=34,od=64,oh=[{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:"t
${n.message}`:v,E=[y,t,e].filter(Boolean).join("\n");return g?(n.originalMessage=n.message,n.message=E):n=Error(E),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=h,n.stdout=e,n.stderr=t,n.cwd=d,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!l,n.isCanceled=u,n.killed=p&&!l,n;},ob=["stdin","stdout","stderr"],ox=e=>ob.some(t=>void 0!==e[t]),oO=e=>{if(!e)return;let{stdio:t}=e;if(void 0===t)return ob.map(t=>e[t]);if(ox(e))throw Error("It's not possible to provide `stdio` in combination with one of "+ob.map(e=>`\`${e}\``).join(", "));if("string"==typeoft)returnt;if(!Array.isArray(t))throwTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);returnArray.from({length:Math.max(t.length,ob.length)},(e,r)=>t[r]);};r2={};constoS=function(e){returne&&"object"==typeofe&&"function"==typeofe.removeListener&&"function"==typeofe.emit&&"function"==typeofe.reallyExit&&"function"==typeofe.listeners&&"function"==typeofe.kill&&"number"==typeofe.pid&&"function"==typeofe.on;};if(oS(r3=rL.process)){varoR,oI=rv,oT=rj("bJALw"),oP=/^win/i.test(r3.platform),oN=rm;"function"!=typeofoN&&(oN=oN.EventEmitter),r3.__signal_exit_emitter__?oR=r3.__signal_exit_emitter__:((oR=r3.__signal_exit_emitter__=newoN()).count=0,oR.emitted={}),oR.infinite||(oR.setMaxListeners(1/0),oR.infinite=!0);varoA=function(){oL&&oS(rL.process)&&(oL=!1,oT.forEach(function(e){try{r3.removeListener(e,oC[e]);}catch(e){}}),r3.emit=oF,r3.reallyExit=oD,oR.count-=1);};(r2=function(e,t){if(!oS(rL.process))returnfunction(){};oI.equal(typeofe,"function","a callback must be provided for exit handler"),!1===oL&&ok();varr="exit";returnt&&t.alwaysLast&&(r="afterexit"),oR.on(r,e),function(){oR.removeListener(r,e),0===oR.listeners("exit").length&&0===oR.listeners("afterexit").length&&oA();};}).unload=oA;varo$=function(e,t,r){oR.emitted[e]||(oR.emitted[e]=!0,oR.emit(e,t,r));},oC={};oT.forEach(function(e){oC[e]=function(){oS(rL.process)&&r3.listeners(e).length===oR.count&&(oA(),o$("exit",null,e),o$("afterexit",null,e),oP&&"SIGHUP"===e&&(e="SIGINT"),r3.kill(r3.pid,e));};}),r2.signals=function(){returnoT;};varoL=!1,ok=function(){!oL&&oS(rL.process)&&(oL=!0,oR.count+=1,oT=oT.filter(function(e){try{returnr3.on(e,oC[e]),!0;}catch(e){return!1;}}),r3.emit=oU,r3.reallyExit=oj);};r2.load=ok;varoD=r3.reallyExit,oj=function(e){oS(rL.process)&&(r3.exitCode=e||0,o$("exit",r3.exitCode,null),o$("afterexit",r3.exitCode,null),oD.call(r3,r3.exitCode));},oF=r3.emit,oU=function(e,t){if(!("exit"===e&&oS(rL.process)))returnoF.apply(this,arguments);void0!==t&&(r3.exitCode=t);varr=oF.apply(this,arguments);returno$("exit",r3.exitCode,null),o$("afterexit",r3.exitCode,null),r;};}elser2=function(){returnfunction(){};};constoM=(e,t="SIGTERM",r={})=>{letn=e(t);returnoG(e,t,r,n),n;},oG=(e,t,r,n)=>{if(!oB(t,r,n))return;leti=setTimeout(()=>{e("SIGKILL");},oq(r));i.unref&&i.unref();},oB=(e,{forceKillAfterTimeout:t},r)=>oH(e)&&!1!==t&&r,oH=e=>e===c(rI).constants.signals.SIGTERM||"string"==typeofe&&"SIGTERM"===e.toUpperCase(),oq=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return5e3;if(!Number.isFinite(e)||e<0)throwTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne;},oz=(e,t)=>{e.kill()&&(t.isCanceled=!0);},oV=(e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}));},oX=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{leti;return0===t||void0===t?n:Promise.race([newPromise((n,o)=>{i=setTimeout(()=>{oV(e,r,o);},t);}),n.finally(()=>{clearTimeout(i);})]);},oW=({timeout:e})=>{if(void0!==e&&(!Number.isFinite(e)||e<0))throwTypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);},oY=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)returnn;leti=c(r2)(()=>{e.kill();});returnn.finally(()=>{i();});},oJ=e=>einstanceofrO.ChildProcess&&"function"==typeofe.then,oK=(e,t,r)=>{if("string"==typeofr)returne[t].pipe((0,ry.createWriteStream)(r)),e;if(g
`);},sg=({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...c(rS).env,...e}:e;return r?oe({env:o,cwd:n,execPath:i}):o;},sy=(e,t,r={})=>{let n=c(rB)._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||c(rS).cwd(),execPath:c(rS).execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:sd,...r}).env=sg(r),r.stdio=oO(r),"win32"===c(rS).platform&&"cmd"===c(rx).basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n};},sE=(e,t,r)=>"string"==typeof t||(0,rb.Buffer).isBuffer(t)?e.stripFinalNewline?function(e){let t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===r&&(e=e.slice(0,-1)),e;}(t):t:void 0===r?void 0:"",sw=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},s_=(e={})=>({preferLocal:!0,...sw(e),...e});!function e(t){function r(n,...i){if(!Array.isArray(n))return e({...t,...n});let[o,...s]=sf(n,i);return E(o,s,s_(t));}return r.sync=(e,...r)=>{if(!Array.isArray(e))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[n,...i]=sf(e,r);return w(n,i,s_(t));},r;}(),nt={},l(nr={},"isexe",()=>sb),l(nr,"sync",()=>sx),nn=rj("6vN83");const sb=async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return sO(await(0,nn.stat)(e),t);}catch(e){if(r||"EACCES"===e.code)return!1;throw e;}},sx=(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return sO((0,iY.statSync)(e),t);}catch(e){if(r||"EACCES"===e.code)return!1;throw e;}},sO=(e,t)=>e.isFile()&&sS(e,t),sS=(e,t)=>{var r,n,i,o,s,a,l,c,u,p,f;let d=null!==(l=t.uid)&&void 0!==l?l:null===(r=(n=process).getuid)||void 0===r?void 0:r.call(n),h=null!==(u=null!==(c=t.groups)&&void 0!==c?c:null===(i=(o=process).getgroups)||void 0===i?void 0:i.call(o))&&void 0!==u?u:[],m=null!==(f=null!==(p=t.gid)&&void 0!==p?p:null===(s=(a=process).getgid)||void 0===s?void 0:s.call(a))&&void 0!==f?f:h[0];if(void 0===d||void 0===m)throw Error("cannot get uid or gid");let v=new Set([m,...h]),g=e.mode,y=e.uid,E=e.gid,w=parseInt("100",8),_=parseInt("010",8);return!!(g&parseInt("001",8)||g&_&&v.has(E)||g&w&&y===d||g&(w|_)&&0===d);};l(ni={},"isexe",()=>sR),l(ni,"sync",()=>sI),nn=rj("6vN83");const sR=async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return sP(await(0,nn.stat)(e),e,t);}catch(e){if(r||"EACCES"===e.code)return!1;throw e;}},sI=(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return sP((0,iY.statSync)(e),e,t);}catch(e){if(r||"EACCES"===e.code)return!1;throw e;}},sT=(e,t)=>{let{pathExt:r=process.env.PATHEXT||""}=t,n=r.split(";");if(-1!==n.indexOf(""))return!0;for(let t=0;t<n.length;t++){let r=n[t].toLowerCase(),i=e.substring(e.length-r.length).toLowerCase();if(r&&i===r)return!0;}return!1;},sP=(e,t,r)=>e.isFile()&&sT(t,r),sN="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?ni:nr,sA=sN.isexe,s$=sN.sync;no=iW.join,ns=iW.delimiter,na=iW.sep,nl=iW.posix;const sC="win32"===process.platform,sL=new RegExp(`[${nl.sep}${na===nl.sep?"":na}]`.replace(/(\\)/g,"\\$1")),sk=RegExp("^\\."+sL.source),sD=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),sj=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=ns})=>{let i=e.match(sL)?[""]:[...(sC?[process.cwd()]:[]),...(t||"").split(n)];if(sC){let t=r||[".EXE",".CMD",".BAT",".COM"].join(n),o=t.split(n).flatMap(e=>[e,e.toLowerCase()]);return e.includes(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:t};}return{pathEnv:i,pathExt:[""]};},sF=(e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&sk.test(t)?t.slice(0,2):"")+no(r,t);},sU=async(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=sj(e,t),o=[];for(let s of r){let r=sF(s,e);for(let e of n){let n=r+e;if(await sA(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;o.push(n);}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw sD(e);};nt=sU,sU.sync=(e,t={})=>{let{pathEnv:r,pathExt:n,pathExtExe:i}=sj(e,t),o=[];for(let s of r){let r=sF(s,e);for(let e of n){let n=r+e;if(s$(n,{pathExt: