(()=>{varlfe=Object.create;varGS=Object.defineProperty;varcfe=Object.getOwnPropertyDescriptor;varufe=Object.getOwnPropertyNames;vargfe=Object.getPrototypeOf,ffe=Object.prototype.hasOwnProperty;varJ=(r=>typeofrequire<"u"?require:typeofProxy<"u"?newProxy(r,{get:(e,t)=>(typeofrequire<"u"?require:e)[t]}):r)(function(r){if(typeofrequire<"u")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+r+'" is not supported')});vary=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(vartine)GS(r,t,{get:e[t],enumerable:!0})},hfe=(r,e,t,i)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofufe(e))!ffe.call(r,n)&&n!==t&&GS(r,n,{get:()=>e[n],enumerable:!(i=cfe(e,n))||i.enumerable});returnr};varne=(r,e,t)=>(t=r!=null?lfe(gfe(r)):{},hfe(e||!r||!r.__esModule?GS(t,"default",{value:r,enumerable:!0}):t,r));variU=y((iZe,rU)=>{rU.exports=tU;tU.sync=Lfe;var$1=J("fs");functionNfe(r,e){vart=e.pathExt!==void0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(vari=0;i<t.length;i++){varn=t[i].toLowerCase();if(n&&r.substr(-n.length).toLowerCase()===n)return!0}return!1}functioneU(r,e,t){return!r.isSymbolicLink()&&!r.isFile()?!1:Nfe(e,t)}functiontU(r,e,t){$1.stat(r,function(i,n){t(i,i?!1:eU(n,r,e))})}functionLfe(r,e){returneU($1.statSync(r),r,e)}});varAU=y((nZe,aU)=>{aU.exports=sU;sU.sync=Tfe;varnU=J("fs");functionsU(r,e,t){nU.stat(r,function(i,n){t(i,i?!1:oU(n,e))})}functionTfe(r,e){returnoU(nU.statSync(r),e)}functionoU(r,e){returnr.isFile()&&Ofe(r,e)}functionOfe(r,e){vart=r.mode,i=r.uid,n=r.gid,s=e.uid!==void0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;returng}});varcU=y((oZe,lU)=>{varsZe=J("fs"),LI;process.platform==="win32"||global.TESTING_WINDOWS?LI=iU():LI=AU();lU.exports=sv;sv.sync=Mfe;functionsv(r,e,t){if(typeofe=="function"&&(t=e,e={}),!t){if(typeofPromise!="function")thrownewTypeError("callback not provided");returnnewPromise(function(i,n){sv(r,e||{},function(s,o){s?n(s):i(o)})})}LI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}functionMfe(r,e){try{returnLI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throwt}}});varCU=y((aZe,dU)=>{varXg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",uU=J("path"),Kfe=Xg?";":":",gU=cU(),fU=r=>Object.assign(newError(`not found: ${r}`),{code:"ENOENT"}),hU=(r,e)=>{lett=e.colon||Kfe,i=r.match(/\//)||Xg&&r.match(/\\/)?[""]:[...Xg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xg?n.split(t):[""];returnXg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},pU=(r,e,t)=>{typeofe=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=hU(r,e),o=[],a=c=>newPromise((u,g)=>{if(c===i.length)returne.all&&o.length?u(o):g(fU(r));letf=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=uU.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>newPromise((f,h)=>{if(g===n.length)returnf(a(u+1));letp=n[g];gU(c+p,{pathExt:s},(C,w)=>{if(!C&&w)if(e.all)o.push(c+p);elsereturnf(c+p);returnf(l(c,u,g+1))})});returnt?a(0).then(c=>t(null,c),t):a(0)},Ufe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=hU(r,e),s=[];for(leto=0;o<t.length;o++){leta=t[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,c=uU.join(l,r),u=!l&&/^\.[\\\/]/.test(r)?r.slice(0,2)+c:c;for(letg=0;g<i.length;g++){letf=u+i[g];try{if(gU.sync(f,{pathExt:n}))if(e.all)s.push(f);elsereturnf}catch{}}}if(e.all&&s.length)returns;if(e.nothrow)returnnull;throwfU(r)};dU.exports=pU;pU.sync=Ufe});varEU=y((AZe,ov)=>{"use strict";varmU=(r={})=>{lete=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};ov.exports=mU;ov.exports.default=mU});varBU=
`+zU.repeat(" ",e+this.position-n+i.length)+"^"};Iv.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`:
`+t)),i};VU.exports=Iv});var Ai=y((TZe,ZU)=>{"use strict";var _U=ef(),phe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dhe=["scalar","sequence","mapping"];function Che(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function mhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(phe.indexOf(t)===-1)throw new _U('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Che(e.styleAliases||null),dhe.indexOf(this.kind)===-1)throw new _U('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}ZU.exports=mhe});var pc=y((OZe,e2)=>{"use strict";var $U=hc(),GI=ef(),Ehe=Ai();function yv(r,e,t){var i=[];return r.include.forEach(function(n){t=yv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function Ihe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function tf(r){this.include=r.include||[],this.implicit=r.implicit||[],this.explicit=r.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new GI("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=yv(this,"implicit",[]),this.compiledExplicit=yv(this,"explicit",[]),this.compiledTypeMap=Ihe(this.compiledImplicit,this.compiledExplicit)}tf.DEFAULT=null;tf.create=function(){var e,t;switch(arguments.length){case 1:e=tf.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new GI("Wrong number of arguments for Schema.create function")}if(e=$U.toArray(e),t=$U.toArray(t),!e.every(function(i){return i instanceof tf}))throw new GI("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(i){return i instanceof Ehe}))throw new GI("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new tf({include:e,explicit:t})};e2.exports=tf});var r2=y((MZe,t2)=>{"use strict";var yhe=Ai();t2.exports=new yhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var n2=y((KZe,i2)=>{"use strict";var whe=Ai();i2.exports=new whe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var o2=y((UZe,s2)=>{"use strict";var Bhe=Ai();s2.exports=new Bhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var YI=y((HZe,a2)=>{"use strict";var Qhe=pc();a2.exports=new Qhe({explicit:[r2(),n2(),o2()]})});var l2=y((GZe,A2)=>{"use strict";var bhe=Ai();function She(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function vhe(){return null}function xhe(r){return r===null}A2.exports=new bhe("tag:yaml.org,2002:null",{kind:"scalar",resolve:She,construct:vhe,predicate:xhe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var u2=y((YZe,c2)=>{"use strict";var Phe=Ai();function Dhe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function khe(r){return r==="true"||r==="True"||r==="TRUE"}function Rhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}c2.exports=new Phe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Dhe,construct:khe,predicate:Rhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE"
`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function qpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var rH=new Array(256),iH=new Array(256);for(Cc=0;Cc<256;Cc++)rH[Cc]=J2(Cc)?1:0,iH[Cc]=J2(Cc);var Cc;function Jpe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||Ope,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=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function nH(r,e){return new X2(e,new Tpe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw nH(r,e)}function WI(r,e){r.onWarning&&r.onWarning.call(null,nH(r,e))}var W2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&WI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],eH.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),FA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),tH.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function RA(r,e,t,i){var n,s,o,a;if(e<t){if(a=r.input.slice(e,t),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||gt(r,"expected valid JSON character");else Kpe.test(a)&>(r,"the stream contains non-printable characters");r.result+=a}}function z2(r,e,t,i){var n,s,o,a;for(Qa.isObject(t)||gt(r,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(t),o=0,a=n.length;o<a;o+=1)s=n[o],FA.call(e,s)||(e[s]=t[s],i[s]=!0)}function sf(r,e,t,i,n,s,o,a){var l,c;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,c=n.length;l<c;l+=1)Array.isArray(n[l])&>(r,"nested arrays are not supported inside keys"),typeof n=="object"&&q2(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&q2(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)z2(r,e,s[l],t);else z2(r,e,s,t);else!r.json&&!FA.call(t,n)&&FA.call(e,n)&&(r.line=o||r.line,r.position=a||r.position,gt(r,"duplicated mapping key")),e[n]=s,delete t[n];return e}function Sv(r){var e;e=r.input.charCodeAt(r.position),e===10?r.position++:e===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):gt(r,"a line break is expected"),r.line+=1,r.lineStart=r.position}function _r(r,e,t){for(var i=0,n=r.input.charCodeAt(r.position);n!==0;){for(;mc(n);)n=r.input.charCodeAt(++r.position);if(e&&n===35)do n=r.input.charCodeAt(++r.position);while(n!==10&&n!==13&&n!==0);if(So(n))for(Sv(r),n=r.input.charCodeAt(r.position),i++,r.lineIndent=0;n===32;)r.lineIndent++,n=r.input.charCodeAt(++r.position);else break}return t!==-1&&i!==0&&r.lineIndent<t&&WI(r,"deficient indentation"),i}function zI(r){var e=r.position,t;return t=r.input.charCodeAt(e),!!((t===45||t===46)&&t===r.input.charCodeAt(e+1)&&t===r.input.charCodeAt(e+2)&&(e+=3,t=r.input.charCodeAt(e),t===0||fn(t)))}function vv(r,e){e===1?r.result+=" ":e>1&&(r.result+=Qa.repeat(`
`,e-1))}function Wpe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||nf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&zI(r)||t&&nf(h))break;if(So(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(RA(r,s,o,!1),vv(r,r.line-l),s=o=r.position,a=!1),mc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return RA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function zpe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(RA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else So(t)?(RA(r,i,n,!0),vv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&zI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function Vpe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return RA(r,t,r.position,!0),r.position++,!0;if(a===92){if(RA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),So(a))_r(r,!1,e);else if(a<256&&rH[a])r.result+=iH[a],r.position++;else if((o=Ype(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Gpe(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=qpe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else So(a)?(RA(r,t,i,!0),vv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&zI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function Xpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,of(r,e,qI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),of(r,e,qI,!1,!0),C=r.result),g?sf(r,s,f,p,h,C):c?s.push(sf(r,null,f,p,h,C)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function _pe(r,e){var t,i,n=bv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)bv===n?n=g===43?j2:Mpe:gt(r,"repeat of a chomping mode identifier");else if((u=jpe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(mc(g)){do g=r.input.charCodeAt(++r.position);while(mc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!So(g)&&g!==0)}for(;g!==0;){for(Sv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndent<a)&&g===32;)r.lineIndent++,g=r.input.charCodeAt(++r.position);if(!o&&r.lineIndent>a&&(a=r
`,s?1+l:l),s=!0,o=!0,l=0,t=r.position;!So(g)&&g!==0;)g=r.input.charCodeAt(++r.position);RA(r,t,r.position,!1)}return!0}function V2(r,e){var t,i=r.tag,n=r.anchor,s=[],o,a=!1,l;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),l=r.input.charCodeAt(r.position);l!==0&&!(l!==45||(o=r.input.charCodeAt(r.position+1),!fn(o)));){if(a=!0,r.position++,_r(r,!0,-1)&&r.lineIndent<=e){s.push(null),l=r.input.charCodeAt(r.position);continue}if(t=r.line,of(r,e,$2,!1,!0),s.push(r.result),_r(r,!0,-1),l=r.input.charCodeAt(r.position),(r.line===t||r.lineIndent>e)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndent<e)break}return a?(r.tag=i,r.anchor=n,r.kind="sequence",r.result=s,!0):!1}function Zpe(r,e,t){var i,n,s,o,a=r.tag,l=r.anchor,c={},u={},g=null,f=null,h=null,p=!1,C=!1,w;for(r.anchor!==null&&(r.anchorMap[r.anchor]=c),w=r.input.charCodeAt(r.position);w!==0;){if(i=r.input.charCodeAt(r.position+1),s=r.line,o=r.position,(w===63||w===58)&&fn(i))w===63?(p&&(sf(r,c,u,g,f,null),g=f=h=null),C=!0,p=!0,n=!0):p?(p=!1,n=!0):gt(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,w=i;else if(of(r,t,Z2,!1,!0))if(r.line===s){for(w=r.input.charCodeAt(r.position);mc(w);)w=r.input.charCodeAt(++r.position);if(w===58)w=r.input.charCodeAt(++r.position),fn(w)||gt(r,"a whitespace character is expected after the key-value separator within a block mapping"),p&&(sf(r,c,u,g,f,null),g=f=h=null),C=!0,p=!1,n=!1,g=r.tag,f=r.result;else if(C)gt(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=a,r.anchor=l,!0}else if(C)gt(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=a,r.anchor=l,!0;else break;if((r.line===s||r.lineIndent>e)&&(of(r,e,JI,!0,n)&&(p?f=r.result:h=r.result),p||(sf(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndent<e)break}return p&&sf(r,c,u,g,f,null),C&&(r.tag=a,r.anchor=l,r.kind="mapping",r.result=c),C}function $pe(r){var e,t=!1,i=!1,n,s,o;if(o=r.input.charCodeAt(r.position),o!==33)return!1;if(r.tag!==null&>(r,"duplication of a tag property"),o=r.input.charCodeAt(++r.position),o===60?(t=!0,o=r.input.charCodeAt(++r.position)):o===33?(i=!0,n="!!",o=r.input.charCodeAt(++r.position)):n="!",e=r.position,t){do o=r.input.charCodeAt(++r.position);while(o!==0&&o!==62);r.position<r.length?(s=r.input.slice(e,r.position),o=r.input.charCodeAt(++r.position)):gt(r,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!fn(o);)o===33&&(i?gt(r,"tag suffix cannot contain exclamation marks"):(n=r.input.slice(e-1,r.position+1),eH.test(n)||gt(r,"named tag handle cannot contain such characters"),i=!0,e=r.position+1)),o=r.input.charCodeAt(++r.position);s=r.input.slice(e,r.position),Hpe.test(s)&>(r,"tag suffix cannot contain flow indicator characters")}return s&&!tH.test(s)&>(r,"tag name cannot contain such characters: "+s),t?r.tag=s:FA.call(r.tagMap,n)?r.tag=r.tagMap[n]+s:n==="!"?r.tag="!"+s:n==="!!"?r.tag="tag:yaml.org,2002:"+s:gt(r,'undeclared tag handle "'+n+'"'),!0}function ede(r){var e,t;if(t=r.input.charCodeAt(r.position),t!==38)return!1;for(r.anchor!==null&>(r,"duplication of an anchor property"),t=r.input.charCodeAt(++r.position),e=r.position;t!==0&&!fn(t)&&!nf(t);)t=r.input.charCodeAt(++r.position);return r.position===e&>(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(e,r.position),!0}function tde(r){var e,t,i;if(i=r.input.charCodeAt(r.position),i!==42)return!1;for(i=r.input.charCodeAt(++r.position),e=r.position;i!==0&&!fn(i)&&!nf(i);)i=r.input.charCodeAt(++r.position);return r.position===e&>(r,"name of an alias node must contain at least one character"),t=r.input.slice(e,r.position),FA.call(r.anchorMap,t)||gt(r,'unidentified alias "'+t+'"'),r.result=r.anchorMap[t],_r(r,!0,-1),!0}function of(r,e,t,i,n){var s,o,a,l=1,c=!1,u=!1,g,f,h,p,C;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,s
`),r.charCodeAt(0)===65279&&(r=r.slice(1)));var t=new Jpe(r,e),i=r.indexOf("\0");for(i!==-1&&(t.position=i,gt(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)rde(t);return t.documents}function oH(r,e,t){e!==null&&typeof e=="object"&&typeof t>"u"&&(t=e,e=null);var i=sH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function aH(r,e){var t=sH(r,e);if(t.length!==0){if(t.length===1)return t[0];throw new X2("expected a single document in the stream, but found more")}}function ide(r,e,t){return typeof e=="object"&&e!==null&&typeof t>"u"&&(t=e,e=null),oH(r,e,Qa.extend({schema:_2},t))}function nde(r,e){return aH(r,Qa.extend({schema:_2},e))}md.exports.loadAll=oH;md.exports.load=aH;md.exports.safeLoadAll=ide;md.exports.safeLoad=nde});var kH=y((o$e,kv)=>{"use strict";var Id=hc(),yd=ef(),sde=Cd(),ode=rf(),dH=Object.prototype.toString,CH=Object.prototype.hasOwnProperty,ade=9,Ed=10,Ade=13,lde=32,cde=33,ude=34,mH=35,gde=37,fde=38,hde=39,pde=42,EH=44,dde=45,IH=58,Cde=61,mde=62,Ede=63,Ide=64,yH=91,wH=93,yde=96,BH=123,wde=124,QH=125,Li={};Li[0]="\\0";Li[7]="\\a";Li[8]="\\b";Li[9]="\\t";Li[10]="\\n";Li[11]="\\v";Li[12]="\\f";Li[13]="\\r";Li[27]="\\e";Li[34]='\\"';Li[92]="\\\\";Li[133]="\\N";Li[160]="\\_";Li[8232]="\\L";Li[8233]="\\P";var Bde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Qde(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=r.compiledTypeMap.fallback[o],l&&CH.call(l.styleAliases,a)&&(a=l.styleAliases[a]),t[o]=a;return t}function lH(r){var e,t,i;if(e=r.toString(16).toUpperCase(),r<=255)t="x",i=2;else if(r<=65535)t="u",i=4;else if(r<=4294967295)t="U",i=8;else throw new yd("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+t+Id.repeat("0",i-e.length)+e}function bde(r){this.schema=r.schema||sde,this.indent=Math.max(1,r.indent||2),this.noArrayIndent=r.noArrayIndent||!1,this.skipInvalid=r.skipInvalid||!1,this.flowLevel=Id.isNothing(r.flowLevel)?-1:r.flowLevel,this.styleMap=Qde(this.schema,r.styles||null),this.sortKeys=r.sortKeys||!1,this.lineWidth=r.lineWidth||80,this.noRefs=r.noRefs||!1,this.noCompatMode=r.noCompatMode||!1,this.condenseFlow=r.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cH(r,e){for(var t=Id.repeat(" ",e),i=0,n=-1,s="",o,a=r.length;i<a;)n=r.indexOf(`
-${Mv(t)}`).join("")}`)}functionACe(r,e,t){if(typeoft>"u")returne;leti=[],n=[],s=a=>{letl=e;returne=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throwVH(`Invalid value for ${r}`,i);for(let[,a]ofn)a();returne}NA.applyValidator=ACe;NA.cleanValidationError=Mv;NA.formatError=VH;NA.isOptionSymbol=zH;NA.makeCommandOption=oCe;NA.rerouteArguments=aCe});varns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});varXH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,_H=/^#[0-9a-f]{6}$/i,ZH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,$H=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,eG=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Kv=/^(?:[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)?)$/,tG=r=>()=>r;functionbt({test:r}){returntG(r)()}functionZr(r){returnr===null?"null":r===void0?"undefined":r===""?"an empty string":JSON.stringify(r)}functionLA(r,e){vart,i,n;returntypeofe=="number"?`${(t=r==null?void0:r.p)!==null&&t!==void0?t:"."}[${e}]`:XH.test(e)?`${(i=r==null?void0:r.p)!==null&&i!==void0?i:""}.${e}`:`${(n=r==null?void0:r.p)!==null&&n!==void0?n:"."}[${JSON.stringify(e)}]`}functionwc(r,e){returnt=>{leti=r[e];returnr[e]=t,wc(r,e).bind(null,i)}}functionrG(r,e){returnt=>{r[e]=t}}functionry(r,e,t){returnr===1?e:t}functionpt({errors:r,p:e}={},t){returnr==null||r.push(`${e!=null?e:"."}: ${t}`),!1}variG=()=>bt({test:(r,e)=>!0});functionlCe(r){returnbt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}varcCe=()=>bt({test:(r,e)=>typeofr!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});functionuCe(r){lete=Array.isArray(r)?r:Object.values(r),t=newSet(e);returnbt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}vargCe=newMap([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),fCe=()=>bt({test:(r,e)=>{vart;if(typeofr!="boolean"){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnpt(e,"Unbound coercion result");leti=gCe.get(r);if(typeofi<"u")returne.coercions.push([(t=e.p)!==null&&t!==void0?t:".",e.coercion.bind(null,i)]),!0}returnpt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),hCe=()=>bt({test:(r,e)=>{vart;if(typeofr!="number"){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnpt(e,"Unbound coercion result");leti;if(typeofr=="string"){letn;try{n=JSON.parse(r)}catch{}if(typeofn=="number")if(JSON.stringify(n)===r)i=n;elsereturnpt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeofi<"u")returne.coercions.push([(t=e.p)!==null&&t!==void0?t:".",e.coercion.bind(null,i)]),!0}returnpt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),pCe=()=>bt({test:(r,e)=>{vart;if(!(rinstanceofDate)){if(typeof(e==null?void0:e.coercions)<"u"){if(typeof(e==null?void0:e.coercion)>"u")returnpt(e,"Unbound coercion result");leti;if(typeofr=="string"&&Kv.test(r))i=newDate(r);else{letn;if(typeofr=="string"){lets;try{s=JSON.parse(r)}catch{}typeofs=="number"&&(n=s)}elsetypeofr=="number"&&(n=r);if(typeofn<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=newDate(n*1e3);elsereturnpt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeofi<"u")returne.coercions.push([(t=e.p)!==null&&t!==void0?t:".",e.coercion.bind(null,i)]),!0}returnpt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),dCe=(r,{delimiter:e}={})=>bt({test:(t,i)=>{varn;if(typeoft=="string"&&typeofe<"u"&&typeof(i==null?void0:i.coercions)<"u"){if(typeof(i==null?void0:i.coercion)>"u")returnpt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))returnpt(
`:""}bd.formatMarkdownish=ZCe;bd.richFormat=VCe;bd.textFormat=XCe});var ay=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=ey(),sy=ty();function Vi(r){lt.DEBUG&&console.log(r)}var aG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function Yv(){return{nodes:[Ti(),Ti(),Ti()]}}function AG(r){let e=Yv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s<n.nodes.length;++s)qv(s)||e.nodes.push(pG(n.nodes[s],i));i+=n.nodes.length-2}for(let n of t)Qc(e,lt.NODE_INITIAL,n);return e}function ss(r,e){return r.nodes.push(e),r.nodes.length-1}function lG(r){let e=new Set,t=i=>{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function cG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodesare:`);for(let t=0;t<r.nodes.length;++t)Vi(`${e}${t}:${JSON.stringify(r.nodes[t])}`)}}function jv(r,e,t=!1){Vi(`Runningavmon${JSON.stringify(e)}`);let i=[{node:lt.NODE_INITIAL,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];cG(r,{prefix:" "});let n=[lt.START_OF_INPUT,...e];for(let s=0;s<n.length;++s){let o=n[s];Vi(`Processing${JSON.stringify(o)}`);let a=[];for(let{node:l,state:c}of i){Vi(`Currentnodeis${l}`);let u=r.nodes[l];if(l===lt.NODE_ERRORED){a.push({node:l,state:c});continue}console.assert(u.shortcuts.length===0,"Shortcuts should have been eliminated by now");let g=Object.prototype.hasOwnProperty.call(u.statics,o);if(!t||s<n.length-1||g)if(g){let f=u.statics[o];for(let{to:h,reducer:p}of f)a.push({node:h,state:typeof p<"u"?Sd(ny,p,c,o):c}),Vi(`Statictransitionto${h}found`)}else Vi(" No static transition found");else{let f=!1;for(let h of Object.keys(u.statics))if(!!h.startsWith(o)){if(o===h)for(let{to:p,reducer:C}of u.statics[h])a.push({node:p,state:typeof C<"u"?Sd(ny,C,c,o):c}),Vi(`Statictransitionto${p}found`);else for(let{to:p}of u.statics[h])a.push({node:p,state:{...c,remainder:h.slice(o.length)}}),Vi(`Statictransitionto${p}found(partialmatch)`);f=!0}f||Vi(" No partial static transition found")}if(o!==lt.END_OF_INPUT)for(let[f,{to:h,reducer:p}]of u.dynamics)Sd(vd,f,c,o)&&(a.push({node:h,state:typeof p<"u"?Sd(ny,p,c,o):c}),Vi(`Dynamictransitionto${h}found(via${f})`))}if(a.length===0&&o===lt.END_OF_INPUT&&e.length===1)return[{node:lt.NODE_INITIAL,state:aG}];if(a.length===0)throw new sy.UnknownSyntaxError(e,i.filter(({node:l})=>l!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new sy.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=uG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(`-${s.node}->${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function $Ce(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function eme(r,e,t){let i=t&&e.length>0?[""]:[],n=jv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let C=r.nodes[p],w=Object.keys(C.statics);for(let B of Object.keys(C.statics)){let v=w[0];for(let{to:D,reducer:L}of C.statics[v])L==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l
`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}.`.padStart(5)}));this.context.stdout.write(`
`;for(let f of c){let h=l.get(f).slice().sort((C,w)=>C.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=`
`,a+=hn.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(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[IG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Executionfailedwithanon-errorrejection(rejectedvalue:${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}:${e.message}
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value<w.value)throw Error("Range out of order in character class");p.push({from:w.value,to:v.value})}else s(w.value,p),p.push(n("-")),s(v.value,p)}else s(w.value,p)}return this.consumeChar("]"),{type:"Set",complement:C,value:p}},r.prototype.classAtom=function(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},r.prototype.parseHexDigits=function(p){for(var C="",w=0;w<p;w++){var B=this.popChar();if(e.test(B)===!1)throw Error("Expecting a HexDecimal digits");C+=B}var v=parseInt(C,16);return{type:"Character",value:v}},r.prototype.peekChar=function(p){return p===void 0&&(p=0),this.input[this.idx+p]},r.prototype.popChar=function(){var p=this.peekChar(0);return this.consumeChar(),p},r.prototype.consumeChar=function(p){if(p!==void 0&&this.input[this.idx]!==p)throw Error("Expected: '"+p+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(w){C.push(w)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(`
`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var w=p[C];p.hasOwnProperty(C)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var Py=y(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.clearRegExpParserCache=ff.getRegExpAst=void 0;var zIe=vy(),xy={},VIe=new zIe.RegExpParser;function XIe(r){var e=r.toString();if(xy.hasOwnProperty(e))return xy[e];var t=VIe.pattern(e);return xy[e]=t,t}ff.getRegExpAst=XIe;function _Ie(){xy={}}ff.clearRegExpParserCache=_Ie});var Kj=y(dn=>{"use strict";var ZIe=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var Tj=vy(),As=Gt(),Oj=Py(),Pa=Ix(),Mj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unabletouse"first char"lexeroptimizations:
`;function $Ie(r,e){e===void 0&&(e=!1);try{var t=(0,Oj.getRegExpAst)(r),i=ky(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Mj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+`>
FordetailsSee:https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,hf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(V)&&(w=!1),(0,Se.forEach)(V,function(W){yx(v,W,C[L])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+hf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing <start_chars_hint> parameter.
Seehttps://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=Wj;function zj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=zj;function Vj(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=Vj;function Xj(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=Xj;function _j(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=_j;function Zj(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&uye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n<a&&cye(o,i.PATTERN)){var c="Token: ->"+l.name+`<- can never be matched.
`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`>propertyinitsdefinition
`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>whichdoesnotexist
`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`>
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning:ACustomTokenPatternshouldspecifythe<line_breaks>option.
butfound:'`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,Cf.tokenLabel)(p)}).join(",")+"]"}),g=(0,_s.map)(u,function(h,p){return""+(p+1)+"."+h}),f=`one of these possible Token sequences:
butfound:'`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,Cf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences::
`+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(ka.defaultParserErrorProvider);ka.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
Thiscouldleadtoaninfiniteloop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in <OR"+r.alternation.idx+"> inside <"+r.topLevelRule.name+`>Rule.
`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`AnAlternationcannothavemorethan256alternatives:
see:https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Lx.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Yq=y(HA=>{"use strict";var Vye=HA&&HA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(HA,"__esModule",{value:!0});HA.GastRefResolverVisitor=HA.resolveGrammar=void 0;var Xye=Hn(),Hq=Gt(),_ye=df();function Zye(r,e){var t=new Gq(r,e);return t.resolveRefs(),t.errors}HA.resolveGrammar=Zye;var Gq=function(r){Vye(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Hq.forEach)((0,Hq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Xye.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(_ye.GAstVisitor);HA.GastRefResolverVisitor=Gq});var _d=y(Tr=>{"use strict";var Rc=Tr&&Tr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Tr,"__esModule",{value:!0});Tr.nextPossibleTokensAfter=Tr.possiblePathsFrom=Tr.NextTerminalAfterAtLeastOneSepWalker=Tr.NextTerminalAfterAtLeastOneWalker=Tr.NextTerminalAfterManySepWalker=Tr.NextTerminalAfterManyWalker=Tr.AbstractNextTerminalAfterProductionWalker=Tr.NextAfterTokenWalker=Tr.AbstractNextPossibleTokensWalker=void 0;var jq=Ty(),Kt=Gt(),$ye=Fx(),Dt=Cn(),qq=function(r){Rc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(jq.RestWalker);Tr.AbstractNextPossibleTokensWalker=qq;var ewe=function(r){Rc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminal
ForFurtherdetails.`)}if((0,Dr.isArray)(e))this.tokensMap=(0,Dr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Dr.has)(e,"modes")&&(0,Dr.every)((0,Dr.flatten)((0,Dr.values)(e.modes)),rC.isTokenType)){var i=(0,Dr.flatten)((0,Dr.values)(e.modes)),n=(0,Dr.uniq)(i);this.tokensMap=(0,Dr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Dr.isObject)(e))this.tokensMap=(0,Dr.cloneObj)(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=TJ.EOF;var s=(0,Dr.every)((0,Dr.values)(e),function(o){return(0,Dr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?rC.tokenStructuredMatcherNoCategories:rC.tokenStructuredMatcher,(0,rC.augmentTokenTypes)((0,Dr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`>maynotbedefinedafterthe'performSelfAnalysis'methodhasbeencalled'
See:https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(VJ);var gBe={name:`This CSTNode indicates the Parser is in Recording Phase
`+("Idx value must be a none negative value smaller than "+(jJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var ZJ=y(iw=>{"use strict";Object.defineProperty(iw,"__esModule",{value:!0});iw.PerformanceTracer=void 0;var _J=Gt(),pBe=Hn(),dBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,_J.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=pBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(i+"--> <"+e+">");var n=(0,_J.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(i+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();iw.PerformanceTracer=dBe});var $J=y(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.applyMixins=void 0;function CBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}nw.applyMixins=CBe});var Hn=y(Cr=>{"use strict";var rW=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),mBe=Kq(),eW=UA(),iW=Vd(),tW=uJ(),EBe=Wx(),IBe=EJ(),yBe=PJ(),wBe=kJ(),BBe=FJ(),QBe=OJ(),bBe=KJ(),SBe=GJ(),vBe=XJ(),xBe=ZJ(),PBe=$J();Cr.END_OF_FILE=(0,eW.createTokenInstance)(eW.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:iW.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var DBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(DBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function kBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=kBe;var sw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The<ignoredIssues>IParserConfigpropertyhasbeendeprecated.
Forfurtherdetails.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,tW.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,tW.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:iW.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,mBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`ParserDefinitionErrorsdetected:
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function TW(r){let e=r[0]==="u",t=r[1]==="{";return e&&!t&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):e&&t?String.fromCodePoint(parseInt(r.slice(2,-1),16)):a0e.get(r)||r}function A0e(r,e){let t=[],i=e.trim().split(/\s*,\s*/g),n;for(let s of i){let o=Number(s);if(!Number.isNaN(o))t.push(o);else if(n=s.match(s0e))t.push(n[2].replace(o0e,(a,l,c)=>l?TW(l):c));else throw new Error(`InvalidChalktemplatestyleargument:${s}(instyle'${r}')`)}return t}function l0e(r){NW.lastIndex=0;let e=[],t;for(;(t=NW.exec(r))!==null;){let i=t[1];if(t[2]){let n=A0e(i,t[2]);e.push([i].concat(n))}else e.push([i])}return e}function LW(r,e){let t={};for(let n of e)for(let s of n.styles)t[s[0]]=n.inverse?null:s.slice(1);let i=r;for(let[n,s]of Object.entries(t))if(!!Array.isArray(s)){if(!(n in i))throw new Error(`UnknownChalkstyle:${n}`);i=s.length>0?i[n](...s):i[n]}return i}OW.exports=(r,e)=>{let t=[],i=[],n=[];if(e.replace(n0e,(s,o,a,l,c,u)=>{if(o)n.push(TW(o));else if(l){let g=n.join("");n=[],i.push(t.length===0?g:LW(r,t)(g)),t.push({inverse:a,styles:l0e(l)})}else if(c){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(LW(r,t)(n.join(""))),n=[],t.pop()}else n.push(u)}),i.push(n.join("")),t.length>0){let s=`Chalktemplateliteralismissing${t.length}closingbracket${t.length===1?"":"s"}(\`}\`)`;thrownewError(s)}returni.join("")}});varcP=y((Ftt,GW)=>{"use strict";varoC=SW(),{stdout:oP,stderr:aP}=kW(),{stringReplaceAll:c0e,stringEncaseCRLFWithFirstIndex:u0e}=FW(),KW=["ansi","ansi","ansi256","ansi16m"],vf=Object.create(null),g0e=(r,e={})=>{if(e.level>3||e.level<0)thrownewError("The `level` option should be an integer from 0 to 3");lett=oP?oP.level:0;r.level=e.level===void0?t:e.level},AP=class{constructor(e){returnUW(e)}},UW=r=>{lete={};returng0e(e,r),e.template=(...t)=>p0e(e.template,...t),Object.setPrototypeOf(e,gw.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{thrownewError("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=AP,e.template};functiongw(r){returnUW(r)}for(let[r,e]ofObject.entries(oC))vf[r]={get(){lett=fw(this,lP(e.open,e.close,this._styler),this._isEmpty);returnObject.defineProperty(this,r,{value:t}),t}};vf.visible={get(){letr=fw(this,this._styler,!0);returnObject.defineProperty(this,"visible",{value:r}),r}};varHW=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(letrofHW)vf[r]={get(){let{level:e}=this;returnfunction(...t){leti=lP(oC.color[KW[e]][r](...t),oC.color.close,this._styler);returnfw(this,i,this._isEmpty)}}};for(letrofHW){lete="bg"+r[0].toUpperCase()+r.slice(1);vf[e]={get(){let{level:t}=this;returnfunction(...i){letn=lP(oC.bgColor[KW[t]][r](...i),oC.bgColor.close,this._styler);returnfw(this,n,this._isEmpty)}}}}varf0e=Object.defineProperties(()=>{},{...vf,level:{enumerable:!0,get(){returnthis._generator.level},set(r){this._generator.level=r}}}),lP=(r,e,t)=>{leti,n;returnt===void0?(i=r,n=e):(i=t.openAll+r,n=e+t.closeAll),{open:r,close:e,openAll:i,closeAll:n,parent:t}},fw=(r,e,t)=>{leti=(...n)=>h0e(i,n.length===1?""+n[0]:n.join(" "));returni.__proto__=f0e,i._generator=r,i._styler=e,i._isEmpty=t,i},h0e=(r,e)=>{if(r.level<=0||!e)returnr._isEmpty?"":e;lett=r._styler;if(t===void0)returne;let{openAll:i,closeAll:n}=t;if(e.indexOf("\x1B")!==-1)for(;t!==void0;)e=c0e(e,t.close,t.open),t=t.parent;lets=e.indexOf(`
`);return s!==-1&&(e=u0e(e,n,i,s)),i+e+n},sP,p0e=(r,...e)=>{let[t]=e;if(!Array.isArray(t))return e.join(" ");let i=e.slice(1),n=[t.raw[0]];for(let s=1;s<t.length;s++)n.push(String(i[s-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[s]));return sP===void 0&&(sP=MW()),sP(r,n.join(""))};Object.defineProperties(gw.prototype,vf);var aC=gw();aC.supportsColor=oP;aC.stderr=gw({level:aP?aP.level:0});aC.stderr.supportsColor=aP;aC.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};GW.exports=aC});var hw=y(fs=>{"use strict";fs.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;fs.find=(r,e)=>r.nodes.find(t=>t.type===e);fs.exceedsLimit=(r,e,t=1,i)=>i===!1||!fs.isInteger(r)||!fs.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=i;fs.escapeNode=(r,e=0,t)=>{let i=r.nodes[e];!i||(t&&i.type===t||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};fs.encloseBrace=r=>r.type!=="brace"?!1:r.commas>>0+r.ranges>>0===0?(r.invalid=!0,!0):!1;fs.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:r.commas>>0+r.ranges>>0===0||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;fs.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;fs.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);fs.flatten=(...r)=>{let e=[],t=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?t(s,e):s!==void 0&&e.push(s)}return e};return t(r),e}});var pw=y((Ltt,jW)=>{"use strict";var YW=hw();jW.exports=(r,e={})=>{let t=(i,n={})=>{let s=e.escapeInvalid&&YW.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&YW.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let l of i.nodes)a+=t(l);return a};return t(r)}});var JW=y((Ttt,qW)=>{"use strict";qW.exports=function(r){return typeof r=="number"?r-r===0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var t8=y((Ott,e8)=>{"use strict";var WW=JW(),Nc=(r,e,t)=>{if(WW(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(WW(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...t};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),l=r+":"+e+"="+n+s+o+a;if(Nc.cache.hasOwnProperty(l))return Nc.cache[l].result;let c=Math.min(r,e),u=Math.max(r,e);if(Math.abs(c-u)===1){let C=r+"|"+e;return i.capture?`(${C})`:i.wrap===!1?C:`(?:${C})`}let g=$W(r)||$W(e),f={min:r,max:e,a:c,b:u},h=[],p=[];if(g&&(f.isPadded=g,f.maxLen=String(f.max).length),c<0){let C=u<0?Math.abs(u):1;p=zW(C,Math.abs(c),f,i),c=f.a=0}return u>=0&&(h=zW(c,u,f,i)),f.negatives=p,f.positives=h,f.result=d0e(p,h,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&h.length+p.length>1&&(f.result=`(?:${f.result})`),Nc.cache[l]=f,f.result};function d0e(r,e,t){let i=uP(r,e,"-",!1,t)||[],n=uP(e,r,"",!1,t)||[],s=uP(r,e,"-?",!0,t)||[];return i.concat(s).concat(n).join("|")}function C0e(r,e){let t=1,i=1,n=XW(r,t),s=new Set([e]);for(;r<=n&&n<=e;)s.add(n),t+=1,n=XW(r,t);for(n=_W(e+1,i)-1;r<n&&n<=e;)s.add(n),i+=1,n=_W(e+1,i)-1;return s=[...s],s.sort(I0e),s}function m0e(r,e,t){if(r===e)return{pattern:r,count:[],digits:0};let i=E0e(r,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[l,c]=i[a];l===c?s+=l:l!=="0"||c!=="9"?s+=y0e(l,c,t):o++}return o&&(s+=t.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function zW(r,e,t,i){let n=C0e(r,e),s=[],o=r,a;for(let l=0;l<n.length;l++){let c=n[l],u=m0e(String(o),String(c),i),g="";if(!t.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+ZW(a.count),o=c+1;continue}t.isPadded&&(g=w0e(c,t,i)),u.string=g+u.pattern+ZW(u.count),s.push(u),o=c+1,a=u}return s}function uP(r,e,t,i,n){let s=[];for(let o of r){let{string:a}=o;!i&&!VW(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 w8=y((Gtt,y8)=>{"use strict";var L0e=pw(),{MAX_LENGTH:m8,CHAR_BACKSLASH:pP,CHAR_BACKTICK:T0e,CHAR_COMMA:O0e,CHAR_DOT:M0e,CHAR_LEFT_PARENTHESES:K0e,CHAR_RIGHT_PARENTHESES:U0e,CHAR_LEFT_CURLY_BRACE:H0e,CHAR_RIGHT_CURLY_BRACE:G0e,CHAR_LEFT_SQUARE_BRACKET:E8,CHAR_RIGHT_SQUARE_BRACKET:I8,CHAR_DOUBLE_QUOTE:Y0e,CHAR_SINGLE_QUOTE:j0e,CHAR_NO_BREAK_SPACE:q0e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:J0e}=C8(),W0e=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},i=typeof t.maxLength=="number"?Math.min(m8,t.maxLength):m8;if(r.length>i)throw new SyntaxError(`Inputlength(${r.length}),exceedsmaxcharacters(${i})`);let n={type:"root",input:r,nodes:[]},s=[n],o=n,a=n,l=0,c=r.length,u=0,g=0,f,h={},p=()=>r[u++],C=w=>{if(w.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&w.type==="text"){a.value+=w.value;return}return o.nodes.push(w),w.parent=o,w.prev=a,a=w,w};for(C({type:"bos"});u<c;)if(o=s[s.length-1],f=p(),!(f===J0e||f===q0e)){if(f===pP){C({type:"text",value:(e.keepEscaping?f:"")+p()});continue}if(f===I8){C({type:"text",value:"\\"+f});continue}if(f===E8){l++;let w=!0,B;for(;u<c&&(B=p());){if(f+=B,B===E8){l++;continue}if(B===pP){f+=p();continue}if(B===I8&&(l--,l===0))break}C({type:"text",value:f});continue}if(f===K0e){o=C({type:"paren",nodes:[]}),s.push(o),C({type:"text",value:f});continue}if(f===U0e){if(o.type!=="paren"){C({type:"text",value:f});continue}o=s.pop(),C({type:"text",value:f}),o=s[s.length-1];continue}if(f===Y0e||f===j0e||f===T0e){let w=f,B;for(e.keepQuotes!==!0&&(f="");u<c&&(B=p());){if(B===pP){f+=B+p();continue}if(B===w){e.keepQuotes===!0&&(f+=B);break}f+=B}C({type:"text",value:f});continue}if(f===H0e){g++;let w=a.value&&a.value.slice(-1)==="$"||o.dollar===!0;o=C({type:"brace",open:!0,close:!1,dollar:w,depth:g,commas:0,ranges:0,nodes:[]}),s.push(o),C({type:"open",value:f});continue}if(f===G0e){if(o.type!=="brace"){C({type:"text",value:f});continue}let w="close";o=s.pop(),o.close=!0,C({type:w,value:f}),g--,o=s[s.length-1];continue}if(f===O0e&&g>0){if(o.ranges>0){o.ranges=0;let w=o.nodes.shift();o.nodes=[w,{type:"text",value:L0e(o)}]}C({type:"comma",value:f}),o.commas++;continue}if(f===M0e&&g>0&&o.commas===0){let w=o.nodes;if(g===0||w.length===0){C({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){w.pop();let B=w[w.length-1];B.value+=a.value+f,a=B,o.ranges--;continue}C({type:"dot",value:f});continue}C({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let w=s[s.length-1],B=w.nodes.indexOf(o);w.nodes.splice(B,1,...o.nodes)}while(s.length>0);return C({type:"eos"}),n};y8.exports=W0e});var b8=y((Ytt,Q8)=>{"use strict";var B8=pw(),z0e=g8(),V0e=p8(),X0e=w8(),Yn=(r,e={})=>{let t=[];if(Array.isArray(r))for(let i of r){let n=Yn.create(i,e);Array.isArray(n)?t.push(...n):t.push(n)}else t=[].concat(Yn.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};Yn.parse=(r,e={})=>X0e(r,e);Yn.stringify=(r,e={})=>B8(typeof r=="string"?Yn.parse(r,e):r,e);Yn.compile=(r,e={})=>(typeof r=="string"&&(r=Yn.parse(r,e)),z0e(r,e));Yn.expand=(r,e={})=>{typeof r=="string"&&(r=Yn.parse(r,e));let t=V0e(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};Yn.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?Yn.compile(r,e):Yn.expand(r,e);Q8.exports=Yn});var lC=y((jtt,D8)=>{"use strict";var _0e=J("path"),Mo="\\\\/",S8=`[^${Mo}]`,La="\\.",Z0e="\\+",$0e="\\?",Cw="\\/",eQe="(?=.)",v8="[^/]",dP=`(?:${Cw}|$)`,x8=`(?:^|${Cw
Pleasereportthistohttps://github.com/szmarczak/http2-wrapper/`);p(C)}return}i[0].resolve(h);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let l=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let u=`${a}:${o}`,g=!1;try{let f=FDe.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(u),...t});f[rn]=0,f[rh]=!1;let h=()=>f[rn]<f.remoteSettings.maxConcurrentStreams,p=!0;f.socket.once("session",w=>{this.tlsSessionCache.set(u,w)}),f.once("error",w=>{for(let{reject:B}of i)B(w);this.tlsSessionCache.delete(u)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(g){p&&this._freeSessionsCount--,this._sessionsCount--;let w=this.sessions[o];w.splice(w.indexOf(f),1),w.length===0&&delete this.sessions[o]}else{let w=new Error("Session closed without receiving a SETTINGS frame");w.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:B}of i)B(w);l()}this._tryToCreateNewSession(o,a)});let C=()=>{if(!(!(o in this.queue)||!h())){for(let w of f[ms])if(w in this.queue[o]){let{listeners:B}=this.queue[o][w];for(;B.length!==0&&h();)B.shift().resolve(f);let v=this.queue[o];if(v[w].listeners.length===0&&(delete v[w],Object.keys(v).length===0)){delete this.queue[o];break}if(!h())break}}};f.on("origin",()=>{f[ms]=f.originSet,h()&&(C(),vR(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let w=new Error("Agent has been destroyed");for(let B of i)B.reject(w);f.destroy();return}f[ms]=f.originSet;{let w=this.sessions;if(o in w){let B=w[o];B.splice(TDe(B,f,ODe),0,f)}else w[o]=[f]}this._freeSessionsCount+=1,g=!0,this.emit("session",f),C(),l(),f[rn]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,t,i),i.length=0),f.on("remoteSettings",()=>{C(),vR(this.sessions[o],f)})}),f[f6]=f.request,f.request=(w,B)=>{if(f[rh])throw new Error("The session is gracefully closing. No new streams are allowed.");let v=f[f6](w,B);return f.ref(),++f[rn],f[rn]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,v.once("close",()=>{if(p=h(),--f[rn],!f.destroyed&&!f.closed&&(MDe(this.sessions[o],f),h()&&!f.closed)){p||(this._freeSessionsCount++,p=!0);let D=f[rn]===0;D&&f.unref(),D&&(this._freeSessionsCount>this.maxFreeSessions||f[rh])?f.close():(vR(this.sessions[o],f),C())}}),v}}catch(f){for(let h of i)h.reject(f);l()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,t,i,n){return new Promise((s,o)=>{this.getSession(e,t,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(l){o(l)}}}])})}createConnection(e,t){return zo.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof t.servername>"u"&&(t.servername=n),RDe.connect(i,n,t)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let t of e)t[rn]===0&&t.close()}destroy(e){for(let t of Object.values(this.sessions))for(let i of t)i.destroy(e);for(let t of Object.values(this.queue))for(let i of Object.values(t))i.destroyed=!0;this.queue={}}get freeSessions(){return h6({agent:this,isFree:!0})}get busySessions(){return h6({agent:this,isFree:!1})}};zo.kCurrentStreamsCount=rn;zo.kGracefullyClosing=rh;d6.exports={Agent:zo,globalAgent:new zo}});var DR=y(($nt,C6)=>{"use strict";var{Readable:KDe}=J("stream"),PR=class extends KDe{constructor(e,t){super({highWaterMark:t,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,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.res
`),c=o.length;for(c>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());c-- >0;)a=t(r.styles[o[c]],a,l);return a},n=(s,o,a)=>{r.styles[s]=e({name:s,codes:o}),(r.keys[a]||(r.keys[a]=[])).push(s),Reflect.defineProperty(r,s,{configurable:!0,enumerable:!0,set(c){r.alias(s,c)},get(){let c=u=>i(u,c.stack);return Reflect.setPrototypeOf(c,r),c.stack=this.stack?this.stack.concat(s):[s],c}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),r.ansiRegex=pqe,r.hasColor=r.hasAnsi=s=>(r.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&r.ansiRegex.test(s)),r.alias=(s,o)=>{let a=typeof o=="string"?r[o]:o;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),r.styles[s]=a,a.stack=[s]),Reflect.defineProperty(r,s,{configurable:!0,enumerable:!0,set(l){r.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,r),l.stack=this.stack?this.stack.concat(a.stack):a.stack,l}})},r.theme=s=>{if(!hqe(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))r.alias(o,s[o]);return r},r.alias("unstyle",s=>typeof s=="string"&&s!==""?(r.ansiRegex.lastIndex=0,s.replace(r.ansiRegex,"")):""),r.alias("noop",s=>s),r.none=r.clear=r.noop,r.stripColor=r.unstyle,r.symbols=Mne(),r.define=n,r};ST.exports=Kne();ST.exports.create=Kne});var ji=y(Lt=>{"use strict";var dqe=Object.prototype.toString,Ds=ao(),Une=!1,vT=[],Hne={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};Lt.longest=(r,e)=>r.reduce((t,i)=>Math.max(t,e?i[e].length:i.length),0);Lt.hasColor=r=>!!r&&Ds.hasColor(r);var qQ=Lt.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);Lt.nativeType=r=>dqe.call(r).slice(8,-1).toLowerCase().replace(/\s/g,"");Lt.isAsyncFn=r=>Lt.nativeType(r)==="asyncfunction";Lt.isPrimitive=r=>r!=null&&typeof r!="object"&&typeof r!="function";Lt.resolve=(r,e,...t)=>typeof e=="function"?e.call(r,...t):e;Lt.scrollDown=(r=[])=>[...r.slice(1),r[0]];Lt.scrollUp=(r=[])=>[r.pop(),...r];Lt.reorder=(r=[])=>{let e=r.slice();return e.sort((t,i)=>t.index>i.index?1:t.index<i.index?-1:0),e};Lt.swap=(r,e,t)=>{let i=r.length,n=t===i?0:t<0?i-1:t,s=r[e];r[e]=r[n],r[n]=s};Lt.width=(r,e=80)=>{let t=r&&r.columns?r.columns:e;return r&&typeof r.getWindowSize=="function"&&(t=r.getWindowSize()[0]),process.platform==="win32"?t-1:t};Lt.height=(r,e=20)=>{let t=r&&r.rows?r.rows:e;return r&&typeof r.getWindowSize=="function"&&(t=r.getWindowSize()[1]),t};Lt.wordWrap=(r,e={})=>{if(!r)return r;typeof e=="number"&&(e={width:e});let{indent:t="",newline:i=`
`+t,width:n=80}=e;n-=((i+t).match(/[^\S\n]/g)||[]).length;let o=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,a=r.trim(),l=new RegExp(o,"g"),c=a.match(l)||[];return c=c.map(u=>u.replace(/\n$/,"")),e.padEnd&&(c=c.map(u=>u.padEnd(n," "))),e.padStart&&(c=c.map(u=>u.padStart(n," "))),t+c.join(i)};Lt.unmute=r=>{let e=r.stack.find(i=>Ds.keys.color.includes(i));return e?Ds[e]:r.stack.find(i=>i.slice(2)==="bg")?Ds[e.slice(2)]:i=>i};Lt.pascal=r=>r?r[0].toUpperCase()+r.slice(1):"";Lt.inverse=r=>{if(!r||!r.stack)return r;let e=r.stack.find(i=>Ds.keys.color.includes(i));if(e){let i=Ds["bg"+Lt.pascal(e)];return i?i.black:r}let t=r.stack.find(i=>i.slice(0,2)==="bg");return t?Ds[t.slice(2).toLowerCase()]||r:Ds.none};Lt.complement=r=>{if(!r||!r.stack)return r;let e=r.stack.find(i=>Ds.keys.color.includes(i)),t=r.stack.find(i=>i.slice(0,2)==="bg");if(e&&!t)return Ds[Hne[e]||e];if(t){let i=t.slice(2).toLowerCase(),n=Hne[i];return n&&Ds["bg"+Lt.pascal(n)]||r}return Ds.none};Lt.meridiem=r=>{let e=r.getHours(),t=r.getMinutes(),i=e>=12?"pm":"am";e=e%12;let n=e===0?12:e,s=t<10?"0"+t:t;return n+":"+s+" "+i};Lt.set=(r={},e="",t)=>e.split(".").reduce((i,n,s,o)=>{let a=o.length-1>s?i[n]||{}:t;return!Lt.isObject(a)&&s<o.length-1&&(a={}),i[n]=a},r);Lt.get=(r={},e="",t)=>{let i=r[e]==null?e.split(".").reduce((n,s)=>n&&n[s],r):r[e];return i==null?t:i};Lt.mixin=(r,e)=>{if(!qQ(r))return e;if(!qQ(e))return r;for(let t of Object.keys(e)){let i=Object.getOwnPropertyDescriptor(e,t);if(i.hasOwnProperty("value"))if(r.hasOwnProperty(t)&&qQ(i.value)){let n=Object.getOwnPropertyDescriptor(r,t);qQ(n.value)?r[t]=Lt.merge({},r[t],e[t]):Reflect.defineProperty(r,t,i)}else Reflect.defineProperty(r,t,i);else Reflect.defineProperty(r,t,i)}return r};Lt.merge=(...r)=>{let e={};for(let t of r)Lt.mixin(e,t);return e};Lt.mixinEmitter=(r,e)=>{let t=e.constructor.prototype;for(let i of Object.keys(t)){let n=t[i];typeof n=="function"?Lt.define(r,i,n.bind(e)):Lt.define(r,i,n)}};Lt.onExit=r=>{let e=(t,i)=>{Une||(Une=!0,vT.forEach(n=>n()),t===!0&&process.exit(128+i))};vT.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),vT.push(r)};Lt.define=(r,e,t)=>{Reflect.defineProperty(r,e,{value:t})};Lt.defineExport=(r,e,t)=>{let i;Reflect.defineProperty(r,e,{enumerable:!0,configurable:!0,set(n){i=n},get(){return i?i():t()}})}});var Gne=y(rp=>{"use strict";rp.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"};rp.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};rp.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};rp.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};rp.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 qne=y((lft,jne)=>{"use strict";var Yne=J("readline"),Cqe=Gne(),mqe=/^(?:\x1b)([a-zA-Z0-9])$/,Eqe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Iqe={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:"clea
`:" ",i=[];for(let n=0;n<4;n++){let s=t(n);e[n]?i.push(s.repeat(e[n])):i.push("")}return i}Ase.exports=nE});var use=y((dft,cse)=>{"use strict";var Oqe=ji(),lse={default(r,e){return e},checkbox(r,e){throw new Error("checkbox role is not implemented yet")},editable(r,e){throw new Error("editable role is not implemented yet")},expandable(r,e){throw new Error("expandable role is not implemented yet")},heading(r,e){return e.disabled="",e.indicator=[e.indicator," "].find(t=>t!=null),e.message=e.message||"",e},input(r,e){throw new Error("input role is not implemented yet")},option(r,e){return lse.default(r,e)},radio(r,e){throw new Error("radio role is not implemented yet")},separator(r,e){return e.disabled="",e.indicator=[e.indicator," "].find(t=>t!=null),e.message=e.message||r.symbols.line.repeat(5),e},spacer(r,e){return e}};cse.exports=(r,e={})=>{let t=Oqe.merge({},lse,e.roles);return t[r]||t.default}});var sE=y((Cft,hse)=>{"use strict";var Mqe=ao(),Kqe=ip(),Uqe=use(),WQ=ji(),{reorder:OT,scrollUp:Hqe,scrollDown:Gqe,isObject:gse,swap:Yqe}=WQ,MT=class extends Kqe{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:t,autofocus:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");gse(t)&&(t=Object.keys(t)),Array.isArray(t)?(i!=null&&(this.index=this.findIndex(i)),t.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(t=i),typeof t=="string"&&(t=this.findIndex(t)),typeof t=="number"&&t>-1&&(this.index=Math.max(0,Math.min(t,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,t){this.state.loadingChoices=!0;let i=[],n=0,s=async(o,a)=>{typeof o=="function"&&(o=await o.call(this)),o instanceof Promise&&(o=await o);for(let l=0;l<o.length;l++){let c=o[l]=await this.toChoice(o[l],n++,a);i.push(c),c.choices&&await s(c.choices,c)}return i};return s(e,t).then(o=>(this.state.loadingChoices=!1,o))}async toChoice(e,t,i){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 n=e.value;if(e=Uqe(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=t,e.cursor=0,WQ.define(e,"parent",i),e.level=i?i.level+1:1,e.indent==null&&(e.indent=i?i.indent+" ":e.indent||""),e.path=i?i.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,Mqe.unstyle(e.message).length));let o={...e};return e.reset=(a=o.input,l=o.value)=>{for(let c of Object.keys(o))e[c]=o[c];e.input=a,e.value=l},n==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,t)),e}async onChoice(e,t){this.emit("choice",e,t,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,t)}async addChoice(e,t,i){let n=await this.toChoice(e,t,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,t,i){let n={name:"New choice name?",editable:!0,newChoice:!0,...e},s=await this.addChoice(n,t,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,t){if(thi
`).map(v=>" "+v),w=s.length,B=0;for(let v of s)g.invalid.has(v.name)&&v.lines.forEach(D=>{C[D][0]===" "&&(C[D]=g.styles.danger(g.symbols.bullet)+C[D].slice(1))}),r.isValue(g.values[v.name])&&B++;return g.completed=(B/w*100).toFixed(0),g.output=C.join(`
`)),this.write(this.margin[2]),this.restore()}};ooe.exports=cO});var loe=y((Yft,Aoe)=>{"use strict";var xJe=Il(),uO=class extends xJe{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,t){let i=await super.toChoices(e,t);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}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)}}};Aoe.exports=uO});var uoe=y(gO=>{"use strict";var coe=ji(),hi=(r,e)=>{coe.defineExport(gO,r,e),coe.defineExport(gO,r.toLowerCase(),e)};hi("AutoComplete",()=>Cse());hi("BasicAuth",()=>Qse());hi("Confirm",()=>vse());hi("Editable",()=>Pse());hi("Form",()=>zQ());hi("Input",()=>_T());hi("Invisible",()=>Tse());hi("List",()=>Mse());hi("MultiSelect",()=>Use());hi("Numeral",()=>Yse());hi("Password",()=>qse());hi("Scale",()=>zse());hi("Select",()=>Il());hi("Snippet",()=>$se());hi("Sort",()=>toe());hi("Survey",()=>ioe());hi("Text",()=>soe());hi("Toggle",()=>aoe());hi("Quiz",()=>loe())});var foe=y((qft,goe)=>{goe.exports={ArrayPrompt:sE(),AuthPrompt:qT(),BooleanPrompt:VQ(),NumberPrompt:rO(),StringPrompt:Bu()}});var aE=y((Jft,poe)=>{"use strict";var hoe=J("assert"),hO=J("events"),yl=ji(),lo=class extends hO{constructor(e,t){super(),this.options=yl.merge({},e),this.answers={...t}}register(e,t){if(yl.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}hoe.equal(typeof t,"function","expected a function");let i=e.toLowerCase();return t.prototype instanceof this.Prompt?this.prompts[i]=t:this.prompts[i]=t(this.Prompt,this),this}async prompt(e=[]){for(let t of[].concat(e))try{typeof t=="function"&&(t=await t.call(this)),await this.ask(yl.merge({},this.options,t))}catch(i){return Promise.reject(i)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let t=yl.merge({},this.options,e),{type:i,name:n}=e,{set:s,get:o}=yl;if(typeof i=="function"&&(i=await i.call(this,e,this.answers)),!i)return this.answers[n];hoe(this.prompts[i],`Prompt"${i}"isnotregistered`);let a=new this.prompts[i](t),l=o(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",u=>{this.emit("answer",n,u,a),s(this.answers,n,u)});let c=a.emit.bind(a);return a.emit=(...u)=>(this.emit.call(this,...u),c(...u)),this.emit("prompt",a,this),t.autofill&&l!=null?(a.value=a.input=l,t.autofill==="show"&&await a.submit()):l=a.value=await a.run(),l}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||ip()}static get prompts(){return uoe()}static get types(){return foe()}static get prompt(){let e=(t,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...o)=>(e.emit(...o),s(...o)),n.prompt(t)};return yl.mixinEmitter(e,new hO),e}};yl.mixinEmitter(lo,new hO);var fO=lo.prompts;for(let r of Object.keys(fO)){let e=r.toLowerCase(),t=i=>new fO[r](i).run();lo.prompt[e]=t,lo[e]=t,lo[r]||Reflect.defineProperty(lo,r,{get:()=>fO[r]})}var oE=r=>{yl.defineExport(lo,r,()=>lo.types[r])};oE("ArrayPrompt");oE("AuthPrompt");oE("BooleanPrompt");oE("NumberPrompt");oE("StringPrompt");poe.exports=lo});var Soe=y((Pht,boe)=>{function FJe(r,e){for(var t=-1,i=r==null?0:r.length;++t<i&&e(r[t],t,r)!==!1;);return r}boe.exports=FJe});var op=y((Dht,voe)=>{var NJe=lQ(),LJe=Mh();function TJe(r,e,t,i){var n=!t;t||(t={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=i?i(t[a],r[a],a,t,r):void 0;l===void 0&&(l=r[a]),n?LJe(t,a,l):NJe(t,a,l)}return t}voe.exports=TJe});var Poe=y((kht,xoe)=>{var OJe=op(),MJe=Jh();function KJe(r,e){return r&&OJe(e,MJe(e),r)}xoe.exports=KJe});var ko
`,h}function H5e(r,e){return e.fs_.chmod(r,493)}function LM(r){if(!r)return{win32:"",posix:""};let e=typeof r=="string"?r.split(Fs.delimiter):Array.from(r),t={};for(let i=0;i<e.length;i++){let n=e[i].split("/").join("\\"),s=lce()?e[i].split("\\").join("/").replace(/^([^:\\/]*):/,(o,a)=>`/mnt/${a.toLowerCase()}`):e[i];t.win32=t.win32?`${t.win32};${n}`:n,t.posix=t.posix?`${t.posix}:${s}`:s,t[i]={win32:n,posix:s}}return t}uce.exports=NM});var zM=y((KQt,Rce)=>{Rce.exports=J("stream")});var Tce=y((UQt,Lce)=>{"use strict";function Fce(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function a6e(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Fce(Object(t),!0).forEach(function(i){A6e(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Fce(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function A6e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function l6e(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Nce(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function c6e(r,e,t){return e&&Nce(r.prototype,e),t&&Nce(r,t),r}var u6e=J("buffer"),Wb=u6e.Buffer,g6e=J("util"),VM=g6e.inspect,f6e=VM&&VM.custom||"inspect";function h6e(r,e,t){Wb.prototype.copy.call(r,e,t)}Lce.exports=function(){function r(){l6e(this,r),this.head=null,this.tail=null,this.length=0}return c6e(r,[{key:"push",value:function(t){var i={data:t,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(t){var i={data:t,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=t+i.data;return n}},{key:"concat",value:function(t){if(this.length===0)return Wb.alloc(0);for(var i=Wb.allocUnsafe(t>>>0),n=this.head,s=0;n;)h6e(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(t,i){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):t===this.head.data.length?n=this.shift():n=i?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var i=this.head,n=1,s=i.data;for(t-=s.length;i=i.next;){var o=i.data,a=t>o.length?o.length:t;if(a===o.length?s+=o:s+=o.slice(0,t),t-=a,t===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(t){var i=Wb.allocUnsafe(t),n=this.head,s=1;for(n.data.copy(i),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,a),t-=a,t===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:f6e,value:function(t,i){return VM(this,a6e({},i,{depth:0,customInspect:!1}))}}]),r}()});var _M=y((HQt,Mce)=>{"use strict";function p6e(r,e){var t=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(XM,this,r)):process.nextTick(XM,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s
`)),r.linkname&&(e+=bK(" linkpath="+r.linkname+`
`));var t=r.pax;if(t)for(var i in t)e+=bK(" "+i+"="+t[i]+`
`);return Buffer.from(e)};Lp.decodePax=function(r){for(var e={};r.length;){for(var t=0;t<r.length&&r[t]!==32;)t++;var i=parseInt(r.slice(0,t).toString(),10);if(!i)return e;var n=r.slice(t+1,i-1).toString(),s=n.indexOf("=");if(s===-1)return e;e[n.slice(0,s)]=n.slice(s+1),r=r.slice(i)}return e};Lp.encode=function(r){var e=l9e(512),t=r.name,i="";if(r.typeflag===5&&t[t.length-1]!=="/"&&(t+="/"),Buffer.byteLength(t)!==t.length)return null;for(;Buffer.byteLength(t)>100;){var n=t.indexOf("/");if(n===-1)return null;i+=i?"/"+t.slice(0,n):t.slice(0,n),t=t.slice(n+1)}return Buffer.byteLength(t)>100||Buffer.byteLength(i)>155||r.linkname&&Buffer.byteLength(r.linkname)>100?null:(e.write(t),e.write(Hl(r.mode&p9e,6),100),e.write(Hl(r.uid,6),108),e.write(Hl(r.gid,6),116),e.write(Hl(r.size,11),124),e.write(Hl(r.mtime.getTime()/1e3|0,11),136),e[156]=Mue+m9e(r.type),r.linkname&&e.write(r.linkname,157),Kue.copy(e,VE),g9e.copy(e,SK),r.uname&&e.write(r.uname,265),r.gname&&e.write(r.gname,297),e.write(Hl(r.devmajor||0,6),329),e.write(Hl(r.devminor||0,6),337),i&&e.write(i,345),e.write(Hl(Hue(e),6),148),e)};Lp.decode=function(r,e,t){var i=r[156]===0?0:r[156]-Mue,n=Np(r,0,100,e),s=Gl(r,100,8),o=Gl(r,108,8),a=Gl(r,116,8),l=Gl(r,124,12),c=Gl(r,136,12),u=C9e(i),g=r[157]===0?null:Np(r,157,100,e),f=Np(r,265,32),h=Np(r,297,32),p=Gl(r,329,8),C=Gl(r,337,8),w=Hue(r);if(w===8*32)return null;if(w!==Gl(r,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Kue.compare(r,VE,VE+6)===0)r[345]&&(n=Np(r,345,155,e)+"/"+n);else if(!(f9e.compare(r,VE,VE+6)===0&&h9e.compare(r,SK,SK+2)===0)){if(!t)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:o,gid:a,size:l,mtime:new Date(1e3*c),type:u,linkname:g,uname:f,gname:h,devmajor:p,devminor:C}}});var zue=y((abt,Wue)=>{var Yue=J("util"),I9e=Oue(),XE=vK(),jue=Fp().Writable,que=Fp().PassThrough,Jue=function(){},Gue=function(r){return r&=511,r&&512-r},y9e=function(r,e){var t=new lS(r,e);return t.end(),t},w9e=function(r,e){return e.path&&(r.name=e.path),e.linkpath&&(r.linkname=e.linkpath),e.size&&(r.size=parseInt(e.size,10)),r.pax=e,r},lS=function(r,e){this._parent=r,this.offset=e,que.call(this,{autoDestroy:!1})};Yue.inherits(lS,que);lS.prototype.destroy=function(r){this._parent.destroy(r)};var dA=function(r){if(!(this instanceof dA))return new dA(r);jue.call(this,r),r=r||{},this._offset=0,this._buffer=I9e(),this._missing=0,this._partial=!1,this._onparse=Jue,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,t=e._buffer,i=function(){e._continue()},n=function(f){if(e._locked=!1,f)return e.destroy(f);e._stream||i()},s=function(){e._stream=null;var f=Gue(e._header.size);f?e._parse(f,o):e._parse(512,g),e._locked||i()},o=function(){e._buffer.consume(Gue(e._header.size)),e._parse(512,g),i()},a=function(){var f=e._header.size;e._paxGlobal=XE.decodePax(t.slice(0,f)),t.consume(f),s()},l=function(){var f=e._header.size;e._pax=XE.decodePax(t.slice(0,f)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),t.consume(f),s()},c=function(){var f=e._header.size;this._gnuLongPath=XE.decodeLongPath(t.slice(0,f),r.filenameEncoding),t.consume(f),s()},u=function(){var f=e._header.size;this._gnuLongLinkPath=XE.decodeLongPath(t.slice(0,f),r.filenameEncoding),t.consume(f),s()},g=function(){var f=e._offset,h;try{h=e._header=XE.decode(t.slice(0,512),r.filenameEncoding,r.allowUnknownFormat)}catch(p){e.emit("error",p)}if(t.consume(512),!h){e._parse(512,g),i();return}if(h.type==="gnu-long-path"){e._parse(h.size,c),i();return}if(h.type==="gnu-long-link-path"){e._parse(h.size,u),i();return}if(h.type==="pax-global-header"){e._parse(h.size,a),i();return}if(h.type==="pax-header"){e._parse(h.size,l),i();return}if(e._gnuLongPath&&(h.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(h.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=h=w9e(h,e._pax),e._pax=
`),(0,UH.parse)(r)}var jde=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function qde(r){if(jde.test(r))return Yde(r);let e=(0,$I.safeLoad)(r,{schema:$I.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expectedanindexedobject,gota${typeofe}instead.DoesyourfilefollowYaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml'srules?");return e}function Qi(r){return qde(r)}var h5=ne(YH()),gB=ne(yc()),Ya=ne(Xe()),p5=ne(lf()),qk=J("stream");var Ct=(oe=>(oe[oe.UNNAMED=0]="UNNAMED",oe[oe.EXCEPTION=1]="EXCEPTION",oe[oe.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",oe[oe.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",oe[oe.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",oe[oe.BUILD_DISABLED=5]="BUILD_DISABLED",oe[oe.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",oe[oe.MUST_BUILD=7]="MUST_BUILD",oe[oe.MUST_REBUILD=8]="MUST_REBUILD",oe[oe.BUILD_FAILED=9]="BUILD_FAILED",oe[oe.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",oe[oe.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",oe[oe.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",oe[oe.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",oe[oe.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",oe[oe.REMOTE_INVALID=15]="REMOTE_INVALID",oe[oe.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",oe[oe.RESOLUTION_PACK=17]="RESOLUTION_PACK",oe[oe.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",oe[oe.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",oe[oe.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",oe[oe.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",oe[oe.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",oe[oe.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",oe[oe.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",oe[oe.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",oe[oe.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",oe[oe.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",oe[oe.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",oe[oe.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",oe[oe.FETCH_FAILED=30]="FETCH_FAILED",oe[oe.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",oe[oe.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",oe[oe.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",oe[oe.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",oe[oe.NETWORK_ERROR=35]="NETWORK_ERROR",oe[oe.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",oe[oe.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",oe[oe.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",oe[oe.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",oe[oe.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",oe[oe.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",oe[oe.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",oe[oe.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",oe[oe.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",oe[oe.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",oe[oe.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",oe[oe.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",oe[oe.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",oe[oe.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",oe[oe.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",oe[oe.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",oe[oe.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",oe[oe.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",oe[oe.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",oe[oe.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",oe[oe.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",oe[oe.INVALID_MANIFEST=57]="INVALID_MANIFEST",oe[oe.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",oe[oe.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",oe[oe.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",oe[oe.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",oe[oe.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",oe[oe.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",oe[oe.FROZEN_ARTIFACT_EXCEPTION=64]
`);return{stdout:s,stderr:o}}makeResolver(){let e=[];for(let t of this.plugins.values())for(let i of t.resolvers||[])e.push(new i);return new Wf([new NC,new Jr,new AB,...e])}makeFetcher(){let e=[];for(let t of this.plugins.values())for(let i of t.fetchers||[])e.push(new i);return new Jf([new Vf,new _f,...e])}getLinkers(){let e=[];for(let t of this.plugins.values())for(let i of t.linkers||[])e.push(new i);return e}getSupportedArchitectures(){let e=TC(),t=this.get("supportedArchitectures"),i=t.get("os");i!==null&&(i=i.map(o=>o==="current"?e.os:o));let n=t.get("cpu");n!==null&&(n=n.map(o=>o==="current"?e.cpu:o));let s=t.get("libc");return s!==null&&(s=Uo(s,o=>{var a;return o==="current"?(a=e.libc)!=null?a:Uo.skip:o})),{os:i,cpu:n,libc:s}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,t=(i,n,{userProvided:s=!1}={})=>{if(!ro(i.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let o=new nt;o.load(n,{yamlCompatibilityMode:!0});let a=Df(e,i.identHash),l=[];a.push([i.range,l]);let c={status:"inactive",userProvided:s,parentDescriptor:i};for(let u of o.dependencies.values())l.push({...c,type:"Dependency",descriptor:u});for(let u of o.peerDependencies.values())l.push({...c,type:"PeerDependency",descriptor:u});for(let[u,g]of o.peerDependenciesMeta)for(let[f,h]of Object.entries(g))l.push({...c,type:"PeerDependencyMeta",selector:u,key:f,value:h})};await this.triggerHook(i=>i.registerPackageExtensions,this,t);for(let[i,n]of this.get("packageExtensions"))t(ZA(i,!0),Iw(n),{userProvided:!0})}normalizePackage(e){let t=BC(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let i=this.packageExtensions.get(e.identHash);if(typeof i<"u"){let s=e.version;if(s!==null){for(let[o,a]of i)if(!!qc(s,o))for(let l of a)switch(l.status==="inactive"&&(l.status="redundant"),l.type){case"Dependency":typeof t.dependencies.get(l.descriptor.identHash)>"u"&&(l.status="active",t.dependencies.set(l.descriptor.identHash,l.descriptor));break;case"PeerDependency":typeof t.peerDependencies.get(l.descriptor.identHash)>"u"&&(l.status="active",t.peerDependencies.set(l.descriptor.identHash,l.descriptor));break;case"PeerDependencyMeta":{let c=t.peerDependenciesMeta.get(l.selector);(typeof c>"u"||!Object.prototype.hasOwnProperty.call(c,l.key)||c[l.key]!==l.value)&&(l.status="active",Ta(t.peerDependenciesMeta,l.selector,()=>({}))[l.key]=l.value)}break;default:FP(l);break}}}let n=s=>s.scope?`${s.scope}__${s.name}`:`${s.name}`;for(let s of t.peerDependenciesMeta.keys()){let o=Zi(s);t.peerDependencies.has(o.identHash)||t.peerDependencies.set(o.identHash,Zt(o,"*"))}for(let s of t.peerDependencies.values()){if(s.scope==="types")continue;let o=n(s),a=qo("types",o),l=Ot(a);t.peerDependencies.has(a.identHash)||t.peerDependenciesMeta.has(l)||(t.peerDependencies.set(a.identHash,Zt(a,"*")),t.peerDependenciesMeta.set(l,{optional:!0}))}return t.dependencies=new Map(Bn(t.dependencies,([,s])=>bn(s))),t.peerDependencies=new Map(Bn(t.peerDependencies,([,s])=>bn(s))),t}getLimit(e){return Ta(this.limits,e,()=>(0,p5.default)(this.get(e)))}async triggerHook(e,...t){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);!s||await s(...t)}}async triggerMultipleHooks(e,t){for(let i of t)await this.triggerHook(e,...i)}async reduceHook(e,t,...i){let n=t;for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let a=e(o);!a||(n=await a(n,...i))}return n}async firstHook(e,...t){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);if(!s)continue;let o=await s(...t);if(typeof o<"u")return o}return null}},Ie=Ga;Ie.telemetry=null;var tR=(i=>(i[i.Never=0]="Never",i[i.ErrorCode=1]="ErrorCode",i[i.Always=2]="Always",i))(tR||{}),OC=class extends ot{constructor({fileName:t,code:i,signal:n}){let s=Ie.create(x.cwd()),o=Ve(s,t,Oe.PATH);super(1,`Child${o}reportedanerror`,a=>{EPe(i,n,{configuration:s,report:a})});this.code=rR(i,n)}},dB=class extends OC{constructor({fileName:t,code:i,signal:n,std
`),0)],["sleep",async([r],e,t)=>{if(typeof r>"u")throw new qn("sleep: missing operand");let i=Number(r);if(Number.isNaN(i))throw new qn(`sleep:invalidtimeinterval'${r}'`);return await NRe(1e3*i,0)}],["__ysh_run_procedure",async(r,e,t)=>{let i=t.procedures[r[0]];return await _B(i,{stdin:new ys(t.stdin),stdout:new ys(t.stdout),stderr:new ys(t.stderr)}).run()}],["__ysh_set_redirects",async(r,e,t)=>{let i=t.stdin,n=t.stdout,s=t.stderr,o=[],a=[],l=[],c=0;for(;r[c]!=="--";){let g=r[c++],{type:f,fd:h}=JSON.parse(g),p=v=>{switch(h){case null:case 0:o.push(v);break;default:throw new Error(`Unsupportedfiledescriptor:"${h}"`)}},C=v=>{switch(h){case null:case 1:a.push(v);break;case 2:l.push(v);break;default:throw new Error(`Unsupportedfiledescriptor:"${h}"`)}},w=Number(r[c++]),B=c+w;for(let v=c;v<B;++c,++v)switch(f){case"<":p(()=>e.baseFs.createReadStream(x.resolve(t.cwd,K.toPortablePath(r[v]))));break;case"<<<":p(()=>{let D=new Jn.PassThrough;return process.nextTick(()=>{D.write(`${r[v]}
`),D.end()}),D});break;case"<&":p(()=>f9(Number(r[v]),1,t));break;case">":case">>":{let D=x.resolve(t.cwd,K.toPortablePath(r[v]));C(D==="/dev/null"?new Jn.Writable({autoDestroy:!0,emitClose:!0,write(L,H,j){setImmediate(j)}}):e.baseFs.createWriteStream(D,f===">>"?{flags:"a"}:void 0))}break;case">&":C(f9(Number(r[v]),2,t));break;default:throw new Error(`Assertionfailed:Unsupportedredirectiontype:"${f}"`)}}if(o.length>0){let g=new Jn.PassThrough;i=g;let f=h=>{if(h===o.length)g.end();else{let p=o[h]();p.pipe(g,{end:!1}),p.on("end",()=>{f(h+1)})}};f(0)}if(a.length>0){let g=new Jn.PassThrough;n=g;for(let f of a)g.pipe(f)}if(l.length>0){let g=new Jn.PassThrough;s=g;for(let f of l)g.pipe(f)}let u=await _B(_C(r.slice(c+1),e,t),{stdin:new ys(i),stdout:new ys(n),stderr:new ys(s)}).run();return await Promise.all(a.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),await Promise.all(l.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),u}]]);async function TRe(r,e,t){let i=[],n=new Jn.PassThrough;return n.on("data",s=>i.push(s)),await e0(r,e,$B(t,{stdout:n})),Buffer.concat(i).toString().replace(/[\r\n]+$/,"")}async function h9(r,e,t){let i=r.map(async s=>{let o=await Zc(s.args,e,t);return{name:s.name,value:o.join(" ")}});return(await Promise.all(i)).reduce((s,o)=>(s[o.name]=o.value,s),{})}function ZB(r){return r.match(/[^ \r\n\t]+/g)||[]}async function I9(r,e,t,i,n=i){switch(r.name){case"$":i(String(process.pid));break;case"#":i(String(e.args.length));break;case"@":if(r.quoted)for(let s of e.args)n(s);else for(let s of e.args){let o=ZB(s);for(let a=0;a<o.length-1;++a)n(o[a]);i(o[o.length-1])}break;case"*":{let s=e.args.join(" ");if(r.quoted)i(s);else for(let o of ZB(s))n(o)}break;case"PPID":i(String(process.ppid));break;case"RANDOM":i(String(Math.floor(Math.random()*32768)));break;default:{let s=parseInt(r.name,10),o,a=Number.isFinite(s);if(a?s>=0&&s<e.args.length&&(o=e.args[s]):Object.prototype.hasOwnProperty.call(t.variables,r.name)?o=t.variables[r.name]:Object.prototype.hasOwnProperty.call(t.environment,r.name)&&(o=t.environment[r.name]),typeof o<"u"&&r.alternativeValue?o=(await Zc(r.alternativeValue,e,t)).join(" "):typeof o>"u"&&(r.defaultValue?o=(await Zc(r.defaultValue,e,t)).join(" "):r.alternativeValue&&(o="")),typeof o>"u")throw a?new qn(`Unboundargument#${s}`):new qn(`Unboundvariable"${r.name}"`);if(r.quoted)i(o);else{let l=ZB(o);for(let u=0;u<l.length-1;++u)n(l[u]);let c=l[l.length-1];typeof c<"u"&&i(c)}}break}}var ORe={addition:(r,e)=>r+e,subtraction:(r,e)=>r-e,multiplication:(r,e)=>r*e,division:(r,e)=>Math.trunc(r/e)};async function XC(r,e,t){if(r.type==="number"){if(Number.isInteger(r.value))return r.value;throw new Error(`Invalidnumber:"${r.value}",onlyintegersareallowed`)}else if(r.type==="variable"){let i=[];await I9({...r,quoted:!0},e,t,s=>i.push(s));let n=Number(i.join(" "));return Number.isNaN(n)?XC({type:"variable",name:i.join(" ")},e,t):XC({type:"number",value:n},e,t)}else return ORe[r.type](await XC(r.left,e,t),await XC(r.right,e,t))}async function Zc(r,e,t){let i=new Map,n=[],s=[],o=u=>{s.push(u)},a=()=>{s.length>0&&n.push(s.join("")),s=[]},l=u=>{o(u),a()},c=(u,g,f)=>{let h=JSON.stringify({type:u,fd:g}),p=i.get(h);typeof p>"u"&&i.set(h,p=[]),p.push(f)};for(let u of r){let g=!1;switch(u.type){case"redirection":{let f=await Zc(u.args,e,t);for(let h of f)c(u.subtype,u.fd,h)}break;case"argument":for(let f of u.segments)switch(f.type){case"text":o(f.text);break;case"glob":o(f.pattern),g=!0;break;case"shell":{let h=await TRe(f.shell,e,t);if(f.quoted)o(h);else{let p=ZB(h);for(let C=0;C<p.length-1;++C)l(p[C]);o(p[p.length-1])}}break;case"variable":await I9(f,e,t,o,l);break;case"arithmetic":o(String(await XC(f.arithmetic,e,t)));break}break}if(a(),g){let f=n.pop();if(typeof f>"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let h=await e.glob.match(f,{cwd:t.cwd,baseFs:e.baseFs});if(h.length===0){let p=wF(f)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please
`),this.writeProgress()}writeLineWithForgettableReset(t,{truncate:i}={}){this.forgettableLines=[],this.writeLine(t,{truncate:i})}writeLines(t,{truncate:i}={}){this.clearProgress({delta:t.length});for(let n of t)this.stdout.write(`${this.truncate(n,{truncate:i})}
`);this.writeProgress()}reportCacheChanges({cacheHitCount:t,cacheMissCount:i}){let n=this.cacheHitCount-t,s=this.cacheMissCount-i;if(n===0&&s===0)return;let o="";this.cacheHitCount>1?o+=`${this.cacheHitCount}packageswerealreadycached`:this.cacheHitCount===1?o+=" - one package was already cached":o+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?o+=`,${this.cacheMissCount}hadtobefetched`:this.cacheMissCount===1&&(o+=`,onehadtobefetched(${mt(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?o+=`-${this.cacheMissCount}packageshadtobefetched`:this.cacheMissCount===1&&(o+=`-onepackagehadtobefetched(${mt(this.configuration,this.lastCacheMiss)})`),this.reportInfo(13,o)}commit(){let t=this.uncommitted;this.uncommitted=new Set;for(let i of t)i.committed=!0,i.action()}clearProgress({delta:t=0,clear:i=!1}){this.progressStyle!==null&&this.progress.size+t>0&&(this.stdout.write(`\x1B[${this.progress.size+t}A`),(t>0||i)&&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 t=Date.now();t-this.progressTime>i7&&(this.progressFrame=(this.progressFrame+1)%r7.length,this.progressTime=t);let i=r7[this.progressFrame];for(let n of this.progress.values()){let s="";if(typeof n.lastScaledSize<"u"){let c=this.progressStyle.chars[0].repeat(n.lastScaledSize),u=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-n.lastScaledSize);s=`${c}${u}`}let o=this.formatName(null),a=o?`${o}:`:"",l=n.definition.title?`${n.definition.title}`:"";this.stdout.write(`${Ve(this.configuration,"\u27A4","blueBright")}${a}${i}${s}${l}
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},i7)}refreshProgress({delta:t=0,force:i=!1}={}){let n=!1,s=!1;if(i||this.progress.size===0)n=!0;else for(let o of this.progress.values()){let a=typeof o.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*o.definition.progress):void 0,l=o.lastScaledSize;o.lastScaledSize=a;let c=o.lastTitle;if(o.lastTitle=o.definition.title,a!==l||(s=c!==o.definition.title)){n=!0;break}}n&&(this.clearProgress({delta:t,clear:s}),this.writeProgress())}truncate(t,{truncate:i}={}){return this.progressStyle===null&&(i=!1),typeof i>"u"&&(i=this.configuration.get("preferTruncatedLines")),i&&(t=(0,s7.default)(t,0,this.stdout.columns-1)),t}formatName(t){return o7(t,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(t){return RF(t,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var Or="3.3.0";var l7=(n=>(n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm",n))(l7||{});async function za(r,e,t,i=[]){if(process.platform==="win32"){let n=`@goto#_undefined_#2>NUL||@title%COMSPEC%&@setlocal&@"${t}"${i.map(s=>`"${s.replace('"','""')}"`).join(" ")}%*`;await M.writeFilePromise(x.format({dir:r,name:e,ext:".cmd"}),n)}await M.writeFilePromise(x.join(r,e),`#!/bin/sh
`,{mode:493})}async function c7(r){let e=await nt.tryFind(r);if(e!=null&&e.packageManager){let i=tB(e.packageManager);if(i!=null&&i.name){let n=`found${JSON.stringify({packageManager:e.packageManager})}inmanifest`,[s]=i.reference.split(".");switch(i.name){case"yarn":{let o=Number(s)===1?"Yarn Classic":"Yarn";return{packageManagerField:!0,packageManager:o,reason:n}}break;case"npm":return{packageManagerField:!0,packageManager:"npm",reason:n};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:n}}}}let t;try{t=await M.readFilePromise(x.join(r,xt.lockfile),"utf8")}catch{}return t!==void 0?t.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'}:M.existsSync(x.join(r,"package-lock.json"))?{packageManager:"npm",reason:`foundnpm's "package-lock.json" lockfile`}:M.existsSync(x.join(r,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's"pnpm-lock.yaml"lockfile`}:null}async function em({project:r,locator:e,binFolder:t,ignoreCorepack:i,lifecycleScript:n}){var c,u;let s={};for(let[g,f]of Object.entries(process.env))typeof f<"u"&&(s[g.toLowerCase()!=="path"?g:"PATH"]=f);let o=K.fromPortablePath(t);s.BERRY_BIN_FOLDER=K.fromPortablePath(o);let a=process.env.COREPACK_ROOT&&!i?K.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([za(t,"node",process.execPath),...Or!==null?[za(t,"run",process.execPath,[a,"run"]),za(t,"yarn",process.execPath,[a]),za(t,"yarnpkg",process.execPath,[a]),za(t,"node-gyp",process.execPath,[a,"run","--top-level","node-gyp"])]:[]]),r&&(s.INIT_CWD=K.fromPortablePath(r.configuration.startingCwd),s.PROJECT_CWD=K.fromPortablePath(r.cwd)),s.PATH=s.PATH?`${o}${K.delimiter}${s.PATH}`:`${o}`,s.npm_execpath=`${o}${K.sep}yarn`,s.npm_node_execpath=`${o}${K.sep}node`,e){if(!r)throw new Error("Assertion failed: Missing project");let g=r.tryWorkspaceByLocator(e),f=g?(c=g.manifest.version)!=null?c:"":(u=r.storedPackages.get(e.locatorHash).version)!=null?u:"";s.npm_package_name=Ot(e),s.npm_package_version=f;let h;if(g)h=g.cwd;else{let p=r.storedPackages.get(e.locatorHash);if(!p)throw new Error(`Packagefor${mt(r.configuration,e)}notfoundintheproject`);let C=r.configuration.getLinkers(),w={project:r,report:new Ke({stdout:new ol.PassThrough,configuration:r.configuration})},B=C.find(v=>v.supportsPackage(p,w));if(!B)throw new Error(`Thepackage${mt(r.configuration,p)}isn'tsupportedbyanyoftheavailablelinkers`);h=await B.findPackageLocation(p,w)}s.npm_package_json=K.fromPortablePath(x.join(h,xt.manifest))}let l=Or!==null?`yarn/${Or}`:`yarn/${Nf("@yarnpkg/core").version}-core`;return s.npm_config_user_agent=`${l}npm/?node/${process.version}${process.platform}${process.arch}`,n&&(s.npm_lifecycle_event=n),r&&await r.configuration.triggerHook(g=>g.setupScriptEnvironment,r,s,async(g,f,h)=>await za(t,Gr(g),f,h)),s}var jFe=2,qFe=(0,A7.default)(jFe);async function JFe(r,e,{configuration:t,report:i,workspace:n=null,locator:s=null}){await qFe(async()=>{await M.mktempPromise(async o=>{let a=x.join(o,"pack.log"),l=null,{stdout:c,stderr:u}=t.getSubprocessStreams(a,{prefix:K.fromPortablePath(r),report:i}),g=s&&jo(s)?bC(s):s,f=g?ps(g):"an external project";c.write(`Packing${f}fromsources
$2`).replace(/^│\n/,"");if(n>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");t.write(s)}var rZ=J("crypto"),sL=ne(J("fs"));var cTe=8,kt=class{constructor(e,{configuration:t,immutable:i=t.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,rZ.randomBytes)(8).toString("hex")}.tmp`;this.configuration=t,this.cwd=e,this.immutable=i,this.check=n;let s=t.get("cacheKeyOverride");if(s!==null)this.cacheKey=`${s}`;else{let o=t.get("compressionLevel"),a=o!==lc?`c${o}`:"";this.cacheKey=[cTe,a].join("")}}static async find(e,{immutable:t,check:i}={}){let n=new kt(e.get("cacheFolder"),{configuration:e,immutable:t,check:i});return await n.setup(),n}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${jf(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){let n=uTe(t).slice(0,10);return`${jf(e)}-${n}.zip`}getLocatorPath(e,t,i={}){var s;return this.mirrorCwd===null||((s=i.unstablePackages)==null?void 0:s.has(e.locatorHash))?x.resolve(this.cwd,this.getVersionFilename(e)):t===null||nL(t)!==this.cacheKey?null:x.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){let t=this.mirrorCwd;return t!==null?x.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await M.existsPromise(this.cwd))throw new ot(56,"Cache path does not exist.")}else{await M.mkdirPromise(this.cwd,{recursive:!0});let e=x.resolve(this.cwd,".gitignore");await M.changeFilePromise(e,`/.gitignore
`);if(D.lines=L,D.added||D.removed){var H;if(!u){var j=a[v-1];u=h,g=p,j&&(f=o.context>0?l(j.lines.slice(-o.context)):[],u-=f.length,g-=f.length)}(H=f).push.apply(H,oL(L.map(function(_){return(D.added?"+":"-")+_}))),D.added?p+=L.length:h+=L.length}else{if(u)if(L.length<=o.context*2&&v<a.length-2){var $;($=f).push.apply($,oL(l(L)))}else{var V,W=Math.min(L.length,o.context);(V=f).push.apply(V,oL(l(L.slice(0,W))));var Z={oldStart:u,oldLines:h-u+W,newStart:g,newLines:p-g+W,lines:f};if(v>=a.length-2&&L.length<=o.context){var A=/\n$/.test(t),ae=/\n$/.test(i),ge=L.length==0&&f.length>Z.oldLines;!A&&ge&&t.length>0&&f.splice(Z.oldLines,0,"\\ No newline at end of file"),(!A&&!ge||!ae)&&f.push("\\ No newline at end of file")}c.push(Z),u=0,g=0,f=[]}h+=L.length,p+=L.length}},w=0;w<a.length;w++)C(w);return{oldFileName:r,newFileName:e,oldHeader:n,newHeader:s,hunks:c}}var CQ=ne(gee()),Cee=ne(lf()),mee=ne($r()),BL=J("util"),wL=ne(J("v8")),QL=ne(J("zlib"));var VKe=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(r,e,t,i)=>`${t}#commit=${i}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(r,e,t="",i,n)=>`https://${t}github.com/${i}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(r,e,t="",i,n)=>`https://${t}github.com/${i}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,r=>`npm:${r}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,r=>`npm:${r}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,r=>`npm:${r}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(r,e)=>rB({protocol:"npm:",source:null,selector:r,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,r=>`npm:${r}`]],fQ=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:t}){let i=x.join(e.cwd,e.configuration.get("lockfileFilename"));if(!M.existsSync(i))return;let n=await M.readFilePromise(i,"utf8"),s=Qi(n);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;let o=this.resolutions=new Map;for(let a of Object.keys(s)){let l=xC(a);if(!l){t.reportWarning(14,`Failed to parse the string "${a}" into a proper descriptor`);continue}let c=ro(l.range)?Zt(l,`npm:${l.range}`):l,{version:u,resolved:g}=s[a];if(!g)continue;let f;for(let[p,C]of VKe){let w=g.match(p);if(w){f=C(u,...w);break}}if(!f){t.reportWarning(14,`${tr(e.configuration,c)}: Only some patterns can be imported from legacy lockfiles (not "${g}")`);continue}let h=c;try{let p=Yf(c.range),C=xC(p.selector,!0);C&&(h=C)}catch{}o.set(c.descriptorHash,en(h,f))}}supportsDescriptor(e,t){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return await this.resolver.getCandidates(Pk(n),t,i)}async getSatisfying(e,t,i){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}};var hQ=class{constructor(e){this.resolver=e}supportsDescriptor(e,t){return!!(t.project.storedResolutions.get(e.descriptorHash)||t.project.originalPackages.has(eB(e).locatorHash))}supportsLocator(e,t){return!!(t.project.originalPackages.has(e.locatorHash)&&!t.project.lockfileNeedsRefresh)}shouldPersistResolution(e,t){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,i){
`;await M.changeFilePromise(t,i,{automaticNewlines:!0}),this.manifest.raw=e}};var hee=6,XKe=1,_Ke=/ *, */g,pee=/\/$/,ZKe=32,$Ke=(0,BL.promisify)(QL.default.gzip),e1e=(0,BL.promisify)(QL.default.gunzip),Xn=(t=>(t.UpdateLockfile="update-lockfile",t.SkipBuild="skip-build",t))(Xn||{}),IL={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["storedBuildState"]},dee=r=>$i(`${XKe}`,r),He=class{constructor(e,{configuration:t}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.installersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=t,this.cwd=e}static async find(e,t){var p,C,w;if(!e.projectCwd)throw new yL.UsageError(`Noprojectfoundin${t}`);let i=e.projectCwd,n=t,s=null;for(;s!==e.projectCwd;){if(s=n,M.existsSync(x.join(s,xt.manifest))){i=s;break}n=x.dirname(s)}let o=new He(e.projectCwd,{configuration:e});(p=Ie.telemetry)==null||p.reportProject(o.cwd),await o.setupResolutions(),await o.setupWorkspaces(),(C=Ie.telemetry)==null||C.reportWorkspaceCount(o.workspaces.length),(w=Ie.telemetry)==null||w.reportDependencyCount(o.workspaces.reduce((B,v)=>B+v.manifest.dependencies.size+v.manifest.devDependencies.size,0));let a=o.tryWorkspaceByCwd(i);if(a)return{project:o,workspace:a,locator:a.anchoredLocator};let l=await o.findLocatorForLocation(`${i}/`,{strict:!0});if(l)return{project:o,locator:l,workspace:null};let c=Ve(e,o.cwd,Oe.PATH),u=Ve(e,x.relative(o.cwd,i),Oe.PATH),g=`-If${c}isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,f=`- If ${c} is intended to be a project, it might be that you forgot to list ${u} in its workspace configuration.`,h=`- Finally, if ${c} is fine and you intend ${u} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new yL.UsageError(`The nearest package directory (${Ve(e,i,Oe.PATH)}) doesn'tseemtobepartoftheprojectdeclaredin${Ve(e,o.cwd,Oe.PATH)}.
`)}`)}asyncsetupResolutions(){vari;this.storedResolutions=newMap,this.storedDescriptors=newMap,this.storedPackages=newMap,this.lockFileChecksum=null;lete=x.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(M.existsSync(e)){letn=awaitM.readFilePromise(e,"utf8");this.lockFileChecksum=dee(n);lets=Qi(n);if(s.__metadata){leto=s.__metadata.version,a=s.__metadata.cacheKey;this.lockfileNeedsRefresh=o<hee;for(letlofObject.keys(s)){if(l==="__metadata")continue;letc=s[l];if(typeofc.resolution>"u")thrownewError(`Assertion failed: Expected the lockfile entry to have a resolution field (${l})`);letu=jc(c.resolution,!0),g=newnt;g.load(c,{yamlCompatibilityMode:!0});letf=g.version,h=g.languageName||t,p=c.linkType.toUpperCase(),C=(i=c.conditions)!=null?i:null,w=g.dependencies,B=g.peerDependencies,v=g.dependenciesMeta,D=g.peerDependenciesMeta,L=g.bin;if(c.checksum!=null){letj=typeofa<"u"&&!c.checksum.includes("/")?`${a}/${c.checksum}`:c.checksum;this.storedChecksums.set(u.locatorHash,j)}letH={...u,version:f,languageName:h,linkType:p,conditions:C,dependencies:w,peerDependencies:B,dependenciesMeta:v,peerDependenciesMeta:D,bin:L};this.originalPackages.set(H.locatorHash,H);for(letjofl.split(_Ke)){let$=ZA(j);this.storedDescriptors.set($.descriptorHash,$),this.storedResolutions.set($.descriptorHash,u.locatorHash)}}}}}asyncsetupWorkspaces(){this.workspaces=[],this.workspacesByCwd=newMap,this.workspacesByIdent=newMap;lete=[this.cwd];for(;e.length>0;){lett=e;e=[];for(letioft){if(this.workspacesByCwd.has(i))continue;letn=awaitthis.addWorkspace(i),s=this.storedPackages.get(n.anchoredLocator.locatorHash);s&&(n.dependencies=s.dependencies);for(letoofn.workspacesCwds)e.push(o)}}}asyncaddWorkspace(e){lett=newKh(e,{project:this});awaitt.setup();leti=this.workspacesByIdent.get(t.locator.identHash);if(typeofi<"u")thrownewError(`Duplicate workspace name ${ui(this.configuration,t.locator)}: ${K.fromPortablePath(e)} conflicts with ${K.fromPortablePath(i.cwd)}`);returnthis.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}gettopLevelWorkspace(){returnthis.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){x.isAbsolute(e)||(e=x.resolve(this.cwd,e)),e=x.normalize(e).replace(/\/+$/,"");lett=this.workspacesByCwd.get(e);returnt||null}getWorkspaceByCwd(e){lett=this.tryWorkspaceByCwd(e);if(!t)thrownewError(`Workspace not found (${e})`);returnt}tryWorkspaceByFilePath(e){lett=null;for(letiofthis.workspaces)x.relative(i.cwd,e).startsWith("../")||t&&t.cwd.length>=i.cwd.length||(t=i);returnt||null}getWorkspaceByFilePath(e){lett=this.tryWorkspaceByFilePath(e);if(!t)thrownewError(`Workspace not found (${e})`);returnt}tryWorkspaceByIdent(e){lett=this.workspacesByIdent.get(e.identHash);returntypeoft>"u"?null:t}getWorkspaceByIdent(e){lett=this.tryWorkspaceByIdent(e);if(!t)thrownewError(`Workspace not found (${ui(this.configuration,e)})`);returnt}tryWorkspaceByDescriptor(e){lett=this.tryWorkspaceByIdent(e);returnt===null||(_A(e)&&(e=QC(e)),!t.accepts(e.range))?null:t}getWorkspaceByDescriptor(e){lett=this.tryWorkspaceByDescriptor(e);if(t===null)thrownewError(`Workspace not found (${tr(this.configuration,e)})`);returnt}tryWorkspaceByLocator(e){lett=this.tryWorkspaceByIdent(e);returnt===null||(jo(e)&&(e=bC(e)),t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash)?null:t}getWorkspaceByLocator(e){lett=this.tryWorkspaceByLocator(e);if(!t)thrownewError(`Workspace not found (${mt(this.configuration,e)})`);returnt}refreshWorkspaceDependencies(){for(leteofthis.workspaces){lett=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)thrownewError(`Assertion failed: Expected workspace ${DC(this.configuration,e)} (${Ve(this.configuration,x.join(e.cwd,xt.manifest),Oe.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);e.dependencies=newMap(t.dependencies)}}forgetResolution(e){lett=n=>{this.storedResolutions.delete(n),this.storedDescrip
`;break}let fe=null;if(!await M.mktempPromise(async Ge=>{let ie=x.join(Ge,"build.log"),{stdout:Y,stderr:he}=this.configuration.getSubprocessStreams(ie,{header:Qe,prefix:mt(this.configuration,ue),report:t}),re;try{switch(se){case 0:re=await A0(ue,Ae,[],{cwd:Te,project:this,stdin:fe,stdout:Y,stderr:he});break;case 1:re=await FF(ue,Ae,[],{cwd:Te,project:this,stdin:fe,stdout:Y,stderr:he});break}}catch(tt){he.write(tt.stack),re=1}if(Y.end(),he.end(),re===0)return W.set(ue.locatorHash,Pe),!0;M.detachTemp(Ge);let me=`${mt(this.configuration,ue)}couldn't be built successfully (exit code ${Ve(this.configuration,re,Oe.NUMBER)}, logs can be found here: ${Ve(this.configuration,ie,Oe.PATH)})`;return this.optionalBuilds.has(ue.locatorHash)?(t.reportInfo(9,me),W.set(ue.locatorHash,Pe),!0):(t.reportError(9,me),!1)}))return}})())}}if(await eo(T),_===D.size){let N=Array.from(D).map(ue=>{let we=this.storedPackages.get(ue);if(!we)throw new Error("Assertion failed: The package should have been registered");return mt(this.configuration,we)}).join(", ");t.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won'tbebuilt(affectedpackagesare:${N})`);break}}this.storedBuildState=W}async install(e){var a,l;let t=this.configuration.get("nodeLinker");(a=Ie.telemetry)==null||a.reportInstall(t),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(c=>c.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.status="inactive";let i=x.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await M.readFilePromise(i,"utf8")}catch(c){throw c.code==="ENOENT"?new ot(28,"The lockfile would have been created by this install, which is explicitly forbidden."):c}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,c]of this.configuration.packageExtensions)for(let[,u]of c)for(let g of u)if(g.userProvided){let f=Ve(this.configuration,g,Oe.PACKAGE_EXTENSION);switch(g.status){case"inactive":e.report.reportWarning(68,`${f}:Nomatchingpackageinthedependencytree;youmaynotneedthisruleanymore.`);break;case"redundant":e.report.reportWarning(69,`${f}:Thisruleseemsredundantwhenappliedontheoriginalpackage;theextensionmayhavebeenappliedupstream.`);break}}if(n!==null){let c=Ac(n,this.generateLockfile());if(c!==n){let u=oZ(i,i,n,c,void 0,void 0,{maxEditLength:100});if(u){e.report.reportSeparator();for(let g of u.hunks){e.report.reportInfo(null,`@@-${g.oldStart},${g.oldLines}+${g.newStart},${g.newLines}@@`);for(let f of g.lines)f.startsWith("+")?e.report.reportError(28,Ve(this.configuration,f,Oe.ADDED)):f.startsWith("-")?e.report.reportError(28,Ve(this.configuration,f,Oe.REMOVED)):e.report.reportInfo(null,Ve(this.configuration,f,"grey"))}e.report.reportSeparator()}throw new ot(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.userProvided&&g.status==="active"&&((l=Ie.telemetry)==null||l.reportPackageExtension(Oc(g,Oe.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 s=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],o=await Promise.all(s.map(async c=>$w(c,{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${Ve(this.configuration,"mode=update-lockfile",Oe.CODE)}`);return}await this.linkEverything(
`+ba(t)}async persistLockfile(){let e=x.join(this.cwd,this.configuration.get("lockfileFilename")),t="";try{t=await M.readFilePromise(e,"utf8")}catch{}let i=this.generateLockfile(),n=Ac(t,i);n!==t&&(await M.writeFilePromise(e,n),this.lockFileChecksum=dee(n),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let o of Object.values(IL))e.push(...o);let t=(0,CQ.default)(this,e),i=wL.default.serialize(t),n=$i(i);if(this.installStateChecksum===n)return;let s=this.configuration.get("installStatePath");await M.mkdirPromise(x.dirname(s),{recursive:!0}),await M.writeFilePromise(s,await $Ke(i)),this.installStateChecksum=n}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0,restoreBuildState:i=!0}={}){let n=this.configuration.get("installStatePath"),s;try{let o=await e1e(await M.readFilePromise(n));s=wL.default.deserialize(o),this.installStateChecksum=$i(o)}catch{t&&await this.applyLightResolution();return}e&&typeof s.installersCustomData<"u"&&(this.installersCustomData=s.installersCustomData),i&&Object.assign(this,(0,CQ.default)(s,IL.restoreBuildState)),t&&(s.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,CQ.default)(s,IL.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new ni}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){if(this.configuration.get("enableGlobalCache"))return;let i=new Set([".gitignore"]);if(!Kk(e.cwd,this.cwd)||!await M.existsPromise(e.cwd))return;let n=this.configuration.get("preferAggregateCacheInfo"),s=0,o=null;for(let a of await M.readdirPromise(e.cwd)){if(i.has(a))continue;let l=x.resolve(e.cwd,a);e.markedFiles.has(l)||(o=a,e.immutable?t.reportError(56,`${Ve(this.configuration,x.basename(l),"magenta")}appearstobeunusedandwouldbemarkedfordeletion,butthecacheisimmutable`):(n?s+=1:t.reportInfo(19,`${Ve(this.configuration,x.basename(l),"magenta")}appearstobeunused-removing`),await M.removePromise(l)))}n&&s!==0&&t.reportInfo(19,s>1?`${s}packagesappearedtobeunusedandwereremoved`:`${o}appearedtobeunusedandwasremoved`),e.markedFiles.clear()}};function t1e({project:r,allDescriptors:e,allResolutions:t,allPackages:i,accessibleLocators:n=new Set,optionalBuilds:s=new Set,peerRequirements:o=new Map,volatileDescriptors:a=new Set,report:l}){var V;let c=new Map,u=[],g=new Map,f=new Map,h=new Map,p=new Map,C=new Map,w=new Map(r.workspaces.map(W=>{let Z=W.anchoredLocator.locatorHash,A=i.get(Z);if(typeof A>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[Z,BC(A)]})),B=()=>{let W=M.mktempSync(),Z=x.join(W,"stacktrace.log"),A=String(u.length+1).length,ae=u.map((ge,_)=>`${`${_+1}.`.padStart(A," ")}${ps(ge)}
`).join("");throw M.writeFileSync(Z,ae),M.detachTemp(W),new ot(45,`Encounteredastackoverflowwhenresolvingpeerdependencies;cf${K.fromPortablePath(Z)}`)},v=W=>{let Z=t.get(W.descriptorHash);if(typeof Z>"u")throw new Error("Assertion failed: The resolution should have been registered");let A=i.get(Z);if(!A)throw new Error("Assertion failed: The package could not be found");return A},D=(W,Z,A,{top:ae,optional:ge})=>{u.length>1e3&&B(),u.push(Z);let _=L(W,Z,A,{top:ae,optional:ge});return u.pop(),_},L=(W,Z,A,{top:ae,optional:ge})=>{if(n.has(Z.locatorHash))return;n.add(Z.locatorHash),ge||s.delete(Z.locatorHash);let _=i.get(Z.locatorHash);if(!_)throw new Error(`Assertionfailed:Thepackage(${mt(r.configuration,Z)})shouldhavebeenregistered`);let T=[],N=[],ue=[],we=[],Le=[];for(let Te of Array.from(_.dependencies.values())){if(_.peerDependencies.has(Te.identHash)&&_.locatorHash!==ae)continue;if(_A(Te))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(Te.descriptorHash);let se=ge;if(!se){let Y=_.dependenciesMeta.get(Ot(Te));if(typeof Y<"u"){let he=Y.get(null);typeof he<"u"&&he.optional&&(se=!0)}}let Ae=t.get(Te.descriptorHash);if(!Ae)throw new Error(`Assertionfailed:Theresolution(${tr(r.configuration,Te)})shouldhavebeenregistered`);let Qe=w.get(Ae)||i.get(Ae);if(!Qe)throw new Error(`Assertionfailed:Thepackage(${Ae},resolvedfrom${tr(r.configuration,Te)})shouldhavebeenregistered`);if(Qe.peerDependencies.size===0){D(Te,Qe,new Map,{top:ae,optional:se});continue}let fe,le,Ge=new Set,ie;N.push(()=>{fe=Dk(Te,Z.locatorHash),le=kk(Qe,Z.locatorHash),_.dependencies.delete(Te.identHash),_.dependencies.set(fe.identHash,fe),t.set(fe.descriptorHash,le.locatorHash),e.set(fe.descriptorHash,fe),i.set(le.locatorHash,le),T.push([Qe,fe,le])}),ue.push(()=>{var Y;ie=new Map;for(let he of le.peerDependencies.values()){let re=_.dependencies.get(he.identHash);if(!re&&SC(Z,he)&&(W.identHash===Z.identHash?re=W:(re=Zt(Z,W.range),e.set(re.descriptorHash,re),t.set(re.descriptorHash,Z.locatorHash),a.delete(re.descriptorHash))),(!re||re.range==="missing:")&&le.dependencies.has(he.identHash)){le.peerDependencies.delete(he.identHash);continue}re||(re=Zt(he,"missing:")),le.dependencies.set(re.identHash,re),_A(re)&&Tc(h,re.descriptorHash).add(le.locatorHash),g.set(re.identHash,re),re.range==="missing:"&&Ge.add(re.identHash),ie.set(he.identHash,(Y=A.get(he.identHash))!=null?Y:le.locatorHash)}le.dependencies=new Map(Bn(le.dependencies,([he,re])=>Ot(re)))}),we.push(()=>{if(!i.has(le.locatorHash))return;let Y=c.get(Qe.locatorHash);typeof Y=="number"&&Y>=2&&B();let he=c.get(Qe.locatorHash),re=typeof he<"u"?he+1:1;c.set(Qe.locatorHash,re),D(fe,le,ie,{top:ae,optional:se}),c.set(Qe.locatorHash,re-1)}),Le.push(()=>{let Y=_.dependencies.get(Te.identHash);if(typeof Y>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let he=t.get(Y.descriptorHash);if(typeof he>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(Tc(C,he).add(Z.locatorHash),!!i.has(le.locatorHash)){for(let re of le.peerDependencies.values()){let me=ie.get(re.identHash);if(typeof me>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Df(kf(p,me),Ot(re)).push(le.locatorHash)}for(let re of Ge)le.dependencies.delete(re)}})}for(let Te of[...N,...ue])Te();let Pe;do{Pe=!0;for(let[Te,se,Ae]of T){let Qe=kf(f,Te.locatorHash),fe=$i(...[...Ae.dependencies.values()].map(Y=>{let he=Y.range!=="missing:"?t.get(Y.descriptorHash):"missing:";if(typeof he>"u")throw new Error(`Assertionfailed:Expectedtheresolutionfor${tr(r.configuration,Y)}tohavebeenregistered`);return he===ae?`${he}(top)`:he}),se.identHash),le=Qe.get(fe);if(typeof le>"u"){Qe.set(fe,se);continue}if(le===se)continue;i.delete(Ae.locatorHash),e.delete(se.descriptorHash),t.delete(se.descriptorHash),n.delete(Ae.locatorHash);let Ge=h.get(se.descriptorHash)||[],ie=[_.locatorHash,...Ge];h.delete(se.descriptorHash);for(let Y of ie){let he=i
Tryrunningthecommandagainwiththepackagenameprefixed:${ee.pretty(t,"yarn add",Pi.CODE)}${ee.pretty(t,P.makeDescriptor(P.makeIdent(null,"my-package"),`${D[0]}...`),Pi.DESCRIPTOR)}`);if(!v)throw new vr.UsageError(`The${ee.pretty(t,B,Pi.CODE)}stringdidn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let L=RJe(n,v,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(L.map(async j=>{let $=await cE(v,{project:i,workspace:n,cache:s,target:j,modifier:a,strategies:l,maxResults:c});return{request:v,suggestedDescriptors:$,target:j}}))})).then(B=>B.flat()),g=await ta.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async B=>{for(let{request:v,suggestedDescriptors:{suggestions:D,rejections:L}}of u)if(D.filter(j=>j.descriptor!==null).length===0){let[j]=L;if(typeof j>"u")throw new Error("Assertion failed: Expected an error to have been set");i.configuration.get("enableNetwork")?B.reportError(27,`${P.prettyDescriptor(t,v)} can'tberesolvedtoasatisfyingrange`):B.reportError(27,`${P.prettyDescriptor(t,v)}can'tberesolvedtoasatisfyingrange(note:networkresolutionhasbeendisabled)`),B.reportSeparator(),B.reportExceptionOnce(j)}});if(g.hasErrors())return g.exitCode();let f=!1,h=[],p=[];for(let{suggestedDescriptors:{suggestions:B},target:v}of u){let D,L=B.filter(V=>V.descriptor!==null),H=L[0].descriptor,j=L.every(V=>P.areDescriptorsEqual(V.descriptor,H));L.length===1||j?D=H:(f=!0,{answer:D}=await(0,woe.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:B.map(({descriptor:V,name:W,reason:Z})=>V?{name:W,hint:Z,descriptor:V}:{name:W,hint:Z,disabled:!0}),onCancel:()=>process.exit(130),result(V){return this.find(V,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let $=n.manifest[v].get(D.identHash);(typeof $>"u"||$.descriptorHash!==D.descriptorHash)&&(n.manifest[v].set(D.identHash,D),this.optional&&(v==="dependencies"?n.manifest.ensureDependencyMeta({...D,range:"unknown"}).optional=!0:v==="peerDependencies"&&(n.manifest.ensurePeerDependencyMeta({...D,range:"unknown"}).optional=!0)),typeof $>"u"?h.push([n,v,D,l]):p.push([n,v,$,D]))}return await t.triggerMultipleHooks(B=>B.afterWorkspaceDependencyAddition,h),await t.triggerMultipleHooks(B=>B.afterWorkspaceDependencyReplacement,p),f&&this.context.stdout.write(`
`),(await Ke.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async B=>{await i.install({cache:s,report:B,mode:this.mode})})).exitCode()}};Qu.paths=[["add"]],Qu.usage=vr.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 latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","
`),0}return(await Ke.start({configuration:t,json:this.json,stdout:this.context.stdout},async o=>{let a=await Jt.getPackageAccessibleBinaries(n,{project:i}),c=Array.from(a.keys()).reduce((u,g)=>Math.max(u,g.length),0);for(let[u,[g,f]]of a)o.reportJson({name:u,source:P.stringifyIdent(g),path:f});if(this.verbose)for(let[u,[g]]of a)o.reportInfo(null,`${u.padEnd(c," ")}${P.prettyLocator(t,g)}`);else for(let u of a.keys())o.reportInfo(null,u)})).exitCode()}};bu.paths=[["bin"]],bu.usage=wl.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"]]});var uE=ne(Xe()),Su=class extends ve{constructor(){super(...arguments);this.mirror=uE.Option.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=uE.Option.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=await kt.find(t);return(await Ke.start({configuration:t,stdout:this.context.stdout},async()=>{let s=(this.all||this.mirror)&&i.mirrorCwd!==null,o=!this.mirror;s&&(await M.removePromise(i.mirrorCwd),await t.triggerHook(a=>a.cleanGlobalArtifacts,t)),o&&await M.removePromise(i.cwd)})).exitCode()}};Su.paths=[["cache","clean"],["cache","clear"]],Su.usage=uE.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"]]});var Bl=ne(Xe()),Qoe=ne(RQ()),EO=J("util"),vu=class extends ve{constructor(){super(...arguments);this.json=Bl.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=Bl.Option.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=Bl.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*/,"");if(typeof t.settings.get(i)>"u")throw new Bl.UsageError(`Couldn'tfindaconfigurationsettingsnamed"${i}"`);let o=t.getSpecial(i,{hideSecrets:!this.unsafe,getNativePaths:!0}),a=Ee.convertMapsToIndexableObjects(o),l=n?(0,Qoe.default)(a,n):a,c=await Ke.start({configuration:t,includeFooter:!1,json:this.json,stdout:this.context.stdout},async u=>{u.reportJson(l)});if(!this.json){if(typeof l=="string")return this.context.stdout.write(`${l}
`,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"]]});var co=ne(Xe()),Tae=ne(bO()),Oae=ne(RQ()),Mae=ne(Lae()),SO=J("util"),xu=class extends ve{constructor(){super(...arguments);this.json=co.Option.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=co.Option.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=co.Option.String();this.value=co.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=()=>{if(!t.projectCwd)throw new co.UsageError("This command must be run from within a project folder");return t.projectCwd},n=this.name.replace(/[.[].*$/,""),s=this.name.replace(/^[^.[]*\.?/,"");if(typeof t.settings.get(n)>"u")throw new co.UsageError(`Couldn't find a configuration settings named "${n}"`);if(n==="enableStrictSettings")throw new co.UsageError("This setting only affects the file it'sin,andthuscannotbesetfromtheCLI");let a=this.json?JSON.parse(this.value):this.value;await(this.home?p=>Ie.updateHomeConfiguration(p):p=>Ie.updateConfiguration(i(),p))(p=>{if(s){let C=(0,Tae.default)(p);return(0,Mae.default)(C,this.name,a),C}else return{...p,[n]:a}});let u=(await Ie.find(this.context.cwd,this.context.plugins)).getSpecial(n,{hideSecrets:!0,getNativePaths:!0}),g=Ee.convertMapsToIndexableObjects(u),f=s?(0,Oae.default)(g,s):g;return(await Ke.start({configuration:t,includeFooter:!1,stdout:this.context.stdout},async p=>{SO.inspect.styles.name="cyan",p.reportInfo(0,`Successfully set ${this.name} to ${(0,SO.inspect)(f,{depth:1/0,colors:t.get("enableColors"),compact:!1})}`)})).exitCode()}};xu.paths=[["config","set"]],xu.usage=co.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"`]]});var Ql=ne(Xe()),Wae=ne(bO()),zae=ne(Pm()),Vae=ne(Jae()),Pu=class extends ve{constructor(){super(...arguments);this.home=Ql.Option.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Ql.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=()=>{if(!t.projectCwd)throw new Ql.UsageError("This command must be run from within a project folder");return t.projectCwd},n=this.name.replace(/[.[].*$/,""),s=this.name.replace(/^[^.[]*\.?/,"");if(typeof t.settings.get(n)>"u")throw new Ql.UsageError(`Couldn't find a configuration settings named "${n}"`);let a=this.home?c=>Ie.updateHomeConfiguration(c):c=>Ie.updateConfiguration(i(),c);return(await Ke.start({configuration:t,includeFooter:!1,stdout:this.context.stdout},async c=>{let u=!1;await a(g=>{if(!(0,zae.default)(g,this.name))return c.reportWarning(0,`Configuration doesn'tcontainsetting${this.name};thereisnothingtounset`),u=!0,g;let f=s?(0,Wae.default)(g):{...g};return(0,Vae.default)(f,this.name),f}),u||c.reportInfo(0,`Successfullyunset${this.name}`)})).exitCode()}};Pu.paths=[["config","unset"]],Pu.usage=Ql.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"]]});var lp=ne(Xe()),vO=J("util"),Du=class extends ve{constructor(){super(...arguments);this.verbose=lp.Option.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=lp.Option.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=lp.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Ke.start({configuration:t,json:this.json,stdout:this.context.stdout},async n=>{if(t.invalid.size>0&&!this.json){for(let[s,o]of t.invalid)n.reportError(34,`Invalidconfigurationkey"${s}"in${o}`);n.reportSeparator()}if(this.json){let s=Ee.sortMap(t.settings.keys(),o=>o);for(let o of s){let a=t.settings.get(o),l=t.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),c=t.sources.get(o);this.verbose?n.reportJson({key:o,effective:l,source:c}):n.reportJson({key:o,effective:l,source:c,...a})}}else{let s=Ee.sortMap(t.settings.keys(),l=>l),o=s.reduce((l,c)=>Math.max(l,c.length),0),a={breakLength:1/0,colors:t.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let l=s.map(u=>{let g=t.settings.get(u);if(!g)throw new Error(`Assertionfailed:Thissettings("${u}")shouldhavebeenregistered`);let f=this.why?t.sources.get(u)||"<default>":g.description;return[u,f]}),c=l.reduce((u,[,g])=>Math.max(u,g.length),0);for(let[u,g]of l)n.reportInfo(null,`${u.padEnd(o," ")}${g.padEnd(c," ")}${(0,vO.inspect)(t.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),a)}`)}else for(let l of s)n.reportInfo(null,`${l.padEnd(o," ")}${(0,vO.inspect)(t.getSpecial(l,{hideSecrets:!0,getNativePaths:!0}),a)}`)}})).exitCode()}};Du.paths=[["config"]],Du.usage=lp.Command.Usage({description:"display the current configuration",details:`
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});var rb=ne(Xe()),fp=ne(ns()),Fu=class extends ve{constructor(){super(...arguments);this.hash=rb.Option.String({required:!1,validator:fp.applyCascade(fp.isString(),[fp.matchesRegExp(/^p[0-9a-f]{5}$/)])})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i}=await He.find(t,this.context.cwd);return await i.restoreInstallState({restoreResolutions:!1}),await i.applyLightResolution(),typeof this.hash<"u"?await M3e(this.hash,i,{stdout:this.context.stdout}):(await Ke.start({configuration:t,stdout:this.context.stdout,includeFooter:!1},async s=>{var a;let o=[([,l])=>P.stringifyLocator(i.storedPackages.get(l.subject)),([,l])=>P.stringifyIdent(l.requested)];for(let[l,c]of Ee.sortMap(i.peerRequirements,o)){let u=i.storedPackages.get(c.subject);if(typeof u>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let g=i.storedPackages.get(c.rootRequester);if(typeof g>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let f=(a=u.dependencies.get(c.requested.identHash))!=null?a:null,h=ee.pretty(t,l,ee.Type.CODE),p=P.prettyLocator(t,u),C=P.prettyIdent(t,c.requested),w=P.prettyIdent(t,g),B=c.allRequesters.length-1,v=`descendant${B===1?"":"s"}`,D=B>0?`and${B}${v}`:"",L=f!==null?"provides":"doesn't provide";s.reportInfo(null,`${h}\u2192${p}${L}${C}to${w}${D}`)}})).exitCode()}};Fu.paths=[["explain","peer-requirements"]],Fu.usage=rb.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 M3e(r,e,t){let{configuration:i}=e,n=e.peerRequirements.get(r);if(typeof n>"u")throw new Error(`NopeerDependencyrequirementsfoundforhash:"${r}"`);return(await Ke.start({configuration:i,stdout:t.stdout,includeFooter:!1},async o=>{var B,v;let a=e.storedPackages.get(n.subject);if(typeof a>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let l=e.storedPackages.get(n.rootRequester);if(typeof l>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let c=(B=a.dependencies.get(n.requested.identHash))!=null?B:null,u=c!==null?e.storedResolutions.get(c.descriptorHash):null;if(typeof u>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let g=u!==null?e.storedPackages.get(u):null;if(typeof g>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let f=[...n.allRequesters.values()].map(D=>{let L=e.storedPackages.get(D);if(typeof L>"u")throw new Error("Assertion failed: Expected the package to be registered");let H=P.devirtualizeLocator(L),j=e.storedPackages.get(H.locatorHash);if(typeof j>"u")throw new Error("Assertion failed: Expected the package to be registered");let $=j.peerDependencies.get(n.requested.identHash);if(typeof $>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:L,peerDependency:$}});if(g!==null){let D=f.every(({peerDependency:L})=>vt.satisfiesWithPrereleases(g.version,L.range));o.reportInfo(0,`${P.prettyLocator(i,a)}provides${P.prettyLocator(i,g)}withversion${P.prettyReference(i,(v=g.version)!=null?v:"<missing>")},which${D?"satisfies":"doesn't satisfy"}thefollowingrequirements:`)}else o.reportInfo(0,`${P.prettyLocator(i,a)}doesn't provide ${P.prettyIdent(i,n.requested)}, breaking the following requirements:`);o.reportSeparator();let h=ee.mark(i),p=[];for(let{pkg:D,peerDependency:L}of Ee.sortMap(f,H=>P.stringifyLocator(H.pkg))){let j=(g!==null?vt.satisfiesWithPrereleases(g.version,L.range):!1)?h.Check:h.Cross;p.push({stringifiedLocator:P.stringifyLocator(D),prettyLocator:P.prettyLocator(i,D),prettyRange:P.prettyRange(i,L.range),mark:j})}let C=Math.max(...p.map(({stringifiedLocator:D})=>D.length)),w=Math.max(...p.map(({prettyRange:D})=>D.length));for(let{stringifiedLocator:D,prettyLocator:L,prettyRange:H,mark:j}of Ee.sortMap(p,({stringifiedLocator:$})=>$))o.reportInfo(null,`${L.padEnd(C+(L.length-D.length)," ")} \u2192 ${H.padEnd(w," ")} ${j}`);p.length>1&&(o.reportSeparator(),o.reportInfo(0,`Note: these requirements start with ${P.prettyLocator(e.configuration,l)}`))})).exitCode()}var CE=ne(Xe()),hp=ne(ns());var na=ne(Xe()),$ae=ne($r()),Nu=class extends ve{constructor(){super(...arguments);this.onlyIfNeeded=na.Option.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn'talreadylocked"});this.version=na.Option.String()}async execute(){var o;let t=await Ie.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&t.get("yarnPath")){let a=t.sources.get("yarnPath");if(!a)throw new Error("Assertionfailed:Expected'yarnPath'tohaveasource");let l=(o=t.projectCwd)!=null?o:t.startingCwd;if(x.contains(l,a))return 0}let i=()=>{if(typeof Or>"u")throw new na.UsageError("The--installflagcanonlybeusedwithoutexplicitversionspecifierfromtheYarnCLI");return`file://${process.argv[1]}`},n;if(this.version==="self")n=i();else if(this.version==="latest"||this.version==="berry"||this.version==="stable")n=`https://repo.yarnpkg.com/${await dE(t,"stable")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="canary")n=`https://repo.yarnpkg.com/${await dE(t,"canary")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="classic")n="https://classic.yarnpkg.com/latest.js";else if(this.version.match(/^https?:/))n=this.version;else if(this.version.match(/^\.{0
`;await M.changeFilePromise(g,f,{automaticNewlines:!0})}function eAe(r){return Ct[uy(r)]}var U3e=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function H3e(r){let t=`https://repo.yarnpkg.com/${Ee.isTaggedYarnVersion(Or)?Or:await dE(r,"canary")}/packages/gatsby/content/advanced/error-codes.md`,i=await Vt.get(t,{configuration:r});return new Map(Array.from(i.toString().matchAll(U3e),({groups:n})=>{if(!n)throw new Error("Assertion failed: Expected the match to have been successful");let s=eAe(n.code);if(n.name!==s)throw new Error(`Assertion failed: Invalid error code data: Expected "${n.name}" to be named "${s}"`);return[n.code,n.details]}))}var Lu=class extends ve{constructor(){super(...arguments);this.code=CE.Option.String({required:!1,validator:hp.applyCascade(hp.isString(),[hp.matchesRegExp(/^YN[0-9]{4}$/)])});this.json=CE.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let i=eAe(this.code),n=ee.pretty(t,i,ee.Type.CODE),s=this.cli.format().header(`${this.code} - ${n}`),a=(await H3e(t)).get(this.code),l=typeof a<"u"?ee.jsonOrPretty(this.json,t,ee.tuple(ee.Type.MARKDOWN,{text:a,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
`)}else{let i={children:Ee.mapAndFilter(Object.entries(Ct),([n,s])=>Number.isNaN(Number(n))?Ee.mapAndFilter.skip:{label:MA(Number(n)),value:ee.tuple(ee.Type.CODE,s)})};Vn.emitTree(i,{configuration:t,stdout:this.context.stdout,json:this.json})}}};Lu.paths=[["explain"]],Lu.usage=CE.Command.Usage({description:"explain an error code",details:`
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});var an=ne(Xe()),tAe=ne(wn()),Tu=class extends ve{constructor(){super(...arguments);this.all=an.Option.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=an.Option.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=an.Option.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=an.Option.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=an.Option.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=an.Option.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=an.Option.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=an.Option.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=an.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=an.Option.Rest()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n&&!this.all)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState();let o=new Set(this.extra);this.cache&&o.add("cache"),this.dependents&&o.add("dependents"),this.manifest&&o.add("manifest");let a=(L,{recursive:H})=>{let j=L.anchoredLocator.locatorHash,$=new Map,V=[j];for(;V.length>0;){let W=V.shift();if($.has(W))continue;let Z=i.storedPackages.get(W);if(typeof Z>"u")throw new Error("Assertion failed: Expected the package to be registered");if($.set(W,Z),P.isVirtualLocator(Z)&&V.push(P.devirtualizeLocator(Z).locatorHash),!(!H&&W!==j))for(let A of Z.dependencies.values()){let ae=i.storedResolutions.get(A.descriptorHash);if(typeof ae>"u")throw new Error("Assertion failed: Expected the resolution to be registered");V.push(ae)}}return $.values()},l=({recursive:L})=>{let H=new Map;for(let j of i.workspaces)for(let $ of a(j,{recursive:L}))H.set($.locatorHash,$);return H.values()},c=({all:L,recursive:H})=>L&&H?i.storedPackages.values():L?l({recursive:H}):a(n,{recursive:H}),u=({all:L,recursive:H})=>{let j=c({all:L,recursive:H}),$=this.patterns.map(Z=>{let A=P.parseLocator(Z),ae=tAe.default.makeRe(P.stringifyIdent(A)),ge=P.isVirtualLocator(A),_=ge?P.devirtualizeLocator(A):A;return T=>{let N=P.stringifyIdent(T);if(!ae.test(N))return!1;if(A.reference==="unknown")return!0;let ue=P.isVirtualLocator(T),we=ue?P.devirtualizeLocator(T):T;return!(ge&&ue&&A.reference!==T.reference||_.reference!==we.reference)}}),V=Ee.sortMap([...j],Z=>P.stringifyLocator(Z));return{selection:V.filter(Z=>$.length===0||$.some(A=>A(Z))),sortedLookup:V}},{selection:g,sortedLookup:f}=u({all:this.all,recursive:this.recursive});if(g.length===0)throw new an.UsageError("No package matched your request");let h=new Map;if(this.dependents)for(let L of f)for(let H of L.dependencies.values()){let j=i.storedResolutions.get(H.descriptorHash);if(typeof j>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ee.getArrayWithDefault(h,j).push(L)}let p=new Map;for(let L of f){if(!P.isVirtualLocator(L))continue;let H=P.devirtualizeLocator(L);Ee.getArrayWithDefault(p,H.locatorHash).push(L)}let C={},w={children:C},B=t.makeFetcher(),v={project:i,fetcher:B,cache:s,checksums:i.storedChecksums,report:new ni,cacheOptions:{skipIntegrityCheck:!0},skipIntegrityCheck:!0},D=[async(L,H,j)=>{var W,Z;if(!H.has("manifest"))return;let $=await B.fetch(L,v),V;try{V=await nt.find($.prefixPath,{baseFs:$.packageFs})}finally{(W=$.releaseFs)==null||W.call($)}j("Manifest",{License:ee.tuple(ee.Type.NO_HINT,V.license),Homepage:ee.tuple(ee.Type.URL,(Z=V.raw.homepage)!=null?Z:null)})},async(L,H,j)=>{var ae;if(!H.has("cache"))return;let $={mockedPa
-**Resolution:**Firstthepackagemanagerwillresolveyourdependencies.Theexactwayadependencyversionisprivilegedoveranotherisn't standardized outside of the regular semver guarantees. If a package doesn'tresolvetowhatyouwouldexpect,checkthatalldependenciesarecorrectlydeclared(alsocheckourwebsiteformoreinformation:).
-**Fetch:**Thenwedownloadallthedependenciesifneeded,andmakesurethatthey'reallstoredwithinourcache(checkthevalueof\`cacheFolder\` in \`yarn config\` to see where the cache files are stored).
-**Build:**Oncethedependencytreehasbeenwrittenonthedisk,thepackagemanagerwillnowbefreetorunthebuildscriptsforallpackagesthatmightneedit,inatopologicalordercompatiblewiththewaytheydependononeanother.Seehttps://yarnpkg.com/advanced/lifecycle-scripts for detail.
Ifthe\`--immutable\` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the \`immutablePatterns\` configuration setting). For backward compatibility we offer an alias under the name of \`--frozen-lockfile\`, but it will be removed in a later release.
Ifthe\`--immutable-cache\` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).
Ifthe\`--check-cache\` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.
Ifthe\`--inline-builds\` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.
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 latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
-\`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
`,examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var G3e="|||||||",Y3e=">>>>>>>",j3e="=======",iAe="<<<<<<<";async function q3e(r,e){if(!r.projectCwd)return!1;let t=x.join(r.projectCwd,r.get("lockfileFilename"));if(!await M.existsPromise(t))return!1;let i=await M.readFilePromise(t,"utf8");if(!i.includes(iAe))return!1;if(e)throw new ot(47,"Cannot autofix a lockfile when running an immutable install");let[n,s]=J3e(i),o,a;try{o=Qi(n),a=Qi(s)}catch{throw new ot(46,"The individual variants of the lockfile failed to parse")}let l={...o,...a};for(let[c,u]of Object.entries(l))typeof u=="string"&&delete l[c];return await M.changeFilePromise(t,ba(l),{automaticNewlines:!0}),!0}function J3e(r){let e=[[],[]],t=r.split(/\r?\n/g),i=!1;for(;t.length>0;){let n=t.shift();if(typeof n>"u")throw new Error("Assertion failed: Some lines should remain");if(n.startsWith(iAe)){for(;t.length>0;){let s=t.shift();if(typeof s>"u")throw new Error("Assertion failed: Some lines should remain");if(s===j3e){i=!1;break}else if(i||s.startsWith(G3e)){i=!0;continue}else e[0].push(s)}for(;t.length>0;){let s=t.shift();if(typeof s>"u")throw new Error("Assertion failed: Some lines should remain");if(s.startsWith(Y3e))break;e[1].push(s)}}else e[0].push(n),e[1].push(n)}return[e[0].join(`
`)]}var ks=ne(Xe()),Mu=class extends ve{constructor(){super(...arguments);this.all=ks.Option.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target project to the current one"});this.private=ks.Option.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target project to the current one"});this.relative=ks.Option.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destination=ks.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState({restoreResolutions:!1});let o=x.resolve(this.context.cwd,K.toPortablePath(this.destination)),a=await Ie.find(o,this.context.plugins,{useRc:!1,strict:!1}),{project:l,workspace:c}=await He.find(a,o);if(i.cwd===l.cwd)throw new ks.UsageError("Invalid destination; Can't link the project to itself");if(!c)throw new ct(l.cwd,o);let u=i.topLevelWorkspace,g=[];if(this.all){for(let h of l.workspaces)h.manifest.name&&(!h.manifest.private||this.private)&&g.push(h);if(g.length===0)throw new ks.UsageError("No workspace found to be linked in the target project")}else{if(!c.manifest.name)throw new ks.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(c.manifest.private&&!this.private)throw new ks.UsageError("The target workspace is marked private - use the --private flag to link it anyway");g.push(c)}for(let h of g){let p=P.stringifyIdent(h.locator),C=this.relative?x.relative(i.cwd,h.cwd):h.cwd;u.manifest.resolutions.push({pattern:{descriptor:{fullName:p}},reference:`portal:${C}`})}return(await Ke.start({configuration:t,stdout:this.context.stdout},async h=>{await i.install({cache:s,report:h})})).exitCode()}};Mu.paths=[["link"]],Mu.usage=ks.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 a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var nb=ne(Xe()),Ku=class extends ve{constructor(){super(...arguments);this.args=nb.Option.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};Ku.paths=[["node"]],Ku.usage=nb.Command.Usage({description:"run node with the hook already setup",details:`
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});var AA=ne(Xe()),lAe=J("os");var sa=ne(Xe()),nAe=J("os");var sb=ne(Xe()),W3e="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Hu(r){let e=await Vt.get(W3e,{configuration:r});return Qi(e.toString())}var Uu=class extends ve{constructor(){super(...arguments);this.json=sb.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins);return(await Ke.start({configuration:t,json:this.json,stdout:this.context.stdout},async n=>{let s=await Hu(t);for(let[o,{experimental:a,...l}]of Object.entries(s)){let c=o;a&&(c+=" [experimental]"),n.reportJson({name:o,experimental:a,...l}),n.reportInfo(null,c)}})).exitCode()}};Uu.paths=[["plugin","list"]],Uu.usage=sb.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 z3e=/^[0-9]+$/;function sAe(r){return z3e.test(r)?`pull/${r}/head`:r}var V3e=({repository:r,branch:e},t)=>[["git","init",K.fromPortablePath(t)],["git","remote","add","origin",r],["git","fetch","origin","--depth=1",sAe(e)],["git","reset","--hard","FETCH_HEAD"]],X3e=({branch:r})=>[["git","fetch","origin","--depth=1",sAe(r),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],_3e=({plugins:r,noMinify:e},t)=>[["yarn","build:cli",...new Array().concat(...r.map(i=>["--plugin",x.resolve(t,i)])),...e?["--no-minify"]:[],"|"]],Gu=class extends ve{constructor(){super(...arguments);this.installPath=sa.Option.String("--path",{description:"The path where the repository should be cloned to"});this.repository=sa.Option.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=sa.Option.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=sa.Option.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=sa.Option.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=sa.Option.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=sa.Option.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i}=await He.find(t,this.context.cwd),n=typeof this.installPath<"u"?x.resolve(this.context.cwd,K.toPortablePath(this.installPath)):x.resolve(K.toPortablePath((0,nAe.tmpdir)()),"yarnpkg-sources",gi.makeHash(this.repository).slice(0,6));return(await Ke.start({configuration:t,stdout:this.context.stdout},async o=>{await RO(this,{configuration:t,report:o,target:n}),o.reportSeparator(),o.reportInfo(0,"Building a fresh bundle"),o.reportSeparator(),await mE(_3e(this,n),{configuration:t,context:this.context,target:n}),o.reportSeparator();let a=x.resolve(n,"packages/yarnpkg-cli/bundles/yarn.js"),l=await M.readFilePromise(a);await kO(t,"sources",l,{report:o}),this.skipPlugins||await Z3e(this,{project:i,report:o,target:n})})).exitCode()}};Gu.paths=[["set","version","from","sources"]],Gu.usage=sa.Command.Usage({description:"build Yarn from master",details:`
`,examples:[["Build Yarn from master","$0 set version from sources"]]});async function mE(r,{configuration:e,context:t,target:i}){for(let[n,...s]of r){let o=s[s.length-1]==="|";if(o&&s.pop(),o)await mr.pipevp(n,s,{cwd:i,stdin:t.stdin,stdout:t.stdout,stderr:t.stderr,strict:!0});else{t.stdout.write(`${ee.pretty(e,`$${[n,...s].join(" ")}`,"grey")}
`);try{await mr.execvp(n,s,{cwd:i,strict:!0})}catch(a){throw t.stdout.write(a.stdout||a.stack),a}}}}async function RO(r,{configuration:e,report:t,target:i}){let n=!1;if(!r.force&&M.existsSync(x.join(i,".git"))){t.reportInfo(0,"Fetching the latest commits"),t.reportSeparator();try{await mE(X3e(r),{configuration:e,context:r.context,target:i}),n=!0}catch{t.reportSeparator(),t.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}n||(t.reportInfo(0,"Cloning the remote repository"),t.reportSeparator(),await M.removePromise(i),await M.mkdirPromise(i,{recursive:!0}),await mE(V3e(r,i),{configuration:e,context:r.context,target:i}))}async function Z3e(r,{project:e,report:t,target:i}){let n=await Hu(e.configuration),s=new Set(Object.keys(n));for(let o of e.configuration.plugins.keys())!s.has(o)||await FO(o,r,{project:e,report:t,target:i})}var ob=ne(Xe()),oAe=ne($r()),aAe=J("url"),AAe=J("vm");var Yu=class extends ve{constructor(){super(...arguments);this.name=ob.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins);return(await Ke.start({configuration:t,stdout:this.context.stdout},async n=>{let{project:s}=await He.find(t,this.context.cwd),o,a;if(this.name.match(/^\.{0,2}[\\/]/)||K.isAbsolute(this.name)){let l=x.resolve(this.context.cwd,K.toPortablePath(this.name));n.reportInfo(0,`Reading${ee.pretty(t,l,ee.Type.PATH)}`),o=x.relative(s.cwd,l),a=await M.readFilePromise(l)}else{let l;if(this.name.match(/^https?:/)){try{new aAe.URL(this.name)}catch{throw new ot(52,`Pluginspecifier"${this.name}"isneitherapluginnamenoravalidurl`)}o=this.name,l=this.name}else{let c=P.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(c.reference!=="unknown"&&!oAe.default.valid(c.reference))throw new ot(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let u=P.stringifyIdent(c),g=await Hu(t);if(!Object.prototype.hasOwnProperty.call(g,u))throw new ot(51,`Couldn'tfindapluginnamed"${u}"ontheremoteregistry.Notethatonlythepluginsreferencedonourwebsite(https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);o=u,l=g[u].url,c.reference!=="unknown"?l=l.replace(/\/master\//,`/${u}/${c.reference}/`):Or!==null&&(l=l.replace(/\/master\//,`/@yarnpkg/cli/${Or}/`))}n.reportInfo(0,`Downloading ${ee.pretty(t,l,"green")}`),a=await Vt.get(l,{configuration:t})}await NO(o,a,{project:s,report:n})})).exitCode()}};Yu.paths=[["plugin","import"]],Yu.usage=ob.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 NO(r,e,{project:t,report:i}){let{configuration:n}=t,s={},o={exports:s};(0,AAe.runInNewContext)(e.toString(),{module:o,exports:s});let a=o.exports.name,l=`.yarn/plugins/${a}.cjs`,c=x.resolve(t.cwd,l);i.reportInfo(0,`Savingthenewpluginin${ee.pretty(n,l,"magenta")}`),await M.mkdirPromise(x.dirname(c),{recursive:!0}),await M.writeFilePromise(c,e);let u={path:l,spec:r};await Ie.updateConfiguration(t.cwd,g=>{let f=[],h=!1;for(let p of g.plugins||[]){let C=typeof p!="string"?p.path:p,w=x.resolve(t.cwd,K.toPortablePath(C)),{name:B}=Ee.dynamicRequire(w);B!==a?f.push(p):(f.push(u),h=!0)}return h||f.push(u),{...g,plugins:f}})}var $3e=({pluginName:r,noMinify:e},t)=>[["yarn",`build:${r}`,...e?["--no-minify"]:[],"|"]],ju=class extends ve{constructor(){super(...arguments);this.installPath=AA.Option.String("--path",{description:"The path where the repository should be cloned to"});this.repository=AA.Option.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=AA.Option.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=AA.Option.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=AA.Option.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=AA.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=typeof this.installPath<"u"?x.resolve(this.context.cwd,K.toPortablePath(this.installPath)):x.resolve(K.toPortablePath((0,lAe.tmpdir)()),"yarnpkg-sources",gi.makeHash(this.repository).slice(0,6));return(await Ke.start({configuration:t,stdout:this.context.stdout},async s=>{let{project:o}=await He.find(t,this.context.cwd),a=P.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),l=P.stringifyIdent(a),c=await Hu(t);if(!Object.prototype.hasOwnProperty.call(c,l))throw new ot(51,`Couldn'tfindapluginnamed"${l}"ontheremoteregistry.Notethatonlythepluginsreferencedonourwebsite(https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let u=l;await RO(this,{configuration:t,report:s,target:i}),await FO(u,this,{project:o,report:s,target:i})})).exitCode()}};ju.paths=[["plugin","import","from","sources"]],ju.usage=AA.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"]]});var ab=ne(Xe()),Ju=class extends ve{constructor(){super(...arguments);this.json=ab.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins);return(await Ke.start({configuration:t,json:this.json,stdout:this.context.stdout},async n=>{for(let s of t.plugins.keys()){let o=this.context.plugins.plugins.has(s),a=s;o&&(a+=" [builtin]"),n.reportJson({name:s,builtin:o}),n.reportInfo(null,`${a}`)}})).exitCode()}};Ju.paths=[["plugin","runtime"]],Ju.usage=ab.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});var Ab=ne(Xe()),Wu=class extends ve{constructor(){super(...arguments);this.idents=Ab.Option.Rest()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);let o=new Set;for(let l of this.idents)o.add(P.parseIdent(l).identHash);if(await i.restoreInstallState({restoreResolutions:!1}),await i.resolveEverything({cache:s,report:new ni}),o.size>0)for(let l of i.storedPackages.values())o.has(l.identHash)&&i.storedBuildState.delete(l.locatorHash);else i.storedBuildState.clear();return(await Ke.start({configuration:t,stdout:this.context.stdout,includeLogs:!this.context.quiet},async l=>{await i.install({cache:s,report:l})})).exitCode()}};Wu.paths=[["rebuild"]],Wu.usage=Ab.Command.Usage({description:"rebuild the project's native packages",details:`
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});var Sl=ne(Xe()),LO=ne(wn()),cAe=ne(ns());var zu=class extends ve{constructor(){super(...arguments);this.all=Sl.Option.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=Sl.Option.String("--mode",{description:"Change what artifacts installs generate",validator:cAe.isEnum(Xn)});this.patterns=Sl.Option.Rest()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState({restoreResolutions:!1});let o=this.all?i.workspaces:[n],a=["dependencies","devDependencies","peerDependencies"],l=[],c=!1,u=[];for(let p of this.patterns){let C=!1,w=P.parseIdent(p);for(let B of o){let v=[...B.manifest.peerDependenciesMeta.keys()];for(let D of(0,LO.default)(v,p))B.manifest.peerDependenciesMeta.delete(D),c=!0,C=!0;for(let D of a){let L=B.manifest.getForScope(D),H=[...L.values()].map(j=>P.stringifyIdent(j));for(let j of(0,LO.default)(H,P.stringifyIdent(w))){let{identHash:$}=P.parseIdent(j),V=L.get($);if(typeof V>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");B.manifest[D].delete($),u.push([B,D,V]),c=!0,C=!0}}}C||l.push(p)}let g=l.length>1?"Patterns":"Pattern",f=l.length>1?"don't":"doesn't",h=this.all?"any":"this";if(l.length>0)throw new Sl.UsageError(`${g}${ee.prettyList(t,l,Pi.CODE)}${f}matchanypackagesreferencedby${h}workspace`);return c?(await t.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,u),(await Ke.start({configuration:t,stdout:this.context.stdout},async C=>{await i.install({cache:s,report:C,mode:this.mode})})).exitCode()):0}};zu.paths=[["remove"]],zu.usage=Sl.Command.Usage({description:"remove dependencies from the project",details:`
-\`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
-\`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
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}'"]]});var uAe=J("util"),dp=class extends ve{async execute(){let e=await Ie.find(this.context.cwd,this.context.plugins),{project:t,workspace:i}=await He.find(e,this.context.cwd);if(!i)throw new ct(t.cwd,this.context.cwd);return(await Ke.start({configuration:e,stdout:this.context.stdout},async s=>{let o=i.manifest.scripts,a=Ee.sortMap(o.keys(),u=>u),l={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},c=a.reduce((u,g)=>Math.max(u,g.length),0);for(let[u,g]of o.entries())s.reportInfo(null,`${u.padEnd(c," ")}${(0,uAe.inspect)(g,l)}`)})).exitCode()}};dp.paths=[["run"]];var qi=ne(Xe()),Vu=class extends ve{constructor(){super(...arguments);this.inspect=qi.Option.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=qi.Option.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=qi.Option.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=qi.Option.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.silent=qi.Option.Boolean("--silent",{hidden:!0});this.scriptName=qi.Option.String();this.args=qi.Option.Proxy()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n,locator:s}=await He.find(t,this.context.cwd);await i.restoreInstallState();let o=this.topLevel?i.topLevelWorkspace.anchoredLocator:s;if(!this.binariesOnly&&await Jt.hasPackageScript(o,this.scriptName,{project:i}))return await Jt.executePackageScript(o,this.scriptName,this.args,{project:i,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let a=await Jt.getPackageAccessibleBinaries(o,{project:i});if(a.get(this.scriptName)){let c=[];return this.inspect&&(typeof this.inspect=="string"?c.push(`--inspect=${this.inspect}`):c.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?c.push(`--inspect-brk=${this.inspectBrk}`):c.push("--inspect-brk")),await Jt.executePackageAccessibleBinary(o,this.scriptName,this.args,{cwd:this.context.cwd,project:i,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:c,packageAccessibleBinaries:a})}if(!this.topLevel&&!this.binariesOnly&&n&&this.scriptName.includes(":")){let u=(await Promise.all(i.workspaces.map(async g=>g.manifest.scripts.has(this.scriptName)?g:null))).filter(g=>g!==null);if(u.length===1)return await Jt.executeWorkspaceScript(u[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 qi.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${P.prettyLocator(t,s)}). 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 qi.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${P.prettyLocator(t,s)}).`);{if(this.scriptName==="global")throw new qi.UsageError("The 'yarnglobal' commands have been removed in 2.x - consider using 'yarndlx'orathird-partyplugininstead");letc=[this.scriptName].concat(this.args);for(let[u,g]ofHh)for(letfofg)if(c.length>=f.length&&JSON.stringify(c.slice(0,f.length))===JSON.stringify(f))thrownewqi.U
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});var Cp=ne(Xe()),Xu=class extends ve{constructor(){super(...arguments);this.save=Cp.Option.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=Cp.Option.String();this.resolution=Cp.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(await i.restoreInstallState({restoreResolutions:!1}),!n)throw new ct(i.cwd,this.context.cwd);let o=P.parseDescriptor(this.descriptor,!0),a=P.makeDescriptor(o,this.resolution);return i.storedDescriptors.set(o.descriptorHash,o),i.storedDescriptors.set(a.descriptorHash,a),i.resolutionAliases.set(o.descriptorHash,a.descriptorHash),(await Ke.start({configuration:t,stdout:this.context.stdout},async c=>{await i.install({cache:s,report:c})})).exitCode()}};Xu.paths=[["set","resolution"]],Xu.usage=Cp.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"]]});var vl=ne(Xe()),gAe=ne(wn()),_u=class extends ve{constructor(){super(...arguments);this.all=vl.Option.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=vl.Option.Rest()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);let o=i.topLevelWorkspace,a=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:c,reference:u}of o.manifest.resolutions)u.startsWith("portal:")&&a.add(c.descriptor.fullName);if(this.leadingArguments.length>0)for(let c of this.leadingArguments){let u=x.resolve(this.context.cwd,K.toPortablePath(c));if(Ee.isPathLike(c)){let g=await Ie.find(u,this.context.plugins,{useRc:!1,strict:!1}),{project:f,workspace:h}=await He.find(g,u);if(!h)throw new ct(f.cwd,u);if(this.all){for(let p of f.workspaces)p.manifest.name&&a.add(P.stringifyIdent(p.locator));if(a.size===0)throw new vl.UsageError("No workspace found to be unlinked in the target project")}else{if(!h.manifest.name)throw new vl.UsageError("The target workspace doesn't have a name and thus cannot be unlinked");a.add(P.stringifyIdent(h.locator))}}else{let g=[...o.manifest.resolutions.map(({pattern:f})=>f.descriptor.fullName)];for(let f of(0,gAe.default)(g,c))a.add(f)}}return o.manifest.resolutions=o.manifest.resolutions.filter(({pattern:c})=>!a.has(c.descriptor.fullName)),(await Ke.start({configuration:t,stdout:this.context.stdout},async c=>{await i.install({cache:s,report:c})})).exitCode()}};_u.paths=[["unlink"]],_u.usage=vl.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}'"]]});var Dn=ne(Xe()),fAe=ne(aE()),TO=ne(wn()),mp=ne(ns());var xl=class extends ve{constructor(){super(...arguments);this.interactive=Dn.Option.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.exact=Dn.Option.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Dn.Option.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Dn.Option.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=Dn.Option.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=Dn.Option.String("--mode",{description:"Change what artifacts installs generate",validator:mp.isEnum(Xn)});this.patterns=Dn.Option.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState({restoreResolutions:!1});let o=[...i.storedDescriptors.values()],a=o.map(g=>P.stringifyIdent(g)),l=new Set;for(let g of this.patterns){if(P.parseDescriptor(g).range!=="unknown")throw new Dn.UsageError("Ranges aren't allowed when using --recursive");for(let f of(0,TO.default)(a,g)){let h=P.parseIdent(f);l.add(h.identHash)}}let c=o.filter(g=>l.has(g.identHash));for(let g of c)i.storedDescriptors.delete(g.descriptorHash),i.storedResolutions.delete(g.descriptorHash);return(await Ke.start({configuration:t,stdout:this.context.stdout},async g=>{await i.install({cache:s,report:g})})).exitCode()}async executeUpClassic(){var w;let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd),s=await kt.find(t);if(!n)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState({restoreResolutions:!1});let o=(w=this.interactive)!=null?w:t.get("preferInteractive"),a=lE(this,i),l=o?["keep","reuse","project","latest"]:["project","latest"],c=[],u=[];for(let B of this.patterns){let v=!1,D=P.parseDescriptor(B);for(let L of i.workspaces)for(let H of["dependencies","devDependencies"]){let $=[...L.manifest.getForScope(H).values()].map(V=>P.stringifyIdent(V));for(let V of(0,TO.default)($,P.stringifyIdent(D))){let W=P.parseIdent(V),Z=L.manifest[H].get(W.identHash);if(typeof Z>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let A=P.makeDescriptor(W,D.range);c.push(Promise.resolve().then(async()=>[L,H,Z,await cE(A,{project:i,workspace:L,cache:s,target:H,modifier:a,strategies:l})])),v=!0}}v||u.push(B)}if(u.length>1)throw new Dn.UsageError(`Patterns${ee.prettyList(t,u,Pi.CODE)}don't match any packages referenced by any workspace`);if(u.length>0)throw new Dn.UsageError(`Pattern ${ee.prettyList(t,u,Pi.CODE)} doesn'tmatchanypackagesreferencedbyanyworkspace`);let g=await Promise.all(c),f=await ta.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async B=>{for(let[,,v,{suggestions:D,rejections:L}]of g){let H=D.filter(j=>j.descriptor!==null);if(H.length===0){let[j]=L;if(typeof j>"u")throw new Error("Assertion failed: Expected an error to have been set");let $=this.cli.error(j);i.configuration.get("enableNetwork")?B.reportError(27,`${P.prettyDescriptor(t,v)}can'tberesolvedtoasatisfyingrange
${$}`)}else H.length>1&&!o&&B.reportError(27,`${P.prettyDescriptor(t,v)}hasmultiplepossibleupgradestrategies;use-itodisambiguatemanually`)}});if(f.hasErrors())return f.exitCode();let h=!1,p=[];for(let[B,v,,{suggestions:D}]of g){let L,H=D.filter(W=>W.descriptor!==null),j=H[0].descriptor,$=H.every(W=>P.areDescriptorsEqual(W.descriptor,j));H.length===1||$?L=j:(h=!0,{answer:L}=await(0,fAe.prompt)({type:"select",name:"answer",message:`Whichrangetoyouwanttousein${P.prettyWorkspace(t,B)}\u276F${v}?`,choices:D.map(({descriptor:W,name:Z,reason:A})=>W?{name:Z,hint:A,descriptor:W}:{name:Z,hint:A,disabled:!0}),onCancel:()=>process.exit(130),result(W){return this.find(W,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let V=B.manifest[v].get(L.identHash);if(typeof V>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(V.descriptorHash!==L.descriptorHash)B.manifest[v].set(L.identHash,L),p.push([B,v,V,L]);else{let W=t.makeResolver(),Z={project:i,resolver:W},A=W.bindDescriptor(V,B.anchoredLocator,Z);i.forgetResolution(A)}}return await t.triggerMultipleHooks(B=>B.afterWorkspaceDependencyReplacement,p),h&&this.context.stdout.write(`
`),(await Ke.start({configuration:t,stdout:this.context.stdout},async B=>{await i.install({cache:s,report:B,mode:this.mode})})).exitCode()}};xl.paths=[["up"]],xl.usage=Dn.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 latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `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'"]]}),xl.schema=[mp.hasKeyRelationship("recursive",mp.KeyRelationship.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var Zu=ne(Xe()),$u=class extends ve{constructor(){super(...arguments);this.recursive=Zu.Option.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=Zu.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=Zu.Option.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=Z
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 e4e(r,e,{configuration:t,peers:i}){let n=Ee.sortMap(r.storedPackages.values(),a=>P.stringifyLocator(a)),s={},o={children:s};for(let a of n){let l={};for(let u of a.dependencies.values()){if(!i&&a.peerDependencies.has(u.identHash))continue;let g=r.storedResolutions.get(u.descriptorHash);if(!g)throw new Error("Assertion failed: The resolution should have been registered");let f=r.storedPackages.get(g);if(!f)throw new Error("Assertion failed: The package should have been registered");if(f.identHash!==e)continue;{let p=P.stringifyLocator(a);s[p]={value:[a,ee.Type.LOCATOR],children:l}}let h=P.stringifyLocator(f);l[h]={value:[{descriptor:u,locator:f},ee.Type.DEPENDENT]}}}return o}function t4e(r,e,{configuration:t,peers:i}){let n=Ee.sortMap(r.workspaces,f=>P.stringifyLocator(f.anchoredLocator)),s=new Set,o=new Set,a=f=>{if(s.has(f.locatorHash))return o.has(f.locatorHash);if(s.add(f.locatorHash),f.identHash===e)return o.add(f.locatorHash),!0;let h=!1;f.identHash===e&&(h=!0);for(let p of f.dependencies.values()){if(!i&&f.peerDependencies.has(p.identHash))continue;let C=r.storedResolutions.get(p.descriptorHash);if(!C)throw new Error("Assertion failed: The resolution should have been registered");let w=r.storedPackages.get(C);if(!w)throw new Error("Assertion failed: The package should have been registered");a(w)&&(h=!0)}return h&&o.add(f.locatorHash),h};for(let f of n){let h=r.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");a(h)}let l=new Set,c={},u={children:c},g=(f,h,p)=>{if(!o.has(f.locatorHash))return;let C=p!==null?ee.tuple(ee.Type.DEPENDENT,{locator:f,descriptor:p}):ee.tuple(ee.Type.LOCATOR,f),w={},B={value:C,children:w},v=P.stringifyLocator(f);if(h[v]=B,!l.has(f.locatorHash)&&(l.add(f.locatorHash),!(p!==null&&r.tryWorkspaceByLocator(f))))for(let D of f.dependencies.values()){if(!i&&f.peerDependencies.has(D.identHash))continue;let L=r.storedResolutions.get(D.descriptorHash);if(!L)throw new Error("Assertion failed: The resolution should have been registered");let H=r.storedPackages.get(L);if(!H)throw new Error("Assertion failed: The package should have been registered");g(H,w,D)}};for(let f of n){let h=r.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");g(h,c,null)}return u}var JO={};ht(JO,{default:()=>I4e,gitUtils:()=>lA});var lA={};ht(lA,{TreeishProtocols:()=>lb,clone:()=>qO,fetchBase:()=>FAe,fetchChangedFiles:()=>NAe,fetchChangedWorkspaces:()=>m4e,fetchRoot:()=>RAe,isGitUrl:()=>Ip,lsRemote:()=>kAe,normalizeLocator:()=>YO,normalizeRepoUrl:()=>yE,resolveUrl:()=>jO,splitRepoUrl:()=>IE});var EE=ne(Xe()),GO=ne(vAe()),xAe=ne(r0()),Ep=ne(J("querystring")),UO=ne($r()),PAe=ne(J("url"));function DAe(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"}-oBatchMode=yes`}}var C4e=[/^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\/(.+)?$/],lb=(n=>(n.Commit="commit",n.Head="head",n.Tag="tag",n.Semver="semver",n))(lb||{});function Ip(r){return r?C4e.some(e=>!!r.match(e)):!1}function IE(r){r=yE(r);let e=r.indexOf("#");if(e===-1)return{repo:r,treeish:{protocol:"head",request:"HEAD"},extra:{}};let t=r.slice(0,e),i=r.slice(e+1);if(i.match(/^[a-z]+=/)){let n=Ep.default.parse(i);for(let[l,c]of Object.entries(n))if(typeof c!="string")throw new Error(`Assertionfailed:The${l}parametermustbealiteralstring`);let s=Object.values(lb).find(l=>Object.prototype.hasOwnProperty.call(n,l)),o,a;typeof s<"u"?(o=s,a=n[s]):(o="head",a="HEAD");for(let l of Object.values(lb))delete n[l];return{repo:t,treeish:{protocol:o,request:a},extra:n}}else{let n=i.indexOf(":")
-`)}?`)}returnthis.cli.run([this.commandName,...this.args],{cwd:a.cwd})}};tg.paths=[["workspace"]],tg.usage=Dl.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 y4e={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:LAe.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"}},commands:[Su,vu,xu,Pu,Xu,Gu,Nu,eg,cp,up,hE,gp,Qu,bu,Du,ku,Ru,Fu,Lu,Tu,Ou,Mu,_u,Ku,ju,Yu,qu,Uu,Ju,Wu,zu,dp,Vu,xl,$u,tg]},w4e=y4e;var ZO={};ht(ZO,{default:()=>Q4e});var Fe={optional:!0},zO=[["@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:Fe,zenObservable:Fe}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Fe,zenObservable:Fe}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Fe}}],["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"]:Fe,["postcss-jsx"]:Fe,["postcss-less"]:Fe,["postcss-markdown"]:Fe,["postcss-scss"]:Fe}}],["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:Fe}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Fe}}],["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:Fe,"vue-template-compiler":Fe}}],["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:Fe,"utf-8-validate":Fe}}],["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:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gat
`);let g=await Ie.find(i,this.context.plugins),{project:f,workspace:h}=await He.find(g,i);if(h===null)throw new ct(f.cwd,i);await f.restoreInstallState();let p=await Jt.getWorkspaceAccessibleBinaries(h);return p.has(c)===!1&&p.size===1&&typeof this.packages>"u"&&(c=Array.from(p)[0][0]),await Jt.executeWorkspaceAccessibleBinary(h,c,this.args,{packageAccessibleBinaries:p,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};ig.paths=[["dlx"]],ig.usage=rg.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 b4e={commands:[yp,ig]},S4e=b4e;var iM={};ht(iM,{default:()=>P4e,fileUtils:()=>QE});var wp=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,BE=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,zr="file:";var QE={};ht(QE,{makeArchiveFromLocator:()=>gb,makeBufferFromLocator:()=>rM,makeLocator:()=>tM,makeSpec:()=>UAe,parseSpec:()=>eM});function eM(r){let{params:e,selector:t}=P.parseRange(r),i=K.toPortablePath(t);return{parentLocator:e&&typeof e.locator=="string"?P.parseLocator(e.locator):null,path:i}}function UAe({parentLocator:r,path:e,folderHash:t,protocol:i}){let n=r!==null?{locator:P.stringifyLocator(r)}:{},s=typeof t<"u"?{hash:t}:{};return P.makeRange({protocol:i,source:e,selector:e,params:{...s,...n}})}function tM(r,{parentLocator:e,path:t,folderHash:i,protocol:n}){return P.makeLocator(r,UAe({parentLocator:e,path:t,folderHash:i,protocol:n}))}async function gb(r,{protocol:e,fetchOptions:t,inMemory:i=!1}){let{parentLocator:n,path:s}=P.parseFileStyleRange(r.reference,{protocol:e}),o=x.isAbsolute(s)?{packageFs:new jt(ke.root),prefixPath:ke.dot,localPath:ke.root}:await t.fetcher.fetch(n,t),a=o.localPath?{packageFs:new jt(ke.root),prefixPath:x.relative(ke.root,o.localPath)}:o;o!==a&&o.releaseFs&&o.releaseFs();let l=a.packageFs,c=x.join(a.prefixPath,s);return await Ee.releaseAfterUseAsync(async()=>await yi.makeArchiveFromDirectory(c,{baseFs:l,prefixPath:P.getIdentVendorPath(r),compressionLevel:t.project.configuration.get("compressionLevel"),inMemory:i}),a.releaseFs)}async function rM(r,{protocol:e,fetchOptions:t}){return(await gb(r,{protocol:e,fetchOptions:t,inMemory:!0})).getBufferAndClose()}var fb=class{supports(e,t){return!!e.reference.startsWith(zr)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:zr});if(x.isAbsolute(n))return n;let s=t.fetcher.getLocalPath(i,t);return s===null?null:x.resolve(s,n)}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)}can'tbefoundinthecacheandwillbefetchedfromthedisk`),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck,...t.cacheOptions});return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async fetchFromDisk(e,t){return gb(e,{protocol:zr,fetchOptions:t})}};var v4e=2,hb=class{supportsDescriptor(e,t){return e.range.match(wp)?!0:!!e.range.startsWith(zr)}supportsLocator(e,t){return!!e.reference.startsWith(zr)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return wp.test(e.range)
`),!i||i.cwd===this.context.cwd){let u=x.join(this.context.cwd,xt.lockfile);M.existsSync(u)||await M.writeFilePromise(u,"");let f=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!.yarn/cache","#.pnp.*"].map(B=>`${B}
`}let w=x.join(this.context.cwd,".editorconfig");M.existsSync(w)||await M.writeFilePromise(w,C),M.existsSync(x.join(this.context.cwd,".git"))||await mr.execvp("git",["init"],{cwd:this.context.cwd})}}};ng.paths=[["init"]],ng.usage=uo.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 Lze={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:[ng]},Tze=Lze;var cM={};ht(cM,{default:()=>Mze});var cA="portal:",uA="link:";var Ib=class{supports(e,t){return!!e.reference.startsWith(cA)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:cA});if(x.isAbsolute(n))return n;let s=t.fetcher.getLocalPath(i,t);return s===null?null:x.resolve(s,n)}async fetch(e,t){var c;let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:cA}),s=x.isAbsolute(n)?{packageFs:new jt(ke.root),prefixPath:ke.dot,localPath:ke.root}:await t.fetcher.fetch(i,t),o=s.localPath?{packageFs:new jt(ke.root),prefixPath:x.relative(ke.root,s.localPath),localPath:ke.root}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=x.resolve((c=o.localPath)!=null?c:o.packageFs.getRealPath(),o.prefixPath,n);return s.localPath?{packageFs:new jt(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:ke.dot,localPath:l}:{packageFs:new bo(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:ke.dot}}};var yb=class{supportsDescriptor(e,t){return!!e.range.startsWith(cA)}supportsLocator(e,t){return!!e.reference.startsWith(cA)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){return P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,i){let n=e.range.slice(cA.length);return[P.makeLocator(e,`${cA}${K.toPortablePath(n)}`)]}async getSatisfying(e,t,i){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),n=await Ee.releaseAfterUseAsync(async()=>await nt.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return{...e,version:n.version||"0.0.0",languageName:n.languageName||t.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:n.getConditions(),dependencies:new Map([...n.dependencies]),peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin}}};var wb=class{supports(e,t){return!!e.reference.startsWith(uA)}getLocalPath(e,t){let{parentLocator:i,path:n}=P.parseFileStyleRange(e.reference,{protocol:uA});if(x.isAbsolute(n))return n;l
${vE(a)}`);let f=wle(a);if(f)throw new Error(`${f},afterhoistingfinished:
${vE(a)}`)}return s.debugLevel>=2&&console.log(vE(a)),Jze(a)},Kze=r=>{let e=r[r.length-1],t=new Map,i=new Set,n=s=>{if(!i.has(s)){i.add(s);for(let o of s.hoistedDependencies.values())t.set(o.name,o);for(let o of s.dependencies.values())s.peerNames.has(o.name)||n(o)}};return n(e),t},Uze=r=>{let e=r[r.length-1],t=new Map,i=new Set,n=new Set,s=(o,a)=>{if(i.has(o))return;i.add(o);for(let c of o.hoistedDependencies.values())if(!a.has(c.name)){let u;for(let g of r)u=g.dependencies.get(c.name),u&&t.set(u.name,u)}let l=new Set;for(let c of o.dependencies.values())l.add(c.name);for(let c of o.dependencies.values())o.peerNames.has(c.name)||s(c,l)};return s(e,n),t},Ele=(r,e)=>{if(e.decoupled)return e;let{name:t,references:i,ident:n,locator:s,dependencies:o,originalDependencies:a,hoistedDependencies:l,peerNames:c,reasons:u,isHoistBorder:g,hoistPriority:f,dependencyKind:h,hoistedFrom:p,hoistedTo:C}=e,w={name:t,references:new Set(i),ident:n,locator:s,dependencies:new Map(o),originalDependencies:new Map(a),hoistedDependencies:new Map(l),peerNames:new Set(c),reasons:new Map(u),decoupled:!0,isHoistBorder:g,hoistPriority:f,dependencyKind:h,hoistedFrom:new Map(p),hoistedTo:new Map(C)},B=w.dependencies.get(t);return B&&B.ident==w.ident&&w.dependencies.set(t,w),r.dependencies.set(w.name,w),w},Hze=(r,e)=>{let t=new Map([[r.name,[r.ident]]]);for(let n of r.dependencies.values())r.peerNames.has(n.name)||t.set(n.name,[n.ident]);let i=Array.from(e.keys());i.sort((n,s)=>{let o=e.get(n),a=e.get(s);return a.hoistPriority!==o.hoistPriority?a.hoistPriority-o.hoistPriority:a.peerDependents.size!==o.peerDependents.size?a.peerDependents.size-o.peerDependents.size:a.dependents.size-o.dependents.size});for(let n of i){let s=n.substring(0,n.indexOf("@",1)),o=n.substring(s.length+1);if(!r.peerNames.has(s)){let a=t.get(s);a||(a=[],t.set(s,a)),a.indexOf(o)<0&&a.push(o)}}return t},uM=r=>{let e=new Set,t=(i,n=new Set)=>{if(!n.has(i)){n.add(i);for(let s of i.peerNames)if(!r.peerNames.has(s)){let o=r.dependencies.get(s);o&&!e.has(o)&&t(o,n)}e.add(i)}};for(let i of r.dependencies.values())r.peerNames.has(i.name)||t(i);return e},fM=(r,e,t,i,n,s=new Set)=>{let o=e[e.length-1];if(s.has(o))return{anotherRoundNeeded:!1,isGraphChanged:!1};s.add(o);let a=Wze(o),l=Hze(o,a),c=r==o?new Map:n.fastLookupPossible?Kze(e):Uze(e),u,g=!1,f=!1,h=new Map(Array.from(l.entries()).map(([C,w])=>[C,w[0]])),p=new Map;do{let C=jze(r,e,t,c,h,l,i,p,n);C.isGraphChanged&&(f=!0),C.anotherRoundNeeded&&(g=!0),u=!1;for(let[w,B]of l)B.length>1&&!o.dependencies.has(w)&&(h.delete(w),B.shift(),h.set(w,B[0]),u=!0)}while(u);for(let C of o.dependencies.values())if(!o.peerNames.has(C.name)&&!t.has(C.locator)){t.add(C.locator);let w=fM(r,[...e,C],t,p,n);w.isGraphChanged&&(f=!0),w.anotherRoundNeeded&&(g=!0),t.delete(C.locator)}return{anotherRoundNeeded:g,isGraphChanged:f}},Gze=r=>{for(let[e,t]of r.dependencies)if(!r.peerNames.has(e)&&t.ident!==r.ident)return!0;return!1},Yze=(r,e,t,i,n,s,o,a,{outputReason:l,fastLookupPossible:c})=>{let u,g=null,f=new Set;l&&(u=`${Array.from(e).map(w=>Ri(w)).join("\u2192")}`);let h=t[t.length-1],C=!(i.ident===h.ident);if(l&&!C&&(g="- self-reference"),C&&(C=i.dependencyKind!==1,l&&!C&&(g="- workspace")),C&&i.dependencyKind===2&&(C=!Gze(i),l&&!C&&(g="- external soft link with unhoisted dependencies")),C&&(C=h.dependencyKind!==1||h.hoistedFrom.has(i.name)||e.size===1,l&&!C&&(g=h.reasons.get(i.name))),C&&(C=!r.peerNames.has(i.name),l&&!C&&(g=`-cannotshadowpeer:${Ri(r.originalDependencies.get(i.name).locator)}at${u}`)),C){let w=!1,B=n.get(i.name);if(w=!B||B.ident===i.ident,l&&!w&&(g=`-filledby:${Ri(B.locator)}at${u}`),w)for(let v=t.length-1;v>=1;v--){let L=t[v].dependencies.get(i.name);if(L&&L.ident!==i.ident){w=!1;let H=a.get(h);H||(H=new Set,a.set(h,H)),H.add(i.name),l&&(g=`-filledby${Ri(L.locator)}at${t.slice(0,v).map(j=>Ri(j.locator)).join("\u2192")}`);break}}C=w}if(C&&(C=s.get(i.name)===i.ident,l&&!C&&(g=`-filledby:${Ri(o.get(i.name)[0])}at${u}`)),C){let w=!0,B=new Set(i.peerNames);for(let v=t.length-1;v>=1;v--){let D=t[v];for(let L of B){if(D.peerNames.h
${vE(r)}`)}let ge=uM(L);for(let _ of ge)if(Z.has(_)){let T=W.get(_);if((n.get(_.name)===_.ident||!L.reasons.has(_.name))&&T.isHoistable!==0&&L.reasons.set(_.name,T.reason),!_.isHoistBorder&&$.indexOf(Qb(_))<0){u.add(L);let ue=Ele(L,_);h([...B,L],j,$,ue,C),u.delete(L)}}},p,C=new Set(uM(c)),w=Array.from(e).map(B=>Qb(B));do{p=C,C=new Set;for(let B of p){if(B.locator===c.locator||B.isHoistBorder)continue;let v=Ele(c,B);h([],Array.from(t),w,v,C)}}while(C.size>0);return{anotherRoundNeeded:g,isGraphChanged:f}},wle=r=>{let e=[],t=new Set,i=new Set,n=(s,o,a)=>{if(t.has(s)||(t.add(s),i.has(s)))return;let l=new Map(o);for(let c of s.dependencies.values())s.peerNames.has(c.name)||l.set(c.name,c);for(let c of s.originalDependencies.values()){let u=l.get(c.name),g=()=>`${Array.from(i).concat([s]).map(f=>Ri(f.locator)).join("\u2192")}`;if(s.peerNames.has(c.name)){let f=o.get(c.name);(f!==u||!f||f.ident!==c.ident)&&e.push(`${g()}-brokenpeerpromise:expected${c.ident}butfound${f&&f.ident}`)}else{let f=a.hoistedFrom.get(s.name),h=s.hoistedTo.get(c.name),p=`${f?` hoisted from ${f.join(", ")}`:""}`,C=`${h?` hoisted to ${h}`:""}`,w=`${g()}${p}`;u?u.ident!==c.ident&&e.push(`${w}-brokenrequirepromisefor${c.name}${C}:expected${c.ident},butfound:${u.ident}`):e.push(`${w}-brokenrequirepromise:norequireddependency${c.name}${C}found`)}}i.add(s);for(let c of s.dependencies.values())s.peerNames.has(c.name)||n(c,l,s);i.delete(s)};return n(r,r.dependencies,r),e.join(`
`)},qze=(r,e)=>{let{identName:t,name:i,reference:n,peerNames:s}=r,o={name:i,references:new Set([n]),locator:gM(t,n),ident:mle(t,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(s),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},a=new Map([[r,o]]),l=(c,u)=>{let g=a.get(c),f=!!g;if(!g){let{name:h,identName:p,reference:C,peerNames:w,hoistPriority:B,dependencyKind:v}=c,D=e.hoistingLimits.get(u.locator);g={name:h,references:new Set([C]),locator:gM(p,C),ident:mle(p,C),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(w),reasons:new Map,decoupled:!0,isHoistBorder:D?D.has(h):!1,hoistPriority:B||0,dependencyKind:v||0,hoistedFrom:new Map,hoistedTo:new Map},a.set(c,g)}if(u.dependencies.set(c.name,g),u.originalDependencies.set(c.name,g),f){let h=new Set,p=C=>{if(!h.has(C)){h.add(C),C.decoupled=!1;for(let w of C.dependencies.values())C.peerNames.has(w.name)||p(w)}};p(g)}else for(let h of c.dependencies)l(h,g)};for(let c of r.dependencies)l(c,o);return o},hM=r=>r.substring(0,r.indexOf("@",1)),Jze=r=>{let e={name:r.name,identName:hM(r.locator),references:new Set(r.references),dependencies:new Set},t=new Set([r]),i=(n,s,o)=>{let a=t.has(n),l;if(s===n)l=o;else{let{name:c,references:u,locator:g}=n;l={name:c,identName:hM(g),references:u,dependencies:new Set}}if(o.dependencies.add(l),!a){t.add(n);for(let c of n.dependencies.values())n.peerNames.has(c.name)||i(c,n,l);t.delete(n)}};for(let n of r.dependencies.values())i(n,r,e);return e},Wze=r=>{let e=new Map,t=new Set([r]),i=o=>`${o.name}@${o.ident}`,n=o=>{let a=i(o),l=e.get(a);return l||(l={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(a,l)),l},s=(o,a)=>{let l=!!t.has(a);if(n(a).dependents.add(o.ident),!l){t.add(a);for(let u of a.dependencies.values()){let g=n(u);g.hoistPriority=Math.max(g.hoistPriority,u.hoistPriority),a.peerNames.has(u.name)?g.peerDependents.add(a.ident):s(a,u)}}};for(let o of r.dependencies.values())r.peerNames.has(o.name)||s(r,o);return e},Ri=r=>{if(!r)return"none";let e=r.indexOf("@",1),t=r.substring(0,e);t.endsWith("$wsroot$")&&(t=`wh:${t.replace("$wsroot$","")}`);let i=r.substring(e+1);if(i==="workspace:.")return".";if(i){let n=(i.indexOf("#")>0?i.split("#")[1]:i).replace("npm:","");return i.startsWith("virtual")&&(t=`v:${t}`),n.startsWith("workspace")&&(t=`w:${t}`,n=""),`${t}${n?`@${n}`:""}`}else return`${t}`},Ile=5e4,vE=r=>{let e=0,t=(n,s,o="")=>{if(e>Ile||s.has(n))return"";e++;let a=Array.from(n.dependencies.values()).sort((c,u)=>c.name===u.name?0:c.name>u.name?1:-1),l="";s.add(n);for(let c=0;c<a.length;c++){let u=a[c];if(!n.peerNames.has(u.name)&&u!==n){let g=n.reasons.get(u.name),f=hM(u.locator);l+=`${o}${c<a.length-1?"\u251C\u2500":"\u2514\u2500"}${(s.has(u)?">":"")+(f!==u.name?`a:${u.name}:`:"")+Ri(u.locator)+(g?`${g}`:"")}
`:"")};var xE=(i=>(i.WORKSPACES="workspaces",i.DEPENDENCIES="dependencies",i.NONE="none",i))(xE||{}),Ble="node_modules",sg="$wsroot$";var PE=(r,e)=>{let{packageTree:t,hoistingLimits:i,errors:n,preserveSymlinksRequired:s}=Vze(r,e),o=null;if(n.length===0){let a=yle(t,{hoistingLimits:i});o=_ze(r,a,e)}return{tree:o,errors:n,preserveSymlinksRequired:s}},oa=r=>`${r.name}@${r.reference}`,dM=r=>{let e=new Map;for(let[t,i]of r.entries())if(!i.dirList){let n=e.get(i.locator);n||(n={target:i.target,linkType:i.linkType,locations:[],aliases:i.aliases},e.set(i.locator,n)),n.locations.push(t)}for(let t of e.values())t.locations=t.locations.sort((i,n)=>{let s=i.split(x.delimiter).length,o=n.split(x.delimiter).length;return n===i?0:s!==o?o-s:n>i?1:-1});return e},Qle=(r,e)=>{let t=P.isVirtualLocator(r)?P.devirtualizeLocator(r):r,i=P.isVirtualLocator(e)?P.devirtualizeLocator(e):e;return P.areLocatorsEqual(t,i)},pM=(r,e,t,i)=>{if(r.linkType!=="SOFT")return!1;let n=K.toPortablePath(t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(r.packageLocation):r.packageLocation);return x.contains(i,n)===null},zze=r=>{let e=r.getPackageInformation(r.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(r.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let i=K.toPortablePath(e.packageLocation.slice(0,-1)),n=new Map,s={children:new Map},o=r.getDependencyTreeRoots(),a=new Map,l=new Set,c=(f,h)=>{let p=oa(f);if(l.has(p))return;l.add(p);let C=r.getPackageInformation(f);if(C){let w=h?oa(h):"";if(oa(f)!==w&&C.linkType==="SOFT"&&!pM(C,f,r,i)){let B=ble(C,f,r);(!a.get(B)||f.reference.startsWith("workspace:"))&&a.set(B,f)}for(let[B,v]of C.packageDependencies)v!==null&&(C.packagePeers.has(B)||c(r.getLocator(B,v),f))}};for(let f of o)c(f,null);let u=i.split(x.sep);for(let f of a.values()){let h=r.getPackageInformation(f),C=K.toPortablePath(h.packageLocation.slice(0,-1)).split(x.sep).slice(u.length),w=s;for(let B of C){let v=w.children.get(B);v||(v={children:new Map},w.children.set(B,v)),w=v}w.workspaceLocator=f}let g=(f,h)=>{if(f.workspaceLocator){let p=oa(h),C=n.get(p);C||(C=new Set,n.set(p,C)),C.add(f.workspaceLocator)}for(let p of f.children.values())g(p,f.workspaceLocator||h)};for(let f of s.children.values())g(f,s.workspaceLocator);return n},Vze=(r,e)=>{let t=[],i=!1,n=new Map,s=zze(r),o=r.getPackageInformation(r.topLevel);if(o===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let a=r.findPackageLocator(o.packageLocation);if(a===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let l=K.toPortablePath(o.packageLocation.slice(0,-1)),c={name:a.name,identName:a.name,reference:a.reference,peerNames:o.packagePeers,dependencies:new Set,dependencyKind:1},u=new Map,g=(h,p)=>`${oa(p)}:${h}`,f=(h,p,C,w,B,v,D,L)=>{var _,T;let H=g(h,C),j=u.get(H),$=!!j;!$&&C.name===a.name&&C.reference===a.reference&&(j=c,u.set(H,c));let V=pM(p,C,r,l);if(!j){let N=0;V?N=2:p.linkType==="SOFT"&&C.name.endsWith(sg)&&(N=1),j={name:h,identName:C.name,reference:C.reference,dependencies:new Set,peerNames:N===1?new Set:p.packagePeers,dependencyKind:N},u.set(H,j)}let W;if(V?W=2:B.linkType==="SOFT"?W=1:W=0,j.hoistPriority=Math.max(j.hoistPriority||0,W),L&&!V){let N=oa({name:w.identName,reference:w.reference}),ue=n.get(N)||new Set;n.set(N,ue),ue.add(j.name)}let Z=new Map(p.packageDependencies);if(e.project){let N=e.project.workspacesByCwd.get(K.toPortablePath(p.packageLocation.slice(0,-1)));if(N){let ue=new Set([...Array.from(N.manifest.peerDependencies.values(),we=>P.stringifyIdent(we)),...Array.from(N.manifest.peerDependenciesMeta.keys())]);for(let we of ue)Z.has(we)||(Z.set(we,v.get(we)||null),j.peerNames.add(we))}}let A=oa({name:C.name.replace(sg,""),reference:C.reference}),ae=s.get(A);if(ae)for(let N of ae)Z.set(`${N.name}${sg}`,N.reference);(p!==B||p.linkType!=="SOFT"||!V&&(!e.selfReferencesByCwd||e.selfReference
`),s+=t,s+="}",s}function bb(r,e,t,i){let{next:n}=Sle[t],s=n[r]||n["*"];return vle(e,s,i)}function vle(r,e,t){let{collapsed:i}=Sle[e];return Array.isArray(r)?i?Zze(r,e,t):$ze(r,e,t):typeof r=="object"&&r!==null?i?e5e(r,e,t):t5e(r,e,t):JSON.stringify(r)}function xle(r){return vle(r,"TOP_LEVEL","")}function DE(r,e){let t=Array.from(r);Array.isArray(e)||(e=[e]);let i=[];for(let s of e)i.push(t.map(o=>s(o)));let n=t.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]<a[o]?-1:a[s]>a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>t[s])}function r5e(r){let e=new Map,t=DE(r.fallbackExclusionList||[],[({name:i,reference:n})=>i,({name:i,reference:n})=>n]);for(let{name:i,reference:n}of t){let s=e.get(i);typeof s>"u"&&e.set(i,s=new Set),s.add(n)}return Array.from(e).map(([i,n])=>[i,Array.from(n)])}function i5e(r){return DE(r.fallbackPool||[],([e])=>e)}function n5e(r){let e=[];for(let[t,i]of DE(r.packageRegistry,([n])=>n===null?"0":`1${n}`)){let n=[];e.push([t,n]);for(let[s,{packageLocation:o,packageDependencies:a,packagePeers:l,linkType:c,discardFromLookup:u}]of DE(i,([g])=>g===null?"0":`1${g}`)){let g=[];t!==null&&s!==null&&!a.has(t)&&g.push([t,s]);for(let[p,C]of DE(a.entries(),([w])=>w))g.push([p,C]);let f=l&&l.size>0?Array.from(l):void 0,h=u||void 0;n.push([s,{packageLocation:o,packageDependencies:g,packagePeers:f,linkType:c,discardFromLookup:h}])}}return e}function kE(r){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:r.dependencyTreeRoots,enableTopLevelFallback:r.enableTopLevelFallback||!1,ignorePatternData:r.ignorePattern||null,fallbackExclusionList:r5e(r),fallbackPool:i5e(r),packageRegistryData:n5e(r)}}var kle=ne(Dle());function Rle(r,e){return[r?`${r}
`,{request:fe,issuer:le});return K.toPortablePath(Y)}let Ge,ie=se.match(n);if(ie){if(!Ae)throw si("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:fe,issuer:le});let[,Y,he]=ie,re=_(Ae);if(!re){let pr=$(se,Ae);if(pr===!1)throw si("BUILTIN_NODE_RESOLUTION_FAILED",`Thebuiltinnoderesolutionalgorithmwasunabletoresolvetherequestedmodule(itdidn't go through the pnp resolver because the issuer doesn'tseemtobepartoftheYarn-manageddependencytree).
`,{request:fe,issuer:le,dependencyName:Y}):It=si("UNDECLARED_DEPENDENCY",`${re.name}triedtoaccess${Y}.WhilethismoduleisusuallyinterpretedasaNodebuiltin,yourresolverisrunninginsideanon-Noderesolutioncontextwheresuchbuiltinsareignored.Since${Y}isn't otherwise declared in ${re.name}'sdependencies,thismakestherequirecallambiguousandunsound.
`,{request:fe,issuer:le,issuerLocator:Object.assign({},re),dependencyName:Y}));if(tt==null){if(Rt===null||It===null)throw It||new Error("Assertion failed: Expected an error to have been set");tt=Rt;let pr=It.message.replace(/\n.*/g,"");It.message=pr,!u.has(pr)&&i!==0&&(u.add(pr),process.emitWarning(It))}let Kr=Array.isArray(tt)?{name:tt[0],reference:tt[1]}:{name:Y,reference:tt},oi=B(Kr);if(!oi.packageLocation)throw si("MISSING_DEPENDENCY",`Adependencyseemsvalidbutdidn'tgetinstalledforsomereason.Thismightbecausedbyapartialinstall,suchasdevvsprod.
`,{request:fe,issuer:le,dependencyLocator:Object.assign({},Kr)});let pi=oi.packageLocation;he?Ge=x.join(pi,he):Ge=pi}else if(x.isAbsolute(se))Ge=x.normalize(se);else{if(!Ae)throw si("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:fe,issuer:le});let Y=x.resolve(Ae);Ae.match(o)?Ge=x.normalize(x.join(Y,se)):Ge=x.normalize(x.join(x.dirname(Y),se))}return x.normalize(Ge)}function ue(se,Ae,Qe=D){if(s.test(se))return Ae;let fe=L(Ae,Qe);return fe?x.normalize(fe):Ae}function we(se,{extensions:Ae=Object.keys(TE.Module._extensions)}={}){var le,Ge;let Qe=[],fe=H(se,Qe,{extensions:Ae});if(fe)return x.normalize(fe);{let ie=fo(se),Y=_(se);if(Y){let{packageLocation:he}=B(Y),re=!0;try{e.fakeFs.accessSync(he)}catch(me){if((me==null?void 0:me.code)==="ENOENT")re=!1;else{let tt=((Ge=(le=me==null?void 0:me.message)!=null?le:me)!=null?Ge:"empty exception thrown").replace(/^[A-Z]/,Rt=>Rt.toLowerCase());throw si("QUALIFIED_PATH_RESOLUTION_FAILED",`Requiredpackageexistsbutcouldnotbeaccessed(${tt}).
`,{unqualifiedPath:ie,extensions:Ae})}}if(!re){let me=he.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 si("QUALIFIED_PATH_RESOLUTION_FAILED",`${me}
`).join("")}`,{unqualifiedPath:ie,extensions:Ae})}}functionLe(se,Ae,Qe){varle;if(!Ae)thrownewError("Assertion failed: An issuer is required to resolve private import mappings");letfe=Vle({name:se,base:(0,Fb.pathToFileURL)(K.fromPortablePath(Ae)),conditions:(le=Qe.conditions)!=null?le:D,readFileSyncFn:T});if(feinstanceofURL)returnwe(K.toPortablePath((0,Fb.fileURLToPath)(fe)),{extensions:Qe.extensions});if(fe.startsWith("#"))thrownewError("Mapping from one private import to another isn't allowed");returnPe(fe,Ae,Qe)}functionPe(se,Ae,Qe={}){try{if(se.startsWith("#"))returnLe(se,Ae,Qe);let{considerBuiltins:fe,extensions:le,conditions:Ge}=Qe,ie=N(se,Ae,{considerBuiltins:fe});if(se==="pnpapi")returnie;if(ie===null)returnnull;letY=()=>Ae!==null?V(Ae):!1,he=(!fe||!Rb(se))&&!Y()?ue(se,ie,Ge):ie;returnwe(he,{extensions:le})}catch(fe){throwObject.prototype.hasOwnProperty.call(fe,"pnpCode")&&Object.assign(fe.data,{request:fo(se),issuer:Ae&&fo(Ae)}),fe}}functionTe(se){letAe=x.normalize(se),Qe=Nr.resolveVirtual(Ae);returnQe!==Ae?Qe:null}return{VERSIONS:W,topLevel:Z,getLocator:(se,Ae)=>Array.isArray(Ae)?{name:Ae[0],reference:Ae[1]}:{name:se,reference:Ae},getDependencyTreeRoots:()=>[...r.dependencyTreeRoots],getAllLocators(){letse=[];for(let[Ae,Qe]off)for(letfeofQe.keys())Ae!==null&&fe!==null&&se.push({name:Ae,reference:fe});returnse},getPackageInformation:se=>{letAe=A(se);if(Ae===null)returnnull;letQe=K.fromPortablePath(Ae.packageLocation);return{...Ae,packageLocation:Qe}},findPackageLocator:se=>_(K.toPortablePath(se)),resolveToUnqualified:w("resolveToUnqualified",(se,Ae,Qe)=>{letfe=Ae!==null?K.toPortablePath(Ae):null,le=N(K.toPortablePath(se),fe,Qe);returnle===null?null:K.fromPortablePath(le)}),resolveUnqualified:w("resolveUnqualified",(se,Ae)=>K.fromPortablePath(we(K.toPortablePath(se),Ae))),resolveRequest:w("resolveRequest",(se,Ae,Qe)=>{letfe=Ae!==null?K.toPortablePath(Ae):null,le=Pe(K.toPortablePath(se),fe,Qe);returnle===null?null:K.fromPortablePath(le)}),resolveVirtual:w("resolveVirtual",se=>{letAe=Te(K.toPortablePath(se));returnAe!==null?K.fromPortablePath(Ae):null})}}varCBt=(0,Zle.promisify)(_le.readFile);var$le=(r,e,t)=>{leti=kE(r),n=mM(i,{basePath:e}),s=K.join(e,xt.pnpCjs);returnQM(n,{fakeFs:t,pnpapiResolution:s})};varSM=ne(tce());varDM=ne(Xe());varho={};ht(ho,{checkAndReportManifestCompatibility:()=>ice,checkManifestCompatibility:()=>rce,extractBuildScripts:()=>Nb,getExtractHint:()=>vM,hasBindingGyp:()=>xM});functionrce(r){returnP.isPackageCompatible(r,io.getArchitectureSet())}functionice(r,e,{configuration:t,report:i}){returnrce(r)?!0:(i==null||i.reportWarningOnce(76,`${P.prettyLocator(t,r)} The ${io.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}functionNb(r,e,t,{configuration:i,report:n}){lets=[];for(letaof["preinstall","install","postinstall"])e.manifest.scripts.has(a)&&s.push([0,a]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&s.push([1,"node-gyp rebuild"]),s.length===0?[]:r.linkType!=="HARD"?(n==null||n.reportWarningOnce(6,`${P.prettyLocator(i,r)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`),[]):t&&t.built===!1?(n==null||n.reportInfoOnce(5,`${P.prettyLocator(i,r)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!i.get("enableScripts")&&!t.built?(n==null||n.reportWarningOnce(4,`${P.prettyLocator(i,r)} lists build scripts, but all build scripts have been disabled.`),[]):ice(r,"build",{configuration:i,report:n})?s:[]}varE5e=newSet([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);functionvM(r){returnr.packageFs.getExtractHint({relevantExtensions:E5e})}functionxM(r){lete=x.join(r.prefixPath,"binding.gyp");returnr.packageFs.existsSync(e)}varME={};ht(ME,{getUnpluggedPath:()=>OE});functionOE(r,{configuration:e}){returnx.resolve(e.get("pnpUnpluggedFolder"),P.slugifyLocator(r))}varI5e=newSet([P.makeIdent(null,"nan").identHash,P.makeIdent(null,"node-gyp").identHas
`;for(let f of g.locations){let h=x.contains(r.cwd,f);if(h===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${f})`);s+=`-${JSON.stringify(h)}
`;for(let[f,h]of t){let p=x.contains(r.cwd,f);if(p===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${f})`);s+=`${JSON.stringify(p)}:
`),i}function Hb(r){var e,t;if(((e=r.originalError)==null?void 0:e.name)!=="HTTPError")return!1;try{return((t=r.originalError)==null?void 0:t.response.headers["www-authenticate"].split(/,\s*/).map(n=>n.toLowerCase())).includes("otp")}catch{return!1}}function vp(r){return{["npm-otp"]:r}}var Gb=class{supports(e,t){if(!e.reference.startsWith(fr))return!1;let{selector:i,params:n}=P.parseRange(e.reference);return!(!xce.default.valid(i)||n===null||typeof n.__archiveUrl!="string")}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)}can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck,...t.cacheOptions});return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let{params:i}=P.parseRange(e.reference);if(i===null||typeof i.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let n=await Co(i.__archiveUrl,{configuration:t.project.configuration,ident:e});return await yi.convertToZip(n,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})}};var Yb=class{supportsDescriptor(e,t){return!(!e.range.startsWith(fr)||!P.tryParseDescriptor(e.range.slice(fr.length),!0))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,i){return e}getResolutionDependencies(e,t){let i=P.parseDescriptor(e.range.slice(fr.length),!0);return t.resolver.getResolutionDependencies(i,t)}async getCandidates(e,t,i){let n=P.parseDescriptor(e.range.slice(fr.length),!0);return await i.resolver.getCandidates(n,t,i)}async getSatisfying(e,t,i){let n=P.parseDescriptor(e.range.slice(fr.length),!0);return i.resolver.getSatisfying(n,t,i)}resolve(e,t){throw new Error("Unreachable")}};var Pce=ne($r()),Dce=J("url");var Ns=class{supports(e,t){if(!e.reference.startsWith(fr))return!1;let i=new Dce.URL(e.reference);return!(!Pce.default.valid(i.pathname)||i.searchParams.has("__archiveUrl"))}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)} can'tbefoundinthecacheandwillbefetchedfromtheremoteregistry`),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck,...t.cacheOptions});return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let i;try{i=await Co(Ns.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch{i=await Co(Ns.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await yi.convertToZip(i,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:P.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:i}){let n=fA(e.scope,{configuration:i}),s=Ns.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),n=n.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),t===n+s||t===n+s.replace(/%2f/g,"/")}static getLocatorUrl(e){let t=vt.clean(e.reference.slice(fr.length));if(t===null)throw new ot(10,"The npm semver resolver got selected, but the version isn't semver");return`${Nl(e)}/-/${e.name}-${t}.tgz`}};var kce=ne($r());var jb=P.makeIdent(null,"node-gyp"),o6e=/\b(node-gyp|prebuild-install)\b/,qb=class{supportsDescriptor(e,t){returne.range.startsWith(fr)?!!vt.validRange(e.range.slice(fr.length)):!1}supportsLocator(e,t){if(!e.reference.startsWith(fr))return!1;let{selector:i}=P.parseRange(e.refe
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 ${eI.map(t=>`\`${t}\``).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"]]});var ql=ne(Xe()),GK=ne($r()),YK=J("util"),Cg=class extends ve{constructor(){super(...arguments);this.fields=ql.Option.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ql.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ql.Option.Rest()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i}=await He.find(t,this.context.cwd),n=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,s=[],o=!1,a=await Ke.start({configuration:t,includeFooter:!1,json:this.json,stdout:this.context.stdout},async l=>{for(let c of this.packages){let u;if(c==="."){let L=i.topLevelWorkspace;if(!L.manifest.name)throw new ql.UsageError(`Missing${ee.pretty(t,"name",ee.Type.CODE)}fieldin${K.fromPortablePath(x.join(L.cwd,xt.manifest))}`);u=P.makeDescriptor(L.manifest.name,"unknown")}else u=P.parseDescriptor(c);let g=Mt.getIdentUrl(u),f=jK(await Mt.get(g,{configuration:t,ident:u,jsonResponse:!0,customErrorMessage:Mt.customPackageError})),h=Object.keys(f.versions).sort(GK.default.compareLoose),C=f["dist-tags"].latest||h[h.length-1],w=vt.validRange(u.range);if(w){let L=GK.default.maxSatisfying(h,w);L!==null?C=L:(l.reportWarning(0,`Unmetrange${P.prettyRange(t,u.range)};fallingbacktothelatestversion`),o=!0)}else Object.prototype.hasOwnProperty.call(f["dist-tags"],u.range)?C=f["dist-tags"][u.range]:u.range!=="unknown"&&(l.reportWarning(0,`Unknowntag${P.prettyRange(t,u.range)};fallingbacktothelatestversion`),o=!0);let B=f.versions[C],v={...f,...B,version:C,versions:h},D;if(n!==null){D={};for(let L of n){let H=v[L];if(typeof H<"u")D[L]=H;else{l.reportWarning(1,`The${ee.pretty(t,L,ee.Type.CODE)}fielddoesn't exist inside ${P.prettyIdent(t,u)}'sinformation`),o=!0;continue}}}else this.json||(delete v.dist,delete v.readme,delete v.users),D=v;l.reportJson(D),this.json||s.push(D)}});YK.inspect.styles.name="cyan";for(let l of s)(l!==s[0]||o)&&this.context.stdout.write(`
`);return a.exitCode()}};Cg.paths=[["npm","info"]],Cg.usage=ql.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 jK(r){if(Array.isArray(r)){let e=[];for(let t of r)t=jK(t),t&&e.push(t);return e}else if(typeof r=="object"&&r!==null){let e={};for(let t of Object.keys(r)){if(t.startsWith("_"))continue;let i=jK(r[t]);i&&(e[t]=i)}return e}else return r||null}var rI=ne(Xe()),Dge=ne(aE()),mg=class extends ve{constructor(){super(...arguments);this.scope=rI.Option.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=rI.Option.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i=await mS({configuration:t,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ke.start({configuration:t,stdout:this.context.stdout,includeFooter:!1},async s=>{let o=await g7e({configuration:t,registry:i,report:s,stdin:this.context.stdin,stdout:this.context.stdout}),a=`/-/user/org.couchdb.user:${encodeURIComponent(o.name)}`,l=awaitMt.put(a,o,{attemptedAs:o.name,configuration:t,registry:i,jsonResponse:!0,authType:Mt.AuthType.NO_AUTH});returnawaitu7e(i,l.token,{configuration:t,scope:this.scope}),s.reportInfo(0,"Successfullyloggedin")})).exitCode()}};mg.paths=[["npm","login"]],mg.usage=rI.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--publi
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function iI(r,e){let t=`/-/package${Mt.getIdentUrl(r)}/dist-tags`;returnMt.get(t,{configuration:e,ident:r,jsonResponse:!0,customErrorMessage:Mt.customPackageError})}varBg=classextendsve{constructor(){super(...arguments);this.package=Qg.Option.String();this.tag=Qg.Option.String()}asyncexecute(){lett=awaitIe.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=awaitHe.find(t,this.context.cwd);if(!n)thrownewct(i.cwd,this.context.cwd);lets=P.parseDescriptor(this.package,!0),o=s.range;if(!Rge.default.valid(o))thrownewQg.UsageError(`Therange${ee.pretty(t,s.range,ee.Type.RANGE)}mustbeavalidsemverversion`);leta=or.getPublishRegistry(n.manifest,{configuration:t}),l=ee.pretty(t,s,ee.Type.IDENT),c=ee.pretty(t,o,ee.Type.RANGE),u=ee.pretty(t,this.tag,ee.Type.CODE);return(awaitKe.start({configuration:t,stdout:this.context.stdout},asyncf=>{leth=awaitiI(s,t);Object.prototype.hasOwnProperty.call(h,this.tag)&&h[this.tag]===o&&f.reportWarning(0,`Tag${u}isalreadysettoversion${c}`);letp=`/-/package${Mt.getIdentUrl(s)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitMt.put(p,o,{configuration:t,registry:a,ident:s,jsonRequest:!0,jsonResponse:!0}),f.reportInfo(0,`Tag${u}addedtoversion${c}ofpackage${l}`)})).exitCode()}};Bg.paths=[["npm","tag","add"]],Bg.usage=Qg.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"]]});var Jl=ne(Xe());var bg=class extends ve{constructor(){super(...arguments);this.package=Jl.Option.String();this.tag=Jl.Option.String()}async execute(){if(this.tag==="latest")throw new Jl.UsageError("The 'latest' tag cannot be removed.");let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd);if(!n)throw new ct(i.cwd,this.context.cwd);let s=P.parseIdent(this.package),o=or.getPublishRegistry(n.manifest,{configuration:t}),a=ee.pretty(t,this.tag,ee.Type.CODE),l=ee.pretty(t,s,ee.Type.IDENT),c=await iI(s,t);if(!Object.prototype.hasOwnProperty.call(c,this.tag))throw new Jl.UsageError(`${a}isnotatagofpackage${l}`);return(await Ke.start({configuration:t,stdout:this.context.stdout},async g=>{let f=`/-/package${Mt.getIdentUrl(s)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitMt.del(f,{configuration:t,registry:o,ident:s,jsonResponse:!0}),g.reportInfo(0,`Tag${a}removedfrompackage${l}`)})).exitCode()}};bg.paths=[["npm","tag","remove"]],bg.usage=Jl.Command.Usage({category:"Npm-relatedcommands",description:"removeatagfromapackage",details:`
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});var nI=ne(Xe()),Sg=class extends ve{constructor(){super(...arguments);this.scope=nI.Option.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=nI.Option.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),i;return this.scope&&this.publish?i=or.getScopeRegistry(this.scope,{configuration:t,type:or.RegistryType.PUBLISH_REGISTRY}):this.scope?i=or.getScopeRegistry(this.scope,{configuration:t}):this.publish?i=or.getPublishRegistry((await tp(t,this.context.cwd)).manifest,{configuration:t}):i=or.getDefaultRegistry({configuration:t}),(await Ke.start({configuration:t,stdout:this.context.stdout},async s=>{var a,l;let o;try{o=await Mt.get("/-/whoami",{configuration:t,registry:i,authType:Mt.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?P.makeIdent(this.scope,""):void 0})}catch(c){if(((a=c.response)==null?void 0:a.statusCode)===401||((l=c.response)==null?void 0:l.statusCode)===403){s.reportError(41,"Authentication failed - your credentials may have expired");return}else throw c}s.reportInfo(0,o.username)})).exitCode()}};Sg.paths=[["npm","whoami"]],Sg.usage=nI.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 p7e={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:[dg,Cg,mg,Eg,Ig,Bg,yg,bg,Sg]},d7e=p7e;var e1={};ht(e1,{default:()=>R7e,patchUtils:()=>vg});var vg={};ht(vg,{applyPatchFile:()=>IS,diffFolders:()=>ZK,ensureUnpatchedDescriptor:()=>WK,extractPackageToDisk:()=>_K,extractPatchFlags:()=>Kge,isParentRequired:()=>XK,loadPatchFiles:()=>AI,makeDescriptor:()=>zK,makeLocator:()=>VK,makePatchHash:()=>$K,parseDescriptor:()=>oI,parseLocator:()=>aI,parsePatchFile:()=>sI});var C7e=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function Hp(r){return x.relative(ke.root,x.resolve(ke.root,K.toPortablePath(r)))}function m7e(r){let e=r.trim().match(C7e);if(!e)throw new Error(`Badheaderline:'${r}'`);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 E7e=420,I7e=493;var Fge=()=>({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}),y7e=r=>({header:m7e(r),parts:[]}),w7e={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function B7e(r){let e=[],t=Fge(),i="parsing header",n=null,s=null;function o(){n&&(s&&(n.parts.push(s),s=null),t.hunks.push(n),n=null)}function a(){o(),e.push(t),t=Fge()}for(let l=0;l<r.length;l++){let c=r[l];if(i==="parsing header")if(c
`):"";await e.mkdirpPromise(x.dirname(n.path),{chmod:493,utimes:[Pr.SAFE_TIME,Pr.SAFE_TIME]}),await e.writeFilePromise(n.path,s,{mode:n.mode}),await e.utimesPromise(n.path,Pr.SAFE_TIME,Pr.SAFE_TIME)}break;case"patch":await Yp(e,n.path,async()=>{await x7e(n,{baseFs:e,dryRun:t})});break;case"mode change":{let o=(await e.statPromise(n.path)).mode;if(Nge(n.newMode)!==Nge(o))continue;await Yp(e,n.path,async()=>{await e.chmodPromise(n.path,n.newMode)})}break;default:Ee.assertNever(n);break}}function Nge(r){return(r&64)>0}function Lge(r){return r.replace(/\s+$/,"")}function v7e(r,e){return Lge(r)===Lge(e)}async function x7e({hunks:r,path:e},{baseFs:t,dryRun:i=!1}){let n=await t.statSync(e).mode,o=(await t.readFileSync(e,"utf8")).split(/\n/),a=[],l=0,c=0;for(let g of r){let f=Math.max(c,g.header.patched.start+l),h=Math.max(0,f-c),p=Math.max(0,o.length-f-g.header.original.length),C=Math.max(h,p),w=0,B=0,v=null;for(;w<=C;){if(w<=h&&(B=f-w,v=Tge(g,o,B),v!==null)){w=-w;break}if(w<=p&&(B=f+w,v=Tge(g,o,B),v!==null))break;w+=1}if(v===null)throw new Gp(r.indexOf(g),g);a.push(v),l+=w,c=B+g.header.original.length}if(i)return;let u=0;for(let g of a)for(let f of g)switch(f.type){case"splice":{let h=f.index+u;o.splice(h,f.numToDelete,...f.linesToInsert),u+=f.linesToInsert.length-f.numToDelete}break;case"pop":o.pop();break;case"push":o.push(f.line);break;default:Ee.assertNever(f);break}await t.writeFilePromise(e,o.join(`
`),{mode:n})}function Tge(r,e,t){let i=[];for(let n of r.parts)switch(n.type){case"context":case"deletion":{for(let s of n.lines){let o=e[t];if(o==null||!v7e(o,s))return null;t+=1}n.type==="deletion"&&(i.push({type:"splice",index:t-n.lines.length,numToDelete:n.lines.length,linesToInsert:[]}),n.noNewlineAtEndOfFile&&i.push({type:"push",line:""}))}break;case"insertion":i.push({type:"splice",index:t,numToDelete:0,linesToInsert:n.lines}),n.noNewlineAtEndOfFile&&i.push({type:"pop"});break;default:Ee.assertNever(n.type);break}return i}var D7e=/^builtin<([^>]+)>$/;function JK(r,e){let{source:t,selector:i,params:n}=P.parseRange(r);if(t===null)throw new Error("Patch locators must explicitly define their source");let s=i?i.split(/&/).map(c=>K.toPortablePath(c)):[],o=n&&typeof n.locator=="string"?P.parseLocator(n.locator):null,a=n&&typeof n.version=="string"?n.version:null,l=e(t);return{parentLocator:o,sourceItem:l,patchPaths:s,sourceVersion:a}}function oI(r){let{sourceItem:e,...t}=JK(r.range,P.parseDescriptor);return{...t,sourceDescriptor:e}}function aI(r){let{sourceItem:e,...t}=JK(r.reference,P.parseLocator);return{...t,sourceLocator:e}}function WK(r){if(!r.range.startsWith("patch:"))return r;let{sourceItem:e}=JK(r.range,P.parseDescriptor);return e}function Oge({parentLocator:r,sourceItem:e,patchPaths:t,sourceVersion:i,patchHash:n},s){let o=r!==null?{locator:P.stringifyLocator(r)}:{},a=typeof i<"u"?{version:i}:{},l=typeof n<"u"?{hash:n}:{};return P.makeRange({protocol:"patch:",source:s(e),selector:t.join("&"),params:{...a,...l,...o}})}function zK(r,{parentLocator:e,sourceDescriptor:t,patchPaths:i}){return P.makeDescriptor(r,Oge({parentLocator:e,sourceItem:t,patchPaths:i},P.stringifyDescriptor))}function VK(r,{parentLocator:e,sourcePackage:t,patchPaths:i,patchHash:n}){return P.makeLocator(r,Oge({parentLocator:e,sourceItem:t,sourceVersion:t.version,patchPaths:i,patchHash:n},P.stringifyLocator))}function Mge({onAbsolute:r,onRelative:e,onBuiltin:t},i){i.startsWith("~")&&(i=i.slice(1));let s=i.match(D7e);return s!==null?t(s[1]):x.isAbsolute(i)?r(i):e(i)}function Kge(r){let e=r.startsWith("~");return e&&(r=r.slice(1)),{optional:e}}function XK(r){return Mge({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},r)}async function AI(r,e,t){let i=r!==null?await t.fetcher.fetch(r,t):null,n=i&&i.localPath?{packageFs:new jt(ke.root),prefixPath:x.relative(ke.root,i.localPath)}:i;i&&i!==n&&i.releaseFs&&i.releaseFs();let s=await Ee.releaseAfterUseAsync(async()=>await Promise.all(e.map(async o=>{let a=Kge(o),l=await Mge({onAbsolute:async()=>await M.readFilePromise(o,"utf8"),onRelative:async()=>{if(n===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(x.join(n.prefixPath,o),"utf8")},onBuiltin:async c=>await t.project.configuration.firstHook(u=>u.getBuiltinPatch,t.project,c)},o);return{...a,source:l}})));for(let o of s)typeof o.source=="string"&&(o.source=o.source.replace(/\r\n?/g,`
`));return s}async function _K(r,{cache:e,project:t}){let i=t.storedPackages.get(r.locatorHash);if(typeof i>"u")throw new Error("Assertion failed: Expected the package to be registered");let n=t.storedChecksums,s=new ni,o=t.configuration.makeFetcher(),a=await o.fetch(r,{cache:e,project:t,fetcher:o,checksums:n,report:s}),l=await M.mktempPromise(),c=x.join(l,"source"),u=x.join(l,"user"),g=x.join(l,".yarn-patch.json");return await Promise.all([M.copyPromise(c,a.prefixPath,{baseFs:a.packageFs}),M.copyPromise(u,a.prefixPath,{baseFs:a.packageFs}),M.writeJsonPromise(g,{locator:P.stringifyLocator(r),version:i.version})]),M.detachTemp(l),u}async function ZK(r,e){let t=K.fromPortablePath(r).replace(/\\/g,"/"),i=K.fromPortablePath(e).replace(/\\/g,"/"),{stdout:n,stderr:s}=await mr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",t,i],{cwd:K.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(s.length>0)throw new Error(`Unabletodiffdirectories.Makesureyouhavearecentversionof'git'availableinPATH.
${s}`);let o=t.startsWith("/")?a=>a.slice(1):a=>a;return n.replace(new RegExp(`(a|b)(${Ee.escapeRegExp(`/${o(t)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${Ee.escapeRegExp(`/${o(i)}/`)}`,"g"),"$1/").replace(new RegExp(Ee.escapeRegExp(`${t}/`),"g"),"").replace(new RegExp(Ee.escapeRegExp(`${i}/`),"g"),"")}function $K(r,e){let t=[];for(let{source:i}of r){if(i===null)continue;let n=sI(i);for(let s of n){let{semverExclusivity:o,...a}=s;o!==null&&e!==null&&!vt.satisfiesWithPrereleases(e,o)||t.push(JSON.stringify(a))}}return gi.makeHash(`${3}`,...t).slice(0,6)}function Uge(r,{configuration:e,report:t}){for(let i of r.parts)for(let n of i.lines)switch(i.type){case"context":t.reportInfo(null,`${ee.pretty(e,n,"grey")}`);break;case"deletion":t.reportError(28,`-${ee.pretty(e,n,ee.Type.REMOVED)}`);break;case"insertion":t.reportError(28,`+${ee.pretty(e,n,ee.Type.ADDED)}`);break;default:Ee.assertNever(i.type)}}var yS=class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){let i=t.checksums.get(e.locatorHash)||null,[n,s,o]=await t.cache.fetchPackageFromCache(e,i,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,`${P.prettyLocator(t.project.configuration,e)}can'tbefoundinthecacheandwillbefetchedfromthedisk`),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck,...t.cacheOptions});return{packageFs:n,releaseFs:s,prefixPath:P.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){let{parentLocator:i,sourceLocator:n,sourceVersion:s,patchPaths:o}=aI(e),a=await AI(i,o,t),l=await M.mktempPromise(),c=x.join(l,"current.zip"),u=await t.fetcher.fetch(n,t),g=P.getIdentVendorPath(e),f=await nn(),h=new Xr(c,{libzip:f,create:!0,level:t.project.configuration.get("compressionLevel")});await Ee.releaseAfterUseAsync(async()=>{await h.copyPromise(g,u.prefixPath,{baseFs:u.packageFs,stableSort:!0})},u.releaseFs),h.saveAndClose();for(let{source:p,optional:C}of a){if(p===null)continue;let w=new Xr(c,{libzip:f,level:t.project.configuration.get("compressionLevel")}),B=new jt(x.resolve(ke.root,g),{baseFs:w});try{await IS(sI(p),{baseFs:B,version:s})}catch(v){if(!(v instanceof Gp))throw v;let D=t.project.configuration.get("enableInlineHunks"),L=!D&&!C?" (set enableInlineHunks for details)":"",H=`${P.prettyLocator(t.project.configuration,e)}:${v.message}${L}`,j=$=>{!D||Uge(v.hunk,{configuration:t.project.configuration,report:$})};if(w.discardAndClose(),C){t.report.reportWarningOnce(66,H,{reportExtra:j});continue}else throw new ot(66,H,j)}w.saveAndClose()}return new Xr(c,{libzip:f,level:t.project.configuration.get("compressionLevel")})}};var wS=class{supportsDescriptor(e,t){return!!e.range.startsWith("patch:")}supportsLocator(e,t){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,i){let{patchPaths:n}=oI(e);return n.every(s=>!XK(s))?e:P.bindDescriptor(e,{locator:P.stringifyLocator(t)})}getResolutionDependencies(e,t){let{sourceDescriptor:i}=oI(e);return[i]}async getCandidates(e,t,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:n,sourceDescriptor:s,patchPaths:o}=oI(e),a=await AI(n,o,i.fetchOptions),l=t.get(s.descriptorHash);if(typeof l>"u")throw new Error("Assertion failed: The dependency should have been resolved");let c=$K(a,l.version);return[VK(e,{parentLocator:n,sourcePackage:l,patchPaths:o,patchHash:c})]}async getSatisfying(e,t,i){return null}async resolve(e,t){let{sourceLocator:i}=aI(e);return{...await t.resolver.resolve(i,t),...e}}};var Wl=ne(Xe());var xg=class extends ve{constructor(){super(...arguments);this.save=Wl.Option.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=Wl.Option.String()}async execute(){let t=await Ie.find(this.context.cwd,this.context.plugins),{project:i,workspace:n}=await He.find(t,this.context.cwd);if(!n)throw new ct(i.cwd,this.context.cwd);await i.restoreInstallState();let s=x.resolve(this.context.cwd,K.
-${P.prettyLocator(t,l)}`).join("")}`);o=a[0]}if(!i.storedPackages.has(o.locatorHash))thrownewCA.UsageError("No package found in the project for the given locator");awaitKe.start({configuration:t,json:this.json,stdout:this.context.stdout},asynca=>{letl=await_K(o,{cache:s,project:i});a.reportJson({locator:P.stringifyLocator(o),path:K.fromPortablePath(l)}),a.reportInfo(0,`Package ${P.prettyLocator(t,o)} got extracted with success!`),a.reportInfo(0,`You can now edit the following folder: ${ee.pretty(t,K.fromPortablePath(l),"magenta")}`),a.reportInfo(0,`Once you are done run ${ee.pretty(t,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${K.fromPortablePath(l)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Pg.paths=[["patch"]],Pg.usage=CA.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 "});vark7e={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:[xg,Pg],fetchers:[yS],resolvers:[wS]},R7e=k7e;varn1={};ht(n1,{default:()=>L7e});varBS=ne(Xe()),QS=class{supportsPackage(e,t){returnthis.isEnabled(t)}asyncfindPackageLocation(e,t){if(!this.isEnabled(t))thrownewError("Assertion failed: Expected the pnpm linker to be enabled");leti=r1(),n=t.project.installersCustomData.get(i);if(!n)thrownewBS.UsageError(`The project in ${ee.pretty(t.project.configuration,`${t.project.cwd}/package.json`,ee.Type.PATH)} doesn't seem to have been installed - running an install there might help`);lets=n.pathByLocator.get(e.locatorHash);if(typeofs>"u")thrownewBS.UsageError(`Couldn't find ${P.prettyLocator(t.project.configuration,e)} in the currently installed pnpm map - running an install might help`);returns}asyncfindPackageLocator(e,t){if(!this.isEnabled(t))returnnull;leti=r1(),n=t.project.installersCustomData.get(i);if(!n)thrownewBS.UsageError(`The project in ${ee.pretty(t.project.configuration,`${t.project.cwd}/package.json`,ee.Type.PATH)} doesn't seem to have been installed - running an install there might help`);lets=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(s){letl=n.locatorByPath.get(s[1]);if(l)returnl}leto=e,a=e;do{a=o,o=x.dirname(a);letl=n.locatorByPath.get(a);if(l)returnl}while(o!==a);returnnull}makeInstaller(e){returnnewt1(e)}isEnabled(e){returne.project.configuration.get("nodeLinker")==="pnpm"}},t1=class{constructor(e){this.opts=e;this.asyncActions=newEe.AsyncActions(10);this.customData={pathByLocator:newMap,locatorByPath:newMap}}getCustomDataKey(){returnr1()}attachCustomData(e){}asyncinstallPackage(e,t,i){switch(e.linkType){case"SOFT":returnthis.installPackageSoft(e,t,i);case"HARD":returnthis.installPackageHard(e,t,i)}thrownewError("Assertion failed: Unsupported package link type")}asyncinstallPackageSoft(e,t,i){letn=x.resolve(t.packageFs.getRealPath(),t.prefixPath);returnthis.customData.pathByLocator.set(e.locatorHash,n),{packageLocation:n,buildDirective:null}}asyncinstallPackageHard(e,t,i){varu;letn=F7e(e,{project:this.opts.project});this.customData.locatorByPath.set(n,P.stringifyLocator(e)),this.customData.pathByLocator.set(e.locatorHash,n),i.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{awaitM.mkdirPromise(n,{recursive:!0}),awaitM.copyPromise(n,t.prefixPath,{baseFs:t.packageFs,overwrite:!1})}));leto=P.isVirtualLocator(e)?P.devirtualizeLocator(e):e,a={manifest:(u=awaitnt.tryFind(t.prefixPath,{baseFs:t.packageFs}))!=null?u:newnt,misc:{hasBindingGyp:ho.hasBindi