mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
780 lines
2.7 MiB
JavaScript
780 lines
2.7 MiB
JavaScript
|
#!/usr/bin/env node
|
|||
|
/* eslint-disable */
|
|||
|
//prettier-ignore
|
|||
|
(()=>{var E3e=Object.create,oI=Object.defineProperty,w3e=Object.defineProperties,B3e=Object.getOwnPropertyDescriptor,Q3e=Object.getOwnPropertyDescriptors,v3e=Object.getOwnPropertyNames,cQ=Object.getOwnPropertySymbols,D3e=Object.getPrototypeOf,ZP=Object.prototype.hasOwnProperty,Sj=Object.prototype.propertyIsEnumerable;var xj=(t,e,r)=>e in t?oI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,re=(t,e)=>{for(var r in e||(e={}))ZP.call(e,r)&&xj(t,r,e[r]);if(cQ)for(var r of cQ(e))Sj.call(e,r)&&xj(t,r,e[r]);return t},Te=(t,e)=>w3e(t,Q3e(e)),k3e=t=>oI(t,"__esModule",{value:!0});var an=(t,e)=>{var r={};for(var s in t)ZP.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&cQ)for(var s of cQ(t))e.indexOf(s)<0&&Sj.call(t,s)&&(r[s]=t[s]);return r},St=(t,e)=>()=>(t&&(e=t(t=0)),e),K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),or=(t,e)=>{for(var r in e)oI(t,r,{get:e[r],enumerable:!0})},S3e=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of v3e(e))!ZP.call(t,s)&&s!=="default"&&oI(t,s,{get:()=>e[s],enumerable:!(r=B3e(e,s))||r.enumerable});return t},He=t=>S3e(k3e(oI(t!=null?E3e(D3e(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Ki={};or(Ki,{SAFE_TIME:()=>$P,S_IFDIR:()=>Lf,S_IFLNK:()=>Uf,S_IFMT:()=>NA,S_IFREG:()=>Of});var NA,Lf,Of,Uf,$P,aI=St(()=>{NA=61440,Lf=16384,Of=32768,Uf=40960,$P=456789e3});var eF={};or(eF,{BigIntStatsEntry:()=>lI,DEFAULT_MODE:()=>AI,DirEntry:()=>bj,StatEntry:()=>dp,areStatsEqual:()=>rF,clearStats:()=>uQ,convertToBigIntStats:()=>fQ,makeDefaultStats:()=>cI,makeEmptyStats:()=>x3e});function cI(){return new dp}function x3e(){return uQ(cI())}function uQ(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):tF.types.isDate(r)&&(t[e]=new Date(0))}return t}function fQ(t){let e=new lI;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let s=t[r];typeof s=="number"?e[r]=BigInt(s):tF.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function rF(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var tF,AI,bj,dp,lI,gQ=St(()=>{tF=He(require("util"));aI();AI=Of|420,bj=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&NA)===Lf}isFIFO(){return!1}isFile(){return(this.mode&NA)===Of}isSocket(){return!1}isSymbolicLink(){return(this.mode&NA)===Uf}},dp=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=AI;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&NA)===Lf}isFIFO(){return!1}isFile(){return(this.mode&NA)===Of}isSocket(){return!1}isSymbolicLink(){return(this.mode&NA)===Uf}},lI=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);
|
|||
|
`).length,s=e.length-r;return r>s?`\r
|
|||
|
`:`
|
|||
|
`}function eh(t,e){return e.replace(/\r?\n/g,_3e(t))}var _j,Kj,yp,th,Cp=St(()=>{_j=He(require("crypto")),Kj=He(require("os"));sF();Ia();yp=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let o=s.shift();if((await this.lstatPromise(o)).isDirectory()){let l=await this.readdirPromise(o);if(r)for(let u of l.sort())s.push(this.pathUtils.join(o,u));else throw new Error("Not supported")}else yield o}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let s=await this.openPromise(e,"r");try{let o=65536,n=Buffer.allocUnsafeSlow(o),l=(0,_j.createHash)(r),u=0;for(;(u=await this.readPromise(s,n,0,o))!==0;)l.update(u===o?n:n.slice(0,u));return l.digest("hex")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let o;try{o=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(o.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(l=>this.removePromise(this.pathUtils.resolve(e,l))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(l){if(l.code!=="EBUSY"&&l.code!=="ENOTEMPTY")throw l;n<s&&await new Promise(u=>setTimeout(u,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;throw o}if(s.isDirectory()){if(r)for(let o of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,o));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let o=e.split(this.pathUtils.sep),n;for(let l=2;l<=o.length;++l){let u=o.slice(0,l).join(this.pathUtils.sep);if(!this.existsSync(u)){try{await this.mkdirPromise(u)}catch(f){if(f.code==="EEXIST")continue;throw f}if(n!=null||(n=u),r!=null&&await this.chmodPromise(u,r),s!=null)await this.utimesPromise(u,s[0],s[1]);else{let f=await this.statPromise(this.pathUtils.dirname(u));await this.utimesPromise(u,f.atime,f.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let o=e.split(this.pathUtils.sep),n;for(let l=2;l<=o.length;++l){let u=o.slice(0,l).join(this.pathUtils.sep);if(!this.existsSync(u)){try{this.mkdirSync(u)}catch(f){if(f.code==="EEXIST")continue;throw f}if(n!=null||(n=u),r!=null&&this.chmodSync(u,r),s!=null)this.utimesSync(u,s[0],s[1]);else{let f=this.statSync(this.pathUtils.dirname(u));this.utimesSync(u,f.atime,f.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:o=!0,stableSort:n=!1,stableTime:l=!1,linkStrategy:u=null}={}){return await Tj(this,e,s,r,{overwrite:o,stableSort:n,stableTime:l,linkStrategy:u})}copySync(e,r,{baseFs:s=this,overwrite:o=!0}={}){let n=s.lstatSync(r),l=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let f=s.readdirSync(r);for(let g of f)this.copySync(this.pathUtils.join(e,g),s.pathUtils.join(r,g),{baseFs:s,overwrite:o})}else if(n.isFile()){if(!l||o){l&&this.removeSync(e);let f=s.readFileSync(r);this.writeFileSync(e,f)}}else if(n.isSymbolicLink()){if(!l||o){l&&this.removeSync(e);let f=s.readlinkSync(r);this.symlinkSync(pQ(this.pathUtils,f),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let u=n.mode&511;this.chmodSync(e,u)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let o=Buffer.alloc(0);try{o=await this.readFilePromise(e)}catch(n){}Buffer.compare(o,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:o}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch(u){}let l=s?eh(n,r):r;n!==l&&await this.writeFilePromise(e,l,{mode:o})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let o=Buffer.alloc(0);try{o=this.readFileSync(e)}catch(n){}Buffer.compare(o,r)!==0&&this.writeFileSync(e,r,{mode:s})}c
|
|||
|
`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)}
|
|||
|
`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),o=await r();typeof o!="undefined"&&(e=o),this.lutimesPromise?await this.lutimesPromise(e,s.atime,s.mtime):s.isSymbolicLink()||await this.utimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),o=r();typeof o!="undefined"&&(e=o),this.lutimesSync?this.lutimesSync(e,s.atime,s.mtime):s.isSymbolicLink()||this.utimesSync(e,s.atime,s.mtime)}},th=class extends yp{constructor(){super($)}}});var Hj,fi,Ip=St(()=>{Hj=He(require("fs"));Cp();pI();Ia();fi=class extends th{constructor(e=Hj.default){super();this.realFs=e,typeof this.realFs.lutimes!="undefined"&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return bt.root}resolve(e){return $.resolve(e)}async openPromise(e,r,s){return await new Promise((o,n)=>{this.realFs.open(de.fromPortablePath(e),r,s,this.makeCallback(o,n))})}openSync(e,r,s){return this.realFs.openSync(de.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,o)=>{typeof r!="undefined"?this.realFs.opendir(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.opendir(de.fromPortablePath(e),this.makeCallback(s,o))}).then(s=>Object.defineProperty(s,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,r){let s=typeof r!="undefined"?this.realFs.opendirSync(de.fromPortablePath(e),r):this.realFs.opendirSync(de.fromPortablePath(e));return Object.defineProperty(s,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,r,s=0,o=0,n=-1){return await new Promise((l,u)=>{this.realFs.read(e,r,s,o,n,(f,g)=>{f?u(f):l(g)})})}readSync(e,r,s,o,n){return this.realFs.readSync(e,r,s,o,n)}async writePromise(e,r,s,o,n){return await new Promise((l,u)=>typeof r=="string"?this.realFs.write(e,r,s,this.makeCallback(l,u)):this.realFs.write(e,r,s,o,n,this.makeCallback(l,u)))}writeSync(e,r,s,o,n){return typeof r=="string"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,o,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?de.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?de.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(de.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>de.toPortablePath(r))}realpathSync(e){return de.toPortablePath(this.realFs.realpathSync(de.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(de.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(de.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,o)=>{this.realFs.access(de.fromPortablePath(e),r,this.makeCallback(s,o))})}existsSync(e){return this.realFs.existsSync(de.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.stat(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.stat(de.fromPortablePath(e),this.makeCallback(s,o))})}statSync(e,r){return r?this.realFs.statSync(de.fromPortablePath(e),r):this.realFs.statSync(de.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,o)):this.realFs.fstat(e,this.makeCallback(s,o))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,o)=>{r?this.realFs.lstat(de.fromPortablePath(e),r,this.makeCallback(s,o)):this.realFs.lstat(de.fromPortablePath(e),this.makeCallback(s,o))})}lstatSync(e,r){return r?this.realFs.lstatSync(de.fromPortablePath(e),r):this.realFs.lstatSync(de.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,o)=>{this.realFs.fchmod(e,r,this.makeCallback(s,o))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,o)=>{this.realFs.chmod(de.fromPortablePath(e),r,this.makeCallback(s,o))})}c
|
|||
|
`,Ai=le(`\\
|
|||
|
`,!1),rr=function(){return""},Oi="\\",Xn=le("\\",!1),hs=/^[\\$"`]/,Ft=xe(["\\","$",'"',"`"],!1,!1),Xi=function(T){return T},Fn="\\a",ds=le("\\a",!1),IA=function(){return"a"},Pr="\\b",Fo=le("\\b",!1),mr=function(){return"\b"},Ka=/^[Ee]/,Z=xe(["E","e"],!1,!1),nn=function(){return""},we="\\f",qt=le("\\f",!1),sl=function(){return"\f"},Zi="\\n",$l=le("\\n",!1),Vt=function(){return`
|
|||
|
`},EA="\\r",Yc=le("\\r",!1),tf=function(){return"\r"},ol="\\t",Wc=le("\\t",!1),On=function(){return" "},wi="\\v",al=le("\\v",!1),Jc=function(){return"\v"},la=/^[\\'"?]/,$i=xe(["\\","'",'"',"?"],!1,!1),Ro=function(T){return String.fromCharCode(parseInt(T,16))},at="\\x",io=le("\\x",!1),Ha="\\u",ec=le("\\u",!1),ji="\\U",qa=le("\\U",!1),wA=function(T){return String.fromCodePoint(parseInt(T,16))},br=/^[0-7]/,BA=xe([["0","7"]],!1,!1),vs=/^[0-9a-fA-f]/,jt=xe([["0","9"],["a","f"],["A","f"]],!1,!1),Rn=qe(),hi="{}",ca=le("{}",!1),so=function(){return"{}"},Ds="-",ua=le("-",!1),nr="+",fa=le("+",!1),ks=".",oo=le(".",!1),ao=function(T,z,ae){return{type:"number",value:(T==="-"?-1:1)*parseFloat(z.join("")+"."+ae.join(""))}},Ao=function(T,z){return{type:"number",value:(T==="-"?-1:1)*parseInt(z.join(""))}},To=function(T){return re({type:"variable"},T)},di=function(T){return{type:"variable",name:T}},li=function(T){return T},ga="*",js=le("*",!1),Gi="/",Al=le("/",!1),QA=function(T,z,ae){return{type:z==="*"?"multiplication":"division",right:ae}},se=function(T,z){return z.reduce((ae,he)=>re({left:ae},he),T)},ve=function(T,z,ae){return{type:z==="+"?"addition":"subtraction",right:ae}},Je="$((",Rt=le("$((",!1),Dt="))",zt=le("))",!1),Tr=function(T){return T},Qn="$(",ja=le("$(",!1),b0=function(T){return T},No="${",vA=le("${",!1),Vc=":-",ll=le(":-",!1),zc=function(T,z){return{name:T,defaultValue:z}},Ug=":-}",tc=le(":-}",!1),_g=function(T){return{name:T,defaultValue:[]}},rc=":+",lo=le(":+",!1),Xc=function(T,z){return{name:T,alternativeValue:z}},cl=":+}",pa=le(":+}",!1),Kg=function(T){return{name:T,alternativeValue:[]}},ul=function(T){return{name:T}},P0="$",Hg=le("$",!1),ci=function(T){return e.isGlobPattern(T)},rf=function(T){return T},qg=/^[a-zA-Z0-9_]/,Zc=xe([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Gs=function(){return P()},nc=/^[$@*?#a-zA-Z0-9_\-]/,Ga=xe(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),es=/^[()}<>$|&; \t"']/,ha=xe(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),ic=/^[<>&; \t"']/,Ss=xe(["<",">","&",";"," "," ",'"',"'"],!1,!1),fl=/^[ \t]/,Mo=xe([" "," "],!1,!1),J=0,xt=0,Ya=[{line:1,column:1}],Ri=0,Wa=[],pt=0,Ja;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function P(){return t.substring(xt,J)}function U(){return sr(xt,J)}function j(T,z){throw z=z!==void 0?z:sr(xt,J),lr([Tt(T)],t.substring(xt,J),z)}function oe(T,z){throw z=z!==void 0?z:sr(xt,J),Br(T,z)}function le(T,z){return{type:"literal",text:T,ignoreCase:z}}function xe(T,z,ae){return{type:"class",parts:T,inverted:z,ignoreCase:ae}}function qe(){return{type:"any"}}function ft(){return{type:"end"}}function Tt(T){return{type:"other",description:T}}function Ar(T){var z=Ya[T],ae;if(z)return z;for(ae=T-1;!Ya[ae];)ae--;for(z=Ya[ae],z={line:z.line,column:z.column};ae<T;)t.charCodeAt(ae)===10?(z.line++,z.column=1):z.column++,ae++;return Ya[T]=z,z}function sr(T,z){var ae=Ar(T),he=Ar(z);return{start:{offset:T,line:ae.line,column:ae.column},end:{offset:z,line:he.line,column:he.column}}}function At(T){J<Ri||(J>Ri&&(Ri=J,Wa=[]),Wa.push(T))}function Br(T,z){return new sh(T,null,null,z)}function lr(T,z,ae){return new sh(sh.buildMessage(T,z),T,z,ae)}function jr(){var T,z;return T=J,z=mi(),z===r&&(z=null),z!==r&&(xt=T,z=n(z)),T=z,T}function mi(){var T,z,ae,he,tt;if(T=J,z=Lo(),z!==r){for(ae=[],he=_t();he!==r;)ae.push(he),he=_t();ae!==r?(he=ts(),he!==r?(tt=Ys(),tt===r&&(tt=null),tt!==r?(xt=T,z=l(z,he,tt),T=z):(J=T,T=r)):(J=T,T=r)):(J=T,T=r)}else J=T,T=r;if(T===r)if(T=J,z=Lo(),z!==r){for(ae=[],he=_t();he!==r;)ae.push(he),he=_t();ae!==r?(he=ts(),he===r&&(he=null),he!==r?(xt=T,z=u(z,he),T=z):(J=T,T=r)):(J=T,T=r)}else J=T,T=r;return T}function Ys(){var T,z,ae,he,tt;for(T=J,z=[],ae=_t();ae!==r;)z.push(ae),ae=_t();if(z!==r)if(ae=mi(),ae!==r){for(he=[],tt=_t();tt!==r;)he.push(tt),tt=_t();he!==r?(xt=T,z=f(ae),T=z):(J=T,T=r)}else J=T,T=r;else J=T,T=r;return T}function ts(){var T;return t.charCodeAt(J)===59?(T=g,J++):(T=r,pt===0&&At(C)),T===r&&(t.charCodeAt(J)===38?(T=w,J++):(T=r,pt===0&&At(B)))
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o-1))===-1;)if(o-=1,this.position-o>r/2-1){s=" ... ",o+=5;break}for(n="",l=this.position;l<this.buffer.length&&`\0\r
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(l))===-1;)if(l+=1,l-this.position>r/2-1){n=" ... ",l-=5;break}return u=this.buffer.slice(o,l),c5.repeat(" ",e)+s+u+n+`
|
|||
|
`+c5.repeat(" ",e+this.position-o+s.length)+"^"};PF.prototype.toString=function(e){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:
|
|||
|
`+r)),s};l5.exports=PF});var Ms=K((nDt,f5)=>{"use strict";var g5=dm(),D8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],k8e=["scalar","sequence","mapping"];function S8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function x8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(D8e.indexOf(r)===-1)throw new g5('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=S8e(e.styleAliases||null),k8e.indexOf(this.kind)===-1)throw new g5('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}f5.exports=x8e});var ch=K((iDt,p5)=>{"use strict";var h5=lh(),NQ=dm(),b8e=Ms();function FF(t,e,r){var s=[];return t.include.forEach(function(o){r=FF(o,e,r)}),t[e].forEach(function(o){r.forEach(function(n,l){n.tag===o.tag&&n.kind===o.kind&&s.push(l)}),r.push(o)}),r.filter(function(o,n){return s.indexOf(n)===-1})}function P8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(o){t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function mm(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new NQ("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=FF(this,"implicit",[]),this.compiledExplicit=FF(this,"explicit",[]),this.compiledTypeMap=P8e(this.compiledImplicit,this.compiledExplicit)}mm.DEFAULT=null;mm.create=function(){var e,r;switch(arguments.length){case 1:e=mm.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new NQ("Wrong number of arguments for Schema.create function")}if(e=h5.toArray(e),r=h5.toArray(r),!e.every(function(s){return s instanceof mm}))throw new NQ("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(s){return s instanceof b8e}))throw new NQ("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new mm({include:e,explicit:r})};p5.exports=mm});var m5=K((sDt,d5)=>{"use strict";var F8e=Ms();d5.exports=new F8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var C5=K((oDt,y5)=>{"use strict";var R8e=Ms();y5.exports=new R8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var E5=K((aDt,I5)=>{"use strict";var T8e=Ms();I5.exports=new T8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var MQ=K((ADt,w5)=>{"use strict";var N8e=ch();w5.exports=new N8e({explicit:[m5(),C5(),E5()]})});var Q5=K((lDt,B5)=>{"use strict";var M8e=Ms();function L8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function O8e(){return null}function U8e(t){return t===null}B5.exports=new M8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:L8e,construct:O8e,predicate:U8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var D5=K((cDt,v5)=>{"use strict";var _8e=Ms();function K8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function H8e(t){return t==="true"||t==="True"||t==="TRUE"}function q8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}v5.exports=new _8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:K8e,construct:H8e,predicate:q8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
|
|||
|
\r`;function p_e(t){if(t===null)return!1;var e,r,s=0,o=t.length,n=NF;for(r=0;r<o;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8==0}function h_e(t){var e,r,s=t.replace(/[\r\n=]/g,""),o=s.length,n=NF,l=0,u=[];for(e=0;e<o;e++)e%4==0&&e&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|n.indexOf(s.charAt(e));return r=o%4*6,r===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):r===18?(u.push(l>>10&255),u.push(l>>2&255)):r===12&&u.push(l>>4&255),uh?uh.from?uh.from(u):new uh(u):u}function d_e(t){var e="",r=0,s,o,n=t.length,l=NF;for(s=0;s<n;s++)s%3==0&&s&&(e+=l[r>>18&63],e+=l[r>>12&63],e+=l[r>>6&63],e+=l[r&63]),r=(r<<8)+t[s];return o=n%3,o===0?(e+=l[r>>18&63],e+=l[r>>12&63],e+=l[r>>6&63],e+=l[r&63]):o===2?(e+=l[r>>10&63],e+=l[r>>4&63],e+=l[r<<2&63],e+=l[64]):o===1&&(e+=l[r>>2&63],e+=l[r<<4&63],e+=l[64],e+=l[64]),e}function m_e(t){return uh&&uh.isBuffer(t)}_5.exports=new g_e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:p_e,construct:h_e,predicate:m_e,represent:d_e})});var j5=K((yDt,q5)=>{"use strict";var y_e=Ms(),C_e=Object.prototype.hasOwnProperty,I_e=Object.prototype.toString;function E_e(t){if(t===null)return!0;var e=[],r,s,o,n,l,u=t;for(r=0,s=u.length;r<s;r+=1){if(o=u[r],l=!1,I_e.call(o)!=="[object Object]")return!1;for(n in o)if(C_e.call(o,n))if(!l)l=!0;else return!1;if(!l)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function w_e(t){return t!==null?t:[]}q5.exports=new y_e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:E_e,construct:w_e})});var Y5=K((CDt,G5)=>{"use strict";var B_e=Ms(),Q_e=Object.prototype.toString;function v_e(t){if(t===null)return!0;var e,r,s,o,n,l=t;for(n=new Array(l.length),e=0,r=l.length;e<r;e+=1){if(s=l[e],Q_e.call(s)!=="[object Object]"||(o=Object.keys(s),o.length!==1))return!1;n[e]=[o[0],s[o[0]]]}return!0}function D_e(t){if(t===null)return[];var e,r,s,o,n,l=t;for(n=new Array(l.length),e=0,r=l.length;e<r;e+=1)s=l[e],o=Object.keys(s),n[e]=[o[0],s[o[0]]];return n}G5.exports=new B_e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:v_e,construct:D_e})});var J5=K((IDt,W5)=>{"use strict";var k_e=Ms(),S_e=Object.prototype.hasOwnProperty;function x_e(t){if(t===null)return!0;var e,r=t;for(e in r)if(S_e.call(r,e)&&r[e]!==null)return!1;return!0}function b_e(t){return t!==null?t:{}}W5.exports=new k_e("tag:yaml.org,2002:set",{kind:"mapping",resolve:x_e,construct:b_e})});var ym=K((EDt,V5)=>{"use strict";var P_e=ch();V5.exports=new P_e({include:[TF()],implicit:[L5(),U5()],explicit:[H5(),j5(),Y5(),J5()]})});var X5=K((wDt,z5)=>{"use strict";var F_e=Ms();function R_e(){return!0}function T_e(){}function N_e(){return""}function M_e(t){return typeof t=="undefined"}z5.exports=new F_e("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:R_e,construct:T_e,predicate:M_e,represent:N_e})});var $5=K((BDt,Z5)=>{"use strict";var L_e=Ms();function O_e(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),s="";return!(e[0]==="/"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!=="/"))}function U_e(t){var e=t,r=/\/([gim]*)$/.exec(t),s="";return e[0]==="/"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function __e(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function K_e(t){return Object.prototype.toString.call(t)==="[object RegExp]"}Z5.exports=new L_e("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:O_e,construct:U_e,predicate:K_e,represent:__e})});var r9=K((QDt,e9)=>{"use strict";var LQ;try{t9=require,LQ=t9("esprima")}catch(t){typeof window!="undefined"&&(LQ=window.esprima)}var t9,H_e=Ms();function q_e(t){if(t===null)return!1;try{var e="("+t+")",r=LQ.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch(s){return!1}}function j_e(t){var e="("+t+")",r=LQ.parse(e,{range:!0}),s=[],o;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&
|
|||
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function rKe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var p9=new Array(256),h9=new Array(256);for(var Im=0;Im<256;Im++)p9[Im]=g9(Im)?1:0,h9[Im]=g9(Im);function nKe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||J_e,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d9(t,e){return new s9(e,new W_e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Lr(t,e){throw d9(t,e)}function _Q(t,e){t.onWarning&&t.onWarning.call(null,d9(t,e))}var m9={YAML:function(e,r,s){var o,n,l;e.version!==null&&Lr(e,"duplication of %YAML directive"),s.length!==1&&Lr(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),o===null&&Lr(e,"ill-formed argument of the YAML directive"),n=parseInt(o[1],10),l=parseInt(o[2],10),n!==1&&Lr(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=l<2,l!==1&&l!==2&&_Q(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var o,n;s.length!==2&&Lr(e,"TAG directive accepts exactly two arguments"),o=s[0],n=s[1],c9.test(o)||Lr(e,"ill-formed tag handle (first argument) of the TAG directive"),wp.call(e.tagMap,o)&&Lr(e,'there is a previously declared suffix for "'+o+'" tag handle'),u9.test(n)||Lr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[o]=n}};function Bp(t,e,r,s){var o,n,l,u;if(e<r){if(u=t.input.slice(e,r),s)for(o=0,n=u.length;o<n;o+=1)l=u.charCodeAt(o),l===9||32<=l&&l<=1114111||Lr(t,"expected valid JSON character");else z_e.test(u)&&Lr(t,"the stream contains non-printable characters");t.result+=u}}function y9(t,e,r,s){var o,n,l,u;for(jf.isObject(r)||Lr(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),l=0,u=o.length;l<u;l+=1)n=o[l],wp.call(e,n)||(e[n]=r[n],s[n]=!0)}function Em(t,e,r,s,o,n,l,u){var f,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),f=0,g=o.length;f<g;f+=1)Array.isArray(o[f])&&Lr(t,"nested arrays are not supported inside keys"),typeof o=="object"&&f9(o[f])==="[object Object]"&&(o[f]="[object Object]");if(typeof o=="object"&&f9(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(f=0,g=n.length;f<g;f+=1)y9(t,e,n[f],r);else y9(t,e,n,r);else!t.json&&!wp.call(r,o)&&wp.call(e,o)&&(t.line=l||t.line,t.position=u||t.position,Lr(t,"duplicated mapping key")),e[o]=n,delete r[o];return e}function LF(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Lr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function ys(t,e,r){for(var s=0,o=t.input.charCodeAt(t.position);o!==0;){for(;fh(o);)o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(mu(o))for(LF(t),o=t.input.charCodeAt(t.position),s++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&_Q(t,"deficient indentation"),s}function KQ(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||nA(r)))}function OF(t,e){e===1?t.result+=" ":e>1&&(t.result+=jf.repeat(`
|
|||
|
`,e-1))}function iKe(t,e,r){var s,o,n,l,u,f,g,C,w=t.kind,B=t.result,S;if(S=t.input.charCodeAt(t.position),nA(S)||Cm(S)||S===35||S===38||S===42||S===33||S===124||S===62||S===39||S===34||S===37||S===64||S===96||(S===63||S===45)&&(o=t.input.charCodeAt(t.position+1),nA(o)||r&&Cm(o)))return!1;for(t.kind="scalar",t.result="",n=l=t.position,u=!1;S!==0;){if(S===58){if(o=t.input.charCodeAt(t.position+1),nA(o)||r&&Cm(o))break}else if(S===35){if(s=t.input.charCodeAt(t.position-1),nA(s))break}else{if(t.position===t.lineStart&&KQ(t)||r&&Cm(S))break;if(mu(S))if(f=t.line,g=t.lineStart,C=t.lineIndent,ys(t,!1,-1),t.lineIndent>=e){u=!0,S=t.input.charCodeAt(t.position);continue}else{t.position=l,t.line=f,t.lineStart=g,t.lineIndent=C;break}}u&&(Bp(t,n,l,!1),OF(t,t.line-f),n=l=t.position,u=!1),fh(S)||(l=t.position+1),S=t.input.charCodeAt(++t.position)}return Bp(t,n,l,!1),t.result?!0:(t.kind=w,t.result=B,!1)}function sKe(t,e){var r,s,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Bp(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,o=t.position;else return!0;else mu(r)?(Bp(t,s,o,!0),OF(t,ys(t,!1,e)),s=o=t.position):t.position===t.lineStart&&KQ(t)?Lr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Lr(t,"unexpected end of the stream within a single quoted scalar")}function oKe(t,e){var r,s,o,n,l,u;if(u=t.input.charCodeAt(t.position),u!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(u=t.input.charCodeAt(t.position))!==0;){if(u===34)return Bp(t,r,t.position,!0),t.position++,!0;if(u===92){if(Bp(t,r,t.position,!0),u=t.input.charCodeAt(++t.position),mu(u))ys(t,!1,e);else if(u<256&&p9[u])t.result+=h9[u],t.position++;else if((l=eKe(u))>0){for(o=l,n=0;o>0;o--)u=t.input.charCodeAt(++t.position),(l=$_e(u))>=0?n=(n<<4)+l:Lr(t,"expected hexadecimal character");t.result+=rKe(n),t.position++}else Lr(t,"unknown escape sequence");r=s=t.position}else mu(u)?(Bp(t,r,s,!0),OF(t,ys(t,!1,e)),r=s=t.position):t.position===t.lineStart&&KQ(t)?Lr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Lr(t,"unexpected end of the stream within a double quoted scalar")}function aKe(t,e){var r=!0,s,o=t.tag,n,l=t.anchor,u,f,g,C,w,B={},S,y,N,L;if(L=t.input.charCodeAt(t.position),L===91)f=93,w=!1,n=[];else if(L===123)f=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),L=t.input.charCodeAt(++t.position);L!==0;){if(ys(t,!0,e),L=t.input.charCodeAt(t.position),L===f)return t.position++,t.tag=o,t.anchor=l,t.kind=w?"mapping":"sequence",t.result=n,!0;r||Lr(t,"missed comma between flow collection entries"),y=S=N=null,g=C=!1,L===63&&(u=t.input.charCodeAt(t.position+1),nA(u)&&(g=C=!0,t.position++,ys(t,!0,e))),s=t.line,wm(t,e,OQ,!1,!0),y=t.tag,S=t.result,ys(t,!0,e),L=t.input.charCodeAt(t.position),(C||t.line===s)&&L===58&&(g=!0,L=t.input.charCodeAt(++t.position),ys(t,!0,e),wm(t,e,OQ,!1,!0),N=t.result),w?Em(t,n,B,y,S,N):g?n.push(Em(t,null,B,y,S,N)):n.push(S),ys(t,!0,e),L=t.input.charCodeAt(t.position),L===44?(r=!0,L=t.input.charCodeAt(++t.position)):r=!1}Lr(t,"unexpected end of the stream within a flow collection")}function AKe(t,e){var r,s,o=MF,n=!1,l=!1,u=e,f=0,g=!1,C,w;if(w=t.input.charCodeAt(t.position),w===124)s=!1;else if(w===62)s=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)MF===o?o=w===43?l9:V_e:Lr(t,"repeat of a chomping mode identifier");else if((C=tKe(w))>=0)C===0?Lr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Lr(t,"repeat of an indentation width identifier"):(u=e+C-1,l=!0);else break;if(fh(w)){do w=t.input.charCodeAt(++t.position);while(fh(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!mu(w)&&w!==0)}for(;w!==0;){for(LF(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!l||t.lineIndent<u)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>u&&(u=t
|
|||
|
`,n?1+f:f):o===MF&&n&&(t.result+=`
|
|||
|
`);break}for(s?fh(w)?(g=!0,t.result+=jf.repeat(`
|
|||
|
`,n?1+f:f)):g?(g=!1,t.result+=jf.repeat(`
|
|||
|
`,f+1)):f===0?n&&(t.result+=" "):t.result+=jf.repeat(`
|
|||
|
`,f):t.result+=jf.repeat(`
|
|||
|
`,n?1+f:f),n=!0,l=!0,f=0,r=t.position;!mu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);Bp(t,r,t.position,!1)}return!0}function C9(t,e){var r,s=t.tag,o=t.anchor,n=[],l,u=!1,f;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),f=t.input.charCodeAt(t.position);f!==0&&!(f!==45||(l=t.input.charCodeAt(t.position+1),!nA(l)));){if(u=!0,t.position++,ys(t,!0,-1)&&t.lineIndent<=e){n.push(null),f=t.input.charCodeAt(t.position);continue}if(r=t.line,wm(t,e,A9,!1,!0),n.push(t.result),ys(t,!0,-1),f=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&f!==0)Lr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return u?(t.tag=s,t.anchor=o,t.kind="sequence",t.result=n,!0):!1}function lKe(t,e,r){var s,o,n,l,u=t.tag,f=t.anchor,g={},C={},w=null,B=null,S=null,y=!1,N=!1,L;for(t.anchor!==null&&(t.anchorMap[t.anchor]=g),L=t.input.charCodeAt(t.position);L!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,l=t.position,(L===63||L===58)&&nA(s))L===63?(y&&(Em(t,g,C,w,B,null),w=B=S=null),N=!0,y=!0,o=!0):y?(y=!1,o=!0):Lr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,L=s;else if(wm(t,r,a9,!1,!0))if(t.line===n){for(L=t.input.charCodeAt(t.position);fh(L);)L=t.input.charCodeAt(++t.position);if(L===58)L=t.input.charCodeAt(++t.position),nA(L)||Lr(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Em(t,g,C,w,B,null),w=B=S=null),N=!0,y=!1,o=!1,w=t.tag,B=t.result;else if(N)Lr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=f,!0}else if(N)Lr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=f,!0;else break;if((t.line===n||t.lineIndent>e)&&(wm(t,e,UQ,!0,o)&&(y?B=t.result:S=t.result),y||(Em(t,g,C,w,B,S,n,l),w=B=S=null),ys(t,!0,-1),L=t.input.charCodeAt(t.position)),t.lineIndent>e&&L!==0)Lr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Em(t,g,C,w,B,null),N&&(t.tag=u,t.anchor=f,t.kind="mapping",t.result=g),N}function cKe(t){var e,r=!1,s=!1,o,n,l;if(l=t.input.charCodeAt(t.position),l!==33)return!1;if(t.tag!==null&&Lr(t,"duplication of a tag property"),l=t.input.charCodeAt(++t.position),l===60?(r=!0,l=t.input.charCodeAt(++t.position)):l===33?(s=!0,o="!!",l=t.input.charCodeAt(++t.position)):o="!",e=t.position,r){do l=t.input.charCodeAt(++t.position);while(l!==0&&l!==62);t.position<t.length?(n=t.input.slice(e,t.position),l=t.input.charCodeAt(++t.position)):Lr(t,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!nA(l);)l===33&&(s?Lr(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),c9.test(o)||Lr(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),l=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),Z_e.test(n)&&Lr(t,"tag suffix cannot contain flow indicator characters")}return n&&!u9.test(n)&&Lr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:wp.call(t.tagMap,o)?t.tag=t.tagMap[o]+n:o==="!"?t.tag="!"+n:o==="!!"?t.tag="tag:yaml.org,2002:"+n:Lr(t,'undeclared tag handle "'+o+'"'),!0}function uKe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Lr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!nA(r)&&!Cm(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Lr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function fKe(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!nA(s)&&!Cm(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Lr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),wp.call(t.anchorMap,r)||Lr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],ys(t,!0,-1),!0}function wm(t,e,r,s,o){var n,l,u,f=1,g=!1,C=!1,w,B,S,y,N;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n
|
|||
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new nKe(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,Lr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)gKe(r);return r.documents}function E9(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var s=I9(t,r);if(typeof e!="function")return s;for(var o=0,n=s.length;o<n;o+=1)e(s[o])}function w9(t,e){var r=I9(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new s9("expected a single document in the stream, but found more")}}function pKe(t,e,r){return typeof e=="object"&&e!==null&&typeof r=="undefined"&&(r=e,e=null),E9(t,e,jf.extend({schema:o9},r))}function hKe(t,e){return w9(t,jf.extend({schema:o9},e))}vI.exports.loadAll=E9;vI.exports.load=w9;vI.exports.safeLoadAll=pKe;vI.exports.safeLoad=hKe});var Y9=K((kDt,UF)=>{"use strict";var DI=lh(),kI=dm(),dKe=QI(),mKe=ym(),Q9=Object.prototype.toString,v9=Object.prototype.hasOwnProperty,yKe=9,SI=10,CKe=13,IKe=32,EKe=33,wKe=34,D9=35,BKe=37,QKe=38,vKe=39,DKe=42,k9=44,kKe=45,S9=58,SKe=61,xKe=62,bKe=63,PKe=64,x9=91,b9=93,FKe=96,P9=123,RKe=124,F9=125,Jo={};Jo[0]="\\0";Jo[7]="\\a";Jo[8]="\\b";Jo[9]="\\t";Jo[10]="\\n";Jo[11]="\\v";Jo[12]="\\f";Jo[13]="\\r";Jo[27]="\\e";Jo[34]='\\"';Jo[92]="\\\\";Jo[133]="\\N";Jo[160]="\\_";Jo[8232]="\\L";Jo[8233]="\\P";var TKe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function NKe(t,e){var r,s,o,n,l,u,f;if(e===null)return{};for(r={},s=Object.keys(e),o=0,n=s.length;o<n;o+=1)l=s[o],u=String(e[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),f=t.compiledTypeMap.fallback[l],f&&v9.call(f.styleAliases,u)&&(u=f.styleAliases[u]),r[l]=u;return r}function R9(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r="x",s=2;else if(t<=65535)r="u",s=4;else if(t<=4294967295)r="U",s=8;else throw new kI("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+DI.repeat("0",s-e.length)+e}function MKe(t){this.schema=t.schema||dKe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=DI.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=NKe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function T9(t,e){for(var r=DI.repeat(" ",e),s=0,o=-1,n="",l,u=t.length;s<u;)o=t.indexOf(`
|
|||
|
`,s),o===-1?(l=t.slice(s),s=u):(l=t.slice(s,o+1),s=o+1),l.length&&l!==`
|
|||
|
`&&(n+=r),n+=l;return n}function _F(t,e){return`
|
|||
|
`+DI.repeat(" ",t.indent*e)}function LKe(t,e){var r,s,o;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(o=t.implicitTypes[r],o.resolve(e))return!0;return!1}function KF(t){return t===IKe||t===yKe}function Bm(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function OKe(t){return Bm(t)&&!KF(t)&&t!==65279&&t!==CKe&&t!==SI}function N9(t,e){return Bm(t)&&t!==65279&&t!==k9&&t!==x9&&t!==b9&&t!==P9&&t!==F9&&t!==S9&&(t!==D9||e&&OKe(e))}function UKe(t){return Bm(t)&&t!==65279&&!KF(t)&&t!==kKe&&t!==bKe&&t!==S9&&t!==k9&&t!==x9&&t!==b9&&t!==P9&&t!==F9&&t!==D9&&t!==QKe&&t!==DKe&&t!==EKe&&t!==RKe&&t!==SKe&&t!==xKe&&t!==vKe&&t!==wKe&&t!==BKe&&t!==PKe&&t!==FKe}function M9(t){var e=/^\n* /;return e.test(t)}var L9=1,O9=2,U9=3,_9=4,HQ=5;function _Ke(t,e,r,s,o){var n,l,u,f=!1,g=!1,C=s!==-1,w=-1,B=UKe(t.charCodeAt(0))&&!KF(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(l=t.charCodeAt(n),!Bm(l))return HQ;u=n>0?t.charCodeAt(n-1):null,B=B&&N9(l,u)}else{for(n=0;n<t.length;n++){if(l=t.charCodeAt(n),l===SI)f=!0,C&&(g=g||n-w-1>s&&t[w+1]!==" ",w=n);else if(!Bm(l))return HQ;u=n>0?t.charCodeAt(n-1):null,B=B&&N9(l,u)}g=g||C&&n-w-1>s&&t[w+1]!==" "}return!f&&!g?B&&!o(t)?L9:O9:r>9&&M9(t)?HQ:g?_9:U9}function qKe(t,e,r,s){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&TKe.indexOf(e)!==-1)return"'"+e+"'";var o=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=s||t.flowLevel>-1&&r>=t.flowLevel;function u(f){return LKe(t,f)}switch(_Ke(e,l,t.indent,n,u)){case L9:return e;case O9:return"'"+e.replace(/'/g,"''")+"'";case U9:return"|"+K9(e,t.indent)+H9(T9(e,o));case _9:return">"+K9(e,t.indent)+H9(T9(KKe(e,n),o));case HQ:return'"'+HKe(e,n)+'"';default:throw new kI("impossible error: invalid scalar style")}}()}function K9(t,e){var r=M9(t)?String(e):"",s=t[t.length-1]===`
|
|||
|
`,o=s&&(t[t.length-2]===`
|
|||
|
`||t===`
|
|||
|
`),n=o?"+":s?"":"-";return r+n+`
|
|||
|
`}function H9(t){return t[t.length-1]===`
|
|||
|
`?t.slice(0,-1):t}function KKe(t,e){for(var r=/(\n+)([^\n]*)/g,s=function(){var g=t.indexOf(`
|
|||
|
`);return g=g!==-1?g:t.length,r.lastIndex=g,q9(t.slice(0,g),e)}(),o=t[0]===`
|
|||
|
`||t[0]===" ",n,l;l=r.exec(t);){var u=l[1],f=l[2];n=f[0]===" ",s+=u+(!o&&!n&&f!==""?`
|
|||
|
`:"")+q9(f,e),o=n}return s}function q9(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,s,o=0,n,l=0,u=0,f="";s=r.exec(t);)u=s.index,u-o>e&&(n=l>o?l:u,f+=`
|
|||
|
`+t.slice(o,n),o=n+1),l=u;return f+=`
|
|||
|
`,t.length-o>e&&l>o?f+=t.slice(o,l)+`
|
|||
|
`+t.slice(l+1):f+=t.slice(o),f.slice(1)}function HKe(t){for(var e="",r,s,o,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=R9((r-55296)*1024+s-56320+65536),n++;continue}o=Jo[r],e+=!o&&Bm(r)?t[n]:o||R9(r)}return e}function jKe(t,e,r){var s="",o=t.tag,n,l;for(n=0,l=r.length;n<l;n+=1)gh(t,e,r[n],!1,!1)&&(n!==0&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=o,t.dump="["+s+"]"}function GKe(t,e,r,s){var o="",n=t.tag,l,u;for(l=0,u=r.length;l<u;l+=1)gh(t,e+1,r[l],!0,!0)&&((!s||l!==0)&&(o+=_F(t,e)),t.dump&&SI===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=n,t.dump=o||"[]"}function YKe(t,e,r){var s="",o=t.tag,n=Object.keys(r),l,u,f,g,C;for(l=0,u=n.length;l<u;l+=1)C="",l!==0&&(C+=", "),t.condenseFlow&&(C+='"'),f=n[l],g=r[f],!!gh(t,e,f,!1,!1)&&(t.dump.length>1024&&(C+="? "),C+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),!!gh(t,e,g,!1,!1)&&(C+=t.dump,s+=C));t.tag=o,t.dump="{"+s+"}"}function WKe(t,e,r,s){var o="",n=t.tag,l=Object.keys(r),u,f,g,C,w,B;if(t.sortKeys===!0)l.sort();else if(typeof t.sortKeys=="function")l.sort(t.sortKeys);else if(t.sortKeys)throw new kI("sortKeys must be a boolean or a function");for(u=0,f=l.length;u<f;u+=1)B="",(!s||u!==0)&&(B+=_F(t,e)),g=l[u],C=r[g],!!gh(t,e+1,g,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&SI===t.dump.charCodeAt(0)?B+="?":B+="? "),B+=t.dump,w&&(B+=_F(t,e)),!!gh(t,e+1,C,!0,w)&&(t.dump&&SI===t.dump.charCodeAt(0)?B+=":":B+=": ",B+=t.dump,o+=B));t.tag=n,t.dump=o||"{}"}function j9(t,e,r){var s,o,n,l,u,f;for(o=r?t.explicitTypes:t.implicitTypes,n=0,l=o.length;n<l;n+=1)if(u=o[n],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof e=="object"&&e instanceof u.instanceOf)&&(!u.predicate||u.predicate(e))){if(t.tag=r?u.tag:"?",u.represent){if(f=t.styleMap[u.tag]||u.defaultStyle,Q9.call(u.represent)==="[object Function]")s=u.represent(e,f);else if(v9.call(u.represent,f))s=u.represent[f](e,f);else throw new kI("!<"+u.tag+'> tag resolver accepts not "'+f+'" style');t.dump=s}return!0}return!1}function gh(t,e,r,s,o,n){t.tag=null,t.dump=r,j9(t,r,!1)||j9(t,r,!0);var l=Q9.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var u=l==="[object Object]"||l==="[object Array]",f,g;if(u&&(f=t.duplicates.indexOf(r),g=f!==-1),(t.tag!==null&&t.tag!=="?"||g||t.indent!==2&&e>0)&&(o=!1),g&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(u&&g&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),l==="[object Object]")s&&Object.keys(t.dump).length!==0?(WKe(t,e,t.dump,o),g&&(t.dump="&ref_"+f+t.dump)):(YKe(t,e,t.dump),g&&(t.dump="&ref_"+f+" "+t.dump));else if(l==="[object Array]"){var C=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(GKe(t,C,t.dump,o),g&&(t.dump="&ref_"+f+t.dump)):(jKe(t,C,t.dump),g&&(t.dump="&ref_"+f+" "+t.dump))}else if(l==="[object String]")t.tag!=="?"&&qKe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new kI("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function JKe(t,e){var r=[],s=[],o,n;for(HF(t,r,s),o=0,n=s.length;o<n;o+=1)e.duplicates.push(r[s[o]]);e.usedDuplicates=new Array(n)}function HF(t,e,r){var s,o,n;if(t!==null&&typeof t=="object")if(o=e.indexOf(t),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,n=t.length;o<n;o+=1)HF(t[o],e,r);else for(s=Object.keys(t),o=0,n=s.length;o<n;o+=1)HF(t[s[o]],e,r)}function G9(t,e){e=e||{};var r=new MKe(e);return r.noRefs||JKe(t,r),gh(r,0,t,!0,!0)?r.dump+`
|
|||
|
`:""}function VKe(t,e){return G9(t,DI.extend({schema:mKe},e))}UF.exports.dump=G9;UF.exports.safeDump=VKe});var J9=K((SDt,Yi)=>{"use strict";var qQ=B9(),W9=Y9();function jQ(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Yi.exports.Type=Ms();Yi.exports.Schema=ch();Yi.exports.FAILSAFE_SCHEMA=MQ();Yi.exports.JSON_SCHEMA=RF();Yi.exports.CORE_SCHEMA=TF();Yi.exports.DEFAULT_SAFE_SCHEMA=ym();Yi.exports.DEFAULT_FULL_SCHEMA=QI();Yi.exports.load=qQ.load;Yi.exports.loadAll=qQ.loadAll;Yi.exports.safeLoad=qQ.safeLoad;Yi.exports.safeLoadAll=qQ.safeLoadAll;Yi.exports.dump=W9.dump;Yi.exports.safeDump=W9.safeDump;Yi.exports.YAMLException=dm();Yi.exports.MINIMAL_SCHEMA=MQ();Yi.exports.SAFE_SCHEMA=ym();Yi.exports.DEFAULT_SCHEMA=QI();Yi.exports.scan=jQ("scan");Yi.exports.parse=jQ("parse");Yi.exports.compose=jQ("compose");Yi.exports.addConstructor=jQ("addConstructor")});var z9=K((xDt,V9)=>{"use strict";var zKe=J9();V9.exports=zKe});var Z9=K((bDt,X9)=>{"use strict";function XKe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function ph(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ph)}XKe(ph,Error);ph.buildMessage=function(t,e){var r={literal:function(g){return'"'+o(g.text)+'"'},class:function(g){var C="",w;for(w=0;w<g.parts.length;w++)C+=g.parts[w]instanceof Array?n(g.parts[w][0])+"-"+n(g.parts[w][1]):n(g.parts[w]);return"["+(g.inverted?"^":"")+C+"]"},any:function(g){return"any character"},end:function(g){return"end of input"},other:function(g){return g.description}};function s(g){return g.charCodeAt(0).toString(16).toUpperCase()}function o(g){return g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+s(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+s(C)})}function n(g){return g.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+s(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+s(C)})}function l(g){return r[g.type](g)}function u(g){var C=new Array(g.length),w,B;for(w=0;w<g.length;w++)C[w]=l(g[w]);if(C.sort(),C.length>0){for(w=1,B=1;w<C.length;w++)C[w-1]!==C[w]&&(C[B]=C[w],B++);C.length=B}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function f(g){return g?'"'+o(g)+'"':"end of input"}return"Expected "+u(t)+" but "+f(e)+" found."};function ZKe(t,e){e=e!==void 0?e:{};var r={},s={Start:ec},o=ec,n=function(se){return[].concat(...se)},l="-",u=On("-",!1),f=function(se){return se},g=function(se){return Object.assign({},...se)},C="#",w=On("#",!1),B=al(),S=function(){return{}},y=":",N=On(":",!1),L=function(se,ve){return{[se]:ve}},H=",",G=On(",",!1),te=function(se,ve){return ve},fe=function(se,ve,Je){return Object.assign({},...[se].concat(ve).map(Rt=>({[Rt]:Je})))},me=function(se){return se},ye=function(se){return se},Se=la("correct indentation"),Ce=" ",Pe=On(" ",!1),Qe=function(se){return se.length===QA*Al},p=function(se){return se.length===(QA+1)*Al},Oe=function(){return QA++,!0},De=function(){return QA--,!0},Ee=function(){return Yc()},ue=la("pseudostring"),ne=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Be=wi(["\r",`
|
|||
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Ne=/^[^\r\n\t ,\][{}:#"']/,Bt=wi(["\r",`
|
|||
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),_=function(){return Yc().replace(/^ *| *$/g,"")},Ye="--",rt=On("--",!1),We=/^[a-zA-Z\/0-9]/,Re=wi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),yt=/^[^\r\n\t :,]/,nt=wi(["\r",`
|
|||
|
`," "," ",":",","],!0,!1),Ze="null",$e=On("null",!1),k=function(){return null},I="true",D=On("true",!1),m=function(){return!0},F="false",X=On("false",!1),ee=function(){return!1},ie=la("string"),Ae='"',Fe=On('"',!1),_e=function(){return""},Ct=function(se){return se},vt=function(se){return se.join("")},Wt=/^[^"\\\0-\x1F\x7F]/,cr=wi(['"',"\\",["\0",""],"\x7F"],!0,!1),Ot='\\"',Cn=On('\\"',!1),Ur=function(){return'"'},Rr="\\\\",_r=On("\\\\",!1),hn=function(){return"\\"},Dn="\\/",Qs=On("\\/",!1),qi=function(){return"/"},ro="\\b",Po=On("\\b",!1),ps=function(){return"\b"},dn="\\f",no=On("\\f",!1),rl=function(){return"\f"},Oa="\\n",Lg=On("\\n",!1),Og=function(){return`
|
|||
|
`},ef="\\r",Vn=On("\\r",!1),Ve=function(){return"\r"},Ua="\\t",nl=On("\\t",!1),il=function(){return" "},zn="\\u",Ai=On("\\u",!1),rr=function(se,ve,Je,Rt){return String.fromCharCode(parseInt(`0x${se}${ve}${Je}${Rt}`))},Oi=/^[0-9a-fA-F]/,Xn=wi([["0","9"],["a","f"],["A","F"]],!1,!1),hs=la("blank space"),Ft=/^[ \t]/,Xi=wi([" "," "],!1,!1),Fn=la("white space"),ds=/^[ \t\n\r]/,IA=wi([" "," ",`
|
|||
|
`,"\r"],!1,!1),Pr=`\r
|
|||
|
`,Fo=On(`\r
|
|||
|
`,!1),mr=`
|
|||
|
`,Ka=On(`
|
|||
|
`,!1),Z="\r",nn=On("\r",!1),we=0,qt=0,sl=[{line:1,column:1}],Zi=0,$l=[],Vt=0,EA;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function Yc(){return t.substring(qt,we)}function tf(){return Ro(qt,we)}function ol(se,ve){throw ve=ve!==void 0?ve:Ro(qt,we),Ha([la(se)],t.substring(qt,we),ve)}function Wc(se,ve){throw ve=ve!==void 0?ve:Ro(qt,we),io(se,ve)}function On(se,ve){return{type:"literal",text:se,ignoreCase:ve}}function wi(se,ve,Je){return{type:"class",parts:se,inverted:ve,ignoreCase:Je}}function al(){return{type:"any"}}function Jc(){return{type:"end"}}function la(se){return{type:"other",description:se}}function $i(se){var ve=sl[se],Je;if(ve)return ve;for(Je=se-1;!sl[Je];)Je--;for(ve=sl[Je],ve={line:ve.line,column:ve.column};Je<se;)t.charCodeAt(Je)===10?(ve.line++,ve.column=1):ve.column++,Je++;return sl[se]=ve,ve}function Ro(se,ve){var Je=$i(se),Rt=$i(ve);return{start:{offset:se,line:Je.line,column:Je.column},end:{offset:ve,line:Rt.line,column:Rt.column}}}function at(se){we<Zi||(we>Zi&&(Zi=we,$l=[]),$l.push(se))}function io(se,ve){return new ph(se,null,null,ve)}function Ha(se,ve,Je){return new ph(ph.buildMessage(se,ve),se,ve,Je)}function ec(){var se;return se=wA(),se}function ji(){var se,ve,Je;for(se=we,ve=[],Je=qa();Je!==r;)ve.push(Je),Je=qa();return ve!==r&&(qt=se,ve=n(ve)),se=ve,se}function qa(){var se,ve,Je,Rt,Dt;return se=we,ve=vs(),ve!==r?(t.charCodeAt(we)===45?(Je=l,we++):(Je=r,Vt===0&&at(u)),Je!==r?(Rt=li(),Rt!==r?(Dt=BA(),Dt!==r?(qt=se,ve=f(Dt),se=ve):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r),se}function wA(){var se,ve,Je;for(se=we,ve=[],Je=br();Je!==r;)ve.push(Je),Je=br();return ve!==r&&(qt=se,ve=g(ve)),se=ve,se}function br(){var se,ve,Je,Rt,Dt,zt,Tr,Qn,ja;if(se=we,ve=li(),ve===r&&(ve=null),ve!==r){if(Je=we,t.charCodeAt(we)===35?(Rt=C,we++):(Rt=r,Vt===0&&at(w)),Rt!==r){if(Dt=[],zt=we,Tr=we,Vt++,Qn=Gi(),Vt--,Qn===r?Tr=void 0:(we=Tr,Tr=r),Tr!==r?(t.length>we?(Qn=t.charAt(we),we++):(Qn=r,Vt===0&&at(B)),Qn!==r?(Tr=[Tr,Qn],zt=Tr):(we=zt,zt=r)):(we=zt,zt=r),zt!==r)for(;zt!==r;)Dt.push(zt),zt=we,Tr=we,Vt++,Qn=Gi(),Vt--,Qn===r?Tr=void 0:(we=Tr,Tr=r),Tr!==r?(t.length>we?(Qn=t.charAt(we),we++):(Qn=r,Vt===0&&at(B)),Qn!==r?(Tr=[Tr,Qn],zt=Tr):(we=zt,zt=r)):(we=zt,zt=r);else Dt=r;Dt!==r?(Rt=[Rt,Dt],Je=Rt):(we=Je,Je=r)}else we=Je,Je=r;if(Je===r&&(Je=null),Je!==r){if(Rt=[],Dt=js(),Dt!==r)for(;Dt!==r;)Rt.push(Dt),Dt=js();else Rt=r;Rt!==r?(qt=se,ve=S(),se=ve):(we=se,se=r)}else we=se,se=r}else we=se,se=r;if(se===r&&(se=we,ve=vs(),ve!==r?(Je=ca(),Je!==r?(Rt=li(),Rt===r&&(Rt=null),Rt!==r?(t.charCodeAt(we)===58?(Dt=y,we++):(Dt=r,Vt===0&&at(N)),Dt!==r?(zt=li(),zt===r&&(zt=null),zt!==r?(Tr=BA(),Tr!==r?(qt=se,ve=L(Je,Tr),se=ve):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r),se===r&&(se=we,ve=vs(),ve!==r?(Je=so(),Je!==r?(Rt=li(),Rt===r&&(Rt=null),Rt!==r?(t.charCodeAt(we)===58?(Dt=y,we++):(Dt=r,Vt===0&&at(N)),Dt!==r?(zt=li(),zt===r&&(zt=null),zt!==r?(Tr=BA(),Tr!==r?(qt=se,ve=L(Je,Tr),se=ve):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r)):(we=se,se=r),se===r))){if(se=we,ve=vs(),ve!==r)if(Je=so(),Je!==r)if(Rt=li(),Rt!==r)if(Dt=ua(),Dt!==r){if(zt=[],Tr=js(),Tr!==r)for(;Tr!==r;)zt.push(Tr),Tr=js();else zt=r;zt!==r?(qt=se,ve=L(Je,Dt),se=ve):(we=se,se=r)}else we=se,se=r;else we=se,se=r;else we=se,se=r;else we=se,se=r;if(se===r)if(se=we,ve=vs(),ve!==r)if(Je=so(),Je!==r){if(Rt=[],Dt=we,zt=li(),zt===r&&(zt=null),zt!==r?(t.charCodeAt(we)===44?(Tr=H,we++):(Tr=r,Vt===0&&at(G)),Tr!==r?(Qn=li(),Qn===r&&(Qn=null),Qn!==r?(ja=so(),ja!==r?(qt=Dt,zt=te(Je,ja),Dt=zt):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r),Dt!==r)for(;Dt!==r;)Rt.push(Dt),Dt=we,zt=li(),zt===r&&(zt=null),zt!==r?(t.charCodeAt(we)===44?(Tr=H,we++):(Tr=r,Vt===0&&at(G)),Tr!==r?(Qn=li(),Qn===r&&(Qn=null),Qn!==r?(ja=so(),ja!==r?(qt=Dt,zt=te(Je,ja),Dt=zt):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r)):(we=Dt,Dt=r);else Rt=r;Rt!==r?(Dt=li(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===58?(zt=y,we++):(zt=r,Vt===0&&at(N)),zt!==r?(Tr=li(),Tr===r
|
|||
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
|||
|
`;if(typeof t=="string")return`${tY(t)}
|
|||
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
|||
|
`;let s=" ".repeat(e);return`
|
|||
|
${t.map(n=>`${s}- ${jF(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[s,o]=t instanceof qF?[t.data,!1]:[t,!0],n=" ".repeat(e),l=Object.keys(s);o&&l.sort((f,g)=>{let C=eY.indexOf(f),w=eY.indexOf(g);return C===-1&&w===-1?f<g?-1:f>g?1:0:C!==-1&&w===-1?-1:C===-1&&w!==-1?1:C-w});let u=l.filter(f=>!rY(s[f])).map((f,g)=>{let C=s[f],w=tY(f),B=jF(C,e+1,!0),S=g>0||r?n:"",y=w.length>1024?`? ${w}
|
|||
|
${S}:`:`${w}:`,N=B.startsWith(`
|
|||
|
`)?B:` ${B}`;return`${S}${y}${N}`}).join(e===0?`
|
|||
|
`:"")||`
|
|||
|
`;return r?`
|
|||
|
${u}`:`${u}`}throw new Error(`Unsupported value type (${t})`)}function iA(t){try{let e=jF(t,0,!1);return e!==`
|
|||
|
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function eHe(t){return t.endsWith(`
|
|||
|
`)||(t+=`
|
|||
|
`),(0,$9.parse)(t)}function rHe(t){if(tHe.test(t))return eHe(t);let e=(0,GQ.safeLoad)(t,{schema:GQ.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function as(t){return rHe(t)}var GQ,$9,$Ke,eY,qF,tHe,nY=St(()=>{GQ=He(z9()),$9=He(Z9()),$Ke=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,eY=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],qF=class{constructor(e){this.data=e}};iA.PreserveOrdering=qF;tHe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var xI={};or(xI,{parseResolution:()=>RQ,parseShell:()=>xQ,parseSyml:()=>as,stringifyArgument:()=>xF,stringifyArgumentSegment:()=>bF,stringifyArithmeticExpression:()=>FQ,stringifyCommand:()=>SF,stringifyCommandChain:()=>hm,stringifyCommandChainThen:()=>kF,stringifyCommandLine:()=>bQ,stringifyCommandLineThen:()=>DF,stringifyEnvSegment:()=>PQ,stringifyRedirectArgument:()=>wI,stringifyResolution:()=>TQ,stringifyShell:()=>pm,stringifyShellLine:()=>pm,stringifySyml:()=>iA,stringifyValueArgument:()=>oh});var kl=St(()=>{r5();o5();nY()});var sY=K((NDt,GF)=>{"use strict";var nHe=t=>{let e=!1,r=!1,s=!1;for(let o=0;o<t.length;o++){let n=t[o];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,o)+"-"+t.slice(o),e=!1,s=r,r=!0,o++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,o-1)+"-"+t.slice(o-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},iY=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=o=>e.pascalCase?o.charAt(0).toUpperCase()+o.slice(1):o;return Array.isArray(t)?t=t.map(o=>o.trim()).filter(o=>o.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=nHe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(o,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,o=>o.toUpperCase()),r(t))};GF.exports=iY;GF.exports.default=iY});var aY=K((MDt,oY)=>{oY.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env
|
|||
|
|
|||
|
${this.candidates.map(({usage:o})=>`$ ${o}`).join(`
|
|||
|
`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:
|
|||
|
|
|||
|
$ ${s}
|
|||
|
${zF(e)}`}else this.message=`Command not found; did you mean one of:
|
|||
|
|
|||
|
${this.candidates.map(({usage:s},o)=>`${`${o}.`.padStart(4)} ${s}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${zF(e)}`}},XF=class extends Error{constructor(e,r){super();this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
|
|||
|
|
|||
|
${this.usages.map((s,o)=>`${`${o}.`.padStart(4)} ${s}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${zF(e)}`}},zF=t=>`While running ${t.filter(e=>e!==yo).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function iHe(t){let e=t.split(`
|
|||
|
`),r=e.filter(o=>o.match(/\S/)),s=r.length>0?r.reduce((o,n)=>Math.min(o,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(o=>o.slice(s).trimRight()).join(`
|
|||
|
`)}function Vo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
|||
|
`),t=iHe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
|||
|
|
|||
|
`),t=t.replace(/\n(\n)?\n*/g,(s,o)=>o||" "),r&&(t=t.split(/\n/).map(s=>{let o=s.match(/^\s*[*-][\t ]+(.*)/);if(!o)return s.match(/(.{1,80})(?: |$)/g).join(`
|
|||
|
`);let n=s.length-s.trimStart().length;return o[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((l,u)=>" ".repeat(n)+(u===0?"- ":" ")+l).join(`
|
|||
|
`)}).join(`
|
|||
|
|
|||
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(s,o,n)=>e.code(o+n+o)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,o,n)=>e.bold(o+n+o)),t?`${t}
|
|||
|
`:""}var uY,ZF,fY,gY,$F=St(()=>{uY=80,ZF=Array(uY).fill("\u2501");for(let t=0;t<=24;++t)ZF[ZF.length-t]=`[38;5;${232+t}m\u2501`;fY={header:t=>`[1m\u2501\u2501\u2501 ${t}${t.length<uY-5?` ${ZF.slice(t.length+5).join("")}`:":"}[0m`,bold:t=>`[1m${t}[22m`,error:t=>`[31m[1m${t}[22m[39m`,code:t=>`[36m${t}[39m`},gY={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ba(t){return Te(re({},t),{[FI]:!0})}function Cu(t,e){return typeof t=="undefined"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function VQ(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function RI(t,e){return e.length===1?new ht(`${t}: ${VQ(e[0],!0)}`):new ht(`${t}:
|
|||
|
${e.map(r=>`
|
|||
|
- ${VQ(r)}`).join("")}`)}function TI(t,e,r){if(typeof r=="undefined")return e;let s=[],o=[],n=u=>{let f=e;return e=u,n.bind(null,f)};if(!r(e,{errors:s,coercions:o,coercion:n}))throw RI(`Invalid value for ${t}`,s);for(let[,u]of o)u();return e}var FI,Gf=St(()=>{JQ();FI=Symbol("clipanion/isOption")});var vm={};or(vm,{KeyRelationship:()=>Ch,applyCascade:()=>yh,base64RegExp:()=>mY,colorStringAlphaRegExp:()=>dY,colorStringRegExp:()=>hY,computeKey:()=>Qp,getPrintable:()=>Cs,hasExactLength:()=>wY,hasForbiddenKeys:()=>FHe,hasKeyRelationship:()=>sR,hasMaxLength:()=>mHe,hasMinLength:()=>dHe,hasMutuallyExclusiveKeys:()=>RHe,hasRequiredKeys:()=>PHe,hasUniqueItems:()=>yHe,isArray:()=>lHe,isAtLeast:()=>nR,isAtMost:()=>EHe,isBase64:()=>xHe,isBoolean:()=>aHe,isDate:()=>AHe,isDict:()=>uHe,isEnum:()=>Co,isHexColor:()=>SHe,isISO8601:()=>kHe,isInExclusiveRange:()=>BHe,isInInclusiveRange:()=>wHe,isInstanceOf:()=>gHe,isInteger:()=>iR,isJSON:()=>bHe,isLiteral:()=>sHe,isLowerCase:()=>QHe,isNegative:()=>CHe,isNullable:()=>hHe,isNumber:()=>tR,isObject:()=>fHe,isOneOf:()=>rR,isOptional:()=>pHe,isPositive:()=>IHe,isString:()=>NI,isTuple:()=>cHe,isUUID4:()=>DHe,isUnknown:()=>EY,isUpperCase:()=>vHe,iso8601RegExp:()=>eR,makeCoercionFn:()=>mh,makeSetter:()=>IY,makeTrait:()=>CY,makeValidator:()=>An,matchesRegExp:()=>MI,plural:()=>zQ,pushError:()=>qr,simpleKeyRegExp:()=>pY,uuid4RegExp:()=>yY});function An({test:t}){return CY(t)()}function Cs(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":JSON.stringify(t)}function Qp(t,e){var r,s,o;return typeof e=="number"?`${(r=t==null?void 0:t.p)!==null&&r!==void 0?r:"."}[${e}]`:pY.test(e)?`${(s=t==null?void 0:t.p)!==null&&s!==void 0?s:""}.${e}`:`${(o=t==null?void 0:t.p)!==null&&o!==void 0?o:"."}[${JSON.stringify(e)}]`}function mh(t,e){return r=>{let s=t[e];return t[e]=r,mh(t,e).bind(null,s)}}function IY(t,e){return r=>{t[e]=r}}function zQ(t,e,r){return t===1?e:r}function qr({errors:t,p:e}={},r){return t==null||t.push(`${e!=null?e:"."}: ${r}`),!1}function sHe(t){return An({test:(e,r)=>e!==t?qr(r,`Expected a literal (got ${Cs(t)})`):!0})}function Co(t){let e=Array.isArray(t)?t:Object.values(t),r=new Set(e);return An({test:(s,o)=>r.has(s)?!0:qr(o,`Expected a valid enumeration value (got ${Cs(s)})`)})}var pY,hY,dY,mY,yY,eR,CY,EY,NI,oHe,aHe,tR,AHe,lHe,cHe,uHe,fHe,gHe,rR,yh,pHe,hHe,dHe,mHe,wY,yHe,CHe,IHe,nR,EHe,wHe,BHe,iR,MI,QHe,vHe,DHe,kHe,SHe,xHe,bHe,PHe,FHe,RHe,Ch,THe,sR,OA=St(()=>{pY=/^[a-zA-Z_][a-zA-Z0-9_]*$/,hY=/^#[0-9a-f]{6}$/i,dY=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,mY=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,yY=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,eR=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,CY=t=>()=>t;EY=()=>An({test:(t,e)=>!0});NI=()=>An({test:(t,e)=>typeof t!="string"?qr(e,`Expected a string (got ${Cs(t)})`):!0});oHe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),aHe=()=>An({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return qr(e,"Unbound coercion result");let s=oHe.get(t);if(typeof s!="undefined")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return qr(e,`Expected a boolean (got ${Cs(t)})`)}return!0}}),tR=()=>An({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return qr(e,"Unbound coercion result");let s;if(typeof t=="string"){let o;try{o=JSON.parse(t)}catch(n){}if(typeof o=="number")if(JSON.stringify(o)===t)s=o;else return qr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s!="undefined")return e.coercions.push(
|
|||
|
`),this.context.stdout.write(`
|
|||
|
`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
|
|||
|
`)}}}});async function MY(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}=NY(t);return va.from(r,e).runExit(s,o)}async function LY(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}=NY(t);return va.from(r,e).run(s,o)}function NY(t){let e,r,s,o;switch(typeof process!="undefined"&&typeof process.argv!="undefined"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof dt||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:o=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof dt||Array.isArray(t[0])?(r=t[0],s=t[1],o=t[2]):(e=t[0],r=t[1],o=t[2]);break;default:e=t[0],r=t[1],s=t[2],o=t[3];break}if(typeof s=="undefined")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:o}}function OY(t){return t()}var TY,va,UY=St(()=>{WQ();$Q();$F();FY();Ih();RY();TY=Symbol("clipanion/errorCommand");va=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:s,enableCapture:o=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new LI({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=o,this.enableColors=n}static from(e,r={}){let s=new va(r),o=Array.isArray(e)?e:[e];for(let n of o)s.register(n);return s}register(e){var r;let s=new Map,o=new e;for(let f in o){let g=o[f];typeof g=="object"&&g!==null&&g[dt.isOption]&&s.set(f,g)}let n=this.builder.command(),l=n.cliIndex,u=(r=e.paths)!==null&&r!==void 0?r:o.paths;if(typeof u!="undefined")for(let f of u)n.addPath(f);this.registrations.set(e,{specs:s,builder:n,index:l});for(let[f,{definition:g}]of s.entries())g(n,f);n.setContext({commandClass:e})}process(e,r){let{contexts:s,process:o}=this.builder.compile(),n=o(e),l=re(re({},va.defaultContext),r);switch(n.selectedIndex){case Qm:{let u=OI.from(n,s);return u.context=l,u}default:{let{commandClass:u}=s[n.selectedIndex],f=this.registrations.get(u);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the command class to have been registered.");let g=new u;g.context=l,g.path=n.path;try{for(let[C,{transformer:w}]of f.specs.entries())g[C]=w(f.builder,C,n,l);return g}catch(C){throw C[TY]=g,C}}break}}async run(e,r){var s,o;let n,l=re(re({},va.defaultContext),r),u=(s=this.enableColors)!==null&&s!==void 0?s:l.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,l)}catch(C){return l.stdout.write(this.error(C,{colored:u})),1}if(n.help)return l.stdout.write(this.usage(n,{colored:u,detailed:!0})),0;n.context=l,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(C,w)=>this.error(C,w),format:C=>this.format(C),process:(C,w)=>this.process(C,re(re({},l),w)),run:(C,w)=>this.run(C,re(re({},l),w)),usage:(C,w)=>this.usage(C,w)};let f=this.enableCapture&&(o=PY(l))!==null&&o!==void 0?o:OY,g;try{g=await f(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return l.stdout.write(this.error(C,{colored:u,command:n})),1}return g}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:s}=this.builder.compile();return s(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[s,{index:o}]of this.registrations){if(typeof s.usage=="undefined")continue;let{usage:n}=this.getUsageByIndex(o,{detailed:!1}),{usage:l,options:u}=this.getUsageByIndex(o,{detailed:!0,inlineOptions:!1}),f=typeof s.usage.category!="undefined"?Vo(s.usage.category,{format:this.format(e),paragraphs:!1}):void 0,g=typeof s.usage.description!="undefined"?Vo(s.usage.description,{format:this.format(e),paragraphs:!1}):void 0,C=typeof s.usage.details!="undefined"?Vo(s.usage.details,{format:this.format(e),paragraphs:!0}):void 0,w=typeof s.usage.examples!="undefined"?s.usage.examples.map(([B,S])=>[Vo(B,{format:this.format(e),paragraphs:!1}),S.replac
|
|||
|
`),(g!==""||C.length>0)&&(u+=`${this.format(r).header("Usage")}
|
|||
|
`,u+=`
|
|||
|
`);let{usage:w,options:B}=this.getUsageByRegistration(l,{inlineOptions:!1});if(u+=`${this.format(r).bold(o)}${w}
|
|||
|
`,B.length>0){u+=`
|
|||
|
`,u+=`${this.format(r).header("Options")}
|
|||
|
`;let S=B.reduce((y,N)=>Math.max(y,N.definition.length),0);u+=`
|
|||
|
`;for(let{definition:y,description:N}of B)u+=` ${this.format(r).bold(y.padEnd(S))} ${Vo(N,{format:this.format(r),paragraphs:!1})}`}if(g!==""&&(u+=`
|
|||
|
`,u+=`${this.format(r).header("Details")}
|
|||
|
`,u+=`
|
|||
|
`,u+=Vo(g,{format:this.format(r),paragraphs:!0})),C.length>0){u+=`
|
|||
|
`,u+=`${this.format(r).header("Examples")}
|
|||
|
`;for(let[S,y]of C)u+=`
|
|||
|
`,u+=Vo(S,{format:this.format(r),paragraphs:!1}),u+=`${y.replace(/^/m,` ${this.format(r).bold(o)}`).replace(/\$0/g,this.binaryName)}
|
|||
|
`}}else{let{usage:f}=this.getUsageByRegistration(l);u+=`${this.format(r).bold(o)}${f}
|
|||
|
`}else{let f=new Map;for(let[B,{index:S}]of this.registrations.entries()){if(typeof B.usage=="undefined")continue;let y=typeof B.usage.category!="undefined"?Vo(B.usage.category,{format:this.format(r),paragraphs:!1}):null,N=f.get(y);typeof N=="undefined"&&f.set(y,N=[]);let{usage:L}=this.getUsageByIndex(S);N.push({commandClass:B,usage:L})}let g=Array.from(f.keys()).sort((B,S)=>B===null?-1:S===null?1:B.localeCompare(S,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel!="undefined",w=typeof this.binaryVersion!="undefined";C||w?(C&&w?u+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
|||
|
|
|||
|
`:C?u+=`${this.format(r).header(`${this.binaryLabel}`)}
|
|||
|
`:u+=`${this.format(r).header(`${this.binaryVersion}`)}
|
|||
|
`,u+=` ${this.format(r).bold(o)}${this.binaryName} <command>
|
|||
|
`):u+=`${this.format(r).bold(o)}${this.binaryName} <command>
|
|||
|
`;for(let B of g){let S=f.get(B).slice().sort((N,L)=>N.usage.localeCompare(L.usage,"en",{usage:"sort",caseFirst:"upper"})),y=B!==null?B.trim():"General commands";u+=`
|
|||
|
`,u+=`${this.format(r).header(`${y}`)}
|
|||
|
`;for(let{commandClass:N,usage:L}of S){let H=N.usage.description||"undocumented";u+=`
|
|||
|
`,u+=` ${this.format(r).bold(L)}
|
|||
|
`,u+=` ${Vo(H,{format:this.format(r),paragraphs:!1})}`}}u+=`
|
|||
|
`,u+=Vo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return u}error(e,r){var s,{colored:o,command:n=(s=e[TY])!==null&&s!==void 0?s:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let l="",u=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");u==="Error"&&(u="Internal Error"),l+=`${this.format(o).error(u)}: ${e.message}
|
|||
|
`;let f=e.clipanion;return typeof f!="undefined"?f.type==="usage"&&(l+=`
|
|||
|
`,l+=this.usage(n)):e.stack&&(l+=`${e.stack.replace(/^.*\n/,"")}
|
|||
|
`),l}format(e){var r;return((r=e!=null?e:this.enableColors)!==null&&r!==void 0?r:va.defaultContext.colorDepth>1)?fY:gY}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s=="undefined")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};va.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:xY()}});var tv,_Y=St(()=>{Ih();tv=class extends dt{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
|||
|
`)}};tv.paths=[["--clipanion=definitions"]]});var rv,KY=St(()=>{Ih();rv=class extends dt{async execute(){this.context.stdout.write(this.cli.usage())}};rv.paths=[["-h"],["--help"]]});var nv,HY=St(()=>{Ih();nv=class extends dt{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
|||
|
`)}};nv.paths=[["-v"],["--version"]]});var AR={};or(AR,{DefinitionsCommand:()=>tv,HelpCommand:()=>rv,VersionCommand:()=>nv});var qY=St(()=>{_Y();KY();HY()});function jY(t,e,r){let[s,o]=Cu(e,r!=null?r:{}),{arity:n=1}=o,l=t.split(","),u=new Set(l);return Ba({definition(f){f.addOption({names:l,arity:n,hidden:o==null?void 0:o.hidden,description:o==null?void 0:o.description,required:o.required})},transformer(f,g,C){let w=typeof s!="undefined"?[...s]:void 0;for(let{name:B,value:S}of C.options)!u.has(B)||(w=w!=null?w:[],w.push(S));return w}})}var GY=St(()=>{Gf()});function YY(t,e,r){let[s,o]=Cu(e,r!=null?r:{}),n=t.split(","),l=new Set(n);return Ba({definition(u){u.addOption({names:n,allowBinding:!1,arity:0,hidden:o.hidden,description:o.description,required:o.required})},transformer(u,f,g){let C=s;for(let{name:w,value:B}of g.options)!l.has(w)||(C=B);return C}})}var WY=St(()=>{Gf()});function JY(t,e,r){let[s,o]=Cu(e,r!=null?r:{}),n=t.split(","),l=new Set(n);return Ba({definition(u){u.addOption({names:n,allowBinding:!1,arity:0,hidden:o.hidden,description:o.description,required:o.required})},transformer(u,f,g){let C=s;for(let{name:w,value:B}of g.options)!l.has(w)||(C!=null||(C=0),B?C+=1:C=0);return C}})}var VY=St(()=>{Gf()});function zY(t={}){return Ba({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:o})=>o)}})}var XY=St(()=>{Gf()});function ZY(t={}){return Ba({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let o=l=>{let u=s.positionals[l];return u.extra===UA||u.extra===!1&&l<e.arity.leading.length},n=0;for(;n<s.positionals.length&&o(n);)n+=1;return s.positionals.splice(0,n).map(({value:l})=>l)}})}var $Y=St(()=>{$Q();Gf()});function YHe(t,e,r){let[s,o]=Cu(e,r!=null?r:{}),{arity:n=1}=o,l=t.split(","),u=new Set(l);return Ba({definition(f){f.addOption({names:l,arity:o.tolerateBoolean?0:n,hidden:o.hidden,description:o.description,required:o.required})},transformer(f,g,C,w){let B,S=s;typeof o.env!="undefined"&&w.env[o.env]&&(B=o.env,S=w.env[o.env]);for(let{name:y,value:N}of C.options)!u.has(y)||(B=y,S=N);return typeof S=="string"?TI(B!=null?B:g,S,o.validator):S}})}function WHe(t={}){let{required:e=!0}=t;return Ba({definition(r,s){var o;r.addPositional({name:(o=t.name)!==null&&o!==void 0?o:s,required:t.required})},transformer(r,s,o){var n;for(let l=0;l<o.positionals.length;++l){if(o.positionals[l].extra===UA||e&&o.positionals[l].extra===!0||!e&&o.positionals[l].extra===!1)continue;let[u]=o.positionals.splice(l,1);return TI((n=t.name)!==null&&n!==void 0?n:s,u.value,t.validator)}}})}function e7(t,...e){return typeof t=="string"?YHe(t,...e):WHe(t)}var t7=St(()=>{$Q();Gf()});var Ie={};or(Ie,{Array:()=>jY,Boolean:()=>YY,Counter:()=>JY,Proxy:()=>zY,Rest:()=>ZY,String:()=>e7,applyValidator:()=>TI,cleanValidationError:()=>VQ,formatError:()=>RI,isOptionSymbol:()=>FI,makeCommandOption:()=>Ba,rerouteArguments:()=>Cu});var r7=St(()=>{Gf();GY();WY();VY();XY();$Y();t7()});var UI={};or(UI,{Builtins:()=>AR,Cli:()=>va,Command:()=>dt,Option:()=>Ie,UsageError:()=>ht,formatMarkdownish:()=>Vo,run:()=>LY,runExit:()=>MY});var tr=St(()=>{JQ();$F();Ih();UY();qY();r7()});var i7=K((Ukt,n7)=>{"use strict";n7.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Eh=K((_kt,lR)=>{"use strict";var JHe=i7(),s7=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},o=(u,f,...g)=>{r++;let C=JHe(u,...g);f(C),C.then(s,s)},n=(u,f,...g)=>{r<t?o(u,f,...g):e.push(o.bind(null,u,f,...g))},l=(u,...f)=>new Promise(g=>n(u,g,...f));return Object.defineProperties(l,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),l};lR.exports=s7;lR.exports.default=s7});function Iu(t){return`YN${t.toString(10).padStart(4,"0")}`}function iv(t){let e=Number(t.slice(2));if(typeof ke[e]=="undefined")throw new Error(`Unknown message name: "${t}"`);return e}var ke,oA=St(()=>{(function(Ve){Ve[Ve.UNNAMED=0]="UNNAMED",Ve[Ve.EXCEPTION=1]="EXCEPTION",Ve[Ve.MIS
|
|||
|
`,"\r","(",")","!","|","&","^"],!0,!1),ye=function(ie){return e.queryPattern.test(ie)},Se=function(ie){return e.checkFn(ie)},Ce=nt("whitespace"),Pe=/^[ \t\n\r]/,Qe=We([" "," ",`
|
|||
|
`,"\r"],!1,!1),p=0,Oe=0,De=[{line:1,column:1}],Ee=0,ue=[],ne=0,Be;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');o=s[e.startRule]}function Ne(){return t.substring(Oe,p)}function Bt(){return $e(Oe,p)}function _(ie,Ae){throw Ae=Ae!==void 0?Ae:$e(Oe,p),D([nt(ie)],t.substring(Oe,p),Ae)}function Ye(ie,Ae){throw Ae=Ae!==void 0?Ae:$e(Oe,p),I(ie,Ae)}function rt(ie,Ae){return{type:"literal",text:ie,ignoreCase:Ae}}function We(ie,Ae,Fe){return{type:"class",parts:ie,inverted:Ae,ignoreCase:Fe}}function Re(){return{type:"any"}}function yt(){return{type:"end"}}function nt(ie){return{type:"other",description:ie}}function Ze(ie){var Ae=De[ie],Fe;if(Ae)return Ae;for(Fe=ie-1;!De[Fe];)Fe--;for(Ae=De[Fe],Ae={line:Ae.line,column:Ae.column};Fe<ie;)t.charCodeAt(Fe)===10?(Ae.line++,Ae.column=1):Ae.column++,Fe++;return De[ie]=Ae,Ae}function $e(ie,Ae){var Fe=Ze(ie),_e=Ze(Ae);return{start:{offset:ie,line:Fe.line,column:Fe.column},end:{offset:Ae,line:_e.line,column:_e.column}}}function k(ie){p<Ee||(p>Ee&&(Ee=p,ue=[]),ue.push(ie))}function I(ie,Ae){return new kh(ie,null,null,Ae)}function D(ie,Ae,Fe){return new kh(kh.buildMessage(ie,Ae),ie,Ae,Fe)}function m(){var ie,Ae,Fe,_e,Ct,vt,Wt,cr;if(ie=p,Ae=F(),Ae!==r){for(Fe=[],_e=p,Ct=ee(),Ct!==r?(t.charCodeAt(p)===124?(vt=n,p++):(vt=r,ne===0&&k(l)),vt===r&&(t.charCodeAt(p)===38?(vt=u,p++):(vt=r,ne===0&&k(f)),vt===r&&(t.charCodeAt(p)===94?(vt=g,p++):(vt=r,ne===0&&k(C)))),vt!==r?(Wt=ee(),Wt!==r?(cr=F(),cr!==r?(Ct=[Ct,vt,Wt,cr],_e=Ct):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r);_e!==r;)Fe.push(_e),_e=p,Ct=ee(),Ct!==r?(t.charCodeAt(p)===124?(vt=n,p++):(vt=r,ne===0&&k(l)),vt===r&&(t.charCodeAt(p)===38?(vt=u,p++):(vt=r,ne===0&&k(f)),vt===r&&(t.charCodeAt(p)===94?(vt=g,p++):(vt=r,ne===0&&k(C)))),vt!==r?(Wt=ee(),Wt!==r?(cr=F(),cr!==r?(Ct=[Ct,vt,Wt,cr],_e=Ct):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r)):(p=_e,_e=r);Fe!==r?(Oe=ie,Ae=w(Ae,Fe),ie=Ae):(p=ie,ie=r)}else p=ie,ie=r;return ie}function F(){var ie,Ae,Fe,_e,Ct,vt;return ie=p,t.charCodeAt(p)===33?(Ae=B,p++):(Ae=r,ne===0&&k(S)),Ae!==r?(Fe=F(),Fe!==r?(Oe=ie,Ae=y(Fe),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r),ie===r&&(ie=p,t.charCodeAt(p)===40?(Ae=N,p++):(Ae=r,ne===0&&k(L)),Ae!==r?(Fe=ee(),Fe!==r?(_e=m(),_e!==r?(Ct=ee(),Ct!==r?(t.charCodeAt(p)===41?(vt=H,p++):(vt=r,ne===0&&k(G)),vt!==r?(Oe=ie,Ae=te(_e),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r)):(p=ie,ie=r),ie===r&&(ie=X())),ie}function X(){var ie,Ae,Fe,_e,Ct;if(ie=p,Ae=ee(),Ae!==r){if(Fe=p,_e=[],fe.test(t.charAt(p))?(Ct=t.charAt(p),p++):(Ct=r,ne===0&&k(me)),Ct!==r)for(;Ct!==r;)_e.push(Ct),fe.test(t.charAt(p))?(Ct=t.charAt(p),p++):(Ct=r,ne===0&&k(me));else _e=r;_e!==r?Fe=t.substring(Fe,p):Fe=_e,Fe!==r?(Oe=p,_e=ye(Fe),_e?_e=void 0:_e=r,_e!==r?(Oe=ie,Ae=Se(Fe),ie=Ae):(p=ie,ie=r)):(p=ie,ie=r)}else p=ie,ie=r;return ie}function ee(){var ie,Ae;for(ne++,ie=[],Pe.test(t.charAt(p))?(Ae=t.charAt(p),p++):(Ae=r,ne===0&&k(Qe));Ae!==r;)ie.push(Ae),Pe.test(t.charAt(p))?(Ae=t.charAt(p),p++):(Ae=r,ne===0&&k(Qe));return ne--,ie===r&&(Ae=r,ne===0&&k(Ce)),ie}if(Be=o(),Be!==r&&p===t.length)return Be;throw Be!==r&&p<t.length&&k(yt()),D(ue,Ee<t.length?t.charAt(Ee):null,Ee<t.length?$e(Ee,Ee+1):$e(Ee,Ee))}tJ.exports={SyntaxError:kh,parse:ije}});var nJ=K(yv=>{var{parse:sje}=rJ();yv.makeParser=(t=/[a-z]+/)=>(e,r)=>sje(e,{queryPattern:t,checkFn:r});yv.parse=yv.makeParser()});var sJ=K((MSt,iJ)=>{"use strict";iJ.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darko
|
|||
|
`:`
|
|||
|
`)+r,o=s+1,s=t.indexOf(`
|
|||
|
`,o)}while(s!==-1);return n+=t.substr(o),n};EJ.exports={stringReplaceAll:yje,stringEncaseCRLFWithFirstIndex:Cje}});var kJ=K((jSt,BJ)=>{"use strict";var Ije=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,QJ=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Eje=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,wje=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,Bje=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function vJ(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Bje.get(t)||t}function Qje(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),o;for(let n of s){let l=Number(n);if(!Number.isNaN(l))r.push(l);else if(o=n.match(Eje))r.push(o[2].replace(wje,(u,f,g)=>f?vJ(f):g));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function vje(t){QJ.lastIndex=0;let e=[],r;for(;(r=QJ.exec(t))!==null;){let s=r[1];if(r[2]){let o=Qje(s,r[2]);e.push([s].concat(o))}else e.push([s])}return e}function DJ(t,e){let r={};for(let o of e)for(let n of o.styles)r[n[0]]=o.inverse?null:n.slice(1);let s=t;for(let[o,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(o in s))throw new Error(`Unknown Chalk style: ${o}`);s=n.length>0?s[o](...n):s[o]}return s}BJ.exports=(t,e)=>{let r=[],s=[],o=[];if(e.replace(Ije,(n,l,u,f,g,C)=>{if(l)o.push(vJ(l));else if(f){let w=o.join("");o=[],s.push(r.length===0?w:DJ(t,r)(w)),r.push({inverse:u,styles:vje(f)})}else if(g){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(DJ(t,r)(o.join(""))),o=[],r.pop()}else o.push(C)}),s.push(o.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var FR=K((GSt,SJ)=>{"use strict";var tE=eE(),{stdout:SR,stderr:xR}=kR(),{stringReplaceAll:Dje,stringEncaseCRLFWithFirstIndex:kje}=wJ(),xJ=["ansi","ansi","ansi256","ansi16m"],Rm=Object.create(null),Sje=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=SR?SR.level:0;t.level=e.level===void 0?r:e.level},bJ=class{constructor(e){return PJ(e)}},PJ=t=>{let e={};return Sje(e,t),e.template=(...r)=>xje(e.template,...r),Object.setPrototypeOf(e,Ev.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=bJ,e.template};function Ev(t){return PJ(t)}for(let[t,e]of Object.entries(tE))Rm[t]={get(){let r=wv(this,bR(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Rm.visible={get(){let t=wv(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var FJ=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of FJ)Rm[t]={get(){let{level:e}=this;return function(...r){let s=bR(tE.color[xJ[e]][t](...r),tE.color.close,this._styler);return wv(this,s,this._isEmpty)}}};for(let t of FJ){let e="bg"+t[0].toUpperCase()+t.slice(1);Rm[e]={get(){let{level:r}=this;return function(...s){let o=bR(tE.bgColor[xJ[r]][t](...s),tE.bgColor.close,this._styler);return wv(this,o,this._isEmpty)}}}}var bje=Object.defineProperties(()=>{},Te(re({},Rm),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),bR=(t,e,r)=>{let s,o;return r===void 0?(s=t,o=e):(s=r.openAll+t,o=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:o,parent:r}},wv=(t,e,r)=>{let s=(...o)=>Pje(s,o.length===1?""+o[0]:o.join(" "));return s.__proto__=bje,s._generator=t,s._styler=e,s._isEmpty=r,s},Pje=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:o}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=Dje(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
|||
|
`);return n!==-1&&(e=kje(e,o,s,n)),s+e+o},PR,xje=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let s=e.slice(1),o=[r.raw[0]];for(let n=1;n<r.length;n++)o.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return PR===void 0&&(PR=kJ()),PR(t,o.join(""))};Object.defineProperties(Ev.prototype,Rm);var rE=Ev();rE.supportsColor=SR;rE.stderr=Ev({level:xR?xR.level:0});rE.stderr.supportsColor=xR;rE.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};SJ.exports=rE});var Bv=K(Fl=>{"use strict";Fl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Fl.find=(t,e)=>t.nodes.find(r=>r.type===e);Fl.exceedsLimit=(t,e,r=1,s)=>s===!1||!Fl.isInteger(t)||!Fl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;Fl.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];!s||(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};Fl.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0==0?(t.invalid=!0,!0):!1;Fl.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0==0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Fl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Fl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Fl.flatten=(...t)=>{let e=[],r=s=>{for(let o=0;o<s.length;o++){let n=s[o];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var Qv=K((WSt,RJ)=>{"use strict";var TJ=Bv();RJ.exports=(t,e={})=>{let r=(s,o={})=>{let n=e.escapeInvalid&&TJ.isInvalidBrace(o),l=s.invalid===!0&&e.escapeInvalid===!0,u="";if(s.value)return(n||l)&&TJ.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let f of s.nodes)u+=r(f);return u};return r(t)}});var MJ=K((JSt,NJ)=>{"use strict";NJ.exports=function(t){return typeof t=="number"?t-t==0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var GJ=K((VSt,LJ)=>{"use strict";var OJ=MJ(),Sh=(t,e,r)=>{if(OJ(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(OJ(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s=re({relaxZeros:!0},r);typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let o=String(s.relaxZeros),n=String(s.shorthand),l=String(s.capture),u=String(s.wrap),f=t+":"+e+"="+o+n+l+u;if(Sh.cache.hasOwnProperty(f))return Sh.cache[f].result;let g=Math.min(t,e),C=Math.max(t,e);if(Math.abs(g-C)===1){let N=t+"|"+e;return s.capture?`(${N})`:s.wrap===!1?N:`(?:${N})`}let w=_J(t)||_J(e),B={min:t,max:e,a:g,b:C},S=[],y=[];if(w&&(B.isPadded=w,B.maxLen=String(B.max).length),g<0){let N=C<0?Math.abs(C):1;y=UJ(N,Math.abs(g),B,s),g=B.a=0}return C>=0&&(S=UJ(g,C,B,s)),B.negatives=y,B.positives=S,B.result=Fje(y,S,s),s.capture===!0?B.result=`(${B.result})`:s.wrap!==!1&&S.length+y.length>1&&(B.result=`(?:${B.result})`),Sh.cache[f]=B,B.result};function Fje(t,e,r){let s=RR(t,e,"-",!1,r)||[],o=RR(e,t,"",!1,r)||[],n=RR(t,e,"-?",!0,r)||[];return s.concat(n).concat(o).join("|")}function Tje(t,e){let r=1,s=1,o=KJ(t,r),n=new Set([e]);for(;t<=o&&o<=e;)n.add(o),r+=1,o=KJ(t,r);for(o=HJ(e+1,s)-1;t<o&&o<=e;)n.add(o),s+=1,o=HJ(e+1,s)-1;return n=[...n],n.sort(Rje),n}function Lje(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=Nje(t,e),o=s.length,n="",l=0;for(let u=0;u<o;u++){let[f,g]=s[u];f===g?n+=f:f!=="0"||g!=="9"?n+=Mje(f,g,r):l++}return l&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[l],digits:o}}function UJ(t,e,r,s){let o=Tje(t,e),n=[],l=t,u;for(let f=0;f<o.length;f++){let g=o[f],C=Lje(String(l),String(g),s),w="";if(!r.isPadded&&u&&u.pattern===C.pattern){u.count.length>1&&u.count.pop(),u.count.push(C.count[0]),u.string=u.pattern+qJ(u.count),l=g+1;continue}r.isPadded&&(w=Oje(g,r,s)),C.string=w+C.pattern+qJ(C.count),n.push(C),l=g+1,u=C}return n}function RR(t,e,r,s,o){let n=[];for(let l of t){let{string:u}=l;!s&&!jJ(e,"string"
|
|||
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var fV=K((ext,AV)=>{"use strict";var Xje=Qv(),{MAX_LENGTH:lV,CHAR_BACKSLASH:LR,CHAR_BACKTICK:Zje,CHAR_COMMA:$je,CHAR_DOT:eGe,CHAR_LEFT_PARENTHESES:tGe,CHAR_RIGHT_PARENTHESES:rGe,CHAR_LEFT_CURLY_BRACE:nGe,CHAR_RIGHT_CURLY_BRACE:iGe,CHAR_LEFT_SQUARE_BRACKET:cV,CHAR_RIGHT_SQUARE_BRACKET:uV,CHAR_DOUBLE_QUOTE:sGe,CHAR_SINGLE_QUOTE:oGe,CHAR_NO_BREAK_SPACE:aGe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:AGe}=aV(),lGe=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(lV,r.maxLength):lV;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let o={type:"root",input:t,nodes:[]},n=[o],l=o,u=o,f=0,g=t.length,C=0,w=0,B,S={},y=()=>t[C++],N=L=>{if(L.type==="text"&&u.type==="dot"&&(u.type="text"),u&&u.type==="text"&&L.type==="text"){u.value+=L.value;return}return l.nodes.push(L),L.parent=l,L.prev=u,u=L,L};for(N({type:"bos"});C<g;)if(l=n[n.length-1],B=y(),!(B===AGe||B===aGe)){if(B===LR){N({type:"text",value:(e.keepEscaping?B:"")+y()});continue}if(B===uV){N({type:"text",value:"\\"+B});continue}if(B===cV){f++;let L=!0,H;for(;C<g&&(H=y());){if(B+=H,H===cV){f++;continue}if(H===LR){B+=y();continue}if(H===uV&&(f--,f===0))break}N({type:"text",value:B});continue}if(B===tGe){l=N({type:"paren",nodes:[]}),n.push(l),N({type:"text",value:B});continue}if(B===rGe){if(l.type!=="paren"){N({type:"text",value:B});continue}l=n.pop(),N({type:"text",value:B}),l=n[n.length-1];continue}if(B===sGe||B===oGe||B===Zje){let L=B,H;for(e.keepQuotes!==!0&&(B="");C<g&&(H=y());){if(H===LR){B+=H+y();continue}if(H===L){e.keepQuotes===!0&&(B+=H);break}B+=H}N({type:"text",value:B});continue}if(B===nGe){w++;let L=u.value&&u.value.slice(-1)==="$"||l.dollar===!0;l=N({type:"brace",open:!0,close:!1,dollar:L,depth:w,commas:0,ranges:0,nodes:[]}),n.push(l),N({type:"open",value:B});continue}if(B===iGe){if(l.type!=="brace"){N({type:"text",value:B});continue}let L="close";l=n.pop(),l.close=!0,N({type:L,value:B}),w--,l=n[n.length-1];continue}if(B===$je&&w>0){if(l.ranges>0){l.ranges=0;let L=l.nodes.shift();l.nodes=[L,{type:"text",value:Xje(l)}]}N({type:"comma",value:B}),l.commas++;continue}if(B===eGe&&w>0&&l.commas===0){let L=l.nodes;if(w===0||L.length===0){N({type:"text",value:B});continue}if(u.type==="dot"){if(l.range=[],u.value+=B,u.type="range",l.nodes.length!==3&&l.nodes.length!==5){l.invalid=!0,l.ranges=0,u.type="text";continue}l.ranges++,l.args=[];continue}if(u.type==="range"){L.pop();let H=L[L.length-1];H.value+=u.value+B,u=H,l.ranges--;continue}N({type:"dot",value:B});continue}N({type:"text",value:B})}do if(l=n.pop(),l.type!=="root"){l.nodes.forEach(G=>{G.nodes||(G.type==="open"&&(G.isOpen=!0),G.type==="close"&&(G.isClose=!0),G.nodes||(G.type="text"),G.invalid=!0)});let L=n[n.length-1],H=L.nodes.indexOf(l);L.nodes.splice(H,1,...l.nodes)}while(n.length>0);return N({type:"eos"}),o};AV.exports=lGe});var hV=K((txt,gV)=>{"use strict";var pV=Qv(),cGe=rV(),uGe=sV(),fGe=fV(),_A=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let o=_A.create(s,e);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(_A.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};_A.parse=(t,e={})=>fGe(t,e);_A.stringify=(t,e={})=>typeof t=="string"?pV(_A.parse(t,e),e):pV(t,e);_A.compile=(t,e={})=>(typeof t=="string"&&(t=_A.parse(t,e)),cGe(t,e));_A.expand=(t,e={})=>{typeof t=="string"&&(t=_A.parse(t,e));let r=uGe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};_A.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?_A.compile(t,e):_A.expand(t,e);gV.exports=_A});var iE=K((rxt,dV)=>{"use strict";var gGe=require("path"),Eu="\\\\/",mV=`[^${Eu}]`,Vf="\\.",pGe="\\+",hGe="\\?",Dv="\\/",dGe="(?=.)",yV="[^/]",OR=`(?:${Dv}|$)`,C
|
|||
|
`),u!==-1){let f=o+l.substring(0,u);l=l.substring(u+1),o="",e!==null?this.reportInfo(null,`${e} ${f}`):this.reportInfo(null,f)}while(u!==-1);o+=l}),r.on("end",()=>{let n=s.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var HE,eM=St(()=>{oA();Ml();wo();HE=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(o=>o.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(o=>o.supports(e,r));if(!s)throw new gr(ke.FETCHER_NOT_FOUND,`${Wr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var Ay,tM=St(()=>{wo();Ay=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,o){return this.getResolverByDescriptor(e,o).getSatisfying(e,r,s,o)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(o=>o.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(o=>o.supportsDescriptor(e,r));if(!s)throw new Error(`${ri(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(o=>o.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(o=>o.supportsLocator(e,r));if(!s)throw new Error(`${Wr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var qE,rM=St(()=>{Kt();wo();qE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let o=e.reference.slice(s+1),n=cA(e,o);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let o=e.reference.slice(s+1),n=cA(e,o),l=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,l,r)}getLocatorFilename(e){return iy(e)}async ensureVirtualLink(e,r,s){let o=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),l=this.getLocatorFilename(e),u=os.makeVirtualPath(n,l,o),f=new Kf(u,{baseFs:r.packageFs,pathUtils:$});return Te(re({},r),{packageFs:f})}}});var ly,TD,Kne=St(()=>{ly=class{static isVirtualDescriptor(e){return!!e.range.startsWith(ly.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(ly.protocol)}supportsDescriptor(e,r){return ly.isVirtualDescriptor(e)}supportsLocator(e,r){return ly.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,o){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},TD=ly;TD.protocol="virtual:"});var jE,nM=St(()=>{Kt();Jh();jE=class{supports(e){return!!e.reference.startsWith(Li.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new xn(s),pr
|
|||
|
`);return{stdout:n,stderr:l}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new Ay([new TD,new Li,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new HE([new qE,new jE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=YE(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(l=>l==="current"?e.os:l));let o=r.get("cpu");o!==null&&(o=o.map(l=>l==="current"?e.cpu:l));let n=r.get("libc");return n!==null&&(n=Qu(n,l=>{var u;return l==="current"?(u=e.libc)!=null?u:Qu.skip:l})),{os:s,cpu:o,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,o,{userProvided:n=!1}={})=>{if(!bu(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let l=new Xt;l.load(o,{yamlCompatibilityMode:!0});let u=Ym(e,s.identHash),f=[];u.push([s.range,f]);let g={status:Zo.Inactive,userProvided:n,parentDescriptor:s};for(let C of l.dependencies.values())f.push(Te(re({},g),{type:$s.Dependency,descriptor:C}));for(let C of l.peerDependencies.values())f.push(Te(re({},g),{type:$s.PeerDependency,descriptor:C}));for(let[C,w]of l.peerDependenciesMeta)for(let[B,S]of Object.entries(w))f.push(Te(re({},g),{type:$s.PeerDependencyMeta,selector:C,key:B,value:S}))};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,o]of this.get("packageExtensions"))r(Tp(s,!0),Jv(o),{userProvided:!0})}normalizeDependency(e){return bu(e.range)?Hn(e,`${this.get("defaultProtocol")}${e.range}`):WE.test(e.range)?Hn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e){let r=FE(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let s=this.packageExtensions.get(e.identHash);if(typeof s!="undefined"){let n=e.version;if(n!==null){for(let[l,u]of s)if(!!Vh(n,l))for(let f of u)switch(f.status===Zo.Inactive&&(f.status=Zo.Redundant),f.type){case $s.Dependency:typeof r.dependencies.get(f.descriptor.identHash)=="undefined"&&(f.status=Zo.Active,r.dependencies.set(f.descriptor.identHash,this.normalizeDependency(f.descriptor)));break;case $s.PeerDependency:typeof r.peerDependencies.get(f.descriptor.identHash)=="undefined"&&(f.status=Zo.Active,r.peerDependencies.set(f.descriptor.identHash,f.descriptor));break;case $s.PeerDependencyMeta:{let g=r.peerDependenciesMeta.get(f.selector);(typeof g=="undefined"||!Object.prototype.hasOwnProperty.call(g,f.key)||g[f.key]!==f.value)&&(f.status=Zo.Active,zf(r.peerDependenciesMeta,f.selector,()=>({}))[f.key]=f.value)}break;default:DT(f);break}}}let o=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let l=Sa(n);r.peerDependencies.has(l.identHash)||r.peerDependencies.set(l.identHash,Hn(l,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let l=o(n),u=xu("types",l),f=En(u);r.peerDependencies.has(u.identHash)||r.peerDependenciesMeta.has(f)||(r.peerDependencies.set(u.identHash,Hn(u,"*")),r.peerDependenciesMeta.set(f,{optional:!0}))}return r.dependencies=new Map(AA(r.dependencies,([,n])=>lA(n))),r.peerDependencies=new Map(AA(r.peerDependencies,([,n])=>lA(n))),r}getLimit(e){return zf(this.limits,e,()=>(0,jne.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let n=e(o);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let o=r;for(let n of this.plugins.values()){let l=n.hooks;if(!l)continue;let u=e(l);!u||(o=await u(o,...s))}return o}async firstHook(e,...r){for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let n=e(o);if(!n)continue;let l=await n(...r);if(typeof l!="undefined")return l}return null}},st=Pu;st.deleteProperty=Symbol()
|
|||
|
`,w.message,w.stack);var B=new Error("tunneling socket could not be established, cause="+w.message);B.code="ECONNRESET",e.request.emit("error",B),s.removeSocket(o)}};ng.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var s=this.requests.shift();s&&this.createSocket(s,function(o){s.request.onSocket(o)})}};function Jne(t,e){var r=this;ng.prototype.createSocket.call(r,t,function(s){var o=t.request.getHeader("host"),n=QM({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):t.host}),l=qet.connect(0,n);r.sockets[r.sockets.indexOf(s)]=l,e(l)})}function Vne(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function QM(t){for(var e=1,r=arguments.length;e<r;++e){var s=arguments[e];if(typeof s=="object")for(var o=Object.keys(s),n=0,l=o.length;n<l;++n){var u=o[n];s[u]!==void 0&&(t[u]=s[u])}}return t}var Op;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Op=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Op=function(){};uy.debug=Op});var Zne=K((bTt,Xne)=>{Xne.exports=zne()});var sg=K((ig,qD)=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});var $ne=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function zet(t){return $ne.includes(t)}var Xet=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...$ne];function Zet(t){return Xet.includes(t)}var $et=["null","undefined","string","number","bigint","boolean","symbol"];function ett(t){return $et.includes(t)}function fy(t){return e=>typeof e===t}var{toString:eie}=Object.prototype,VE=t=>{let e=eie.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Me.domElement(t))return"HTMLElement";if(Zet(e))return e},yi=t=>e=>VE(e)===t;function Me(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Me.observable(t))return"Observable";if(Me.array(t))return"Array";if(Me.buffer(t))return"Buffer";let e=VE(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Me.undefined=fy("undefined");Me.string=fy("string");var ttt=fy("number");Me.number=t=>ttt(t)&&!Me.nan(t);Me.bigint=fy("bigint");Me.function_=fy("function");Me.null_=t=>t===null;Me.class_=t=>Me.function_(t)&&t.toString().startsWith("class ");Me.boolean=t=>t===!0||t===!1;Me.symbol=fy("symbol");Me.numericString=t=>Me.string(t)&&!Me.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Me.array=(t,e)=>Array.isArray(t)?Me.function_(e)?t.every(e):!0:!1;Me.buffer=t=>{var e,r,s,o;return(o=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&o!==void 0?o:!1};Me.nullOrUndefined=t=>Me.null_(t)||Me.undefined(t);Me.object=t=>!Me.null_(t)&&(typeof t=="object"||Me.function_(t));Me.iterable=t=>{var e;return Me.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Me.asyncIterable=t=>{var e;return Me.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Me.generator=t=>Me.iterable(t)&&Me.function_(t.next)&&Me.function_(t.throw);Me.asyncGenerator=t=>Me.asyncIterable(t)&&Me.function_(t.next)&&Me.function_(t.throw);Me.nativePromise=t=>yi("Promise")(t);var rtt=t=>{var e,r;return Me.function_((e=t)===null||e===void 0?void 0:e.then)&&Me.function_((r=t)===null||r===void 0?void 0:r.catch)};Me.promise=t=>Me.nativePromise(t)||rtt(t);Me.generatorFunction=yi("GeneratorFunction");Me.asyncGene
|
|||
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);y(N)}return}s[0].resolve(S);return}}if(l in this.queue){if(u in this.queue[l]){this.queue[l][u].listeners.push(...s),this._tryToCreateNewSession(l,u);return}}else this.queue[l]={};let f=()=>{l in this.queue&&this.queue[l][u]===g&&(delete this.queue[l][u],Object.keys(this.queue[l]).length===0&&delete this.queue[l])},g=()=>{let C=`${u}:${l}`,w=!1;try{let B=lrt.connect(e,re({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C)},r));B[Pa]=0,B[hy]=!1;let S=()=>B[Pa]<B.remoteSettings.maxConcurrentStreams,y=!0;B.socket.once("session",L=>{this.tlsSessionCache.set(C,L)}),B.once("error",L=>{for(let{reject:H}of s)H(L);this.tlsSessionCache.delete(C)}),B.setTimeout(this.timeout,()=>{B.destroy()}),B.once("close",()=>{if(w){y&&this._freeSessionsCount--,this._sessionsCount--;let L=this.sessions[l];L.splice(L.indexOf(B),1),L.length===0&&delete this.sessions[l]}else{let L=new Error("Session closed without receiving a SETTINGS frame");L.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:H}of s)H(L);f()}this._tryToCreateNewSession(l,u)});let N=()=>{if(!(!(l in this.queue)||!S())){for(let L of B[Ll])if(L in this.queue[l]){let{listeners:H}=this.queue[l][L];for(;H.length!==0&&S();)H.shift().resolve(B);let G=this.queue[l];if(G[L].listeners.length===0&&(delete G[L],Object.keys(G).length===0)){delete this.queue[l];break}if(!S())break}}};B.on("origin",()=>{B[Ll]=B.originSet,!!S()&&(N(),VM(this.sessions[l],B))}),B.once("remoteSettings",()=>{if(B.ref(),B.unref(),this._sessionsCount++,g.destroyed){let L=new Error("Agent has been destroyed");for(let H of s)H.reject(L);B.destroy();return}B[Ll]=B.originSet;{let L=this.sessions;if(l in L){let H=L[l];H.splice(frt(H,B,grt),0,B)}else L[l]=[B]}this._freeSessionsCount+=1,w=!0,this.emit("session",B),N(),f(),B[Pa]===0&&this._freeSessionsCount>this.maxFreeSessions&&B.close(),s.length!==0&&(this.getSession(u,r,s),s.length=0),B.on("remoteSettings",()=>{N(),VM(this.sessions[l],B)})}),B[ese]=B.request,B.request=(L,H)=>{if(B[hy])throw new Error("The session is gracefully closing. No new streams are allowed.");let G=B[ese](L,H);return B.ref(),++B[Pa],B[Pa]===B.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,G.once("close",()=>{if(y=S(),--B[Pa],!B.destroyed&&!B.closed&&(prt(this.sessions[l],B),S()&&!B.closed)){y||(this._freeSessionsCount++,y=!0);let te=B[Pa]===0;te&&B.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||B[hy])?B.close():(VM(this.sessions[l],B),N())}}),G}}catch(B){for(let S of s)S.reject(B);f()}};g.listeners=s,g.completed=!1,g.destroyed=!1,this.queue[l][u]=g,this._tryToCreateNewSession(l,u)})}request(e,r,s,o){return new Promise((n,l)=>{this.getSession(e,r,[{reject:l,resolve:u=>{try{n(u.request(s,o))}catch(f){l(f)}}}])})}createConnection(e,r){return og.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let s=e.port||443,o=e.hostname||e.host;return typeof r.servername=="undefined"&&(r.servername=o),Art.connect(s,o,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Pa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return rse({agent:this,isFree:!0})}get busySessions(){return rse({agent:this,isFree:!1})}};og.kCurrentStreamsCount=Pa;og.kGracefullyClosing=hy;$ie.exports={Agent:og,globalAgent:new og}});var XM=K(($Tt,nse)=>{"use strict";var{Readable:hrt}=require("stream"),ise=class extends hrt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeA
|
|||
|
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|||
|
`).reverse();for(;u.length!==0&&u[0]===l[0];)l.shift();this.stack=`${this.stack.slice(0,n)}${l.reverse().join(`
|
|||
|
`)}${u.reverse().join(`
|
|||
|
`)}`}}};Ln.RequestError=Us;var DL=class extends Us{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}};Ln.MaxRedirectsError=DL;var kL=class extends Us{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}};Ln.HTTPError=kL;var SL=class extends Us{constructor(e,r){super(e.message,e,r);this.name="CacheError"}};Ln.CacheError=SL;var xL=class extends Us{constructor(e,r){super(e.message,e,r);this.name="UploadError"}};Ln.UploadError=xL;var bL=class extends Us{constructor(e,r,s){super(e.message,e,s);this.name="TimeoutError",this.event=e.event,this.timings=r}};Ln.TimeoutError=bL;var tk=class extends Us{constructor(e,r){super(e.message,e,r);this.name="ReadError"}};Ln.ReadError=tk;var PL=class extends Us{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}};Ln.UnsupportedProtocolError=PL;var wnt=["socket","connect","continue","information","upgrade","timeout"],vL=class extends Vse.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0});this[yy]=0,this[Iy]=0,this.requestInitialized=!1,this[$D]=new Set,this.redirects=[],this[Ey]=!1,this[ek]=!1,this[rw]=[],this.retryCount=0,this._progressCallbacks=[];let o=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",g=>{g.prependListener("data",o),g.on("data",n),g.prependListener("end",o),g.on("end",n)}),this.on("unpipe",g=>{g.off("data",o),g.off("data",n),g.off("end",o),g.off("end",n)}),this.on("pipe",g=>{g instanceof EL.IncomingMessage&&(this.options.headers=re(re({},g.headers),this.options.headers))});let{json:l,body:u,form:f}=r;if((l||u||f)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(g){gt.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(g);return}(async()=>{var g;try{this.options.body instanceof tnt.ReadStream&&await Cnt(this.options.body);let{url:C}=this.options;if(!C)throw new TypeError("Missing `url` property");if(this.requestUrl=C.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(g=this[Qo])===null||g===void 0||g.destroy();return}for(let w of this[rw])w();this[rw].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Us){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(e,r,s){var o,n,l,u,f;let g=r;if(gt.default.object(e)&&!gt.default.urlInstance(e))r=re(re(re({},s),e),r);else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r=re(re({},s),r),e!==void 0&&(r.url=e),gt.default.urlInstance(r.url)&&(r.url=new Up.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),gt.assert.any([gt.default.string,gt.default.undefined],r.method),gt.assert.any([gt.default.object,gt.default.undefined],r.headers),gt.assert.any([gt.default.string,gt.default.urlInstance,gt.default.undefined],r.prefixUrl),gt.assert.any([gt.default.object,gt.default.undefined],r.cookieJar),gt.assert.any([gt.default.object,gt.default.string,gt.default.undefined],r.searchParams),gt.assert.any([gt.default.object,gt.default.string,gt.default.undefined],r.cache),gt.assert.any([gt.default.object,gt.default.number,gt.default.undefined],r.timeout),gt.assert.any([gt.default.object,gt.default.undefined],r.context),gt.assert.any([gt.default.object,gt.default.undefined],r.hooks),gt.assert.any([gt.default.boolean,gt.default.undefined],r.decompress),gt.assert.any([gt.default.boolean,gt.default.undefined],r.ignoreInvalidCookies),gt.assert.any([gt.default.boolean,gt.default.undefined],r.followRedirect),gt.assert.any([gt.default.number,gt.default.undefined],r.maxRedirects),gt.assert.any([gt.default.boolean,gt.default.undefined],r.throwHttpErrors),gt.assert.any([gt.default.boolean,gt.default.undefined],r.http2),gt.assert.any([gt.default.boolean,gt.default.undefined],r.allowGetBody),gt.assert.any([gt.default.string,gt.default.undefined],r.localAddress
|
|||
|
`)):typeof readline=="function"&&(U=readline(),U!==null&&(U+=`
|
|||
|
`));if(!U)return null;P.input=hi(U,!0)}return P.input.shift()},put_char:function(P,U){U===null||U===10?(G(Bt(P.output,0)),P.output=[]):U!=0&&P.output.push(U)},flush:function(P){P.output&&P.output.length>0&&(G(Bt(P.output,0)),P.output=[])}},default_tty1_ops:{put_char:function(P,U){U===null||U===10?(te(Bt(P.output,0)),P.output=[]):U!=0&&P.output.push(U)},flush:function(P){P.output&&P.output.length>0&&(te(Bt(P.output,0)),P.output=[])}}};function IA(P){for(var U=me(P,65536),j=ll(U);P<U;)$e[j+P++]=0;return j}var Pr={ops_table:null,mount:function(P){return Pr.createNode(null,"/",16384|511,0)},createNode:function(P,U,j,oe){if(Z.isBlkdev(j)||Z.isFIFO(j))throw new Z.ErrnoError(63);Pr.ops_table||(Pr.ops_table={dir:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr,lookup:Pr.node_ops.lookup,mknod:Pr.node_ops.mknod,rename:Pr.node_ops.rename,unlink:Pr.node_ops.unlink,rmdir:Pr.node_ops.rmdir,readdir:Pr.node_ops.readdir,symlink:Pr.node_ops.symlink},stream:{llseek:Pr.stream_ops.llseek}},file:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr},stream:{llseek:Pr.stream_ops.llseek,read:Pr.stream_ops.read,write:Pr.stream_ops.write,allocate:Pr.stream_ops.allocate,mmap:Pr.stream_ops.mmap,msync:Pr.stream_ops.msync}},link:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr,readlink:Pr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Pr.node_ops.getattr,setattr:Pr.node_ops.setattr},stream:Z.chrdev_stream_ops}});var le=Z.createNode(P,U,j,oe);return Z.isDir(le.mode)?(le.node_ops=Pr.ops_table.dir.node,le.stream_ops=Pr.ops_table.dir.stream,le.contents={}):Z.isFile(le.mode)?(le.node_ops=Pr.ops_table.file.node,le.stream_ops=Pr.ops_table.file.stream,le.usedBytes=0,le.contents=null):Z.isLink(le.mode)?(le.node_ops=Pr.ops_table.link.node,le.stream_ops=Pr.ops_table.link.stream):Z.isChrdev(le.mode)&&(le.node_ops=Pr.ops_table.chrdev.node,le.stream_ops=Pr.ops_table.chrdev.stream),le.timestamp=Date.now(),P&&(P.contents[U]=le,P.timestamp=le.timestamp),le},getFileDataAsTypedArray:function(P){return P.contents?P.contents.subarray?P.contents.subarray(0,P.usedBytes):new Uint8Array(P.contents):new Uint8Array(0)},expandFileStorage:function(P,U){var j=P.contents?P.contents.length:0;if(!(j>=U)){var oe=1024*1024;U=Math.max(U,j*(j<oe?2:1.125)>>>0),j!=0&&(U=Math.max(U,256));var le=P.contents;P.contents=new Uint8Array(U),P.usedBytes>0&&P.contents.set(le.subarray(0,P.usedBytes),0)}},resizeFileStorage:function(P,U){if(P.usedBytes!=U)if(U==0)P.contents=null,P.usedBytes=0;else{var j=P.contents;P.contents=new Uint8Array(U),j&&P.contents.set(j.subarray(0,Math.min(U,P.usedBytes))),P.usedBytes=U}},node_ops:{getattr:function(P){var U={};return U.dev=Z.isChrdev(P.mode)?P.id:1,U.ino=P.id,U.mode=P.mode,U.nlink=1,U.uid=0,U.gid=0,U.rdev=P.rdev,Z.isDir(P.mode)?U.size=4096:Z.isFile(P.mode)?U.size=P.usedBytes:Z.isLink(P.mode)?U.size=P.link.length:U.size=0,U.atime=new Date(P.timestamp),U.mtime=new Date(P.timestamp),U.ctime=new Date(P.timestamp),U.blksize=4096,U.blocks=Math.ceil(U.size/U.blksize),U},setattr:function(P,U){U.mode!==void 0&&(P.mode=U.mode),U.timestamp!==void 0&&(P.timestamp=U.timestamp),U.size!==void 0&&Pr.resizeFileStorage(P,U.size)},lookup:function(P,U){throw Z.genericErrors[44]},mknod:function(P,U,j,oe){return Pr.createNode(P,U,j,oe)},rename:function(P,U,j){if(Z.isDir(P.mode)){var oe;try{oe=Z.lookupNode(U,j)}catch(xe){}if(oe)for(var le in oe.contents)throw new Z.ErrnoError(55)}delete P.parent.contents[P.name],P.parent.timestamp=Date.now(),P.name=j,U.contents[j]=P,U.timestamp=P.parent.timestamp,P.parent=U},unlink:function(P,U){delete P.contents[U],P.timestamp=Date.now()},rmdir:function(P,U){var j=Z.lookupNode(P,U);for(var oe in j.contents)throw new Z.ErrnoError(55);delete P.contents[U],P.timestamp=Date.now()},readdir:function(P){var U=[".",".."];for(var j in P.contents)!P.contents.hasOwnProperty(j)||U.push(j);return U},symlink:function(P,U,j){var oe=Pr.createNode(P,U,511|40960,0);return oe.link=j,oe},readlink:function(P){if(!Z.isLink(P.mode))throw new Z.ErrnoError(28);return P.link}},stream_ops:{read:function(P,U,j,oe,le){var xe=P.node.c
|
|||
|
`),g(127);break;case"EACCES":o[2].write(`permission denied: ${t}
|
|||
|
`),g(128);break;default:o[2].write(`uncaught error: ${C.message}
|
|||
|
`),g(1);break}}),f.on("close",C=>{$h.delete(f),$h.size===0&&(process.off("SIGINT",JL),process.off("SIGTERM",VL)),g(C!==null?C:129)})})}}}function zoe(t){return e=>{let r=e[0]==="pipe"?new Tu.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function fk(t,e){return aw.start(t,e)}function Zoe(t,e=null){let r=new Tu.PassThrough,s=new Joe.StringDecoder,o="";return r.on("data",n=>{let l=s.write(n),u;do if(u=l.indexOf(`
|
|||
|
`),u!==-1){let f=o+l.substring(0,u);l=l.substring(u+1),o="",t(e!==null?`${e} ${f}`:f)}while(u!==-1);o+=l}),r.on("end",()=>{let n=s.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function $oe(t,{prefix:e}){return{stdout:Zoe(r=>t.stdout.write(`${r}
|
|||
|
`),t.stdout.isTTY?e:null),stderr:Zoe(r=>t.stderr.write(`${r}
|
|||
|
`),t.stderr.isTTY?e:null)}}var Woe,Tu,Joe,uA,$h,Dc,Xoe,aw,zL=St(()=>{Woe=He(vF()),Tu=He(require("stream")),Joe=He(require("string_decoder"));(function(s){s[s.STDIN=0]="STDIN",s[s.STDOUT=1]="STDOUT",s[s.STDERR=2]="STDERR"})(uA||(uA={}));$h=new Set;Dc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},Xoe=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},aw=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:o}){let n=new aw(null,e);return n.stdin=r,n.stdout=s,n.stderr=o,n}pipeTo(e,r=1){let s=new aw(this,e),o=new Xoe;return s.pipe=o,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)==1?this.stdout=o:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)==2?this.stderr=o:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,e[2]=s.get();let o=this.implementation(e);return this.pipe&&this.pipe.attach(o.stdin),await o.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var Aw={};or(Aw,{ShellError:()=>_l,execute:()=>dk,globUtils:()=>lk});function nae(t,e,r){let s=new YA.PassThrough({autoDestroy:!0});switch(t){case uA.STDIN:(e&1)==1&&r.stdin.pipe(s,{end:!1}),(e&2)==2&&r.stdin instanceof YA.Writable&&s.pipe(r.stdin,{end:!1});break;case uA.STDOUT:(e&1)==1&&r.stdout.pipe(s,{end:!1}),(e&2)==2&&s.pipe(r.stdout,{end:!1});break;case uA.STDERR:(e&1)==1&&r.stderr.pipe(s,{end:!1}),(e&2)==2&&s.pipe(r.stderr,{end:!1});break;default:throw new _l(`Bad file descriptor: "${t}"`)}return s}function gk(t,e={}){let r=re(re({},t),e);return r.environment=re(re({},t.environment),e.environment),r.variables=re(re({},t.variables),e.variables),r}async function sit(t,e,r){let s=[],o=new YA.PassThrough;return o.on("data",n=>s.push(n)),await pk(t,e,gk(r,{stdout:o})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function iae(t,e,r){let s=t.map(async n=>{let l=await cg(n.args,e,r);return{name:n.name,value:l.join(" ")}});return(await Promise.all(s)).reduce((n,l)=>(n[l.name]=l.value,n),{})}function hk(t){return t.match(/[^ \r\n\t]+/g)||[]}async function sae(t,e,r,s,o=s){switch(t.name){case"$":s(String(process.pid));break;case"#":s(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)o(n);else for(let n of e.args){let l=hk(n);for(let u=0;u<l.length-1;++u)o(l[u]);s(l[l.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)s(n);else for(let l of hk(n))o(l)}break;case"PPID":s(String(process.ppid));break;case"RANDOM":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),l;if(Number.isFinite(n))if(n>=0&&n<e.args.length)l=e.args[n];else if(t.defaultValue)l=(await cg(t.defaultValue,e,r)).join(" ");else if(t.alternativeValue)l=(await cg(t.alternativeValue,e,r)).join(" ");else throw new _l(`Unbound argument #${n}`);else if(Object.prototype.hasOwnProperty.call(r.variables,t.name))l=r.variables[t.name];else if(Object.prototype.hasOwnProperty.call(r.environment,t.name))l=r.environment[t.name];else if(t.defaultValue)l=(await cg(t.defaultValue,e,r)).join(" ");else throw new _l(`Unbound variable "${t.name}"`);if(typeof l!="undefined"&&t.alternativeValue&&(l=(await cg(t.alternativeValue,e,r)).join(" ")),t.quoted)s(l);else{let u=hk(l);for(let g=0;g<u.length-1;++g)o(u[g]);let f=u[u.length-1];typeof f!="undefined"&&s(f)}}break}}async function cw(t,e,r){if(t.type==="
|
|||
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${f}, '${l(hm(t))}' has ended
|
|||
|
`)})),0}return await aae(t,e,r)}async function cit(t,e,r,{background:s=!1}={}){let o,n=u=>{o=u,r.variables["?"]=String(u)},l=async u=>{try{return await lit(u.chain,e,r,{background:s&&typeof u.then=="undefined"})}catch(f){if(!(f instanceof _l))throw f;return r.stderr.write(`${f.message}
|
|||
|
`),1}};for(n(await l(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":o===0&&n(await l(t.then.line));break;case"||":o!==0&&n(await l(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return o}async function pk(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let o=0;for(let{command:n,type:l}of t){if(o=await cit(n,e,r,{background:l==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(o)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,o}function Aae(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>uw(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>uw(e));case"arithmetic":return XL(t.arithmetic);case"shell":return ZL(t.shell);default:return!1}}function uw(t){switch(t.type){case"redirection":return t.args.some(e=>uw(e));case"argument":return t.segments.some(e=>Aae(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function XL(t){switch(t.type){case"variable":return Aae(t);case"number":return!1;default:return XL(t.left)||XL(t.right)}}function ZL(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case"subshell":s=ZL(r.subshell);break;case"command":s=r.envs.some(o=>o.args.some(n=>uw(n)))||r.args.some(o=>uw(o));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function dk(t,e=[],{baseFs:r=new fi,builtins:s={},cwd:o=de.toPortablePath(process.cwd()),env:n=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:f=process.stderr,variables:g={},glob:C=lk}={}){let w={};for(let[y,N]of Object.entries(n))typeof N!="undefined"&&(w[y]=N);let B=new Map(iit);for(let[y,N]of Object.entries(s))B.set(y,N);l===null&&(l=new YA.PassThrough,l.end());let S=xQ(t,C);if(!ZL(S)&&S.length>0&&e.length>0){let{command:y}=S[S.length-1];for(;y.then;)y=y.then.line;let N=y.chain;for(;N.then;)N=N.then.chain;N.type==="command"&&(N.args=N.args.concat(e.map(L=>({type:"argument",segments:[{type:"text",text:L}]}))))}return await pk(S,{args:e,baseFs:r,builtins:B,initialStdin:l,initialStdout:u,initialStderr:f,glob:C},{cwd:o,environment:w,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:f,variables:Object.assign({},g,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var eae,tae,YA,rae,nit,ta,iit,oit,mk=St(()=>{Kt();kl();eae=He(FR()),tae=He(require("os")),YA=He(require("stream")),rae=He(require("util"));Koe();Yoe();zL();zL();nit=(0,rae.promisify)(setTimeout);(function(r){r[r.Readable=1]="Readable",r[r.Writable=2]="Writable"})(ta||(ta={}));iit=new Map([["cd",async([t=(0,tae.homedir)(),...e],r,s)=>{let o=$.resolve(s.cwd,de.toPortablePath(t));if(!(await r.baseFs.statPromise(o).catch(l=>{throw l.code==="ENOENT"?new _l(`cd: no such file or directory: ${t}`):l})).isDirectory())throw new _l(`cd: not a directory: ${t}`);return s.cwd=o,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${de.fromPortablePath(r.cwd)}
|
|||
|
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,s)=>s.exitCode=parseInt(t!=null?t:s.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
|||
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t=="undefined")throw new _l("sleep: missing operand");let s=Number(t);if(Number.isNaN(s))throw new _l(`sleep: invalid time interval '${t}'`);return await nit(1e3*s,0)}],["__ysh_run_procedure",async(t,e,r)=>{let s=r.procedures[t[0]];return await fk(s,{stdin:new Dc(r.stdin),stdout:new Dc(r.stdout),stderr:new Dc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let s=r.stdin,o=r.stdout,n=r.stderr,l=[],u=[],f=[],g=0;for(;t[g]!=="--";){let w=t[g++],{type:B,fd:S}=JSON.parse(w),y=G=>{switch(S){case null:case 0:l.push(G);break;default:throw new Error(`Unsupported file descriptor: "${S}"`)}},N=G=>{switch(S){case null:case 1:u.push(G);break;case 2:f.push(G);break;default:throw new Error(`Unsupported file descriptor: "${S}"`)}},L=Number(t[g++]),H=g+L;for(let G=g;G<H;++g,++G)switch(B){case"<":y(()=>e.baseFs.createReadStream($.resolve(r.cwd,de.toPortablePath(t[G]))));break;case"<<<":y(()=>{let te=new YA.PassThrough;return process.nextTick(()=>{te.write(`${t[G]}
|
|||
|
`),te.end()}),te});break;case"<&":y(()=>nae(Number(t[G]),1,r));break;case">":case">>":{let te=$.resolve(r.cwd,de.toPortablePath(t[G]));N(te==="/dev/null"?new YA.Writable({autoDestroy:!0,emitClose:!0,write(fe,me,ye){setImmediate(ye)}}):e.baseFs.createWriteStream(te,B===">>"?{flags:"a"}:void 0))}break;case">&":N(nae(Number(t[G]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${B}"`)}}if(l.length>0){let w=new YA.PassThrough;s=w;let B=S=>{if(S===l.length)w.end();else{let y=l[S]();y.pipe(w,{end:!1}),y.on("end",()=>{B(S+1)})}};B(0)}if(u.length>0){let w=new YA.PassThrough;o=w;for(let B of u)w.pipe(B)}if(f.length>0){let w=new YA.PassThrough;n=w;for(let B of f)w.pipe(B)}let C=await fk(lw(t.slice(g+1),e,r),{stdin:new Dc(s),stdout:new Dc(o),stderr:new Dc(n)}).run();return await Promise.all(u.map(w=>new Promise((B,S)=>{w.on("error",y=>{S(y)}),w.on("close",()=>{B()}),w.end()}))),await Promise.all(f.map(w=>new Promise((B,S)=>{w.on("error",y=>{S(y)}),w.on("close",()=>{B()}),w.end()}))),C}]]);oit={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var $L=K((uMt,lae)=>{function uit(t,e){for(var r=-1,s=t==null?0:t.length,o=Array(s);++r<s;)o[r]=e(t[r],r,t);return o}lae.exports=uit});var hae=K((fMt,cae)=>{var uae=bh(),fit=$L(),git=Cc(),pit=KE(),hit=1/0,fae=uae?uae.prototype:void 0,gae=fae?fae.toString:void 0;function pae(t){if(typeof t=="string")return t;if(git(t))return fit(t,pae)+"";if(pit(t))return gae?gae.call(t):"";var e=t+"";return e=="0"&&1/t==-hit?"-0":e}cae.exports=pae});var yk=K((gMt,dae)=>{var dit=hae();function mit(t){return t==null?"":dit(t)}dae.exports=mit});var eO=K((pMt,mae)=>{function yit(t,e,r){var s=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(o);++s<o;)n[s]=t[s+e];return n}mae.exports=yit});var Cae=K((hMt,yae)=>{var Cit=eO();function Iit(t,e,r){var s=t.length;return r=r===void 0?s:r,!e&&r>=s?t:Cit(t,e,r)}yae.exports=Iit});var tO=K((dMt,Iae)=>{var Eit="\\ud800-\\udfff",wit="\\u0300-\\u036f",Bit="\\ufe20-\\ufe2f",Qit="\\u20d0-\\u20ff",vit=wit+Bit+Qit,Dit="\\ufe0e\\ufe0f",kit="\\u200d",Sit=RegExp("["+kit+Eit+vit+Dit+"]");function xit(t){return Sit.test(t)}Iae.exports=xit});var wae=K((mMt,Eae)=>{function bit(t){return t.split("")}Eae.exports=bit});var bae=K((yMt,Bae)=>{var Qae="\\ud800-\\udfff",Pit="\\u0300-\\u036f",Fit="\\ufe20-\\ufe2f",Rit="\\u20d0-\\u20ff",Tit=Pit+Fit+Rit,Nit="\\ufe0e\\ufe0f",Mit="["+Qae+"]",rO="["+Tit+"]",nO="\\ud83c[\\udffb-\\udfff]",Lit="(?:"+rO+"|"+nO+")",vae="[^"+Qae+"]",Dae="(?:\\ud83c[\\udde6-\\uddff]){2}",kae="[\\ud800-\\udbff][\\udc00-\\udfff]",Oit="\\u200d",Sae=Lit+"?",xae="["+Nit+"]?",Uit="(?:"+Oit+"(?:"+[vae,Dae,kae].join("|")+")"+xae+Sae+")*",_it=xae+Sae+Uit,Kit="(?:"+[vae+rO+"?",rO,Dae,kae,Mit].join("|")+")",Hit=RegExp(nO+"(?="+nO+")|"+Kit+_it,"g");function qit(t){return t.match(Hit)||[]}Bae.exports=qit});var Fae=K((CMt,Pae)=>{var jit=wae(),Git=tO(),Yit=bae();function Wit(t){return Git(t)?Yit(t):jit(t)}Pae.exports=Wit});var Tae=K((IMt,Rae)=>{var Jit=Cae(),Vit=tO(),zit=Fae(),Xit=yk();function Zit(t){return function(e){e=Xit(e);var r=Vit(e)?zit(e):void 0,s=r?r[0]:e.charAt(0),o=r?Jit(r,1).join(""):e.slice(1);return s[t]()+o}}Rae.exports=Zit});var Mae=K((EMt,Nae)=>{var $it=Tae(),est=$it("toUpperCase");Nae.exports=est});var iO=K((wMt,Lae)=>{var tst=yk(),rst=Mae();function nst(t){return rst(tst(t).toLowerCase())}Lae.exports=nst});var Oae=K((BMt,Ck)=>{function ist(){var t=0,e=1,r=2,s=3,o=4,n=5,l=6,u=7,f=8,g=9,C=10,w=11,B=12,S=13,y=14,N=15,L=16,H=17,G=0,te=1,fe=2,me=3,ye=4;function Se(p,Oe){return 55296<=p.charCodeAt(Oe)&&p.charCodeAt(Oe)<=56319&&56320<=p.charCodeAt(Oe+1)&&p.charCodeAt(Oe+1)<=57343}function Ce(p,Oe){Oe===void 0&&(Oe=0);var De=p.charCodeAt(Oe);if(55296<=De&&De<=56319&&Oe<p.length-1){var Ee=De,ue=p.charCodeAt(Oe+1);return 56320<=ue&&ue<=57343?(Ee-55296)*1024+(ue-56320)+65536:Ee}if(56320<=De&&De<=57343&&Oe>=1){var Ee=p.charCodeAt(Oe-1),ue=De;return 55296<=Ee&&Ee<=56319?(Ee-55296)*1024+(ue-56320)+65536:ue}return De}function Pe(p,Oe,De){var Ee=[p]
|
|||
|
`,end:t=>`::endgroup::
|
|||
|
`}:Ek.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
|||
|
`,end:t=>`travis_fold:end:${t}
|
|||
|
`}:Ek.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r[0K${t}
|
|||
|
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r[0K`}:null,jae=new Date,lst=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,cst=t=>t,Bk=cst({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),ust=lst&&Object.keys(Bk).find(t=>{let e=Bk[t];return!(e.date&&(e.date[0]!==jae.getDate()||e.date[1]!==jae.getMonth()+1))})||"default";Nt=class extends $o{constructor({configuration:e,stdout:r,json:s=!1,includeFooter:o=!0,includeLogs:n=!s,includeInfos:l=n,includeWarnings:u=n,forgettableBufferSize:f=Ast,forgettableNames:g=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;this.forgettableLines=[];if(kE(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=f,this.forgettableNames=new Set([...g,...ast]),this.includeFooter=o,this.includeInfos=l,this.includeWarnings=u,this.json=s,this.stdout=r,e.get("enableProgressBars")&&!s&&r.isTTY&&r.columns>22){let C=e.get("progressBarStyle")||ust;if(!Object.prototype.hasOwnProperty.call(Bk,C))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Bk[C];let w="\u27A4 YN0000: \u250C ".length,B=Math.max(0,Math.min(r.columns-w,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*B/80)}}static async start(e,r){let s=new this(e),o=process.emitWarning;process.emitWarning=(n,l)=>{if(typeof n!="string"){let f=n;n=f.message,l=l!=null?l:f.name}let u=typeof l!="undefined"?`${l}: ${n}`:n;s.reportWarning(ke.UNNAMED,u)};try{await r(s)}catch(n){s.reportExceptionOnce(n)}finally{await s.finalize(),process.emitWarning=o}return s}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,r){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof r!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(ke.FETCH_NOT_CACHED,r)}startSectionSync({reportHeader:e,reportFooter:r,skipIfEmpty:s},o){let n={committed:!1,action:()=>{e==null||e()}};s?this.uncommitted.add(n):(n.action(),n.committed=!0);let l=Date.now();try{return o()}catch(u){throw this.reportExceptionOnce(u),u}finally{let u=Date.now();this.uncommitted.delete(n),n.committed&&(r==null||r(u-l))}}async startSectionPromise({reportHeader:e,reportFooter:r,skipIfEmpty:s},o){let n={committed:!1,action:()=>{e==null||e()}};s?this.uncommitted.add(n):(n.action(),n.committed=!0);let l=Date.now();try{return await o()}catch(u){throw this.reportExceptionOnce(u),u}finally{let u=Date.now();this.uncommitted.delete(n),n.committed&&(r==null||r(u-l))}}startTimerImpl(e,r,s){let o=typeof r=="function"?{}:r;return{cb:typeof r=="function"?r:s,reportHeader:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,wk!==null&&!this.json&&this.includeInfos&&this.stdout.write(wk.start(e))},reportFooter:l=>{this.indent-=1,wk!==null&&!this.json&&this.includeInfos&&this.stdout.write(wk.end(e)),this.configuration.get("enableTimers")&&l>200?this.reportInfo(null,`\u2514 Completed in ${fr(this.configuration,l,Ht.DURATION)}`):this.reportInfo(null,"\u2514 Completed")},skipIfEmpty:o.skipIfEmpty}}startTimerSync(e,r,s){let l=this.startTimerImpl(e,r,s),{cb:o}=l,n=an(l,["cb"]);return this.startSectionSync(n,o)}async startTimerPromise(e,r,s){let l=this.startTimerImpl(e,r,s),{cb:o}=l,n=an(l,["cb"]);return this.startSectionPromise(n,o)}async startCacheReport(e){let r=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(s){throw this.reportExceptionOnce(s),s}finally{r!==n
|
|||
|
`),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:r}={}){this.forgettableLines=[],this.writeLine(e,{truncate:r})}writeLines(e,{truncate:r}={}){this.clearProgress({delta:e.length});for(let s of e)this.stdout.write(`${this.truncate(s,{truncate:r})}
|
|||
|
`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:r}){let s=this.cacheHitCount-e,o=this.cacheMissCount-r;if(s===0&&o===0)return;let n="";this.cacheHitCount>1?n+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(n+=`, one had to be fetched (${Wr(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(n+=` - one package had to be fetched (${Wr(this.configuration,this.lastCacheMiss)})`),this.reportInfo(ke.FETCH_NOT_CACHED,n)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let r of e)r.committed=!0,r.action()}clearProgress({delta:e=0,clear:r=!1}){this.progressStyle!==null&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||r)&&this.stdout.write("[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>qae&&(this.progressFrame=(this.progressFrame+1)%Hae.length,this.progressTime=e);let r=Hae[this.progressFrame];for(let s of this.progress.values()){let o="";if(typeof s.lastScaledSize!="undefined"){let f=this.progressStyle.chars[0].repeat(s.lastScaledSize),g=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-s.lastScaledSize);o=` ${f}${g}`}let n=this.formatName(null),l=n?`${n}: `:"",u=s.definition.title?` ${s.definition.title}`:"";this.stdout.write(`${fr(this.configuration,"\u27A4","blueBright")} ${l}${r}${o}${u}
|
|||
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},qae)}refreshProgress({delta:e=0,force:r=!1}={}){let s=!1,o=!1;if(r||this.progress.size===0)s=!0;else for(let n of this.progress.values()){let l=typeof n.definition.progress!="undefined"?Math.trunc(this.progressMaxScaledSize*n.definition.progress):void 0,u=n.lastScaledSize;n.lastScaledSize=l;let f=n.lastTitle;if(n.lastTitle=n.definition.title,l!==u||(o=f!==n.definition.title)){s=!0;break}}s&&(this.clearProgress({delta:e,clear:o}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.progressStyle===null&&(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,Kae.default)(e,0,this.stdout.columns-1)),e}formatName(e){return Gae(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return sO(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}}});var ni,oO=St(()=>{ni="4.0.0-rc.14"});var vn={};or(vn,{PackageManager:()=>Ra,detectPackageManager:()=>Jae,executePackageAccessibleBinary:()=>$ae,executePackageScript:()=>vk,executePackageShellcode:()=>AO,executeWorkspaceAccessibleBinary:()=>yst,executeWorkspaceLifecycleScript:()=>Zae,executeWorkspaceScript:()=>Xae,getPackageAccessibleBinaries:()=>Dk,getWorkspaceAccessibleBinaries:()=>zae,hasPackageScript:()=>hst,hasWorkspaceScript:()=>aO,makeScriptEnv:()=>fw,maybeExecuteWorkspaceLifecycleScript:()=>mst,prepareExternalProject:()=>pst});async function ug(t,e,r,s=[]){if(process.platform==="win32"){let o=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ge.writeFilePromise($.format({dir:t,name:e,ext:".cmd"}),o)}await ge.writeFilePromise($.join(t,e),`#!/bin/sh
|
|||
|
exec "${r}" ${s.map(o=>`'${o.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
|||
|
`,{mode:493})}async function Jae(t){let e=await Xt.tryFind(t);if(e==null?void 0:e.packageManager){let s=SD(e.packageManager);if(s==null?void 0:s.name){let o=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManager:Number(n)===1?Ra.Yarn1:Ra.Yarn2,reason:o};case"npm":return{packageManager:Ra.Npm,reason:o};case"pnpm":return{packageManager:Ra.Pnpm,reason:o}}}}let r;try{r=await ge.readFilePromise($.join(t,tn.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:Ra.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:Ra.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ge.existsSync($.join(t,"package-lock.json"))?{packageManager:Ra.Npm,reason:`found npm's "package-lock.json" lockfile`}:ge.existsSync($.join(t,"pnpm-lock.yaml"))?{packageManager:Ra.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function fw({project:t,locator:e,binFolder:r,lifecycleScript:s}){var f,g;let o={};for(let[C,w]of Object.entries(process.env))typeof w!="undefined"&&(o[C.toLowerCase()!=="path"?C:"PATH"]=w);let n=de.fromPortablePath(r);o.BERRY_BIN_FOLDER=de.fromPortablePath(n);let l=process.env.COREPACK_ROOT?de.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([ug(r,"node",process.execPath),...ni!==null?[ug(r,"run",process.execPath,[l,"run"]),ug(r,"yarn",process.execPath,[l]),ug(r,"yarnpkg",process.execPath,[l]),ug(r,"node-gyp",process.execPath,[l,"run","--top-level","node-gyp"])]:[]]),t&&(o.INIT_CWD=de.fromPortablePath(t.configuration.startingCwd),o.PROJECT_CWD=de.fromPortablePath(t.cwd)),o.PATH=o.PATH?`${n}${de.delimiter}${o.PATH}`:`${n}`,o.npm_execpath=`${n}${de.sep}yarn`,o.npm_node_execpath=`${n}${de.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let C=t.tryWorkspaceByLocator(e),w=C?(f=C.manifest.version)!=null?f:"":(g=t.storedPackages.get(e.locatorHash).version)!=null?g:"";o.npm_package_name=En(e),o.npm_package_version=w;let B;if(C)B=C.cwd;else{let S=t.storedPackages.get(e.locatorHash);if(!S)throw new Error(`Package for ${Wr(t.configuration,e)} not found in the project`);let y=t.configuration.getLinkers(),N={project:t,report:new Nt({stdout:new jp.PassThrough,configuration:t.configuration})},L=y.find(H=>H.supportsPackage(S,N));if(!L)throw new Error(`The package ${Wr(t.configuration,S)} isn't supported by any of the available linkers`);B=await L.findPackageLocation(S,N)}o.npm_package_json=de.fromPortablePath($.join(B,tn.manifest))}let u=ni!==null?`yarn/${ni}`:`yarn/${zm("@yarnpkg/core").version}-core`;return o.npm_config_user_agent=`${u} npm/? node/${process.version} ${process.platform} ${process.arch}`,s&&(o.npm_lifecycle_event=s),t&&await t.configuration.triggerHook(C=>C.setupScriptEnvironment,t,o,async(C,w,B)=>await ug(r,ss(C),w,B)),o}async function pst(t,e,{configuration:r,report:s,workspace:o=null,locator:n=null}){await gst(async()=>{await ge.mktempPromise(async l=>{let u=$.join(l,"pack.log"),f=null,{stdout:g,stderr:C}=r.getSubprocessStreams(u,{prefix:de.fromPortablePath(t),report:s}),w=n&&Qc(n)?TE(n):n,B=w?Tl(w):"an external project";g.write(`Packing ${B} from sources
|
|||
|
`);let S=await Jae(t),y;S!==null?(g.write(`Using ${S.packageManager} for bootstrap. Reason: ${S.reason}
|
|||
|
|
|||
|
`),y=S.packageManager):(g.write(`No package manager configuration detected; defaulting to Yarn
|
|||
|
|
|||
|
`),y=Ra.Yarn2),await ge.mktempPromise(async N=>{let L=await fw({binFolder:N}),G=new Map([[Ra.Yarn1,async()=>{let fe=o!==null?["workspace",o]:[],me=await Fu("yarn",["set","version","classic","--only-if-needed"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:GA.ErrorCode});if(me.code!==0)return me.code;await ge.appendFilePromise($.join(t,".npmignore"),`/.yarn
|
|||
|
`),g.write(`
|
|||
|
`),delete L.NODE_ENV;let ye=await Fu("yarn",["install"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:GA.ErrorCode});if(ye.code!==0)return ye.code;g.write(`
|
|||
|
`);let Se=await Fu("yarn",[...fe,"pack","--filename",de.fromPortablePath(e)],{cwd:t,env:L,stdin:f,stdout:g,stderr:C});return Se.code!==0?Se.code:0}],[Ra.Yarn2,async()=>{let fe=o!==null?["workspace",o]:[];L.YARN_ENABLE_INLINE_BUILDS="1";let me=$.join(t,tn.lockfile);await ge.existsPromise(me)||await ge.writeFilePromise(me,"");let ye=await Fu("yarn",[...fe,"pack","--install-if-needed","--filename",de.fromPortablePath(e)],{cwd:t,env:L,stdin:f,stdout:g,stderr:C});return ye.code!==0?ye.code:0}],[Ra.Npm,async()=>{if(o!==null){let p=new jp.PassThrough,Oe=Vm(p);p.pipe(g,{end:!1});let De=await Fu("npm",["--version"],{cwd:t,env:L,stdin:f,stdout:p,stderr:C,end:GA.Never});if(p.end(),De.code!==0)return g.end(),C.end(),De.code;let Ee=(await Oe).toString().trim();if(!Vh(Ee,">=7.x")){let ue=xu(null,"npm"),ne=Hn(ue,Ee),Be=Hn(ue,">=7.x");throw new Error(`Workspaces aren't supported by ${ri(r,ne)}; please upgrade to ${ri(r,Be)} (npm has been detected as the primary package manager for ${fr(r,t,Ht.PATH)})`)}}let fe=o!==null?["--workspace",o]:[];delete L.npm_config_user_agent,delete L.npm_config_production,delete L.NPM_CONFIG_PRODUCTION,delete L.NODE_ENV;let me=await Fu("npm",["install"],{cwd:t,env:L,stdin:f,stdout:g,stderr:C,end:GA.ErrorCode});if(me.code!==0)return me.code;let ye=new jp.PassThrough,Se=Vm(ye);ye.pipe(g);let Ce=await Fu("npm",["pack","--silent",...fe],{cwd:t,env:L,stdin:f,stdout:ye,stderr:C});if(Ce.code!==0)return Ce.code;let Pe=(await Se).toString().trim().replace(/^.*\n/s,""),Qe=$.resolve(t,de.toPortablePath(Pe));return await ge.renamePromise(Qe,e),0}]]).get(y);if(typeof G=="undefined")throw new Error("Assertion failed: Unsupported workflow");let te=await G();if(!(te===0||typeof te=="undefined"))throw ge.detachTemp(l),new gr(ke.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${te}, logs can be found here: ${fr(r,u,Ht.PATH)})`)})})})}async function hst(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return aO(s,e);let o=r.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${Wr(r.configuration,t)} not found in the project`);return await Dl.openPromise(async n=>{let l=r.configuration,u=r.configuration.getLinkers(),f={project:r,report:new Nt({stdout:new jp.PassThrough,configuration:l})},g=u.find(S=>S.supportsPackage(o,f));if(!g)throw new Error(`The package ${Wr(r.configuration,o)} isn't supported by any of the available linkers`);let C=await g.findPackageLocation(o,f),w=new xn(C,{baseFs:n});return(await Xt.find(bt.dot,{baseFs:w})).scripts.has(e)},{libzip:await Fa()})}async function vk(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u}){return await ge.mktempPromise(async f=>{let{manifest:g,env:C,cwd:w}=await Vae(t,{project:o,binFolder:f,cwd:s,lifecycleScript:e}),B=g.scripts.get(e);if(typeof B=="undefined")return 1;let S=async()=>await dk(B,r,{cwd:w,env:C,stdin:n,stdout:l,stderr:u});return await(await o.configuration.reduceHook(N=>N.wrapScriptExecution,S,o,t,e,{script:B,args:r,cwd:w,env:C,stdin:n,stdout:l,stderr:u}))()})}async function AO(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u}){return await ge.mktempPromise(async f=>{let{env:g,cwd:C}=await Vae(t,{project:o,binFolder:f,cwd:s});return await dk(e,r,{cwd:C,env:g,stdin:n,stdout:l,stderr:u})})}async function dst(t,{binFolder:e,cwd:r,lifecycleScript:s}){let o=await fw({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await Promise.all(Array.from(await zae(t),([n,[,l]])=>ug(e,ss(n),process.execPath,[l]))),typeof r=="undefined"&&(r=$.dirname(await ge.realpathPromise($.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:o,cwd:r}}async function Vae(t,{project:e,binFolder:r,cwd:s,lifecycleScript:o}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return dst(n,{binFolder:r,cwd:s,lifecycleScript:o});let l=e.storedPackages.get(t.locatorHash);if(!l)throw new Error(`Package for ${Wr(e.configuration,t)} not found in the project`);return await Dl.openPromise(async u=>{let f=e.configuration,g=e.configuration.getLinkers(),C={project:e,report:new Nt({stdout:new jp.PassThrough,configuration:f})},w
|
|||
|
`,{stdout:g,stderr:C}=o.getSubprocessStreams(u,{report:s,prefix:Wr(o,t.anchoredLocator),header:f});s.reportInfo(ke.LIFECYCLE_SCRIPT,`Calling the "${e}" lifecycle script`);let w=await Xae(t,e,[],{cwd:r,stdin:n,stdout:g,stderr:C});if(g.end(),C.end(),w!==0)throw ge.detachTemp(l),new gr(ke.LIFECYCLE_SCRIPT,`${(0,Yae.default)(e)} script failed (exit code ${fr(o,w,Ht.NUMBER)}, logs can be found here: ${fr(o,u,Ht.PATH)}); run ${fr(o,`yarn ${e}`,Ht.CODE)} to investigate`)})}async function mst(t,e,r){aO(t,e)&&await Zae(t,e,r)}async function Dk(t,{project:e}){let r=e.configuration,s=new Map,o=e.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${Wr(r,t)} not found in the project`);let n=new jp.Writable,l=r.getLinkers(),u={project:e,report:new Nt({configuration:r,stdout:n})},f=new Set([t.locatorHash]);for(let C of o.dependencies.values()){let w=e.storedResolutions.get(C.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${ri(r,C)}) should have been registered`);f.add(w)}let g=await Promise.all(Array.from(f,async C=>{let w=e.storedPackages.get(C);if(!w)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(w.bin.size===0)return Qu.skip;let B=l.find(y=>y.supportsPackage(w,u));if(!B)return Qu.skip;let S=null;try{S=await B.findPackageLocation(w,u)}catch(y){if(y.code==="LOCATOR_NOT_INSTALLED")return Qu.skip;throw y}return{dependency:w,packageLocation:S}}));for(let C of g){if(C===Qu.skip)continue;let{dependency:w,packageLocation:B}=C;for(let[S,y]of w.bin)s.set(S,[w,de.fromPortablePath($.resolve(B,y))])}return s}async function zae(t){return await Dk(t.anchoredLocator,{project:t.project})}async function $ae(t,e,r,{cwd:s,project:o,stdin:n,stdout:l,stderr:u,nodeArgs:f=[],packageAccessibleBinaries:g}){g!=null||(g=await Dk(t,{project:o}));let C=g.get(e);if(!C)throw new Error(`Binary not found (${e}) for ${Wr(o.configuration,t)}`);return await ge.mktempPromise(async w=>{let[,B]=C,S=await fw({project:o,locator:t,binFolder:w});await Promise.all(Array.from(g,([N,[,L]])=>ug(S.BERRY_BIN_FOLDER,ss(N),process.execPath,[L])));let y;try{y=await Fu(process.execPath,[...f,B,...r],{cwd:s,env:S,stdin:n,stdout:l,stderr:u})}finally{await ge.removePromise(S.BERRY_BIN_FOLDER)}return y.code})}async function yst(t,e,r,{cwd:s,stdin:o,stdout:n,stderr:l,packageAccessibleBinaries:u}){return await $ae(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:o,stdout:n,stderr:l,packageAccessibleBinaries:u})}var Yae,Wae,jp,Ra,fst,gst,lO=St(()=>{Kt();Kt();lg();mk();Yae=He(iO()),Wae=He(Eh()),jp=He(require("stream"));ay();oA();Ml();Qk();oO();wM();Bc();qA();Np();wo();(function(o){o.Yarn1="Yarn Classic",o.Yarn2="Yarn",o.Npm="npm",o.Pnpm="pnpm"})(Ra||(Ra={}));fst=2,gst=(0,Wae.default)(fst)});var wy=K(($Mt,eAe)=>{"use strict";var tAe=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]),ZMt=eAe.exports=t=>t?Object.keys(t).map(e=>[tAe.has(e)?tAe.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var By=K((eLt,rAe)=>{"use strict";var Cst=require("events"),nAe=require("stream"),gw=GI(),iAe=require("string_decoder").StringDecoder,fg=Symbol("EOF"),pw=Symbol("maybeEmitEnd"),Gp=Symbol("emittedEnd"),kk=Symbol("emittingEnd"),Sk=Symbol("closed"),sAe=Symbol("read"),cO=Symbol("flush"),oAe=Symbol("flushChunk"),fA=Symbol("encoding"),gg=Symbol("decoder"),xk=Symbol("flowing"),hw=Symbol("paused"),dw=Symbol("resume"),Ta=Symbol("bufferLength"),aAe=Symbol("bufferPush"),uO=Symbol("bufferShift"),ra=Symbol("objectMode"),na=Symbol("destroyed"),AAe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Ist=AAe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Est=AAe&&Symbol.iterator||Symbol("iterator not implemented"),lAe=t=>t==="end"||t==="finish"||t==="prefinish",wst=t=>t ins
|
|||
|
`,o=Buffer.byteLength(s),n=Math.floor(Math.log(o)/Math.log(10))+1;return o+n>=Math.pow(10,n)&&(n+=1),n+o+s}};Fk.parse=(t,e,r)=>new Fk(qst(jst(t),e),r);var qst=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,jst=t=>t.replace(/\n$/,"").split(`
|
|||
|
`).reduce(Gst,Object.create(null)),Gst=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let s=e.split("="),o=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!o)return t;let n=s.join("=");return t[o]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(o)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};FAe.exports=Fk});var Tk=K((gLt,RAe)=>{"use strict";RAe.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit("warn",s.tarCode,r,s)):r instanceof Error?this.emit("error",Object.assign(r,s)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),s))}}});var SO=K((pLt,TAe)=>{"use strict";var Nk=["|","<",">","?",":"],kO=Nk.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Yst=new Map(Nk.map((t,e)=>[t,kO[e]])),Wst=new Map(kO.map((t,e)=>[t,Nk[e]]));TAe.exports={encode:t=>Nk.reduce((e,r)=>e.split(r).join(Yst.get(r)),t),decode:t=>kO.reduce((e,r)=>e.split(r).join(Wst.get(r)),t)}});var MAe=K((hLt,NAe)=>{"use strict";NAe.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&~18),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var NO=K((ILt,LAe)=>{"use strict";var OAe=By(),UAe=Rk(),_Ae=Dy(),dLt=Iw(),Nu=require("fs"),ky=require("path"),mLt=Cw(),Jst=16*1024*1024,KAe=Symbol("process"),HAe=Symbol("file"),qAe=Symbol("directory"),xO=Symbol("symlink"),jAe=Symbol("hardlink"),Ew=Symbol("header"),Mk=Symbol("read"),bO=Symbol("lstat"),Lk=Symbol("onlstat"),PO=Symbol("onread"),FO=Symbol("onreadlink"),RO=Symbol("openfile"),TO=Symbol("onopenfile"),id=Symbol("close"),Ok=Symbol("mode"),GAe=Tk(),Vst=SO(),YAe=MAe(),Uk=GAe(class extends OAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=e,this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Jst,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=r.cwd||process.cwd(),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths&&ky.win32.isAbsolute(e)){let o=ky.win32.parse(e);this.path=e.substr(o.root.length),s=o.root}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Vst.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=r.absolute||ky.resolve(this.cwd,e),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[Lk](this.statCache.get(this.absolute)):this[bO]()}[bO](){Nu.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Lk](r)})}[Lk](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=zst(e),this.emit("stat",e),this[KAe]()}[KAe](){switch(this.type){case"File":return this[HAe]();case"Directory":return this[qAe]();case"SymbolicLink":return this[xO]();default:return this.end()}}[Ok](e){return YAe(e,this.type==="Directory",this.portable)}[Ew](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new _Ae({path:this.path,linkpath:this.linkpath,mode:this[Ok](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&this.write(new UAe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:th
|
|||
|
`}),u},s})});var VA={};or(VA,{emitList:()=>Pat,emitTree:()=>rue,treeNodeToJson:()=>tue,treeNodeToTreeify:()=>eue});function eue(t,{configuration:e}){let r={},s=(o,n)=>{let l=Array.isArray(o)?o.entries():Object.entries(o);for(let[u,{label:f,value:g,children:C}]of l){let w=[];typeof f!="undefined"&&w.push(Xv(e,f,Lh.BOLD)),typeof g!="undefined"&&w.push(fr(e,g[0],g[1])),w.length===0&&w.push(Xv(e,`${u}`,Lh.BOLD));let B=w.join(": "),S=n[B]={};typeof C!="undefined"&&s(C,S)}};if(typeof t.children=="undefined")throw new Error("The root node must only contain children");return s(t.children,r),r}function tue(t){let e=r=>{var n;if(typeof r.children=="undefined"){if(typeof r.value=="undefined")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Oh(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries((n=r.children)!=null?n:{}),o=Array.isArray(r.children)?[]:{};for(let[l,u]of s)o[l]=e(u);return typeof r.value=="undefined"?o:{value:Oh(r.value[0],r.value[1]),children:o}};return e(t)}function Pat(t,{configuration:e,stdout:r,json:s}){let o=t.map(n=>({value:n}));rue({children:o},{configuration:e,stdout:r,json:s})}function rue(t,{configuration:e,stdout:r,json:s,separators:o=0}){var l;if(s){let u=Array.isArray(t.children)?t.children.values():Object.values((l=t.children)!=null?l:{});for(let f of u)r.write(`${JSON.stringify(tue(f))}
|
|||
|
`);return}let n=(0,$ce.asTree)(eue(t,{configuration:e}),!1,!1);if(o>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
|||
|
$1`).replace(/^│\n/,"")),o>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
|
|||
|
$2`).replace(/^│\n/,"");if(o>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}var $ce,nue=St(()=>{$ce=He(Zce());Bc()});function D4(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function Rat(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var iue,v4,Fat,$r,sue=St(()=>{Kt();Kt();lg();iue=He(require("crypto")),v4=He(require("fs"));oA();Ml();Gh();qA();wo();Fat=9,$r=class{constructor(e,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:o=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,iue.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=o;let n=r.get("cacheKeyOverride");if(n!==null)this.cacheKey=`${n}`;else{let l=r.get("compressionLevel"),u=l!==ih?`c${l}`:"";this.cacheKey=[Fat,u].join("")}}static async find(e,{immutable:r,check:s}={}){let o=new $r(e.get("cacheFolder"),{configuration:e,immutable:r,check:s});return await o.setup(),o}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${iy(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let o=Rat(r).slice(0,10);return`${iy(e)}-${o}.zip`}getLocatorPath(e,r,s={}){var n;return this.mirrorCwd===null||((n=s.unstablePackages)==null?void 0:n.has(e.locatorHash))?$.resolve(this.cwd,this.getVersionFilename(e)):r===null||D4(r)!==this.cacheKey?null:$.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?$.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ge.existsPromise(this.cwd))throw new gr(ke.IMMUTABLE_CACHE,"Cache path does not exist.")}else{await ge.mkdirPromise(this.cwd,{recursive:!0});let e=$.resolve(this.cwd,".gitignore");await ge.changeFilePromise(e,`/.gitignore
|
|||
|
*.flock
|
|||
|
*.tmp
|
|||
|
`)}(this.mirrorCwd||!this.immutable)&&await ge.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,u){var f=u,{onHit:s,onMiss:o,loader:n}=f,l=an(f,["onHit","onMiss","loader"]);var p;let g=this.getLocatorMirrorPath(e),C=new fi,w=()=>{let Oe=new Ns(null,{libzip:me}),De=$.join(bt.root,zN(e));return Oe.mkdirSync(De,{recursive:!0}),Oe.writeJsonSync($.join(De,tn.manifest),{name:En(e),mocked:!0}),Oe},B=async(Oe,De=null)=>{var ue;if(De===null&&((ue=l.unstablePackages)==null?void 0:ue.has(e.locatorHash)))return null;let Ee=!l.skipIntegrityCheck||!r?`${this.cacheKey}/${await QD(Oe)}`:r;if(De!==null){let ne=!l.skipIntegrityCheck||!r?`${this.cacheKey}/${await QD(De)}`:r;if(Ee!==ne)throw new gr(ke.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&Ee!==r){let ne;switch(this.check?ne="throw":D4(r)!==D4(Ee)?ne="update":ne=this.configuration.get("checksumBehavior"),ne){case"ignore":return r;case"update":return Ee;default:case"throw":throw new gr(ke.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return Ee},S=async Oe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Wr(this.configuration,e)}`);let De=await n(),Ee=De.getRealPath();return De.saveAndClose(),await ge.chmodPromise(Ee,420),await B(Oe,Ee)},y=async()=>{if(g===null||!await ge.existsPromise(g)){let Oe=await n(),De=Oe.getRealPath();return Oe.saveAndClose(),{source:"loader",path:De}}return{source:"mirror",path:g}},N=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Wr(this.configuration,e)}`);if(this.immutable)throw new gr(ke.IMMUTABLE_CACHE,`Cache entry required but missing for ${Wr(this.configuration,e)}`);let{path:Oe,source:De}=await y(),Ee=await B(Oe),ue=this.getLocatorPath(e,Ee,l);if(!ue)throw new Error("Assertion failed: Expected the cache path to be available");let ne=[];De!=="mirror"&&g!==null&&ne.push(async()=>{let Ne=`${g}${this.cacheId}`;await ge.copyFilePromise(Oe,Ne,v4.default.constants.COPYFILE_FICLONE),await ge.chmodPromise(Ne,420),await ge.renamePromise(Ne,g)}),(!l.mirrorWriteOnly||g===null)&&ne.push(async()=>{let Ne=`${ue}${this.cacheId}`;await ge.copyFilePromise(Oe,Ne,v4.default.constants.COPYFILE_FICLONE),await ge.chmodPromise(Ne,420),await ge.renamePromise(Ne,ue)});let Be=l.mirrorWriteOnly&&g!=null?g:ue;return await Promise.all(ne.map(Ne=>Ne())),[!1,Be,Ee]},L=async()=>{let De=(async()=>{var Bt;let Ee=this.getLocatorPath(e,r,l),ue=Ee!==null?this.markedFiles.has(Ee)||await C.existsPromise(Ee):!1,ne=!!((Bt=l.mockedPackages)==null?void 0:Bt.has(e.locatorHash))&&(!this.check||!ue),Be=ne||ue,Ne=Be?s:o;if(Ne&&Ne(),Be){let _=null,Ye=Ee;return ne||(_=this.check?await S(Ye):await B(Ye)),[ne,Ye,_]}else return N()})();this.mutexes.set(e.locatorHash,De);try{return await De}finally{this.mutexes.delete(e.locatorHash)}};for(let Oe;Oe=this.mutexes.get(e.locatorHash);)await Oe;let[H,G,te]=await L();H||this.markedFiles.add(G);let fe,me=await Fa(),ye=H?()=>w():()=>new Ns(G,{baseFs:C,libzip:me,readOnly:!0}),Se=new yI(()=>ST(()=>fe=ye(),Oe=>`Failed to open the cache entry for ${Wr(this.configuration,e)}: ${Oe}`),$),Ce=new Kf(G,{baseFs:Se,pathUtils:$}),Pe=()=>{fe==null||fe.discardAndClose()},Qe=((p=l.unstablePackages)==null?void 0:p.has(e.locatorHash))?null:te;return[Ce,Pe,Qe]}}});var zA,k4=St(()=>{(function(r){r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE"})(zA||(zA={}))});var yg,oue=St(()=>{Ml();Qk();Bc();yg=class extends $o{constructor({configuration:e,stdout:r,suggestInstall:s=!0}){super();this.errorCount=0;kE(this,{configuration:e}),this.configuration=e,this.stdout=r,this.suggestInstall=s}static async start(e,r){let s=new this(e);try{await r(s)}catch(o){s.reportExceptionOnce(o)}finally{await s.finalize()}return s}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r=="function"?r:s)()}async startTimerPro
|
|||
|
`)}reportProgress(e){let r=Promise.resolve().then(async()=>{for await(let{}of e);}),s=()=>{};return Te(re({},r),{stop:s})}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
|||
|
`),this.stdout.write(`${fr(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
|||
|
`),this.suggestInstall&&this.stdout.write(`${fr(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
|||
|
`))}formatNameWithHyperlink(e){return sO(e,{configuration:this.configuration,json:!1})}}});function Cg(){}function Tat(t,e,r,s,o){for(var n=0,l=e.length,u=0,f=0;n<l;n++){var g=e[n];if(g.removed){if(g.value=t.join(s.slice(f,f+g.count)),f+=g.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!g.added&&o){var C=r.slice(u,u+g.count);C=C.map(function(S,y){var N=s[f+y];return N.length>S.length?N:S}),g.value=t.join(C)}else g.value=t.join(r.slice(u,u+g.count));u+=g.count,g.added||(f+=g.count)}}var B=e[l-1];return l>1&&typeof B.value=="string"&&(B.added||B.removed)&&t.equals("",B.value)&&(e[l-2].value+=B.value,e.pop()),e}function Nat(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Mat(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function lue(t,e,r){return r=Mat(r,{ignoreWhitespace:!0}),S4.diff(t,e,r)}function Lat(t,e,r){return x4.diff(t,e,r)}function hS(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hS=function(e){return typeof e}:hS=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hS(t)}function b4(t){return _at(t)||Kat(t)||Hat(t)||qat()}function _at(t){if(Array.isArray(t))return P4(t)}function Kat(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function Hat(t,e){if(!!t){if(typeof t=="string")return P4(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P4(t,e)}}function P4(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function qat(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F4(t,e,r,s,o){e=e||[],r=r||[],s&&(t=s(o,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var l;if(jat.call(t)==="[object Array]"){for(e.push(t),l=new Array(t.length),r.push(l),n=0;n<t.length;n+=1)l[n]=F4(t[n],e,r,s,o);return e.pop(),r.pop(),l}if(t&&t.toJSON&&(t=t.toJSON()),hS(t)==="object"&&t!==null){e.push(t),l={},r.push(l);var u=[],f;for(f in t)t.hasOwnProperty(f)&&u.push(f);for(u.sort(),n=0;n<u.length;n+=1)f=u[n],l[f]=F4(t[f],e,r,s,f);e.pop(),r.pop()}else l=t;return l}function cue(t,e,r,s,o,n,l){l||(l={}),typeof l.context=="undefined"&&(l.context=4);var u=Lat(r,s,l);if(!u)return;u.push({value:"",lines:[]});function f(H){return H.map(function(G){return" "+G})}for(var g=[],C=0,w=0,B=[],S=1,y=1,N=function(G){var te=u[G],fe=te.lines||te.value.replace(/\n$/,"").split(`
|
|||
|
`);if(te.lines=fe,te.added||te.removed){var me;if(!C){var ye=u[G-1];C=S,w=y,ye&&(B=l.context>0?f(ye.lines.slice(-l.context)):[],C-=B.length,w-=B.length)}(me=B).push.apply(me,b4(fe.map(function(Ee){return(te.added?"+":"-")+Ee}))),te.added?y+=fe.length:S+=fe.length}else{if(C)if(fe.length<=l.context*2&&G<u.length-2){var Se;(Se=B).push.apply(Se,b4(f(fe)))}else{var Ce,Pe=Math.min(fe.length,l.context);(Ce=B).push.apply(Ce,b4(f(fe.slice(0,Pe))));var Qe={oldStart:C,oldLines:S-C+Pe,newStart:w,newLines:y-w+Pe,lines:B};if(G>=u.length-2&&fe.length<=l.context){var p=/\n$/.test(r),Oe=/\n$/.test(s),De=fe.length==0&&B.length>Qe.oldLines;!p&&De&&r.length>0&&B.splice(Qe.oldLines,0,"\\ No newline at end of file"),(!p&&!De||!Oe)&&B.push("\\ No newline at end of file")}g.push(Qe),C=0,w=0,B=[]}S+=fe.length,y+=fe.length}},L=0;L<u.length;L++)N(L);return{oldFileName:t,newFileName:e,oldHeader:o,newHeader:n,hunks:g}}var TOt,aue,Aue,S4,x4,Oat,Uat,jat,Pw,R4,T4=St(()=>{Cg.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=s.callback;typeof s=="function"&&(o=s,s={}),this.options=s;var n=this;function l(N){return o?(setTimeout(function(){o(void 0,N)},0),!0):N}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var u=r.length,f=e.length,g=1,C=u+f;s.maxEditLength&&(C=Math.min(C,s.maxEditLength));var w=[{newPos:-1,components:[]}],B=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=u&&B+1>=f)return l([{value:this.join(r),count:r.length}]);function S(){for(var N=-1*g;N<=g;N+=2){var L=void 0,H=w[N-1],G=w[N+1],te=(G?G.newPos:0)-N;H&&(w[N-1]=void 0);var fe=H&&H.newPos+1<u,me=G&&0<=te&&te<f;if(!fe&&!me){w[N]=void 0;continue}if(!fe||me&&H.newPos<G.newPos?(L=Nat(G),n.pushComponent(L.components,void 0,!0)):(L=H,L.newPos++,n.pushComponent(L.components,!0,void 0)),te=n.extractCommon(L,r,e,N),L.newPos+1>=u&&te+1>=f)return l(Tat(n,L.components,r,e,n.useLongestToken));w[N]=L}g++}if(o)(function N(){setTimeout(function(){if(g>C)return o();S()||N()},0)})();else for(;g<=C;){var y=S();if(y)return y}},pushComponent:function(e,r,s){var o=e[e.length-1];o&&o.added===r&&o.removed===s?e[e.length-1]={count:o.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,o){for(var n=r.length,l=s.length,u=e.newPos,f=u-o,g=0;u+1<n&&f+1<l&&this.equals(r[u+1],s[f+1]);)u++,f++,g++;return g&&e.components.push({count:g}),e.newPos=u,f},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};TOt=new Cg;aue=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Aue=/\S/,S4=new Cg;S4.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Aue.test(t)&&!Aue.test(e)};S4.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&aue.test(e[r])&&aue.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};x4=new Cg;x4.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var o=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),e.push(o))}return e};Oat=new Cg;Oat.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};Uat=new Cg;Uat.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};jat=Object.prototype.toString,Pw=new Cg;Pw.useLongestToken=!0;Pw.tokenize=x4.tokenize;Pw.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,o=s===void 0?function(n,l){return typeof l=="undefined"?r:l}:s;return typeof t=="string"?t:JSON.stringify(F4(t,null,null,o),o," ")};Pw.equals=function(t,e){return Cg.prototype.equals.call(Pw,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};R4=new Cg;R4.tokenize=function(t){r
|
|||
|
`;await ge.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function ilt({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:o=new Set,optionalBuilds:n=new Set,peerRequirements:l=new Map,volatileDescriptors:u=new Set,report:f,tolerateMissingPackages:g=!1}){var Pe;let C=new Map,w=[],B=new Map,S=new Map,y=new Map,N=new Map,L=new Map,H=new Map(t.workspaces.map(Qe=>{let p=Qe.anchoredLocator.locatorHash,Oe=s.get(p);if(typeof Oe=="undefined"){if(g)return[p,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[p,FE(Oe)]})),G=()=>{let Qe=ge.mktempSync(),p=$.join(Qe,"stacktrace.log"),Oe=String(w.length+1).length,De=w.map((Ee,ue)=>`${`${ue+1}.`.padStart(Oe," ")} ${Tl(Ee)}
|
|||
|
`).join("");throw ge.writeFileSync(p,De),ge.detachTemp(Qe),new gr(ke.STACK_OVERFLOW_RESOLUTION,`Encountered a stack overflow when resolving peer dependencies; cf ${de.fromPortablePath(p)}`)},te=Qe=>{let p=r.get(Qe.descriptorHash);if(typeof p=="undefined")throw new Error("Assertion failed: The resolution should have been registered");let Oe=s.get(p);if(!Oe)throw new Error("Assertion failed: The package could not be found");return Oe},fe=(Qe,p,Oe,{top:De,optional:Ee})=>{w.length>1e3&&G(),w.push(p);let ue=me(Qe,p,Oe,{top:De,optional:Ee});return w.pop(),ue},me=(Qe,p,Oe,{top:De,optional:Ee})=>{if(o.has(p.locatorHash))return;o.add(p.locatorHash),Ee||n.delete(p.locatorHash);let ue=s.get(p.locatorHash);if(!ue){if(g)return;throw new Error(`Assertion failed: The package (${Wr(t.configuration,p)}) should have been registered`)}let ne=[],Be=[],Ne=[],Bt=[],_=[];for(let rt of Array.from(ue.dependencies.values())){if(ue.peerDependencies.has(rt.identHash)&&ue.locatorHash!==De)continue;if(rg(rt))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");u.delete(rt.descriptorHash);let We=Ee;if(!We){let I=ue.dependenciesMeta.get(En(rt));if(typeof I!="undefined"){let D=I.get(null);typeof D!="undefined"&&D.optional&&(We=!0)}}let Re=r.get(rt.descriptorHash);if(!Re){if(g)continue;throw new Error(`Assertion failed: The resolution (${ri(t.configuration,rt)}) should have been registered`)}let yt=H.get(Re)||s.get(Re);if(!yt)throw new Error(`Assertion failed: The package (${Re}, resolved from ${ri(t.configuration,rt)}) should have been registered`);if(yt.peerDependencies.size===0){fe(rt,yt,new Map,{top:De,optional:We});continue}let nt,Ze,$e=new Set,k;Be.push(()=>{nt=YN(rt,p.locatorHash),Ze=WN(yt,p.locatorHash),ue.dependencies.delete(rt.identHash),ue.dependencies.set(nt.identHash,nt),r.set(nt.descriptorHash,Ze.locatorHash),e.set(nt.descriptorHash,nt),s.set(Ze.locatorHash,Ze),ne.push([yt,nt,Ze])}),Ne.push(()=>{var I;k=new Map;for(let D of Ze.peerDependencies.values()){let m=ue.dependencies.get(D.identHash);if(!m&&NE(p,D)&&(Qe.identHash===p.identHash?m=Qe:(m=Hn(p,Qe.range),e.set(m.descriptorHash,m),r.set(m.descriptorHash,p.locatorHash),u.delete(m.descriptorHash))),(!m||m.range==="missing:")&&Ze.dependencies.has(D.identHash)){Ze.peerDependencies.delete(D.identHash);continue}m||(m=Hn(D,"missing:")),Ze.dependencies.set(m.identHash,m),rg(m)&&Th(y,m.descriptorHash).add(Ze.locatorHash),B.set(m.identHash,m),m.range==="missing:"&&$e.add(m.identHash),k.set(D.identHash,(I=Oe.get(D.identHash))!=null?I:Ze.locatorHash)}Ze.dependencies=new Map(AA(Ze.dependencies,([D,m])=>En(m)))}),Bt.push(()=>{if(!s.has(Ze.locatorHash))return;let I=C.get(yt.locatorHash);typeof I=="number"&&I>=2&&G();let D=C.get(yt.locatorHash),m=typeof D!="undefined"?D+1:1;C.set(yt.locatorHash,m),fe(nt,Ze,k,{top:De,optional:We}),C.set(yt.locatorHash,m-1)}),_.push(()=>{let I=ue.dependencies.get(rt.identHash);if(typeof I=="undefined")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let D=r.get(I.descriptorHash);if(typeof D=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");if(Th(L,D).add(p.locatorHash),!!s.has(Ze.locatorHash)){for(let m of Ze.peerDependencies.values()){let F=k.get(m.identHash);if(typeof F=="undefined")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Ym(Wm(N,F),En(m)).push(Ze.locatorHash)}for(let m of $e)Ze.dependencies.delete(m)}})}for(let rt of[...Be,...Ne])rt();let Ye;do{Ye=!0;for(let[rt,We,Re]of ne){let yt=Wm(S,rt.locatorHash),nt=xa(...[...Re.dependencies.values()].map(I=>{let D=I.range!=="missing:"?r.get(I.descriptorHash):"missing:";if(typeof D=="undefined")throw new Error(`Assertion failed: Expected the resolution for ${ri(t.configuration,I)} to have been registered`);return D===De?`${D} (top)`:D}),We.identHash),Ze=yt.get(nt);if(typeof Ze=="undefined"){yt.set(nt,We);continue}if(Ze===We)continue;s.delete(Re.locatorHash),e.delete(We.descriptorHash),r.delete(We.descriptorHash),o.delete(Re.locatorHash)
|
|||
|
|
|||
|
${[w,B,S].join(`
|
|||
|
`)}`)}async setupResolutions(){var s;this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=$.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(ge.existsSync(e)){let o=await ge.readFilePromise(e,"utf8");this.lockFileChecksum=efe(o);let n=as(o);if(n.__metadata){let l=n.__metadata.version,u=n.__metadata.cacheKey;this.lockfileNeedsRefresh=l<Zue;for(let f of Object.keys(n)){if(f==="__metadata")continue;let g=n[f];if(typeof g.resolution=="undefined")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let C=Yh(g.resolution,!0),w=new Xt;w.load(g,{yamlCompatibilityMode:!0});let B=w.version,S=w.languageName||r,y=g.linkType.toUpperCase(),N=(s=g.conditions)!=null?s:null,L=w.dependencies,H=w.peerDependencies,G=w.dependenciesMeta,te=w.peerDependenciesMeta,fe=w.bin;if(g.checksum!=null){let ye=typeof u!="undefined"&&!g.checksum.includes("/")?`${u}/${g.checksum}`:g.checksum;this.storedChecksums.set(C.locatorHash,ye)}let me=Te(re({},C),{version:B,languageName:S,linkType:y,conditions:N,dependencies:L,peerDependencies:H,dependenciesMeta:G,peerDependenciesMeta:te,bin:fe});this.originalPackages.set(me.locatorHash,me);for(let ye of f.split(elt)){let Se=Tp(ye);l<=6&&(Se=this.configuration.normalizeDependency(Se),Se=Hn(Se,Se.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(Se.descriptorHash,Se),this.storedResolutions.set(Se.descriptorHash,C.locatorHash)}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){let r=e;e=[];for(let s of r){if(this.workspacesByCwd.has(s))continue;let o=await this.addWorkspace(s),n=this.storedPackages.get(o.anchoredLocator.locatorHash);n&&(o.dependencies=n.dependencies);for(let l of o.workspacesCwds)e.push(l)}}}async addWorkspace(e){let r=new Rw(e,{project:this});await r.setup();let s=this.workspacesByIdent.get(r.locator.identHash);if(typeof s!="undefined")throw new Error(`Duplicate workspace name ${Os(this.configuration,r.locator)}: ${de.fromPortablePath(e)} conflicts with ${de.fromPortablePath(s.cwd)}`);return this.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){$.isAbsolute(e)||(e=$.resolve(this.cwd,e)),e=$.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)$.relative(s.cwd,e).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r=="undefined"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Os(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){let r=this.tryWorkspaceByIdent(e);return r===null||(rg(e)&&(e=RE(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ri(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Qc(e)&&(e=TE(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Wr(this.configuration,e)})`);return r}refreshWorkspaceDependencies(){for(let e of this.workspaces){let r=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!r)throw new Error(`Assertion failed: Expected workspace ${UE(this.configuration,e)} (${fr(this.configuration,$.join(e.cwd,tn.manifest),Ht.PATH)}) to
|
|||
|
`;switch(rt){case zA.SCRIPT:Re+=`# Script name: ${We}
|
|||
|
`;break;case zA.SHELLCODE:Re+=`# Script code: ${We}
|
|||
|
`;break}let yt=null;if(!await ge.mktempPromise(async Ze=>{let $e=$.join(Ze,"build.log"),{stdout:k,stderr:I}=this.configuration.getSubprocessStreams($e,{header:Re,prefix:Wr(this.configuration,Be),report:r}),D;try{switch(rt){case zA.SCRIPT:D=await vk(Be,We,[],{cwd:Ye,project:this,stdin:yt,stdout:k,stderr:I});break;case zA.SHELLCODE:D=await AO(Be,We,[],{cwd:Ye,project:this,stdin:yt,stdout:k,stderr:I});break}}catch(F){I.write(F.stack),D=1}if(k.end(),I.end(),D===0)return Pe.set(Be.locatorHash,_),!0;ge.detachTemp(Ze);let m=`${Wr(this.configuration,Be)} couldn't be built successfully (exit code ${fr(this.configuration,D,Ht.NUMBER)}, logs can be found here: ${fr(this.configuration,$e,Ht.PATH)})`;return this.optionalBuilds.has(Be.locatorHash)?(r.reportInfo(ke.BUILD_FAILED,m),Pe.set(Be.locatorHash,_),!0):(r.reportError(ke.BUILD_FAILED,m),!1)}))return}})())}}if(await Ic(ue),Ee===te.size){let ne=Array.from(te).map(Be=>{let Ne=this.storedPackages.get(Be);if(!Ne)throw new Error("Assertion failed: The package should have been registered");return Wr(this.configuration,Ne)}).join(", ");r.reportError(ke.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ne})`);break}}this.storedBuildState=Pe}async install(e){var u,f;let r=this.configuration.get("nodeLinker");(u=st.telemetry)==null||u.reportInstall(r),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(g=>g.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let g of this.configuration.packageExtensions.values())for(let[,C]of g)for(let w of C)w.status=Zo.Inactive;let s=$.join(this.cwd,this.configuration.get("lockfileFilename")),o=null;if(e.immutable)try{o=await ge.readFilePromise(s,"utf8")}catch(g){throw g.code==="ENOENT"?new gr(ke.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):g}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,g]of this.configuration.packageExtensions)for(let[,C]of g)for(let w of C)if(w.userProvided){let B=fr(this.configuration,w,Ht.PACKAGE_EXTENSION);switch(w.status){case Zo.Inactive:e.report.reportWarning(ke.UNUSED_PACKAGE_EXTENSION,`${B}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case Zo.Redundant:e.report.reportWarning(ke.REDUNDANT_PACKAGE_EXTENSION,`${B}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(o!==null){let g=eh(o,this.generateLockfile());if(g!==o){let C=cue(s,s,o,g,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let w of C.hunks){e.report.reportInfo(null,`@@ -${w.oldStart},${w.oldLines} +${w.newStart},${w.newLines} @@`);for(let B of w.lines)B.startsWith("+")?e.report.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,fr(this.configuration,B,Ht.ADDED)):B.startsWith("-")?e.report.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,fr(this.configuration,B,Ht.REMOVED)):e.report.reportInfo(null,fr(this.configuration,B,"grey"))}e.report.reportSeparator()}throw new gr(ke.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let g of this.configuration.packageExtensions.values())for(let[,C]of g)for(let w of C)w.userProvided&&w.status===Zo.Active&&((f=st.telemetry)==null||f.reportPackageExtension(Oh(w,Ht.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject=="undefined"||e.persistProject)&&e.mode!==Ks.UpdateLockfile&&await this.cacheCleanup(e)});let n=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],l=await Promise.all(n.map(async g=>vD(g,{cwd:this.cwd})));(typeof e.persistProject=="undefined"||e.persistProject
|
|||
|
`,`# Manual changes might be lost - proceed with caution!
|
|||
|
`].join("")}
|
|||
|
`+iA(r)}async persistLockfile(){let e=$.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await ge.readFilePromise(e,"utf8")}catch(n){}let s=this.generateLockfile(),o=eh(r,s);o!==r&&(await ge.writeFilePromise(e,o),this.lockFileChecksum=efe(o),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let l of Object.values(W4))e.push(...l);let r=(0,yS.default)(this,e),s=G4.default.serialize(r),o=xa(s);if(this.installStateChecksum===o)return;let n=this.configuration.get("installStatePath");await ge.mkdirPromise($.dirname(n),{recursive:!0}),await ge.writeFilePromise(n,await rlt(s)),this.installStateChecksum=o}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let o=this.configuration.get("installStatePath"),n;try{let l=await nlt(await ge.readFilePromise(o));n=G4.default.deserialize(l),this.installStateChecksum=xa(l)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData!="undefined"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,(0,yS.default)(n,W4.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,yS.default)(n,W4.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new cs}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return;let s=new Set([".gitignore"]);if(!aM(e.cwd,this.cwd)||!await ge.existsPromise(e.cwd))return;let o=this.configuration.get("preferAggregateCacheInfo"),n=0,l=null;for(let u of await ge.readdirPromise(e.cwd)){if(s.has(u))continue;let f=$.resolve(e.cwd,u);e.markedFiles.has(f)||(l=u,e.immutable?r.reportError(ke.IMMUTABLE_CACHE,`${fr(this.configuration,$.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(o?n+=1:r.reportInfo(ke.UNUSED_CACHE_ENTRY,`${fr(this.configuration,$.basename(f),"magenta")} appears to be unused - removing`),await ge.removePromise(f)))}o&&n!==0&&r.reportInfo(ke.UNUSED_CACHE_ENTRY,n>1?`${n} packages appeared to be unused and were removed`:`${l} appeared to be unused and was removed`)}}});var _u,Tw,rfe=St(()=>{Kt();Gh();HL();qA();(function(f){f.VERSION="version",f.COMMAND_NAME="commandName",f.PLUGIN_NAME="pluginName",f.INSTALL_COUNT="installCount",f.PROJECT_COUNT="projectCount",f.WORKSPACE_COUNT="workspaceCount",f.DEPENDENCY_COUNT="dependencyCount",f.EXTENSION="packageExtension"})(_u||(_u={}));Tw=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let s=this.getRegistryPath();this.isNew=!ge.existsSync(s),this.sendReport(r),this.startBuffer()}reportVersion(e){this.reportValue(_u.VERSION,e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue(_u.COMMAND_NAME,e||"<none>")}reportPluginName(e){this.reportValue(_u.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(_u.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(_u.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(_u.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(_u.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(_u.DEPENDENCY_COUNT,String(e))}reportValue(e,r){Th(this.values,e).add(r)}reportEnumerator(e,r){Th(this.enumerators,e).add(xa(r))}reportHit(e,r="*"){let s=Wm(this.hits,e),o=zf(s,r,()=>0);s.set(r,o+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return $.join(e,"telemetry.json")}sendReport(e){var C,w,B;let r=this.getRegistryPath(),s;try{s=ge.readJsonSync(r)}catch{s={}}let o=Date.now(),n=this.configuration.get("telemetryInterval")*24*60*60*1e3,u=((C=s.lastUpdate)!=null?C:o+n+Math.floor(n*Math.random()))+n;if(u>o&&s.lastUpdate!=null)return;try{ge.mkdirSync($.dirname(r),{recursive:!0}),ge.writeJsonSync(r,{lastUpdate:o})}catch{return}if(u>o||!s.blocks)return;let f=`https://b
|
|||
|
`),g=l.length;for(g>0&&l.includes("unstyle")&&(l=[...new Set(["unstyle",...l])].reverse());g-- >0;)u=r(t.styles[l[g]],u,f);return u},o=(n,l,u)=>{t.styles[n]=e({name:n,codes:l}),(t.keys[u]||(t.keys[u]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(g){t.alias(n,g)},get(){let g=C=>s(C,g.stack);return Reflect.setPrototypeOf(g,t),g.stack=this.stack?this.stack.concat(n):[n],g}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=clt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,l)=>{let u=typeof l=="string"?t[l]:l;if(typeof u!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");u.stack||(Reflect.defineProperty(u,"name",{value:n}),t.styles[n]=u,u.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(f){t.alias(n,f)},get(){let f=g=>s(g,f.stack);return Reflect.setPrototypeOf(f,t),f.stack=this.stack?this.stack.concat(u.stack):u.stack,f}})},t.theme=n=>{if(!llt(n))throw new TypeError("Expected theme to be an object");for(let l of Object.keys(n))t.alias(l,n[l]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Afe(),t.define=o,t};X4.exports=lfe();X4.exports.create=lfe});var ia=K(mn=>{"use strict";var ult=Object.prototype.toString,Wl=kc(),cfe=!1,Z4=[],ufe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};mn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);mn.hasColor=t=>!!t&&Wl.hasColor(t);var ES=mn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);mn.nativeType=t=>ult.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");mn.isAsyncFn=t=>mn.nativeType(t)==="asyncfunction";mn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";mn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;mn.scrollDown=(t=[])=>[...t.slice(1),t[0]];mn.scrollUp=(t=[])=>[t.pop(),...t];mn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};mn.swap=(t,e,r)=>{let s=t.length,o=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[o],t[o]=n};mn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};mn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};mn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:s=`
|
|||
|
`+r,width:o=80}=e;o-=((s+r).match(/[^\S\n]/g)||[]).length;let l=`.{1,${o}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,u=t.trim(),f=new RegExp(l,"g"),g=u.match(f)||[];return g=g.map(C=>C.replace(/\n$/,"")),e.padEnd&&(g=g.map(C=>C.padEnd(o," "))),e.padStart&&(g=g.map(C=>C.padStart(o," "))),r+g.join(s)};mn.unmute=t=>{let e=t.stack.find(s=>Wl.keys.color.includes(s));return e?Wl[e]:t.stack.find(s=>s.slice(2)==="bg")?Wl[e.slice(2)]:s=>s};mn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";mn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Wl.keys.color.includes(s));if(e){let s=Wl["bg"+mn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)==="bg");return r?Wl[r.slice(2).toLowerCase()]||t:Wl.none};mn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Wl.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)==="bg");if(e&&!r)return Wl[ufe[e]||e];if(r){let s=r.slice(2).toLowerCase(),o=ufe[s];return o&&Wl["bg"+mn.pascal(o)]||t}return Wl.none};mn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?"pm":"am";e=e%12;let o=e===0?12:e,n=r<10?"0"+r:r;return o+":"+n+" "+s};mn.set=(t={},e="",r)=>e.split(".").reduce((s,o,n,l)=>{let u=l.length-1>n?s[o]||{}:r;return!mn.isObject(u)&&n<l.length-1&&(u={}),s[o]=u},t);mn.get=(t={},e="",r)=>{let s=t[e]==null?e.split(".").reduce((o,n)=>o&&o[n],t):t[e];return s==null?r:s};mn.mixin=(t,e)=>{if(!ES(t))return e;if(!ES(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&ES(s.value)){let o=Object.getOwnPropertyDescriptor(t,r);ES(o.value)?t[r]=mn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};mn.merge=(...t)=>{let e={};for(let r of t)mn.mixin(e,r);return e};mn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let o=r[s];typeof o=="function"?mn.define(t,s,o.bind(e)):mn.define(t,s,o)}};mn.onExit=t=>{let e=(r,s)=>{cfe||(cfe=!0,Z4.forEach(o=>o()),r===!0&&process.exit(128+s))};Z4.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),Z4.push(t)};mn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};mn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(o){s=o},get(){return s?s():r()}})}});var ffe=K(qy=>{"use strict";qy.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};qy.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};qy.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};qy.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};qy.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var hfe=K((l3t,gfe)=>{"use strict";var pfe=require("readline"),flt=ffe(),glt=/^(?:\x1b)([a-zA-Z0-9])$/,plt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,hlt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe
|
|||
|
`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x7F"||t==="\b")s.name="backspace",s.meta=t.charAt(0)==="";else if(t===""||t==="")s.name="escape",s.meta=t.length===2;else if(t===" "||t===" ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=glt.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=plt.exec(t)){let o=[...t];o[0]===""&&o[1]===""&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),l=(r[3]||r[5]||1)-1;s.ctrl=!!(l&4),s.meta=!!(l&10),s.shift=!!(l&1),s.code=n,s.name=hlt[n],s.shift=dlt(n)||s.shift,s.ctrl=mlt(n)||s.ctrl}return s};wS.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=pfe.createInterface({terminal:!0,input:r});pfe.emitKeypressEvents(r,s);let o=(u,f)=>e(u,wS(u,f),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",o),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",o),s.pause(),s.close()}};wS.action=(t,e,r)=>{let s=re(re({},flt),r);return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};gfe.exports=wS});var mfe=K((c3t,dfe)=>{"use strict";dfe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),ylt(t,r,s)}};function ylt(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},o=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},o);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),t.once("close",()=>s.stop()),s.stop}});var Ife=K((u3t,yfe)=>{"use strict";var{define:Clt,width:Ilt}=ia(),Cfe=class{constructor(e){let r=e.options;Clt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Ilt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e=re({},this);return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};yfe.exports=Cfe});var wfe=K((f3t,Efe)=>{"use strict";var $4=ia(),vo=kc(),eU={default:vo.noop,noop:vo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||$4.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||$4.complement(this.primary)},primary:vo.cyan,success:vo.green,danger:vo.magenta,strong:vo.bold,warning:vo.yellow,muted:vo.dim,disabled:vo.gray,dark:vo.dim.gray,underline:vo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typ
|
|||
|
`),g=f[0],C=f[f.length-1],B=(s+(r?" "+r:"")).length,S=B<g.length?g.slice(B+1):"";return{header:l,prompt:g,after:S,rest:f.slice(1),last:C}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
|||
|
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
|||
|
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(dd.cursor.down(e.rest.length)),this.write(`
|
|||
|
`.repeat(r))}catch(e){}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=oU.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let o=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await o(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,s){let{options:o,state:n,symbols:l,timers:u}=this,f=u&&u[e];n.timer=f;let g=o[e]||n[e]||l[e],C=r&&r[e]!=null?r[e]:await g;if(C==="")return C;let w=await this.resolve(C,n,r,s);return!w&&r&&r[e]?this.resolve(g,n,r,s):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,pA.isObject(e)&&(e=e[s.status]||e.pending),pA.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return pA.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let o=e[s.status]||e.pending||s.separator,n=await this.resolve(o,s);return pA.isObject(n)&&(n=n[s.status]||n.pending),pA.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&pA.hasColor(s))return s;if(s){let o=this.styles,n=this.index===r,l=n?o.primary:g=>g,u=await this.resolve(s[n?"on":"off"]||s,this.state),f=pA.hasColor(u)?u:l(u);return n?f:" ".repeat(u.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&pA.hasColor(s))return s;if(s){let o=this.styles,n=e.enabled===!0,l=n?o.success:o.dark,u=s[n?"on":"off"]||s;return pA.hasColor(u)?u:l(u)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return pA.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return pA.resolve(this,e,...r)}get base(){return BS.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||pA.height(this.stdout,25)}get width(){return this.options.columns||pA.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function blt(t){let e=o=>t[o]===void 0||typeof t[o]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let o of Object.keys(t.options)){if(r.includes(o)||/^on[A-Z]/.test(o))continue;let n=t.options[o];typeof n=="function"&&e(o)?s.includes(o)||(t[o]=n.bind(t)):typeof t[o]!="function"&&(t[o]=n)}}function Plt(t
|
|||
|
`:" ",s=[];for(let o=0;o<4;o++){let n=r(o);e[o]?s.push(n.repeat(e[o])):s.push("")}return s}Ffe.exports=BS});var Mfe=K((d3t,Tfe)=>{"use strict";var Flt=ia(),Nfe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return Nfe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};Tfe.exports=(t,e={})=>{let r=Flt.merge({},Nfe,e.roles);return r[t]||r.default}});var Ow=K((m3t,Lfe)=>{"use strict";var Rlt=kc(),Tlt=jy(),Nlt=Mfe(),QS=ia(),{reorder:aU,scrollUp:Mlt,scrollDown:Llt,isObject:Ofe,swap:Olt}=QS,Ufe=class extends Tlt{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||Infinity,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:o}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof o!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Ofe(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],o=0,n=async(l,u)=>{typeof l=="function"&&(l=await l.call(this)),l instanceof Promise&&(l=await l);for(let f=0;f<l.length;f++){let g=l[f]=await this.toChoice(l[f],o++,u);s.push(g),g.choices&&await n(g.choices,g)}return s};return n(e,r).then(l=>(this.state.loadingChoices=!1,l))}async toChoice(e,r,s){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let o=e.value;if(e=Nlt(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,QS.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Rlt.unstyle(e.message).length));let l=re({},e);return e.reset=(u=l.input,f=l.value)=>{for(let g of Object.keys(l))e[g]=l[g];e.input=u,e.value=f},o==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let o=await this.toChoice(e,r,s);return this.choices.push(o),this.index=this.choices.length-1,this.limit=this.choices.length,o}async newItem(e,r,s){let o=re({name:"New choice name?",editable:!0,newChoice:!0},e),n=await this.addChoice(o,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,
|
|||
|
`),o;return this.options.choicesHeader&&(o=await this.resolve(this.options.choicesHeader,this.state)),[o,s].filter(Boolean).join(`
|
|||
|
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s="",o=await this.header(),n=await this.prefix(),l=await this.separator(),u=await this.message();this.options.promptLine!==!1&&(s=[n,u,l,""].join(" "),this.state.prompt=s);let f=await this.format(),g=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();f&&(s+=f),g&&!s.includes(g)&&(s+=" "+g),e&&!f&&!C.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([o,s,C,w].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};Kfe.exports=Hfe});var Gfe=K((C3t,qfe)=>{"use strict";var _lt=i0(),Klt=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),l=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+l+s.slice(n+r.length):s}},jfe=class extends _lt{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(o=>o.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Klt(this.input,e),s=this.choices;this.choices=s.map(o=>Te(re({},o),{message:r(o.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};qfe.exports=jfe});var cU=K((I3t,Yfe)=>{"use strict";var lU=ia();Yfe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:o,showCursor:n=!0,color:l}=e,u=l||t.styles.placeholder,f=lU.inverse(t.styles.primary),g=N=>f(t.styles.black(N)),C=r,w=" ",B=g(w);if(t.blink&&t.blink.off===!0&&(g=N=>N,B=""),n&&o===0&&s===""&&r==="")return g(w);if(n&&o===0&&(r===s||r===""))return g(s[0])+u(s.slice(1));s=lU.isPrimitive(s)?`${s}`:"",r=lU.isPrimitive(r)?`${r}`:"";let S=s&&s.startsWith(r)&&s!==r,y=S?g(s[r.length]):B;if(o!==r.length&&n===!0&&(C=r.slice(0,o)+g(r[o])+r.slice(o+1),y=""),n===!1&&(y=""),S){let N=t.styles.unstyle(C+y);return C+y+u(s.slice(N.length))}return C+y}});var vS=K((E3t,Wfe)=>{"use strict";var Hlt=kc(),qlt=i0(),jlt=cU(),Jfe=class extends qlt{constructor(e){super(Te(re({},e),{multiple:!0}));this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:o}=r;return r.value=r.input=o.slice(0,s)+e+o.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let o=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=o,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r
|
|||
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};ege.exports=tge});var ige=K((v3t,rge)=>{"use strict";var Zlt=DS(),nge=class extends Zlt{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};rge.exports=nge});var age=K((D3t,sge)=>{"use strict";var $lt=i0(),ect=vS(),Gy=ect.prototype,oge=class extends $lt{constructor(e){super(Te(re({},e),{multiple:!0}));this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,o=s.parent||{};return!s.editable&&!o.editable&&(e==="a"||e==="i")?super[e]():Gy.dispatch.call(this,e,r)}append(e,r){return Gy.append.call(this,e,r)}delete(e,r){return Gy.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Gy.next.call(this):super.next()}prev(){return this.focused.editable?Gy.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",o=e.editable?s:super.indicator(e,r);return await this.resolve(o,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?Gy.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};sge.exports=oge});var md=K((k3t,Age)=>{"use strict";var tct=jy(),rct=cU(),{isPrimitive:nct}=ia(),lge=class extends tct{constructor(e){super(e);this.initial=nct(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(`
|
|||
|
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),o=r.split(" ");this.state.clipboard.push(o.pop()),this.input=o.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):rct(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),o=await this.message(),n=[r,o,s].filter(Boolean).join(" ");this.state.prompt=n;let l=await this.header(),u=await this.format(),f=await this.error()||await this.hint(),g=await this.footer();f&&!u.includes(f)&&(u+=" "+f),n+=" "+u,this.clear(e),this.write([l,n,g].filter(Boolean).join(`
|
|||
|
`)),this.restore()}};Age.exports=lge});var uge=K((S3t,cge)=>{"use strict";var ict=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),kS=t=>ict(t).filter(Boolean);cge.exports=(t,e={},r="")=>{let{past:s=[],present:o=""}=e,n,l;switch(t){case"prev":case"undo":return n=s.slice(0,s.length-1),l=s[s.length-1]||"",{past:kS([r,...n]),present:l};case"next":case"redo":return n=s.slice(1),l=s[0]||"",{past:kS([...n,r]),present:l};case"save":return{past:kS([...s,r]),present:""};case"remove":return l=kS(s.filter(u=>u!==r)),o="",l.length&&(o=l.pop()),{past:l,present:o};default:throw new Error(`Invalid action: "${t}"`)}}});var fU=K((x3t,fge)=>{"use strict";var sct=md(),gge=uge(),pge=class extends sct{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=gge(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=gge("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};fge.exports=pge});var mge=K((b3t,hge)=>{"use strict";var oct=md(),dge=class extends oct{format(){return""}};hge.exports=dge});var Ige=K((P3t,yge)=>{"use strict";var act=md(),Cge=class extends act{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};yge.exports=Cge});var Bge=K((F3t,Ege)=>{"use strict";var Act=i0(),wge=class extends Act{constructor(e){super(Te(re({},e),{multiple:!0}))}};Ege.exports=wge});var gU=K((R3t,Qge)=>{"use strict";var lct=md(),vge=class extends lct{constructor(e={}){super(re({style:"number"},e));this.min=this.isValue(e.min)?this.toNumber(e.min):-Infinity,this.max=this.isValue(e.max)?this.toNumber(e.max):Infinity,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};Qge.exports=vge});var kge=K((T3t,Dge)=>{Dge.exports=gU()});var bge=K((N3t,Sge)=>{"use strict";var cct=md(),xge=class extends cct{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};Sge.exports=xge});var
|
|||
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,o)=>({name:o+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(s=>` ${s.name} - ${s.message}`);return["",...e].map(s=>this.styles.muted(s)).join(`
|
|||
|
`)}renderScaleHeading(e){let r=this.scale.map(f=>f.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,o=Math.round(s/(r.length-1)),l=r.map(f=>this.styles.strong(f)).join(" ".repeat(o)),u=" ".repeat(this.widths[0]);return this.margin[3]+u+this.margin[1]+l}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let o=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):o?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),o=this.term==="Hyper"?"":" ";return s.join(o+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,o=await this.pointer(e,r),n=await e.hint;n&&!Fge.hasColor(n)&&(n=this.styles.muted(n));let l=y=>this.margin[3]+y.replace(/\s+$/,"").padEnd(this.widths[0]," "),u=this.newline,f=this.indent(e),g=await this.resolve(e.message,this.state,e,r),C=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=uct.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let S=Fge.wordWrap(g,{width:this.widths[0],newline:u}).split(`
|
|||
|
`).map(y=>l(y)+this.margin[1]);return s&&(C=this.styles.info(C),S=S.map(y=>this.styles.info(y))),S[0]+=C,this.linebreak&&S.push(""),[f+o,S.join(`
|
|||
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(o,n)=>await this.renderChoice(o,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(o=>o.join(" "))].join(`
|
|||
|
`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),o=await this.separator(),n=await this.message(),l="";this.options.promptLine!==!1&&(l=[s,n,o,""].join(" "),this.state.prompt=l);let u=await this.header(),f=await this.format(),g=await this.renderScaleKey(),C=await this.error()||await this.hint(),w=await this.renderChoices(),B=await this.footer(),S=this.emptyError;f&&(l+=f),C&&!l.includes(C)&&(l+=" "+C),e&&!f&&!w.trim()&&this.multiple&&S!=null&&(l+=this.styles.danger(S)),this.clear(r),this.write([u,l,g,w,B].filter(Boolean).join(`
|
|||
|
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};Pge.exports=Rge});var Oge=K((L3t,Nge)=>{"use strict";var Mge=kc(),gct=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",Lge=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=gct(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},pct=async(t={},e={},r=s=>s)=>{let s=new Set,o=t.fields||[],n=t.template,l=[],u=[],f=[],g=1;typeof n=="function"&&(n=await n());let C=-1,w=()=>n[++C],B=()=>n[C+1],S=y=>{y.line=g,l.push(y)};for(S({type:"bos",value:""});C<n.length-1;){let y=w();if(/^[^\S\n ]$/.test(y)){S({type:"text",value:y});continue}if(y===`
|
|||
|
`){S({type:"newline",value:y}),g++;continue}if(y==="\\"){y+=w(),S({type:"text",value:y});continue}if((y==="$"||y==="#"||y==="{")&&B()==="{"){y+=w();let H={type:"template",open:y,inner:"",close:"",value:y},G;for(;G=w();){if(G==="}"){B()==="}"&&(G+=w()),H.value+=G,H.close=G;break}G===":"?(H.initial="",H.key=H.inner):H.initial!==void 0&&(H.initial+=G),H.value+=G,H.inner+=G}H.template=H.open+(H.initial||H.inner)+H.close,H.key=H.key||H.inner,e.hasOwnProperty(H.key)&&(H.initial=e[H.key]),H=r(H),S(H),f.push(H.key),s.add(H.key);let te=u.find(fe=>fe.name===H.key);H.field=o.find(fe=>fe.name===H.key),te||(te=new Lge(H),u.push(te)),te.lines.push(H.line-1);continue}let N=l[l.length-1];N.type==="text"&&N.line===g?N.value+=y:S({type:"text",value:y})}return S({type:"eos",value:""}),{input:n,tabstops:l,unique:s,keys:f,items:u}};Nge.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s=re(re({},e.values),e.initial),{tabstops:o,items:n,keys:l}=await pct(e,s),u=pU("result",t,e),f=pU("format",t,e),g=pU("validate",t,e,!0),C=t.isValue.bind(t);return async(w={},B=!1)=>{let S=0;w.required=r,w.items=n,w.keys=l,w.output="";let y=async(G,te,fe,me)=>{let ye=await g(G,te,fe,me);return ye===!1?"Invalid field "+fe.name:ye};for(let G of o){let te=G.value,fe=G.key;if(G.type!=="template"){te&&(w.output+=te);continue}if(G.type==="template"){let me=n.find(Qe=>Qe.name===fe);e.required===!0&&w.required.add(me.name);let ye=[me.input,w.values[me.value],me.value,te].find(C),Ce=(me.field||{}).message||G.inner;if(B){let Qe=await y(w.values[fe],w,me,S);if(Qe&&typeof Qe=="string"||Qe===!1){w.invalid.set(fe,Qe);continue}w.invalid.delete(fe);let p=await u(w.values[fe],w,me,S);w.output+=Mge.unstyle(p);continue}me.placeholder=!1;let Pe=te;te=await f(te,w,me,S),ye!==te?(w.values[fe]=ye,te=t.styles.typing(ye),w.missing.delete(Ce)):(w.values[fe]=void 0,ye=`<${Ce}>`,te=t.styles.primary(ye),me.placeholder=!0,w.required.has(fe)&&w.missing.add(Ce)),w.missing.has(Ce)&&w.validating&&(te=t.styles.warning(ye)),w.invalid.has(fe)&&w.validating&&(te=t.styles.danger(ye)),S===w.index&&(Pe!==te?te=t.styles.underline(te):te=t.styles.heading(Mge.unstyle(te))),S++}te&&(w.output+=te)}let N=w.output.split(`
|
|||
|
`).map(G=>" "+G),L=n.length,H=0;for(let G of n)w.invalid.has(G.name)&&G.lines.forEach(te=>{N[te][0]===" "&&(N[te]=w.styles.danger(w.symbols.bullet)+N[te].slice(1))}),t.isValue(w.values[G.name])&&H++;return w.completed=(H/L*100).toFixed(0),w.output=N.join(`
|
|||
|
`),w.output}};function pU(t,e,r,s){return(o,n,l,u)=>typeof l.field[t]=="function"?l.field[t].call(e,o,n,l,u):[s,o].find(f=>e.isValue(f))}});var Kge=K((O3t,Uge)=>{"use strict";var hct=kc(),dct=Oge(),mct=jy(),_ge=class extends mct{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await dct(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),o=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${o}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:o}=this.state,n=[this.options.newline,`
|
|||
|
`].find(G=>G!=null),l=await this.prefix(),u=await this.separator(),f=await this.message(),g=[l,f,u].filter(Boolean).join(" ");this.state.prompt=g;let C=await this.header(),w=await this.error()||"",B=await this.hint()||"",S=s?"":await this.interpolate(this.state),y=this.state.key=r[e]||"",N=await this.format(y),L=await this.footer();N&&(g+=" "+N),B&&!N&&this.state.completed===0&&(g+=" "+B),this.clear(o);let H=[C,g,S,L,w.trim()];this.write(H.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:o}=this.state,n=r.find(l=>l.name===s[o]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:o}=this.state;if(e.size){let u="";for(let[f,g]of e)u+=`Invalid ${f}: ${g}
|
|||
|
`;return this.state.error=u,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let l=hct.unstyle(s).split(`
|
|||
|
`).map(u=>u.slice(1)).join(`
|
|||
|
`);return this.value={values:o,result:l},super.submit()}};Uge.exports=_ge});var jge=K((U3t,Hge)=>{"use strict";var yct="(Use <shift>+<up/down> to sort)",Cct=i0(),qge=class extends Cct{constructor(e){super(Te(re({},e),{reorder:!1,sort:!0,multiple:!0}));this.state.hint=[this.options.hint,yct].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),o=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(o):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Hge.exports=qge});var Wge=K((_3t,Gge)=>{"use strict";var Ict=Ow(),Yge=class extends Ict{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`
|
|||
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=Ect(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(o=>o.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,o=this.term==="Hyper",n=o?9:8,l=o?"":" ",u=this.symbols.line.repeat(n),f=" ".repeat(n+(o?0:1)),g=te=>(te?this.styles.success("\u25C9"):"\u25EF")+l,C=r+1+".",w=s?this.styles.heading:this.styles.noop,B=await this.resolve(e.message,this.state,e,r),S=this.indent(e),y=S+e.scale.map((te,fe)=>g(fe===e.scaleIdx)).join(u),N=te=>te===e.scaleIdx?w(te):te,L=S+e.scale.map((te,fe)=>N(fe)).join(f),H=()=>[C,B].filter(Boolean).join(" "),G=()=>[H(),y,L," "].filter(Boolean).join(`
|
|||
|
`);return s&&(y=this.styles.cyan(y),L=this.styles.cyan(L)),G()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,o)=>await this.renderChoice(s,o)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
|||
|
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),o=await this.separator(),n=await this.message(),l=[s,n,o].filter(Boolean).join(" ");this.state.prompt=l;let u=await this.header(),f=await this.format(),g=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();(f||!g)&&(l+=" "+f),g&&!l.includes(g)&&(l+=" "+g),e&&!f&&!C&&this.multiple&&this.type!=="form"&&(l+=this.styles.danger(this.emptyError)),this.clear(r),this.write([l,u,C,w].filter(Boolean).join(`
|
|||
|
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Ect(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>re({},s));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Gge.exports=Yge});var Vge=K((K3t,Jge)=>{Jge.exports=fU()});var Zge=K((H3t,zge)=>{"use strict";var wct=DS(),Xge=class extends wct{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),o=await this.separator(),n=await this.message(),l=await this.format(),u=await this.error()||await this.hint(),f=await this.footer(),g=[s,n,o,l].join(" ");this.state.prompt=g,u&&!g.includes(u)&&(g+=" "+u),this.clear(e),this.write([r,g,f].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};zge.exports=Xge});var tpe=K((q3t,$ge)=>{"use strict";var Bct=i0(),epe=class extends Bct{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};$ge.exports=epe});var npe=K(hU=>{"use strict";var rpe=ia(),Hs=(t,e)=>{rpe.defineExport(hU,t,e),rpe.defineExport(hU,t.toLowerCase(),e)};Hs("AutoComplete",()=>Gfe());Hs("BasicAuth",()=>$fe());Hs("Confirm",()=>ige());Hs("Editable",()=>age());Hs("Form",()=>vS());Hs("Input",()=>fU());Hs("Invisible",()=>mge());Hs("List",()=>Ige());Hs("MultiSelect",()=>Bge());Hs("Numeral",()=>kge());Hs("Password",()=>bge());Hs("Scale",()=>Tge());Hs("Select",()=>i0());Hs("Snippet",()=>Kge());Hs("Sort",()=>jge());Hs("Survey",()=>Wge());Hs("Text",()=>Vge());Hs("Toggle",()=>Zge());Hs("Quiz",()=>tpe())});var spe=K((G3t,ipe)=>{ipe.exports={ArrayPrompt:Ow(),AuthPrompt:uU(),BooleanPrompt:DS(),NumberPrompt:gU(),StringPrompt:md()}});var _w=K((Y3t,ope)=>{"use strict";var ape=require("assert"),dU=require("events"),s0=ia(),Ku=class extends dU{constructor(e,r){super();this.options=s0.merge({},e),this.answers=re({},r)}register(e,r){if(s0.isObject(e)){for(let o of Object.keys(e))this.register(o,e[o]);return this}ape.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(s0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=s0.merge({},this.options,e),{type:s,name:o}=e,{set:n,get:l}=s0;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[o];ape(this.prompts[s],`Prompt "${s}" is not registered`);let u=new this.prompts[s](r),f=l(this.answers,o);u.state.answers=this.answers,u.enquirer=this,o&&u.on("submit",C=>{this.emit("answer",o,C,u),n(this.answers,o,C)});let g=u.emit.bind(u);return u.emit=(...C)=>(this.emit.call(this,...C),g(...C)),this.emit("prompt",u,this),r.autofill&&f!=null?(u.value=u.input=f,r.autofill==="show"&&await u.submit()):f=u.value=await u.run(),f}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||jy()}static get prompts(){return npe()}static get types(){return spe()}static get prompt(){let e=(r,...s)=>{let o=new this(...s),n=o.emit.bind(o);return o.emit=(...l)=>(e.emit(...l),n(...l)),o.prompt(r)};return s0.mixinEmitter(e,new dU),e}};s0.mixinEmitter(Ku,new dU);var mU=Ku.prompts;for(let t of Object.keys(mU)){let e=t.toLowerCase(),r=s=>new mU[t](s).run();Ku.prompt[e]=r,Ku[e]=r,Ku[t]||Reflect.defineProperty(Ku,t,{get:()=>mU[t]})}var Uw=t=>{s0.defineExport(Ku,t,()=>Ku.types[t])};Uw("ArrayPrompt");Uw("AuthPrompt");Uw("BooleanPrompt");Uw("NumberPrompt");Uw("StringPrompt");ope.exports=Ku});var Yw=K((b8t,dpe)=>{var xct=dS();function bct(t,e,r){var s=t==null?void 0:xct(t,e);return s===void 0?r:s}dpe.exports=bct});var Ipe=K((M8t,Cpe)=>{function Pct(t,e){for(var r=-1,s=t==null?0:t.length;++r<s&&e(t[r],r,t)!==!1;);return t}Cpe.exports=Pct});var wpe=K((L8t,Epe)=>{var Fct=Rh(),Rct=Hv();function Tct(t,e){return t&&Fct(e,Rct(e),t)}Epe.exports=Tct});var Qpe=K((O8t,Bpe)=>{var Nct=Rh(),Mct=Gm();function Lct(t,e){return t&&Nct(e,Mct(e),t)}Bpe.ex
|
|||
|
`+f:"")),l.error.method="_execFileSync",l.error.program=o,l.error.args=n,l.error.extMessage=f,l.error.exitCode=+u),si.unlinkSync(g),si.unlinkSync(C),si.unlinkSync(w),si.unlinkSync(B),l}function spt(t){var e,r={},s,o={env:process.env,encoding:t.encoding};if(l0||(Id?process.env.PSModulePath?(l0="powershell.exe",NS=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(l0="cscript.exe",NS=["//nologo",__dirname+"\\read.cs.js"]):(l0="/bin/sh",NS=[__dirname+"/read.sh"])),Id&&!process.env.PSModulePath&&(o.stdio=[process.stdin]),o3.execFileSync){e=zhe(t),BB&&BB("execFileSync",e);try{r.input=o3.execFileSync(l0,e,o)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Yhe+(s?`
|
|||
|
`+s:"")),r.error.method="execFileSync",r.error.program=l0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=ipt(t,o);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function u3(t){var e="",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function o(){var n=spt(t);if(n.error)throw n.error;return n.input}return c3&&c3(t),function(){var n,l,u;function f(){return n||(n=process.binding("fs"),l=process.binding("constants")),n}if(typeof Eg=="string")if(Eg=null,Id){if(u=function(g){var C=g.replace(/^\D+/,"").split("."),w=0;return(C[0]=+C[0])&&(w+=C[0]*1e4),(C[1]=+C[1])&&(w+=C[1]*100),(C[2]=+C[2])&&(w+=C[2]),w}(process.version),!(u>=20302&&u<40204||u>=5e4&&u<50100||u>=50600&&u<60200)&&process.stdin.isTTY)process.stdin.pause(),Eg=process.stdin.fd,zy=process.stdin._handle;else try{Eg=f().open("CONIN$",l.O_RDWR,parseInt("0666",8)),zy=new Whe(Eg,!0)}catch(g){}if(process.stdout.isTTY)xc=process.stdout.fd;else{try{xc=si.openSync("\\\\.\\CON","w")}catch(g){}if(typeof xc!="number")try{xc=f().open("CONOUT$",l.O_RDWR,parseInt("0666",8))}catch(g){}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Eg=si.openSync("/dev/tty","r"),zy=process.stdin._handle}catch(g){}}else try{Eg=si.openSync("/dev/tty","r"),zy=new Whe(Eg,!1)}catch(g){}if(process.stdout.isTTY)xc=process.stdout.fd;else try{xc=si.openSync("/dev/tty","w")}catch(g){}}}(),function(){var n,l,u=!t.hideEchoBack&&!t.keyIn,f,g,C,w,B;MS="";function S(y){return y===Jhe?!0:zy.setRawMode(y)!==0?!1:(Jhe=y,!0)}if(Vhe||!zy||typeof xc!="number"&&(t.display||!u)){e=o();return}if(t.display&&(si.writeSync(xc,t.display),t.display=""),!t.displayOnly){if(!S(!u)){e=o();return}for(g=t.keyIn?1:t.bufferSize,f=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(g):new Buffer(g),t.keyIn&&t.limit&&(l=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){C=0;try{C=si.readSync(Eg,f,0,g)}catch(y){if(y.code!=="EOF"){S(!1),e+=o();return}}if(C>0?(w=f.toString(t.encoding,0,C),MS+=w):(w=`
|
|||
|
`,MS+=String.fromCharCode(0)),w&&typeof(B=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=B,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&l&&(w=w.replace(l,"")),w&&(u||(t.hideEchoBack?t.mask&&si.writeSync(xc,new Array(w.length+1).join(t.mask)):si.writeSync(xc,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=g)break}!u&&!s&&si.writeSync(xc,`
|
|||
|
`),S(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
|||
|
`),t.encoding),t.displayOnly?"":l3=t.keepWhitespace||t.keyIn?e:e.trim()}function opt(t,e){var r=[];function s(o){o!=null&&(Array.isArray(o)?o.forEach(s):(!e||e(o))&&r.push(o))}return s(t),r}function f3(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function to(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(a3),t.unshift(a3))),t.reduce(function(s,o){return o==null||(o.hasOwnProperty("noEchoBack")&&!o.hasOwnProperty("hideEchoBack")&&(o.hideEchoBack=o.noEchoBack,delete o.noEchoBack),o.hasOwnProperty("noTrim")&&!o.hasOwnProperty("keepWhitespace")&&(o.keepWhitespace=o.noTrim,delete o.noTrim),r||(e=Object.keys(o)),e.forEach(function(n){var l;if(!!o.hasOwnProperty(n))switch(l=o[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":l=l!=null?l+"":"",l&&n!=="limitMessage"&&(l=l.replace(/[\r\n]/g,"")),s[n]=l;break;case"bufferSize":!isNaN(l=parseInt(l,10))&&typeof l=="number"&&(s[n]=l);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!l;break;case"limit":case"trueValue":case"falseValue":s[n]=opt(l,function(u){var f=typeof u;return f==="string"||f==="number"||f==="function"||u instanceof RegExp}).map(function(u){return typeof u=="string"?u.replace(/[\r\n]/g,""):u});break;case"print":case"phContent":case"preCheck":s[n]=typeof l=="function"?l:void 0;break;case"prompt":case"display":s[n]=l!=null?l:"";break}})),s},{})}function g3(t,e,r){return e.some(function(s){var o=typeof s;return o==="string"?r?t===s:t.toLowerCase()===s.toLowerCase():o==="number"?parseFloat(t)===s:o==="function"?s(t):s instanceof RegExp?s.test(t):!1})}function p3(t,e){var r=A0.normalize(Id?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=A0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+f3(r)+"(?=\\/|\\\\|$)",Id?"i":""),"~")}function Xy(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),o=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(l,u,f,g,C,w){var B;return u||typeof(B=e(C))!="string"?f:B?(g||"")+B+(w||""):""}return t.replace(s,n).replace(o,n)}function Xhe(t,e,r){var s,o=[],n=-1,l=0,u="",f;function g(C,w){return w.length>3?(C.push(w[0]+"..."+w[w.length-1]),f=!0):w.length&&(C=C.concat(w)),C}return s=t.reduce(function(C,w){return C.concat((w+"").split(""))},[]).reduce(function(C,w){var B,S;return e||(w=w.toLowerCase()),B=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&B===0?u+=w:(S=w.charCodeAt(0),B&&B===n&&S===l+1?o.push(w):(C=g(C,o),o=[w],n=B),l=S),C},[]),s=g(s,o),u&&(s.push(u),f=!0),{values:s,suppressed:f}}function Zhe(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function $he(t,e){var r,s,o={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":s=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(o=Xhe(s,e.caseSensitive),s=o.values):s=s.filter(function(l){var u=typeof l;return u==="string"||u==="number"}),r=Zhe(s,o.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=l3;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=A0.basename(r):t==="cwdHome"&&(r=p3(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(l){return l.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Ed[Ed.length-n]||"")}return r}function ede(t){var e=/^(.)-(.)$/.exec(t),r="",s,o,n,l;if(!e)return null;for(s=e[1].charCodeAt(0),o=e[2].charCodeAt(0),l=s<o?1:-1,n=s;n!==o+l;n+=l)r+=String.fromC
|
|||
|
`:"")+C}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=Xy(t.display+"",f);;){if(e=u3(t),r=!1,s="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((o=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Ed[0]||"",o[1]?r=!0:e=n,g(n+`
|
|||
|
`),r||(t.displayOnly=!0,u3(t),t.displayOnly=!1)):e&&e!==Ed[Ed.length-1]&&(Ed=[e])),!r&&t.cd&&e)switch(l=h3(e),l[0].toLowerCase()){case"cd":if(l[1])try{process.chdir(p3(l[1],!0))}catch(C){g(C+"")}r=!0;break;case"pwd":g(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(u=t.preCheck(e,t),e=u.res,u.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||g3(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=Xy(t.limitMessage,f))}g((s?s+`
|
|||
|
`:"")+Xy(t.displaySrc+"",f))}return tde(e,t)}rn._DBG_set_useExt=function(t){Vhe=t};rn._DBG_set_checkOptions=function(t){c3=t};rn._DBG_set_checkMethod=function(t){BB=t};rn._DBG_clearHistory=function(){l3="",Ed=[]};rn.setDefaultOptions=function(t){return a3=to(!0,t),to(!0)};rn.question=function(t,e){return rde(to(to(!0,e),{display:t}))};rn.prompt=function(t){var e=to(!0,t);return e.display=e.prompt,rde(e)};rn.keyIn=function(t,e){var r=to(to(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var o=typeof s;return o==="string"||o==="number"}).map(function(s){return Xy(s+"",ede)}),r.limit=f3(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(s){r[s]=r[s].reduce(function(o,n){var l=typeof n;return l==="string"||l==="number"?o=o.concat((n+"").split("")):o.push(n),o},[])}),r.display=Xy(r.display+"",function(s){return $he(s,r)}),tde(u3(r),r)};rn.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),rn.question(t,to({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};rn.questionNewPassword=function(t,e){var r,s,o,n=to({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
|
|||
|
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(S){return S==="charlist"?r.text:S==="length"?s+"..."+o:null}}),l,u,f,g,C,w,B;for(e=e||{},l=Xy(e.charlist?e.charlist+"":"$<!-~>",ede),(isNaN(s=parseInt(e.min,10))||typeof s!="number")&&(s=12),(isNaN(o=parseInt(e.max,10))||typeof o!="number")&&(o=24),g=new RegExp("^["+f3(l)+"]{"+s+","+o+"}$"),r=Xhe([l],n.caseSensitive,!0),r.text=Zhe(r.values,r.suppressed),u=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",f=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),C=n.limitMessage;!B;)n.limit=g,n.limitMessage=C,w=rn.question(t,n),n.limit=[w,""],n.limitMessage=f,B=rn.question(u,n);return w};function nde(t,e,r){var s;function o(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return rn.question(t,to({limitMessage:"Input valid number, please."},e,{limit:o,cd:!1})),s}rn.questionInt=function(t,e){return nde(t,e,function(r){return parseInt(r,10)})};rn.questionFloat=function(t,e){return nde(t,e,parseFloat)};rn.questionPath=function(t,e){var r,s="",o=to({hideEchoBack:!1,limitMessage:`$<error(
|
|||
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var l,u,f;n=p3(n,!0),s="";function g(C){C.split(/\/|\\/).reduce(function(w,B){var S=A0.resolve(w+=B+A0.sep);if(!si.existsSync(S))si.mkdirSync(S);else if(!si.statSync(S).isDirectory())throw new Error("Non directory already exists: "+S);return w},"")}try{if(l=si.existsSync(n),r=l?si.realpathSync(n):A0.resolve(n),!e.hasOwnProperty("exists")&&!l||typeof e.exists=="boolean"&&e.exists!==l)return s=(l?"Already exists":"No such file or directory")+": "+r,!1;if(!l&&e.create&&(e.isDirectory?g(r):(g(A0.dirname(r)),si.closeSync(si.openSync(r,"w"))),r=si.realpathSync(r)),l&&(e.min||e.max||e.isFile||e.isDirectory)){if(u=si.statSync(r),e.isFile&&!u.isFile())return s="Not file: "+r,!1;if(e.isDirectory&&!u.isDirectory())return s="Not directory: "+r,!1;if(e.min&&u.size<+e.min||e.max&&u.size>+e.max)return s="Size "+u.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(f=e.validate(r))!==!0)return typeof f=="string"&&(s=f),!1}catch(C){return s=C+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),rn.question(t,o),r};function ide(t,e){var r={},s={};return typeof t=="object"?(Object.keys(t).forEach(function(o){typeof t[o]=="function"&&(s[e.caseSensitive?o:o.toLowerCase()]=t[o])}),r.preCheck=function(o){var n;return r.args=h3(o),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(o,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(o,r.args):null,{res:o,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var o=r.args[0]||"";return e.caseSensitive||(o=o.toLowerCase()),s.hasOwnProperty(o)})):r.preCheck=function(o){return r.args=h3(o),r.hRes=typeof t=="function"?t.apply(o,r.args):!0,{res:o,forceNext:!1}},r}rn.promptCL=function(t,e){var r=to({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=ide(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,rn.prompt(r),s.args};rn.promptLoop=function(t,e){for(var r=to({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(rn.prompt(r)););};rn.promptCLLoop=function(t,e){var r=to({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=ide(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;rn.prompt(r),!s.hRes;);};rn.promptSimShell=function(t){return rn.prompt(to({hideEchoBack:!1,history:!0},t,{prompt:function(){return Id?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function sde(t,e,r){var s;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=rn.keyIn(t,to(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}rn.keyInYN=function(t,e){return sde(t,e)};rn.keyInYNStrict=function(t,e){return sde(t,e,"yn")};rn.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),rn.keyIn(t,to({limit:null},e,{hideEchoBack:!0,mask:""}))};rn.keyInSelect=function(t,e,r){var s=to({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(f){return f==="itemsCount"?t.length+"":f==="firstItem"?(t[0]+"").trim():f==="lastItem"?(t[t.length-1]+"").trim():null}}),o="",n={},l=49,u=`
|
|||
|
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(f,g){var C=String.fromCharCode(l);o+=C,n[C]=g,u+="["+C+"] "+(f+"").trim()+`
|
|||
|
`,l=l===57?97:l+1}),(!r||r.cancel!==!1)&&(o+="0",n["0"]=-1,u+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
|||
|
`),s.limit=o,u+=`
|
|||
|
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),u+=e),n[rn.keyIn(u,s).toLowerCase()]};rn.getRawInput=function(){return MS};function QB(t,e){var r;return e.length&&(r={},r[t]=e[0]),rn.setDefaultOptions(r)[t]}rn.setPrint=function(){return QB("print",arguments)};rn.setPrompt=function(){return QB("prompt",arguments)};rn.setEncoding=function(){return QB("encoding",arguments)};rn.setMask=function(){return QB("mask",arguments)};rn.setBufferSize=function(){return QB("bufferSize",arguments)}});var d3=K((yGt,ZA)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,D,m){var F=tau_file_system.files[I];if(!F){if(m==="read")return null;F={path:I,text:"",type:D,get:function(X,ee){return ee===this.text.length||ee>this.text.length?"end_of_file":this.text.substring(ee,ee+X)},put:function(X,ee){return ee==="end_of_file"?(this.text+=X,!0):ee==="past_end_of_file"?null:(this.text=this.text.substring(0,ee)+X+this.text.substring(ee+X.length),!0)},get_byte:function(X){if(X==="end_of_stream")return-1;var ee=Math.floor(X/2);if(this.text.length<=ee)return-1;var ie=n(this.text[Math.floor(X/2)],0);return X%2==0?ie&255:ie/256>>>0},put_byte:function(X,ee){var ie=ee==="end_of_stream"?this.text.length:Math.floor(ee/2);if(this.text.length<ie)return null;var Ae=this.text.length===ie?-1:n(this.text[Math.floor(ee/2)],0);return ee%2==0?(Ae=Ae/256>>>0,Ae=(Ae&255)<<8|X&255):(Ae=Ae&255,Ae=(X&255)<<8|Ae&255),this.text.length===ie?this.text+=l(Ae):this.text=this.text.substring(0,ie)+l(Ae)+this.text.substring(ie+1),!0},flush:function(){return!0},close:function(){var X=tau_file_system.files[this.path];return X?!0:null}},tau_file_system.files[I]=F}return m==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(I,D){for(var m;tau_user_input.buffer.length<I;)m=window.prompt(),m&&(tau_user_input.buffer+=m);return m=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),m}},tau_user_output={put:function(I,D){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,D,m){var F=require("fs"),X=F.openSync(I,m[0]);return m==="read"&&!F.existsSync(I)?null:{get:function(ee,ie){var Ae=new Buffer(ee);return F.readSync(X,Ae,0,ee,ie),Ae.toString()},put:function(ee,ie){var Ae=Buffer.from(ee);if(ie==="end_of_file")F.writeSync(X,Ae);else{if(ie==="past_end_of_file")return null;F.writeSync(X,Ae,0,Ae.length,ie)}return!0},get_byte:function(ee){return null},put_byte:function(ee,ie){return null},flush:function(){return!0},close:function(){return F.closeSync(X),!0}}}},nodejs_user_input={buffer:"",get:function(I,D){for(var m,F=ode();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=F.question();return m=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),m}},nodejs_user_output={put:function(I,D){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,D){return I.indexOf(D)}:e=function(I,D){for(var m=I.length,F=0;F<m;F++)if(D===I[F])return F;return-1};var r=function(I,D){if(I.length!==0){for(var m=I[0],F=I.length,X=1;X<F;X++)m=D(m,I[X]);return m}},s;Array.prototype.map?s=function(I,D){return I.map(D)}:s=function(I,D){for(var m=[],F=I.length,X=0;X<F;X++)m.push(D(I[X]));return m};var o;Array.prototype.filter?o=function(I,D){return I.filter(D)}:o=function(I,D){for(var m=[],F=I.length,X=0;X<F;X++)D(I[X])&&m.push(I[X]);return m};var n;String.prototype.codePointAt?n=function(I,D){return I.codePointAt(D)}:n=function(I,D){return I.charCodeAt(D)};var l;String.fromCodePoint?l=function(){return String.fromCodePoint.apply(null,arguments)}:l=function(){return String.fromCharCode.apply(null,arguments)};var u=0,f=1,g=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,C={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var D=[],m=!1;return I.replace(g,function(F,X,ee,ie,Ae,Fe,_e,Ct,vt,Wt,cr,Ot,Cn,Ur,Rr,_r,hn){switch(!0){c
|
|||
|
`,"\r"," ","\v"].indexOf(ee)!==-1)switch(F+=1,ee){case"a":m+="a";break;case"b":m+="\b";break;case"f":m+="\f";break;case"n":m+=`
|
|||
|
`;break;case"r":m+="\r";break;case"t":m+=" ";break;case"v":m+="\v";break;case"'":m+="'";break;case'"':m+='"';break;case"\\":m+="\\";break}else return null;else m+=X}return m}function S(I){for(var D="",m=0;m<I.length;m++)switch(I.charAt(m)){case"'":D+="\\'";break;case"\\":D+="\\\\";break;case"\b":D+="\\b";break;case"\f":D+="\\f";break;case`
|
|||
|
`:D+="\\n";break;case"\r":D+="\\r";break;case" ":D+="\\t";break;case"\v":D+="\\v";break;default:D+=I.charAt(m);break}return D}function y(I){var D=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(D,16);case"0b":return parseInt(D,2);case"0o":return parseInt(D,8);case"0'":return w(D)[0];default:return parseFloat(I)}}var N={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function L(I,D){return I.get_flag("char_conversion").id==="on"?D.replace(/./g,function(m){return I.get_char_conversion(m)}):D}function H(I){this.thread=I,this.text="",this.tokens=[]}H.prototype.set_last_tokens=function(I){return this.tokens=I},H.prototype.new_text=function(I){this.text=I,this.tokens=[]},H.prototype.get_tokens=function(I){var D,m=0,F=0,X=0,ee=[],ie=!1;if(I){var Ae=this.tokens[I-1];m=Ae.len,D=L(this.thread,this.text.substr(Ae.len)),F=Ae.line,X=Ae.start}else D=this.text;if(/^\s*$/.test(D))return null;for(;D!=="";){var Fe=[],_e=!1;if(/^\n/.exec(D)!==null){F++,X=0,m++,D=D.replace(/\n/,""),ie=!0;continue}for(var Ct in N)if(N.hasOwnProperty(Ct)){var vt=N[Ct].exec(D);vt&&Fe.push({value:vt[0],name:Ct,matches:vt})}if(!Fe.length)return this.set_last_tokens([{value:D,matches:[],name:"lexical",line:F,start:X}]);var Ae=r(Fe,function(Ur,Rr){return Ur.value.length>=Rr.value.length?Ur:Rr});switch(Ae.start=X,Ae.line=F,D=D.replace(Ae.value,""),X+=Ae.value.length,m+=Ae.value.length,Ae.name){case"atom":Ae.raw=Ae.value,Ae.value.charAt(0)==="'"&&(Ae.value=B(Ae.value.substr(1,Ae.value.length-2),"'"),Ae.value===null&&(Ae.name="lexical",Ae.value="unknown escape sequence"));break;case"number":Ae.float=Ae.value.substring(0,2)!=="0x"&&Ae.value.match(/[.eE]/)!==null&&Ae.value!=="0'.",Ae.value=y(Ae.value),Ae.blank=_e;break;case"string":var Wt=Ae.value.charAt(0);Ae.value=B(Ae.value.substr(1,Ae.value.length-2),Wt),Ae.value===null&&(Ae.name="lexical",Ae.value="unknown escape sequence");break;case"whitespace":var cr=ee[ee.length-1];cr&&(cr.space=!0),_e=!0;continue;case"r_bracket":ee.length>0&&ee[ee.length-1].name==="l_bracket"&&(Ae=ee.pop(),Ae.name="atom",Ae.value="{}",Ae.raw="{}",Ae.space=!1);break;case"r_brace":ee.length>0&&ee[ee.length-1].name==="l_brace"&&(Ae=ee.pop(),Ae.name="atom",Ae.value="[]",Ae.raw="[]",Ae.space=!1);break}Ae.len=m,ee.push(Ae),_e=!1}var Ot=this.set_last_tokens(ee);return Ot.length===0?null:Ot};function G(I,D,m,F,X){if(!D[m])return{type:u,value:k.error.syntax(D[m-1],"expression expected",!0)};var ee;if(F==="0"){var ie=D[m];switch(ie.name){case"number":return{type:f,len:m+1,value:new k.type.Num(ie.value,ie.float)};case"variable":return{type:f,len:m+1,value:new k.type.Var(ie.value)};case"string":var Ae;switch(I.get_flag("double_quotes").id){case"atom":Ae=new _(ie.value,[]);break;case"codes":Ae=new _("[]",[]);for(var Fe=ie.value.length-1;Fe>=0;Fe--)Ae=new _(".",[new k.type.Num(n(ie.value,Fe),!1),Ae]);break;case"chars":Ae=new _("[]",[]);for(var Fe=ie.value.length-1;Fe>=0;Fe--)Ae=new _(".",[new k.type.Term(ie.value.charAt(Fe),[]),Ae]);break}return{type:f,len:m+1,value:Ae};case"l_paren":var Ot=G(I,D,m+1,I.__get_max_priority(),!0);return Ot.type!==f?Ot:D[Ot.len]&&D[Ot.len].name==="r_paren"?(Ot.len++,Ot):{type:u,derived:!0,value:k.error.syntax(D[Ot.len]?D[Ot.len]:D[Ot.len-1],") or operator expected",!D[Ot.len])};case"l_bracket":var Ot=G(I,D,m+1,I.__get_max_priority(),!0);return Ot.type!==f?Ot:D[Ot.len]&&D[Ot.len].name==="r_bracket"?(Ot.len++,Ot.value=new _("{}",[Ot.value]),Ot):{type:u,derived:!0,value:k.error.syntax(D[Ot.len]?D[Ot.len]:D[Ot.len-1],"} or operator expected",!D[Ot.len])}}var _e=te(I,D,m,X);return _e.type===f||_e.derived||(_e=fe(I,D,m),_e.type===f||_e.derived)?_e
|
|||
|
`;D+=`
|
|||
|
`;for(key in this.rules)for(m=0;m<this.rules[key].length;m++)D+=this.rules[key][m].toString(I),D+=`
|
|||
|
`;return D},Be.prototype.clone=function(){return new Be(this.id)},Ne.prototype.clone=function(){return new Ne(this.value,this.is_float)},_.prototype.clone=function(){return new _(this.id,s(this.args,function(I){return I.clone()}))},rt.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},We.prototype.clone=function(){var I={};for(var D in this.links)!this.links.hasOwnProperty(D)||(I[D]=this.links[D].clone());return new We(I)},Re.prototype.clone=function(){return new Re(this.goal.clone(),this.substitution.clone(),this.parent)},yt.prototype.clone=function(){return new yt(this.head.clone(),this.body!==null?this.body.clone():null)},Be.prototype.equals=function(I){return k.type.is_variable(I)&&this.id===I.id},Ne.prototype.equals=function(I){return k.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},_.prototype.equals=function(I){if(!k.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var D=0;D<this.args.length;D++)if(!this.args[D].equals(I.args[D]))return!1;return!0},rt.prototype.equals=function(I){return k.type.is_stream(I)&&this.id===I.id},We.prototype.equals=function(I){var D;if(!k.type.is_substitution(I))return!1;for(D in this.links)if(!!this.links.hasOwnProperty(D)&&(!I.links[D]||!this.links[D].equals(I.links[D])))return!1;for(D in I.links)if(!!I.links.hasOwnProperty(D)&&!this.links[D])return!1;return!0},Re.prototype.equals=function(I){return k.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},yt.prototype.equals=function(I){return k.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},Be.prototype.rename=function(I){return I.get_free_variable(this)},Ne.prototype.rename=function(I){return this},_.prototype.rename=function(I){return new _(this.id,s(this.args,function(D){return D.rename(I)}))},rt.prototype.rename=function(I){return this},yt.prototype.rename=function(I){return new yt(this.head.rename(I),this.body!==null?this.body.rename(I):null)},Be.prototype.variables=function(){return[this.id]},Ne.prototype.variables=function(){return[]},_.prototype.variables=function(){return[].concat.apply([],s(this.args,function(I){return I.variables()}))},rt.prototype.variables=function(){return[]},yt.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Be.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},Ne.prototype.apply=function(I){return this},_.prototype.apply=function(I){if(this.indicator==="./2"){for(var D=[],m=this;m.indicator==="./2";)D.push(m.args[0].apply(I)),m=m.args[1];for(var F=m.apply(I),X=D.length-1;X>=0;X--)F=new _(".",[D[X],F]);return F}return new _(this.id,s(this.args,function(ee){return ee.apply(I)}),this.ref)},rt.prototype.apply=function(I){return this},yt.prototype.apply=function(I){return new yt(this.head.apply(I),this.body!==null?this.body.apply(I):null)},We.prototype.apply=function(I){var D,m={};for(D in this.links)!this.links.hasOwnProperty(D)||(m[D]=this.links[D].apply(I));return new We(m)},_.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},_.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new _(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new _(",",[I,this.args[1]]):I},_.prototype.search=function(I){if(k.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var D=0;D<this.args.length;D++)if(k.type.is_term(this.args[D])&&this.args[D].search(I))return!0;return!1},nt.prototype.get_current_input=function(){return this.current_input},Ze.prototype.get_current_input=function(){return this.session.get_current_input()},nt.prototype.get_current_output=function(){return this.current_output},Ze.prototype.get_current_output=function(){return this.session.get_current_output()},nt.prototype.set_current_input=function(I){this.current_input=I},Ze.prototype.set_current_input=function(I){return
|
|||
|
`,[])])])),D.substitution,D)])},"nl/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _("put_char",[F,new _(`
|
|||
|
`,[])])),D.substitution,D)])},"get_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("get_byte",[new Be("S"),F])])),D.substitution,D)])},"get_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(k.type.is_variable(F))I.throw_error(k.error.instantiation(m.indicator));else if(!k.type.is_variable(X)&&!k.type.is_byte(X))I.throw_error(k.error.type("in_byte",char,m.indicator));else if(!k.type.is_stream(F)&&!k.type.is_atom(F))I.throw_error(k.error.domain("stream_or_alias",F,m.indicator));else if(!k.type.is_stream(ee)||ee.stream===null)I.throw_error(k.error.existence("stream",F,m.indicator));else if(ee.output)I.throw_error(k.error.permission("input","stream",F,m.indicator));else if(ee.type==="text")I.throw_error(k.error.permission("input","text_stream",F,m.indicator));else if(ee.position==="past_end_of_stream"&&ee.eof_action==="error")I.throw_error(k.error.permission("input","past_end_of_stream",F,m.indicator));else{var ie;if(ee.position==="end_of_stream")ie="end_of_file",ee.position="past_end_of_stream";else{if(ie=ee.stream.get_byte(ee.position),ie===null){I.throw_error(k.error.representation("byte",m.indicator));return}ee.position++}I.prepend([new Re(D.goal.replace(new _("=",[new Ne(ie,!1),X])),D.substitution,D)])}},"peek_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("peek_byte",[new Be("S"),F])])),D.substitution,D)])},"peek_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(k.type.is_variable(F))I.throw_error(k.error.instantiation(m.indicator));else if(!k.type.is_variable(X)&&!k.type.is_byte(X))I.throw_error(k.error.type("in_byte",char,m.indicator));else if(!k.type.is_stream(F)&&!k.type.is_atom(F))I.throw_error(k.error.domain("stream_or_alias",F,m.indicator));else if(!k.type.is_stream(ee)||ee.stream===null)I.throw_error(k.error.existence("stream",F,m.indicator));else if(ee.output)I.throw_error(k.error.permission("input","stream",F,m.indicator));else if(ee.type==="text")I.throw_error(k.error.permission("input","text_stream",F,m.indicator));else if(ee.position==="past_end_of_stream"&&ee.eof_action==="error")I.throw_error(k.error.permission("input","past_end_of_stream",F,m.indicator));else{var ie;if(ee.position==="end_of_stream")ie="end_of_file",ee.position="past_end_of_stream";else if(ie=ee.stream.get_byte(ee.position),ie===null){I.throw_error(k.error.representation("byte",m.indicator));return}I.prepend([new Re(D.goal.replace(new _("=",[new Ne(ie,!1),X])),D.substitution,D)])}},"put_byte/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_output",[new Be("S")]),new _("put_byte",[new Be("S"),F])])),D.substitution,D)])},"put_byte/2":function(I,D,m){var F=m.args[0],X=m.args[1],ee=k.type.is_stream(F)?F:I.get_stream_by_alias(F.id);k.type.is_variable(F)||k.type.is_variable(X)?I.throw_error(k.error.instantiation(m.indicator)):k.type.is_byte(X)?!k.type.is_variable(F)&&!k.type.is_stream(F)&&!k.type.is_atom(F)?I.throw_error(k.error.domain("stream_or_alias",F,m.indicator)):!k.type.is_stream(ee)||ee.stream===null?I.throw_error(k.error.existence("stream",F,m.indicator)):ee.input?I.throw_error(k.error.permission("output","stream",F,m.indicator)):ee.type==="text"?I.throw_error(k.error.permission("output","text_stream",F,m.indicator)):ee.stream.put_byte(X.value,ee.position)&&(typeof ee.position=="number"&&ee.position++,I.success(D)):I.throw_error(k.error.type("byte",X,m.indicator))},"read/1":function(I,D,m){var F=m.args[0];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_input",[new Be("S")]),new _("read_term",[new Be("S"),F,new _("[]",[])])])),D.substitution,D)])},"read/2":function(I,D,m){var F=m.args[0],X=m.args[1];I.prepend([new Re(D.goal.replace(new _("read_term",[F,X,new _("[]",[])])),D.substitution,D)])},"read_term/2":function(I,D,m){var F=m.args[0],X=m.args[1];I.prepend([new Re(D.goal.replace(new _(",",[new _("current_in
|
|||
|
`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${u0(s)}).
|
|||
|
`,e+=`workspace_ident(${u0(s)}, ${u0(W.stringifyIdent(r.locator))}).
|
|||
|
`,e+=`workspace_version(${u0(s)}, ${u0(r.manifest.version)}).
|
|||
|
`;for(let o of gde)for(let n of r.manifest[o].values())e+=`workspace_has_dependency(${u0(s)}, ${u0(W.stringifyIdent(n))}, ${u0(n.range)}, ${o}).
|
|||
|
`}return e+=`workspace(_) :- false.
|
|||
|
`,e+=`workspace_ident(_, _) :- false.
|
|||
|
`,e+=`workspace_version(_, _) :- false.
|
|||
|
`,e+=`workspace_has_dependency(_, _, _, _) :- false.
|
|||
|
`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false.
|
|||
|
`,e+=`gen_enforced_field(_, _, _) :- false.
|
|||
|
`,e}get fullSource(){return`${this.getProjectDatabase()}
|
|||
|
${this.source}
|
|||
|
${this.getDeclarations()}`}createSession(){return new hde(this.project,this.fullSource)}async process(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let o=$.resolve(this.project.cwd,wd(s.links.WorkspaceCwd)),n=wd(s.links.DependencyIdent),l=wd(s.links.DependencyRange),u=wd(s.links.DependencyType);if(o===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(o),g=W.parseIdent(n);r.push({workspace:f,dependencyIdent:g,dependencyRange:l,dependencyType:u})}return it.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>W.stringifyIdent(s.locator),({dependencyIdent:s})=>W.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let o=$.resolve(this.project.cwd,wd(s.links.WorkspaceCwd)),n=wd(s.links.FieldPath),l=cpt(s.links.FieldValue);if(o===null||n===null)throw new Error("Invalid rule");let u=this.project.getWorkspaceByCwd(o);r.push({workspace:u,fieldPath:n,fieldValue:l})}return it.sortMap(r,[({workspace:s})=>W.stringifyIdent(s.locator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let o={};for(let[n,l]of Object.entries(s.links))n!=="_"&&(o[n]=wd(l));yield o}}}});var Rde=K(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});function TB(t){let e=[...t.caches],r=e.shift();return r===void 0?Fde():{get(s,o,n={miss:()=>Promise.resolve()}){return r.get(s,o,n).catch(()=>TB({caches:e}).get(s,o,n))},set(s,o){return r.set(s,o).catch(()=>TB({caches:e}).set(s,o))},delete(s){return r.delete(s).catch(()=>TB({caches:e}).delete(s))},clear(){return r.clear().catch(()=>TB({caches:e}).clear())}}}function Fde(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(o=>Promise.all([o,r.miss(o)])).then(([o])=>o)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}HS.createFallbackableCache=TB;HS.createNullCache=Fde});var Nde=K((cYt,Tde)=>{Tde.exports=Rde()});var Mde=K(j3=>{"use strict";Object.defineProperty(j3,"__esModule",{value:!0});function Fpt(t={serializable:!0}){let e={};return{get(r,s,o={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let l=s(),u=o&&o.miss||(()=>Promise.resolve());return l.then(f=>u(f)).then(()=>l)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}j3.createInMemoryCache=Fpt});var Ode=K((fYt,Lde)=>{Lde.exports=Mde()});var _de=K(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});function Rpt(t,e,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===G3.WithinHeaders?s:{}},queryParameters(){return t===G3.WithinQueryParameters?s:{}}}}function Tpt(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function Ude(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return Ude(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function Npt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function Mpt(t,e){return Object.keys(e!==void 0?e:{}).forEach(r=>{t[r]=e[r](t)}),t}function Lpt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var Opt="4.2.0",Upt=t=>()=>t.transporter.requester.destroy(),G3={WithinQueryParameters:0,WithinHeaders:1};bc.AuthMode=G3;bc.addMethods=Mpt;bc.createAuth=Rpt;bc.createRetryablePromise=Tpt;bc.createWaitablePromise=Ude;bc.destroy=Upt;bc.encode=Lpt;bc.shuffle=Npt;bc.version=Opt});var NB=K((pYt,Kde)=>{Kde.ex
|
|||
|
`;u!==s&&(s=u,t.write(pye.default.eraseLines(r)+u),r=u.split(`
|
|||
|
`).length)};return n.clear=()=>{t.write(pye.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,e||(hye.default.show(),o=!1)},n};JB.default={create:Ght}});var yye=K((qYt,mye)=>{mye.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var Eye=K($A=>{"use strict";var Cye=yye(),ju=process.env;Object.defineProperty($A,"_vendors",{value:Cye.map(function(t){return t.constant})});$A.name=null;$A.isPR=null;Cye.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return Iye(s)});if($A[t.constant]=r,r)switch($A.name=t.name,typeof t.pr){case"string":$A.isPR=!!ju[t.pr];break;case"object":"env"in t.pr?$A.isPR=t.pr.env in ju&&ju[t.pr.env]!==t.pr.ne:"any"in t.pr?$A.isPR=t.pr.any.some(function(s){return!!ju[s]}):$A.isPR=Iye(t.pr);break;default:$A.isPR=null}});$A.isCI=!!(ju.CI||ju.CONTINUOUS_INTEGRATION||ju.BUILD_NUMBER||ju.RUN_ID||$A.name);function Iye(t){return typeof t=="string"?!!ju[t]:Object.keys(t).every(function(e){return ju[e]===t[e]})}});var Bye=K((GYt,wye)=>{"use strict";wye.exports=Eye().isCI});var vye=K((YYt,Qye)=>{"use strict";var Yht=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};Qye.exports=(t,{include:e,exclude:r}={})=>{let s=o=>{let n=l=>typeof l=="string"?o===l:l.test(o);return e?e.some(n):r?!r.some(n):!0};for(let[o,n]of Yht(t.constructor.prototype)){if(n==="constructor"||!s(n))continue;let l=Reflect.getOwnPropertyDescriptor(o,n);l&&typeof l.value=="function"&&(t[n]=t[n].bind(t))}return t}});var Fye=K(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});var lC,VB,rx,nx,k8;typeof window=="undefined"||typeof MessageChannel!="function"?(cC=null,S8=null,x8=function(){if(cC!==null)try{var t=jn.unstable_now();cC(!0,t),cC=null}catch(e){throw setTimeout(x8,0),e}},Dye=Date.now(),jn.unstable_now=function(){return Date.now()-Dye},lC=function(t){cC!==null?setTimeout(lC,0,t):(cC=t,setTimeout(x8,0))},VB=function(t,e){S8=setTimeout(t,e)},rx=function(){clearTimeout(S8)},nx=function(){return!1},k8=jn.unstable_forceFrameRate=function(){}):(ix=wi
|
|||
|
in `+(q||"Unknown")+pe}Q+=R,v=v.return}while(v);return Q}new Set;var il=[],zn=-1;function Ai(v){0>zn||(v.current=il[zn],il[zn]=null,zn--)}function rr(v,Q){zn++,il[zn]=v.current,v.current=Q}var Oi={},Xn={current:Oi},hs={current:!1},Ft=Oi;function Xi(v,Q){var R=v.type.contextTypes;if(!R)return Oi;var q=v.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===Q)return q.__reactInternalMemoizedMaskedChildContext;var V={},pe;for(pe in R)V[pe]=Q[pe];return q&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=Q,v.__reactInternalMemoizedMaskedChildContext=V),V}function Fn(v){return v=v.childContextTypes,v!=null}function ds(v){Ai(hs,v),Ai(Xn,v)}function IA(v){Ai(hs,v),Ai(Xn,v)}function Pr(v,Q,R){if(Xn.current!==Oi)throw Error(n(168));rr(Xn,Q,v),rr(hs,R,v)}function Fo(v,Q,R){var q=v.stateNode;if(v=Q.childContextTypes,typeof q.getChildContext!="function")return R;q=q.getChildContext();for(var V in q)if(!(V in v))throw Error(n(108,Ce(Q)||"Unknown",V));return r({},R,{},q)}function mr(v){var Q=v.stateNode;return Q=Q&&Q.__reactInternalMemoizedMergedChildContext||Oi,Ft=Xn.current,rr(Xn,Q,v),rr(hs,hs.current,v),!0}function Ka(v,Q,R){var q=v.stateNode;if(!q)throw Error(n(169));R?(Q=Fo(v,Q,Ft),q.__reactInternalMemoizedMergedChildContext=Q,Ai(hs,v),Ai(Xn,v),rr(Xn,Q,v)):Ai(hs,v),rr(hs,R,v)}var Z=o.unstable_runWithPriority,nn=o.unstable_scheduleCallback,we=o.unstable_cancelCallback,qt=o.unstable_shouldYield,sl=o.unstable_requestPaint,Zi=o.unstable_now,$l=o.unstable_getCurrentPriorityLevel,Vt=o.unstable_ImmediatePriority,EA=o.unstable_UserBlockingPriority,Yc=o.unstable_NormalPriority,tf=o.unstable_LowPriority,ol=o.unstable_IdlePriority,Wc={},On=sl!==void 0?sl:function(){},wi=null,al=null,Jc=!1,la=Zi(),$i=1e4>la?Zi:function(){return Zi()-la};function Ro(){switch($l()){case Vt:return 99;case EA:return 98;case Yc:return 97;case tf:return 96;case ol:return 95;default:throw Error(n(332))}}function at(v){switch(v){case 99:return Vt;case 98:return EA;case 97:return Yc;case 96:return tf;case 95:return ol;default:throw Error(n(332))}}function io(v,Q){return v=at(v),Z(v,Q)}function Ha(v,Q,R){return v=at(v),nn(v,Q,R)}function ec(v){return wi===null?(wi=[v],al=nn(Vt,qa)):wi.push(v),Wc}function ji(){if(al!==null){var v=al;al=null,we(v)}qa()}function qa(){if(!Jc&&wi!==null){Jc=!0;var v=0;try{var Q=wi;io(99,function(){for(;v<Q.length;v++){var R=Q[v];do R=R(!0);while(R!==null)}}),wi=null}catch(R){throw wi!==null&&(wi=wi.slice(v+1)),nn(Vt,ji),R}finally{Jc=!1}}}var wA=3;function br(v,Q,R){return R/=10,1073741821-(((1073741821-v+Q/10)/R|0)+1)*R}function BA(v,Q){return v===Q&&(v!==0||1/v==1/Q)||v!==v&&Q!==Q}var vs=typeof Object.is=="function"?Object.is:BA,jt=Object.prototype.hasOwnProperty;function Rn(v,Q){if(vs(v,Q))return!0;if(typeof v!="object"||v===null||typeof Q!="object"||Q===null)return!1;var R=Object.keys(v),q=Object.keys(Q);if(R.length!==q.length)return!1;for(q=0;q<R.length;q++)if(!jt.call(Q,R[q])||!vs(v[R[q]],Q[R[q]]))return!1;return!0}function hi(v,Q){if(v&&v.defaultProps){Q=r({},Q),v=v.defaultProps;for(var R in v)Q[R]===void 0&&(Q[R]=v[R])}return Q}var ca={current:null},so=null,Ds=null,ua=null;function nr(){ua=Ds=so=null}function fa(v,Q){var R=v.type._context;k?(rr(ca,R._currentValue,v),R._currentValue=Q):(rr(ca,R._currentValue2,v),R._currentValue2=Q)}function ks(v){var Q=ca.current;Ai(ca,v),v=v.type._context,k?v._currentValue=Q:v._currentValue2=Q}function oo(v,Q){for(;v!==null;){var R=v.alternate;if(v.childExpirationTime<Q)v.childExpirationTime=Q,R!==null&&R.childExpirationTime<Q&&(R.childExpirationTime=Q);else if(R!==null&&R.childExpirationTime<Q)R.childExpirationTime=Q;else break;v=v.return}}function ao(v,Q){so=v,ua=Ds=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.expirationTime>=Q&&(da=!0),v.firstContext=null)}function Ao(v,Q){if(ua!==v&&Q!==!1&&Q!==0)if((typeof Q!="number"||Q===1073741823)&&(ua=v,Q=1073741823),Q={context:v,observedBits:Q,next:null},Ds===null){if(so===null)throw Error(n(308));Ds=Q,so.dependencies={expirationTime:0,firstContext:Q,responders:null}}else Ds=Ds.next=Q;return k?v._currentValue:v._cur
|
|||
|
|
|||
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+nl(V))}ms!==ac&&(ms=_i),pe=N0(pe,V),kt=q;do{switch(kt.tag){case 3:be=pe,kt.effectTag|=4096,kt.expirationTime=Q;var et=R2(kt,be,Q);Al(kt,et);break e;case 1:be=pe;var Et=kt.type,Zt=kt.stateNode;if((kt.effectTag&64)==0&&(typeof Et.getDerivedStateFromError=="function"||Zt!==null&&typeof Zt.componentDidCatch=="function"&&(ru===null||!ru.has(Zt)))){kt.effectTag|=4096,kt.expirationTime=Q;var Fr=T2(kt,be,Q);Al(kt,Fr);break e}}kt=kt.return}while(kt!==null)}Jr=U2(Jr)}catch(Un){Q=Un;continue}break}while(1)}function gf(){var v=Vg.current;return Vg.current=Lo,v===null?Lo:v}function GC(v,Q){v<xA&&2<v&&(xA=v),Q!==null&&v<af&&2<v&&(af=v,Yd=Q)}function zd(v){v>zg&&(zg=v)}function xb(){for(;Jr!==null;)Jr=O2(Jr)}function bb(){for(;Jr!==null&&!qt();)Jr=O2(Jr)}function O2(v){var Q=K2(v.alternate,v,Ps);return v.memoizedProps=v.pendingProps,Q===null&&(Q=U2(v)),_C.current=null,Q}function U2(v){Jr=v;do{var Q=Jr.alternate;if(v=Jr.return,(Jr.effectTag&2048)==0){e:{var R=Q;Q=Jr;var q=Ps,V=Q.pendingProps;switch(Q.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:Fn(Q.type)&&ds(Q);break;case 3:ul(Q),IA(Q),V=Q.stateNode,V.pendingContext&&(V.context=V.pendingContext,V.pendingContext=null),(R===null||R.child===null)&&DA(Q)&&za(Q),pl(Q);break;case 5:Hg(Q);var pe=pa(cl.current);if(q=Q.type,R!==null&&Q.stateNode!=null)xs(R,Q,q,V,pe),R.ref!==Q.ref&&(Q.effectTag|=128);else if(V){if(R=pa(lo.current),DA(Q)){if(V=Q,!m)throw Error(n(175));R=Lg(V.stateNode,V.type,V.memoizedProps,pe,R,V),V.updateQueue=R,R=R!==null,R&&za(Q)}else{var be=Bt(q,V,pe,R,Q);sc(be,Q,!1,!1),Q.stateNode=be,Ye(be,q,V,pe,R)&&za(Q)}Q.ref!==null&&(Q.effectTag|=128)}else if(Q.stateNode===null)throw Error(n(166));break;case 6:if(R&&Q.stateNode!=null)en(R,Q,R.memoizedProps,V);else{if(typeof V!="string"&&Q.stateNode===null)throw Error(n(166));if(R=pa(cl.current),pe=pa(lo.current),DA(Q)){if(R=Q,!m)throw Error(n(176));(R=Og(R.stateNode,R.memoizedProps,R))&&za(Q)}else Q.stateNode=yt(V,R,pe,Q)}break;case 11:break;case 13:if(Ai(ci,Q),V=Q.memoizedState,(Q.effectTag&64)!=0){Q.expirationTime=q;break e}V=V!==null,pe=!1,R===null?Q.memoizedProps.fallback!==void 0&&DA(Q):(q=R.memoizedState,pe=q!==null,V||q===null||(q=R.child.sibling,q!==null&&(be=Q.firstEffect,be!==null?(Q.firstEffect=q,q.nextEffect=be):(Q.firstEffect=Q.lastEffect=q,q.nextEffect=null),q.effectTag=8))),V&&!pe&&(Q.mode&2)!=0&&(R===null&&Q.memoizedProps.unstable_avoidThisFallback!==!0||(ci.current&1)!=0?ms===eu&&(ms=Xa):((ms===eu||ms===Xa)&&(ms=hl),zg!==0&&Ti!==null&&(df(Ti,Ps),q2(Ti,zg)))),D&&V&&(Q.effectTag|=4),I&&(V||pe)&&(Q.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:ul(Q),pl(Q);break;case 10:ks(Q);break;case 9:break;case 14:break;case 17:Fn(Q.type)&&ds(Q);break;case 19:if(Ai(ci,Q),V=Q.memoizedState,V===null)break;if(pe=(Q.effectTag&64)!=0,be=V.rendering,be===null){if(pe)oc(V,!1);else if(ms!==eu||R!==null&&(R.effectTag&64)!=0)for(R=Q.child;R!==null;){if(be=rf(R),be!==null){for(Q.effectTag|=64,oc(V,!1),R=be.updateQueue,R!==null&&(Q.updateQueue=R,Q.effectTag|=4),V.lastEffect===null&&(Q.firstEffect=null),Q.lastEffect=V.lastEffect,R=q,V=Q.child;V!==null;)pe=V,q=R,pe.effectTag&=2,pe.nextEffect=null,pe.firstEffect=null,pe.lastEffect=null,be=pe.alternate,be===null?(pe.childExpirationTime=0,pe.expirationTime=q,pe.child=null,pe.memoizedProps=null,pe.memoizedState=null,pe.updateQueue=null,pe.dependencies=null):(pe.childExpirationTime=be.childExpirationTime,pe.expirationTime=be.expirationTime,pe.child=be.child,pe.memoizedProps=be.memoizedProps,pe.memoizedState=be.memoizedState,pe.updateQueue=be.updateQueue,q=be.dependencies,pe.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),V=V.sibling;rr(ci,ci.current&1|2,Q),Q=Q.child;break e}R=R.sibling}}else{if(!pe)if(R=rf(be),R!==null){if(Q.effectTag|=64,pe=!0,R=R.updateQueue,R!==null&&(Q.updateQueue=R,Q.effectTag|=4),oc(V,!0),V.tail===null&&V.tailMode==="hidden"&&!be.alternate){Q=Q.lastEffect=V.lastEff
|
|||
|
`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,o=new Array(s),n=stringToUTF8Array(t,o,0,o.length);return e&&(o.length=n),o}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,o;r&&(o=e+lengthBytesUTF8(t),s=HEAP8[o]),stringToUTF8(t,e,Infinity),r&&(HEAP8[o]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;func
|
|||
|
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var vd=K(($Yt,jye)=>{"use strict";var Zht=Hye(),$ht=qye(),_8=!1,K8=null;$ht({},function(t,e){if(!_8){if(_8=!0,t)throw t;K8=e}});if(!_8)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");jye.exports=Zht(K8.bind,K8.lib)});var q8=K((e7t,H8)=>{"use strict";var Gye=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);H8.exports=Gye;H8.exports.default=Gye});var Wye=K((t7t,Yye)=>{"use strict";Yye.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD8
|
|||
|
`))e=Math.max(e,ndt(r));return e};G8.exports=Vye;G8.exports.default=Vye});var zye=K(e1=>{"use strict";var idt=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,"__esModule",{value:!0});var sdt=idt(Y8()),W8={};e1.default=t=>{if(t.length===0)return{width:0,height:0};if(W8[t])return W8[t];let e=sdt.default(t),r=t.split(`
|
|||
|
`).length;return W8[t]={width:e,height:r},{width:e,height:r}}});var Xye=K(t1=>{"use strict";var odt=t1&&t1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t1,"__esModule",{value:!0});var bn=odt(vd()),adt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},Adt=(t,e)=>{"marginLeft"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},ldt=(t,e)=>{"paddingLeft"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},cdt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},udt=(t,e)=>{var r,s;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},fdt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},gdt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};t1.default=(t,e={})=>{adt(t,e),Adt(t,e),ldt(t,e),cdt(t,e),udt(t,e),fdt(t,e),gdt(t,e)}});var eCe=K((o7t,Zye)=>{"use strict";var r1=fx(),pdt=xv(),hdt=eE(),J8=new Set(["","\x9B"]),ddt=39,$ye=t=>`${J8.values().next().value}[${t}m`,mdt=t=>t.split(" ").map(e=>r1(e)),V8=(t,e,r)=>{let s=[...e],o=!1,n=r1(pdt(t[t.length-1]));for(let[l,u]of s.entries()){let f=r1(u);if
|
|||
|
`);for(let[f,g]of[...s].entries()){if(o+=g,J8.has(g)){let w=parseFloat(/\d[^m]*/.exec(s.slice(f,f+4)));n=w===ddt?null:w}let C=hdt.codes.get(Number(n));n&&C&&(s[f+1]===`
|
|||
|
`?o+=$ye(C):g===`
|
|||
|
`&&(o+=$ye(n)))}return o};Zye.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|||
|
`).split(`
|
|||
|
`).map(s=>Cdt(s,e,r)).join(`
|
|||
|
`)});var nCe=K((a7t,tCe)=>{"use strict";var rCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Idt=t=>t&&t.exact?new RegExp(`^${rCe}$`):new RegExp(rCe,"g");tCe.exports=Idt});var z8=K((A7t,iCe)=>{"use strict";var Edt=q8(),wdt=nCe(),sCe=eE(),oCe=["","\x9B"],gx=t=>`${oCe[0]}[${t}m`,aCe=(t,e,r)=>{let s=[];t=[...t];for(let o of t){let n=o;o.match(";")&&(o=o.split(";")[0][0]+"0");let l=sCe.codes.get(parseInt(o,10));if(l){let u=t.indexOf(l.toString());u>=0?t.splice(u,1):s.push(gx(e?l:n))}else if(e){s.push(gx(0));break}else s.push(gx(n))}if(e&&(s=s.filter((o,n)=>s.indexOf(o)===n),r!==void 0)){let o=gx(sCe.codes.get(parseInt(r,10)));s=s.reduce((n,l)=>l===o?[l,...n]:[...n,l],[])}return s.join("")};iCe.exports=(t,e,r)=>{let s=[...t.normalize()],o=[];r=typeof r=="number"?r:s.length;let n=!1,l,u=0,f="";for(let[g,C]of s.entries()){let w=!1;if(oCe.includes(C)){let B=/\d[^m]*/.exec(t.slice(g,g+18));l=B&&B.length>0?B[0]:void 0,u<r&&(n=!0,l!==void 0&&o.push(l))}else n&&C==="m"&&(n=!1,w=!0);if(!n&&!w&&++u,!wdt({exact:!0}).test(C)&&Edt(C.codePointAt())&&++u,u>e&&u<=r)f+=C;else if(u===e&&!n&&l!==void 0)f=aCe(o);else if(u>=r){f+=aCe(o,!0,l);break}}return f}});var lCe=K((l7t,ACe)=>{"use strict";var p0=z8(),Bdt=fx();function px(t,e,r){if(t.charAt(e)===" ")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===" ")return e+s}else if(t.charAt(e-s)===" ")return e-s;return e}ACe.exports=(t,e,r)=>{r=re({position:"end",preferTruncationOnSpace:!1},r);let{position:s,space:o,preferTruncationOnSpace:n}=r,l="\u2026",u=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return l;let f=Bdt(t);if(f<=e)return t;if(s==="start"){if(n){let g=px(t,f-e+1,!0);return l+p0(t,g,f).trim()}return o===!0&&(l+=" ",u=2),l+p0(t,f-e+u,f)}if(s==="middle"){o===!0&&(l=" "+l+" ",u=3);let g=Math.floor(e/2);if(n){let C=px(t,g),w=px(t,f-(e-g)+1,!0);return p0(t,0,C)+l+p0(t,w,f).trim()}return p0(t,0,g)+l+p0(t,f-(e-g)+u,f)}if(s==="end"){if(n){let g=px(t,e-1);return p0(t,0,g)+l}return o===!0&&(l=" "+l,u=2),p0(t,0,e-u)+l}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var Z8=K(n1=>{"use strict";var cCe=n1&&n1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n1,"__esModule",{value:!0});var Qdt=cCe(eCe()),vdt=cCe(lCe()),X8={};n1.default=(t,e,r)=>{let s=t+String(e)+String(r);if(X8[s])return X8[s];let o=t;if(r==="wrap"&&(o=Qdt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),o=vdt.default(t,e,{position:n})}return X8[s]=o,o}});var e_=K($8=>{"use strict";Object.defineProperty($8,"__esModule",{value:!0});var uCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=uCe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),e+=s}return e};$8.default=uCe});var t_=K(Pi=>{"use strict";var i1=Pi&&Pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.setTextNodeValue=Pi.createTextNode=Pi.setStyle=Pi.setAttribute=Pi.removeChildNode=Pi.insertBeforeNode=Pi.appendChildNode=Pi.createNode=Pi.TEXT_NAME=void 0;var Ddt=i1(vd()),fCe=i1(zye()),kdt=i1(Xye()),Sdt=i1(Z8()),xdt=i1(e_());Pi.TEXT_NAME="#text";Pi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:Ddt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(bdt.bind(null,r))),r};Pi.appendChildNode=(t,e)=>{var r;e.parentNode&&Pi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&hx(t)};Pi.insertBefore
|
|||
|
`:`
|
|||
|
`)+r,o=s+1,s=t.indexOf(`
|
|||
|
`,o)}while(s!==-1);return n+=t.substr(o),n};DCe.exports={stringReplaceAll:Rdt,stringEncaseCRLFWithFirstIndex:Tdt}});var FCe=K((C7t,SCe)=>{"use strict";var Ndt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,xCe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Mdt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Ldt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Odt=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function bCe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Odt.get(t)||t}function Udt(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),o;for(let n of s){let l=Number(n);if(!Number.isNaN(l))r.push(l);else if(o=n.match(Mdt))r.push(o[2].replace(Ldt,(u,f,g)=>f?bCe(f):g));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function _dt(t){xCe.lastIndex=0;let e=[],r;for(;(r=xCe.exec(t))!==null;){let s=r[1];if(r[2]){let o=Udt(s,r[2]);e.push([s].concat(o))}else e.push([s])}return e}function PCe(t,e){let r={};for(let o of e)for(let n of o.styles)r[n[0]]=o.inverse?null:n.slice(1);let s=t;for(let[o,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(o in s))throw new Error(`Unknown Chalk style: ${o}`);s=n.length>0?s[o](...n):s[o]}return s}SCe.exports=(t,e)=>{let r=[],s=[],o=[];if(e.replace(Ndt,(n,l,u,f,g,C)=>{if(l)o.push(bCe(l));else if(f){let w=o.join("");o=[],s.push(r.length===0?w:PCe(t,r)(w)),r.push({inverse:u,styles:_dt(f)})}else if(g){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(PCe(t,r)(o.join(""))),o=[],r.pop()}else o.push(C)}),s.push(o.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var Ex=K((I7t,RCe)=>{"use strict";var a1=eE(),{stdout:n_,stderr:i_}=kR(),{stringReplaceAll:Kdt,stringEncaseCRLFWithFirstIndex:Hdt}=kCe(),{isArray:mx}=Array,TCe=["ansi","ansi","ansi256","ansi16m"],uC=Object.create(null),qdt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=n_?n_.level:0;t.level=e.level===void 0?r:e.level},NCe=class{constructor(e){return MCe(e)}},MCe=t=>{let e={};return qdt(e,t),e.template=(...r)=>LCe(e.template,...r),Object.setPrototypeOf(e,yx.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=NCe,e.template};function yx(t){return MCe(t)}for(let[t,e]of Object.entries(a1))uC[t]={get(){let r=Cx(this,s_(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};uC.visible={get(){let t=Cx(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var OCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of OCe)uC[t]={get(){let{level:e}=this;return function(...r){let s=s_(a1.color[TCe[e]][t](...r),a1.color.close,this._styler);return Cx(this,s,this._isEmpty)}}};for(let t of OCe){let e="bg"+t[0].toUpperCase()+t.slice(1);uC[e]={get(){let{level:r}=this;return function(...s){let o=s_(a1.bgColor[TCe[r]][t](...s),a1.bgColor.close,this._styler);return Cx(this,o,this._isEmpty)}}}}var jdt=Object.defineProperties(()=>{},Te(re({},uC),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),s_=(t,e,r)=>{let s,o;return r===void 0?(s=t,o=e):(s=r.openAll+t,o=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:o,parent:r}},Cx=(t,e,r)=>{let s=(...o)=>mx(o[0])&&mx(o[0].raw)?UCe(s,LCe(s,...o)):UCe(s,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(s,jdt),s._generator=t,s._styler=e,s._isEmpty=r,s},UCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:o}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=Kdt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
|||
|
`);return n!==-1&&(e=Hdt(e,o,s,n)),s+e+o},o_,LCe=(t,...e)=>{let[r]=e;if(!mx(r)||!mx(r.raw))return e.join(" ");let s=e.slice(1),o=[r.raw[0]];for(let n=1;n<r.length;n++)o.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return o_===void 0&&(o_=FCe()),o_(t,o.join(""))};Object.defineProperties(yx.prototype,uC);var Ix=yx();Ix.supportsColor=n_;Ix.stderr=yx({level:i_?i_.level:0});Ix.stderr.supportsColor=i_;RCe.exports=Ix});var a_=K(A1=>{"use strict";var Gdt=A1&&A1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A1,"__esModule",{value:!0});var l1=Gdt(Ex()),Ydt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,Wdt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,wx=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);A1.default=(t,e,r)=>{if(!e)return t;if(e in l1.default){let o=wx(e,r);return l1.default[o](t)}if(e.startsWith("#")){let o=wx("hex",r);return l1.default[o](e)(t)}if(e.startsWith("ansi")){let o=Wdt.exec(e);if(!o)return t;let n=wx(o[1],r),l=Number(o[2]);return l1.default[n](l)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let o=Ydt.exec(e);if(!o)return t;let n=wx(o[1],r),l=Number(o[2]),u=Number(o[3]),f=Number(o[4]);return l1.default[n](l,u,f)(t)}return t}});var KCe=K(c1=>{"use strict";var _Ce=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,"__esModule",{value:!0});var Jdt=_Ce(vCe()),A_=_Ce(a_());c1.default=(t,e,r,s)=>{if(typeof r.style.borderStyle=="string"){let o=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),l=r.style.borderColor,u=Jdt.default[r.style.borderStyle],f=A_.default(u.topLeft+u.horizontal.repeat(o-2)+u.topRight,l,"foreground"),g=(A_.default(u.vertical,l,"foreground")+`
|
|||
|
`).repeat(n-2),C=A_.default(u.bottomLeft+u.horizontal.repeat(o-2)+u.bottomRight,l,"foreground");s.write(t,e,f,{transformers:[]}),s.write(t,e+1,g,{transformers:[]}),s.write(t+o-1,e+1,g,{transformers:[]}),s.write(t,e+n-1,C,{transformers:[]})}}});var qCe=K(u1=>{"use strict";var Dd=u1&&u1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u1,"__esModule",{value:!0});var Vdt=Dd(vd()),zdt=Dd(Y8()),Xdt=Dd(ICe()),Zdt=Dd(Z8()),$dt=Dd(ECe()),emt=Dd(e_()),tmt=Dd(KCe()),rmt=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let o=s.getComputedLeft(),n=s.getComputedTop();e=`
|
|||
|
`.repeat(n)+Xdt.default(e,o)}return e},HCe=(t,e,r)=>{var s;let{offsetX:o=0,offsetY:n=0,transformers:l=[],skipStaticElements:u}=r;if(u&&t.internal_static)return;let{yogaNode:f}=t;if(f){if(f.getDisplay()===Vdt.default.DISPLAY_NONE)return;let g=o+f.getComputedLeft(),C=n+f.getComputedTop(),w=l;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...l]),t.nodeName==="ink-text"){let B=emt.default(t);if(B.length>0){let S=zdt.default(B),y=$dt.default(f);if(S>y){let N=(s=t.style.textWrap)!==null&&s!==void 0?s:"wrap";B=Zdt.default(B,y,N)}B=rmt(t,B),e.write(g,C,B,{transformers:w})}return}if(t.nodeName==="ink-box"&&tmt.default(g,C,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let B of t.childNodes)HCe(B,e,{offsetX:g,offsetY:C,transformers:w,skipStaticElements:u})}};u1.default=HCe});var GCe=K((Q7t,jCe)=>{"use strict";jCe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}});var WCe=K((v7t,l_)=>{"use strict";var nmt=GCe(),YCe=t=>typeof t=="string"?t.replace(nmt(),""):t;l_.exports=YCe;l_.exports.default=YCe});var zCe=K((D7t,JCe)=>{"use strict";var VCe="[\uD800-\uDBFF][\uDC00-\uDFFF]";JCe.exports=t=>t&&t.exact?new RegExp(`^${VCe}$`):new RegExp(VCe,"g")});var ZCe=K((k7t,c_)=>{"use strict";var imt=WCe(),smt=zCe(),XCe=t=>imt(t).replace(smt()," ").length;c_.exports=XCe;c_.exports.default=XCe});var rIe=K(f1=>{"use strict";var $Ce=f1&&f1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(f1,"__esModule",{value:!0});var eIe=$Ce(z8()),omt=$Ce(ZCe()),tIe=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,o){let{transformers:n}=o;!s||this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(" ".repeat(this.width));for(let s of this.writes){let{x:o,y:n,text:l,transformers:u}=s,f=l.split(`
|
|||
|
`),g=0;for(let C of f){let w=e[n+g];if(!w)continue;let B=omt.default(C);for(let S of u)C=S(C);e[n+g]=eIe.default(w,0,o)+C+eIe.default(w,o+B),g++}}return{output:e.map(s=>s.trimRight()).join(`
|
|||
|
`),height:e.length}}};f1.default=tIe});var sIe=K(g1=>{"use strict";var u_=g1&&g1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g1,"__esModule",{value:!0});var amt=u_(vd()),nIe=u_(qCe()),iIe=u_(rIe());g1.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,amt.default.DIRECTION_LTR);let s=new iIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});nIe.default(t,s,{skipStaticElements:!0});let o;((r=t.staticNode)===null||r===void 0?void 0:r.yogaNode)&&(o=new iIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),nIe.default(t.staticNode,o,{skipStaticElements:!1}));let{output:n,height:l}=s.get();return{output:n,outputHeight:l,staticOutput:o?`${o.get().output}
|
|||
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var lIe=K((b7t,oIe)=>{"use strict";var aIe=require("stream"),AIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],f_={},Amt=t=>{let e=new aIe.PassThrough,r=new aIe.PassThrough;e.write=o=>t("stdout",o),r.write=o=>t("stderr",o);let s=new console.Console(e,r);for(let o of AIe)f_[o]=console[o],console[o]=s[o];return()=>{for(let o of AIe)console[o]=f_[o];f_={}}};oIe.exports=Amt});var p_=K(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});g_.default=new WeakMap});var d_=K(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var lmt=yn(),cIe=lmt.createContext({exit:()=>{}});cIe.displayName="InternalAppContext";h_.default=cIe});var y_=K(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var cmt=yn(),uIe=cmt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});uIe.displayName="InternalStdinContext";m_.default=uIe});var I_=K(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});var umt=yn(),fIe=umt.createContext({stdout:void 0,write:()=>{}});fIe.displayName="InternalStdoutContext";C_.default=fIe});var w_=K(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var fmt=yn(),gIe=fmt.createContext({stderr:void 0,write:()=>{}});gIe.displayName="InternalStderrContext";E_.default=gIe});var Bx=K(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var gmt=yn(),pIe=gmt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});pIe.displayName="InternalFocusContext";B_.default=pIe});var dIe=K((L7t,hIe)=>{"use strict";var pmt=/[|\\{}()[\]^$+*?.-]/g;hIe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(pmt,"\\$&")}});var IIe=K((O7t,mIe)=>{"use strict";var hmt=dIe(),yIe=[].concat(require("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\(${t}\\.js:\\d+:\\d+\\)$|^\\s*at ${t}\\.js:\\d+:\\d+$)`));yIe.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Qx=class{constructor(e){e=re({ignoredPackages:[]},e),"internals"in e||(e.internals=Qx.nodeInternals()),"cwd"in e||(e.cwd=process.cwd()),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,dmt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...yIe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
|
|||
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,o=null,n=[];return e.forEach(l=>{if(l=l.replace(/\\/g,"/"),this._internals.some(f=>f.test(l)))return;let u=/^\s*at /.test(l);s?l=l.trimEnd().replace(/^(\s+)at /,"$1"):(l=l.trim(),u&&(l=l.slice(3))),l=l.replace(`${this._cwd}/`,""),l&&(u?(o&&(n.push(o),o=null),n.push(l)):(s=!0,o=l))}),n.map(l=>`${r}${l}
|
|||
|
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=Infinity);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let o={};Error.captureStackTrace(o,r);let{stack:n}=o;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=Infinity);let{prepareStackTrace:s,stackTraceLimit:o}=Error;Error.prepareStackTrace=(u,f)=>this._wrapCallSite?f.map(this._wrapCallSite):f,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:l}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:o}),l}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};CIe(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let o;try{o=r.getTypeName()}catch(u){}o&&o!=="Object"&&o!=="[object Object]"&&(s.type=o);let n=r.getFunctionName();n&&(s.function=n);let l=r.getMethodName();return l&&n!==l&&(s.method=l),s}parseLine(e){let r=e&&e.match(mmt);if(!r)return null;let s=r[1]==="new",o=r[2],n=r[3],l=r[4],u=Number(r[5]),f=Number(r[6]),g=r[7],C=r[8],w=r[9],B=r[10]==="native",S=r[11]===")",y,N={};if(C&&(N.line=Number(C)),w&&(N.column=Number(w)),S&&g){let L=0;for(let H=g.length-1;H>0;H--)if(g.charAt(H)===")")L++;else if(g.charAt(H)==="("&&g.charAt(H-1)===" "&&(L--,L===-1&&g.charAt(H-1)===" ")){let G=g.slice(0,H-1);g=g.slice(H+1),o+=` (${G}`;break}}if(o){let L=o.match(ymt);L&&(o=L[1],y=L[2])}return CIe(N,g,this._cwd),s&&(N.constructor=!0),n&&(N.evalOrigin=n,N.evalLine=u,N.evalColumn=f,N.evalFile=l&&l.replace(/\\/g,"/")),B&&(N.native=!0),o&&(N.function=o),y&&o!==y&&(N.method=y),N}};function CIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function dmt(t){if(t.length===0)return[];let e=t.map(r=>hmt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var mmt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),ymt=/^(.*?) \[as (.*?)\]$/;mIe.exports=Qx});var wIe=K((U7t,EIe)=>{"use strict";EIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var QIe=K((_7t,BIe)=>{"use strict";var Cmt=wIe(),Imt=(t,e)=>{let r=[],s=t-e,o=t+e;for(let n=s;n<=o;n++)r.push(n);return r};BIe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=Cmt(t).split(/\r?\n/),!(e>t.length))return r=re({around:3},r),Imt(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var vx=K(Tc=>{"use strict";var Emt=Tc&&Tc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),wmt=Tc&&Tc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bmt=Tc&&Tc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Emt(e,t,r);return wmt(e,t),e},Qmt=Tc&&Tc.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(r[s[o]]=t[s[o]]);return r};Object.defineProperty(Tc,"__esModule",{value:!0});var vIe=Bmt(yn()),Q_=vIe.forwardRef((t,e)=>{var{children:r}=t,s=Qmt(t,["children"]);let o=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop
|
|||
|
`).slice(1):void 0,r=e?xIe.parseLine(e[0]):void 0,s,o=0;if((r==null?void 0:r.file)&&(r==null?void 0:r.line)&&kIe.existsSync(r.file)){let n=kIe.readFileSync(r.file,"utf8");if(s=xmt.default(n,r.line),s)for(let{line:l}of s)o=Math.max(o,String(l).length)}return qs.default.createElement(Bg.default,{flexDirection:"column",padding:1},qs.default.createElement(Bg.default,null,qs.default.createElement(Gu.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),qs.default.createElement(Gu.default,null," ",t.message)),r&&qs.default.createElement(Bg.default,{marginTop:1},qs.default.createElement(Gu.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&qs.default.createElement(Bg.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:l})=>qs.default.createElement(Bg.default,{key:n},qs.default.createElement(Bg.default,{width:o+1},qs.default.createElement(Gu.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(o," "),":")),qs.default.createElement(Gu.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+l)))),t.stack&&qs.default.createElement(Bg.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
|||
|
`).slice(1).map(n=>{let l=xIe.parseLine(n);return l?qs.default.createElement(Bg.default,{key:n},qs.default.createElement(Gu.default,{dimColor:!0},"- "),qs.default.createElement(Gu.default,{dimColor:!0,bold:!0},l.function),qs.default.createElement(Gu.default,{dimColor:!0,color:"gray"}," ","(",l.file,":",l.line,":",l.column,")")):qs.default.createElement(Bg.default,{key:n},qs.default.createElement(Gu.default,{dimColor:!0},"- "),qs.default.createElement(Gu.default,{dimColor:!0,bold:!0},n))})))};Nc.default=bmt});var FIe=K(Mc=>{"use strict";var Pmt=Mc&&Mc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Fmt=Mc&&Mc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rmt=Mc&&Mc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Pmt(e,t,r);return Fmt(e,t),e},kd=Mc&&Mc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mc,"__esModule",{value:!0});var Sd=Rmt(yn()),PIe=kd(D8()),Tmt=kd(d_()),Nmt=kd(y_()),Mmt=kd(I_()),Lmt=kd(w_()),Omt=kd(Bx()),Umt=kd(bIe()),_mt=" ",Kmt="[Z",Hmt="",S_=class extends Sd.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|||
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
|||
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===Hmt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===_mt&&this.focusNext(),e===Kmt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let o=s.activeFocusId;return!o&&r&&(o=e),{activeFocusId:o,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(s=>s.id===e.activeFocusId);for(let s=r+1;s<e.focusables.length;s++)if(e.focusables[s].isActive)return e.focusables[s].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(s=>s.id===e.activeFocusId);for(let s=r-1;s>=0;s--)if(e.focusables[s].isActive)return e.focusables[s].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Sd.default.createElement(Tmt.default.Provider,{value:{exit:this.handleExit}},Sd.default.createElement(Nmt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Sd.default.createElement(Mmt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Sd.default.createElement(Lmt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Sd.default.createElement(Omt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?Sd.default.createElement(Umt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){PIe.default.hide(this.props.stdout)}componentWillUnmount(){PIe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};Mc.default=S_;S_.displayName="InternalApp"});var MIe=K(Lc=>{"use strict";var qmt=Lc&&Lc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),jmt=Lc&&Lc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Gmt=Lc&&Lc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&qmt(e,t,r);return jmt(e,t),e},Oc=Lc&&Lc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Lc,"__esModule",{value:!0});var Ymt=Oc(yn()),RIe=$N(),Wmt=Oc(dye()),Jmt=Oc(I8()),Vmt=Oc(Bye()
|
|||
|
`;if(this.options.debug){n&&(this.fullStaticOutput+=o),this.options.stdout.write(this.fullStaticOutput+r);return}if(gC){n&&this.options.stdout.write(o),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=o),s>=this.options.stdout.rows){this.options.stdout.write(Jmt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(o),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},zmt.default(this),this.options=e,this.rootNode=eyt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:RIe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Wmt.default.create(e.stdout),this.throttledLog=e.debug?this.log:RIe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=x_.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=Zmt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),gC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=Ymt.default.createElement(ryt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);x_.default.updateContainer(r,this.container,null,TIe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(gC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(gC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),gC?this.options.stdout.write(this.lastOutput+`
|
|||
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,x_.default.updateContainer(null,this.container,null,TIe),tyt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!gC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=$mt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};Lc.default=NIe});var OIe=K(d1=>{"use strict";var LIe=d1&&d1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(d1,"__esModule",{value:!0});var nyt=LIe(MIe()),Dx=LIe(p_()),iyt=require("stream"),ayt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},syt(e)),s=oyt(r.stdout,()=>new nyt.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>Dx.default.delete(r.stdout),clear:s.clear}};d1.default=ayt;var syt=(t={})=>t instanceof iyt.Stream?{stdout:t,stdin:process.stdin}:t,oyt=(t,e)=>{let r;return Dx.default.has(t)?r=Dx.default.get(t):(r=e(),Dx.default.set(t,r)),r}});var _Ie=K(Qg=>{"use strict";var Ayt=Qg&&Qg.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),lyt=Qg&&Qg.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cyt=Qg&&Qg.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Ayt(e,t,r);return lyt(e,t),e};Object.defineProperty(Qg,"__esModule",{value:!0});var m1=cyt(yn()),UIe=t=>{let{items:e,children:r,style:s}=t,[o,n]=m1.useState(0),l=m1.useMemo(()=>e.slice(o),[e,o]);m1.useLayoutEffect(()=>{n(e.length)},[e.length]);let u=l.map((g,C)=>r(g,o+C)),f=m1.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return m1.default.createElement("ink-box",{internal_static:!0,style:f},u)};UIe.displayName="Static";Qg.default=UIe});var HIe=K(y1=>{"use strict";var uyt=y1&&y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(y1,"__esModule",{value:!0});var fyt=uyt(yn()),KIe=({children:t,transform:e})=>t==null?null:fyt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);KIe.displayName="Transform";y1.default=KIe});var jIe=K(C1=>{"use strict";var gyt=C1&&C1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(C1,"__esModule",{value:!0});var pyt=gyt(yn()),qIe=({count:t=1})=>pyt.default.createElement("ink-text",null,`
|
|||
|
`.repeat(t));qIe.displayName="Newline";C1.default=qIe});var WIe=K(I1=>{"use strict";var GIe=I1&&I1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(I1,"__esModule",{value:!0});var hyt=GIe(yn()),dyt=GIe(vx()),YIe=()=>hyt.default.createElement(dyt.default,{flexGrow:1});YIe.displayName="Spacer";I1.default=YIe});var kx=K(E1=>{"use strict";var myt=E1&&E1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(E1,"__esModule",{value:!0});var yyt=yn(),Cyt=myt(y_()),Iyt=()=>yyt.useContext(Cyt.default);E1.default=Iyt});var VIe=K(w1=>{"use strict";var Eyt=w1&&w1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(w1,"__esModule",{value:!0});var JIe=yn(),wyt=Eyt(kx()),Byt=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:o}=wyt.default();JIe.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),JIe.useEffect(()=>{if(e.isActive===!1)return;let n=l=>{let u=String(l),f={upArrow:u==="[A",downArrow:u==="[B",leftArrow:u==="[D",rightArrow:u==="[C",pageDown:u==="[6~",pageUp:u==="[5~",return:u==="\r",escape:u==="",ctrl:!1,shift:!1,tab:u===" "||u==="[Z",backspace:u==="\b",delete:u==="\x7F"||u==="[3~",meta:!1};u<=""&&!f.return&&(u=String.fromCharCode(u.charCodeAt(0)+"a".charCodeAt(0)-1),f.ctrl=!0),u.startsWith("")&&(u=u.slice(1),f.meta=!0);let g=u>="A"&&u<="Z",C=u>="\u0410"&&u<="\u042F";u.length===1&&(g||C)&&(f.shift=!0),f.tab&&u==="[Z"&&(f.shift=!0),(f.tab||f.backspace||f.delete)&&(u=""),(!(u==="c"&&f.ctrl)||!o)&&t(u,f)};return r==null||r.on("data",n),()=>{r==null||r.off("data",n)}},[e.isActive,r,o,t])};w1.default=Byt});var zIe=K(B1=>{"use strict";var Qyt=B1&&B1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(B1,"__esModule",{value:!0});var vyt=yn(),Dyt=Qyt(d_()),kyt=()=>vyt.useContext(Dyt.default);B1.default=kyt});var XIe=K(Q1=>{"use strict";var Syt=Q1&&Q1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Q1,"__esModule",{value:!0});var xyt=yn(),byt=Syt(I_()),Pyt=()=>xyt.useContext(byt.default);Q1.default=Pyt});var ZIe=K(v1=>{"use strict";var Fyt=v1&&v1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(v1,"__esModule",{value:!0});var Ryt=yn(),Tyt=Fyt(w_()),Nyt=()=>Ryt.useContext(Tyt.default);v1.default=Nyt});var eEe=K(D1=>{"use strict";var $Ie=D1&&D1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(D1,"__esModule",{value:!0});var k1=yn(),Myt=$Ie(Bx()),Lyt=$Ie(kx()),Oyt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:s}=Lyt.default(),{activeId:o,add:n,remove:l,activate:u,deactivate:f}=k1.useContext(Myt.default),g=k1.useMemo(()=>Math.random().toString().slice(2,7),[]);return k1.useEffect(()=>(n(g,{autoFocus:e}),()=>{l(g)}),[g,e]),k1.useEffect(()=>{t?u(g):f(g)},[t,g]),k1.useEffect(()=>{if(!(!r||!t))return s(!0),()=>{s(!1)}},[t]),{isFocused:Boolean(g)&&o===g}};D1.default=Oyt});var tEe=K(S1=>{"use strict";var Uyt=S1&&S1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(S1,"__esModule",{value:!0});var _yt=yn(),Kyt=Uyt(Bx()),Hyt=()=>{let t=_yt.useContext(Kyt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};S1.default=Hyt});var rEe=K(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.default=t=>{var e,r,s,o;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(o=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&o!==void 0?o:0}}});var Vl=K(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var qyt=OIe();Object.defineProperty(So,"render",{enumerable:!0,get:function(){return qyt.default}});var jyt=vx();Object.defineProperty(So,"Box",{enumerable:!0,get:function(){return jyt.default}});var Gyt=k_();Object.defineProperty(So,"Text",{enumerable:!0,get:function(){return Gyt.default}});var Yyt=_Ie();Obje
|
|||
|
`:"";return l?w+=`@IF EXIST ${l} (\r
|
|||
|
${l} ${f} ${o} ${C}%*\r
|
|||
|
) ELSE (\r
|
|||
|
@SETLOCAL\r
|
|||
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
|||
|
${u} ${f} ${o} ${C}%*\r
|
|||
|
)\r
|
|||
|
`:w+=`@${u} ${f} ${o} ${C}%*\r
|
|||
|
`,w}function oIt(t,e,r){let s=zl.relative(zl.dirname(e),t),o=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let l=zl.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,u=r.args||"",f=hK(r.nodePath).posix;o?(n=`"$basedir/${r.prog}"`,s=l):(o=l,u="",s="");let g=r.progArgs?`${r.progArgs.join(" ")} `:"",C=`#!/bin/sh
|
|||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
|||
|
|
|||
|
case \`uname\` in
|
|||
|
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
|
|||
|
esac
|
|||
|
|
|||
|
`,w=r.nodePath?`export NODE_PATH="${f}"
|
|||
|
`:"";return n?C+=`${w}if [ -x ${n} ]; then
|
|||
|
exec ${n} ${u} ${s} ${g}"$@"
|
|||
|
else
|
|||
|
exec ${o} ${u} ${s} ${g}"$@"
|
|||
|
fi
|
|||
|
`:C+=`${w}${o} ${u} ${s} ${g}"$@"
|
|||
|
exit $?
|
|||
|
`,C}function aIt(t,e,r){let s=zl.relative(zl.dirname(e),t),o=r.prog&&r.prog.split("\\").join("/"),n=o&&`"${o}$exe"`,l;s=s.split("\\").join("/");let u=zl.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",g=hK(r.nodePath),C=g.win32,w=g.posix;n?(l=`"$basedir/${r.prog}$exe"`,s=u):(n=u,f="",s="");let B=r.progArgs?`${r.progArgs.join(" ")} `:"",S=`#!/usr/bin/env pwsh
|
|||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|||
|
|
|||
|
$exe=""
|
|||
|
${r.nodePath?`$env_node_path=$env:NODE_PATH
|
|||
|
$env:NODE_PATH="${C}"
|
|||
|
`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|||
|
# Fix case when both the Windows and Linux builds of Node
|
|||
|
# are installed in the same directory
|
|||
|
$exe=".exe"
|
|||
|
}`;return r.nodePath&&(S+=` else {
|
|||
|
$env:NODE_PATH="${w}"
|
|||
|
}`),l?S+=`
|
|||
|
$ret=0
|
|||
|
if (Test-Path ${l}) {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${l} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${l} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
} else {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${n} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $ret
|
|||
|
`:S+=`
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${n} ${f} ${s} ${B}$args
|
|||
|
} else {
|
|||
|
& ${n} ${f} ${s} ${B}$args
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $LASTEXITCODE
|
|||
|
`,S}function lIt(t,e){return e.fs_.chmod(t,493)}function hK(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(zl.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let o=e[s].split("/").join("\\"),n=swe()?e[s].split("\\").join("/").replace(/^([^:\\/]*):/,(l,u)=>`/mnt/${u.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${o}`:o,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:o,posix:n}}return r}iwe.exports=pK});var bK=K((eZt,kwe)=>{kwe.exports=require("stream")});var Pwe=K((tZt,Swe)=>{"use strict";function xwe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,s)}return r}function bIt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xwe(Object(r),!0).forEach(function(s){xIt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xwe(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function xIt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PIt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bwe(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function FIt(t,e,r){return e&&bwe(t.prototype,e),r&&bwe(t,r),t}var RIt=require("buffer"),Yx=RIt.Buffer,TIt=require("util"),PK=TIt.inspect,NIt=PK&&PK.custom||"inspect";function MIt(t,e,r){Yx.prototype.copy.call(t,e,r)}Swe.exports=function(){function t(){PIt(this,t),this.head=null,this.tail=null,this.length=0}return FIt(t,[{key:"push",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,o=""+s.data;s=s.next;)o+=r+s.data;return o}},{key:"concat",value:function(r){if(this.length===0)return Yx.alloc(0);for(var s=Yx.allocUnsafe(r>>>0),o=this.head,n=0;o;)MIt(o.data,s,n),n+=o.data.length,o=o.next;return s}},{key:"consume",value:function(r,s){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=s?this._getString(r):this._getBuffer(r),o}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var s=this.head,o=1,n=s.data;for(r-=n.length;s=s.next;){var l=s.data,u=r>l.length?l.length:r;if(u===l.length?n+=l:n+=l.slice(0,r),r-=u,r===0){u===l.length?(++o,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=l.slice(u));break}++o}return this.length-=o,n}},{key:"_getBuffer",value:function(r){var s=Yx.allocUnsafe(r),o=this.head,n=1;for(o.data.copy(s),r-=o.data.length;o=o.next;){var l=o.data,u=r>l.length?l.length:r;if(l.copy(s,s.length-r,0,u),r-=u,r===0){u===l.length?(++n,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=l.slice(u));break}++n}return this.length-=n,s}},{key:NIt,value:function(r,s){return PK(this,bIt({},s,{depth:0,customInspect:!1}))}}]),t}()});var RK=K((rZt,Fwe)=>{"use strict";function LIt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(FK,this,t)):process.nextTick(FK,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(
|
|||
|
`)),t.linkname&&(e+=AH(" linkpath="+t.linkname+`
|
|||
|
`));var r=t.pax;if(r)for(var s in r)e+=AH(" "+s+"="+r[s]+`
|
|||
|
`);return Buffer.from(e)};vC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var o=t.slice(r+1,s-1).toString(),n=o.indexOf("=");if(n===-1)return e;e[o.slice(0,n)]=o.slice(n+1),t=t.slice(s)}return e};vC.encode=function(t){var e=Pwt(512),r=t.name,s="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var o=r.indexOf("/");if(o===-1)return null;s+=s?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(k0(t.mode&Lwt,6),100),e.write(k0(t.uid,6),108),e.write(k0(t.gid,6),116),e.write(k0(t.size,11),124),e.write(k0(t.mtime.getTime()/1e3|0,11),136),e[156]=RBe+_wt(t.type),t.linkname&&e.write(t.linkname,157),TBe.copy(e,t2),Twt.copy(e,aH),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(k0(t.devmajor||0,6),329),e.write(k0(t.devminor||0,6),337),s&&e.write(s,345),e.write(k0(MBe(e),6),148),e)};vC.decode=function(t,e,r){var s=t[156]===0?0:t[156]-RBe,o=DC(t,0,100,e),n=S0(t,100,8),l=S0(t,108,8),u=S0(t,116,8),f=S0(t,124,12),g=S0(t,136,12),C=Uwt(s),w=t[157]===0?null:DC(t,157,100,e),B=DC(t,265,32),S=DC(t,297,32),y=S0(t,329,8),N=S0(t,337,8),L=MBe(t);if(L===8*32)return null;if(L!==S0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(TBe.compare(t,t2,t2+6)===0)t[345]&&(o=DC(t,345,155,e)+"/"+o);else if(!(Nwt.compare(t,t2,t2+6)===0&&Mwt.compare(t,aH,aH+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&o&&o[o.length-1]==="/"&&(s=5),{name:o,mode:n,uid:l,gid:u,size:f,mtime:new Date(1e3*g),type:C,linkname:w,uname:B,gname:S,devmajor:y,devminor:N}}});var qBe=K((wZt,LBe)=>{var OBe=require("util"),Hwt=FBe(),r2=lH(),UBe=QC().Writable,_Be=QC().PassThrough,KBe=function(){},HBe=function(t){return t&=511,t&&512-t},qwt=function(t,e){var r=new Ab(t,e);return r.end(),r},jwt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},Ab=function(t,e){this._parent=t,this.offset=e,_Be.call(this,{autoDestroy:!1})};OBe.inherits(Ab,_Be);Ab.prototype.destroy=function(t){this._parent.destroy(t)};var Ng=function(t){if(!(this instanceof Ng))return new Ng(t);UBe.call(this,t),t=t||{},this._offset=0,this._buffer=Hwt(),this._missing=0,this._partial=!1,this._onparse=KBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},o=function(B){if(e._locked=!1,B)return e.destroy(B);e._stream||s()},n=function(){e._stream=null;var B=HBe(e._header.size);B?e._parse(B,l):e._parse(512,w),e._locked||s()},l=function(){e._buffer.consume(HBe(e._header.size)),e._parse(512,w),s()},u=function(){var B=e._header.size;e._paxGlobal=r2.decodePax(r.slice(0,B)),r.consume(B),n()},f=function(){var B=e._header.size;e._pax=r2.decodePax(r.slice(0,B)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(B),n()},g=function(){var B=e._header.size;this._gnuLongPath=r2.decodeLongPath(r.slice(0,B),t.filenameEncoding),r.consume(B),n()},C=function(){var B=e._header.size;this._gnuLongLinkPath=r2.decodeLongPath(r.slice(0,B),t.filenameEncoding),r.consume(B),n()},w=function(){var B=e._offset,S;try{S=e._header=r2.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(y){e.emit("error",y)}if(r.consume(512),!S){e._parse(512,w),s();return}if(S.type==="gnu-long-path"){e._parse(S.size,g),s();return}if(S.type==="gnu-long-link-path"){e._parse(S.size,C),s();return}if(S.type==="pax-global-header"){e._parse(S.size,u),s();return}if(S.type==="pax-header"){e._parse(S.size,f),s();return}if(e._gnuLongPath&&(S.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(S.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=S=jwt(S,e._pax),e
|
|||
|
Wanted: ${r.size}
|
|||
|
Found: ${t.length}`);throw u.code="EBADSIZE",u.found=t.length,u.expected=r.size,u.sri=e,u}else{let u=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw u.code="EINTEGRITY",u.found=n,u.expected=e,u.algorithm=s,u.sri=e,u}}zu.exports.checkStream=wBt;function wBt(t,e,r){r=La(r);let s=r.Promise||Promise,o=IH(r.concat({integrity:e}));return new s((n,l)=>{t.pipe(o),t.on("error",l),o.on("error",l);let u;o.on("verified",f=>{u=f}),o.on("end",()=>n(u)),o.on("data",()=>{})})}zu.exports.integrityStream=IH;function IH(t){t=La(t);let e=t.integrity&&Xu(t.integrity,t),r=e&&Object.keys(e).length,s=r&&e.pickAlgorithm(t),o=r&&e[s],n=Array.from(new Set(t.algorithms.concat(s?[s]:[]))),l=n.map(s2.createHash),u=0,f=new fBt({transform(g,C,w){u+=g.length,l.forEach(B=>B.update(g,C)),w(null,g,C)}}).on("end",()=>{let g=t.options&&t.options.length?`?${t.options.join("?")}`:"",C=Xu(l.map((B,S)=>`${n[S]}-${B.digest("base64")}${g}`).join(" "),t),w=r&&C.match(e,t);if(typeof t.size=="number"&&u!==t.size){let B=new Error(`stream size mismatch when checking ${e}.
|
|||
|
Wanted: ${t.size}
|
|||
|
Found: ${u}`);B.code="EBADSIZE",B.found=u,B.expected=t.size,B.sri=e,f.emit("error",B)}else if(t.integrity&&!w){let B=new Error(`${e} integrity checksum failed when using ${s}: wanted ${o} but got ${C}. (${u} bytes)`);B.code="EINTEGRITY",B.found=C,B.expected=o,B.algorithm=s,B.sri=e,f.emit("error",B)}else f.emit("size",u),f.emit("integrity",C),w&&f.emit("verified",w)});return f}zu.exports.create=BBt;function BBt(t){t=La(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",s=e.map(s2.createHash);return{update:function(o,n){return s.forEach(l=>l.update(o,n)),this},digest:function(o){return e.reduce((l,u)=>{let f=s.shift().digest("base64"),g=new Ud(`${u}-${f}${r}`,t);if(g.algorithm&&g.digest){let C=g.algorithm;l[C]||(l[C]=[]),l[C].push(g)}return l},new bC)}}}var QBt=new Set(s2.getHashes()),f1e=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>QBt.has(t));function mBt(t,e){return f1e.indexOf(t.toLowerCase())>=f1e.indexOf(e.toLowerCase())?t:e}});var c2e=K((Cnr,l2e)=>{var D1t=CT();function k1t(t){return D1t(t)?void 0:t}l2e.exports=k1t});var f2e=K((Inr,u2e)=>{var S1t=$L(),x1t=QU(),b1t=SU(),P1t=pd(),F1t=Rh(),R1t=c2e(),T1t=O4(),N1t=BU(),M1t=1,L1t=2,O1t=4,U1t=T1t(function(t,e){var r={};if(t==null)return r;var s=!1;e=S1t(e,function(n){return n=P1t(n,t),s||(s=n.length>1),n}),F1t(t,N1t(t),r),s&&(r=x1t(r,M1t|L1t|O1t,R1t));for(var o=e.length;o--;)b1t(r,e[o]);return r});u2e.exports=U1t});Ge();Ge();Kt();var J4=He(require("child_process")),nfe=He(hh());tr();var V4=He(require("fs"));var Ky=new Map([]);function slt(t){let e=de.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,J4.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:Te(re({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})}):(0,J4.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:Te(re({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})})}async function CS({binaryVersion:t,pluginConfiguration:e}){async function r(){let o=new va({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await s(o)}catch(n){process.stdout.write(o.error(n)),process.exitCode=1}}async function s(o){var N,L,H,G,te;let n=process.versions.node,l=">=14.15.0";if(!it.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!pn.satisfiesWithPrereleases(n,l))throw new ht(`This tool requires a Node version compatible with ${l} (got ${n}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let f=await st.find(de.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),g=f.get("yarnPath"),C=f.get("ignorePath"),w=f.get("ignoreCwd"),B=de.toPortablePath(de.resolve(process.argv[1])),S=fe=>ge.readFilePromise(fe).catch(()=>Buffer.of());if(!C&&!w&&await(async()=>g&&(g===B||Buffer.compare(...await Promise.all([S(g),S(B)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await s(o);return}else if(g!==null&&!C)if(!ge.existsSync(g))process.stdout.write(o.error(new Error(`The "yarn-path" option has been set (in ${f.sources.get("yarnPath")}), but the specified location doesn't exist (${g}).`))),process.exitCode=1;else try{slt(g)}catch(fe){process.exitCode=fe.code||1}else{C&&delete process.env.YARN_IGNORE_PATH,f.get("enableTelemetry")&&!nfe.isCI&&process.stdout.isTTY&&(st.telemetry=new Tw(f,"puba9cdc10ec5790a2cf4969dd413a47270")),(N=st.telemetry)==null||N.reportVersion(t);for(let[Ce,Pe]of f.plugins.entries()){Ky.has((H=(L=Ce.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:L[1])!=null?H:"")&&((G=st.telemetry)==null||G.reportPluginName(Ce));for(let Qe of Pe.commands||[])o.register(Qe)}let me={cwd:de.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},ye=o.process(process.argv.slice(2),me);ye.help||(te=st.telemetry)==null||te.reportCommandName(ye.path.join(" "));let Se=ye.cwd;if(typeof Se!="undefined"&&!w){let Ce=(0,V4.realpathSync)(process.cwd()),Pe=(0,V4.realpathSync)(Se);if(Ce!==Pe){process.chdir(Se),await r();return}}await o.runExit(ye,me)}}r
|
|||
|
Try running the command again with the package name prefixed: ${Ue.pretty(e,"yarn add",Bo.CODE)} ${Ue.pretty(e,W.makeDescriptor(W.makeIdent(null,"my-package"),`${fe[0]}...`),Bo.DESCRIPTOR)}`);if(!te)throw new ht(`The ${Ue.pretty(e,G,Bo.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let me=Sct(s,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional}),ye=await Hw(te,{project:r,workspace:s,cache:o,fixed:n,target:me,modifier:f,strategies:g,maxResults:C});return[te,ye,me]})),B=await yg.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async G=>{for(let[te,{suggestions:fe,rejections:me}]of w)if(fe.filter(Se=>Se.descriptor!==null).length===0){let[Se]=me;if(typeof Se=="undefined")throw new Error("Assertion failed: Expected an error to have been set");r.configuration.get("enableNetwork")?G.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,te)} can't be resolved to a satisfying range`):G.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),G.reportSeparator(),G.reportExceptionOnce(Se)}});if(B.hasErrors())return B.exitCode();let S=!1,y=[],N=[];for(let[,{suggestions:G},te]of w){let fe,me=G.filter(Pe=>Pe.descriptor!==null),ye=me[0].descriptor,Se=me.every(Pe=>W.areDescriptorsEqual(Pe.descriptor,ye));me.length===1||Se?fe=ye:(S=!0,{answer:fe}=await(0,fpe.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:G.map(({descriptor:Pe,name:Qe,reason:p})=>Pe?{name:Qe,hint:p,descriptor:Pe}:{name:Qe,hint:p,disabled:!0}),onCancel:()=>process.exit(130),result(Pe){return this.find(Pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ce=s.manifest[te].get(fe.identHash);(typeof Ce=="undefined"||Ce.descriptorHash!==fe.descriptorHash)&&(s.manifest[te].set(fe.identHash,fe),this.optional&&(te==="dependencies"?s.manifest.ensureDependencyMeta(Te(re({},fe),{range:"unknown"})).optional=!0:te==="peerDependencies"&&(s.manifest.ensurePeerDependencyMeta(Te(re({},fe),{range:"unknown"})).optional=!0)),typeof Ce=="undefined"?y.push([s,te,fe,g]):N.push([s,te,Ce,fe]))}return await e.triggerMultipleHooks(G=>G.afterWorkspaceDependencyAddition,y),await e.triggerMultipleHooks(G=>G.afterWorkspaceDependencyReplacement,N),S&&this.context.stdout.write(`
|
|||
|
`),(await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async G=>{await r.install({cache:o,report:G,mode:this.mode})})).exitCode()}};qw.paths=[["add"]],qw.usage=dt.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lo
|
|||
|
`),0}return(await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{let l=await vn.getPackageAccessibleBinaries(s,{project:r}),f=Array.from(l.keys()).reduce((g,C)=>Math.max(g,C.length),0);for(let[g,[C,w]]of l)n.reportJson({name:g,source:W.stringifyIdent(C),path:w});if(this.verbose)for(let[g,[C]]of l)n.reportInfo(null,`${g.padEnd(f," ")} ${W.prettyLocator(e,C)}`);else for(let g of l.keys())n.reportInfo(null,g)})).exitCode()}};jw.paths=[["bin"]],jw.usage=dt.Usage({description:"get the path to a binary script",details:`
|
|||
|
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
|
|||
|
|
|||
|
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
|
|||
|
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});var ppe=jw;Ge();Kt();tr();var Gw=class extends It{constructor(){super(...arguments);this.mirror=Ie.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=Ie.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=await $r.find(e);return(await Nt.start({configuration:e,stdout:this.context.stdout},async()=>{let o=(this.all||this.mirror)&&r.mirrorCwd!==null,n=!this.mirror;o&&(await ge.removePromise(r.mirrorCwd),await e.triggerHook(l=>l.cleanGlobalArtifacts,e)),n&&await ge.removePromise(r.cwd)})).exitCode()}};Gw.paths=[["cache","clean"],["cache","clear"]],Gw.usage=dt.Usage({description:"remove the shared cache files",details:`
|
|||
|
This command will remove all the files from the cache.
|
|||
|
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});var hpe=Gw;Ge();tr();var mpe=He(Yw()),EU=He(require("util")),Ww=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=Ie.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=this.name.replace(/[.[].*$/,""),s=this.name.replace(/^[^.[]*/,"");if(typeof e.settings.get(r)=="undefined")throw new ht(`Couldn't find a configuration settings named "${r}"`);let n=e.getSpecial(r,{hideSecrets:!this.unsafe,getNativePaths:!0}),l=it.convertMapsToIndexableObjects(n),u=s?(0,mpe.default)(l,s):l,f=await Nt.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async g=>{g.reportJson(u)});if(!this.json){if(typeof u=="string")return this.context.stdout.write(`${u}
|
|||
|
`),f.exitCode();EU.inspect.styles.name="cyan",this.context.stdout.write(`${(0,EU.inspect)(u,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}
|
|||
|
`)}return f.exitCode()}};Ww.paths=[["config","get"]],Ww.usage=dt.Usage({description:"read a configuration settings",details:`
|
|||
|
This command will print a configuration setting.
|
|||
|
|
|||
|
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
|
|||
|
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});var ype=Ww;Ge();tr();var A0e=He(vU()),l0e=He(Yw()),c0e=He(DU()),kU=He(require("util")),Jw=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=Ie.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Ie.String();this.value=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new ht("This command must be run from within a project folder");return e.projectCwd},s=this.name.replace(/[.[].*$/,""),o=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(s)=="undefined")throw new ht(`Couldn't find a configuration settings named "${s}"`);if(s==="enableStrictSettings")throw new ht("This setting only affects the file it's in, and thus cannot be set from the CLI");let l=this.json?JSON.parse(this.value):this.value;await(this.home?S=>st.updateHomeConfiguration(S):S=>st.updateConfiguration(r(),S))(S=>{if(o){let y=(0,A0e.default)(S);return(0,c0e.default)(y,this.name,l),y}else return Te(re({},S),{[s]:l})});let g=(await st.find(this.context.cwd,this.context.plugins)).getSpecial(s,{hideSecrets:!0,getNativePaths:!0}),C=it.convertMapsToIndexableObjects(g),w=o?(0,l0e.default)(C,o):C;return(await Nt.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async S=>{kU.inspect.styles.name="cyan",S.reportInfo(ke.UNNAMED,`Successfully set ${this.name} to ${(0,kU.inspect)(w,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}};Jw.paths=[["config","set"]],Jw.usage=dt.Usage({description:"change a configuration settings",details:`
|
|||
|
This command will set a configuration setting.
|
|||
|
|
|||
|
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
|
|||
|
|
|||
|
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
|
|||
|
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});var u0e=Jw;Ge();tr();var w0e=He(vU()),B0e=He(h0e()),Q0e=He(xU()),Vw=class extends It{constructor(){super(...arguments);this.home=Ie.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new ht("This command must be run from within a project folder");return e.projectCwd},s=this.name.replace(/[.[].*$/,""),o=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(s)=="undefined")throw new ht(`Couldn't find a configuration settings named "${s}"`);let l=this.home?f=>st.updateHomeConfiguration(f):f=>st.updateConfiguration(r(),f);return(await Nt.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async f=>{let g=!1;await l(C=>{if(!(0,B0e.default)(C,this.name))return f.reportWarning(ke.UNNAMED,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),g=!0,C;let w=o?(0,w0e.default)(C):re({},C);return(0,Q0e.default)(w,this.name),w}),g||f.reportInfo(ke.UNNAMED,`Successfully unset ${this.name}`)})).exitCode()}};Vw.paths=[["config","unset"]],Vw.usage=dt.Usage({description:"unset a configuration setting",details:`
|
|||
|
This command will unset a configuration setting.
|
|||
|
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});var v0e=Vw;Ge();Ge();tr();var bU=He(require("util")),zw=class extends It{constructor(){super(...arguments);this.verbose=Ie.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=Ie.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{if(e.invalid.size>0&&!this.json){for(let[o,n]of e.invalid)s.reportError(ke.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${o}" in ${n}`);s.reportSeparator()}if(this.json){let o=it.sortMap(e.settings.keys(),n=>n);for(let n of o){let l=e.settings.get(n),u=e.getSpecial(n,{hideSecrets:!0,getNativePaths:!0}),f=e.sources.get(n);this.verbose?s.reportJson({key:n,effective:u,source:f}):s.reportJson(re({key:n,effective:u,source:f},l))}}else{let o=it.sortMap(e.settings.keys(),u=>u),n=o.reduce((u,f)=>Math.max(u,f.length),0),l={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let u=o.map(g=>{let C=e.settings.get(g);if(!C)throw new Error(`Assertion failed: This settings ("${g}") should have been registered`);let w=this.why?e.sources.get(g)||"<default>":C.description;return[g,w]}),f=u.reduce((g,[,C])=>Math.max(g,C.length),0);for(let[g,C]of u)s.reportInfo(null,`${g.padEnd(n," ")} ${C.padEnd(f," ")} ${(0,bU.inspect)(e.getSpecial(g,{hideSecrets:!0,getNativePaths:!0}),l)}`)}else for(let u of o)s.reportInfo(null,`${u.padEnd(n," ")} ${(0,bU.inspect)(e.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),l)}`)}})).exitCode()}};zw.paths=[["config"]],zw.usage=dt.Usage({description:"display the current configuration",details:`
|
|||
|
This command prints the current active configuration settings.
|
|||
|
`,examples:[["Print the active configuration settings","$0 config"]]});var D0e=zw;Ge();tr();OA();var PU={};or(PU,{Strategy:()=>yd,acceptedStrategies:()=>cgt,dedupe:()=>FU});Ge();Ge();var k0e=He(ka()),yd;(function(e){e.HIGHEST="highest"})(yd||(yd={}));var cgt=new Set(Object.values(yd)),ugt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:o,fetchOptions:n})=>{let l=new Map;for(let[f,g]of t.storedResolutions){let C=t.storedDescriptors.get(f);if(typeof C=="undefined")throw new Error(`Assertion failed: The descriptor (${f}) should have been registered`);it.getSetWithDefault(l,C.identHash).add(g)}let u=new Map(it.mapAndFilter(t.storedDescriptors.values(),f=>W.isVirtualDescriptor(f)?it.mapAndFilter.skip:[f.descriptorHash,it.makeDeferred()]));for(let f of t.storedDescriptors.values()){let g=u.get(f.descriptorHash);if(typeof g=="undefined")throw new Error(`Assertion failed: The descriptor (${f.descriptorHash}) should have been registered`);let C=t.storedResolutions.get(f.descriptorHash);if(typeof C=="undefined")throw new Error(`Assertion failed: The resolution (${f.descriptorHash}) should have been registered`);let w=t.originalPackages.get(C);if(typeof w=="undefined")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{var te;let B=r.getResolutionDependencies(f,o),S=Object.fromEntries(await it.allSettledSafe(Object.entries(B).map(async([fe,me])=>{let ye=u.get(me.descriptorHash);if(typeof ye=="undefined")throw new Error(`Assertion failed: The descriptor (${me.descriptorHash}) should have been registered`);let Se=await ye.promise;if(!Se)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[fe,Se.updatedPackage]})));if(e.length&&!k0e.default.isMatch(W.stringifyIdent(f),e)||!r.shouldPersistResolution(w,o))return w;let y=l.get(f.identHash);if(typeof y=="undefined")throw new Error(`Assertion failed: The resolutions (${f.identHash}) should have been registered`);if(y.size===1)return w;let N=[...y].map(fe=>{let me=t.originalPackages.get(fe);if(typeof me=="undefined")throw new Error(`Assertion failed: The package (${fe}) should have been registered`);return me}),L=await r.getSatisfying(f,S,N,o),H=(te=L.locators)==null?void 0:te[0];if(typeof H=="undefined"||!L.sorted)return w;let G=t.originalPackages.get(H.locatorHash);if(typeof G=="undefined")throw new Error(`Assertion failed: The package (${H.locatorHash}) should have been registered`);return G}).then(async B=>{let S=await t.preparePackage(B,{resolver:r,resolveOptions:o});g.resolve({descriptor:f,currentPackage:w,updatedPackage:B,resolvedPackage:S})}).catch(B=>{g.reject(B)})}return[...u.values()].map(f=>f.promise)}};async function FU(t,{strategy:e,patterns:r,cache:s,report:o}){let{configuration:n}=t,l=new cs,u=n.makeResolver(),f=n.makeFetcher(),g={cache:s,checksums:t.storedChecksums,fetcher:f,project:t,report:l,cacheOptions:{skipIntegrityCheck:!0}},C={project:t,resolver:u,report:l,fetchOptions:g};return await o.startTimerPromise("Deduplication step",async()=>{let B=await ugt[e](t,r,{resolver:u,resolveOptions:C,fetcher:f,fetchOptions:g}),S=$o.progressViaCounter(B.length);o.reportProgress(S);let y=0;await Promise.all(B.map(H=>H.then(G=>{if(G===null||G.currentPackage.locatorHash===G.updatedPackage.locatorHash)return;y++;let{descriptor:te,currentPackage:fe,updatedPackage:me}=G;o.reportInfo(ke.UNNAMED,`${W.prettyDescriptor(n,te)} can be deduped from ${W.prettyLocator(n,fe)} to ${W.prettyLocator(n,me)}`),o.reportJson({descriptor:W.stringifyDescriptor(te),currentResolution:W.stringifyLocator(fe),updatedResolution:W.stringifyLocator(me)}),t.storedResolutions.set(te.descriptorHash,me.locatorHash)}).finally(()=>S.tick())));let N;switch(y){case 0:N="No packages";break;case 1:N="One package";break;default:N=`${y} packages`}let L=Ue.pretty(n,e,Ue.Type.CODE);return o.reportInfo(ke.UNNAMED,`${N} can be deduped using the ${L} strategy`),y})}var Xw=class extends It{constructor(){super(...arguments);this.strategy=Ie.String("-s,--strategy",yd.HIGHEST,{description:"The stra
|
|||
|
`)}};xS.paths=[["--clipanion=definitions"]];var P0e=xS;var bS=class extends It{async execute(){this.context.stdout.write(this.cli.usage(null))}};bS.paths=[["help"],["--help"],["-h"]];var F0e=bS;Ge();Kt();tr();var RU=class extends It{constructor(){super(...arguments);this.leadingArgument=Ie.String();this.args=Ie.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!W.tryParseIdent(this.leadingArgument)){let e=$.resolve(this.context.cwd,de.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}},R0e=RU;Ge();var PS=class extends It{async execute(){this.context.stdout.write(`${ni||"<unknown>"}
|
|||
|
`)}};PS.paths=[["-v"],["--version"]];var T0e=PS;Ge();Ge();tr();var Zw=class extends It{constructor(){super(...arguments);this.commandName=Ie.String();this.args=Ie.Proxy()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,locator:s}=await Lt.find(e,this.context.cwd);return await r.restoreInstallState(),await vn.executePackageShellcode(s,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:r})}};Zw.paths=[["exec"]],Zw.usage=dt.Usage({description:"execute a shell script",details:`
|
|||
|
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
|
|||
|
|
|||
|
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
|||
|
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});var N0e=Zw;Ge();tr();OA();var $w=class extends It{constructor(){super(...arguments);this.hash=Ie.String({required:!1,validator:yh(NI(),[MI(/^p[0-9a-f]{5}$/)])})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Lt.find(e,this.context.cwd);return await r.restoreInstallState({restoreResolutions:!1}),await r.applyLightResolution(),typeof this.hash!="undefined"?await fgt(this.hash,r,{stdout:this.context.stdout}):(await Nt.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async o=>{var l;let n=[([,u])=>W.stringifyLocator(r.storedPackages.get(u.subject)),([,u])=>W.stringifyIdent(u.requested)];for(let[u,f]of it.sortMap(r.peerRequirements,n)){let g=r.storedPackages.get(f.subject);if(typeof g=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=r.storedPackages.get(f.rootRequester);if(typeof C=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let w=(l=g.dependencies.get(f.requested.identHash))!=null?l:null,B=Ue.pretty(e,u,Ue.Type.CODE),S=W.prettyLocator(e,g),y=W.prettyIdent(e,f.requested),N=W.prettyIdent(e,C),L=f.allRequesters.length-1,H=`descendant${L===1?"":"s"}`,G=L>0?` and ${L} ${H}`:"",te=w!==null?"provides":"doesn't provide";o.reportInfo(null,`${B} \u2192 ${S} ${te} ${y} to ${N}${G}`)}})).exitCode()}};$w.paths=[["explain","peer-requirements"]],$w.usage=dt.Usage({description:"explain a set of peer requirements",details:`
|
|||
|
A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
|
|||
|
|
|||
|
When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
|
|||
|
|
|||
|
When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
|
|||
|
|
|||
|
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
|||
|
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});var M0e=$w;async function fgt(t,e,r){let{configuration:s}=e,o=e.peerRequirements.get(t);if(typeof o=="undefined")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Nt.start({configuration:s,stdout:r.stdout,includeFooter:!1},async l=>{var H,G;let u=e.storedPackages.get(o.subject);if(typeof u=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let f=e.storedPackages.get(o.rootRequester);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let g=(H=u.dependencies.get(o.requested.identHash))!=null?H:null,C=g!==null?e.storedResolutions.get(g.descriptorHash):null;if(typeof C=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let w=C!==null?e.storedPackages.get(C):null;if(typeof w=="undefined")throw new Error("Assertion failed: Expected the provided package to have been registered");let B=[...o.allRequesters.values()].map(te=>{let fe=e.storedPackages.get(te);if(typeof fe=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let me=W.devirtualizeLocator(fe),ye=e.storedPackages.get(me.locatorHash);if(typeof ye=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let Se=ye.peerDependencies.get(o.requested.identHash);if(typeof Se=="undefined")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:fe,peerDependency:Se}});if(w!==null){let te=B.every(({peerDependency:fe})=>pn.satisfiesWithPrereleases(w.version,fe.range));l.reportInfo(ke.UNNAMED,`${W.prettyLocator(s,u)} provides ${W.prettyLocator(s,w)} with version ${W.prettyReference(s,(G=w.version)!=null?G:"<missing>")}, which ${te?"satisfies":"doesn't satisfy"} the following requirements:`)}else l.reportInfo(ke.UNNAMED,`${W.prettyLocator(s,u)} doesn't provide ${W.prettyIdent(s,o.requested)}, breaking the following requirements:`);l.reportSeparator();let S=Ue.mark(s),y=[];for(let{pkg:te,peerDependency:fe}of it.sortMap(B,me=>W.stringifyLocator(me.pkg))){let ye=(w!==null?pn.satisfiesWithPrereleases(w.version,fe.range):!1)?S.Check:S.Cross;y.push({stringifiedLocator:W.stringifyLocator(te),prettyLocator:W.prettyLocator(s,te),prettyRange:W.prettyRange(s,fe.range),mark:ye})}let N=Math.max(...y.map(({stringifiedLocator:te})=>te.length)),L=Math.max(...y.map(({prettyRange:te})=>te.length));for(let{stringifiedLocator:te,prettyLocator:fe,prettyRange:me,mark:ye}of it.sortMap(y,({stringifiedLocator:Se})=>Se))l.reportInfo(null,`${fe.padEnd(N+(fe.length-te.length)," ")} \u2192 ${me.padEnd(L," ")} ${ye}`);y.length>1&&(l.reportSeparator(),l.reportInfo(ke.UNNAMED,`Note: these requirements start with ${W.prettyLocator(e.configuration,f)}`))})).exitCode()}Ge();tr();OA();Ge();Ge();Kt();tr();var L0e=He(ki()),eB=class extends It{constructor(){super(...arguments);this.useYarnPath=Ie.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=Ie.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=Ie.String()}async execute(){var l;let e=await st.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let r=()=>{if(typeof ni=="undefined")throw new ht("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},s,o=(u,f)=>({version:f,url:u.replace(/\{\}/g,f)});if(this.version==="self")s={url:r(),version:(l=ni)!=null?l:"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")s=o("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await tB(e,"stable"));else if(this.version==="canary")s=o("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await t
|
|||
|
${e}`)})}let u=(te=t.projectCwd)!=null?te:t.startingCwd,f=$.resolve(u,".yarn/releases"),g=$.resolve(f,`yarn-${e}.cjs`),C=$.relative(t.startingCwd,g),w=it.isTaggedYarnVersion(e),B=t.get("yarnPath"),S=!w,y=S||!!B||!!o;if(o===!1){if(S)throw new gr(ke.UNNAMED,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");y=!1}else!y&&!process.env.COREPACK_ROOT&&(s.reportWarning(ke.UNNAMED,`You don't seem to have ${Ue.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${Ue.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),y=!0);if(y){let fe=await l();s.reportInfo(ke.UNNAMED,`Saving the new release in ${Ue.pretty(t,C,"magenta")}`),await ge.removePromise($.dirname(g)),await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.writeFilePromise(g,fe,{mode:493}),(!B||$.contains(f,B))&&await st.updateConfiguration(u,{yarnPath:$.relative(u,g)})}else await ge.removePromise($.dirname(g)),await st.updateConfiguration(u,{yarnPath:st.deleteProperty});let N=await Xt.tryFind(u)||new Xt;N.packageManager=`yarn@${w?e:await tB(t,"stable")}`;let L={};N.exportTo(L);let H=$.join(u,Xt.fileName),G=`${JSON.stringify(L,null,N.indent)}
|
|||
|
`;return await ge.changeFilePromise(H,G,{automaticNewlines:!0}),{bundleVersion:e}}function U0e(t){return ke[iv(t)]}var pgt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function hgt(t){let r=`https://repo.yarnpkg.com/${it.isTaggedYarnVersion(ni)?ni:await tB(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,s=await qn.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(pgt),({groups:o})=>{if(!o)throw new Error("Assertion failed: Expected the match to have been successful");let n=U0e(o.code);if(o.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${o.name}" to be named "${n}"`);return[o.code,o.details]}))}var rB=class extends It{constructor(){super(...arguments);this.code=Ie.String({required:!1,validator:yh(NI(),[MI(/^YN[0-9]{4}$/)])});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);if(typeof this.code!="undefined"){let r=U0e(this.code),s=Ue.pretty(e,r,Ue.Type.CODE),o=this.cli.format().header(`${this.code} - ${s}`),l=(await hgt(e)).get(this.code),u=typeof l!="undefined"?Ue.jsonOrPretty(this.json,e,Ue.tuple(Ue.Type.MARKDOWN,{text:l,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
|
|||
|
|
|||
|
You can help us by editing this page on GitHub \u{1F642}:
|
|||
|
${Ue.jsonOrPretty(this.json,e,Ue.tuple(Ue.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
|
|||
|
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:r,details:u})}
|
|||
|
`):this.context.stdout.write(`${o}
|
|||
|
|
|||
|
${u}
|
|||
|
`)}else{let r={children:it.mapAndFilter(Object.entries(ke),([s,o])=>Number.isNaN(Number(s))?it.mapAndFilter.skip:{label:Iu(Number(s)),value:Ue.tuple(Ue.Type.CODE,o)})};VA.emitTree(r,{configuration:e,stdout:this.context.stdout,json:this.json})}}};rB.paths=[["explain"]],rB.usage=dt.Usage({description:"explain an error code",details:`
|
|||
|
When the code argument is specified, this command prints its name and its details.
|
|||
|
|
|||
|
When used without arguments, this command lists all error codes and their names.
|
|||
|
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});var _0e=rB;Ge();Kt();tr();var K0e=He(ka()),nB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=Ie.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=Ie.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=Ie.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=Ie.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=Ie.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=Ie.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s&&!this.all)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState();let n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");let l=(te,{recursive:fe})=>{let me=te.anchoredLocator.locatorHash,ye=new Map,Se=[me];for(;Se.length>0;){let Ce=Se.shift();if(ye.has(Ce))continue;let Pe=r.storedPackages.get(Ce);if(typeof Pe=="undefined")throw new Error("Assertion failed: Expected the package to be registered");if(ye.set(Ce,Pe),W.isVirtualLocator(Pe)&&Se.push(W.devirtualizeLocator(Pe).locatorHash),!(!fe&&Ce!==me))for(let Qe of Pe.dependencies.values()){let p=r.storedResolutions.get(Qe.descriptorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");Se.push(p)}}return ye.values()},u=({recursive:te})=>{let fe=new Map;for(let me of r.workspaces)for(let ye of l(me,{recursive:te}))fe.set(ye.locatorHash,ye);return fe.values()},f=({all:te,recursive:fe})=>te&&fe?r.storedPackages.values():te?u({recursive:fe}):l(s,{recursive:fe}),g=({all:te,recursive:fe})=>{let me=f({all:te,recursive:fe}),ye=this.patterns.map(Pe=>{let Qe=W.parseLocator(Pe),p=K0e.default.makeRe(W.stringifyIdent(Qe)),Oe=W.isVirtualLocator(Qe),De=Oe?W.devirtualizeLocator(Qe):Qe;return Ee=>{let ue=W.stringifyIdent(Ee);if(!p.test(ue))return!1;if(Qe.reference==="unknown")return!0;let ne=W.isVirtualLocator(Ee),Be=ne?W.devirtualizeLocator(Ee):Ee;return!(Oe&&ne&&Qe.reference!==Ee.reference||De.reference!==Be.reference)}}),Se=it.sortMap([...me],Pe=>W.stringifyLocator(Pe));return{selection:Se.filter(Pe=>ye.length===0||ye.some(Qe=>Qe(Pe))),sortedLookup:Se}},{selection:C,sortedLookup:w}=g({all:this.all,recursive:this.recursive});if(C.length===0)throw new ht("No package matched your request");let B=new Map;if(this.dependents)for(let te of w)for(let fe of te.dependencies.values()){let me=r.storedResolutions.get(fe.descriptorHash);if(typeof me=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");it.getArrayWithDefault(B,me).push(te)}let S=new Map;for(let te of w){if(!W.isVirtualLocator(te))continue;let fe=W.devirtualizeLocator(te);it.getArrayWithDefault(S,fe.locatorHash).push(te)}let y={},N={children:y},L=e.makeFetcher(),H={project:r,fetcher:L,cache:o,checksums:r.storedChecksums,report:new cs,cacheOptions:{skipIntegrityCheck:!0}},G=[async(te,fe,me)=>{var Ce,Pe;if(!fe.has("manifest"))return;let ye=await L.fetch(te,H),Se;try{Se=await Xt.find(ye.prefixPath,{baseFs:ye.packageFs})}finally{(Ce=ye.releaseFs)==null||Ce.call(ye)}me("Manifest",{License:Ue.tuple(Ue.Type.NO_HINT,Se.license),Homepage:Ue.tuple(Ue.Type.URL,(Pe=Se.raw.homepage)!=null?Pe:null)})},async(te,fe,
|
|||
|
`),e[1].join(`
|
|||
|
`)]}Ge();Kt();tr();var sB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=Ie.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=Ie.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=r.topLevelWorkspace,l=[];for(let f of this.destinations){let g=$.resolve(this.context.cwd,de.toPortablePath(f)),C=await st.find(g,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:B}=await Lt.find(C,g);if(r.cwd===w.cwd)throw new ht(`Invalid destination '${f}'; Can't link the project to itself`);if(!B)throw new pr(w.cwd,g);if(this.all){let S=!1;for(let y of w.workspaces)y.manifest.name&&(!y.manifest.private||this.private)&&(l.push(y),S=!0);if(!S)throw new ht(`No workspace found to be linked in the target project: ${f}`)}else{if(!B.manifest.name)throw new ht(`The target workspace at '${f}' doesn't have a name and thus cannot be linked`);if(B.manifest.private&&!this.private)throw new ht(`The target workspace at '${f}' is marked private - use the --private flag to link it anyway`);l.push(B)}}for(let f of l){let g=W.stringifyIdent(f.locator),C=this.relative?$.relative(r.cwd,f.cwd):f.cwd;n.manifest.resolutions.push({pattern:{descriptor:{fullName:g}},reference:`portal:${C}`})}return(await Nt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};sB.paths=[["link"]],sB.usage=dt.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var G0e=sB;tr();var oB=class extends It{constructor(){super(...arguments);this.args=Ie.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};oB.paths=[["node"]],oB.usage=dt.Usage({description:"run node with the hook already setup",details:`
|
|||
|
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
|||
|
|
|||
|
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
|
|||
|
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});var Y0e=oB;Ge();Ge();Kt();tr();var the=He(require("os"));Ge();Kt();tr();var J0e=He(require("os"));Ge();kl();tr();var Egt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Cd(t,e){let r=await qn.get(Egt,{configuration:t}),s=as(r.toString());return Object.fromEntries(Object.entries(s).filter(([o,n])=>{var l;return!e||pn.satisfiesWithPrereleases(e,(l=n.range)!=null?l:"<4.0.0-rc.1")}))}var aB=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{let o=await Cd(e,ni);for(let n of Object.entries(o)){let[f,l]=n,u=l,{experimental:g}=u,C=an(u,["experimental"]);let w=f;g&&(w+=" [experimental]"),s.reportJson(re({name:f,experimental:g},C)),s.reportInfo(null,w)}})).exitCode()}};aB.paths=[["plugin","list"]],aB.usage=dt.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var W0e=aB;var wgt=/^[0-9]+$/;function V0e(t){return wgt.test(t)?`pull/${t}/head`:t}var Bgt=({repository:t,branch:e},r)=>[["git","init",de.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",V0e(e)],["git","reset","--hard","FETCH_HEAD"]],Qgt=({branch:t})=>[["git","fetch","origin","--depth=1",V0e(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],vgt=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(s=>["--plugin",$.resolve(r,s)])),...e?["--no-minify"]:[],"|"]],AB=class extends It{constructor(){super(...arguments);this.installPath=Ie.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Ie.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Ie.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=Ie.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=Ie.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=Ie.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=Ie.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Lt.find(e,this.context.cwd),s=typeof this.installPath!="undefined"?$.resolve(this.context.cwd,de.toPortablePath(this.installPath)):$.resolve(de.toPortablePath((0,J0e.tmpdir)()),"yarnpkg-sources",eo.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:e,stdout:this.context.stdout},async n=>{await MU(this,{configuration:e,report:n,target:s}),n.reportSeparator(),n.reportInfo(ke.UNNAMED,"Building a fresh bundle"),n.reportSeparator(),await lB(vgt(this,s),{configuration:e,context:this.context,target:s}),n.reportSeparator();let l=$.resolve(s,"packages/yarnpkg-cli/bundles/yarn.js"),u=await ge.readFilePromise(l),{bundleVersion:f}=await TU(e,null,async()=>u,{report:n});this.skipPlugins||await Dgt(this,f,{project:r,report:n,target:s})})).exitCode()}};AB.paths=[["set","version","from","sources"]],AB.usage=dt.Usage({description:"build Yarn from master",details:`
|
|||
|
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
|
|||
|
|
|||
|
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
|
|||
|
`,examples:[["Build Yarn from master","$0 set version from sources"]]});var z0e=AB;async function lB(t,{configuration:e,context:r,target:s}){for(let[o,...n]of t){let l=n[n.length-1]==="|";if(l&&n.pop(),l)await wn.pipevp(o,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${Ue.pretty(e,` $ ${[o,...n].join(" ")}`,"grey")}
|
|||
|
`);try{await wn.execvp(o,n,{cwd:s,strict:!0})}catch(u){throw r.stdout.write(u.stdout||u.stack),u}}}}async function MU(t,{configuration:e,report:r,target:s}){let o=!1;if(!t.force&&ge.existsSync($.join(s,".git"))){r.reportInfo(ke.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await lB(Qgt(t),{configuration:e,context:t.context,target:s}),o=!0}catch(n){r.reportSeparator(),r.reportWarning(ke.UNNAMED,"Repository update failed; we'll try to regenerate it")}}o||(r.reportInfo(ke.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await ge.removePromise(s),await ge.mkdirPromise(s,{recursive:!0}),await lB(Bgt(t,s),{configuration:e,context:t.context,target:s}))}async function Dgt(t,e,{project:r,report:s,target:o}){let n=await Cd(r.configuration,e),l=new Set(Object.keys(n));for(let u of r.configuration.plugins.keys())!l.has(u)||await NU(u,t,{project:r,report:s,target:o})}Ge();Ge();Kt();tr();var X0e=He(ki()),Z0e=He(require("url")),$0e=He(require("vm"));var cB=class extends It{constructor(){super(...arguments);this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:e,stdout:this.context.stdout},async s=>{let{project:o}=await Lt.find(e,this.context.cwd),n,l;if(this.name.match(/^\.{0,2}[\\/]/)||de.isAbsolute(this.name)){let u=$.resolve(this.context.cwd,de.toPortablePath(this.name));s.reportInfo(ke.UNNAMED,`Reading ${Ue.pretty(e,u,Ue.Type.PATH)}`),n=$.relative(o.cwd,u),l=await ge.readFilePromise(u)}else{let u;if(this.name.match(/^https?:/)){try{new Z0e.URL(this.name)}catch{throw new gr(ke.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}n=this.name,u=this.name}else{let f=W.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(f.reference!=="unknown"&&!X0e.default.valid(f.reference))throw new gr(ke.UNNAMED,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let g=W.stringifyIdent(f),C=await Cd(e,ni);if(!Object.prototype.hasOwnProperty.call(C,g)){let w=`Couldn't find a plugin named ${W.prettyIdent(e,f)} on the remote registry.
|
|||
|
`;throw e.plugins.has(g)?w+=`A plugin named ${W.prettyIdent(e,f)} is already installed; possibly attempting to import a built-in plugin.`:w+=`Note that only the plugins referenced on our website (${Ue.pretty(e,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",Ue.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${Ue.pretty(e,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",Ue.Type.URL)}).`,new gr(ke.PLUGIN_NAME_NOT_FOUND,w)}n=g,u=C[g].url,f.reference!=="unknown"?u=u.replace(/\/master\//,`/${g}/${f.reference}/`):ni!==null&&(u=u.replace(/\/master\//,`/@yarnpkg/cli/${ni}/`))}s.reportInfo(ke.UNNAMED,`Downloading ${Ue.pretty(e,u,"green")}`),l=await qn.get(u,{configuration:e})}await LU(n,l,{project:o,report:s})})).exitCode()}};cB.paths=[["plugin","import"]],cB.usage=dt.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
|
|||
|
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
|
|||
|
|
|||
|
Three types of plugin references are accepted:
|
|||
|
|
|||
|
- If the plugin is stored within the Yarn repository, it can be referenced by name.
|
|||
|
- Third-party plugins can be referenced directly through their public urls.
|
|||
|
- Local plugins can be referenced by their path on the disk.
|
|||
|
|
|||
|
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
|
|||
|
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});var ehe=cB;async function LU(t,e,{project:r,report:s}){let{configuration:o}=r,n={},l={exports:n};(0,$0e.runInNewContext)(e.toString(),{module:l,exports:n});let u=l.exports.name,f=`.yarn/plugins/${u}.cjs`,g=$.resolve(r.cwd,f);s.reportInfo(ke.UNNAMED,`Saving the new plugin in ${Ue.pretty(o,f,"magenta")}`),await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.writeFilePromise(g,e);let C={path:f,spec:t};await st.updateConfiguration(r.cwd,w=>{let B=[],S=!1;for(let y of w.plugins||[]){let N=typeof y!="string"?y.path:y,L=$.resolve(r.cwd,de.toPortablePath(N)),{name:H}=it.dynamicRequire(L);H!==u?B.push(y):(B.push(C),S=!0)}return S||B.push(C),Te(re({},w),{plugins:B})})}var kgt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],uB=class extends It{constructor(){super(...arguments);this.installPath=Ie.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Ie.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Ie.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=Ie.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=Ie.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=typeof this.installPath!="undefined"?$.resolve(this.context.cwd,de.toPortablePath(this.installPath)):$.resolve(de.toPortablePath((0,the.tmpdir)()),"yarnpkg-sources",eo.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:e,stdout:this.context.stdout},async o=>{let{project:n}=await Lt.find(e,this.context.cwd),l=W.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),u=W.stringifyIdent(l),f=await Cd(e,ni);if(!Object.prototype.hasOwnProperty.call(f,u))throw new gr(ke.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${u}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let g=u;await MU(this,{configuration:e,report:o,target:r}),await NU(g,this,{project:n,report:o,target:r})})).exitCode()}};uB.paths=[["plugin","import","from","sources"]],uB.usage=dt.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
|
|||
|
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
|
|||
|
|
|||
|
The plugins can be referenced by their short name if sourced from the official Yarn repository.
|
|||
|
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});var rhe=uB;async function NU(t,{context:e,noMinify:r},{project:s,report:o,target:n}){let l=t.replace(/@yarnpkg\//,""),{configuration:u}=s;o.reportSeparator(),o.reportInfo(ke.UNNAMED,`Building a fresh ${l}`),o.reportSeparator(),await lB(kgt({pluginName:l,noMinify:r},n),{configuration:u,context:e,target:n}),o.reportSeparator();let f=$.resolve(n,`packages/${l}/bundles/${t}.js`),g=await ge.readFilePromise(f);await LU(t,g,{project:s,report:o})}Ge();Kt();tr();var fB=class extends It{constructor(){super(...arguments);this.name=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Lt.find(e,this.context.cwd);return(await Nt.start({configuration:e,stdout:this.context.stdout},async o=>{let n=this.name,l=W.parseIdent(n);if(!e.plugins.has(n))throw new ht(`${W.prettyIdent(e,l)} isn't referenced by the current configuration`);let u=`.yarn/plugins/${n}.cjs`,f=$.resolve(r.cwd,u);ge.existsSync(f)&&(o.reportInfo(ke.UNNAMED,`Removing ${Ue.pretty(e,u,Ue.Type.PATH)}...`),await ge.removePromise(f)),o.reportInfo(ke.UNNAMED,"Updating the configuration..."),await st.updateConfiguration(r.cwd,g=>{if(!Array.isArray(g.plugins))return g;let C=g.plugins.filter(w=>w.path!==u);return g.plugins.length===C.length?g:Te(re({},g),{plugins:C})})})).exitCode()}};fB.paths=[["plugin","remove"]],fB.usage=dt.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
|
|||
|
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
|
|||
|
|
|||
|
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
|
|||
|
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});var nhe=fB;Ge();tr();var gB=class extends It{constructor(){super(...arguments);this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{for(let o of e.plugins.keys()){let n=this.context.plugins.plugins.has(o),l=o;n&&(l+=" [builtin]"),s.reportJson({name:o,builtin:n}),s.reportInfo(null,`${l}`)}})).exitCode()}};gB.paths=[["plugin","runtime"]],gB.usage=dt.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
|
|||
|
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
|
|||
|
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});var ihe=gB;Ge();Ge();tr();var pB=class extends It{constructor(){super(...arguments);this.idents=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);let n=new Set;for(let u of this.idents)n.add(W.parseIdent(u).identHash);if(await r.restoreInstallState({restoreResolutions:!1}),await r.resolveEverything({cache:o,report:new cs}),n.size>0)for(let u of r.storedPackages.values())n.has(u.identHash)&&r.storedBuildState.delete(u.locatorHash);else r.storedBuildState.clear();return(await Nt.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async u=>{await r.install({cache:o,report:u})})).exitCode()}};pB.paths=[["rebuild"]],pB.usage=dt.Usage({description:"rebuild the project's native packages",details:`
|
|||
|
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
|
|||
|
|
|||
|
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
|
|||
|
|
|||
|
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
|
|||
|
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});var she=pB;Ge();Ge();Ge();tr();var OU=He(ka());OA();var hB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=Ie.String("--mode",{description:"Change what artifacts installs generate",validator:Co(Ks)});this.patterns=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=this.all?r.workspaces:[s],l=[Wi.REGULAR,Wi.DEVELOPMENT,Wi.PEER],u=[],f=!1,g=[];for(let S of this.patterns){let y=!1,N=W.parseIdent(S);for(let L of n){let H=[...L.manifest.peerDependenciesMeta.keys()];for(let G of(0,OU.default)(H,S))L.manifest.peerDependenciesMeta.delete(G),f=!0,y=!0;for(let G of l){let te=L.manifest.getForScope(G),fe=[...te.values()].map(me=>W.stringifyIdent(me));for(let me of(0,OU.default)(fe,W.stringifyIdent(N))){let{identHash:ye}=W.parseIdent(me),Se=te.get(ye);if(typeof Se=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");L.manifest[G].delete(ye),g.push([L,G,Se]),f=!0,y=!0}}}y||u.push(S)}let C=u.length>1?"Patterns":"Pattern",w=u.length>1?"don't":"doesn't",B=this.all?"any":"this";if(u.length>0)throw new ht(`${C} ${Ue.prettyList(e,u,Bo.CODE)} ${w} match any packages referenced by ${B} workspace`);return f?(await e.triggerMultipleHooks(y=>y.afterWorkspaceDependencyRemoval,g),(await Nt.start({configuration:e,stdout:this.context.stdout},async y=>{await r.install({cache:o,report:y,mode:this.mode})})).exitCode()):0}};hB.paths=[["remove"]],hB.usage=dt.Usage({description:"remove dependencies from the project",details:`
|
|||
|
This command will remove the packages matching the specified patterns from the current workspace.
|
|||
|
|
|||
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|||
|
|
|||
|
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|||
|
|
|||
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|||
|
|
|||
|
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
|
|||
|
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});var ohe=hB;Ge();Ge();var ahe=He(require("util")),TS=class extends It{async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);return(await Nt.start({configuration:e,stdout:this.context.stdout},async n=>{let l=s.manifest.scripts,u=it.sortMap(l.keys(),C=>C),f={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2},g=u.reduce((C,w)=>Math.max(C,w.length),0);for(let[C,w]of l.entries())n.reportInfo(null,`${C.padEnd(g," ")} ${(0,ahe.inspect)(w,f)}`)})).exitCode()}};TS.paths=[["run"]];var Ahe=TS;Ge();Ge();tr();var dB=class extends It{constructor(){super(...arguments);this.inspect=Ie.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=Ie.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=Ie.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=Ie.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=Ie.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=Ie.Boolean("--silent",{hidden:!0});this.scriptName=Ie.String();this.args=Ie.Proxy()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s,locator:o}=await Lt.find(e,this.context.cwd);await r.restoreInstallState();let n=this.topLevel?r.topLevelWorkspace.anchoredLocator:o;if(!this.binariesOnly&&await vn.hasPackageScript(n,this.scriptName,{project:r}))return await vn.executePackageScript(n,this.scriptName,this.args,{project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let l=await vn.getPackageAccessibleBinaries(n,{project:r});if(l.get(this.scriptName)){let f=[];return this.inspect&&(typeof this.inspect=="string"?f.push(`--inspect=${this.inspect}`):f.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?f.push(`--inspect-brk=${this.inspectBrk}`):f.push("--inspect-brk")),this.require&&f.push(`--require=${this.require}`),await vn.executePackageAccessibleBinary(n,this.scriptName,this.args,{cwd:this.context.cwd,project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:f,packageAccessibleBinaries:l})}if(!this.topLevel&&!this.binariesOnly&&s&&this.scriptName.includes(":")){let g=(await Promise.all(r.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(g.length===1)return await vn.executeWorkspaceScript(g[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new ht(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(e,o)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new ht(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(e,o)}).`);{if(this.scriptName==="global")throw new ht("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let f=[this.scriptName].concat(th
|
|||
|
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
|
|||
|
|
|||
|
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
|
|||
|
|
|||
|
- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
|
|||
|
|
|||
|
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
|
|||
|
|
|||
|
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
|
|||
|
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});var lhe=dB;Ge();Ge();tr();var mB=class extends It{constructor(){super(...arguments);this.save=Ie.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=Ie.String();this.resolution=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(await r.restoreInstallState({restoreResolutions:!1}),!s)throw new pr(r.cwd,this.context.cwd);let n=W.parseDescriptor(this.descriptor,!0),l=W.makeDescriptor(n,this.resolution);return r.storedDescriptors.set(n.descriptorHash,n),r.storedDescriptors.set(l.descriptorHash,l),r.resolutionAliases.set(n.descriptorHash,l.descriptorHash),(await Nt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};mB.paths=[["set","resolution"]],mB.usage=dt.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});var che=mB;Ge();Kt();tr();var uhe=He(ka()),yB=class extends It{constructor(){super(...arguments);this.all=Ie.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);let n=r.topLevelWorkspace,l=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:f,reference:g}of n.manifest.resolutions)g.startsWith("portal:")&&l.add(f.descriptor.fullName);if(this.leadingArguments.length>0)for(let f of this.leadingArguments){let g=$.resolve(this.context.cwd,de.toPortablePath(f));if(it.isPathLike(f)){let C=await st.find(g,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:B}=await Lt.find(C,g);if(!B)throw new pr(w.cwd,g);if(this.all){for(let S of w.workspaces)S.manifest.name&&l.add(W.stringifyIdent(S.locator));if(l.size===0)throw new ht("No workspace found to be unlinked in the target project")}else{if(!B.manifest.name)throw new ht("The target workspace doesn't have a name and thus cannot be unlinked");l.add(W.stringifyIdent(B.locator))}}else{let C=[...n.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,uhe.default)(C,f))l.add(w)}}return n.manifest.resolutions=n.manifest.resolutions.filter(({pattern:f})=>!l.has(f.descriptor.fullName)),(await Nt.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:o,report:f})})).exitCode()}};yB.paths=[["unlink"]],yB.usage=dt.Usage({description:"disconnect the local project from another one",details:`
|
|||
|
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
|
|||
|
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});var fhe=yB;Ge();Ge();Ge();tr();var ghe=He(_w()),UU=He(ka());OA();var Wy=class extends It{constructor(){super(...arguments);this.interactive=Ie.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=Ie.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=Ie.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Ie.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Ie.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=Ie.String("--mode",{description:"Change what artifacts installs generate",validator:Co(Ks)});this.patterns=Ie.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=[...r.storedDescriptors.values()],l=n.map(C=>W.stringifyIdent(C)),u=new Set;for(let C of this.patterns){if(W.parseDescriptor(C).range!=="unknown")throw new ht("Ranges aren't allowed when using --recursive");for(let w of(0,UU.default)(l,C)){let B=W.parseIdent(w);u.add(B.identHash)}}let f=n.filter(C=>u.has(C.identHash));for(let C of f)r.storedDescriptors.delete(C.descriptorHash),r.storedResolutions.delete(C.descriptorHash);return(await Nt.start({configuration:e,stdout:this.context.stdout},async C=>{await r.install({cache:o,report:C})})).exitCode()}async executeUpClassic(){var L;let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd),o=await $r.find(e);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let n=this.fixed,l=(L=this.interactive)!=null?L:e.get("preferInteractive"),u=Kw(this,r),f=l?[us.KEEP,us.REUSE,us.PROJECT,us.LATEST]:[us.PROJECT,us.LATEST],g=[],C=[];for(let H of this.patterns){let G=!1,te=W.parseDescriptor(H);for(let fe of r.workspaces)for(let me of[Wi.REGULAR,Wi.DEVELOPMENT]){let Se=[...fe.manifest.getForScope(me).values()].map(Ce=>W.stringifyIdent(Ce));for(let Ce of(0,UU.default)(Se,W.stringifyIdent(te))){let Pe=W.parseIdent(Ce),Qe=fe.manifest[me].get(Pe.identHash);if(typeof Qe=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");let p=W.makeDescriptor(Pe,te.range);g.push(Promise.resolve().then(async()=>[fe,me,Qe,await Hw(p,{project:r,workspace:fe,cache:o,target:me,fixed:n,modifier:u,strategies:f})])),G=!0}}G||C.push(H)}if(C.length>1)throw new ht(`Patterns ${Ue.prettyList(e,C,Bo.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new ht(`Pattern ${Ue.prettyList(e,C,Bo.CODE)} doesn't match any packages referenced by any workspace`);let w=await Promise.all(g),B=await yg.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async H=>{for(let[,,G,{suggestions:te,rejections:fe}]of w){let me=te.filter(ye=>ye.descriptor!==null);if(me.length===0){let[ye]=fe;if(typeof ye=="undefined")throw new Error("Assertion failed: Expected an error to have been set");let Se=this.cli.error(ye);r.configuration.get("enableNetwork")?H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} can't be resolved to a satisfying range
|
|||
|
|
|||
|
${Se}`):H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
|||
|
|
|||
|
${Se}`)}else me.length>1&&!l&&H.reportError(ke.CANT_SUGGEST_RESOLUTIONS,`${W.prettyDescriptor(e,G)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(B.hasErrors())return B.exitCode();let S=!1,y=[];for(let[H,G,,{suggestions:te}]of w){let fe,me=te.filter(Pe=>Pe.descriptor!==null),ye=me[0].descriptor,Se=me.every(Pe=>W.areDescriptorsEqual(Pe.descriptor,ye));me.length===1||Se?fe=ye:(S=!0,{answer:fe}=await(0,ghe.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${W.prettyWorkspace(e,H)} \u276F ${G}?`,choices:te.map(({descriptor:Pe,name:Qe,reason:p})=>Pe?{name:Qe,hint:p,descriptor:Pe}:{name:Qe,hint:p,disabled:!0}),onCancel:()=>process.exit(130),result(Pe){return this.find(Pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ce=H.manifest[G].get(fe.identHash);if(typeof Ce=="undefined")throw new Error("Assertion failed: This descriptor should have a matching entry");if(Ce.descriptorHash!==fe.descriptorHash)H.manifest[G].set(fe.identHash,fe),y.push([H,G,Ce,fe]);else{let Pe=e.makeResolver(),Qe={project:r,resolver:Pe},p=e.normalizeDependency(Ce),Oe=Pe.bindDescriptor(p,H.anchoredLocator,Qe);r.forgetResolution(Oe)}}return await e.triggerMultipleHooks(H=>H.afterWorkspaceDependencyReplacement,y),S&&this.context.stdout.write(`
|
|||
|
`),(await Nt.start({configuration:e,stdout:this.context.stdout},async H=>{await r.install({cache:o,report:H,mode:this.mode})})).exitCode()}};Wy.paths=[["up"]],Wy.usage=dt.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Wy.schema=[sR("recursive",Ch.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var phe=Wy;Ge();Ge();Ge();tr();var CB=class extends It{constructor(){super(...arguments);this.recursive=Ie.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=Ie.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=Ie.String()}async execute(){let e=await st.find
|
|||
|
This command prints the exact reasons why a package appears in the dependency tree.
|
|||
|
|
|||
|
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
|
|||
|
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});var hhe=CB;function Sgt(t,e,{configuration:r,peers:s}){let o=it.sortMap(t.storedPackages.values(),u=>W.stringifyLocator(u)),n={},l={children:n};for(let u of o){let f={},g=null;for(let C of u.dependencies.values()){if(!s&&u.peerDependencies.has(C.identHash))continue;let w=t.storedResolutions.get(C.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let B=t.storedPackages.get(w);if(!B)throw new Error("Assertion failed: The package should have been registered");if(B.identHash!==e)continue;if(g===null){let y=W.stringifyLocator(u);n[y]={value:[u,Ue.Type.LOCATOR],children:f}}let S=W.stringifyLocator(B);f[S]={value:[{descriptor:C,locator:B},Ue.Type.DEPENDENT]}}}return l}function xgt(t,e,{configuration:r,peers:s}){let o=it.sortMap(t.workspaces,B=>W.stringifyLocator(B.anchoredLocator)),n=new Set,l=new Set,u=B=>{if(n.has(B.locatorHash))return l.has(B.locatorHash);if(n.add(B.locatorHash),B.identHash===e)return l.add(B.locatorHash),!0;let S=!1;B.identHash===e&&(S=!0);for(let y of B.dependencies.values()){if(!s&&B.peerDependencies.has(y.identHash))continue;let N=t.storedResolutions.get(y.descriptorHash);if(!N)throw new Error("Assertion failed: The resolution should have been registered");let L=t.storedPackages.get(N);if(!L)throw new Error("Assertion failed: The package should have been registered");u(L)&&(S=!0)}return S&&l.add(B.locatorHash),S};for(let B of o){let S=t.storedPackages.get(B.anchoredLocator.locatorHash);if(!S)throw new Error("Assertion failed: The package should have been registered");u(S)}let f=new Set,g={},C={children:g},w=(B,S,y)=>{if(!l.has(B.locatorHash))return;let N=y!==null?Ue.tuple(Ue.Type.DEPENDENT,{locator:B,descriptor:y}):Ue.tuple(Ue.Type.LOCATOR,B),L={},H={value:N,children:L},G=W.stringifyLocator(B);if(S[G]=H,!f.has(B.locatorHash)&&(f.add(B.locatorHash),!(y!==null&&t.tryWorkspaceByLocator(B))))for(let te of B.dependencies.values()){if(!s&&B.peerDependencies.has(te.identHash))continue;let fe=t.storedResolutions.get(te.descriptorHash);if(!fe)throw new Error("Assertion failed: The resolution should have been registered");let me=t.storedPackages.get(fe);if(!me)throw new Error("Assertion failed: The package should have been registered");w(me,L,te)}};for(let B of o){let S=t.storedPackages.get(B.anchoredLocator.locatorHash);if(!S)throw new Error("Assertion failed: The package should have been registered");w(S,g,null)}return C}Ge();var XU={};or(XU,{default:()=>zgt,gitUtils:()=>XA});Ge();Ge();Kt();var XA={};or(XA,{TreeishProtocols:()=>sa,clone:()=>JU,fetchBase:()=>Mhe,fetchChangedFiles:()=>Lhe,fetchChangedWorkspaces:()=>Jgt,fetchRoot:()=>Nhe,isGitUrl:()=>Vy,lsRemote:()=>The,normalizeLocator:()=>GU,normalizeRepoUrl:()=>IB,resolveUrl:()=>WU,splitRepoUrl:()=>a0});Ge();Kt();tr();var qU=He(bhe()),Phe=He(iO()),Jy=He(require("querystring")),jU=He(ki()),Fhe=He(require("url"));function Rhe(){return Te(re({},process.env),{GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`})}var Wgt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],sa;(function(o){o.Commit="commit",o.Head="head",o.Tag="tag",o.Semver="semver"})(sa||(sa={}));function Vy(t){return t?Wgt.some(e=>!!t.match(e)):!1}function a0(t){t=IB(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:sa.Head,request:"HEAD"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let o=Jy.default.parse(s);for(let[f,g]of Object.entries(o))if(typeof g!="string")throw new Error(`Assertion failed: The ${f} parameter must be a literal string`);let n=Object.values(sa).find(f=>Object.prototype.hasOwnProperty.call(o,f)),[l,u]=typeof n!="undefined"?[n,o[n]]:[sa.Head,"HEAD"];for(let f of Object.va
|
|||
|
- ${u.join(`
|
|||
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:l.cwd})}};wB.paths=[["workspace"]],wB.usage=dt.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
|
|||
|
This command will run a given sub-command on a single workspace.
|
|||
|
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var Uhe=wB;var Xgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:ct.BOOLEAN,default:_he.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:ct.STRING,values:["^","~",""],default:Hu.CARET},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:ct.BOOLEAN,default:!1}},commands:[hpe,ype,u0e,v0e,che,z0e,O0e,Ohe,P0e,F0e,R0e,T0e,gpe,ppe,D0e,S0e,N0e,M0e,_0e,H0e,q0e,G0e,fhe,Y0e,rhe,ehe,nhe,W0e,ihe,she,ohe,Ahe,lhe,phe,hhe,Uhe]},Zgt=Xgt;var n3={};or(n3,{default:()=>ept});Ge();var Ut={optional:!0},$U=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Ut,zenObservable:Ut}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Ut,zenObservable:Ut}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Ut}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:Ut,["postcss-jsx"]:Ut,["postcss-less"]:Ut,["postcss-markdown"]:Ut,["postcss-scss"]:Ut}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Ut}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Ut}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Ut,"vue-template-compiler":Ut}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Ut,"utf-8-validate":Ut}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpa
|
|||
|
This command will output all matches to the given prolog query.
|
|||
|
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});var dde=vB;function upt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function fpt(t,e){let r=t===0,s=t===e-1;return r&&s?"":r?"\u250C ":s?"\u2514 ":"\u2502 "}Ge();tr();var DB=class extends It{constructor(){super(...arguments);this.verbose=Ie.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:e}=await Promise.resolve().then(()=>(US(),LS)),r=await st.find(this.context.cwd,this.context.plugins),{project:s}=await Lt.find(r,this.context.cwd),o=await e.find(s);this.context.stdout.write(this.verbose?o.fullSource:o.source)}};DB.paths=[["constraints","source"]],DB.usage=dt.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});var mde=DB;Ge();Ge();Ge();tr();var yde=He(Yw()),Cde=He(DU()),Ide=He(xU()),kB=class extends It{constructor(){super(...arguments);this.fix=Ie.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"})}async execute(){let{Constraints:e}=await Promise.resolve().then(()=>(US(),LS)),r=await st.find(this.context.cwd,this.context.plugins),{project:s}=await Lt.find(r,this.context.cwd),o=await e.find(s),n=await Nt.start({configuration:r,stdout:this.context.stdout},async l=>{let u=new Set,f=[];for(let g=0,C=this.fix?10:1;g<C;++g){f=[];let w=await o.process(),B=new Set;await gpt(B,f,w.enforcedDependencies,{fix:this.fix,configuration:r});for(let{manifest:y}of B){let N={};y.exportTo(N),y.raw=N}let S=new Set;await ppt(S,f,w.enforcedFields,{fix:this.fix,configuration:r});for(let{manifest:y}of S)y.load(y.raw);if(u=new Set([...u,...B,...S]),B.size===0&&S.size===0)break}await Promise.all([...u].map(async g=>{await g.persistManifest()}));for(let[g,C]of f)l.reportError(g,C)});return n.hasErrors()?n.exitCode():0}};kB.paths=[["constraints"]],kB.usage=dt.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
|
|||
|
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
|
|||
|
|
|||
|
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
|
|||
|
|
|||
|
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
|
|||
|
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});var Ede=kB;async function gpt(t,e,r,{configuration:s,fix:o}){let n=new Map,l=new Map;for(let{workspace:u,dependencyIdent:f,dependencyRange:g,dependencyType:C}of r){let w=l.get(u);typeof w=="undefined"&&l.set(u,w=new Map);let B=w.get(f.identHash);typeof B=="undefined"&&w.set(f.identHash,B=new Map);let S=B.get(C);typeof S=="undefined"&&B.set(C,S=new Set),n.set(f.identHash,f),S.add(g)}for(let[u,f]of l)for(let[g,C]of f){let w=n.get(g);if(typeof w=="undefined")throw new Error("Assertion failed: The ident should have been registered");for(let[B,S]of C){let y=S.has(null)?[null]:[...S];if(y.length>2)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via conflicting ranges ${y.slice(0,-1).map(N=>W.prettyRange(s,String(N))).join(", ")}, and ${W.prettyRange(s,String(y[y.length-1]))} (in ${B})`]);else if(y.length>1)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via conflicting ranges ${W.prettyRange(s,String(y[0]))} and ${W.prettyRange(s,String(y[1]))} (in ${B})`]);else{let N=u.manifest[B].get(w.identHash),[L]=y;L!==null?N?N.range!==L&&(o?(u.manifest[B].set(w.identHash,W.makeDescriptor(w,L)),t.add(u)):e.push([ke.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} via ${W.prettyRange(s,L)}, but uses ${W.prettyRange(s,N.range)} instead (in ${B})`])):o?(u.manifest[B].set(w.identHash,W.makeDescriptor(w,L)),t.add(u)):e.push([ke.CONSTRAINTS_MISSING_DEPENDENCY,`${W.prettyWorkspace(s,u)} must depend on ${W.prettyIdent(s,w)} (via ${W.prettyRange(s,L)}), but doesn't (in ${B})`]):N&&(o?(u.manifest[B].delete(w.identHash),t.add(u)):e.push([ke.CONSTRAINTS_EXTRANEOUS_DEPENDENCY,`${W.prettyWorkspace(s,u)} has an extraneous dependency on ${W.prettyIdent(s,w)} (in ${B})`]))}}}}async function ppt(t,e,r,{configuration:s,fix:o}){let n=new Map;for(let{workspace:l,fieldPath:u,fieldValue:f}of r){let g=it.getMapWithDefault(n,l);it.getSetWithDefault(g,u).add(f)}for(let[l,u]of n)for(let[f,g]of u){let C=[...g];if(C.length>2)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,l)} must have a field ${Ue.pretty(s,f,"cyan")} set to conflicting values ${C.slice(0,-1).map(w=>Ue.pretty(s,String(w),"magenta")).join(", ")}, or ${Ue.pretty(s,String(C[C.length-1]),"magenta")}`]);else if(C.length>1)e.push([ke.CONSTRAINTS_AMBIGUITY,`${W.prettyWorkspace(s,l)} must have a field ${Ue.pretty(s,f,"cyan")} set to conflicting values ${Ue.pretty(s,String(C[0]),"magenta")} or ${Ue.pretty(s,String(C[1]),"magenta")}`]);else{let w=(0,yde.default)(l.manifest.raw,f),[B]=C;B!==null?w===void 0?o?(await C3(l,f,B),t.add(l)):e.push([ke.CONSTRAINTS_MISSING_FIELD,`${W.prettyWorkspace(s,l)} must have a field ${Ue.pretty(s,f,"cyan")} set to ${Ue.pretty(s,String(B),"magenta")}, but doesn't`]):JSON.stringify(w)!==B&&(o?(await C3(l,f,B),t.add(l)):e.push([ke.CONSTRAINTS_INCOMPATIBLE_FIELD,`${W.prettyWorkspace(s,l)} must have a field ${Ue.pretty(s,f,"cyan")} set to ${Ue.pretty(s,String(B),"magenta")}, but is set to ${Ue.pretty(s,JSON.stringify(w),"magenta")} instead`])):w!=null&&(o?(await C3(l,f,null),t.add(l)):e.push([ke.CONSTRAINTS_EXTRANEOUS_FIELD,`${W.prettyWorkspace(s,l)} has an extraneous field ${Ue.pretty(s,f,"cyan")} set to ${Ue.pretty(s,JSON.stringify(w),"magenta")}`]))}}}async function C3(t,e,r){r===null?(0,Ide.default)(t.manifest.raw,e):(0,Cde.default)(t.manifest.raw,e,JSON.parse(r))}var hpt={configuration:{constraintsPath:{description:"The path of the constraints file.",type:ct.ABSOLUTE_PATH,default:"./constraints.pro"}},commands:[dde,mde,Ede]},dpt=hpt;var E3={};or(E3,{default:()=>ypt});Ge();tr();var _S=class extends It{constructor(){super(...arguments);this.pkg=Ie.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=Ie.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=Ie.String();this.arg
|
|||
|
`),await ge.writeFilePromise($.join(r,"yarn.lock"),"");let s=$.join(r,".yarnrc.yml"),o=await st.findProjectCwd(this.context.cwd,tn.lockfile),l={enableGlobalCache:!(await st.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Iu(ke.UNUSED_PACKAGE_EXTENSION),level:Ue.LogLevel.Discard}]},u=o!==null?$.join(o,".yarnrc.yml"):null;u!==null&&ge.existsSync(u)?(await ge.copyFilePromise(u,s),await st.updateConfiguration(r,L=>{let H=it.toMerged(L,l);return Array.isArray(L.plugins)&&(H.plugins=L.plugins.map(G=>{let te=typeof G=="string"?G:G.path,fe=de.isAbsolute(te)?te:de.resolve(de.fromPortablePath(o),te);return typeof G=="string"?fe:{path:fe,spec:G.spec}})),H})):await ge.writeJsonPromise(s,l);let f=(N=this.packages)!=null?N:[this.command],g=W.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...f],{cwd:r,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`
|
|||
|
`);let w=await st.find(r,this.context.plugins),{project:B,workspace:S}=await Lt.find(w,r);if(S===null)throw new pr(B.cwd,r);await B.restoreInstallState();let y=await vn.getWorkspaceAccessibleBinaries(S);return y.has(g)===!1&&y.size===1&&typeof this.packages=="undefined"&&(g=Array.from(y)[0][0]),await vn.executeWorkspaceAccessibleBinary(S,g,this.args,{packageAccessibleBinaries:y,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};SB.paths=[["dlx"]],SB.usage=dt.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var Bde=SB;var mpt={commands:[wde,Bde]},ypt=mpt;var k3={};or(k3,{default:()=>Ept,execUtils:()=>w3});Ge();Ge();Kt();var qu="exec:";var w3={};or(w3,{loadGeneratorFile:()=>xB,makeLocator:()=>Q3,makeSpec:()=>Qde,parseSpec:()=>B3});Ge();Kt();function B3(t){let{params:e,selector:r}=W.parseRange(t),s=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:s}}function Qde({parentLocator:t,path:e,generatorHash:r,protocol:s}){let o=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r!="undefined"?{hash:r}:{};return W.makeRange({protocol:s,source:e,selector:e,params:re(re({},n),o)})}function Q3(t,{parentLocator:e,path:r,generatorHash:s,protocol:o}){return W.makeLocator(t,Qde({parentLocator:e,path:r,generatorHash:s,protocol:o}))}async function xB(t,e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(t,{protocol:e}),n=$.isAbsolute(o)?{packageFs:new xn(bt.root),prefixPath:bt.dot,localPath:bt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new xn(bt.root),prefixPath:$.relative(bt.root,n.localPath)}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.join(l.prefixPath,o);return await u.readFilePromise(f,"utf8")}var v3=class{supports(e,r){return!!e.reference.startsWith(qu)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:qu});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r)},r.cacheOptions));return{packageFs:o,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:l}}async fetchFromDisk(e,r){let s=await xB(e.reference,qu,r);return ge.mktempPromise(async o=>{let n=$.join(o,"generator.js");return await ge.writeFilePromise(n,s),ge.mktempPromise(async l=>{if(await this.generatePackage(l,e,n,r),!ge.existsSync($.join(l,"build")))throw new Error("The script should have generated a build directory");return await Es.makeArchiveFromDirectory($.join(l,"build"),{prefixPath:W.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,s,o){return await ge.mktempPromise(async n=>{let l=await vn.makeScriptEnv({project:o.project,binFolder:n}),u=$.join(e,"runtime.js");return await ge.mktempPromise(async f=>{let g=$.join(f,"buildfile.log"),C=null,w=ge.createWriteStream(g),B=w,S=$.join(e,"generator"),y=$.join(e,"build");await ge.mkdirPromise(S),await ge.mkdirPromise
|
|||
|
// Expose 'Module' as a global variable
|
|||
|
Object.defineProperty(global, 'Module', {
|
|||
|
get: () => require('module'),
|
|||
|
configurable: true,
|
|||
|
enumerable: false,
|
|||
|
});
|
|||
|
|
|||
|
// Expose non-hidden built-in modules as global variables
|
|||
|
for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
|
|||
|
Object.defineProperty(global, name, {
|
|||
|
get: () => require(name),
|
|||
|
configurable: true,
|
|||
|
enumerable: false,
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
// Expose the 'execEnv' global variable
|
|||
|
Object.defineProperty(global, 'execEnv', {
|
|||
|
value: {
|
|||
|
...${JSON.stringify(N)},
|
|||
|
},
|
|||
|
enumerable: true,
|
|||
|
});
|
|||
|
`);let L=l.NODE_OPTIONS||"",H=/\s*--require\s+\S*\.pnp\.c?js\s*/g;L=L.replace(H," ").trim(),l.NODE_OPTIONS=L,w.write(`# This file contains the result of Yarn generating a package (${W.stringifyLocator(r)})
|
|||
|
`),w.write(`
|
|||
|
`);let{code:G}=await wn.pipevp(process.execPath,["--require",de.fromPortablePath(u),de.fromPortablePath(s),W.stringifyIdent(r)],{cwd:e,env:l,stdin:C,stdout:w,stderr:B});if(G!==0)throw ge.detachTemp(f),new Error(`Package generation failed (exit code ${G}, logs can be found here: ${Ue.pretty(o.project.configuration,g,Ue.Type.PATH)})`)})})}};Ge();Ge();Ge();var Cpt=2,D3=class{supportsDescriptor(e,r){return!!e.range.startsWith(qu)}supportsLocator(e,r){return!!e.reference.startsWith(qu)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:o,parentLocator:n}=B3(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let l=await xB(W.makeRange({protocol:qu,source:o,selector:o,params:{locator:W.stringifyLocator(n)}}),qu,s.fetchOptions),u=eo.makeHash(`${Cpt}`,l).slice(0,6);return[Q3(e,{parentLocator:n,path:o,generatorHash:u,protocol:qu})]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),o=await it.releaseAfterUseAsync(async()=>await Xt.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return Te(re({},e),{version:o.version||"0.0.0",languageName:o.languageName||r.project.configuration.get("defaultLanguageName"),linkType:zr.HARD,conditions:o.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(o.dependencies),peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};var Ipt={fetchers:[v3],resolvers:[D3]},Ept=Ipt;var M3={};or(M3,{default:()=>Qpt,fileUtils:()=>S3});Ge();Kt();var eC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,bB=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,fs="file:";var S3={};or(S3,{makeArchiveFromLocator:()=>KS,makeBufferFromLocator:()=>P3,makeLocator:()=>b3,makeSpec:()=>vde,parseSpec:()=>x3});Ge();Kt();function x3(t){let{params:e,selector:r}=W.parseRange(t),s=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:s}}function vde({parentLocator:t,path:e,folderHash:r,protocol:s}){let o=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r!="undefined"?{hash:r}:{};return W.makeRange({protocol:s,source:e,selector:e,params:re(re({},n),o)})}function b3(t,{parentLocator:e,path:r,folderHash:s,protocol:o}){return W.makeLocator(t,vde({parentLocator:e,path:r,folderHash:s,protocol:o}))}async function KS(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:o,path:n}=W.parseFileStyleRange(t.reference,{protocol:e}),l=$.isAbsolute(n)?{packageFs:new xn(bt.root),prefixPath:bt.dot,localPath:bt.root}:await r.fetcher.fetch(o,r),u=l.localPath?{packageFs:new xn(bt.root),prefixPath:$.relative(bt.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();let f=u.packageFs,g=$.join(u.prefixPath,n);return await it.releaseAfterUseAsync(async()=>await Es.makeArchiveFromDirectory(g,{baseFs:f,prefixPath:W.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),u.releaseFs)}async function P3(t,{protocol:e,fetchOptions:r}){return(await KS(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var F3=class{supports(e,r){return!!e.reference.startsWith(fs)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:fs});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in th
|
|||
|
`);let l=$.join(this.context.cwd,Xt.fileName);await ge.changeFilePromise(l,`${JSON.stringify(n,null,2)}
|
|||
|
`,{automaticNewlines:!0});let u=$.join(this.context.cwd,"README.md");if(ge.existsSync(u)||await ge.writeFilePromise(u,`# ${W.stringifyIdent(s.name)}
|
|||
|
`),!r||r.cwd===this.context.cwd){let g=$.join(this.context.cwd,tn.lockfile);ge.existsSync(g)||await ge.writeFilePromise(g,"");let w=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!.yarn/cache","#.pnp.*"].map(L=>`${L}
|
|||
|
`).join(""),B=$.join(this.context.cwd,".gitignore");ge.existsSync(B)||await ge.writeFilePromise(B,w);let S={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};it.mergeIntoTarget(S,e.get("initEditorConfig"));let y=`root = true
|
|||
|
`;for(let[L,H]of Object.entries(S)){y+=`
|
|||
|
[${L}]
|
|||
|
`;for(let[G,te]of Object.entries(H))y+=`${G.replace(/[A-Z]/g,me=>`_${me.toLowerCase()}`)} = ${te}
|
|||
|
`}let N=$.join(this.context.cwd,".editorconfig");ge.existsSync(N)||await ge.writeFilePromise(N,y),ge.existsSync($.join(this.context.cwd,".git"))||await wn.execvp("git",["init"],{cwd:this.context.cwd})}}};RB.paths=[["init"]],RB.usage=dt.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var bde=RB;var bpt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:ct.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:ct.MAP,valueDefinition:{description:"",type:ct.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:ct.MAP,valueDefinition:{description:"",type:ct.ANY}}},commands:[bde]},Ppt=bpt;var q_={};or(q_,{default:()=>lCt});Ge();var Pde=He(require("os"));function tC({stdout:t}){if(Pde.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}tr();var Kme=He(o8()),a8={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},mht=(0,Kme.default)(a8.appId,a8.apiKey).initIndex(a8.indexName),A8=async(t,e=0)=>await mht.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var R1=["regular","dev","peer"],T1=class extends It{async execute(){tC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(Sx(),P_)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Fx(),Px)),{useKeypress:s}=await Promise.resolve().then(()=>(x1(),iEe)),{useMinistore:o}=await Promise.resolve().then(()=>(O_(),L_)),{renderForm:n}=await Promise.resolve().then(()=>(Mx(),Tx)),{default:l}=await Promise.resolve().then(()=>He(pEe())),{Box:u,Text:f}=await Promise.resolve().then(()=>He(Vl())),{default:g,useEffect:C,useState:w}=await Promise.resolve().then(()=>He(yn())),B=await st.find(this.context.cwd,this.context.plugins),S=()=>g.createElement(u,{flexDirection:"row"},g.createElement(u,{flexDirection:"column",width:48},g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<up>"),"/",g.createElement(f,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),g.createElement(u,null,g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),g.createElement(u,{flexDirection:"column"},g.createElement(u,{marginLeft:1},g.createElement(f,null,"Press ",g.createElement(f,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages."))
|
|||
|
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
|
|||
|
`,examples:[["Open the search window","yarn search"]]});var hEe=T1;Ge();tr();T4();var EEe=He(ki()),wEe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,BEe=(t,e)=>t.length>0?[t.slice(0,e)].concat(BEe(t.slice(e),e)):[],M1=class extends It{async execute(){tC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(IEe(),CEe)),{Pad:r}=await Promise.resolve().then(()=>(H_(),dEe)),{ScrollableItems:s}=await Promise.resolve().then(()=>(Fx(),Px)),{useMinistore:o}=await Promise.resolve().then(()=>(O_(),L_)),{renderForm:n}=await Promise.resolve().then(()=>(Mx(),Tx)),{Box:l,Text:u}=await Promise.resolve().then(()=>He(Vl())),{default:f,useEffect:g,useRef:C,useState:w}=await Promise.resolve().then(()=>He(yn())),B=await st.find(this.context.cwd,this.context.plugins),{project:S,workspace:y}=await Lt.find(B,this.context.cwd),N=await $r.find(B);if(!y)throw new pr(S.cwd,this.context.cwd);await S.restoreInstallState({restoreResolutions:!1});let L=this.context.stdout.rows-7,H=(De,Ee)=>{let ue=lue(De,Ee),ne="";for(let Be of ue)Be.added?ne+=Ue.pretty(B,Be.value,"green"):Be.removed||(ne+=Be.value);return ne},G=(De,Ee)=>{if(De===Ee)return Ee;let ue=W.parseRange(De),ne=W.parseRange(Ee),Be=ue.selector.match(wEe),Ne=ne.selector.match(wEe);if(!Be||!Ne)return H(De,Ee);let Bt=["gray","red","yellow","green","magenta"],_=null,Ye="";for(let rt=1;rt<Bt.length;++rt)_!==null||Be[rt]!==Ne[rt]?(_===null&&(_=Bt[rt-1]),Ye+=Ue.pretty(B,Ne[rt],_)):Ye+=Ne[rt];return Ye},te=async(De,Ee,ue)=>{let ne=await o0.fetchDescriptorFrom(De,ue,{project:S,cache:N,preserveModifier:Ee,workspace:y});return ne!==null?ne.range:De.range},fe=async De=>{let Ee=EEe.default.valid(De.range)?`^${De.range}`:De.range,[ue,ne]=await Promise.all([te(De,De.range,Ee).catch(()=>null),te(De,De.range,"latest").catch(()=>null)]),Be=[{value:null,label:De.range}];return ue&&ue!==De.range?Be.push({value:ue,label:G(De.range,ue)}):Be.push({value:null,label:""}),ne&&ne!==ue&&ne!==De.range?Be.push({value:ne,label:G(De.range,ne)}):Be.push({value:null,label:""}),Be},me=()=>f.createElement(l,{flexDirection:"row"},f.createElement(l,{flexDirection:"column",width:49},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<up>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<left>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),f.createElement(l,{flexDirection:"column"},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),ye=()=>f.createElement(l,{flexDirection:"row",paddingTop:1,paddingBottom:1},f.createElement(l,{width:50},f.createElement(u,{bold:!0},f.createElement(u,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Current")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Range")),f.createElement(l,{width:17},f.createElement(u,{bold:!0,underline:!0,color:"gray"},"Latest"))),Se=({active:De,descriptor:Ee,suggestions:ue})=>{let[ne,Be]=o(Ee.descriptorHash,null),Ne=W.stringifyIdent(Ee),Bt=Math.max(0,45-Ne.length);return f.createElement(f.Fragment,null,f.createElement(l,null,f.createElement(l,{width:45},f.createElement(u,{bold:!0},W.prettyIdent(B,Ee)),f.createElement(r,{active:De,length:Bt})),f.createElement(e,{active:De,options:ue,value:ne,skewer:!0,onChange:Be,sizes:[17,17,17]})))},Ce=({dependencies:De})=>{let[Ee,ue]=w(De.map(()=>null)),ne=C(!0),Be=async Ne=>{let Bt=await fe(Ne);return Bt.filter(_=>_.label!=="").length<=1?null:{descriptor:Ne,suggestions:Bt}};return g(()=>()=>{ne.current=!1},[]),g(()=>{let Ne=Math.trunc(L*1.75),Bt=De.slice(0,Ne),_=De.slice(Ne),Ye=BEe(_,L),rt=B
|
|||
|
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
|
|||
|
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var QEe=M1;var ACt={commands:[hEe,QEe]},lCt=ACt;var J_={};or(J_,{default:()=>uCt});Ge();Kt();var Dg="portal:",kg="link:";var j_=class{supports(e,r){return!!e.reference.startsWith(Dg)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:Dg});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){var g;let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:Dg}),n=$.isAbsolute(o)?{packageFs:new xn(bt.root),prefixPath:bt.dot,localPath:bt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new xn(bt.root),prefixPath:$.relative(bt.root,n.localPath),localPath:bt.root}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.resolve((g=l.localPath)!=null?g:l.packageFs.getRealPath(),l.prefixPath,o);return n.localPath?{packageFs:new xn(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:bt.dot,localPath:f}:{packageFs:new Hf(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:bt.dot}}};Ge();Ge();Ge();Kt();var G_=class{supportsDescriptor(e,r){return!!e.range.startsWith(Dg)}supportsLocator(e,r){return!!e.reference.startsWith(Dg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let o=e.range.slice(Dg.length);return[W.makeLocator(e,`${Dg}${de.toPortablePath(o)}`)]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),o=await it.releaseAfterUseAsync(async()=>await Xt.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return Te(re({},e),{version:o.version||"0.0.0",languageName:o.languageName||r.project.configuration.get("defaultLanguageName"),linkType:zr.SOFT,conditions:o.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(o.dependencies),peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};Ge();Kt();var Y_=class{supports(e,r){return!!e.reference.startsWith(kg)}getLocalPath(e,r){let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:kg});if($.isAbsolute(o))return o;let n=r.fetcher.getLocalPath(s,r);return n===null?null:$.resolve(n,o)}async fetch(e,r){var g;let{parentLocator:s,path:o}=W.parseFileStyleRange(e.reference,{protocol:kg}),n=$.isAbsolute(o)?{packageFs:new xn(bt.root),prefixPath:bt.dot,localPath:bt.root}:await r.fetcher.fetch(s,r),l=n.localPath?{packageFs:new xn(bt.root),prefixPath:$.relative(bt.root,n.localPath),localPath:bt.root}:n;n!==l&&n.releaseFs&&n.releaseFs();let u=l.packageFs,f=$.resolve((g=l.localPath)!=null?g:l.packageFs.getRealPath(),l.prefixPath,o);return n.localPath?{packageFs:new xn(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:bt.dot,discardFromLookup:!0,localPath:f}:{packageFs:new Hf(f,{baseFs:u}),releaseFs:l.releaseFs,prefixPath:bt.dot,discardFromLookup:!0}}};Ge();Ge();Kt();var W_=class{supportsDescriptor(e,r){return!!e.range.startsWith(kg)}supportsLocator(e,r){return!!e.reference.startsWith(kg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let o=e.range.slice(kg.length);return[W.makeLocator(e,`${kg}${de.toPortablePath(o)}`)]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return Te(re({},e),{version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:zr.SOFT,conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map})}};var cCt={fetchers:[Y_,j_],resolvers:[W_,G_]
|
|||
|
${C}, next tree:
|
|||
|
${L1(u)}`);let B=DEe(u);if(B)throw new Error(`${B}, after hoisting finished:
|
|||
|
${L1(u)}`)}return n.debugLevel>=2&&console.log(L1(u)),gCt(u)},pCt=t=>{let e=t[t.length-1],r=new Map,s=new Set,o=n=>{if(!s.has(n)){s.add(n);for(let l of n.hoistedDependencies.values())r.set(l.name,l);for(let l of n.dependencies.values())n.peerNames.has(l.name)||o(l)}};return o(e),r},hCt=t=>{let e=t[t.length-1],r=new Map,s=new Set,o=new Set,n=(l,u)=>{if(s.has(l))return;s.add(l);for(let g of l.hoistedDependencies.values())if(!u.has(g.name)){let C;for(let w of t)C=w.dependencies.get(g.name),C&&r.set(C.name,C)}let f=new Set;for(let g of l.dependencies.values())f.add(g.name);for(let g of l.dependencies.values())l.peerNames.has(g.name)||n(g,f)};return n(e,o),r},SEe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:o,locator:n,dependencies:l,originalDependencies:u,hoistedDependencies:f,peerNames:g,reasons:C,isHoistBorder:w,hoistPriority:B,dependencyKind:S,hoistedFrom:y,hoistedTo:N}=e,L={name:r,references:new Set(s),ident:o,locator:n,dependencies:new Map(l),originalDependencies:new Map(u),hoistedDependencies:new Map(f),peerNames:new Set(g),reasons:new Map(C),decoupled:!0,isHoistBorder:w,hoistPriority:B,dependencyKind:S,hoistedFrom:new Map(y),hoistedTo:new Map(N)},H=L.dependencies.get(r);return H&&H.ident==L.ident&&L.dependencies.set(r,L),t.dependencies.set(L.name,L),L},dCt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let o of t.dependencies.values())t.peerNames.has(o.name)||r.set(o.name,[o.ident]);let s=Array.from(e.keys());s.sort((o,n)=>{let l=e.get(o),u=e.get(n);return u.hoistPriority!==l.hoistPriority?u.hoistPriority-l.hoistPriority:u.peerDependents.size!==l.peerDependents.size?u.peerDependents.size-l.peerDependents.size:u.dependents.size-l.dependents.size});for(let o of s){let n=o.substring(0,o.indexOf("@",1)),l=o.substring(n.length+1);if(!t.peerNames.has(n)){let u=r.get(n);u||(u=[],r.set(n,u)),u.indexOf(l)<0&&u.push(l)}}return r},X_=t=>{let e=new Set,r=(s,o=new Set)=>{if(!o.has(s)){o.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let l=t.dependencies.get(n);l&&!e.has(l)&&r(l,o)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},z_=(t,e,r,s,o,n=new Set)=>{let l=e[e.length-1];if(n.has(l))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(l);let u=yCt(l),f=dCt(l,u),g=t==l?new Map:o.fastLookupPossible?pCt(e):hCt(e),C,w=!1,B=!1,S=new Map(Array.from(f.entries()).map(([N,L])=>[N,L[0]])),y=new Map;do{let N=mCt(t,e,r,g,S,f,s,y,o);N.isGraphChanged&&(B=!0),N.anotherRoundNeeded&&(w=!0),C=!1;for(let[L,H]of f)H.length>1&&!l.dependencies.has(L)&&(S.delete(L),H.shift(),S.set(L,H[0]),C=!0)}while(C);for(let N of l.dependencies.values())if(!l.peerNames.has(N.name)&&!r.has(N.locator)){r.add(N.locator);let L=z_(t,[...e,N],r,y,o);L.isGraphChanged&&(B=!0),L.anotherRoundNeeded&&(w=!0),r.delete(N.locator)}return{anotherRoundNeeded:w,isGraphChanged:B}},CCt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},ICt=(t,e,r,s,o,n,l,u,{outputReason:f,fastLookupPossible:g})=>{let C,w=null,B=new Set;f&&(C=`${Array.from(e).map(L=>xo(L)).join("\u2192")}`);let S=r[r.length-1],N=!(s.ident===S.ident);if(f&&!N&&(w="- self-reference"),N&&(N=s.dependencyKind!==1,f&&!N&&(w="- workspace")),N&&s.dependencyKind===2&&(N=!CCt(s),f&&!N&&(w="- external soft link with unhoisted dependencies")),N&&(N=S.dependencyKind!==1||S.hoistedFrom.has(s.name)||e.size===1,f&&!N&&(w=S.reasons.get(s.name))),N&&(N=!t.peerNames.has(s.name),f&&!N&&(w=`- cannot shadow peer: ${xo(t.originalDependencies.get(s.name).locator)} at ${C}`)),N){let L=!1,H=o.get(s.name);if(L=!H||H.ident===s.ident,f&&!L&&(w=`- filled by: ${xo(H.locator)} at ${C}`),L)for(let G=r.length-1;G>=1;G--){let fe=r[G].dependencies.get(s.name);if(fe&&fe.ident!==s.ident){L=!1;let me=u.get(S);me||(me=new Set,u.set(S,me)),me.add(s.name),f&&(w=`- filled by ${xo(fe.locator)} at ${r.slice(0,G).map(ye=>xo(ye.locator)).join("\u2192")}`);break}}N=L}if(N&&(N=n.get(s.name)===s.ident,f&&!N&&(w=`- filled by: ${xo(l.get(s.name)[0])} at ${C}`)),N){let L=!0,H=new Set(s.peerNames);for(let G=r.length-1;G>=1;G--){let te=r[G];for(let fe of H){if(
|
|||
|
${L1(t)}`)}let De=X_(fe);for(let Ee of De)if(Qe.has(Ee)){let ue=Pe.get(Ee);if((o.get(Ee.name)===Ee.ident||!fe.reasons.has(Ee.name))&&ue.isHoistable!==0&&fe.reasons.set(Ee.name,ue.reason),!Ee.isHoistBorder&&Se.indexOf(Lx(Ee))<0){C.add(fe);let Be=SEe(fe,Ee);S([...H,fe],ye,Se,Be,N),C.delete(fe)}}},y,N=new Set(X_(g)),L=Array.from(e).map(H=>Lx(H));do{y=N,N=new Set;for(let H of y){if(H.locator===g.locator||H.isHoistBorder)continue;let G=SEe(g,H);S([],Array.from(r),L,G,N)}}while(N.size>0);return{anotherRoundNeeded:w,isGraphChanged:B}},DEe=t=>{let e=[],r=new Set,s=new Set,o=(n,l,u)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let f=new Map(l);for(let g of n.dependencies.values())n.peerNames.has(g.name)||f.set(g.name,g);for(let g of n.originalDependencies.values()){let C=f.get(g.name),w=()=>`${Array.from(s).concat([n]).map(B=>xo(B.locator)).join("\u2192")}`;if(n.peerNames.has(g.name)){let B=l.get(g.name);(B!==C||!B||B.ident!==g.ident)&&e.push(`${w()} - broken peer promise: expected ${g.ident} but found ${B&&B.ident}`)}else{let B=u.hoistedFrom.get(n.name),S=n.hoistedTo.get(g.name),y=`${B?` hoisted from ${B.join(", ")}`:""}`,N=`${S?` hoisted to ${S}`:""}`,L=`${w()}${y}`;C?C.ident!==g.ident&&e.push(`${L} - broken require promise for ${g.name}${N}: expected ${g.ident}, but found: ${C.ident}`):e.push(`${L} - broken require promise: no required dependency ${g.name}${N} found`)}}s.add(n);for(let g of n.dependencies.values())n.peerNames.has(g.name)||o(g,f,n);s.delete(n)};return o(t,t.dependencies,t),e.join(`
|
|||
|
`)},fCt=(t,e)=>{let{identName:r,name:s,reference:o,peerNames:n}=t,l={name:s,references:new Set([o]),locator:V_(r,o),ident:vEe(r,o),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},u=new Map([[t,l]]),f=(g,C)=>{let w=u.get(g),B=!!w;if(!w){let{name:S,identName:y,reference:N,peerNames:L,hoistPriority:H,dependencyKind:G}=g,te=e.hoistingLimits.get(C.locator);w={name:S,references:new Set([N]),locator:V_(y,N),ident:vEe(y,N),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(L),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(S):!1,hoistPriority:H||0,dependencyKind:G||0,hoistedFrom:new Map,hoistedTo:new Map},u.set(g,w)}if(C.dependencies.set(g.name,w),C.originalDependencies.set(g.name,w),B){let S=new Set,y=N=>{if(!S.has(N)){S.add(N),N.decoupled=!1;for(let L of N.dependencies.values())N.peerNames.has(L.name)||y(L)}};y(w)}else for(let S of g.dependencies)f(S,w)};for(let g of t.dependencies)f(g,l);return l},Z_=t=>t.substring(0,t.indexOf("@",1)),gCt=t=>{let e={name:t.name,identName:Z_(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(o,n,l)=>{let u=r.has(o),f;if(n===o)f=l;else{let{name:g,references:C,locator:w}=o;f={name:g,identName:Z_(w),references:C,dependencies:new Set}}if(l.dependencies.add(f),!u){r.add(o);for(let g of o.dependencies.values())o.peerNames.has(g.name)||s(g,o,f);r.delete(o)}};for(let o of t.dependencies.values())s(o,t,e);return e},yCt=t=>{let e=new Map,r=new Set([t]),s=l=>`${l.name}@${l.ident}`,o=l=>{let u=s(l),f=e.get(u);return f||(f={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(u,f)),f},n=(l,u)=>{let f=!!r.has(u);if(o(u).dependents.add(l.ident),!f){r.add(u);for(let C of u.dependencies.values()){let w=o(C);w.hoistPriority=Math.max(w.hoistPriority,C.hoistPriority),u.peerNames.has(C.name)?w.peerDependents.add(u.ident):n(u,C)}}};for(let l of t.dependencies.values())t.peerNames.has(l.name)||n(t,l);return e},xo=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=t.substring(e+1);if(s==="workspace:.")return".";if(s){let o=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),o.startsWith("workspace")&&(r=`w:${r}`,o=""),`${r}${o?`@${o}`:""}`}else return`${r}`},xEe=5e4,L1=t=>{let e=0,r=(o,n,l="")=>{if(e>xEe||n.has(o))return"";e++;let u=Array.from(o.dependencies.values()).sort((g,C)=>g.name===C.name?0:g.name>C.name?1:-1),f="";n.add(o);for(let g=0;g<u.length;g++){let C=u[g];if(!o.peerNames.has(C.name)&&C!==o){let w=o.reasons.get(C.name),B=Z_(C.locator);f+=`${l}${g<u.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(B!==C.name?`a:${C.name}:`:"")+xo(C.locator)+(w?` ${w}`:"")}
|
|||
|
`,f+=r(C,n,`${l}${g<u.length-1?"\u2502 ":" "}`)}}return n.delete(o),f};return r(t,new Set)+(e>xEe?`
|
|||
|
Tree is too large, part of the tree has been dunped
|
|||
|
`:"")};var _c;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(_c||(_c={}));var CA;(function(s){s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none"})(CA||(CA={}));var bEe="node_modules",Fd="$wsroot$";var O1=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:o,preserveSymlinksRequired:n}=ECt(t,e),l=null;if(o.length===0){let u=kEe(r,{hoistingLimits:s});l=wCt(t,u,e)}return{tree:l,errors:o,preserveSymlinksRequired:n}},Yu=t=>`${t.name}@${t.reference}`,$_=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let o=e.get(s.locator);o||(o={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,o)),o.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,o)=>{let n=s.split($.delimiter).length,l=o.split($.delimiter).length;return o===s?0:n!==l?l-n:o>s?1:-1});return e},PEe=(t,e)=>{let r=W.isVirtualLocator(t)?W.devirtualizeLocator(t):t,s=W.isVirtualLocator(e)?W.devirtualizeLocator(e):e;return W.areLocatorsEqual(r,s)},eK=(t,e,r,s)=>{if(t.linkType!==_c.SOFT)return!1;let o=de.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return $.contains(s,o)===null},BCt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=de.toPortablePath(e.packageLocation.slice(0,-1)),o=new Map,n={children:new Map},l=t.getDependencyTreeRoots(),u=new Map,f=new Set,g=(B,S)=>{let y=Yu(B);if(f.has(y))return;f.add(y);let N=t.getPackageInformation(B);if(N){let L=S?Yu(S):"";if(Yu(B)!==L&&N.linkType===_c.SOFT&&!eK(N,B,t,s)){let H=FEe(N,B,t);(!u.get(H)||B.reference.startsWith("workspace:"))&&u.set(H,B)}for(let[H,G]of N.packageDependencies)G!==null&&(N.packagePeers.has(H)||g(t.getLocator(H,G),B))}};for(let B of l)g(B,null);let C=s.split($.sep);for(let B of u.values()){let S=t.getPackageInformation(B),N=de.toPortablePath(S.packageLocation.slice(0,-1)).split($.sep).slice(C.length),L=n;for(let H of N){let G=L.children.get(H);G||(G={children:new Map},L.children.set(H,G)),L=G}L.workspaceLocator=B}let w=(B,S)=>{if(B.workspaceLocator){let y=Yu(S),N=o.get(y);N||(N=new Set,o.set(y,N)),N.add(B.workspaceLocator)}for(let y of B.children.values())w(y,B.workspaceLocator||S)};for(let B of n.children.values())w(B,n.workspaceLocator);return o},ECt=(t,e)=>{let r=[],s=!1,o=new Map,n=BCt(t),l=t.getPackageInformation(t.topLevel);if(l===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let u=t.findPackageLocator(l.packageLocation);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let f=de.toPortablePath(l.packageLocation.slice(0,-1)),g={name:u.name,identName:u.name,reference:u.reference,peerNames:l.packagePeers,dependencies:new Set,dependencyKind:yA.WORKSPACE},C=new Map,w=(S,y)=>`${Yu(y)}:${S}`,B=(S,y,N,L,H,G,te,fe)=>{var Ee,ue;let me=w(S,N),ye=C.get(me),Se=!!ye;!Se&&N.name===u.name&&N.reference===u.reference&&(ye=g,C.set(me,g));let Ce=eK(y,N,t,f);if(!ye){let ne=yA.REGULAR;Ce?ne=yA.EXTERNAL_SOFT_LINK:y.linkType===_c.SOFT&&N.name.endsWith(Fd)&&(ne=yA.WORKSPACE),ye={name:S,identName:N.name,reference:N.reference,dependencies:new Set,peerNames:ne===yA.WORKSPACE?new Set:y.packagePeers,dependencyKind:ne},C.set(me,ye)}let Pe;if(Ce?Pe=2:H.linkType===_c.SOFT?Pe=1:Pe=0,ye.hoistPriority=Math.max(ye.hoistPriority||0,Pe),fe&&!Ce){let ne=Yu({name:L.identName,reference:L.reference}),Be=o.get(ne)||new Set;o.set(ne,Be),Be.add(ye.name)}let Qe=new Map(y.packageDependencies);if(e.project){let ne=e.project.workspacesByCwd.get(de.toPortablePath(y.packageLocation.slice(0,-1)));if(ne){let Be=new Set([...Array.from(ne.manifest.peerDependencies.values(),Ne=>W.stringifyIdent(Ne)),...Array.from(ne.manifest.peerDependenciesMeta.keys())]);for(let Ne of Be)Qe.has(Ne)||(Qe.set(Ne,G.get(Ne)||null),ye.peerNames.add(Ne))}}let p=Yu({
|
|||
|
`;for(let n=0,l=t.length;n<l;++n)o+=s+Ox(String(n),t[n],e,s).replace(/^ +/,""),n+1<l&&(o+=","),o+=`
|
|||
|
`;return o+=r,o+="]",o}function kCt(t,e,r){let s=Object.keys(t),o="";o+="{";for(let n=0,l=s.length,u=0;n<l;++n){let f=s[n],g=t[f];typeof g!="undefined"&&(u!==0&&(o+=", "),o+=JSON.stringify(f),o+=": ",o+=Ox(f,g,e,r).replace(/^ +/g,""),u+=1)}return o+="}",o}function SCt(t,e,r){let s=Object.keys(t),o=`${r} `,n="";n+=r,n+=`{
|
|||
|
`;let l=0;for(let u=0,f=s.length;u<f;++u){let g=s[u],C=t[g];typeof C!="undefined"&&(l!==0&&(n+=",",n+=`
|
|||
|
`),n+=o,n+=JSON.stringify(g),n+=": ",n+=Ox(g,C,e,o).replace(/^ +/g,""),l+=1)}return l!==0&&(n+=`
|
|||
|
`),n+=r,n+="}",n}function Ox(t,e,r,s){let{next:o}=TEe[r],n=o[t]||o["*"];return NEe(e,n,s)}function NEe(t,e,r){let{collapsed:s}=TEe[e];return Array.isArray(t)?s?vCt(t,e,r):DCt(t,e,r):typeof t=="object"&&t!==null?s?kCt(t,e,r):SCt(t,e,r):JSON.stringify(t)}function MEe(t){return NEe(t,Jn.TOP_LEVEL,"")}function U1(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(l=>n(l)));let o=r.map((n,l)=>l);return o.sort((n,l)=>{for(let u of s){let f=u[n]<u[l]?-1:u[n]>u[l]?1:0;if(f!==0)return f}return 0}),o.map(n=>r[n])}function xCt(t){let e=new Map,r=U1(t.fallbackExclusionList||[],[({name:s,reference:o})=>s,({name:s,reference:o})=>o]);for(let{name:s,reference:o}of r){let n=e.get(s);typeof n=="undefined"&&e.set(s,n=new Set),n.add(o)}return Array.from(e).map(([s,o])=>[s,Array.from(o)])}function bCt(t){return U1(t.fallbackPool||[],([e])=>e)}function PCt(t){let e=[];for(let[r,s]of U1(t.packageRegistry,([o])=>o===null?"0":`1${o}`)){let o=[];e.push([r,o]);for(let[n,{packageLocation:l,packageDependencies:u,packagePeers:f,linkType:g,discardFromLookup:C}]of U1(s,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!u.has(r)&&w.push([r,n]);for(let[y,N]of U1(u.entries(),([L])=>L))w.push([y,N]);let B=f&&f.size>0?Array.from(f):void 0,S=C||void 0;o.push([n,{packageLocation:l,packageDependencies:w,packagePeers:B,linkType:g,discardFromLookup:S}])}}return e}function _1(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:xCt(t),fallbackPool:bCt(t),packageRegistryData:PCt(t)}}var UEe=He(OEe());function _Ee(t,e){return[t?`${t}
|
|||
|
`:"",`/* eslint-disable */
|
|||
|
|
|||
|
`,`try {
|
|||
|
`,` Object.freeze({}).detectStrictMode = true;
|
|||
|
`,`} catch (error) {
|
|||
|
`," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n",`}
|
|||
|
`,`
|
|||
|
`,e,`
|
|||
|
`,(0,UEe.default)()].join("")}function FCt(t){return JSON.stringify(t,null,2)}function RCt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
|||
|
`)}'`}function TCt(t){return[`const RAW_RUNTIME_STATE =
|
|||
|
`,`${RCt(MEe(t))};
|
|||
|
|
|||
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
|||
|
`,`}
|
|||
|
`].join("")}function NCt(t){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,` const path = require('path');
|
|||
|
`,` const dataLocation = path.resolve(__dirname, ${JSON.stringify(t)});
|
|||
|
`,` return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});
|
|||
|
`,`}
|
|||
|
`].join("")}function KEe(t){let e=_1(t),r=TCt(e);return _Ee(t.shebang,r)}function HEe(t){let e=_1(t),r=NCt(t.dataLocation),s=_Ee(t.shebang,r);return{dataFile:FCt(e),loaderFile:s}}var GEe=He(require("fs")),KCt=He(require("path")),YEe=He(require("util"));Kt();function rK(t,{basePath:e}){let r=de.toPortablePath(e),s=$.resolve(r),o=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,l=new Map(t.packageRegistryData.map(([w,B])=>[w,new Map(B.map(([S,y])=>{var te;if(w===null!=(S===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let N=(te=y.discardFromLookup)!=null?te:!1,L={name:w,reference:S},H=n.get(y.packageLocation);H?(H.discardFromLookup=H.discardFromLookup&&N,N||(H.locator=L)):n.set(y.packageLocation,{locator:L,discardFromLookup:N});let G=null;return[S,{packageDependencies:new Map(y.packageDependencies),packagePeers:new Set(y.packagePeers),linkType:y.linkType,discardFromLookup:N,get packageLocation(){return G||(G=$.join(s,y.packageLocation))}}]}))])),u=new Map(t.fallbackExclusionList.map(([w,B])=>[w,new Set(B)])),f=new Map(t.fallbackPool),g=t.dependencyTreeRoots,C=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:g,enableTopLevelFallback:C,fallbackExclusionList:u,fallbackPool:f,ignorePattern:o,packageLocatorsByLocations:n,packageRegistry:l}}Kt();Kt();var K1=He(require("module"));function pC(t,e){if(typeof t=="string")return t;if(t){let r,s;if(Array.isArray(t)){for(r=0;r<t.length;r++)if(s=pC(t[r],e))return s}else for(r in t)if(e.has(r))return pC(t[r],e)}}function Rd(t,e,r){throw new Error(r?`No known conditions for "${e}" entry in "${t}" package`:`Missing "${e}" export in "${t}" package`)}function MCt(t,e){return e===t?".":e[0]==="."?e:e.replace(new RegExp("^"+t+"/"),"./")}function qEe(t,e=".",r={}){let{name:s,exports:o}=t;if(o){let{browser:n,require:l,unsafe:u,conditions:f=[]}=r,g=MCt(s,e);if(g[0]!=="."&&(g="./"+g),typeof o=="string")return g==="."?o:Rd(s,g);let C=new Set(["default",...f]);u||C.add(l?"require":"import"),u||C.add(n?"browser":"node");let w,B,S=!1;for(w in o){S=w[0]!==".";break}if(S)return g==="."?pC(o,C)||Rd(s,g,1):Rd(s,g);if(B=o[g])return pC(B,C)||Rd(s,g,1);for(w in o){if(B=w[w.length-1],B==="/"&&g.startsWith(w))return(B=pC(o[w],C))?B+g.substring(w.length):Rd(s,g,1);if(B==="*"&&g.startsWith(w.slice(0,-1))&&g.substring(w.length-1).length>0)return(B=pC(o[w],C))?B.replace("*",g.substring(w.length-1)):Rd(s,g,1)}return Rd(s,g)}}var nK=He(require("util"));Kt();var gi;(function(g){g.API_ERROR="API_ERROR",g.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",g.EXPORTS_RESOLUTION_FAILED="EXPORTS_RESOLUTION_FAILED",g.MISSING_DEPENDENCY="MISSING_DEPENDENCY",g.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",g.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",g.INTERNAL="INTERNAL",g.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",g.UNSUPPORTED="UNSUPPORTED"})(gi||(gi={}));var LCt=new Set([gi.BUILTIN_NODE_RESOLUTION_FAILED,gi.MISSING_DEPENDENCY,gi.MISSING_PEER_DEPENDENCY,gi.QUALIFIED_PATH_RESOLUTION_FAILED,gi.UNDECLARED_DEPENDENCY]);function Bs(t,e,r={},s){s!=null||(s=LCt.has(t)?"MODULE_NOT_FOUND":t);let o={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:Te(re({},o),{value:s}),pnpCode:Te(re({},o),{value:t}),data:Te(re({},o),{value:r})})}function Kc(t){return de.normalize(de.fromPortablePath(t))}Kt();var OCt=He(require("fs")),jEe=He(require("module")),UCt=He(require("path")),_Ct=new Set(jEe.Module.builtinModules||Object.keys(process.binding("natives"))),Ux=t=>t.startsWith("node:")||_Ct.has(t);function iK(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,l=/\/$/,u=/^\.{0,2}\//,f={name:null,reference:null},g=[],C=new Set;if(t.enableTopLevelFallback===!0&&g.push(f),e.compatibilityMode!==!1)for(let _ of["react-scripts","gatsby"]){let Ye=t.packageRegistry.get(_);if(Ye)for(let rt of Ye.keys()){if(rt===null)throw n
|
|||
|
|
|||
|
Require request: "${We}"
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re});return de.toPortablePath(Ze)}let yt,nt=_.match(o);if(nt){if(!Ye)throw Bs(gi.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:We,issuer:Re});let[,Ze,$e]=nt,k=Ee(Ye);if(!k){let Ae=Se(_,Ye);if(Ae===!1)throw Bs(gi.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
|
|||
|
|
|||
|
Require path: "${We}"
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re});return de.toPortablePath(Ae)}let D=H(k).packageDependencies.get(Ze),m=null;if(D==null&&k.name!==null){let Ae=t.fallbackExclusionList.get(k.name);if(!Ae||!Ae.has(k.reference)){for(let _e=0,Ct=g.length;_e<Ct;++_e){let Wt=H(g[_e]).packageDependencies.get(Ze);if(Wt!=null){r?m=Wt:D=Wt;break}}if(t.enableTopLevelFallback&&D==null&&m===null){let _e=t.fallbackPool.get(Ze);_e!=null&&(m=_e)}}}let F=null;if(D===null)if(G(k))F=Bs(gi.MISSING_PEER_DEPENDENCY,`Your application tried to access ${Ze} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re,dependencyName:Ze});else{let Ae=De(Ze,k);Ae.every(Fe=>G(Fe))?F=Bs(gi.MISSING_PEER_DEPENDENCY,`${k.name} tried to access ${Ze} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
${Ae.map(Fe=>`Ancestor breaking the chain: ${Fe.name}@${Fe.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:We,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze,brokenAncestors:Ae}):F=Bs(gi.MISSING_PEER_DEPENDENCY,`${k.name} tried to access ${Ze} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
|
|||
|
${Ae.map(Fe=>`Ancestor breaking the chain: ${Fe.name}@${Fe.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:We,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze,brokenAncestors:Ae})}else D===void 0&&(!rt&&Ux(_)?G(k)?F=Bs(gi.UNDECLARED_DEPENDENCY,`Your application tried to access ${Ze}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${Ze} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re,dependencyName:Ze}):F=Bs(gi.UNDECLARED_DEPENDENCY,`${k.name} tried to access ${Ze}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${Ze} isn't otherwise declared in ${k.name}'s dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze}):G(k)?F=Bs(gi.UNDECLARED_DEPENDENCY,`Your application tried to access ${Ze}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${Re}
|
|||
|
`,{request:We,issuer:Re,dependencyName:Ze}):F=Bs(gi.UNDECLARED_DEPENDENCY,`${k.name} tried to access ${Ze}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Ze}${Ze!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
`,{request:We,issuer:Re,issuerLocator:Object.assign({},k),dependencyName:Ze}));if(D==null){if(m===null||F===null)throw F||new Error("Assertion failed: Expected an error to have been set");D=m;let Ae=F.message.replace(/\n.*/g,"");F.message=Ae,!C.has(Ae)&&s!==0&&(C.add(Ae),process.emitWarning(F))}let X=Array.isArray(D)?{name:D[0],reference:D[1]}:{name:Ze,reference:D},ee=H(X);if(!ee.packageLocation)throw Bs(gi.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
|
|||
|
|
|||
|
Required package: ${X.name}@${X.reference}${X.name!==We?` (via "${We}")`:""}
|
|||
|
Required by: ${k.name}@${k.reference} (via ${Re})
|
|||
|
`,{request:We,issuer:Re,dependencyLocator:Object.assign({},X)});let ie=ee.packageLocation;$e?yt=$.join(ie,$e):yt=ie}else if($.isAbsolute(_))yt=$.normalize(_);else{if(!Ye)throw Bs(gi.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:We,issuer:Re});let Ze=$.resolve(Ye);Ye.match(l)?yt=$.normalize($.join(Ze,_)):yt=$.normalize($.join($.dirname(Ze),_))}return $.normalize(yt)}function ne(_,Ye,rt=te){if(n.test(_))return Ye;let We=fe(Ye,rt);return We?$.normalize(We):Ye}function Be(_,{extensions:Ye=Object.keys(K1.Module._extensions)}={}){var Re,yt;let rt=[],We=me(_,rt,{extensions:Ye});if(We)return $.normalize(We);{let nt=Kc(_),Ze=Ee(_);if(Ze){let{packageLocation:$e}=H(Ze),k=!0;try{e.fakeFs.accessSync($e)}catch(I){if((I==null?void 0:I.code)==="ENOENT")k=!1;else{let D=((yt=(Re=I==null?void 0:I.message)!=null?Re:I)!=null?yt:"empty exception thrown").replace(/^[A-Z]/,m=>m.toLowerCase());throw Bs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`Required package exists but could not be accessed (${D}).
|
|||
|
|
|||
|
Missing package: ${Ze.name}@${Ze.reference}
|
|||
|
Expected package location: ${Kc($e)}
|
|||
|
`,{unqualifiedPath:nt,extensions:Ye})}}if(!k){let I=$e.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw Bs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`${I}
|
|||
|
|
|||
|
Missing package: ${Ze.name}@${Ze.reference}
|
|||
|
Expected package location: ${Kc($e)}
|
|||
|
`,{unqualifiedPath:nt,extensions:Ye})}}throw Bs(gi.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
|||
|
|
|||
|
Source path: ${nt}
|
|||
|
${rt.map($e=>`Not found: ${Kc($e)}
|
|||
|
`).join("")}`,{unqualifiedPath:nt,extensions:Ye})}}function Ne(_,Ye,{considerBuiltins:rt,extensions:We,conditions:Re}={}){try{let yt=ue(_,Ye,{considerBuiltins:rt});if(_==="pnpapi")return yt;if(yt===null)return null;let nt=()=>Ye!==null?Ce(Ye):!1,Ze=(!rt||!Ux(_))&&!nt()?ne(_,yt,Re):yt;return Be(Ze,{extensions:We})}catch(yt){throw Object.prototype.hasOwnProperty.call(yt,"pnpCode")&&Object.assign(yt.data,{request:Kc(_),issuer:Ye&&Kc(Ye)}),yt}}function Bt(_){let Ye=$.normalize(_),rt=os.resolveVirtual(Ye);return rt!==Ye?rt:null}return{VERSIONS:Pe,topLevel:Qe,getLocator:(_,Ye)=>Array.isArray(Ye)?{name:Ye[0],reference:Ye[1]}:{name:_,reference:Ye},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let _=[];for(let[Ye,rt]of B)for(let We of rt.keys())Ye!==null&&We!==null&&_.push({name:Ye,reference:We});return _},getPackageInformation:_=>{let Ye=p(_);if(Ye===null)return null;let rt=de.fromPortablePath(Ye.packageLocation);return Te(re({},Ye),{packageLocation:rt})},findPackageLocator:_=>Ee(de.toPortablePath(_)),resolveToUnqualified:L("resolveToUnqualified",(_,Ye,rt)=>{let We=Ye!==null?de.toPortablePath(Ye):null,Re=ue(de.toPortablePath(_),We,rt);return Re===null?null:de.fromPortablePath(Re)}),resolveUnqualified:L("resolveUnqualified",(_,Ye)=>de.fromPortablePath(Be(de.toPortablePath(_),Ye))),resolveRequest:L("resolveRequest",(_,Ye,rt)=>{let We=Ye!==null?de.toPortablePath(Ye):null,Re=Ne(de.toPortablePath(_),We,rt);return Re===null?null:de.fromPortablePath(Re)}),resolveVirtual:L("resolveVirtual",_=>{let Ye=Bt(de.toPortablePath(_));return Ye!==null?de.fromPortablePath(Ye):null})}}var oVt=(0,YEe.promisify)(GEe.readFile);Kt();var WEe=(t,e,r)=>{let s=_1(t),o=rK(s,{basePath:e}),n=de.join(e,tn.pnpCjs);return iK(o,{fakeFs:r,pnpapiResolution:n})};var oK=He(VEe());tr();var Wu={};or(Wu,{checkAndReportManifestCompatibility:()=>XEe,checkManifestCompatibility:()=>zEe,extractBuildScripts:()=>_x,getExtractHint:()=>aK,hasBindingGyp:()=>AK});Ge();Kt();function zEe(t){return W.isPackageCompatible(t,cy.getArchitectureSet())}function XEe(t,e,{configuration:r,report:s}){return zEe(t)?!0:(s==null||s.reportWarningOnce(ke.INCOMPATIBLE_ARCHITECTURE,`${W.prettyLocator(r,t)} The ${cy.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}function _x(t,e,r,{configuration:s,report:o}){let n=[];for(let u of["preinstall","install","postinstall"])e.manifest.scripts.has(u)&&n.push([zA.SCRIPT,u]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&n.push([zA.SHELLCODE,"node-gyp rebuild"]),n.length===0?[]:t.linkType!==zr.HARD?(o==null||o.reportWarningOnce(ke.SOFT_LINK_BUILD,`${W.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`),[]):r&&r.built===!1?(o==null||o.reportInfoOnce(ke.BUILD_DISABLED,`${W.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!s.get("enableScripts")&&!r.built?(o==null||o.reportWarningOnce(ke.DISABLED_BUILD_SCRIPTS,`${W.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`),[]):XEe(t,"build",{configuration:s,report:o})?n:[]}var HCt=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function aK(t){return t.packageFs.getExtractHint({relevantExtensions:HCt})}function AK(t){let e=$.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var lK={};or(lK,{getUnpluggedPath:()=>H1});Ge();Kt();function H1(t,{configuration:e}){return $.resolve(e.get("pnpUnpluggedFolder"),W.slugifyLocator(t))}var qCt=new Set([W.makeIdent(null,"nan").identHash,W.makeIdent(null,"node-gyp").identHash,W.makeIdent(null,"node-pre-gyp").identHash,W.makeIdent(null,"node-addon-api").identHash,W.makeIdent(null,"fsevents").identHash,W.makeIdent(null,"open").identHash,W.makeIdent(null,"opn").identHash]),Td=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocatio
|
|||
|
`,n+=`# cause your node_modules installation to become invalidated.
|
|||
|
`,n+=`
|
|||
|
`,n+=`__metadata:
|
|||
|
`,n+=` version: ${cwe}
|
|||
|
`,n+=` nmMode: ${s.value}
|
|||
|
`;let l=Array.from(e.keys()).sort(),u=W.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let C of l){let w=e.get(C);n+=`
|
|||
|
`,n+=`${JSON.stringify(C)}:
|
|||
|
`,n+=` locations:
|
|||
|
`;for(let B of w.locations){let S=$.contains(t.cwd,B);if(S===null)throw new Error(`Assertion failed: Expected the path to be within the project (${B})`);n+=` - ${JSON.stringify(S)}
|
|||
|
`}if(w.aliases.length>0){n+=` aliases:
|
|||
|
`;for(let B of w.aliases)n+=` - ${JSON.stringify(B)}
|
|||
|
`}if(C===u&&r.size>0){n+=` bin:
|
|||
|
`;for(let[B,S]of r){let y=$.contains(t.cwd,B);if(y===null)throw new Error(`Assertion failed: Expected the path to be within the project (${B})`);n+=` ${JSON.stringify(y)}:
|
|||
|
`;for(let[N,L]of S){let H=$.relative($.join(B,Vi),L);n+=` ${JSON.stringify(N)}: ${JSON.stringify(H)}
|
|||
|
`}}}}let f=t.cwd,g=$.join(f,Vi,uwe);o&&await ge.removePromise(g),await ge.changeFilePromise(g,n,{automaticNewlines:!0})}async function yK(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=$.join(r,Vi,uwe),o;try{o=await ge.statPromise(s)}catch(g){}if(!o)return null;let n=as(await ge.readFilePromise(s,"utf8"));if(n.__metadata.version>cwe)return null;let l=n.__metadata.nmMode||bo.HARDLINKS_LOCAL,u=new Map,f=new Map;delete n.__metadata;for(let[g,C]of Object.entries(n)){let w=C.locations.map(S=>$.join(r,S)),B=C.bin;if(B)for(let[S,y]of Object.entries(B)){let N=$.join(r,de.toPortablePath(S)),L=it.getMapWithDefault(f,N);for(let[H,G]of Object.entries(y))L.set(ss(H),de.toPortablePath([N,Vi,G].join($.sep)))}if(u.set(g,{target:bt.dot,linkType:zr.HARD,locations:w,aliases:C.aliases||[]}),e&&C.aliases)for(let S of C.aliases){let{scope:y,name:N}=W.parseLocator(g),L=W.makeLocator(W.makeIdent(y,N),S),H=W.stringifyLocator(L);u.set(H,{target:bt.dot,linkType:zr.HARD,locations:w,aliases:[]})}}return{locatorMap:u,binSymlinks:f,locationTree:pwe(u,{skipPrefix:t.cwd}),nmMode:l,mtimeMs:o.mtimeMs}}var mC=async(t,e)=>{if(t.split($.sep).indexOf(Vi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let s=e.allowSymlink?await ge.statPromise(t):await ge.lstatPromise(t);if(e.allowSymlink&&!s.isDirectory()||!e.allowSymlink&&s.isSymbolicLink()){await ge.unlinkPromise(t);return}}let r=await ge.readdirPromise(t,{withFileTypes:!0});for(let s of r){let o=$.join(t,ss(s.name));s.isDirectory()?(s.name!==Vi||e&&e.innerLoop)&&await mC(o,{innerLoop:!0,contentsOnly:!1}):await ge.unlinkPromise(o)}e.contentsOnly||await ge.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},hwe=4,Hx=(t,{skipPrefix:e})=>{let r=$.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split($.sep).filter(f=>f!==""),o=s.indexOf(Vi),n=s.slice(0,o).join($.sep),l=$.join(e,n),u=s.slice(o);return{locationRoot:l,segments:u}},pwe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:zr.HARD});for(let[o,n]of t.entries()){if(n.linkType===zr.SOFT&&$.contains(e,n.target)!==null){let u=it.getFactoryWithDefault(r,n.target,s);u.locator=o,u.linkType=n.linkType}for(let l of n.locations){let{locationRoot:u,segments:f}=Hx(l,{skipPrefix:e}),g=it.getFactoryWithDefault(r,u,s);for(let C=0;C<f.length;++C){let w=f[C];if(w!=="."){let B=it.getFactoryWithDefault(g.children,w,s);g.children.set(w,B),g=B}C===f.length-1&&(g.locator=o,g.linkType=n.linkType)}}}return r},CK=async(t,e)=>{let r;try{process.platform==="win32"&&(r=await ge.lstatPromise(t))}catch(s){}process.platform=="win32"&&(!r||r.isDirectory())?await ge.symlinkPromise(t,e,"junction"):await ge.symlinkPromise($.relative($.dirname(e),t),e)};async function dwe(t,e,r){let s=$.join(t,ss(`${dK.default.randomBytes(16).toString("hex")}.tmp`));try{await ge.writeFilePromise(s,r);try{await ge.linkPromise(s,e)}catch(o){}}finally{await ge.unlinkPromise(s)}}async function pIt({srcPath:t,dstPath:e,srcMode:r,globalHardlinksStore:s,baseFs:o,nmMode:n,digest:l}){if(n.value===bo.HARDLINKS_GLOBAL&&s&&l){let f=$.join(s,l.substring(0,2),`${l.substring(2)}.dat`),g;try{if(await eo.checksumFile(f,{baseFs:ge,algorithm:"sha1"})!==l){let w=$.join(s,ss(`${dK.default.randomBytes(16).toString("hex")}.tmp`));await ge.renamePromise(f,w);let B=await o.readFilePromise(t);await ge.writeFilePromise(w,B);try{await ge.linkPromise(w,f),await ge.unlinkPromise(w)}catch(S){}}await ge.linkPromise(f,e),g=!0}catch(C){g=!1}if(!g){let C=await o.readFilePromise(t);await dwe(s,f,C);try{await ge.linkPromise(f,e)}catch(w){w&&w.code&&w.code=="EXDEV"&&(n.value=bo.HARDLINKS_LOCAL,await o.copyFilePromise(t,e))}}}else await o.copyFilePromise(t,e);let u=r&511;u!==420&&await ge.chmodPromise(e,u)}var y0;(function(s){s.FILE="file",s.DIRECTORY="directory",s.SYMLINK="symlink"})(y0||(y0={}));var hIt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:o,packageChecksum:n})=>{await ge.mkdirPromise(t,{recursive:!0});
|
|||
|
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
|
|||
|
|
|||
|
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
|
|||
|
|
|||
|
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${a2.map(e=>`\`${e}\``).join(", ")}.
|
|||
|
|
|||
|
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
|
|||
|
|
|||
|
If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
|
|||
|
|
|||
|
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
|
|||
|
|
|||
|
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why <package>\` to get more information as to who depends on them.
|
|||
|
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});var v1e=l2;Ge();Ge();Kt();tr();var BH=He(ki()),QH=He(require("util")),c2=class extends It{constructor(){super(...arguments);this.fields=Ie.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=Ie.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=Ie.Rest()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Lt.find(e,this.context.cwd),s=typeof this.fields!="undefined"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,o=[],n=!1,l=await Nt.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async u=>{for(let f of this.packages){let g;if(f==="."){let te=r.topLevelWorkspace;if(!te.manifest.name)throw new ht(`Missing ${Ue.pretty(e,"name",Ue.Type.CODE)} field in ${de.fromPortablePath($.join(te.cwd,tn.manifest))}`);g=W.makeDescriptor(te.manifest.name,"unknown")}else g=W.parseDescriptor(f);let C=Gn.getIdentUrl(g),w=vH(await Gn.get(C,{configuration:e,ident:g,jsonResponse:!0,customErrorMessage:Gn.customPackageError})),B=Object.keys(w.versions).sort(BH.default.compareLoose),y=w["dist-tags"].latest||B[B.length-1],N=pn.validRange(g.range);if(N){let te=BH.default.maxSatisfying(B,N);te!==null?y=te:(u.reportWarning(ke.UNNAMED,`Unmet range ${W.prettyRange(e,g.range)}; falling back to the latest version`),n=!0)}else Object.prototype.hasOwnProperty.call(w["dist-tags"],g.range)?y=w["dist-tags"][g.range]:g.range!=="unknown"&&(u.reportWarning(ke.UNNAMED,`Unknown tag ${W.prettyRange(e,g.range)}; falling back to the latest version`),n=!0);let L=w.versions[y],H=Te(re(re({},w),L),{version:y,versions:B}),G;if(s!==null){G={};for(let te of s){let fe=H[te];if(typeof fe!="undefined")G[te]=fe;else{u.reportWarning(ke.EXCEPTION,`The ${Ue.pretty(e,te,Ue.Type.CODE)} field doesn't exist inside ${W.prettyIdent(e,g)}'s information`),n=!0;continue}}}else this.json||(delete H.dist,delete H.readme,delete H.users),G=H;u.reportJson(G),this.json||o.push(G)}});QH.inspect.styles.name="cyan";for(let u of o)(u!==o[0]||n)&&this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`${(0,QH.inspect)(u,{depth:Infinity,colors:!0,compact:!1})}
|
|||
|
`);return l.exitCode()}};c2.paths=[["npm","info"]],c2.usage=dt.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});var D1e=c2;function vH(t){if(Array.isArray(t)){let e=[];for(let r of t)r=vH(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let s=vH(t[r]);s&&(e[r]=s)}return e}else return t||null}Ge();Ge();tr();var k1e=He(_w()),u2=class extends It{constructor(){super(...arguments);this.scope=Ie.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=Ie.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r=await hb({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Nt.start({configuration:e,stdout:this.context.stdout},async o=>{let n=await RBt({registry:r,report:o,stdin:this.context.stdin,stdout:this.context.stdout}),l=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,u=await Gn.put(l,n,{attemptedAs:n.name,configuration:e,registry:r,jsonResponse:!0,authType:Gn.AuthType.NO_AUTH});return await FBt(r,u.token,{configuration:e,scope:this.scope}),o.reportInfo(ke.UNNAMED,"Successfully logged in")})).exitCode()}};u2.paths=[["npm","login"]],u2.usage=dt.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});var S1e=u2;async function hb({sc
|
|||
|
This command will list all tags of a package from the npm registry.
|
|||
|
|
|||
|
If the package is not specified, Yarn will default to the current workspace.
|
|||
|
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});var F1e=p2;async function h2(t,e){let r=`/-/package${Gn.getIdentUrl(t)}/dist-tags`;return Gn.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Gn.customPackageError})}var d2=class extends It{constructor(){super(...arguments);this.package=Ie.String();this.tag=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);let o=W.parseDescriptor(this.package,!0),n=o.range;if(!R1e.default.valid(n))throw new ht(`The range ${Ue.pretty(e,o.range,Ue.Type.RANGE)} must be a valid semver version`);let l=Fi.getPublishRegistry(s.manifest,{configuration:e}),u=Ue.pretty(e,o,Ue.Type.IDENT),f=Ue.pretty(e,n,Ue.Type.RANGE),g=Ue.pretty(e,this.tag,Ue.Type.CODE);return(await Nt.start({configuration:e,stdout:this.context.stdout},async w=>{let B=await h2(o,e);Object.prototype.hasOwnProperty.call(B,this.tag)&&B[this.tag]===n&&w.reportWarning(ke.UNNAMED,`Tag ${g} is already set to version ${f}`);let S=`/-/package${Gn.getIdentUrl(o)}/dist-tags/${encodeURIComponent(this.tag)}`;await Gn.put(S,n,{configuration:e,registry:l,ident:o,jsonRequest:!0,jsonResponse:!0}),w.reportInfo(ke.UNNAMED,`Tag ${g} added to version ${f} of package ${u}`)})).exitCode()}};d2.paths=[["npm","tag","add"]],d2.usage=dt.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
|
|||
|
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
|
|||
|
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});var T1e=d2;Ge();tr();var m2=class extends It{constructor(){super(...arguments);this.package=Ie.String();this.tag=Ie.String()}async execute(){if(this.tag==="latest")throw new ht("The 'latest' tag cannot be removed.");let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);let o=W.parseIdent(this.package),n=Fi.getPublishRegistry(s.manifest,{configuration:e}),l=Ue.pretty(e,this.tag,Ue.Type.CODE),u=Ue.pretty(e,o,Ue.Type.IDENT),f=await h2(o,e);if(!Object.prototype.hasOwnProperty.call(f,this.tag))throw new ht(`${l} is not a tag of package ${u}`);return(await Nt.start({configuration:e,stdout:this.context.stdout},async C=>{let w=`/-/package${Gn.getIdentUrl(o)}/dist-tags/${encodeURIComponent(this.tag)}`;await Gn.del(w,{configuration:e,registry:n,ident:o,jsonResponse:!0}),C.reportInfo(ke.UNNAMED,`Tag ${l} removed from package ${u}`)})).exitCode()}};m2.paths=[["npm","tag","remove"]],m2.usage=dt.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
|
|||
|
This command will remove a tag from a package from the npm registry.
|
|||
|
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});var N1e=m2;Ge();Ge();tr();var y2=class extends It{constructor(){super(...arguments);this.scope=Ie.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=Ie.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),r;return this.scope&&this.publish?r=Fi.getScopeRegistry(this.scope,{configuration:e,type:Fi.RegistryType.PUBLISH_REGISTRY}):this.scope?r=Fi.getScopeRegistry(this.scope,{configuration:e}):this.publish?r=Fi.getPublishRegistry((await Hy(e,this.context.cwd)).manifest,{configuration:e}):r=Fi.getDefaultRegistry({configuration:e}),(await Nt.start({configuration:e,stdout:this.context.stdout},async o=>{var l,u;let n;try{n=await Gn.get("/-/whoami",{configuration:e,registry:r,authType:Gn.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?W.makeIdent(this.scope,""):void 0})}catch(f){if(((l=f.response)==null?void 0:l.statusCode)===401||((u=f.response)==null?void 0:u.statusCode)===403){o.reportError(ke.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired");return}else throw f}o.reportInfo(ke.UNNAMED,n.username)})).exitCode()}};y2.paths=[["npm","whoami"]],y2.usage=dt.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var M1e=y2;var MBt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:ct.STRING,default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:ct.STRING,default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:ct.STRING,default:[],isArray:!0}},commands:[v1e,D1e,S1e,b1e,P1e,T1e,F1e,N1e,M1e]},LBt=MBt;var NH={};or(NH,{default:()=>e1t,patchUtils:()=>kH});Ge();Ge();Ge();Kt();lg();var kH={};or(kH,{applyPatchFile:()=>yb,diffFolders:()=>FH,ensureUnpatchedDescriptor:()=>SH,ensureUnpatchedLocator:()=>Ib,extractPackageToDisk:()=>PH,extractPatchFlags:()=>q1e,isParentRequired:()=>bH,isPatchDescriptor:()=>Cb,isPatchLocator:()=>x0,loadPatchFiles:()=>w2,makeDescriptor:()=>Eb,makeLocator:()=>xH,parseDescriptor:()=>I2,parseLocator:()=>E2,parsePatchFile:()=>mb,unpatchDescriptor:()=>zBt,unpatchLocator:()=>XBt});Ge();Kt();Ge();Kt();var C2=class extends Error{constructor(e,r){super(`Cannot apply hunk #${e+1}`);this.hunk=r}};Ge();Kt();var OBt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function RC(t){return $.relative(bt.root,$.resolve(bt.root,de.toPortablePath(t)))}function UBt(t){let e=t.trim().match(OBt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var _Bt=420,KBt=493,gs;(function(s){s.Context="context",s.Insertion="insertion",s.Deletion="deletion"})(gs||(gs={}));var L1e=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath
|
|||
|
`)+(o.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
|||
|
`):"";await e.mkdirpPromise($.dirname(o.path),{chmod:493,utimes:[Ki.SAFE_TIME,Ki.SAFE_TIME]}),await e.writeFilePromise(o.path,n,{mode:o.mode}),await e.utimesPromise(o.path,Ki.SAFE_TIME,Ki.SAFE_TIME)}break;case"patch":await TC(e,o.path,async()=>{await WBt(o,{baseFs:e,dryRun:r})});break;case"mode change":{let l=(await e.statPromise(o.path)).mode;if(O1e(o.newMode)!==O1e(l))continue;await TC(e,o.path,async()=>{await e.chmodPromise(o.path,o.newMode)})}break;default:it.assertNever(o);break}}function O1e(t){return(t&64)>0}function U1e(t){return t.replace(/\s+$/,"")}function JBt(t,e){return U1e(t)===U1e(e)}async function WBt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let o=await r.statSync(e).mode,l=(await r.readFileSync(e,"utf8")).split(/\n/),u=[],f=0,g=0;for(let w of t){let B=Math.max(g,w.header.patched.start+f),S=Math.max(0,B-g),y=Math.max(0,l.length-B-w.header.original.length),N=Math.max(S,y),L=0,H=0,G=null;for(;L<=N;){if(L<=S&&(H=B-L,G=_1e(w,l,H),G!==null)){L=-L;break}if(L<=y&&(H=B+L,G=_1e(w,l,H),G!==null))break;L+=1}if(G===null)throw new C2(t.indexOf(w),w);u.push(G),f+=L,g=H+w.header.original.length}if(s)return;let C=0;for(let w of u)for(let B of w)switch(B.type){case"splice":{let S=B.index+C;l.splice(S,B.numToDelete,...B.linesToInsert),C+=B.linesToInsert.length-B.numToDelete}break;case"pop":l.pop();break;case"push":l.push(B.line);break;default:it.assertNever(B);break}await r.writeFilePromise(e,l.join(`
|
|||
|
`),{mode:o})}function _1e(t,e,r){let s=[];for(let o of t.parts)switch(o.type){case gs.Context:case gs.Deletion:{for(let n of o.lines){let l=e[r];if(l==null||!JBt(l,n))return null;r+=1}o.type===gs.Deletion&&(s.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case gs.Insertion:s.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:it.assertNever(o.type);break}return s}var VBt=/^builtin<([^>]+)>$/;function NC(t,e){let{protocol:r,source:s,selector:o,params:n}=W.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let l=o?o.split(/&/).map(C=>de.toPortablePath(C)):[],u=n&&typeof n.locator=="string"?W.parseLocator(n.locator):null,f=n&&typeof n.version=="string"?n.version:null,g=e(s);return{parentLocator:u,sourceItem:g,patchPaths:l,sourceVersion:f}}function Cb(t){return t.range.startsWith("patch:")}function x0(t){return t.reference.startsWith("patch:")}function I2(t){let s=NC(t.range,W.parseDescriptor),{sourceItem:e}=s,r=an(s,["sourceItem"]);return Te(re({},r),{sourceDescriptor:e})}function E2(t){let s=NC(t.reference,W.parseLocator),{sourceItem:e}=s,r=an(s,["sourceItem"]);return Te(re({},r),{sourceLocator:e})}function zBt(t){let{sourceItem:e}=NC(t.range,W.parseDescriptor);return e}function XBt(t){let{sourceItem:e}=NC(t.reference,W.parseLocator);return e}function SH(t){if(!Cb(t))return t;let{sourceItem:e}=NC(t.range,W.parseDescriptor);return e}function Ib(t){if(!x0(t))return t;let{sourceItem:e}=NC(t.reference,W.parseLocator);return e}function K1e({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:o},n){let l=t!==null?{locator:W.stringifyLocator(t)}:{},u=typeof s!="undefined"?{version:s}:{},f=typeof o!="undefined"?{hash:o}:{};return W.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:re(re(re({},u),f),l)})}function Eb(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return W.makeDescriptor(t,K1e({parentLocator:e,sourceItem:r,patchPaths:s},W.stringifyDescriptor))}function xH(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:o}){return W.makeLocator(t,K1e({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:o},W.stringifyLocator))}function H1e({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},o){let n=o.lastIndexOf("!");n!==-1&&(o=o.slice(n+1));let l=o.match(VBt);return l!==null?s(l[1]):o.startsWith("~/")?r(o.slice(2)):$.isAbsolute(o)?t(o):e(o)}function q1e(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function bH(t){return H1e({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function w2(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,o=s&&s.localPath?{packageFs:new xn(bt.root),prefixPath:$.relative(bt.root,s.localPath)}:s;s&&s!==o&&s.releaseFs&&s.releaseFs();let n=await it.releaseAfterUseAsync(async()=>await Promise.all(e.map(async l=>{let u=q1e(l),f=await H1e({onAbsolute:async g=>await ge.readFilePromise(g,"utf8"),onRelative:async g=>{if(o===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await o.packageFs.readFilePromise($.join(o.prefixPath,g),"utf8")},onProject:async g=>await ge.readFilePromise($.join(r.project.cwd,g),"utf8"),onBuiltin:async g=>await r.project.configuration.firstHook(C=>C.getBuiltinPatch,r.project,g)},l);return Te(re({},u),{source:f})})));for(let l of n)typeof l.source=="string"&&(l.source=l.source.replace(/\r\n?/g,`
|
|||
|
`));return n}async function PH(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let o=Ib(t),n=r.storedChecksums,l=new cs,u=await ge.mktempPromise(),f=$.join(u,"source"),g=$.join(u,"user"),C=$.join(u,".yarn-patch.json"),w=r.configuration.makeFetcher(),B=[];try{let S,y;if(t.locatorHash===o.locatorHash){let N=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l});B.push(()=>{var L;return(L=N.releaseFs)==null?void 0:L.call(N)}),S=N,y=N}else S=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l}),B.push(()=>{var N;return(N=S.releaseFs)==null?void 0:N.call(S)}),y=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:l}),B.push(()=>{var N;return(N=y.releaseFs)==null?void 0:N.call(y)});await Promise.all([ge.copyPromise(f,S.prefixPath,{baseFs:S.packageFs}),ge.copyPromise(g,y.prefixPath,{baseFs:y.packageFs}),ge.writeJsonPromise(C,{locator:W.stringifyLocator(t),version:s.version})])}finally{for(let S of B)S()}return ge.detachTemp(u),g}async function FH(t,e){let r=de.fromPortablePath(t).replace(/\\/g,"/"),s=de.fromPortablePath(e).replace(/\\/g,"/"),{stdout:o,stderr:n}=await wn.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:de.toPortablePath(process.cwd()),env:Te(re({},process.env),{GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""})});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
|
|||
|
The following error was reported by 'git':
|
|||
|
${n}`);let l=r.startsWith("/")?u=>u.slice(1):u=>u;return o.replace(new RegExp(`(a|b)(${it.escapeRegExp(`/${l(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${it.escapeRegExp(`/${l(s)}/`)}`,"g"),"$1/").replace(new RegExp(it.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(it.escapeRegExp(`${s}/`),"g"),"")}Ge();function j1e(t,{configuration:e,report:r}){for(let s of t.parts)for(let o of s.lines)switch(s.type){case gs.Context:r.reportInfo(null,` ${Ue.pretty(e,o,"grey")}`);break;case gs.Deletion:r.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,`- ${Ue.pretty(e,o,Ue.Type.REMOVED)}`);break;case gs.Insertion:r.reportError(ke.FROZEN_LOCKFILE_EXCEPTION,`+ ${Ue.pretty(e,o,Ue.Type.ADDED)}`);break;default:it.assertNever(s.type)}}var RH=class{supports(e,r){return!!x0(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[o,n,l]=await r.cache.fetchPackageFromCache(e,s,re({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r)},r.cacheOptions));return{packageFs:o,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:l}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:o,sourceVersion:n,patchPaths:l}=E2(e),u=await w2(s,l,r),f=await ge.mktempPromise(),g=$.join(f,"current.zip"),C=await r.fetcher.fetch(o,r),w=W.getIdentVendorPath(e),B=await Fa(),S=new Ns(g,{libzip:B,create:!0,level:r.project.configuration.get("compressionLevel")});await it.releaseAfterUseAsync(async()=>{await S.copyPromise(w,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),S.saveAndClose();for(let{source:y,optional:N}of u){if(y===null)continue;let L=new Ns(g,{libzip:B,level:r.project.configuration.get("compressionLevel")}),H=new xn($.resolve(bt.root,w),{baseFs:L});try{await yb(mb(y),{baseFs:H,version:n})}catch(G){if(!(G instanceof C2))throw G;let te=r.project.configuration.get("enableInlineHunks"),fe=!te&&!N?" (set enableInlineHunks for details)":"",me=`${W.prettyLocator(r.project.configuration,e)}: ${G.message}${fe}`,ye=Se=>{!te||j1e(G.hunk,{configuration:r.project.configuration,report:Se})};if(L.discardAndClose(),N){r.report.reportWarningOnce(ke.PATCH_HUNK_FAILED,me,{reportExtra:ye});continue}else throw new gr(ke.PATCH_HUNK_FAILED,me,ye)}L.saveAndClose()}return new Ns(g,{libzip:B,level:r.project.configuration.get("compressionLevel")})}};Ge();Ge();var ZBt=3,TH=class{supportsDescriptor(e,r){return!!Cb(e)}supportsLocator(e,r){return!!x0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:o}=I2(e);return o.every(n=>!bH(n))?e:W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=I2(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:o,patchPaths:n}=I2(e),l=await w2(o,n,s.fetchOptions),u=r.sourceDescriptor;if(typeof u=="undefined")throw new Error("Assertion failed: The dependency should have been resolved");let f=eo.makeHash(`${ZBt}`,...l.map(g=>JSON.stringify(g))).slice(0,6);return[xH(e,{parentLocator:o,sourcePackage:u,patchPaths:n,patchHash:f})]}async getSatisfying(e,r,s,o){let[n]=await this.getCandidates(e,r,o);return{locators:s.filter(l=>l.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=E2(e),o=await r.resolver.resolve(s,r);return re(re({},o),e)}};Ge();Kt();tr();var B2=class extends It{constructor(){super(...arguments);this.save=Ie.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=Ie.String()}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r,workspace:s}=await Lt.find(e,this.context.cwd);if(!s)throw new pr(r.cwd,this.context.cwd);await r.restoreInstallState();let o=$.resolve(this.context.cwd,de.toPortablePath(this.patchFolder)),n=$.join(o,"../sourc
|
|||
|
${l.map(u=>`
|
|||
|
- ${W.prettyLocator(e,u)}`).join("")}`);n=l[0]}if(!r.storedPackages.has(n.locatorHash))throw new ht("No package found in the project for the given locator");await Nt.start({configuration:e,json:this.json,stdout:this.context.stdout},async l=>{let u=Ib(n),f=await PH(n,{cache:o,project:r});l.reportJson({locator:W.stringifyLocator(u),path:de.fromPortablePath(f)});let g=this.update?" along with its current modifications":"";l.reportInfo(ke.UNNAMED,`Package ${W.prettyLocator(e,u)} got extracted with success${g}!`),l.reportInfo(ke.UNNAMED,`You can now edit the following folder: ${Ue.pretty(e,de.fromPortablePath(f),"magenta")}`),l.reportInfo(ke.UNNAMED,`Once you are done run ${Ue.pretty(e,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${de.fromPortablePath(f)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Q2.paths=[["patch"]],Q2.usage=dt.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s <path>` (with `<path>` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var Y1e=Q2;var $Bt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:ct.BOOLEAN,default:!1},patchFolder:{description:"Folder where the patch files must be written",type:ct.ABSOLUTE_PATH,default:"./.yarn/patches"}},commands:[G1e,Y1e],fetchers:[RH],resolvers:[TH]},e1t=$Bt;var OH={};or(OH,{default:()=>s1t});Ge();Kt();tr();var MH=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),o=r.project.linkersCustomData.get(s);if(!o)throw new ht(`The project in ${Ue.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Ue.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=o.pathsByLocator.get(e.locatorHash);if(typeof n=="undefined")throw new ht(`Couldn't find ${W.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),o=r.project.linkersCustomData.get(s);if(!o)throw new ht(`The project in ${Ue.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Ue.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let f=o.locatorByPath.get(n[1]);if(f)return f}let l=e,u=e;do{u=l,l=$.dirname(u);let f=o.locatorByPath.get(u);if(f)return f}while(l!==u);return null}makeInstaller(e){return new W1e(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},W1e=class{constructor(e){this.opts=e;this.asyncActions=new it.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=hQ(ge,{indexPath:$.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case zr.SOFT:return this.installPackageSoft(e,r,s);case zr.HARD:return this.installPackageHard(e,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,s){let o=$.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?$.join(o,tn.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{pac
|
|||
|
|
|||
|
${A1t}
|
|||
|
`,"--",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>de.fromPortablePath(s.path));await wn.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var n2e={async findRoot(t){return await wb(t,{marker:".hg"})},async filterChanges(t,e,r){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,r){},async makeReset(t,e){},async makeUpdate(t,e){}};var g1t=[r2e,n2e],v2=class extends It{constructor(){super(...arguments);this.commit=Ie.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=Ie.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=Ie.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=Ie.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let e=await st.find(this.context.cwd,this.context.plugins),{project:r}=await Lt.find(e,this.context.cwd),{driver:s,root:o}=await p1t(r.cwd),n=[e.get("cacheFolder"),e.get("globalFolder"),e.get("virtualFolder"),e.get("yarnPath")];await e.triggerHook(C=>C.populateYarnPaths,r,C=>{n.push(C)});let l=new Set;for(let C of n)for(let w of h1t(o,C))l.add(w);let u=new Set([e.get("rcFilename"),e.get("lockfileFilename"),"package.json"]),f=await s.filterChanges(o,l,u),g=await s.genCommitMessage(o,f);if(this.dryRun)if(this.commit)this.context.stdout.write(`${g}
|
|||
|
`);else for(let C of f)this.context.stdout.write(`${de.fromPortablePath(C.path)}
|
|||
|
`);else if(this.reset){let C=await s.filterChanges(o,l,u,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await s.makeReset(o,C)}else f.length===0?this.context.stdout.write("No changes found!"):this.commit?await s.makeCommit(o,f,g):(await s.makeStage(o,f),this.context.stdout.write(g))}};v2.paths=[["stage"]],v2.usage=dt.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});var i2e=v2;async function p1t(t){let e=null,r=null;for(let s of g1t)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new ht("No stage driver has been found for your current project");return{driver:e,root:r}}function h1t(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=ge.statSync(e)}catch(o){break}if(s.isSymbolicLink())e=$.resolve($.dirname(e),ge.readlinkSync(e));else break}return r}var d1t={commands:[i2e]},m1t=d1t;var KH={};or(KH,{default:()=>v1t});Ge();Ge();Kt();var a2e=He(ki());Ge();var s2e=He(o8()),y1t="e8e1bd300d860104bb8c58453ffa1eb4",C1t="OFCNCOG2CU",o2e=async(t,e)=>{var n;let r=W.stringifyIdent(t),o=I1t(e).initIndex("npm-search");try{return((n=(await o.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:n.ts)==="definitely-typed"}catch(l){return!1}},I1t=t=>(0,s2e.default)(C1t,y1t,{requester:{async send(r){try{let s=await qn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var A2e=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,E1t=async(t,e,r,s)=>{var L;if(r.scope==="types")return;let{project:o}=t,{configuration:n}=o;if(!((L=n.get("tsEnableAutoTypes"))!=null?L:ge.existsSync($.join(o.cwd,"tsconfig.json"))))return;let u=n.makeResolver(),f={project:o,resolver:u,report:new cs};if(!await o2e(r,n))return;let C=A2e(r),w=W.parseRange(r.range).selector;if(!pn.validRange(w)){let H=n.normalizeDependency(r),G=await u.getCandidates(H,{},f);w=W.parseRange(G[0].reference).selector}let B=a2e.default.coerce(w);if(B===null)return;let S=`${o0.Modifier.CARET}${B.major}`,y=W.makeDescriptor(W.makeIdent("types",C),S),N=it.mapAndFind(o.workspaces,H=>{var me,ye;let G=(me=H.manifest.dependencies.get(r.identHash))==null?void 0:me.descriptorHash,te=(ye=H.manifest.devDependencies.get(r.identHash))==null?void 0:ye.descriptorHash;if(G!==r.descriptorHash&&te!==r.descriptorHash)return it.mapAndFind.skip;let fe=[];for(let Se of Xt.allDependencies){let Ce=H.manifest[Se].get(y.identHash);typeof Ce!="undefined"&&fe.push([Se,Ce])}return fe.length===0?it.mapAndFind.skip:fe});if(typeof N!="undefined")for(let[H,G]of N)t.manifest[H].set(G.identHash,G);else{try{let H=n.normalizeDependency(y);if((await u.getCandidates(H,{},f)).length===0)return}catch{return}t.manifest[o0.Target.DEVELOPMENT].set(y.identHash,y)}},w1t=async(t,e,r)=>{var f;if(r.scope==="types")return;let{project:s}=t,{configuration:o}=s;if(!((f=o.get("tsEnableAutoTypes"))!=null?f:ge.existsSync($.join(s.cwd,"tsconfig.json"))))return;let l=A2e(r),u=W.makeIdent("types",l);for(let g of Xt.allDependencies)typeof t.manifest[
|
|||
|
- ${u.map(S=>de.fromPortablePath(S)).join(`
|
|||
|
- `)}`);let f=new Set(it.mapAndFilter(n,S=>{let y=t.tryWorkspaceByFilePath(S);return y===null?it.mapAndFilter.skip:y}));if(u.length===0&&f.size===0&&!e)return null;let g=u.length===1?u[0]:$.join(l,`${eo.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=ge.existsSync(g)?await ge.readFilePromise(g,"utf8"):"{}",w=as(C),B=new Map;for(let S of w.declined||[]){let y=W.parseIdent(S),N=t.getWorkspaceByIdent(y);B.set(N,pi.DECLINE)}for(let[S,y]of Object.entries(w.releases||{})){let N=W.parseIdent(S),L=t.getWorkspaceByIdent(N);B.set(L,MC(y))}return{project:t,root:s,baseHash:o!==null?o.hash:null,baseTitle:o!==null?o.title:null,changedFiles:new Set(n),changedWorkspaces:f,releaseRoots:new Set([...f].filter(S=>S.manifest.version!==null)),releases:B,async saveAll(){let S={},y=[],N=[];for(let L of t.workspaces){if(L.manifest.version===null)continue;let H=W.stringifyIdent(L.locator),G=B.get(L);G===pi.DECLINE?y.push(H):typeof G!="undefined"?S[H]=MC(G):f.has(L)&&N.push(H)}await ge.mkdirPromise($.dirname(g),{recursive:!0}),await ge.changeFilePromise(g,iA(new iA.PreserveOrdering({releases:Object.keys(S).length>0?S:void 0,declined:y.length>0?y:void 0,undecided:N.length>0?N:void 0})))}}}function K1t(t){return Qb(t).size>0||k2(t).length>0}function Qb(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function k2(t,{include:e=new Set}={}){let r=[],s=new Map(it.mapAndFilter([...t.releases],([n,l])=>l===pi.DECLINE?it.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),o=new Map(it.mapAndFilter([...t.releases],([n,l])=>l!==pi.DECLINE?it.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(o.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let l of Xt.hardDependencies)for(let u of n.manifest.getForScope(l).values()){let f=t.project.tryWorkspaceByDescriptor(u);f!==null&&s.has(f.anchoredLocator.locatorHash)&&r.push([n,f])}return r}function GH(t,e){let r=$u.default.clean(e);for(let s of Object.values(pi))if(s!==pi.UNDECIDED&&s!==pi.DECLINE&&$u.default.inc(t,s)===r)return s;return null}function Bb(t,e){if($u.default.valid(e))return e;if(t===null)throw new ht(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!$u.default.valid(t))throw new ht(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=$u.default.inc(t,e);if(r===null)throw new ht(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function YH(t,e,{report:r}){let s=new Map;for(let o of t.workspaces)for(let n of Xt.allDependencies)for(let l of o.manifest[n].values()){let u=t.tryWorkspaceByDescriptor(l);if(u===null||!e.has(u))continue;it.getArrayWithDefault(s,u).push([o,n,l.identHash])}for(let[o,n]of e){let l=o.manifest.version;o.manifest.version=n,$u.default.prerelease(n)===null?delete o.manifest.raw.stableVersion:o.manifest.raw.stableVersion||(o.manifest.raw.stableVersion=l);let u=o.manifest.name!==null?W.stringifyIdent(o.manifest.name):null;r.reportInfo(ke.UNNAMED,`${W.prettyLocator(t.configuration,o.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:de.fromPortablePath(o.cwd),ident:u,oldVersion:l,newVersion:n});let f=s.get(o);if(typeof f!="undefined")for(let[g,C,w]of f){let B=g.manifest[C].get(w);if(typeof B=="undefined")throw new Error("Assertion failed: The dependency should have existed");let S=B.range,y=!1;if(S.startsWith(Li.protocol)&&(S=S.slice(Li.protocol.length),y=!0,S===o.relativeCwd))continue;let N=S.match(_1t);if(!N){r.reportWarning(ke.UNNAMED,`Couldn't auto-upgrade range ${S} (in ${W.prettyLocator(t.configuration,g.anchoredLocator)})`);continue}let L=`${N[1]}${n}`;y&&(L=`${Li.protocol}${L}`);let H=W.makeDescriptor(B,L);g.manifest[C].set(w,H)}}}var H1t=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function p2e(t,{current:e,prerelease:r}){let s=new $u.default.SemVer(e),o=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(o.length=0);let l=!0,u=r.sp
|
|||
|
This command will apply the deferred version changes and remove their definitions from the repository.
|
|||
|
|
|||
|
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is.
|
|||
|
|
|||
|
By default only the current workspace will be bumped, but you can configure this behavior by using one of:
|
|||
|
|
|||
|
- \`--recursive\` to also apply the version bump on its dependencies
|
|||
|
- \`--all\` to apply the version bump on all packages in the repository
|
|||
|
|
|||
|
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
|
|||
|
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});var h2e=S2;Ge();Kt();tr();var vb=He(ki());var x2=class extends It{constructor(){super(...arguments);this.interactive=Ie.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){tC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(Sx(),P_)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Fx(),Px)),{FocusRequest:s}=await Promise.resolve().then(()=>(T_(),oEe)),{useListInput:o}=await Promise.resolve().then(()=>(bx(),aEe)),{renderForm:n}=await Promise.resolve().then(()=>(Mx(),Tx)),{Box:l,Text:u}=await Promise.resolve().then(()=>He(Vl())),{default:f,useCallback:g,useState:C}=await Promise.resolve().then(()=>He(yn())),w=await st.find(this.context.cwd,this.context.plugins),{project:B,workspace:S}=await Lt.find(w,this.context.cwd);if(!S)throw new pr(B.cwd,this.context.cwd);await B.restoreInstallState();let y=await LC(B);if(y===null||y.releaseRoots.size===0)return 0;if(y.root===null)throw new ht("This command can only be run on Git repositories");let N=()=>f.createElement(l,{flexDirection:"row",paddingBottom:1},f.createElement(l,{flexDirection:"column",width:60},f.createElement(l,null,f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<up>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),f.createElement(l,null,f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<left>"),"/",f.createElement(u,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),f.createElement(l,{flexDirection:"column"},f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),f.createElement(l,{marginLeft:1},f.createElement(u,null,"Press ",f.createElement(u,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),L=({workspace:ye,active:Se,decision:Ce,setDecision:Pe})=>{var De;let Qe=(De=ye.manifest.raw.stableVersion)!=null?De:ye.manifest.version;if(Qe===null)throw new Error(`Assertion failed: The version should have been set (${W.prettyLocator(w,ye.anchoredLocator)})`);if(vb.default.prerelease(Qe)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${Qe})`);let p=[pi.UNDECIDED,pi.DECLINE,pi.PATCH,pi.MINOR,pi.MAJOR];o(Ce,p,{active:Se,minus:"left",plus:"right",set:Pe});let Oe=Ce===pi.UNDECIDED?f.createElement(u,{color:"yellow"},Qe):Ce===pi.DECLINE?f.createElement(u,{color:"green"},Qe):f.createElement(u,null,f.createElement(u,{color:"magenta"},Qe)," \u2192 ",f.createElement(u,{color:"green"},vb.default.valid(Ce)?Ce:vb.default.inc(Qe,Ce)));return f.createElement(l,{flexDirection:"column"},f.createElement(l,null,f.createElement(u,null,W.prettyLocator(w,ye.anchoredLocator)," - ",Oe)),f.createElement(l,null,p.map(Ee=>f.createElement(l,{key:Ee,paddingLeft:2},f.createElement(u,null,f.createElement(e,{active:Ee===Ce})," ",Ee)))))},H=ye=>{let Se=new Set(y.releaseRoots),Ce=new Map([...ye].filter(([Pe])=>Se.has(Pe)));for(;;){let Pe=k2({project:y.project,releases:Ce}),Qe=!1;if(Pe.length>0){for(let[p]of Pe)if(!Se.has(p)){Se.add(p),Qe=!0;let Oe=ye.get(p);typeof Oe!="undefined"&&Ce.set(p,Oe)}}if(!Qe)break}return{relevantWorkspaces:Se,relevantReleases:Ce}},G=()=>{let[ye,Se]=C(()=>new Map(y.releases)),Ce=g((Pe,Qe)=>{let p=new Map(ye);Qe!==pi.UNDECIDED?p.set(Pe,Qe):p.delete(Pe);let{relevantReleases:Oe}=H(p);Se(Oe)},[ye,Se]);return[ye,Ce]},te=({workspaces:ye,releases:Se})=>{let Ce=[];Ce.push(`${ye.size} total`);let Pe=0,Qe=0;for(let p of ye){let Oe=Se.get(p);typeof Oe=="undefined"?Qe+=1:Oe!==pi.DECLINE&&(Pe+=1)}return Ce.push(`${Pe} release${Pe===1?"":"s"}`),Ce.push(`${Qe} remaining`),f.createElement(u,{color:"yellow"},Ce.join(", "))},me=await n(({useSubmit:ye})=>{let[Se,Ce]=G();ye
|
|||
|
/*
|
|||
|
object-assign
|
|||
|
(c) Sindre Sorhus
|
|||
|
@license MIT
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* buildToken
|
|||
|
* Builds OAuth token prefix (helper function)
|
|||
|
*
|
|||
|
* @name buildToken
|
|||
|
* @function
|
|||
|
* @param {GitUrl} obj The parsed Git url object.
|
|||
|
* @return {String} token prefix
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-windows <https://github.com/jonschlinkert/is-windows>
|
|||
|
*
|
|||
|
* Copyright © 2015-2018, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/** @license React v0.18.0
|
|||
|
* scheduler.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/
|
|||
|
/** @license React v0.24.0
|
|||
|
* react-reconciler.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/
|
|||
|
/** @license React v16.13.1
|
|||
|
* react.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/
|