(()=>{varc8e=Object.create;varXR=Object.defineProperty;varu8e=Object.getOwnPropertyDescriptor;varf8e=Object.getOwnPropertyNames;varg8e=Object.getPrototypeOf,p8e=Object.prototype.hasOwnProperty;varBe=(t=>typeofrequire!="undefined"?require:typeofProxy!="undefined"?newProxy(t,{get:(e,r)=>(typeofrequire!="undefined"?require:e)[r]}):t)(function(t){if(typeofrequire!="undefined")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+t+'" is not supported')});varOt=(t,e)=>()=>(t&&(e=t(t=0)),e);varK=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sr=(t,e)=>{for(varrine)XR(t,r,{get:e[r],enumerable:!0})},h8e=(t,e,r,o)=>{if(e&&typeofe=="object"||typeofe=="function")for(letaoff8e(e))!p8e.call(t,a)&&a!==r&&XR(t,a,{get:()=>e[a],enumerable:!(o=u8e(e,a))||o.enumerable});returnt};varTe=(t,e,r)=>(r=t!=null?c8e(g8e(t)):{},h8e(e||!t||!t.__esModule?XR(r,"default",{value:t,enumerable:!0}):r,t));varNi={};sr(Ni,{SAFE_TIME:()=>R9,S_IFDIR:()=>o0,S_IFLNK:()=>A0,S_IFMT:()=>rc,S_IFREG:()=>a0});varrc,o0,a0,A0,R9,T9=Ot(()=>{rc=61440,o0=16384,a0=32768,A0=40960,R9=456789e3});varWE={};sr(WE,{BigIntStatsEntry:()=>QC,DEFAULT_MODE:()=>jE,DirEntry:()=>ZR,StatEntry:()=>Mf,areStatsEqual:()=>eT,clearStats:()=>VQ,convertToBigIntStats:()=>XQ,makeDefaultStats:()=>YE,makeEmptyStats:()=>d8e});functionYE(){returnnewMf}functiond8e(){returnVQ(YE())}functionVQ(t){for(leteint)if(Object.prototype.hasOwnProperty.call(t,e)){letr=t[e];typeofr=="number"?t[e]=0:typeofr=="bigint"?t[e]=BigInt(0):$R.types.isDate(r)&&(t[e]=newDate(0))}returnt}functionXQ(t){lete=newQC;for(letrint)if(Object.prototype.hasOwnProperty.call(t,r)){leto=t[r];typeofo=="number"?e[r]=BigInt(o):$R.types.isDate(o)&&(e[r]=newDate(o))}returne.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}functioneT(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;letr=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var$R,jE,ZR,Mf,QC,ZQ=Ot(()=>{$R=Te(Be("util")),jE=33188,ZR=class{constructor(){this.name="";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}},Mf=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=newDate(0);this.mtime=newDate(0);this.ctime=newDate(0);this.birthtime=newDate(0);this.dev=0;this.ino=0;this.mode=jE;this.nlink=1;this.rdev=0;this.blocks=1}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}},QC=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=newDate(0);this.mtime=newDate(0);this.ctime=newDate(0);this.birthtime=newDate(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(jE);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(thi
`+u7.repeat(" ",e+this.position-a+o.length)+"^"};PT.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+=`:
`+r)),o};f7.exports=PT});var Fs=K((dkt,h7)=>{"use strict";var p7=NC(),m_e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],C_e=["scalar","sequence","mapping"];function y_e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function I_e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(m_e.indexOf(r)===-1)throw new p7('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=y_e(e.styleAliases||null),C_e.indexOf(this.kind)===-1)throw new p7('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}h7.exports=I_e});var m0=K((mkt,m7)=>{"use strict";var d7=d0(),Iv=NC(),E_e=Fs();function bT(t,e,r){var o=[];return t.include.forEach(function(a){r=bT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&o.push(c)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function w_e(){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 LC(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 Iv("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=bT(this,"implicit",[]),this.compiledExplicit=bT(this,"explicit",[]),this.compiledTypeMap=w_e(this.compiledImplicit,this.compiledExplicit)}LC.DEFAULT=null;LC.create=function(){var e,r;switch(arguments.length){case 1:e=LC.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new Iv("Wrong number of arguments for Schema.create function")}if(e=d7.toArray(e),r=d7.toArray(r),!e.every(function(o){return o instanceof LC}))throw new Iv("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof E_e}))throw new Iv("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new LC({include:e,explicit:r})};m7.exports=LC});var y7=K((Ckt,C7)=>{"use strict";var B_e=Fs();C7.exports=new B_e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var E7=K((ykt,I7)=>{"use strict";var Q_e=Fs();I7.exports=new Q_e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var B7=K((Ikt,w7)=>{"use strict";var v_e=Fs();w7.exports=new v_e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var Ev=K((Ekt,Q7)=>{"use strict";var D_e=m0();Q7.exports=new D_e({explicit:[y7(),E7(),B7()]})});var D7=K((wkt,v7)=>{"use strict";var S_e=Fs();function k_e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function x_e(){return null}function P_e(t){return t===null}v7.exports=new S_e("tag:yaml.org,2002:null",{kind:"scalar",resolve:k_e,construct:x_e,predicate:P_e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var k7=K((Bkt,S7)=>{"use strict";var b_e=Fs();function F_e(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 R_e(t){return t==="true"||t==="True"||t==="TRUE"}function T_e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}S7.exports=new b_e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:F_e,construct:R_e,predicate:T_e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
`: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 WKe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var yW=new Array(256),IW=new Array(256);for(y0=0;y0<256;y0++)yW[y0]=lW(y0)?1:0,IW[y0]=lW(y0);var y0;function JKe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||UKe,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 EW(t,e){return new gW(e,new OKe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Mr(t,e){throw EW(t,e)}function vv(t,e){t.onWarning&&t.onWarning.call(null,EW(t,e))}var cW={YAML:function(e,r,o){var a,n,c;e.version!==null&&Mr(e,"duplication of %YAML directive"),o.length!==1&&Mr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Mr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Mr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&vv(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&Mr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],mW.test(a)||Mr(e,"ill-formed tag handle (first argument) of the TAG directive"),dp.call(e.tagMap,a)&&Mr(e,'there is a previously declared suffix for "'+a+'" tag handle'),CW.test(n)||Mr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function hp(t,e,r,o){var a,n,c,f;if(e<r){if(f=t.input.slice(e,r),o)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Mr(t,"expected valid JSON character");else KKe.test(f)&&Mr(t,"the stream contains non-printable characters");t.result+=f}}function uW(t,e,r,o){var a,n,c,f;for(Uf.isObject(r)||Mr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],dp.call(e,n)||(e[n]=r[n],o[n]=!0)}function _C(t,e,r,o,a,n,c,f){var g,p;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),g=0,p=a.length;g<p;g+=1)Array.isArray(a[g])&&Mr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&AW(a[g])==="[object Object]"&&(a[g]="[object Object]");if(typeof a=="object"&&AW(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(g=0,p=n.length;g<p;g+=1)uW(t,e,n[g],r);else uW(t,e,n,r);else!t.json&&!dp.call(r,a)&&dp.call(e,a)&&(t.line=c||t.line,t.position=f||t.position,Mr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function NT(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++):Mr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function ps(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;I0(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(Au(a))for(NT(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&&vv(t,"deficient indentation"),o}function Dv(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||ja(r)))}function LT(t,e){e===1?t.result+=" ":e>1&&(t.result+=Uf.repeat(`
`,e-1))}function zKe(t,e,r){var o,a,n,c,f,g,p,I,B=t.kind,Q=t.result,x;if(x=t.input.charCodeAt(t.position),ja(x)||UC(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),ja(a)||r&&UC(a)))return!1;for(t.kind="scalar",t.result="",n=c=t.position,f=!1;x!==0;){if(x===58){if(a=t.input.charCodeAt(t.position+1),ja(a)||r&&UC(a))break}else if(x===35){if(o=t.input.charCodeAt(t.position-1),ja(o))break}else{if(t.position===t.lineStart&&Dv(t)||r&&UC(x))break;if(Au(x))if(g=t.line,p=t.lineStart,I=t.lineIndent,ps(t,!1,-1),t.lineIndent>=e){f=!0,x=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=g,t.lineStart=p,t.lineIndent=I;break}}f&&(hp(t,n,c,!1),LT(t,t.line-g),n=c=t.position,f=!1),I0(x)||(c=t.position+1),x=t.input.charCodeAt(++t.position)}return hp(t,n,c,!1),t.result?!0:(t.kind=B,t.result=Q,!1)}function VKe(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(hp(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 Au(r)?(hp(t,o,a,!0),LT(t,ps(t,!1,e)),o=a=t.position):t.position===t.lineStart&&Dv(t)?Mr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Mr(t,"unexpected end of the stream within a single quoted scalar")}function XKe(t,e){var r,o,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return hp(t,r,t.position,!0),t.position++,!0;if(f===92){if(hp(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),Au(f))ps(t,!1,e);else if(f<256&&yW[f])t.result+=IW[f],t.position++;else if((c=jKe(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=GKe(f))>=0?n=(n<<4)+c:Mr(t,"expected hexadecimal character");t.result+=WKe(n),t.position++}else Mr(t,"unknown escape sequence");r=o=t.position}else Au(f)?(hp(t,r,o,!0),LT(t,ps(t,!1,e)),r=o=t.position):t.position===t.lineStart&&Dv(t)?Mr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}Mr(t,"unexpected end of the stream within a double quoted scalar")}function ZKe(t,e){var r=!0,o,a=t.tag,n,c=t.anchor,f,g,p,I,B,Q={},x,y,T,U;if(U=t.input.charCodeAt(t.position),U===91)g=93,B=!1,n=[];else if(U===123)g=125,B=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),U=t.input.charCodeAt(++t.position);U!==0;){if(ps(t,!0,e),U=t.input.charCodeAt(t.position),U===g)return t.position++,t.tag=a,t.anchor=c,t.kind=B?"mapping":"sequence",t.result=n,!0;r||Mr(t,"missed comma between flow collection entries"),y=x=T=null,p=I=!1,U===63&&(f=t.input.charCodeAt(t.position+1),ja(f)&&(p=I=!0,t.position++,ps(t,!0,e))),o=t.line,KC(t,e,Bv,!1,!0),y=t.tag,x=t.result,ps(t,!0,e),U=t.input.charCodeAt(t.position),(I||t.line===o)&&U===58&&(p=!0,U=t.input.charCodeAt(++t.position),ps(t,!0,e),KC(t,e,Bv,!1,!0),T=t.result),B?_C(t,n,Q,y,x,T):p?n.push(_C(t,null,Q,y,x,T)):n.push(x),ps(t,!0,e),U=t.input.charCodeAt(t.position),U===44?(r=!0,U=t.input.charCodeAt(++t.position)):r=!1}Mr(t,"unexpected end of the stream within a flow collection")}function $Ke(t,e){var r,o,a=MT,n=!1,c=!1,f=e,g=0,p=!1,I,B;if(B=t.input.charCodeAt(t.position),B===124)o=!1;else if(B===62)o=!0;else return!1;for(t.kind="scalar",t.result="";B!==0;)if(B=t.input.charCodeAt(++t.position),B===43||B===45)MT===a?a=B===43?aW:_Ke:Mr(t,"repeat of a chomping mode identifier");else if((I=YKe(B))>=0)I===0?Mr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Mr(t,"repeat of an indentation width identifier"):(f=e+I-1,c=!0);else break;if(I0(B)){do B=t.input.charCodeAt(++t.position);while(I0(B));if(B===35)do B=t.input.charCodeAt(++t.position);while(!Au(B)&&B!==0)}for(;B!==0;){for(NT(t),t.lineIndent=0,B=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&B===32;)t.lineIndent++,B=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t
`,n?1+g:g),n=!0,c=!0,g=0,r=t.position;!Au(B)&&B!==0;)B=t.input.charCodeAt(++t.position);hp(t,r,t.position,!1)}return!0}function fW(t,e){var r,o=t.tag,a=t.anchor,n=[],c,f=!1,g;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),g=t.input.charCodeAt(t.position);g!==0&&!(g!==45||(c=t.input.charCodeAt(t.position+1),!ja(c)));){if(f=!0,t.position++,ps(t,!0,-1)&&t.lineIndent<=e){n.push(null),g=t.input.charCodeAt(t.position);continue}if(r=t.line,KC(t,e,dW,!1,!0),n.push(t.result),ps(t,!0,-1),g=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&g!==0)Mr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return f?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function eHe(t,e,r){var o,a,n,c,f=t.tag,g=t.anchor,p={},I={},B=null,Q=null,x=null,y=!1,T=!1,U;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),U=t.input.charCodeAt(t.position);U!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,c=t.position,(U===63||U===58)&&ja(o))U===63?(y&&(_C(t,p,I,B,Q,null),B=Q=x=null),T=!0,y=!0,a=!0):y?(y=!1,a=!0):Mr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,U=o;else if(KC(t,r,hW,!1,!0))if(t.line===n){for(U=t.input.charCodeAt(t.position);I0(U);)U=t.input.charCodeAt(++t.position);if(U===58)U=t.input.charCodeAt(++t.position),ja(U)||Mr(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(_C(t,p,I,B,Q,null),B=Q=x=null),T=!0,y=!1,a=!1,B=t.tag,Q=t.result;else if(T)Mr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=f,t.anchor=g,!0}else if(T)Mr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=f,t.anchor=g,!0;else break;if((t.line===n||t.lineIndent>e)&&(KC(t,e,Qv,!0,a)&&(y?Q=t.result:x=t.result),y||(_C(t,p,I,B,Q,x,n,c),B=Q=x=null),ps(t,!0,-1),U=t.input.charCodeAt(t.position)),t.lineIndent>e&&U!==0)Mr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&_C(t,p,I,B,Q,null),T&&(t.tag=f,t.anchor=g,t.kind="mapping",t.result=p),T}function tHe(t){var e,r=!1,o=!1,a,n,c;if(c=t.input.charCodeAt(t.position),c!==33)return!1;if(t.tag!==null&&Mr(t,"duplication of a tag property"),c=t.input.charCodeAt(++t.position),c===60?(r=!0,c=t.input.charCodeAt(++t.position)):c===33?(o=!0,a="!!",c=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do c=t.input.charCodeAt(++t.position);while(c!==0&&c!==62);t.position<t.length?(n=t.input.slice(e,t.position),c=t.input.charCodeAt(++t.position)):Mr(t,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!ja(c);)c===33&&(o?Mr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),mW.test(a)||Mr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),c=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),qKe.test(n)&&Mr(t,"tag suffix cannot contain flow indicator characters")}return n&&!CW.test(n)&&Mr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:dp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:Mr(t,'undeclared tag handle "'+a+'"'),!0}function rHe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Mr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!ja(r)&&!UC(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Mr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function nHe(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&&!ja(o)&&!UC(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&Mr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),dp.call(t.anchorMap,r)||Mr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],ps(t,!0,-1),!0}function KC(t,e,r,o,a){var n,c,f,g=1,p=!1,I=!1,B,Q,x,y,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new JKe(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,Mr(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;)iHe(r);return r.documents}function BW(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=wW(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function QW(t,e){var r=wW(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new gW("expected a single document in the stream, but found more")}}function sHe(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),BW(t,e,Uf.extend({schema:pW},r))}function oHe(t,e){return QW(t,Uf.extend({schema:pW},e))}aw.exports.loadAll=BW;aw.exports.load=QW;aw.exports.safeLoadAll=sHe;aw.exports.safeLoad=oHe});var JW=K((_kt,KT)=>{"use strict";var lw=d0(),cw=NC(),aHe=ow(),AHe=OC(),RW=Object.prototype.toString,TW=Object.prototype.hasOwnProperty,lHe=9,Aw=10,cHe=13,uHe=32,fHe=33,gHe=34,MW=35,pHe=37,hHe=38,dHe=39,mHe=42,NW=44,CHe=45,LW=58,yHe=61,IHe=62,EHe=63,wHe=64,OW=91,UW=93,BHe=96,_W=123,QHe=124,KW=125,Ho={};Ho[0]="\\0";Ho[7]="\\a";Ho[8]="\\b";Ho[9]="\\t";Ho[10]="\\n";Ho[11]="\\v";Ho[12]="\\f";Ho[13]="\\r";Ho[27]="\\e";Ho[34]='\\"';Ho[92]="\\\\";Ho[133]="\\N";Ho[160]="\\_";Ho[8232]="\\L";Ho[8233]="\\P";var vHe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function DHe(t,e){var r,o,a,n,c,f,g;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)c=o[a],f=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),g=t.compiledTypeMap.fallback[c],g&&TW.call(g.styleAliases,f)&&(f=g.styleAliases[f]),r[c]=f;return r}function DW(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 cw("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+lw.repeat("0",o-e.length)+e}function SHe(t){this.schema=t.schema||aHe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=lw.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=DHe(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 SW(t,e){for(var r=lw.repeat(" ",e),o=0,a=-1,n="",c,f=t.length;o<f;)a=t.indexOf(`
-${VT(r)}`).join("")}`)}functionpqe(t,e,r){if(typeofr>"u")returne;leto=[],a=[],n=f=>{letg=e;returne=f,n.bind(null,g)};if(!r(e,{errors:o,coercions:a,coercion:n}))throwpJ(`Invalid value for ${t}`,o);for(let[,f]ofa)f();returne}mp.applyValidator=pqe;mp.cleanValidationError=VT;mp.formatError=pJ;mp.isOptionSymbol=gJ;mp.makeCommandOption=fqe;mp.rerouteArguments=gqe});varQA=K(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});varhJ=/^[a-zA-Z_][a-zA-Z0-9_]*$/,dJ=/^#[0-9a-f]{6}$/i,mJ=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,CJ=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,yJ=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,XT=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,IJ=t=>()=>t;functionsn({test:t}){returnIJ(t)()}functionhs(t){returnt===null?"null":t===void0?"undefined":t===""?"an empty string":JSON.stringify(t)}functionCp(t,e){varr,o,a;returntypeofe=="number"?`${(r=t==null?void0:t.p)!==null&&r!==void0?r:"."}[${e}]`:hJ.test(e)?`${(o=t==null?void0:t.p)!==null&&o!==void0?o:""}.${e}`:`${(a=t==null?void0:t.p)!==null&&a!==void0?a:"."}[${JSON.stringify(e)}]`}functionQ0(t,e){returnr=>{leto=t[e];returnt[e]=r,Q0(t,e).bind(null,o)}}functionEJ(t,e){returnr=>{t[e]=r}}functionTv(t,e,r){returnt===1?e:r}functionKr({errors:t,p:e}={},r){returnt==null||t.push(`${e??"."}: ${r}`),!1}varwJ=()=>sn({test:(t,e)=>!0});functionhqe(t){returnsn({test:(e,r)=>e!==t?Kr(r,`Expected a literal (got ${hs(t)})`):!0})}vardqe=()=>sn({test:(t,e)=>typeoft!="string"?Kr(e,`Expected a string (got ${hs(t)})`):!0});functionmqe(t){lete=Array.isArray(t)?t:Object.values(t),r=newSet(e);returnsn({test:(o,a)=>r.has(o)?!0:Kr(a,`Expected a valid enumeration value (got ${hs(o)})`)})}varCqe=newMap([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),yqe=()=>sn({test:(t,e)=>{varr;if(typeoft!="boolean"){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnKr(e,"Unbound coercion result");leto=Cqe.get(t);if(typeofo<"u")returne.coercions.push([(r=e.p)!==null&&r!==void0?r:".",e.coercion.bind(null,o)]),!0}returnKr(e,`Expected a boolean (got ${hs(t)})`)}return!0}}),Iqe=()=>sn({test:(t,e)=>{varr;if(typeoft!="number"){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnKr(e,"Unbound coercion result");leto;if(typeoft=="string"){leta;try{a=JSON.parse(t)}catch{}if(typeofa=="number")if(JSON.stringify(a)===t)o=a;elsereturnKr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeofo<"u")returne.coercions.push([(r=e.p)!==null&&r!==void0?r:".",e.coercion.bind(null,o)]),!0}returnKr(e,`Expected a number (got ${hs(t)})`)}return!0}}),Eqe=()=>sn({test:(t,e)=>{varr;if(!(tinstanceofDate)){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnKr(e,"Unbound coercion result");leto;if(typeoft=="string"&&XT.test(t))o=newDate(t);else{leta;if(typeoft=="string"){letn;try{n=JSON.parse(t)}catch{}typeofn=="number"&&(a=n)}elsetypeoft=="number"&&(a=t);if(typeofa<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=newDate(a*1e3);elsereturnKr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeofo<"u")returne.coercions.push([(r=e.p)!==null&&r!==void0?r:".",e.coercion.bind(null,o)]),!0}returnKr(e,`Expected a date (got ${hs(t)})`)}return!0}}),wqe=(t,{delimiter:e}={})=>sn({test:(r,o)=>{vara;if(typeofr=="string"&&typeofe<"u"&&typeof(o==null?void0:o.coercions)<"u"){if(typeof(o==null?void0:o.coercion)>"u")returnKr(o,"Unbound coercion result");r=r.split(e),o.coercions.push([(a=o.p)!==null&&a!==void0?a:".",o.coercion.bind(null,r)])}if(!Array.isArray(r))returnKr(o,`Expe
`);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(`
`,f+=vA.formatMarkdownish("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 f}error(e,r){var o,{colored:a,command:n=(o=e[OJ])!==null&&o!==void 0?o:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Executionfailedwithanon-errorrejection(rejectedvalue:${JSON.stringify(e)})`));let c="",f=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}:${e.message}
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function BX(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)):m5e.get(t)||t}function C5e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(h5e))r.push(a[2].replace(d5e,(f,g,p)=>g?BX(g):p));else throw new Error(`InvalidChalktemplatestyleargument:${n}(instyle'${t}')`)}return r}function y5e(t){EX.lastIndex=0;let e=[],r;for(;(r=EX.exec(t))!==null;){let o=r[1];if(r[2]){let a=C5e(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(`UnknownChalkstyle:${a}`);o=n.length>0?o[a](...n):o[a]}return o}QX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(p5e,(n,c,f,g,p,I)=>{if(c)a.push(BX(c));else if(g){let B=a.join("");a=[],o.push(r.length===0?B:wX(t,r)(B)),r.push({inverse:f,styles:y5e(g)})}else if(p){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(I)}),o.push(a.join("")),r.length>0){let n=`Chalktemplateliteralismissing${r.length}closingbracket${r.length===1?"":"s"}(\`}\`)`;thrownewError(n)}returno.join("")}});var_M=K((vPt,xX)=>{"use strict";varMw=Tw(),{stdout:NM,stderr:LM}=TM(),{stringReplaceAll:I5e,stringEncaseCRLFWithFirstIndex:E5e}=IX(),DX=["ansi","ansi","ansi256","ansi16m"],VC=Object.create(null),w5e=(t,e={})=>{if(e.level>3||e.level<0)thrownewError("The `level` option should be an integer from 0 to 3");letr=NM?NM.level:0;t.level=e.level===void0?r:e.level},OM=class{constructor(e){returnSX(e)}},SX=t=>{lete={};returnw5e(e,t),e.template=(...r)=>v5e(e.template,...r),Object.setPrototypeOf(e,cD.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{thrownewError("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=OM,e.template};functioncD(t){returnSX(t)}for(let[t,e]ofObject.entries(Mw))VC[t]={get(){letr=uD(this,UM(e.open,e.close,this._styler),this._isEmpty);returnObject.defineProperty(this,t,{value:r}),r}};VC.visible={get(){lett=uD(this,this._styler,!0);returnObject.defineProperty(this,"visible",{value:t}),t}};varkX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(lettofkX)VC[t]={get(){let{level:e}=this;returnfunction(...r){leto=UM(Mw.color[DX[e]][t](...r),Mw.color.close,this._styler);returnuD(this,o,this._isEmpty)}}};for(lettofkX){lete="bg"+t[0].toUpperCase()+t.slice(1);VC[e]={get(){let{level:r}=this;returnfunction(...o){leta=UM(Mw.bgColor[DX[r]][t](...o),Mw.bgColor.close,this._styler);returnuD(this,a,this._isEmpty)}}}}varB5e=Object.defineProperties(()=>{},{...VC,level:{enumerable:!0,get(){returnthis._generator.level},set(t){this._generator.level=t}}}),UM=(t,e,r)=>{leto,a;returnr===void0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},uD=(t,e,r)=>{leto=(...a)=>Q5e(o,a.length===1?""+a[0]:a.join(" "));returno.__proto__=B5e,o._generator=t,o._styler=e,o._isEmpty=r,o},Q5e=(t,e)=>{if(t.level<=0||!e)returnt._isEmpty?"":e;letr=t._styler;if(r===void0)returne;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void0;)e=I5e(e,r.close,r.open),r=r.parent;letn=e.indexOf(`
`);return n!==-1&&(e=E5e(e,a,o,n)),o+e+a},MM,v5e=(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 MM===void 0&&(MM=vX()),MM(t,a.join(""))};Object.defineProperties(cD.prototype,VC);var Nw=cD();Nw.supportsColor=NM;Nw.stderr=cD({level:LM?LM.level:0});Nw.stderr.supportsColor=LM;Nw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};xX.exports=Nw});var fD=K(pl=>{"use strict";pl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;pl.find=(t,e)=>t.nodes.find(r=>r.type===e);pl.exceedsLimit=(t,e,r=1,o)=>o===!1||!pl.isInteger(t)||!pl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;pl.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)};pl.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;pl.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;pl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;pl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);pl.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 gD=K((SPt,bX)=>{"use strict";var PX=fD();bX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&PX.isInvalidBrace(a),c=o.invalid===!0&&e.escapeInvalid===!0,f="";if(o.value)return(n||c)&&PX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let g of o.nodes)f+=r(g);return f};return r(t)}});var RX=K((kPt,FX)=>{"use strict";FX.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=K((xPt,KX)=>{"use strict";var TX=RX(),M0=(t,e,r)=>{if(TX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(TX(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),c=String(o.capture),f=String(o.wrap),g=t+":"+e+"="+a+n+c+f;if(M0.cache.hasOwnProperty(g))return M0.cache[g].result;let p=Math.min(t,e),I=Math.max(t,e);if(Math.abs(p-I)===1){let T=t+"|"+e;return o.capture?`(${T})`:o.wrap===!1?T:`(?:${T})`}let B=_X(t)||_X(e),Q={min:t,max:e,a:p,b:I},x=[],y=[];if(B&&(Q.isPadded=B,Q.maxLen=String(Q.max).length),p<0){let T=I<0?Math.abs(I):1;y=MX(T,Math.abs(p),Q,o),p=Q.a=0}return I>=0&&(x=MX(p,I,Q,o)),Q.negatives=y,Q.positives=x,Q.result=D5e(y,x,o),o.capture===!0?Q.result=`(${Q.result})`:o.wrap!==!1&&x.length+y.length>1&&(Q.result=`(?:${Q.result})`),M0.cache[g]=Q,Q.result};function D5e(t,e,r){let o=KM(t,e,"-",!1,r)||[],a=KM(e,t,"",!1,r)||[],n=KM(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function S5e(t,e){let r=1,o=1,a=LX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=LX(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(P5e),n}function k5e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=x5e(t,e),a=o.length,n="",c=0;for(let f=0;f<a;f++){let[g,p]=o[f];g===p?n+=g:g!=="0"||p!=="9"?n+=b5e(g,p,r):c++}return c&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[c],digits:a}}function MX(t,e,r,o){let a=S5e(t,e),n=[],c=t,f;for(let g=0;g<a.length;g++){let p=a[g],I=k5e(String(c),String(p),o),B="";if(!r.isPadded&&f&&f.pattern===I.pattern){f.count.length>1&&f.count.pop(),f.count.push(I.count[0]),f.string=f.pattern+UX(f.count),c=p+1;continue}r.isPadded&&(B=F5e(p,r,o)),I.string=B+I.pattern+UX(I.count),n.push(I),c=p+1,f=I}return n}function KM(t,e,r,o,a){let n=[];for(let c of t){let{string:f}=c;!o&&!NX(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=K((TPt,AZ)=>{"use strict";var j5e=gD(),{MAX_LENGTH:sZ,CHAR_BACKSLASH:jM,CHAR_BACKTICK:Y5e,CHAR_COMMA:W5e,CHAR_DOT:J5e,CHAR_LEFT_PARENTHESES:z5e,CHAR_RIGHT_PARENTHESES:V5e,CHAR_LEFT_CURLY_BRACE:X5e,CHAR_RIGHT_CURLY_BRACE:Z5e,CHAR_LEFT_SQUARE_BRACKET:oZ,CHAR_RIGHT_SQUARE_BRACKET:aZ,CHAR_DOUBLE_QUOTE:$5e,CHAR_SINGLE_QUOTE:e9e,CHAR_NO_BREAK_SPACE:t9e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:r9e}=iZ(),n9e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(sZ,r.maxLength):sZ;if(t.length>o)throw new SyntaxError(`Inputlength(${t.length}),exceedsmaxcharacters(${o})`);let a={type:"root",input:t,nodes:[]},n=[a],c=a,f=a,g=0,p=t.length,I=0,B=0,Q,x={},y=()=>t[I++],T=U=>{if(U.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&U.type==="text"){f.value+=U.value;return}return c.nodes.push(U),U.parent=c,U.prev=f,f=U,U};for(T({type:"bos"});I<p;)if(c=n[n.length-1],Q=y(),!(Q===r9e||Q===t9e)){if(Q===jM){T({type:"text",value:(e.keepEscaping?Q:"")+y()});continue}if(Q===aZ){T({type:"text",value:"\\"+Q});continue}if(Q===oZ){g++;let U=!0,q;for(;I<p&&(q=y());){if(Q+=q,q===oZ){g++;continue}if(q===jM){Q+=y();continue}if(q===aZ&&(g--,g===0))break}T({type:"text",value:Q});continue}if(Q===z5e){c=T({type:"paren",nodes:[]}),n.push(c),T({type:"text",value:Q});continue}if(Q===V5e){if(c.type!=="paren"){T({type:"text",value:Q});continue}c=n.pop(),T({type:"text",value:Q}),c=n[n.length-1];continue}if(Q===$5e||Q===e9e||Q===Y5e){let U=Q,q;for(e.keepQuotes!==!0&&(Q="");I<p&&(q=y());){if(q===jM){Q+=q+y();continue}if(q===U){e.keepQuotes===!0&&(Q+=q);break}Q+=q}T({type:"text",value:Q});continue}if(Q===X5e){B++;let U=f.value&&f.value.slice(-1)==="$"||c.dollar===!0;c=T({type:"brace",open:!0,close:!1,dollar:U,depth:B,commas:0,ranges:0,nodes:[]}),n.push(c),T({type:"open",value:Q});continue}if(Q===Z5e){if(c.type!=="brace"){T({type:"text",value:Q});continue}let U="close";c=n.pop(),c.close=!0,T({type:U,value:Q}),B--,c=n[n.length-1];continue}if(Q===W5e&&B>0){if(c.ranges>0){c.ranges=0;let U=c.nodes.shift();c.nodes=[U,{type:"text",value:j5e(c)}]}T({type:"comma",value:Q}),c.commas++;continue}if(Q===J5e&&B>0&&c.commas===0){let U=c.nodes;if(B===0||U.length===0){T({type:"text",value:Q});continue}if(f.type==="dot"){if(c.range=[],f.value+=Q,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){U.pop();let q=U[U.length-1];q.value+=f.value+Q,f=q,c.ranges--;continue}T({type:"dot",value:Q});continue}T({type:"text",value:Q})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(X=>{X.nodes||(X.type==="open"&&(X.isOpen=!0),X.type==="close"&&(X.isClose=!0),X.nodes||(X.type="text"),X.invalid=!0)});let U=n[n.length-1],q=U.nodes.indexOf(c);U.nodes.splice(q,1,...c.nodes)}while(n.length>0);return T({type:"eos"}),a};AZ.exports=n9e});var fZ=K((MPt,uZ)=>{"use strict";var cZ=gD(),i9e=$X(),s9e=rZ(),o9e=lZ(),SA=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=SA.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(SA.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};SA.parse=(t,e={})=>o9e(t,e);SA.stringify=(t,e={})=>cZ(typeof t=="string"?SA.parse(t,e):t,e);SA.compile=(t,e={})=>(typeof t=="string"&&(t=SA.parse(t,e)),i9e(t,e));SA.expand=(t,e={})=>{typeof t=="string"&&(t=SA.parse(t,e));let r=s9e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};SA.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?SA.compile(t,e):SA.expand(t,e);uZ.exports=SA});var Ow=K((NPt,mZ)=>{"use strict";var a9e=Be("path"),pu="\\\\/",gZ=`[^${pu}]`,qf="\\.",A9e="\\+",l9e="\\?",hD="\\/",c9e="(?=.)",pZ="[^/]",YM=`(?:${hD}|$)`,hZ=`(?:^|${h
`),f!==-1){let g=a+c.substring(0,f);c=c.substring(f+1),a="",e!==null?this.reportInfo(null,`${e}${g}`):this.reportInfo(null,g)}while(f!==-1);a+=c}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e}${n}`):this.reportInfo(null,n))}),r}}});var Dy,qO=Ot(()=>{Il();go();Dy=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 tr(11,`${jr(r.project.configuration,e)}isn't supported by any available fetcher`);return o}}});var ed,GO=Ot(()=>{go();ed=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(`${Zn(r.project.configuration,e)} isn'tsupportedbyanyavailableresolver`);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(`${jr(r.project.configuration,e)}isn't supported by any available resolver`);return o}}});var Sy,jO=Ot(()=>{Nt();go();Sy=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=Za(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=Za(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return wy(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(e),f=Gi.makeVirtualPath(n,c,a),g=new ou(f,{baseFs:r.packageFs,pathUtils:ee});return{...r,packageFs:g}}}});var ky,wB,loe=Ot(()=>{ky=class{static isVirtualDescriptor(e){return!!e.range.startsWith(ky.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(ky.protocol)}supportsDescriptor(e,r){return ky.isVirtualDescriptor(e)}supportsLocator(e,r){return ky.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertionfailed:calling"bindDescriptor"onavirtualdescriptorisunsupported')}getResolutionDependencies(e,r){throw new Error('Assertionfailed:calling"getResolutionDependencies"onavirtualdescriptorisunsupported')}async getCandidates(e,r,o){throw new Error('Assertionfailed:calling"getCandidates"onavirtualdescriptorisunsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertionfailed:calling"getSatisfying"onavirtualdescriptorisunsupported')}async resolve(e,r){throw new Error('Assertionfailed:calling"resolve"onavirtuallocatorisunsupported')}},wB=ky;wB.protocol="virtual:"});varxy,YO=Ot(()=>{Nt();Z0();xy=class{supports(e){return!!e.reference.startsWith(Bi.protocol)}getLocalPath(e,r){returnthis.getWorkspace(e,r).cwd}asyncfetch(e,r){leto=this.getWorkspace(e,r).cwd;return{packageFs:newBn(o),prefixPath:Qt.dot,localPath:o}}ge
`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new ed([new wB,new Bi,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new Dy([new Sy,new xy,...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=QB(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(c=>c==="current"?e.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?e.cpu:c));let n=r.get("libc");return n!==null&&(n=mu(n,c=>c==="current"?e.libc??mu.skip:c)),{os:o,cpu:a,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!wu(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new Gt;c.load(a,{yamlCompatibilityMode:!0});let f=ly(e,o.identHash),g=[];f.push([o.range,g]);let p={status:"inactive",userProvided:n,parentDescriptor:o};for(let I of c.dependencies.values())g.push({...p,type:"Dependency",descriptor:I});for(let I of c.peerDependencies.values())g.push({...p,type:"PeerDependency",descriptor:I});for(let[I,B]of c.peerDependenciesMeta)for(let[Q,x]of Object.entries(B))g.push({...p,type:"PeerDependencyMeta",selector:I,key:Q,value:x})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(kp(o,!0),LD(a),{userProvided:!0})}normalizeDependency(e){return wu(e.range)?_n(e,`${this.get("defaultProtocol")}${e.range}`):vB.test(e.range)?_n(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e){let r=fB(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let o=this.packageExtensions.get(e.identHash);if(typeof o<"u"){let n=e.version;if(n!==null){for(let[c,f]of o)if(!!$0(n,c))for(let g of f)switch(g.status==="inactive"&&(g.status="redundant"),g.type){case"Dependency":typeof r.dependencies.get(g.descriptor.identHash)>"u"&&(g.status="active",r.dependencies.set(g.descriptor.identHash,this.normalizeDependency(g.descriptor)));break;case"PeerDependency":typeof r.peerDependencies.get(g.descriptor.identHash)>"u"&&(g.status="active",r.peerDependencies.set(g.descriptor.identHash,g.descriptor));break;case"PeerDependencyMeta":{let p=r.peerDependenciesMeta.get(g.selector);(typeof p>"u"||!Object.prototype.hasOwnProperty.call(p,g.key)||p[g.key]!==g.value)&&(g.status="active",Gf(r.peerDependenciesMeta,g.selector,()=>({}))[g.key]=g.value)}break;default:ON(g);break}}}let a=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let c=ha(n);r.peerDependencies.has(c.identHash)||r.peerDependencies.set(c.identHash,_n(c,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let c=a(n),f=Eu("types",c),g=Cn(f);r.peerDependencies.has(f.identHash)||r.peerDependenciesMeta.has(g)||(r.peerDependencies.set(f.identHash,_n(f,"*")),r.peerDependenciesMeta.set(g,{optional:!0}))}return r.dependencies=new Map(za(r.dependencies,([,n])=>Xa(n))),r.peerDependencies=new Map(za(r.peerDependencies,([,n])=>Xa(n))),r}getLimit(e){return Gf(this.limits,e,()=>(0,hoe.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 c=n.hooks;if(!c)continue;let f=e(c);!f||(a=await f(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 c=await n(...r);if(typeof c<"u")return c}return null}},rt=Bu;rt.deleteProperty=Symbol(),rt.telemetry=null});var gn={};sr(gn,{EndStrategy:()=>l4,ExecError:()=>RS,PipeError:()=>SB,execvp:()=>Mrt,pipe
Pleasereportthistohttps://github.com/szmarczak/http2-wrapper/`);y(T)}return}o[0].resolve(x);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...o),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let g=()=>{c in this.queue&&this.queue[c][f]===p&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},p=()=>{let I=`${f}:${c}`,B=!1;try{let Q=oit.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(I),...r});Q[Ca]=0,Q[My]=!1;let x=()=>Q[Ca]<Q.remoteSettings.maxConcurrentStreams,y=!0;Q.socket.once("session",U=>{this.tlsSessionCache.set(I,U)}),Q.once("error",U=>{for(let{reject:q}of o)q(U);this.tlsSessionCache.delete(I)}),Q.setTimeout(this.timeout,()=>{Q.destroy()}),Q.once("close",()=>{if(B){y&&this._freeSessionsCount--,this._sessionsCount--;let U=this.sessions[c];U.splice(U.indexOf(Q),1),U.length===0&&delete this.sessions[c]}else{let U=new Error("Session closed without receiving a SETTINGS frame");U.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:q}of o)q(U);g()}this._tryToCreateNewSession(c,f)});let T=()=>{if(!(!(c in this.queue)||!x())){for(let U of Q[El])if(U in this.queue[c]){let{listeners:q}=this.queue[c][U];for(;q.length!==0&&x();)q.shift().resolve(Q);let X=this.queue[c];if(X[U].listeners.length===0&&(delete X[U],Object.keys(X).length===0)){delete this.queue[c];break}if(!x())break}}};Q.on("origin",()=>{Q[El]=Q.originSet,x()&&(T(),O4(this.sessions[c],Q))}),Q.once("remoteSettings",()=>{if(Q.ref(),Q.unref(),this._sessionsCount++,p.destroyed){let U=new Error("Agent has been destroyed");for(let q of o)q.reject(U);Q.destroy();return}Q[El]=Q.originSet;{let U=this.sessions;if(c in U){let q=U[c];q.splice(lit(q,Q,cit),0,Q)}else U[c]=[Q]}this._freeSessionsCount+=1,B=!0,this.emit("session",Q),T(),g(),Q[Ca]===0&&this._freeSessionsCount>this.maxFreeSessions&&Q.close(),o.length!==0&&(this.getSession(f,r,o),o.length=0),Q.on("remoteSettings",()=>{T(),O4(this.sessions[c],Q)})}),Q[Iae]=Q.request,Q.request=(U,q)=>{if(Q[My])throw new Error("The session is gracefully closing. No new streams are allowed.");let X=Q[Iae](U,q);return Q.ref(),++Q[Ca],Q[Ca]===Q.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,X.once("close",()=>{if(y=x(),--Q[Ca],!Q.destroyed&&!Q.closed&&(uit(this.sessions[c],Q),x()&&!Q.closed)){y||(this._freeSessionsCount++,y=!0);let se=Q[Ca]===0;se&&Q.unref(),se&&(this._freeSessionsCount>this.maxFreeSessions||Q[My])?Q.close():(O4(this.sessions[c],Q),T())}}),X}}catch(Q){for(let x of o)x.reject(Q);g()}};p.listeners=o,p.completed=!1,p.destroyed=!1,this.queue[c][f]=p,this._tryToCreateNewSession(c,f)})}request(e,r,o,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(o,a))}catch(g){c(g)}}}])})}createConnection(e,r){return vu.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),sit.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Ca]===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 Eae({agent:this,isFree:!0})}get busySessions(){return Eae({agent:this,isFree:!1})}};vu.kCurrentStreamsCount=Ca;vu.kGracefullyClosing=My;Bae.exports={Agent:vu,globalAgent:new vu}});var K4=K((XMt,Qae)=>{"use strict";var{Readable:fit}=Be("stream"),_4=class extends fit{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"
`),this.writeProgress()}writeLineWithForgettableReset(r,{truncate:o}={}){this.forgettableLines=[],this.writeLine(r,{truncate:o})}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
`);this.writeProgress()}reportCacheChanges({cacheHitCount:r,cacheMissCount:o}){let a=this.cacheHitCount-r,n=this.cacheMissCount-o;if(a===0&&n===0)return;let c="";this.cacheHitCount>1?c+=`${this.cacheHitCount}packageswerealreadycached`:this.cacheHitCount===1?c+=" - one package was already cached":c+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?c+=`,${this.cacheMissCount}hadtobefetched`:this.cacheMissCount===1&&(c+=`,onehadtobefetched(${jr(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?c+=`-${this.cacheMissCount}packageshadtobefetched`:this.cacheMissCount===1&&(c+=`-onepackagehadtobefetched(${jr(this.configuration,this.lastCacheMiss)})`),this.reportInfo(13,c)}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>ice&&(this.progressFrame=(this.progressFrame+1)%nce.length,this.progressTime=r);let o=nce[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let p=this.progressStyle.chars[0].repeat(a.lastScaledSize),I=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=`${p}${I}`}let c=this.formatName(null),f=c?`${c}:`:"",g=a.definition.title?`${a.definition.title}`:"";this.stdout.write(`${Ar(this.configuration,"\u27A4","blueBright")}${f}${o}${n}${g}
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},ice)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,g=c.lastScaledSize;c.lastScaledSize=f;let p=c.lastTitle;if(c.lastTitle=c.definition.title,f!==g||(n=p!==c.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,oce.default)(r,0,this.stdout.columns-1)),r}formatName(r){return ace(r,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(r){return jU(r,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}}});var $n,YU=Ot(()=>{$n="4.0.0-rc.18.git.20220906.hash-fc0a563"});var yn={};sr(yn,{PackageManager:()=>cce,detectPackageManager:()=>uce,executePackageAccessibleBinary:()=>dce,executePackageScript:()=>Dk,executePackageShellcode:()=>WU,executeWorkspaceAccessibleBinary:()=>hat,executeWorkspaceLifecycleScript:()=>pce,executeWorkspaceScript:()=>gce,getPackageAccessibleBinaries:()=>Sk,getWorkspaceAccessibleBinaries:()=>hce,hasPackageScript:()=>fat,hasWorkspaceScript:()=>JU,makeScriptEnv:()=>GB,maybeExecuteWorkspaceLifecycleScript:()=>pat,prepareExternalProject:()=>uat});async function sg(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 ge.writeFilePromise(ee.format({dir:t,name:e,ext:".cmd"}),a)}await ge.writeFilePromise(ee.join(t,e),`#!/bin/sh
`,{mode:493})}async function uce(t){let e=await Gt.tryFind(t);if(e!=null&&e.packageManager){let o=CS(e.packageManager);if(o!=null&&o.name){let a=`found${JSON.stringify({packageManager:e.packageManager})}inmanifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManager:"npm",reason:a};case"pnpm":return{packageManager:"pnpm",reason:a}}}}let r;try{r=await ge.readFilePromise(ee.join(t,Zr.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'}:ge.existsSync(ee.join(t,"package-lock.json"))?{packageManager:"npm",reason:`foundnpm's "package-lock.json" lockfile`}:ge.existsSync(ee.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's"pnpm-lock.yaml"lockfile`}:null}async function GB({project:t,locator:e,binFolder:r,lifecycleScript:o}){let a={};for(let[g,p]of Object.entries(process.env))typeof p<"u"&&(a[g.toLowerCase()!=="path"?g:"PATH"]=p);let n=de.fromPortablePath(r);a.BERRY_BIN_FOLDER=de.fromPortablePath(n);let c=process.env.COREPACK_ROOT?de.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([sg(r,"node",process.execPath),...$n!==null?[sg(r,"run",process.execPath,[c,"run"]),sg(r,"yarn",process.execPath,[c]),sg(r,"yarnpkg",process.execPath,[c]),sg(r,"node-gyp",process.execPath,[c,"run","--top-level","node-gyp"])]:[]]),t&&(a.INIT_CWD=de.cwd(),a.PROJECT_CWD=de.fromPortablePath(t.cwd)),a.PATH=a.PATH?`${n}${de.delimiter}${a.PATH}`:`${n}`,a.npm_execpath=`${n}${de.sep}yarn`,a.npm_node_execpath=`${n}${de.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let g=t.tryWorkspaceByLocator(e),p=g?g.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";a.npm_package_name=Cn(e),a.npm_package_version=p;let I;if(g)I=g.cwd;else{let B=t.storedPackages.get(e.locatorHash);if(!B)throw new Error(`Packagefor${jr(t.configuration,e)}notfoundintheproject`);let Q=t.configuration.getLinkers(),x={project:t,report:new St({stdout:new Lp.PassThrough,configuration:t.configuration})},y=Q.find(T=>T.supportsPackage(B,x));if(!y)throw new Error(`Thepackage${jr(t.configuration,B)}isn'tsupportedbyanyoftheavailablelinkers`);I=await y.findPackageLocation(B,x)}a.npm_package_json=de.fromPortablePath(ee.join(I,Zr.manifest))}let f=$n!==null?`yarn/${$n}`:`yarn/${gy("@yarnpkg/core").version}-core`;return a.npm_config_user_agent=`${f}npm/?node/${process.version}${process.platform}${process.arch}`,o&&(a.npm_lifecycle_event=o),t&&await t.configuration.triggerHook(g=>g.setupScriptEnvironment,t,a,async(g,p,I)=>await sg(r,is(g),p,I)),a}async function uat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await cat(async()=>{await ge.mktempPromise(async c=>{let f=ee.join(c,"pack.log"),g=null,{stdout:p,stderr:I}=r.getSubprocessStreams(f,{prefix:de.fromPortablePath(t),report:o}),B=n&&gc(n)?pB(n):n,Q=B?Cl(B):"an external project";p.write(`Packing${Q}fromsources
`}),f},o})});var NA={};sr(NA,{emitList:()=>jlt,emitTree:()=>mge,treeNodeToJson:()=>dge,treeNodeToTreeify:()=>hge});function hge(t,{configuration:e}){let r={},o=(a,n)=>{let c=Array.isArray(a)?a.entries():Object.entries(a);for(let[f,{label:g,value:p,children:I}]of c){let B=[];typeof g<"u"&&B.push(_D(e,g,2)),typeof p<"u"&&B.push(Ar(e,p[0],p[1])),B.length===0&&B.push(_D(e,`${f}`,2));let Q=B.join(": "),x=n[Q]={};typeof I<"u"&&o(I,x)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return o(t.children,r),r}function dge(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 H0(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,c]of o)a[n]=e(c);return typeof r.value>"u"?a:{value:H0(r.value[0],r.value[1]),children:a}};return e(t)}function jlt(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));mge({children:a},{configuration:e,stdout:r,json:o})}function mge(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)r.write(`${JSON.stringify(dge(f))}
`);if(se.lines=fe,se.added||se.removed){var me;if(!I){var Qe=f[X-1];I=x,B=y,Qe&&(Q=c.context>0?g(Qe.lines.slice(-c.context)):[],I-=Q.length,B-=Q.length)}(me=Q).push.apply(me,F8(fe.map(function(Ce){return(se.added?"+":"-")+Ce}))),se.added?y+=fe.length:x+=fe.length}else{if(I)if(fe.length<=c.context*2&&X<f.length-2){var be;(be=Q).push.apply(be,F8(g(fe)))}else{var Ee,ye=Math.min(fe.length,c.context);(Ee=Q).push.apply(Ee,F8(g(fe.slice(0,ye))));var De={oldStart:I,oldLines:x-I+ye,newStart:B,newLines:y-B+ye,lines:Q};if(X>=f.length-2&&fe.length<=c.context){var h=/\n$/.test(r),Oe=/\n$/.test(o),Ie=fe.length==0&&Q.length>De.oldLines;!h&&Ie&&r.length>0&&Q.splice(De.oldLines,0,"\\ No newline at end of file"),(!h&&!Ie||!Oe)&&Q.push("\\ No newline at end of file")}p.push(De),I=0,B=0,Q=[]}x+=fe.length,y+=fe.length}},U=0;U<f.length;U++)T(U);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:p}}var e4t,Bge,Qge,N8,L8,Zlt,$lt,ict,A1,M8,O8=Ot(()=>{hg.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 c(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,g=e.length,p=1,I=f+g;o.maxEditLength&&(I=Math.min(I,o.maxEditLength));var B=[{newPos:-1,components:[]}],Q=this.extractCommon(B[0],r,e,0);if(B[0].newPos+1>=f&&Q+1>=g)return c([{value:this.join(r),count:r.length}]);function x(){for(var T=-1*p;T<=p;T+=2){var U=void 0,q=B[T-1],X=B[T+1],se=(X?X.newPos:0)-T;q&&(B[T-1]=void 0);var fe=q&&q.newPos+1<f,me=X&&0<=se&&se<g;if(!fe&&!me){B[T]=void 0;continue}if(!fe||me&&q.newPos<X.newPos?(U=zlt(X),n.pushComponent(U.components,void 0,!0)):(U=q,U.newPos++,n.pushComponent(U.components,!0,void 0)),se=n.extractCommon(U,r,e,T),U.newPos+1>=f&&se+1>=g)return c(Jlt(n,U.components,r,e,n.useLongestToken));B[T]=U}p++}if(a)(function T(){setTimeout(function(){if(p>I)return a();x()||T()},0)})();else for(;p<=I;){var y=x();if(y)return y}},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,c=o.length,f=e.newPos,g=f-a,p=0;f+1<n&&g+1<c&&this.equals(r[f+1],o[g+1]);)f++,g++,p++;return p&&e.components.push({count:p}),e.newPos=f,g},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("")}};e4t=new hg;Bge=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Qge=/\S/,N8=new hg;N8.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Qge.test(t)&&!Qge.test(e)};N8.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]&&Bge.test(e[r])&&Bge.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};L8=new hg;L8.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};Zlt=new hg;Zlt.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};$lt=new hg;$lt.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};ict=Object.prototype.toString,A1=new hg;A1.useLongestToken=!0;A1.tokenize=L8.tokenize;A1.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,c){return typeof c>"u"?r:c}:o;return typeof t=="string"?t:JSON.stringify(T8(t,null,null,a),a," ")};A1.equals=function(t,e){return hg.prototype.equals.call(A1,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};M8=new hg;M8.tokenize=function(t){return t.s
`;await ge.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function Cut({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,volatileDescriptors:f=new Set,report:g,tolerateMissingPackages:p=!1}){let I=new Map,B=[],Q=new Map,x=new Map,y=new Map,T=new Map,U=new Map,q=new Map(t.workspaces.map(ye=>{let De=ye.anchoredLocator.locatorHash,h=o.get(De);if(typeof h>"u"){if(p)return[De,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[De,fB(h)]})),X=()=>{let ye=ge.mktempSync(),De=ee.join(ye,"stacktrace.log"),h=String(B.length+1).length,Oe=B.map((Ie,Ce)=>`${`${Ce+1}.`.padStart(h," ")}${Cl(Ie)}
`).join("");throw ge.writeFileSync(De,Oe),ge.detachTemp(ye),new tr(45,`Encounteredastackoverflowwhenresolvingpeerdependencies;cf${de.fromPortablePath(De)}`)},se=ye=>{let De=r.get(ye.descriptorHash);if(typeof De>"u")throw new Error("Assertion failed: The resolution should have been registered");let h=o.get(De);if(!h)throw new Error("Assertion failed: The package could not be found");return h},fe=(ye,De,h,{top:Oe,optional:Ie})=>{B.length>1e3&&X(),B.push(De);let Ce=me(ye,De,h,{top:Oe,optional:Ie});return B.pop(),Ce},me=(ye,De,h,{top:Oe,optional:Ie})=>{if(a.has(De.locatorHash))return;a.add(De.locatorHash),Ie||n.delete(De.locatorHash);let Ce=o.get(De.locatorHash);if(!Ce){if(p)return;throw new Error(`Assertionfailed:Thepackage(${jr(t.configuration,De)})shouldhavebeenregistered`)}let ue=[],re=[],Se=[],Le=[],dt=[];for(let _e of Array.from(Ce.dependencies.values())){if(Ce.peerDependencies.has(_e.identHash)&&Ce.locatorHash!==Oe)continue;if(Vf(_e))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");f.delete(_e.descriptorHash);let tt=Ie;if(!tt){let k=Ce.dependenciesMeta.get(Cn(_e));if(typeof k<"u"){let E=k.get(null);typeof E<"u"&&E.optional&&(tt=!0)}}let Ze=r.get(_e.descriptorHash);if(!Ze){if(p)continue;throw new Error(`Assertionfailed:Theresolution(${Zn(t.configuration,_e)})shouldhavebeenregistered`)}let xe=q.get(Ze)||o.get(Ze);if(!xe)throw new Error(`Assertionfailed:Thepackage(${Ze},resolvedfrom${Zn(t.configuration,_e)})shouldhavebeenregistered`);if(xe.peerDependencies.size===0){fe(_e,xe,new Map,{top:Oe,optional:tt});continue}let Ct,We,at=new Set,ze;re.push(()=>{Ct=NO(_e,De.locatorHash),We=LO(xe,De.locatorHash),Ce.dependencies.delete(_e.identHash),Ce.dependencies.set(Ct.identHash,Ct),r.set(Ct.descriptorHash,We.locatorHash),e.set(Ct.descriptorHash,Ct),o.set(We.locatorHash,We),ue.push([xe,Ct,We])}),Se.push(()=>{ze=new Map;for(let k of We.peerDependencies.values()){let E=Ce.dependencies.get(k.identHash);if(!E&&hB(De,k)&&(ye.identHash===De.identHash?E=ye:(E=_n(De,ye.range),e.set(E.descriptorHash,E),r.set(E.descriptorHash,De.locatorHash),f.delete(E.descriptorHash))),(!E||E.range==="missing:")&&We.dependencies.has(k.identHash)){We.peerDependencies.delete(k.identHash);continue}E||(E=_n(k,"missing:")),We.dependencies.set(E.identHash,E),Vf(E)&&K0(y,E.descriptorHash).add(We.locatorHash),Q.set(E.identHash,E),E.range==="missing:"&&at.add(E.identHash),ze.set(k.identHash,h.get(k.identHash)??We.locatorHash)}We.dependencies=new Map(za(We.dependencies,([k,E])=>Cn(E)))}),Le.push(()=>{if(!o.has(We.locatorHash))return;let k=I.get(xe.locatorHash);typeof k=="number"&&k>=2&&X();let E=I.get(xe.locatorHash),S=typeof E<"u"?E+1:1;I.set(xe.locatorHash,S),fe(Ct,We,ze,{top:Oe,optional:tt}),I.set(xe.locatorHash,S-1)}),dt.push(()=>{let k=Ce.dependencies.get(_e.identHash);if(typeof k>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let E=r.get(k.descriptorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(K0(U,E).add(De.locatorHash),!!o.has(We.locatorHash)){for(let S of We.peerDependencies.values()){let C=ze.get(S.identHash);if(typeof C>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");ly(cy(T,C),Cn(S)).push(We.locatorHash)}for(let S of at)We.dependencies.delete(S)}})}for(let _e of[...re,...Se])_e();let H;do{H=!0;for(let[_e,tt,Ze]of ue){let xe=cy(x,_e.locatorHash),Ct=da(...[...Ze.dependencies.values()].map(k=>{let E=k.range!=="missing:"?r.get(k.descriptorHash):"missing:";if(typeof E>"u")throw new Error(`Assertionfailed:Expectedtheresolutionfor${Zn(t.configuration,k)}tohavebeenregistered`);return E===Oe?`${E}(top)`:E}),tt.identHash),We=xe.get(Ct);if(typeof We>"u"){xe.set(Ct,tt);continue}if(We===tt)continue;o.delete(Ze.locatorHash),e.delete(tt.descriptorHash),r.delete(tt.descriptorHash),a.delete(Ze.locatorHash);let at=y.get(tt.descriptorHash)||[],ze=[Ce.locatorHash,...at];y.delete(tt.descriptorHash);for(let k of z
${[B,Q,x].join(`
`)}`)}asyncsetupResolutions(){this.storedResolutions=newMap,this.storedDescriptors=newMap,this.storedPackages=newMap,this.lockFileChecksum=null;lete=ee.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(ge.existsSync(e)){leto=awaitge.readFilePromise(e,"utf8");this.lockFileChecksum=ppe(o);leta=os(o);if(a.__metadata){letn=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileNeedsRefresh=n<fpe;for(letfofObject.keys(a)){if(f==="__metadata")continue;letg=a[f];if(typeofg.resolution>"u")thrownewError(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);letp=V0(g.resolution,!0),I=newGt;I.load(g,{yamlCompatibilityMode:!0});letB=I.version,Q=I.languageName||r,x=g.linkType.toUpperCase(),y=g.conditions??null,T=I.dependencies,U=I.peerDependencies,q=I.dependenciesMeta,X=I.peerDependenciesMeta,se=I.bin;if(g.checksum!=null){letme=typeofc<"u"&&!g.checksum.includes("/")?`${c}/${g.checksum}`:g.checksum;this.storedChecksums.set(p.locatorHash,me)}letfe={...p,version:B,languageName:Q,linkType:x,conditions:y,dependencies:T,peerDependencies:U,dependenciesMeta:q,peerDependenciesMeta:X,bin:se};this.originalPackages.set(fe.locatorHash,fe);for(letmeoff.split(put)){letQe=kp(me);n<=6&&(Qe=this.configuration.normalizeDependency(Qe),Qe=_n(Qe,Qe.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(Qe.descriptorHash,Qe),this.storedResolutions.set(Qe.descriptorHash,p.locatorHash)}}}}}asyncsetupWorkspaces(){this.workspaces=[],this.workspacesByCwd=newMap,this.workspacesByIdent=newMap;lete=[this.cwd];for(;e.length>0;){letr=e;e=[];for(letoofr){if(this.workspacesByCwd.has(o))continue;leta=awaitthis.addWorkspace(o);for(letnofa.workspacesCwds)e.push(n)}}}asyncaddWorkspace(e){letr=newfI(e,{project:this});awaitr.setup();leto=this.workspacesByIdent.get(r.locator.identHash);if(typeofo<"u")thrownewError(`Duplicate workspace name ${Ts(this.configuration,r.locator)}: ${de.fromPortablePath(e)} conflicts with ${de.fromPortablePath(o.cwd)}`);returnthis.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}gettopLevelWorkspace(){returnthis.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){ee.isAbsolute(e)||(e=ee.resolve(this.cwd,e)),e=ee.normalize(e).replace(/\/+$/,"");letr=this.workspacesByCwd.get(e);returnr||null}getWorkspaceByCwd(e){letr=this.tryWorkspaceByCwd(e);if(!r)thrownewError(`Workspace not found (${e})`);returnr}tryWorkspaceByFilePath(e){letr=null;for(letoofthis.workspaces)ee.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);returnr||null}getWorkspaceByFilePath(e){letr=this.tryWorkspaceByFilePath(e);if(!r)thrownewError(`Workspace not found (${e})`);returnr}tryWorkspaceByIdent(e){letr=this.workspacesByIdent.get(e.identHash);returntypeofr>"u"?null:r}getWorkspaceByIdent(e){letr=this.tryWorkspaceByIdent(e);if(!r)thrownewError(`Workspace not found (${Ts(this.configuration,e)})`);returnr}tryWorkspaceByDescriptor(e){letr=this.tryWorkspaceByIdent(e);returnr===null||(Vf(e)&&(e=gB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){letr=this.tryWorkspaceByDescriptor(e);if(r===null)thrownewError(`Workspace not found (${Zn(this.configuration,e)})`);returnr}tryWorkspaceByLocator(e){letr=this.tryWorkspaceByIdent(e);returnr===null||(gc(e)&&(e=pB(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){letr=this.tryWorkspaceByLocator(e);if(!r)thrownewError(`Workspace not found (${jr(this.configuration,e)})`);returnr}refreshWorkspaceDependencies(){for(leteofthis.workspaces){letr=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!r)thrownewError(`Assertion failed: Expected workspace ${yB(this.configuration,e)} (${Ar(this.configuration,ee.join(e.cwd,Zr.manifest),Mt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);e.dependencies=newMap(r.dependencies)}}forgetResolution(e){letr=a=>{this.storedRes
`;switch(_e){case 0:Ze+=`#Scriptname:${tt}
`;break;case 1:Ze+=`#Scriptcode:${tt}
`;break}let xe=null;if(!await ge.mktempPromise(async We=>{let at=ee.join(We,"build.log"),{stdout:ze,stderr:k}=this.configuration.getSubprocessStreams(at,{header:Ze,prefix:jr(this.configuration,re),report:r}),E;try{switch(_e){case 0:E=await Dk(re,tt,[],{cwd:H,project:this,stdin:xe,stdout:ze,stderr:k});break;case 1:E=await WU(re,tt,[],{cwd:H,project:this,stdin:xe,stdout:ze,stderr:k});break}}catch(C){k.write(C.stack),E=1}if(ze.end(),k.end(),E===0)return ye.set(re.locatorHash,dt),!0;ge.detachTemp(We);let S=`${jr(this.configuration,re)}couldn't be built successfully (exit code ${Ar(this.configuration,E,Mt.NUMBER)}, logs can be found here: ${Ar(this.configuration,at,Mt.PATH)})`;return this.optionalBuilds.has(re.locatorHash)?(r.reportInfo(9,S),ye.set(re.locatorHash,dt),!0):(r.reportError(9,S),!1)}))return}})())}}if(await cc(Ce),Ie===se.size){let ue=Array.from(se).map(re=>{let Se=this.storedPackages.get(re);if(!Se)throw new Error("Assertion failed: The package should have been registered");return jr(this.configuration,Se)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won'tbebuilt(affectedpackagesare:${ue})`);break}}this.storedBuildState=ye}async install(e){var f,g;let r=this.configuration.get("nodeLinker");(f=rt.telemetry)==null||f.reportInstall(r),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(p=>p.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let p of this.configuration.packageExtensions.values())for(let[,I]of p)for(let B of I)B.status="inactive";let o=ee.join(this.cwd,this.configuration.get("lockfileFilename")),a=null;if(e.immutable)try{a=await ge.readFilePromise(o,"utf8")}catch(p){throw p.code==="ENOENT"?new tr(28,"The lockfile would have been created by this install, which is explicitly forbidden."):p}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,p]of this.configuration.packageExtensions)for(let[,I]of p)for(let B of I)if(B.userProvided){let Q=Ar(this.configuration,B,Mt.PACKAGE_EXTENSION);switch(B.status){case"inactive":e.report.reportWarning(68,`${Q}:Nomatchingpackageinthedependencytree;youmaynotneedthisruleanymore.`);break;case"redundant":e.report.reportWarning(69,`${Q}:Thisruleseemsredundantwhenappliedontheoriginalpackage;theextensionmayhavebeenappliedupstream.`);break}}if(a!==null){let p=c0(a,this.generateLockfile());if(p!==a){let I=Dge(o,o,a,p,void 0,void 0,{maxEditLength:100});if(I){e.report.reportSeparator();for(let B of I.hunks){e.report.reportInfo(null,`@@-${B.oldStart},${B.oldLines}+${B.newStart},${B.newLines}@@`);for(let Q of B.lines)Q.startsWith("+")?e.report.reportError(28,Ar(this.configuration,Q,Mt.ADDED)):Q.startsWith("-")?e.report.reportError(28,Ar(this.configuration,Q,Mt.REMOVED)):e.report.reportInfo(null,Ar(this.configuration,Q,"grey"))}e.report.reportSeparator()}throw new tr(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let p of this.configuration.packageExtensions.values())for(let[,I]of p)for(let B of I)B.userProvided&&B.status==="active"&&((g=rt.telemetry)==null||g.reportPackageExtension(H0(B,Mt.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject>"u"||e.persistProject)&&e.mode!=="update-lockfile"&&await this.cacheCleanup(e)});let n=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],c=await Promise.all(n.map(async p=>dS(p,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skippeddueto${Ar(this.configuration,"mode=update-lockfile",Mt.CODE)}`);return}await this.linkEverything
`+Ya(r)}async persistLockfile(){let e=ee.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await ge.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=c0(r,o);a!==r&&(await ge.writeFilePromise(e,a),this.lockFileChecksum=ppe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(j8))e.push(...c);let r=(0,Mx.default)(this,e),o=W8.default.serialize(r),a=da(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ge.mkdirPromise(ee.dirname(n),{recursive:!0}),await ge.writeFilePromise(n,await dut(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await mut(await ge.readFilePromise(a));n=W8.default.deserialize(c),this.installStateChecksum=da(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,Mx.default)(n,j8.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,Mx.default)(n,j8.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Yi}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return;let o=new Set([".gitignore"]);if(!zO(e.cwd,this.cwd)||!await ge.existsPromise(e.cwd))return;let a=this.configuration.get("preferAggregateCacheInfo"),n=0,c=null;for(let f of await ge.readdirPromise(e.cwd)){if(o.has(f))continue;let g=ee.resolve(e.cwd,f);e.markedFiles.has(g)||(c=f,e.immutable?r.reportError(56,`${Ar(this.configuration,ee.basename(g),"magenta")}appearstobeunusedandwouldbemarkedfordeletion,butthecacheisimmutable`):(a?n+=1:r.reportInfo(19,`${Ar(this.configuration,ee.basename(g),"magenta")}appearstobeunused-removing`),await ge.removePromise(g)))}a&&n!==0&&r.reportInfo(19,n>1?`${n}packagesappearedtobeunusedandwereremoved`:`${c}appearedtobeunusedandwasremoved`)}}});var gI,Cpe=Ot(()=>{Nt();z0();kU();dl();gI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let o=this.getRegistryPath();this.isNew=!ge.existsSync(o),this.sendReport(r),this.startBuffer()}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){K0(this.values,e).add(r)}reportEnumerator(e,r){K0(this.enumerators,e).add(da(r))}reportHit(e,r="*"){let o=cy(this.hits,e),a=Gf(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return ee.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=ge.readJsonSync(r)}catch{o={}}let a=Date.now(),n=this.configuration.get("telemetryInterval")*24*60*60*1e3,f=(o.lastUpdate??a+n+Math.floor(n*Math.random()))+n;if(f>a&&o.lastUpdate!=null)return;try{ge.mkdirSync(ee.dirname(r),{recursive:!0}),ge.writeJsonSync(r,{lastUpdate:a})}catch{return}if(f>a||!o.blocks)return;let g=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,p=I=>SU(g,I,{configuration:this.configuration}).catch(()=>{});for(let[I,B]of Object.entries(o.blocks??{})){if(Object.keys(B).length===0)continue;let Q=B;Q.userId=I,Q.reportType="primary";for(let T of Object.keys(Q.enumerators??{}))Q.enumerators[T]=Q.enumerators[T].length;p(Q);let x=new Map,y=
`),p=c.length;for(p>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());p-- >0;)f=r(t.styles[c[p]],f,g);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=I=>o(I,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(n):[n],p}})};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=Dut,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c=="string"?t[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(g){t.alias(n,g)},get(){let g=p=>o(p,g.stack);return Reflect.setPrototypeOf(g,t),g.stack=this.stack?this.stack.concat(f.stack):f.stack,g}})},t.theme=n=>{if(!vut(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))t.alias(c,n[c]);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=vpe(),t.define=a,t};$8.exports=Dpe();$8.exports.create=Dpe});var Vo=K(pn=>{"use strict";var Sut=Object.prototype.toString,Pl=Cc(),Spe=!1,e_=[],kpe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};pn.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);pn.hasColor=t=>!!t&&Pl.hasColor(t);var _x=pn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);pn.nativeType=t=>Sut.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");pn.isAsyncFn=t=>pn.nativeType(t)==="asyncfunction";pn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";pn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};pn.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};pn.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};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
`+r,width:a=80}=e;a-=((o+r).match(/[^\S\n]/g)||[]).length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=t.trim(),g=new RegExp(c,"g"),p=f.match(g)||[];return p=p.map(I=>I.replace(/\n$/,"")),e.padEnd&&(p=p.map(I=>I.padEnd(a," "))),e.padStart&&(p=p.map(I=>I.padStart(a," "))),r+p.join(o)};pn.unmute=t=>{let e=t.stack.find(o=>Pl.keys.color.includes(o));return e?Pl[e]:t.stack.find(o=>o.slice(2)==="bg")?Pl[e.slice(2)]:o=>o};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>Pl.keys.color.includes(o));if(e){let o=Pl["bg"+pn.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?Pl[r.slice(2).toLowerCase()]||t:Pl.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>Pl.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return Pl[kpe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=kpe[o];return a&&Pl["bg"+pn.pascal(a)]||t}return Pl.none};pn.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};pn.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,c)=>{let f=c.length-1>n?o[a]||{}:r;return!pn.isObject(f)&&n<c.length-1&&(f={}),o[a]=f},t);pn.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};pn.mixin=(t,e)=>{if(!_x(t))return e;if(!_x(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&_x(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);_x(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?pn.define(t,o,a.bind(e)):pn.define(t,o,a)}};pn.onExit=t=>{let e=(r,o)=>{Spe||(Spe=!0,e_.forEach(a=>a()),r===!0&&process.exit(128+o))};e_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),e_.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var xpe=K(dI=>{"use strict";dI.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"};dI.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};dI.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};dI.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};dI.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 Fpe=K((ZUt,bpe)=>{"use strict";var Ppe=Be("readline"),kut=xpe(),xut=/^(?:\x1b)([a-zA-Z0-9])$/,Put=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,but={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","[2
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}zpe.exports=g1});var Zpe=K((s3t,Xpe)=>{"use strict";var Jut=Vo(),Vpe={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 Vpe.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}};Xpe.exports=(t,e={})=>{let r=Jut.merge({},Vpe,e.roles);return r[t]||r.default}});var p1=K((o3t,the)=>{"use strict";var zut=Cc(),Vut=mI(),Xut=Zpe(),Hx=Vo(),{reorder:c_,scrollUp:Zut,scrollDown:$ut,isObject:$pe,swap:eft}=Hx,u_=class extends Vut{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");$pe(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(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let g=0;g<c.length;g++){let p=c[g]=await this.toChoice(c[g],a++,f);o.push(p),p.choices&&await n(p.choices,p)}return o};return n(e,r).then(c=>(this.state.loadingChoices=!1,c))}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=Xut(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,Hx.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,zut.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,g=c.value)=>{for(let p of Object.keys(c))e[p]=c[p];e.input=f,e.value=g},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
`).map(X=>" "+X),U=n.length,q=0;for(let X of n)B.invalid.has(X.name)&&X.lines.forEach(se=>{T[se][0]===" "&&(T[se]=B.styles.danger(B.symbols.bullet)+T[se].slice(1))}),t.isValue(B.values[X.name])&&q++;return B.completed=(q/U*100).toFixed(0),B.output=T.join(`
`)),this.write(this.margin[2]),this.restore()}};Whe.exports=L_});var Vhe=K((F3t,zhe)=>{"use strict";var Uft=Zp(),O_=class extends Uft{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)}}};zhe.exports=O_});var Zhe=K(U_=>{"use strict";var Xhe=Vo(),Ns=(t,e)=>{Xhe.defineExport(U_,t,e),Xhe.defineExport(U_,t.toLowerCase(),e)};Ns("AutoComplete",()=>ihe());Ns("BasicAuth",()=>uhe());Ns("Confirm",()=>phe());Ns("Editable",()=>dhe());Ns("Form",()=>qx());Ns("Input",()=>Q_());Ns("Invisible",()=>Bhe());Ns("List",()=>vhe());Ns("MultiSelect",()=>She());Ns("Numeral",()=>Phe());Ns("Password",()=>Fhe());Ns("Scale",()=>Mhe());Ns("Select",()=>Zp());Ns("Snippet",()=>_he());Ns("Sort",()=>Hhe());Ns("Survey",()=>Ghe());Ns("Text",()=>Yhe());Ns("Toggle",()=>Jhe());Ns("Quiz",()=>Vhe())});var e0e=K((T3t,$he)=>{$he.exports={ArrayPrompt:p1(),AuthPrompt:C_(),BooleanPrompt:Gx(),NumberPrompt:x_(),StringPrompt:Id()}});var d1=K((M3t,r0e)=>{"use strict";var t0e=Be("assert"),K_=Be("events"),$p=Vo(),Ic=class extends K_{constructor(e,r){super(),this.options=$p.merge({},e),this.answers={...r}}register(e,r){if($p.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($p.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=$p.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:c}=$p;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];t0e(this.prompts[o],`Prompt"${o}"isnotregistered`);let f=new this.prompts[o](r),g=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",I=>{this.emit("answer",a,I,f),n(this.answers,a,I)});let p=f.emit.bind(f);return f.emit=(...I)=>(this.emit.call(this,...I),p(...I)),this.emit("prompt",f,this),r.autofill&&g!=null?(f.value=f.input=g,r.autofill==="show"&&await f.submit()):g=f.value=await f.run(),g}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||mI()}static get prompts(){return Zhe()}static get types(){return e0e()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return $p.mixinEmitter(e,new K_),e}};$p.mixinEmitter(Ic,new K_);var __=Ic.prompts;for(let t of Object.keys(__)){let e=t.toLowerCase(),r=o=>new __[t](o).run();Ic.prompt[e]=r,Ic[e]=r,Ic[t]||Reflect.defineProperty(Ic,t,{get:()=>__[t]})}var h1=t=>{$p.defineExport(Ic,t,()=>Ic.types[t])};h1("ArrayPrompt");h1("AuthPrompt");h1("BooleanPrompt");h1("NumberPrompt");h1("StringPrompt");r0e.exports=Ic});var E1=K((p8t,c0e)=>{var jft=Px();function Yft(t,e,r){var o=t==null?void 0:jft(t,e);return o===void 0?r:o}c0e.exports=Yft});var g0e=K((y8t,f0e)=>{function Wft(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}f0e.exports=Wft});var h0e=K((I8t,p0e)=>{var Jft=_0(),zft=bD();function Vft(t,e){return t&&Jft(e,zft(e),t)}p0e.exports=Vft});var m0e=K((E8t,d0e)=>{var Xft=_0(),Zft=Ay();function $ft(t,e){return t&&Xft(e,Zft(e),t)}d0e.exports=$ft});var
Andthelengthmustbe:$<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}}),c,f,g,p,I,B,Q;for(e=e||{},c=FI(e.charlist?e.charlist+"":"$<!-~>",Cme),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),p=new RegExp("^["+LK(c)+"]{"+o+","+a+"}$"),r=hme([c],n.caseSensitive,!0),r.text=dme(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",g=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: "),I=n.limitMessage;!Q;)n.limit=p,n.limitMessage=I,B=en.question(t,n),n.limit=[B,""],n.limitMessage=g,Q=en.question(f,n);return B};function Eme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return en.question(t,Xs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}en.questionInt=function(t,e){return Eme(t,e,function(r){return parseInt(r,10)})};en.questionFloat=function(t,e){return Eme(t,e,parseFloat)};en.questionPath=function(t,e){var r,o="",a=Xs({hideEchoBack:!1,limitMessage:`$<error(
)>Inputvalidpath,please.$<(Min:)min>$<(Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,g;n=OK(n,!0),o="";function p(I){I.split(/\/|\\/).reduce(function(B,Q){var x=ch.resolve(B+=Q+ch.sep);if(!ti.existsSync(x))ti.mkdirSync(x);else if(!ti.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return B},"")}try{if(c=ti.existsSync(n),r=c?ti.realpathSync(n):ch.resolve(n),!e.hasOwnProperty("exists")&&!c||typeof e.exists=="boolean"&&e.exists!==c)return o=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&e.create&&(e.isDirectory?p(r):(p(ch.dirname(r)),ti.closeSync(ti.openSync(r,"w"))),r=ti.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=ti.statSync(r),e.isFile&&!f.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!f.isDirectory())return o="Not directory: "+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return o="Size "+f.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(g=e.validate(r))!==!0)return typeof g=="string"&&(o=g),!1}catch(I){return o=I+"",!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"): '),en.question(t,a),r};function wme(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=MK(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=MK(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}en.promptCL=function(t,e){var r=Xs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=wme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,en.prompt(r),o.args};en.promptLoop=function(t,e){for(var r=Xs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(en.prompt(r)););};en.promptCLLoop=function(t,e){var r=Xs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=wme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;en.prompt(r),!o.hRes;);};en.promptSimShell=function(t){return en.prompt(Xs({hideEchoBack:!1,history:!0},t,{prompt:function(){return tm?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function Bme(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=en.keyIn(t,Xs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}en.keyInYN=function(t,e){return Bme(t,e)};en.keyInYNStrict=function(t,e){return Bme(t,e,"yn")};en.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),en.keyIn(t,Xs({limit:null},e,{hideEchoBack:!0,mask:""}))};en.keyInSelect=function(t,e,r){var o=Xs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(g){return g==="itemsCount"?t.length+"":g==="firstItem"?(t[0]+"").trim():g==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},c=49,f=`
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(g,p){var I=String.fromCharCode(c);a+=I,n[I]=p,f+="["+I+"] "+(g+"").trim()+`
`;for(key in this.rules)for(C=0;C<this.rules[key].length;C++)S+=this.rules[key][C].toString(E),S+=`
`;return S},Se.prototype.clone=function(){return new Se(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(E){return E.clone()}))},tt.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ze.prototype.clone=function(){var E={};for(var S in this.links)!this.links.hasOwnProperty(S)||(E[S]=this.links[S].clone());return new Ze(E)},xe.prototype.clone=function(){return new xe(this.goal.clone(),this.substitution.clone(),this.parent)},Ct.prototype.clone=function(){return new Ct(this.head.clone(),this.body!==null?this.body.clone():null)},Se.prototype.equals=function(E){return k.type.is_variable(E)&&this.id===E.id},Le.prototype.equals=function(E){return k.type.is_number(E)&&this.value===E.value&&this.is_float===E.is_float},H.prototype.equals=function(E){if(!k.type.is_term(E)||this.indicator!==E.indicator)return!1;for(var S=0;S<this.args.length;S++)if(!this.args[S].equals(E.args[S]))return!1;return!0},tt.prototype.equals=function(E){return k.type.is_stream(E)&&this.id===E.id},Ze.prototype.equals=function(E){var S;if(!k.type.is_substitution(E))return!1;for(S in this.links)if(!!this.links.hasOwnProperty(S)&&(!E.links[S]||!this.links[S].equals(E.links[S])))return!1;for(S in E.links)if(!!E.links.hasOwnProperty(S)&&!this.links[S])return!1;return!0},xe.prototype.equals=function(E){return k.type.is_state(E)&&this.goal.equals(E.goal)&&this.substitution.equals(E.substitution)&&this.parent===E.parent},Ct.prototype.equals=function(E){return k.type.is_rule(E)&&this.head.equals(E.head)&&(this.body===null&&E.body===null||this.body!==null&&this.body.equals(E.body))},Se.prototype.rename=function(E){return E.get_free_variable(this)},Le.prototype.rename=function(E){return this},H.prototype.rename=function(E){return new H(this.id,o(this.args,function(S){return S.rename(E)}))},tt.prototype.rename=function(E){return this},Ct.prototype.rename=function(E){return new Ct(this.head.rename(E),this.body!==null?this.body.rename(E):null)},Se.prototype.variables=function(){return[this.id]},Le.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(E){return E.variables()}))},tt.prototype.variables=function(){return[]},Ct.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Se.prototype.apply=function(E){return E.lookup(this.id)?E.lookup(this.id):this},Le.prototype.apply=function(E){return this},H.prototype.apply=function(E){if(this.indicator==="./2"){for(var S=[],C=this;C.indicator==="./2";)S.push(C.args[0].apply(E)),C=C.args[1];for(var R=C.apply(E),Z=S.length-1;Z>=0;Z--)R=new H(".",[S[Z],R]);return R}return new H(this.id,o(this.args,function(te){return te.apply(E)}),this.ref)},tt.prototype.apply=function(E){return this},Ct.prototype.apply=function(E){return new Ct(this.head.apply(E),this.body!==null?this.body.apply(E):null)},Ze.prototype.apply=function(E){var S,C={};for(S in this.links)!this.links.hasOwnProperty(S)||(C[S]=this.links[S].apply(E));return new Ze(C)},H.prototype.select=function(){for(var E=this;E.indicator===",/2";)E=E.args[0];return E},H.prototype.replace=function(E){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(E),this.args[1]]):E===null?this.args[1]:new H(",",[E,this.args[1]]):E},H.prototype.search=function(E){if(k.type.is_term(E)&&E.ref!==void 0&&this.ref===E.ref)return!0;for(var S=0;S<this.args.length;S++)if(k.type.is_term(this.args[S])&&this.args[S].search(E))return!0;return!1},We.prototype.get_current_input=function(){return this.current_input},at.prototype.get_current_input=function(){return this.session.get_current_input()},We.prototype.get_current_output=function(){return this.current_output},at.prototype.get_current_output=function(){return this.session.get_current_output()},We.prototype.set_current_input=function(E){this.current_input=E},at.prototype.set_current_input=function(E){return
`+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
Ifthisabort()isunexpected,buildwith-sASSERTIONS=1whichcangivemoreinformation.`,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 gm=K((C9t,nIe)=>{"use strict";var gCt=tIe(),pCt=rIe(),$H=!1,eq=null;pCt({},function(t,e){if(!$H){if($H=!0,t)throw t;eq=e}});if(!$H)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");nIe.exports=gCt(eq.bind,eq.lib)});var rq=K((y9t,tq)=>{"use strict";var iIe=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);tq.exports=iIe;tq.exports.default=iIe});var oIe=K((I9t,sIe)=>{"use strict";sIe.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
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function HIe(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)):eyt.get(t)||t}function tyt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(ZCt))r.push(a[2].replace($Ct,(f,g,p)=>g?HIe(g):p));else throw new Error(`InvalidChalktemplatestyleargument:${n}(instyle'${t}')`)}return r}function ryt(t){_Ie.lastIndex=0;let e=[],r;for(;(r=_Ie.exec(t))!==null;){let o=r[1];if(r[2]){let a=tyt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function KIe(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(`UnknownChalkstyle:${a}`);o=n.length>0?o[a](...n):o[a]}return o}qIe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(XCt,(n,c,f,g,p,I)=>{if(c)a.push(HIe(c));else if(g){let B=a.join("");a=[],o.push(r.length===0?B:KIe(t,r)(B)),r.push({inverse:f,styles:ryt(g)})}else if(p){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(KIe(t,r)(a.join(""))),a=[],r.pop()}else a.push(I)}),o.push(a.join("")),r.length>0){let n=`Chalktemplateliteralismissing${r.length}closingbracket${r.length===1?"":"s"}(\`}\`)`;thrownewError(n)}returno.join("")}});varnb=K((U9t,VIe)=>{"use strict";varu2=Tw(),{stdout:mq,stderr:Cq}=TM(),{stringReplaceAll:nyt,stringEncaseCRLFWithFirstIndex:iyt}=UIe(),{isArray:$P}=Array,YIe=["ansi","ansi","ansi256","ansi16m"],JI=Object.create(null),syt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))thrownewError("The `level` option should be an integer from 0 to 3");letr=mq?mq.level:0;t.level=e.level===void0?r:e.level},yq=class{constructor(e){returnWIe(e)}},WIe=t=>{lete={};returnsyt(e,t),e.template=(...r)=>zIe(e.template,...r),Object.setPrototypeOf(e,eb.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{thrownewError("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=yq,e.template};functioneb(t){returnWIe(t)}for(let[t,e]ofObject.entries(u2))JI[t]={get(){letr=tb(this,Iq(e.open,e.close,this._styler),this._isEmpty);returnObject.defineProperty(this,t,{value:r}),r}};JI.visible={get(){lett=tb(this,this._styler,!0);returnObject.defineProperty(this,"visible",{value:t}),t}};varJIe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(lettofJIe)JI[t]={get(){let{level:e}=this;returnfunction(...r){leto=Iq(u2.color[YIe[e]][t](...r),u2.color.close,this._styler);returntb(this,o,this._isEmpty)}}};for(lettofJIe){lete="bg"+t[0].toUpperCase()+t.slice(1);JI[e]={get(){let{level:r}=this;returnfunction(...o){leta=Iq(u2.bgColor[YIe[r]][t](...o),u2.bgColor.close,this._styler);returntb(this,a,this._isEmpty)}}}}varoyt=Object.defineProperties(()=>{},{...JI,level:{enumerable:!0,get(){returnthis._generator.level},set(t){this._generator.level=t}}}),Iq=(t,e,r)=>{leto,a;returnr===void0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},tb=(t,e,r)=>{leto=(...a)=>$P(a[0])&&$P(a[0].raw)?jIe(o,zIe(o,...a)):jIe(o,a.length===1?""+a[0]:a.join(" "));returnObject.setPrototypeOf(o,oyt),o._generator=t,o._styler=e,o._isEmpty=r,o},jIe=(t,e)=>{if(t.level<=0||!e)returnt._isEmpty?"":e;letr=t._styler;if(r===void0)returne;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void0;)e=nyt(e,r.close,r.open),r=r.parent;letn=e.indexOf(`
`),p=0;for(let I of g){let B=e[n+p];if(!B)continue;let Q=wyt.default(I);for(let x of f)I=x(I);e[n+p]=cEe.default(B,0,a)+I+cEe.default(B,a+Q),p++}}return{output:e.map(o=>o.trimRight()).join(`
Readabouthowtopreventthiserroronhttps://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
`,x}function vwt(t,e){return e.fs_.chmod(t,493)}function D6(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Ml.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=cBe()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(c,f)=>`/mnt/${f.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}fBe.exports=v6});var O6=K((Mzt,RBe)=>{RBe.exports=Be("stream")});var LBe=K((Nzt,NBe)=>{"use strict";function TBe(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 Gwt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TBe(Object(r),!0).forEach(function(o){jwt(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TBe(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function jwt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ywt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MBe(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 Wwt(t,e,r){return e&&MBe(t.prototype,e),r&&MBe(t,r),t}var Jwt=Be("buffer"),Ub=Jwt.Buffer,zwt=Be("util"),U6=zwt.inspect,Vwt=U6&&U6.custom||"inspect";function Xwt(t,e,r){Ub.prototype.copy.call(t,e,r)}NBe.exports=function(){function t(){Ywt(this,t),this.head=null,this.tail=null,this.length=0}return Wwt(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 Ub.alloc(0);for(var o=Ub.allocUnsafe(r>>>0),a=this.head,n=0;a;)Xwt(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 c=o.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=Ub.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(o,o.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,o}},{key:Vwt,value:function(r,o){return U6(this,Gwt({},o,{depth:0,customInspect:!1}))}}]),t}()});var K6=K((Lzt,UBe)=>{"use strict";function Zwt(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(_6,this,t)):process.nextTick(_6,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,functio
`)),t.linkname&&(e+=hG(" linkpath="+t.linkname+`
`));var r=t.pax;if(r)for(var o in r)e+=hG(" "+o+"="+r[o]+`
`);return Buffer.from(e)};AE.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};AE.encode=function(t){var e=Y1t(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(kh(t.mode&Z1t,6),100),e.write(kh(t.uid,6),108),e.write(kh(t.gid,6),116),e.write(kh(t.size,11),124),e.write(kh(t.mtime.getTime()/1e3|0,11),136),e[156]=U1e+t2t(t.type),t.linkname&&e.write(t.linkname,157),_1e.copy(e,iQ),z1t.copy(e,dG),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(kh(t.devmajor||0,6),329),e.write(kh(t.devminor||0,6),337),o&&e.write(o,345),e.write(kh(H1e(e),6),148),e)};AE.decode=function(t,e,r){var o=t[156]===0?0:t[156]-U1e,a=aE(t,0,100,e),n=xh(t,100,8),c=xh(t,108,8),f=xh(t,116,8),g=xh(t,124,12),p=xh(t,136,12),I=e2t(o),B=t[157]===0?null:aE(t,157,100,e),Q=aE(t,265,32),x=aE(t,297,32),y=xh(t,329,8),T=xh(t,337,8),U=H1e(t);if(U===8*32)return null;if(U!==xh(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(_1e.compare(t,iQ,iQ+6)===0)t[345]&&(a=aE(t,345,155,e)+"/"+a);else if(!(V1t.compare(t,iQ,iQ+6)===0&&X1t.compare(t,dG,dG+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:c,gid:f,size:g,mtime:new Date(1e3*p),type:I,linkname:B,uname:Q,gname:x,devmajor:y,devminor:T}}});var z1e=K((nVt,J1e)=>{var G1e=Be("util"),n2t=O1e(),sQ=mG(),j1e=oE().Writable,Y1e=oE().PassThrough,W1e=function(){},q1e=function(t){return t&=511,t&&512-t},i2t=function(t,e){var r=new tF(t,e);return r.end(),r},s2t=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},tF=function(t,e){this._parent=t,this.offset=e,Y1e.call(this,{autoDestroy:!1})};G1e.inherits(tF,Y1e);tF.prototype.destroy=function(t){this._parent.destroy(t)};var xg=function(t){if(!(this instanceof xg))return new xg(t);j1e.call(this,t),t=t||{},this._offset=0,this._buffer=n2t(),this._missing=0,this._partial=!1,this._onparse=W1e,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(Q){if(e._locked=!1,Q)return e.destroy(Q);e._stream||o()},n=function(){e._stream=null;var Q=q1e(e._header.size);Q?e._parse(Q,c):e._parse(512,B),e._locked||o()},c=function(){e._buffer.consume(q1e(e._header.size)),e._parse(512,B),o()},f=function(){var Q=e._header.size;e._paxGlobal=sQ.decodePax(r.slice(0,Q)),r.consume(Q),n()},g=function(){var Q=e._header.size;e._pax=sQ.decodePax(r.slice(0,Q)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(Q),n()},p=function(){var Q=e._header.size;this._gnuLongPath=sQ.decodeLongPath(r.slice(0,Q),t.filenameEncoding),r.consume(Q),n()},I=function(){var Q=e._header.size;this._gnuLongLinkPath=sQ.decodeLongPath(r.slice(0,Q),t.filenameEncoding),r.consume(Q),n()},B=function(){var Q=e._offset,x;try{x=e._header=sQ.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(y){e.emit("error",y)}if(r.consume(512),!x){e._parse(512,B),o();return}if(x.type==="gnu-long-path"){e._parse(x.size,p),o();return}if(x.type==="gnu-long-link-path"){e._parse(x.size,I),o();return}if(x.type==="pax-global-header"){e._parse(x.size,f),o();return}if(x.type==="pax-header"){e._parse(x.size,g),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=s2t(x,e._pax),e._pax
Found:${f}`);Q.code="EBADSIZE",Q.found=f,Q.expected=t.size,Q.sri=e,g.emit("error",Q)}else if(t.integrity&&!B){let Q=new Error(`${e}integritychecksumfailedwhenusing${o}:wanted${a}butgot${I}.(${f}bytes)`);Q.code="EINTEGRITY",Q.found=I,Q.expected=a,Q.algorithm=o,Q.sri=e,g.emit("error",Q)}else g.emit("size",f),g.emit("integrity",I),B&&g.emit("verified",B)});return g}Yu.exports.create=L2t;function L2t(t){t=Qa(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(AQ.createHash);return{update:function(a,n){return o.forEach(c=>c.update(a,n)),this},digest:function(a){return e.reduce((c,f)=>{let g=o.shift().digest("base64"),p=new bh(`${f}-${g}${r}`,t);if(p.algorithm&&p.digest){let I=p.algorithm;c[I]||(c[I]=[]),c[I].push(p)}return c},new Fm)}}}var O2t=new Set(AQ.getHashes()),m2e=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>O2t.has(t));function U2t(t,e){return m2e.indexOf(t.toLowerCase())>=m2e.indexOf(e.toLowerCase())?t:e}});var iQe=K((mer,nQe)=>{var qQt=SN();function GQt(t){return qQt(t)?void 0:t}nQe.exports=GQt});var oQe=K((Cer,sQe)=>{var jQt=UU(),YQt=z_(),WQt=$_(),JQt=md(),zQt=_0(),VQt=iQe(),XQt=H8(),ZQt=J_(),$Qt=1,evt=2,tvt=4,rvt=XQt(function(t,e){var r={};if(t==null)return r;var o=!1;e=jQt(e,function(n){return n=JQt(n,t),o||(o=n.length>1),n}),zQt(t,ZQt(t),r),o&&(r=YQt(r,$Qt|evt|tvt,VQt));for(var a=e.length;a--;)WQt(r,e[a]);return r});sQe.exports=rvt});Xe();Xe();Nt();var V8=Be("child_process"),ype=Te(B0()),Nx=Te(Vt()),X8=Be("fs");var pI=new Map([]);function yut(t){let e=de.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,V8.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,V8.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}async function Lx({binaryVersion:t,pluginConfiguration:e}){async function r(){let a=new Nx.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await o(a)}catch(n){process.stdout.write(a.error(n)),process.exitCode=1}}async function o(a){var T,U,q,X;let n=process.versions.node,c=">=14.15.0";if(!Ve.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!Vr.satisfiesWithPrereleases(n,c))throw new Nx.UsageError(`ThistoolrequiresaNodeversioncompatiblewith${c}(got${n}).UpgradeNode,orset\`YARN_IGNORE_NODE=1\` in your environment.`);letg=awaitrt.find(de.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),p=g.get("yarnPath"),I=g.get("ignorePath"),B=g.get("ignoreCwd"),Q=de.toPortablePath(de.resolve(process.argv[1])),x=se=>ge.readFilePromise(se).catch(()=>Buffer.of());if(!I&&!B&&await(async()=>p&&(p===Q||Buffer.compare(...awaitPromise.all([x(p),x(Q)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",awaito(a);return}elseif(p!==null&&!I)if(!ge.existsSync(p))process.stdout.write(a.error(newError(`The "yarn-path" option has been set (in ${g.sources.get("yarnPath")}), but the specified location doesn't exist (${p}).`))),process.exitCode=1;elsetry{yut(p)}catch(se){process.exitCode=se.code||1}else{I&&deleteprocess.env.YARN_IGNORE_PATH,g.get("enableTelemetry")&&!ype.isCI&&process.stdout.isTTY&&(rt.telemetry=newgI(g,"puba9cdc10ec5790a2cf4969dd413a47270")),(T=rt.telemetry)==null||T.reportVersion(t);for(let[be,Ee]ofg.plugins.entries()){pI.has(((U=be.match(/^@yarnpkg\/plugin-(.*)$/))==null?void0:U[1])??"")&&((q=rt.telemetry)==null||q.reportPluginName(be));for(letyeofEe.commands||[])a.register(ye)}letfe={cwd:de.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},me=a.process(process.argv.slice(2),fe);me.help||(X=rt.telemetry)==null||X.reportCommandName(me.path.join(" "));letQe=me.cwd;if(typeofQe<"u"&&!B){letbe=(0,X8.realpathSync)(process.cwd()),Ee=(0,X8.realpathSync)(Qe);if(be!==Ee){process.chdir(Qe),awaitr();return}}awaita.runExit(me,fe)}}returnr().catch(a=>{process.stdout.writ
Tryrunningthecommandagainwiththepackagenameprefixed:${Me.pretty(r,"yarn add",Me.Type.CODE)}${Me.pretty(r,Y.makeDescriptor(Y.makeIdent(null,"my-package"),`${fe[0]}...`),Me.Type.DESCRIPTOR)}`);if(!se)throw new Di.UsageError(`The${Me.pretty(r,X,Me.Type.CODE)}stringdidn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let me=Gft(a,se,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(me.map(async be=>{let Ee=await y1(se,{project:o,workspace:a,cache:n,fixed:c,target:be,modifier:p,strategies:I,maxResults:B});return{request:se,suggestedDescriptors:Ee,target:be}}))})).then(X=>X.flat()),x=await Ru.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async X=>{for(let{request:se,suggestedDescriptors:{suggestions:fe,rejections:me}}of Q)if(fe.filter(be=>be.descriptor!==null).length===0){let[be]=me;if(typeof be>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?X.reportError(27,`${Y.prettyDescriptor(r,se)} can'tberesolvedtoasatisfyingrange`):X.reportError(27,`${Y.prettyDescriptor(r,se)}can'tberesolvedtoasatisfyingrange(note:networkresolutionhasbeendisabled)`),X.reportSeparator(),X.reportExceptionOnce(be)}});if(x.hasErrors())return x.exitCode();let y=!1,T=[],U=[];for(let{suggestedDescriptors:{suggestions:X},target:se}of Q){let fe,me=X.filter(ye=>ye.descriptor!==null),Qe=me[0].descriptor,be=me.every(ye=>Y.areDescriptorsEqual(ye.descriptor,Qe));me.length===1||be?fe=Qe:(y=!0,{answer:fe}=await(0,A0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:X.map(({descriptor:ye,name:De,reason:h})=>ye?{name:De,hint:h,descriptor:ye}:{name:De,hint:h,disabled:!0}),onCancel:()=>process.exit(130),result(ye){return this.find(ye,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ee=a.manifest[se].get(fe.identHash);(typeof Ee>"u"||Ee.descriptorHash!==fe.descriptorHash)&&(a.manifest[se].set(fe.identHash,fe),this.optional&&(se==="dependencies"?a.manifest.ensureDependencyMeta({...fe,range:"unknown"}).optional=!0:se==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...fe,range:"unknown"}).optional=!0)),typeof Ee>"u"?T.push([a,se,fe,I]):U.push([a,se,Ee,fe]))}return await r.triggerMultipleHooks(X=>X.afterWorkspaceDependencyAddition,T),await r.triggerMultipleHooks(X=>X.afterWorkspaceDependencyReplacement,U),y&&this.context.stdout.write(`
`),(await St.start({configuration:r,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async X=>{await o.install({cache:n,report:X,mode:this.mode})})).exitCode()}};Ed.paths=[["add"]],Ed.usage=Di.Command.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$
`),0}return(await St.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await yn.getPackageAccessibleBinaries(a,{project:o}),p=Array.from(f.keys()).reduce((I,B)=>Math.max(I,B.length),0);for(let[I,[B,Q]]of f)c.reportJson({name:I,source:Y.stringifyIdent(B),path:Q});if(this.verbose)for(let[I,[B]]of f)c.reportInfo(null,`${I.padEnd(p," ")}${Y.prettyLocator(r,B)}`);else for(let I of f.keys())c.reportInfo(null,I)})).exitCode()}};wd.paths=[["bin"]],wd.usage=eh.Command.Usage({description:"get the path to a binary script",details:`
Whenusedwithoutarguments,thiscommandwillprintthelistofallthebinariesavailableinthecurrentworkspace.Addingthe\`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});Xe();Nt();var I1=Te(Vt()),Bd=class extends pt{constructor(){super(...arguments);this.mirror=I1.Option.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=I1.Option.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=await Xr.find(r);return(await St.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,c=!this.mirror;n&&(await ge.removePromise(o.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await ge.removePromise(o.cwd)})).exitCode()}};Bd.paths=[["cache","clean"],["cache","clear"]],Bd.usage=I1.Command.Usage({description:"remove the shared cache files",details:`
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});Xe();var th=Te(Vt()),u0e=Te(E1()),Y_=Be("util"),Qd=class extends pt{constructor(){super(...arguments);this.json=th.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=th.Option.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=th.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new th.UsageError(`Couldn'tfindaconfigurationsettingsnamed"${o}"`);let c=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=Ve.convertMapsToIndexableObjects(c),g=a?(0,u0e.default)(f,a):f,p=await St.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async I=>{I.reportJson(g)});if(!this.json){if(typeof g=="string")return this.context.stdout.write(`${g}
`,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",`yarnconfigget'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"]]});Xe();var wc=Te(Vt()),tde=Te(V_()),rde=Te(E1()),nde=Te(X_()),Z_=Be("util"),vd=class extends pt{constructor(){super(...arguments);this.json=wc.Option.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=wc.Option.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=wc.Option.String();this.value=wc.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new wc.UsageError("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 wc.UsageError(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new wc.UsageError("This setting only affects the file it'sin,andthuscannotbesetfromtheCLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?y=>rt.updateHomeConfiguration(y):y=>rt.updateConfiguration(o(),y))(y=>{if(n){let T=(0,tde.default)(y);return(0,nde.default)(T,this.name,f),T}else return{...y,[a]:f}});let I=(await rt.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),B=Ve.convertMapsToIndexableObjects(I),Q=n?(0,rde.default)(B,n):B;return(await St.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async y=>{Z_.inspect.styles.name="cyan",y.reportInfo(0,`Successfully set ${this.name} to ${(0,Z_.inspect)(Q,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};vd.paths=[["config","set"]],vd.usage=wc.Command.Usage({description:"changeaconfigurationsettings",details:`
`,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",`yarnconfigsetunsafeHttpWhitelist--json'["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarnconfigsetpackageExtensions--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",`yarnconfigset'npmRegistries["//npm.example.com"].npmAuthToken'"ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});Xe();var rh=Te(Vt()),pde=Te(V_()),hde=Te(ade()),dde=Te(eK()),Dd=class extends pt{constructor(){super(...arguments);this.home=rh.Option.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=rh.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new rh.UsageError("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 rh.UsageError(`Couldn't find a configuration settings named "${a}"`);let f=this.home?p=>rt.updateHomeConfiguration(p):p=>rt.updateConfiguration(o(),p);return(await St.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async p=>{let I=!1;await f(B=>{if(!(0,hde.default)(B,this.name))return p.reportWarning(0,`Configuration doesn'tcontainsetting${this.name};thereisnothingtounset`),I=!0,B;let Q=n?(0,pde.default)(B):{...B};return(0,dde.default)(Q,this.name),Q}),I||p.reportInfo(0,`Successfullyunset${this.name}`)})).exitCode()}};Dd.paths=[["config","unset"]],Dd.usage=rh.Command.Usage({description:"unset a configuration setting",details:`
`,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"]]});Xe();Xe();var yI=Te(Vt()),tK=Be("util"),Sd=class extends pt{constructor(){super(...arguments);this.verbose=yI.Option.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=yI.Option.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=yI.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins,{strict:!1});return(await St.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{if(r.invalid.size>0&&!this.json){for(let[n,c]of r.invalid)a.reportError(34,`Invalidconfigurationkey"${n}"in${c}`);a.reportSeparator()}if(this.json){let n=Ve.sortMap(r.settings.keys(),c=>c);for(let c of n){let f=r.settings.get(c),g=r.getSpecial(c,{hideSecrets:!0,getNativePaths:!0}),p=r.sources.get(c);this.verbose?a.reportJson({key:c,effective:g,source:p}):a.reportJson({key:c,effective:g,source:p,...f})}}else{let n=Ve.sortMap(r.settings.keys(),g=>g),c=n.reduce((g,p)=>Math.max(g,p.length),0),f={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let g=n.map(I=>{let B=r.settings.get(I);if(!B)throw new Error(`Assertionfailed:Thissettings("${I}")shouldhavebeenregistered`);let Q=this.why?r.sources.get(I)||"<default>":B.description;return[I,Q]}),p=g.reduce((I,[,B])=>Math.max(I,B.length),0);for(let[I,B]of g)a.reportInfo(null,`${I.padEnd(c," ")}${B.padEnd(p," ")}${(0,tK.inspect)(r.getSpecial(I,{hideSecrets:!0,getNativePaths:!0}),f)}`)}else for(let g of n)a.reportInfo(null,`${g.padEnd(c," ")}${(0,tK.inspect)(r.getSpecial(g,{hideSecrets:!0,getNativePaths:!0}),f)}`)}})).exitCode()}};Sd.paths=[["config"]],Sd.usage=yI.Command.Usage({description:"display the current configuration",details:`
`,examples:[["Print the active configuration settings","$0 config"]]});Xe();var nh=Te(Vt()),nK=Te(QA());var Jx={};sr(Jx,{Strategy:()=>w1,acceptedStrategies:()=>Dht,dedupe:()=>rK});Xe();Xe();var mde=Te(pa()),w1=(e=>(e.HIGHEST="highest",e))(w1||{}),Dht=new Set(Object.values(w1)),Sht={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[g,p]of t.storedResolutions){let I=t.storedDescriptors.get(g);if(typeof I>"u")throw new Error(`Assertionfailed:Thedescriptor(${g})shouldhavebeenregistered`);Ve.getSetWithDefault(c,I.identHash).add(p)}let f=new Map(Ve.mapAndFilter(t.storedDescriptors.values(),g=>Y.isVirtualDescriptor(g)?Ve.mapAndFilter.skip:[g.descriptorHash,Ve.makeDeferred()]));for(let g of t.storedDescriptors.values()){let p=f.get(g.descriptorHash);if(typeof p>"u")throw new Error(`Assertionfailed:Thedescriptor(${g.descriptorHash})shouldhavebeenregistered`);let I=t.storedResolutions.get(g.descriptorHash);if(typeof I>"u")throw new Error(`Assertionfailed:Theresolution(${g.descriptorHash})shouldhavebeenregistered`);let B=t.originalPackages.get(I);if(typeof B>"u")throw new Error(`Assertionfailed:Thepackage(${I})shouldhavebeenregistered`);Promise.resolve().then(async()=>{var se;let Q=r.getResolutionDependencies(g,a),x=Object.fromEntries(await Ve.allSettledSafe(Object.entries(Q).map(async([fe,me])=>{let Qe=f.get(me.descriptorHash);if(typeof Qe>"u")throw new Error(`Assertionfailed:Thedescriptor(${me.descriptorHash})shouldhavebeenregistered`);let be=await Qe.promise;if(!be)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[fe,be.updatedPackage]})));if(e.length&&!mde.default.isMatch(Y.stringifyIdent(g),e)||!r.shouldPersistResolution(B,a))return B;let y=c.get(g.identHash);if(typeof y>"u")throw new Error(`Assertionfailed:Theresolutions(${g.identHash})shouldhavebeenregistered`);if(y.size===1)return B;let T=[...y].map(fe=>{let me=t.originalPackages.get(fe);if(typeof me>"u")throw new Error(`Assertionfailed:Thepackage(${fe})shouldhavebeenregistered`);return me}),U=await r.getSatisfying(g,x,T,a),q=(se=U.locators)==null?void 0:se[0];if(typeof q>"u"||!U.sorted)return B;let X=t.originalPackages.get(q.locatorHash);if(typeof X>"u")throw new Error(`Assertionfailed:Thepackage(${q.locatorHash})shouldhavebeenregistered`);return X}).then(async Q=>{let x=await t.preparePackage(Q,{resolver:r,resolveOptions:a});p.resolve({descriptor:g,currentPackage:B,updatedPackage:Q,resolvedPackage:x})}).catch(Q=>{p.reject(Q)})}return[...f.values()].map(g=>g.promise)}};async function rK(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,c=new Yi,f=n.makeResolver(),g=n.makeFetcher(),p={cache:o,checksums:t.storedChecksums,fetcher:g,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},I={project:t,resolver:f,report:c,fetchOptions:p};return await a.startTimerPromise("Deduplication step",async()=>{let B=Sht[e],Q=await B(t,r,{resolver:f,resolveOptions:I,fetcher:g,fetchOptions:p}),x=po.progressViaCounter(Q.length);a.reportProgress(x);let y=0;await Promise.all(Q.map(q=>q.then(X=>{if(X===null||X.currentPackage.locatorHash===X.updatedPackage.locatorHash)return;y++;let{descriptor:se,currentPackage:fe,updatedPackage:me}=X;a.reportInfo(0,`${Y.prettyDescriptor(n,se)}canbededupedfrom${Y.prettyLocator(n,fe)}to${Y.prettyLocator(n,me)}`),a.reportJson({descriptor:Y.stringifyDescriptor(se),currentResolution:Y.stringifyLocator(fe),updatedResolution:Y.stringifyLocator(me)}),t.storedResolutions.set(se.descriptorHash,me.locatorHash)}).finally(()=>x.tick())));let T;switch(y){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${y}packages`}let U=Me.pretty(n,e,Me.Type.CODE);return a.reportInfo(0,`${T}canbededupedusingthe${U}strategy`),y})}var kd=class extends pt{constructor(){super(...arguments);this.strategy=nh.Option.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:nK.isEnum(w1)});this.check=nh.Option.Boolean("-
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});Xe();var zx=Te(Vt()),BI=Te(QA()),Pd=class extends pt{constructor(){super(...arguments);this.hash=zx.Option.String({required:!1,validator:BI.applyCascade(BI.isString(),[BI.matchesRegExp(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o}=await xt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await xht(this.hash,o,{stdout:this.context.stdout}):(await St.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=[([,f])=>Y.stringifyLocator(o.storedPackages.get(f.subject)),([,f])=>Y.stringifyIdent(f.requested)];for(let[f,g]of Ve.sortMap(o.peerRequirements,c)){let p=o.storedPackages.get(g.subject);if(typeof p>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let I=o.storedPackages.get(g.rootRequester);if(typeof I>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let B=p.dependencies.get(g.requested.identHash)??null,Q=Me.pretty(r,f,Me.Type.CODE),x=Y.prettyLocator(r,p),y=Y.prettyIdent(r,g.requested),T=Y.prettyIdent(r,I),U=g.allRequesters.length-1,q=`descendant${U===1?"":"s"}`,X=U>0?`and${U}${q}`:"",se=B!==null?"provides":"doesn't provide";n.reportInfo(null,`${Q}\u2192${x}${se}${y}to${T}${X}`)}})).exitCode()}};Pd.paths=[["explain","peer-requirements"]],Pd.usage=zx.Command.Usage({description:"explain a set of peer requirements",details:`
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function xht(t,e,r){let{configuration:o}=e,a=e.peerRequirements.get(t);if(typeof a>"u")throw new Error(`NopeerDependencyrequirementsfoundforhash:"${t}"`);return(await St.start({configuration:o,stdout:r.stdout,includeFooter:!1},async c=>{let f=e.storedPackages.get(a.subject);if(typeof f>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let g=e.storedPackages.get(a.rootRequester);if(typeof g>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let p=f.dependencies.get(a.requested.identHash)??null,I=p!==null?e.storedResolutions.get(p.descriptorHash):null;if(typeof I>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let B=I!==null?e.storedPackages.get(I):null;if(typeof B>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let Q=[...a.allRequesters.values()].map(q=>{let X=e.storedPackages.get(q);if(typeof X>"u")throw new Error("Assertion failed: Expected the package to be registered");let se=Y.devirtualizeLocator(X),fe=e.storedPackages.get(se.locatorHash);if(typeof fe>"u")throw new Error("Assertion failed: Expected the package to be registered");let me=fe.peerDependencies.get(a.requested.identHash);if(typeof me>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:X,peerDependency:me}});if(B!==null){let q=Q.every(({peerDependency:X})=>Vr.satisfiesWithPrereleases(B.version,X.range));c.reportInfo(0,`${Y.prettyLocator(o,f)}provides${Y.prettyLocator(o,B)}withversion${Y.prettyReference(o,B.version??"<missing>")},which${q?"satisfies":"doesn't satisfy"}thefollowingrequirements:`)}else c.reportInfo(0,`${Y.prettyLocator(o,f)}doesn't provide ${Y.prettyIdent(o,a.requested)}, breaking the following requirements:`);c.reportSeparator();let x=Me.mark(o),y=[];for(let{pkg:q,peerDependency:X}of Ve.sortMap(Q,se=>Y.stringifyLocator(se.pkg))){let fe=(B!==null?Vr.satisfiesWithPrereleases(B.version,X.range):!1)?x.Check:x.Cross;y.push({stringifiedLocator:Y.stringifyLocator(q),prettyLocator:Y.prettyLocator(o,q),prettyRange:Y.prettyRange(o,X.range),mark:fe})}let T=Math.max(...y.map(({stringifiedLocator:q})=>q.length)),U=Math.max(...y.map(({prettyRange:q})=>q.length));for(let{stringifiedLocator:q,prettyLocator:X,prettyRange:se,mark:fe}of Ve.sortMap(y,({stringifiedLocator:me})=>me))c.reportInfo(null,`${X.padEnd(T+(X.length-q.length)," ")} \u2192 ${se.padEnd(U," ")} ${fe}`);y.length>1&&(c.reportSeparator(),c.reportInfo(0,`Note: these requirements start with ${Y.prettyLocator(e.configuration,g)}`))})).exitCode()}Xe();var D1=Te(Vt()),QI=Te(QA());Xe();Xe();Nt();var Bc=Te(Vt()),Ide=Te(Ei()),bd=class extends pt{constructor(){super(...arguments);this.useYarnPath=Bc.Option.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=Bc.Option.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn'talreadylocked"});this.version=Bc.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins);if(r.get("yarnPath")&&this.onlyIfNeeded)return 0;let o=()=>{if(typeof $n>"u")throw new Bc.UsageError("The--installflagcanonlybeusedwithoutexplicitversionspecifierfromtheYarnCLI");return`file://${process.argv[1]}`},a,n=(f,g)=>({version:g,url:f.replace(/\{\}/g,g)});if(this.version==="self")a={url:o(),version:$n??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await v1(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await v1(r,"canary"));else if(this.version==="classic")a={url:"https://nightly.yarnpkg.com/latest.js",version:"classic"};else if(this.version
${e}`)})}let f=t.projectCwd??t.startingCwd,g=ee.resolve(f,".yarn/releases"),p=ee.resolve(g,`yarn-${e}.cjs`),I=ee.relative(t.startingCwd,p),B=Ve.isTaggedYarnVersion(e),Q=t.get("yarnPath"),x=!B,y=x||!!Q||!!a;if(a===!1){if(x)throw new tr(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");y=!1}else!y&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`Youdon't seem to have ${Me.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'llhavetorelyon${Me.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")}instead`),y=!0);if(y){let se=await c();o.reportInfo(0,`Savingthenewreleasein${Me.pretty(t,I,"magenta")}`),await ge.removePromise(ee.dirname(p)),await ge.mkdirPromise(ee.dirname(p),{recursive:!0}),await ge.writeFilePromise(p,se,{mode:493}),(!Q||ee.contains(g,Q))&&await rt.updateConfiguration(f,{yarnPath:ee.relative(f,p)})}else await ge.removePromise(ee.dirname(p)),await rt.updateConfiguration(f,{yarnPath:rt.deleteProperty});let T=await Gt.tryFind(f)||new Gt;T.packageManager=`yarn@${B?e:awaitv1(t,"stable")}`;let U={};T.exportTo(U);let q=ee.join(f,Gt.fileName),X=`${JSON.stringify(U,null,T.indent)}
`;return await ge.changeFilePromise(q,X,{automaticNewlines:!0}),{bundleVersion:e}}function Ede(t){return Pr[jv(t)]}var bht=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function Fht(t){let r=`https://repo.yarnpkg.com/${Ve.isTaggedYarnVersion($n)?$n:await v1(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await Kn.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(bht),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Ede(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 Fd=class extends pt{constructor(){super(...arguments);this.code=D1.Option.String({required:!1,validator:QI.applyCascade(QI.isString(),[QI.matchesRegExp(/^YN[0-9]{4}$/)])});this.json=D1.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Ede(this.code),a=Me.pretty(r,o,Me.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await Fht(r)).get(this.code),g=typeof f<"u"?Me.jsonOrPretty(this.json,r,Me.tuple(Me.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
`)}else{let o={children:Ve.mapAndFilter(Object.entries(Pr),([a,n])=>Number.isNaN(Number(a))?Ve.mapAndFilter.skip:{label:gu(Number(a)),value:Me.tuple(Me.Type.CODE,n)})};NA.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Fd.paths=[["explain"]],Fd.usage=D1.Command.Usage({description:"explain an error code",details:`
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});Xe();Nt();var Ia=Te(Vt()),wde=Te(pa()),Rd=class extends pt{constructor(){super(...arguments);this.all=Ia.Option.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=Ia.Option.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=Ia.Option.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=Ia.Option.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=Ia.Option.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=Ia.Option.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=Ia.Option.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=Ia.Option.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=Ia.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=Ia.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a&&!this.all)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(fe,{recursive:me})=>{let Qe=fe.anchoredLocator.locatorHash,be=new Map,Ee=[Qe];for(;Ee.length>0;){let ye=Ee.shift();if(be.has(ye))continue;let De=o.storedPackages.get(ye);if(typeof De>"u")throw new Error("Assertion failed: Expected the package to be registered");if(be.set(ye,De),Y.isVirtualLocator(De)&&Ee.push(Y.devirtualizeLocator(De).locatorHash),!(!me&&ye!==Qe))for(let h of De.dependencies.values()){let Oe=o.storedResolutions.get(h.descriptorHash);if(typeof Oe>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ee.push(Oe)}}return be.values()},g=({recursive:fe})=>{let me=new Map;for(let Qe of o.workspaces)for(let be of f(Qe,{recursive:fe}))me.set(be.locatorHash,be);return me.values()},p=({all:fe,recursive:me})=>fe&&me?o.storedPackages.values():fe?g({recursive:me}):f(a,{recursive:me}),I=({all:fe,recursive:me})=>{let Qe=p({all:fe,recursive:me}),be=this.patterns.map(De=>{let h=Y.parseLocator(De),Oe=wde.default.makeRe(Y.stringifyIdent(h)),Ie=Y.isVirtualLocator(h),Ce=Ie?Y.devirtualizeLocator(h):h;return ue=>{let re=Y.stringifyIdent(ue);if(!Oe.test(re))return!1;if(h.reference==="unknown")return!0;let Se=Y.isVirtualLocator(ue),Le=Se?Y.devirtualizeLocator(ue):ue;return!(Ie&&Se&&h.reference!==ue.reference||Ce.reference!==Le.reference)}}),Ee=Ve.sortMap([...Qe],De=>Y.stringifyLocator(De));return{selection:Ee.filter(De=>be.length===0||be.some(h=>h(De))),sortedLookup:Ee}},{selection:B,sortedLookup:Q}=I({all:this.all,recursive:this.recursive});if(B.length===0)throw new Ia.UsageError("No package matched your request");let x=new Map;if(this.dependents)for(let fe of Q)for(let me of fe.dependencies.values()){let Qe=o.storedResolutions.get(me.descriptorHash);if(typeof Qe>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ve.getArrayWithDefault(x,Qe).push(fe)}let y=new Map;for(let fe of Q){if(!Y.isVirtualLocator(fe))continue;let me=Y.devirtualizeLocator(fe);Ve.getArrayWithDefault(y,me.locatorHash).push(fe)}let T={},U={children:T},q=r.makeFetcher(),X={project:o,fetcher:q,cache:n,checksums:o.storedChecksums,report:new Yi,cacheOptions:{skipIntegrityCheck:!0}},se=[async(fe,me,Qe)=>{var ye;if(!me.has("manifest"))return;let be=await q.fetch(fe,X),Ee;try{Ee=await Gt.find(be.prefixPath,{baseFs:be.packageFs})}finally{(ye=be.releaseFs)==null||ye.call(be)}Qe("Manifest",{License:Me.tuple(Me.Type.NO_HINT,Ee.license),Homepage:Me.tuple(Me.Type.URL,Ee.raw.ho
`)]}Xe();Nt();var bl=Te(Vt()),Md=class extends pt{constructor(){super(...arguments);this.all=bl.Option.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=bl.Option.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=bl.Option.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=bl.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let c=o.topLevelWorkspace,f=[];for(let p of this.destinations){let I=ee.resolve(this.context.cwd,de.toPortablePath(p)),B=await rt.find(I,this.context.plugins,{useRc:!1,strict:!1}),{project:Q,workspace:x}=await xt.find(B,I);if(o.cwd===Q.cwd)throw new bl.UsageError(`Invaliddestination'${p}';Can't link the project to itself`);if(!x)throw new lr(Q.cwd,I);if(this.all){let y=!1;for(let T of Q.workspaces)T.manifest.name&&(!T.manifest.private||this.private)&&(f.push(T),y=!0);if(!y)throw new bl.UsageError(`No workspace found to be linked in the target project: ${p}`)}else{if(!x.manifest.name)throw new bl.UsageError(`The target workspace at '${p}' doesn'thaveanameandthuscannotbelinked`);if(x.manifest.private&&!this.private)throw new bl.UsageError(`Thetargetworkspaceat'${p}'ismarkedprivate-usethe--privateflagtolinkitanyway`);f.push(x)}}for(let p of f){let I=Y.stringifyIdent(p.locator),B=this.relative?ee.relative(o.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:I}},reference:`portal:${B}`})}return(await St.start({configuration:r,stdout:this.context.stdout},async p=>{await o.install({cache:n,report:p})})).exitCode()}};Md.paths=[["link"]],Md.usage=bl.Command.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var Xx=Te(Vt()),Nd=class extends pt{constructor(){super(...arguments);this.args=Xx.Option.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};Nd.paths=[["node"]],Nd.usage=Xx.Command.Usage({description:"run node with the hook already setup",details:`
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});Xe();Xe();Nt();var mg=Te(Vt()),Pde=Be("os");Xe();Nt();var Tu=Te(Vt()),vde=Be("os");Xe();ll();var Zx=Te(Vt()),Oht="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Od(t,e){let r=await Kn.get(Oht,{configuration:t}),o=os(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Vr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var Ld=class extends pt{constructor(){super(...arguments);this.json=Zx.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins);return(await St.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Od(r,$n);for(let[c,{experimental:f,...g}]of Object.entries(n)){let p=c;f&&(p+=" [experimental]"),a.reportJson({name:c,experimental:f,...g}),a.reportInfo(null,p)}})).exitCode()}};Ld.paths=[["plugin","list"]],Ld.usage=Zx.Command.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 `yarnpluginimport`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var Uht=/^[0-9]+$/;function Dde(t){return Uht.test(t)?`pull/${t}/head`:t}var _ht=({repository:t,branch:e},r)=>[["git","init",de.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",Dde(e)],["git","reset","--hard","FETCH_HEAD"]],Kht=({branch:t})=>[["git","fetch","origin","--depth=1",Dde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],Hht=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(o=>["--plugin",ee.resolve(r,o)])),...e?["--no-minify"]:[],"|"]],Ud=class extends pt{constructor(){super(...arguments);this.installPath=Tu.Option.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Tu.Option.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Tu.Option.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=Tu.Option.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=Tu.Option.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=Tu.Option.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=Tu.Option.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o}=await xt.find(r,this.context.cwd),a=typeof this.installPath<"u"?ee.resolve(this.context.cwd,de.toPortablePath(this.installPath)):ee.resolve(de.toPortablePath((0,vde.tmpdir)()),"yarnpkg-sources",Li.makeHash(this.repository).slice(0,6));return(await St.start({configuration:r,stdout:this.context.stdout},async c=>{await oK(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator(),await S1(Hht(this,a),{configuration:r,context:this.context,target:a}),c.reportSeparator();let f=ee.resolve(a,"packages/yarnpkg-cli/bundles/yarn.js"),g=await ge.readFilePromise(f),{bundleVersion:p}=await sK(r,null,async()=>g,{report:c});this.skipPlugins||await qht(this,p,{project:o,report:c,target:a})})).exitCode()}};Ud.paths=[["set","version","from","sources"]],Ud.usage=Tu.Command.Usage({description:"build Yarn from master",details:`
`,examples:[["Build Yarn from master","$0 set version from sources"]]});async function S1(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await gn.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${Me.pretty(e,`$${[a,...n].join(" ")}`,"grey")}
`);try{await gn.execvp(a,n,{cwd:o,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function oK(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&ge.existsSync(ee.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await S1(Kht(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 ge.removePromise(o),await ge.mkdirPromise(o,{recursive:!0}),await S1(_ht(t,o),{configuration:e,context:t.context,target:o}))}async function qht(t,e,{project:r,report:o,target:a}){let n=await Od(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())!c.has(f)||await aK(f,t,{project:r,report:o,target:a})}Xe();Xe();Nt();var $x=Te(Vt()),Sde=Te(Ei()),kde=Be("url"),xde=Be("vm");var _d=class extends pt{constructor(){super(...arguments);this.name=$x.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins);return(await St.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await xt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||de.isAbsolute(this.name)){let g=ee.resolve(this.context.cwd,de.toPortablePath(this.name));a.reportInfo(0,`Reading${Me.pretty(r,g,Me.Type.PATH)}`),c=ee.relative(n.cwd,g),f=await ge.readFilePromise(g)}else{let g;if(this.name.match(/^https?:/)){try{new kde.URL(this.name)}catch{throw new tr(52,`Pluginspecifier"${this.name}"isneitherapluginnamenoravalidurl`)}c=this.name,g=this.name}else{let p=Y.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(p.reference!=="unknown"&&!Sde.default.valid(p.reference))throw new tr(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let I=Y.stringifyIdent(p),B=await Od(r,$n);if(!Object.prototype.hasOwnProperty.call(B,I)){let Q=`Couldn'tfindapluginnamed${Y.prettyIdent(r,p)}ontheremoteregistry.
`;throw r.plugins.has(I)?Q+=`Apluginnamed${Y.prettyIdent(r,p)}isalreadyinstalled;possiblyattemptingtoimportabuilt-inplugin.`:Q+=`Notethatonlythepluginsreferencedonourwebsite(${Me.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",Me.Type.URL)})canbereferencedbytheirname;anyotherpluginwillhavetobereferencedthroughitspublicurl(forexample${Me.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",Me.Type.URL)}).`,new tr(51,Q)}c=I,g=B[I].url,p.reference!=="unknown"?g=g.replace(/\/master\//,`/${I}/${p.reference}/`):$n!==null&&(g=g.replace(/\/master\//,`/@yarnpkg/cli/${$n}/`))}a.reportInfo(0,`Downloading${Me.pretty(r,g,"green")}`),f=await Kn.get(g,{configuration:r})}await AK(c,f,{project:n,report:a})})).exitCode()}};_d.paths=[["plugin","import"]],_d.usage=$x.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
`,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 AK(t,e,{project:r,report:o}){let{configuration:a}=r,n={},c={exports:n};(0,xde.runInNewContext)(e.toString(),{module:c,exports:n});let f=c.exports.name,g=`.yarn/plugins/${f}.cjs`,p=ee.resolve(r.cwd,g);o.reportInfo(0,`Savingthenewpluginin${Me.pretty(a,g,"magenta")}`),await ge.mkdirPromise(ee.dirname(p),{recursive:!0}),await ge.writeFilePromise(p,e);let I={path:g,spec:t};await rt.updateConfiguration(r.cwd,B=>{let Q=[],x=!1;for(let y of B.plugins||[]){let T=typeof y!="string"?y.path:y,U=ee.resolve(r.cwd,de.toPortablePath(T)),{name:q}=Ve.dynamicRequire(U);q!==f?Q.push(y):(Q.push(I),x=!0)}return x||Q.push(I),{...B,plugins:Q}})}var Ght=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],Kd=class extends pt{constructor(){super(...arguments);this.installPath=mg.Option.String("--path",{description:"The path where the repository should be cloned to"});this.repository=mg.Option.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=mg.Option.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=mg.Option.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=mg.Option.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=mg.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?ee.resolve(this.context.cwd,de.toPortablePath(this.installPath)):ee.resolve(de.toPortablePath((0,Pde.tmpdir)()),"yarnpkg-sources",Li.makeHash(this.repository).slice(0,6));return(await St.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await xt.find(r,this.context.cwd),f=Y.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),g=Y.stringifyIdent(f),p=await Od(r,$n);if(!Object.prototype.hasOwnProperty.call(p,g))throw new tr(51,`Couldn'tfindapluginnamed"${g}"ontheremoteregistry.Notethatonlythepluginsreferencedonourwebsite(https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let I=g;await oK(this,{configuration:r,report:n,target:o}),await aK(I,this,{project:c,report:n,target:o})})).exitCode()}};Kd.paths=[["plugin","import","from","sources"]],Kd.usage=mg.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
`,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"]]});Xe();var eP=Te(Vt()),qd=class extends pt{constructor(){super(...arguments);this.json=eP.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins);return(await St.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};qd.paths=[["plugin","runtime"]],qd.usage=eP.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});Xe();Xe();var tP=Te(Vt()),Gd=class extends pt{constructor(){super(...arguments);this.idents=tP.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);let c=new Set;for(let g of this.idents)c.add(Y.parseIdent(g).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Yi}),c.size>0)for(let g of o.storedPackages.values())c.has(g.identHash)&&o.storedBuildState.delete(g.locatorHash);else o.storedBuildState.clear();return(await St.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async g=>{await o.install({cache:n,report:g})})).exitCode()}};Gd.paths=[["rebuild"]],Gd.usage=tP.Command.Usage({description:"rebuild the project's native packages",details:`
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});Xe();Xe();Xe();var ih=Te(Vt()),lK=Te(pa()),bde=Te(QA());var jd=class extends pt{constructor(){super(...arguments);this.all=ih.Option.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ih.Option.String("--mode",{description:"Change what artifacts installs generate",validator:bde.isEnum(LA)});this.patterns=ih.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let c=this.all?o.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],g=[],p=!1,I=[];for(let y of this.patterns){let T=!1,U=Y.parseIdent(y);for(let q of c){let X=[...q.manifest.peerDependenciesMeta.keys()];for(let se of(0,lK.default)(X,y))q.manifest.peerDependenciesMeta.delete(se),p=!0,T=!0;for(let se of f){let fe=q.manifest.getForScope(se),me=[...fe.values()].map(Qe=>Y.stringifyIdent(Qe));for(let Qe of(0,lK.default)(me,Y.stringifyIdent(U))){let{identHash:be}=Y.parseIdent(Qe),Ee=fe.get(be);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");q.manifest[se].delete(be),I.push([q,se,Ee]),p=!0,T=!0}}}T||g.push(y)}let B=g.length>1?"Patterns":"Pattern",Q=g.length>1?"don't":"doesn't",x=this.all?"any":"this";if(g.length>0)throw new ih.UsageError(`${B}${Me.prettyList(r,g,Me.Type.CODE)}${Q}matchanypackagesreferencedby${x}workspace`);return p?(await r.triggerMultipleHooks(T=>T.afterWorkspaceDependencyRemoval,I),(await St.start({configuration:r,stdout:this.context.stdout},async T=>{await o.install({cache:n,report:T,mode:this.mode})})).exitCode()):0}};jd.paths=[["remove"]],jd.usage=ih.Command.Usage({description:"remove dependencies from the project",details:`
Ifthe\`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
-\`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
-\`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
Thiscommandacceptsglobpatternsasarguments(ifvalidIdentsandsupportedby[micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});Xe();Xe();var Fde=Be("util"),DI=class extends pt{async execute(){let e=await rt.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await xt.find(e,this.context.cwd);if(!o)throw new lr(r.cwd,this.context.cwd);return(await St.start({configuration:e,stdout:this.context.stdout},async n=>{let c=o.manifest.scripts,f=Ve.sortMap(c.keys(),I=>I),g={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},p=f.reduce((I,B)=>Math.max(I,B.length),0);for(let[I,B]of c.entries())n.reportInfo(null,`${I.padEnd(p," ")}${(0,Fde.inspect)(B,g)}`)})).exitCode()}};DI.paths=[["run"]];Xe();Xe();var Co=Te(Vt()),Yd=class extends pt{constructor(){super(...arguments);this.inspect=Co.Option.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=Co.Option.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=Co.Option.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=Co.Option.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=Co.Option.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=Co.Option.Boolean("--silent",{hidden:!0});this.scriptName=Co.Option.String();this.args=Co.Option.Proxy()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await xt.find(r,this.context.cwd);await o.restoreInstallState();let c=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await yn.hasPackageScript(c,this.scriptName,{project:o}))return await yn.executePackageScript(c,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await yn.getPackageAccessibleBinaries(c,{project:o});if(f.get(this.scriptName)){let p=[];return this.inspect&&(typeof this.inspect=="string"?p.push(`--inspect=${this.inspect}`):p.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?p.push(`--inspect-brk=${this.inspectBrk}`):p.push("--inspect-brk")),this.require&&p.push(`--require=${this.require}`),await yn.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:p,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let I=(await Promise.all(o.workspaces.map(async B=>B.manifest.scripts.has(this.scriptName)?B:null))).filter(B=>B!==null);if(I.length===1)return await yn.executeWorkspaceScript(I[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 Co.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn'tlistitintheirdependencies.Tofixthat,pleaserun"yarn add node-gyp"intoyourtop-levelworkspace.Youalsocanopenanissueontherepositoryofthespecifiedpackagetosuggestthemtouseanoptionalpeerdependency.`):new Co.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new Co.UsageError("The 'yarnglobal' commands have been removed in 2.x - consider using 'yarndlx'orath
`,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"]]});Xe();Xe();var SI=Te(Vt()),Wd=class extends pt{constructor(){super(...arguments);this.save=SI.Option.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=SI.Option.String();this.resolution=SI.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new lr(o.cwd,this.context.cwd);let c=Y.parseDescriptor(this.descriptor,!0),f=Y.makeDescriptor(c,this.resolution);return o.storedDescriptors.set(c.descriptorHash,c),o.storedDescriptors.set(f.descriptorHash,f),o.resolutionAliases.set(c.descriptorHash,f.descriptorHash),(await St.start({configuration:r,stdout:this.context.stdout},async p=>{await o.install({cache:n,report:p})})).exitCode()}};Wd.paths=[["set","resolution"]],Wd.usage=SI.Command.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});Xe();Nt();var sh=Te(Vt()),Rde=Te(pa()),Jd=class extends pt{constructor(){super(...arguments);this.all=sh.Option.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=sh.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);let c=o.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:I}of c.manifest.resolutions)I.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let I=ee.resolve(this.context.cwd,de.toPortablePath(p));if(Ve.isPathLike(p)){let B=await rt.find(I,this.context.plugins,{useRc:!1,strict:!1}),{project:Q,workspace:x}=await xt.find(B,I);if(!x)throw new lr(Q.cwd,I);if(this.all){for(let y of Q.workspaces)y.manifest.name&&f.add(Y.stringifyIdent(y.locator));if(f.size===0)throw new sh.UsageError("No workspace found to be unlinked in the target project")}else{if(!x.manifest.name)throw new sh.UsageError("The target workspace doesn't have a name and thus cannot be unlinked");f.add(Y.stringifyIdent(x.locator))}}else{let B=[...c.manifest.resolutions.map(({pattern:Q})=>Q.descriptor.fullName)];for(let Q of(0,Rde.default)(B,p))f.add(Q)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),(await St.start({configuration:r,stdout:this.context.stdout},async p=>{await o.install({cache:n,report:p})})).exitCode()}};Jd.paths=[["unlink"]],Jd.usage=sh.Command.Usage({description:"disconnect the local project from another one",details:`
`,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}'"]]});Xe();Xe();Xe();var Ea=Te(Vt()),Tde=Te(d1()),cK=Te(pa()),kI=Te(QA());var oh=class extends pt{constructor(){super(...arguments);this.interactive=Ea.Option.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=Ea.Option.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=Ea.Option.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Ea.Option.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Ea.Option.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=Ea.Option.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=Ea.Option.String("--mode",{description:"Change what artifacts installs generate",validator:kI.isEnum(LA)});this.patterns=Ea.Option.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let c=[...o.storedDescriptors.values()],f=c.map(B=>Y.stringifyIdent(B)),g=new Set;for(let B of this.patterns){if(Y.parseDescriptor(B).range!=="unknown")throw new Ea.UsageError("Ranges aren't allowed when using --recursive");for(let Q of(0,cK.default)(f,B)){let x=Y.parseIdent(Q);g.add(x.identHash)}}let p=c.filter(B=>g.has(B.identHash));for(let B of p)o.storedDescriptors.delete(B.descriptorHash),o.storedResolutions.delete(B.descriptorHash);return(await St.start({configuration:r,stdout:this.context.stdout},async B=>{await o.install({cache:n,report:B})})).exitCode()}async executeUpClassic(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd),n=await Xr.find(r);if(!a)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=this.interactive??r.get("preferInteractive"),g=C1(this,o),p=f?["keep","reuse","project","latest"]:["project","latest"],I=[],B=[];for(let q of this.patterns){let X=!1,se=Y.parseDescriptor(q);for(let fe of o.workspaces)for(let me of["dependencies","devDependencies"]){let be=[...fe.manifest.getForScope(me).values()].map(Ee=>Y.stringifyIdent(Ee));for(let Ee of(0,cK.default)(be,Y.stringifyIdent(se))){let ye=Y.parseIdent(Ee),De=fe.manifest[me].get(ye.identHash);if(typeof De>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let h=Y.makeDescriptor(ye,se.range);I.push(Promise.resolve().then(async()=>[fe,me,De,await y1(h,{project:o,workspace:fe,cache:n,target:me,fixed:c,modifier:g,strategies:p})])),X=!0}}X||B.push(q)}if(B.length>1)throw new Ea.UsageError(`Patterns${Me.prettyList(r,B,Me.Type.CODE)}don't match any packages referenced by any workspace`);if(B.length>0)throw new Ea.UsageError(`Pattern ${Me.prettyList(r,B,Me.Type.CODE)} doesn'tmatchanypackagesreferencedbyanyworkspace`);let Q=await Promise.all(I),x=await Ru.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async q=>{for(let[,,X,{suggestions:se,rejections:fe}]of Q){let me=se.filter(Qe=>Qe.descriptor!==null);if(me.length===0){let[Qe]=fe;if(typeof Qe>"u")throw new Error("Assertion failed: Expected an error to have been set");let be=this.cli.error(Qe);o.configuration.get("enableNetwork")?q.reportError(27,`${Y.prettyDescriptor(r,X)}can'tberesolvedtoasatisfyingrange
${be}`)}else me.length>1&&!f&&q.reportError(27,`${Y.prettyDescriptor(r,X)}hasmultiplepossibleupgradestrategies;use-itodisambiguatemanually`)}});if(x.hasErrors())return x.exitCode();let y=!1,T=[];for(let[q,X,,{suggestions:se}]of Q){let fe,me=se.filter(ye=>ye.descriptor!==null),Qe=me[0].descriptor,be=me.every(ye=>Y.areDescriptorsEqual(ye.descriptor,Qe));me.length===1||be?fe=Qe:(y=!0,{answer:fe}=await(0,Tde.prompt)({type:"select",name:"answer",message:`Whichrangedoyouwanttousein${Y.prettyWorkspace(r,q)}\u276F${X}?`,choices:se.map(({descriptor:ye,name:De,reason:h})=>ye?{name:De,hint:h,descriptor:ye}:{name:De,hint:h,disabled:!0}),onCancel:()=>process.exit(130),result(ye){return this.find(ye,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ee=q.manifest[X].get(fe.identHash);if(typeof Ee>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(Ee.descriptorHash!==fe.descriptorHash)q.manifest[X].set(fe.identHash,fe),T.push([q,X,Ee,fe]);else{let ye=r.makeResolver(),De={project:o,resolver:ye},h=r.normalizeDependency(Ee),Oe=ye.bindDescriptor(h,q.anchoredLocator,De);o.forgetResolution(Oe)}}return await r.triggerMultipleHooks(q=>q.afterWorkspaceDependencyReplacement,T),y&&this.context.stdout.write(`
`),(await St.start({configuration:r,stdout:this.context.stdout},async q=>{await o.install({cache:n,report:q,mode:this.mode})})).exitCode()}};oh.paths=[["up"]],oh.usage=Ea.Command.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 `yarnup` 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 `yarnup` and `yarnup-R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarnup` as a counterpart to what was `yarnupgrade--latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarnupgrade` which only upgraded dependencies in the current workspace, `yarnup` 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'"]]}),oh.schema=[kI.hasKeyRelationship("recursive",kI.KeyRelationship.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Xe();Xe();Xe();var zd=Te(Vt()),Vd=class extends pt{constructor(){super(...arguments);this.recursive=zd.Option.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=zd.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=zd.Option.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});
If\`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function jht(t,e,{configuration:r,peers:o}){let a=Ve.sortMap(t.storedPackages.values(),f=>Y.stringifyLocator(f)),n={},c={children:n};for(let f of a){let g={};for(let I of f.dependencies.values()){if(!o&&f.peerDependencies.has(I.identHash))continue;let B=t.storedResolutions.get(I.descriptorHash);if(!B)throw new Error("Assertion failed: The resolution should have been registered");let Q=t.storedPackages.get(B);if(!Q)throw new Error("Assertion failed: The package should have been registered");if(Q.identHash!==e)continue;{let y=Y.stringifyLocator(f);n[y]={value:[f,Me.Type.LOCATOR],children:g}}let x=Y.stringifyLocator(Q);g[x]={value:[{descriptor:I,locator:Q},Me.Type.DEPENDENT]}}}return c}function Yht(t,e,{configuration:r,peers:o}){let a=Ve.sortMap(t.workspaces,Q=>Y.stringifyLocator(Q.anchoredLocator)),n=new Set,c=new Set,f=Q=>{if(n.has(Q.locatorHash))return c.has(Q.locatorHash);if(n.add(Q.locatorHash),Q.identHash===e)return c.add(Q.locatorHash),!0;let x=!1;Q.identHash===e&&(x=!0);for(let y of Q.dependencies.values()){if(!o&&Q.peerDependencies.has(y.identHash))continue;let T=t.storedResolutions.get(y.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let U=t.storedPackages.get(T);if(!U)throw new Error("Assertion failed: The package should have been registered");f(U)&&(x=!0)}return x&&c.add(Q.locatorHash),x};for(let Q of a){let x=t.storedPackages.get(Q.anchoredLocator.locatorHash);if(!x)throw new Error("Assertion failed: The package should have been registered");f(x)}let g=new Set,p={},I={children:p},B=(Q,x,y)=>{if(!c.has(Q.locatorHash))return;let T=y!==null?Me.tuple(Me.Type.DEPENDENT,{locator:Q,descriptor:y}):Me.tuple(Me.Type.LOCATOR,Q),U={},q={value:T,children:U},X=Y.stringifyLocator(Q);if(x[X]=q,!g.has(Q.locatorHash)&&(g.add(Q.locatorHash),!(y!==null&&t.tryWorkspaceByLocator(Q))))for(let se of Q.dependencies.values()){if(!o&&Q.peerDependencies.has(se.identHash))continue;let fe=t.storedResolutions.get(se.descriptorHash);if(!fe)throw new Error("Assertion failed: The resolution should have been registered");let me=t.storedPackages.get(fe);if(!me)throw new Error("Assertion failed: The package should have been registered");B(me,U,se)}};for(let Q of a){let x=t.storedPackages.get(Q.anchoredLocator.locatorHash);if(!x)throw new Error("Assertion failed: The package should have been registered");B(x,p,null)}return I}Xe();var IK={};sr(IK,{default:()=>g0t,gitUtils:()=>wa});Xe();Nt();var wa={};sr(wa,{TreeishProtocols:()=>x1,clone:()=>yK,fetchBase:()=>rme,fetchChangedFiles:()=>nme,fetchChangedWorkspaces:()=>u0t,fetchRoot:()=>tme,isGitUrl:()=>PI,lsRemote:()=>eme,normalizeLocator:()=>dK,normalizeRepoUrl:()=>rP,resolveUrl:()=>CK,splitRepoUrl:()=>ah,validateRepoUrl:()=>mK});Xe();Nt();var k1=Te(Vt()),Vde=Te(zde()),Xde=Te(GU()),xI=Te(Be("querystring")),pK=Te(Ei()),Zde=Te(Be("url"));function $de(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"}-oBatchMode=yes`}}var c0t=[/^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\/(.+)?$/],x1=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(x1||{});function PI(t){return t?c0t.some(e=>!!t.match(e)):!1}function ah(t){t=rP(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=xI.default.parse(o);for(let[g,p]of Object.entries(a))if(typeof p!="string")throw new Error(`Assertionfailed:The${g}parametermustbealiteralstring`);let n=Object.values(x1).find(g=>Object.prototype.hasOwnProperty.call(a,g)),[c,f]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let g of Object.values(x1))delete a[g];return{repo:r,treeish:{p
-${g.join(`
-`)}?`)}returnthis.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};$d.paths=[["workspace"]],$d.usage=Ah.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
`,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 p0t={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:ime.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarnadd` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Bd,Qd,vd,Dd,Wd,Ud,bd,Zd,II,EI,B1,wI,Ed,wd,Sd,kd,xd,Pd,Fd,Rd,Td,Md,Jd,Nd,Kd,_d,Hd,Ld,qd,Gd,jd,DI,Yd,oh,Vd,$d]},h0t=p0t;var DK={};sr(DK,{default:()=>m0t});Xe();var Ft={optional:!0},wK=[["@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:Ft,zenObservable:Ft}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Ft,zenObservable:Ft}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Ft}}],["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"]:Ft,["postcss-jsx"]:Ft,["postcss-less"]:Ft,["postcss-markdown"]:Ft,["postcss-scss"]:Ft}}],["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:Ft}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Ft}}],["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:Ft,"vue-template-compiler":Ft}}],["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:Ft,"utf-8-validate":Ft}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function k0t(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function x0t(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Xe();var lP=Te(Vt()),im=class extends pt{constructor(){super(...arguments);this.verbose=lP.Option.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(()=>(AP(),aP)),o=await rt.find(this.context.cwd,this.context.plugins),{project:a}=await xt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};im.paths=[["constraints","source"]],im.usage=lP.Command.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"]]});Xe();Xe();Xe();var cP=Te(Vt()),Tme=Te(E1()),Mme=Te(X_()),Nme=Te(eK()),sm=class extends pt{constructor(){super(...arguments);this.fix=cP.Option.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(AP(),aP)),o=await rt.find(this.context.cwd,this.context.plugins),{project:a}=await xt.find(o,this.context.cwd),n=await r.find(a),c=await St.start({configuration:o,stdout:this.context.stdout},async f=>{let g=new Set,p=[];for(let I=0,B=this.fix?10:1;I<B;++I){p=[];let Q=await n.process(),x=new Set;await P0t(x,p,Q.enforcedDependencies,{fix:this.fix,configuration:o});for(let{manifest:T}of x){let U={};T.exportTo(U),T.raw=U}let y=new Set;await b0t(y,p,Q.enforcedFields,{fix:this.fix,configuration:o});for(let{manifest:T}of y)T.load(T.raw);if(g=new Set([...g,...x,...y]),x.size===0&&y.size===0)break}await Promise.all([...g].map(async I=>{await I.persistManifest()}));for(let[I,B]of p)f.reportError(I,B)});return c.hasErrors()?c.exitCode():0}};sm.paths=[["constraints"]],sm.usage=cP.Command.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
Ifthe\`--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.
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});async function P0t(t,e,r,{configuration:o,fix:a}){let n=new Map,c=new Map;for(let{workspace:f,dependencyIdent:g,dependencyRange:p,dependencyType:I}of r){let B=c.get(f);typeof B>"u"&&c.set(f,B=new Map);let Q=B.get(g.identHash);typeof Q>"u"&&B.set(g.identHash,Q=new Map);let x=Q.get(I);typeof x>"u"&&Q.set(I,x=new Set),n.set(g.identHash,g),x.add(p)}for(let[f,g]of c)for(let[p,I]of g){let B=n.get(p);if(typeof B>"u")throw new Error("Assertion failed: The ident should have been registered");for(let[Q,x]of I){let y=x.has(null)?[null]:[...x];if(y.length>2)e.push([53,`${Y.prettyWorkspace(o,f)}mustdependon${Y.prettyIdent(o,B)}viaconflictingranges${y.slice(0,-1).map(T=>Y.prettyRange(o,String(T))).join(", ")},and${Y.prettyRange(o,String(y[y.length-1]))}(in${Q})`]);else if(y.length>1)e.push([53,`${Y.prettyWorkspace(o,f)}mustdependon${Y.prettyIdent(o,B)}viaconflictingranges${Y.prettyRange(o,String(y[0]))}and${Y.prettyRange(o,String(y[1]))}(in${Q})`]);else{let T=f.manifest[Q].get(B.identHash),[U]=y;U!==null?T?T.range!==U&&(a?(f.manifest[Q].set(B.identHash,Y.makeDescriptor(B,U)),t.add(f)):e.push([24,`${Y.prettyWorkspace(o,f)}mustdependon${Y.prettyIdent(o,B)}via${Y.prettyRange(o,U)},butuses${Y.prettyRange(o,T.range)}instead(in${Q})`])):a?(f.manifest[Q].set(B.identHash,Y.makeDescriptor(B,U)),t.add(f)):e.push([23,`${Y.prettyWorkspace(o,f)}mustdependon${Y.prettyIdent(o,B)}(via${Y.prettyRange(o,U)}),butdoesn't (in ${Q})`]):T&&(a?(f.manifest[Q].delete(B.identHash),t.add(f)):e.push([25,`${Y.prettyWorkspace(o,f)} has an extraneous dependency on ${Y.prettyIdent(o,B)} (in ${Q})`]))}}}}async function b0t(t,e,r,{configuration:o,fix:a}){let n=new Map;for(let{workspace:c,fieldPath:f,fieldValue:g}of r){let p=Ve.getMapWithDefault(n,c);Ve.getSetWithDefault(p,f).add(g)}for(let[c,f]of n)for(let[g,p]of f){let I=[...p];if(I.length>2)e.push([53,`${Y.prettyWorkspace(o,c)} must have a field ${Me.pretty(o,g,"cyan")} set to conflicting values ${I.slice(0,-1).map(B=>Me.pretty(o,String(B),"magenta")).join(", ")}, or ${Me.pretty(o,String(I[I.length-1]),"magenta")}`]);else if(I.length>1)e.push([53,`${Y.prettyWorkspace(o,c)} must have a field ${Me.pretty(o,g,"cyan")} set to conflicting values ${Me.pretty(o,String(I[0]),"magenta")} or ${Me.pretty(o,String(I[1]),"magenta")}`]);else{let B=(0,Tme.default)(c.manifest.raw,g),[Q]=I;Q!==null?B===void 0?a?(await qK(c,g,Q),t.add(c)):e.push([37,`${Y.prettyWorkspace(o,c)} must have a field ${Me.pretty(o,g,"cyan")} set to ${Me.pretty(o,String(Q),"magenta")}, but doesn't`]):JSON.stringify(B)!==Q&&(a?(await qK(c,g,Q),t.add(c)):e.push([38,`${Y.prettyWorkspace(o,c)}musthaveafield${Me.pretty(o,g,"cyan")}setto${Me.pretty(o,String(Q),"magenta")},butissetto${Me.pretty(o,JSON.stringify(B),"magenta")}instead`])):B!=null&&(a?(await qK(c,g,null),t.add(c)):e.push([39,`${Y.prettyWorkspace(o,c)}hasanextraneousfield${Me.pretty(o,g,"cyan")}setto${Me.pretty(o,JSON.stringify(B),"magenta")}`]))}}}async function qK(t,e,r){r===null?(0,Nme.default)(t.manifest.raw,e):(0,Mme.default)(t.manifest.raw,e,JSON.parse(r))}var F0t={configuration:{constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[nm,im,sm]},R0t=F0t;var jK={};sr(jK,{default:()=>M0t});Xe();var T1=Te(Vt()),TI=class extends pt{constructor(){super(...arguments);this.pkg=T1.Option.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=T1.Option.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=T1.Option.String();this.args=T1.Option.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=Y.parseDescriptor(this.command),a;o.scope?a=Y.makeIdent(o.scope,`create-${o.name}`):o.name.startsWith("@")?a=Y.makeIdent(o.name.substring(1),"create"):a=Y.makeIdent(null,`create-
`);let Q=await rt.find(o,this.context.plugins),{project:x,workspace:y}=await xt.find(Q,o);if(y===null)throw new lr(x.cwd,o);await x.restoreInstallState();let T=await yn.getWorkspaceAccessibleBinaries(y);return T.has(I)===!1&&T.size===1&&typeof this.packages>"u"&&(I=Array.from(T)[0][0]),await yn.executeWorkspaceAccessibleBinary(y,I,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};am.paths=[["dlx"]],am.usage=om.Command.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 `yarndlx` as a replacement of `yarnadd` 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",`yarndlx-ptypescript-pts-nodets-node--transpile-only-e"console.log('hello!')"`]]});var T0t={commands:[TI,am]},M0t=T0t;var JK={};sr(JK,{default:()=>O0t,execUtils:()=>uP});Xe();Xe();Nt();var Mu="exec:";var uP={};sr(uP,{loadGeneratorFile:()=>M1,makeLocator:()=>WK,makeSpec:()=>Lme,parseSpec:()=>YK});Xe();Nt();function YK(t){let{params:e,selector:r}=Y.parseRange(t),o=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Lme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function WK(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return Y.makeLocator(t,Lme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function M1(t,e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(t,{protocol:e}),n=ee.isAbsolute(a)?{packageFs:new Bn(Qt.root),prefixPath:Qt.dot,localPath:Qt.root}:await r.fetcher.fetch(o,r),c=n.localPath?{packageFs:new Bn(Qt.root),prefixPath:ee.relative(Qt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,g=ee.join(c.prefixPath,a);return await f.readFilePromise(g,"utf8")}var fP=class{supports(e,r){return!!e.reference.startsWith(Mu)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Mu});if(ee.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:ee.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,c]=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:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let o=await M1(e.reference,Mu,r);return ge.mktempPromise(async a=>{let n=ee.join(a,"generator.js");return await ge.writeFilePromise(n,o),ge.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!ge.existsSync(ee.join(c,"build")))throw new Error("The script should have generated a build directory");return await Cs.makeArchiveFromDirectory(ee.join(c,"build"),{prefixPath:Y.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await ge.mktempPromise(async n=>{let c=await yn.makeScriptEnv({project:a.project,binFolder:n}),f=ee.join(e,"runtime.js");return await ge.mktempPromise(async g=>{let p=ee.join(g,"buildfile.log"),I=null,B=ge.createWriteStream(p),Q=B,x=ee.join(e,"generator"),y=ee.join(e,"build");await ge.mkdirPromise(x),await ge.mkdirPromise(y);let T={temp
`);let{code:X}=await gn.pipevp(process.execPath,["--require",de.fromPortablePath(f),de.fromPortablePath(o),Y.stringifyIdent(r)],{cwd:e,env:c,stdin:I,stdout:B,stderr:Q});if(X!==0)throw ge.detachTemp(g),new Error(`Packagegenerationfailed(exitcode${X},logscanbefoundhere:${Me.pretty(a.project.configuration,p,Me.Type.PATH)})`)})})}};Xe();Xe();var N0t=2,gP=class{supportsDescriptor(e,r){return!!e.range.startsWith(Mu)}supportsLocator(e,r){return!!e.reference.startsWith(Mu)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.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}=YK(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await M1(Y.makeRange({protocol:Mu,source:a,selector:a,params:{locator:Y.stringifyLocator(n)}}),Mu,o.fetchOptions),f=Li.makeHash(`${N0t}`,c).slice(0,6);return[WK(e,{parentLocator:n,path:a,generatorHash:f,protocol:Mu})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(c=>c.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 Ve.releaseAfterUseAsync(async()=>await Gt.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 L0t={fetchers:[fP],resolvers:[gP]},O0t=L0t;var ZK={};sr(ZK,{default:()=>K0t,fileUtils:()=>L1});Xe();Nt();var MI=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,N1=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,ls="file:";var L1={};sr(L1,{makeArchiveFromLocator:()=>pP,makeBufferFromLocator:()=>XK,makeLocator:()=>VK,makeSpec:()=>Ome,parseSpec:()=>zK});Xe();Nt();function zK(t){let{params:e,selector:r}=Y.parseRange(t),o=de.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Ome({parentLocator:t,path:e,folderHash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function VK(t,{parentLocator:e,path:r,folderHash:o,protocol:a}){return Y.makeLocator(t,Ome({parentLocator:e,path:r,folderHash:o,protocol:a}))}async function pP(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=Y.parseFileStyleRange(t.reference,{protocol:e}),c=ee.isAbsolute(n)?{packageFs:new Bn(Qt.root),prefixPath:Qt.dot,localPath:Qt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Bn(Qt.root),prefixPath:ee.relative(Qt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let g=f.packageFs,p=ee.join(f.prefixPath,n);return await Ve.releaseAfterUseAsync(async()=>await Cs.makeArchiveFromDirectory(p,{baseFs:g,prefixPath:Y.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),f.releaseFs)}async function XK(t,{protocol:e,fetchOptions:r}){return(await pP(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var hP=class{supports(e,r){return!!e.reference.startsWith(ls)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:ls});if(ee.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:ee.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)}can'tbefoundinthecacheandwillbefetch
`),!o||o.cwd===this.context.cwd){let p=ee.join(this.context.cwd,Zr.lockfile);ge.existsSync(p)||await ge.writeFilePromise(p,"");let B=[".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","# Also don't forget to run `yarnconfigsetenableGlobalCachefalse`!","# Documentation here: https://yarnpkg.com/features/zero-installs","","#!.yarn/cache",".pnp.*"].map(U=>`${U}
`}let T=ee.join(this.context.cwd,".editorconfig");ge.existsSync(T)||await ge.writeFilePromise(T,y),ge.existsSync(ee.join(this.context.cwd,".git"))||await gn.execvp("git",["init"],{cwd:this.context.cwd})}}};Am.paths=[["init"]],Am.usage=Nu.Command.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 `yarnsetversion` 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 J0t={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:[Am]},z0t=J0t;var i6={};sr(i6,{default:()=>DEt});Xe();var qme=Te(Be("os"));function NI({stdout:t}){if(qme.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")}var vwe=Te(Vt());var $Ce=Te(IH()),EH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Mmt=(0,$Ce.default)(EH.appId,EH.apiKey).initIndex(EH.indexName),wH=async(t,e=0)=>await Mmt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var L2=["regular","dev","peer"],Im=class extends pt{async execute(){NI(this.context);let{Gem:e}=await Promise.resolve().then(()=>(ub(),Wq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(hb(),pb)),{useKeypress:o}=await Promise.resolve().then(()=>(T2(),pwe)),{useMinistore:a}=await Promise.resolve().then(()=>($q(),Zq)),{renderForm:n}=await Promise.resolve().then(()=>(yb(),Cb)),{default:c}=await Promise.resolve().then(()=>Te(Qwe())),{Box:f,Text:g}=await Promise.resolve().then(()=>Te(Rl())),{default:p,useEffect:I,useState:B}=await Promise.resolve().then(()=>Te(hn())),Q=await rt.find(this.context.cwd,this.context.plugins),x=()=>p.createElement(f,{flexDirection:"row"},p.createElement(f,{flexDirection:"column",width:48},p.createElement(f,null,p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(g,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),p.createElement(f,null,p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),p.createElement(f,null,p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),p.createElement(f,{flexDirection:"column"},p.createElement(f,{marginLeft:1},p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages."))
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var vEt={commands:[Im,Em]},DEt=vEt;var s6={};sr(s6,{default:()=>kEt});Xe();Nt();var Bg="portal:",Qg="link:";var Ib=class{supports(e,r){return!!e.reference.startsWith(Bg)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Bg});if(ee.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:ee.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Bg}),n=ee.isAbsolute(a)?{packageFs:new Bn(Qt.root),prefixPath:Qt.dot,localPath:Qt.root}:await r.fetcher.fetch(o,r),c=n.localPath?{packageFs:new Bn(Qt.root),prefixPath:ee.relative(Qt.root,n.localPath),localPath:Qt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,g=ee.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Bn(g,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:Qt.dot,localPath:g}:{packageFs:new au(g,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:Qt.dot}}};Xe();Xe();Nt();var Eb=class{supportsDescriptor(e,r){return!!e.range.startsWith(Bg)}supportsLocator(e,r){return!!e.reference.startsWith(Bg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(Bg.length);return[Y.makeLocator(e,`${Bg}${de.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(c=>c.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 Ve.releaseAfterUseAsync(async()=>await Gt.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}}};Xe();Nt();var wb=class{supports(e,r){return!!e.reference.startsWith(Qg)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Qg});if(ee.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:ee.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Qg}),n=ee.isAbsolute(a)?{packageFs:new Bn(Qt.root),prefixPath:Qt.dot,localPath:Qt.root}:await r.fetcher.fetch(o,r),c=n.localPath?{packageFs:new Bn(Qt.root),prefixPath:ee.relative(Qt.root,n.localPath),localPath:Qt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,g=ee.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Bn(g,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:Qt.dot,discardFromLookup:!0,localPath:g}:{packageFs:new au(g,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:Qt.dot,discardFromLookup:!0}}};Xe();Nt();var Bb=class{supportsDescriptor(e,r){return!!e.range.startsWith(Qg)}supportsLocator(e,r){return!!e.reference.startsWith(Qg)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(Qg.length);return[Y.makeLocator(e,`${Qg}${de.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(c=>c.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}}};var SEt={fetchers:[wb,Ib],resolvers:[Bb,Eb]},kEt=SEt;var T6={};sr(T6,{default:()=>Mwt});Nt();Xe();Nt();Nt();va
${I},nexttree:
${U2(f)}`);let Q=Uwe(f);if(Q)throw new Error(`${Q},afterhoistingfinished:
${U2(f)}`)}return n.debugLevel>=2&&console.log(U2(f)),NEt(f)},xEt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},PEt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(c,f)=>{if(o.has(c))return;o.add(c);for(let p of c.hoistedDependencies.values())if(!f.has(p.name)){let I;for(let B of t)I=B.dependencies.get(p.name),I&&r.set(I.name,I)}let g=new Set;for(let p of c.dependencies.values())g.add(p.name);for(let p of c.dependencies.values())c.peerNames.has(p.name)||n(p,g)};return n(e,a),r},Nwe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:g,peerNames:p,reasons:I,isHoistBorder:B,hoistPriority:Q,dependencyKind:x,hoistedFrom:y,hoistedTo:T}=e,U={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(g),peerNames:new Set(p),reasons:new Map(I),decoupled:!0,isHoistBorder:B,hoistPriority:Q,dependencyKind:x,hoistedFrom:new Map(y),hoistedTo:new Map(T)},q=U.dependencies.get(r);return q&&q.ident==U.ident&&U.dependencies.set(r,U),t.dependencies.set(U.name,U),U},bEt=(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 c=e.get(a),f=e.get(n);return f.hoistPriority!==c.hoistPriority?f.hoistPriority-c.hoistPriority:f.peerDependents.size!==c.peerDependents.size?f.peerDependents.size-c.peerDependents.size:f.dependents.size-c.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},o6=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 c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},A6=(t,e,r,o,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=LEt(c),g=bEt(c,f),p=t==c?new Map:a.fastLookupPossible?xEt(e):PEt(e),I,B=!1,Q=!1,x=new Map(Array.from(g.entries()).map(([T,U])=>[T,U[0]])),y=new Map;do{let T=TEt(t,e,r,p,x,g,o,y,a);T.isGraphChanged&&(Q=!0),T.anotherRoundNeeded&&(B=!0),I=!1;for(let[U,q]of g)q.length>1&&!c.dependencies.has(U)&&(x.delete(U),q.shift(),x.set(U,q[0]),I=!0)}while(I);for(let T of c.dependencies.values())if(!c.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let U=A6(t,[...e,T],r,y,a);U.isGraphChanged&&(Q=!0),U.anotherRoundNeeded&&(B=!0),r.delete(T.locator)}return{anotherRoundNeeded:B,isGraphChanged:Q}},FEt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},REt=(t,e,r,o,a,n,c,f,{outputReason:g,fastLookupPossible:p})=>{let I,B=null,Q=new Set;g&&(I=`${Array.from(e).map(U=>Eo(U)).join("\u2192")}`);let x=r[r.length-1],T=!(o.ident===x.ident);if(g&&!T&&(B="- self-reference"),T&&(T=o.dependencyKind!==1,g&&!T&&(B="- workspace")),T&&o.dependencyKind===2&&(T=!FEt(o),g&&!T&&(B="- external soft link with unhoisted dependencies")),T&&(T=x.dependencyKind!==1||x.hoistedFrom.has(o.name)||e.size===1,g&&!T&&(B=x.reasons.get(o.name))),T&&(T=!t.peerNames.has(o.name),g&&!T&&(B=`-cannotshadowpeer:${Eo(t.originalDependencies.get(o.name).locator)}at${I}`)),T){let U=!1,q=a.get(o.name);if(U=!q||q.ident===o.ident,g&&!U&&(B=`-filledby:${Eo(q.locator)}at${I}`),U)for(let X=r.length-1;X>=1;X--){let fe=r[X].dependencies.get(o.name);if(fe&&fe.ident!==o.ident){U=!1;let me=f.get(x);me||(me=new Set,f.set(x,me)),me.add(o.name),g&&(B=`-filledby${Eo(fe.locator)}at${r.slice(0,X).map(Qe=>Eo(Qe.locator)).join("\u2192")}`);break}}T=U}if(T&&(T=n.get(o.name)===o.ident,g&&!T&&(B=`-filledby:${Eo(c.get(o.name)[0])}at${I}`)),T){let U=!0,q=new Set(o.peerNames);for(let X=r.length-1;X>=1;X--){let se=r[X];for(let fe of q){if(
${U2(t)}`)}let Ie=o6(fe);for(let Ce of Ie)if(De.has(Ce)){let ue=ye.get(Ce);if((a.get(Ce.name)===Ce.ident||!fe.reasons.has(Ce.name))&&ue.isHoistable!==0&&fe.reasons.set(Ce.name,ue.reason),!Ce.isHoistBorder&&be.indexOf(Qb(Ce))<0){I.add(fe);let Se=Nwe(fe,Ce);x([...q,fe],Qe,be,Se,T),I.delete(fe)}}},y,T=new Set(o6(p)),U=Array.from(e).map(q=>Qb(q));do{y=T,T=new Set;for(let q of y){if(q.locator===p.locator||q.isHoistBorder)continue;let X=Nwe(p,q);x([],Array.from(r),U,X,T)}}while(T.size>0);return{anotherRoundNeeded:B,isGraphChanged:Q}},Uwe=t=>{let e=[],r=new Set,o=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let g=new Map(c);for(let p of n.dependencies.values())n.peerNames.has(p.name)||g.set(p.name,p);for(let p of n.originalDependencies.values()){let I=g.get(p.name),B=()=>`${Array.from(o).concat([n]).map(Q=>Eo(Q.locator)).join("\u2192")}`;if(n.peerNames.has(p.name)){let Q=c.get(p.name);(Q!==I||!Q||Q.ident!==p.ident)&&e.push(`${B()}-brokenpeerpromise:expected${p.ident}butfound${Q&&Q.ident}`)}else{let Q=f.hoistedFrom.get(n.name),x=n.hoistedTo.get(p.name),y=`${Q?` hoisted from ${Q.join(", ")}`:""}`,T=`${x?` hoisted to ${x}`:""}`,U=`${B()}${y}`;I?I.ident!==p.ident&&e.push(`${U}-brokenrequirepromisefor${p.name}${T}:expected${p.ident},butfound:${I.ident}`):e.push(`${U}-brokenrequirepromise:norequireddependency${p.name}${T}found`)}}o.add(n);for(let p of n.dependencies.values())n.peerNames.has(p.name)||a(p,g,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
`)},MEt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,c={name:o,references:new Set([a]),locator:a6(r,a),ident:Mwe(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},f=new Map([[t,c]]),g=(p,I)=>{let B=f.get(p),Q=!!B;if(!B){let{name:x,identName:y,reference:T,peerNames:U,hoistPriority:q,dependencyKind:X}=p,se=e.hoistingLimits.get(I.locator);B={name:x,references:new Set([T]),locator:a6(y,T),ident:Mwe(y,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(U),reasons:new Map,decoupled:!0,isHoistBorder:se?se.has(x):!1,hoistPriority:q||0,dependencyKind:X||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(p,B)}if(I.dependencies.set(p.name,B),I.originalDependencies.set(p.name,B),Q){let x=new Set,y=T=>{if(!x.has(T)){x.add(T),T.decoupled=!1;for(let U of T.dependencies.values())T.peerNames.has(U.name)||y(U)}};y(B)}else for(let x of p.dependencies)g(x,B)};for(let p of t.dependencies)g(p,c);return c},l6=t=>t.substring(0,t.indexOf("@",1)),NEt=t=>{let e={name:t.name,identName:l6(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,c)=>{let f=r.has(a),g;if(n===a)g=c;else{let{name:p,references:I,locator:B}=a;g={name:p,identName:l6(B),references:I,dependencies:new Set}}if(c.dependencies.add(g),!f){r.add(a);for(let p of a.dependencies.values())a.peerNames.has(p.name)||o(p,a,g);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},LEt=t=>{let e=new Map,r=new Set([t]),o=c=>`${c.name}@${c.ident}`,a=c=>{let f=o(c),g=e.get(f);return g||(g={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,g)),g},n=(c,f)=>{let g=!!r.has(f);if(a(f).dependents.add(c.ident),!g){r.add(f);for(let I of f.dependencies.values()){let B=a(I);B.hoistPriority=Math.max(B.hoistPriority,I.hoistPriority),f.peerNames.has(I.name)?B.peerDependents.add(f.ident):n(f,I)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},Eo=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}`},Lwe=5e4,U2=t=>{let e=0,r=(a,n,c="")=>{if(e>Lwe||n.has(a))return"";e++;let f=Array.from(a.dependencies.values()).sort((p,I)=>p.name===I.name?0:p.name>I.name?1:-1),g="";n.add(a);for(let p=0;p<f.length;p++){let I=f[p];if(!a.peerNames.has(I.name)&&I!==a){let B=a.reasons.get(I.name),Q=l6(I.locator);g+=`${c}${p<f.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(I)?">":"")+(Q!==I.name?`a:${I.name}:`:"")+Eo(I.locator)+(B?`${B}`:"")}
`:"")};var _2=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(_2||{}),_we="node_modules",wm="$wsroot$";var K2=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=UEt(t,e),c=null;if(a.length===0){let f=Owe(r,{hoistingLimits:o});c=KEt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},Uu=t=>`${t.name}@${t.reference}`,u6=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(ee.delimiter).length,c=a.split(ee.delimiter).length;return a===o?0:n!==c?c-n:a>o?1:-1});return e},Kwe=(t,e)=>{let r=Y.isVirtualLocator(t)?Y.devirtualizeLocator(t):t,o=Y.isVirtualLocator(e)?Y.devirtualizeLocator(e):e;return Y.areLocatorsEqual(r,o)},c6=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=de.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return ee.contains(o,a)===null},OEt=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=de.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,g=new Set,p=(Q,x)=>{let y=Uu(Q);if(g.has(y))return;g.add(y);let T=t.getPackageInformation(Q);if(T){let U=x?Uu(x):"";if(Uu(Q)!==U&&T.linkType==="SOFT"&&!c6(T,Q,t,o)){let q=Hwe(T,Q,t);(!f.get(q)||Q.reference.startsWith("workspace:"))&&f.set(q,Q)}for(let[q,X]of T.packageDependencies)X!==null&&(T.packagePeers.has(q)||p(t.getLocator(q,X),Q))}};for(let Q of c)p(Q,null);let I=o.split(ee.sep);for(let Q of f.values()){let x=t.getPackageInformation(Q),T=de.toPortablePath(x.packageLocation.slice(0,-1)).split(ee.sep).slice(I.length),U=n;for(let q of T){let X=U.children.get(q);X||(X={children:new Map},U.children.set(q,X)),U=X}U.workspaceLocator=Q}let B=(Q,x)=>{if(Q.workspaceLocator){let y=Uu(x),T=a.get(y);T||(T=new Set,a.set(y,T)),T.add(Q.workspaceLocator)}for(let y of Q.children.values())B(y,Q.workspaceLocator||x)};for(let Q of n.children.values())B(Q,n.workspaceLocator);return a},UEt=(t,e)=>{let r=[],o=!1,a=new Map,n=OEt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let g=de.toPortablePath(c.packageLocation.slice(0,-1)),p={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},I=new Map,B=(x,y)=>`${Uu(y)}:${x}`,Q=(x,y,T,U,q,X,se,fe)=>{var Ce,ue;let me=B(x,T),Qe=I.get(me),be=!!Qe;!be&&T.name===f.name&&T.reference===f.reference&&(Qe=p,I.set(me,p));let Ee=c6(y,T,t,g);if(!Qe){let re=0;Ee?re=2:y.linkType==="SOFT"&&T.name.endsWith(wm)&&(re=1),Qe={name:x,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:re===1?new Set:y.packagePeers,dependencyKind:re},I.set(me,Qe)}let ye;if(Ee?ye=2:q.linkType==="SOFT"?ye=1:ye=0,Qe.hoistPriority=Math.max(Qe.hoistPriority||0,ye),fe&&!Ee){let re=Uu({name:U.identName,reference:U.reference}),Se=a.get(re)||new Set;a.set(re,Se),Se.add(Qe.name)}let De=new Map(y.packageDependencies);if(e.project){let re=e.project.workspacesByCwd.get(de.toPortablePath(y.packageLocation.slice(0,-1)));if(re){let Se=new Set([...Array.from(re.manifest.peerDependencies.values(),Le=>Y.stringifyIdent(Le)),...Array.from(re.manifest.peerDependenciesMeta.keys())]);for(let Le of Se)De.has(Le)||(De.set(Le,X.get(Le)||null),Qe.peerNames.add(Le))}}let h=Uu({name:T.name.replace(wm,""),reference:T.reference}),Oe=n.get(h);if(Oe)for(let re of Oe)De.set(`${re.name}${wm}`,re.reference);(y!==q||y.link
`,{request:Ze,issuer:xe});return de.toPortablePath(at)}let Ct,We=H.match(a);if(We){if(!_e)throw Is("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ze,issuer:xe});let[,at,ze]=We,k=Ce(_e);if(!k){let Ae=be(H,_e);if(Ae===!1)throw Is("BUILTIN_NODE_RESOLUTION_FAILED",`Thebuiltinnoderesolutionalgorithmwasunabletoresolvetherequestedmodule(itdidn't go through the pnp resolver because the issuer doesn'tseemtobepartoftheYarn-manageddependencytree).
`,{request:Ze,issuer:xe,dependencyName:at}):R=Is("UNDECLARED_DEPENDENCY",`${k.name}triedtoaccess${at}.WhilethismoduleisusuallyinterpretedasaNodebuiltin,yourresolverisrunninginsideanon-Noderesolutioncontextwheresuchbuiltinsareignored.Since${at}isn't otherwise declared in ${k.name}'sdependencies,thismakestherequirecallambiguousandunsound.
`,{request:Ze,issuer:xe,issuerLocator:Object.assign({},k),dependencyName:at}));if(S==null){if(C===null||R===null)throw R||new Error("Assertion failed: Expected an error to have been set");S=C;let Ae=R.message.replace(/\n.*/g,"");R.message=Ae,!I.has(Ae)&&o!==0&&(I.add(Ae),process.emitWarning(R))}let Z=Array.isArray(S)?{name:S[0],reference:S[1]}:{name:at,reference:S},te=q(Z);if(!te.packageLocation)throw Is("MISSING_DEPENDENCY",`Adependencyseemsvalidbutdidn'tgetinstalledforsomereason.Thismightbecausedbyapartialinstall,suchasdevvsprod.
`,{request:Ze,issuer:xe,dependencyLocator:Object.assign({},Z)});let ne=te.packageLocation;ze?Ct=ee.join(ne,ze):Ct=ne}else if(ee.isAbsolute(H))Ct=ee.normalize(H);else{if(!_e)throw Is("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ze,issuer:xe});let at=ee.resolve(_e);_e.match(c)?Ct=ee.normalize(ee.join(at,H)):Ct=ee.normalize(ee.join(ee.dirname(at),H))}return ee.normalize(Ct)}function re(H,_e,tt=se){if(n.test(H))return _e;let Ze=fe(_e,tt);return Ze?ee.normalize(Ze):_e}function Se(H,{extensions:_e=Object.keys(G2.Module._extensions)}={}){let tt=[],Ze=me(H,tt,{extensions:_e});if(Ze)return ee.normalize(Ze);{let xe=Tc(H),Ct=Ce(H);if(Ct){let{packageLocation:We}=q(Ct),at=!0;try{e.fakeFs.accessSync(We)}catch(ze){if((ze==null?void 0:ze.code)==="ENOENT")at=!1;else{let k=((ze==null?void 0:ze.message)??ze??"empty exception thrown").replace(/^[A-Z]/,E=>E.toLowerCase());throw Is("QUALIFIED_PATH_RESOLUTION_FAILED",`Requiredpackageexistsbutcouldnotbeaccessed(${k}).
`,{unqualifiedPath:xe,extensions:_e})}}if(!at){let ze=We.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 Is("QUALIFIED_PATH_RESOLUTION_FAILED",`${ze}
`).join("")}`,{unqualifiedPath:xe,extensions:_e})}}functionLe(H,_e,{considerBuiltins:tt,extensions:Ze,conditions:xe}={}){try{letCt=ue(H,_e,{considerBuiltins:tt});if(H==="pnpapi")returnCt;if(Ct===null)returnnull;letWe=()=>_e!==null?Ee(_e):!1,at=(!tt||!Db(H))&&!We()?re(H,Ct,xe):Ct;returnSe(at,{extensions:Ze})}catch(Ct){throwObject.prototype.hasOwnProperty.call(Ct,"pnpCode")&&Object.assign(Ct.data,{request:Tc(H),issuer:_e&&Tc(_e)}),Ct}}functiondt(H){let_e=ee.normalize(H),tt=Gi.resolveVirtual(_e);returntt!==_e?tt:null}return{VERSIONS:ye,topLevel:De,getLocator:(H,_e)=>Array.isArray(_e)?{name:_e[0],reference:_e[1]}:{name:H,reference:_e},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){letH=[];for(let[_e,tt]ofQ)for(letZeoftt.keys())_e!==null&&Ze!==null&&H.push({name:_e,reference:Ze});returnH},getPackageInformation:H=>{let_e=h(H);if(_e===null)returnnull;lettt=de.fromPortablePath(_e.packageLocation);return{..._e,packageLocation:tt}},findPackageLocator:H=>Ce(de.toPortablePath(H)),resolveToUnqualified:U("resolveToUnqualified",(H,_e,tt)=>{letZe=_e!==null?de.toPortablePath(_e):null,xe=ue(de.toPortablePath(H),Ze,tt);returnxe===null?null:de.fromPortablePath(xe)}),resolveUnqualified:U("resolveUnqualified",(H,_e)=>de.fromPortablePath(Se(de.toPortablePath(H),_e))),resolveRequest:U("resolveRequest",(H,_e,tt)=>{letZe=_e!==null?de.toPortablePath(_e):null,xe=Le(de.toPortablePath(H),Ze,tt);returnxe===null?null:de.fromPortablePath(xe)}),resolveVirtual:U("resolveVirtual",H=>{let_e=dt(de.toPortablePath(H));return_e!==null?de.fromPortablePath(_e):null})}}Nt();vareBe=(t,e,r)=>{leto=q2(t),a=g6(o,{basePath:e}),n=de.join(e,Zr.pnpCjs);returnh6(a,{fakeFs:r,pnpapiResolution:n})};varm6=Te(rBe());varE6=Te(Vt());var_u={};sr(_u,{checkAndReportManifestCompatibility:()=>iBe,checkManifestCompatibility:()=>nBe,extractBuildScripts:()=>Sb,getExtractHint:()=>C6,hasBindingGyp:()=>y6});Xe();Nt();functionnBe(t){returnY.isPackageCompatible(t,Pp.getArchitectureSet())}functioniBe(t,e,{configuration:r,report:o}){returnnBe(t)?!0:(o==null||o.reportWarningOnce(76,`${Y.prettyLocator(r,t)} The ${Pp.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}functionSb(t,e,r,{configuration:o,report:a}){letn=[];for(letfof["preinstall","install","postinstall"])e.manifest.scripts.has(f)&&n.push([0,f]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&n.push([1,"node-gyp rebuild"]),n.length===0?[]:t.linkType!=="HARD"?(a==null||a.reportWarningOnce(6,`${Y.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?(a==null||a.reportInfoOnce(5,`${Y.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!o.get("enableScripts")&&!r.built?(a==null||a.reportWarningOnce(4,`${Y.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`),[]):iBe(t,"build",{configuration:o,report:a})?n:[]}varnwt=newSet([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);functionC6(t){returnt.packageFs.getExtractHint({relevantExtensions:nwt})}functiony6(t){lete=ee.join(t.prefixPath,"binding.gyp");returnt.packageFs.existsSync(e)}varY2={};sr(Y2,{getUnpluggedPath:()=>j2});Xe();Nt();functionj2(t,{configuration:e}){returnee.resolve(e.get("pnpUnpluggedFolder"),Y.slugifyLocator(t))}variwt=newSet([Y.makeIdent(null,"nan").identHash,Y.makeIdent(null,"node-gyp").identHash,Y.makeIdent(null,"node-pre-gyp").identHash,Y.makeIdent(null,"node-addon-api").identHash,Y.makeIdent(null,"fsevents").identHash,Y.makeIdent(null,"open").identHash,Y.makeIdent(null,"opn").identHash]),Ch=class{constructor(){this.mode="strict";this.pnpCache=newMap}getCustomDataKey(){returnJSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){returnthis.isEnabled(r)}asyncfindPackageLocation(e,r){if(!this.isEnabled(r))thrownewError("Assertion failed: Expected the PnP linker to be enabled");leto=yh(r.project).cjs;if(!ge.exi
`;for(let Q of B.locations){let x=ee.contains(t.cwd,Q);if(x===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${Q})`);n+=`-${JSON.stringify(x)}
`}if(B.aliases.length>0){n+=`aliases:
`;for(let Q of B.aliases)n+=`-${JSON.stringify(Q)}
`}if(I===f&&r.size>0){n+=`bin:
`;for(let[Q,x]of r){let y=ee.contains(t.cwd,Q);if(y===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${Q})`);n+=`${JSON.stringify(y)}:
Forconsistencywithourothercommandsthedefaultistoonlycheckthedirectdependenciesfortheactiveworkspace.Toextendthissearchtoallworkspaces,use\`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
Applyingthe\`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${lQ.map(r=>`\`${r}\``).join(", ")}.
Ifthe\`--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.
Ifcertainpackagesproducefalsepositivesforaparticularenvironment,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.
Ifparticularadvisoriesareneededtobeignored,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.
Tounderstandthedependencytreerequiringvulnerablepackages,checktherawreportwiththe\`--json\` flag or use \`yarn why <package>\` to get more information as to who depends on them.
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});Xe();Xe();Nt();var Fh=Te(Vt()),FG=Te(Ei()),RG=Be("util"),Tm=class extends pt{constructor(){super(...arguments);this.fields=Fh.Option.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=Fh.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=Fh.Option.Rest()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o}=await xt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],c=!1,f=await St.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async g=>{for(let p of this.packages){let I;if(p==="."){let fe=o.topLevelWorkspace;if(!fe.manifest.name)throw new Fh.UsageError(`Missing${Me.pretty(r,"name",Me.Type.CODE)}fieldin${de.fromPortablePath(ee.join(fe.cwd,Zr.manifest))}`);I=Y.makeDescriptor(fe.manifest.name,"unknown")}else I=Y.parseDescriptor(p);let B=En.getIdentUrl(I),Q=TG(await En.get(B,{configuration:r,ident:I,jsonResponse:!0,customErrorMessage:En.customPackageError})),x=Object.keys(Q.versions).sort(FG.default.compareLoose),T=Q["dist-tags"].latest||x[x.length-1],U=Vr.validRange(I.range);if(U){let fe=FG.default.maxSatisfying(x,U);fe!==null?T=fe:(g.reportWarning(0,`Unmetrange${Y.prettyRange(r,I.range)};fallingbacktothelatestversion`),c=!0)}else Object.prototype.hasOwnProperty.call(Q["dist-tags"],I.range)?T=Q["dist-tags"][I.range]:I.range!=="unknown"&&(g.reportWarning(0,`Unknowntag${Y.prettyRange(r,I.range)};fallingbacktothelatestversion`),c=!0);let q=Q.versions[T],X={...Q,...q,version:T,versions:x},se;if(a!==null){se={};for(let fe of a){let me=X[fe];if(typeof me<"u")se[fe]=me;else{g.reportWarning(1,`The${Me.pretty(r,fe,Me.Type.CODE)}fielddoesn't exist inside ${Y.prettyIdent(r,I)}'sinformation`),c=!0;continue}}}else this.json||(delete X.dist,delete X.readme,delete X.users),se=X;g.reportJson(se),this.json||n.push(se)}});RG.inspect.styles.name="cyan";for(let g of n)(g!==n[0]||c)&&this.context.stdout.write(`
`);return f.exitCode()}};Tm.paths=[["npm","info"]],Tm.usage=Fh.Command.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 TG(t){if(Array.isArray(t)){let e=[];for(let r of t)r=TG(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=TG(t[r]);o&&(e[r]=o)}return e}else return t||null}Xe();Xe();var uQ=Te(Vt()),b2e=Te(d1()),Mm=class extends pt{constructor(){super(...arguments);this.scope=uQ.Option.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=uQ.Option.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o=await cF({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await St.start({configuration:r,stdout:this.context.stdout},async n=>{let c=await z2t({registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),f=`/-/user/org.couchdb.user:${encodeURIComponent(c.name)}`,g=awaitEn.put(f,c,{attemptedAs:c.name,configuration:r,registry:o,jsonResponse:!0,authType:En.AuthType.NO_AUTH});returnawaitJ2t(o,g.token,{configuration:r,scope:this.scope}),n.reportInfo(0,"Successfullyloggedin")})).exitCode()}};Mm.paths=[["npm","login"]],Mm.usage=uQ.Command.Usage({category:"Npm-relatedcommands",description:"storenewlogininfotoaccessthenpmregistry",details:"\nThiscommandwillaskyouforyourusername,password,and2FAOne-Time-Password(whenitapplies).Itwillthenmodifyyourlocalconfiguration(inyourhomefolder,neverintheprojectitself)toreferencethenewtokensthusgenerated.\n\nAddingthe`-s,--scope`flagwillcausetheauthenticationtobedoneagainstwhateverregistryisconfiguredfortheassociatedscope(seealso`npmScopes`).\n\nAddingthe`--publish`flagwillcausetheauthenticationtobedoneagainsttheregistryusedwhenpublishingthepackage(seealso`publishConfig.registry`and`npmPublishRegistry`).\n",examples:[["Logintothedefaultregistry","yarnnpmlogin"],["Logintotheregistrylinkedtothe@my-scoperegistry","yarnnpmlogin--scopemy-scope"],["Logintothepublishregistryforthecurrentpackage","yarnnpmlogin--publish"]]});asyncfunction
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function fQ(t,e){let r=`/-/package${En.getIdentUrl(t)}/dist-tags`;returnEn.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:En.customPackageError})}var_m=classextendspt{constructor(){super(...arguments);this.package=Km.Option.String();this.tag=Km.Option.String()}asyncexecute(){letr=awaitrt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=awaitxt.find(r,this.context.cwd);if(!a)thrownewlr(o.cwd,this.context.cwd);letn=Y.parseDescriptor(this.package,!0),c=n.range;if(!R2e.default.valid(c))thrownewKm.UsageError(`Therange${Me.pretty(r,n.range,Me.Type.RANGE)}mustbeavalidsemverversion`);letf=ai.getPublishRegistry(a.manifest,{configuration:r}),g=Me.pretty(r,n,Me.Type.IDENT),p=Me.pretty(r,c,Me.Type.RANGE),I=Me.pretty(r,this.tag,Me.Type.CODE);return(awaitSt.start({configuration:r,stdout:this.context.stdout},asyncQ=>{letx=awaitfQ(n,r);Object.prototype.hasOwnProperty.call(x,this.tag)&&x[this.tag]===c&&Q.reportWarning(0,`Tag${I}isalreadysettoversion${p}`);lety=`/-/package${En.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitEn.put(y,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),Q.reportInfo(0,`Tag${I}addedtoversion${p}ofpackage${g}`)})).exitCode()}};_m.paths=[["npm","tag","add"]],_m.usage=Km.Command.Usage({category:"Npm-relatedcommands",description:"addatagforaspecificversionofapackage",details:`
`,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"]]});Xe();var Rh=Te(Vt());var Hm=class extends pt{constructor(){super(...arguments);this.package=Rh.Option.String();this.tag=Rh.Option.String()}async execute(){if(this.tag==="latest")throw new Rh.UsageError("The 'latest' tag cannot be removed.");let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd);if(!a)throw new lr(o.cwd,this.context.cwd);let n=Y.parseIdent(this.package),c=ai.getPublishRegistry(a.manifest,{configuration:r}),f=Me.pretty(r,this.tag,Me.Type.CODE),g=Me.pretty(r,n,Me.Type.IDENT),p=await fQ(n,r);if(!Object.prototype.hasOwnProperty.call(p,this.tag))throw new Rh.UsageError(`${f}isnotatagofpackage${g}`);return(await St.start({configuration:r,stdout:this.context.stdout},async B=>{let Q=`/-/package${En.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitEn.del(Q,{configuration:r,registry:c,ident:n,jsonResponse:!0}),B.reportInfo(0,`Tag${f}removedfrompackage${g}`)})).exitCode()}};Hm.paths=[["npm","tag","remove"]],Hm.usage=Rh.Command.Usage({category:"Npm-relatedcommands",description:"removeatagfromapackage",details:`
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});Xe();Xe();var gQ=Te(Vt()),qm=class extends pt{constructor(){super(...arguments);this.scope=gQ.Option.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=gQ.Option.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=ai.getScopeRegistry(this.scope,{configuration:r,type:ai.RegistryType.PUBLISH_REGISTRY}):this.scope?o=ai.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=ai.getPublishRegistry((await hI(r,this.context.cwd)).manifest,{configuration:r}):o=ai.getDefaultRegistry({configuration:r}),(await St.start({configuration:r,stdout:this.context.stdout},async n=>{var f,g;let c;try{c=await En.get("/-/whoami",{configuration:r,registry:o,authType:En.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?Y.makeIdent(this.scope,""):void 0})}catch(p){if(((f=p.response)==null?void 0:f.statusCode)===401||((g=p.response)==null?void 0:g.statusCode)===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw p}n.reportInfo(0,c.username)})).exitCode()}};qm.paths=[["npm","whoami"]],qm.usage=gQ.Command.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 Z2t={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:[Rm,Tm,Mm,Nm,Lm,_m,Om,Hm,qm]},$2t=Z2t;var KG={};sr(KG,{default:()=>mQt,patchUtils:()=>Gm});Xe();Xe();Nt();ng();var Gm={};sr(Gm,{applyPatchFile:()=>gF,diffFolders:()=>_G,ensureUnpatchedDescriptor:()=>NG,ensureUnpatchedLocator:()=>hF,extractPackageToDisk:()=>UG,extractPatchFlags:()=>_2e,isParentRequired:()=>OG,isPatchDescriptor:()=>pF,isPatchLocator:()=>Th,loadPatchFiles:()=>dQ,makeDescriptor:()=>dF,makeLocator:()=>LG,parseDescriptor:()=>pQ,parseLocator:()=>hQ,parsePatchFile:()=>fF,unpatchDescriptor:()=>gQt,unpatchLocator:()=>pQt});Xe();Nt();Xe();Nt();var pE=class extends Error{constructor(r,o){super(`Cannotapplyhunk#${r+1}`);this.hunk=o}};Xe();Nt();var eQt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function hE(t){return ee.relative(Qt.root,ee.resolve(Qt.root,de.toPortablePath(t)))}function tQt(t){let e=t.trim().match(eQt);if(!e)throw new Error(`Badheaderline:'${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 rQt=420,nQt=493;var T2e=()=>({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}),iQt=t=>({header:tQt(t),parts:[]}),sQt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragm
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
`):"";await e.mkdirpPromise(ee.dirname(a.path),{chmod:493,utimes:[Ni.SAFE_TIME,Ni.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,Ni.SAFE_TIME,Ni.SAFE_TIME)}break;case"patch":await dE(e,a.path,async()=>{await uQt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let c=(await e.statPromise(a.path)).mode;if(M2e(a.newMode)!==M2e(c))continue;await dE(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:Ve.assertNever(a);break}}function M2e(t){return(t&64)>0}function N2e(t){return t.replace(/\s+$/,"")}function cQt(t,e){return N2e(t)===N2e(e)}async function uQt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,"utf8")).split(/\n/),f=[],g=0,p=0;for(let B of t){let Q=Math.max(p,B.header.patched.start+g),x=Math.max(0,Q-p),y=Math.max(0,c.length-Q-B.header.original.length),T=Math.max(x,y),U=0,q=0,X=null;for(;U<=T;){if(U<=x&&(q=Q-U,X=L2e(B,c,q),X!==null)){U=-U;break}if(U<=y&&(q=Q+U,X=L2e(B,c,q),X!==null))break;U+=1}if(X===null)throw new pE(t.indexOf(B),B);f.push(X),g+=U,p=q+B.header.original.length}if(o)return;let I=0;for(let B of f)for(let Q of B)switch(Q.type){case"splice":{let x=Q.index+I;c.splice(x,Q.numToDelete,...Q.linesToInsert),I+=Q.linesToInsert.length-Q.numToDelete}break;case"pop":c.pop();break;case"push":c.push(Q.line);break;default:Ve.assertNever(Q);break}await r.writeFilePromise(e,c.join(`
`),{mode:a})}function L2e(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 c=e[r];if(c==null||!cQt(c,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:Ve.assertNever(a.type);break}return o}var fQt=/^builtin<([^>]+)>$/;function mE(t,e){let{protocol:r,source:o,selector:a,params:n}=Y.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 c=a?a.split(/&/).map(I=>de.toPortablePath(I)):[],f=n&&typeof n.locator=="string"?Y.parseLocator(n.locator):null,g=n&&typeof n.version=="string"?n.version:null,p=e(o);return{parentLocator:f,sourceItem:p,patchPaths:c,sourceVersion:g}}function pF(t){return t.range.startsWith("patch:")}function Th(t){return t.reference.startsWith("patch:")}function pQ(t){let{sourceItem:e,...r}=mE(t.range,Y.parseDescriptor);return{...r,sourceDescriptor:e}}function hQ(t){let{sourceItem:e,...r}=mE(t.reference,Y.parseLocator);return{...r,sourceLocator:e}}function gQt(t){let{sourceItem:e}=mE(t.range,Y.parseDescriptor);return e}function pQt(t){let{sourceItem:e}=mE(t.reference,Y.parseLocator);return e}function NG(t){if(!pF(t))return t;let{sourceItem:e}=mE(t.range,Y.parseDescriptor);return e}function hF(t){if(!Th(t))return t;let{sourceItem:e}=mE(t.reference,Y.parseLocator);return e}function O2e({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let c=t!==null?{locator:Y.stringifyLocator(t)}:{},f=typeof o<"u"?{version:o}:{},g=typeof a<"u"?{hash:a}:{};return Y.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...f,...g,...c}})}function dF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return Y.makeDescriptor(t,O2e({parentLocator:e,sourceItem:r,patchPaths:o},Y.stringifyDescriptor))}function LG(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return Y.makeLocator(t,O2e({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},Y.stringifyLocator))}function U2e({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(fQt);return c!==null?o(c[1]):a.startsWith("~/")?r(a.slice(2)):ee.isAbsolute(a)?t(a):e(a)}function _2e(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function OG(t){return U2e({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function dQ(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new Bn(Qt.root),prefixPath:ee.relative(Qt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await Ve.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=_2e(c),g=await U2e({onAbsolute:async p=>await ge.readFilePromise(p,"utf8"),onRelative:async p=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(ee.join(a.prefixPath,p),"utf8")},onProject:async p=>await ge.readFilePromise(ee.join(r.project.cwd,p),"utf8"),onBuiltin:async p=>await r.project.configuration.firstHook(I=>I.getBuiltinPatch,r.project,p)},c);return{...f,source:g}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,`
`));return n}async function UG(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=hF(t),n=r.storedChecksums,c=new Yi,f=await ge.mktempPromise(),g=ee.join(f,"source"),p=ee.join(f,"user"),I=ee.join(f,".yarn-patch.json"),B=r.configuration.makeFetcher(),Q=[];try{let x,y;if(t.locatorHash===a.locatorHash){let T=await B.fetch(t,{cache:e,project:r,fetcher:B,checksums:n,report:c});Q.push(()=>{var U;return(U=T.releaseFs)==null?void 0:U.call(T)}),x=T,y=T}else x=await B.fetch(t,{cache:e,project:r,fetcher:B,checksums:n,report:c}),Q.push(()=>{var T;return(T=x.releaseFs)==null?void 0:T.call(x)}),y=await B.fetch(t,{cache:e,project:r,fetcher:B,checksums:n,report:c}),Q.push(()=>{var T;return(T=y.releaseFs)==null?void 0:T.call(y)});await Promise.all([ge.copyPromise(g,x.prefixPath,{baseFs:x.packageFs}),ge.copyPromise(p,y.prefixPath,{baseFs:y.packageFs}),ge.writeJsonPromise(I,{locator:Y.stringifyLocator(t),version:o.version})])}finally{for(let x of Q)x()}return ge.detachTemp(f),p}async function _G(t,e){let r=de.fromPortablePath(t).replace(/\\/g,"/"),o=de.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await gn.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:de.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unabletodiffdirectories.Makesureyouhavearecentversionof'git'availableinPATH.
${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${Ve.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${Ve.escapeRegExp(`/${c(o)}/`)}`,"g"),"$1/").replace(new RegExp(Ve.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(Ve.escapeRegExp(`${o}/`),"g"),"")}Xe();function K2e(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,`${Me.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`-${Me.pretty(e,a,Me.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+${Me.pretty(e,a,Me.Type.ADDED)}`);break;default:Ve.assertNever(o.type)}}var mF=class{supports(e,r){return!!Th(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.prettyLocator(r.project.configuration,e)}can'tbefoundinthecacheandwillbefetchedfromthedisk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:c}=hQ(e),f=await dQ(o,c,r),g=await ge.mktempPromise(),p=ee.join(g,"current.zip"),I=await r.fetcher.fetch(a,r),B=Y.getIdentVendorPath(e),Q=await ya(),x=new Ys(p,{libzip:Q,create:!0,level:r.project.configuration.get("compressionLevel")});await Ve.releaseAfterUseAsync(async()=>{await x.copyPromise(B,I.prefixPath,{baseFs:I.packageFs,stableSort:!0})},I.releaseFs),x.saveAndClose();for(let{source:y,optional:T}of f){if(y===null)continue;let U=new Ys(p,{libzip:Q,level:r.project.configuration.get("compressionLevel")}),q=new Bn(ee.resolve(Qt.root,B),{baseFs:U});try{await gF(fF(y),{baseFs:q,version:n})}catch(X){if(!(X instanceof pE))throw X;let se=r.project.configuration.get("enableInlineHunks"),fe=!se&&!T?" (set enableInlineHunks for details)":"",me=`${Y.prettyLocator(r.project.configuration,e)}:${X.message}${fe}`,Qe=be=>{!se||K2e(X.hunk,{configuration:r.project.configuration,report:be})};if(U.discardAndClose(),T){r.report.reportWarningOnce(66,me,{reportExtra:Qe});continue}else throw new tr(66,me,Qe)}U.saveAndClose()}return new Ys(p,{libzip:Q,level:r.project.configuration.get("compressionLevel")})}};Xe();Xe();var hQt=3,CF=class{supportsDescriptor(e,r){return!!pF(e)}supportsLocator(e,r){return!!Th(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=pQ(e);return a.every(n=>!OG(n))?e:Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=pQ(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}=pQ(e),c=await dQ(a,n,o.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let g=Li.makeHash(`${hQt}`,...c.map(p=>JSON.stringify(p))).slice(0,6);return[LG(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:g})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=hQ(e);return{...await r.resolver.resolve(o,r),...e}}};Xe();Nt();var Mh=Te(Vt());var jm=class extends pt{constructor(){super(...arguments);this.save=Mh.Option.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=Mh.Option.String()}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await xt.find(r,this.context.cwd);if(!a)throw new lr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=ee.resolve(this.context.cwd,de.toPortablePath(this.patchFolder)),c=ee.join(n,"../source"),f=ee.join(n,"../.yarn-patch.json");if(!ge.existsSync(c))throw new Mh.UsageError
${f.map(g=>`
-${Y.prettyLocator(r,g)}`).join("")}`);c=f[0]}if(!o.storedPackages.has(c.locatorHash))thrownewzu.UsageError("No package found in the project for the given locator");awaitSt.start({configuration:r,json:this.json,stdout:this.context.stdout},asyncf=>{letg=hF(c),p=awaitUG(c,{cache:n,project:o});f.reportJson({locator:Y.stringifyLocator(g),path:de.fromPortablePath(p)});letI=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${Y.prettyLocator(r,g)} got extracted with success${I}!`),f.reportInfo(0,`You can now edit the following folder: ${Me.pretty(r,de.fromPortablePath(p),"magenta")}`),f.reportInfo(0,`Once you are done run ${Me.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${de.fromPortablePath(p)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Ym.paths=[["patch"]],Ym.usage=zu.Command.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 "});vardQt={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:[jm,Ym],fetchers:[mF],resolvers:[CF]},mQt=dQt;varGG={};sr(GG,{default:()=>wQt});Xe();Nt();varyF=Te(Vt()),IF=class{getCustomDataKey(){returnJSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){returnthis.isEnabled(r)}asyncfindPackageLocation(e,r){if(!this.isEnabled(r))thrownewError("Assertion failed: Expected the pnpm linker to be enabled");leto=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)thrownewyF.UsageError(`The project in ${Me.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Me.Type.PATH)} doesn't seem to have been installed - running an install there might help`);letn=a.pathsByLocator.get(e.locatorHash);if(typeofn>"u")thrownewyF.UsageError(`Couldn't find ${Y.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);returnn.packageLocation}asyncfindPackageLocator(e,r){if(!this.isEnabled(r))returnnull;leto=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)thrownewyF.UsageError(`The project in ${Me.pretty(r.project.configuration,`${r.project.cwd}/package.json`,Me.Type.PATH)} doesn't seem to have been installed - running an install there might help`);letn=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){letg=a.locatorByPath.get(n[1]);if(g)returng}letc=e,f=e;do{f=c,c=ee.dirname(f);letg=a.locatorByPath.get(f);if(g)returng}while(c!==f);returnnull}makeInstaller(e){returnnewHG(e)}isEnabled(e){returne.project.configuration.get("nodeLinker")==="pnpm"}},HG=class{constructor(e){this.opts=e;this.asyncActions=newVe.AsyncActions(10);this.customData={pathsByLocator:newMap,locatorByPath:newMap};this.indexFolderPromise=ev(ge,{indexPath:ee.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}asyncinstallPackage(e,r,o){switch(e.linkType){case"SOFT":returnthis.installPackageSoft(e,r,o);case"HARD":returnthis.installPackageHard(e,r,o)}thrownewError("Assertion failed: Unsupported package link type")}asyncinstallPackageSoft(e,r,o){leta=ee.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?ee.join(a,Zr.nodeModules):null;returnthis.customData.pathsByLocator.set(e.locatorHas
${vQt}
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>de.fromPortablePath(o.path));await gn.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var Z2e={async findRoot(t){return await EF(t,{marker:".hg"})},async filterChanges(t,e,r){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,r){},async makeReset(t,e){},async makeUpdate(t,e){}};var PQt=[X2e,Z2e],Wm=class extends pt{constructor(){super(...arguments);this.commit=Pg.Option.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=Pg.Option.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=Pg.Option.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=Pg.Option.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await rt.find(this.context.cwd,this.context.plugins),{project:o}=await xt.find(r,this.context.cwd),{driver:a,root:n}=await bQt(o.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(B=>B.populateYarnPaths,o,B=>{c.push(B)});let f=new Set;for(let B of c)for(let Q of FQt(n,B))f.add(Q);let g=new Set([r.get("rcFilename"),r.get("lockfileFilename"),"package.json"]),p=await a.filterChanges(n,f,g),I=await a.genCommitMessage(n,p);if(this.dryRun)if(this.commit)this.context.stdout.write(`${I}
`);else for(let B of p)this.context.stdout.write(`${de.fromPortablePath(B.path)}
`);else if(this.reset){let B=await a.filterChanges(n,f,g,{staged:!0});B.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,B)}else p.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,p,I):(await a.makeStage(n,p),this.context.stdout.write(I))}};Wm.paths=[["stage"]],Wm.usage=Pg.Command.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 bQt(t){let e=null,r=null;for(let o of PQt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new Pg.UsageError("No stage driver has been found for your current project");return{driver:e,root:r}}function FQt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=ge.statSync(e)}catch{break}if(o.isSymbolicLink())e=ee.resolve(ee.dirname(e),ge.readlinkSync(e));else break}return r}var RQt={commands:[Wm]},TQt=RQt;var WG={};sr(WG,{default:()=>HQt});Xe();Xe();Nt();var tQe=Te(Ei());Xe();var $2e=Te(IH()),MQt="e8e1bd300d860104bb8c58453ffa1eb4",NQt="OFCNCOG2CU",eQe=async(t,e)=>{var n;let r=Y.stringifyIdent(t),a=LQt(e).initIndex("npm-search");try{return((n=(await a.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:n.ts)==="definitely-typed"}catch{return!1}},LQt=t=>(0,$2e.default)(NQt,MQt,{requester:{async send(r){try{let o=await Kn.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 rQe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,OQt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??ge.existsSync(ee.join(a.cwd,"tsconfig.json"))))return;let f=n.makeResolver(),g={project:a,resolver:f,report:new Yi};if(!await eQe(r,n))return;let I=rQe(r),B=Y.parseRange(r.range).selector;if(!Vr.validRange(B)){let U=n.normalizeDependency(r),q=await f.getCandidates(U,{},g);B=Y.parseRange(q[0].reference).selector}let Q=tQe.default.coerce(B);if(Q===null)return;let x=`${Ec.Modifier.CARET}${Q.major}`,y=Y.makeDescriptor(Y.makeIdent("types",I),x),T=Ve.mapAndFind(a.workspaces,U=>{var fe,me;let q=(fe=U.manifest.dependencies.get(r.identHash))==null?void 0:fe.descriptorHash,X=(me=U.manifest.devDependencies.get(r.identHash))==null?void 0:me.descriptorHash;if(q!==r.descriptorHash&&X!==r.descriptorHash)return Ve.mapAndFind.skip;let se=[];for(let Qe of Gt.allDependencies){let be=U.manifest[Qe].get(y.identHash);typeof be>"u"||se.push([Qe,be])}return se.length===0?Ve.mapAndFind.skip:se});if(typeof T<"u")for(let[U,q]of T)t.manifest[U].set(q.identHash,q);else{try{let U=n.normalizeDependency(y);if((await f.getCandidates(U,{},g)).length===0)return}catch{return}t.manifest[Ec.Target.DEVELOPMENT].set(y.identHash,y)}},UQt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??ge.existsSync(ee.join(o.cwd,"tsconfig.json"))))return;let c=rQe(r),f=Y.makeIdent("types",c);for(let g of Gt.allDependencies)typeof t.manifest[g].get(f.identHash)>"u"||t.manifest[g].delete(f.i
-${f.map(x=>de.fromPortablePath(x)).join(`
-`)}`);letg=newSet(Ve.mapAndFilter(n,x=>{lety=t.tryWorkspaceByFilePath(x);returny===null?Ve.mapAndFilter.skip:y}));if(f.length===0&&g.size===0&&!e)returnnull;letp=f.length===1?f[0]:ee.join(c,`${Li.makeHash(Math.random().toString()).slice(0,8)}.yml`),I=ge.existsSync(p)?awaitge.readFilePromise(p,"utf8"):"{}",B=os(I),Q=newMap;for(letxofB.declined||[]){lety=Y.parseIdent(x),T=t.getWorkspaceByIdent(y);Q.set(T,"decline")}for(let[x,y]ofObject.entries(B.releases||{})){letT=Y.parseIdent(x),U=t.getWorkspaceByIdent(T);Q.set(U,yE(y))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:newSet(n),changedWorkspaces:g,releaseRoots:newSet([...g].filter(x=>x.manifest.version!==null)),releases:Q,asyncsaveAll(){letx={},y=[],T=[];for(letUoft.workspaces){if(U.manifest.version===null)continue;letq=Y.stringifyIdent(U.locator),X=Q.get(U);X==="decline"?y.push(q):typeofX<"u"?x[q]=yE(X):g.has(U)&&T.push(q)}awaitge.mkdirPromise(ee.dirname(p),{recursive:!0}),awaitge.changeFilePromise(p,Ya(newYa.PreserveOrdering({releases:Object.keys(x).length>0?x:void0,declined:y.length>0?y:void0,undecided:T.length>0?T:void0})))}}}functionivt(t){returnwF(t).size>0||CQ(t).length>0}functionwF(t){lete=newSet;for(letroft.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));returne}functionCQ(t,{include:e=newSet}={}){letr=[],o=newMap(Ve.mapAndFilter([...t.releases],([n,c])=>c==="decline"?Ve.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=newMap(Ve.mapAndFilter([...t.releases],([n,c])=>c!=="decline"?Ve.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(letnoft.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(letcofGt.hardDependencies)for(letfofn.manifest.getForScope(c).values()){letg=t.project.tryWorkspaceByDescriptor(f);g!==null&&o.has(g.anchoredLocator.locatorHash)&&r.push([n,g])}returnr}functionVG(t,e){letr=Vu.default.clean(e);for(letoofObject.values(IE))if(o!=="undecided"&&o!=="decline"&&Vu.default.inc(t,o)===r)returno;returnnull}functionBF(t,e){if(Vu.default.valid(e))returne;if(t===null)thrownewCE.UsageError(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!Vu.default.valid(t))thrownewCE.UsageError(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);letr=Vu.default.inc(t,e);if(r===null)thrownewCE.UsageError(`Cannot apply the release strategy "${e}" on the specified version (${t})`);returnr}functionXG(t,e,{report:r}){leto=newMap;for(letaoft.workspaces)for(letnofGt.allDependencies)for(letcofa.manifest[n].values()){letf=t.tryWorkspaceByDescriptor(c);if(f===null||!e.has(f))continue;Ve.getArrayWithDefault(o,f).push([a,n,c.identHash])}for(let[a,n]ofe){letc=a.manifest.version;a.manifest.version=n,Vu.default.prerelease(n)===null?deletea.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=c);letf=a.manifest.name!==null?Y.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${Y.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:de.fromPortablePath(a.cwd),ident:f,oldVersion:c,newVersion:n});letg=o.get(a);if(!(typeofg>"u"))for(let[p,I,B]ofg){letQ=p.manifest[I].get(B);if(typeofQ>"u")thrownewError("Assertion failed: The dependency should have existed");letx=Q.range,y=!1;if(x.startsWith(Bi.protocol)&&(x=x.slice(Bi.protocol.length),y=!0,x===a.relativeCwd))continue;letT=x.match(nvt);if(!T){r.reportWarning(0,`Couldn't auto-upgrade range ${x} (in ${Y.prettyLocator(t.configuration,p.anchoredLocator)})`);continue}letU=`${T[1]}${n}`;y&&(U=`${Bi.protocol}${U}`);letq=Y.makeDescriptor(Q,U);p.manifest[I].set(B,q)}}}varsvt=newMap([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);functionAQe(t,{current:e,prerelease:r}){leto=newVu.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);letc=!0,f=r.split(/\./g);fo
Notethatif\`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is.
-\`--recursive\` to also apply the version bump on its dependencies
-\`--all\` to apply the version bump on all packages in the repository
Notethatthiscommandwillalsoupdatethe\`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});Xe();Nt();var Vm=Te(Vt()),QF=Te(Ei());var zm=class extends pt{constructor(){super(...arguments);this.interactive=Vm.Option.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(){NI(this.context);let{Gem:r}=await Promise.resolve().then(()=>(ub(),Wq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(hb(),pb)),{FocusRequest:a}=await Promise.resolve().then(()=>(zq(),dwe)),{useListInput:n}=await Promise.resolve().then(()=>(gb(),mwe)),{renderForm:c}=await Promise.resolve().then(()=>(yb(),Cb)),{Box:f,Text:g}=await Promise.resolve().then(()=>Te(Rl())),{default:p,useCallback:I,useState:B}=await Promise.resolve().then(()=>Te(hn())),Q=await rt.find(this.context.cwd,this.context.plugins),{project:x,workspace:y}=await xt.find(Q,this.context.cwd);if(!y)throw new lr(x.cwd,this.context.cwd);await x.restoreInstallState();let T=await EE(x);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new Vm.UsageError("This command can only be run on Git repositories");let U=()=>p.createElement(f,{flexDirection:"row",paddingBottom:1},p.createElement(f,{flexDirection:"column",width:60},p.createElement(f,null,p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(g,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),p.createElement(f,null,p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(g,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),p.createElement(f,{flexDirection:"column"},p.createElement(f,{marginLeft:1},p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),p.createElement(f,{marginLeft:1},p.createElement(g,null,"Press ",p.createElement(g,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),q=({workspace:be,active:Ee,decision:ye,setDecision:De})=>{let h=be.manifest.raw.stableVersion??be.manifest.version;if(h===null)throw new Error(`Assertionfailed:Theversionshouldhavebeenset(${Y.prettyLocator(Q,be.anchoredLocator)})`);if(QF.default.prerelease(h)!==null)throw new Error(`Assertionfailed:Prereleaseidentifiersshouldn'tbefound(${h})`);let Oe=["undecided","decline","patch","minor","major"];n(ye,Oe,{active:Ee,minus:"left",plus:"right",set:De});let Ie=ye==="undecided"?p.createElement(g,{color:"yellow"},h):ye==="decline"?p.createElement(g,{color:"green"},h):p.createElement(g,null,p.createElement(g,{color:"magenta"},h)," \u2192 ",p.createElement(g,{color:"green"},QF.default.valid(ye)?ye:QF.default.inc(h,ye)));return p.createElement(f,{flexDirection:"column"},p.createElement(f,null,p.createElement(g,null,Y.prettyLocator(Q,be.anchoredLocator)," - ",Ie)),p.createElement(f,null,Oe.map(Ce=>p.createElement(f,{key:Ce,paddingLeft:2},p.createElement(g,null,p.createElement(r,{active:Ce===ye})," ",Ce)))))},X=be=>{let Ee=new Set(T.releaseRoots),ye=new Map([...be].filter(([De])=>Ee.has(De)));for(;;){let De=CQ({project:T.project,releases:ye}),h=!1;if(De.length>0){for(let[Oe]of De)if(!Ee.has(Oe)){Ee.add(Oe),h=!0;let Ie=be.get(Oe);typeof Ie<"u"&&ye.set(Oe,Ie)}}if(!h)break}return{relevantWorkspaces:Ee,relevantReleases:ye}},se=()=>{let[be,Ee]=B(()=>new Map(T.releases)),ye=I((De,h)=>{let Oe=new Map(be);h!=="undecided"?Oe.set(De,h):Oe.delete(De);let{relevantReleases:Ie}=X(Oe);Ee(Ie)},[be,Ee]);return[be,ye]},fe=({workspaces:be,releases:Ee})=>{let ye=[];ye.push(`${be.size}total`);let De=0,h=0;for(let Oe of be){let Ie=Ee.get(Oe);typeof Ie>"u"?h+=1:Ie!=="decline"&&(De+=1)}return ye.push(`${De}release${De===1?"":"s"}`),ye.push(`${h}remaining`),p.createElement(g,{color:"yellow"},ye.join(", "))},Qe=await c(({useSubmit:be})=>{let[Ee,ye]=se();be(Ee);let{relevantWorkspaces:De}=X(