`)},$=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!
${t}`,bv=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Rv=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),$v=(e,t,r)=>{const n=r===""?"":`with${r.trim()}()`,i=Sv.bind(null,n,t.toString());Object.defineProperty(i,"name",Rv),Object.defineProperty(e,"toString",{...bv,value:i})};function Ov(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const i of Reflect.ownKeys(t))gv(e,t,i,r);return Ev(e,t),$v(e,t,n),e}const wn=new WeakMap,kp=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"<anonymous>",o=function(...s){if(wn.set(o,++n),n===1)r=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function\`${i}\` can only be called once`);returnr};returnOv(o,e),wn.set(o,n),o};kp.callCount=e=>{if(!wn.has(e))thrownewError(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);returnwn.get(e)};constIv=()=>{conste=qp-Fp+1;returnArray.from({length:e},Pv)},Pv=(e,t)=>({name:`SIGRT${t+1}`,number:Fp+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Fp=34,qp=64,Tv=[{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",standar
`);return h?(n.originalMessage=n.message,n.message=v):n=new Error(v),n.shortMessage=y,n.command=s,n.escapedCommand=l,n.exitCode=o,n.signal=i,n.signalDescription=w,n.stdout=e,n.stderr=t,n.cwd=p,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!u,n.isCanceled=a,n.killed=c&&!u,n},on=["stdin","stdout","stderr"],qv=e=>on.some(t=>e[t]!==void 0),Uv=e=>{if(!e)return;const{stdio:t}=e;if(t===void 0)return on.map(n=>e[n]);if(qv(e))throw new Error(`It'snotpossibletoprovide\`stdio\` in combination with one of ${on.map(n=>`\`${n}\``).join(", ")}`);if(typeoft=="string")returnt;if(!Array.isArray(t))thrownewTypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeoft}\``);constr=Math.max(t.length,on.length);returnArray.from({length:r},(n,i)=>t[i])};varzt={exports:{}},Xi={exports:{}},Nu;functionjv(){returnNu||(Nu=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Xi)),Xi.exports}varLu;functionMv(){if(Lu)returnzt.exports;Lu=1;vare=at.process;constt=function(f){returnf&&typeoff=="object"&&typeoff.removeListener=="function"&&typeoff.emit=="function"&&typeoff.reallyExit=="function"&&typeoff.listeners=="function"&&typeoff.kill=="function"&&typeoff.pid=="number"&&typeoff.on=="function"};if(!t(e))zt.exports=function(){returnfunction(){}};else{varr=qr,n=jv(),i=/^win/i.test(e.platform),o=Tn;typeofo!="function"&&(o=o.EventEmitter);vars;e.__signal_exit_emitter__?s=e.__signal_exit_emitter__:(s=e.__signal_exit_emitter__=newo,s.count=0,s.emitted={}),s.infinite||(s.setMaxListeners(1/0),s.infinite=!0),zt.exports=function(f,h){if(!t(at.process))returnfunction(){};r.equal(typeoff,"function","a callback must be provided for exit handler"),c===!1&&m();vary="exit";h&&h.alwaysLast&&(y="afterexit");varv=function(){s.removeListener(y,f),s.listeners("exit").length===0&&s.listeners("afterexit").length===0&&l()};returns.on(y,f),v};varl=function(){!c||!t(at.process)||(c=!1,n.forEach(function(h){try{e.removeListener(h,a[h])}catch{}}),e.emit=E,e.reallyExit=p,s.count-=1)};zt.exports.unload=l;varu=function(h,y,v){s.emitted[h]||(s.emitted[h]=!0,s.emit(h,y,v))},a={};n.forEach(function(f){a[f]=function(){if(t(at.process)){vary=e.listeners(f);y.length===s.count&&(l(),u("exit",null,f),u("afterexit",null,f),i&&f==="SIGHUP"&&(f="SIGINT"),e.kill(e.pid,f))}}}),zt.exports.signals=function(){returnn};varc=!1,m=function(){c||!t(at.process)||(c=!0,s.count+=1,n=n.filter(function(h){try{returne.on(h,a[h]),!0}catch{return!1}}),e.emit=d,e.reallyExit=w)};zt.exports.load=m;varp=e.reallyExit,w=function(h){t(at.process)&&(e.exitCode=h||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),p.call(e,e.exitCode))},E=e.emit,d=function(h,y){if(h==="exit"&&t(at.process)){y!==void0&&(e.exitCode=y);varv=E.apply(this,arguments);returnu("exit",e.exitCode,null),u("afterexit",e.exitCode,null),v}elsereturnE.apply(this,arguments)}}returnzt.exports}varGv=Mv();constVv=$e(Gv),Bv=1e3*5,Hv=(e,t="SIGTERM",r={})=>{constn=e(t);returnzv(e,t,r,n),n},zv=(e,t,r,n)=>{if(!Wv(t,r,n))return;consti=Kv(r),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},Wv=(e,{forceKillAfterTimeout:t},r)=>Xv(e)&&t!==!1&&r,Xv=e=>e===wp.constants.signals.SIGTERM||typeofe=="string"&&e.toUpperCase()==="SIGTERM",Kv=({forceKillAfterTimeout:e=!0})=>{if(e===!0)returnBv;if(!Number.isFinite(e)||e<0)thrownewTypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeofe})`);returne},Yv=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Jv=(e,t,r)=>{e.kill(t),r(Object.assign(newError("Timed out"),{timedOut:!0,signal:t}))},Qv=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void0)returnn;leti;consto=newPromise((l,u)=>{i=setTimeout(()=>{Jv(e,r,u)},t)}),s=n.finally(()=>{clearTimeout(i)});returnPromise.race([o,s])},Zv=({timeout:e})=>
`),z(`"${e}"wasaddedto"${t.rcPath}"`);return}default:return}}const y_=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];function v_(e){return y_.some(t=>t.test(e))?(process.env.PATH?.split(mn)??[]).includes(e):!1}function Ba(e){throw new 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.')}var cn={exports:{}},w_=cn.exports,Ff;function uh(){return Ff||(Ff=1,function(e){(function(){var t={},r={create:n,addLocale:i,pluralize:o};e.exports=r;function n(a){return l(a),{pluralize:function(c,m){return o(a,c,m)}}}function i(a,c){t[a]=c}function o(a,c,m){if(l(a),typeof m!="object")throw new Error("List of variants should be specified as an object");var p=t[a](c);return typeof m[p]<"u"?m[p]:null}function s(a){return typeof t[a]<"u"}function l(a){s(a)||u(a)}function u(a){try{Ba(__dirname+"/../locales/"+a+".js")}catch{throw Error("Failed to load the following locale: "+a)}}}).call(w_)}(cn)),cn.exports}var Oo,qf;function lh(){return qf||(qf=1,Oo=uh()),Oo}var g_=lh();const __=$e(g_);var Io={},Uf;function E_(){return Uf||(Uf=1,function(){var e=this,t;typeof Ba=="function"?t=uh():t=e.numerous,t.addLocale("en",function(n){var i=Math.floor(Math.abs(n)),o=n.toString().replace(/^[^.]*\.?/,"").length;return typeof n=="string"&&(n=parseInt(n,10)),i===1&&o===0?"one":"other"})}.call(Io)),Io}var S_=E_();const b_=$e(S_);var Po={exports:{}},jf;function R_(){return jf||(jf=1,function(e,t){e.exports=!!(typeof process<"u"&&process.versions&&process.versions.node)}(Po)),Po.exports}var To,Mf;function $_(){if(Mf)return To;Mf=1;const e=lh(),t=R_(),r=[["years",12*4*7*24*60*60*1e3],["months",4*7*24*60*60*1e3],["weeks",7*24*60*60*1e3],["days",24*60*60*1e3],["hours",60*60*1e3],["minutes",60*1e3],["seconds",1e3]],n={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},i={};To={create:s,addLocale:o,defaultConfig:n};function o(d){Array.isArray(d)||(d=[d]);for(const f of d){const{id:h,data:y}=f;i[h]=y}}function s(d){return d=Object.assign({},n,d||{}),{format:function(f,h,y){return y=Object.assign({},d,y||{}),l(f,h,y)}}}function l(d,f,h){if(u(h.locale,{autoload:h.autoloadLocales}),!d)throw new Error("Missing first date argument");if(!f)throw new Error("Missing second date argument");const y=m(d,f),v=[];for(const S of y){const[_,b]=S;if(b>0&&v.push(p(_,b,h)),v.length>=h.span)break}return v.join(h.delimiter)}function u(d,f){const{autoload:h}=f;if(!a(d))if(t&&h)c(d);else throw new Error(`Missinglocale:${d},youmustloaditmanuallybeforeusingit`)}function a(d){return!!i[d]}function c(d){try{o(Ba(`../locales/${d}.js`))}catch(f){throw Error(`Failedtoloadlocale:${d}from../locales/${d}.js.Ifusingabundledtime-delta,set'autoloadLocales: false'intheconfig:${f}`)}}function m(d,f){let h=f-d;const y=[];return r.some(function(v){const S=v[0],_=v[1],b=Math.floor(h/_);if(h-=b*_,y.push([S,b]),h<=0)return!0}),y}function p(d,f,h){const y=w(h);return e.pluralize(h.locale,f,y[d]).replace("{0}",f)}function w(d){const f=i[d.locale];let h=d.unitTypeLookupOrder.slice();h.unshift(d.unitType),h=E(h);let y=null;if(h.some(function(v){if(typeof f[v]<"u")return y=f[v],!0}),y===null)throw new Error("Can not find any unit type data for locale: "+d.locale);return y}function E(d){return Array.from(new Set(d))}return To}var xo,Gf;function O_(){return Gf||(Gf=1,xo=$_()),xo}var I_=O_();const Vf=$e(I_);var Ao,Bf;function P_(){return Bf||(Bf=1,Ao={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",
`),await En.clear(),await En(),z(`Successfullyaddedrepository:${e}`),!0}catch(t){throw new Error(`Failedtoaddrepository${e}:${t}`)}}async function bh(){const e=(await z_()).split(".").slice(0,2).join(".");return H_(`https://dl-cdn.alpinelinux.org/alpine/v${e}/community/`)}async function z_(){const e="/etc/alpine-release";if(!await ye(e))throw new Error(`Alpine release file not found at ${e}`);return pr(e,"utf8")}async function W_(e){try{const{exitCode:t}=await wt("apk",["info","-e",e.name],{reject:!1,stdio:["ignore","pipe","ignore"]});if(t!==0)return!1;if(e.version===void 0||e.version==="")return!0;const{stdout:r}=await wt("apk",["info","-v",e.name],{stdio:["ignore","pipe","ignore"]});return r.trim().split("-").slice(-1)[0]===e.version}catch{return!1}}async function Rh(e){return(await Promise.all(e.map(async r=>await W_(r)?void 0:r))).filter(r=>r!==void 0).map($h)}function $h(e){return e.version!==void 0&&e.version!==""?`${e.name}=${e.version}`:e.name}async function X_(){const e=await Rh([{name:"bash"}]);e.length!==0&&he("apk",["add",...e],{...st})}const K_=Fe(X_,{promise:!0});async function De(e,t=!1){if(!await Oe())throw new Error("apk is not available on this system");try{await K_(),t&&await En.clear(),await En();const r=await Rh(e);return r.length===0?(z("All packages are already installed"),{binDir:"/usr/bin"}):(z(`Installing ${r.join(" ")}`),await wt("apk",["add",...r]),z(`Successfully installed ${r.join(" ")}`),{binDir:"/usr/bin"})}catch(r){throw ve(`Failed to install ${e.map(n=>$h(n)).join(" ")}: ${r}`),r}}const{GITHUB_ACTIONS:Y_}=xt,{appendFile:J_}=Pn;async function Q_(e,t,r=40){await wt("update-alternatives",["--install",`/usr/bin/${e}`,e,t,r.toString()])}async function vt(e,t,r,n=40){Y_?await Q_(e,t,n):(await Va(r),await J_(r.rcPath,`
`))}var No={},Wf;function Z_(){return Wf||(Wf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},r=function(){function y(v,S){for(var _,b=0;b<S.length;b++)_=S[b],_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}return function(v,S,_){return S&&y(v.prototype,S),_&&y(v,_),v}}(),n=je,i=w(n),o=Jm,s=ue,l=w(s),u=yp,a=w(u),c=Pa,m=w(c),p=Tn;function w(y){if(y&&y.__esModule)return y;var v={};if(y!=null)for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S]);return v.default=y,v}function E(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function d(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function f(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var h=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(y){function v(S,_){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};E(this,v);var g=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,{captureRejections:!0}));return g.__validate(S,_)?(g.url=g.requestURL=S.trim(),g.state=h.IDLE,g.__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},g.__opts=Object.assign({},g.__defaultOpts),g.__pipes=[],g.__total=0,g.__downloaded=0,g.__progress=0,g.__retryCount=0,g.__retryTimeout=null,g.__resumeRetryCount=0,g.__states=h,g.__promise=null,g.__request=null,g.__response=null,g.__isAborted=!1,g.__isResumed=!1,g.__isResumable=!1,g.__isRedirected=!1,g.__destFolder=_,g.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},g.__fileName="",g.__filePath="",g.updateOptions(b),g):d(g)}return f(v,y),r(v,[{key:"start",value:function(){var _=this,b=function(){return new Promise(function(g,$){_.__promise={resolve:g,reject:$},_.__start()})};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then(function(g){var $=g.name,I=g.total,A=_.__opts.override;if(_.__opts.override=!0,_.__filePath=_.__getFilePath($),_.__opts.override=A,_.__filePath&&i.existsSync(_.__filePath)){var M=_.__getFilesizeInBytes(_.__filePath);return M===I?b():_.resumeFromFile(_.__filePath,{total:I,fileName:$})}return b()}):b()}},{key:"pause",value:function(){var _=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(b){return b.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return _.__setState(_.__states.PAUSED),_.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 _=this;if(this.state===this.__states.STOPPED)return Promise.resolve(!0);var b=function(){return new Promise(function(g,$){i.access(_.__filePath,function(I){return I?(_.__emitStop(),g(!0)):void i.unlink(_
`).some(n=>n.startsWith("Status: install ok installed"))}catch{return!1}}async function iE(e){try{const{stdout:t}=await le("dpkg",["-l",e],{env:lt("apt-get"),stdio:"pipe"});return typeof t!="string"?!1:t.split(`
`).some(n=>n.startsWith("ii"))}catch{return!1}}let xh=!1;function sE(e=Gr()){he(e,["update","-o",Rr],{...st,env:lt(e)}),xh=!0}const hr=Fe(sE);var It;(function(e){e[e.NameDashVersion=0]="NameDashVersion",e[e.NameEqualsVersion=1]="NameEqualsVersion",e[e.Name=2]="Name",e[e.None=3]="None"})(It||(It={}));async function Ah(e,t=Gr()){return(await Promise.all(e.map(r=>ba(r,t)))).filter(r=>r!==void 0)}async function ba(e,t=Gr()){const r=await aE(t,e);return await Ha(r)?void 0:r}async function Ch(e,t,r,n){const i=r!==void 0&&r!=="",o=!i||n;if(i){if(await oE(e,t,r))return It.NameDashVersion;if(await Kf(e,`${t}=${r}`))return It.NameEqualsVersion}const s=()=>{i&&n&&z(`Couldnotfindpackage${t}${r}.Fallingbacktolatestversion.`)};return o&&await Kf(e,t)?(s(),It.Name):xh?o?(s(),It.Name):It.None:(hr(e),Ch(e,t,r,n))}async function oE(e,t,r){try{const{stdout:n}=await le("apt-cache",["search","--names-only",`^${_n(t)}-${_n(r)}$`],{env:lt(e),stdio:"pipe"});if(n.trim()!=="")return!0}catch{}return!1}async function Kf(e,t){try{const{stdout:r}=await le("apt-cache",["show",t],{env:lt(e),stdio:"pipe",verbose:!0});if(r.trim()!=="")return!0}catch{}return!1}async function aE(e,t){const{name:r,version:n,fallBackToLatest:i=!1}=t;switch(await Ch(e,r,n,i)){case It.NameDashVersion:return`${r}-${n}`;case It.NameEqualsVersion:return`${r}=${n}`;case It.Name:return r;default:throw new Error(`Couldnotfindpackage'${r}'${n??"with unspecified version"}`)}}async function cE(e){hr(e);const t=await Ah([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);t.length!==0&&he(e,["install","-y","--fix-broken","-o",Rr,...t],{...st,env:lt(e)})}const Nh=Fe(cE,{promise:!0});function uE(e="apt-get"){try{const{stdout:t}=he("add-apt-repository",["--help"],{...st,env:lt(e),stdio:"pipe"});return t.includes("--no-update")}catch{return!1}}const Lh=Fe(uE);async function lE(e,t=Gr()){await Nh(t),await Dh();try{he("add-apt-repository",["-y",Lh(t)?"--no-update":void 0,e].filter(r=>r!==void 0),{...st,env:lt(t)})}catch{he("add-apt-repository",["-y",e],{...st,env:lt(t)})}hr.clear(),hr(t)}async function Dh(){if(await Ha("software-properties-common"))return;const e="apt-get";he(e,["install","-y","--fix-broken","-o",Rr,"software-properties-common"],{...st,env:lt(e)})}const fE=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"];async function de(e,t=!1){try{const r=Gr();for(const{name:i,version:o}of e)z(`Installing${i}${o??""}via${r}`);t&&hr.clear(),hr(r),await dE(r,e);const n=await Ah(e,r);if(n.length===0)return z("All packages are already installed"),{binDir:"/usr/bin/"};await Nh(r);try{await pE(e),he(r,["install","--fix-broken","-y",...n],{...st,env:lt(r)})}catch(i){if(hE(i))fE.some(o=>typeof i.stderr=="string"&&i.stderr.includes(o))&&(ve(`Failedtoinstallpackages${n}.Retrying...`),he(r,["install","--fix-broken","-y","-o",Rr,...n],{...st,env:lt(r)}));else throw i}return{binDir:"/usr/bin/"}}catch(r){const n=r instanceof Error?`${r.message}
${r.stack}`:String(r);throw new Error(`Failedtoinstallaptpackages:${n}`)}}async function dE(e,t){const r=[...new Set(t.flatMap(n=>n.repository??[]))];await Promise.all(r.map(n=>lE(n,e)))}async function pE(e){await Promise.all(e.map(async t=>{t.key!==void 0&&await tE(t.key)}))}function hE(e){return typeof e.stderr=="string"}let ur;async function Yf(){if(!me())return;if(typeof ur=="string")return{binDir:ur};const e=fe.sync("apt-fast",{nothrow:!0});return e!==null?(ur=be(e),{binDir:ur}):(ur="/usr/bin",await mE(),{binDir:ur})}async function mE(){const e=de([{name:"bash"},{name:"wget"}]),t=new br.DownloaderHelper("https://raw.githubusercontent.com/ilikenwf/apt-fast/c2cd0a0420d3f2d647dc82cf749bfd58c4697dac/quick-install.sh",Ue(),{fileName:"install-apt-fast.sh"});t.on("error",u=>{throw new Error(`Failedtodownloadinstall-apt-fast.sh:${u}`)}),await t.start();const r=J(Ue(),"install-apt-fast.sh");let n=await pr(r,"utf8");n=n.replace(/sudo/g,"").replace("https://raw.githubusercontent.com/ilikenwf/apt-fast/master","https://raw.githubusercontent.com/Rongronggg9/apt-fast/ac82051792f764220e5e303d4560de0f1952826b"),await yn(r,n),await e;try{he("bash",[r])}catch(u){Ae(`Failedtoinstallapt-fastviainstaller:${u}`)}const i="/etc/apt-fast.conf";let o=await pr(i,"utf8");const s=["_APTMGR","DOWNLOADBEFORE"];for(const u of s)o=o.replace(new RegExp(`^#\\s*${u}`,"m"),u);const l=J(Ue(),"apt-fast.conf");await yn(l,o),he("mv",[l,i])}let kt;async function yE({version:e}={}){if(!me())return;if(typeof kt=="string")return{binDir:kt};const t=fe.sync("nala",{nothrow:!0});if(t!==null)return kt=be(t),{binDir:kt};await de([{name:"python3-apt"}]),kt="/usr/bin";try{const r=await ba({name:"nala",version:e});if(r!==void 0)return await de([{name:r}]),{binDir:kt}}catch(r){z(`Failedtoinstallnala:${r}`)}try{const r=await ba({name:"nala-legacy"});if(r!==void 0)return await de([{name:r}],!0),{binDir:kt}}catch(r){z(`Failedtoinstallnala-legacy:${r}`)}return await vE(),{binDir:kt}}async function vE(){const e=new br.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/1939afc3f80638dca2bbedde74bbd86731703cc8/install-nala.sh",Ue(),{fileName:"install-nala.sh"});e.on("error",n=>{throw new Error(`Failedtodownloadinstall-nala.sh:${n}`)}),await e.start();const t=J(Ue(),"install-nala.sh"),r=await pr(t,"utf8");await yn(t,r.replace(/sudo/g,"")),await de([{name:"wget"}]);try{he("bash",[t])}catch(n){Ae(`Failedtoinstallnalaviainstaller:${n}`),he("apt",["install","-y","-t","nala","nala"])}}let Yt;async function za(e={}){if(!["darwin","linux"].includes(process.platform)||process.platform==="linux"&&process.arch!=="x64"){ve(`Brewisnotsupportedon${process.platform}${process.arch}`);return}if(typeof Yt=="string")return{binDir:Yt};const t=await fe("brew",{nothrow:!0});if(t!==null)return Yt=be(t),{binDir:Yt};await de([{name:"ca-certificates"}]);const r=new br.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Ue(),{fileName:"install-brew.sh"});return r.on("error",n=>{throw new Error(`Failedtodownloadthebrewinstallerscript:${n}`)}),await r.start(),ze("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Yt=Wa(),await Re(Yt,e.rcOptions),{binDir:Yt}}function Wa(){return J(Xa(),"bin")}function kh(){return J(Wa(),"brew")}function Xa(){if(process.platform==="darwin")return process.arch==="arm64"?"/opt/homebrew":"/usr/local";if(process.platform==="linux")return"/home/linuxbrew/.linuxbrew";throw new Error("Unsupported platform for brew")}function Fh(e,t){return t!==void 0&&t!==""?`${e}@${t}`:e}async function wE(e,t){const r=Fh(e,t),n=await Jf(r);if(n!==void 0)return n;const i=await Jf(e);return i!==void 0?i:gE(e,r)}async function Jf(e){try{const t=kh();return(await le(t,["--prefix",e],{stdio:"pipe"})).stdout}catch{return}}function gE(e,t){const r=Xa(),n=J(r,"opt",t);if(Qt(n))return n;const i=J(r,"opt",e);if(Qt(i))return i;const o=J(r,"Cellar",t);if(Qt(o))return o;const s=J(r,"Cellar",e);if(Qt(s))return s;const l=J(r,"lib",t);if(Qt(l))return l;const u=J(r,"lib",e);if(Qt(u))return u}le
`);for(const y of h){const v=y.split("=");if(v.length===2&&(v[0].trim()==="VERSION_ID"||v[0].trim()==="DISTRIB_RELEASE")){d=v[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return d}t._getOsVersion=p;function w(){const E="/etc/lsb-release",d="/etc/os-release";let f="";return c.existsSync(E)?f=c.readFileSync(E).toString():c.existsSync(d)&&(f=c.readFileSync(d).toString()),f}t._readLinuxVersionFile=w}(Ar,Ar.exports)),Ar.exports}var et={},qd;function nS(){if(qd)return et;qd=1;var e=et&&et.__createBinding||(Object.create?function(s,l,u,a){a===void 0&&(a=u);var c=Object.getOwnPropertyDescriptor(l,u);(!c||("get"in c?!l.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(s,a,c)}:function(s,l,u,a){a===void 0&&(a=u),s[a]=l[u]}),t=et&&et.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),r=et&&et.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&e(l,s,u);return t(l,s),l},n=et&&et.__awaiter||function(s,l,u,a){function c(m){return m instanceof u?m:new u(function(p){p(m)})}return new(u||(u=Promise))(function(m,p){function w(f){try{d(a.next(f))}catch(h){p(h)}}function E(f){try{d(a.throw(f))}catch(h){p(h)}}function d(f){f.done?m(f.value):c(f.value).then(w,E)}d((a=a.apply(s,l||[])).next())})};Object.defineProperty(et,"__esModule",{value:!0}),et.RetryHelper=void 0;const i=r(wr());class o{constructor(l,u,a){if(l<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=l,this.minSeconds=Math.floor(u),this.maxSeconds=Math.floor(a),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(l,u){return n(this,void 0,void 0,function*(){let a=1;for(;a<this.maxAttempts;){try{return yield l()}catch(m){if(u&&!u(m))throw m;i.info(m.message)}const c=this.getSleepAmount();i.info(`Waiting${c}secondsbeforetryingagain`),yield this.sleep(c),a++}return yield l()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(l){return n(this,void 0,void 0,function*(){return new Promise(u=>setTimeout(u,l*1e3))})}}return et.RetryHelper=o,et}var Ud;function iS(){if(Ud)return ae;Ud=1;var e=ae&&ae.__createBinding||(Object.create?function(D,L,N,j){j===void 0&&(j=N);var B=Object.getOwnPropertyDescriptor(L,N);(!B||("get"in B?!L.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return L[N]}}),Object.defineProperty(D,j,B)}:function(D,L,N,j){j===void 0&&(j=N),D[j]=L[N]}),t=ae&&ae.__setModuleDefault||(Object.create?function(D,L){Object.defineProperty(D,"default",{enumerable:!0,value:L})}:function(D,L){D.default=L}),r=ae&&ae.__importStar||function(D){if(D&&D.__esModule)return D;var L={};if(D!=null)for(var N in D)N!=="default"&&Object.prototype.hasOwnProperty.call(D,N)&&e(L,D,N);return t(L,D),L},n=ae&&ae.__awaiter||function(D,L,N,j){function B(ee){return ee instanceof N?ee:new N(function(Y){Y(ee)})}return new(N||(N=Promise))(function(ee,Y){function ke(xe){try{Ke(j.next(xe))}catch(Nt){Y(Nt)}}function Te(xe){try{Ke(j.throw(xe))}catch(Nt){Y(Nt)}}function Ke(xe){xe.done?ee(xe.value):B(xe.value).then(ke,Te)}Ke((j=j.apply(D,L||[])).next())})};Object.defineProperty(ae,"__esModule",{value:!0}),ae.evaluateVersions=ae.isExplicitVersion=ae.findFromManifest=ae.getManifestFromRepo=ae.findAllVersions=ae.find=ae.cacheFile=ae.cacheDir=ae.extractZip=ae.extractXar=ae.extractTar=ae.extract7z=ae.downloadTool=ae.HTTPError=void 0;const i=r(wr()),o=r(Np()),s=r(mp),l=r(je),u=r(rS()),a=r(it),c=r(ue),m=r(Ap),p=r(Hh()),w=r(Ur),E=r(xn),d=qr,f=ka(),h=nS();class y extends Error{constructor(L){super(`UnexpectedHTTPresponse:${L}`),this.httpStatusCode=L,Object.setPrototypeOf(this,new.target.prototype)}}ae.HTTPError=y;const v=process.platform==="win32",S=process.platform==="darwin",_="actions/tool-cache";function b(D,L,N,j){return n(this,void 0,void 0,function*(){L=L||c.join(ie(),s.randomUUID()
${w.stack}`:String(w);if(Ee.info(`Failedtoinstall${t}via${c}:${E}`),await kr(t)===null)throw new Error(`Failedtoinstall${t}via${c}:${w}.`)}else if(await kr(t)===null)throw new Error(`Failedtoinstall${t}asitwasnotfoundvia${c}orthesystempackagemanager`);return{binDir:u?await Jd():await Qd(e,m)}}function Jd(){return im()}async function Qd(e,t){const r=await rb(e),n=await eb(r,t);return await Re(n,ne),n}async function HS(){return await fe("pipx",{nothrow:!0})!==null}async function dn(e){return(await le(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode===0}async function zS(){let e=process.env.PIPX_HOME;if(e!==void 0)return e;const t=rt("~/.local/pipx");if(await ye(t))return t;switch(process.platform){case"win32":{e=rt("~/AppData/Local/pipx");break}case"darwin":{e=rt("~/Library/Application Support/pipx");break}default:{e=rt("~/.local/share/pipx");break}}return await Cr(e),await Cr(J(e,"trash")),await Cr(J(e,"shared")),await Cr(J(e,"venv")),e}const WS=Fe(zS,{promise:!0});async function XS(){if(process.env.PIPX_BIN_DIR!==void 0)return process.env.PIPX_BIN_DIR;const e=rt("~/.local/bin");return await Re(e,ne),await Cr(e),e}const im=Fe(XS,{promise:!0});let sn;async function KS(e){if(sn!==void 0)return sn;const t=e??nt("python",void 0,await Ut());return sn=(await rm({version:t,setupDir:"",arch:process.arch})).bin,sn}function YS(e){return e.replace(/\[.*]/g,"").trim()}async function JS(e,t){try{return(await le(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode===0}catch{return!1}}async function QS(e,t){try{const r=await le(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(r.exitCode!==0||typeof r.stdout!="string")return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const i of Object.values(n.venvs))if(i.metadata.main_package.package_or_url===t||i.metadata.main_package.package===t)return!0}catch{}return!1}async function ZS(e,t){return(await le(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode===0}async function eb(e,t){const n=(await Promise.all(e.map(o=>ye(J(o,ge(t)))))).findIndex(o=>o);if(n!==-1)return e[n];const i=fe.sync(ge(t),{nothrow:!0});return i!==null?be(i):e[e.length-1]}async function kr(e,t){if(process.platform==="linux"){Ee.info(`Installing${e}viathesystempackagemanager`);const r=e==="pipx"?Pe():!0;if(Pe())return _e(r?`python-${e}`:e);if(Ne())return Ce([{name:r?`python3-${e}`:e}]);if(me())return de([{name:r?`python3-${e}`:e}]);if(await Oe())return De([{name:r?`py3-${e}`:e}])}else if(process.platform==="darwin")return["venv"].includes(e)?null:Ge(e);return null}async function tb(e){const t=[];process.platform==="linux"?t.push("/home/runner/.local/bin/"):process.platform==="darwin"&&t.push("/usr/local/bin/");const r=await sm(e);return t.push(J(r,"Scripts"),J(r,"Scripts","bin"),J(r,"bin")),BS(t)}const rb=Fe(tb,{promise:!0});async function nb(e){return(await Ka.getExecOutput(`${e}-c"import sys;print(sys.base_exec_prefix);"`)).stdout.trim()}const sm=Fe(nb,{promise:!0});async function ib(e){try{const t=await sm(e),r=await Mh(e);if(r===void 0)return ve(`Failedtogettheversionof${e}`),!1;const n=J(t,"lib",`python${r.major}.${r.minor}`,"EXTERNALLY-MANAGED");return ye(n)}catch(t){return ve(`Failedtocheckif${e}isexternallymanaged:${t}`),!1}}const om=Fe(ib,{promise:!0});function sb({version:e}={}){return me()&&(e===void 0||e==="")?de([{name:"gcovr",version:e}]):ar("gcovr",e)}function ob(){return Ie("GCOV","llvm-cov gcov",ne)}function Zd(e){const t=jn(e),r=t!==null?Eh(t):e,n=r!==""?`gcov-${r}`:"gcov";return Ie("GCOV",n,ne)}const ct=["x64","amd64","x86_64","win64","64","amd64_x86","amd64_arm64"],fr=["x86","i386","ia32","win32","32","x32"],ut=["aarch64","arm64","woa64","arm"],ab=["armv7","armv7a"],cb=["powerpc64le","ppc64le"],ub=["sparc64"],lb=["sparcv9"];function am(e){return ut.includes(e)?"arm64":ct.includes(e)?"amd64":e}async function fb({version:e}={}){switch(process.platform){case"win32":return Le("bazelisk",e);case"darwin":return Ge("bazelisk",e);case"linux":{if(Pe())throw new Error("installing ba
apt-getupdate-o${Rr}`)}async function Zb(e){let t=e.replace(/apt-get install -y/g,`apt-getinstall-oDpkg::Options::="--force-overwrite"-o${Rr}-y--fix-broken`);const r=["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"];return await Promise.all(r.map(async n=>{const i=n.replace("$LLVM_VERSION","*");await iE(i)&&(_a(`Removingconflictingpackage${i}`),t=t.replace(n,""))})),t}function e0(e){return Oh()?e.replace(/apt-get/g,"nala"):e}function t0(e,t,r){return e===1?t.replace(/ -y \$PKG/g,`-yclang-format-${r}`):t}const ep=typeof __dirname=="string"?__dirname:ue.dirname(Lt(import.meta.url));async function r0(e,t,r){const n=await n0(t,r,e);z(`DownloadingLLVMfrom${n}`);const i=Kh(n);return{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:ge("clang"),extractFunction:i===ln.Tar||i===ln.TarGz||i===ln.TarXz?(o,s)=>process.platform==="win32"?yr(o,s,!0):rc(o,s,1):Yh(i)}}async function n0(e,t,r){const{keywords:n,optionalKeywords:i}=await i0(e,t),o=await Sn(J(ep,"github_llvm_llvm-project.json")),s=bn(o,{version:r,keywords:n,optionalKeywords:i,filterMapTag(a){return a.replace(/^llvmorg-/,"")}});if(s!==void 0)return`https://github.com/llvm/llvm-project/releases/download/${s.tag}/${s.name}`;const l=await Sn(J(ep,"llvm_org_releases.json")),u=bn(l,{version:r,keywords:n,optionalKeywords:i});if(u!==void 0)return`https://releases.llvm.org/${u.tag}/${u.name}`;throw new Error(`No asset found for version ${r} matching ${n} and ${i}`)}async function i0(e,t){const r=[],n=[];switch(e){case"win32":{n.push(".tar.xz",".tar.xz");const i=[];ct.includes(t)?(i.push("win64"),n.push(["x86_64","X64"])):fr.includes(t)?i.push("win32"):ut.includes(t)?i.push("woa64"):(z(`Using arch ${t} for LLVM`),i.push(t)),i.push("windows","Windows"),r.push(i);break}case"linux":{const i=["linux","Linux"];if(me()){n.push("ubuntu");const o=await Ut();if(o!==null){n.push(`${o[0]}`);const s=o[1]<10?`0${o[1]}`:`${o[1]}`;n.push(`${o[0]}.${s}`),n.push(`${o[0]}.${s}.${o[2]}`)}}else Ne()&&n.push("rhel");ct.includes(t)?r.push(["x86_64","X64"]):fr.includes(t)?r.push("x86"):ut.includes(t)?r.push("aarch64"):ab.includes(t)?r.push("armv7a"):cb.includes(t)?r.push("powerpc64le"):ub.includes(t)?r.push("sparc64"):(z(`Using arch ${t} for LLVM`),r.push(t)),r.push(i);break}case"darwin":{r.push(["apple","macos","macOS"]),ct.includes(t)?n.push(["x86_64","X64"]):ut.includes(t)?n.push(["arm64","ARM64"]):(z(`Using arch ${t} for LLVM`),r.push(t));break}case"freebsd":{r.push("freebsd"),ct.includes(t)?r.push("amd64"):fr.includes(t)?r.push("i386"):(z(`Using arch ${t} for LLVM`),r.push(t));break}case"solaris":{r.push("solaris"),ct.includes(t)?r.push("amd64"):lb.includes(t)?r.push("sparcv9"):(z(`Using arch ${t} for LLVM`),r.push(t));break}default:z(`Using ${e} ${t} for LLVM`),r.push(e,t);break}return{keywords:r,optionalKeywords:n}}async function s0({version:e,setupDir:t,arch:r}){const n=await gt("llvm",e,r0,t,r);return await a0(Or(e),r),n}async function o0(e,t){if(me())for(const r of["libtinfo5","libtinfo6"])try{await de([{name:r}])}catch{try{if(r==="libtinfo5"){z(`Failed to install ${r}
`),F=x.filter(k=>!!(k.match(/^\[ERROR.*\]/)&&!k.match(/Error in script usage. The correct usage is:$/)));if(F.length>0)throw new Error(`invalidparameters\r
-Thebinarydirectoryis${t.binDir}`)),r}const D0=/[.-]((?:\d{4}|\d+(?:\.\d+)*(?:-[\w.-]+)?(?:\+[\w.-]+)?)$)/;function k0(e){try{const t=e.match(D0);if(t===null)return{compiler:e,version:void 0};const r=t[1],n=e.slice(0,t.index).replace(/[.-]$/,"");return!r.match(/^\d{4}$/)&&jn(r)===null&&z(`Non-semverversionformat:${r}`),{compiler:n,version:r}}catch(t){return Ae(`Failedtoparsethecompilerinfo${e}:${t}`),{compiler:e,version:void 0}}}async function F0(e,t,r,n,i,o,s){let l;try{if(Ee.startGroup(`Installing${e}${t??""}`),e in fm)l=await hn({version:nt("llvm",t,r),setupDir:J(n,"llvm"),arch:i}),await ob();else if(e in dm){const u=nt("gcc",t,r);l=await Rn({version:u,setupDir:J(n,"gcc"),arch:i}),await Zd(u)}else if(e in pm){const u=nt("mingw",t,r);l=await nc({version:u,setupDir:J(n,"gcc"),arch:i}),await Zd(u)}else e in hm?l=await Lr({version:nt("msvc",t,r),setupDir:J(n,"msvc"),arch:i}):e in mm?await Nr():(l=null,s.push(`Unsupportedcompiler${e}`))}catch(u){Ae(u),u instanceof Error&&Ae(u.stack??""),s.push(`Failedtoinstallthe${e}compiler${t}`)}l!==null&&o.push(_m(e,l)),Ee.endGroup()}async function q0(e,t="npm"){try{return await fe("setup-cpp",{nothrow:!0})!==null?`setup-cpp@${e}alreadyinstalled`:(z(`Installingsetup-cpp@${e}via${t}...`),await le(t,["install","-g",`setup-cpp@${e}`],{stdio:"inherit",timeout:1e3*60*1}),`setup-cpp@${e}installedsuccessfully`)}catch(r){return new Error(`Failedtoinstallthesetup-cpp@${e}CLI:${r}.Ignoring...`)}}async function U0(e={}){const t=e.architecture??process.arch,r=process.env.SETUP_CPP_DIR??rt("~"),n=[],i=[],o=Vf.create({autoloadLocales:!0});Vf.addLocale(x_),__.addLocale(b_);let s,l;const u=await Ut(),a=e.compiler!==void 0?k0(e.compiler):void 0;if(!xS(e,[...ym,"compiler"],a))return{successMessages:[],errorMessages:["The same version must be used for llvm, clang-format and clang-tidy"]};Pe()&&typeof e.cppcheck=="string"&&typeof e.gcovr=="string"&&(z("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await _e("python-pygments"));const c=wm.filter(E=>{const d=e[E];return d!==void 0&&d!=="false"}),m=e["setup-cpp"]===void 0||e["setup-cpp"]?q0(La.version,e["node-package-manager"]):Promise.resolve(void 0);let p=!1;for(const E of c){const d=e[E],f=e.timeout!==void 0?Number.parseFloat(e.timeout)*60*1e3:void 0;if(s=Date.now(),await N0(E,d,u,t,r,n,i,f),l=Date.now(),z(`took${o.format(s,l)||"0 seconds"}`),i.length!==0&&vn.isCI){p=!0;break}}if(!p&&a!==void 0){const E=Date.now();await F0(a.compiler,a.version,u,r,t,n,i);const d=Date.now();z(`took${o.format(E,d)||"0 seconds"}`)}const w=await m;return typeof w=="string"&&n.push(w),await n_(ne),{successMessages:n,errorMessages:i}}async function j0(e){const t=vn.GITHUB_ACTIONS?Promise.resolve():M0(),r=G0(e);if(r.help)return V0(),0;if(r.version)return z(`${La.version}`),0;const{successMessages:n,errorMessages:i}=await U0(r);for(const o of n)Qy(o);for(const o of i)Ae(o);if((n.length!==0||i.length!==0)&&(z("setup-cpp finished"),!vn.GITHUB_ACTIONS))switch(process.platform){case"win32":{ve("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break}case"linux":case"darwin":{ve("Run `source~/.cpprc`orrestartyourshelltoupdatetheenvironment.");break}}returnawaitt,i.length===0?0:1}asyncfunctionM0(){try{awaitIy({pkg:La})}catch(e){ve(`Failedtocheckforupdates:${einstanceofError?e.message+e.stack:e}`)}}functionG0(e){constt=Object.fromEntries(cp.map(r=>[r,Lp(r)]));returnty(e,{string:[...cp,"timeout","node-package-manager"],default:t,alias:{h:"help",v:"version"},boolean:["help","version","setup-cpp"]})}functionV0(){z(`
`),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, --apt-fast, --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, --tar"}},["tools"])}process.env.SETUP_CPP_SKIP_MAIN!=="true"&&j0(process.argv).then(e=>{process.exitCode=e}).catch(e=>{Ae("main() panicked!"),Ae(e),process.exitCode=1});export{Vy as H,Ee as a,xt as b,at as c,Ka as e,$e as g,z as i,ye as p,G0 as parseArgs,Ry as r,tc as t,ve as w};