tickwerk/.yarn/releases/yarn-4.3.1.cjs

895 lines
2.6 MiB
JavaScript
Raw Normal View History

2024-06-15 19:05:40 +02:00
#!/usr/bin/env node
/* eslint-disable */
//prettier-ignore
2024-06-21 09:01:29 +02:00
(()=>{var $3e=Object.create;var NF=Object.defineProperty;var e_e=Object.getOwnPropertyDescriptor;var t_e=Object.getOwnPropertyNames;var r_e=Object.getPrototypeOf,n_e=Object.prototype.hasOwnProperty;var ve=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Et=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),zt=(t,e)=>{for(var r in e)NF(t,r,{get:e[r],enumerable:!0})},i_e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of t_e(e))!n_e.call(t,a)&&a!==r&&NF(t,a,{get:()=>e[a],enumerable:!(o=e_e(e,a))||o.enumerable});return t};var Ze=(t,e,r)=>(r=t!=null?$3e(r_e(t)):{},i_e(e||!t||!t.__esModule?NF(r,"default",{value:t,enumerable:!0}):r,t));var vi={};zt(vi,{SAFE_TIME:()=>x7,S_IFDIR:()=>IP,S_IFLNK:()=>BP,S_IFMT:()=>Mu,S_IFREG:()=>_w});var Mu,IP,_w,BP,x7,k7=Et(()=>{Mu=61440,IP=16384,_w=32768,BP=40960,x7=456789e3});var nr={};zt(nr,{EBADF:()=>wo,EBUSY:()=>s_e,EEXIST:()=>A_e,EINVAL:()=>a_e,EISDIR:()=>u_e,ENOENT:()=>l_e,ENOSYS:()=>o_e,ENOTDIR:()=>c_e,ENOTEMPTY:()=>p_e,EOPNOTSUPP:()=>h_e,EROFS:()=>f_e,ERR_DIR_CLOSED:()=>OF});function Ll(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function s_e(t){return Ll("EBUSY",t)}function o_e(t,e){return Ll("ENOSYS",`${t}, ${e}`)}function a_e(t){return Ll("EINVAL",`invalid argument, ${t}`)}function wo(t){return Ll("EBADF",`bad file descriptor, ${t}`)}function l_e(t){return Ll("ENOENT",`no such file or directory, ${t}`)}function c_e(t){return Ll("ENOTDIR",`not a directory, ${t}`)}function u_e(t){return Ll("EISDIR",`illegal operation on a directory, ${t}`)}function A_e(t){return Ll("EEXIST",`file already exists, ${t}`)}function f_e(t){return Ll("EROFS",`read-only filesystem, ${t}`)}function p_e(t){return Ll("ENOTEMPTY",`directory not empty, ${t}`)}function h_e(t){return Ll("EOPNOTSUPP",`operation not supported, ${t}`)}function OF(){return Ll("ERR_DIR_CLOSED","Directory handle was closed")}var vP=Et(()=>{});var Ea={};zt(Ea,{BigIntStatsEntry:()=>ey,DEFAULT_MODE:()=>_F,DirEntry:()=>MF,StatEntry:()=>$m,areStatsEqual:()=>HF,clearStats:()=>PP,convertToBigIntStats:()=>d_e,makeDefaultStats:()=>Q7,makeEmptyStats:()=>g_e});function Q7(){return new $m}function g_e(){return PP(Q7())}function PP(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):UF.types.isDate(r)&&(t[e]=new Date(0))}return t}function d_e(t){let e=new ey;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):UF.types.isDate(o)&&(e[r]=new Date(o))}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 HF(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,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var UF,_F,MF,$m,ey,qF=Et(()=>{UF=Ze(ve("util")),_F=33188,MF=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},$m=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.bi
2024-06-15 19:05:40 +02:00
`).length,o=e.length-r;return r>o?`\r
`:`
`}function Hg(t,e){return e.replace(/\r?\n/g,x_e(t))}var _7,H7,gf,Uu,qg=Et(()=>{_7=ve("crypto"),H7=ve("os");YF();Ca();gf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,_7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await T7(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(DP(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Hg(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:
`)}writeJsonSync(e,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}
2024-06-21 09:01:29 +02:00
`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},Uu=class extends gf{constructor(){super(z)}}});var bs,df=Et(()=>{qg();bs=class extends gf{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToB
2024-06-15 19:05:40 +02:00
`,zn=Br(`\\
2024-06-21 09:01:29 +02:00
`,!1),On=function(){return""},Li="\\",Mn=Br("\\",!1),_i=/^[\\$"`]/,ir=Is(["\\","$",'"',"`"],!1,!1),Oe=function(L){return L},ii="\\a",Ua=Br("\\a",!1),hr=function(){return"a"},Ac="\\b",Au=Br("\\b",!1),fc=function(){return"\b"},Cl=/^[Ee]/,PA=Is(["E","e"],!1,!1),fu=function(){return"\x1B"},Ie="\\f",Tt=Br("\\f",!1),pc=function(){return"\f"},Hi="\\n",pu=Br("\\n",!1),Yt=function(){return`
`},wl="\\r",DA=Br("\\r",!1),Ap=function(){return"\r"},hc="\\t",SA=Br("\\t",!1),Qn=function(){return" "},hi="\\v",gc=Br("\\v",!1),bA=function(){return"\v"},sa=/^[\\'"?]/,Ni=Is(["\\","'",'"',"?"],!1,!1),Uo=function(L){return String.fromCharCode(parseInt(L,16))},Xe="\\x",ao=Br("\\x",!1),dc="\\u",hu=Br("\\u",!1),qi="\\U",gu=Br("\\U",!1),xA=function(L){return String.fromCodePoint(parseInt(L,16))},Ha=/^[0-7]/,mc=Is([["0","7"]],!1,!1),ds=/^[0-9a-fA-f]/,Ht=Is([["0","9"],["a","f"],["A","f"]],!1,!1),Rn=Ag(),Ci="{}",oa=Br("{}",!1),lo=function(){return"{}"},Hs="-",aa=Br("-",!1),la="+",_o=Br("+",!1),wi=".",ms=Br(".",!1),ys=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},Es=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},qs=function(L){return{type:"variable",...L}},Un=function(L){return{type:"variable",name:L}},Dn=function(L){return L},Cs="*",We=Br("*",!1),tt="/",It=Br("/",!1),or=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},ee=function(L,K){return K.reduce((re,he)=>({left:re,...he}),L)},ye=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Ne="$((",ft=Br("$((",!1),pt="))",Lt=Br("))",!1),rr=function(L){return L},$r="$(",Gi=Br("$(",!1),ts=function(L){return L},bi="${",Ho=Br("${",!1),kA=":-",QA=Br(":-",!1),fp=function(L,K){return{name:L,defaultValue:K}},sg=":-}",du=Br(":-}",!1),og=function(L){return{name:L,defaultValue:[]}},mu=":+",co=Br(":+",!1),RA=function(L,K){return{name:L,alternativeValue:K}},yc=":+}",ca=Br(":+}",!1),ag=function(L){return{name:L,alternativeValue:[]}},Ec=function(L){return{name:L}},Dm="$",lg=Br("$",!1),ei=function(L){return e.isGlobPattern(L)},pp=function(L){return L},cg=/^[a-zA-Z0-9_]/,FA=Is([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Gs=function(){return ug()},yu=/^[$@*?#a-zA-Z0-9_\-]/,qa=Is(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ji=/^[()}<>$|&; \t"']/,ua=Is(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Eu=/^[<>&; \t"']/,ws=Is(["<",">","&",";"," "," ",'"',"'"],!1,!1),Cc=/^[ \t]/,wc=Is([" "," "],!1,!1),Y=0,Pt=0,Il=[{line:1,column:1}],xi=0,Ic=[],ct=0,Cu;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function ug(){return t.substring(Pt,Y)}function dw(){return Bc(Pt,Y)}function TA(L,K){throw K=K!==void 0?K:Bc(Pt,Y),hg([pg(L)],t.substring(Pt,Y),K)}function hp(L,K){throw K=K!==void 0?K:Bc(Pt,Y),Sm(L,K)}function Br(L,K){return{type:"literal",text:L,ignoreCase:K}}function Is(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function Ag(){return{type:"any"}}function fg(){return{type:"end"}}function pg(L){return{type:"other",description:L}}function gp(L){var K=Il[L],re;if(K)return K;for(re=L-1;!Il[re];)re--;for(K=Il[re],K={line:K.line,column:K.column};re<L;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return Il[L]=K,K}function Bc(L,K){var re=gp(L),he=gp(K);return{start:{offset:L,line:re.line,column:re.column},end:{offset:K,line:he.line,column:he.column}}}function Ct(L){Y<xi||(Y>xi&&(xi=Y,Ic=[]),Ic.push(L))}function Sm(L,K){return new Yg(L,null,null,K)}function hg(L,K,re){return new Yg(Yg.buildMessage(L,K),L,K,re)}function gg(){var L,K,re;for(L=Y,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(re=wu(),re===r&&(re=null),re!==r?(Pt=L,K=n(re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function wu(){var L,K,re,he,Je;if(L=Y,K=Iu(),K!==r){for(re=[],he=Qt();he!==r;)re.push(he),he=Qt();re!==r?(he=dg(),he!==r?(Je=bm(),Je===r&&(Je=null),Je!==r?(Pt=L,K=u(K,he,Je),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;if(L===r)if(L=Y,K=Iu(),K!==r){for(re=[],he=Qt();he!==r;)re.push(he),he=Qt();re!==r?(he=dg(),he===r&&(he=null),he!==r?(Pt=L,K=A(K,he),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;return L}function bm(){var L,K,re,he,Je;for(L=Y,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=wu(),re!==r){for(he=[],Je=Qt();Je!==r;)he.push(Je),Je=Qt();he!==r?(Pt=L,K=p(re),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r;return L}function dg(){var L;return t.charCodeAt(Y)===59?(L=h,Y+
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),f8e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(eW,([t,e])=>[t,`"$'${e}'"`])]),tW=t=>eW.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,p8e=t=>f8e.get(t)??`"$'${tW(t)}'"`});var iW=_((Obt,nW)=>{"use strict";function h8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Kg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Kg)}h8e(Kg,Error);Kg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I<h.parts.length;I++)E+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.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(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),I,v;for(I=0;I<h.length;I++)E[I]=u(h[I]);if(E.sort(),E.length>0){for(I=1,v=1;I<E.length;I++)E[I-1]!==E[I]&&(E[v]=E[I],v++);E.length=v}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function g8e(t,e){e=e!==void 0?e:{};var r={},o={resolution:Re},a=Re,n="/",u=Ce("/",!1),A=function(Ue,b){return{from:Ue,descriptor:b}},p=function(Ue){return{descriptor:Ue}},h="@",E=Ce("@",!1),I=function(Ue,b){return{fullName:Ue,description:b}},v=function(Ue){return{fullName:Ue}},x=function(){return Be()},C=/^[^\/@]/,F=Ae(["/","@"],!0,!1),N=/^[^\/]/,U=Ae(["/"],!0,!1),J=0,te=0,ae=[{line:1,column:1}],le=0,ce=[],we=0,de;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Be(){return t.substring(te,J)}function Ee(){return ht(te,J)}function g(Ue,b){throw b=b!==void 0?b:ht(te,J),Te([xe(Ue)],t.substring(te,J),b)}function me(Ue,b){throw b=b!==void 0?b:ht(te,J),rt(Ue,b)}function Ce(Ue,b){return{type:"literal",text:Ue,ignoreCase:b}}function Ae(Ue,b,w){return{type:"class",parts:Ue,inverted:b,ignoreCase:w}}function ne(){return{type:"any"}}function Z(){return{type:"end"}}function xe(Ue){return{type:"other",description:Ue}}function Le(Ue){var b=ae[Ue],w;if(b)return b;for(w=Ue-1;!ae[w];)w--;for(b=ae[w],b={line:b.line,column:b.column};w<Ue;)t.charCodeAt(w)===10?(b.line++,b.column=1):b.column++,w++;return ae[Ue]=b,b}function ht(Ue,b){var w=Le(Ue),S=Le(b);return{start:{offset:Ue,line:w.line,column:w.column},end:{offset:b,line:S.line,column:S.column}}}function H(Ue){J<le||(J>le&&(le=J,ce=[]),ce.push(Ue))}function rt(Ue,b){return new Kg(Ue,null,null,b)}function Te(Ue,b,w){return new Kg(Kg.buildMessage(Ue,b),Ue,b,w)}function Re(){var Ue,b,w,S;return Ue=J,b=ke(),b!==r?(t.charCodeAt(J)===47?(w=n,J++):(w=r,we===0&&H(u)),w!==r?(S=ke(),S!==r?(te=Ue,b=A(b,S),Ue=b):(J=Ue,Ue=r)):(J=Ue,Ue=r)):(J=Ue,Ue=r),Ue===r&&(Ue=J,b=ke(),b!==r&&(te=Ue,b=p(b)),Ue=b),Ue}function ke(){var Ue,b,w,S;return Ue=J,b=Ye(),b!==r?(t.charCodeAt(J)===64?(w=h,J++):(w=r,we===0&&H(E)),w!==r?(S=et(),S!==r?(te=Ue,b=I(b,S),Ue=b):(J=Ue,Ue=r)):(J=Ue,Ue=r)):(J=Ue,Ue=r),Ue===r&&(Ue=J,b=Ye(),b!==r&&(te=Ue,b=v(b)),Ue=b),Ue}function Ye(){var Ue,b,w,S,y;return Ue=J,t.charCodeAt(J)===64?(b=h,J++):(b=r,we===0&&
2024-06-15 19:05:40 +02:00
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),cW.repeat(" ",e)+o+A+n+`
`+cW.repeat(" ",e+this.position-a+o.length)+"^"};fT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
2024-06-21 09:01:29 +02:00
`+r)),o};uW.exports=fT});var as=_((qbt,pW)=>{"use strict";var fW=uy(),w8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],I8e=["scalar","sequence","mapping"];function B8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function v8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(w8e.indexOf(r)===-1)throw new fW('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=B8e(e.styleAliases||null),I8e.indexOf(this.kind)===-1)throw new fW('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}pW.exports=v8e});var Vg=_((Gbt,gW)=>{"use strict";var hW=Jg(),HP=uy(),P8e=as();function pT(t,e,r){var o=[];return t.include.forEach(function(a){r=pT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function D8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Ay(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 HP("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=pT(this,"implicit",[]),this.compiledExplicit=pT(this,"explicit",[]),this.compiledTypeMap=D8e(this.compiledImplicit,this.compiledExplicit)}Ay.DEFAULT=null;Ay.create=function(){var e,r;switch(arguments.length){case 1:e=Ay.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new HP("Wrong number of arguments for Schema.create function")}if(e=hW.toArray(e),r=hW.toArray(r),!e.every(function(o){return o instanceof Ay}))throw new HP("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof P8e}))throw new HP("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ay({include:e,explicit:r})};gW.exports=Ay});var mW=_((jbt,dW)=>{"use strict";var S8e=as();dW.exports=new S8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var EW=_((Ybt,yW)=>{"use strict";var b8e=as();yW.exports=new b8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var wW=_((Wbt,CW)=>{"use strict";var x8e=as();CW.exports=new x8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var qP=_((Kbt,IW)=>{"use strict";var k8e=Vg();IW.exports=new k8e({explicit:[mW(),EW(),wW()]})});var vW=_((zbt,BW)=>{"use strict";var Q8e=as();function R8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function F8e(){return null}function T8e(t){return t===null}BW.exports=new Q8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:R8e,construct:F8e,predicate:T8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var DW=_((Jbt,PW)=>{"use strict";var L8e=as();function N8e(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 O8e(t){return t==="true"||t==="True"||t==="TRUE"}function M8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}PW.exports=new L8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:N8e,construct:O8e,predicate:M8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
\r`;function cHe(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=dT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function uHe(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=dT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Xg?Xg.from?Xg.from(A):new Xg(A):A}function AHe(t){var e="",r=0,o,a,n=t.length,u=dT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function fHe(t){return Xg&&Xg.isBuffer(t)}HW.exports=new lHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cHe,construct:uHe,predicate:fHe,represent:AHe})});var jW=_((ixt,GW)=>{"use strict";var pHe=as(),hHe=Object.prototype.hasOwnProperty,gHe=Object.prototype.toString;function dHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,gHe.call(a)!=="[object Object]")return!1;for(n in a)if(hHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function mHe(t){return t!==null?t:[]}GW.exports=new pHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:dHe,construct:mHe})});var WW=_((sxt,YW)=>{"use strict";var yHe=as(),EHe=Object.prototype.toString;function CHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],EHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function wHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}YW.exports=new yHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:CHe,construct:wHe})});var zW=_((oxt,KW)=>{"use strict";var IHe=as(),BHe=Object.prototype.hasOwnProperty;function vHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(BHe.call(r,e)&&r[e]!==null)return!1;return!0}function PHe(t){return t!==null?t:{}}KW.exports=new IHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:vHe,construct:PHe})});var fy=_((axt,JW)=>{"use strict";var DHe=Vg();JW.exports=new DHe({include:[gT()],implicit:[OW(),UW()],explicit:[qW(),jW(),WW(),zW()]})});var XW=_((lxt,VW)=>{"use strict";var SHe=as();function bHe(){return!0}function xHe(){}function kHe(){return""}function QHe(t){return typeof t>"u"}VW.exports=new SHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:bHe,construct:xHe,predicate:QHe,represent:kHe})});var $W=_((cxt,ZW)=>{"use strict";var RHe=as();function FHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function THe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function LHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function NHe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}ZW.exports=new RHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:FHe,construct:THe,predicate:NHe,represent:LHe})});var rK=_((uxt,tK)=>{"use strict";var GP;try{eK=ve,GP=eK("esprima")}catch{typeof window<"u"&&(GP=window.esprima)}var eK,OHe=as();function MHe(t){if(t===null)return!1;try{var e="("+t+")",r=GP.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{return!1}}function UHe(t){var e="("+t+")",r=GP.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!
2024-06-15 19:05:40 +02:00
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function XHe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var mK=new Array(256),yK=new Array(256);for(Zg=0;Zg<256;Zg++)mK[Zg]=aK(Zg)?1:0,yK[Zg]=aK(Zg);var Zg;function ZHe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||GHe,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 EK(t,e){return new AK(e,new qHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Sr(t,e){throw EK(t,e)}function WP(t,e){t.onWarning&&t.onWarning.call(null,EK(t,e))}var lK={YAML:function(e,r,o){var a,n,u;e.version!==null&&Sr(e,"duplication of %YAML directive"),o.length!==1&&Sr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Sr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&Sr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&WP(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&Sr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],gK.test(a)||Sr(e,"ill-formed tag handle (first argument) of the TAG directive"),Wp.call(e.tagMap,a)&&Sr(e,'there is a previously declared suffix for "'+a+'" tag handle'),dK.test(n)||Sr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Yp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||Sr(t,"expected valid JSON character");else YHe.test(A)&&Sr(t,"the stream contains non-printable characters");t.result+=A}}function cK(t,e,r,o){var a,n,u,A;for(yf.isObject(r)||Sr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],Wp.call(e,n)||(e[n]=r[n],o[n]=!0)}function hy(t,e,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Sr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&oK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&oK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)cK(t,e,n[p],r);else cK(t,e,n,r);else!t.json&&!Wp.call(r,a)&&Wp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,Sr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function yT(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++):Sr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Wi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;$g(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(qu(a))for(yT(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&WP(t,"deficient indentation"),o}function KP(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||Ia(r)))}function ET(t,e){e===1?t.result+=" ":e>1&&(t.result+=yf.repeat(`
2024-06-21 09:01:29 +02:00
`,e-1))}function $He(t,e,r){var o,a,n,u,A,p,h,E,I=t.kind,v=t.result,x;if(x=t.input.charCodeAt(t.position),Ia(x)||py(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&py(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;x!==0;){if(x===58){if(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&py(a))break}else if(x===35){if(o=t.input.charCodeAt(t.position-1),Ia(o))break}else{if(t.position===t.lineStart&&KP(t)||r&&py(x))break;if(qu(x))if(p=t.line,h=t.lineStart,E=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,x=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=E;break}}A&&(Yp(t,n,u,!1),ET(t,t.line-p),n=u=t.position,A=!1),$g(x)||(u=t.position+1),x=t.input.charCodeAt(++t.position)}return Yp(t,n,u,!1),t.result?!0:(t.kind=I,t.result=v,!1)}function e6e(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Yp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else qu(r)?(Yp(t,o,a,!0),ET(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&KP(t)?Sr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Sr(t,"unexpected end of the stream within a single quoted scalar")}function t6e(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Yp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Yp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),qu(A))Wi(t,!1,e);else if(A<256&&mK[A])t.result+=yK[A],t.position++;else if((u=JHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=zHe(A))>=0?n=(n<<4)+u:Sr(t,"expected hexadecimal character");t.result+=XHe(n),t.position++}else Sr(t,"unknown escape sequence");r=o=t.position}else qu(A)?(Yp(t,r,o,!0),ET(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&KP(t)?Sr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}Sr(t,"unexpected end of the stream within a double quoted scalar")}function r6e(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,E,I,v={},x,C,F,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,I=!1,n=[];else if(N===123)p=125,I=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=u,t.kind=I?"mapping":"sequence",t.result=n,!0;r||Sr(t,"missed comma between flow collection entries"),C=x=F=null,h=E=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Ia(A)&&(h=E=!0,t.position++,Wi(t,!0,e))),o=t.line,gy(t,e,jP,!1,!0),C=t.tag,x=t.result,Wi(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Wi(t,!0,e),gy(t,e,jP,!1,!0),F=t.result),I?hy(t,n,v,C,x,F):h?n.push(hy(t,null,v,C,x,F)):n.push(x),Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Sr(t,"unexpected end of the stream within a flow collection")}function n6e(t,e){var r,o,a=mT,n=!1,u=!1,A=e,p=0,h=!1,E,I;if(I=t.input.charCodeAt(t.position),I===124)o=!1;else if(I===62)o=!0;else return!1;for(t.kind="scalar",t.result="";I!==0;)if(I=t.input.charCodeAt(++t.position),I===43||I===45)mT===a?a=I===43?sK:jHe:Sr(t,"repeat of a chomping mode identifier");else if((E=VHe(I))>=0)E===0?Sr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?Sr(t,"repeat of an indentation width identifier"):(A=e+E-1,u=!0);else break;if($g(I)){do I=t.input.charCodeAt(++t.position);while($g(I));if(I===35)do I=t.input.charCodeAt(++t.position);while(!qu(I)&&I!==0)}for(;I!==0;){for(yT(t),t.lineIndent=0,I=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&I===32;)t.lineIndent++,I=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t
2024-06-15 19:05:40 +02:00
`,n?1+p:p):a===mT&&n&&(t.result+=`
`);break}for(o?$g(I)?(h=!0,t.result+=yf.repeat(`
`,n?1+p:p)):h?(h=!1,t.result+=yf.repeat(`
`,p+1)):p===0?n&&(t.result+=" "):t.result+=yf.repeat(`
`,p):t.result+=yf.repeat(`
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!qu(I)&&I!==0;)I=t.input.charCodeAt(++t.position);Yp(t,r,t.position,!1)}return!0}function uK(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!Ia(u)));){if(A=!0,t.position++,Wi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,gy(t,e,hK,!1,!0),n.push(t.result),Wi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Sr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function i6e(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},E={},I=null,v=null,x=null,C=!1,F=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(N===63||N===58)&&Ia(o))N===63?(C&&(hy(t,h,E,I,v,null),I=v=x=null),F=!0,C=!0,a=!0):C?(C=!1,a=!0):Sr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,N=o;else if(gy(t,r,pK,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);$g(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),Ia(N)||Sr(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(hy(t,h,E,I,v,null),I=v=x=null),F=!0,C=!1,a=!1,I=t.tag,v=t.result;else if(F)Sr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(F)Sr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(gy(t,e,YP,!0,a)&&(C?v=t.result:x=t.result),C||(hy(t,h,E,I,v,x,n,u),I=v=x=null),Wi(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Sr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&hy(t,h,E,I,v,null),F&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),F}function s6e(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&Sr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):Sr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Ia(u);)u===33&&(o?Sr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),gK.test(a)||Sr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),KHe.test(n)&&Sr(t,"tag suffix cannot contain flow indicator characters")}return n&&!dK.test(n)&&Sr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:Wp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:Sr(t,'undeclared tag handle "'+a+'"'),!0}function o6e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Sr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ia(r)&&!py(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Sr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function a6e(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!Ia(o)&&!py(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&Sr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Wp.call(t.anchorMap,r)||Sr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Wi(t,!0,-1),!0}function gy(t,e,r,o,a){var n,u,A,p=1,h=!1,E=!1,I,v,x,C,F;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n
2024-06-21 09:01:29 +02:00
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new ZHe(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,Sr(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;)l6e(r);return r.documents}function wK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=CK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function IK(t,e){var r=CK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new AK("expected a single document in the stream, but found more")}}function c6e(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),wK(t,e,yf.extend({schema:fK},r))}function u6e(t,e){return IK(t,yf.extend({schema:fK},e))}Vw.exports.loadAll=wK;Vw.exports.load=IK;Vw.exports.safeLoadAll=c6e;Vw.exports.safeLoad=u6e});var WK=_((hxt,BT)=>{"use strict";var Zw=Jg(),$w=uy(),A6e=Jw(),f6e=fy(),QK=Object.prototype.toString,RK=Object.prototype.hasOwnProperty,p6e=9,Xw=10,h6e=13,g6e=32,d6e=33,m6e=34,FK=35,y6e=37,E6e=38,C6e=39,w6e=42,TK=44,I6e=45,LK=58,B6e=61,v6e=62,P6e=63,D6e=64,NK=91,OK=93,S6e=96,MK=123,b6e=124,UK=125,Bo={};Bo[0]="\\0";Bo[7]="\\a";Bo[8]="\\b";Bo[9]="\\t";Bo[10]="\\n";Bo[11]="\\v";Bo[12]="\\f";Bo[13]="\\r";Bo[27]="\\e";Bo[34]='\\"';Bo[92]="\\\\";Bo[133]="\\N";Bo[160]="\\_";Bo[8232]="\\L";Bo[8233]="\\P";var x6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function k6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&RK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function vK(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new $w("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Zw.repeat("0",o-e.length)+e}function Q6e(t){this.schema=t.schema||A6e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Zw.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=k6e(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 PK(t,e){for(var r=Zw.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
2024-06-15 19:05:40 +02:00
`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
`&&(n+=r),n+=u;return n}function CT(t,e){return`
`+Zw.repeat(" ",t.indent*e)}function R6e(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function IT(t){return t===g6e||t===p6e}function dy(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 F6e(t){return dy(t)&&!IT(t)&&t!==65279&&t!==h6e&&t!==Xw}function DK(t,e){return dy(t)&&t!==65279&&t!==TK&&t!==NK&&t!==OK&&t!==MK&&t!==UK&&t!==LK&&(t!==FK||e&&F6e(e))}function T6e(t){return dy(t)&&t!==65279&&!IT(t)&&t!==I6e&&t!==P6e&&t!==LK&&t!==TK&&t!==NK&&t!==OK&&t!==MK&&t!==UK&&t!==FK&&t!==E6e&&t!==w6e&&t!==d6e&&t!==b6e&&t!==B6e&&t!==v6e&&t!==C6e&&t!==m6e&&t!==y6e&&t!==D6e&&t!==S6e}function _K(t){var e=/^\n* /;return e.test(t)}var HK=1,qK=2,GK=3,jK=4,zP=5;function L6e(t,e,r,o,a){var n,u,A,p=!1,h=!1,E=o!==-1,I=-1,v=T6e(t.charCodeAt(0))&&!IT(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!dy(u))return zP;A=n>0?t.charCodeAt(n-1):null,v=v&&DK(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===Xw)p=!0,E&&(h=h||n-I-1>o&&t[I+1]!==" ",I=n);else if(!dy(u))return zP;A=n>0?t.charCodeAt(n-1):null,v=v&&DK(u,A)}h=h||E&&n-I-1>o&&t[I+1]!==" "}return!p&&!h?v&&!a(t)?HK:qK:r>9&&_K(t)?zP:h?jK:GK}function N6e(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&x6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return R6e(t,p)}switch(L6e(e,u,t.indent,n,A)){case HK:return e;case qK:return"'"+e.replace(/'/g,"''")+"'";case GK:return"|"+SK(e,t.indent)+bK(PK(e,a));case jK:return">"+SK(e,t.indent)+bK(PK(O6e(e,n),a));case zP:return'"'+M6e(e,n)+'"';default:throw new $w("impossible error: invalid scalar style")}}()}function SK(t,e){var r=_K(t)?String(e):"",o=t[t.length-1]===`
`,a=o&&(t[t.length-2]===`
`||t===`
`),n=a?"+":o?"":"-";return r+n+`
`}function bK(t){return t[t.length-1]===`
`?t.slice(0,-1):t}function O6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
`);return h=h!==-1?h:t.length,r.lastIndex=h,xK(t.slice(0,h),e)}(),a=t[0]===`
`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
`:"")+xK(p,e),a=n}return o}function xK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
`+t.slice(a,n),a=n+1),u=A;return p+=`
`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function M6e(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=vK((r-55296)*1024+o-56320+65536),n++;continue}a=Bo[r],e+=!a&&dy(r)?t[n]:a||vK(r)}return e}function U6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)ed(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function _6e(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)ed(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=CT(t,e)),t.dump&&Xw===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function H6e(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,E;for(u=0,A=n.length;u<A;u+=1)E="",u!==0&&(E+=", "),t.condenseFlow&&(E+='"'),p=n[u],h=r[p],ed(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ed(t,e,h,!1,!1)&&(E+=t.dump,o+=E));t.tag=a,t.dump="{"+o+"}"}function q6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,E,I,v;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new $w("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=CT(t,e)),h=u[A],E=r[h],ed(t,e+1,h,!0,!0,!0)&&(I=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,I&&(t.dump&&Xw===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,I&&(v+=CT(t,e)),ed(t,e+1,E,!0,I)&&(t.dump&&Xw===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function kK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,QK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(RK.call(A.represent,p))o=A.represent[p](e,p);else throw new $w("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function ed(t,e,r,o,a,n){t.tag=null,t.dump=r,kK(t,r,!1)||kK(t,r,!0);var u=QK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(q6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(H6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(_6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(U6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&N6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new $w("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function G6e(t,e){var r=[],o=[],a,n;for(wT(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function wT(t,e,r){var o,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)wT(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)wT(t[o[a]],e,r)}function YK(t,e){e=e||{};var r=new Q6e(e);return r.noRefs||G6e(t,r),ed(r,0,t,!0,!0)?r.dump+`
2024-06-21 09:01:29 +02:00
`:""}function j6e(t,e){return YK(t,Zw.extend({schema:f6e},e))}BT.exports.dump=YK;BT.exports.safeDump=j6e});var zK=_((gxt,ki)=>{"use strict";var JP=BK(),KK=WK();function VP(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}ki.exports.Type=as();ki.exports.Schema=Vg();ki.exports.FAILSAFE_SCHEMA=qP();ki.exports.JSON_SCHEMA=hT();ki.exports.CORE_SCHEMA=gT();ki.exports.DEFAULT_SAFE_SCHEMA=fy();ki.exports.DEFAULT_FULL_SCHEMA=Jw();ki.exports.load=JP.load;ki.exports.loadAll=JP.loadAll;ki.exports.safeLoad=JP.safeLoad;ki.exports.safeLoadAll=JP.safeLoadAll;ki.exports.dump=KK.dump;ki.exports.safeDump=KK.safeDump;ki.exports.YAMLException=uy();ki.exports.MINIMAL_SCHEMA=qP();ki.exports.SAFE_SCHEMA=fy();ki.exports.DEFAULT_SCHEMA=Jw();ki.exports.scan=VP("scan");ki.exports.parse=VP("parse");ki.exports.compose=VP("compose");ki.exports.addConstructor=VP("addConstructor")});var VK=_((dxt,JK)=>{"use strict";var Y6e=zK();JK.exports=Y6e});var ZK=_((mxt,XK)=>{"use strict";function W6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function td(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,td)}W6e(td,Error);td.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I<h.parts.length;I++)E+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.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(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),I,v;for(I=0;I<h.length;I++)E[I]=u(h[I]);if(E.sort(),E.length>0){for(I=1,v=1;I<E.length;I++)E[I-1]!==E[I]&&(E[v]=E[I],v++);E.length=v}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function K6e(t,e){e=e!==void 0?e:{};var r={},o={Start:hu},a=hu,n=function(ee){return[].concat(...ee)},u="-",A=Qn("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},E="#",I=Qn("#",!1),v=gc(),x=function(){return{}},C=":",F=Qn(":",!1),N=function(ee,ye){return{[ee]:ye}},U=",",J=Qn(",",!1),te=function(ee,ye){return ye},ae=function(ee,ye,Ne){return Object.assign({},...[ee].concat(ye).map(ft=>({[ft]:Ne})))},le=function(ee){return ee},ce=function(ee){return ee},we=sa("correct indentation"),de=" ",Be=Qn(" ",!1),Ee=function(ee){return ee.length===or*It},g=function(ee){return ee.length===(or+1)*It},me=function(){return or++,!0},Ce=function(){return or--,!0},Ae=function(){return DA()},ne=sa("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,xe=hi(["\r",`
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Le=/^[^\r\n\t ,\][{}:#"']/,ht=hi(["\r",`
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return DA().replace(/^ *| *$/g,"")},rt="--",Te=Qn("--",!1),Re=/^[a-zA-Z\/0-9]/,ke=hi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ye=/^[^\r\n\t :,]/,Se=hi(["\r",`
`," "," ",":",","],!0,!1),et="null",Ue=Qn("null",!1),b=function(){return null},w="true",S=Qn("true",!1),y=function(){return!0},R="false",V=Qn("false",!1),X=function(){return!1},$=sa("string"),ie='"',be=Qn('"',!1),Fe=function(){return""},at=function(ee){return ee},dt=function(ee){return ee.join("")},Gt=/^[^"\\\0-\x1F\x7F]/,tr=hi(['"',"\\",["\0",""],"\x7F"],!0,!1),bt='\\"',ln=Qn('\\"',!1),kr=function(){return'"'},mr="\\\\",br=Qn("\\\\",!1),Kr=function(){return"\\"},Kn="\\/",Os=Qn("\\/",!1),Ti=function(){return"/"},gs="\\b",no=Qn("\\b",!1),Si=function(){return"\b"},Ms="\\f",io=Qn("\\f",!1),uc=function(){return"\f"},uu="\\n",cp=Qn("\\n",!1),up=function(){return`
`},Us="\\r",Pn=Qn("\\r",!1),so=function(){return"\r"},_s="\\t",yl=Qn("\\t",!1),El=function(){return" "},oo="\\u",zn=Qn("\\u",!1),On=function(ee,ye,Ne,ft){return String.fromCharCode(parseInt(`0x${ee}${ye}${Ne}${ft}`))},Li=/^[0-9a-fA-F]/,Mn=hi([["0","9"],["a","f"],["A","F"]],!1,!1),_i=sa("blank space"),ir=/^[ \t]/,Oe=hi([" "," "],!1,!1),ii=sa("white space"),Ua=/^[ \t\n\r]/,hr=hi([" "," ",`
2024-06-15 19:05:40 +02:00
`,"\r"],!1,!1),Ac=`\r
`,Au=Qn(`\r
`,!1),fc=`
`,Cl=Qn(`
2024-06-21 09:01:29 +02:00
`,!1),PA="\r",fu=Qn("\r",!1),Ie=0,Tt=0,pc=[{line:1,column:1}],Hi=0,pu=[],Yt=0,wl;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function DA(){return t.substring(Tt,Ie)}function Ap(){return Uo(Tt,Ie)}function hc(ee,ye){throw ye=ye!==void 0?ye:Uo(Tt,Ie),dc([sa(ee)],t.substring(Tt,Ie),ye)}function SA(ee,ye){throw ye=ye!==void 0?ye:Uo(Tt,Ie),ao(ee,ye)}function Qn(ee,ye){return{type:"literal",text:ee,ignoreCase:ye}}function hi(ee,ye,Ne){return{type:"class",parts:ee,inverted:ye,ignoreCase:Ne}}function gc(){return{type:"any"}}function bA(){return{type:"end"}}function sa(ee){return{type:"other",description:ee}}function Ni(ee){var ye=pc[ee],Ne;if(ye)return ye;for(Ne=ee-1;!pc[Ne];)Ne--;for(ye=pc[Ne],ye={line:ye.line,column:ye.column};Ne<ee;)t.charCodeAt(Ne)===10?(ye.line++,ye.column=1):ye.column++,Ne++;return pc[ee]=ye,ye}function Uo(ee,ye){var Ne=Ni(ee),ft=Ni(ye);return{start:{offset:ee,line:Ne.line,column:Ne.column},end:{offset:ye,line:ft.line,column:ft.column}}}function Xe(ee){Ie<Hi||(Ie>Hi&&(Hi=Ie,pu=[]),pu.push(ee))}function ao(ee,ye){return new td(ee,null,null,ye)}function dc(ee,ye,Ne){return new td(td.buildMessage(ee,ye),ee,ye,Ne)}function hu(){var ee;return ee=xA(),ee}function qi(){var ee,ye,Ne;for(ee=Ie,ye=[],Ne=gu();Ne!==r;)ye.push(Ne),Ne=gu();return ye!==r&&(Tt=ee,ye=n(ye)),ee=ye,ee}function gu(){var ee,ye,Ne,ft,pt;return ee=Ie,ye=ds(),ye!==r?(t.charCodeAt(Ie)===45?(Ne=u,Ie++):(Ne=r,Yt===0&&Xe(A)),Ne!==r?(ft=Dn(),ft!==r?(pt=mc(),pt!==r?(Tt=ee,ye=p(pt),ee=ye):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r),ee}function xA(){var ee,ye,Ne;for(ee=Ie,ye=[],Ne=Ha();Ne!==r;)ye.push(Ne),Ne=Ha();return ye!==r&&(Tt=ee,ye=h(ye)),ee=ye,ee}function Ha(){var ee,ye,Ne,ft,pt,Lt,rr,$r,Gi;if(ee=Ie,ye=Dn(),ye===r&&(ye=null),ye!==r){if(Ne=Ie,t.charCodeAt(Ie)===35?(ft=E,Ie++):(ft=r,Yt===0&&Xe(I)),ft!==r){if(pt=[],Lt=Ie,rr=Ie,Yt++,$r=tt(),Yt--,$r===r?rr=void 0:(Ie=rr,rr=r),rr!==r?(t.length>Ie?($r=t.charAt(Ie),Ie++):($r=r,Yt===0&&Xe(v)),$r!==r?(rr=[rr,$r],Lt=rr):(Ie=Lt,Lt=r)):(Ie=Lt,Lt=r),Lt!==r)for(;Lt!==r;)pt.push(Lt),Lt=Ie,rr=Ie,Yt++,$r=tt(),Yt--,$r===r?rr=void 0:(Ie=rr,rr=r),rr!==r?(t.length>Ie?($r=t.charAt(Ie),Ie++):($r=r,Yt===0&&Xe(v)),$r!==r?(rr=[rr,$r],Lt=rr):(Ie=Lt,Lt=r)):(Ie=Lt,Lt=r);else pt=r;pt!==r?(ft=[ft,pt],Ne=ft):(Ie=Ne,Ne=r)}else Ie=Ne,Ne=r;if(Ne===r&&(Ne=null),Ne!==r){if(ft=[],pt=We(),pt!==r)for(;pt!==r;)ft.push(pt),pt=We();else ft=r;ft!==r?(Tt=ee,ye=x(),ee=ye):(Ie=ee,ee=r)}else Ie=ee,ee=r}else Ie=ee,ee=r;if(ee===r&&(ee=Ie,ye=ds(),ye!==r?(Ne=oa(),Ne!==r?(ft=Dn(),ft===r&&(ft=null),ft!==r?(t.charCodeAt(Ie)===58?(pt=C,Ie++):(pt=r,Yt===0&&Xe(F)),pt!==r?(Lt=Dn(),Lt===r&&(Lt=null),Lt!==r?(rr=mc(),rr!==r?(Tt=ee,ye=N(Ne,rr),ee=ye):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r),ee===r&&(ee=Ie,ye=ds(),ye!==r?(Ne=lo(),Ne!==r?(ft=Dn(),ft===r&&(ft=null),ft!==r?(t.charCodeAt(Ie)===58?(pt=C,Ie++):(pt=r,Yt===0&&Xe(F)),pt!==r?(Lt=Dn(),Lt===r&&(Lt=null),Lt!==r?(rr=mc(),rr!==r?(Tt=ee,ye=N(Ne,rr),ee=ye):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r)):(Ie=ee,ee=r),ee===r))){if(ee=Ie,ye=ds(),ye!==r)if(Ne=lo(),Ne!==r)if(ft=Dn(),ft!==r)if(pt=aa(),pt!==r){if(Lt=[],rr=We(),rr!==r)for(;rr!==r;)Lt.push(rr),rr=We();else Lt=r;Lt!==r?(Tt=ee,ye=N(Ne,pt),ee=ye):(Ie=ee,ee=r)}else Ie=ee,ee=r;else Ie=ee,ee=r;else Ie=ee,ee=r;else Ie=ee,ee=r;if(ee===r)if(ee=Ie,ye=ds(),ye!==r)if(Ne=lo(),Ne!==r){if(ft=[],pt=Ie,Lt=Dn(),Lt===r&&(Lt=null),Lt!==r?(t.charCodeAt(Ie)===44?(rr=U,Ie++):(rr=r,Yt===0&&Xe(J)),rr!==r?($r=Dn(),$r===r&&($r=null),$r!==r?(Gi=lo(),Gi!==r?(Tt=pt,Lt=te(Ne,Gi),pt=Lt):(Ie=pt,pt=r)):(Ie=pt,pt=r)):(Ie=pt,pt=r)):(Ie=pt,pt=r),pt!==r)for(;pt!==r;)ft.push(pt),pt=Ie,Lt=Dn(),Lt===r&&(Lt=null),Lt!==r?(t.charCodeAt(Ie)===44?(rr=U,Ie++):(rr=r,Yt===0&&Xe(J)),rr!==r?($r=Dn(),$r===r&&($r=null),$r!==r?(Gi=lo(),Gi!==r?(Tt=pt,Lt=te(Ne,Gi),pt=Lt):(Ie=pt,pt=r)):(Ie=pt,pt=r)):(Ie=pt,pt=r)):(Ie=pt,pt=r);else ft=r;ft!==r?(pt=Dn(),pt===r&&(pt=null),pt!==r?(t.charCodeAt(Ie)===58?(Lt=C,Ie++):(Lt=r,Yt===0&&Xe(F)),Lt!==r?(rr=Dn(),rr===
2024-06-15 19:05:40 +02:00
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
`;if(typeof t=="string")return`${ez(t)}
`;if(Array.isArray(t)){if(t.length===0)return`[]
`;let o=" ".repeat(e);return`
${t.map(n=>`${o}- ${vT(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof XP?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let E=$K.indexOf(p),I=$K.indexOf(h);return E===-1&&I===-1?p<h?-1:p>h?1:0:E!==-1&&I===-1?-1:E===-1&&I!==-1?1:E-I});let A=u.filter(p=>!rz(o[p])).map((p,h)=>{let E=o[p],I=ez(p),v=vT(E,e+1,!0),x=h>0||r?n:"",C=I.length>1024?`? ${I}
${x}:`:`${I}:`,F=v.startsWith(`
`)?v:` ${v}`;return`${x}${C}${F}`}).join(e===0?`
`:"")||`
`;return r?`
${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Ba(t){try{let e=vT(t,0,!1);return e!==`
2024-06-21 09:01:29 +02:00
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function J6e(t){return t.endsWith(`
2024-06-15 19:05:40 +02:00
`)||(t+=`
2024-06-21 09:01:29 +02:00
`),(0,tz.parse)(t)}function X6e(t){if(V6e.test(t))return J6e(t);let e=(0,ZP.safeLoad)(t,{schema:ZP.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 Ki(t){return X6e(t)}var ZP,tz,z6e,$K,XP,V6e,nz=Et(()=>{ZP=Ze(VK()),tz=Ze(ZK()),z6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,$K=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],XP=class{constructor(e){this.data=e}};Ba.PreserveOrdering=XP;V6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var eI={};zt(eI,{parseResolution:()=>UP,parseShell:()=>NP,parseSyml:()=>Ki,stringifyArgument:()=>uT,stringifyArgumentSegment:()=>AT,stringifyArithmeticExpression:()=>MP,stringifyCommand:()=>cT,stringifyCommandChain:()=>cy,stringifyCommandChainThen:()=>lT,stringifyCommandLine:()=>OP,stringifyCommandLineThen:()=>aT,stringifyEnvSegment:()=>LP,stringifyRedirectArgument:()=>Kw,stringifyResolution:()=>_P,stringifyShell:()=>ly,stringifyShellLine:()=>ly,stringifySyml:()=>Ba,stringifyValueArgument:()=>Wg});var Nl=Et(()=>{rW();oW();nz()});var sz=_((Ixt,PT)=>{"use strict";var Z6e=t=>{let e=!1,r=!1,o=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},iz=(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=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=Z6e(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};PT.exports=iz;PT.exports.default=iz});var oz=_((Bxt,$6e)=>{$6e.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",e
2024-06-15 19:05:40 +02:00
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
$ ${o}
${xT(e)}`}else this.message=`Command not found; did you mean one of:
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
`)}
${xT(e)}`}},tD=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((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
`)}
${xT(e)}`}},xT=t=>`While running ${t.filter(e=>e!==Hn.EndOfInput&&e!==Hn.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function eqe(t){let e=t.split(`
`),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(`
`)}function vo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
`),t=eqe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
`)}).join(`
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
2024-06-21 09:01:29 +02:00
`:""}var kT,uz,Az,QT=Et(()=>{kT=Array(80).fill("\u2501");for(let t=0;t<=24;++t)kT[kT.length-t]=`\x1B[38;5;${232+t}m\u2501`;uz={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<80-5?` ${kT.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},Az={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Wo(t){return{...t,[tI]:!0}}function ju(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function nD(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!e?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function rI(t,e){return e.length===1?new st(`${t}${nD(e[0],{mergeName:!0})}`):new st(`${t}:
2024-06-15 19:05:40 +02:00
${e.map(r=>`
2024-06-21 09:01:29 +02:00
- ${nD(r)}`).join("")}`)}function id(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw rI(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var tI,Ef=Et(()=>{rD();tI=Symbol("clipanion/isOption")});var Ko={};zt(Ko,{KeyRelationship:()=>Yu,TypeAssertionError:()=>zp,applyCascade:()=>sI,as:()=>Eqe,assert:()=>dqe,assertWithErrors:()=>mqe,cascade:()=>aD,fn:()=>Cqe,hasAtLeastOneKey:()=>MT,hasExactLength:()=>dz,hasForbiddenKeys:()=>Uqe,hasKeyRelationship:()=>aI,hasMaxLength:()=>Iqe,hasMinLength:()=>wqe,hasMutuallyExclusiveKeys:()=>_qe,hasRequiredKeys:()=>Mqe,hasUniqueItems:()=>Bqe,isArray:()=>iD,isAtLeast:()=>NT,isAtMost:()=>Dqe,isBase64:()=>Tqe,isBoolean:()=>lqe,isDate:()=>uqe,isDict:()=>pqe,isEnum:()=>Js,isHexColor:()=>Fqe,isISO8601:()=>Rqe,isInExclusiveRange:()=>bqe,isInInclusiveRange:()=>Sqe,isInstanceOf:()=>gqe,isInteger:()=>OT,isJSON:()=>Lqe,isLiteral:()=>pz,isLowerCase:()=>xqe,isMap:()=>fqe,isNegative:()=>vqe,isNullable:()=>Oqe,isNumber:()=>TT,isObject:()=>hz,isOneOf:()=>LT,isOptional:()=>Nqe,isPartial:()=>hqe,isPayload:()=>cqe,isPositive:()=>Pqe,isRecord:()=>oD,isSet:()=>Aqe,isString:()=>Ey,isTuple:()=>sD,isUUID4:()=>Qqe,isUnknown:()=>FT,isUpperCase:()=>kqe,makeTrait:()=>gz,makeValidator:()=>Hr,matchesRegExp:()=>iI,softAssert:()=>yqe});function qn(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function yy(t,e){if(t.length===0)return"nothing";if(t.length===1)return qn(t[0]);let r=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>qn(n)).join(", ")}${a}${qn(o)}`}function Kp(t,e){var r,o,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:tqe.test(e)?`${(o=t?.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function RT(t,e,r){return t===1?e:r}function pr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function oqe(t,e){return r=>{t[e]=r}}function Wu(t,e){return r=>{let o=t[e];return t[e]=r,Wu(t,e).bind(null,o)}}function nI(t,e,r){let o=()=>(t(r()),a),a=()=>(t(e),o);return o}function FT(){return Hr({test:(t,e)=>!0})}function pz(t){return Hr({test:(e,r)=>e!==t?pr(r,`Expected ${qn(t)} (got ${qn(e)})`):!0})}function Ey(){return Hr({test:(t,e)=>typeof t!="string"?pr(e,`Expected a string (got ${qn(t)})`):!0})}function Js(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(e);return o.size===1?pz([...o][0]):Hr({test:(a,n)=>o.has(a)?!0:r?pr(n,`Expected one of ${yy(e,"or")} (got ${qn(a)})`):pr(n,`Expected a valid enumeration value (got ${qn(a)})`)})}function lqe(){return Hr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o=aqe.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a boolean (got ${qn(t)})`)}return!0}})}function TT(){return Hr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return pr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a number (got ${qn(t)})`)}return!0}})}function cqe(t){return Hr({test:(e,r)=>{var o;if(typeof r?.coercions>"u")return pr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return pr(r,"Unbound coercion result");if(typeof e!="string")return pr(r,`Expected a string (got ${qn(e)})`);let a;try{a=JSON.parse(e)}catch{return pr(r,`Expected a JSON string (got ${qn(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Wu(n,"value")}))?(r.coercions.push([
2024-06-15 19:05:40 +02:00
`;for(let o of e)r+=`
2024-06-21 09:01:29 +02:00
- ${o}`}super(r)}};oI={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Yu||(Yu={}));Hqe={[Yu.Forbids]:{expect:!1,message:"forbids using"},[Yu.Requires]:{expect:!0,message:"requires using"}}});var it,Jp=Et(()=>{Ef();it=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>($a(),Ko)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw rI("Invalid option schema",p);for(let[,I]of h)I()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};it.isOption=tI;it.Default=[]});function va(t){bT&&console.log(t)}function yz(){let t={nodes:[]};for(let e=0;e<un.CustomNode;++e)t.nodes.push(el());return t}function qqe(t){let e=yz(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)Cz(n)||e.nodes.push(Vqe(a.nodes[n],o));o+=a.nodes.length-un.CustomNode+1}for(let a of r)Cy(e,un.InitialNode,a);return e}function Mc(t,e){return t.nodes.push(e),t.nodes.length-1}function Gqe(t){let e=new Set,r=o=>{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let I of h)E.some(({to:v})=>I.to===v)||E.push(I)}for(let[p,h]of A.dynamics)a.dynamics.some(([E,{to:I}])=>p===E&&h.to===I)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(un.InitialNode)}function jqe(t,{prefix:e=""}={}){if(bT){va(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)va(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function Yqe(t,e,r=!1){va(`Running a vm on ${JSON.stringify(e)}`);let o=[{node:un.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];jqe(t,{prefix:" "});let a=[Hn.StartOfInput,...e];for(let n=0;n<a.length;++n){let u=a[n],A=u===Hn.EndOfInput||u===Hn.EndOfPartialInput,p=n-1;va(` Processing ${JSON.stringify(u)}`);let h=[];for(let{node:E,state:I}of o){va(` Current node is ${E}`);let v=t.nodes[E];if(E===un.ErrorNode){h.push({node:E,state:I});continue}console.assert(v.shortcuts.length===0,"Shortcuts should have been eliminated by now");let x=Object.prototype.hasOwnProperty.call(v.statics,u);if(!r||n<a.length-1||x)if(x){let C=v.statics[u];for(let{to:F,reducer:N}of C)h.push({node:F,state:typeof N<"u"?lD(_T,N,I,u,p):I}),va(` Static transition to ${F} found`)}else va(" No static transition found");else{let C=!1;for(let F of Object.keys(v.statics))if(!!F.startsWith(u)){if(u===F)for(let{to:N,reducer:U}of v.statics[F])h.push({node:N,state:typeof U<"u"?lD(_T,U,I,u,p):I}),va(` Static transition to ${N} found`);else for(let{to:N}of v.statics[F])h.push({node:N,state:{...I,remainder:F.slice(u.length)}}),va(` Static transition to ${N} found (partial match)`);C=!0}C||va(" No partial static transition found")}if(!A)for(let[C,{to:F,reducer:N}]of v.dynamics)lD(Xqe,C,I,u,p)&&(h.push({node:F,state:typeof N<"u"?lD(_T,N,I,u,p):I}),va(` Dynamic transition to ${F} found (via ${C})`))}if(h.length===0&&A&&e.length===1)return[{node:un.InitialNode,state:mz}];if(h.length===0)throw new my(e,o.filter(({node:E})=>E!==un.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===un.ErrorNode))throw new my(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));o=Kqe(h)}if(o.length>0){va(" Results:");for(let n of o)va(` - ${n.node} -> ${JSON.stringify(n.state)}`)}els
2024-06-15 19:05:40 +02:00
`),this.context.stdout.write(`
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].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.
2024-06-21 09:01:29 +02:00
`)}}}});async function bz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=kz(t);return ls.from(r,e).runExit(o,a)}async function xz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=kz(t);return ls.from(r,e).run(o,a)}function kz(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function Sz(t){return t()}var Dz,ls,Qz=Et(()=>{eD();cD();QT();vz();Jp();Pz();Dz=Symbol("clipanion/errorCommand");ls=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new wy({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new ls(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[it.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:o,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...ls.defaultContext,...a};switch(p.selectedIndex){case nd:{let E=Iy.from(p,u);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=u[p.selectedIndex],I=this.registrations.get(E);if(typeof I>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let v=new E;v.context=h,v.tokens=p.tokens,v.path=p.path;try{for(let[x,{transformer:C}]of I.specs.entries())v[x]=C(I.builder,x,p,h);return v}catch(x){throw x[Dz]=v,x}}break}}async run(e,r){var o,a;let n,u={...ls.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(E){return u.stdout.write(this.error(E,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,I)=>this.error(E,I),format:E=>this.format(E),process:(E,I)=>this.process(E,{...u,...I}),run:(E,I)=>this.run(E,{...u,...I}),usage:(E,I)=>this.usage(E,I)};let p=this.enableCapture&&(a=Bz(u))!==null&&a!==void 0?a:Sz,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return u.stdout.write(this.error(E,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:o}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),u=typeof e.usage.category<"u"?vo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof e.usage.description<"u"?vo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?vo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,I])=>[vo(E,{format:this.format(r),paragraphs:!1}),I.replace(/\$0/g,this.binaryName)]):void 0;return
2024-06-15 19:05:40 +02:00
`),(h!==""||E.length>0)&&(A+=`${this.format(r).header("Usage")}
`,A+=`
`);let{usage:I,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${I}
`,v.length>0){A+=`
`,A+=`${this.format(r).header("Options")}
`;let x=v.reduce((C,F)=>Math.max(C,F.definition.length),0);A+=`
`;for(let{definition:C,description:F}of v)A+=` ${this.format(r).bold(C.padEnd(x))} ${vo(F,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
`,A+=`${this.format(r).header("Details")}
`,A+=`
`,A+=vo(h,{format:this.format(r),paragraphs:!0})),E.length>0){A+=`
`,A+=`${this.format(r).header("Examples")}
`;for(let[x,C]of E)A+=`
`,A+=vo(x,{format:this.format(r),paragraphs:!1}),A+=`${C.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
`}else{let p=new Map;for(let[v,{index:x}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let C=typeof v.usage.category<"u"?vo(v.usage.category,{format:this.format(r),paragraphs:!1}):null,F=p.get(C);typeof F>"u"&&p.set(C,F=[]);let{usage:N}=this.getUsageByIndex(x);F.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,x)=>v===null?-1:x===null?1:v.localeCompare(x,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",I=typeof this.binaryVersion<"u";E||I?(E&&I?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
`:E?A+=`${this.format(r).header(`${this.binaryLabel}`)}
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
`;for(let v of h){let x=p.get(v).slice().sort((F,N)=>F.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),C=v!==null?v.trim():"General commands";A+=`
`,A+=`${this.format(r).header(`${C}`)}
`;for(let{commandClass:F,usage:N}of x){let U=F.usage.description||"undocumented";A+=`
`,A+=` ${this.format(r).bold(N)}
`,A+=` ${vo(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
`,A+=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 A}error(e,r){var o,{colored:a,command:n=(o=e[Dz])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message}
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
2024-06-21 09:01:29 +02:00
`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:ls.defaultContext.colorDepth>1)?uz:Az}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};ls.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:Iz()}});var lI,Rz=Et(()=>{Jp();lI=class extends it{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
`)}};lI.paths=[["--clipanion=definitions"]]});var cI,Fz=Et(()=>{Jp();cI=class extends it{async execute(){this.context.stdout.write(this.cli.usage())}};cI.paths=[["-h"],["--help"]]});function AD(t={}){return Wo({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var qT=Et(()=>{Ef()});var uI,Tz=Et(()=>{Jp();qT();uI=class extends it{constructor(){super(...arguments),this.args=AD()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
`)}};uI.paths=[["--clipanion=tokens"]]});var AI,Lz=Et(()=>{Jp();AI=class extends it{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
`)}};AI.paths=[["-v"],["--version"]]});var GT={};zt(GT,{DefinitionsCommand:()=>lI,HelpCommand:()=>cI,TokensCommand:()=>uI,VersionCommand:()=>AI});var Nz=Et(()=>{Rz();Fz();Tz();Lz()});function Oz(t,e,r){let[o,a]=ju(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let I,v=typeof o<"u"?[...o]:void 0;for(let{name:x,value:C}of E.options)!A.has(x)||(I=x,v=v??[],v.push(C));return typeof v<"u"?id(I??h,v,a.validator):v}})}var Mz=Et(()=>{Ef()});function Uz(t,e,r){let[o,a]=ju(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:I,value:v}of h.options)!u.has(I)||(E=v);return E}})}var _z=Et(()=>{Ef()});function Hz(t,e,r){let[o,a]=ju(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:I,value:v}of h.options)!u.has(I)||(E??(E=0),v?E+=1:E=0);return E}})}var qz=Et(()=>{Ef()});function Gz(t={}){return Wo({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===tl||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var jz=Et(()=>{cD();Ef()});function Zqe(t,e,r){let[o,a]=ju(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,I){let v,x=o;typeof a.env<"u"&&I.env[a.env]&&(v=a.env,x=I.env[a.env]);for(let{name:C,value:F}of E.options)!A.has(C)||(v=C,x=F);return typeof x=="string"?id(v??h,x,a.validator):x}})}function $qe(t={}){let{required:e=!0}=t;return Wo({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===tl||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return id((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function Yz(t,...e){return typeof t=="string"?Zqe(t,...e):$qe(t)}var Wz=Et(()=>{cD();Ef()});var ge={};zt(ge,{Array:()=>Oz,Boolean:()=>Uz,Counter:()=>Hz,Proxy:()=>AD,Rest:()=>Gz,String:()=>Yz,applyValidator:()=>id,cleanValidationError:()=>nD,formatError:()=>rI,isOptionSymbol:()=>tI,makeCommandOption:()=>Wo,rerouteArguments:()=>ju});var Kz=Et(()=>{Ef();qT();Mz();_z();qz();jz();Wz()});var fI={};zt(fI,{Builtins:()=>GT,Cli:()=>ls,Command:()=>it,Option:()=>ge,UsageError:()=>st,formatMarkdownish:()=>vo,run:()=>xz,runExit:()=>bz});var qt=Et(()=>{rD();QT();Jp();Qz();Nz();Kz()});var zz=_((kkt,eGe)=>{eGe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"
2024-06-15 19:05:40 +02:00
`);let o;for(;(o=iGe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
2024-06-21 09:01:29 +02:00
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function oGe(t){let e=Xz(t),r=ks.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let o=Vz(t).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=cGe(r,A);n=ks.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return ks.parse(n)}function aGe(t){console.log(`[dotenv@${WT}][INFO] ${t}`)}function lGe(t){console.log(`[dotenv@${WT}][WARN] ${t}`)}function jT(t){console.log(`[dotenv@${WT}][DEBUG] ${t}`)}function Vz(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cGe(t,e){let r;try{r=new URL(e)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=t.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function Xz(t){let e=YT.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function uGe(t){return t[0]==="~"?YT.join(tGe.homedir(),t.slice(1)):t}function AGe(t){aGe("Loading env from encrypted .env.vault");let e=ks._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),ks.populate(r,e,t),{parsed:e}}function fGe(t){let e=YT.resolve(process.cwd(),".env"),r="utf8",o=Boolean(t&&t.debug);t&&(t.path!=null&&(e=uGe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=ks.parse(Jz.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),ks.populate(n,a,t),{parsed:a}}catch(a){return o&&jT(`Failed to load ${e} ${a.message}`),{error:a}}}function pGe(t){let e=Xz(t);return Vz(t).length===0?ks.configDotenv(t):Jz.existsSync(e)?ks._configVault(t):(lGe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),ks.configDotenv(t))}function hGe(t,e){let r=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=rGe.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function gGe(t,e,r={}){let o=Boolean(r&&r.debug),a=Boolean(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),o&&jT(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var ks={configDotenv:fGe,_configVault:AGe,_parseVault:oGe,config:pGe,decrypt:hGe,parse:sGe,populate:gGe};Cf.exports.configDotenv=ks.configDotenv;Cf.exports._configVault=ks._configVault;Cf.exports._parseVault=ks._parseVault;Cf.exports.config=ks.config;Cf.exports.decrypt=ks.decrypt;Cf.exports.parse=ks.parse;Cf.exports.populate=ks.populate;Cf.exports=ks});var eJ=_((Rkt,$z)=>{"use strict";$z.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var sd=_((Fkt,KT)=>{"use strict";var dGe=eJ(),tJ=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let E=dGe(A,...h);p(E),E.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>
`,"\r","(",")","!","|","&","^"],!0,!1),ce=function($){return e.queryPattern.test($)},we=function($){return e.checkFn($)},de=Se("whitespace"),Be=/^[ \t\n\r]/,Ee=Re([" "," ",`
`,"\r"],!1,!1),g=0,me=0,Ce=[{line:1,column:1}],Ae=0,ne=[],Z=0,xe;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Le(){return t.substring(me,g)}function ht(){return Ue(me,g)}function H($,ie){throw ie=ie!==void 0?ie:Ue(me,g),S([Se($)],t.substring(me,g),ie)}function rt($,ie){throw ie=ie!==void 0?ie:Ue(me,g),w($,ie)}function Te($,ie){return{type:"literal",text:$,ignoreCase:ie}}function Re($,ie,be){return{type:"class",parts:$,inverted:ie,ignoreCase:be}}function ke(){return{type:"any"}}function Ye(){return{type:"end"}}function Se($){return{type:"other",description:$}}function et($){var ie=Ce[$],be;if(ie)return ie;for(be=$-1;!Ce[be];)be--;for(ie=Ce[be],ie={line:ie.line,column:ie.column};be<$;)t.charCodeAt(be)===10?(ie.line++,ie.column=1):ie.column++,be++;return Ce[$]=ie,ie}function Ue($,ie){var be=et($),Fe=et(ie);return{start:{offset:$,line:be.line,column:be.column},end:{offset:ie,line:Fe.line,column:Fe.column}}}function b($){g<Ae||(g>Ae&&(Ae=g,ne=[]),ne.push($))}function w($,ie){return new Ad($,null,null,ie)}function S($,ie,be){return new Ad(Ad.buildMessage($,ie),$,ie,be)}function y(){var $,ie,be,Fe,at,dt,Gt,tr;if($=g,ie=R(),ie!==r){for(be=[],Fe=g,at=X(),at!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,Z===0&&b(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,Z===0&&b(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,Z===0&&b(E)))),dt!==r?(Gt=X(),Gt!==r?(tr=R(),tr!==r?(at=[at,dt,Gt,tr],Fe=at):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);Fe!==r;)be.push(Fe),Fe=g,at=X(),at!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,Z===0&&b(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,Z===0&&b(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,Z===0&&b(E)))),dt!==r?(Gt=X(),Gt!==r?(tr=R(),tr!==r?(at=[at,dt,Gt,tr],Fe=at):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);be!==r?(me=$,ie=I(ie,be),$=ie):(g=$,$=r)}else g=$,$=r;return $}function R(){var $,ie,be,Fe,at,dt;return $=g,t.charCodeAt(g)===33?(ie=v,g++):(ie=r,Z===0&&b(x)),ie!==r?(be=R(),be!==r?(me=$,ie=C(be),$=ie):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(ie=F,g++):(ie=r,Z===0&&b(N)),ie!==r?(be=X(),be!==r?(Fe=y(),Fe!==r?(at=X(),at!==r?(t.charCodeAt(g)===41?(dt=U,g++):(dt=r,Z===0&&b(J)),dt!==r?(me=$,ie=te(Fe),$=ie):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=V())),$}function V(){var $,ie,be,Fe,at;if($=g,ie=X(),ie!==r){if(be=g,Fe=[],ae.test(t.charAt(g))?(at=t.charAt(g),g++):(at=r,Z===0&&b(le)),at!==r)for(;at!==r;)Fe.push(at),ae.test(t.charAt(g))?(at=t.charAt(g),g++):(at=r,Z===0&&b(le));else Fe=r;Fe!==r?be=t.substring(be,g):be=Fe,be!==r?(me=g,Fe=ce(be),Fe?Fe=void 0:Fe=r,Fe!==r?(me=$,ie=we(be),$=ie):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,ie;for(Z++,$=[],Be.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&b(Ee));ie!==r;)$.push(ie),Be.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&b(Ee));return Z--,$===r&&(ie=r,Z===0&&b(de)),$}if(xe=a(),xe!==r&&g===t.length)return xe;throw xe!==r&&g<t.length&&b(Ye()),S(ne,Ae<t.length?t.charAt(Ae):null,Ae<t.length?Ue(Ae,Ae+1):Ue(Ae,Ae))}ZV.exports={SyntaxError:Ad,parse:g5e}});var eX=_(DD=>{var{parse:d5e}=$V();DD.makeParser=(t=/[a-z]+/)=>(e,r)=>d5e(e,{queryPattern:t,checkFn:r});DD.parse=DD.makeParser()});var rX=_((xQt,tX)=>{"use strict";tX.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],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[1
2024-06-15 19:05:40 +02:00
`:`
`)+r,a=o+1,o=t.indexOf(`
`,a)}while(o!==-1);return n+=t.substr(a),n};yX.exports={stringReplaceAll:x5e,stringEncaseCRLFWithFirstIndex:k5e}});var vX=_((OQt,BX)=>{"use strict";var Q5e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,CX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,R5e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,F5e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,T5e=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function IX(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)):T5e.get(t)||t}function L5e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(R5e))r.push(a[2].replace(F5e,(A,p,h)=>p?IX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function N5e(t){CX.lastIndex=0;let e=[],r;for(;(r=CX.exec(t))!==null;){let o=r[1];if(r[2]){let a=L5e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function wX(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}BX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(Q5e,(n,u,A,p,h,E)=>{if(u)a.push(IX(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:wX(t,r)(I)),r.push({inverse:A,styles:N5e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(wX(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var BL=_((MQt,bX)=>{"use strict";var vI=BI(),{stdout:EL,stderr:CL}=mL(),{stringReplaceAll:O5e,stringEncaseCRLFWithFirstIndex:M5e}=EX(),PX=["ansi","ansi","ansi256","ansi16m"],Qy=Object.create(null),U5e=(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=EL?EL.level:0;t.level=e.level===void 0?r:e.level},wL=class{constructor(e){return DX(e)}},DX=t=>{let e={};return U5e(e,t),e.template=(...r)=>q5e(e.template,...r),Object.setPrototypeOf(e,xD.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=wL,e.template};function xD(t){return DX(t)}for(let[t,e]of Object.entries(vI))Qy[t]={get(){let r=kD(this,IL(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Qy.visible={get(){let t=kD(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var SX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of SX)Qy[t]={get(){let{level:e}=this;return function(...r){let o=IL(vI.color[PX[e]][t](...r),vI.color.close,this._styler);return kD(this,o,this._isEmpty)}}};for(let t of SX){let e="bg"+t[0].toUpperCase()+t.slice(1);Qy[e]={get(){let{level:r}=this;return function(...o){let a=IL(vI.bgColor[PX[r]][t](...o),vI.bgColor.close,this._styler);return kD(this,a,this._isEmpty)}}}}var _5e=Object.defineProperties(()=>{},{...Qy,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),IL=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},kD=(t,e,r)=>{let o=(...a)=>H5e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=_5e,o._generator=t,o._styler=e,o._isEmpty=r,o},H5e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=O5e(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
2024-06-21 09:01:29 +02:00
`);return n!==-1&&(e=M5e(e,a,o,n)),o+e+a},yL,q5e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return yL===void 0&&(yL=vX()),yL(t,a.join(""))};Object.defineProperties(xD.prototype,Qy);var PI=xD();PI.supportsColor=EL;PI.stderr=xD({level:CL?CL.level:0});PI.stderr.supportsColor=CL;PI.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};bX.exports=PI});var QD=_(_l=>{"use strict";_l.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;_l.find=(t,e)=>t.nodes.find(r=>r.type===e);_l.exceedsLimit=(t,e,r=1,o)=>o===!1||!_l.isInteger(t)||!_l.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;_l.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};_l.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;_l.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;_l.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;_l.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);_l.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var RD=_((_Qt,kX)=>{"use strict";var xX=QD();kX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&xX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&xX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var RX=_((HQt,QX)=>{"use strict";QX.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var HX=_((qQt,_X)=>{"use strict";var FX=RX(),fd=(t,e,r)=>{if(FX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(FX(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(fd.cache.hasOwnProperty(p))return fd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let F=t+"|"+e;return o.capture?`(${F})`:o.wrap===!1?F:`(?:${F})`}let I=UX(t)||UX(e),v={min:t,max:e,a:h,b:E},x=[],C=[];if(I&&(v.isPadded=I,v.maxLen=String(v.max).length),h<0){let F=E<0?Math.abs(E):1;C=TX(F,Math.abs(h),v,o),h=v.a=0}return E>=0&&(x=TX(h,E,v,o)),v.negatives=C,v.positives=x,v.result=G5e(C,x,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&x.length+C.length>1&&(v.result=`(?:${v.result})`),fd.cache[p]=v,v.result};function G5e(t,e,r){let o=vL(t,e,"-",!1,r)||[],a=vL(e,t,"",!1,r)||[],n=vL(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function j5e(t,e){let r=1,o=1,a=NX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=NX(t,r);for(a=OX(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=OX(e+1,o)-1;return n=[...n],n.sort(K5e),n}function Y5e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=W5e(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=z5e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function TX(t,e,r,o){let a=j5e(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],E=Y5e(String(u),String(h),o),I="";if(!r.isPadded&&A&&A.pattern===E.pattern){A.count.length>1&&A.count.pop(),A.count.push(E.count[0]),A.string=A.pattern+MX(A.count),u=h+1;continue}r.isPadded&&(I=J5e(h,r,o)),E.string=I+E.pattern+MX(E.count),n.push(E),u=h+1,A=E}return n}function vL(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!LX(e,"strin
`,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 lZ=_((KQt,aZ)=>{"use strict";var l7e=RD(),{MAX_LENGTH:iZ,CHAR_BACKSLASH:bL,CHAR_BACKTICK:c7e,CHAR_COMMA:u7e,CHAR_DOT:A7e,CHAR_LEFT_PARENTHESES:f7e,CHAR_RIGHT_PARENTHESES:p7e,CHAR_LEFT_CURLY_BRACE:h7e,CHAR_RIGHT_CURLY_BRACE:g7e,CHAR_LEFT_SQUARE_BRACKET:sZ,CHAR_RIGHT_SQUARE_BRACKET:oZ,CHAR_DOUBLE_QUOTE:d7e,CHAR_SINGLE_QUOTE:m7e,CHAR_NO_BREAK_SPACE:y7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E7e}=nZ(),C7e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(iZ,r.maxLength):iZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,E=0,I=0,v,x={},C=()=>t[E++],F=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(F({type:"bos"});E<h;)if(u=n[n.length-1],v=C(),!(v===E7e||v===y7e)){if(v===bL){F({type:"text",value:(e.keepEscaping?v:"")+C()});continue}if(v===oZ){F({type:"text",value:"\\"+v});continue}if(v===sZ){p++;let N=!0,U;for(;E<h&&(U=C());){if(v+=U,U===sZ){p++;continue}if(U===bL){v+=C();continue}if(U===oZ&&(p--,p===0))break}F({type:"text",value:v});continue}if(v===f7e){u=F({type:"paren",nodes:[]}),n.push(u),F({type:"text",value:v});continue}if(v===p7e){if(u.type!=="paren"){F({type:"text",value:v});continue}u=n.pop(),F({type:"text",value:v}),u=n[n.length-1];continue}if(v===d7e||v===m7e||v===c7e){let N=v,U;for(e.keepQuotes!==!0&&(v="");E<h&&(U=C());){if(U===bL){v+=U+C();continue}if(U===N){e.keepQuotes===!0&&(v+=U);break}v+=U}F({type:"text",value:v});continue}if(v===h7e){I++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:I,commas:0,ranges:0,nodes:[]};u=F(U),n.push(u),F({type:"open",value:v});continue}if(v===g7e){if(u.type!=="brace"){F({type:"text",value:v});continue}let N="close";u=n.pop(),u.close=!0,F({type:N,value:v}),I--,u=n[n.length-1];continue}if(v===u7e&&I>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:l7e(u)}]}F({type:"comma",value:v}),u.commas++;continue}if(v===A7e&&I>0&&u.commas===0){let N=u.nodes;if(I===0||N.length===0){F({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+v,A=U,u.ranges--;continue}F({type:"dot",value:v});continue}F({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(J=>{J.nodes||(J.type==="open"&&(J.isOpen=!0),J.type==="close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return F({type:"eos"}),a};aZ.exports=C7e});var AZ=_((zQt,uZ)=>{"use strict";var cZ=RD(),w7e=ZX(),I7e=tZ(),B7e=lZ(),nl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=nl.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(nl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};nl.parse=(t,e={})=>B7e(t,e);nl.stringify=(t,e={})=>cZ(typeof t=="string"?nl.parse(t,e):t,e);nl.compile=(t,e={})=>(typeof t=="string"&&(t=nl.parse(t,e)),w7e(t,e));nl.expand=(t,e={})=>{typeof t=="string"&&(t=nl.parse(t,e));let r=I7e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};nl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?nl.compile(t,e):nl.expand(t,e);uZ.exports=nl});var SI=_((JQt,dZ)=>{"use strict";var v7e=ve("path"),zu="\\\\/",fZ=`[^${zu}]`,vf="\\.",P7e="\\+",D7e="\\?",TD="\\/",S7e="(?=.)",pZ="[^/]",xL=`(?:${TD}|$)`,hZ=`(?:^|${T
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var fE,cM=Et(()=>{Wl();So();fE=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 o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Vt(11,`${qr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var Pd,uM=Et(()=>{So();Pd=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,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${Gn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${qr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var pE,AM=Et(()=>{Dt();So();pE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Fs(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Fs(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return oE(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=mi.makeVirtualPath(n,u,a),p=new _u(A,{baseFs:r.packageFs,pathUtils:z});return{...r,packageFs:p}}}});var hE,u1,Tse=Et(()=>{hE=class{static isVirtualDescriptor(e){return!!e.range.startsWith(hE.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(hE.protocol)}supportsDescriptor(e,r){return hE.isVirtualDescriptor(e)}supportsLocator(e,r){return hE.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){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,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){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')}},u1=hE;u1.protocol="virtual:"});var gE,fM=Et(()=>{Dt();vd();gE=class{supports(e){return!!e.reference.startsWith(Xn.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new gn(o),prefixPath:Bt.dot,localPath:o}}get
`,I.message,I.stack);var v=new Error("tunneling socket could not be established, cause="+I.message);v.code="ECONNRESET",e.request.emit("error",v),o.removeSocket(a)}};Rf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function Hse(t,e){var r=this;Rf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=IM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=xrt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function qse(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function IM(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var ah;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ah=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)}:ah=function(){};yE.debug=ah});var Yse=_((uNt,jse)=>{jse.exports=Gse()});var Tf=_((Ff,zS)=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var Wse=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Nrt(t){return Wse.includes(t)}var Ort=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Wse];function Mrt(t){return Ort.includes(t)}var Urt=["null","undefined","string","number","bigint","boolean","symbol"];function _rt(t){return Urt.includes(t)}function EE(t){return e=>typeof e===t}var{toString:Kse}=Object.prototype,p1=t=>{let e=Kse.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&De.domElement(t))return"HTMLElement";if(Mrt(e))return e},Zn=t=>e=>p1(e)===t;function De(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(De.observable(t))return"Observable";if(De.array(t))return"Array";if(De.buffer(t))return"Buffer";let e=p1(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"}De.undefined=EE("undefined");De.string=EE("string");var Hrt=EE("number");De.number=t=>Hrt(t)&&!De.nan(t);De.bigint=EE("bigint");De.function_=EE("function");De.null_=t=>t===null;De.class_=t=>De.function_(t)&&t.toString().startsWith("class ");De.boolean=t=>t===!0||t===!1;De.symbol=EE("symbol");De.numericString=t=>De.string(t)&&!De.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));De.array=(t,e)=>Array.isArray(t)?De.function_(e)?t.every(e):!0:!1;De.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};De.blob=t=>Zn("Blob")(t);De.nullOrUndefined=t=>De.null_(t)||De.undefined(t);De.object=t=>!De.null_(t)&&(typeof t=="object"||De.function_(t));De.iterable=t=>{var e;return De.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};De.asyncIterable=t=>{var e;return De.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};De.generator=t=>{var e,r;return De.iterable(t)&&De.function_((e=t)===null||e===void 0?void 0:e.next)&&De.function_((r=t)===null||r===void 0?void 0:r.throw)};De.asyncGenerator=t=>De.asyncIterable(t)&&De.function_(t.next)&&De.function_(t.throw);De.nativePromise=t=>Zn("Promise")(t);var qrt=t=>{var e,r;return De.function_((e=t)===null||e===void 0?void 0:e.then)&&De.function_((r=t)===null||r===void 0?voi
Please report this to https://github.com/szmarczak/http2-wrapper/`);C(F)}return}o[0].resolve(x);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let E=`${A}:${u}`,I=!1;try{let v=Xnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});v[ea]=0,v[BE]=!1;let x=()=>v[ea]<v.remoteSettings.maxConcurrentStreams,C=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(E,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(E)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(I){C&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let F=()=>{if(!(!(u in this.queue)||!x())){for(let N of v[Kl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&x();)U.shift().resolve(v);let J=this.queue[u];if(J[N].listeners.length===0&&(delete J[N],Object.keys(J).length===0)){delete this.queue[u];break}if(!x())break}}};v.on("origin",()=>{v[Kl]=v.originSet,x()&&(F(),KM(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);v.destroy();return}v[Kl]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(eit(U,v,tit),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,I=!0,this.emit("session",v),F(),p(),v[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{F(),KM(this.sessions[u],v)})}),v[joe]=v.request,v.request=(N,U)=>{if(v[BE])throw new Error("The session is gracefully closing. No new streams are allowed.");let J=v[joe](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,J.once("close",()=>{if(C=x(),--v[ea],!v.destroyed&&!v.closed&&(rit(this.sessions[u],v),x()&&!v.closed)){C||(this._freeSessionsCount++,C=!0);let te=v[ea]===0;te&&v.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||v[BE])?v.close():(KM(this.sessions[u],v),F())}}),J}}catch(v){for(let x of o)x.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return rA.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Vnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ea]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Yoe({agent:this,isFree:!0})}get busySessions(){return Yoe({agent:this,isFree:!1})}};rA.kCurrentStreamsCount=ea;rA.kGracefullyClosing=BE;Koe.exports={Agent:rA,globalAgent:new rA}});var VM=_((NNt,zoe)=>{"use strict";var{Readable:nit}=ve("stream"),JM=class extends nit{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.removeAllListeners("data"
2024-06-15 19:05:40 +02:00
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
`)}${A.reverse().join(`
2024-06-21 09:01:29 +02:00
`)}`}}};Bn.RequestError=Ji;var Ab=class extends Ji{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Bn.MaxRedirectsError=Ab;var fb=class extends Ji{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Bn.HTTPError=fb;var pb=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Bn.CacheError=pb;var hb=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Bn.UploadError=hb;var gb=class extends Ji{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};Bn.TimeoutError=gb;var C1=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Bn.ReadError=C1;var db=class extends Ji{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Bn.UnsupportedProtocolError=db;var ust=["socket","connect","continue","information","upgrade","timeout"],mb=class extends Oae.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[DE]=0,this[bE]=0,this.requestInitialized=!1,this[ab]=new Set,this.redirects=[],this[xE]=!1,this[lb]=!1,this[E1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof w4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),Bn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){ot.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Git.ReadStream&&await ast(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Zs])===null||h===void 0||h.destroy();return}for(let I of this[E1])I();this[E1].length=0,this.requestInitialized=!0}catch(E){if(E instanceof Ji){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(ot.default.object(e)&&!ot.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),ot.default.urlInstance(r.url)&&(r.url=new lh.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),ot.assert.any([ot.default.string,ot.default.undefined],r.method),ot.assert.any([ot.default.object,ot.default.undefined],r.headers),ot.assert.any([ot.default.string,ot.default.urlInstance,ot.default.undefined],r.prefixUrl),ot.assert.any([ot.default.object,ot.default.undefined],r.cookieJar),ot.assert.any([ot.default.object,ot.default.string,ot.default.undefined],r.searchParams),ot.assert.any([ot.default.object,ot.default.string,ot.default.undefined],r.cache),ot.assert.any([ot.default.object,ot.default.number,ot.default.undefined],r.timeout),ot.assert.any([ot.default.object,ot.default.undefined],r.context),ot.assert.any([ot.default.object,ot.default.undefined],r.hooks),ot.assert.any([ot.default.boolean,ot.default.undefined],r.decompress),ot.assert.any([ot.default.boolean,ot.default.undefined],r.ignoreInvalidCookies),ot.assert.any([ot.default.boolean,ot.default.undefined],r.followRedirect),ot.assert.any([ot.default.number,ot.default.undefined],r.maxRedirects),ot.assert.any([ot.default.boolean,ot.default.undefined],r.throwHttpErrors),ot.assert.any([ot.default.boolean,ot.default.undefined],r.http2),ot.assert.any([ot.default.boolean,ot.default.undefined],r.allowGetBody),ot.assert.any([ot.default.string,ot.default.undefined],r.localAddress),ot.asser
`)[3];return Jst(e)}function U4(){return typeof vb.default.availableParallelism<"u"?vb.default.availableParallelism():Math.max(1,vb.default.cpus().length)}var vb,qst,Ile,Gst,jst,Ble,vle,Kst,zst,Pb=Et(()=>{Dt();vb=Ze(ve("os"));Db();Gl();qst=Number(process.versions.node.split(".")[0]),Ile=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),Gst=typeof Ile<"u"?async t=>{try{return await _4(Ile,[t],{cwd:z.cwd()}),!0}catch{return!1}}:void 0,jst="/usr/bin/ldd";Kst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function Y4(t,e,r,o,a){let n=f1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>H4(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>H4(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return H4(t,e,r,o,a)}function H4(t,e,r,o,a){let n=f1(r);switch(o.type){case"ANY":return YS(n);case"SHAPE":return eot(t,e,r,o,a);case"MAP":return tot(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return zI(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=sS(n,{env:t.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,E=mM(r);return E&&E[0]!=="<"&&(h=z.dirname(E)),z.resolve(h,ue.toPortablePath(p))}case"LOCATOR_LOOSE":return xf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return xf(p);case"BOOLEAN":return zI(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function eot(t,e,r,o,a){let n=f1(r);if(typeof n!="object"||Array.isArray(n))throw new st(`Object configuration settings "${e}" must be an object`);let u=W4(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new st(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,Y4(t,h,p,o.properties[A],a))}return u}function tot(t,e,r,o,a){let n=f1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new st(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,E=`${e}['${h}']`,I=o.valueDefinition;u.set(h,Y4(t,E,p,I,a))}return u}function W4(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,W4(t,n));return o}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(o=>z.normalize(o)):z.isAbsolute(e.default)?z.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>z.resolve(t.projectCwd,o)):z.resolve(t.projectCwd,e.default);default:return e.default}}function bb(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return $st;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(bb(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=bb(n,e.valueDefinition,r);typeof u<"u"&&o.set(a,u)}return o}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a],A=bb(n,u,r);typeof A<"u"&&o.set(a,A)}return o}return t}function rot(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(xb)&&(e=(0,Dle.default)(e.slice(xb.length)),t[e]=r);return t}function G4(){let t=`${xb}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="st
`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new Pd([new u1,new Xn,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new fE([new pE,new gE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=v1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=ol(n,u=>u==="current"?e.libc??ol.skip:u)),{os:o,cpu:a,libc:n}}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!xa(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Ot;u.load(a,{yamlCompatibilityMode:!0});let A=WI(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let E of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,I]of u.peerDependenciesMeta)for(let[v,x]of Object.entries(I))p.push({...h,type:"PeerDependencyMeta",selector:E,key:v,value:x})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(sh(o,!0),iS(a),{userProvided:!0});return e}normalizeLocator(e){return xa(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):kE.test(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return xa(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):kE.test(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e,{packageExtensions:r}){let o=e1(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(!!kf(u,A))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof o.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof o.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=o.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",al(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:CN(h)}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Zo(u);o.peerDependencies.has(A.identHash)||o.peerDependencies.set(A.identHash,In(A,"*"))}for(let u of o.peerDependencies.values()){if(u.scope==="types")continue;let A=n(u),p=tA("types",A),h=rn(p);o.peerDependencies.has(p.identHash)||o.peerDependenciesMeta.has(h)||(o.peerDependencies.set(p.identHash,In(p,"*")),o.peerDependenciesMeta.set(h,{optional:!0}))}return o.dependencies=new Map(Rs(o.dependencies,([,u])=>Sa(u))),o.peerDependencies=new Map(Rs(o.peerDependencies,([,u])=>Sa(u))),o}getLimit(e){return al(this.limits,e,()=>(0,xle.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);!A||(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Ke=nA;Ke.deleteProperty=Symbol(),Ke.telemetry=null});va
2024-06-15 19:05:40 +02:00
This command will run a command using Yarn's portable shell.
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
2024-06-21 09:01:29 +02:00
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}});var ll,Wle=Et(()=>{ll=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var Ob={};zt(Ob,{fastGlobOptions:()=>Jle,isBraceExpansion:()=>oU,isGlobPattern:()=>pot,match:()=>hot,micromatchOptions:()=>Nb});function pot(t){if(!Lb.default.scan(t,Nb).isGlob)return!1;try{Lb.default.parse(t,Nb)}catch{return!1}return!0}function hot(t,{cwd:e,baseFs:r}){return(0,Kle.default)(t,{...Jle,cwd:ue.fromPortablePath(e),fs:FP(zle.default,new Gp(r))})}function oU(t){return Lb.default.scan(t,Nb).isBrace}var Kle,zle,Lb,Nb,Jle,Vle=Et(()=>{Dt();Kle=Ze(TS()),zle=Ze(ve("fs")),Lb=Ze(Xo()),Nb={strictBrackets:!0},Jle={onlyDirectories:!1,onlyFiles:!1}});function aU(){}function lU(){for(let t of kd)t.kill()}function ece(t,e,r,o){return a=>{let n=a[0]instanceof sA.Transform?"pipe":a[0],u=a[1]instanceof sA.Transform?"pipe":a[1],A=a[2]instanceof sA.Transform?"pipe":a[2],p=(0,Zle.default)(t,e,{...o,stdio:[n,u,A]});return kd.add(p),kd.size===1&&(process.on("SIGINT",aU),process.on("SIGTERM",lU)),a[0]instanceof sA.Transform&&a[0].pipe(p.stdin),a[1]instanceof sA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof sA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(kd.delete(p),kd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),E.code){case"ENOENT":a[2].write(`command not found: ${t}
2024-06-15 19:05:40 +02:00
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
`),h(1);break}}),p.on("close",E=>{kd.delete(p),kd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),h(E!==null?E:129)})})}}}function tce(t){return e=>{let r=e[0]==="pipe"?new sA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function Mb(t,e){return FE.start(t,e)}function Xle(t,e=null){let r=new sA.PassThrough,o=new $le.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function rce(t,{prefix:e}){return{stdout:Xle(r=>t.stdout.write(`${r}
`),t.stdout.isTTY?e:null),stderr:Xle(r=>t.stderr.write(`${r}
`),t.stderr.isTTY?e:null)}}var Zle,sA,$le,kd,Xl,cU,FE,uU=Et(()=>{Zle=Ze(oT()),sA=ve("stream"),$le=ve("string_decoder"),kd=new Set;Xl=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},cU=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}},FE=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:o,stderr:a}){let n=new FE(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new FE(this,e),a=new cU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}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 o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var L1={};zt(L1,{EntryCommand:()=>QE,ShellError:()=>ll,execute:()=>RE,globUtils:()=>Ob});function nce(t,e,r){let o=new cl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof cl.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new ll(`Bad file descriptor: "${t}"`)}return o}function _b(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function dot(t,e,r){let o=[],a=new cl.PassThrough;return a.on("data",n=>o.push(n)),await Hb(t,e,_b(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function ice(t,e,r){let o=t.map(async n=>{let u=await Qd(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function Ub(t){return t.match(/[^ \r\n\t]+/g)||[]}async function uce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=Ub(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of Ub(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.hasOwn(r.variables,t.name)?u=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await Qd(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await Qd(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new ll(`Unbound argument #${n}`):new ll(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=Ub(u);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function R1(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let o=[];await uce({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?R1({type:"variable",name:o.join(" ")},e,r):R1
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(cy(t))}' has ended
`)})),0}return await oce(t,e,r)}async function wot(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await Cot(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof ll))throw p;return r.stderr.write(`${p.message}
2024-06-21 09:01:29 +02:00
`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function Hb(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await wot(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function Ace(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=>T1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>T1(e));case"arithmetic":return AU(t.arithmetic);case"shell":return fU(t.shell);default:return!1}}function T1(t){switch(t.type){case"redirection":return t.args.some(e=>T1(e));case"argument":return t.segments.some(e=>Ace(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function AU(t){switch(t.type){case"variable":return Ace(t);case"number":return!1;default:return AU(t.left)||AU(t.right)}}function fU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=fU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>T1(n)))||r.args.some(a=>T1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function RE(t,e=[],{baseFs:r=new Tn,builtins:o={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=Ob}={}){let I={};for(let[C,F]of Object.entries(n))typeof F<"u"&&(I[C]=F);let v=new Map(got);for(let[C,F]of Object.entries(o))v.set(C,F);u===null&&(u=new cl.PassThrough,u.end());let x=NP(t,E);if(!fU(x)&&x.length>0&&e.length>0){let{command:C}=x[x.length-1];for(;C.then;)C=C.then.line;let F=C.chain;for(;F.then;)F=F.then.chain;F.type==="command"&&(F.args=F.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await Hb(x,{args:e,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:E},{cwd:a,environment:I,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ace,lce,cl,cce,got,mot,Q1=Et(()=>{Dt();Nl();ace=Ze(BL()),lce=ve("os"),cl=ve("stream"),cce=ve("timers/promises");Yle();Wle();Vle();uU();uU();got=new Map([["cd",async([t=(0,lce.homedir)(),...e],r,o)=>{let a=z.resolve(o.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new ll(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new ll(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)}
2024-06-15 19:05:40 +02:00
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
2024-06-21 09:01:29 +02:00
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new ll("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new ll(`sleep: invalid time interval '${t}'`);return await(0,cce.setTimeout)(1e3*o,0)}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await Mb(o,{stdin:new Xl(r.stdin),stdout:new Xl(r.stdout),stderr:new Xl(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let I=t[h++],{type:v,fd:x}=JSON.parse(I),C=J=>{switch(x){case null:case 0:u.push(J);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},F=J=>{switch(x){case null:case 1:A.push(J);break;case 2:p.push(J);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},N=Number(t[h++]),U=h+N;for(let J=h;J<U;++h,++J)switch(v){case"<":C(()=>e.baseFs.createReadStream(z.resolve(r.cwd,ue.toPortablePath(t[J]))));break;case"<<<":C(()=>{let te=new cl.PassThrough;return process.nextTick(()=>{te.write(`${t[J]}
`),te.end()}),te});break;case"<&":C(()=>nce(Number(t[J]),1,r));break;case">":case">>":{let te=z.resolve(r.cwd,ue.toPortablePath(t[J]));F(te==="/dev/null"?new cl.Writable({autoDestroy:!0,emitClose:!0,write(ae,le,ce){setImmediate(ce)}}):e.baseFs.createWriteStream(te,v===">>"?{flags:"a"}:void 0))}break;case">&":F(nce(Number(t[J]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let I=new cl.PassThrough;o=I;let v=x=>{if(x===u.length)I.end();else{let C=u[x]();C.pipe(I,{end:!1}),C.on("end",()=>{v(x+1)})}};v(0)}if(A.length>0){let I=new cl.PassThrough;a=I;for(let v of A)I.pipe(v)}if(p.length>0){let I=new cl.PassThrough;n=I;for(let v of p)I.pipe(v)}let E=await Mb(F1(t.slice(h+1),e,r),{stdin:new Xl(o),stdout:new Xl(a),stderr:new Xl(n)}).run();return await Promise.all(A.map(I=>new Promise((v,x)=>{I.on("error",C=>{x(C)}),I.on("close",()=>{v()}),I.end()}))),await Promise.all(p.map(I=>new Promise((v,x)=>{I.on("error",C=>{x(C)}),I.on("close",()=>{v()}),I.end()}))),E}]]);mot={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var qb=_((s4t,fce)=>{function Iot(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}fce.exports=Iot});var yce=_((o4t,mce)=>{var pce=hd(),Bot=qb(),vot=ql(),Pot=AE(),Dot=1/0,hce=pce?pce.prototype:void 0,gce=hce?hce.toString:void 0;function dce(t){if(typeof t=="string")return t;if(vot(t))return Bot(t,dce)+"";if(Pot(t))return gce?gce.call(t):"";var e=t+"";return e=="0"&&1/t==-Dot?"-0":e}mce.exports=dce});var N1=_((a4t,Ece)=>{var Sot=yce();function bot(t){return t==null?"":Sot(t)}Ece.exports=bot});var pU=_((l4t,Cce)=>{function xot(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}Cce.exports=xot});var Ice=_((c4t,wce)=>{var kot=pU();function Qot(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:kot(t,e,r)}wce.exports=Qot});var hU=_((u4t,Bce)=>{var Rot="\\ud800-\\udfff",Fot="\\u0300-\\u036f",Tot="\\ufe20-\\ufe2f",Lot="\\u20d0-\\u20ff",Not=Fot+Tot+Lot,Oot="\\ufe0e\\ufe0f",Mot="\\u200d",Uot=RegExp("["+Mot+Rot+Not+Oot+"]");function _ot(t){return Uot.test(t)}Bce.exports=_ot});var Pce=_((A4t,vce)=>{function Hot(t){return t.split("")}vce.exports=Hot});var Fce=_((f4t,Rce)=>{var Dce="\\ud800-\\udfff",qot="\\u0300-\\u036f",Got="\\ufe20-\\ufe2f",jot="\\u20d0-\\u20ff",Yot=qot+Got+jot,Wot="\\ufe0e\\ufe0f",Kot="["+Dce+"]",gU="["+Yot+"]",dU="\\ud83c[\\udffb-\\udfff]",zot="(?:"+gU+"|"+dU+")",Sce="[^"+Dce+"]",bce="(?:\\ud83c[\\udde6-\\uddff]){2}",xce="[\\ud800-\\udbff][\\udc00-\\udfff]",Jot="\\u200d",kce=zot+"?",Qce="["+Wot+"]?",Vot="(?:"+Jot+"(?:"+[Sce,bce,xce].join("|")+")"+Qce+kce+")*",Xot=Qce+kce+Vot,Zot="(?:"+[Sce+gU+"?",gU,bce,xce,Kot].join("|")+")",$ot=RegExp(dU+"(?="+dU+")|"+Zot+Xot,"g");function eat(t){return t.match($ot)||[]}Rce.exports=eat});var Lce=_((p4t,Tce)=>{var tat=Pce(),rat=hU(),nat=Fce();function iat(t){return rat(t)?nat(t):tat(t)}Tce.exports=iat});var Oce=_((h4t,Nce)=>{var sat=Ice(),oat=hU(),aat=Lce(),lat=N1();function cat(t){return function(e){e=lat(e);var r=oat(e)?aat(e):void 0,o=r?r[0]:e.charAt(0),a=r?sat(r,1).join(""):e.slice(1);return o[t]()+a}}Nce.exports=cat});var Uce=_((g4t,Mce)=>{var uat=Oce(),Aat=uat("toUpperCase");Mce.exports=Aat});var mU=_((d4t,_ce)=>{var fat=N1(),pat=Uce();function hat(t){return pat(fat(t).toLowerCase())}_ce.exports=hat});var Hce=_((m4t,Gb)=>{function gat(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,E=10,I=11,v=12,x=13,C=14,F=15,N=16,U=17,J=0,te=1,ae=2,le=3,ce=4;function we(g,me){return 55296<=g.charCodeAt(me)&&g.charCodeAt(me)<=56319&&56320<=g.charCodeAt(me+1)&&g.charCodeAt(me+1)<=57343}function de(g,me){me===void 0&&(me=0);var Ce=g.charCodeAt(me);if(55296<=Ce&&Ce<=56319&&me<g.length-1){var Ae=Ce,ne=g.charCodeAt(me+1);return 56320<=ne&&ne<=57343?(Ae-55296)*1024+(ne-56320)+65536:Ae}if(56320<=Ce&&Ce<=57343&&me>=1){var Ae=g.charCodeAt(me-1),ne=Ce;return 55296<=Ae&&Ae<=56319?(Ae-55296)*1024+(ne-56320)+65536:ne}return Ce}function Be(g,me,Ce){var Ae=[g]
2024-06-15 19:05:40 +02:00
`,end:t=>`::endgroup::
`}:Yb.default.TRAVIS?{start:t=>`travis_fold:start:${t}
`,end:t=>`travis_fold:end:${t}
`}:Yb.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,zce=fh!==null,Wce=new Date,Eat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Cat=t=>t,Wb=Cat({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}}),wat=Eat&&Object.keys(Wb).find(t=>{let e=Wb[t];return!(e.date&&(e.date[0]!==Wce.getDate()||e.date[1]!==Wce.getMonth()+1))})||"default";Ft=class extends Xs{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:I=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(XI(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=I,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let v=r.get("progressBarStyle")||wat;if(!Object.hasOwn(Wb,v))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Wb[v];let x=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*x/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,yd(r.configuration,`Yarn ${nn}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,fh!==null&&!this.json&&this.includeInfos&&this.stdout.write(fh.start(r))},reportFooter:A=>{if(this.indent-=1,fh!==null&&!this.json&&this.includeInfos){this.stdout.write(fh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,A,yt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent
`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Yce&&(this.progressFrame=(this.progressFrame+1)%jce.length,this.progressTime=r);let o=jce[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
2024-06-21 09:01:29 +02:00
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Yce)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,Kce.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Jce(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Ut(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?yU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${yat} `}}});var An={};zt(An,{PackageManager:()=>Zce,detectPackageManager:()=>$ce,executePackageAccessibleBinary:()=>iue,executePackageScript:()=>Kb,executePackageShellcode:()=>EU,executeWorkspaceAccessibleBinary:()=>bat,executeWorkspaceLifecycleScript:()=>rue,executeWorkspaceScript:()=>tue,getPackageAccessibleBinaries:()=>zb,getWorkspaceAccessibleBinaries:()=>nue,hasPackageScript:()=>Pat,hasWorkspaceScript:()=>CU,isNodeScript:()=>wU,makeScriptEnv:()=>U1,maybeExecuteWorkspaceLifecycleScript:()=>Sat,prepareExternalProject:()=>vat});async function ph(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await oe.writeFilePromise(z.format({dir:t,name:e,ext:".cmd"}),a)}await oe.writeFilePromise(z.join(t,e),`#!/bin/sh
2024-06-15 19:05:40 +02:00
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
`,{mode:493})}async function $ce(t){let e=await Ot.tryFind(t);if(e?.packageManager){let o=_S(e.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await oe.readFilePromise(z.join(t,dr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:oe.existsSync(z.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:oe.existsSync(z.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function U1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[E,I]of Object.entries(n))typeof I<"u"&&(u[E.toLowerCase()!=="path"?E:"PATH"]=I);let A=ue.fromPortablePath(r);u.BERRY_BIN_FOLDER=ue.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([ph(r,"node",process.execPath),...nn!==null?[ph(r,"run",process.execPath,[p,"run"]),ph(r,"yarn",process.execPath,[p]),ph(r,"yarnpkg",process.execPath,[p]),ph(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),u.PROJECT_CWD=ue.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${ue.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${ue.sep}yarn`,u.npm_node_execpath=`${A}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),I=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=rn(e),u.npm_package_version=I;let v;if(E)v=E.cwd;else{let x=t.storedPackages.get(e.locatorHash);if(!x)throw new Error(`Package for ${qr(t.configuration,e)} not found in the project`);let C=t.configuration.getLinkers(),F={project:t,report:new Ft({stdout:new hh.PassThrough,configuration:t.configuration})},N=C.find(U=>U.supportsPackage(x,F));if(!N)throw new Error(`The package ${qr(t.configuration,x)} isn't supported by any of the available linkers`);v=await N.findPackageLocation(x,F)}u.npm_package_json=ue.fromPortablePath(z.join(v,dr.manifest))}let h=nn!==null?`yarn/${nn}`:`yarn/${Pf("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,u,async(E,I,v)=>await ph(r,E,I,v)),u}async function vat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Bat(async()=>{await oe.mktempPromise(async u=>{let A=z.join(u,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(A,{prefix:ue.fromPortablePath(t),report:o}),I=n&&qc(n)?r1(n):n,v=I?ba(I):"an external project";h.write(`Packing ${v} from sources
`);let x=await $ce(t),C;x!==null?(h.write(`Using ${x.packageManager} for bootstrap. Reason: ${x.reason}
`),C=x.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
2024-06-21 09:01:29 +02:00
`),C="Yarn");let F=C==="Yarn"&&!x?.packageManagerField;await oe.mktempPromise(async N=>{let U=await U1({binFolder:N,ignoreCorepack:F}),te=new Map([["Yarn Classic",async()=>{let le=a!==null?["workspace",a]:[],ce=z.join(t,dr.manifest),we=await oe.readFilePromise(ce),de=await Yc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(de.code!==0)return de.code;await oe.writeFilePromise(ce,we),await oe.appendFilePromise(z.join(t,".npmignore"),`/.yarn
2024-06-15 19:05:40 +02:00
`),h.write(`
2024-06-21 09:01:29 +02:00
`),delete U.NODE_ENV;let Be=await Yc("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(`
`);let Ee=await Yc("yarn",[...le,"pack","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ee.code!==0?Ee.code:0}],["Yarn",async()=>{let le=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ce=z.join(t,dr.lockfile);await oe.existsPromise(ce)||await oe.writeFilePromise(ce,"");let we=await Yc("yarn",[...le,"pack","--install-if-needed","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return we.code!==0?we.code:0}],["npm",async()=>{if(a!==null){let me=new hh.PassThrough,Ce=Wy(me);me.pipe(h,{end:!1});let Ae=await Yc("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:me,stderr:E,end:0});if(me.end(),Ae.code!==0)return h.end(),E.end(),Ae.code;let ne=(await Ce).toString().trim();if(!kf(ne,">=7.x")){let Z=tA(null,"npm"),xe=In(Z,ne),Le=In(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${Gn(r,xe)}; please upgrade to ${Gn(r,Le)} (npm has been detected as the primary package manager for ${Ut(r,t,yt.PATH)})`)}}let le=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ce=await Yc("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ce.code!==0)return ce.code;let we=new hh.PassThrough,de=Wy(we);we.pipe(h);let Be=await Yc("npm",["pack","--silent",...le],{cwd:t,env:U,stdin:p,stdout:we,stderr:E});if(Be.code!==0)return Be.code;let Ee=(await de).toString().trim().replace(/^.*\n/s,""),g=z.resolve(t,ue.toPortablePath(Ee));return await oe.renamePromise(g,e),0}]]).get(C);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let ae=await te();if(!(ae===0||typeof ae>"u"))throw oe.detachTemp(u),new Vt(58,`Packing the package failed (exit code ${ae}, logs can be found here: ${Ut(r,A,yt.PATH)})`)})})})}async function Pat(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return CU(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${qr(r.configuration,t)} not found in the project`);return await Vl.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Ft({stdout:new hh.PassThrough,configuration:u})},h=A.find(x=>x.supportsPackage(a,p));if(!h)throw new Error(`The package ${qr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),I=new gn(E,{baseFs:n});return(await Ot.find(Bt.dot,{baseFs:I})).scripts.has(e)})}async function Kb(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{manifest:h,env:E,cwd:I}=await eue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),v=h.scripts.get(e);if(typeof v>"u")return 1;let x=async()=>await RE(v,r,{cwd:I,env:E,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(F=>F.wrapScriptExecution,x,a,t,e,{script:v,args:r,cwd:I,env:E,stdin:n,stdout:u,stderr:A}))()})}async function EU(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{env:h,cwd:E}=await eue(t,{project:a,binFolder:p,cwd:o});return await RE(e,r,{cwd:E,env:h,stdin:n,stdout:u,stderr:A})})}async function Dat(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await U1({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await IU(e,await nue(t)),typeof r>"u"&&(r=z.dirname(await oe.realpathPromise(z.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function eue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Dat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${qr(e.configuration,t)} not found in the project`);return await Vl.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ft({stdout:new hh.PassThrough,configuration:p})},I=h.find(N=>N.supportsPackage(u,E));if(!I)throw new Error(`The package ${qr(e.configuration,u)} isn't supported by any of the available linkers`);
`,{stdout:h,stderr:E}=a.getSubprocessStreams(A,{report:o,prefix:qr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let I=await tue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),I!==0)throw oe.detachTemp(u),new Vt(36,`${(0,Vce.default)(e)} script failed (exit code ${Ut(a,I,yt.NUMBER)}, logs can be found here: ${Ut(a,A,yt.PATH)}); run ${Ut(a,`yarn ${e}`,yt.CODE)} to investigate`)})}async function Sat(t,e,r){CU(t,e)&&await rue(t,e,r)}function wU(t){let e=z.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),o;try{o=oe.openSync(t,"r")}catch{return!0}try{oe.readSync(o,r,0,r.length,0)}finally{oe.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function zb(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${qr(r,t)} not found in the project`);let n=new hh.Writable,u=r.getLinkers(),A={project:e,report:new Ft({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let I=e.storedResolutions.get(E.descriptorHash);if(!I)throw new Error(`Assertion failed: The resolution (${Gn(r,E)}) should have been registered`);p.add(I)}let h=await Promise.all(Array.from(p,async E=>{let I=e.storedPackages.get(E);if(!I)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(I.bin.size===0)return ol.skip;let v=u.find(C=>C.supportsPackage(I,A));if(!v)return ol.skip;let x=null;try{x=await v.findPackageLocation(I,A)}catch(C){if(C.code==="LOCATOR_NOT_INSTALLED")return ol.skip;throw C}return{dependency:I,packageLocation:x}}));for(let E of h){if(E===ol.skip)continue;let{dependency:I,packageLocation:v}=E;for(let[x,C]of I.bin){let F=z.resolve(v,C);o.set(x,[I,ue.fromPortablePath(F),wU(F)])}}return o}async function nue(t){return await zb(t.anchoredLocator,{project:t.project})}async function IU(t,e){await Promise.all(Array.from(e,([r,[,o,a]])=>a?ph(t,r,process.execPath,[o]):ph(t,r,o,[])))}async function iue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await zb(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${qr(a.configuration,t)}`);return await oe.mktempPromise(async I=>{let[,v]=E,x=await U1({project:a,locator:t,binFolder:I});await IU(x.BERRY_BIN_FOLDER,h);let C=wU(ue.toPortablePath(v))?Yc(process.execPath,[...p,v,...r],{cwd:o,env:x,stdin:n,stdout:u,stderr:A}):Yc(v,r,{cwd:o,env:x,stdin:n,stdout:u,stderr:A}),F;try{F=await C}finally{await oe.removePromise(x.BERRY_BIN_FOLDER)}return F.code})}async function bat(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await iue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Vce,Xce,hh,Zce,Iat,Bat,BU=Et(()=>{Dt();Dt();iA();Q1();Vce=Ze(mU()),Xce=Ze(sd()),hh=ve("stream");uE();Wl();M1();O1();Db();jl();Gl();Qf();So();Zce=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Zce||{});Iat=2,Bat=(0,Xce.default)(Iat)});var LE=_((U4t,oue)=>{"use strict";var sue=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"]]);oue.exports=t=>t?Object.keys(t).map(e=>[sue.has(e)?sue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var OE=_((_4t,gue)=>{"use strict";var aue=typeof process=="object"&&process?process:{stdout:null,stderr:null},xat=ve("events"),lue=ve("stream"),cue=ve("string_decoder").StringDecoder,Mf=Symbol("EOF"),Uf=Symbol("maybeEmitEnd"),gh=Symbol("emittedEnd"),Jb=Symbol("emittingEnd"),_1=Symbol("emittedError"),Vb=Symbol("closed"),uue=Symbol("read"),Xb=Symbol("flus
2024-06-15 19:05:40 +02:00
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};j1.parse=(t,e,r)=>new j1(nlt(ilt(t),e),r);var nlt=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,ilt=t=>t.replace(/\n$/,"").split(`
2024-06-21 09:01:29 +02:00
`).reduce(slt,Object.create(null)),slt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};xue.exports=j1});var GE=_((Z4t,kue)=>{kue.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var ox=_(($4t,Que)=>{"use strict";Que.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var e3=_((tUt,Rue)=>{"use strict";var ax=["|","<",">","?",":"],$U=ax.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),olt=new Map(ax.map((t,e)=>[t,$U[e]])),alt=new Map($U.map((t,e)=>[t,ax[e]]));Rue.exports={encode:t=>ax.reduce((e,r)=>e.split(r).join(olt.get(r)),t),decode:t=>$U.reduce((e,r)=>e.split(r).join(alt.get(r)),t)}});var t3=_((rUt,Tue)=>{var{isAbsolute:llt,parse:Fue}=ve("path").win32;Tue.exports=t=>{let e="",r=Fue(t);for(;llt(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=Fue(t)}return[e,t]}});var Nue=_((nUt,Lue)=>{"use strict";Lue.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var A3=_((oUt,Vue)=>{"use strict";var Gue=OE(),jue=sx(),Yue=qE(),aA=ve("fs"),Oue=ve("path"),oA=_E(),clt=GE(),Wue=(t,e)=>e?(t=oA(t).replace(/^\.(\/|$)/,""),clt(e)+"/"+t):oA(t),ult=16*1024*1024,Mue=Symbol("process"),Uue=Symbol("file"),_ue=Symbol("directory"),n3=Symbol("symlink"),Hue=Symbol("hardlink"),Y1=Symbol("header"),lx=Symbol("read"),i3=Symbol("lstat"),cx=Symbol("onlstat"),s3=Symbol("onread"),o3=Symbol("onreadlink"),a3=Symbol("openfile"),l3=Symbol("onopenfile"),Eh=Symbol("close"),ux=Symbol("mode"),c3=Symbol("awaitDrain"),r3=Symbol("ondrain"),lA=Symbol("prefix"),que=Symbol("hadError"),Kue=ox(),Alt=e3(),zue=t3(),Jue=Nue(),Ax=Kue(class extends Gue{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=oA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||ult,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=oA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?oA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=zue(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Alt.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=oA(r.absolute||Oue.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[cx](this.statCache.get(this.absolute)):this[i3]()}emit(e,...r){return e==="error"&&(this[que]=!0),super.emit(e,...r)}[i3](){aA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[cx](r)})}[cx](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=plt(e),this.emit("stat",e),this[Mue]()}[Mue](){switch(this.type){case"File":return this[Uue]();case"Directory":return this[_ue]();case"SymbolicLink":return this[n3]();default:return this.end()}}[ux](e){return Jue(e,this.type==="Directory",this.portable)}[lA](e){return Wue(e,this.prefix)}[Y1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Yue({path:
2024-06-15 19:05:40 +02:00
`}),A},o})});var fs={};zt(fs,{emitList:()=>sut,emitTree:()=>ipe,treeNodeToJson:()=>npe,treeNodeToTreeify:()=>rpe});function rpe(t,{configuration:e}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:E,value:I,children:v}=h,x=[];typeof E<"u"&&x.push(yd(e,E,2)),typeof I<"u"&&x.push(Ut(e,I[0],I[1])),x.length===0&&x.push(yd(e,`${p}`,2));let C=x.join(": ").trim(),F=`\0${o++}\0`,N=u[`${F}${C}`]={};typeof v<"u"&&a(v,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function npe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Ed(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[out(n)]=e(u));return typeof r.value>"u"?a:{value:Ed(r.value[0],r.value[1]),children:a}};return e(t)}function sut(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));ipe({children:a},{configuration:e,stdout:r,json:o})}function ipe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)A&&r.write(`${JSON.stringify(npe(A))}
`);return}let n=(0,tpe.asTree)(rpe(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
$1`).replace(/^│\n/,"")),a>=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
2024-06-21 09:01:29 +02:00
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function out(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var tpe,spe=Et(()=>{tpe=Ze(epe());jl()});function s2(t){let e=t.match(aut);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var ope,l_,c_,zx,Nr,aut,u_=Et(()=>{je();Dt();Dt();iA();ope=ve("crypto"),l_=Ze(ve("fs"));Wl();ih();Gl();So();c_=Ky(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),zx=Ky(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Nr=class{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,ope.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=Nr.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(e,{immutable:r,check:o}={}){let a=new Nr(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[zx,o].join(""),cacheSpec: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`${oE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=s2(r).hash.slice(0,10);return`${oE(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=s2(e);if(r===null||r<c_)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<zx&&a==="always"||o!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?z.resolve(this.cwd,this.getVersionFilename(e)):r===null?z.resolve(this.cwd,this.getVersionFilename(e)):z.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?z.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await oe.existsPromise(this.cwd))throw new Vt(56,"Cache path does not exist.")}else{await oe.mkdirPromise(this.cwd,{recursive:!0});let e=z.resolve(this.cwd,".gitignore");await oe.changeFilePromise(e,`/.gitignore
2024-06-15 19:05:40 +02:00
*.flock
*.tmp
2024-06-21 09:01:29 +02:00
`)}(this.mirrorCwd||!this.immutable)&&await oe.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(e),p=new Tn,h=()=>{let de=new Xi,Be=z.join(Bt.root,nM(e));return de.mkdirSync(Be,{recursive:!0}),de.writeJsonSync(z.join(Be,dr.manifest),{name:rn(e),mocked:!0}),de},E=async(de,{isColdHit:Be,controlPath:Ee=null})=>{if(Ee===null&&u.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?s2(r).cacheKey:this.cacheKey,me=!u.skipIntegrityCheck||!r?`${g}/${await NS(de)}`:r;if(Ee!==null){let Ae=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await NS(Ee)}`:r;if(me!==Ae)throw new Vt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Ce=null;switch(r!==null&&me!==r&&(this.check?Ce="throw":s2(r).cacheKey!==s2(me).cacheKey?Ce="update":Ce=this.configuration.get("checksumBehavior")),Ce){case null:case"update":return{isValid:!0,hash:me};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Vt(18,"The remote archive doesn't match the expected checksum")}},I=async de=>{if(!n)throw new Error(`Cache check required but no loader configured for ${qr(this.configuration,e)}`);let Be=await n(),Ee=Be.getRealPath();Be.saveAndClose(),await oe.chmodPromise(Ee,420);let g=await E(de,{controlPath:Ee,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},v=async()=>{if(A===null||!await oe.existsPromise(A)){let de=await n(),Be=de.getRealPath();return de.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:A}},x=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${qr(this.configuration,e)}`);if(this.immutable)throw new Vt(56,`Cache entry required but missing for ${qr(this.configuration,e)}`);let{path:de,source:Be}=await v(),{hash:Ee}=await E(de,{isColdHit:!0}),g=this.getLocatorPath(e,Ee),me=[];Be!=="mirror"&&A!==null&&me.push(async()=>{let Ae=`${A}${this.cacheId}`;await oe.copyFilePromise(de,Ae,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(Ae,420),await oe.renamePromise(Ae,A)}),(!u.mirrorWriteOnly||A===null)&&me.push(async()=>{let Ae=`${g}${this.cacheId}`;await oe.copyFilePromise(de,Ae,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(Ae,420),await oe.renamePromise(Ae,g)});let Ce=u.mirrorWriteOnly?A??g:g;return await Promise.all(me.map(Ae=>Ae())),[!1,Ce,Ee]},C=async()=>{let Be=(async()=>{let Ee=u.unstablePackages?.has(e.locatorHash),g=Ee||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,me=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Ce=!!u.mockedPackages?.has(e.locatorHash)&&(!this.check||!me),Ae=Ce||me,ne=Ae?o:a;if(ne&&ne(),Ae){let Z=null,xe=g;if(!Ce)if(this.check)Z=await I(xe);else{let Le=await E(xe,{isColdHit:!1});if(Le.isValid)Z=Le.hash;else return x()}return[Ce,xe,Z]}else{if(this.immutable&&Ee)throw new Vt(56,`Cache entry required but missing for ${qr(this.configuration,e)}; consider defining ${pe.pretty(this.configuration,"supportedArchitectures",pe.Type.CODE)} to cache packages for multiple systems`);return x()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let de;de=this.mutexes.get(e.locatorHash);)await de;let[F,N,U]=await C();F||this.markedFiles.add(N);let J,te=F?()=>h():()=>new Xi(N,{baseFs:p,readOnly:!0}),ae=new ny(()=>wN(()=>J=te(),de=>`Failed to open the cache entry for ${qr(this.configuration,e)}: ${de}`),z),le=new _u(N,{baseFs:ae,pathUtils:z}),ce=()=>{J?.discardAndClose()},we=u.unstablePackages?.has(e.locatorHash)?null:U;return[le,ce,we]}},aut=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var Jx,ape=Et(()=>{Jx=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(Jx||{})});var lut,iC,A_=Et(()=>{Dt();Nl();Qf();So();lut=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a
2024-06-15 19:05:40 +02:00
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
`),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
2024-06-21 09:01:29 +02:00
`))}formatNameWithHyperlink(r){return yU(r,{configuration:this.configuration,json:!1})}}});var sC,f_=Et(()=>{So();sC=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(MS(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(MS(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Kf(){}function cut(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var I=e[n-1];e[n-1]=e[n],e[n]=I}}else{if(!h.added&&a){var E=r.slice(A,A+h.count);E=E.map(function(x,C){var F=o[p+C];return F.length>x.length?F:x}),h.value=t.join(E)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=e[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[u-2].value+=v.value,e.pop()),e}function uut(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Aut(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 Ape(t,e,r){return r=Aut(r,{ignoreWhitespace:!0}),m_.diff(t,e,r)}function fut(t,e,r){return y_.diff(t,e,r)}function Vx(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vx=function(e){return typeof e}:Vx=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vx(t)}function p_(t){return gut(t)||dut(t)||mut(t)||yut()}function gut(t){if(Array.isArray(t))return h_(t)}function dut(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function mut(t,e){if(!!t){if(typeof t=="string")return h_(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 h_(t,e)}}function h_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function yut(){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 g_(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(Eut.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=g_(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),Vx(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=g_(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function fpe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=fut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(J){return" "+J})}for(var h=[],E=0,I=0,v=[],x=1,C=1,F=function(J){var te=A[J],ae=te.lines||te.value.replace(/\n$/,"").split(`
`);if(te.lines=ae,te.added||te.removed){var le;if(!E){var ce=A[J-1];E=x,I=C,ce&&(v=u.context>0?p(ce.lines.slice(-u.context)):[],E-=v.length,I-=v.length)}(le=v).push.apply(le,p_(ae.map(function(Ae){return(te.added?"+":"-")+Ae}))),te.added?C+=ae.length:x+=ae.length}else{if(E)if(ae.length<=u.context*2&&J<A.length-2){var we;(we=v).push.apply(we,p_(p(ae)))}else{var de,Be=Math.min(ae.length,u.context);(de=v).push.apply(de,p_(p(ae.slice(0,Be))));var Ee={oldStart:E,oldLines:x-E+Be,newStart:I,newLines:C-I+Be,lines:v};if(J>=A.length-2&&ae.length<=u.context){var g=/\n$/.test(r),me=/\n$/.test(o),Ce=ae.length==0&&v.length>Ee.oldLines;!g&&Ce&&r.length>0&&v.splice(Ee.oldLines,0,"\\ No newline at end of file"),(!g&&!Ce||!me)&&v.push("\\ No newline at end of file")}h.push(Ee),E=0,I=0,v=[]}x+=ae.length,C+=ae.length}},N=0;N<A.length;N++)F(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var o3t,cpe,upe,m_,y_,put,hut,Eut,o2,d_,E_=Et(()=>{Kf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(F){return a?(setTimeout(function(){a(void 0,F)},0),!0):F}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,E=A+p;o.maxEditLength&&(E=Math.min(E,o.maxEditLength));var I=[{newPos:-1,components:[]}],v=this.extractCommon(I[0],r,e,0);if(I[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function x(){for(var F=-1*h;F<=h;F+=2){var N=void 0,U=I[F-1],J=I[F+1],te=(J?J.newPos:0)-F;U&&(I[F-1]=void 0);var ae=U&&U.newPos+1<A,le=J&&0<=te&&te<p;if(!ae&&!le){I[F]=void 0;continue}if(!ae||le&&U.newPos<J.newPos?(N=uut(J),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),te=n.extractCommon(N,r,e,F),N.newPos+1>=A&&te+1>=p)return u(cut(n,N.components,r,e,n.useLongestToken));I[F]=N}h++}if(a)(function F(){setTimeout(function(){if(h>E)return a();x()||F()},0)})();else for(;h<=E;){var C=x();if(C)return C}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,p},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=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};o3t=new Kf;cpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,upe=/\S/,m_=new Kf;m_.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!upe.test(t)&&!upe.test(e)};m_.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]&&cpe.test(e[r])&&cpe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};y_=new Kf;y_.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};put=new Kf;put.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};hut=new Kf;hut.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Eut=Object.prototype.toString,o2=new Kf;o2.useLongestToken=!0;o2.tokenize=y_.tokenize;o2.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(g_(t,null,null,a),a," ")};o2.equals=function(t,e){return Kf.prototype.equals.call(o2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};d_=new Kf;d_.tokenize=function(t){return t.s
`;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function RAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,I=[],v=new Map,x=new Map,C=new Map,F=new Map,N=new Map(t.workspaces.map(le=>{let ce=le.anchoredLocator.locatorHash,we=o.get(ce);if(typeof we>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ce,e1(we)]})),U=()=>{let le=oe.mktempSync(),ce=z.join(le,"stacktrace.log"),we=String(I.length+1).length,de=I.map((Be,Ee)=>`${`${Ee+1}.`.padStart(we," ")} ${ba(Be)}
`).join("");throw oe.writeFileSync(ce,de),oe.detachTemp(le),new Vt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(ce)}`)},J=le=>{let ce=r.get(le.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: The resolution should have been registered");let we=o.get(ce);if(!we)throw new Error("Assertion failed: The package could not be found");return we},te=(le,ce,we,{top:de,optional:Be})=>{I.length>1e3&&U(),I.push(ce);let Ee=ae(le,ce,we,{top:de,optional:Be});return I.pop(),Ee},ae=(le,ce,we,{top:de,optional:Be})=>{if(Be||n.delete(ce.locatorHash),a.has(ce.locatorHash))return;a.add(ce.locatorHash);let Ee=o.get(ce.locatorHash);if(!Ee)throw new Error(`Assertion failed: The package (${qr(t.configuration,ce)}) should have been registered`);let g=[],me=new Map,Ce=[],Ae=[],ne=[],Z=[];for(let Le of Array.from(Ee.dependencies.values())){if(Ee.peerDependencies.has(Le.identHash)&&Ee.locatorHash!==de)continue;if(bf(Le))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Le.descriptorHash);let ht=Be;if(!ht){let Se=Ee.dependenciesMeta.get(rn(Le));if(typeof Se<"u"){let et=Se.get(null);typeof et<"u"&&et.optional&&(ht=!0)}}let H=r.get(Le.descriptorHash);if(!H)throw new Error(`Assertion failed: The resolution (${Gn(t.configuration,Le)}) should have been registered`);let rt=N.get(H)||o.get(H);if(!rt)throw new Error(`Assertion failed: The package (${H}, resolved from ${Gn(t.configuration,Le)}) should have been registered`);if(rt.peerDependencies.size===0){te(Le,rt,new Map,{top:de,optional:ht});continue}let Te,Re,ke=new Set,Ye=new Map;Ce.push(()=>{Te=tM(Le,ce.locatorHash),Re=rM(rt,ce.locatorHash),Ee.dependencies.delete(Le.identHash),Ee.dependencies.set(Te.identHash,Te),r.set(Te.descriptorHash,Re.locatorHash),e.set(Te.descriptorHash,Te),o.set(Re.locatorHash,Re),g.push([rt,Te,Re])}),Ae.push(()=>{F.set(Re.locatorHash,Ye);for(let Se of Re.peerDependencies.values()){let Ue=al(me,Se.identHash,()=>{let b=we.get(Se.identHash)??null,w=Ee.dependencies.get(Se.identHash);return!w&&n1(ce,Se)&&(le.identHash===ce.identHash?w=le:(w=In(ce,le.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,ce.locatorHash),h.delete(w.descriptorHash),b=null)),w||(w=In(Se,"missing:")),{subject:ce,ident:Se,provided:w,root:!b,requests:new Map,hash:`p${zi(ce.locatorHash,Se.identHash).slice(0,5)}`}}).provided;if(Ue.range==="missing:"&&Re.dependencies.has(Se.identHash)){Re.peerDependencies.delete(Se.identHash);continue}Ye.set(Se.identHash,{requester:Re,descriptor:Se,meta:Re.peerDependenciesMeta.get(rn(Se)),children:new Map}),Re.dependencies.set(Se.identHash,Ue),bf(Ue)&&jy(C,Ue.descriptorHash).add(Re.locatorHash),v.set(Ue.identHash,Ue),Ue.range==="missing:"&&ke.add(Ue.identHash)}Re.dependencies=new Map(Rs(Re.dependencies,([Se,et])=>rn(et)))}),ne.push(()=>{if(!o.has(Re.locatorHash))return;let Se=E.get(rt.locatorHash);typeof Se=="number"&&Se>=2&&U();let et=E.get(rt.locatorHash),Ue=typeof et<"u"?et+1:1;E.set(rt.locatorHash,Ue),te(Te,Re,Ye,{top:de,optional:ht}),E.set(rt.locatorHash,Ue-1)}),Z.push(()=>{let Se=Ee.dependencies.get(Le.identHash);if(typeof Se>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let et=r.get(Se.descriptorHash);if(typeof et>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ue=F.get(et);if(typeof Ue>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let b of me.values()){let w=Ue.get(b.ident.identHash);!w||(b.requests.set(Se.descriptorHash,w),p.set(b.hash,b),b.root||we.get(b.ident.identHash)?.children.set(Se.descriptorHash,w))}if(!!o.has(Re.locatorHash))for(let b of ke)Re.dependencies.delete(b)})}for(let Le of[...Ce,...Ae])Le();let xe;do{xe=!0;for(let[Le,ht,H]of g){let rt=KI(x,Le.locatorHash),Te=zi(...[...H.dependencies.values()].map(Se=>{let et=Se.range!=="missing:"?r.get(Se.descriptorHash):"missing:";if(typeof et>"u")throw new Error(`Assertion failed: Expected the resolution for ${Gn(t.configuration,Se)} to have been
2024-06-15 19:05:40 +02:00
${[I,v,x].join(`
2024-06-21 09:01:29 +02:00
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=z.join(this.cwd,dr.lockfile),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(e)){let o=await oe.readFilePromise(e,"utf8");this.lockFileChecksum=Jpe(o);let a=Ki(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<rk;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=xf(p.resolution,!0),E=new Ot;E.load(p,{yamlCompatibilityMode:!0});let I=E.version,v=E.languageName||r,x=p.linkType.toUpperCase(),C=p.conditions??null,F=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,J=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let le=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,le)}let ae={...h,version:I,languageName:v,linkType:x,conditions:C,dependencies:F,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:J,bin:te};this.originalPackages.set(ae.locatorHash,ae);for(let le of A.split(bAt)){let ce=sh(le);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=In(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,tk.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new aC(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${us(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){z.isAbsolute(e)||(e=z.resolve(this.cwd,e)),e=z.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 o of this.workspaces)z.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);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>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${us(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Xn.protocol)){let o=e.range.slice(Xn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!xa(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(bf(e)&&(e=t1(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Gn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(qc(e)&&(e=r1(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${qr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolu
`;switch(rt.type){case 0:Te+=`# Script name: ${rt.script}
`;break;case 1:Te+=`# Script code: ${rt.script}
`;break}let Re=null;if(!await oe.mktempPromise(async Ye=>{let Se=z.join(Ye,"build.log"),{stdout:et,stderr:Ue}=this.configuration.getSubprocessStreams(Se,{header:Te,prefix:qr(this.configuration,Z),report:r}),b;try{switch(rt.type){case 0:b=await Kb(Z,rt.script,[],{cwd:H,project:this,stdin:Re,stdout:et,stderr:Ue});break;case 1:b=await EU(Z,rt.script,[],{cwd:H,project:this,stdin:Re,stdout:et,stderr:Ue});break}}catch(y){Ue.write(y.stack),b=1}if(et.end(),Ue.end(),b===0)return!0;oe.detachTemp(Ye);let w=`${qr(this.configuration,Z)} couldn't be built successfully (exit code ${Ut(this.configuration,b,yt.NUMBER)}, logs can be found here: ${Ut(this.configuration,Se,yt.PATH)})`,S=this.optionalBuilds.has(Z.locatorHash);return S?r.reportInfo(9,w):r.reportError(9,w),zce&&r.reportFold(ue.fromPortablePath(Se),oe.readFileSync(Se,"utf8")),S}))return!1}return!0});Ae.push(...ht,Promise.allSettled(ht).then(H=>{ae.delete(ne),H.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ee.set(Z.locatorHash,Le)}))}if(await _c(Ae),Ce===ae.size){let ne=Array.from(ae).map(Z=>{let xe=this.storedPackages.get(Z);if(!xe)throw new Error("Assertion failed: The package should have been registered");return qr(this.configuration,xe)}).join(", ");r.reportError(3,`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=Ee,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ft.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");Ke.telemetry?.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,I)=>{e.report.reportWarning(E,I)},reportError:(E,I)=>{e.report.reportError(E,I),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,I]of E)for(let v of I)v.status="inactive";let n=z.join(this.cwd,dr.lockfile),u=null;if(e.immutable)try{u=await oe.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Vt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{FAt(this,e.report);for(let[,E]of a)for(let[,I]of E)for(let v of I)if(v.userProvided){let x=Ut(this.configuration,v,yt.PACKAGE_EXTENSION);switch(v.status){case"inactive":e.report.reportWarning(68,`${x}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${x}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(u!==null){let E=Hg(u,this.generateLockfile());if(E!==u){let I=fpe(n,n,u,E,void 0,void 0,{maxEditLength:100});if(I){e.report.reportSeparator();for(let v of I.hunks){e.report.reportInfo(null,`@@ -${v.oldStart},${v.oldLines} +${v.newStart},${v.newLines} @@`);for(let x of v.lines)x.startsWith("+")?e.report.reportError(28,Ut(this.configuration,x,yt.ADDED)):x.startsWith("-")?e.report.reportError(28,Ut(this.configuration,x,yt.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,x,"grey"))}e.report.reportSeparator()}throw new Vt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,I]of E)for(let v of I)v.userProvided&&v.status==="active"&&Ke.telemetry?.reportPackageExtension(Ed(v,yt.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(
2024-06-15 19:05:40 +02:00
`,`# Manual changes might be lost - proceed with caution!
`].join("")}
2024-06-21 09:01:29 +02:00
`+Ba(r)}async persistLockfile(){let e=z.join(this.cwd,dr.lockfile),r="";try{r=await oe.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Hg(r,o);a!==r&&(await oe.writeFilePromise(e,a),this.lockFileChecksum=Jpe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(b_))e.push(...u);let r=(0,ek.default)(this,e),o=x_.default.serialize(r),a=zi(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await oe.mkdirPromise(z.dirname(n),{recursive:!0}),await oe.writeFilePromise(n,await kAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await QAt(await oe.readFilePromise(a));n=x_.default.deserialize(u),this.installStateChecksum=zi(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,ek.default)(n,b_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,ek.default)(n,b_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let e=(0,tk.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!CM(e.cwd,this.cwd)||!await oe.existsPromise(e.cwd))return null;let a=[];for(let u of await oe.readdirPromise(e.cwd)){if(o.has(u))continue;let A=z.resolve(e.cwd,u);e.markedFiles.has(A)||(e.immutable?r.reportError(56,`${Ut(this.configuration,z.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(oe.lstatPromise(A).then(async p=>(await oe.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function TAt(t){let o=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),u=n+a,A=t.state.lastTips??o*864e5,p=A+864e5+8*36e5-t.timeZone,h=u<=t.timeNow,E=p<=t.timeNow,I=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(I={},I.lastUpdate=h?t.timeNow:n,I.lastTips=A,I.blocks=h?{}:t.state.blocks,I.displayedTips=t.state.displayedTips),{nextState:I,triggerUpdate:h,triggerTips:E,nextTips:E?o*864e5:A}}var lC,Zpe=Et(()=>{Dt();O1();ih();Bb();Gl();Qf();lC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let o=this.getRegistryPath();this.isNew=!oe.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),o=A=>A&&nn?kf(nn,A):!1,a=e.map((A,p)=>p).filter(A=>e[A]&&o(e[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),e[u]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){jy(this.values,e).add(r)}reportEnumerator(e,r){jy(this.enumerators,e).add(zi(r))}reportHit(e,r="*"){let o=KI(this.hits,e),a=al(o,r
2024-06-15 19:05:40 +02:00
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>o(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=UAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!MAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);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=ihe(),t.define=a,t};F_.exports=she();F_.exports.create=she});var To=_(on=>{"use strict";var _At=Object.prototype.toString,nc=zc(),ohe=!1,T_=[],ahe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};on.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);on.hasColor=t=>!!t&&nc.hasColor(t);var sk=on.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);on.nativeType=t=>_At.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");on.isAsyncFn=t=>on.nativeType(t)==="asyncfunction";on.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";on.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;on.scrollDown=(t=[])=>[...t.slice(1),t[0]];on.scrollUp=(t=[])=>[t.pop(),...t];on.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};on.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};on.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};on.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};on.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(o)};on.unmute=t=>{let e=t.stack.find(o=>nc.keys.color.includes(o));return e?nc[e]:t.stack.find(o=>o.slice(2)==="bg")?nc[e.slice(2)]:o=>o};on.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";on.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o));if(e){let o=nc["bg"+on.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?nc[r.slice(2).toLowerCase()]||t:nc.none};on.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return nc[ahe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=ahe[o];return a&&nc["bg"+on.pascal(a)]||t}return nc.none};on.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};on.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!on.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);on.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};on.mixin=(t,e)=>{if(!sk(t))return e;if(!sk(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&sk(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);sk(a.value)?t[r]=on.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};on.merge=(...t)=>{let e={};for(let r of t)on.mixin(e,r);return e};on.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?on.define(t,o,a.bind(e)):on.define(t,o,a)}};on.onExit=t=>{let e=(r,o)=>{ohe||(ohe=!0,T_.forEach(a=>a()),r===!0&&process.exit(128+o))};T_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),T_.push(t)};on.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};on.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var lhe=_(fC=>{"use strict";fC.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"};fC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};fC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};fC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};fC.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 Ahe=_((e8t,uhe)=>{"use strict";var che=ve("readline"),HAt=lhe(),qAt=/^(?:\x1b)([a-zA-Z0-9])$/,GAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,jAt={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:"clear","
2024-06-21 09:01:29 +02:00
`)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=qAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=GAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=jAt[n],o.shift=YAt(n)||o.shift,o.ctrl=WAt(n)||o.ctrl}return o};ok.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=che.createInterface({terminal:!0,input:r});che.emitKeypressEvents(r,o);let a=(A,p)=>e(A,ok(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};ok.action=(t,e,r)=>{let o={...HAt,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};uhe.exports=ok});var phe=_((t8t,fhe)=>{"use strict";fhe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),KAt(t,r,o)}};function KAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var ghe=_((r8t,hhe)=>{"use strict";var{define:zAt,width:JAt}=To(),L_=class{constructor(e){let r=e.options;zAt(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=JAt(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={...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"}};hhe.exports=L_});var mhe=_((n8t,dhe)=>{"use strict";var N_=To(),$s=zc(),O_={default:$s.noop,noop:$s.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||N_.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||N_.complement(this.primary)},primary:$s.cyan,success:$s.green,danger:$s.magenta,strong:$s.bold,warning:$s.yellow,muted:$s.dim,disabled:$s.gray,dark:$s.dim.gray,underline:$s.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 typin
2024-06-15 19:05:40 +02:00
`),h=p[0],E=p[p.length-1],v=(o+(r?" "+r:"")).length,x=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:x,rest:p.slice(1),last:E}}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(Yd.cursor.down(e.rest.length)),this.write(`
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=G_.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:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.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 a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(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,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let I=await this.resolve(E,n,r,o);return!I&&r&&r[e]?this.resolve(h,n,r,o):I}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Fa.isObject(e)&&(e=e[o.status]||e.pending),Fa.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Fa.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Fa.isObject(n)&&(n=n[o.status]||n.pending),Fa.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Fa.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Fa.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Fa.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Fa.hasColor(A)?A:u(A)}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 Fa.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 Fa.resolve(this,e,...r)}get base(){return u2.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Fa.height(this.stdout,25)}get width(){return this.options.columns||Fa.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,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function sft(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function oft(t){t
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}bhe.exports=u2});var Qhe=_((a8t,khe)=>{"use strict";var aft=To(),xhe={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 xhe.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}};khe.exports=(t,e={})=>{let r=aft.merge({},xhe,e.roles);return r[t]||r.default}});var A2=_((l8t,The)=>{"use strict";var lft=zc(),cft=pC(),uft=Qhe(),ak=To(),{reorder:j_,scrollUp:Aft,scrollDown:fft,isObject:Rhe,swap:pft}=ak,Y_=class extends cft{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,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:o,suggest:a}=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 a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Rhe(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),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 o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){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 a=e.value;if(e=uft(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,ak.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.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,lft.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==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,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);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,r){if(thi
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].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,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),I=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,E,I].filter(Boolean).join(`
2024-06-21 09:01:29 +02:00
`)),this.write(this.margin[2]),this.restore()}};Lhe.exports=K_});var Ohe=_((u8t,Nhe)=>{"use strict";var gft=xh(),dft=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},z_=class extends gft{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:o}=this.state;return this.input=o.slice(0,r)+e+o.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 o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}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=dft(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Nhe.exports=z_});var V_=_((A8t,Mhe)=>{"use strict";var J_=To();Mhe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=J_.inverse(t.styles.primary),h=F=>p(t.styles.black(F)),E=r,I=" ",v=h(I);if(t.blink&&t.blink.off===!0&&(h=F=>F,v=""),n&&a===0&&o===""&&r==="")return h(I);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=J_.isPrimitive(o)?`${o}`:"",r=J_.isPrimitive(r)?`${r}`:"";let x=o&&o.startsWith(r)&&o!==r,C=x?h(o[r.length]):v;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),C=""),n===!1&&(C=""),x){let F=t.styles.unstyle(E+C);return E+C+A(o.slice(F.length))}return E+C}});var lk=_((f8t,Uhe)=>{"use strict";var mft=zc(),yft=xh(),Eft=V_(),X_=class extends yft{constructor(e){super({...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:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,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:o}=e;return r&&r.startsWith(o)&&o!
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};Yhe.exports=$_});var Khe=_((d8t,Whe)=>{"use strict";var Sft=ck(),e8=class extends Sft{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Whe.exports=e8});var Jhe=_((m8t,zhe)=>{"use strict";var bft=xh(),xft=lk(),hC=xft.prototype,t8=class extends bft{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():hC.dispatch.call(this,e,r)}append(e,r){return hC.append.call(this,e,r)}delete(e,r){return hC.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?hC.next.call(this):super.next()}prev(){return this.focused.editable?hC.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?hC.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 o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,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)}};zhe.exports=t8});var Wd=_((y8t,Vhe)=>{"use strict";var kft=pC(),Qft=V_(),{isPrimitive:Rft}=To(),r8=class extends kft{constructor(e){super(e),this.initial=Rft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
2024-06-15 19:05:40 +02:00
`,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:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.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),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,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):Qft(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
2024-06-21 09:01:29 +02:00
`)),this.restore()}};Vhe.exports=r8});var Zhe=_((E8t,Xhe)=>{"use strict";var Fft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),uk=t=>Fft(t).filter(Boolean);Xhe.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:uk([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:uk([...n,r]),present:u};case"save":return{past:uk([...o,r]),present:""};case"remove":return u=uk(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var i8=_((C8t,e0e)=>{"use strict";var Tft=Wd(),$he=Zhe(),n8=class extends Tft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=$he(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=$he("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};e0e.exports=n8});var r0e=_((w8t,t0e)=>{"use strict";var Lft=Wd(),s8=class extends Lft{format(){return""}};t0e.exports=s8});var i0e=_((I8t,n0e)=>{"use strict";var Nft=Wd(),o8=class extends Nft{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()}};n0e.exports=o8});var o0e=_((B8t,s0e)=>{"use strict";var Oft=xh(),a8=class extends Oft{constructor(e){super({...e,multiple:!0})}};s0e.exports=a8});var c8=_((v8t,a0e)=>{"use strict";var Mft=Wd(),l8=class extends Mft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,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,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-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()}};a0e.exports=l8});var c0e=_((P8t,l0e)=>{l0e.exports=c8()});var A0e=_((D8t,u0e)=>{"use strict";var Uft=Wd(),u8=class extends Uft{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)):""}};u0e.exports=u8});var h0e=_((S8t,p0e)=>{"use strict";v
2024-06-15 19:05:40 +02:00
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+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 o=0;o<this.scale.length;o++)r.scale.push({index:o})}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,o){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(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!f0e.hasColor(n)&&(n=this.styles.muted(n));let u=C=>this.margin[3]+C.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),I=this.margin[1]+this.margin[3];this.scaleLength=_ft.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-I.length);let x=f0e.wordWrap(h,{width:this.widths[0],newline:A}).split(`
`).map(C=>u(C)+this.margin[1]);return o&&(E=this.styles.info(E),x=x.map(C=>this.styles.info(C))),x[0]+=E,this.linebreak&&x.push(""),[p+a,x.join(`
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),I=await this.renderChoices(),v=await this.footer(),x=this.emptyError;p&&(u+=p),E&&!u.includes(E)&&(u+=" "+E),e&&!p&&!I.trim()&&this.multiple&&x!=null&&(u+=this.styles.danger(x)),this.clear(r),this.write([A,u,h,I,v].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)}};p0e.exports=A8});var m0e=_((b8t,d0e)=>{"use strict";var g0e=zc(),qft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",p8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=qft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Gft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,I=()=>n[++E],v=()=>n[E+1],x=C=>{C.line=h,u.push(C)};for(x({type:"bos",value:""});E<n.length-1;){let C=I();if(/^[^\S\n ]$/.test(C)){x({type:"text",value:C});continue}if(C===`
2024-06-21 09:01:29 +02:00
`){x({type:"newline",value:C}),h++;continue}if(C==="\\"){C+=I(),x({type:"text",value:C});continue}if((C==="$"||C==="#"||C==="{")&&v()==="{"){let N=I();C+=N;let U={type:"template",open:C,inner:"",close:"",value:C},J;for(;J=I();){if(J==="}"){v()==="}"&&(J+=I()),U.value+=J,U.close=J;break}J===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=J),U.value+=J,U.inner+=J}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),x(U),p.push(U.key),o.add(U.key);let te=A.find(ae=>ae.name===U.key);U.field=a.find(ae=>ae.name===U.key),te||(te=new p8(U),A.push(te)),te.lines.push(U.line-1);continue}let F=u[u.length-1];F.type==="text"&&F.line===h?F.value+=C:x({type:"text",value:C})}return x({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};d0e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await Gft(e,o),A=f8("result",t,e),p=f8("format",t,e),h=f8("validate",t,e,!0),E=t.isValue.bind(t);return async(I={},v=!1)=>{let x=0;I.required=r,I.items=n,I.keys=u,I.output="";let C=async(J,te,ae,le)=>{let ce=await h(J,te,ae,le);return ce===!1?"Invalid field "+ae.name:ce};for(let J of a){let te=J.value,ae=J.key;if(J.type!=="template"){te&&(I.output+=te);continue}if(J.type==="template"){let le=n.find(Ee=>Ee.name===ae);e.required===!0&&I.required.add(le.name);let ce=[le.input,I.values[le.value],le.value,te].find(E),de=(le.field||{}).message||J.inner;if(v){let Ee=await C(I.values[ae],I,le,x);if(Ee&&typeof Ee=="string"||Ee===!1){I.invalid.set(ae,Ee);continue}I.invalid.delete(ae);let g=await A(I.values[ae],I,le,x);I.output+=g0e.unstyle(g);continue}le.placeholder=!1;let Be=te;te=await p(te,I,le,x),ce!==te?(I.values[ae]=ce,te=t.styles.typing(ce),I.missing.delete(de)):(I.values[ae]=void 0,ce=`<${de}>`,te=t.styles.primary(ce),le.placeholder=!0,I.required.has(ae)&&I.missing.add(de)),I.missing.has(de)&&I.validating&&(te=t.styles.warning(ce)),I.invalid.has(ae)&&I.validating&&(te=t.styles.danger(ce)),x===I.index&&(Be!==te?te=t.styles.underline(te):te=t.styles.heading(g0e.unstyle(te))),x++}te&&(I.output+=te)}let F=I.output.split(`
`).map(J=>" "+J),N=n.length,U=0;for(let J of n)I.invalid.has(J.name)&&J.lines.forEach(te=>{F[te][0]===" "&&(F[te]=I.styles.danger(I.symbols.bullet)+F[te].slice(1))}),t.isValue(I.values[J.name])&&U++;return I.completed=(U/N*100).toFixed(0),I.output=F.join(`
2024-06-15 19:05:40 +02:00
`),I.output}};function f8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var E0e=_((x8t,y0e)=>{"use strict";var jft=zc(),Yft=m0e(),Wft=pC(),h8=class extends Wft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Yft(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 o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${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),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${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:o,size:a}=this.state,n=[this.options.newline,`
2024-06-21 09:01:29 +02:00
`].find(J=>J!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),I=await this.error()||"",v=await this.hint()||"",x=o?"":await this.interpolate(this.state),C=this.state.key=r[e]||"",F=await this.format(C),N=await this.footer();F&&(h+=" "+F),v&&!F&&this.state.completed===0&&(h+=" "+v),this.clear(a);let U=[E,h,x,N,I.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);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:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
2024-06-15 19:05:40 +02:00
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=jft.unstyle(o).split(`
`).map(A=>A.slice(1)).join(`
2024-06-21 09:01:29 +02:00
`);return this.value={values:a,result:u},super.submit()}};y0e.exports=h8});var w0e=_((k8t,C0e)=>{"use strict";var Kft="(Use <shift>+<up/down> to sort)",zft=xh(),g8=class extends zft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Kft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};C0e.exports=g8});var B0e=_((Q8t,I0e)=>{"use strict";var Jft=A2(),d8=class extends Jft{constructor(e={}){if(super(e),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(o=>this.styles.muted(o)),this.state.header=r.join(`
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=Vft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,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 o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+u,E=r+1+".",I=o?this.styles.heading:this.styles.noop,v=await this.resolve(e.message,this.state,e,r),x=this.indent(e),C=x+e.scale.map((te,ae)=>h(ae===e.scaleIdx)).join(A),F=te=>te===e.scaleIdx?I(te):te,N=x+e.scale.map((te,ae)=>F(ae)).join(p),U=()=>[E,v].filter(Boolean).join(" "),J=()=>[U(),C,N," "].filter(Boolean).join(`
`);return o&&(C=this.styles.cyan(C),N=this.styles.cyan(N)),J()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
2024-06-15 19:05:40 +02:00
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),I=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,E,I].filter(Boolean).join(`
2024-06-21 09:01:29 +02:00
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Vft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}I0e.exports=d8});var P0e=_((R8t,v0e)=>{v0e.exports=i8()});var S0e=_((F8t,D0e)=>{"use strict";var Xft=ck(),m8=class extends Xft{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=o=>this.styles.primary.underline(o);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(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};D0e.exports=m8});var x0e=_((T8t,b0e)=>{"use strict";var Zft=xh(),y8=class extends Zft{constructor(e){if(super(e),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 o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}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)}}};b0e.exports=y8});var Q0e=_(E8=>{"use strict";var k0e=To(),ps=(t,e)=>{k0e.defineExport(E8,t,e),k0e.defineExport(E8,t.toLowerCase(),e)};ps("AutoComplete",()=>Ohe());ps("BasicAuth",()=>jhe());ps("Confirm",()=>Khe());ps("Editable",()=>Jhe());ps("Form",()=>lk());ps("Input",()=>i8());ps("Invisible",()=>r0e());ps("List",()=>i0e());ps("MultiSelect",()=>o0e());ps("Numeral",()=>c0e());ps("Password",()=>A0e());ps("Scale",()=>h0e());ps("Select",()=>xh());ps("Snippet",()=>E0e());ps("Sort",()=>w0e());ps("Survey",()=>B0e());ps("Text",()=>P0e());ps("Toggle",()=>S0e());ps("Quiz",()=>x0e())});var F0e=_((N8t,R0e)=>{R0e.exports={ArrayPrompt:A2(),AuthPrompt:Z_(),BooleanPrompt:ck(),NumberPrompt:c8(),StringPrompt:Wd()}});var p2=_((O8t,L0e)=>{"use strict";var T0e=ve("assert"),w8=ve("events"),kh=To(),Vc=class extends w8{constructor(e,r){super(),this.options=kh.merge({},e),this.answers={...r}}register(e,r){if(kh.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}T0e.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=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(kh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=kh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=kh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];T0e(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",E=>{this.emit("answer",a,E,A),n(this.answers,a,E)});let h=A.emit.bind(A);return A.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}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||pC()}static get prompts(){return Q0e()}static get types(){return F0e()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return kh.mixinEmitter(e,new w8),e}};kh.mixinEmitter(Vc,new w8);var C8=Vc.prompts;for(let t of Object.keys(C8)){let e=t.toLowerCase(),r=o=>new C8[t](o).run();Vc.prompt[e]=r,Vc[e]=r,Vc[t]||Reflect.defineProperty(Vc,t,{get:()=>C8[t]})}var f2=t=>{kh.defineExport(Vc,t,()=>Vc.types[t])};f2("ArrayPrompt");f2("AuthPrompt");f2("BooleanPrompt");f2("NumberPrompt");f2("StringPrompt");L0e.exports=Vc});var m2=_((EHt,q0e)=>{var ipt=Xx();function spt(t,e,r){var o=t==null?void 0:ipt(t,e);return o===void 0?r:o}q0e.exports=spt});var Y0e=_((PHt,j0e)=>{function opt(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}j0e.exports=opt});var K0e=_((DHt,W0e)=>{var apt=md(),lpt=VD();function cpt(t,e){return t&&apt(e,lpt(e),t)}W0e.exports=cpt});var J0e=_((SHt,z0e)=>{var upt=md(),Apt=Gy();function fpt(t,e){return t&&upt(e,Apt(e),t)}z0e.exports=fpt});var
${J} at ${te}`:`
${J}`}).join("");h.push({text:`Conflict detected in constraint targeting ${pe.pretty(t.configuration,x,pe.Type.CODE)}; conflicting values are:${F}`,fixable:!1})}else{let[[F]]=C,N=(0,Mde.default)(v,x);if(JSON.stringify(N)===JSON.stringify(F))continue;if(!o){let U=typeof N>"u"?`Missing field ${pe.pretty(t.configuration,x,pe.Type.CODE)}; expected ${pe.pretty(t.configuration,F,pe.Type.INSPECT)}`:typeof F>"u"?`Extraneous field ${pe.pretty(t.configuration,x,pe.Type.CODE)} currently set to ${pe.pretty(t.configuration,N,pe.Type.INSPECT)}`:`Invalid field ${pe.pretty(t.configuration,x,pe.Type.CODE)}; expected ${pe.pretty(t.configuration,F,pe.Type.INSPECT)}, found ${pe.pretty(t.configuration,N,pe.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof F>"u"?(0,Hde.default)(v,x):(0,Ude.default)(v,x,F),E=!0}E&&a.set(I,v)}h.length>0&&n.set(I,h)}return{changedWorkspaces:a,remainingErrors:n}}function qde(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${pe.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:pe.tuple(pe.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:pe.tuple(pe.Type.NO_HINT,h)}))})}let u={value:pe.tuple(pe.Type.LOCATOR,o.anchoredLocator),children:He.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=He.sortMap(r.children,o=>o.value[1]),r}var Mde,Ude,_de,Hde,EC,_gt,Hgt,qgt,P2=Et(()=>{je();Mde=Ze(m2()),Ude=Ze(Q8()),_de=Ze(Ode()),Hde=Ze(T8()),EC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;He.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let E=new Set(h.get(A)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let I of a)E.has(I)||a.delete(I);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},_gt=/^[0-9]+$/,Hgt=/^[a-zA-Z0-9_]+$/,qgt=new Set(["scripts",...Ot.allDependencies])});var Gde=_((r7t,sH)=>{var Ygt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.t
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Yn.unlinkSync(h),Yn.unlinkSync(E),Yn.unlinkSync(I),Yn.unlinkSync(v),u}function Jgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(c0||($d?process.env.PSModulePath?(c0="powershell.exe",yk=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(c0="cscript.exe",yk=["//nologo",__dirname+"\\read.cs.js"]):(c0="/bin/sh",yk=[__dirname+"/read.sh"])),$d&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),lH.execFileSync){e=zde(t),D2&&D2("execFileSync",e);try{r.input=lH.execFileSync(c0,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Wde+(o?`
`+o:"")),r.error.method="execFileSync",r.error.program=c0,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=zgt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function AH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Jgt(t);if(n.error)throw n.error;return n.input}return uH&&uH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Vf=="string")if(Vf=null,$d){if(A=function(h){var E=h.replace(/^\D+/,"").split("."),I=0;return(E[0]=+E[0])&&(I+=E[0]*1e4),(E[1]=+E[1])&&(I+=E[1]*100),(E[2]=+E[2])&&(I+=E[2]),I}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Vf=process.stdin.fd,wC=process.stdin._handle;else try{Vf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),wC=new jde(Vf,!0)}catch{}if(process.stdout.isTTY)Zc=process.stdout.fd;else{try{Zc=Yn.openSync("\\\\.\\CON","w")}catch{}if(typeof Zc!="number")try{Zc=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Vf=Yn.openSync("/dev/tty","r"),wC=process.stdin._handle}catch{}}else try{Vf=Yn.openSync("/dev/tty","r"),wC=new jde(Vf,!1)}catch{}if(process.stdout.isTTY)Zc=process.stdout.fd;else try{Zc=Yn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,E,I,v;Ek="";function x(C){return C===Yde?!0:wC.setRawMode(C)!==0?!1:(Yde=C,!0)}if(Kde||!wC||typeof Zc!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Yn.writeSync(Zc,t.display),t.display=""),!t.displayOnly){if(!x(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=Yn.readSync(Vf,p,0,h)}catch(C){if(C.code!=="EOF"){x(!1),e+=a();return}}if(E>0?(I=p.toString(t.encoding,0,E),Ek+=I):(I=`
2024-06-15 19:05:40 +02:00
`,Ek+=String.fromCharCode(0)),I&&typeof(v=(I.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(I=v,n=!0),I&&(I=I.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),I&&u&&(I=I.replace(u,"")),I&&(A||(t.hideEchoBack?t.mask&&Yn.writeSync(Zc,new Array(I.length+1).join(t.mask)):Yn.writeSync(Zc,I)),e+=I),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Yn.writeSync(Zc,`
`),x(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
2024-06-21 09:01:29 +02:00
`),t.encoding),t.displayOnly?"":hH=t.keepWhitespace||t.keyIn?e:e.trim()}function Vgt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function gH(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Ls(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(cH),t.unshift(cH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=Vgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function fH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function dH(t,e){var r=u0.normalize($d?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=u0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+gH(r)+"(?=\\/|\\\\|$)",$d?"i":""),"~")}function IC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,E,I){var v;return A||typeof(v=e(E))!="string"?p:v?(h||"")+v+(I||""):""}return t.replace(o,n).replace(a,n)}function Jde(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(E,I){return I.length>3?(E.push(I[0]+"..."+I[I.length-1]),p=!0):I.length&&(E=E.concat(I)),E}return o=t.reduce(function(E,I){return E.concat((I+"").split(""))},[]).reduce(function(E,I){var v,x;return e||(I=I.toLowerCase()),v=/^\d$/.test(I)?1:/^[A-Z]$/.test(I)?2:/^[a-z]$/.test(I)?3:0,r&&v===0?A+=I:(x=I.charCodeAt(0),v&&v===n&&x===u+1?a.push(I):(E=h(E,a),a=[I],n=v),u=x),E},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Vde(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function Xde(t,e){var r,o,a={},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":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=Jde(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Vde(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=hH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=u0.basename(r):t==="cwdHome"&&(r=dH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Zd[Zd.length-n]||"")}return r}function Zde(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode
2024-06-15 19:05:40 +02:00
`:"")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=IC(t.display+"",p);;){if(e=AH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Zd[0]||"",a[1]?r=!0:e=n,h(n+`
`),r||(t.displayOnly=!0,AH(t),t.displayOnly=!1)):e&&e!==Zd[Zd.length-1]&&(Zd=[e])),!r&&t.cd&&e)switch(u=pH(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(dH(u[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||fH(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=IC(t.limitMessage,p))}h((o?o+`
`:"")+IC(t.displaySrc+"",p))}return $de(e,t)}Wr._DBG_set_useExt=function(t){Kde=t};Wr._DBG_set_checkOptions=function(t){uH=t};Wr._DBG_set_checkMethod=function(t){D2=t};Wr._DBG_clearHistory=function(){hH="",Zd=[]};Wr.setDefaultOptions=function(t){return cH=Ls(!0,t),Ls(!0)};Wr.question=function(t,e){return eme(Ls(Ls(!0,e),{display:t}))};Wr.prompt=function(t){var e=Ls(!0,t);return e.display=e.prompt,eme(e)};Wr.keyIn=function(t,e){var r=Ls(Ls(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return IC(o+"",Zde)}),r.limit=gH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=IC(r.display+"",function(o){return Xde(o,r)}),$de(AH(r),r)};Wr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),Wr.question(t,Ls({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}))};Wr.questionNewPassword=function(t,e){var r,o,a,n=Ls({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
2024-06-21 09:01:29 +02:00
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?o+"..."+a:null}}),u,A,p,h,E,I,v;for(e=e||{},u=IC(e.charlist?e.charlist+"":"$<!-~>",Zde),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+gH(u)+"]{"+o+","+a+"}$"),r=Jde([u],n.caseSensitive,!0),r.text=Vde(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=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: "),E=n.limitMessage;!v;)n.limit=h,n.limitMessage=E,I=Wr.question(t,n),n.limit=[I,""],n.limitMessage=p,v=Wr.question(A,n);return I};function tme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Wr.question(t,Ls({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Wr.questionInt=function(t,e){return tme(t,e,function(r){return parseInt(r,10)})};Wr.questionFloat=function(t,e){return tme(t,e,parseFloat)};Wr.questionPath=function(t,e){var r,o="",a=Ls({hideEchoBack:!1,limitMessage:`$<error(
2024-06-15 19:05:40 +02:00
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=dH(n,!0),o="";function h(E){E.split(/\/|\\/).reduce(function(I,v){var x=u0.resolve(I+=v+u0.sep);if(!Yn.existsSync(x))Yn.mkdirSync(x);else if(!Yn.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return I},"")}try{if(u=Yn.existsSync(n),r=u?Yn.realpathSync(n):u0.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(u0.dirname(r)),Yn.closeSync(Yn.openSync(r,"w"))),r=Yn.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Yn.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(E){return o=E+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),Wr.question(t,a),r};function rme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=pH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=pH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Wr.promptCL=function(t,e){var r=Ls({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Wr.prompt(r),o.args};Wr.promptLoop=function(t,e){for(var r=Ls({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Wr.prompt(r)););};Wr.promptCLLoop=function(t,e){var r=Ls({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Wr.prompt(r),!o.hRes;);};Wr.promptSimShell=function(t){return Wr.prompt(Ls({hideEchoBack:!1,history:!0},t,{prompt:function(){return $d?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function nme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Wr.keyIn(t,Ls(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Wr.keyInYN=function(t,e){return nme(t,e)};Wr.keyInYNStrict=function(t,e){return nme(t,e,"yn")};Wr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Wr.keyIn(t,Ls({limit:null},e,{hideEchoBack:!0,mask:""}))};Wr.keyInSelect=function(t,e,r){var o=Ls({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=`
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(u);a+=E,n[E]=h,A+="["+E+"] "+(p+"").trim()+`
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
`),o.limit=a,A+=`
2024-06-21 09:01:29 +02:00
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[Wr.keyIn(A,o).toLowerCase()]};Wr.getRawInput=function(){return Ek};function S2(t,e){var r;return e.length&&(r={},r[t]=e[0]),Wr.setDefaultOptions(r)[t]}Wr.setPrint=function(){return S2("print",arguments)};Wr.setPrompt=function(){return S2("prompt",arguments)};Wr.setEncoding=function(){return S2("encoding",arguments)};Wr.setMask=function(){return S2("mask",arguments)};Wr.setBufferSize=function(){return S2("bufferSize",arguments)}});var mH=_((i7t,gl)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,S,y){var R=tau_file_system.files[w];if(!R){if(y==="read")return null;R={path:w,text:"",type:S,get:function(V,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+V)},put:function(V,X){return X==="end_of_file"?(this.text+=V,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+V+this.text.substring(X+V.length),!0)},get_byte:function(V){if(V==="end_of_stream")return-1;var X=Math.floor(V/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(V/2)],0);return V%2===0?$&255:$/256>>>0},put_byte:function(V,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var ie=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|V&255):(ie=ie&255,ie=(V&255)<<8|ie&255),this.text.length===$?this.text+=u(ie):this.text=this.text.substring(0,$)+u(ie)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var V=tau_file_system.files[this.path];return V?!0:null}},tau_file_system.files[w]=R}return y==="write"&&(R.text=""),R}},tau_user_input={buffer:"",get:function(w,S){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,S){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,S,y){var R=ve("fs"),V=R.openSync(w,y[0]);return y==="read"&&!R.existsSync(w)?null:{get:function(X,$){var ie=new Buffer(X);return R.readSync(V,ie,0,X,$),ie.toString()},put:function(X,$){var ie=Buffer.from(X);if($==="end_of_file")R.writeSync(V,ie);else{if($==="past_end_of_file")return null;R.writeSync(V,ie,0,ie.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return R.closeSync(V),!0}}}},nodejs_user_input={buffer:"",get:function(w,S){for(var y,R=ime();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=R.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,S){return process.stdout.write(w),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(w,S){return w.indexOf(S)}:e=function(w,S){for(var y=w.length,R=0;R<y;R++)if(S===w[R])return R;return-1};var r=function(w,S){if(w.length!==0){for(var y=w[0],R=w.length,V=1;V<R;V++)y=S(y,w[V]);return y}},o;Array.prototype.map?o=function(w,S){return w.map(S)}:o=function(w,S){for(var y=[],R=w.length,V=0;V<R;V++)y.push(S(w[V]));return y};var a;Array.prototype.filter?a=function(w,S){return w.filter(S)}:a=function(w,S){for(var y=[],R=w.length,V=0;V<R;V++)S(w[V])&&y.push(w[V]);return y};var n;String.prototype.codePointAt?n=function(w,S){return w.codePointAt(S)}:n=function(w,S){return w.charCodeAt(S)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function I(w){var S=[],y=!1;return w.replace(h,function(R,V,X,$,ie,be,Fe,at,dt,Gt,tr,bt,ln,kr,mr,br,Kr){switch(!0){case dt!==void 0:return S.push(parseInt(dt,16)
2024-06-15 19:05:40 +02:00
`,"\r"," ","\v"].indexOf(X)!==-1)switch(R+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
2024-06-21 09:01:29 +02:00
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=V}return y}function x(w){for(var S="",y=0;y<w.length;y++)switch(w.charAt(y)){case"'":S+="\\'";break;case"\\":S+="\\\\";break;case"\b":S+="\\b";break;case"\f":S+="\\f";break;case`
`:S+="\\n";break;case"\r":S+="\\r";break;case" ":S+="\\t";break;case"\v":S+="\\v";break;default:S+=w.charAt(y);break}return S}function C(w){var S=w.substr(2);switch(w.substr(0,2).toLowerCase()){case"0x":return parseInt(S,16);case"0b":return parseInt(S,2);case"0o":return parseInt(S,8);case"0'":return I(S)[0];default:return parseFloat(w)}}var F={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 N(w,S){return w.get_flag("char_conversion").id==="on"?S.replace(/./g,function(y){return w.get_char_conversion(y)}):S}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var S,y=0,R=0,V=0,X=[],$=!1;if(w){var ie=this.tokens[w-1];y=ie.len,S=N(this.thread,this.text.substr(ie.len)),R=ie.line,V=ie.start}else S=this.text;if(/^\s*$/.test(S))return null;for(;S!=="";){var be=[],Fe=!1;if(/^\n/.exec(S)!==null){R++,V=0,y++,S=S.replace(/\n/,""),$=!0;continue}for(var at in F)if(F.hasOwnProperty(at)){var dt=F[at].exec(S);dt&&be.push({value:dt[0],name:at,matches:dt})}if(!be.length)return this.set_last_tokens([{value:S,matches:[],name:"lexical",line:R,start:V}]);var ie=r(be,function(kr,mr){return kr.value.length>=mr.value.length?kr:mr});switch(ie.start=V,ie.line=R,S=S.replace(ie.value,""),V+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=C(ie.value),ie.blank=Fe;break;case"string":var Gt=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),Gt),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var tr=X[X.length-1];tr&&(tr.space=!0),Fe=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Fe=!1}var bt=this.set_last_tokens(X);return bt.length===0?null:bt};function J(w,S,y,R,V){if(!S[y])return{type:A,value:b.error.syntax(S[y-1],"expression expected",!0)};var X;if(R==="0"){var $=S[y];switch($.name){case"number":return{type:p,len:y+1,value:new b.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new b.type.Var($.value)};case"string":var ie;switch(w.get_flag("double_quotes").id){case"atom":ie=new H($.value,[]);break;case"codes":ie=new H("[]",[]);for(var be=$.value.length-1;be>=0;be--)ie=new H(".",[new b.type.Num(n($.value,be),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var be=$.value.length-1;be>=0;be--)ie=new H(".",[new b.type.Term($.value.charAt(be),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var bt=J(w,S,y+1,w.__get_max_priority(),!0);return bt.type!==p?bt:S[bt.len]&&S[bt.len].name==="r_paren"?(bt.len++,bt):{type:A,derived:!0,value:b.error.syntax(S[bt.len]?S[bt.len]:S[bt.len-1],") or operator expected",!S[bt.len])};case"l_bracket":var bt=J(w,S,y+1,w.__get_max_priority(),!0);return bt.type!==p?bt:S[bt.len]&&S[bt.len].name==="r_bracket"?(bt.len++,bt.value=new H("{}",[bt.value]),bt):{type:A,derived:!0,value:b.error.syntax(S[bt.len]?S[bt.len]:S[bt.len-1],"} or operator expected",!S[bt.len])}}var Fe=te(w,S,y,V);return Fe.type===p||Fe.derived||(Fe=ae(w,S,y),Fe.type===p||Fe.derived)?Fe:{type:A,derived:!1,value:
2024-06-15 19:05:40 +02:00
`;S+=`
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)S+=this.rules[key][y].toString(w),S+=`
2024-06-21 09:01:29 +02:00
`;return S},xe.prototype.clone=function(){return new xe(this.id)},Le.prototype.clone=function(){return new Le(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(w){return w.clone()}))},Te.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Re.prototype.clone=function(){var w={};for(var S in this.links)!this.links.hasOwnProperty(S)||(w[S]=this.links[S].clone());return new Re(w)},ke.prototype.clone=function(){return new ke(this.goal.clone(),this.substitution.clone(),this.parent)},Ye.prototype.clone=function(){return new Ye(this.head.clone(),this.body!==null?this.body.clone():null)},xe.prototype.equals=function(w){return b.type.is_variable(w)&&this.id===w.id},Le.prototype.equals=function(w){return b.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},H.prototype.equals=function(w){if(!b.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var S=0;S<this.args.length;S++)if(!this.args[S].equals(w.args[S]))return!1;return!0},Te.prototype.equals=function(w){return b.type.is_stream(w)&&this.id===w.id},Re.prototype.equals=function(w){var S;if(!b.type.is_substitution(w))return!1;for(S in this.links)if(!!this.links.hasOwnProperty(S)&&(!w.links[S]||!this.links[S].equals(w.links[S])))return!1;for(S in w.links)if(!!w.links.hasOwnProperty(S)&&!this.links[S])return!1;return!0},ke.prototype.equals=function(w){return b.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},Ye.prototype.equals=function(w){return b.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},xe.prototype.rename=function(w){return w.get_free_variable(this)},Le.prototype.rename=function(w){return this},H.prototype.rename=function(w){return new H(this.id,o(this.args,function(S){return S.rename(w)}))},Te.prototype.rename=function(w){return this},Ye.prototype.rename=function(w){return new Ye(this.head.rename(w),this.body!==null?this.body.rename(w):null)},xe.prototype.variables=function(){return[this.id]},Le.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(w){return w.variables()}))},Te.prototype.variables=function(){return[]},Ye.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},xe.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Le.prototype.apply=function(w){return this},H.prototype.apply=function(w){if(this.indicator==="./2"){for(var S=[],y=this;y.indicator==="./2";)S.push(y.args[0].apply(w)),y=y.args[1];for(var R=y.apply(w),V=S.length-1;V>=0;V--)R=new H(".",[S[V],R]);return R}return new H(this.id,o(this.args,function(X){return X.apply(w)}),this.ref)},Te.prototype.apply=function(w){return this},Ye.prototype.apply=function(w){return new Ye(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Re.prototype.apply=function(w){var S,y={};for(S in this.links)!this.links.hasOwnProperty(S)||(y[S]=this.links[S].apply(w));return new Re(y)},H.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},H.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new H(",",[w,this.args[1]]):w},H.prototype.search=function(w){if(b.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var S=0;S<this.args.length;S++)if(b.type.is_term(this.args[S])&&this.args[S].search(w))return!0;return!1},Se.prototype.get_current_input=function(){return this.current_input},et.prototype.get_current_input=function(){return this.session.get_current_input()},Se.prototype.get_current_output=function(){return this.current_output},et.prototype.get_current_output=function(){return this.session.get_current_output()},Se.prototype.set_current_input=function(w){this.current_input=w},et.prototype.set_current_input=function(w){return t
`,[])])])),S.substitution,S)])},"nl/1":function(w,S,y){var R=y.args[0];w.prepend([new ke(S.goal.replace(new H("put_char",[R,new H(`
`,[])])),S.substitution,S)])},"get_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new ke(S.goal.replace(new H(",",[new H("current_input",[new xe("S")]),new H("get_byte",[new xe("S"),R])])),S.substitution,S)])},"get_byte/2":function(w,S,y){var R=y.args[0],V=y.args[1],X=b.type.is_stream(R)?R:w.get_stream_by_alias(R.id);if(b.type.is_variable(R))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(V)&&!b.type.is_byte(V))w.throw_error(b.error.type("in_byte",char,y.indicator));else if(!b.type.is_stream(R)&&!b.type.is_atom(R))w.throw_error(b.error.domain("stream_or_alias",R,y.indicator));else if(!b.type.is_stream(X)||X.stream===null)w.throw_error(b.error.existence("stream",R,y.indicator));else if(X.output)w.throw_error(b.error.permission("input","stream",R,y.indicator));else if(X.type==="text")w.throw_error(b.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(b.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){w.throw_error(b.error.representation("byte",y.indicator));return}X.position++}w.prepend([new ke(S.goal.replace(new H("=",[new Le($,!1),V])),S.substitution,S)])}},"peek_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new ke(S.goal.replace(new H(",",[new H("current_input",[new xe("S")]),new H("peek_byte",[new xe("S"),R])])),S.substitution,S)])},"peek_byte/2":function(w,S,y){var R=y.args[0],V=y.args[1],X=b.type.is_stream(R)?R:w.get_stream_by_alias(R.id);if(b.type.is_variable(R))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(V)&&!b.type.is_byte(V))w.throw_error(b.error.type("in_byte",char,y.indicator));else if(!b.type.is_stream(R)&&!b.type.is_atom(R))w.throw_error(b.error.domain("stream_or_alias",R,y.indicator));else if(!b.type.is_stream(X)||X.stream===null)w.throw_error(b.error.existence("stream",R,y.indicator));else if(X.output)w.throw_error(b.error.permission("input","stream",R,y.indicator));else if(X.type==="text")w.throw_error(b.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(b.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){w.throw_error(b.error.representation("byte",y.indicator));return}w.prepend([new ke(S.goal.replace(new H("=",[new Le($,!1),V])),S.substitution,S)])}},"put_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new ke(S.goal.replace(new H(",",[new H("current_output",[new xe("S")]),new H("put_byte",[new xe("S"),R])])),S.substitution,S)])},"put_byte/2":function(w,S,y){var R=y.args[0],V=y.args[1],X=b.type.is_stream(R)?R:w.get_stream_by_alias(R.id);b.type.is_variable(R)||b.type.is_variable(V)?w.throw_error(b.error.instantiation(y.indicator)):b.type.is_byte(V)?!b.type.is_variable(R)&&!b.type.is_stream(R)&&!b.type.is_atom(R)?w.throw_error(b.error.domain("stream_or_alias",R,y.indicator)):!b.type.is_stream(X)||X.stream===null?w.throw_error(b.error.existence("stream",R,y.indicator)):X.input?w.throw_error(b.error.permission("output","stream",R,y.indicator)):X.type==="text"?w.throw_error(b.error.permission("output","text_stream",R,y.indicator)):X.stream.put_byte(V.value,X.position)&&(typeof X.position=="number"&&X.position++,w.success(S)):w.throw_error(b.error.type("byte",V,y.indicator))},"read/1":function(w,S,y){var R=y.args[0];w.prepend([new ke(S.goal.replace(new H(",",[new H("current_input",[new xe("S")]),new H("read_term",[new xe("S"),R,new H("[]",[])])])),S.substitution,S)])},"read/2":function(w,S,y){var R=y.args[0],V=y.args[1];w.prepend([new ke(S.goal.replace(new H("read_term",[R,V,new H("[]",[])])),S.substitution,S)])},"read_term/2":function(w,S,y){var R=y.args[0],V=y.args[1];w.prepend([new ke(S.goal.replace(new H(",",[new H("current_input",[new xe("S")]),new H("read_term",[new
2024-06-15 19:05:40 +02:00
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${f0(o)}).
`,e+=`workspace_ident(${f0(o)}, ${f0(j.stringifyIdent(r.anchoredLocator))}).
`,e+=`workspace_version(${f0(o)}, ${f0(r.manifest.version)}).
`;for(let a of ume)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${f0(o)}, ${f0(j.stringifyIdent(n))}, ${f0(n.range)}, ${a}).
`}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}
2024-06-21 09:01:29 +02:00
${this.getDeclarations()}`}createSession(){return new CH(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=v2([A,j.stringifyIdent(n)]),h=He.getMapWithDefault(o,a.cwd);He.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=v2(n),p=He.getMapWithDefault(o,a.cwd);He.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=z.resolve(this.project.cwd,em(o.links.WorkspaceCwd)),n=em(o.links.DependencyIdent),u=em(o.links.DependencyRange),A=em(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=j.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return He.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>j.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>j.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=z.resolve(this.project.cwd,em(o.links.WorkspaceCwd)),n=em(o.links.FieldPath),u=edt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return He.sortMap(r,[({workspace:o})=>j.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=em(u));yield a}}}});var Ime=_(Bk=>{"use strict";Object.defineProperty(Bk,"__esModule",{value:!0});function Y2(t){let e=[...t.caches],r=e.shift();return r===void 0?wme():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>Y2({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>Y2({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>Y2({caches:e}).delete(o))},clear(){return r.clear().catch(()=>Y2({caches:e}).clear())}}}function wme(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}Bk.createFallbackableCache=Y2;Bk.createNullCache=wme});var vme=_((TWt,Bme)=>{Bme.exports=Ime()});var Pme=_(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});function Edt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}TH.createInMemoryCache=Edt});var Sme=_((NWt,Dme)=>{Dme.exports=Pme()});var xme=_($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});function Cdt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===LH.WithinHeaders?o:{}},queryParameters(){return t===LH.WithinQueryParameters?o:{}}}}function wdt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function bme(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return bme(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function Idt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.
2024-06-15 19:05:40 +02:00
`;A!==o&&(o=A,t.write(oEe.default.eraseLines(r)+A),r=A.split(`
2024-06-21 09:01:29 +02:00
`).length)};return n.clear=()=>{t.write(oEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(aEe.default.show(),a=!1)},n};iB.default={create:Uyt}});var uEe=_((pKt,_yt)=>{_yt.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 pEe=_(dl=>{"use strict";var fEe=uEe(),hA=process.env;Object.defineProperty(dl,"_vendors",{value:fEe.map(function(t){return t.constant})});dl.name=null;dl.isPR=null;fEe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return AEe(o)});if(dl[t.constant]=r,r)switch(dl.name=t.name,typeof t.pr){case"string":dl.isPR=!!hA[t.pr];break;case"object":"env"in t.pr?dl.isPR=t.pr.env in hA&&hA[t.pr.env]!==t.pr.ne:"any"in t.pr?dl.isPR=t.pr.any.some(function(o){return!!hA[o]}):dl.isPR=AEe(t.pr);break;default:dl.isPR=null}});dl.isCI=!!(hA.CI||hA.CONTINUOUS_INTEGRATION||hA.BUILD_NUMBER||hA.RUN_ID||dl.name);function AEe(t){return typeof t=="string"?!!hA[t]:Object.keys(t).every(function(e){return hA[e]===t[e]})}});var gEe=_((gKt,hEe)=>{"use strict";hEe.exports=pEe().isCI});var mEe=_((dKt,dEe)=>{"use strict";var Hyt=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};dEe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Hyt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var vEe=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var MC,aB,qk,Gk,I6;typeof window>"u"||typeof MessageChannel!="function"?(OC=null,d6=null,m6=function(){if(OC!==null)try{var t=kn.unstable_now();OC(!0,t),OC=null}catch(e){throw setTimeout(m6,0),e}},yEe=Date.now(),kn.unstable_now=function(){return Date.now()-yEe},MC=function(t){OC!==null?setTimeout(MC,0,t):(OC=t,setTimeout(m6,0))},aB=function(t,e){d6=setTimeout(t,e)},qk=function(){clearTimeout(d6)},Gk=function(){return!1},I6=kn.unstable_forceFrameRate=function(){}):(Mk=window.perf
in `+(q||"Unknown")+fe}P+=T,D=D.return}while(D);return P}var El=[],oo=-1;function zn(D){0>oo||(D.current=El[oo],El[oo]=null,oo--)}function On(D,P){oo++,El[oo]=D.current,D.current=P}var Li={},Mn={current:Li},_i={current:!1},ir=Li;function Oe(D,P){var T=D.type.contextTypes;if(!T)return Li;var q=D.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===P)return q.__reactInternalMemoizedMaskedChildContext;var W={},fe;for(fe in T)W[fe]=P[fe];return q&&(D=D.stateNode,D.__reactInternalMemoizedUnmaskedChildContext=P,D.__reactInternalMemoizedMaskedChildContext=W),W}function ii(D){return D=D.childContextTypes,D!=null}function Ua(D){zn(_i,D),zn(Mn,D)}function hr(D){zn(_i,D),zn(Mn,D)}function Ac(D,P,T){if(Mn.current!==Li)throw Error(n(168));On(Mn,P,D),On(_i,T,D)}function Au(D,P,T){var q=D.stateNode;if(D=P.childContextTypes,typeof q.getChildContext!="function")return T;q=q.getChildContext();for(var W in q)if(!(W in D))throw Error(n(108,de(P)||"Unknown",W));return r({},T,{},q)}function fc(D){var P=D.stateNode;return P=P&&P.__reactInternalMemoizedMergedChildContext||Li,ir=Mn.current,On(Mn,P,D),On(_i,_i.current,D),!0}function Cl(D,P,T){var q=D.stateNode;if(!q)throw Error(n(169));T?(P=Au(D,P,ir),q.__reactInternalMemoizedMergedChildContext=P,zn(_i,D),zn(Mn,D),On(Mn,P,D)):zn(_i,D),On(_i,T,D)}var PA=a.unstable_runWithPriority,fu=a.unstable_scheduleCallback,Ie=a.unstable_cancelCallback,Tt=a.unstable_shouldYield,pc=a.unstable_requestPaint,Hi=a.unstable_now,pu=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,wl=a.unstable_UserBlockingPriority,DA=a.unstable_NormalPriority,Ap=a.unstable_LowPriority,hc=a.unstable_IdlePriority,SA={},Qn=pc!==void 0?pc:function(){},hi=null,gc=null,bA=!1,sa=Hi(),Ni=1e4>sa?Hi:function(){return Hi()-sa};function Uo(){switch(pu()){case Yt:return 99;case wl:return 98;case DA:return 97;case Ap:return 96;case hc:return 95;default:throw Error(n(332))}}function Xe(D){switch(D){case 99:return Yt;case 98:return wl;case 97:return DA;case 96:return Ap;case 95:return hc;default:throw Error(n(332))}}function ao(D,P){return D=Xe(D),PA(D,P)}function dc(D,P,T){return D=Xe(D),fu(D,P,T)}function hu(D){return hi===null?(hi=[D],gc=fu(Yt,gu)):hi.push(D),SA}function qi(){if(gc!==null){var D=gc;gc=null,Ie(D)}gu()}function gu(){if(!bA&&hi!==null){bA=!0;var D=0;try{var P=hi;ao(99,function(){for(;D<P.length;D++){var T=P[D];do T=T(!0);while(T!==null)}}),hi=null}catch(T){throw hi!==null&&(hi=hi.slice(D+1)),fu(Yt,qi),T}finally{bA=!1}}}var xA=3;function Ha(D,P,T){return T/=10,1073741821-(((1073741821-D+P/10)/T|0)+1)*T}function mc(D,P){return D===P&&(D!==0||1/D===1/P)||D!==D&&P!==P}var ds=typeof Object.is=="function"?Object.is:mc,Ht=Object.prototype.hasOwnProperty;function Rn(D,P){if(ds(D,P))return!0;if(typeof D!="object"||D===null||typeof P!="object"||P===null)return!1;var T=Object.keys(D),q=Object.keys(P);if(T.length!==q.length)return!1;for(q=0;q<T.length;q++)if(!Ht.call(P,T[q])||!ds(D[T[q]],P[T[q]]))return!1;return!0}function Ci(D,P){if(D&&D.defaultProps){P=r({},P),D=D.defaultProps;for(var T in D)P[T]===void 0&&(P[T]=D[T])}return P}var oa={current:null},lo=null,Hs=null,aa=null;function la(){aa=Hs=lo=null}function _o(D,P){var T=D.type._context;b?(On(oa,T._currentValue,D),T._currentValue=P):(On(oa,T._currentValue2,D),T._currentValue2=P)}function wi(D){var P=oa.current;zn(oa,D),D=D.type._context,b?D._currentValue=P:D._currentValue2=P}function ms(D,P){for(;D!==null;){var T=D.alternate;if(D.childExpirationTime<P)D.childExpirationTime=P,T!==null&&T.childExpirationTime<P&&(T.childExpirationTime=P);else if(T!==null&&T.childExpirationTime<P)T.childExpirationTime=P;else break;D=D.return}}function ys(D,P){lo=D,aa=Hs=null,D=D.dependencies,D!==null&&D.firstContext!==null&&(D.expirationTime>=P&&(qo=!0),D.firstContext=null)}function Es(D,P){if(aa!==D&&P!==!1&&P!==0)if((typeof P!="number"||P===1073741823)&&(aa=D,P=1073741823),P={context:D,observedBits:P,next:null},Hs===null){if(lo===null)throw Error(n(308));Hs=P,lo.dependencies={expirationTime:0,firstContext:P,responders:null}}else Hs=Hs.next=P;return b?D._currentValue:D._currentV
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+yl(W))}Yi!==Sc&&(Yi=Bi),fe=Cg(fe,W),wt=q;do{switch(wt.tag){case 3:Pe=fe,wt.effectTag|=4096,wt.expirationTime=P;var ze=Yv(wt,Pe,P);It(wt,ze);break e;case 1:Pe=fe;var At=wt.type,Wt=wt.stateNode;if((wt.effectTag&64)===0&&(typeof At.getDerivedStateFromError=="function"||Wt!==null&&typeof Wt.componentDidCatch=="function"&&(Du===null||!Du.has(Wt)))){wt.effectTag|=4096,wt.expirationTime=P;var vr=Wv(wt,Pe,P);It(wt,vr);break e}}wt=wt.return}while(wt!==null)}Or=Xv(Or)}catch(Sn){P=Sn;continue}break}while(1)}function jA(){var D=wp.current;return wp.current=Iu,D===null?Iu:D}function Pw(D,P){D<Wa&&2<D&&(Wa=D),P!==null&&D<MA&&2<D&&(MA=D,Nm=P)}function _m(D){D>Ip&&(Ip=D)}function pR(){for(;Or!==null;)Or=Vv(Or)}function hR(){for(;Or!==null&&!Tt();)Or=Vv(Or)}function Vv(D){var P=$v(D.alternate,D,is);return D.memoizedProps=D.pendingProps,P===null&&(P=Xv(D)),Cw.current=null,P}function Xv(D){Or=D;do{var P=Or.alternate;if(D=Or.return,(Or.effectTag&2048)===0){e:{var T=P;P=Or;var q=is,W=P.pendingProps;switch(P.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:ii(P.type)&&Ua(P);break;case 3:Ec(P),hr(P),W=P.stateNode,W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(T===null||T.child===null)&&Ga(P)&&pa(P),vl(P);break;case 5:lg(P);var fe=ca(yc.current);if(q=P.type,T!==null&&P.stateNode!=null)rs(T,P,q,W,fe),T.ref!==P.ref&&(P.effectTag|=128);else if(W){if(T=ca(co.current),Ga(P)){if(W=P,!y)throw Error(n(175));T=cp(W.stateNode,W.type,W.memoizedProps,fe,T,W),W.updateQueue=T,T=T!==null,T&&pa(P)}else{var Pe=ht(q,W,fe,T,P);Pc(Pe,P,!1,!1),P.stateNode=Pe,rt(Pe,q,W,fe,T)&&pa(P)}P.ref!==null&&(P.effectTag|=128)}else if(P.stateNode===null)throw Error(n(166));break;case 6:if(T&&P.stateNode!=null)Yr(T,P,T.memoizedProps,W);else{if(typeof W!="string"&&P.stateNode===null)throw Error(n(166));if(T=ca(yc.current),fe=ca(co.current),Ga(P)){if(T=P,!y)throw Error(n(176));(T=up(T.stateNode,T.memoizedProps,T))&&pa(P)}else P.stateNode=Ye(W,T,fe,P)}break;case 11:break;case 13:if(zn(ei,P),W=P.memoizedState,(P.effectTag&64)!==0){P.expirationTime=q;break e}W=W!==null,fe=!1,T===null?P.memoizedProps.fallback!==void 0&&Ga(P):(q=T.memoizedState,fe=q!==null,W||q===null||(q=T.child.sibling,q!==null&&(Pe=P.firstEffect,Pe!==null?(P.firstEffect=q,q.nextEffect=Pe):(P.firstEffect=P.lastEffect=q,q.nextEffect=null),q.effectTag=8))),W&&!fe&&(P.mode&2)!==0&&(T===null&&P.memoizedProps.unstable_avoidThisFallback!==!0||(ei.current&1)!==0?Yi===vu&&(Yi=ha):((Yi===vu||Yi===ha)&&(Yi=Pl),Ip!==0&&gi!==null&&(KA(gi,is),tP(gi,Ip)))),S&&W&&(P.effectTag|=4),w&&(W||fe)&&(P.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Ec(P),vl(P);break;case 10:wi(P);break;case 9:break;case 14:break;case 17:ii(P.type)&&Ua(P);break;case 19:if(zn(ei,P),W=P.memoizedState,W===null)break;if(fe=(P.effectTag&64)!==0,Pe=W.rendering,Pe===null){if(fe)Dc(W,!1);else if(Yi!==vu||T!==null&&(T.effectTag&64)!==0)for(T=P.child;T!==null;){if(Pe=pp(T),Pe!==null){for(P.effectTag|=64,Dc(W,!1),T=Pe.updateQueue,T!==null&&(P.updateQueue=T,P.effectTag|=4),W.lastEffect===null&&(P.firstEffect=null),P.lastEffect=W.lastEffect,T=q,W=P.child;W!==null;)fe=W,q=T,fe.effectTag&=2,fe.nextEffect=null,fe.firstEffect=null,fe.lastEffect=null,Pe=fe.alternate,Pe===null?(fe.childExpirationTime=0,fe.expirationTime=q,fe.child=null,fe.memoizedProps=null,fe.memoizedState=null,fe.updateQueue=null,fe.dependencies=null):(fe.childExpirationTime=Pe.childExpirationTime,fe.expirationTime=Pe.expirationTime,fe.child=Pe.child,fe.memoizedProps=Pe.memoizedProps,fe.memoizedState=Pe.memoizedState,fe.updateQueue=Pe.updateQueue,q=Pe.dependencies,fe.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),W=W.sibling;On(ei,ei.current&1|2,P),P=P.child;break e}T=T.sibling}}else{if(!fe)if(T=pp(Pe),T!==null){if(P.effectTag|=64,fe=!0,T=T.updateQueue,T!==null&&(P.updateQueue=T,P.effectTag|=4),Dc(W,!0),W.tail===null&&W.tailMode==="hidden"&&!Pe.alternate){P=P.lastEffect=W.
`+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 o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}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 o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function
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(o){r=o(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 am=_((vKt,NEe)=>{"use strict";var Kyt=TEe(),zyt=LEe(),x6=!1,k6=null;zyt({},function(t,e){if(!x6){if(x6=!0,t)throw t;k6=e}});if(!x6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");NEe.exports=Kyt(k6.bind,k6.lib)});var R6=_((PKt,Q6)=>{"use strict";var OEe=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);Q6.exports=OEe;Q6.exports.default=OEe});var UEe=_((DKt,MEe)=>{"use strict";MEe.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
2024-06-15 19:05:40 +02:00
`))e=Math.max(e,Zyt(r));return e};T6.exports=HEe;T6.exports.default=HEe});var qEe=_(uB=>{"use strict";var $yt=uB&&uB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uB,"__esModule",{value:!0});var eEt=$yt(L6()),N6={};uB.default=t=>{if(t.length===0)return{width:0,height:0};if(N6[t])return N6[t];let e=eEt.default(t),r=t.split(`
`).length;return N6[t]={width:e,height:r},{width:e,height:r}}});var GEe=_(AB=>{"use strict";var tEt=AB&&AB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AB,"__esModule",{value:!0});var dn=tEt(am()),rEt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?dn.default.POSITION_TYPE_ABSOLUTE:dn.default.POSITION_TYPE_RELATIVE)},nEt=(t,e)=>{"marginLeft"in e&&t.setMargin(dn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(dn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(dn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(dn.default.EDGE_BOTTOM,e.marginBottom||0)},iEt=(t,e)=>{"paddingLeft"in e&&t.setPadding(dn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(dn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(dn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(dn.default.EDGE_BOTTOM,e.paddingBottom||0)},sEt=(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(dn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(dn.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(dn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(dn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(dn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(dn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(dn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(dn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(dn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(dn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(dn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_AROUND))},oEt=(t,e)=>{var r,o;"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((o=e.minHeight)!==null&&o!==void 0?o:0))},aEt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?dn.default.DISPLAY_FLEX:dn.default.DISPLAY_NONE)},lEt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(dn.default.EDGE_TOP,r),t.setBorder(dn.default.EDGE_BOTTOM,r),t.setBorder(dn.default.EDGE_LEFT,r),t.setBorder(dn.default.EDGE_RIGHT,r)}};AB.default=(t,e={})=>{rEt(t,e),nEt(t,e),iEt(t,e),sEt(t,e),oEt(t,e),aEt(t,e),lEt(t,e)}});var WEe=_((QKt,YEe)=>{"use strict";var fB=zk(),cEt=OD(),uEt=BI(),M6=new Set(["\x1B","\x9B"]),AEt=39,jEe=t=>`${M6.values().next().value}[${t}m`,fEt=t=>t.split(" ").map(e=>fB(e)),O6=(t,e,r)=>{let o=[...e],a=!1,n=fB(cEt(t[t.length-1]));for(let[u,A]of o.entries()){let p=fB(A)
`);for(let[p,h]of[...o].entries()){if(a+=h,M6.has(h)){let I=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=I===AEt?null:I}let E=uEt.codes.get(Number(n));n&&E&&(o[p+1]===`
`?a+=jEe(E):h===`
`&&(a+=jEe(n)))}return a};YEe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
`).split(`
`).map(o=>hEt(o,e,r)).join(`
2024-06-21 09:01:29 +02:00
`)});var JEe=_((RKt,zEe)=>{"use strict";var KEe="[\uD800-\uDBFF][\uDC00-\uDFFF]",gEt=t=>t&&t.exact?new RegExp(`^${KEe}$`):new RegExp(KEe,"g");zEe.exports=gEt});var U6=_((FKt,$Ee)=>{"use strict";var dEt=R6(),mEt=JEe(),VEe=BI(),ZEe=["\x1B","\x9B"],Jk=t=>`${ZEe[0]}[${t}m`,XEe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=VEe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(Jk(e?u:n))}else if(e){o.push(Jk(0));break}else o.push(Jk(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=Jk(VEe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};$Ee.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,E]of o.entries()){let I=!1;if(ZEe.includes(E)){let v=/\d[^m]*/.exec(t.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&E==="m"&&(n=!1,I=!0);if(!n&&!I&&++A,!mEt({exact:!0}).test(E)&&dEt(E.codePointAt())&&++A,A>e&&A<=r)p+=E;else if(A===e&&!n&&u!==void 0)p=XEe(a);else if(A>=r){p+=XEe(a,!0,u);break}}return p}});var tCe=_((TKt,eCe)=>{"use strict";var C0=U6(),yEt=zk();function Vk(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}eCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=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 u;let p=yEt(t);if(p<=e)return t;if(o==="start"){if(n){let h=Vk(t,p-e+1,!0);return u+C0(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+C0(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let E=Vk(t,h),I=Vk(t,p-(e-h)+1,!0);return C0(t,0,E)+u+C0(t,I,p).trim()}return C0(t,0,h)+u+C0(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=Vk(t,e-1);return C0(t,0,h)+u}return a===!0&&(u=" "+u,A=2),C0(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var H6=_(pB=>{"use strict";var rCe=pB&&pB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pB,"__esModule",{value:!0});var EEt=rCe(WEe()),CEt=rCe(tCe()),_6={};pB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(_6[o])return _6[o];let a=t;if(r==="wrap"&&(a=EEt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=CEt.default(t,e,{position:n})}return _6[o]=a,a}});var G6=_(q6=>{"use strict";Object.defineProperty(q6,"__esModule",{value:!0});var nCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=nCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};q6.default=nCe});var j6=_(pi=>{"use strict";var hB=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 wEt=hB(am()),iCe=hB(qEe()),IEt=hB(GEe()),BEt=hB(H6()),vEt=hB(G6());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:wEt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(PEt.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")&&Xk(t)};pi.insertBefo
2024-06-15 19:05:40 +02:00
`:`
`)+r,a=o+1,o=t.indexOf(`
`,a)}while(o!==-1);return n+=t.substr(a),n};mCe.exports={stringReplaceAll:xEt,stringEncaseCRLFWithFirstIndex:kEt}});var BCe=_((jKt,ICe)=>{"use strict";var QEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ECe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,REt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,FEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,TEt=new Map([["n",`
2024-06-21 09:01:29 +02:00
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function wCe(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)):TEt.get(t)||t}function LEt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(REt))r.push(a[2].replace(FEt,(A,p,h)=>p?wCe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function NEt(t){ECe.lastIndex=0;let e=[],r;for(;(r=ECe.exec(t))!==null;){let o=r[1];if(r[2]){let a=LEt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function CCe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}ICe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(QEt,(n,u,A,p,h,E)=>{if(u)a.push(wCe(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:CCe(t,r)(I)),r.push({inverse:A,styles:NEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(CCe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var nQ=_((YKt,xCe)=>{"use strict";var mB=BI(),{stdout:K6,stderr:z6}=mL(),{stringReplaceAll:OEt,stringEncaseCRLFWithFirstIndex:MEt}=yCe(),{isArray:$k}=Array,PCe=["ansi","ansi","ansi256","ansi16m"],UC=Object.create(null),UEt=(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=K6?K6.level:0;t.level=e.level===void 0?r:e.level},J6=class{constructor(e){return DCe(e)}},DCe=t=>{let e={};return UEt(e,t),e.template=(...r)=>bCe(e.template,...r),Object.setPrototypeOf(e,eQ.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=J6,e.template};function eQ(t){return DCe(t)}for(let[t,e]of Object.entries(mB))UC[t]={get(){let r=tQ(this,V6(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};UC.visible={get(){let t=tQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var SCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of SCe)UC[t]={get(){let{level:e}=this;return function(...r){let o=V6(mB.color[PCe[e]][t](...r),mB.color.close,this._styler);return tQ(this,o,this._isEmpty)}}};for(let t of SCe){let e="bg"+t[0].toUpperCase()+t.slice(1);UC[e]={get(){let{level:r}=this;return function(...o){let a=V6(mB.bgColor[PCe[r]][t](...o),mB.bgColor.close,this._styler);return tQ(this,a,this._isEmpty)}}}}var _Et=Object.defineProperties(()=>{},{...UC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),V6=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},tQ=(t,e,r)=>{let o=(...a)=>$k(a[0])&&$k(a[0].raw)?vCe(o,bCe(o,...a)):vCe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,_Et),o._generator=t,o._styler=e,o._isEmpty=r,o},vCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=OEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
2024-06-15 19:05:40 +02:00
`);return n!==-1&&(e=MEt(e,a,o,n)),o+e+a},W6,bCe=(t,...e)=>{let[r]=e;if(!$k(r)||!$k(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return W6===void 0&&(W6=BCe()),W6(t,a.join(""))};Object.defineProperties(eQ.prototype,UC);var rQ=eQ();rQ.supportsColor=K6;rQ.stderr=eQ({level:z6?z6.level:0});rQ.stderr.supportsColor=z6;xCe.exports=rQ});var X6=_(EB=>{"use strict";var HEt=EB&&EB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EB,"__esModule",{value:!0});var yB=HEt(nQ()),qEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,GEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,iQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);EB.default=(t,e,r)=>{if(!e)return t;if(e in yB.default){let a=iQ(e,r);return yB.default[a](t)}if(e.startsWith("#")){let a=iQ("hex",r);return yB.default[a](e)(t)}if(e.startsWith("ansi")){let a=GEt.exec(e);if(!a)return t;let n=iQ(a[1],r),u=Number(a[2]);return yB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=qEt.exec(e);if(!a)return t;let n=iQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return yB.default[n](u,A,p)(t)}return t}});var QCe=_(CB=>{"use strict";var kCe=CB&&CB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CB,"__esModule",{value:!0});var jEt=kCe(dCe()),Z6=kCe(X6());CB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=jEt.default[r.style.borderStyle],p=Z6.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Z6.default(A.vertical,u,"foreground")+`
2024-06-21 09:01:29 +02:00
`).repeat(n-2),E=Z6.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,E,{transformers:[]})}}});var FCe=_(wB=>{"use strict";var lm=wB&&wB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wB,"__esModule",{value:!0});var YEt=lm(am()),WEt=lm(L6()),KEt=lm(fCe()),zEt=lm(H6()),JEt=lm(pCe()),VEt=lm(G6()),XEt=lm(QCe()),ZEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
`.repeat(n)+KEt.default(e,a)}return e},RCe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===YEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),I=u;if(typeof t.internal_transform=="function"&&(I=[t.internal_transform,...u]),t.nodeName==="ink-text"){let v=VEt.default(t);if(v.length>0){let x=WEt.default(v),C=JEt.default(p);if(x>C){let F=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";v=zEt.default(v,C,F)}v=ZEt(t,v),e.write(h,E,v,{transformers:I})}return}if(t.nodeName==="ink-box"&&XEt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let v of t.childNodes)RCe(v,e,{offsetX:h,offsetY:E,transformers:I,skipStaticElements:A})}};wB.default=RCe});var LCe=_((JKt,TCe)=>{"use strict";TCe.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 OCe=_((VKt,$6)=>{"use strict";var $Et=LCe(),NCe=t=>typeof t=="string"?t.replace($Et(),""):t;$6.exports=NCe;$6.exports.default=NCe});var _Ce=_((XKt,UCe)=>{"use strict";var MCe="[\uD800-\uDBFF][\uDC00-\uDFFF]";UCe.exports=t=>t&&t.exact?new RegExp(`^${MCe}$`):new RegExp(MCe,"g")});var qCe=_((ZKt,eq)=>{"use strict";var eCt=OCe(),tCt=_Ce(),HCe=t=>eCt(t).replace(tCt()," ").length;eq.exports=HCe;eq.exports.default=HCe});var YCe=_(IB=>{"use strict";var jCe=IB&&IB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(IB,"__esModule",{value:!0});var GCe=jCe(U6()),rCt=jCe(qCe()),tq=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
2024-06-15 19:05:40 +02:00
`),h=0;for(let E of p){let I=e[n+h];if(!I)continue;let v=rCt.default(E);for(let x of A)E=x(E);e[n+h]=GCe.default(I,0,a)+E+GCe.default(I,a+v),h++}}return{output:e.map(o=>o.trimRight()).join(`
`),height:e.length}}};IB.default=tq});var zCe=_(BB=>{"use strict";var rq=BB&&BB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BB,"__esModule",{value:!0});var nCt=rq(am()),WCe=rq(FCe()),KCe=rq(YCe());BB.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,nCt.default.DIRECTION_LTR);let o=new KCe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});WCe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new KCe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),WCe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
2024-06-21 09:01:29 +02:00
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var ZCe=_((tzt,XCe)=>{"use strict";var JCe=ve("stream"),VCe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],nq={},iCt=t=>{let e=new JCe.PassThrough,r=new JCe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of VCe)nq[a]=console[a],console[a]=o[a];return()=>{for(let a of VCe)console[a]=nq[a];nq={}}};XCe.exports=iCt});var sq=_(iq=>{"use strict";Object.defineProperty(iq,"__esModule",{value:!0});iq.default=new WeakMap});var aq=_(oq=>{"use strict";Object.defineProperty(oq,"__esModule",{value:!0});var sCt=an(),$Ce=sCt.createContext({exit:()=>{}});$Ce.displayName="InternalAppContext";oq.default=$Ce});var cq=_(lq=>{"use strict";Object.defineProperty(lq,"__esModule",{value:!0});var oCt=an(),ewe=oCt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});ewe.displayName="InternalStdinContext";lq.default=ewe});var Aq=_(uq=>{"use strict";Object.defineProperty(uq,"__esModule",{value:!0});var aCt=an(),twe=aCt.createContext({stdout:void 0,write:()=>{}});twe.displayName="InternalStdoutContext";uq.default=twe});var pq=_(fq=>{"use strict";Object.defineProperty(fq,"__esModule",{value:!0});var lCt=an(),rwe=lCt.createContext({stderr:void 0,write:()=>{}});rwe.displayName="InternalStderrContext";fq.default=rwe});var sQ=_(hq=>{"use strict";Object.defineProperty(hq,"__esModule",{value:!0});var cCt=an(),nwe=cCt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});nwe.displayName="InternalFocusContext";hq.default=nwe});var swe=_((lzt,iwe)=>{"use strict";var uCt=/[|\\{}()[\]^$+*?.-]/g;iwe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(uCt,"\\$&")}});var cwe=_((czt,lwe)=>{"use strict";var ACt=swe(),fCt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",awe=[].concat(ve("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));awe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var vB=class{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=vB.nodeInternals()),"cwd"in e||(e.cwd=fCt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,pCt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...awe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
2024-06-15 19:05:40 +02:00
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
2024-06-21 09:01:29 +02:00
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};owe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(hCt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],I=r[9],v=r[10]==="native",x=r[11]===")",C,F={};if(E&&(F.line=Number(E)),I&&(F.column=Number(I)),x&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let J=h.slice(0,U-1);h=h.slice(U+1),a+=` (${J}`;break}}if(a){let N=a.match(gCt);N&&(a=N[1],C=N[2])}return owe(F,h,this._cwd),o&&(F.constructor=!0),n&&(F.evalOrigin=n,F.evalLine=A,F.evalColumn=p,F.evalFile=u&&u.replace(/\\/g,"/")),v&&(F.native=!0),a&&(F.function=a),C&&a!==C&&(F.method=C),F}};function owe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function pCt(t){if(t.length===0)return[];let e=t.map(r=>ACt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var hCt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),gCt=/^(.*?) \[as (.*?)\]$/;lwe.exports=vB});var Awe=_((uzt,uwe)=>{"use strict";uwe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var pwe=_((Azt,fwe)=>{"use strict";var dCt=Awe(),mCt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};fwe.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=dCt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},mCt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var oQ=_(nu=>{"use strict";var yCt=nu&&nu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),ECt=nu&&nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CCt=nu&&nu.__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)&&yCt(e,t,r);return ECt(e,t),e},wCt=nu&&nu.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(nu,"__esModule",{value:!0});var hwe=CCt(an()),gq=hwe.forwardRef((t,e)=>{var{children:r}=t,o=wCt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||
2024-06-15 19:05:40 +02:00
`).slice(1):void 0,r=e?ywe.parseLine(e[0]):void 0,o,a=0;if(r?.file&&r?.line&&dwe.existsSync(r.file)){let n=dwe.readFileSync(r.file,"utf8");if(o=DCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return hs.default.createElement(Zf.default,{flexDirection:"column",padding:1},hs.default.createElement(Zf.default,null,hs.default.createElement(gA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),hs.default.createElement(gA.default,null," ",t.message)),r&&hs.default.createElement(Zf.default,{marginTop:1},hs.default.createElement(gA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&hs.default.createElement(Zf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>hs.default.createElement(Zf.default,{key:n},hs.default.createElement(Zf.default,{width:a+1},hs.default.createElement(gA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),hs.default.createElement(gA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&hs.default.createElement(Zf.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
`).slice(1).map(n=>{let u=ywe.parseLine(n);return u?hs.default.createElement(Zf.default,{key:n},hs.default.createElement(gA.default,{dimColor:!0},"- "),hs.default.createElement(gA.default,{dimColor:!0,bold:!0},u.function),hs.default.createElement(gA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):hs.default.createElement(Zf.default,{key:n},hs.default.createElement(gA.default,{dimColor:!0},"- "),hs.default.createElement(gA.default,{dimColor:!0,bold:!0},n))})))};iu.default=SCt});var wwe=_(su=>{"use strict";var bCt=su&&su.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),xCt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),kCt=su&&su.__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)&&bCt(e,t,r);return xCt(e,t),e},um=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});var cm=kCt(an()),Cwe=um(g6()),QCt=um(aq()),RCt=um(cq()),FCt=um(Aq()),TCt=um(pq()),LCt=um(sQ()),NCt=um(Ewe()),OCt=" ",MCt="\x1B[Z",UCt="\x1B",aQ=class extends cm.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.
2024-06-21 09:01:29 +02:00
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===UCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===OCt&&this.focusNext(),e===MCt&&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(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r+1;o<e.focusables.length;o++)if(e.focusables[o].isActive)return e.focusables[o].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r-1;o>=0;o--)if(e.focusables[o].isActive)return e.focusables[o].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return cm.default.createElement(QCt.default.Provider,{value:{exit:this.handleExit}},cm.default.createElement(RCt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},cm.default.createElement(FCt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},cm.default.createElement(TCt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},cm.default.createElement(LCt.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?cm.default.createElement(NCt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){Cwe.default.hide(this.props.stdout)}componentWillUnmount(){Cwe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};su.default=aQ;aQ.displayName="InternalApp"});var vwe=_(ou=>{"use strict";var _Ct=ou&&ou.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),HCt=ou&&ou.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qCt=ou&&ou.__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)&&_Ct(e,t,r);return HCt(e,t),e},au=ou&&ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ou,"__esModule",{value:!0});var GCt=au(an()),Iwe=lM(),jCt=au(cEe()),YCt=au(u6()),WCt=au(gEe(
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(HC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(YCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},KCt.default(this),this.options=e,this.rootNode=XCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:Iwe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=jCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:Iwe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=Eq.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=JCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),HC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=GCt.default.createElement($Ct.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);Eq.default.updateContainer(r,this.container,null,Bwe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(HC){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(HC){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(),HC?this.options.stdout.write(this.lastOutput+`
`):this.options.debug||this.log.done(),this.isUnmounted=!0,Eq.default.updateContainer(null,this.container,null,Bwe),ZCt.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(){!HC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=VCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};ou.default=Cq});var Dwe=_(SB=>{"use strict";var Pwe=SB&&SB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(SB,"__esModule",{value:!0});var ewt=Pwe(vwe()),lQ=Pwe(sq()),twt=ve("stream"),rwt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},nwt(e)),o=iwt(r.stdout,()=>new ewt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>lQ.default.delete(r.stdout),clear:o.clear}};SB.default=rwt;var nwt=(t={})=>t instanceof twt.Stream?{stdout:t,stdin:process.stdin}:t,iwt=(t,e)=>{let r;return lQ.default.has(t)?r=lQ.default.get(t):(r=e(),lQ.default.set(t,r)),r}});var bwe=_($f=>{"use strict";var swt=$f&&$f.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),owt=$f&&$f.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),awt=$f&&$f.__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)&&swt(e,t,r);return owt(e,t),e};Object.defineProperty($f,"__esModule",{value:!0});var bB=awt(an()),Swe=t=>{let{items:e,children:r,style:o}=t,[a,n]=bB.useState(0),u=bB.useMemo(()=>e.slice(a),[e,a]);bB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,E)=>r(h,a+E)),p=bB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return bB.default.createElement("ink-box",{internal_static:!0,style:p},A)};Swe.displayName="Static";$f.default=Swe});var kwe=_(xB=>{"use strict";var lwt=xB&&xB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xB,"__esModule",{value:!0});var cwt=lwt(an()),xwe=({children:t,transform:e})=>t==null?null:cwt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);xwe.displayName="Transform";xB.default=xwe});var Rwe=_(kB=>{"use strict";var uwt=kB&&kB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kB,"__esModule",{value:!0});var Awt=uwt(an()),Qwe=({count:t=1})=>Awt.default.createElement("ink-text",null,`
`.repeat(t));Qwe.displayName="Newline";kB.default=Qwe});var Lwe=_(QB=>{"use strict";var Fwe=QB&&QB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(QB,"__esModule",{value:!0});var fwt=Fwe(an()),pwt=Fwe(oQ()),Twe=()=>fwt.default.createElement(pwt.default,{flexGrow:1});Twe.displayName="Spacer";QB.default=Twe});var cQ=_(RB=>{"use strict";var hwt=RB&&RB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RB,"__esModule",{value:!0});var gwt=an(),dwt=hwt(cq()),mwt=()=>gwt.useContext(dwt.default);RB.default=mwt});var Owe=_(FB=>{"use strict";var ywt=FB&&FB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FB,"__esModule",{value:!0});var Nwe=an(),Ewt=ywt(cQ()),Cwt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=Ewt.default();Nwe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),Nwe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",E=A>="\u0410"&&A<="\u042F";A.length===1&&(h||E)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};FB.default=Cwt});var Mwe=_(TB=>{"use strict";var wwt=TB&&TB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TB,"__esModule",{value:!0});var Iwt=an(),Bwt=wwt(aq()),vwt=()=>Iwt.useContext(Bwt.default);TB.default=vwt});var Uwe=_(LB=>{"use strict";var Pwt=LB&&LB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(LB,"__esModule",{value:!0});var Dwt=an(),Swt=Pwt(Aq()),bwt=()=>Dwt.useContext(Swt.default);LB.default=bwt});var _we=_(NB=>{"use strict";var xwt=NB&&NB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NB,"__esModule",{value:!0});var kwt=an(),Qwt=xwt(pq()),Rwt=()=>kwt.useContext(Qwt.default);NB.default=Rwt});var qwe=_(MB=>{"use strict";var Hwe=MB&&MB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MB,"__esModule",{value:!0});var OB=an(),Fwt=Hwe(sQ()),Twt=Hwe(cQ()),Lwt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=Twt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=OB.useContext(Fwt.default),h=OB.useMemo(()=>Math.random().toString().slice(2,7),[]);return OB.useEffect(()=>(n(h,{autoFocus:e}),()=>{u(h)}),[h,e]),OB.useEffect(()=>{t?A(h):p(h)},[t,h]),OB.useEffect(()=>{if(!(!r||!t))return o(!0),()=>{o(!1)}},[t]),{isFocused:Boolean(h)&&a===h}};MB.default=Lwt});var Gwe=_(UB=>{"use strict";var Nwt=UB&&UB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(UB,"__esModule",{value:!0});var Owt=an(),Mwt=Nwt(sQ()),Uwt=()=>{let t=Owt.useContext(Mwt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};UB.default=Uwt});var jwe=_(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});wq.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var sc=_(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});var _wt=Dwe();Object.defineProperty(to,"render",{enumerable:!0,get:function(){return _wt.default}});var Hwt=oQ();Object.defineProperty(to,"Box",{enumerable:!0,get:function(){return Hwt.default}});var qwt=yq();Object.defineProperty(to,"Text",{enumerable:!0,get:function(){return qwt.default}});var
2024-06-15 19:05:40 +02:00
`:"";return u?I+=`@IF EXIST ${u} (\r
${u} ${p} ${a} ${E}%*\r
) ELSE (\r
@SETLOCAL\r
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
${A} ${p} ${a} ${E}%*\r
)\r
`:I+=`@${A} ${p} ${a} ${E}%*\r
`,I}function A1t(t,e,r){let o=oc.relative(oc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=oc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=uG(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
case \`uname\` in
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
esac
`,I=r.nodePath?`export NODE_PATH="${p}"
`:"";return n?E+=`${I}if [ -x ${n} ]; then
exec ${n} ${A} ${o} ${h}"$@"
else
exec ${a} ${A} ${o} ${h}"$@"
fi
`:E+=`${I}${a} ${A} ${o} ${h}"$@"
exit $?
`,E}function f1t(t,e,r){let o=oc.relative(oc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=oc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=uG(r.nodePath),E=h.win32,I=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",x=`#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
${r.nodePath?`$env_node_path=$env:NODE_PATH
$env:NODE_PATH="${E}"
`:""}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&&(x+=` else {
$env:NODE_PATH="${I}"
}`),u?x+=`
$ret=0
if (Test-Path ${u}) {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${u} ${p} ${o} ${v}$args
} else {
& ${u} ${p} ${o} ${v}$args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${o} ${v}$args
} else {
& ${n} ${p} ${o} ${v}$args
}
$ret=$LASTEXITCODE
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $ret
`:x+=`
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${o} ${v}$args
} else {
& ${n} ${p} ${o} ${v}$args
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $LASTEXITCODE
2024-06-21 09:01:29 +02:00
`,x}function p1t(t,e){return e.fs_.chmod(t,493)}function uG(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(oc.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=s1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}a1e.exports=cG});var vG=_((E$t,x1e)=>{x1e.exports=ve("stream")});var F1e=_((C$t,R1e)=>{"use strict";function k1e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function _1t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?k1e(Object(r),!0).forEach(function(o){H1t(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k1e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function H1t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function q1t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q1e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function G1t(t,e,r){return e&&Q1e(t.prototype,e),r&&Q1e(t,r),t}var j1t=ve("buffer"),kQ=j1t.Buffer,Y1t=ve("util"),PG=Y1t.inspect,W1t=PG&&PG.custom||"inspect";function K1t(t,e,r){kQ.prototype.copy.call(t,e,r)}R1e.exports=function(){function t(){q1t(this,t),this.head=null,this.tail=null,this.length=0}return G1t(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++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 o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return kQ.alloc(0);for(var o=kQ.allocUnsafe(r>>>0),a=this.head,n=0;a;)K1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=kQ.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:W1t,value:function(r,o){return PG(this,_1t({},o,{depth:0,customInspect:!1}))}}]),t}()});var SG=_((w$t,L1e)=>{"use strict";function z1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(DG,this,t)):process.nextTick(DG,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,functio
2024-06-15 19:05:40 +02:00
`)),t.linkname&&(e+=tj(" linkpath="+t.linkname+`
`));var r=t.pax;if(r)for(var o in r)e+=tj(" "+o+"="+r[o]+`
2024-06-21 09:01:29 +02:00
`);return Buffer.from(e)};tw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};tw.encode=function(t){var e=qBt(512),r=t.name,o="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(M0(t.mode&zBt,6),100),e.write(M0(t.uid,6),108),e.write(M0(t.gid,6),116),e.write(M0(t.size,11),124),e.write(M0(t.mtime.getTime()/1e3|0,11),136),e[156]=L2e+XBt(t.type),t.linkname&&e.write(t.linkname,157),N2e.copy(e,Sv),YBt.copy(e,rj),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(M0(t.devmajor||0,6),329),e.write(M0(t.devminor||0,6),337),o&&e.write(o,345),e.write(M0(M2e(e),6),148),e)};tw.decode=function(t,e,r){var o=t[156]===0?0:t[156]-L2e,a=ew(t,0,100,e),n=U0(t,100,8),u=U0(t,108,8),A=U0(t,116,8),p=U0(t,124,12),h=U0(t,136,12),E=VBt(o),I=t[157]===0?null:ew(t,157,100,e),v=ew(t,265,32),x=ew(t,297,32),C=U0(t,329,8),F=U0(t,337,8),N=M2e(t);if(N===8*32)return null;if(N!==U0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(N2e.compare(t,Sv,Sv+6)===0)t[345]&&(a=ew(t,345,155,e)+"/"+a);else if(!(WBt.compare(t,Sv,Sv+6)===0&&KBt.compare(t,rj,rj+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:E,linkname:I,uname:v,gname:x,devmajor:C,devminor:F}}});var Y2e=_((H$t,j2e)=>{var _2e=ve("util"),$Bt=T2e(),bv=nj(),H2e=$C().Writable,q2e=$C().PassThrough,G2e=function(){},U2e=function(t){return t&=511,t&&512-t},evt=function(t,e){var r=new WQ(t,e);return r.end(),r},tvt=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},WQ=function(t,e){this._parent=t,this.offset=e,q2e.call(this,{autoDestroy:!1})};_2e.inherits(WQ,q2e);WQ.prototype.destroy=function(t){this._parent.destroy(t)};var ap=function(t){if(!(this instanceof ap))return new ap(t);H2e.call(this,t),t=t||{},this._offset=0,this._buffer=$Bt(),this._missing=0,this._partial=!1,this._onparse=G2e,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,o=function(){e._continue()},a=function(v){if(e._locked=!1,v)return e.destroy(v);e._stream||o()},n=function(){e._stream=null;var v=U2e(e._header.size);v?e._parse(v,u):e._parse(512,I),e._locked||o()},u=function(){e._buffer.consume(U2e(e._header.size)),e._parse(512,I),o()},A=function(){var v=e._header.size;e._paxGlobal=bv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=bv.decodePax(r.slice(0,v)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(v),n()},h=function(){var v=e._header.size;this._gnuLongPath=bv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},E=function(){var v=e._header.size;this._gnuLongLinkPath=bv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},I=function(){var v=e._offset,x;try{x=e._header=bv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(C){e.emit("error",C)}if(r.consume(512),!x){e._parse(512,I),o();return}if(x.type==="gnu-long-path"){e._parse(x.size,h),o();return}if(x.type==="gnu-long-link-path"){e._parse(x.size,E),o();return}if(x.type==="pax-global-header"){e._parse(x.size,A),o();return}if(x.type==="pax-header"){e._parse(x.size,p),o();return}if(e._gnuLongPath&&(x.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(x.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=x=tvt(x,e._pax),e._pax
2024-06-15 19:05:40 +02:00
Wanted: ${r.size}
Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}BA.exports.checkStream=Rvt;function Rvt(t,e,r){r=ia(r);let o=r.Promise||Promise,a=hj(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}BA.exports.integrityStream=hj;function hj(t){t=ia(t);let e=t.integrity&&IA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(Qv.createHash),A=0,p=new Bvt({transform(h,E,I){A+=h.length,u.forEach(v=>v.update(h,E)),I(null,h,E)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",E=IA(u.map((v,x)=>`${n[x]}-${v.digest("base64")}${h}`).join(" "),t),I=r&&E.match(e,t);if(typeof t.size=="number"&&A!==t.size){let v=new Error(`stream size mismatch when checking ${e}.
Wanted: ${t.size}
2024-06-21 09:01:29 +02:00
Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=t.size,v.sri=e,p.emit("error",v)}else if(t.integrity&&!I){let v=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${E}. (${A} bytes)`);v.code="EINTEGRITY",v.found=E,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",E),I&&p.emit("verified",I)});return p}BA.exports.create=Fvt;function Fvt(t){t=ia(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(Qv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new H0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let E=h.algorithm;u[E]||(u[E]=[]),u[E].push(h)}return u},new vm)}}}var Tvt=new Set(Qv.getHashes()),pBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>Tvt.has(t));function Lvt(t,e){return pBe.indexOf(t.toLowerCase())>=pBe.indexOf(e.toLowerCase())?t:e}});var GBe=_((pir,qBe)=>{var LPt=uN();function NPt(t){return LPt(t)?void 0:t}qBe.exports=NPt});var YBe=_((hir,jBe)=>{var OPt=qb(),MPt=x8(),UPt=F8(),_Pt=Gd(),HPt=md(),qPt=GBe(),GPt=v_(),jPt=b8(),YPt=1,WPt=2,KPt=4,zPt=GPt(function(t,e){var r={};if(t==null)return r;var o=!1;e=OPt(e,function(n){return n=_Pt(n,t),o||(o=n.length>1),n}),HPt(t,jPt(t),r),o&&(r=MPt(r,YPt|WPt|KPt,qPt));for(var a=e.length;a--;)UPt(r,e[a]);return r});jBe.exports=zPt});Dt();je();Dt();var VBe=ve("child_process"),XBe=Ze(rd());qt();var cC=new Map([]);var l2={};zt(l2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>sr,getCli:()=>ehe,getDynamicLibs:()=>$pe,getPluginConfiguration:()=>AC,openWorkspace:()=>uC,pluginCommands:()=>cC,runExit:()=>ik});qt();var ut=class extends it{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new st("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};je();Dt();qt();var sr=class extends st{constructor(e,r){let o=z.relative(e,r),a=z.join(e,Ot.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};je();Dt();iA();Nl();Q1();qt();var LAt=Ze(Vn());$a();var $pe=()=>new Map([["@yarnpkg/cli",l2],["@yarnpkg/core",a2],["@yarnpkg/fslib",Ww],["@yarnpkg/libzip",k1],["@yarnpkg/parsers",eI],["@yarnpkg/shell",L1],["clipanion",fI],["semver",LAt],["typanion",Ko]]);je();async function uC(t,e){let{project:r,workspace:o}=await St.find(t,e);if(!o)throw new sr(r.cwd,e);return o}je();Dt();iA();Nl();Q1();qt();var nDt=Ze(Vn());$a();var $8={};zt($8,{AddCommand:()=>Qh,BinCommand:()=>Rh,CacheCleanCommand:()=>Fh,ClipanionCommand:()=>Kd,ConfigCommand:()=>Oh,ConfigGetCommand:()=>Th,ConfigSetCommand:()=>Lh,ConfigUnsetCommand:()=>Nh,DedupeCommand:()=>Mh,EntryCommand:()=>gC,ExecCommand:()=>Uh,ExplainCommand:()=>qh,ExplainPeerRequirementsCommand:()=>_h,HelpCommand:()=>zd,InfoCommand:()=>Gh,LinkCommand:()=>Yh,NodeCommand:()=>Wh,PluginCheckCommand:()=>Kh,PluginImportCommand:()=>Vh,PluginImportSourcesCommand:()=>Xh,PluginListCommand:()=>zh,PluginRemoveCommand:()=>Zh,PluginRuntimeCommand:()=>$h,RebuildCommand:()=>e0,RemoveCommand:()=>t0,RunCommand:()=>r0,RunIndexCommand:()=>Xd,SetResolutionCommand:()=>n0,SetVersionCommand:()=>Hh,SetVersionSourcesCommand:()=>Jh,UnlinkCommand:()=>i0,UpCommand:()=>Jf,VersionCommand:()=>Jd,WhyCommand:()=>s0,WorkspaceCommand:()=>l0,WorkspacesListCommand:()=>a0,YarnCommand:()=>jh,dedupeUtils:()=>hk,default:()=>xgt,suggestUtils:()=>Xc});var Qde=Ze(rd());je();je();je();qt();var H0e=Ze(p2());$a();var Xc={};zt(Xc,{Modifier:()=>B8,Strategy:()=>Ak,Target:()=>h2,WorkspaceModifier:()=>N0e,applyModifier:()=>tpt,extractDescriptorFromPath:()=>v8,extractRangeModifier:()=>O0e,fetchDescriptorFrom:()=>P8,findProjectDescriptors:()=>_0e,getModifier:()=>g2,getSuggestedDescriptors:()=>d2,makeWorkspaceDescriptor:()=>U0e,toWorkspaceModifier:()=>M0e})
Try running the command again with the package name prefixed: ${pe.pretty(r,"yarn add",pe.Type.CODE)} ${pe.pretty(r,j.makeDescriptor(j.makeIdent(null,"my-package"),`${te[0]}...`),pe.Type.DESCRIPTOR)}`);if(!J)throw new st(`The ${pe.pretty(r,U,pe.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ae=npt(a,J,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ae.map(async ce=>{let we=await d2(J,{project:o,workspace:a,cache:n,fixed:u,target:ce,modifier:h,strategies:E,maxResults:I});return{request:J,suggestedDescriptors:we,target:ce}}))})).then(U=>U.flat()),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:J,suggestedDescriptors:{suggestions:te,rejections:ae}}of v)if(te.filter(ce=>ce.descriptor!==null).length===0){let[ce]=ae;if(typeof ce>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${j.prettyDescriptor(r,J)} can't be resolved to a satisfying range`):U.reportError(27,`${j.prettyDescriptor(r,J)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(ce)}});if(x.hasErrors())return x.exitCode();let C=!1,F=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:J}of v){let te,ae=U.filter(de=>de.descriptor!==null),le=ae[0].descriptor,ce=ae.every(de=>j.areDescriptorsEqual(de.descriptor,le));ae.length===1||ce?te=le:(C=!0,{answer:te}=await(0,H0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:de,name:Be,reason:Ee})=>de?{name:Be,hint:Ee,descriptor:de}:{name:Be,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(de){return this.find(de,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let we=a.manifest[J].get(te.identHash);(typeof we>"u"||we.descriptorHash!==te.descriptorHash)&&(a.manifest[J].set(te.identHash,te),this.optional&&(J==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:J==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof we>"u"?F.push([a,J,te,E]):N.push([a,J,we,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,F),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),C&&this.context.stdout.write(`
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};Qh.paths=[["add"]],Qh.usage=it.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 latter 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/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current worksp
`),0}return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await An.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((E,I)=>Math.max(E,I.length),0);for(let[E,[I,v]]of A)u.reportJson({name:E,source:j.stringifyIdent(I),path:v});if(this.verbose)for(let[E,[I]]of A)u.reportInfo(null,`${E.padEnd(h," ")} ${j.prettyLocator(r,I)}`);else for(let E of A.keys())u.reportInfo(null,E)})).exitCode()}};Rh.paths=[["bin"]],Rh.usage=it.Usage({description:"get the path to a binary script",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});je();Dt();qt();var Fh=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Nr.find(r);return(await Ft.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await oe.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await oe.removePromise(o.cwd)})).exitCode()}};Fh.paths=[["cache","clean"],["cache","clear"]],Fh.usage=it.Usage({description:"remove the shared cache files",details:`
2024-06-15 19:05:40 +02:00
This command will remove all the files from the cache.
2024-06-21 09:01:29 +02:00
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});je();qt();var G0e=Ze(m2()),D8=ve("util"),Th=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new st(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=He.convertMapsToIndexableObjects(u),p=a?(0,G0e.default)(A,a):A,h=await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
2024-06-15 19:05:40 +02:00
`),h.exitCode();D8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,D8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
2024-06-21 09:01:29 +02:00
`)}return h.exitCode()}};Th.paths=[["config","get"]],Th.usage=it.Usage({description:"read a configuration settings",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,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"]]});je();qt();var Fge=Ze(k8()),Tge=Ze(m2()),Lge=Ze(Q8()),R8=ve("util"),Lh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new st("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?C=>Ke.updateHomeConfiguration(C):C=>Ke.updateConfiguration(o(),C))(C=>{if(n){let F=(0,Fge.default)(C);return(0,Lge.default)(F,this.name,A),F}else return{...C,[a]:A}});let E=(await Ke.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),I=He.convertMapsToIndexableObjects(E),v=n?(0,Tge.default)(I,n):I;return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async C=>{R8.inspect.styles.name="cyan",C.reportInfo(0,`Successfully set ${this.name} to ${(0,R8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Lh.paths=[["config","set"]],Lh.usage=it.Usage({description:"change a configuration settings",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,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"`]]});je();qt();var Wge=Ze(k8()),Kge=Ze(Uge()),zge=Ze(T8()),Nh=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Ke.updateHomeConfiguration(h):h=>Ke.updateConfiguration(o(),h);return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await A(I=>{if(!(0,Kge.default)(I,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,I;let v=n?(0,Wge.default)(I):{...I};return(0,zge.default)(v,this.name),v}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Nh.paths=[["config","unset"]],Nh.usage=it.Usage({description:"unset a configuration setting",details:`
2024-06-15 19:05:40 +02:00
This command will unset a configuration setting.
2024-06-21 09:01:29 +02:00
`,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"]]});je();Dt();qt();var pk=ve("util"),Oh=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins,{strict:!1}),o=await TE({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(o!==null)return o;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,u=await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async A=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)A.reportError(34,`Invalid configuration key "${p}" in ${h}`);A.reportSeparator()}if(this.json)for(let p of a){let h=r.settings.get(p);typeof h>"u"&&A.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),I=r.sources.get(p)??"<default>",v=I&&I[0]!=="<"?ue.fromPortablePath(I):I;A.reportJson({key:p,effective:E,source:v,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let I of a){if(this.noDefaults&&!r.sources.has(I))continue;let v=r.settings.get(I),x=r.sources.get(I)??"<default>",C=r.getSpecial(I,{hideSecrets:!0,getNativePaths:!0}),F={Description:{label:"Description",value:pe.tuple(pe.Type.MARKDOWN,{text:v.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:pe.tuple(x[0]==="<"?pe.Type.CODE:pe.Type.PATH,x)}};h[I]={value:pe.tuple(pe.Type.CODE,I),children:F};let N=(U,J)=>{for(let[te,ae]of J)if(ae instanceof Map){let le={};U[te]={children:le},N(le,ae)}else U[te]={label:te,value:pe.tuple(pe.Type.NO_HINT,(0,pk.inspect)(ae,p))}};C instanceof Map?N(F,C):F.Value={label:"Value",value:pe.tuple(pe.Type.NO_HINT,(0,pk.inspect)(C,p))}}a.length!==1&&(n=void 0),fs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,pk.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
2024-06-15 19:05:40 +02:00
`),this.context.stdout.write(`${p}
2024-06-21 09:01:29 +02:00
`)}return u.exitCode()}};Oh.paths=[["config"]],Oh.usage=it.Usage({description:"display the current configuration",details:`
2024-06-15 19:05:40 +02:00
This command prints the current active configuration settings.
2024-06-21 09:01:29 +02:00
`,examples:[["Print the active configuration settings","$0 config"]]});je();qt();$a();var hk={};zt(hk,{Strategy:()=>y2,acceptedStrategies:()=>U0t,dedupe:()=>L8});je();je();var Jge=Ze(Xo()),y2=(e=>(e.HIGHEST="highest",e))(y2||{}),U0t=new Set(Object.values(y2)),_0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);He.getSetWithDefault(u,E.identHash).add(h)}let A=new Map(He.mapAndFilter(t.storedDescriptors.values(),p=>j.isVirtualDescriptor(p)?He.mapAndFilter.skip:[p.descriptorHash,He.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let I=t.originalPackages.get(E);if(typeof I>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),x=Object.fromEntries(await He.allSettledSafe(Object.entries(v).map(async([te,ae])=>{let le=A.get(ae.descriptorHash);if(typeof le>"u")throw new Error(`Assertion failed: The descriptor (${ae.descriptorHash}) should have been registered`);let ce=await le.promise;if(!ce)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ce.updatedPackage]})));if(e.length&&!Jge.default.isMatch(j.stringifyIdent(p),e)||!r.shouldPersistResolution(I,a))return I;let C=u.get(p.identHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(C.size===1)return I;let F=[...C].map(te=>{let ae=t.originalPackages.get(te);if(typeof ae>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ae}),N=await r.getSatisfying(p,x,F,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return I;let J=t.originalPackages.get(U.locatorHash);if(typeof J>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return J}).then(async v=>{let x=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:I,updatedPackage:v,resolvedPackage:x})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function L8(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Qi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let I=_0t[e],v=await I(t,r,{resolver:A,resolveOptions:E,fetcher:p,fetchOptions:h}),x=Xs.progressViaCounter(v.length);await a.reportProgress(x);let C=0;await Promise.all(v.map(U=>U.then(J=>{if(J===null||J.currentPackage.locatorHash===J.updatedPackage.locatorHash)return;C++;let{descriptor:te,currentPackage:ae,updatedPackage:le}=J;a.reportInfo(0,`${j.prettyDescriptor(n,te)} can be deduped from ${j.prettyLocator(n,ae)} to ${j.prettyLocator(n,le)}`),a.reportJson({descriptor:j.stringifyDescriptor(te),currentResolution:j.stringifyLocator(ae),updatedResolution:j.stringifyLocator(le)}),t.storedResolutions.set(te.descriptorHash,le.locatorHash)}).finally(()=>x.tick())));let F;switch(C){case 0:F="No packages";break;case 1:F="One package";break;default:F=`${C} packages`}let N=pe.pretty(n,e,pe.Type.CODE);return a.reportInfo(0,`${F} can be deduped using the ${N} strategy`),C})}var Mh=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Js(y2)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when dupl
`)}};Kd.paths=[["--clipanion=definitions"]];var zd=class extends ut{async execute(){this.context.stdout.write(this.cli.usage(null))}};zd.paths=[["help"],["--help"],["-h"]];je();Dt();qt();var gC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!j.tryParseIdent(this.leadingArgument)){let r=z.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};je();var Jd=class extends ut{async execute(){this.context.stdout.write(`${nn||"<unknown>"}
`)}};Jd.paths=[["-v"],["--version"]];je();je();qt();var Uh=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await St.find(r,this.context.cwd);return await o.restoreInstallState(),await An.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Uh.paths=[["exec"]],Uh.usage=it.Usage({description:"execute a shell script",details:`
2024-06-15 19:05:40 +02:00
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).
2024-06-21 09:01:29 +02:00
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});je();qt();$a();var _h=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:aD(Ey(),[iI(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await q0t(this.hash,o,{stdout:this.context.stdout}):await G0t(o,{stdout:this.context.stdout})}};_h.paths=[["explain","peer-requirements"]],_h.usage=it.Usage({description:"explain a set of peer requirements",details:`
2024-06-15 19:05:40 +02:00
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
**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\`).
2024-06-21 09:01:29 +02:00
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]});async function q0t(t,e,r){let o=e.peerRequirementNodes.get(t);if(typeof o>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:pe.tuple(pe.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[j.stringifyLocator(h.requester),n(h)]))}),u=e.peerWarnings.find(p=>p.hash===t);return(await Ft.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=pe.mark(e.configuration),E=u?h.Cross:h.Check;if(p.reportInfo(0,`Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} is requested to provide ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)),fs.emitTree({children:Object.fromEntries(Array.from(o.requests.values(),I=>[j.stringifyLocator(I.requester),n(I)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),o.provided.range==="missing:"){let I=u?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} does not provide ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)}${I}.`)}else{let I=e.storedResolutions.get(o.provided.descriptorHash);if(!I)throw new Error("Assertion failed: Expected the descriptor to be registered");let v=e.storedPackages.get(I);if(!v)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} provides ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)} with version ${j.prettyReference(e.configuration,v.version??"0.0.0")}, ${u?"which does not satisfy all requests.":"which satisfies all requests"}`),u?.type===3&&(u.range?p.reportInfo(0,` The combined requested range is ${pe.pretty(e.configuration,u.range,pe.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function G0t(t,e){return(await Ft.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async o=>{let a=pe.mark(t.configuration),n=He.sortMap(t.peerRequirementNodes,[([,u])=>j.stringifyLocator(u.subject),([,u])=>j.stringifyIdent(u.ident)]);for(let[,u]of n.values()){if(!u.root)continue;let A=t.peerWarnings.find(E=>E.hash===u.hash),p=[...j.allPeerRequests(u)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",u.provided.range!=="missing:"){let E=t.storedResolutions.get(u.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let I=t.storedPackages.get(E);if(!I)throw new Error("Assertion failed: Expected the provided package to have been registered");let v=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${j.prettyLocator(t.configuration,u.subject)} provides ${j.prettyLocator(t.configuration,I)} to ${j.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,v):o.reportInfo(0,v)}else{let E=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${j.prettyLocator(t.configuration,u.subject)} doesn't provide ${j.prettyIdent(t.configuration,u.ident)} to ${j.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,E):o.reportInfo(0,E)}}})).exitCode()}je();qt();$a();je();je();Dt();qt();var Xge=Ze(Vn()),Hh=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only
${e}`)})}let A=t.projectCwd??t.startingCwd,p=z.resolve(A,".yarn/releases"),h=z.resolve(p,`yarn-${e}.cjs`),E=z.relative(t.startingCwd,h),I=He.isTaggedYarnVersion(e),v=t.get("yarnPath"),x=!I,C=x||!!v||!!a;if(a===!1){if(x)throw new Vt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");C=!1}else!C&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${pe.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${pe.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),C=!0);if(C){let te=await u();o.reportInfo(0,`Saving the new release in ${pe.pretty(t,E,"magenta")}`),await oe.removePromise(z.dirname(h)),await oe.mkdirPromise(z.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,te,{mode:493}),await Ke.updateConfiguration(A,{yarnPath:z.relative(A,h)})}else await oe.removePromise(z.dirname(h)),await Ke.updateConfiguration(A,{yarnPath:Ke.deleteProperty});let F=await Ot.tryFind(A)||new Ot;F.packageManager=`yarn@${I?e:await E2(t,"stable")}`;let N={};F.exportTo(N);let U=z.join(A,Ot.fileName),J=`${JSON.stringify(N,null,F.indent)}
`;return await oe.changeFilePromise(U,J,{automaticNewlines:!0}),{bundleVersion:e}}function Zge(t){return wr[fD(t)]}var Y0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function W0t(t){let r=`https://repo.yarnpkg.com/${He.isTaggedYarnVersion(nn)?nn:await E2(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,o=await sn.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(Y0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Zge(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var qh=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:sI(Ey(),[iI(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Zge(this.code),a=pe.pretty(r,o,pe.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await W0t(r)).get(this.code),p=typeof A<"u"?pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
2024-06-15 19:05:40 +02:00
You can help us by editing this page on GitHub \u{1F642}:
2024-06-21 09:01:29 +02:00
${pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
2024-06-15 19:05:40 +02:00
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
`):this.context.stdout.write(`${n}
${p}
2024-06-21 09:01:29 +02:00
`)}else{let o={children:He.mapAndFilter(Object.entries(wr),([a,n])=>Number.isNaN(Number(a))?He.mapAndFilter.skip:{label:Ku(Number(a)),value:pe.tuple(pe.Type.CODE,n)})};fs.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};qh.paths=[["explain"]],qh.usage=it.Usage({description:"explain an error code",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});je();Dt();qt();var $ge=Ze(Xo()),Gh=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a&&!this.all)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(ae,{recursive:le})=>{let ce=ae.anchoredLocator.locatorHash,we=new Map,de=[ce];for(;de.length>0;){let Be=de.shift();if(we.has(Be))continue;let Ee=o.storedPackages.get(Be);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the package to be registered");if(we.set(Be,Ee),j.isVirtualLocator(Ee)&&de.push(j.devirtualizeLocator(Ee).locatorHash),!(!le&&Be!==ce))for(let g of Ee.dependencies.values()){let me=o.storedResolutions.get(g.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: Expected the resolution to be registered");de.push(me)}}return we.values()},p=({recursive:ae})=>{let le=new Map;for(let ce of o.workspaces)for(let we of A(ce,{recursive:ae}))le.set(we.locatorHash,we);return le.values()},h=({all:ae,recursive:le})=>ae&&le?o.storedPackages.values():ae?p({recursive:le}):A(a,{recursive:le}),E=({all:ae,recursive:le})=>{let ce=h({all:ae,recursive:le}),we=this.patterns.map(Ee=>{let g=j.parseLocator(Ee),me=$ge.default.makeRe(j.stringifyIdent(g)),Ce=j.isVirtualLocator(g),Ae=Ce?j.devirtualizeLocator(g):g;return ne=>{let Z=j.stringifyIdent(ne);if(!me.test(Z))return!1;if(g.reference==="unknown")return!0;let xe=j.isVirtualLocator(ne),Le=xe?j.devirtualizeLocator(ne):ne;return!(Ce&&xe&&g.reference!==ne.reference||Ae.reference!==Le.reference)}}),de=He.sortMap([...ce],Ee=>j.stringifyLocator(Ee));return{selection:de.filter(Ee=>we.length===0||we.some(g=>g(Ee))),sortedLookup:de}},{selection:I,sortedLookup:v}=E({all:this.all,recursive:this.recursive});if(I.length===0)throw new st("No package matched your request");let x=new Map;if(this.dependents)for(let ae of v)for(let le of ae.dependencies.values()){let ce=o.storedResolutions.get(le.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");He.getArrayWithDefault(x,ce).push(ae)}let C=new Map;for(let ae of v){if(!j.isVirtualLocator(ae))continue;let le=j.devirtualizeLocator(ae);He.getArrayWithDefault(C,le.locatorHash).push(ae)}let F={},N={children:F},U=r.makeFetcher(),J={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new Qi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ae,le,ce)=>{if(!le.has("manifest"))return;let we=await U.fetch(ae,J),de;try{de=await Ot.find(we.prefixPath,{baseFs:we.packageFs})}finally{we.releaseFs?.()}ce("Manifest",{License:pe.tuple(pe.Type.NO_HINT,de.license),Homepage:pe.tuple(pe.Type.URL,de.raw.homepage??null)})},async(ae,le,ce)=>{if(!le.has("cache"))return;let we=o.storedChecksums.get(ae.locatorHash)??null,de=n
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});je();qt();var Kh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Ke.findRcFiles(this.context.cwd);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(!!u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await sn.get(A.spec,{configuration:r}),h=wn.makeHash(p);if(A.checksum===h)continue;let E=pe.pretty(r,A.path,pe.Type.PATH),I=pe.pretty(r,A.spec,pe.Type.URL),v=`${E} is different from the file provided by ${I}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Kh.paths=[["plugin","check"]],Kh.usage=it.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
2024-06-15 19:05:40 +02:00
Check only the plugins from https.
If this command detects any plugin differences in the CI environment, it will throw an error.
2024-06-21 09:01:29 +02:00
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});je();je();Dt();qt();var ide=ve("os");je();Dt();qt();var ede=ve("os");je();Nl();qt();var X0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Vd(t,e){let r=await sn.get(X0t,{configuration:t}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Lr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var zh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Vd(r,nn);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};zh.paths=[["plugin","list"]],zh.usage=it.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 Z0t=/^[0-9]+$/,$0t=process.platform==="win32";function tde(t){return Z0t.test(t)?`pull/${t}/head`:t}var egt=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",tde(e)],["git","reset","--hard","FETCH_HEAD"]],tgt=({branch:t})=>[["git","fetch","origin","--depth=1",tde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],rgt=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",z.resolve(o,a)])),...e?["--no-minify"]:[],"|"],[$0t?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",ue.fromPortablePath(r),"|"]],Jh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.installPath<"u"?z.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):z.resolve(ue.toPortablePath((0,ede.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async u=>{await M8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Ur.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=z.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);oe.existsSync(p)||(await C2(rgt(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await oe.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await N8(r,null,async()=>h,{report:u});this.skipPlugins||await ngt(this,E,{project:o,report:u,target:a})}})).exitCode()}};Jh.paths=[["set","version","from","sources"]],Jh.usage=it.Usage({descrip
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Build Yarn from master","$0 set version from sources"]]});async function C2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Ur.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${pe.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
`);try{await Ur.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function M8(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&oe.existsSync(z.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await C2(tgt(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await oe.removePromise(o),await oe.mkdirPromise(o,{recursive:!0}),await C2(egt(t,o),{configuration:e,context:t.context,target:o}))}async function ngt(t,e,{project:r,report:o,target:a}){let n=await Vd(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await U8(A,t,{project:r,report:o,target:a})}je();je();Dt();qt();var rde=Ze(Vn()),nde=ve("vm");var Vh=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await St.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=z.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${pe.pretty(r,p,pe.Type.PATH)}`),u=z.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Vt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=j.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!rde.default.valid(h.reference))throw new Vt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=j.stringifyIdent(h),I=await Vd(r,nn);if(!Object.hasOwn(I,E)){let v=`Couldn't find a plugin named ${j.prettyIdent(r,h)} on the remote registry.
`;throw r.plugins.has(E)?v+=`A plugin named ${j.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${pe.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",pe.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${pe.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",pe.Type.URL)}).`,new Vt(51,v)}u=E,p=I[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):nn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${nn}/`))}a.reportInfo(0,`Downloading ${pe.pretty(r,p,"green")}`),A=await sn.get(p,{configuration:r})}await _8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Vh.paths=[["plugin","import"]],Vh.usage=it.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
2024-06-15 19:05:40 +02:00
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.
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
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).
2024-06-21 09:01:29 +02:00
`,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"]]});async function _8(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,nde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,E=z.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${pe.pretty(n,h,"magenta")}`),await oe.mkdirPromise(z.dirname(E),{recursive:!0}),await oe.writeFilePromise(E,e);let I={path:h,spec:t};r&&(I.checksum=wn.makeHash(e)),await Ke.addPlugin(o.cwd,[I])}var igt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],Xh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?z.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):z.resolve(ue.toPortablePath((0,ide.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await St.find(r,this.context.cwd),A=j.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=j.stringifyIdent(A),h=await Vd(r,nn);if(!Object.hasOwn(h,p))throw new Vt(51,`Couldn't find a plugin named "${p}" 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 E=p;await M8(this,{configuration:r,report:n,target:o}),await U8(E,this,{project:u,report:n,target:o})})).exitCode()}};Xh.paths=[["plugin","import","from","sources"]],Xh.usage=it.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,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"]]});async function U8(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await C2(igt({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=z.resolve(n,`packages/${u}/bundles/${t}.js`),h=await oe.readFilePromise(p);await _8(t,h,{project:o,report:a})}je();Dt();qt();var Zh=class extends ut{constructor(){super(...arguments);this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=j.parseIdent(u);if(!r.plugins.has(u))throw new st(`${j.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=z.resolve(o.cwd,p);oe.existsSync(h)&&(n.reportInfo(0,`Removing ${pe.pretty(r,p,pe.Type.PATH)}...`),await oe.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Ke.updateConfiguration(o.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let I=E.filter(v=>v.path!==p);return I.length===0?Ke.deleteProperty:I.length===E.length?E:I}})})).exitCode()}};Zh.paths=[["plugin","remove"]],Zh.usage=it.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,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"]]});je();qt();var $h=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};$h.paths=[["plugin","runtime"]],$h.usage=it.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
2024-06-15 19:05:40 +02:00
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
2024-06-21 09:01:29 +02:00
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});je();je();qt();var e0=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(j.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Qi}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};e0.paths=[["rebuild"]],e0.usage=it.Usage({description:"rebuild the project's native packages",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});je();je();je();qt();var H8=Ze(Xo());$a();var t0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Js(hl)});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let C of this.patterns){let F=!1,N=j.parseIdent(C);for(let U of u){let J=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,H8.default)(J,C))U.manifest.peerDependenciesMeta.delete(te),h=!0,F=!0;for(let te of A){let ae=U.manifest.getForScope(te),le=[...ae.values()].map(ce=>j.stringifyIdent(ce));for(let ce of(0,H8.default)(le,j.stringifyIdent(N))){let{identHash:we}=j.parseIdent(ce),de=ae.get(we);if(typeof de>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(we),E.push([U,te,de]),h=!0,F=!0}}}F||p.push(C)}let I=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new st(`${I} ${pe.prettyList(r,p,pe.Type.CODE)} ${v} match any packages referenced by ${x} workspace`);return h?(await r.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,E),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};t0.paths=[["remove"]],t0.usage=it.Usage({description:"remove dependencies from the project",details:`
2024-06-15 19:05:40 +02:00
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 latter 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.
2024-06-21 09:01:29 +02:00
`,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}'"]]});je();je();qt();var sde=ve("util"),Xd=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);return(await Ft.start({configuration:r,stdout:this.context.stdout,json:this.json},async u=>{let A=a.manifest.scripts,p=He.sortMap(A.keys(),I=>I),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((I,v)=>Math.max(I,v.length),0);for(let[I,v]of A.entries())u.reportInfo(null,`${I.padEnd(E," ")} ${(0,sde.inspect)(v,h)}`),u.reportJson({name:I,script:v})})).exitCode()}};Xd.paths=[["run"]];je();je();qt();var r0=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await St.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await An.hasPackageScript(u,this.scriptName,{project:o}))return await An.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await An.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await An.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(o.workspaces.map(async I=>I.manifest.scripts.has(this.scriptName)?I:null))).filter(I=>I!==null);if(E.length===1)return await An.executeWorkspaceScript(E[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 st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}). 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 st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new st("The 'yarn
2024-06-15 19:05:40 +02:00
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).
2024-06-21 09:01:29 +02:00
`,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"]]});je();je();qt();var n0=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new sr(o.cwd,this.context.cwd);let u=j.parseDescriptor(this.descriptor,!0),A=j.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};n0.paths=[["set","resolution"]],n0.usage=it.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, edit the `resolutions` field in 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"]]});je();Dt();qt();var ode=Ze(Xo()),i0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=z.resolve(this.context.cwd,ue.toPortablePath(p));if(He.isPathLike(p)){let E=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await St.find(E,h);if(!v)throw new sr(I.cwd,h);if(this.all){for(let x of I.workspaces)x.manifest.name&&A.add(j.stringifyIdent(x.anchoredLocator));if(A.size===0)throw new st("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new st("The target workspace doesn't have a name and thus cannot be unlinked");A.add(j.stringifyIdent(v.anchoredLocator))}}else{let E=[...u.manifest.resolutions.map(({pattern:I})=>I.descriptor.fullName)];for(let I of(0,ode.default)(E,p))A.add(I)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};i0.paths=[["unlink"]],i0.usage=it.Usage({description:"disconnect the local project from another one",details:`
2024-06-15 19:05:40 +02:00
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
2024-06-21 09:01:29 +02:00
`,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}'"]]});je();je();je();qt();var ade=Ze(p2()),q8=Ze(Xo());$a();var Jf=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Js(hl)});this.patterns=ge.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(E=>j.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(j.parseDescriptor(E).range!=="unknown")throw new st("Ranges aren't allowed when using --recursive");for(let I of(0,q8.default)(A,E)){let v=j.parseIdent(I);p.add(v.identHash)}}let h=u.filter(E=>p.has(E.identHash));for(let E of h)o.storedDescriptors.delete(E.descriptorHash),o.storedResolutions.delete(E.descriptorHash);return await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=g2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],E=[],I=[];for(let N of this.patterns){let U=!1,J=j.parseDescriptor(N),te=j.stringifyIdent(J);for(let ae of o.workspaces)for(let le of["dependencies","devDependencies"]){let we=[...ae.manifest.getForScope(le).values()].map(Be=>j.stringifyIdent(Be)),de=te==="*"?we:(0,q8.default)(we,te);for(let Be of de){let Ee=j.parseIdent(Be),g=ae.manifest[le].get(Ee.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let me=j.makeDescriptor(Ee,J.range);E.push(Promise.resolve().then(async()=>[ae,le,g,await d2(me,{project:o,workspace:ae,cache:n,target:le,fixed:u,modifier:p,strategies:h})])),U=!0}}U||I.push(N)}if(I.length>1)throw new st(`Patterns ${pe.prettyList(r,I,pe.Type.CODE)} don't match any packages referenced by any workspace`);if(I.length>0)throw new st(`Pattern ${pe.prettyList(r,I,pe.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(E),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:J,rejections:te}]of v){let ae=J.filter(le=>le.descriptor!==null);if(ae.length===0){let[le]=te;if(typeof le>"u")throw new Error("Assertion failed: Expected an error to have been set");let ce=this.cli.error(le);o.configuration.get("enableNetwork")?N.reportError(27,`${j.prettyDescriptor(r,U)} can't be resolved to a satisfying range
2024-06-15 19:05:40 +02:00
${ce}`):N.reportError(27,`${j.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
2024-06-21 09:01:29 +02:00
${ce}`)}else ae.length>1&&!A&&N.reportError(27,`${j.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(x.hasErrors())return x.exitCode();let C=!1,F=[];for(let[N,U,,{suggestions:J}]of v){let te,ae=J.filter(de=>de.descriptor!==null),le=ae[0].descriptor,ce=ae.every(de=>j.areDescriptorsEqual(de.descriptor,le));ae.length===1||ce?te=le:(C=!0,{answer:te}=await(0,ade.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${j.prettyWorkspace(r,N)} \u276F ${U}?`,choices:J.map(({descriptor:de,name:Be,reason:Ee})=>de?{name:Be,hint:Ee,descriptor:de}:{name:Be,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(de){return this.find(de,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let we=N.manifest[U].get(te.identHash);if(typeof we>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(we.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),F.push([N,U,we,te]);else{let de=r.makeResolver(),Be={project:o,resolver:de},Ee=r.normalizeDependency(we),g=de.bindDescriptor(Ee,N.anchoredLocator,Be);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,F),C&&this.context.stdout.write(`
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Jf.paths=[["up"]],Jf.usage=it.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 latter 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'"]]}),Jf.schema=[aI("recursive",Yu.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];je();je();je();qt();var s0=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function sgt(t,e,{configuration:r,peers:o}){let a=He.sortMap(t.storedPackages.values(),A=>j.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let E of A.dependencies.values()){if(!o&&A.peerDependencies.has(E.identHash))continue;let I=t.storedResolutions.get(E.descriptorHash);if(!I)throw new Error("Assertion failed: The resolution should have been registered");let v=t.storedPackages.get(I);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==e)continue;{let C=j.stringifyLocator(A);n[C]={value:[A,pe.Type.LOCATOR],children:p}}let x=j.stringifyLocator(v);p[x]={value:[{descriptor:E,locator:v},pe.Type.DEPENDENT]}}}return u}function ogt(t,e,{configuration:r,peers:o}){let a=He.sortMap(t.workspaces,v=>j.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===e)return u.add(v.locatorHash),!0;let x=!1;v.identHash===e&&(x=!0);for(let C of v.dependencies.values()){if(!o&&v.peerDependencies.has(C.identHash))continue;let F=t.storedResolutions.get(C.descriptorHash);if(!F)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(F);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(x=!0)}return x&&u.add(v.locatorHash),x};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},E={children:h},I=(v,x,C)=>{if(!u.has(v.locatorHash))return;let F=C!==null?pe.tuple(pe.Type.DEPENDENT,{locator:v,descriptor:C}):pe.tuple(pe.Type.LOCATOR,v),N={},U={value:F,children:N},J=j.stringifyLocator(v);if(x[J]=U,!(C!==null&&t.tryWorkspaceByLocator(v))&&!p.has(v.locatorHash)){p.add(v.locatorHash);for(let te of v.dependencies.values()){if(!o&&v.peerDependencies.has(te.identHash))continue;let ae=t.storedResolutions.get(te.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let le=t.storedPackages.get(ae);if(!le)throw new Error("Assertion failed: The package should have been registered");I(le,N,te)}}};for(let v of a)I(v.anchoredPackage,h,null);return E}je();var Z8={};zt(Z8,{GitFetcher:()=>I2,GitResolver:()=>B2,default:()=>Sgt,gitUtils:()=>ra});je();Dt();var ra={};zt(ra,{TreeishProtocols:()=>w2,clone:()=>X8,fetchBase:()=>xde,fetchChangedFiles:()=>kde,fetchChangedWorkspaces:()=>Pgt,fetchRoot:()=>bde,isGitUrl:()=>yC,lsRemote:()=>Sde,normalizeLocator:()=>vgt,normalizeRepoUrl:()=>dC,resolveUrl:()=>V8,splitRepoUrl:()=>o0,validateRepoUrl:()=>J8});je();Dt();qt();var vde=Ze(wde()),Pde=Ze(mU()),mC=Ze(ve("querystring")),K8=Ze(Vn());function W8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function Ide(t){try{return new URL(t)}catch{return}}function Igt(t){let e=W8(t,"@","#"),r=W8(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),W8(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Bde(t){return Ide(t)||Ide(Igt(t))}function dC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Bde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function Dde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Bgt=[/^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\/(.+)?$/],w2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a)
2024-06-15 19:05:40 +02:00
- ${p.join(`
2024-06-21 09:01:29 +02:00
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};l0.paths=[["workspace"]],l0.usage=it.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
2024-06-15 19:05:40 +02:00
This command will run a given sub-command on a single workspace.
2024-06-21 09:01:29 +02:00
`,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 bgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Qde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Fh,Th,Lh,Nh,n0,Jh,Hh,a0,Kd,zd,gC,Jd,Qh,Rh,Oh,Mh,Uh,_h,qh,Gh,jh,Yh,i0,Wh,Kh,Xh,Vh,Zh,zh,$h,e0,t0,Xd,r0,Jf,s0,l0]},xgt=bgt;var iH={};zt(iH,{default:()=>Qgt});je();var kt={optional:!0},eH=[["@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:kt,zenObservable:kt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:kt}}],["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"]:kt,["postcss-jsx"]:kt,["postcss-less"]:kt,["postcss-markdown"]:kt,["postcss-scss"]:kt}}],["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:kt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:kt}}],["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:kt,"vue-template-compiler":kt}}],["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:kt,"utf-8-validate":kt}}],["react-portal@<4.2.2",{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"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependen
2024-06-15 19:05:40 +02:00
This command will output all matches to the given prolog query.
2024-06-21 09:01:29 +02:00
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function tdt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function rdt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}je();qt();var h0=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(k2(),x2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await St.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};h0.paths=[["constraints","source"]],h0.usage=it.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"]]});je();je();qt();P2();var g0=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new CC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(k2(),x2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:I,remainingErrors:v}=dk(o,E,{fix:this.fix}),x=[];for(let[C,F]of I){let N=C.manifest.indent;C.manifest=new Ot,C.manifest.indent=N,C.manifest.load(F),x.push(C.persistManifest())}if(await Promise.all(x),!(I.size>0&&h>1)){u=qde(v,{configuration:r}),A=!1,p=!0;for(let[,C]of v)for(let F of C)F.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`;await Ft.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=He.sortMap(u.children,h=>h.value[1]),fs.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};g0.paths=[["constraints"]],g0.usage=it.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});P2();var ndt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[p0,h0,g0],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new CC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(k2(),x2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=dk(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${pe.pretty(t.configuration,u.anchoredLocator,pe.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${pe.pretty(t.configuration,"yarn constraints",pe.Type.CODE)} for more details`)}}},idt=ndt;var IH={};zt(IH,{CreateCommand:()=>tm,DlxCommand:()=>d0,default:()=>odt});je();qt();var tm=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=j.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?j.makeIdent(a.scope,`create-${a.name}`):j.makeIdent(null,`create-${a.name}`),u=j.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};tm.paths=[["create"]];je();je();Dt();qt();var d0=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){return Ke.telemetry=null,await oe.mktempPromise(async r=>{let o=z.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(z.join(o,"package.json"),`{}
`),await oe.writeFilePromise(z.join(o,"yarn.lock"),"");let a=z.join(o,".yarnrc.yml"),n=await Ke.findProjectCwd(this.context.cwd),A={enableGlobalCache:!(await Ke.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Ku(68),level:pe.LogLevel.Discard}]},p=n!==null?z.join(n,".yarnrc.yml"):null;p!==null&&oe.existsSync(p)?(await oe.copyFilePromise(p,a),await Ke.updateConfiguration(o,N=>{let U=He.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(J=>{let te=typeof J=="string"?J:J.path,ae=ue.isAbsolute(te)?te:ue.resolve(ue.fromPortablePath(n),te);return typeof J=="string"?ae:{path:ae,spec:J.spec}})),U})):await oe.writeJsonPromise(a,A);let h=this.packages??[this.command],E=j.parseDescriptor(this.command).name,I=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(I!==0)return I;this.quiet||this.context.stdout.write(`
`);let v=await Ke.find(o,this.context.plugins),{project:x,workspace:C}=await St.find(v,o);if(C===null)throw new sr(x.cwd,o);await x.restoreInstallState();let F=await An.getWorkspaceAccessibleBinaries(C);return F.has(E)===!1&&F.size===1&&typeof this.packages>"u"&&(E=Array.from(F)[0][0]),await An.executeWorkspaceAccessibleBinary(C,E,this.args,{packageAccessibleBinaries:F,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};d0.paths=[["dlx"]],d0.usage=it.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 sdt={commands:[tm,d0]},odt=sdt;var PH={};zt(PH,{ExecFetcher:()=>R2,ExecResolver:()=>F2,default:()=>cdt,execUtils:()=>Ck});je();je();Dt();var pA="exec:";var Ck={};zt(Ck,{loadGeneratorFile:()=>Q2,makeLocator:()=>vH,makeSpec:()=>hme,parseSpec:()=>BH});je();Dt();function BH(t){let{params:e,selector:r}=j.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?j.parseLocator(e.locator):null,path:o}}function hme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:j.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function vH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return j.makeLocator(t,hme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function Q2(t,e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(t,{protocol:e}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var R2=class{supports(e,r){return!!e.reference.startsWith(pA)}getLocalPath(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:pA});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await Q2(e.reference,pA,r);return oe.mktempPromise(async a=>{let n=z.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!oe.existsSync(z.join(u,"build")))throw new Error("The script should have generated a build directory");return await Zi.makeArchiveFromDirectory(z.join(u,"build"),{prefixPath:j.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await oe.mktempPromise(async n=>{let u=await An.makeScriptEnv({project:a.project,binFolder:n}),A=z.join(e,"runtime.js");return await oe.mktempPromise(async p=>{let h=z.join(p,"buildfile.log"),E=z.join(e,"generator"),I=z.join(e,"build");await oe.mkdirPromise(E),await oe.mkdirPromise(I);let v={tempDir:ue.fromPortabl
2024-06-15 19:05:40 +02:00
// 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(v)},
},
enumerable: true,
});
`);let x=u.NODE_OPTIONS||"",C=/\s*--require\s+\S*\.pnp\.c?js\s*/g;x=x.replace(C," ").trim(),u.NODE_OPTIONS=x;let{stdout:F,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${j.stringifyLocator(r)})
2024-06-21 09:01:29 +02:00
`,prefix:j.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Ur.pipevp(process.execPath,["--require",ue.fromPortablePath(A),ue.fromPortablePath(o),j.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:F,stderr:N});if(U!==0)throw oe.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${pe.pretty(a.project.configuration,h,pe.Type.PATH)})`)})})}};je();je();var adt=2,F2=class{supportsDescriptor(e,r){return!!e.range.startsWith(pA)}supportsLocator(e,r){return!!e.reference.startsWith(pA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=BH(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await Q2(j.makeRange({protocol:pA,source:a,selector:a,params:{locator:j.stringifyLocator(n)}}),pA,o.fetchOptions),A=wn.makeHash(`${adt}`,u).slice(0,6);return[vH(e,{parentLocator:n,path:a,generatorHash:A,protocol:pA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await He.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var ldt={fetchers:[R2],resolvers:[F2]},cdt=ldt;var SH={};zt(SH,{FileFetcher:()=>O2,FileResolver:()=>M2,TarballFileFetcher:()=>U2,TarballFileResolver:()=>_2,default:()=>fdt,fileUtils:()=>rm});je();Dt();var vC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,T2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Ui="file:";var rm={};zt(rm,{fetchArchiveFromLocator:()=>N2,makeArchiveFromLocator:()=>wk,makeBufferFromLocator:()=>DH,makeLocator:()=>PC,makeSpec:()=>gme,parseSpec:()=>L2});je();Dt();function L2(t){let{params:e,selector:r}=j.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?j.parseLocator(e.locator):null,path:o}}function gme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:j.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function PC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return j.makeLocator(t,gme({parentLocator:e,path:r,hash:o,protocol:a}))}async function N2(t,e){let{parentLocator:r,path:o}=j.parseFileStyleRange(t.reference,{protocol:Ui}),a=z.isAbsolute(o)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=z.join(n.prefixPath,o);return await He.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function wk(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=j.parseFileStyleRange(t.reference,{protocol:e}),u=z.isAbsolute(n)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=z.join(A.prefixPath,n);return await He.releaseAfterUseAsync(async()=>await Zi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:j.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function DH(t,{protocol:e,fe
2024-06-15 19:05:40 +02:00
`,{automaticNewlines:!0});let h=[p],E=z.join(this.context.cwd,"README.md");if(oe.existsSync(E)||(await oe.writeFilePromise(E,`# ${j.stringifyIdent(n.name)}
2024-06-21 09:01:29 +02:00
`),h.push(E)),!o||o.cwd===this.context.cwd){let I=z.join(this.context.cwd,dr.lockfile);oe.existsSync(I)||(await oe.writeFilePromise(I,""),h.push(I));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(le=>`${le}
`).join(""),C=z.join(this.context.cwd,".gitignore");oe.existsSync(C)||(await oe.writeFilePromise(C,x),h.push(C));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(le=>`${le}
`).join(""),U=z.join(this.context.cwd,".gitattributes");oe.existsSync(U)||(await oe.writeFilePromise(U,N),h.push(U));let J={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};He.mergeIntoTarget(J,r.get("initEditorConfig"));let te=`root = true
`;for(let[le,ce]of Object.entries(J)){te+=`
[${le}]
`;for(let[we,de]of Object.entries(ce)){let Be=we.replace(/[A-Z]/g,Ee=>`_${Ee.toLowerCase()}`);te+=`${Be} = ${de}
`}}let ae=z.join(this.context.cwd,".editorconfig");oe.existsSync(ae)||(await oe.writeFilePromise(ae,te),h.push(ae)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(z.join(this.context.cwd,".git"))||(await Ur.execvp("git",["init"],{cwd:this.context.cwd}),await Ur.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Ur.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};m0.paths=[["init"]],m0.usage=it.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 mdt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[m0]},ydt=mdt;var Tq={};zt(Tq,{SearchCommand:()=>I0,UpgradeInteractiveCommand:()=>v0,default:()=>oIt});je();var Cme=Ze(ve("os"));function DC({stdout:t}){if(Cme.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")}qt();var Rye=Ze(VH()),XH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},gyt=(0,Rye.default)(XH.appId,XH.apiKey).initIndex(XH.indexName),ZH=async(t,e=0)=>await gyt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var GB=["regular","dev","peer"],I0=class extends ut{async execute(){DC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(uQ(),Bq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(hQ(),pQ)),{useKeypress:o}=await Promise.resolve().then(()=>(_B(),Kwe)),{useMinistore:a}=await Promise.resolve().then(()=>(xq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(yQ(),mQ)),{default:u}=await Promise.resolve().then(()=>Ze(nIe())),{Box:A,Text:p}=await Promise.resolve().then(()=>Ze(sc())),{default:h,useEffect:E,useState:I}=await Promise.resolve().then(()=>Ze(an())),v=await Ke.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright
2024-06-15 19:05:40 +02:00
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
2024-06-21 09:01:29 +02:00
`,examples:[["Open the search window","yarn search"]]});je();qt();E_();var uIe=Ze(Vn()),cIe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,AIe=(t,e)=>t.length>0?[t.slice(0,e)].concat(AIe(t.slice(e),e)):[],v0=class extends ut{async execute(){DC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(lIe(),aIe)),{Pad:r}=await Promise.resolve().then(()=>(Fq(),oIe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(hQ(),pQ)),{useMinistore:a}=await Promise.resolve().then(()=>(xq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(yQ(),mQ)),{Box:u,Text:A}=await Promise.resolve().then(()=>Ze(sc())),{default:p,useEffect:h,useRef:E,useState:I}=await Promise.resolve().then(()=>Ze(an())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:x,workspace:C}=await St.find(v,this.context.cwd),F=await Nr.find(v);if(!C)throw new sr(x.cwd,this.context.cwd);await x.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(me,Ce)=>{let Ae=Ape(me,Ce),ne="";for(let Z of Ae)Z.added?ne+=pe.pretty(v,Z.value,"green"):Z.removed||(ne+=Z.value);return ne},J=(me,Ce)=>{if(me===Ce)return Ce;let Ae=j.parseRange(me),ne=j.parseRange(Ce),Z=Ae.selector.match(cIe),xe=ne.selector.match(cIe);if(!Z||!xe)return U(me,Ce);let Le=["gray","red","yellow","green","magenta"],ht=null,H="";for(let rt=1;rt<Le.length;++rt)ht!==null||Z[rt]!==xe[rt]?(ht===null&&(ht=Le[rt-1]),H+=pe.pretty(v,xe[rt],ht)):H+=xe[rt];return H},te=async(me,Ce,Ae)=>{let ne=await Xc.fetchDescriptorFrom(me,Ae,{project:x,cache:F,preserveModifier:Ce,workspace:C});return ne!==null?ne.range:me.range},ae=async me=>{let Ce=uIe.default.valid(me.range)?`^${me.range}`:me.range,[Ae,ne]=await Promise.all([te(me,me.range,Ce).catch(()=>null),te(me,me.range,"latest").catch(()=>null)]),Z=[{value:null,label:me.range}];return Ae&&Ae!==me.range?Z.push({value:Ae,label:J(me.range,Ae)}):Z.push({value:null,label:""}),ne&&ne!==Ae&&ne!==me.range?Z.push({value:ne,label:J(me.range,ne)}):Z.push({value:null,label:""}),Z},le=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),ce=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),we=({active:me,descriptor:Ce,suggestions:Ae})=>{let[ne,Z]=a(Ce.descriptorHash,null),xe=j.stringifyIdent(Ce),Le=Math.max(0,45-xe.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},j.prettyIdent(v,Ce)),p.createElement(r,{active:me,length:Le})),p.createElement(e,{active:me,options:Ae,value:ne,skewer:!0,onChange:Z,sizes:[17,17,17]})))},de=({dependencies:me})=>{let[Ce,Ae]=I(me.map(()=>null)),ne=E(!0),Z=async xe=>{let Le=await ae(xe);return Le.filter(ht=>ht.label!=="").length<=1?null:{descriptor:xe,suggestions:Le}};return h(()=>()=>{ne.current=!1},[]),h(()=>{let xe=Math.trunc(N*1.75),Le=me.slice(0,xe),ht=me.slice(xe),H=AIe(ht,N),rt=Le.map(Z).reduce(async(Te
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var sIt={commands:[I0,v0]},oIt=sIt;var Lq={};zt(Lq,{LinkFetcher:()=>YB,LinkResolver:()=>WB,PortalFetcher:()=>KB,PortalResolver:()=>zB,default:()=>lIt});je();Dt();var tp="portal:",rp="link:";var YB=class{supports(e,r){return!!e.reference.startsWith(rp)}getLocalPath(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:rp});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:rp}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Hu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0}}};je();Dt();var WB=class{supportsDescriptor(e,r){return!!e.range.startsWith(rp)}supportsLocator(e,r){return!!e.reference.startsWith(rp)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(rp.length);return[j.makeLocator(e,`${rp}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};je();Dt();var KB=class{supports(e,r){return!!e.reference.startsWith(tp)}getLocalPath(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:tp});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:tp}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,localPath:p}:{packageFs:new Hu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot}}};je();je();Dt();var zB=class{supportsDescriptor(e,r){return!!e.range.startsWith(tp)}supportsLocator(e,r){return!!e.reference.startsWith(tp)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(tp.length);return[j.makeLocator(e,`${tp}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await He.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var aIt={fetchers:[YB,KB],resolvers:[W
2024-06-15 19:05:40 +02:00
${E}, next tree:
2024-06-21 09:01:29 +02:00
${JB(A)}`);let v=dIe(A);if(v)throw new Error(`${v}, after hoisting finished:
${JB(A)}`)}return n.debugLevel>=2&&console.log(JB(A)),dIt(A)},cIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},uIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let E;for(let I of t)E=I.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},pIe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:C,hoistedTo:F}=e,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:new Map(C),hoistedTo:new Map(F)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},AIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Nq=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Mq=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=mIt(u),p=AIt(u,A),h=t==u?new Map:a.fastLookupPossible?cIt(e):uIt(e),E,I=!1,v=!1,x=new Map(Array.from(p.entries()).map(([F,N])=>[F,N[0]])),C=new Map;do{let F=hIt(t,e,r,h,x,p,o,C,a);F.isGraphChanged&&(v=!0),F.anotherRoundNeeded&&(I=!0),E=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(x.delete(N),U.shift(),x.set(N,U[0]),E=!0)}while(E);for(let F of u.dependencies.values())if(!u.peerNames.has(F.name)&&!r.has(F.locator)){r.add(F.locator);let N=Mq(t,[...e,F],r,C,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(I=!0),r.delete(F.locator)}return{anotherRoundNeeded:I,isGraphChanged:v}},fIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},pIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let E,I=null,v=new Set;p&&(E=`${Array.from(e).map(N=>ro(N)).join("\u2192")}`);let x=r[r.length-1],F=!(o.ident===x.ident);if(p&&!F&&(I="- self-reference"),F&&(F=o.dependencyKind!==1,p&&!F&&(I="- workspace")),F&&o.dependencyKind===2&&(F=!fIt(o),p&&!F&&(I="- external soft link with unhoisted dependencies")),F&&(F=x.dependencyKind!==1||x.hoistedFrom.has(o.name)||e.size===1,p&&!F&&(I=x.reasons.get(o.name))),F&&(F=!t.peerNames.has(o.name),p&&!F&&(I=`- cannot shadow peer: ${ro(t.originalDependencies.get(o.name).locator)} at ${E}`)),F){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(I=`- filled by: ${ro(U.locator)} at ${E}`),N)for(let J=r.length-1;J>=1;J--){let ae=r[J].dependencies.get(o.name);if(ae&&ae.ident!==o.ident){N=!1;let le=A.get(x);le||(le=new Set,A.set(x,le)),le.add(o.name),p&&(I=`- filled by ${ro(ae.locator)} at ${r.slice(0,J).map(ce=>ro(ce.locator)).join("\u2192")}`);break}}F=N}if(F&&(F=n.get(o.name)===o.ident,p&&!F&&(I=`- filled by: ${ro(u.get(o.name)[0])} at ${E}`)),F){let N=!0,U=new Set(o.peerNames);for(let J=r.length-1;J>=1;J--){let te=r[J];for(let ae of U){if(
${JB(t)}`)}let Ce=Nq(ae);for(let Ae of Ce)if(Ee.has(Ae)){let ne=Be.get(Ae);if((a.get(Ae.name)===Ae.ident||!ae.reasons.has(Ae.name))&&ne.isHoistable!==0&&ae.reasons.set(Ae.name,ne.reason),!Ae.isHoistBorder&&we.indexOf(EQ(Ae))<0){E.add(ae);let xe=pIe(ae,Ae);x([...U,ae],ce,we,xe,F),E.delete(ae)}}},C,F=new Set(Nq(h)),N=Array.from(e).map(U=>EQ(U));do{C=F,F=new Set;for(let U of C){if(U.locator===h.locator||U.isHoistBorder)continue;let J=pIe(h,U);x([],Array.from(r),N,J,F)}}while(F.size>0);return{anotherRoundNeeded:I,isGraphChanged:v}},dIe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),I=()=>`${Array.from(o).concat([n]).map(v=>ro(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==E||!v||v.ident!==h.ident)&&e.push(`${I()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),C=`${v?` hoisted from ${v.join(", ")}`:""}`,F=`${x?` hoisted to ${x}`:""}`,N=`${I()}${C}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${F}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${F} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
`)},gIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Oq(r,a),ident:fIe(r,a),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},A=new Map([[t,u]]),p=(h,E)=>{let I=A.get(h),v=!!I;if(!I){let{name:x,identName:C,reference:F,peerNames:N,hoistPriority:U,dependencyKind:J}=h,te=e.hoistingLimits.get(E.locator);I={name:x,references:new Set([F]),locator:Oq(C,F),ident:fIe(C,F),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(x):!1,hoistPriority:U||0,dependencyKind:J||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,I)}if(E.dependencies.set(h.name,I),E.originalDependencies.set(h.name,I),v){let x=new Set,C=F=>{if(!x.has(F)){x.add(F),F.decoupled=!1;for(let N of F.dependencies.values())F.peerNames.has(N.name)||C(N)}};C(I)}else for(let x of h.dependencies)p(x,I)};for(let h of t.dependencies)p(h,u);return u},Uq=t=>t.substring(0,t.indexOf("@",1)),dIt=t=>{let e={name:t.name,identName:Uq(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:E,locator:I}=a;p={name:h,identName:Uq(I),references:E,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},mIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let E of A.dependencies.values()){let I=a(E);I.hoistPriority=Math.max(I.hoistPriority,E.hoistPriority),A.peerNames.has(E.name)?I.peerDependents.add(A.ident):n(A,E)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},ro=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},hIe=5e4,JB=t=>{let e=0,r=(a,n,u="")=>{if(e>hIe||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let E=A[h];if(!a.peerNames.has(E.name)&&E!==a){let I=a.reasons.get(E.name),v=Uq(E.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(v!==E.name?`a:${E.name}:`:"")+ro(E.locator)+(I?` ${I}`:"")}
2024-06-15 19:05:40 +02:00
`,p+=r(E,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>hIe?`
Tree is too large, part of the tree has been dunped
2024-06-21 09:01:29 +02:00
`:"")};var VB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(VB||{}),mIe="node_modules",P0="$wsroot$";var XB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=EIt(t,e),u=null;if(a.length===0){let A=gIe(r,{hoistingLimits:o});u=wIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},dA=t=>`${t.name}@${t.reference}`,Hq=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(z.delimiter).length,u=a.split(z.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},yIe=(t,e)=>{let r=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t,o=j.isVirtualLocator(e)?j.devirtualizeLocator(e):e;return j.areLocatorsEqual(r,o)},_q=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return z.contains(o,a)===null},yIt=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 o=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,x)=>{let C=dA(v);if(p.has(C))return;p.add(C);let F=t.getPackageInformation(v);if(F){let N=x?dA(x):"";if(dA(v)!==N&&F.linkType==="SOFT"&&!v.reference.startsWith("link:")&&!_q(F,v,t,o)){let U=EIe(F,v,t);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,J]of F.packageDependencies)J!==null&&(F.packagePeers.has(U)||h(t.getLocator(U,J),v))}};for(let v of u)h(v,null);let E=o.split(z.sep);for(let v of A.values()){let x=t.getPackageInformation(v),F=ue.toPortablePath(x.packageLocation.slice(0,-1)).split(z.sep).slice(E.length),N=n;for(let U of F){let J=N.children.get(U);J||(J={children:new Map},N.children.set(U,J)),N=J}N.workspaceLocator=v}let I=(v,x)=>{if(v.workspaceLocator){let C=dA(x),F=a.get(C);F||(F=new Set,a.set(C,F)),F.add(v.workspaceLocator)}for(let C of v.children.values())I(C,v.workspaceLocator||x)};for(let v of n.children.values())I(v,n.workspaceLocator);return a},EIt=(t,e)=>{let r=[],o=!1,a=new Map,n=yIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,I=(x,C)=>`${dA(C)}:${x}`,v=(x,C,F,N,U,J,te,ae)=>{let le=I(x,F),ce=E.get(le),we=!!ce;!we&&F.name===A.name&&F.reference===A.reference&&(ce=h,E.set(le,h));let de=_q(C,F,t,p);if(!ce){let Ae=0;de?Ae=2:C.linkType==="SOFT"&&F.name.endsWith(P0)&&(Ae=1),ce={name:x,identName:F.name,reference:F.reference,dependencies:new Set,peerNames:Ae===1?new Set:C.packagePeers,dependencyKind:Ae},E.set(le,ce)}let Be;if(de?Be=2:U.linkType==="SOFT"?Be=1:Be=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,Be),ae&&!de){let Ae=dA({name:N.identName,reference:N.reference}),ne=a.get(Ae)||new Set;a.set(Ae,ne),ne.add(ce.name)}let Ee=new Map(C.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(ue.toPortablePath(C.packageLocation.slice(0,-1)));if(Ae){let ne=new Set([...Array.from(Ae.manifest.peerDependencies.values(),Z=>j.stringifyIdent(Z)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let Z of ne)Ee.has(Z)||(Ee.set(Z,J.get(Z)||null),ce.peerNames.add(Z))}}let g=dA({name:F.name.replace(P0,""),reference:F.reference}),me=n.get(g);if(me)for(let Ae of me)Ee.set(`${Ae.name}${P0}`,Ae.reference);(C
2024-06-15 19:05:40 +02:00
`;for(let n=0,u=t.length;n<u;++n)a+=o+CQ(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
`;return a+=r,a+="]",a}function vIt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=CQ(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function PIt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],E=t[h];typeof E>"u"||(u!==0&&(n+=",",n+=`
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=CQ(h,E,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
`),n+=r,n+="}",n}function CQ(t,e,r,o){let{next:a}=CIe[r],n=a[t]||a["*"];return wIe(e,n,o)}function wIe(t,e,r){let{collapsed:o}=CIe[e];return Array.isArray(t)?o?IIt(t,e,r):BIt(t,e,r):typeof t=="object"&&t!==null?o?vIt(t,e,r):PIt(t,e,r):JSON.stringify(t)}function IIe(t){return wIe(t,"TOP_LEVEL","")}function ZB(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function DIt(t){let e=new Map,r=ZB(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function SIt(t){return ZB(t.fallbackPool||[],([e])=>e)}function bIt(t){let e=[];for(let[r,o]of ZB(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:E}]of ZB(o,([I])=>I===null?"0":`1${I}`)){let I=[];r!==null&&n!==null&&!A.has(r)&&I.push([r,n]);for(let[C,F]of ZB(A.entries(),([N])=>N))I.push([C,F]);let v=p&&p.size>0?Array.from(p):void 0,x=E||void 0;a.push([n,{packageLocation:u,packageDependencies:I,packagePeers:v,linkType:h,discardFromLookup:x}])}}return e}function $B(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:DIt(t),fallbackPool:SIt(t),packageRegistryData:bIt(t)}}var PIe=Ze(vIe());function DIe(t,e){return[t?`${t}
`:"",`/* eslint-disable */
`,`// @ts-nocheck
`,`"use strict";
`,`
`,e,`
`,(0,PIe.default)()].join("")}function xIt(t){return JSON.stringify(t,null,2)}function kIt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
`)}'`}function QIt(t){return[`const RAW_RUNTIME_STATE =
`,`${kIt(IIe(t))};
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
`,`}
`].join("")}function RIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` const fs = require('fs');
`,` const path = require('path');
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(dr.pnpData)});
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
`,`}
2024-06-21 09:01:29 +02:00
`].join("")}function SIe(t){let e=$B(t),r=QIt(e);return DIe(t.shebang,r)}function bIe(t){let e=$B(t),r=RIt(),o=DIe(t.shebang,r);return{dataFile:xIt(e),loaderFile:o}}Dt();function Gq(t,{basePath:e}){let r=ue.toPortablePath(e),o=z.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([I,v])=>[I,new Map(v.map(([x,C])=>{if(I===null!=(x===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let F=C.discardFromLookup??!1,N={name:I,reference:x},U=n.get(C.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&F,F||(U.locator=N)):n.set(C.packageLocation,{locator:N,discardFromLookup:F});let J=null;return[x,{packageDependencies:new Map(C.packageDependencies),packagePeers:new Set(C.packagePeers),linkType:C.linkType,discardFromLookup:F,get packageLocation(){return J||(J=z.join(o,C.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([I,v])=>[I,new Set(v)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}Dt();Dt();var ip=ve("module"),gm=ve("url"),$q=ve("util");var Oo=ve("url");var RIe=Ze(ve("assert"));var jq=Array.isArray,ev=JSON.stringify,tv=Object.getOwnPropertyNames,hm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Yq=(t,e)=>RegExp.prototype.exec.call(t,e),Wq=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),D0=(t,...e)=>String.prototype.endsWith.apply(t,e),Kq=(t,...e)=>String.prototype.includes.apply(t,e),zq=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),rv=(t,...e)=>String.prototype.indexOf.apply(t,e),xIe=(t,...e)=>String.prototype.replace.apply(t,e),S0=(t,...e)=>String.prototype.slice.apply(t,e),mA=(t,...e)=>String.prototype.startsWith.apply(t,e),kIe=Map,QIe=JSON.parse;function nv(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var FIe=nv("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),Jq=nv("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),TIe=nv("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!mA(r,"./");return e==="."?((0,RIe.default)(o===!1),`Invalid "exports" main target ${ev(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${ev(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),iv=nv("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),LIe=nv("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var IQ=ve("url");function NIe(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];hm(t,a)&&(r[a]=t[a])}return r}var wQ=new kIe;function FIt(t,e,r,o){let a=wQ.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let x={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return wQ.set(t,x),x}let u;try{u=QIe(n)}catch(x){throw new iv(t,(r?`"${e}" from `:"")+(0,IQ.fileURLToPath)(r||e),x.message)}let{imports:A,main:p,name:h,type:E}=NIe(u,["imports","main","name","type"]),I=hm(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let v={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:I,imports:A};return wQ.set(t,v),v}function OIe(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;i
2024-06-15 19:05:40 +02:00
`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
2024-06-21 09:01:29 +02:00
`),r}Dt();var[Ma,np]=process.versions.node.split(".").map(t=>parseInt(t,10)),JIe=Ma>19||Ma===19&&np>=2||Ma===18&&np>=13,DVt=Ma===20&&np<6||Ma===19&&np>=3,SVt=Ma>19||Ma===19&&np>=6,bVt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=19,xVt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=20,kVt=Ma>=22;function VIe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(mi.resolveVirtual(ue.toPortablePath(e)))),JIe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function eG(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Te of["react-scripts","gatsby"]){let Re=t.packageRegistry.get(Te);if(Re)for(let ke of Re.keys()){if(ke===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Te,reference:ke})}}let{ignorePattern:I,packageRegistry:v,packageLocatorsByLocations:x}=t;function C(Te,Re){return{fn:Te,args:Re,error:null,result:null}}function F(Te){let Re=process.stderr?.hasColors?.()??process.stdout.isTTY,ke=(et,Ue)=>`\x1B[${et}m${Ue}\x1B[0m`,Ye=Te.error;console.error(Ye?ke("31;1",`\u2716 ${Te.error?.message.replace(/\n.*/s,"")}`):ke("33;1","\u203C Resolution")),Te.args.length>0&&console.error();for(let et of Te.args)console.error(` ${ke("37;1","In \u2190")} ${(0,$q.inspect)(et,{colors:Re,compact:!0})}`);Te.result&&(console.error(),console.error(` ${ke("37;1","Out \u2192")} ${(0,$q.inspect)(Te.result,{colors:Re,compact:!0})}`));let Se=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Se.length>0){console.error();for(let et of Se)console.error(` ${ke("38;5;244",et)}`)}console.error()}function N(Te,Re){if(e.allowDebug===!1)return Re;if(Number.isFinite(o)){if(o>=2)return(...ke)=>{let Ye=C(Te,ke);try{return Ye.result=Re(...ke)}catch(Se){throw Ye.error=Se}finally{F(Ye)}};if(o>=1)return(...ke)=>{try{return Re(...ke)}catch(Ye){let Se=C(Te,ke);throw Se.error=Ye,F(Se),Ye}}}return Re}function U(Te){let Re=g(Te);if(!Re)throw es("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Re}function J(Te){if(Te.name===null)return!0;for(let Re of t.dependencyTreeRoots)if(Re.name===Te.name&&Re.reference===Te.reference)return!0;return!1}let te=new Set(["node","require",...zIe("--conditions")]);function ae(Te,Re=te,ke){let Ye=Ae(z.join(Te,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw es("INTERNAL",`The locator that owns the "${Te}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Se}=U(Ye),et=z.join(Se,dr.manifest);if(!e.fakeFs.existsSync(et))return null;let Ue=JSON.parse(e.fakeFs.readFileSync(et,"utf8"));if(Ue.exports==null)return null;let b=z.contains(Se,Te);if(b===null)throw es("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");b!=="."&&!A.test(b)&&(b=`./${b}`);try{let w=qIe({packageJSONUrl:(0,gm.pathToFileURL)(ue.fromPortablePath(et)),packageSubpath:b,exports:Ue.exports,base:ke?(0,gm.pathToFileURL)(ue.fromPortablePath(ke)):null,conditions:Re});return ue.toPortablePath((0,gm.fileURLToPath)(w))}catch(w){throw es("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:lu(Te),locator:Ye,pkgJson:Ue,subpath:lu(b),conditions:Re},w.code)}}function le(Te,Re,{extensions:ke}){let Ye;try{Re.push(Te),Ye=e.fakeFs.statSync(Te)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Te);if(Ye&&Ye.isDirectory()){let Se;try{Se=JSON.parse(e.fakeFs.readFileSync(z.join(Te,dr.manifest),"utf8"))}catch{}let et;if(Se&&Se.main&&(et=z.resolve(Te,Se.main)),et&&et!==Te){let Ue=le(et,Re,{extensions:ke});if(Ue!==null)return Ue}}for(let Se=0,et=ke.length;Se<et;Se++){let Ue=`${Te}${ke[Se]}`;if(Re.push(Ue),e.fakeFs.existsSync(Ue))return Ue}if(Ye&&Ye.isDir
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Require request: "${Ye}"
Required by: ${Se}
`,{request:Ye,issuer:Se});return ue.toPortablePath(b)}let et,Ue=Te.match(a);if(Ue){if(!Re)throw es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Se});let[,b,w]=Ue,S=Ae(Re);if(!S){let Fe=we(Te,Re);if(Fe===!1)throw es("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).
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Require path: "${Ye}"
Required by: ${Se}
`,{request:Ye,issuer:Se});return ue.toPortablePath(Fe)}let R=U(S).packageDependencies.get(b),V=null;if(R==null&&S.name!==null){let Fe=t.fallbackExclusionList.get(S.name);if(!Fe||!Fe.has(S.reference)){for(let dt=0,Gt=h.length;dt<Gt;++dt){let bt=U(h[dt]).packageDependencies.get(b);if(bt!=null){r?V=bt:R=bt;break}}if(t.enableTopLevelFallback&&R==null&&V===null){let dt=t.fallbackPool.get(b);dt!=null&&(V=dt)}}}let X=null;if(R===null)if(J(S))X=es("MISSING_PEER_DEPENDENCY",`Your application tried to access ${b} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${Se}
`,{request:Ye,issuer:Se,dependencyName:b});else{let Fe=Ce(b,S);Fe.every(at=>J(at))?X=es("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${b} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${S.name}@${S.reference} (via ${Se})
${Fe.map(at=>`Ancestor breaking the chain: ${at.name}@${at.reference}
2024-06-15 19:05:40 +02:00
`).join("")}
2024-06-21 09:01:29 +02:00
`,{request:Ye,issuer:Se,issuerLocator:Object.assign({},S),dependencyName:b,brokenAncestors:Fe}):X=es("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${b} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${S.name}@${S.reference} (via ${Se})
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
${Fe.map(at=>`Ancestor breaking the chain: ${at.name}@${at.reference}
2024-06-15 19:05:40 +02:00
`).join("")}
2024-06-21 09:01:29 +02:00
`,{request:Ye,issuer:Se,issuerLocator:Object.assign({},S),dependencyName:b,brokenAncestors:Fe})}else R===void 0&&(!ke&&(0,ip.isBuiltin)(Te)?J(S)?X=es("UNDECLARED_DEPENDENCY",`Your application tried to access ${b}. 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 ${b} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${Se}
`,{request:Ye,issuer:Se,dependencyName:b}):X=es("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${b}. 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 ${b} isn't otherwise declared in ${S.name}'s dependencies, this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${Se}
`,{request:Ye,issuer:Se,issuerLocator:Object.assign({},S),dependencyName:b}):J(S)?X=es("UNDECLARED_DEPENDENCY",`Your application tried to access ${b}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${Se}
`,{request:Ye,issuer:Se,dependencyName:b}):X=es("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${b}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${b}${b!==Ye?` (via "${Ye}")`:""}
Required by: ${S.name}@${S.reference} (via ${Se})
`,{request:Ye,issuer:Se,issuerLocator:Object.assign({},S),dependencyName:b}));if(R==null){if(V===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");R=V;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&o!==0&&(E.add(Fe),process.emitWarning(X))}let $=Array.isArray(R)?{name:R[0],reference:R[1]}:{name:b,reference:R},ie=U($);if(!ie.packageLocation)throw es("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.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Required package: ${$.name}@${$.reference}${$.name!==Ye?` (via "${Ye}")`:""}
Required by: ${S.name}@${S.reference} (via ${Se})
`,{request:Ye,issuer:Se,dependencyLocator:Object.assign({},$)});let be=ie.packageLocation;w?et=z.join(be,w):et=be}else if(z.isAbsolute(Te))et=z.normalize(Te);else{if(!Re)throw es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Se});let b=z.resolve(Re);Re.match(u)?et=z.normalize(z.join(b,Te)):et=z.normalize(z.join(z.dirname(b),Te))}return z.normalize(et)}function xe(Te,Re,ke=te,Ye){if(n.test(Te))return Re;let Se=ae(Re,ke,Ye);return Se?z.normalize(Se):Re}function Le(Te,{extensions:Re=Object.keys(ip.Module._extensions)}={}){let ke=[],Ye=le(Te,ke,{extensions:Re});if(Ye)return z.normalize(Ye);{VIe(ke.map(Ue=>ue.fromPortablePath(Ue)));let Se=lu(Te),et=Ae(Te);if(et){let{packageLocation:Ue}=U(et),b=!0;try{e.fakeFs.accessSync(Ue)}catch(w){if(w?.code==="ENOENT")b=!1;else{let S=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw es("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${S}).
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Missing package: ${et.name}@${et.reference}
Expected package location: ${lu(Ue)}
`,{unqualifiedPath:Se,extensions:Re})}}if(!b){let w=Ue.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 es("QUALIFIED_PATH_RESOLUTION_FAILED",`${w}
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Missing package: ${et.name}@${et.reference}
Expected package location: ${lu(Ue)}
`,{unqualifiedPath:Se,extensions:Re})}}throw es("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
2024-06-15 19:05:40 +02:00
2024-06-21 09:01:29 +02:00
Source path: ${Se}
${ke.map(Ue=>`Not found: ${lu(Ue)}
`).join("")}`,{unqualifiedPath:Se,extensions:Re})}}function ht(Te,Re,ke){if(!Re)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ye=GIe({name:Te,base:(0,gm.pathToFileURL)(ue.fromPortablePath(Re)),conditions:ke.conditions??te,readFileSyncFn:ne});if(Ye instanceof URL)return Le(ue.toPortablePath((0,gm.fileURLToPath)(Ye)),{extensions:ke.extensions});if(Ye.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(Ye,Re,ke)}function H(Te,Re,ke={}){try{if(Te.startsWith("#"))return ht(Te,Re,ke);let{considerBuiltins:Ye,extensions:Se,conditions:et}=ke,Ue=Z(Te,Re,{considerBuiltins:Ye});if(Te==="pnpapi")return Ue;if(Ue===null)return null;let b=()=>Re!==null?de(Re):!1,w=(!Ye||!(0,ip.isBuiltin)(Te))&&!b()?xe(Te,Ue,et,Re):Ue;return Le(w,{extensions:Se})}catch(Ye){throw Object.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:lu(Te),issuer:Re&&lu(Re)}),Ye}}function rt(Te){let Re=z.normalize(Te),ke=mi.resolveVirtual(Re);return ke!==Re?ke:null}return{VERSIONS:Be,topLevel:Ee,getLocator:(Te,Re)=>Array.isArray(Re)?{name:Re[0],reference:Re[1]}:{name:Te,reference:Re},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Te=[];for(let[Re,ke]of v)for(let Ye of ke.keys())Re!==null&&Ye!==null&&Te.push({name:Re,reference:Ye});return Te},getPackageInformation:Te=>{let Re=g(Te);if(Re===null)return null;let ke=ue.fromPortablePath(Re.packageLocation);return{...Re,packageLocation:ke}},findPackageLocator:Te=>Ae(ue.toPortablePath(Te)),resolveToUnqualified:N("resolveToUnqualified",(Te,Re,ke)=>{let Ye=Re!==null?ue.toPortablePath(Re):null,Se=Z(ue.toPortablePath(Te),Ye,ke);return Se===null?null:ue.fromPortablePath(Se)}),resolveUnqualified:N("resolveUnqualified",(Te,Re)=>ue.fromPortablePath(Le(ue.toPortablePath(Te),Re))),resolveRequest:N("resolveRequest",(Te,Re,ke)=>{let Ye=Re!==null?ue.toPortablePath(Re):null,Se=H(ue.toPortablePath(Te),Ye,ke);return Se===null?null:ue.fromPortablePath(Se)}),resolveVirtual:N("resolveVirtual",Te=>{let Re=rt(ue.toPortablePath(Te));return Re!==null?ue.fromPortablePath(Re):null})}}Dt();var XIe=(t,e,r)=>{let o=$B(t),a=Gq(o,{basePath:e}),n=ue.join(e,dr.pnpCjs);return eG(a,{fakeFs:r,pnpapiResolution:n})};var rG=Ze($Ie());qt();var yA={};zt(yA,{checkManifestCompatibility:()=>e1e,extractBuildRequest:()=>BQ,getExtractHint:()=>nG,hasBindingGyp:()=>iG});je();Dt();function e1e(t){return j.isPackageCompatible(t,Vi.getArchitectureSet())}function BQ(t,e,r,{configuration:o}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${j.prettyLocator(o,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?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${j.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${j.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`)}:e1e(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${j.prettyLocator(o,t)} The ${Vi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var YIt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function nG(t){return t.packageFs.getExtractHint({relevantExtensions:YIt})}function iG(t){let e=z.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var lv={};zt(lv,{getUnpluggedPath:()=>av});je();Dt();function av(t,{configuration:e}){return z.resolve(e.get("pnpUnpluggedFolder"),j.slugifyLocator(t))}var WIt=new Set([j.makeIdent(null,"open").identHash,j.makeIdent(null,"opn").identHash]),b0=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return J
2024-06-15 19:05:40 +02:00
`,n+=`# cause your node_modules installation to become invalidated.
`,n+=`
`,n+=`__metadata:
`,n+=` version: ${p1e}
`,n+=` nmMode: ${o.value}
`;let u=Array.from(e.keys()).sort(),A=j.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of u){let I=e.get(E);n+=`
`,n+=`${JSON.stringify(E)}:
`,n+=` locations:
`;for(let v of I.locations){let x=z.contains(t.cwd,v);if(x===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(x)}
`}if(I.aliases.length>0){n+=` aliases:
`;for(let v of I.aliases)n+=` - ${JSON.stringify(v)}
`}if(E===A&&r.size>0){n+=` bin:
`;for(let[v,x]of r){let C=z.contains(t.cwd,v);if(C===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(C)}:
`;for(let[F,N]of x){let U=z.relative(z.join(v,Di),N);n+=` ${JSON.stringify(F)}: ${JSON.stringify(U)}
2024-06-21 09:01:29 +02:00
`}}}}let p=t.cwd,h=z.join(p,Di,h1e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function fG(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=z.join(r,Di,h1e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Ki(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>p1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let I=E.locations.map(x=>z.join(r,x)),v=E.bin;if(v)for(let[x,C]of Object.entries(v)){let F=z.join(r,ue.toPortablePath(x)),N=He.getMapWithDefault(p,F);for(let[U,J]of Object.entries(C))N.set(U,ue.toPortablePath([F,Di,J].join(z.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:I,aliases:E.aliases||[]}),e&&E.aliases)for(let x of E.aliases){let{scope:C,name:F}=j.parseLocator(h),N=j.makeLocator(j.makeIdent(C,F),x),U=j.stringifyLocator(N);A.set(U,{target:Bt.dot,linkType:"HARD",locations:I,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:g1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var jC=async(t,e)=>{if(t.split(z.sep).indexOf(Di)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await oe.statPromise(t):await oe.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(t);return}}let r=await oe.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=z.join(t,o.name);o.isDirectory()?(o.name!==Di||e&&e.innerLoop)&&await jC(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}e.contentsOnly||await oe.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},c1e=4,PQ=(t,{skipPrefix:e})=>{let r=z.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(z.sep).filter(p=>p!==""),a=o.indexOf(Di),n=o.slice(0,a).join(z.sep),u=z.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},g1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&z.contains(e,n.target)!==null){let A=He.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=PQ(u,{skipPrefix:e}),h=He.getFactoryWithDefault(r,A,o);for(let E=0;E<p.length;++E){let I=p[E];if(I!=="."){let v=He.getFactoryWithDefault(h.children,I,o);h.children.set(I,v),h=v}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},gG=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await oe.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await oe.symlinkPromise(t,e,"junction");return}}await oe.symlinkPromise(z.relative(z.dirname(e),t),e)};async function d1e(t,e,r){let o=z.join(t,`${pG.default.randomBytes(16).toString("hex")}.tmp`);try{await oe.writeFilePromise(o,r);try{await oe.linkPromise(o,e)}catch{}}finally{await oe.unlinkPromise(o)}}async function m1t({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===m1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=z.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await oe.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-h1t))if(await wn.checksumFile(A,{baseFs:oe,algorithm:"sha1"})!==r.digest){let I=z.join(o,`${pG.default.randomBytes(16).toString("hex")}.tmp`);await oe.renamePromise(A,I);let v=await a.readFilePromise(t);await oe.writeFilePromise(I,v);try{await oe.linkPromise(I,A),r.mtimeMs=new Date().getTime(),await oe.unlinkPromise(I)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await oe.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await d1e(o,A,h),r.mtimeMs=new Date().getTime();try{await oe.linkPromise(A,e)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await oe.chmodPromise(e,u)}}var m1e
2024-06-15 19:05:40 +02:00
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,wG.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
2024-06-21 09:01:29 +02:00
`),o}function bQ(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function WC(t){return{["npm-otp"]:t}}var pv=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let{selector:o,params:a}=j.parseRange(e.reference);return!(!D1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=j.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await ym(o.__archiveUrl,{customErrorMessage:mm,configuration:r.project.configuration,ident:e});return await Zi.convertToZip(a,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(e),stripComponents:1})}};je();var hv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Wn)||!j.tryParseDescriptor(e.range.slice(Wn.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};je();je();var S1e=Ze(Vn());var ml=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let o=new URL(e.reference);return!(!S1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await ym(ml.getLocatorUrl(e),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}catch{o=await ym(ml.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}return await Zi.convertToZip(o,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=YC(e.scope,{configuration:o}),n=ml.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Lr.clean(e.reference.slice(Wn.length));if(r===null)throw new Vt(10,"The npm semver resolver got selected, but the version isn't semver");return`${DQ(e)}/-/${e.name}-${r}.tgz`}};je();je();je();var BG=Ze(Vn());var xQ=j.makeIdent(null,"node-gyp"),U1t=/\b(node-gyp|prebuild-install)\b/,gv=class{supportsDescriptor(e,r){return e.range.startsWith(Wn)?!!Lr.validRange(e.range.slice(Wn.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(Wn))return!
`;try{a=await oe.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var gj={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},EBe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Mvt={configuration:{...gj,...EBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...gj,...EBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:ac,valueDefinition:{description:"",type:"SHAPE",properties:{...gj}}}},fetchers:[pv,ml],resolvers:[hv,gv,dv]},Uvt=Mvt;var Pj={};zt(Pj,{NpmAuditCommand:()=>q0,NpmInfoCommand:()=>G0,NpmLoginCommand:()=>j0,NpmLogoutCommand:()=>Y0,NpmPublishCommand:()=>W0,NpmTagAddCommand:()=>z0,NpmTagListCommand:()=>K0,NpmTagRemoveCommand:()=>J0,NpmWhoamiCommand:()=>V0,default:()=>Wvt,npmAuditTypes:()=>Tv,npmAuditUtils:()=>$Q});je();je();qt();var wj=Ze(Xo());$a();var Tv={};zt(Tv,{Environment:()=>Rv,Severity:()=>Fv});var Rv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Rv||{}),Fv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Fv||{});var $Q={};zt($Q,{allSeverities:()=>sw,getPackages:()=>Cj,getReportTree:()=>yj,getSeverityInclusions:()=>mj,getTopLevelDependencies:()=>Ej});je();var CBe=Ze(Vn());var sw=["info","low","moderate","high","critical"];function mj(t){if(typeof t>"u")return new Set(sw);let e=sw.indexOf(t),r=sw.slice(e);return new Set(r)}function yj(t){let e={},r={children:e};for(let[o,a]of He.sortMap(Object.entries(t),n=>n[0]))for(let n of He.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:pe.tuple(pe.Type.IDENT,j.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:pe.tuple(pe.Type.ID,n.id)},Issue:{label:"Issue",value:pe.tuple(pe.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:pe.tuple(pe.Type.URL,n.url)},Severity:{label:"Severity",value:pe.tuple(pe.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:pe.tuple(pe.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(CBe.default.compare).map(u=>({value:pe.tuple(pe.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:He.sortMap(n.dependents,u=>j.stringifyLocator(u)).map(u=>({value:pe.tuple(pe.Type.LOCATOR,u)}))}}};return r}function Ej(t,e,{all:r,environment:o}){let a=[],n=r?t.workspaces:[e],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function Cj(t,e,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(j.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let v=j.stringifyIdent(E),x=He.getMapWithDefault(o,v);He.getArrayWithDefault(x,E.version).push(A)}if(r)for(let v of E.dependencies.values())n.push([E,v])};for(let{workspace:A,dependency:p}of e)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var q0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",
2024-06-15 19:05:40 +02:00
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 ${sw.map(r=>`\`${r}\``).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.
2024-06-21 09:01:29 +02:00
`,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"]]});je();je();Dt();qt();var Ij=Ze(Vn()),Bj=ve("util"),G0=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h==="."){let ae=o.topLevelWorkspace;if(!ae.manifest.name)throw new st(`Missing ${pe.pretty(r,"name",pe.Type.CODE)} field in ${ue.fromPortablePath(z.join(ae.cwd,dr.manifest))}`);E=j.makeDescriptor(ae.manifest.name,"unknown")}else E=j.parseDescriptor(h);let I=Zr.getIdentUrl(E),v=vj(await Zr.get(I,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:Zr.customPackageError})),x=Object.keys(v.versions).sort(Ij.default.compareLoose),F=v["dist-tags"].latest||x[x.length-1],N=Lr.validRange(E.range);if(N){let ae=Ij.default.maxSatisfying(x,N);ae!==null?F=ae:(p.reportWarning(0,`Unmet range ${j.prettyRange(r,E.range)}; falling back to the latest version`),u=!0)}else Object.hasOwn(v["dist-tags"],E.range)?F=v["dist-tags"][E.range]:E.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${j.prettyRange(r,E.range)}; falling back to the latest version`),u=!0);let U=v.versions[F],J={...v,...U,version:F,versions:x},te;if(a!==null){te={};for(let ae of a){let le=J[ae];if(typeof le<"u")te[ae]=le;else{p.reportWarning(1,`The ${pe.pretty(r,ae,pe.Type.CODE)} field doesn't exist inside ${j.prettyIdent(r,E)}'s information`),u=!0;continue}}}else this.json||(delete J.dist,delete J.readme,delete J.users),te=J;p.reportJson(te),this.json||n.push(te)}});Bj.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
2024-06-15 19:05:40 +02:00
`),this.context.stdout.write(`${(0,Bj.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
2024-06-21 09:01:29 +02:00
`);return A.exitCode()}};G0.paths=[["npm","info"]],G0.usage=it.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"]]});function vj(t){if(Array.isArray(t)){let e=[];for(let r of t)r=vj(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 o=vj(t[r]);o&&(e[r]=o)}return e}else return t||null}je();je();qt();var wBe=Ze(p2()),j0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await eR({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ft.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await qvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=await _vt(o,u,r);return await Hvt(o,A,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};j0.paths=[["npm","login"]],j0.usage=it.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"]]});async function eR({scope:t,publish:e,configuration:r,cwd:o}){return t&&
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Lv(t,e){let r=`/-/package${Zr.getIdentUrl(t)}/dist-tags`;return Zr.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Zr.customPackageError})}var z0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);let n=j.parseDescriptor(this.package,!0),u=n.range;if(!BBe.default.valid(u))throw new st(`The range ${pe.pretty(r,n.range,pe.Type.RANGE)} must be a valid semver version`);let A=$n.getPublishRegistry(a.manifest,{configuration:r}),p=pe.pretty(r,n,pe.Type.IDENT),h=pe.pretty(r,u,pe.Type.RANGE),E=pe.pretty(r,this.tag,pe.Type.CODE);return(await Ft.start({configuration:r,stdout:this.context.stdout},async v=>{let x=await Lv(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===u&&v.reportWarning(0,`Tag ${E} is already set to version ${h}`);let C=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Zr.put(C,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};z0.paths=[["npm","tag","add"]],z0.usage=it.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
2024-06-15 19:05:40 +02:00
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.
2024-06-21 09:01:29 +02:00
`,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"]]});je();qt();var J0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){if(this.tag==="latest")throw new st("The 'latest' tag cannot be removed.");let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);let n=j.parseIdent(this.package),u=$n.getPublishRegistry(a.manifest,{configuration:r}),A=pe.pretty(r,this.tag,pe.Type.CODE),p=pe.pretty(r,n,pe.Type.IDENT),h=await Lv(n,r);if(!Object.hasOwn(h,this.tag))throw new st(`${A} is not a tag of package ${p}`);return(await Ft.start({configuration:r,stdout:this.context.stdout},async I=>{let v=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Zr.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),I.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};J0.paths=[["npm","tag","remove"]],J0.usage=it.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
2024-06-15 19:05:40 +02:00
This command will remove a tag from a package from the npm registry.
2024-06-21 09:01:29 +02:00
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});je();je();qt();var V0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=$n.getScopeRegistry(this.scope,{configuration:r,type:$n.RegistryType.PUBLISH_REGISTRY}):this.scope?o=$n.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=$n.getPublishRegistry((await uC(r,this.context.cwd)).manifest,{configuration:r}):o=$n.getDefaultRegistry({configuration:r}),(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await Zr.get("/-/whoami",{configuration:r,registry:o,authType:Zr.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?j.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};V0.paths=[["npm","whoami"]],V0.usage=it.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 Yvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[q0,G0,j0,Y0,W0,z0,K0,J0,V0]},Wvt=Yvt;var Rj={};zt(Rj,{PatchCommand:()=>$0,PatchCommitCommand:()=>Z0,PatchFetcher:()=>_v,PatchResolver:()=>Hv,default:()=>uPt,patchUtils:()=>Pm});je();je();Dt();iA();var Pm={};zt(Pm,{applyPatchFile:()=>rR,diffFolders:()=>kj,ensureUnpatchedDescriptor:()=>Dj,ensureUnpatchedLocator:()=>iR,extractPackageToDisk:()=>xj,extractPatchFlags:()=>kBe,isParentRequired:()=>bj,isPatchDescriptor:()=>nR,isPatchLocator:()=>X0,loadPatchFiles:()=>Uv,makeDescriptor:()=>sR,makeLocator:()=>Sj,makePatchHash:()=>Qj,parseDescriptor:()=>Ov,parseLocator:()=>Mv,parsePatchFile:()=>Nv,unpatchDescriptor:()=>aPt,unpatchLocator:()=>lPt});je();Dt();je();Dt();var Kvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function aw(t){return z.relative(Bt.root,z.resolve(Bt.root,ue.toPortablePath(t)))}function zvt(t){let e=t.trim().match(Kvt);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 Jvt=420,Vvt=493;var vBe=()=>({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:null,hunks:null}),Xvt=t=>({header:zvt(t),parts:[]}),Zvt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function $vt(t){let e=[],r=vBe(),o="parsing header
2024-06-15 19:05:40 +02:00
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
2024-06-21 09:01:29 +02:00
`):"";await e.mkdirpPromise(z.dirname(a.path),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,vi.SAFE_TIME,vi.SAFE_TIME)}break;case"patch":await cw(e,a.path,async()=>{await iPt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(PBe(a.newMode)!==PBe(u))continue;await cw(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:He.assertNever(a);break}}function PBe(t){return(t&64)>0}function DBe(t){return t.replace(/\s+$/,"")}function nPt(t,e){return DBe(t)===DBe(e)}async function iPt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let I of t){let v=Math.max(h,I.header.patched.start+p),x=Math.max(0,v-h),C=Math.max(0,u.length-v-I.header.original.length),F=Math.max(x,C),N=0,U=0,J=null;for(;N<=F;){if(N<=x&&(U=v-N,J=SBe(I,u,U),J!==null)){N=-N;break}if(N<=C&&(U=v+N,J=SBe(I,u,U),J!==null))break;N+=1}if(J===null)throw new lw(t.indexOf(I),I);A.push(J),p+=N,h=U+I.header.original.length}if(o)return;let E=0;for(let I of A)for(let v of I)switch(v.type){case"splice":{let x=v.index+E;u.splice(x,v.numToDelete,...v.linesToInsert),E+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:He.assertNever(v);break}await r.writeFilePromise(e,u.join(`
2024-06-15 19:05:40 +02:00
`),{mode:a})}function SBe(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!nPt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:He.assertNever(a.type);break}return o}var oPt=/^builtin<([^>]+)>$/;function uw(t,e){let{protocol:r,source:o,selector:a,params:n}=j.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],A=n&&typeof n.locator=="string"?j.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function nR(t){return t.range.startsWith("patch:")}function X0(t){return t.reference.startsWith("patch:")}function Ov(t){let{sourceItem:e,...r}=uw(t.range,j.parseDescriptor);return{...r,sourceDescriptor:e}}function Mv(t){let{sourceItem:e,...r}=uw(t.reference,j.parseLocator);return{...r,sourceLocator:e}}function aPt(t){let{sourceItem:e}=uw(t.range,j.parseDescriptor);return e}function lPt(t){let{sourceItem:e}=uw(t.reference,j.parseLocator);return e}function Dj(t){if(!nR(t))return t;let{sourceItem:e}=uw(t.range,j.parseDescriptor);return e}function iR(t){if(!X0(t))return t;let{sourceItem:e}=uw(t.reference,j.parseLocator);return e}function bBe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:j.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return j.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function sR(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return j.makeDescriptor(t,bBe({parentLocator:e,sourceItem:r,patchPaths:o},j.stringifyDescriptor))}function Sj(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return j.makeLocator(t,bBe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},j.stringifyLocator))}function xBe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(oPt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):z.isAbsolute(a)?t(a):e(a)}function kBe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function bj(t){return xBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function Uv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await He.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=kBe(u),p=await xBe({onAbsolute:async h=>await oe.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(z.join(a.prefixPath,h),"utf8")},onProject:async h=>await oe.readFilePromise(z.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
`));return n}async function xj(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=iR(t),n=r.storedChecksums,u=new Qi,A=await oe.mktempPromise(),p=z.join(A,"source"),h=z.join(A,"user"),E=z.join(A,".yarn-patch.json"),I=r.configuration.makeFetcher(),v=[];try{let x,C;if(t.locatorHash===a.locatorHash){let F=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u});v.push(()=>F.releaseFs?.()),x=F,C=F}else x=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>x.releaseFs?.()),C=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>C.releaseFs?.());await Promise.all([oe.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),oe.copyPromise(h,C.prefixPath,{baseFs:C.packageFs}),oe.writeJsonPromise(E,{locator:j.stringifyLocator(t),version:o.version})])}finally{for(let x of v)x()}return oe.detachTemp(A),h}async function kj(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),o=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Ur.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,o],{cwd:ue.toPortablePath(process.cwd()),env:{...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':
2024-06-21 09:01:29 +02:00
${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${He.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${He.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(He.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(He.escapeRegExp(`${o}/`),"g"),"")}function Qj(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=Nv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Lr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return wn.makeHash(`${3}`,...r).slice(0,6)}je();function QBe(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${pe.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${pe.pretty(e,a,pe.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${pe.pretty(e,a,pe.Type.ADDED)}`);break;default:He.assertNever(o.type)}}var _v=class{supports(e,r){return!!X0(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.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:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Mv(e),A=await Uv(o,u,r),p=await oe.mktempPromise(),h=z.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),I=j.getIdentVendorPath(e),v=new Xi(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await He.releaseAfterUseAsync(async()=>{await v.copyPromise(I,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),v.saveAndClose();for(let{source:x,optional:C}of A){if(x===null)continue;let F=new Xi(h,{level:r.project.configuration.get("compressionLevel")}),N=new gn(z.resolve(Bt.root,I),{baseFs:F});try{await rR(Nv(x),{baseFs:N,version:n})}catch(U){if(!(U instanceof lw))throw U;let J=r.project.configuration.get("enableInlineHunks"),te=!J&&!C?" (set enableInlineHunks for details)":"",ae=`${j.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,le=ce=>{!J||QBe(U.hunk,{configuration:r.project.configuration,report:ce})};if(F.discardAndClose(),C){r.report.reportWarningOnce(66,ae,{reportExtra:le});continue}else throw new Vt(66,ae,le)}F.saveAndClose()}return new Xi(h,{level:r.project.configuration.get("compressionLevel")})}};je();var Hv=class{supportsDescriptor(e,r){return!!nR(e)}supportsLocator(e,r){return!!X0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=Ov(e);return a.every(n=>!bj(n))?e:j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=Ov(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Ov(e),u=await Uv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=Qj(u,A.version);return[Sj(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=Mv(e);return{...await r.resolver.resolve(o,r),...e}}};je();Dt();qt();var Z0=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=z.resolve(this.context.cwd,ue.toPortablePat
2024-06-15 19:05:40 +02:00
${A.map(p=>`
2024-06-21 09:01:29 +02:00
- ${j.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new st("No package found in the project for the given locator");await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=iR(u),h=await xj(u,{cache:n,project:o});A.reportJson({locator:j.stringifyLocator(p),path:ue.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${j.prettyLocator(r,p)} got extracted with success${E}!`),A.reportInfo(0,`You can now edit the following folder: ${pe.pretty(r,ue.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${pe.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};$0.paths=[["patch"]],$0.usage=it.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 cPt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[Z0,$0],fetchers:[_v],resolvers:[Hv]},uPt=cPt;var Lj={};zt(Lj,{PnpmLinker:()=>qv,default:()=>gPt});je();Dt();qt();var qv=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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new st(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new st(`Couldn't find ${j.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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new st(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=z.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new Fj(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},Fj=class{constructor(e){this.opts=e;this.asyncActions=new He.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=SP(oe,{indexPath:z.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=z.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?z.join(a,dr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{pa
2024-06-15 19:05:40 +02:00
${mPt}
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>ue.fromPortablePath(o.path));await Ur.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var IPt=[OBe],eg=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),{driver:a,root:n}=await BPt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(I=>I.populateYarnPaths,o,I=>{u.push(I)});let A=new Set;for(let I of u)for(let v of vPt(n,I))A.add(v);let p=new Set([r.get("rcFilename"),dr.lockfile,dr.manifest]),h=await a.filterChanges(n,A,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
`);else for(let I of h)this.context.stdout.write(`${ue.fromPortablePath(I.path)}
2024-06-21 09:01:29 +02:00
`);else if(this.reset){let I=await a.filterChanges(n,A,p,{staged:!0});I.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,I)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};eg.paths=[["stage"]],eg.usage=it.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"]]});async function BPt(t){let e=null,r=null;for(let o of IPt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new st("No stage driver has been found for your current project");return{driver:e,root:r}}function vPt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=oe.statSync(e)}catch{break}if(o.isSymbolicLink())e=z.resolve(z.dirname(e),oe.readlinkSync(e));else break}return r}var PPt={commands:[eg]},DPt=PPt;var Gj={};zt(Gj,{default:()=>TPt});je();je();Dt();var _Be=Ze(Vn());je();var MBe=Ze(VH()),SPt="e8e1bd300d860104bb8c58453ffa1eb4",bPt="OFCNCOG2CU",UBe=async(t,e)=>{let r=j.stringifyIdent(t),a=xPt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},xPt=t=>(0,MBe.default)(bPt,SPt,{requester:{async send(r){try{let o=await sn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var HBe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,kPt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(a.cwd,"tsconfig.json")))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Qi};if(!await UBe(r,n))return;let E=HBe(r),I=j.parseRange(r.range).selector;if(!Lr.validRange(I)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);I=j.parseRange(U[0].reference).selector}let v=_Be.default.coerce(I);if(v===null)return;let x=`${Xc.Modifier.CARET}${v.major}`,C=j.makeDescriptor(j.makeIdent("types",E),x),F=He.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,J=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&J!==r.descriptorHash)return He.mapAndFind.skip;let te=[];for(let ae of Ot.allDependencies){let le=N.manifest[ae].get(C.identHash);typeof le>"u"||te.push([ae,le])}return te.length===0?He.mapAndFind.skip:te});if(typeof F<"u")for(let[N,U]of F)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(C);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xc.Target.DEVELOPMENT].set(C.identHash,C)}},QPt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(o.cwd,"tsconfig.json")))))return;let u=HBe(r),A=j.makeIdent("types",u);for(let p of Ot.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.iden
2024-06-15 19:05:40 +02:00
- ${A.map(x=>ue.fromPortablePath(x)).join(`
2024-06-21 09:01:29 +02:00
- `)}`);let p=new Set(He.mapAndFilter(n,x=>{let C=t.tryWorkspaceByFilePath(x);return C===null?He.mapAndFilter.skip:C}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:z.join(u,`${wn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=oe.existsSync(h)?await oe.readFilePromise(h,"utf8"):"{}",I=Ki(E),v=new Map;for(let x of I.declined||[]){let C=j.parseIdent(x),F=t.getWorkspaceByIdent(C);v.set(F,"decline")}for(let[x,C]of Object.entries(I.releases||{})){let F=j.parseIdent(x),N=t.getWorkspaceByIdent(F);v.set(N,Aw(C))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(x=>x.manifest.version!==null)),releases:v,async saveAll(){let x={},C=[],F=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=j.stringifyIdent(N.anchoredLocator),J=v.get(N);J==="decline"?C.push(U):typeof J<"u"?x[U]=Aw(J):p.has(N)&&F.push(U)}await oe.mkdirPromise(z.dirname(h),{recursive:!0}),await oe.changeFilePromise(h,Ba(new Ba.PreserveOrdering({releases:Object.keys(x).length>0?x:void 0,declined:C.length>0?C:void 0,undecided:F.length>0?F:void 0})))}}}function VPt(t){return lR(t).size>0||jv(t).length>0}function lR(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 jv(t,{include:e=new Set}={}){let r=[],o=new Map(He.mapAndFilter([...t.releases],([n,u])=>u==="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(He.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Ot.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function Wj(t,e){let r=vA.default.clean(e);for(let o of Object.values(fw))if(o!=="undecided"&&o!=="decline"&&vA.default.inc(t,o)===r)return o;return null}function cR(t,e){if(vA.default.valid(e))return e;if(t===null)throw new st(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!vA.default.valid(t))throw new st(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=vA.default.inc(t,e);if(r===null)throw new st(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function Kj(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of Ot.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;He.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,vA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?j.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${j.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:ue.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,E,I]of p){let v=h.manifest[E].get(I);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let x=v.range,C=!1;if(x.startsWith(Xn.protocol)&&(x=x.slice(Xn.protocol.length),C=!0,x===a.relativeCwd))continue;let F=x.match(JPt);if(!F){r.reportWarning(0,`Couldn't auto-upgrade range ${x} (in ${j.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let N=`${F[1]}${n}`;C&&(N=`${Xn.protocol}${N}`);let U=j.makeDescriptor(v,N);h.manifest[E].set(I,U)}}}var XPt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function KBe(t,{current:e,prerelease:r}){let o=new vA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=XPt.get
2024-06-15 19:05:40 +02:00
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.%n\`) 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.
2024-06-21 09:01:29 +02:00
`,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"]]});je();Dt();qt();var uR=Ze(Vn());var rg=class extends ut{constructor(){super(...arguments);this.interactive=ge.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(){DC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(uQ(),Bq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(hQ(),pQ)),{FocusRequest:a}=await Promise.resolve().then(()=>(Pq(),Jwe)),{useListInput:n}=await Promise.resolve().then(()=>(fQ(),Vwe)),{renderForm:u}=await Promise.resolve().then(()=>(yQ(),mQ)),{Box:A,Text:p}=await Promise.resolve().then(()=>Ze(sc())),{default:h,useCallback:E,useState:I}=await Promise.resolve().then(()=>Ze(an())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:x,workspace:C}=await St.find(v,this.context.cwd);if(!C)throw new sr(x.cwd,this.context.cwd);await x.restoreInstallState();let F=await pw(x);if(F===null||F.releaseRoots.size===0)return 0;if(F.root===null)throw new st("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:we,active:de,decision:Be,setDecision:Ee})=>{let g=we.manifest.raw.stableVersion??we.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${j.prettyLocator(v,we.anchoredLocator)})`);if(uR.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let me=["undecided","decline","patch","minor","major"];n(Be,me,{active:de,minus:"left",plus:"right",set:Ee});let Ce=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},uR.default.valid(Be)?Be:uR.default.inc(g,Be)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,j.prettyLocator(v,we.anchoredLocator)," - ",Ce)),h.createElement(A,null,me.map(Ae=>h.createElement(A,{key:Ae,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:Ae===Be})," ",Ae)))))},J=we=>{let de=new Set(F.releaseRoots),Be=new Map([...we].filter(([Ee])=>de.has(Ee)));for(;;){let Ee=jv({project:F.project,releases:Be}),g=!1;if(Ee.length>0){for(let[me]of Ee)if(!de.has(me)){de.add(me),g=!0;let Ce=we.get(me);typeof Ce<"u"&&Be.set(me,Ce)}}if(!g)break}return{relevantWorkspaces:de,relevantReleases:Be}},te=()=>{let[we,de]=I(()=>new Map(F.releases)),Be=E((Ee,g)=>{let me=new Map(we);g!=="undecided"?me.set(Ee,g):me.delete(Ee);let{relevantReleases:Ce}=J(me);de(Ce)},[we,de]);return[we,Be]},ae=({workspaces:we,releases:de})=>{let Be=[];Be.push(`${we.size} total`);let Ee=0,g=0;for(let me of we){let Ce=de.get(me);typeof Ce>"u"?g+=1:Ce!=="decline"&&(Ee+=1)}return Be.push(`${Ee} release${Ee===1?"":"s"}`),Be.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},ce=await u(({useSubmit:we})=>{let[de,Be]=te();we(de);let{relevantWorkspaces:Ee}=J(de),g=new Set([...Ee].fil
`)},p=()=>{let Ee=this.from.map(g=>gw.default.matcher(g));return o.workspaces.filter(g=>{let me=j.stringifyIdent(g.anchoredLocator),Ce=g.relativeCwd;return Ee.some(Ae=>Ae(me)||Ae(Ce))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ra.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let Ee of h)A(`
2024-06-15 19:05:40 +02:00
- ${Ee.relativeCwd}
${j.prettyLocator(r,Ee.anchoredLocator)}`);h.length>0&&A("")}let E;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ee of E)A(`
- ${Ee.relativeCwd}
2024-06-21 09:01:29 +02:00
${j.prettyLocator(r,Ee.anchoredLocator)}`);let I=[],v=!1;if(u?.includes(":")){for(let Ee of o.workspaces)if(Ee.manifest.scripts.has(u)&&(v=!v,v===!1))break}for(let Ee of h){if(u&&!Ee.manifest.scripts.has(u)&&!v&&!(await An.getWorkspaceAccessibleBinaries(Ee)).has(u)){A(`Excluding ${Ee.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&Ee.cwd===a.cwd)){if(this.include.length>0&&!gw.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.include)&&!gw.default.isMatch(Ee.relativeCwd,this.include)){A(`Excluding ${Ee.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(gw.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.exclude)||gw.default.isMatch(Ee.relativeCwd,this.exclude))){A(`Excluding ${Ee.relativeCwd} because it matches the --include filter`);continue}if(this.publicOnly&&Ee.manifest.private===!0){A(`Excluding ${Ee.relativeCwd} because it's a private workspace and --no-private was set`);continue}I.push(Ee)}}if(this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),C=x>0,F=x>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Vi.availableParallelism()/2):1,U=N===1?!1:this.parallel,J=U?this.interlaced:!0,te=(0,JBe.default)(N),ae=new Map,le=new Set,ce=0,we=null,de=!1,Be=await Ft.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ee=>{let g=async(me,{commandIndex:Ce})=>{if(de)return-1;!U&&F&&Ce>1&&Ee.reportSeparator();let Ae=eDt(me,{configuration:r,label:C,commandIndex:Ce}),[ne,Z]=zBe(Ee,{prefix:Ae,interlaced:J}),[xe,Le]=zBe(Ee,{prefix:Ae,interlaced:J});try{F&&Ee.reportInfo(null,`${Ae?`${Ae} `:""}Process started`);let ht=Date.now(),H=await this.cli.run([this.commandName,...this.args],{cwd:me.cwd,stdout:ne,stderr:xe})||0;ne.end(),xe.end(),await Z,await Le;let rt=Date.now();if(F){let Te=r.get("enableTimers")?`, completed in ${pe.pretty(r,rt-ht,pe.Type.DURATION)}`:"";Ee.reportInfo(null,`${Ae?`${Ae} `:""}Process exited (exit code ${H})${Te}`)}return H===130&&(de=!0,we=H),H}catch(ht){throw ne.end(),xe.end(),await Z,await Le,ht}};for(let me of I)ae.set(me.anchoredLocator.locatorHash,me);for(;ae.size>0&&!Ee.hasErrors();){let me=[];for(let[ne,Z]of ae){if(le.has(Z.anchoredDescriptor.descriptorHash))continue;let xe=!0;if(this.topological||this.topologicalDev){let Le=this.topologicalDev?new Map([...Z.manifest.dependencies,...Z.manifest.devDependencies]):Z.manifest.dependencies;for(let ht of Le.values()){let H=o.tryWorkspaceByDescriptor(ht);if(xe=H===null||!ae.has(H.anchoredLocator.locatorHash),!xe)break}}if(!!xe&&(le.add(Z.anchoredDescriptor.descriptorHash),me.push(te(async()=>{let Le=await g(Z,{commandIndex:++ce});return ae.delete(ne),le.delete(Z.anchoredDescriptor.descriptorHash),Le})),!U))break}if(me.length===0){let ne=Array.from(ae.values()).map(Z=>j.prettyLocator(r,Z.anchoredLocator)).join(", ");Ee.reportError(3,`Dependency cycle detected (${ne})`);return}let Ae=(await Promise.all(me)).find(ne=>ne!==0);we===null&&(we=typeof Ae<"u"?1:we),(this.topological||this.topologicalDev)&&typeof Ae<"u"&&Ee.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return we!==null?we:Be.exitCode()}};lp.paths=[["workspaces","foreach"]],lp.usage=it.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only a
2024-06-15 19:05:40 +02:00
/*
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
Copyright (c) 2015, Rebecca Turner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
/**
@license
Copyright Joyent, Inc. and other Node contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@license
Copyright Node.js contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
/**
@license
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/** @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.
*/