UNPKG

@sap/generator-fiori

Version:

Create an SAPUI5 application using SAP Fiori elements or a freestyle approach

6 lines 1.61 MB
const __esmImportMetaUrl = require('node:url').pathToFileURL(__filename).href; var PG=Object.create;var Sf=Object.defineProperty;var NG=Object.getOwnPropertyDescriptor;var kG=Object.getOwnPropertyNames;var FG=Object.getPrototypeOf,BG=Object.prototype.hasOwnProperty;var a=(r,e)=>Sf(r,"name",{value:e,configurable:!0});var MG=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(i){throw t=[i],i}};var v=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},jG=(r,e)=>{for(var t in e)Sf(r,t,{get:e[t],enumerable:!0})},qG=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of kG(e))!BG.call(r,s)&&s!==t&&Sf(r,s,{get:()=>e[s],enumerable:!(i=NG(e,s))||i.enumerable});return r};var UG=(r,e,t)=>(t=r!=null?PG(FG(r)):{},qG(e||!r||!r.__esModule?Sf(t,"default",{value:r,enumerable:!0}):t,r));var Zy=v((M_e,PT)=>{"use strict";var oh=PT.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:a(function(r){return"file-"+DT(r)},"hashformat")}},LT={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:DT};Object.keys(oh).forEach(function(r){Object.keys(LT).forEach(function(e){oh[r][e]||(oh[r][e]=LT[e])}),oh[r].protocols_re=RegExp("^("+oh[r].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function DT(r){return r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}a(DT,"formatHashFragment")});var FT=v((q_e,kT)=>{"use strict";var NT=Zy(),wa=Object.assign||a(function(e,t){if(t===null||typeof t!="object")return e;let i=Object.keys(t),s=i.length;for(;s--;)e[i[s]]=t[i[s]];return e},"_extend");kT.exports=St;function St(r,e,t,i,s,n,o){var c=this;c.type=r,Object.keys(NT[r]).forEach(function(h){c[h]=NT[r][h]}),c.user=e,c.auth=t,c.project=i,c.committish=s,c.default=n,c.opts=o||{}}a(St,"GitHost");St.prototype.hash=function(){return this.committish?"#"+this.committish:""};St.prototype._fill=function(r,e){if(r){var t=wa({},e);t.path=t.path?t.path.replace(/^[/]+/g,""):"",e=wa(wa({},this.opts),e);var i=this;Object.keys(this).forEach(function(f){i[f]!=null&&t[f]==null&&(t[f]=i[f])});var s=t.auth,n=t.committish,o=t.fragment,c=t.path,h=t.project;Object.keys(t).forEach(function(f){var d=t[f];(f==="path"||f==="project")&&typeof d=="string"?t[f]=d.split("/").map(function(p){return encodeURIComponent(p)}).join("/"):f!=="domain"&&(t[f]=encodeURIComponent(d))}),t["auth@"]=s?s+"@":"",t["#fragment"]=o?"#"+this.hashformat(o):"",t.fragment=t.fragment?t.fragment:"",t["#path"]=c?"#"+this.hashformat(c):"",t["/path"]=t.path?"/"+t.path:"",t.projectPath=h.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(t["#committish"]="",t["/tree/committish"]="",t["/committish"]="",t.committish=""):(t["#committish"]=n?"#"+n:"",t["/tree/committish"]=t.committish?"/"+t.treepath+"/"+t.committish:"",t["/committish"]=t.committish?"/"+t.committish:"",t.committish=t.committish||"master");var u=r;return Object.keys(t).forEach(function(f){u=u.replace(new RegExp("[{]"+f+"[}]","g"),t[f])}),e.noGitPlus?u.replace(/^git[+]/,""):u}};St.prototype.ssh=function(r){return this._fill(this.sshtemplate,r)};St.prototype.sshurl=function(r){return this._fill(this.sshurltemplate,r)};St.prototype.browse=function(r,e,t){return typeof r=="string"?(typeof e!="string"&&(t=e,e=null),this._fill(this.browsefiletemplate,wa({fragment:e,path:r},t))):this._fill(this.browsetemplate,r)};St.prototype.docs=function(r){return this._fill(this.docstemplate,r)};St.prototype.bugs=function(r){return this._fill(this.bugstemplate,r)};St.prototype.https=function(r){return this._fill(this.httpstemplate,r)};St.prototype.git=function(r){return this._fill(this.gittemplate,r)};St.prototype.shortcut=function(r){return this._fill(this.shortcuttemplate,r)};St.prototype.path=function(r){return this._fill(this.pathtemplate,r)};St.prototype.tarball=function(r){var e=wa({},r,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};St.prototype.file=function(r,e){return this._fill(this.filetemplate,wa({path:r},e))};St.prototype.getDefaultRepresentation=function(){return this.default};St.prototype.toString=function(r){return this.default&&typeof this[this.default]=="function"?this[this.default](r):this.sshurl(r)}});var MT=v(($_e,BT)=>{"use strict";BT.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var gi=v((z_e,jT)=>{"use strict";jT.exports=Ce;Ce.Node=Zn;Ce.create=Ce;function Ce(r){var e=this;if(e instanceof Ce||(e=new Ce),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,i=arguments.length;t<i;t++)e.push(arguments[t]);return e}a(Ce,"Yallist");Ce.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};Ce.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};Ce.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};Ce.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)zG(this,arguments[r]);return this.length};Ce.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)GG(this,arguments[r]);return this.length};Ce.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};Ce.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};Ce.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,i=0;t!==null;i++)r.call(e,t.value,i,this),t=t.next};Ce.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,i=this.length-1;t!==null;i--)r.call(e,t.value,i,this),t=t.prev};Ce.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};Ce.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};Ce.prototype.map=function(r,e){e=e||this;for(var t=new Ce,i=this.head;i!==null;)t.push(r.call(e,i.value,this)),i=i.next;return t};Ce.prototype.mapReverse=function(r,e){e=e||this;for(var t=new Ce,i=this.tail;i!==null;)t.push(r.call(e,i.value,this)),i=i.prev;return t};Ce.prototype.reduce=function(r,e){var t,i=this.head;if(arguments.length>1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)t=r(t,i.value,s),i=i.next;return t};Ce.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;i!==null;s--)t=r(t,i.value,s),i=i.prev;return t};Ce.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ce.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ce.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ce;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<r;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)t.push(s.value);return t};Ce.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ce;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>r;i--,s=s.prev)t.push(s.value);return t};Ce.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,s=this.head;s!==null&&i<r;i++)s=s.next;for(var n=[],i=0;s&&i<e;i++)n.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<t.length;i++)s=$G(this,s,t[i]);return n};Ce.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var i=t.prev;t.prev=t.next,t.next=i}return this.head=e,this.tail=r,this};function $G(r,e,t){var i=e===r.head?new Zn(t,null,e,r):new Zn(t,e,e.next,r);return i.next===null&&(r.tail=i),i.prev===null&&(r.head=i),r.length++,i}a($G,"insert");function zG(r,e){r.tail=new Zn(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}a(zG,"push");function GG(r,e){r.head=new Zn(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}a(GG,"unshift");function Zn(r,e,t,i){if(!(this instanceof Zn))return new Zn(r,e,t,i);this.list=i,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}a(Zn,"Node");try{MT()(Ce)}catch{}});var GT=v((H_e,zT)=>{"use strict";var HG=gi(),Kn=Symbol("max"),zi=Symbol("length"),ba=Symbol("lengthCalculator"),ch=Symbol("allowStale"),Xn=Symbol("maxAge"),$i=Symbol("dispose"),qT=Symbol("noDisposeOnSet"),ht=Symbol("lruList"),ii=Symbol("cache"),$T=Symbol("updateAgeOnGet"),Ky=a(()=>1,"naiveLength"),Jy=class{static{a(this,"LRUCache")}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[Kn]=e.max||1/0,i=e.length||Ky;if(this[ba]=typeof i!="function"?Ky:i,this[ch]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Xn]=e.maxAge||0,this[$i]=e.dispose,this[qT]=e.noDisposeOnSet||!1,this[$T]=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[Kn]=e||1/0,ah(this)}get max(){return this[Kn]}set allowStale(e){this[ch]=!!e}get allowStale(){return this[ch]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Xn]=e,ah(this)}get maxAge(){return this[Xn]}set lengthCalculator(e){typeof e!="function"&&(e=Ky),e!==this[ba]&&(this[ba]=e,this[zi]=0,this[ht].forEach(t=>{t.length=this[ba](t.value,t.key),this[zi]+=t.length})),ah(this)}get lengthCalculator(){return this[ba]}get length(){return this[zi]}get itemCount(){return this[ht].length}rforEach(e,t){t=t||this;for(let i=this[ht].tail;i!==null;){let s=i.prev;UT(this,e,i,t),i=s}}forEach(e,t){t=t||this;for(let i=this[ht].head;i!==null;){let s=i.next;UT(this,e,i,t),i=s}}keys(){return this[ht].toArray().map(e=>e.key)}values(){return this[ht].toArray().map(e=>e.value)}reset(){this[$i]&&this[ht]&&this[ht].length&&this[ht].forEach(e=>this[$i](e.key,e.value)),this[ii]=new Map,this[ht]=new HG,this[zi]=0}dump(){return this[ht].map(e=>Of(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ht]}set(e,t,i){if(i=i||this[Xn],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let s=i?Date.now():0,n=this[ba](t,e);if(this[ii].has(e)){if(n>this[Kn])return va(this,this[ii].get(e)),!1;let h=this[ii].get(e).value;return this[$i]&&(this[qT]||this[$i](e,h.value)),h.now=s,h.maxAge=i,h.value=t,this[zi]+=n-h.length,h.length=n,this.get(e),ah(this),!0}let o=new Qy(e,t,n,s,i);return o.length>this[Kn]?(this[$i]&&this[$i](e,t),!1):(this[zi]+=o.length,this[ht].unshift(o),this[ii].set(e,this[ht].head),ah(this),!0)}has(e){if(!this[ii].has(e))return!1;let t=this[ii].get(e).value;return!Of(this,t)}get(e){return Xy(this,e,!0)}peek(e){return Xy(this,e,!1)}pop(){let e=this[ht].tail;return e?(va(this,e),e.value):null}del(e){va(this,this[ii].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let s=e[i],n=s.e||0;if(n===0)this.set(s.k,s.v);else{let o=n-t;o>0&&this.set(s.k,s.v,o)}}}prune(){this[ii].forEach((e,t)=>Xy(this,t,!1))}},Xy=a((r,e,t)=>{let i=r[ii].get(e);if(i){let s=i.value;if(Of(r,s)){if(va(r,i),!r[ch])return}else t&&(r[$T]&&(i.value.now=Date.now()),r[ht].unshiftNode(i));return s.value}},"get"),Of=a((r,e)=>{if(!e||!e.maxAge&&!r[Xn])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Xn]&&t>r[Xn]},"isStale"),ah=a(r=>{if(r[zi]>r[Kn])for(let e=r[ht].tail;r[zi]>r[Kn]&&e!==null;){let t=e.prev;va(r,e),e=t}},"trim"),va=a((r,e)=>{if(e){let t=e.value;r[$i]&&r[$i](t.key,t.value),r[zi]-=t.length,r[ii].delete(t.key),r[ht].removeNode(e)}},"del"),Qy=class{static{a(this,"Entry")}constructor(e,t,i,s,n){this.key=e,this.value=t,this.length=i,this.now=s,this.maxAge=n||0}},UT=a((r,e,t,i)=>{let s=t.value;Of(r,s)&&(va(r,t),r[ch]||(s=void 0)),s&&e.call(i,s.value,s.key,r)},"forEachStep");zT.exports=Jy});var _a=v((V_e,r0)=>{"use strict";var t0=require("url"),HT=Zy(),WG=r0.exports=FT(),VG=GT(),e0=new VG({max:1e3}),YG={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function ZG(r){return YG[r]||r.slice(0,-1)}a(ZG,"protocolToRepresentation");var KG={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};r0.exports.fromUrl=function(r,e){if(typeof r=="string"){var t=r+JSON.stringify(e||{});return e0.has(t)||e0.set(t,XG(r,e)),e0.get(t)}};function XG(r,e){if(!(r==null||r==="")){var t=QG(JG(r)?"github:"+r:r),i=eH(t),s=t.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),n=Object.keys(HT).map(function(o){try{var c=HT[o],h=null;i.auth&&KG[i.protocol]&&(h=i.auth);var u=i.hash?decodeURIComponent(i.hash.substr(1)):null,f=null,d=null,p=null;if(s&&s[1]===o)f=s[2]&&decodeURIComponent(s[2]),d=decodeURIComponent(s[3].replace(/\.git$/,"")),p="shortcut";else{if(i.host&&i.host!==c.domain&&i.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(i.protocol)||!i.path)return;var m=c.pathmatch,y=i.path.match(m);if(!y)return;y[1]!==null&&y[1]!==void 0&&(f=decodeURIComponent(y[1].replace(/^:/,""))),d=decodeURIComponent(y[2]),p=ZG(i.protocol)}return new WG(o,f,h,d,u,p,e)}catch(g){if(!(g instanceof URIError))throw g}}).filter(function(o){return o});if(n.length===1)return n[0]}}a(XG,"fromUrl");function JG(r){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(r)}a(JG,"isGitHubShorthand");function QG(r){var e=t0.parse(r);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:r}a(QG,"fixupUnqualifiedGist");function eH(r){var e=r.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var t=t0.parse(r);if(t.auth){let s=r.match(/[^@]+@[^:/]+/);if(s){var i=new t0.URL(s[0]);t.auth=i.username||"",i.password&&(t.auth+=":"+i.password)}}return t}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}a(eH,"parseGitUrl")});var YT=v((Z_e,VT)=>{"use strict";var WT=require("../../commonlibs/semver/index.js"),tH=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","punycode","querystring","readline","repl","stream","string_decoder","sys","timers","tls","tty","url","util","vm","zlib"],rH={freelist:"<6.0.0",v8:">=1.0.0",process:">=1.1.0",inspector:">=8.0.0",async_hooks:">=8.1.0",http2:">=8.4.0",perf_hooks:">=8.5.0",trace_events:">=10.0.0",worker_threads:">=12.0.0","node:test":">=18.0.0"},iH={worker_threads:">=10.5.0",wasi:">=12.16.0",diagnostics_channel:"^14.17.0 || >=15.1.0"};VT.exports=({version:r=process.version,experimental:e=!1}={})=>{let t=[...tH];for(let[i,s]of Object.entries(rH))(r==="*"||WT.satisfies(r,s))&&t.push(i);if(e)for(let[i,s]of Object.entries(iH))!t.includes(i)&&(r==="*"||WT.satisfies(r,s))&&t.push(i);return t}});var i0=v((K_e,ZT)=>{"use strict";var sH=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),nH=YT(),oH=["node_modules","favicon.ico"];function aH(r){var e=[],t=[];if(r===null)return t.push("name cannot be null"),hh(e,t);if(r===void 0)return t.push("name cannot be undefined"),hh(e,t);if(typeof r!="string")return t.push("name must be a string"),hh(e,t);if(r.length||t.push("name length must be greater than zero"),r.match(/^\./)&&t.push("name cannot start with a period"),r.match(/^_/)&&t.push("name cannot start with an underscore"),r.trim()!==r&&t.push("name cannot contain leading or trailing spaces"),oH.forEach(function(o){r.toLowerCase()===o&&t.push(o+" is a blacklisted name")}),nH({version:"*"}).forEach(function(o){r.toLowerCase()===o&&e.push(o+" is a core module name")}),r.length>214&&e.push("name can no longer contain more than 214 characters"),r.toLowerCase()!==r&&e.push("name can no longer contain capital letters"),/[~'!()*]/.test(r.split("/").slice(-1)[0])&&e.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(r)!==r){var i=r.match(sH);if(i){var s=i[1],n=i[2];if(encodeURIComponent(s)===s&&encodeURIComponent(n)===n)return hh(e,t)}t.push("name can only contain URL-friendly characters")}return hh(e,t)}a(aH,"validate");var hh=a(function(r,e){var t={validForNewPackages:e.length===0&&r.length===0,validForOldPackages:e.length===0,warnings:r,errors:e};return t.warnings.length||delete t.warnings,t.errors.length||delete t.errors,t},"done");ZT.exports=aH});var Ea=v((J_e,XT)=>{var KT=["notice","error","warn","info","verbose","http","silly","pause","resume"],cH=a(r=>(...e)=>process.emit("log",r,...e),"log"),s0={};for(let r of KT)s0[r]=cH(r);s0.LEVELS=KT;XT.exports=s0});var Jn=v((eEe,Tf)=>{"use strict";Tf.exports=Rf;Tf.exports.resolve=iA;Tf.exports.Result=Sa;var Ks=require("url"),hH=_a(),JT=require("../../commonlibs/semver/index.js"),Zs=global.FAKE_WINDOWS?require("path").win32:require("path"),eA=i0(),{homedir:lH}=require("os"),uH=Ea(),o0=process.platform==="win32"||global.FAKE_WINDOWS,tA=o0?/\\|[/]/:/[/]/,rA=/^(?:git[+])?[a-z]+:/i,fH=/^[^@]+@[^:.]+\.[^:]+:.+$/i,a0=/[.](?:tgz|tar.gz|tar)$/i;function Rf(r,e){let t,i;if(typeof r=="object")return r instanceof Sa&&(!e||e===r.where)?r:r.name&&r.rawSpec?Rf.resolve(r.name,r.rawSpec,e||r.where):Rf(r.raw,e||r.where);let s=r[0]==="@"?r.slice(1).indexOf("@")+1:r.indexOf("@"),n=s>0?r.slice(0,s):r;return rA.test(r)?i=r:fH.test(r)?i=`git+ssh://${r}`:n[0]!=="@"&&(tA.test(n)||a0.test(n))?i=r:s>0?(t=n,i=r.slice(s+1)):eA(r).validForOldPackages?t=r:i=r,iA(t,i,e,r)}a(Rf,"npa");var dH=o0?/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/:/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;function iA(r,e,t,i){let s=new Sa({raw:i,name:r,rawSpec:e,fromArgument:i!=null});if(r&&s.setName(r),e&&(dH.test(e)||/^file:/i.test(e)))return QT(s,t);if(e&&/^npm:/i.test(e))return vH(s,t);let n=hH.fromUrl(e,{noGitPlus:!0,noCommittish:!0});return n?gH(s,n):e&&rA.test(e)?bH(s):e&&(tA.test(e)||a0.test(e))?QT(s,t):_H(s)}a(iA,"resolve");function pH(r,e,t){let i=new Error(`Invalid package name "${r}" of package "${t}": ${e.errors.join("; ")}.`);return i.code="EINVALIDPACKAGENAME",i}a(pH,"invalidPackageName");function mH(r,e){let t=new Error(`Invalid tag name "${r}" of package "${e}": Tags may not have any characters that encodeURIComponent encodes.`);return t.code="EINVALIDTAGNAME",t}a(mH,"invalidTagName");function Sa(r){this.type=r.type,this.registry=r.registry,this.where=r.where,r.raw==null?this.raw=r.name?r.name+"@"+r.rawSpec:r.rawSpec:this.raw=r.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=r.rawSpec==null?"":r.rawSpec,this.saveSpec=r.saveSpec,this.fetchSpec=r.fetchSpec,r.name&&this.setName(r.name),this.gitRange=r.gitRange,this.gitCommittish=r.gitCommittish,this.gitSubdir=r.gitSubdir,this.hosted=r.hosted}a(Sa,"Result");Sa.prototype.setName=function(r){let e=eA(r);if(!e.validForOldPackages)throw pH(r,e,this.raw);return this.name=r,this.scope=r[0]==="@"?r.slice(0,r.indexOf("/")):void 0,this.escapedName=r.replace("/","%2f"),this};Sa.prototype.toString=function(){let r=[];this.name!=null&&this.name!==""&&r.push(this.name);let e=this.saveSpec||this.fetchSpec||this.rawSpec;return e!=null&&e!==""&&r.push(e),r.length?r.join("@"):this.raw};Sa.prototype.toJSON=function(){let r=Object.assign({},this);return delete r.hosted,r};function n0(r,e){if(!e)return r.gitCommittish=null,r;for(let t of e.split("::")){if(!t.includes(":")){if(r.gitRange)throw new Error("cannot override existing semver range with a committish");if(r.gitCommittish)throw new Error("cannot override existing committish with a second committish");r.gitCommittish=t;continue}let[i,s]=t.split(":");if(i==="semver"){if(r.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(r.gitRange)throw new Error("cannot override existing semver range with a second semver range");r.gitRange=decodeURIComponent(s);continue}if(i==="path"){if(r.gitSubdir)throw new Error("cannot override existing path with a second path");r.gitSubdir=`/${s}`;continue}uH.warn("npm-package-arg",`ignoring unknown key "${i}"`)}return r}a(n0,"setGitCommittish");function QT(r,e){e||(e=process.cwd()),r.type=a0.test(r.rawSpec)?"file":"directory",r.where=e;let t,i,n=(/^file:/.test(r.rawSpec)?"":"file:")+r.rawSpec,o=n.replace(/^file:/,"");try{i=new Ks.URL(n,`file://${Zs.resolve(e)}/`),t=new Ks.URL(n)}catch(u){let f=new Error("Invalid file: URL, must comply with RFC 8909");throw Object.assign(f,{raw:r.rawSpec,spec:r,where:e,originalError:u})}if(process.env.NPM_PACKAGE_ARG_8909_STRICT!=="1"){if(i.host&&i.host!=="localhost"){let u=r.rawSpec.replace(/^file:\/\//,"file:///");i=new Ks.URL(u,`file://${Zs.resolve(e)}/`),t=new Ks.URL(u),o=u.replace(/^file:/,"")}if(/^\/{1,3}\.\.?(\/|$)/.test(o)){let u=r.rawSpec.replace(/^file:\/{1,3}/,"file:");i=new Ks.URL(u,`file://${Zs.resolve(e)}/`),t=new Ks.URL(u),o=u.replace(/^file:/,"")}}if(i.host&&i.host!=="localhost"){let u="Invalid file: URL, must be absolute if // present";throw Object.assign(new Error(u),{raw:r.rawSpec,parsed:i})}let c=decodeURIComponent(t.pathname),h=decodeURIComponent(i.pathname);return o0&&(c=c.replace(/^\/+([a-z]:\/)/i,"$1"),h=h.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(c)?(r.saveSpec=`file:${c.substr(1)}`,h=Zs.resolve(lH(),c.substr(3))):Zs.isAbsolute(o)?r.saveSpec=`file:${Zs.resolve(h)}`:r.saveSpec=`file:${Zs.relative(e,h)}`,r.fetchSpec=Zs.resolve(e,h),r}a(QT,"fromFile");function gH(r,e){return r.type="git",r.hosted=e,r.saveSpec=e.toString({noGitPlus:!1,noCommittish:!1}),r.fetchSpec=e.getDefaultRepresentation()==="shortcut"?null:e.toString(),n0(r,e.committish)}a(gH,"fromHostedGit");function yH(r,e){let t=new Error(`Unsupported URL Type "${r}": ${e}`);return t.code="EUNSUPPORTEDPROTOCOL",t}a(yH,"unsupportedURLType");function wH(r){let e=r.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);return e&&!e[1].match(/:[0-9]+\/?.*$/i)&&{fetchSpec:e[1],gitCommittish:e[2]==null?null:e[2]}}a(wH,"matchGitScp");function bH(r){let e=Ks.parse(r.rawSpec);switch(r.saveSpec=r.rawSpec,e.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":{r.type="git";let t=e.protocol==="git+ssh:"?wH(r.rawSpec):null;t?(n0(r,t.gitCommittish),r.fetchSpec=t.fetchSpec):(n0(r,e.hash!=null?e.hash.slice(1):""),e.protocol=e.protocol.replace(/^git[+]/,""),e.protocol==="file:"&&/^git\+file:\/\/[a-z]:/i.test(r.rawSpec)&&(e.host+=":",e.hostname+=":"),delete e.hash,r.fetchSpec=Ks.format(e));break}case"http:":case"https:":r.type="remote",r.fetchSpec=r.saveSpec;break;default:throw yH(e.protocol,r.rawSpec)}return r}a(bH,"fromURL");function vH(r,e){let t=Rf(r.rawSpec.substr(4),e);if(t.type==="alias")throw new Error("nested aliases not supported");if(!t.registry)throw new Error("aliases only work for registry deps");return r.subSpec=t,r.registry=!0,r.type="alias",r.saveSpec=null,r.fetchSpec=null,r}a(vH,"fromAlias");function _H(r){r.registry=!0;let e=r.rawSpec===""?"latest":r.rawSpec.trim();r.saveSpec=null,r.fetchSpec=e;let t=JT.valid(e,!0),i=JT.validRange(e,!0);if(t)r.type="version";else if(i)r.type="range";else{if(encodeURIComponent(e)!==e)throw mH(e,r.raw);r.type="tag"}return r}a(_H,"fromRegistry")});var dA=v((rEe,fA)=>{"use strict";var EH=require("events"),sA=require("stream"),lh=gi(),nA=require("string_decoder").StringDecoder,Gi=Symbol("EOF"),uh=Symbol("maybeEmitEnd"),Xs=Symbol("emittedEnd"),Af=Symbol("emittingEnd"),Cf=Symbol("closed"),oA=Symbol("read"),c0=Symbol("flush"),aA=Symbol("flushChunk"),fr=Symbol("encoding"),Hi=Symbol("decoder"),xf=Symbol("flowing"),fh=Symbol("paused"),dh=Symbol("resume"),Yt=Symbol("bufferLength"),cA=Symbol("bufferPush"),h0=Symbol("bufferShift"),Ot=Symbol("objectMode"),Rt=Symbol("destroyed"),lA=global._MP_NO_ITERATOR_SYMBOLS_!=="1",SH=lA&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),OH=lA&&Symbol.iterator||Symbol("iterator not implemented"),hA=a(r=>r==="end"||r==="finish"||r==="prefinish","isEndish"),RH=a(r=>r instanceof ArrayBuffer||typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,"isArrayBuffer"),TH=a(r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),"isArrayBufferView");fA.exports=class uA extends sA{static{a(this,"Minipass")}constructor(e){super(),this[xf]=!1,this[fh]=!1,this.pipes=new lh,this.buffer=new lh,this[Ot]=e&&e.objectMode||!1,this[Ot]?this[fr]=null:this[fr]=e&&e.encoding||null,this[fr]==="buffer"&&(this[fr]=null),this[Hi]=this[fr]?new nA(this[fr]):null,this[Gi]=!1,this[Xs]=!1,this[Af]=!1,this[Cf]=!1,this.writable=!0,this.readable=!0,this[Yt]=0,this[Rt]=!1}get bufferLength(){return this[Yt]}get encoding(){return this[fr]}set encoding(e){if(this[Ot])throw new Error("cannot set encoding in objectMode");if(this[fr]&&e!==this[fr]&&(this[Hi]&&this[Hi].lastNeed||this[Yt]))throw new Error("cannot change encoding");this[fr]!==e&&(this[Hi]=e?new nA(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[Hi].write(t)))),this[fr]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ot]}set objectMode(e){this[Ot]=this[Ot]||!!e}write(e,t,i){if(this[Gi])throw new Error("write after end");return this[Rt]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8"),!this[Ot]&&!Buffer.isBuffer(e)&&(TH(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):RH(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[Yt]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[Ot]&&!(t===this[fr]&&!this[Hi].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[fr]&&(e=this[Hi].write(e)),this.flowing?(this[Yt]!==0&&this[c0](!0),this.emit("data",e)):this[cA](e),this[Yt]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[Rt])return null;try{return this[Yt]===0||e===0||e>this[Yt]?null:(this[Ot]&&(e=null),this.buffer.length>1&&!this[Ot]&&(this.encoding?this.buffer=new lh([Array.from(this.buffer).join("")]):this.buffer=new lh([Buffer.concat(Array.from(this.buffer),this[Yt])])),this[oA](e||null,this.buffer.head.value))}finally{this[uh]()}}[oA](e,t){return e===t.length||e===null?this[h0]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[Yt]-=e),this.emit("data",t),!this.buffer.length&&!this[Gi]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t="utf8"),e&&this.write(e,t),i&&this.once("end",i),this[Gi]=!0,this.writable=!1,(this.flowing||!this[fh])&&this[uh](),this}[dh](){this[Rt]||(this[fh]=!1,this[xf]=!0,this.emit("resume"),this.buffer.length?this[c0]():this[Gi]?this[uh]():this.emit("drain"))}resume(){return this[dh]()}pause(){this[xf]=!1,this[fh]=!0}get destroyed(){return this[Rt]}get flowing(){return this[xf]}get paused(){return this[fh]}[cA](e){return this[Ot]?this[Yt]+=1:this[Yt]+=e.length,this.buffer.push(e)}[h0](){return this.buffer.length&&(this[Ot]?this[Yt]-=1:this[Yt]-=this.buffer.head.value.length),this.buffer.shift()}[c0](e){do;while(this[aA](this[h0]()));!e&&!this.buffer.length&&!this[Gi]&&this.emit("drain")}[aA](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[Rt])return;let i=this[Xs];t=t||{},e===process.stdout||e===process.stderr?t.end=!1:t.end=t.end!==!1;let s={dest:e,opts:t,ondrain:a(n=>this[dh](),"ondrain")};return this.pipes.push(s),e.on("drain",s.ondrain),this[dh](),i&&s.opts.end&&s.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[dh]():hA(e)&&this[Xs]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[Xs]}[uh](){!this[Af]&&!this[Xs]&&!this[Rt]&&this.buffer.length===0&&this[Gi]&&(this[Af]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Cf]&&this.emit("close"),this[Af]=!1)}emit(e,t){if(e!=="error"&&e!=="close"&&e!==Rt&&this[Rt])return;if(e==="data"){if(!t)return;this.pipes.length&&this.pipes.forEach(s=>s.dest.write(t)===!1&&this.pause())}else if(e==="end"){if(this[Xs]===!0)return;this[Xs]=!0,this.readable=!1,this[Hi]&&(t=this[Hi].end(),t&&(this.pipes.forEach(s=>s.dest.write(t)),super.emit("data",t))),this.pipes.forEach(s=>{s.dest.removeListener("drain",s.ondrain),s.opts.end&&s.dest.end()})}else if(e==="close"&&(this[Cf]=!0,!this[Xs]&&!this[Rt]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=t,arguments.length>2)for(let s=2;s<arguments.length;s++)i[s]=arguments[s];try{return super.emit.apply(this,i)}finally{hA(e)?this.removeAllListeners(e):this[uh]()}}collect(){let e=[];this[Ot]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[Ot]||(e.dataLength+=i.length)}),t.then(()=>e)}concat(){return this[Ot]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Ot]?Promise.reject(new Error("cannot concat in objectMode")):this[fr]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(Rt,()=>t(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>t(i))})}[SH](){return{next:a(()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[Gi])return Promise.resolve({done:!0});let i=null,s=null,n=a(u=>{this.removeListener("data",o),this.removeListener("end",c),s(u)},"onerr"),o=a(u=>{this.removeListener("error",n),this.removeListener("end",c),this.pause(),i({value:u,done:!!this[Gi]})},"ondata"),c=a(()=>{this.removeListener("error",n),this.removeListener("data",o),i({done:!0})},"onend"),h=a(()=>n(new Error("stream destroyed")),"ondestroy");return new Promise((u,f)=>{s=f,i=u,this.once(Rt,h),this.once("error",n),this.once("end",c),this.once("data",o)})},"next")}}[OH](){return{next:a(()=>{let t=this.read();return{value:t,done:t===null}},"next")}}destroy(e){return this[Rt]?(e?this.emit("error",e):this.emit(Rt),this):(this[Rt]=!0,this.buffer=new lh,this[Yt]=0,typeof this.close=="function"&&!this[Cf]&&this.close(),e?this.emit("error",e):this.emit(Rt),this)}static isStream(e){return!!e&&(e instanceof uA||e instanceof sA||e instanceof EH&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Kt=v((sEe,yi)=>{"use strict";var mh=require("crypto"),AH=dA(),pA=["sha256","sha384","sha512"],CH=/^[a-z0-9+/]+(?:=?=?)$/i,xH=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,IH=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,LH=/^[\x21-\x7E]+$/,f0={algorithms:["sha512"],error:!1,options:[],pickAlgorithm:jH,sep:" ",single:!1,strict:!1},Zt=a((r={})=>({...f0,...r}),"ssriOpts"),If=a(r=>!r||!r.length?"":`?${r.join("?")}`,"getOptString"),mA=Symbol("_onEnd"),l0=Symbol("_getOptions"),d0=class extends AH{static{a(this,"IntegrityStream")}constructor(e){super(),this.size=0,this.opts=e,this[l0]();let{algorithms:t=f0.algorithms}=e;this.algorithms=Array.from(new Set(t.concat(this.algorithm?[this.algorithm]:[]))),this.hashes=this.algorithms.map(mh.createHash)}[l0](){let{integrity:e,size:t,options:i}={...f0,...this.opts};this.sri=e?jr(e,this.opts):null,this.expectedSize=t,this.goodSri=this.sri?!!Object.keys(this.sri).length:!1,this.algorithm=this.goodSri?this.sri.pickAlgorithm(this.opts):null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=If(i)}emit(e,t){return e==="end"&&this[mA](),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}[mA](){this.goodSri||this[l0]();let e=jr(this.hashes.map((i,s)=>`${this.algorithms[s]}-${i.digest("base64")}${this.optString}`).join(" "),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let i=new Error(`stream size mismatch when checking ${this.sri}. Wanted: ${this.expectedSize} Found: ${this.size}`);i.code="EBADSIZE",i.found=this.size,i.expected=this.expectedSize,i.sri=this.sri,this.emit("error",i)}else if(this.sri&&!t){let i=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);i.code="EINTEGRITY",i.found=e,i.expected=this.digests,i.algorithm=this.algorithm,i.sri=this.sri,this.emit("error",i)}else this.emit("size",this.size),this.emit("integrity",e),t&&this.emit("verified",t)}},Js=class{static{a(this,"Hash")}get isHash(){return!0}constructor(e,t){t=Zt(t);let i=!!t.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let s=this.source.match(i?IH:xH);if(!s||i&&!pA.some(o=>o===s[1]))return;this.algorithm=s[1],this.digest=s[2];let n=s[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if(e=Zt(e),e.strict&&!(pA.some(i=>i===this.algorithm)&&this.digest.match(CH)&&this.options.every(i=>i.match(LH))))return"";let t=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${t}`}},Qn=class{static{a(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){e=Zt(e);let t=e.sep||" ";return e.strict&&(t=t.replace(/\S+/g," ")),Object.keys(this).map(i=>this[i].map(s=>Js.prototype.toString.call(s,e)).filter(s=>s.length).join(t)).filter(i=>i.length).join(t)}concat(e,t){t=Zt(t);let i=typeof e=="string"?e:ph(e,t);return jr(`${this.toString(t)} ${i}`,t)}hexDigest(){return jr(this,{single:!0}).hexDigest()}merge(e,t){t=Zt(t);let i=jr(e,t);for(let s in i)if(this[s]){if(!this[s].find(n=>i[s].find(o=>n.digest===o.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[s]=i[s]}match(e,t){t=Zt(t);let i=jr(e,t),s=i.pickAlgorithm(t);return this[s]&&i[s]&&this[s].find(n=>i[s].find(o=>n.digest===o.digest))||!1}pickAlgorithm(e){e=Zt(e);let t=e.pickAlgorithm;return Object.keys(this).reduce((s,n)=>t(s,n)||s)}};yi.exports.parse=jr;function jr(r,e){if(!r)return null;if(e=Zt(e),typeof r=="string")return u0(r,e);if(r.algorithm&&r.digest){let t=new Qn;return t[r.algorithm]=[r],u0(ph(t,e),e)}else return u0(ph(r,e),e)}a(jr,"parse");function u0(r,e){if(e.single)return new Js(r,e);let t=r.trim().split(/\s+/).reduce((i,s)=>{let n=new Js(s,e);if(n.algorithm&&n.digest){let o=n.algorithm;i[o]||(i[o]=[]),i[o].push(n)}return i},new Qn);return t.isEmpty()?null:t}a(u0,"_parse");yi.exports.stringify=ph;function ph(r,e){return e=Zt(e),r.algorithm&&r.digest?Js.prototype.toString.call(r,e):typeof r=="string"?ph(jr(r,e),e):Qn.prototype.toString.call(r,e)}a(ph,"stringify");yi.exports.fromHex=DH;function DH(r,e,t){t=Zt(t);let i=If(t.options);return jr(`${e}-${Buffer.from(r,"hex").toString("base64")}${i}`,t)}a(DH,"fromHex");yi.exports.fromData=PH;function PH(r,e){e=Zt(e);let t=e.algorithms,i=If(e.options);return t.reduce((s,n)=>{let o=mh.createHash(n).update(r).digest("base64"),c=new Js(`${n}-${o}${i}`,e);if(c.algorithm&&c.digest){let h=c.algorithm;s[h]||(s[h]=[]),s[h].push(c)}return s},new Qn)}a(PH,"fromData");yi.exports.fromStream=NH;function NH(r,e){e=Zt(e);let t=p0(e);return new Promise((i,s)=>{r.pipe(t),r.on("error",s),t.on("error",s);let n;t.on("integrity",o=>{n=o}),t.on("end",()=>i(n)),t.on("data",()=>{})})}a(NH,"fromStream");yi.exports.checkData=kH;function kH(r,e,t){if(t=Zt(t),e=jr(e,t),!e||!Object.keys(e).length){if(t.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let i=e.pickAlgorithm(t),s=mh.createHash(i).update(r).digest("base64"),n=jr({algorithm:i,digest:s}),o=n.match(e,t);if(o||!t.error)return o;if(typeof t.size=="number"&&r.length!==t.size){let c=new Error(`data size mismatch when checking ${e}. Wanted: ${t.size} Found: ${r.length}`);throw c.code="EBADSIZE",c.found=r.length,c.expected=t.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${n}. (${r.length} bytes)`);throw c.code="EINTEGRITY",c.found=n,c.expected=e,c.algorithm=i,c.sri=e,c}}a(kH,"checkData");yi.exports.checkStream=FH;function FH(r,e,t){if(t=Zt(t),t.integrity=e,e=jr(e,t),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let i=p0(t);return new Promise((s,n)=>{r.pipe(i),r.on("error",n),i.on("error",n);let o;i.on("verified",c=>{o=c}),i.on("end",()=>s(o)),i.on("data",()=>{})})}a(FH,"checkStream");yi.exports.integrityStream=p0;function p0(r={}){return new d0(r)}a(p0,"integrityStream");yi.exports.create=BH;function BH(r){r=Zt(r);let e=r.algorithms,t=If(r.options),i=e.map(mh.createHash);return{update:a(function(s,n){return i.forEach(o=>o.update(s,n)),this},"update"),digest:a(function(s){return e.reduce((o,c)=>{let h=i.shift().digest("base64"),u=new Js(`${c}-${h}${t}`,r);if(u.algorithm&&u.digest){let f=u.algorithm;o[f]||(o[f]=[]),o[f].push(u)}return o},new Qn)},"digest")}}a(BH,"createIntegrity");var MH=new Set(mh.getHashes()),gA=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(r=>MH.has(r));function jH(r,e){return gA.indexOf(r.toLowerCase())>=gA.indexOf(e.toLowerCase())?r:e}a(jH,"getPrioritizedHash")});var yA=v(m0=>{var eo=require("path"),en=process.platform==="win32",Qs=require("fs"),qH=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function UH(){var r;if(qH){var e=new Error;r=t}else r=i;return r;function t(s){s&&(e.message=s.message,s=e,i(s))}function i(s){if(s){if(process.throwDeprecation)throw s;if(!process.noDeprecation){var n="fs: missing callback "+(s.stack||s.message);process.traceDeprecation?console.trace(n):console.error(n)}}}}a(UH,"rethrow");function $H(r){return typeof r=="function"?r:UH()}a($H,"maybeCallback");var oEe=eo.normalize;en?Wi=/(.*?)(?:[\/\\]+|$)/g:Wi=/(.*?)(?:[\/]+|$)/g;var Wi;en?gh=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:gh=/^[\/]*/;var gh;m0.realpathSync=a(function(e,t){if(e=eo.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var i=e,s={},n={},o,c,h,u;f();function f(){var w=gh.exec(e);o=w[0].length,c=w[0],h=w[0],u="",en&&!n[h]&&(Qs.lstatSync(h),n[h]=!0)}for(a(f,"start");o<e.length;){Wi.lastIndex=o;var d=Wi.exec(e);if(u=c,c+=d[0],h=u+d[1],o=Wi.lastIndex,!(n[h]||t&&t[h]===h)){var p;if(t&&Object.prototype.hasOwnProperty.call(t,h))p=t[h];else{var m=Qs.lstatSync(h);if(!m.isSymbolicLink()){n[h]=!0,t&&(t[h]=h);continue}var y=null;if(!en){var g=m.dev.toString(32)+":"+m.ino.toString(32);s.hasOwnProperty(g)&&(y=s[g])}y===null&&(Qs.statSync(h),y=Qs.readlinkSync(h)),p=eo.resolve(u,y),t&&(t[h]=p),en||(s[g]=y)}e=eo.resolve(p,e.slice(o)),f()}}return t&&(t[i]=e),e},"realpathSync");m0.realpath=a(function(e,t,i){if(typeof i!="function"&&(i=$H(t),t=null),e=eo.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(i.bind(null,null,t[e]));var s=e,n={},o={},c,h,u,f;d();function d(){var w=gh.exec(e);c=w[0].length,h=w[0],u=w[0],f="",en&&!o[u]?Qs.lstat(u,function(b){if(b)return i(b);o[u]=!0,p()}):process.nextTick(p)}a(d,"start");function p(){if(c>=e.length)return t&&(t[s]=e),i(null,e);Wi.lastIndex=c;var w=Wi.exec(e);return f=h,h+=w[0],u=f+w[1],c=Wi.lastIndex,o[u]||t&&t[u]===u?process.nextTick(p):t&&Object.prototype.hasOwnProperty.call(t,u)?g(t[u]):Qs.lstat(u,m)}a(p,"LOOP");function m(w,b){if(w)return i(w);if(!b.isSymbolicLink())return o[u]=!0,t&&(t[u]=u),process.nextTick(p);if(!en){var _=b.dev.toString(32)+":"+b.ino.toString(32);if(n.hasOwnProperty(_))return y(null,n[_],u)}Qs.stat(u,function(R){if(R)return i(R);Qs.readlink(u,function(E,A){en||(n[_]=A),y(E,A)})})}a(m,"gotStat");function y(w,b,_){if(w)return i(w);var R=eo.resolve(f,b);t&&(t[_]=R),g(R)}a(y,"gotTarget");function g(w){e=eo.resolve(w,e.slice(c)),d()}a(g,"gotResolvedLink")},"realpath")});var Vi=v((hEe,_A)=>{_A.exports=tn;tn.realpath=tn;tn.sync=w0;tn.realpathSync=w0;tn.monkeypatch=GH;tn.unmonkeypatch=HH;var Oa=require("fs"),g0=Oa.realpath,y0=Oa.realpathSync,zH=process.version,wA=/^v[0-5]\./.test(zH),bA=yA();function vA(r){return r&&r.syscall==="realpath"&&(r.code==="ELOOP"||r.code==="ENOMEM"||r.code==="ENAMETOOLONG")}a(vA,"newError");function tn(r,e,t){if(wA)return g0(r,e,t);typeof e=="function"&&(t=e,e=null),g0(r,e,function(i,s){vA(i)?bA.realpath(r,e,t):t(i,s)})}a(tn,"realpath");function w0(r,e){if(wA)return y0(r,e);try{return y0(r,e)}catch(t){if(vA(t))return bA.realpathSync(r,e);throw t}}a(w0,"realpathSync");function GH(){Oa.realpath=tn,Oa.realpathSync=w0}a(GH,"monkeypatch");function HH(){Oa.realpath=g0,Oa.realpathSync=y0}a(HH,"unmonkeypatch")});var SA=v((uEe,EA)=>{EA.exports=function(r,e){for(var t=[],i=0;i<r.length;i++){var s=e(r[i],i);WH(s)?t.push.apply(t,s):t.push(s)}return t};var WH=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}});var b0=v((fEe,AA)=>{"use strict";AA.exports=RA;function RA(r,e,t){r instanceof RegExp&&(r=OA(r,t)),e instanceof RegExp&&(e=OA(e,t));var i=TA(r,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+r.length,i[1]),post:t.slice(i[1]+e.length)}}a(RA,"balanced");function OA(r,e){var t=e.match(r);return t?t[0]:null}a(OA,"maybeMatch");RA.range=TA;function TA(r,e,t){var i,s,n,o,c,h=t.indexOf(r),u=t.indexOf(e,h+1),f=h;if(h>=0&&u>0){if(r===e)return[h,u];for(i=[],n=t.length;f>=0&&!c;)f==h?(i.push(f),h=t.indexOf(r,f+1)):i.length==1?c=[i.pop(),u]:(s=i.pop(),s<n&&(n=s,o=u),u=t.indexOf(e,f+1)),f=h<u&&h>=0?h:u;i.length&&(c=[n,o])}return c}a(TA,"range")});var kA=v((pEe,NA)=>{var VH=SA(),CA=b0();NA.exports=KH;var xA="\0SLASH"+Math.random()+"\0",IA="\0OPEN"+Math.random()+"\0",_0="\0CLOSE"+Math.random()+"\0",LA="\0COMMA"+Math.random()+"\0",DA="\0PERIOD"+Math.random()+"\0";function v0(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}a(v0,"numeric");function YH(r){return r.split("\\\\").join(xA).split("\\{").join(IA).split("\\}").join(_0).split("\\,").join(LA).split("\\.").join(DA)}a(YH,"escapeBraces");function ZH(r){return r.split(xA).join("\\").split(IA).join("{").split(_0).join("}").split(LA).join(",").split(DA).join(".")}a(ZH,"unescapeBraces");function PA(r){if(!r)return[""];var e=[],t=CA("{","}",r);if(!t)return r.split(",");var i=t.pre,s=t.body,n=t.post,o=i.split(",");o[o.length-1]+="{"+s+"}";var c=PA(n);return n.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}a(PA,"parseCommaParts");function KH(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),Ra(YH(r),!0).map(ZH)):[]}a(KH,"expandTop");function XH(r){return"{"+r+"}"}a(XH,"embrace");function JH(r){return/^-?0\d/.test(r)}a(JH,"isPadded");function QH(r,e){return r<=e}a(QH,"lte");function eW(r,e){return r>=e}a(eW,"gte");function Ra(r,e){var t=[],i=CA("{","}",r);if(!i||/\$$/.test(i.pre))return[r];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),n=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),o=s||n,c=i.body.indexOf(",")>=0;if(!o&&!c)return i.post.match(/,(?!,).*\}/)?(r=i.pre+"{"+i.body+_0+i.post,Ra(r)):[r];var h;if(o)h=i.body.split(/\.\./);else if(h=PA(i.body),h.length===1&&(h=Ra(h[0],!1).map(XH),h.length===1)){var f=i.post.length?Ra(i.post,!1):[""];return f.map(function(W){return i.pre+h[0]+W})}var u=i.pre,f=i.post.length?Ra(i.post,!1):[""],d;if(o){var p=v0(h[0]),m=v0(h[1]),y=Math.max(h[0].length,h[1].length),g=h.length==3?Math.max(Math.abs(v0(h[2])),1):1,w=QH,b=m<p;b&&(g*=-1,w=eW);var _=h.some(JH);d=[];for(var R=p;w(R,m);R+=g){var E;if(n)E=String.fromCharCode(R),E==="\\"&&(E="");else if(E=String(R),_){var A=y-E.length;if(A>0){var P=new Array(A+1).join("0");R<0?E="-"+P+E.slice(1):E=P+E}}d.push(E)}}else d=VH(h,function(j){return Ra(j,!1)});for(var S=0;S<d.length;S++)for(var O=0;O<f.length;O++){var x=u+d[S]+f[O];(!e||o||x)&&t.push(x)}return t}a(Ra,"expand")});var Pf=v((gEe,qA)=>{qA.exports=xr;xr.Minimatch=rt;var yh=(function(){try{return require("path")}catch{}})()||{sep:"/"};xr.sep=yh.sep;var to=xr.GLOBSTAR=rt.GLOBSTAR={},tW=kA(),FA={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},E0="[^/]",S0=E0+"*?",rW="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",iW="(?:(?!(?:\\/|^)\\.).)*?",BA=sW("().*{}+?[]^$\\!");function sW(r){return r.split("").reduce(function(e,t){return e[t]=!0,e},{})}a(sW,"charSet");var MA=/\/+/;xr.filter=nW;function nW(r,e){return e=e||{},function(t,i,s){return xr(t,r,e)}}a(nW,"filter");function rn(r,e){e=e||{};var t={};return Object.keys(r).forEach(function(i){t[i]=r[i]}),Object.keys(e).forEach(function(i){t[i]=e[i]}),t}a(rn,"ext");xr.defaults=function(r){if(!r||typeof r!="object"||!Object.keys(r).length)return xr;var e=xr,t=a(function(s,n,o){return e(s,n,rn(r,o))},"minimatch");return t.Minimatch=a(function(s,n){return new e.Minimatch(s,rn(r,n))},"Minimatch"),t.Minimatch.defaults=a(function(s){return e.defaults(rn(r,s)).Minimatch},"defaults"),t.filter=a(function(s,n){return e.filter(s,rn(r,n))},"filter"),t.defaults=a(function(s){return e.defaults(rn(r,s))},"defaults"),t.makeRe=a(function(s,n){return e.makeRe(s,rn(r,n))},"makeRe"),t.braceExpand=a(function(s,n){return e.braceExpand(s,rn(r,n))},"braceExpand"),t.match=function(i,s,n){return e.match(i,s,rn(r,n))},t};rt.defaults=function(r){return xr.defaults(r).Minimatch};function xr(r,e,t){return Df(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new rt(e,t).match(r)}a(xr,"minimatch");function rt(r,e){if(!(this instanceof rt))return new rt(r,e);Df(r),e||(e={}),r=r.trim(),!e.allowWindowsEscape&&yh.sep!=="/"&&(r=r.split(yh.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=r,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}a(rt,"Minimatch");rt.prototype.debug=function(){};rt.prototype.make=oW;function oW(){var r=this.pattern,e=this.options;if(!e.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=a(function(){console.error.apply(console,arguments)},"debug")),this.debug(this.pattern,t),t=this.globParts=t.map(function(i){return i.split(MA)}),this.debug(this.pattern,t),t=t.map(function(i,s,n){return i.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}a(oW,"make");rt.prototype.parseNegate=aW;function aW(){var r=this.pattern,e=!1,t=this.options,i=0;if(!t.nonegate){for(var s=0,n=r.length;s<n&&r.charAt(s)==="!";s++)e=!e,i++;i&&(this.pattern=r.substr(i)),this.negate=e}}a(aW,"parseNegate");xr.braceExpand=function(r,e){return jA(r,e)};rt.prototype.braceExpand=jA;function jA(r,e){return e||(this instanceof rt?e=this.options:e={}),r=typeof r>"u"?this.pattern:r,Df(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:tW(r)}a(jA,"braceExpand"