updates 13.2.0 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/updates.js +2 -2
- package/package.json +1 -1
package/bin/updates.js
CHANGED
|
@@ -66,7 +66,7 @@ Content-Type: ${n.type||"application/octet-stream"}\r
|
|
|
66
66
|
`)n=!1,g+=l(A,o,u),o=u;else if(!n&&t+r==="/*"){g+=A.slice(o,u),o=u,n=rf,u++;continue}else if(n===rf&&t+r==="*/"){u++,n=!1,g+=l(A,o,u+1),o=u+1;continue}}}return g+(n?l(A.substr(o)):A.substr(o))}});var af=y(di=>{"use strict";var of=L("fs"),sN=tf(),Zn=L("path"),oN=sf(),aN=di.parse=function(A){return/^\s*{/.test(A)?JSON.parse(oN(A)):sN.parse(A)},gN=di.file=function(){var A=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in A)if(typeof A[e]!="string")return;var t=Zn.join.apply(null,A),r;try{return of.readFileSync(t,"utf-8")}catch{return}},tJ=di.json=function(){var A=gN.apply(null,arguments);return A?aN(A):null},rJ=di.env=function(A,e){e=e||process.env;var t={},r=A.length;for(var i in e)if(i.toLowerCase().indexOf(A.toLowerCase())===0){for(var n=i.substring(r).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var g=t;n.forEach(function(u,h){!u||typeof g!="object"||(h===n.length-1&&(g[u]=e[i]),g[u]===void 0&&(g[u]={}),g=g[u])})}return t},iJ=di.find=function(){var A=Zn.join.apply(null,[].slice.call(arguments));function e(t,r){var i=Zn.join(t,r);try{return of.statSync(i),i}catch{if(Zn.dirname(t)!==t)return e(Zn.dirname(t),r)}}return e(process.cwd(),A)}});var If=y((sJ,hf)=>{"use strict";function lf(A){return A instanceof Buffer||A instanceof Date||A instanceof RegExp}function cf(A){if(A instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(A.length):new Buffer(A.length);return A.copy(e),e}else{if(A instanceof Date)return new Date(A.getTime());if(A instanceof RegExp)return new RegExp(A);throw new Error("Unexpected situation")}}function uf(A){var e=[];return A.forEach(function(t,r){typeof t=="object"&&t!==null?Array.isArray(t)?e[r]=uf(t):lf(t)?e[r]=cf(t):e[r]=yc({},t):e[r]=t}),e}function gf(A,e){return e==="__proto__"?void 0:A[e]}var yc=hf.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var A=arguments[0],e=Array.prototype.slice.call(arguments,1),t,r,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(r=gf(A,o),t=gf(n,o),t!==A)if(typeof t!="object"||t===null){A[o]=t;return}else if(Array.isArray(t)){A[o]=uf(t);return}else if(lf(t)){A[o]=cf(t);return}else if(typeof r!="object"||r===null||Array.isArray(r)){A[o]=yc({},t);return}else{A[o]=yc(r,t);return}})}),A}});var ta=y((oJ,Qf)=>{var Xn=af(),pi=L("path").join,lN=If(),Ef="/etc",Cf=process.platform==="win32",es=Cf?process.env.USERPROFILE:process.env.HOME;Qf.exports=function(A,e,t,r){if(typeof A!="string")throw new Error("rc(name): name *must* be string");t||(t=gc()(process.argv.slice(2))),e=(typeof e=="string"?Xn.json(e):e)||{},r=r||Xn.parse;var i=Xn.env(A+"_"),n=[e],o=[];function g(l){if(!(o.indexOf(l)>=0)){var u=Xn.file(l);u&&(n.push(r(u)),o.push(l))}}return Cf||[pi(Ef,A,"config"),pi(Ef,A+"rc")].forEach(g),es&&[pi(es,".config",A,"config"),pi(es,".config",A),pi(es,"."+A,"config"),pi(es,"."+A+"rc")].forEach(g),g(Xn.find("."+A+"rc")),i.config&&g(i.config),t.config&&g(t.config),lN.apply(null,n.concat([i,t,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var bf=y((aJ,mf)=>{var wc=L("url"),yf=ZB(),cN=yf.decodeBase64,uN=yf.encodeBase64,Bf=":_authToken",ff=":_auth",df=":username",pf=":_password";mf.exports=function(){var A,e;return arguments.length>=2?(A=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?A=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||ta()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),A=A||e.npmrc.registry,wf(A,e)||hN(e.npmrc)};function wf(A,e){for(var t=wc.parse(A,!1,!0),r;r!=="/"&&t.pathname!==r;){r=t.pathname||"/";var i="//"+t.host+r.replace(/\/$/,""),n=EN(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(A)?void 0:wf(wc.resolve(A,"."),e);t.pathname=wc.resolve(IN(r),"..")||"/"}}function hN(A){if(!!A._auth){var e=ra(A._auth);return{token:e,type:"Basic"}}}function IN(A){return A[A.length-1]==="/"?A:A+"/"}function EN(A,e){var t=CN(e[A+Bf]||e[A+"/"+Bf]);if(t)return t;var r=e[A+df]||e[A+"/"+df],i=e[A+pf]||e[A+"/"+pf],n=QN(r,i);if(n)return n;var o=BN(e[A+ff]||e[A+"/"+ff]);if(o)return o}function ra(A){return A.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function CN(A){if(!!A){var e=ra(A);return{token:e,type:"Bearer"}}}function QN(A,e){if(!(!A||!e)){var t=cN(ra(e)),r=uN(A+":"+t);return{token:r,type:"Basic",password:t,username:A}}}function BN(A){if(!!A){var e=ra(A);return{token:e,type:"Basic"}}}});var Df=y((gJ,Rf)=>{Rf.exports=function(A,e){var t=e||ta()("npm",{registry:"https://registry.npmjs.org/"}),r=t[A+":registry"]||t.registry;return r.slice(-1)==="/"?r:r+"/"}});var As=y((lJ,Sf)=>{var fN="2.0.0",dN=Number.MAX_SAFE_INTEGER||9007199254740991,pN=16;Sf.exports={SEMVER_SPEC_VERSION:fN,MAX_LENGTH:256,MAX_SAFE_INTEGER:dN,MAX_SAFE_COMPONENT_LENGTH:pN}});var ts=y((cJ,kf)=>{var yN=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...A)=>console.error("SEMVER",...A):()=>{};kf.exports=yN});var dr=y((_t,Lf)=>{var{MAX_SAFE_COMPONENT_LENGTH:mc}=As(),wN=ts();_t=Lf.exports={};var mN=_t.re=[],M=_t.src=[],U=_t.t={},bN=0,x=(A,e,t)=>{let r=bN++;wN(A,r,e),U[A]=r,M[r]=e,mN[r]=new RegExp(e,t?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*");x("NUMERICIDENTIFIERLOOSE","[0-9]+");x("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");x("MAINVERSION",`(${M[U.NUMERICIDENTIFIER]})\\.(${M[U.NUMERICIDENTIFIER]})\\.(${M[U.NUMERICIDENTIFIER]})`);x("MAINVERSIONLOOSE",`(${M[U.NUMERICIDENTIFIERLOOSE]})\\.(${M[U.NUMERICIDENTIFIERLOOSE]})\\.(${M[U.NUMERICIDENTIFIERLOOSE]})`);x("PRERELEASEIDENTIFIER",`(?:${M[U.NUMERICIDENTIFIER]}|${M[U.NONNUMERICIDENTIFIER]})`);x("PRERELEASEIDENTIFIERLOOSE",`(?:${M[U.NUMERICIDENTIFIERLOOSE]}|${M[U.NONNUMERICIDENTIFIER]})`);x("PRERELEASE",`(?:-(${M[U.PRERELEASEIDENTIFIER]}(?:\\.${M[U.PRERELEASEIDENTIFIER]})*))`);x("PRERELEASELOOSE",`(?:-?(${M[U.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${M[U.PRERELEASEIDENTIFIERLOOSE]})*))`);x("BUILDIDENTIFIER","[0-9A-Za-z-]+");x("BUILD",`(?:\\+(${M[U.BUILDIDENTIFIER]}(?:\\.${M[U.BUILDIDENTIFIER]})*))`);x("FULLPLAIN",`v?${M[U.MAINVERSION]}${M[U.PRERELEASE]}?${M[U.BUILD]}?`);x("FULL",`^${M[U.FULLPLAIN]}$`);x("LOOSEPLAIN",`[v=\\s]*${M[U.MAINVERSIONLOOSE]}${M[U.PRERELEASELOOSE]}?${M[U.BUILD]}?`);x("LOOSE",`^${M[U.LOOSEPLAIN]}$`);x("GTLT","((?:<|>)?=?)");x("XRANGEIDENTIFIERLOOSE",`${M[U.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);x("XRANGEIDENTIFIER",`${M[U.NUMERICIDENTIFIER]}|x|X|\\*`);x("XRANGEPLAIN",`[v=\\s]*(${M[U.XRANGEIDENTIFIER]})(?:\\.(${M[U.XRANGEIDENTIFIER]})(?:\\.(${M[U.XRANGEIDENTIFIER]})(?:${M[U.PRERELEASE]})?${M[U.BUILD]}?)?)?`);x("XRANGEPLAINLOOSE",`[v=\\s]*(${M[U.XRANGEIDENTIFIERLOOSE]})(?:\\.(${M[U.XRANGEIDENTIFIERLOOSE]})(?:\\.(${M[U.XRANGEIDENTIFIERLOOSE]})(?:${M[U.PRERELEASELOOSE]})?${M[U.BUILD]}?)?)?`);x("XRANGE",`^${M[U.GTLT]}\\s*${M[U.XRANGEPLAIN]}$`);x("XRANGELOOSE",`^${M[U.GTLT]}\\s*${M[U.XRANGEPLAINLOOSE]}$`);x("COERCE",`(^|[^\\d])(\\d{1,${mc}})(?:\\.(\\d{1,${mc}}))?(?:\\.(\\d{1,${mc}}))?(?:$|[^\\d])`);x("COERCERTL",M[U.COERCE],!0);x("LONETILDE","(?:~>?)");x("TILDETRIM",`(\\s*)${M[U.LONETILDE]}\\s+`,!0);_t.tildeTrimReplace="$1~";x("TILDE",`^${M[U.LONETILDE]}${M[U.XRANGEPLAIN]}$`);x("TILDELOOSE",`^${M[U.LONETILDE]}${M[U.XRANGEPLAINLOOSE]}$`);x("LONECARET","(?:\\^)");x("CARETTRIM",`(\\s*)${M[U.LONECARET]}\\s+`,!0);_t.caretTrimReplace="$1^";x("CARET",`^${M[U.LONECARET]}${M[U.XRANGEPLAIN]}$`);x("CARETLOOSE",`^${M[U.LONECARET]}${M[U.XRANGEPLAINLOOSE]}$`);x("COMPARATORLOOSE",`^${M[U.GTLT]}\\s*(${M[U.LOOSEPLAIN]})$|^$`);x("COMPARATOR",`^${M[U.GTLT]}\\s*(${M[U.FULLPLAIN]})$|^$`);x("COMPARATORTRIM",`(\\s*)${M[U.GTLT]}\\s*(${M[U.LOOSEPLAIN]}|${M[U.XRANGEPLAIN]})`,!0);_t.comparatorTrimReplace="$1$2$3";x("HYPHENRANGE",`^\\s*(${M[U.XRANGEPLAIN]})\\s+-\\s+(${M[U.XRANGEPLAIN]})\\s*$`);x("HYPHENRANGELOOSE",`^\\s*(${M[U.XRANGEPLAINLOOSE]})\\s+-\\s+(${M[U.XRANGEPLAINLOOSE]})\\s*$`);x("STAR","(<|>)?=?\\s*\\*");x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var rs=y((uJ,Nf)=>{var RN=["includePrerelease","loose","rtl"],DN=A=>A?typeof A!="object"?{loose:!0}:RN.filter(e=>A[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Nf.exports=DN});var bc=y((hJ,Mf)=>{var Hf=/^[0-9]+$/,Ff=(A,e)=>{let t=Hf.test(A),r=Hf.test(e);return t&&r&&(A=+A,e=+e),A===e?0:t&&!r?-1:r&&!t?1:A<e?-1:1},SN=(A,e)=>Ff(e,A);Mf.exports={compareIdentifiers:Ff,rcompareIdentifiers:SN}});var Ke=y((IJ,vf)=>{var ia=ts(),{MAX_LENGTH:Uf,MAX_SAFE_INTEGER:na}=As(),{re:Tf,t:Jf}=dr(),kN=rs(),{compareIdentifiers:yi}=bc(),QA=class{constructor(e,t){if(t=kN(t),e instanceof QA){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Uf)throw new TypeError(`version is longer than ${Uf} characters`);ia("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Tf[Jf.LOOSE]:Tf[Jf.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>na||this.major<0)throw new TypeError("Invalid major version");if(this.minor>na||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>na||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<na)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ia("SemVer.compare",this.version,this.options,e),!(e instanceof QA)){if(typeof e=="string"&&e===this.version)return 0;e=new QA(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof QA||(e=new QA(e,this.options)),yi(this.major,e.major)||yi(this.minor,e.minor)||yi(this.patch,e.patch)}comparePre(e){if(e instanceof QA||(e=new QA(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(ia("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return yi(r,i)}while(++t)}compareBuild(e){e instanceof QA||(e=new QA(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(ia("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return yi(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(yi(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};vf.exports=QA});var pr=y((EJ,_f)=>{var{MAX_LENGTH:LN}=As(),{re:Gf,t:qf}=dr(),Yf=Ke(),NN=rs(),HN=(A,e)=>{if(e=NN(e),A instanceof Yf)return A;if(typeof A!="string"||A.length>LN||!(e.loose?Gf[qf.LOOSE]:Gf[qf.FULL]).test(A))return null;try{return new Yf(A,e)}catch{return null}};_f.exports=HN});var Of=y((CJ,xf)=>{var FN=pr(),MN=(A,e)=>{let t=FN(A,e);return t?t.version:null};xf.exports=MN});var Wf=y((QJ,Pf)=>{var UN=pr(),TN=(A,e)=>{let t=UN(A.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Pf.exports=TN});var $f=y((BJ,zf)=>{var Vf=Ke(),JN=(A,e,t,r)=>{typeof t=="string"&&(r=t,t=void 0);try{return new Vf(A instanceof Vf?A.version:A,t).inc(e,r).version}catch{return null}};zf.exports=JN});var TA=y((fJ,Kf)=>{var jf=Ke(),vN=(A,e,t)=>new jf(A,t).compare(new jf(e,t));Kf.exports=vN});var sa=y((dJ,Zf)=>{var GN=TA(),qN=(A,e,t)=>GN(A,e,t)===0;Zf.exports=qN});var Ad=y((pJ,ed)=>{var Xf=pr(),YN=sa(),_N=(A,e)=>{if(YN(A,e))return null;{let t=Xf(A),r=Xf(e),i=t.prerelease.length||r.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let g in t)if((g==="major"||g==="minor"||g==="patch")&&t[g]!==r[g])return n+g;return o}};ed.exports=_N});var rd=y((yJ,td)=>{var xN=Ke(),ON=(A,e)=>new xN(A,e).major;td.exports=ON});var nd=y((wJ,id)=>{var PN=Ke(),WN=(A,e)=>new PN(A,e).minor;id.exports=WN});var od=y((mJ,sd)=>{var VN=Ke(),zN=(A,e)=>new VN(A,e).patch;sd.exports=zN});var gd=y((bJ,ad)=>{var $N=pr(),jN=(A,e)=>{let t=$N(A,e);return t&&t.prerelease.length?t.prerelease:null};ad.exports=jN});var cd=y((RJ,ld)=>{var KN=TA(),ZN=(A,e,t)=>KN(e,A,t);ld.exports=ZN});var hd=y((DJ,ud)=>{var XN=TA(),e1=(A,e)=>XN(A,e,!0);ud.exports=e1});var oa=y((SJ,Ed)=>{var Id=Ke(),A1=(A,e,t)=>{let r=new Id(A,t),i=new Id(e,t);return r.compare(i)||r.compareBuild(i)};Ed.exports=A1});var Qd=y((kJ,Cd)=>{var t1=oa(),r1=(A,e)=>A.sort((t,r)=>t1(t,r,e));Cd.exports=r1});var fd=y((LJ,Bd)=>{var i1=oa(),n1=(A,e)=>A.sort((t,r)=>i1(r,t,e));Bd.exports=n1});var is=y((NJ,dd)=>{var s1=TA(),o1=(A,e,t)=>s1(A,e,t)>0;dd.exports=o1});var aa=y((HJ,pd)=>{var a1=TA(),g1=(A,e,t)=>a1(A,e,t)<0;pd.exports=g1});var Rc=y((FJ,yd)=>{var l1=TA(),c1=(A,e,t)=>l1(A,e,t)!==0;yd.exports=c1});var ga=y((MJ,wd)=>{var u1=TA(),h1=(A,e,t)=>u1(A,e,t)>=0;wd.exports=h1});var la=y((UJ,md)=>{var I1=TA(),E1=(A,e,t)=>I1(A,e,t)<=0;md.exports=E1});var Dc=y((TJ,bd)=>{var C1=sa(),Q1=Rc(),B1=is(),f1=ga(),d1=aa(),p1=la(),y1=(A,e,t,r)=>{switch(e){case"===":return typeof A=="object"&&(A=A.version),typeof t=="object"&&(t=t.version),A===t;case"!==":return typeof A=="object"&&(A=A.version),typeof t=="object"&&(t=t.version),A!==t;case"":case"=":case"==":return C1(A,t,r);case"!=":return Q1(A,t,r);case">":return B1(A,t,r);case">=":return f1(A,t,r);case"<":return d1(A,t,r);case"<=":return p1(A,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}};bd.exports=y1});var Dd=y((JJ,Rd)=>{var w1=Ke(),m1=pr(),{re:ca,t:ua}=dr(),b1=(A,e)=>{if(A instanceof w1)return A;if(typeof A=="number"&&(A=String(A)),typeof A!="string")return null;e=e||{};let t=null;if(!e.rtl)t=A.match(ca[ua.COERCE]);else{let r;for(;(r=ca[ua.COERCERTL].exec(A))&&(!t||t.index+t[0].length!==A.length);)(!t||r.index+r[0].length!==t.index+t[0].length)&&(t=r),ca[ua.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;ca[ua.COERCERTL].lastIndex=-1}return t===null?null:m1(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};Rd.exports=b1});var kd=y((vJ,Sd)=>{"use strict";Sd.exports=function(A){A.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Nd=y((GJ,Ld)=>{"use strict";Ld.exports=j;j.Node=yr;j.create=j;function j(A){var e=this;if(e instanceof j||(e=new j),e.tail=null,e.head=null,e.length=0,A&&typeof A.forEach=="function")A.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var t=0,r=arguments.length;t<r;t++)e.push(arguments[t]);return e}j.prototype.removeNode=function(A){if(A.list!==this)throw new Error("removing node which does not belong to this list");var e=A.next,t=A.prev;return e&&(e.prev=t),t&&(t.next=e),A===this.head&&(this.head=e),A===this.tail&&(this.tail=t),A.list.length--,A.next=null,A.prev=null,A.list=null,e};j.prototype.unshiftNode=function(A){if(A!==this.head){A.list&&A.list.removeNode(A);var e=this.head;A.list=this,A.next=e,e&&(e.prev=A),this.head=A,this.tail||(this.tail=A),this.length++}};j.prototype.pushNode=function(A){if(A!==this.tail){A.list&&A.list.removeNode(A);var e=this.tail;A.list=this,A.prev=e,e&&(e.next=A),this.tail=A,this.head||(this.head=A),this.length++}};j.prototype.push=function(){for(var A=0,e=arguments.length;A<e;A++)D1(this,arguments[A]);return this.length};j.prototype.unshift=function(){for(var A=0,e=arguments.length;A<e;A++)S1(this,arguments[A]);return this.length};j.prototype.pop=function(){if(!!this.tail){var A=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,A}};j.prototype.shift=function(){if(!!this.head){var A=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,A}};j.prototype.forEach=function(A,e){e=e||this;for(var t=this.head,r=0;t!==null;r++)A.call(e,t.value,r,this),t=t.next};j.prototype.forEachReverse=function(A,e){e=e||this;for(var t=this.tail,r=this.length-1;t!==null;r--)A.call(e,t.value,r,this),t=t.prev};j.prototype.get=function(A){for(var e=0,t=this.head;t!==null&&e<A;e++)t=t.next;if(e===A&&t!==null)return t.value};j.prototype.getReverse=function(A){for(var e=0,t=this.tail;t!==null&&e<A;e++)t=t.prev;if(e===A&&t!==null)return t.value};j.prototype.map=function(A,e){e=e||this;for(var t=new j,r=this.head;r!==null;)t.push(A.call(e,r.value,this)),r=r.next;return t};j.prototype.mapReverse=function(A,e){e=e||this;for(var t=new j,r=this.tail;r!==null;)t.push(A.call(e,r.value,this)),r=r.prev;return t};j.prototype.reduce=function(A,e){var t,r=this.head;if(arguments.length>1)t=e;else if(this.head)r=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;r!==null;i++)t=A(t,r.value,i),r=r.next;return t};j.prototype.reduceReverse=function(A,e){var t,r=this.tail;if(arguments.length>1)t=e;else if(this.tail)r=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;r!==null;i--)t=A(t,r.value,i),r=r.prev;return t};j.prototype.toArray=function(){for(var A=new Array(this.length),e=0,t=this.head;t!==null;e++)A[e]=t.value,t=t.next;return A};j.prototype.toArrayReverse=function(){for(var A=new Array(this.length),e=0,t=this.tail;t!==null;e++)A[e]=t.value,t=t.prev;return A};j.prototype.slice=function(A,e){e=e||this.length,e<0&&(e+=this.length),A=A||0,A<0&&(A+=this.length);var t=new j;if(e<A||e<0)return t;A<0&&(A=0),e>this.length&&(e=this.length);for(var r=0,i=this.head;i!==null&&r<A;r++)i=i.next;for(;i!==null&&r<e;r++,i=i.next)t.push(i.value);return t};j.prototype.sliceReverse=function(A,e){e=e||this.length,e<0&&(e+=this.length),A=A||0,A<0&&(A+=this.length);var t=new j;if(e<A||e<0)return t;A<0&&(A=0),e>this.length&&(e=this.length);for(var r=this.length,i=this.tail;i!==null&&r>e;r--)i=i.prev;for(;i!==null&&r>A;r--,i=i.prev)t.push(i.value);return t};j.prototype.splice=function(A,e,...t){A>this.length&&(A=this.length-1),A<0&&(A=this.length+A);for(var r=0,i=this.head;i!==null&&r<A;r++)i=i.next;for(var n=[],r=0;i&&r<e;r++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var r=0;r<t.length;r++)i=R1(this,i,t[r]);return n};j.prototype.reverse=function(){for(var A=this.head,e=this.tail,t=A;t!==null;t=t.prev){var r=t.prev;t.prev=t.next,t.next=r}return this.head=e,this.tail=A,this};function R1(A,e,t){var r=e===A.head?new yr(t,null,e,A):new yr(t,e,e.next,A);return r.next===null&&(A.tail=r),r.prev===null&&(A.head=r),A.length++,r}function D1(A,e){A.tail=new yr(e,A.tail,null,A),A.head||(A.head=A.tail),A.length++}function S1(A,e){A.head=new yr(e,null,A.head,A),A.tail||(A.tail=A.head),A.length++}function yr(A,e,t,r){if(!(this instanceof yr))return new yr(A,e,t,r);this.list=r,this.value=A,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{kd()(j)}catch{}});var Td=y((qJ,Ud)=>{"use strict";var k1=Nd(),wr=Symbol("max"),pt=Symbol("length"),wi=Symbol("lengthCalculator"),ss=Symbol("allowStale"),mr=Symbol("maxAge"),dt=Symbol("dispose"),Hd=Symbol("noDisposeOnSet"),ve=Symbol("lruList"),PA=Symbol("cache"),Md=Symbol("updateAgeOnGet"),Sc=()=>1,Lc=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[wr]=e.max||1/0,r=e.length||Sc;if(this[wi]=typeof r!="function"?Sc:r,this[ss]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[mr]=e.maxAge||0,this[dt]=e.dispose,this[Hd]=e.noDisposeOnSet||!1,this[Md]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[wr]=e||1/0,ns(this)}get max(){return this[wr]}set allowStale(e){this[ss]=!!e}get allowStale(){return this[ss]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[mr]=e,ns(this)}get maxAge(){return this[mr]}set lengthCalculator(e){typeof e!="function"&&(e=Sc),e!==this[wi]&&(this[wi]=e,this[pt]=0,this[ve].forEach(t=>{t.length=this[wi](t.value,t.key),this[pt]+=t.length})),ns(this)}get lengthCalculator(){return this[wi]}get length(){return this[pt]}get itemCount(){return this[ve].length}rforEach(e,t){t=t||this;for(let r=this[ve].tail;r!==null;){let i=r.prev;Fd(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[ve].head;r!==null;){let i=r.next;Fd(this,e,r,t),r=i}}keys(){return this[ve].toArray().map(e=>e.key)}values(){return this[ve].toArray().map(e=>e.value)}reset(){this[dt]&&this[ve]&&this[ve].length&&this[ve].forEach(e=>this[dt](e.key,e.value)),this[PA]=new Map,this[ve]=new k1,this[pt]=0}dump(){return this[ve].map(e=>ha(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ve]}set(e,t,r){if(r=r||this[mr],r&&typeof r!="number")throw new TypeError("maxAge must be a number");let i=r?Date.now():0,n=this[wi](t,e);if(this[PA].has(e)){if(n>this[wr])return mi(this,this[PA].get(e)),!1;let l=this[PA].get(e).value;return this[dt]&&(this[Hd]||this[dt](e,l.value)),l.now=i,l.maxAge=r,l.value=t,this[pt]+=n-l.length,l.length=n,this.get(e),ns(this),!0}let o=new Nc(e,t,n,i,r);return o.length>this[wr]?(this[dt]&&this[dt](e,t),!1):(this[pt]+=o.length,this[ve].unshift(o),this[PA].set(e,this[ve].head),ns(this),!0)}has(e){if(!this[PA].has(e))return!1;let t=this[PA].get(e).value;return!ha(this,t)}get(e){return kc(this,e,!0)}peek(e){return kc(this,e,!1)}pop(){let e=this[ve].tail;return e?(mi(this,e),e.value):null}del(e){mi(this,this[PA].get(e))}load(e){this.reset();let t=Date.now();for(let r=e.length-1;r>=0;r--){let i=e[r],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-t;o>0&&this.set(i.k,i.v,o)}}}prune(){this[PA].forEach((e,t)=>kc(this,t,!1))}},kc=(A,e,t)=>{let r=A[PA].get(e);if(r){let i=r.value;if(ha(A,i)){if(mi(A,r),!A[ss])return}else t&&(A[Md]&&(r.value.now=Date.now()),A[ve].unshiftNode(r));return i.value}},ha=(A,e)=>{if(!e||!e.maxAge&&!A[mr])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:A[mr]&&t>A[mr]},ns=A=>{if(A[pt]>A[wr])for(let e=A[ve].tail;A[pt]>A[wr]&&e!==null;){let t=e.prev;mi(A,e),e=t}},mi=(A,e)=>{if(e){let t=e.value;A[dt]&&A[dt](t.key,t.value),A[pt]-=t.length,A[PA].delete(t.key),A[ve].removeNode(e)}},Nc=class{constructor(e,t,r,i,n){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=n||0}},Fd=(A,e,t,r)=>{let i=t.value;ha(A,i)&&(mi(A,t),A[ss]||(i=void 0)),i&&e.call(r,i.value,i.key,A)};Ud.exports=Lc});var JA=y((YJ,qd)=>{var br=class{constructor(e,t){if(t=N1(t),e instanceof br)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new br(e.raw,t);if(e instanceof Hc)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!vd(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&T1(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let r=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Jd.get(r);if(i)return i;let n=this.options.loose,o=n?cA[AA.HYPHENRANGELOOSE]:cA[AA.HYPHENRANGE];e=e.replace(o,W1(this.options.includePrerelease)),ue("hyphen replace",e),e=e.replace(cA[AA.COMPARATORTRIM],F1),ue("comparator trim",e),e=e.replace(cA[AA.TILDETRIM],M1),e=e.replace(cA[AA.CARETTRIM],U1),e=e.split(/\s+/).join(" ");let g=e.split(" ").map(I=>J1(I,this.options)).join(" ").split(/\s+/).map(I=>P1(I,this.options));n&&(g=g.filter(I=>(ue("loose invalid filter",I,this.options),!!I.match(cA[AA.COMPARATORLOOSE])))),ue("range list",g);let l=new Map,u=g.map(I=>new Hc(I,this.options));for(let I of u){if(vd(I))return[I];l.set(I.value,I)}l.size>1&&l.has("")&&l.delete("");let h=[...l.values()];return Jd.set(r,h),h}intersects(e,t){if(!(e instanceof br))throw new TypeError("a Range is required");return this.set.some(r=>Gd(r,t)&&e.set.some(i=>Gd(i,t)&&r.every(n=>i.every(o=>n.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new H1(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(V1(this.set[t],e,this.options))return!0;return!1}};qd.exports=br;var L1=Td(),Jd=new L1({max:1e3}),N1=rs(),Hc=os(),ue=ts(),H1=Ke(),{re:cA,t:AA,comparatorTrimReplace:F1,tildeTrimReplace:M1,caretTrimReplace:U1}=dr(),vd=A=>A.value==="<0.0.0-0",T1=A=>A.value==="",Gd=(A,e)=>{let t=!0,r=A.slice(),i=r.pop();for(;t&&r.length;)t=r.every(n=>i.intersects(n,e)),i=r.pop();return t},J1=(A,e)=>(ue("comp",A,e),A=q1(A,e),ue("caret",A),A=v1(A,e),ue("tildes",A),A=_1(A,e),ue("xrange",A),A=O1(A,e),ue("stars",A),A),tA=A=>!A||A.toLowerCase()==="x"||A==="*",v1=(A,e)=>A.trim().split(/\s+/).map(t=>G1(t,e)).join(" "),G1=(A,e)=>{let t=e.loose?cA[AA.TILDELOOSE]:cA[AA.TILDE];return A.replace(t,(r,i,n,o,g)=>{ue("tilde",A,r,i,n,o,g);let l;return tA(i)?l="":tA(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:tA(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:g?(ue("replaceTilde pr",g),l=`>=${i}.${n}.${o}-${g} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,ue("tilde return",l),l})},q1=(A,e)=>A.trim().split(/\s+/).map(t=>Y1(t,e)).join(" "),Y1=(A,e)=>{ue("caret",A,e);let t=e.loose?cA[AA.CARETLOOSE]:cA[AA.CARET],r=e.includePrerelease?"-0":"";return A.replace(t,(i,n,o,g,l)=>{ue("caret",A,i,n,o,g,l);let u;return tA(n)?u="":tA(o)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:tA(g)?n==="0"?u=`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:u=`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:l?(ue("replaceCaret pr",l),n==="0"?o==="0"?u=`>=${n}.${o}.${g}-${l} <${n}.${o}.${+g+1}-0`:u=`>=${n}.${o}.${g}-${l} <${n}.${+o+1}.0-0`:u=`>=${n}.${o}.${g}-${l} <${+n+1}.0.0-0`):(ue("no pr"),n==="0"?o==="0"?u=`>=${n}.${o}.${g}${r} <${n}.${o}.${+g+1}-0`:u=`>=${n}.${o}.${g}${r} <${n}.${+o+1}.0-0`:u=`>=${n}.${o}.${g} <${+n+1}.0.0-0`),ue("caret return",u),u})},_1=(A,e)=>(ue("replaceXRanges",A,e),A.split(/\s+/).map(t=>x1(t,e)).join(" ")),x1=(A,e)=>{A=A.trim();let t=e.loose?cA[AA.XRANGELOOSE]:cA[AA.XRANGE];return A.replace(t,(r,i,n,o,g,l)=>{ue("xRange",A,r,i,n,o,g,l);let u=tA(n),h=u||tA(o),I=h||tA(g),E=I;return i==="="&&E&&(i=""),l=e.includePrerelease?"-0":"",u?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&E?(h&&(o=0),g=0,i===">"?(i=">=",h?(n=+n+1,o=0,g=0):(o=+o+1,g=0)):i==="<="&&(i="<",h?n=+n+1:o=+o+1),i==="<"&&(l="-0"),r=`${i+n}.${o}.${g}${l}`):h?r=`>=${n}.0.0${l} <${+n+1}.0.0-0`:I&&(r=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),ue("xRange return",r),r})},O1=(A,e)=>(ue("replaceStars",A,e),A.trim().replace(cA[AA.STAR],"")),P1=(A,e)=>(ue("replaceGTE0",A,e),A.trim().replace(cA[e.includePrerelease?AA.GTE0PRE:AA.GTE0],"")),W1=A=>(e,t,r,i,n,o,g,l,u,h,I,E,C)=>(tA(r)?t="":tA(i)?t=`>=${r}.0.0${A?"-0":""}`:tA(n)?t=`>=${r}.${i}.0${A?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${A?"-0":""}`,tA(u)?l="":tA(h)?l=`<${+u+1}.0.0-0`:tA(I)?l=`<${u}.${+h+1}.0-0`:E?l=`<=${u}.${h}.${I}-${E}`:A?l=`<${u}.${h}.${+I+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),V1=(A,e,t)=>{for(let r=0;r<A.length;r++)if(!A[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<A.length;r++)if(ue(A[r].semver),A[r].semver!==Hc.ANY&&A[r].semver.prerelease.length>0){let i=A[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var os=y((_J,Pd)=>{var as=Symbol("SemVer ANY"),bi=class{static get ANY(){return as}constructor(e,t){if(t=z1(t),e instanceof bi){if(e.loose===!!t.loose)return e;e=e.value}Mc("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===as?this.value="":this.value=this.operator+this.semver.version,Mc("comp",this)}parse(e){let t=this.options.loose?Yd[_d.COMPARATORLOOSE]:Yd[_d.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new xd(r[2],this.options.loose):this.semver=as}toString(){return this.value}test(e){if(Mc("Comparator.test",e,this.options.loose),this.semver===as||e===as)return!0;if(typeof e=="string")try{e=new xd(e,this.options)}catch{return!1}return Fc(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof bi))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Od(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Od(this.value,t).test(e.semver);let r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),g=Fc(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Fc(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||n&&o||g||l}};Pd.exports=bi;var z1=rs(),{re:Yd,t:_d}=dr(),Fc=Dc(),Mc=ts(),xd=Ke(),Od=JA()});var gs=y((xJ,Wd)=>{var $1=JA(),j1=(A,e,t)=>{try{e=new $1(e,t)}catch{return!1}return e.test(A)};Wd.exports=j1});var zd=y((OJ,Vd)=>{var K1=JA(),Z1=(A,e)=>new K1(A,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" "));Vd.exports=Z1});var jd=y((PJ,$d)=>{var X1=Ke(),eH=JA(),AH=(A,e,t)=>{let r=null,i=null,n=null;try{n=new eH(e,t)}catch{return null}return A.forEach(o=>{n.test(o)&&(!r||i.compare(o)===-1)&&(r=o,i=new X1(r,t))}),r};$d.exports=AH});var Zd=y((WJ,Kd)=>{var tH=Ke(),rH=JA(),iH=(A,e,t)=>{let r=null,i=null,n=null;try{n=new rH(e,t)}catch{return null}return A.forEach(o=>{n.test(o)&&(!r||i.compare(o)===1)&&(r=o,i=new tH(r,t))}),r};Kd.exports=iH});var Ap=y((VJ,ep)=>{var Uc=Ke(),nH=JA(),Xd=is(),sH=(A,e)=>{A=new nH(A,e);let t=new Uc("0.0.0");if(A.test(t)||(t=new Uc("0.0.0-0"),A.test(t)))return t;t=null;for(let r=0;r<A.set.length;++r){let i=A.set[r],n=null;i.forEach(o=>{let g=new Uc(o.semver.version);switch(o.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!n||Xd(g,n))&&(n=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!t||Xd(t,n))&&(t=n)}return t&&A.test(t)?t:null};ep.exports=sH});var rp=y((zJ,tp)=>{var oH=JA(),aH=(A,e)=>{try{return new oH(A,e).range||"*"}catch{return null}};tp.exports=aH});var Ia=y(($J,op)=>{var gH=Ke(),sp=os(),{ANY:lH}=sp,cH=JA(),uH=gs(),ip=is(),np=aa(),hH=la(),IH=ga(),EH=(A,e,t,r)=>{A=new gH(A,r),e=new cH(e,r);let i,n,o,g,l;switch(t){case">":i=ip,n=hH,o=np,g=">",l=">=";break;case"<":i=np,n=IH,o=ip,g="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(uH(A,e,r))return!1;for(let u=0;u<e.set.length;++u){let h=e.set[u],I=null,E=null;if(h.forEach(C=>{C.semver===lH&&(C=new sp(">=0.0.0")),I=I||C,E=E||C,i(C.semver,I.semver,r)?I=C:o(C.semver,E.semver,r)&&(E=C)}),I.operator===g||I.operator===l||(!E.operator||E.operator===g)&&n(A,E.semver))return!1;if(E.operator===l&&o(A,E.semver))return!1}return!0};op.exports=EH});var gp=y((jJ,ap)=>{var CH=Ia(),QH=(A,e,t)=>CH(A,e,">",t);ap.exports=QH});var cp=y((KJ,lp)=>{var BH=Ia(),fH=(A,e,t)=>BH(A,e,"<",t);lp.exports=fH});var Ip=y((ZJ,hp)=>{var up=JA(),dH=(A,e,t)=>(A=new up(A,t),e=new up(e,t),A.intersects(e));hp.exports=dH});var Cp=y((XJ,Ep)=>{var pH=gs(),yH=TA();Ep.exports=(A,e,t)=>{let r=[],i=null,n=null,o=A.sort((h,I)=>yH(h,I,t));for(let h of o)pH(h,e,t)?(n=h,i||(i=h)):(n&&r.push([i,n]),n=null,i=null);i&&r.push([i,null]);let g=[];for(let[h,I]of r)h===I?g.push(h):!I&&h===o[0]?g.push("*"):I?h===o[0]?g.push(`<=${I}`):g.push(`${h} - ${I}`):g.push(`>=${h}`);let l=g.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length<u.length?l:e}});var pp=y((ev,dp)=>{var Qp=JA(),Ea=os(),{ANY:Tc}=Ea,ls=gs(),Jc=TA(),wH=(A,e,t={})=>{if(A===e)return!0;A=new Qp(A,t),e=new Qp(e,t);let r=!1;e:for(let i of A.set){for(let n of e.set){let o=mH(i,n,t);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},mH=(A,e,t)=>{if(A===e)return!0;if(A.length===1&&A[0].semver===Tc){if(e.length===1&&e[0].semver===Tc)return!0;t.includePrerelease?A=[new Ea(">=0.0.0-0")]:A=[new Ea(">=0.0.0")]}if(e.length===1&&e[0].semver===Tc){if(t.includePrerelease)return!0;e=[new Ea(">=0.0.0")]}let r=new Set,i,n;for(let C of A)C.operator===">"||C.operator===">="?i=Bp(i,C,t):C.operator==="<"||C.operator==="<="?n=fp(n,C,t):r.add(C.semver);if(r.size>1)return null;let o;if(i&&n){if(o=Jc(i.semver,n.semver,t),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let C of r){if(i&&!ls(C,String(i),t)||n&&!ls(C,String(n),t))return null;for(let B of e)if(!ls(C,String(B),t))return!1;return!0}let g,l,u,h,I=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,E=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;I&&I.prerelease.length===1&&n.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let C of e){if(h=h||C.operator===">"||C.operator===">=",u=u||C.operator==="<"||C.operator==="<=",i){if(E&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===E.major&&C.semver.minor===E.minor&&C.semver.patch===E.patch&&(E=!1),C.operator===">"||C.operator===">="){if(g=Bp(i,C,t),g===C&&g!==i)return!1}else if(i.operator===">="&&!ls(i.semver,String(C),t))return!1}if(n){if(I&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===I.major&&C.semver.minor===I.minor&&C.semver.patch===I.patch&&(I=!1),C.operator==="<"||C.operator==="<="){if(l=fp(n,C,t),l===C&&l!==n)return!1}else if(n.operator==="<="&&!ls(n.semver,String(C),t))return!1}if(!C.operator&&(n||i)&&o!==0)return!1}return!(i&&u&&!n&&o!==0||n&&h&&!i&&o!==0||E||I)},Bp=(A,e,t)=>{if(!A)return e;let r=Jc(A.semver,e.semver,t);return r>0?A:r<0||e.operator===">"&&A.operator===">="?e:A},fp=(A,e,t)=>{if(!A)return e;let r=Jc(A.semver,e.semver,t);return r<0?A:r>0||e.operator==="<"&&A.operator==="<="?e:A};dp.exports=wH});var mp=y((Av,wp)=>{var vc=dr(),bH=As(),RH=Ke(),yp=bc(),DH=pr(),SH=Of(),kH=Wf(),LH=$f(),NH=Ad(),HH=rd(),FH=nd(),MH=od(),UH=gd(),TH=TA(),JH=cd(),vH=hd(),GH=oa(),qH=Qd(),YH=fd(),_H=is(),xH=aa(),OH=sa(),PH=Rc(),WH=ga(),VH=la(),zH=Dc(),$H=Dd(),jH=os(),KH=JA(),ZH=gs(),XH=zd(),eF=jd(),AF=Zd(),tF=Ap(),rF=rp(),iF=Ia(),nF=gp(),sF=cp(),oF=Ip(),aF=Cp(),gF=pp();wp.exports={parse:DH,valid:SH,clean:kH,inc:LH,diff:NH,major:HH,minor:FH,patch:MH,prerelease:UH,compare:TH,rcompare:JH,compareLoose:vH,compareBuild:GH,sort:qH,rsort:YH,gt:_H,lt:xH,eq:OH,neq:PH,gte:WH,lte:VH,cmp:zH,coerce:$H,Comparator:jH,Range:KH,satisfies:ZH,toComparators:XH,maxSatisfying:eF,minSatisfying:AF,minVersion:tF,validRange:rF,outside:iF,gtr:nF,ltr:sF,intersects:oF,simplifyRange:aF,subset:gF,SemVer:RH,re:vc.re,src:vc.src,tokens:vc.t,SEMVER_SPEC_VERSION:bH.SEMVER_SPEC_VERSION,compareIdentifiers:yp.compareIdentifiers,rcompareIdentifiers:yp.rcompareIdentifiers}});var kp=y((tv,Sp)=>{Sp.exports=function(A,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,r=e.align||[],i=e.stringLength||function(l){return String(l).length},n=Rp(A,function(l,u){return Dp(u,function(h,I){var E=bp(h);(!l[I]||E>l[I])&&(l[I]=E)}),l},[]),o=Ca(A,function(l){return Ca(l,function(u,h){var I=String(u);if(r[h]==="."){var E=bp(I),C=n[h]+(/\./.test(I)?1:2)-(i(I)-E);return I+Array(C).join(" ")}else return I})}),g=Rp(o,function(l,u){return Dp(u,function(h,I){var E=i(h);(!l[I]||E>l[I])&&(l[I]=E)}),l},[]);return Ca(o,function(l){return Ca(l,function(u,h){var I=g[h]-i(u)||0,E=Array(Math.max(I+1,1)).join(" ");return r[h]==="r"||r[h]==="."?E+u:r[h]==="c"?Array(Math.ceil(I/2+1)).join(" ")+u+Array(Math.floor(I/2+1)).join(" "):u+E}).join(t).replace(/\s+$/,"")}).join(`
|
|
67
67
|
`)};function bp(A){var e=/\.[^.]*$/.exec(A);return e?e.index+1:A.length}function Rp(A,e,t){if(A.reduce)return A.reduce(e,t);for(var r=0,i=arguments.length>=3?t:A[r++];r<A.length;r++)e(i,A[r],r);return i}function Dp(A,e){if(A.forEach)return A.forEach(e);for(var t=0;t<A.length;t++)e.call(A,A[t],t)}function Ca(A,e){if(A.map)return A.map(e);for(var t=[],r=0;r<A.length;r++)t.push(e.call(A,A[r],r));return t}});var Fp=y((nv,Hp)=>{var Gc=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lF=typeof AbortController<"u",Lp=lF?AbortController:Object.assign(class{constructor(){this.signal=new Lp.AbortSignal}abort(){this.signal.aborted=!0}},{AbortSignal:class{constructor(){this.aborted=!1}}}),xc=new Set,qc=(A,e)=>{let t=`LRU_CACHE_OPTION_${A}`;Qa(t)&&Oc(t,`${A} option`,`options.${e}`,rt)},Yc=(A,e)=>{let t=`LRU_CACHE_METHOD_${A}`;if(Qa(t)){let{prototype:r}=rt,{get:i}=Object.getOwnPropertyDescriptor(r,A);Oc(t,`${A} method`,`cache.${e}()`,i)}},cF=(A,e)=>{let t=`LRU_CACHE_PROPERTY_${A}`;if(Qa(t)){let{prototype:r}=rt,{get:i}=Object.getOwnPropertyDescriptor(r,A);Oc(t,`${A} property`,`cache.${e}`,i)}},Qa=A=>typeof process=="object"&&process&&!xc.has(A),Oc=(A,e,t,r)=>{xc.add(A);let i=`The ${e} is deprecated. Please use ${t} instead.`;process.emitWarning(i,"DeprecationWarning",A,r)},Rr=A=>A&&A===Math.floor(A)&&A>0&&isFinite(A),Np=A=>Rr(A)?A<=Math.pow(2,8)?Uint8Array:A<=Math.pow(2,16)?Uint16Array:A<=Math.pow(2,32)?Uint32Array:A<=Number.MAX_SAFE_INTEGER?Ri:null:null,Ri=class extends Array{constructor(e){super(e),this.fill(0)}},_c=class{constructor(e){let t=e?Np(e):Array;this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},rt=class{constructor(e={}){let{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,allowStale:g,dispose:l,disposeAfter:u,noDisposeOnSet:h,noUpdateTTL:I,maxSize:E=0,sizeCalculation:C,fetchMethod:B}=e,{length:w,maxAge:p,stale:d}=e instanceof rt?{}:e;if(t!==0&&!Rr(t))throw new TypeError("max option must be a nonnegative integer");let b=t?Np(t):Array;if(!b)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=E,this.sizeCalculation=C||w,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=B||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new b(t),this.prev=new b(t),this.head=0,this.tail=0,this.free=new _c(t),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!I,this.maxSize!==0){if(!Rr(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!g||!!d,this.updateAgeOnGet=!!o,this.ttlResolution=Rr(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=r||p||0,this.ttl){if(!Rr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let k="LRU_CACHE_UNBOUNDED";if(Qa(k)){xc.add(k);let R="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";process.emitWarning(R,"UnboundedCacheWarning",k,rt)}}d&&qc("stale","allowStale"),p&&qc("maxAge","ttl"),w&&qc("length","sizeCalculation")}getRemainingTTL(e){return this.has(e)?1/0:0}initializeTTLTracking(){this.ttls=new Ri(this.max),this.starts=new Ri(this.max),this.setItemTTL=(r,i)=>{if(this.starts[r]=i!==0?Gc.now():0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){let n=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);n.unref&&n.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?Gc.now():0};let e=0,t=()=>{let r=Gc.now();if(this.ttlResolution>0){e=r;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||t())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(e||t())-this.starts[r]>this.ttls[r]}updateItemAge(e){}setItemTTL(e,t){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Ri(this.max),this.removeItemSize=e=>this.calculatedSize-=this.sizes[e],this.requireSize=(e,t,r,i)=>{if(!Rr(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(t,e),!Rr(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return r},this.addItemSize=(e,t,r,i)=>{this.sizes[e]=i;let n=this.maxSize-this.sizes[e];for(;this.calculatedSize>n;)this.evict();this.calculatedSize+=this.sizes[e]},this.delete=e=>{if(this.size!==0){let t=this.keyMap.get(e);t!==void 0&&(this.calculatedSize-=this.sizes[t])}return rt.prototype.delete.call(this,e)}}removeItemSize(e){}addItemSize(e,t,r,i){}requireSize(e,t,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.head));)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;!(!this.isValidIndex(t)||((e||!this.isStale(t))&&(yield t),t===this.tail));)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(let e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(let e of this.indexes())yield this.keyList[e]}*rkeys(){for(let e of this.rindexes())yield this.keyList[e]}*values(){for(let e of this.indexes())yield this.valList[e]}*rvalues(){for(let e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(let r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],t)}forEach(e,t=this){for(let r of this.indexes())e.call(t,this.valList[r],this.keyList[r],this)}rforEach(e,t=this){for(let r of this.rindexes())e.call(t,this.valList[r],this.keyList[r],this)}get prune(){return Yc("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){let e=[];for(let t of this.indexes()){let r=this.keyList[t],n={value:this.valList[t]};this.ttls&&(n.ttl=this.ttls[t]),this.sizes&&(n.size=this.sizes[t]),e.unshift([r,n])}return e}load(e){this.clear();for(let[t,r]of e)this.set(t,r.value,r)}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:n=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL}={}){n=this.requireSize(e,t,n,o);let l=this.size===0?void 0:this.keyMap.get(e);if(l===void 0)l=this.newIndex(),this.keyList[l]=e,this.valList[l]=t,this.keyMap.set(e,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,t,e,n),g=!1;else{let u=this.valList[l];t!==u&&(this.isBackgroundFetch(u)?u.__abortController.abort():i||(this.dispose(u,e,"set"),this.disposeAfter&&this.disposed.push([u,e,"set"])),this.removeItemSize(l),this.valList[l]=t,this.addItemSize(l,t,e,n)),this.moveToTail(l)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),g||this.setItemTTL(l,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max?this.evict():this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(),e}}evict(){let e=this.head,t=this.keyList[e],r=this.valList[e];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,t,"evict"),this.disposeAfter&&this.disposed.push([r,t,"evict"])),this.removeItemSize(e),this.head=this.next[e],this.keyMap.delete(t),this.size--,e}has(e){return this.keyMap.has(e)&&!this.isStale(this.keyMap.get(e))}peek(e,{allowStale:t=this.allowStale}={}){let r=this.keyMap.get(e);if(r!==void 0&&(t||!this.isStale(r)))return this.valList[r]}backgroundFetch(e,t,r){let i=t===void 0?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;let n=new Lp,o={signal:n.signal,options:r},g=Promise.resolve(this.fetchMethod(e,i,o)).then(l=>(n.signal.aborted||this.set(e,l,o.options),l));return g.__abortController=n,g.__staleWhileFetching=i,t===void 0?(this.set(e,g,o.options),t=this.keyMap.get(e)):this.valList[t]=g,g}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,ttl:i=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:o=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:r});let u={allowStale:t,updateAgeOnGet:r,ttl:i,noDisposeOnSet:n,size:o,sizeCalculation:g,noUpdateTTL:l},h=this.keyMap.get(e);if(h===void 0)return this.backgroundFetch(e,h,u);{let I=this.valList[h];if(this.isBackgroundFetch(I))return t&&I.__staleWhileFetching!==void 0?I.__staleWhileFetching:I;if(!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),I;let E=this.backgroundFetch(e,h,u);return t&&E.__staleWhileFetching!==void 0?E.__staleWhileFetching:E}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet}={}){let i=this.keyMap.get(e);if(i!==void 0){let n=this.valList[i],o=this.isBackgroundFetch(n);return this.isStale(i)?o?t?n.__staleWhileFetching:void 0:(this.delete(e),t?n:void 0):o?void 0:(this.moveToTail(i),r&&this.updateItemAge(i),n)}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Yc("del","delete"),this.delete}delete(e){let t=!1;if(this.size!==0){let r=this.keyMap.get(e);if(r!==void 0)if(t=!0,this.size===1)this.clear();else{this.removeItemSize(r);let i=this.valList[r];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(let e of this.rindexes({allowStale:!0})){let t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{let r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Yc("reset","clear"),this.clear}get length(){return cF("length","size"),this.size}};Hp.exports=rt});var Tp=y((sv,Up)=>{"use strict";var K=(...A)=>A.every(e=>e)?A.join(""):"",De=A=>A?encodeURIComponent(A):"",Mp=A=>A.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),uF={sshtemplate:({domain:A,user:e,project:t,committish:r})=>`git@${A}:${e}/${t}.git${K("#",r)}`,sshurltemplate:({domain:A,user:e,project:t,committish:r})=>`git+ssh://git@${A}/${e}/${t}.git${K("#",r)}`,edittemplate:({domain:A,user:e,project:t,committish:r,editpath:i,path:n})=>`https://${A}/${e}/${t}${K("/",i,"/",De(r||"HEAD"),"/",n)}`,browsetemplate:({domain:A,user:e,project:t,committish:r,treepath:i})=>`https://${A}/${e}/${t}${K("/",i,"/",De(r))}`,browsetreetemplate:({domain:A,user:e,project:t,committish:r,treepath:i,path:n,fragment:o,hashformat:g})=>`https://${A}/${e}/${t}/${i}/${De(r||"HEAD")}/${n}${K("#",g(o||""))}`,browseblobtemplate:({domain:A,user:e,project:t,committish:r,blobpath:i,path:n,fragment:o,hashformat:g})=>`https://${A}/${e}/${t}/${i}/${De(r||"HEAD")}/${n}${K("#",g(o||""))}`,docstemplate:({domain:A,user:e,project:t,treepath:r,committish:i})=>`https://${A}/${e}/${t}${K("/",r,"/",De(i))}#readme`,httpstemplate:({auth:A,domain:e,user:t,project:r,committish:i})=>`git+https://${K(A,"@")}${e}/${t}/${r}.git${K("#",i)}`,filetemplate:({domain:A,user:e,project:t,committish:r,path:i})=>`https://${A}/${e}/${t}/raw/${De(r||"HEAD")}/${i}`,shortcuttemplate:({type:A,user:e,project:t,committish:r})=>`${A}:${e}/${t}${K("#",r)}`,pathtemplate:({user:A,project:e,committish:t})=>`${A}/${e}${K("#",t)}`,bugstemplate:({domain:A,user:e,project:t})=>`https://${A}/${e}/${t}/issues`,hashformat:Mp},xt={};xt.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:A,user:e,project:t,committish:r,path:i})=>`https://${K(A,"@")}raw.githubusercontent.com/${e}/${t}/${De(r||"HEAD")}/${i}`,gittemplate:({auth:A,domain:e,user:t,project:r,committish:i})=>`git://${K(A,"@")}${e}/${t}/${r}.git${K("#",i)}`,tarballtemplate:({domain:A,user:e,project:t,committish:r})=>`https://codeload.${A}/${e}/${t}/tar.gz/${De(r||"HEAD")}`,extract:A=>{let[,e,t,r,i]=A.pathname.split("/",5);if(!(r&&r!=="tree")&&(r||(i=A.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:i}}};xt.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:A,user:e,project:t,committish:r,treepath:i,path:n,editpath:o})=>`https://${A}/${e}/${t}${K("/",i,"/",De(r||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:A,user:e,project:t,committish:r})=>`https://${A}/${e}/${t}/get/${De(r||"HEAD")}.tar.gz`,extract:A=>{let[,e,t,r]=A.pathname.split("/",4);if(!["get"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:A.hash.slice(1)}}};xt.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:A,domain:e,user:t,project:r,committish:i})=>`git+https://${K(A,"@")}${e}/${t}/${r}.git${K("#",i)}`,tarballtemplate:({domain:A,user:e,project:t,committish:r})=>`https://${A}/${e}/${t}/repository/archive.tar.gz?ref=${De(r||"HEAD")}`,extract:A=>{let e=A.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),r=t.pop();r.endsWith(".git")&&(r=r.slice(0,-4));let i=t.join("/");if(!(!i||!r))return{user:i,project:r,committish:A.hash.slice(1)}}};xt.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:A,project:e,committish:t})=>`git@${A}:${e}.git${K("#",t)}`,sshurltemplate:({domain:A,project:e,committish:t})=>`git+ssh://git@${A}/${e}.git${K("#",t)}`,edittemplate:({domain:A,user:e,project:t,committish:r,editpath:i})=>`https://${A}/${e}/${t}${K("/",De(r))}/${i}`,browsetemplate:({domain:A,project:e,committish:t})=>`https://${A}/${e}${K("/",De(t))}`,browsetreetemplate:({domain:A,project:e,committish:t,path:r,hashformat:i})=>`https://${A}/${e}${K("/",De(t))}${K("#",i(r))}`,browseblobtemplate:({domain:A,project:e,committish:t,path:r,hashformat:i})=>`https://${A}/${e}${K("/",De(t))}${K("#",i(r))}`,docstemplate:({domain:A,project:e,committish:t})=>`https://${A}/${e}${K("/",De(t))}`,httpstemplate:({domain:A,project:e,committish:t})=>`git+https://${A}/${e}.git${K("#",t)}`,filetemplate:({user:A,project:e,committish:t,path:r})=>`https://gist.githubusercontent.com/${A}/${e}/raw${K("/",De(t))}/${r}`,shortcuttemplate:({type:A,project:e,committish:t})=>`${A}:${e}${K("#",t)}`,pathtemplate:({project:A,committish:e})=>`${A}${K("#",e)}`,bugstemplate:({domain:A,project:e})=>`https://${A}/${e}`,gittemplate:({domain:A,project:e,committish:t})=>`git://${A}/${e}.git${K("#",t)}`,tarballtemplate:({project:A,committish:e})=>`https://codeload.github.com/gist/${A}/tar.gz/${De(e||"HEAD")}`,extract:A=>{let[,e,t,r]=A.pathname.split("/",4);if(r!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:A.hash.slice(1)}}},hashformat:function(A){return A&&"file-"+Mp(A)}};xt.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:A,user:e,project:t,committish:r,path:i})=>`https://${A}/${e}/${t}/blob/${De(r)||"HEAD"}/${i}`,httpstemplate:({domain:A,user:e,project:t,committish:r})=>`https://${A}/${e}/${t}.git${K("#",r)}`,tarballtemplate:({domain:A,user:e,project:t,committish:r})=>`https://${A}/${e}/${t}/archive/${De(r)||"HEAD"}.tar.gz`,bugstemplate:({user:A,project:e})=>`https://todo.sr.ht/${A}/${e}`,extract:A=>{let[,e,t,r]=A.pathname.split("/",4);if(!["archive"].includes(r)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:A.hash.slice(1)}}};for(let[A,e]of Object.entries(xt))xt[A]=Object.assign({},uF,e);Up.exports=xt});var Wc=y((ov,vp)=>{var hF=L("url"),Pc=(A,e,t)=>{let r=A.indexOf(t);return A.lastIndexOf(e,r>-1?r:1/0)},Jp=A=>{try{return new hF.URL(A)}catch{}},IF=(A,e)=>{let t=A.indexOf(":"),r=A.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,r))return A;let i=A.indexOf("@");return i>-1?i>t?`git+ssh://${A}`:A:A.indexOf("//")===t+1?A:`${A.slice(0,t+1)}//${A.slice(t+1)}`},EF=A=>{let e=Pc(A,"@","#"),t=Pc(A,":","#");return t>e&&(A=A.slice(0,t)+"/"+A.slice(t+1)),Pc(A,":","#")===-1&&A.indexOf("//")===-1&&(A=`git+ssh://${A}`),A};vp.exports=(A,e)=>{let t=e?IF(A,e):A;return Jp(t)||Jp(EF(t))}});var qp=y((av,Gp)=>{"use strict";var CF=Wc(),QF=A=>{let e=A.indexOf("#"),t=A.indexOf("/"),r=A.indexOf("/",t+1),i=A.indexOf(":"),n=/\s/.exec(A),o=A.indexOf("@"),g=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,u=i===-1||e>-1&&i>e,h=r===-1||e>-1&&r>e,I=t>0,E=e>-1?A[e-1]!=="/":!A.endsWith("/"),C=!A.startsWith(".");return g&&I&&E&&C&&l&&u&&h};Gp.exports=(A,e,{gitHosts:t,protocols:r})=>{var w,p;if(!A)return;let i=QF(A)?`github:${A}`:A,n=CF(i,r);if(!n)return;let o=t.byShortcut[n.protocol],g=t.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||g;if(!l)return;let u=t[o||g],h=null;((w=r[n.protocol])==null?void 0:w.auth)&&(n.username||n.password)&&(h=`${n.username}${n.password?":"+n.password:""}`);let I=null,E=null,C=null,B=null;try{if(o){let d=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,b=d.indexOf("@");b>-1&&(d=d.slice(b+1));let k=d.lastIndexOf("/");k>-1?(E=decodeURIComponent(d.slice(0,k)),E||(E=null),C=decodeURIComponent(d.slice(k+1))):C=decodeURIComponent(d),C.endsWith(".git")&&(C=C.slice(0,-4)),n.hash&&(I=decodeURIComponent(n.hash.slice(1))),B="shortcut"}else{if(!u.protocols.includes(n.protocol))return;let d=u.extract(n);if(!d)return;E=d.user&&decodeURIComponent(d.user),C=decodeURIComponent(d.project),I=decodeURIComponent(d.committish),B=((p=r[n.protocol])==null?void 0:p.name)||n.protocol.slice(0,-1)}}catch(d){if(d instanceof URIError)return;throw d}return[l,E,h,C,I,B,e]}});var _p=y((gv,Yp)=>{"use strict";var BF=Fp(),fF=Tp(),dF=qp(),pF=Wc(),Vc=new BF({max:1e3}),Ot,cs,Ne,xe,it=class{constructor(e,t,r,i,n,o,g={}){Ge(this,Ne);Object.assign(this,V(it,Ot)[e],{type:e,user:t,auth:r,project:i,committish:n,default:o,opts:g})}static addHost(e,t){V(it,Ot)[e]=t,V(it,Ot).byDomain[t.domain]=e,V(it,Ot).byShortcut[`${e}:`]=e,V(it,cs)[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let r=e+JSON.stringify(t||{});if(!Vc.has(r)){let i=dF(e,t,{gitHosts:V(it,Ot),protocols:V(it,cs)});Vc.set(r,i?new it(...i):void 0)}return Vc.get(r)}static parseUrl(e){return pF(e)}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return qe(this,Ne,xe).call(this,this.sshtemplate,e)}sshurl(e){return qe(this,Ne,xe).call(this,this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?qe(this,Ne,xe).call(this,this.browsetemplate,e):typeof t[0]!="string"?qe(this,Ne,xe).call(this,this.browsetreetemplate,{...t[0],path:e}):qe(this,Ne,xe).call(this,this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?qe(this,Ne,xe).call(this,this.browseblobtemplate,{...t[0],path:e}):qe(this,Ne,xe).call(this,this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return qe(this,Ne,xe).call(this,this.docstemplate,e)}bugs(e){return qe(this,Ne,xe).call(this,this.bugstemplate,e)}https(e){return qe(this,Ne,xe).call(this,this.httpstemplate,e)}git(e){return qe(this,Ne,xe).call(this,this.gittemplate,e)}shortcut(e){return qe(this,Ne,xe).call(this,this.shortcuttemplate,e)}path(e){return qe(this,Ne,xe).call(this,this.pathtemplate,e)}tarball(e){return qe(this,Ne,xe).call(this,this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return qe(this,Ne,xe).call(this,this.filetemplate,{...t,path:e})}edit(e,t){return qe(this,Ne,xe).call(this,this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}},Di=it;Ot=new WeakMap,cs=new WeakMap,Ne=new WeakSet,xe=function(e,t){if(typeof e!="function")return null;let r={...this,...this.opts,...t};r.path||(r.path=""),r.path.startsWith("/")&&(r.path=r.path.slice(1)),r.noCommittish&&(r.committish=null);let i=e(r);return r.noGitPlus&&i.startsWith("git+")?i.slice(4):i},Ge(Di,Ot,{byShortcut:{},byDomain:{}}),Ge(Di,cs,{"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}});for(let[A,e]of Object.entries(fF))Di.addHost(A,e);Yp.exports=Di});function Za({onlyFirst:A=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,A?void 0:"g")}var Yo=fA(AB(),1);var oc=fA(iB(),1);var nB=oc.default.HttpProxyAgent,sB=oc.default.HttpsProxyAgent;var _n=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,r]of e)this.onEviction(t,r.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let r=t.get(e);return this._getItemValue(e,r)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,r]=e;this.cache.has(t)||this._deleteIfExpired(t,r)===!1&&(yield e)}for(let e of this.cache){let[t,r]=e;this._deleteIfExpired(t,r)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:r=this.maxAge}={}){let i=typeof r=="number"&&r!==Number.POSITIVE_INFINITY?Date.now()+r:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:i}):this._set(e,{value:t,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],r=t.length-e;r<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(r>0&&this._emitEvictions(t.slice(0,r)),this.oldCache=new Map(t.slice(r)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,r]=e;this._deleteIfExpired(t,r)===!1&&(yield[t,r.value])}for(let e of this.oldCache){let[t,r]=e;this.cache.has(t)||this._deleteIfExpired(t,r)===!1&&(yield[t,r.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let r=e[t],[i,n]=r;this._deleteIfExpired(i,n)===!1&&(yield[i,n.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let r=e[t],[i,n]=r;this.cache.has(i)||this._deleteIfExpired(i,n)===!1&&(yield[i,n.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[r,i]of this.entriesAscending())e.call(t,i,r,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var lB=fA(aB(),1);import{Agent as pL}from"http";import{Agent as yL}from"https";var wL={agentCacheSize:512,undici:!1},gB={maxSockets:64,keepAlive:!1},xn=class extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,xn)}};function ac(A,e={}){let t={...wL,...e},r=new _n({maxSize:t.agentCacheSize});function i(o,g={}){let{origin:l,protocol:u}=new URL(o),h=g!=null&&g.noProxy?null:(0,lB.getProxyForUrl)(o),I=JSON.stringify({proxyUrl:h,origin:l,...g});if(r.has(I))return r.get(I);let E,C=u==="https:";if("noProxy"in g&&delete g.noProxy,e.undici){let B={...g};"keepAlive"in B&&(B.pipelining=B.keepAlive?1:0,delete B.keepAlive),"maxSockets"in B&&(B.connections=B.maxSockets,delete B.maxSockets),h?E=new Yo.ProxyAgent({...B,uri:h}):E=new Yo.Agent(B)}else h?E=new(C?sB:nB)({...g,proxy:h}):E=new(C?yL:pL)(g);return r.set(I,E),E}let n=(o,{timeout:g=0,agentOpts:l={},...u}={})=>new Promise((h,I)=>{var B;if(!e.undici&&!("agent"in u)){let w=i(o,{...gB,...l},e.undici);w&&(u.agent=w)}else if(e.undici&&!("dispatcher"in u)){let w=i(o,{...gB,...l},e.undici);w&&(u.dispatcher=w)}let E,C;g&&(!("signal"in u)&&globalThis.AbortController&&(C=new AbortController,u.signal=C.signal),E=setTimeout(()=>{var p;(p=C==null?void 0:C.abort)==null||p.call(C);let w=new xn(`${u.method||"GET"} ${o} timed out after ${g}ms`);I(w)},g),(B=E==null?void 0:E.unref)==null||B.call(E)),A(o,u).then(w=>{E&&clearTimeout(E),h(w)}).catch(w=>{if(E&&clearTimeout(E),w.name==="AbortError")return h(null);I(w)})});return n.clearCache=()=>{for(let o of r.values())"destroy"in o&&o.destroy();r.clear()},n}var jp=fA(gc(),1);import KL from"http";import ZL from"https";import Qi from"zlib";import $B,{PassThrough as jB,pipeline as Bi}from"stream";import{Buffer as Xo}from"buffer";function bL(A){if(!/^data:/i.test(A))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');A=A.replace(/\r?\n/g,"");let e=A.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let t=A.substring(5,e).split(";"),r="",i=!1,n=t[0]||"text/plain",o=n;for(let h=1;h<t.length;h++)t[h]==="base64"?i=!0:(o+=`;${t[h]}`,t[h].indexOf("charset=")===0&&(r=t[h].substring(8)));!t[0]&&!r.length&&(o+=";charset=US-ASCII",r="US-ASCII");let g=i?"base64":"ascii",l=unescape(A.substring(e+1)),u=Buffer.from(l,g);return u.type=n,u.typeFull=o,u.charset=r,u}var IB=bL;Pn();Oo();import Yt,{PassThrough as UB}from"stream";import{types as TB,deprecate as Bc,promisify as _L}from"util";import{Buffer as UA}from"buffer";var Bt=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var aA=class extends Bt{constructor(e,t,r){super(e,t),r&&(this.code=this.errno=r.code,this.erroredSysCall=r.syscall)}};var Po=Symbol.toStringTag,hc=A=>typeof A=="object"&&typeof A.append=="function"&&typeof A.delete=="function"&&typeof A.get=="function"&&typeof A.getAll=="function"&&typeof A.has=="function"&&typeof A.set=="function"&&typeof A.sort=="function"&&A[Po]==="URLSearchParams",$n=A=>A&&typeof A=="object"&&typeof A.arrayBuffer=="function"&&typeof A.type=="string"&&typeof A.stream=="function"&&typeof A.constructor=="function"&&/^(Blob|File)$/.test(A[Po]),bB=A=>typeof A=="object"&&(A[Po]==="AbortSignal"||A[Po]==="EventTarget"),RB=(A,e)=>{let t=new URL(e).hostname,r=new URL(A).hostname;return t===r||t.endsWith(`.${r}`)},DB=(A,e)=>{let t=new URL(e).protocol,r=new URL(A).protocol;return t===r};var xL=_L(Yt.pipeline),gA=Symbol("Body internals"),tt=class{constructor(e,{size:t=0}={}){let r=null;e===null?e=null:hc(e)?e=UA.from(e.toString()):$n(e)||UA.isBuffer(e)||(TB.isAnyArrayBuffer(e)?e=UA.from(e):ArrayBuffer.isView(e)?e=UA.from(e.buffer,e.byteOffset,e.byteLength):e instanceof Yt||(e instanceof Er?(e=mB(e),r=e.type.split("=")[1]):e=UA.from(String(e))));let i=e;UA.isBuffer(e)?i=Yt.Readable.from(e):$n(e)&&(i=Yt.Readable.from(e.stream())),this[gA]={body:e,stream:i,boundary:r,disturbed:!1,error:null},this.size=t,e instanceof Yt&&e.on("error",n=>{let o=n instanceof Bt?n:new aA(`Invalid response body while trying to fetch ${this.url}: ${n.message}`,"system",n);this[gA].error=o})}get body(){return this[gA].stream}get bodyUsed(){return this[gA].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:r}=await Qc(this);return e.slice(t,t+r)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let r=new Er,i=new URLSearchParams(await this.text());for(let[n,o]of i)r.append(n,o);return r}let{toFormData:t}=await Promise.resolve().then(()=>(MB(),FB));return t(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[gA].body&&this[gA].body.type||"",t=await this.arrayBuffer();return new Qt([t],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Qc(this);return new TextDecoder().decode(e)}buffer(){return Qc(this)}};tt.prototype.buffer=Bc(tt.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(tt.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:Bc(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Qc(A){if(A[gA].disturbed)throw new TypeError(`body used already for: ${A.url}`);if(A[gA].disturbed=!0,A[gA].error)throw A[gA].error;let{body:e}=A;if(e===null)return UA.alloc(0);if(!(e instanceof Yt))return UA.alloc(0);let t=[],r=0;try{for await(let i of e){if(A.size>0&&r+i.length>A.size){let n=new aA(`content size at ${A.url} over limit: ${A.size}`,"max-size");throw e.destroy(n),n}r+=i.length,t.push(i)}}catch(i){throw i instanceof Bt?i:new aA(`Invalid response body while trying to fetch ${A.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return t.every(i=>typeof i=="string")?UA.from(t.join("")):UA.concat(t,r)}catch(i){throw new aA(`Could not create Buffer from response body for ${A.url}: ${i.message}`,"system",i)}else throw new aA(`Premature close of server response while trying to fetch ${A.url}`)}var Ei=(A,e)=>{let t,r,{body:i}=A[gA];if(A.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof Yt&&typeof i.getBoundary!="function"&&(t=new UB({highWaterMark:e}),r=new UB({highWaterMark:e}),i.pipe(t),i.pipe(r),A[gA].stream=t,i=r),i},OL=Bc(A=>A.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),zo=(A,e)=>A===null?null:typeof A=="string"?"text/plain;charset=UTF-8":hc(A)?"application/x-www-form-urlencoded;charset=UTF-8":$n(A)?A.type||null:UA.isBuffer(A)||TB.isAnyArrayBuffer(A)||ArrayBuffer.isView(A)?null:A instanceof Er?`multipart/form-data; boundary=${e[gA].boundary}`:A&&typeof A.getBoundary=="function"?`multipart/form-data;boundary=${OL(A)}`:A instanceof Yt?null:"text/plain;charset=UTF-8",JB=A=>{let{body:e}=A[gA];return e===null?0:$n(e)?e.size:UA.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},vB=async(A,{body:e})=>{e===null?A.end():await xL(e,A)};import{types as GB}from"util";import jo from"http";var $o=typeof jo.validateHeaderName=="function"?jo.validateHeaderName:A=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(A)){let e=new TypeError(`Header name must be a valid HTTP token [${A}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},fc=typeof jo.validateHeaderValue=="function"?jo.validateHeaderValue:(A,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let t=new TypeError(`Invalid character in header content ["${A}"]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"}),t}},lA=class extends URLSearchParams{constructor(e){let t=[];if(e instanceof lA){let r=e.raw();for(let[i,n]of Object.entries(r))t.push(...n.map(o=>[i,o]))}else if(e!=null)if(typeof e=="object"&&!GB.isBoxedPrimitive(e)){let r=e[Symbol.iterator];if(r==null)t.push(...Object.entries(e));else{if(typeof r!="function")throw new TypeError("Header pairs must be iterable");t=[...e].map(i=>{if(typeof i!="object"||GB.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return t=t.length>0?t.map(([r,i])=>($o(r),fc(r,String(i)),[String(r).toLowerCase(),String(i)])):void 0,super(t),new Proxy(this,{get(r,i,n){switch(i){case"append":case"set":return(o,g)=>($o(o),fc(o,String(g)),URLSearchParams.prototype[i].call(r,String(o).toLowerCase(),String(g)));case"delete":case"has":case"getAll":return o=>($o(o),URLSearchParams.prototype[i].call(r,String(o).toLowerCase()));case"keys":return()=>(r.sort(),new Set(URLSearchParams.prototype.keys.call(r)).keys());default:return Reflect.get(r,i,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let r=t.join(", ");return/^content-encoding$/i.test(e)&&(r=r.toLowerCase()),r}forEach(e,t=void 0){for(let r of this.keys())Reflect.apply(e,t,[this.get(r),r,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,t)=>{let r=this.getAll(t);return t==="host"?e[t]=r[0]:e[t]=r.length>1?r:r[0],e},{})}};Object.defineProperties(lA.prototype,["get","entries","forEach","values"].reduce((A,e)=>(A[e]={enumerable:!0},A),{}));function qB(A=[]){return new lA(A.reduce((e,t,r,i)=>(r%2===0&&e.push(i.slice(r,r+2)),e),[]).filter(([e,t])=>{try{return $o(e),fc(e,String(t)),!0}catch{return!1}}))}var PL=new Set([301,302,303,307,308]),Ko=A=>PL.has(A);var OA=Symbol("Response internals"),je=class extends tt{constructor(e=null,t={}){super(e,t);let r=t.status!=null?t.status:200,i=new lA(t.headers);if(e!==null&&!i.has("Content-Type")){let n=zo(e,this);n&&i.append("Content-Type",n)}this[OA]={type:"default",url:t.url,status:r,statusText:t.statusText||"",headers:i,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[OA].type}get url(){return this[OA].url||""}get status(){return this[OA].status}get ok(){return this[OA].status>=200&&this[OA].status<300}get redirected(){return this[OA].counter>0}get statusText(){return this[OA].statusText}get headers(){return this[OA].headers}get highWaterMark(){return this[OA].highWaterMark}clone(){return new je(Ei(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,t=302){if(!Ko(t))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new je(null,{headers:{location:new URL(e).toString()},status:t})}static error(){let e=new je(null,{status:0,statusText:""});return e[OA].type="error",e}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(je.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as zL}from"url";import{deprecate as $L}from"util";var YB=A=>{if(A.search)return A.search;let e=A.href.length-1,t=A.hash||(A.href[e]==="#"?"#":"");return A.href[e-t.length]==="?"?"?":""};import{isIP as WL}from"net";function _B(A,e=!1){return A==null||(A=new URL(A),/^(about|blob|data):$/.test(A.protocol))?"no-referrer":(A.username="",A.password="",A.hash="",e&&(A.pathname="",A.search=""),A)}var xB=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),OB="strict-origin-when-cross-origin";function PB(A){if(!xB.has(A))throw new TypeError(`Invalid referrerPolicy: ${A}`);return A}function VL(A){if(/^(http|ws)s:$/.test(A.protocol))return!0;let e=A.host.replace(/(^\[)|(]$)/g,""),t=WL(e);return t===4&&/^127\./.test(e)||t===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:A.host==="localhost"||A.host.endsWith(".localhost")?!1:A.protocol==="file:"}function Ci(A){return/^about:(blank|srcdoc)$/.test(A)||A.protocol==="data:"||/^(blob|filesystem):$/.test(A.protocol)?!0:VL(A)}function WB(A,{referrerURLCallback:e,referrerOriginCallback:t}={}){if(A.referrer==="no-referrer"||A.referrerPolicy==="")return null;let r=A.referrerPolicy;if(A.referrer==="about:client")return"no-referrer";let i=A.referrer,n=_B(i),o=_B(i,!0);n.toString().length>4096&&(n=o),e&&(n=e(n)),t&&(o=t(o));let g=new URL(A.url);switch(r){case"no-referrer":return"no-referrer";case"origin":return o;case"unsafe-url":return n;case"strict-origin":return Ci(n)&&!Ci(g)?"no-referrer":o.toString();case"strict-origin-when-cross-origin":return n.origin===g.origin?n:Ci(n)&&!Ci(g)?"no-referrer":o;case"same-origin":return n.origin===g.origin?n:"no-referrer";case"origin-when-cross-origin":return n.origin===g.origin?n:o;case"no-referrer-when-downgrade":return Ci(n)&&!Ci(g)?"no-referrer":n;default:throw new TypeError(`Invalid referrerPolicy: ${r}`)}}function VB(A){let e=(A.get("referrer-policy")||"").split(/[,\s]+/),t="";for(let r of e)r&&xB.has(r)&&(t=r);return t}var Je=Symbol("Request internals"),Kn=A=>typeof A=="object"&&typeof A[Je]=="object",jL=$L(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),ft=class extends tt{constructor(e,t={}){let r;if(Kn(e)?r=new URL(e.url):(r=new URL(e),e={}),r.username!==""||r.password!=="")throw new TypeError(`${r} is an url with embedded credentials.`);let i=t.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Kn(t)&&"data"in t&&jL(),(t.body!=null||Kn(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let n=t.body?t.body:Kn(e)&&e.body!==null?Ei(e):null;super(n,{size:t.size||e.size||0});let o=new lA(t.headers||e.headers||{});if(n!==null&&!o.has("Content-Type")){let u=zo(n,this);u&&o.set("Content-Type",u)}let g=Kn(e)?e.signal:null;if("signal"in t&&(g=t.signal),g!=null&&!bB(g))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let l=t.referrer==null?e.referrer:t.referrer;if(l==="")l="no-referrer";else if(l){let u=new URL(l);l=/^about:(\/\/)?client$/.test(u)?"client":u}else l=void 0;this[Je]={method:i,redirect:t.redirect||e.redirect||"follow",headers:o,parsedURL:r,signal:g,referrer:l},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||""}get method(){return this[Je].method}get url(){return zL(this[Je].parsedURL)}get headers(){return this[Je].headers}get redirect(){return this[Je].redirect}get signal(){return this[Je].signal}get referrer(){if(this[Je].referrer==="no-referrer")return"";if(this[Je].referrer==="client")return"about:client";if(this[Je].referrer)return this[Je].referrer.toString()}get referrerPolicy(){return this[Je].referrerPolicy}set referrerPolicy(e){this[Je].referrerPolicy=PB(e)}clone(){return new ft(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(ft.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var zB=A=>{let{parsedURL:e}=A[Je],t=new lA(A[Je].headers);t.has("Accept")||t.set("Accept","*/*");let r=null;if(A.body===null&&/^(post|put)$/i.test(A.method)&&(r="0"),A.body!==null){let g=JB(A);typeof g=="number"&&!Number.isNaN(g)&&(r=String(g))}r&&t.set("Content-Length",r),A.referrerPolicy===""&&(A.referrerPolicy=OB),A.referrer&&A.referrer!=="no-referrer"?A[Je].referrer=WB(A):A[Je].referrer="no-referrer",A[Je].referrer instanceof URL&&t.set("Referer",A.referrer),t.has("User-Agent")||t.set("User-Agent","node-fetch"),A.compress&&!t.has("Accept-Encoding")&&t.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=A;typeof i=="function"&&(i=i(e)),!t.has("Connection")&&!i&&t.set("Connection","close");let n=YB(e),o={path:e.pathname+n,method:A.method,headers:t[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:A.insecureHTTPParser,agent:i};return{parsedURL:e,options:o}};var Zo=class extends Bt{constructor(e,t="aborted"){super(e,t)}};Oo();Ec();var XL=new Set(["data:","http:","https:"]);async function ea(A,e){return new Promise((t,r)=>{let i=new ft(A,e),{parsedURL:n,options:o}=zB(i);if(!XL.has(n.protocol))throw new TypeError(`node-fetch cannot load ${A}. URL scheme "${n.protocol.replace(/:$/,"")}" is not supported.`);if(n.protocol==="data:"){let B=IB(i.url),w=new je(B,{headers:{"Content-Type":B.typeFull}});t(w);return}let g=(n.protocol==="https:"?ZL:KL).request,{signal:l}=i,u=null,h=()=>{let B=new Zo("The operation was aborted.");r(B),i.body&&i.body instanceof $B.Readable&&i.body.destroy(B),!(!u||!u.body)&&u.body.emit("error",B)};if(l&&l.aborted){h();return}let I=()=>{h(),C()},E=g(n.toString(),o);l&&l.addEventListener("abort",I);let C=()=>{E.abort(),l&&l.removeEventListener("abort",I)};E.on("error",B=>{r(new aA(`request to ${i.url} failed, reason: ${B.message}`,"system",B)),C()}),eN(E,B=>{u&&u.body&&u.body.destroy(B)}),process.version<"v14"&&E.on("socket",B=>{let w;B.prependListener("end",()=>{w=B._eventsCount}),B.prependListener("close",p=>{if(u&&w<B._eventsCount&&!p){let d=new Error("Premature close");d.code="ERR_STREAM_PREMATURE_CLOSE",u.body.emit("error",d)}})}),E.on("response",B=>{E.setTimeout(0);let w=qB(B.rawHeaders);if(Ko(B.statusCode)){let R=w.get("Location"),T=null;try{T=R===null?null:new URL(R,i.url)}catch{if(i.redirect!=="manual"){r(new aA(`uri requested responds with an invalid redirect URL: ${R}`,"invalid-redirect")),C();return}}switch(i.redirect){case"error":r(new aA(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),C();return;case"manual":break;case"follow":{if(T===null)break;if(i.counter>=i.follow){r(new aA(`maximum redirect reached at: ${i.url}`,"max-redirect")),C();return}let J={headers:new lA(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Ei(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!RB(i.url,T)||!DB(i.url,T))for(let W of["authorization","www-authenticate","cookie","cookie2"])J.headers.delete(W);if(B.statusCode!==303&&i.body&&e.body instanceof $B.Readable){r(new aA("Cannot follow redirect with body being a readable stream","unsupported-redirect")),C();return}(B.statusCode===303||(B.statusCode===301||B.statusCode===302)&&i.method==="POST")&&(J.method="GET",J.body=void 0,J.headers.delete("content-length"));let v=VB(w);v&&(J.referrerPolicy=v),t(ea(new ft(T,J))),C();return}default:return r(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}l&&B.once("end",()=>{l.removeEventListener("abort",I)});let p=Bi(B,new jB,R=>{R&&r(R)});process.version<"v12.10"&&B.on("aborted",I);let d={url:i.url,status:B.statusCode,statusText:B.statusMessage,headers:w,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},b=w.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||b===null||B.statusCode===204||B.statusCode===304){u=new je(p,d),t(u);return}let k={flush:Qi.Z_SYNC_FLUSH,finishFlush:Qi.Z_SYNC_FLUSH};if(b==="gzip"||b==="x-gzip"){p=Bi(p,Qi.createGunzip(k),R=>{R&&r(R)}),u=new je(p,d),t(u);return}if(b==="deflate"||b==="x-deflate"){let R=Bi(B,new jB,T=>{T&&r(T)});R.once("data",T=>{(T[0]&15)===8?p=Bi(p,Qi.createInflate(),J=>{J&&r(J)}):p=Bi(p,Qi.createInflateRaw(),J=>{J&&r(J)}),u=new je(p,d),t(u)}),R.once("end",()=>{u||(u=new je(p,d),t(u))});return}if(b==="br"){p=Bi(p,Qi.createBrotliDecompress(),R=>{R&&r(R)}),u=new je(p,d),t(u);return}u=new je(p,d),t(u)}),vB(E,i).catch(r)})}function eN(A,e){let t=Xo.from(`0\r
|
|
68
68
|
\r
|
|
69
|
-
`),r=!1,i=!1,n;A.on("response",o=>{let{headers:g}=o;r=g["transfer-encoding"]==="chunked"&&!g["content-length"]}),A.on("socket",o=>{let g=()=>{if(r&&!i){let u=new Error("Premature close");u.code="ERR_STREAM_PREMATURE_CLOSE",e(u)}},l=u=>{i=Xo.compare(u.slice(-5),t)===0,!i&&n&&(i=Xo.compare(n.slice(-3),t.slice(0,3))===0&&Xo.compare(u.slice(-2),t.slice(3))===0),n=u};o.prependListener("close",g),o.on("data",l),A.on("close",()=>{o.removeListener("close",g),o.removeListener("data",l)})})}var Kp=fA(bf(),1),Zp=fA(ta(),1),Xp=fA(Df(),1),Se=fA(mp(),1),ey=fA(kp(),1),Ay=fA(_p(),1);import{cwd as wF,stdout as mF,argv as bF,env as RF,exit as us}from"process";import{join as ty,dirname as DF}from"path";import{lstatSync as SF,readFileSync as xp,truncateSync as kF,writeFileSync as LF,accessSync as NF}from"fs";import{platform as HF}from"os";import{rootCertificates as Op}from"tls";var yF=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]];function zc(A,{noAffix:e=!1}={}){if(A=typeof A=="number"?A:Date.parse(A),Number.isNaN(A))return"unknown";let t=Date.now(),r=!1,i=t-A;if(i<0&&(r=!0,i=Math.abs(i)),i<1e4)return"now";let n,o;for(let g of yF)if(!(i>=g[1])){n=Math.floor(i/g[0]),o=g[2],n>1&&(o+="s");break}return`${r&&!e?"in ":""}${n} ${o}${!r&&!e?" ago":""}`}var{fromUrl:FF}=Ay.default,Zc=ac(ea),ry=96,Pt="\0",MF=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,UF=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Xc=/^[0-9a-f]{7,}$/i,Pp=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Wp=A=>A.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),TF=pa(FF),Ba=pa(Kp.default),JF=pa(Xp.default),Au=pa(A=>A.endsWith("/")?A.substring(0,A.length-1):A),vF=new Set(["patch"]),GF=new Set(["patch","minor"]),qF=new Set(["patch","minor","major"]),O=(0,jp.default)(bF.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}}),eu,da,hs;O.color===!1||RF.TERM==="dumb"?eu=da=hs=A=>A:(eu=A=>`\x1B[35m${A}\x1B[0m`,da=A=>`\x1B[31m${A}\x1B[0m`,hs=A=>`\x1B[32m${A}\x1B[0m`);var Si=Hi(O.greatest),$c=Hi(O.prerelease),jc=Hi(O.release),ki=Hi(O.patch),Li=Hi(O.minor),Ni=Hi(O["allow-downgrade"]),nt=(0,Zp.default)("npm",{registry:"https://registry.npmjs.org"}),fa={npmrc:nt,recursive:!0},YF=Au(O.registry||nt.registry),Vp=O.githubapi?Au(O.githubapi):"https://api.github.com",_F=typeof O.sockets=="number"?parseInt(O.sockets):ry,zp=A=>Array.from(A.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function pa(A){let e=Object.create(null);return(t,r)=>t in e?e[t]:e[t]=A(t,r)}function iy(A,e,t){let r=ty(e,A);try{return NF(r),r}catch{}let i=DF(e);return t&&r===t||i===e?null:iy(A,i,t)}function xF(A,e){if(A.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(A)||[])[0],r=Au(JF(t,nt));if(r!==e)try{let i=Ba(r,fa);if(i!=null&&i.token)return[i,r]}catch{return[Ba(e,fa),e]}else return[Ba(e,fa),e]}else return[Ba(e,fa),e]}async function OF(A,e,t,r){let[i,n]=xF(A,t),o={maxSockets:_F};Object.keys(r).length&&(o.agentOpts=r),i!=null&&i.token&&(o.headers={Authorization:`${i.type} ${i.token}`});let l=(e==="resolutions"?eM(A):A).replace(/\//g,"%2f"),u=`${n}/${l}`;O.verbose&&console.error(`${eu("fetch")} ${u}`);let h=await Zc(u,o);if(h!=null&&h.ok)return O.verbose&&console.error(`${hs("done")} ${u}`),[await h.json(),e,n,A];throw(h==null?void 0:h.status)&&(h==null?void 0:h.statusText)?new Error(`Received ${h.status} ${h.statusText} for ${A} from ${n}`):new Error(`Unable to fetch ${A} from ${n}`)}function PF({repository:A,homepage:e},t,r){let i;if(t==="https://npm.pkg.github.com")return`https://github.com/${r.replace(/^@/,"")}`;if(A){let o=typeof A=="string"?A:A.url,g=TF(o);g!=null&&g.browse&&(i=g.browse()),i&&A.directory&&g.treepath&&(i=`${i}/${g.treepath}/HEAD/${A.directory}`),!i&&(A==null?void 0:A.url)&&/^https?:/.test(A.url)&&(i=A.url)}let n=i||e||"";if(n){let o=new URL(n);o.protocol==="http:"&&o.hostname==="github.com"&&(o.protocol="https:",n=String(o))}return n}function vA(A,e={}){let t={},r=A instanceof Error;typeof A=="string"?t.message=A:r&&(t.error=A.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(O.json){if(!r){t.results={};for(let[i,n]of Object.entries(e)){let[o,g]=i.split(Pt);t.results[o]||(t.results[o]={}),t.results[o][g]=n}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!r&&console.info(VF(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(da(t.error)));O["error-on-outdated"]?us(Object.keys(e).length?2:0):O["error-on-unchanged"]?us(Object.keys(e).length?0:2):us(t.error?1:0)}function WF(A,e){let t=HF()==="win32";t&&kF(A,0),LF(A,e,t?{flag:"r+"}:void 0)}function $p(A,e,t){let r=A.split(/\./),i=e.split(/\./),n=t?hs:da,o=/^[0-9a-zA-Z-.]+$/,g="";for(let l=0;l<r.length;l++)if(r[l]!==i[l]){o.test(r[l])?g+=n(r.slice(l).join(".")):g+=r[l].split("").map(u=>o.test(u)?n(u):u).join("")+n(`.${r.slice(l+1).join(".")}`);break}else g+=`${r[l]}.`;return g}function VF(A){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,r]of Object.entries(A)){let[i,n]=t.split(Pt);e.push([n,$p(r.old,r.new,!1),$p(r.new,r.old,!0),r.age||"",r.info])}return(0,ey.default)(e,{hsep:" ",stringLength:t=>t.replace(Za(),"").length})}function zF(A,e){let t=A;for(let r of Object.keys(e)){let i=r.split(Pt)[1],n=new RegExp(`"${Wp(i)}": +"${Wp(
|
|
69
|
+
`),r=!1,i=!1,n;A.on("response",o=>{let{headers:g}=o;r=g["transfer-encoding"]==="chunked"&&!g["content-length"]}),A.on("socket",o=>{let g=()=>{if(r&&!i){let u=new Error("Premature close");u.code="ERR_STREAM_PREMATURE_CLOSE",e(u)}},l=u=>{i=Xo.compare(u.slice(-5),t)===0,!i&&n&&(i=Xo.compare(n.slice(-3),t.slice(0,3))===0&&Xo.compare(u.slice(-2),t.slice(3))===0),n=u};o.prependListener("close",g),o.on("data",l),A.on("close",()=>{o.removeListener("close",g),o.removeListener("data",l)})})}var Kp=fA(bf(),1),Zp=fA(ta(),1),Xp=fA(Df(),1),Se=fA(mp(),1),ey=fA(kp(),1),Ay=fA(_p(),1);import{cwd as wF,stdout as mF,argv as bF,env as RF,exit as us}from"process";import{join as ty,dirname as DF}from"path";import{lstatSync as SF,readFileSync as xp,truncateSync as kF,writeFileSync as LF,accessSync as NF}from"fs";import{platform as HF}from"os";import{rootCertificates as Op}from"tls";var yF=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]];function zc(A,{noAffix:e=!1}={}){if(A=typeof A=="number"?A:Date.parse(A),Number.isNaN(A))return"unknown";let t=Date.now(),r=!1,i=t-A;if(i<0&&(r=!0,i=Math.abs(i)),i<1e4)return"now";let n,o;for(let g of yF)if(!(i>=g[1])){n=Math.floor(i/g[0]),o=g[2],n>1&&(o+="s");break}return`${r&&!e?"in ":""}${n} ${o}${!r&&!e?" ago":""}`}var{fromUrl:FF}=Ay.default,Zc=ac(ea),ry=96,Pt="\0",MF=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,UF=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Xc=/^[0-9a-f]{7,}$/i,Pp=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Wp=A=>A.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),TF=pa(FF),Ba=pa(Kp.default),JF=pa(Xp.default),Au=pa(A=>A.endsWith("/")?A.substring(0,A.length-1):A),vF=new Set(["patch"]),GF=new Set(["patch","minor"]),qF=new Set(["patch","minor","major"]),O=(0,jp.default)(bF.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","G","githubapi","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",G:"githubapi",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}}),eu,da,hs;O.color===!1||RF.TERM==="dumb"?eu=da=hs=A=>A:(eu=A=>`\x1B[35m${A}\x1B[0m`,da=A=>`\x1B[31m${A}\x1B[0m`,hs=A=>`\x1B[32m${A}\x1B[0m`);var Si=Hi(O.greatest),$c=Hi(O.prerelease),jc=Hi(O.release),ki=Hi(O.patch),Li=Hi(O.minor),Ni=Hi(O["allow-downgrade"]),nt=(0,Zp.default)("npm",{registry:"https://registry.npmjs.org"}),fa={npmrc:nt,recursive:!0},YF=Au(O.registry||nt.registry),Vp=O.githubapi?Au(O.githubapi):"https://api.github.com",_F=typeof O.sockets=="number"?parseInt(O.sockets):ry,zp=A=>Array.from(A.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g)).map(e=>e[0]);function pa(A){let e=Object.create(null);return(t,r)=>t in e?e[t]:e[t]=A(t,r)}function iy(A,e,t){let r=ty(e,A);try{return NF(r),r}catch{}let i=DF(e);return t&&r===t||i===e?null:iy(A,i,t)}function xF(A,e){if(A.startsWith("@")){let t=(/@[a-z0-9][\w-.]+/.exec(A)||[])[0],r=Au(JF(t,nt));if(r!==e)try{let i=Ba(r,fa);if(i!=null&&i.token)return[i,r]}catch{return[Ba(e,fa),e]}else return[Ba(e,fa),e]}else return[Ba(e,fa),e]}async function OF(A,e,t,r){let[i,n]=xF(A,t),o={maxSockets:_F};Object.keys(r).length&&(o.agentOpts=r),i!=null&&i.token&&(o.headers={Authorization:`${i.type} ${i.token}`});let l=(e==="resolutions"?eM(A):A).replace(/\//g,"%2f"),u=`${n}/${l}`;O.verbose&&console.error(`${eu("fetch")} ${u}`);let h=await Zc(u,o);if(h!=null&&h.ok)return O.verbose&&console.error(`${hs("done")} ${u}`),[await h.json(),e,n,A];throw(h==null?void 0:h.status)&&(h==null?void 0:h.statusText)?new Error(`Received ${h.status} ${h.statusText} for ${A} from ${n}`):new Error(`Unable to fetch ${A} from ${n}`)}function PF({repository:A,homepage:e},t,r){let i;if(t==="https://npm.pkg.github.com")return`https://github.com/${r.replace(/^@/,"")}`;if(A){let o=typeof A=="string"?A:A.url,g=TF(o);g!=null&&g.browse&&(i=g.browse()),i&&A.directory&&g.treepath&&(i=`${i}/${g.treepath}/HEAD/${A.directory}`),!i&&(A==null?void 0:A.url)&&/^https?:/.test(A.url)&&(i=A.url)}let n=i||e||"";if(n){let o=new URL(n);o.protocol==="http:"&&o.hostname==="github.com"&&(o.protocol="https:",n=String(o))}return n}function vA(A,e={}){let t={},r=A instanceof Error;typeof A=="string"?t.message=A:r&&(t.error=A.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(O.json){if(!r){t.results={};for(let[i,n]of Object.entries(e)){let[o,g]=i.split(Pt);t.results[o]||(t.results[o]={}),t.results[o][g]=n}}console.info(JSON.stringify(t))}else Object.keys(e).length&&!r&&console.info(VF(e)),(t.message||t.error)&&(t.message?console.info(t.message):t.error&&console.info(da(t.error)));O["error-on-outdated"]?us(Object.keys(e).length?2:0):O["error-on-unchanged"]?us(Object.keys(e).length?0:2):us(t.error?1:0)}function WF(A,e){let t=HF()==="win32";t&&kF(A,0),LF(A,e,t?{flag:"r+"}:void 0)}function $p(A,e,t){let r=A.split(/\./),i=e.split(/\./),n=t?hs:da,o=/^[0-9a-zA-Z-.]+$/,g="";for(let l=0;l<r.length;l++)if(r[l]!==i[l]){o.test(r[l])?g+=n(r.slice(l).join(".")):g+=r[l].split("").map(u=>o.test(u)?n(u):u).join("")+n(`.${r.slice(l+1).join(".")}`);break}else g+=`${r[l]}.`;return g}function VF(A){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[t,r]of Object.entries(A)){let[i,n]=t.split(Pt);e.push([n,$p(r.old,r.new,!1),$p(r.new,r.old,!0),r.age||"",r.info])}return(0,ey.default)(e,{hsep:" ",stringLength:t=>t.replace(Za(),"").length})}function zF(A,e){let t=A;for(let r of Object.keys(e)){let i=r.split(Pt)[1],n=e[r].oldOriginal||e[r].old,o=new RegExp(`"${Wp(i)}": +"${Wp(n)}"`,"g");t=t.replace(o,`"${i}": "${e[r].new}"`)}return t}function $F(A,e){return A.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Kc(A){let e=Se.default.parse(A);return e?Boolean(e.prerelease.length):!1}function ny(A){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(A)}function jF(A){try{return Se.default.coerce(A).version}catch{return null}}function KF(A,e,{range:t,semvers:r,usePre:i,useRel:n,useGreatest:o}={}){let g=jF(t),l=0;r=new Set(r),i=ny(t)||i,i&&(r.add("prerelease"),r.has("patch")&&r.add("prepatch"),r.has("minor")&&r.add("preminor"),r.has("major")&&r.add("premajor"));for(let u of e){let h=Se.default.parse(u);if(h.prerelease.length&&(!i||n))continue;let I=Se.default.diff(g,h.version);if(!(!I||!r.has(I)))if(o||!("time"in A))Se.default.gte(Se.default.coerce(h.version).version,g)&&(g=h.version);else{let E=new Date(A.time[u]).getTime();E>=0&&E>l&&(g=h.version,l=E)}}return g||null}function ZF(A,e){var i;if(e.range==="*"||e.range.includes("||"))return null;let t=Object.keys(A.versions).filter(n=>Se.default.valid(n)),r=KF(A,t,e);if(e.useGreatest)return r;{let n=A["dist-tags"].latest,o=Se.default.coerce(e.range).version,g=ny(e.range),l=Kc(r),u=Kc(n),h=Se.default.gt(r,o);if(!e.useRel&&e.usePre||g&&l||e.useRel&&!h&&g&&!l||g&&!l&&h)return r;if(g&&!l&&!h)return null;let I=Se.default.diff(o,n);return I&&I!=="prerelease"&&!e.semvers.has(I.replace(/^pre/,""))||e.useRel&&Kc(n)?r:Se.default.lt(n,o)&&!u?Ni===!0||((i=Ni==null?void 0:Ni.has)==null?void 0:i.call(Ni,A.name))?n:null:n}}async function XF([A,e],{useGreatest:t}={}){var l,u;let r=e.old.replace(MF,""),[i,n,o,g]=UF.exec(r)||[];if(!(!n||!o||!g))if(Xc.test(g)){let h=await Zc(`${Vp}/repos/${n}/${o}/commits`);if(!h||!h.ok)return;let I=await h.json(),{sha:E,commit:C}=I[0];if(!E||!E.length)return;let B=((l=C==null?void 0:C.committer)==null?void 0:l.date)??((u=C==null?void 0:C.author)==null?void 0:u.date);if(E=E.substring(0,g.length),g!==E){let w=e.old.replace(g,E);return{key:A,newRange:w,user:n,repo:o,oldRef:g,newRef:E,newDate:B}}}else{let h=await Zc(`${Vp}/repos/${n}/${o}/git/refs/tags`);if(!h||!h.ok)return;let E=(await h.json()).map(B=>B.ref.replace(/^refs\/tags\//,"")),C=g.replace(/^v/,"");if(!Se.default.valid(C))return;if(t){let B=g,w=g.replace(/^v/,"");for(let p of E){let d=p.replace(/^v/,"");!Se.default.valid(d)||(!B||Se.default.gt(d,w))&&(B=p,w=d)}if(Se.default.neq(C,w))return{key:A,newRange:B,user:n,repo:o,oldRef:g,newRef:B}}else{let B=E[E.length-1],w=B.replace(/^v/,"");if(!Se.default.valid(w))return;if(Se.default.neq(C,w))return{key:A,newRange:B,user:n,repo:o,oldRef:g,newRef:B}}}}function eM(A){let e=A.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function AM(A){let e=A.match(Pp);return e.length!==1?A:A.replace(Pp,Se.default.coerce(e[0]))}function Hi(A){return A===void 0?!1:A===""?!0:typeof A=="string"?A.includes(",")?new Set(A.split(",")):new Set([A]):Array.isArray(A)?new Set(A):!1}async function tM(){var I,E,C,B,w;for(let p of[process.stdout,process.stderr])(E=(I=p==null?void 0:p._handle)==null?void 0:I.setBlocking)==null||E.call(I,!0);O.help&&(mF.write(`usage: updates [options]
|
|
70
70
|
|
|
71
71
|
Options:
|
|
72
72
|
-u, --update Update versions and write package.json
|
|
@@ -96,4 +96,4 @@ Content-Type: ${n.type||"application/octet-stream"}\r
|
|
|
96
96
|
$ updates -u
|
|
97
97
|
$ updates -u -m -e eslint
|
|
98
98
|
$ updates -u -U && rm -rf node_modules && npm i
|
|
99
|
-
`),us(0)),O.version&&(console.info("13.2.
|
|
99
|
+
`),us(0)),O.version&&(console.info("13.2.1"),us(0));let A={};if(nt["strict-ssl"]===!1)A.rejectUnauthorized=!1;else if("cafile"in nt&&(A.ca=Op.concat(zp(xp(nt.cafile,"utf8")))),"ca"in nt){let p=Array.isArray(nt.ca)?nt.ca:[nt.ca];A.ca=Op.concat(p.map(d=>zp(d)))}let e;if(O.file){let p;try{p=SF(O.file)}catch(d){vA(new Error(`Unable to open ${O.file}: ${d.message}`))}p!=null&&p.isFile()?e=O.file:p!=null&&p.isDirectory()?e=ty(O.file,"package.json"):vA(new Error(`${O.file} is neither a file nor directory`))}else{let p=wF();e=iy("package.json",p),e||vA(new Error(`Unable to find package.json in ${p} or any of its parents`))}let t;O.types?t=Array.isArray(O.types)?O.types:O.types.split(","):t=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"];let r,i;try{i=xp(e,"utf8")}catch(p){vA(new Error(`Unable to open ${e}: ${p.message}`))}try{r=JSON.parse(i)}catch(p){vA(new Error(`Error parsing ${e}: ${p.message}`))}let n,o;O.include&&O.include!==!0&&(n=new Set((Array.isArray(O.include)?O.include:[O.include]).flatMap(p=>p.split(",")))),O.exclude&&O.exclude!==!0&&(o=new Set((Array.isArray(O.exclude)?O.exclude:[O.exclude]).flatMap(p=>p.split(","))));function g(p){var d,b;return!(((d=o==null?void 0:o.has)==null?void 0:d.call(o,p))===!0||((b=n==null?void 0:n.has)==null?void 0:b.call(n,p))===!1)}let l={},u={};for(let p of t)for(let[d,b]of Object.entries(r[p]||{}))Se.default.validRange(b)&&g(d)?l[`${p}${Pt}${d}`]={old:AM(b),oldOriginal:b}:g(d)&&(u[`${p}${Pt}${d}`]={old:b});!Object.keys(l).length&&!Object.keys(u).length&&vA(n||o?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let h=await Promise.all(Object.keys(l).map(p=>{let[d,b]=p.split(Pt);return OF(b,d,YF,A)}));for(let[p,d,b,k]of h){if(p!=null&&p.error)throw new Error(p.error);let R=typeof Si=="boolean"?Si:Si.has(p.name),T=typeof $c=="boolean"?$c:$c.has(p.name),J=typeof jc=="boolean"?jc:jc.has(p.name),v;ki===!0||((C=ki==null?void 0:ki.has)==null?void 0:C.call(ki,p.name))?v=vF:Li===!0||((B=Li==null?void 0:Li.has)==null?void 0:B.call(Li,p.name))?v=GF:v=qF;let W=`${d}${Pt}${k}`,P=l[W].old,rA=ZF(p,{usePre:T,useRel:J,useGreatest:R,semvers:v,range:P}),ae=$F(P,rA);!rA||P===ae?delete l[W]:(l[W].new=ae,l[W].info=PF(p.versions[rA]||p,b,p.name),(w=p.time)!=null&&w[rA]&&(l[W].age=zc(p.time[rA],{noAffix:!0})))}if(Object.keys(u).length){let p=await Promise.all(Object.entries(u).map(([d,b])=>{let k=d.split(Pt)[1],R=typeof Si=="boolean"?Si:Si.has(k);return XF([d,b],{useGreatest:R})}));p=p.filter(Boolean);for(let d of p||[]){let{key:b,newRange:k,user:R,repo:T,oldRef:J,newRef:v,newDate:W}=d;l[b]={old:u[b].old,new:k,oldPrint:Xc.test(J)?J.substring(0,7):J,newPrint:Xc.test(v)?v.substring(0,7):v,info:`https://github.com/${R}/${T}`,...W?{age:zc(W,{noAffix:!0})}:{}}}}Object.keys(l).length||vA("All dependencies are up to date."),O.update||vA(void 0,l);try{WF(e,zF(i,l))}catch(p){vA(new Error(`Error writing ${e}: ${p.message}`))}vA(hs("\u2728 package.json updated"))}tM().catch(vA);
|