From 0b6f89fa3fae9841a571b9a5650c3d9c9bd8011a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Mon, 14 Dec 2020 10:57:01 -0500 Subject: [PATCH] fix: patch Yarn 2.4.0 --- .yarn/releases/yarn-2.4.0.cjs | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.yarn/releases/yarn-2.4.0.cjs b/.yarn/releases/yarn-2.4.0.cjs index bd15242b2d15..66c913ea2e0a 100755 --- a/.yarn/releases/yarn-2.4.0.cjs +++ b/.yarn/releases/yarn-2.4.0.cjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -module.exports=(()=>{var e={25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},44692:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143);const n={optional:!0},o=[["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":n}}],["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":n,"postcss-jsx":n,"postcss-less":n,"postcss-markdown":n,"postcss-scss":n}}],["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"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:n}}],["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@*",{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@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4"},peerDependenciesMeta:{eslint:n}}],["rc-animate@*",{peerDependencies:{react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.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:n,"utf-8-validate":n}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}]];let i,s,a;const c=new Map([[A.makeIdent(null,"fsevents").identHash,function(){return void 0===i&&(i=r(78761).brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),i}],[A.makeIdent(null,"resolve").identHash,function(){return void 0===s&&(s=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4YABAMGcdPAWzTk26B7cKV91I2b0V/GYvnsEQ1YGntRqi5EQqTlgZszbV/32GuZtUF49JOA/r4jAdwUOsbPo6mNoBlJPYjM5axrZaWQf33bFsLWqiyvvDOM4x0Ng802T7cuP2a3q98GWq6yiq6q3M77hcZlOUnmryctRYmI4Hb2F5XixFohkBmySCjU+M7/WQVE5YAtnlxiUJDhFN0y1tNeMWY9E0MfZi2rQ4eC72WXjsAA==","base64")).toString()),s}],[A.makeIdent(null,"typescript").identHash,function(){return void 0===a&&(a=r(78761).brotliDecompressSync(Buffer.from("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","base64")).toString()),a}]]),g={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(A.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{var r;if(!t.startsWith("compat/"))return;const n=A.parseIdent(t.slice("compat/".length)),o=null===(r=c.get(n.identHash))||void 0===r?void 0:r();return void 0!==o?o:null},reduceDependency:async(e,t,r,n)=>void 0===c.get(e.identHash)?e:A.makeDescriptor(e,A.makeRange({protocol:"patch:",source:A.stringifyDescriptor(e),selector:`builtin`,params:null}))}}},10189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var A=r(36370),n=r(25413),o=r(54143),i=r(40822);class s extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){const e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");const t=o.parseIdent(this.command),r=o.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.stringifyIdent(r),...this.args])}}(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],s.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],s.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],s.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],s.prototype,"args",void 0),(0,A.gn)([i.Command.Path("create")],s.prototype,"execute",null);var a=r(39922),c=r(85824),g=r(63088),l=r(43896),u=r(46009);class h extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){return a.VK.telemetry=null,await l.xfs.mktempPromise(async e=>{const t=u.y1.join(e,"dlx-"+process.pid);await l.xfs.mkdirPromise(t),await l.xfs.writeFilePromise(u.y1.join(t,"package.json"),"{}\n"),await l.xfs.writeFilePromise(u.y1.join(t,"yarn.lock"),"");const r=u.y1.join(t,".yarnrc.yml"),A=await a.VK.findProjectCwd(this.context.cwd,u.QS.lockfile),i=null!==A?u.y1.join(A,".yarnrc.yml"):null;null!==i&&l.xfs.existsSync(i)?(await l.xfs.copyFilePromise(i,r),await a.VK.updateConfiguration(t,e=>{const t={...e,enableGlobalCache:!0,enableTelemetry:!1};return Array.isArray(e.plugins)&&(t.plugins=e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=u.cS.isAbsolute(t)?t:u.cS.resolve(u.cS.fromPortablePath(A),t);return"string"==typeof e?r:{path:r,spec:e.spec}})),t})):await l.xfs.writeFilePromise(r,"enableGlobalCache: true\nenableTelemetry: false\n");const s=void 0!==this.pkg?[this.pkg]:[this.command],h=o.parseDescriptor(this.command).name,p=await this.cli.run(["add","--",...s],{cwd:t,quiet:this.quiet});if(0!==p)return p;this.quiet||this.context.stdout.write("\n");const d=await a.VK.find(t,this.context.plugins),{project:C,workspace:f}=await c.I.find(d,t);if(null===f)throw new n.WorkspaceRequiredError(C.cwd,t);return await C.restoreInstallState(),await g.executeWorkspaceAccessibleBinary(f,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=i.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 `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]}),(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],h.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],h.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],h.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],h.prototype,"args",void 0),(0,A.gn)([i.Command.Path("dlx")],h.prototype,"execute",null);const p={commands:[s,h]}},34777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{dedupeUtils:()=>A,default:()=>We,suggestUtils:()=>A});var A={};r.r(A),r.d(A,{Modifier:()=>o,Strategy:()=>i,Target:()=>n,applyModifier:()=>S,extractDescriptorFromPath:()=>N,extractRangeModifier:()=>v,fetchDescriptorFrom:()=>K,findProjectDescriptors:()=>k,getModifier:()=>D,getSuggestedDescriptors:()=>F});var n,o,i,s=r(39922),a=r(36370),c=r(25413),g=r(28148),l=r(62152),u=r(92659),h=r(85824),p=r(15815),d=r(54143),C=r(40822),f=r(61899),I=r(33720),E=r(46611),B=r(71643),y=r(43896),m=r(46009),w=r(53887),Q=r.n(w);function D(e,t){return e.exact?o.EXACT:e.caret?o.CARET:e.tilde?o.TILDE:t.configuration.get("defaultSemverRangePrefix")}!function(e){e.REGULAR="dependencies",e.DEVELOPMENT="devDependencies",e.PEER="peerDependencies"}(n||(n={})),function(e){e.CARET="^",e.TILDE="~",e.EXACT=""}(o||(o={})),function(e){e.KEEP="keep",e.REUSE="reuse",e.PROJECT="project",e.LATEST="latest",e.CACHE="cache"}(i||(i={}));const b=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function v(e,{project:t}){const r=e.match(b);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function S(e,t){let{protocol:r,source:A,params:n,selector:o}=d.parseRange(e.range);return Q().valid(o)&&(o=`${t}${e.range}`),d.makeDescriptor(e,d.makeRange({protocol:r,source:A,params:n,selector:o}))}async function k(e,{project:t,target:r}){const A=new Map,o=e=>{let t=A.get(e.descriptorHash);return t||A.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const A of t.workspaces)if(r===n.PEER){const t=A.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(A.locator)}else{const t=A.manifest.dependencies.get(e.identHash),i=A.manifest.devDependencies.get(e.identHash);r===n.DEVELOPMENT?void 0!==i?o(i).locators.push(A.locator):void 0!==t&&o(t).locators.push(A.locator):void 0!==t?o(t).locators.push(A.locator):void 0!==i&&o(i).locators.push(A.locator)}return A}async function N(e,{cwd:t,workspace:r}){return await async function(e){return await y.xfs.mktempPromise(async t=>{const r=s.VK.create(t);return r.useWithSource(t,{enableMirror:!1,compressionLevel:0},t,{overwrite:!0}),await e(new g.C(t,{configuration:r,check:!1,immutable:!1}))})}(async A=>{m.y1.isAbsolute(e)||(e=m.y1.relative(r.cwd,m.y1.resolve(t,e))).match(/^\.{0,2}\//)||(e="./"+e);const{project:n}=r,o=await K(d.makeIdent(null,"archive"),e,{project:r.project,cache:A,workspace:r});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const i=new I.$,s=n.configuration.makeResolver(),a=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:A,fetcher:a,report:i,resolver:s},g=s.bindDescriptor(o,r.anchoredLocator,c),l=d.convertDescriptorToLocator(g),u=await a.fetch(l,c),h=await E.G.find(u.prefixPath,{baseFs:u.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return d.makeDescriptor(h.name,e)})}async function F(e,{project:t,workspace:r,cache:A,target:o,modifier:s,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return{suggestions:[{descriptor:e,name:"Use "+d.prettyDescriptor(t.configuration,e),reason:"(unambiguous explicit request)"}],rejections:[]};const g=null!=r&&r.manifest[o].get(e.identHash)||null,l=[],u=[],h=async e=>{try{await e()}catch(e){u.push(e)}};for(const u of a){if(l.length>=c)break;switch(u){case i.KEEP:await h(async()=>{g&&l.push({descriptor:g,name:"Keep "+d.prettyDescriptor(t.configuration,g),reason:"(no changes)"})});break;case i.REUSE:await h(async()=>{for(const{descriptor:A,locators:n}of(await k(e,{project:t,target:o})).values()){if(1===n.length&&n[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(i.KEEP))continue;let e="(originally used by "+d.prettyLocator(t.configuration,n[0]);e+=n.length>1?` and ${n.length-1} other${n.length>2?"s":""})`:")",l.push({descriptor:A,name:"Reuse "+d.prettyDescriptor(t.configuration,A),reason:e})}});break;case i.CACHE:await h(async()=>{for(const r of t.storedDescriptors.values())r.identHash===e.identHash&&l.push({descriptor:r,name:"Reuse "+d.prettyDescriptor(t.configuration,r),reason:"(already used somewhere in the lockfile)"})});break;case i.PROJECT:await h(async()=>{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)return;const A=t.tryWorkspaceByIdent(e);null!==A&&l.push({descriptor:A.anchoredDescriptor,name:"Attach "+d.prettyWorkspace(t.configuration,A),reason:`(local workspace at ${A.cwd})`})});break;case i.LATEST:await h(async()=>{if("unknown"!==e.range)l.push({descriptor:e,name:"Use "+d.prettyRange(t.configuration,e.range),reason:"(explicit range requested)"});else if(o===n.PEER)l.push({descriptor:d.makeDescriptor(e,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(t.configuration.get("enableNetwork")){let n=await K(e,"latest",{project:t,cache:A,workspace:r,preserveModifier:!1});n&&(n=S(n,s),l.push({descriptor:n,name:"Use "+d.prettyDescriptor(t.configuration,n),reason:"(resolved from latest)"}))}else l.push({descriptor:null,name:"Resolve from latest",reason:B.pretty(t.configuration,"(unavailable because enableNetwork is toggled off)","grey")})})}}return{suggestions:l.slice(0,c),rejections:u.slice(0,c)}}async function K(e,t,{project:r,cache:A,workspace:n,preserveModifier:o=!0}){const i=d.makeDescriptor(e,t),s=new I.$,a=r.configuration.makeFetcher(),c=r.configuration.makeResolver(),g={project:r,fetcher:a,cache:A,checksums:r.storedChecksums,report:s,skipIntegrityCheck:!0},l={...g,resolver:c,fetchOptions:g},u=c.bindDescriptor(i,n.anchoredLocator,l),h=await c.getCandidates(u,new Map,l);if(0===h.length)return null;const p=h[0];let{protocol:C,source:f,params:E,selector:B}=d.parseRange(d.convertToManifestRange(p.reference));if(C===r.configuration.get("defaultProtocol")&&(C=null),Q().valid(B)&&!1!==o){B=v("string"==typeof o?o:i.range,{project:r})+B}return d.makeDescriptor(p,d.makeRange({protocol:C,source:f,params:E,selector:B}))}class M extends c.BaseCommand{constructor(){super(...arguments),this.packages=[],this.json=!1,this.exact=!1,this.tilde=!1,this.caret=!1,this.dev=!1,this.peer=!1,this.optional=!1,this.preferDev=!1,this.interactive=null,this.cached=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=[...a?[i.REUSE]:[],i.PROJECT,...this.cached?[i.CACHE]:[],i.LATEST],B=a?1/0:1,y=await Promise.all(this.packages.map(async e=>{const t=e.match(/^\.{0,2}\//)?await N(e,{cwd:this.context.cwd,workspace:A}):d.parseDescriptor(e),i=function(e,t,{dev:r,peer:A,preferDev:o,optional:i}){const s=e.manifest[n.REGULAR].has(t.identHash),a=e.manifest[n.DEVELOPMENT].has(t.identHash),c=e.manifest[n.PEER].has(t.identHash);if((r||A)&&s)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(i&&a)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(i&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||o)&&i)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return A?n.PEER:r||o?n.DEVELOPMENT:s?n.REGULAR:a?n.DEVELOPMENT:n.REGULAR}(A,t,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[t,await F(t,{project:r,workspace:A,cache:o,target:i,modifier:I,strategies:E,maxResults:B}),i]})),m=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[A,{suggestions:n,rejections:o}]of y){if(0===n.filter(e=>null!==e.descriptor).length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range:\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled):\n\n${i}`)}}});if(m.hasErrors())return m.exitCode();let w=!1;const Q=[],b=[];for(const[,{suggestions:e},t]of y){let r;const n=e.filter(e=>null!==e.descriptor),o=n[0].descriptor,i=n.every(e=>d.areDescriptorsEqual(e.descriptor,o));1===n.length||i?r=o:(w=!0,({answer:r}=await(0,f.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const s=A.manifest[t].get(r.identHash);void 0!==s&&s.descriptorHash===r.descriptorHash||(A.manifest[t].set(r.identHash,r),this.optional&&("dependencies"===t?A.manifest.ensureDependencyMeta({...r,range:"unknown"}).optional=!0:"peerDependencies"===t&&(A.manifest.ensurePeerDependencyMeta({...r,range:"unknown"}).optional=!0)),void 0===s?Q.push([A,t,r,E]):b.push([A,t,s,r]))}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,Q),await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,b),w&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await r.install({cache:o,report:e})})).exitCode()}}M.usage=C.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\": { \"\": { \"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 For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]}),(0,a.gn)([C.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],M.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],M.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],M.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],M.prototype,"caret",void 0),(0,a.gn)([C.Command.Boolean("-D,--dev",{description:"Add a package as a dev dependency"})],M.prototype,"dev",void 0),(0,a.gn)([C.Command.Boolean("-P,--peer",{description:"Add a package as a peer dependency"})],M.prototype,"peer",void 0),(0,a.gn)([C.Command.Boolean("-O,--optional",{description:"Add / upgrade a package to an optional regular / peer dependency"})],M.prototype,"optional",void 0),(0,a.gn)([C.Command.Boolean("--prefer-dev",{description:"Add / upgrade a package to a dev dependency"})],M.prototype,"preferDev",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"})],M.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("--cached",{description:"Reuse the highest version already used somewhere within the project"})],M.prototype,"cached",void 0),(0,a.gn)([C.Command.Path("add")],M.prototype,"execute",null);var R=r(63088);class x extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await h.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const A=(await R.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!A)throw new C.UsageError(`Couldn't find a binary named "${this.name}" for package "${d.prettyLocator(e,r)}"`);const[,n]=A;return this.context.stdout.write(n+"\n"),0}return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async A=>{const n=await R.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(n.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of n)A.reportJson({name:e,source:d.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of n)A.reportInfo(null,`${t.padEnd(o," ")} ${d.prettyLocator(e,r)}`);else for(const e of n.keys())A.reportInfo(null,e)})).exitCode()}}x.usage=C.Command.Usage({description:"get the path to a binary script",details:"\n When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the `-v,--verbose` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([C.Command.String({required:!1})],x.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print both the binary name and the locator of the package that provides the binary"})],x.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],x.prototype,"json",void 0),(0,a.gn)([C.Command.Path("bin")],x.prototype,"execute",null);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=await g.C.find(e);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await y.xfs.removePromise(t.mirrorCwd),r&&await y.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=C.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\n ",examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]}),(0,a.gn)([C.Command.Boolean("--mirror",{description:"Remove the global cache files instead of the local cache files"})],L.prototype,"mirror",void 0),(0,a.gn)([C.Command.Boolean("--all",{description:"Remove both the global cache files and the local cache files of the current project"})],L.prototype,"all",void 0),(0,a.gn)([C.Command.Path("cache","clean")],L.prototype,"execute",null);var P=r(73632),O=r(44674),U=r.n(O),T=r(31669);class j extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0}),n=P.convertMapsToIndexableObjects(A),o=r?U()(n,r):n,i=await p.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(o)});if(!this.json){if("string"==typeof o)return this.context.stdout.write(o+"\n"),i.exitCode();T.inspect.styles.name="cyan",this.context.stdout.write((0,T.inspect)(o,{depth:1/0,colors:e.get("enableColors"),compact:!1})+"\n")}return i.exitCode()}}j.usage=C.Command.Usage({description:"read a configuration settings",details:"\n This command will print a configuration setting.\n\n Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the `--no-redacted` to get the untransformed value.\n ",examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration","yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'"],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]}),(0,a.gn)([C.Command.String()],j.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],j.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--no-redacted",{description:"Don't redact secrets (such as tokens) from the output"})],j.prototype,"unsafe",void 0),(0,a.gn)([C.Command.Path("config","get")],j.prototype,"execute",null);var Y=r(82558),G=r.n(Y),H=r(81534),J=r.n(H);class q extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.home=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new C.UsageError("This command must be run from within a project folder");const t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*\.?/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=this.json?JSON.parse(this.value):this.value,n=this.home?e=>s.VK.updateHomeConfiguration(e):t=>s.VK.updateConfiguration(e.projectCwd,t);await n(e=>{if(r){const t=G()(e);return J()(t,this.name,A),t}return{...e,[t]:A}});const o=(await s.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0}),i=P.convertMapsToIndexableObjects(o),a=r?U()(i,r):i;return(await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async t=>{T.inspect.styles.name="cyan",t.reportInfo(u.b.UNNAMED,`Successfully set ${this.name} to ${(0,T.inspect)(a,{depth:1/0,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}}q.usage=C.Command.Usage({description:"change a configuration settings",details:"\n This command will set a configuration setting.\n\n When used without the `--json` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n When used with the `--json` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n ",examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",'yarn config set unsafeHttpWhitelist --json \'["*.example.com", "example.com"]\''],["Set a complex configuration setting (an Object) using the `--json` flag",'yarn config set packageExtensions --json \'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }\''],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",'yarn config set \'npmRegistries["//npm.example.com"].npmAuthToken\' "ffffffff-ffff-ffff-ffff-ffffffffffff"']]}),(0,a.gn)([C.Command.String()],q.prototype,"name",void 0),(0,a.gn)([C.Command.String()],q.prototype,"value",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Set complex configuration settings to JSON values"})],q.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-H,--home",{description:"Update the home configuration instead of the project configuration"})],q.prototype,"home",void 0),(0,a.gn)([C.Command.Path("config","set")],q.prototype,"execute",null);class z extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,A]of e.invalid)t.reportError(u.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${A}`);t.reportSeparator()}if(this.json){const r=P.sortMap(e.settings.keys(),e=>e);for(const A of r){const r=e.settings.get(A),n=e.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(A);this.verbose?t.reportJson({key:A,effective:n,source:o}):t.reportJson({key:A,effective:n,source:o,...r})}}else{const r=P.sortMap(e.settings.keys(),e=>e),A=r.reduce((e,t)=>Math.max(e,t.length),0),n={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){const o=r.map(t=>{const r=e.settings.get(t);if(!r)throw new Error(`Assertion failed: This settings ("${t}") should have been registered`);return[t,this.why?e.sources.get(t)||"":r.description]}),i=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,s]of o)t.reportInfo(null,`${r.padEnd(A," ")} ${s.padEnd(i," ")} ${(0,T.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),n)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(A," ")} ${(0,T.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),n)}`)}})).exitCode()}}z.usage=C.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print the setting description on top of the regular key/value information"})],z.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--why",{description:"Print the reason why a setting is set a particular way"})],z.prototype,"why",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],z.prototype,"json",void 0),(0,a.gn)([C.Command.Path("config")],z.prototype,"execute",null);var W,X=r(15966),V=r(35691),_=r(2401),Z=r.n(_);!function(e){e.HIGHEST="highest"}(W||(W={}));const $=new Set(Object.values(W)),ee={highest:async(e,t,{resolver:r,fetcher:A,resolveOptions:n,fetchOptions:o})=>{const i=new Map;for(const[t,r]of e.storedResolutions){const A=e.storedDescriptors.get(t);if(void 0===A)throw new Error(`Assertion failed: The descriptor (${t}) should have been registered`);P.getSetWithDefault(i,A.identHash).add(r)}return Array.from(e.storedDescriptors.values(),async A=>{if(t.length&&!Z().isMatch(d.stringifyIdent(A),t))return null;const o=e.storedResolutions.get(A.descriptorHash);if(void 0===o)throw new Error(`Assertion failed: The resolution (${A.descriptorHash}) should have been registered`);const s=e.originalPackages.get(o);if(void 0===s)return null;if(!r.shouldPersistResolution(s,n))return null;const a=i.get(A.identHash);if(void 0===a)throw new Error(`Assertion failed: The resolutions (${A.identHash}) should have been registered`);if(1===a.size)return null;const c=[...a].map(t=>{const r=e.originalPackages.get(t);if(void 0===r)throw new Error(`Assertion failed: The package (${t}) should have been registered`);return r.reference}),g=await r.getSatisfying(A,c,n),l=null==g?void 0:g[0];if(void 0===l)return null;const u=l.locatorHash,h=e.originalPackages.get(u);if(void 0===h)throw new Error(`Assertion failed: The package (${u}) should have been registered`);return u===o?null:{descriptor:A,currentPackage:s,updatedPackage:h}})}};class te extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.strategy=W.HIGHEST,this.check=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd),r=await g.C.find(e);let A=0;const n=await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async e=>{A=await async function(e,{strategy:t,patterns:r,cache:A,report:n}){const{configuration:o}=e,i=new I.$,s=o.makeResolver(),a=o.makeFetcher(),c={cache:A,checksums:e.storedChecksums,fetcher:a,project:e,report:i,skipIntegrityCheck:!0},g={project:e,resolver:s,report:i,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{const A=ee[t],i=await A(e,r,{resolver:s,resolveOptions:g,fetcher:a,fetchOptions:c}),l=V.yG.progressViaCounter(i.length);n.reportProgress(l);let h,p=0;switch(await Promise.all(i.map(t=>t.then(t=>{if(null===t)return;p++;const{descriptor:r,currentPackage:A,updatedPackage:i}=t;n.reportInfo(u.b.UNNAMED,`${d.prettyDescriptor(o,r)} can be deduped from ${d.prettyLocator(o,A)} to ${d.prettyLocator(o,i)}`),n.reportJson({descriptor:d.stringifyDescriptor(r),currentResolution:d.stringifyLocator(A),updatedResolution:d.stringifyLocator(i)}),e.storedResolutions.set(r.descriptorHash,i.locatorHash)}).finally(()=>l.tick()))),p){case 0:h="No packages";break;case 1:h="One package";break;default:h=p+" packages"}const C=B.pretty(o,t,B.Type.CODE);return n.reportInfo(u.b.UNNAMED,`${h} can be deduped using the ${C} strategy`),p})}(t,{strategy:this.strategy,patterns:this.patterns,cache:r,report:e})});if(n.hasErrors())return n.exitCode();if(this.check)return A?1:0;return(await p.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async e=>{await t.install({cache:r,report:e})})).exitCode()}}te.schema=X.object().shape({strategy:X.string().test({name:"strategy",message:"${path} must be one of ${strategies}",params:{strategies:[...$].join(", ")},test:e=>$.has(e)})}),te.usage=C.Command.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]}),(0,a.gn)([C.Command.Rest()],te.prototype,"patterns",void 0),(0,a.gn)([C.Command.String("-s,--strategy",{description:"The strategy to use when deduping dependencies"})],te.prototype,"strategy",void 0),(0,a.gn)([C.Command.Boolean("-c,--check",{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"})],te.prototype,"check",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],te.prototype,"json",void 0),(0,a.gn)([C.Command.Path("dedupe")],te.prototype,"execute",null);class re extends C.Command{async execute(){const{plugins:e}=await s.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const A=C.Cli.from(e).definitions();t.push([r[0],A])}}const A=this.cli.definitions(),n=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)A.find(e=>{return t=e.path,A=r.path,t.split(" ").slice(1).join()===A.split(" ").slice(1).join();var t,A}).plugin={name:e[0],isDefault:n.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:A},null,2)+"\n")}}(0,a.gn)([C.Command.Path("--clipanion=definitions")],re.prototype,"execute",null);class Ae extends C.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([C.Command.Path("help"),C.Command.Path("--help"),C.Command.Path("-h")],Ae.prototype,"execute",null);class ne extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!d.tryParseIdent(this.leadingArgument)){const e=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}return await this.cli.run(["run",this.leadingArgument,...this.args])}}(0,a.gn)([C.Command.String()],ne.prototype,"leadingArgument",void 0),(0,a.gn)([C.Command.Proxy()],ne.prototype,"args",void 0);var oe=r(59355);class ie extends C.Command{async execute(){this.context.stdout.write((oe.o||"")+"\n")}}(0,a.gn)([C.Command.Path("-v"),C.Command.Path("--version")],ie.prototype,"execute",null);var se=r(6220);class ae extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return await y.xfs.mktempPromise(async e=>{const{code:r}=await se.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await R.makeScriptEnv({project:t,binFolder:e})});return r})}}ae.usage=C.Command.Usage({description:"execute a shell command",details:"\n This command simply executes a shell binary within the context of the root directory of the active workspace.\n\n It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n ",examples:[["Execute a shell command","$0 exec echo Hello World"]]}),(0,a.gn)([C.Command.String()],ae.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ae.prototype,"args",void 0),(0,a.gn)([C.Command.Path("exec")],ae.prototype,"execute",null);var ce=r(36545);class ge extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);if(await t.applyLightResolution(),void 0!==this.hash)return await async function(e,t,r){const{configuration:A}=t,n=t.peerRequirements.get(e);if(void 0===n)throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await p.Pk.start({configuration:A,stdout:r.stdout,includeFooter:!1},async e=>{var r,o;const i=t.storedPackages.get(n.subject);if(void 0===i)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(n.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(r=i.dependencies.get(n.requested.identHash))&&void 0!==r?r:null,c=null!==a?t.storedResolutions.get(a.descriptorHash):null;if(void 0===c)throw new Error("Assertion failed: Expected the resolution to have been registered");const g=null!==c?t.storedPackages.get(c):null;if(void 0===g)throw new Error("Assertion failed: Expected the provided package to have been registered");const l=[...n.allRequesters.values()].map(e=>{const r=t.storedPackages.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the package to be registered");const A=d.devirtualizeLocator(r),o=t.storedPackages.get(A.locatorHash);if(void 0===o)throw new Error("Assertion failed: Expected the package to be registered");const i=o.peerDependencies.get(n.requested.identHash);if(void 0===i)throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:r,peerDependency:i}});if(null!==g){const t=l.every(({peerDependency:e})=>ce.satisfiesWithPrereleases(g.version,e.range));e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} provides ${d.prettyLocator(A,g)} with version ${d.prettyReference(A,null!==(o=g.version)&&void 0!==o?o:"")}, which ${t?"satisfies":"doesn't satisfy"} the following requirements:`)}else e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} doesn't provide ${d.prettyIdent(A,n.requested)}, breaking the following requirements:`);e.reportSeparator();const h=B.mark(A),p=[];for(const{pkg:e,peerDependency:t}of P.sortMap(l,e=>d.stringifyLocator(e.pkg))){const r=null!==g&&ce.satisfiesWithPrereleases(g.version,t.range)?h.Check:h.Cross;p.push({stringifiedLocator:d.stringifyLocator(e),prettyLocator:d.prettyLocator(A,e),prettyRange:d.prettyRange(A,t.range),mark:r})}const C=Math.max(...p.map(({stringifiedLocator:e})=>e.length)),f=Math.max(...p.map(({prettyRange:e})=>e.length));for(const{stringifiedLocator:t,prettyLocator:r,prettyRange:A,mark:n}of P.sortMap(p,({stringifiedLocator:e})=>e))e.reportInfo(null,`${r.padEnd(C+(r.length-t.length)," ")} → ${A.padEnd(f," ")} ${n}`);p.length>1&&(e.reportSeparator(),e.reportInfo(u.b.UNNAMED,"Note: these requirements start with "+d.prettyLocator(t.configuration,s)))})).exitCode()}(this.hash,t,{stdout:this.context.stdout});return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async r=>{var A;const n=[([,e])=>d.stringifyLocator(t.storedPackages.get(e.subject)),([,e])=>d.stringifyIdent(e.requested)];for(const[o,i]of P.sortMap(t.peerRequirements,n)){const n=t.storedPackages.get(i.subject);if(void 0===n)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(i.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(A=n.dependencies.get(i.requested.identHash))&&void 0!==A?A:null,c=B.pretty(e,o,B.Type.CODE),g=d.prettyLocator(e,n),l=d.prettyIdent(e,i.requested),u=d.prettyIdent(e,s),h=i.allRequesters.length-1,p="descendant"+(1===h?"":"s"),C=h>0?` and ${h} ${p}`:"",f=null!==a?"provides":"doesn't provide";r.reportInfo(null,`${c} → ${g} ${f} ${l} to ${u}${C}`)}})).exitCode()}}ge.schema=X.object().shape({hash:X.string().matches(/^p[0-9a-f]{5}$/)}),ge.usage=C.Command.Usage({description:"explain a set of peer requirements",details:"\n A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.\n\n When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.\n\n When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.\n\n **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (`yarn explain peer-requirements`).\n ",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"]]}),(0,a.gn)([C.Command.String({required:!1})],ge.prototype,"hash",void 0),(0,a.gn)([C.Command.Path("explain","peer-requirements")],ge.prototype,"execute",null);var le=r(85875);class ue extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.extra=[],this.cache=!1,this.dependents=!1,this.manifest=!1,this.nameOnly=!1,this.virtuals=!1,this.json=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r&&!this.all)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");const o=(e,{recursive:r})=>{const A=e.anchoredLocator.locatorHash,n=new Map,o=[A];for(;o.length>0;){const e=o.shift();if(n.has(e))continue;const i=t.storedPackages.get(e);if(void 0===i)throw new Error("Assertion failed: Expected the package to be registered");if(n.set(e,i),d.isVirtualLocator(i)&&o.push(d.devirtualizeLocator(i).locatorHash),r||e===A)for(const e of i.dependencies.values()){const r=t.storedResolutions.get(e.descriptorHash);if(void 0===r)throw new Error("Assertion failed: Expected the resolution to be registered");o.push(r)}}return n.values()},i=({all:e,recursive:A})=>e&&A?t.storedPackages.values():e?(({recursive:e})=>{const r=new Map;for(const A of t.workspaces)for(const t of o(A,{recursive:e}))r.set(t.locatorHash,t);return r.values()})({recursive:A}):o(r,{recursive:A}),{selection:a,sortedLookup:l}=(({all:e,recursive:t})=>{const r=i({all:e,recursive:t}),A=this.patterns.map(e=>{const t=d.parseLocator(e),r=Z().makeRe(d.stringifyIdent(t)),A=d.isVirtualLocator(t),n=A?d.devirtualizeLocator(t):t;return e=>{const o=d.stringifyIdent(e);if(!r.test(o))return!1;if("unknown"===t.reference)return!0;const i=d.isVirtualLocator(e),s=i?d.devirtualizeLocator(e):e;return(!A||!i||t.reference===e.reference)&&n.reference===s.reference}}),n=P.sortMap([...r],e=>d.stringifyLocator(e));return{selection:n.filter(e=>0===A.length||A.some(t=>t(e))),sortedLookup:n}})({all:this.all,recursive:this.recursive});if(0===a.length)throw new C.UsageError("No package matched your request");const u=new Map;if(this.dependents)for(const e of l)for(const r of e.dependencies.values()){const A=t.storedResolutions.get(r.descriptorHash);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to be registered");P.getArrayWithDefault(u,A).push(e)}const p=new Map;for(const e of l){if(!d.isVirtualLocator(e))continue;const t=d.devirtualizeLocator(e);P.getArrayWithDefault(p,t.locatorHash).push(e)}const f={},m={children:f},w=e.makeFetcher(),Q={project:t,fetcher:w,cache:A,checksums:t.storedChecksums,report:new I.$,skipIntegrityCheck:!0},D=[async(e,t,r)=>{var A,n;if(!t.has("manifest"))return;const o=await w.fetch(e,Q);let i;try{i=await E.G.find(o.prefixPath,{baseFs:o.packageFs})}finally{null===(A=o.releaseFs)||void 0===A||A.call(o)}r("Manifest",{License:B.tuple(B.Type.NO_HINT,i.license),Homepage:B.tuple(B.Type.URL,null!==(n=i.raw.homepage)&&void 0!==n?n:null)})},async(e,r,n)=>{var o;if(!r.has("cache"))return;const i=null!==(o=t.storedChecksums.get(e.locatorHash))&&void 0!==o?o:null,s=A.getLocatorPath(e,i);let a;if(null!==s)try{a=y.xfs.statSync(s)}catch(e){}const c=void 0!==a?[a.size,B.Type.SIZE]:void 0;n("Cache",{Checksum:B.tuple(B.Type.NO_HINT,i),Path:B.tuple(B.Type.PATH,s),Size:c})}];for(const r of a){const A=d.isVirtualLocator(r);if(!this.virtuals&&A)continue;const o={},i={value:[r,B.Type.LOCATOR],children:o};if(f[d.stringifyLocator(r)]=i,this.nameOnly){delete i.children;continue}const s=p.get(r.locatorHash);void 0!==s&&(o.Instances={label:"Instances",value:B.tuple(B.Type.NUMBER,s.length)}),o.Version={label:"Version",value:B.tuple(B.Type.NO_HINT,r.version)};const a=(e,t)=>{const r={};if(o[e]=r,Array.isArray(t))r.children=t.map(e=>({value:e}));else{const e={};r.children=e;for(const[r,A]of Object.entries(t))void 0!==A&&(e[r]={label:r,value:A})}};if(!A){for(const e of D)await e(r,n,a);await e.triggerHook(e=>e.fetchPackageInfo,r,n,a)}r.bin.size>0&&!A&&a("Exported Binaries",[...r.bin.keys()].map(e=>B.tuple(B.Type.PATH,e)));const c=u.get(r.locatorHash);void 0!==c&&c.length>0&&a("Dependents",c.map(e=>B.tuple(B.Type.LOCATOR,e))),r.dependencies.size>0&&!A&&a("Dependencies",[...r.dependencies.values()].map(e=>{var r;const A=t.storedResolutions.get(e.descriptorHash),n=void 0!==A&&null!==(r=t.storedPackages.get(A))&&void 0!==r?r:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:n})})),r.peerDependencies.size>0&&A&&a("Peer dependencies",[...r.peerDependencies.values()].map(e=>{var A,n;const o=r.dependencies.get(e.identHash),i=void 0!==o&&null!==(A=t.storedResolutions.get(o.descriptorHash))&&void 0!==A?A:null,s=null!==i&&null!==(n=t.storedPackages.get(i))&&void 0!==n?n:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:s})}))}le.emitTree(m,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}}ue.usage=C.Command.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Print versions of a package from the whole project"})],ue.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"Print information for all packages, including transitive dependencies"})],ue.prototype,"recursive",void 0),(0,a.gn)([C.Command.Array("-X,--extra",{description:"An array of requests of extra data provided by plugins"})],ue.prototype,"extra",void 0),(0,a.gn)([C.Command.Boolean("--cache",{description:"Print information about the cache entry of a package (path, size, checksum)"})],ue.prototype,"cache",void 0),(0,a.gn)([C.Command.Boolean("--dependents",{description:"Print all dependents for each matching package"})],ue.prototype,"dependents",void 0),(0,a.gn)([C.Command.Boolean("--manifest",{description:"Print data obtained by looking at the package archive (license, homepage, ...)"})],ue.prototype,"manifest",void 0),(0,a.gn)([C.Command.Boolean("--name-only",{description:"Only print the name for the matching packages"})],ue.prototype,"nameOnly",void 0),(0,a.gn)([C.Command.Boolean("--virtuals",{description:"Print each instance of the virtual packages"})],ue.prototype,"virtuals",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],ue.prototype,"json",void 0),(0,a.gn)([C.Command.Rest()],ue.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("info")],ue.prototype,"execute",null);var he=r(11640),pe=r(5864);class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.skipBuilds=!1,this.silent=!1}async execute(){var e,t,r;const A=await s.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&A.useWithSource("",{enableInlineBuilds:this.inlineBuilds},A.startingCwd,{overwrite:!0});const n=!!process.env.NOW_BUILDER,o=!!process.env.NETLIFY,i=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(e,{error:t})=>{const r=await p.Pk.start({configuration:A,stdout:this.context.stdout,includeFooter:!1},async r=>{t?r.reportError(u.b.DEPRECATED_CLI_SETTINGS,e):r.reportWarning(u.b.DEPRECATED_CLI_SETTINGS,e)});return r.hasErrors()?r.exitCode():null};if(void 0!==this.ignoreEngines){const e=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!n});if(null!==e)return e}if(void 0!==this.registry){const e=await a("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(null!==e)return e}if(void 0!==this.preferOffline){const e=await a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!n});if(null!==e)return e}if(void 0!==this.production){const e=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(null!==e)return e}if(void 0!==this.nonInteractive){const e=await a("The --non-interactive option is deprecated",{error:!i});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!i&&!pe.TRAVIS});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!o});if(null!==e)return e}const l=void 0===this.immutable&&void 0===this.frozenLockfile?null!==(e=A.get("enableImmutableInstalls"))&&void 0!==e&&e:null!==(r=null!==(t=this.immutable)&&void 0!==t?t:this.frozenLockfile)&&void 0!==r&&r;if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{await async function(e,t){if(!e.projectCwd)return!1;const r=m.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await y.xfs.existsPromise(r))return!1;const A=await y.xfs.readFilePromise(r,"utf8");if(!A.includes("<<<<<<<"))return!1;if(t)throw new V.lk(u.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[n,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let A=!1;for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith("<<<<<<<")){for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if("======="===e){A=!1;break}A||e.startsWith("|||||||")?A=!0:t[0].push(e)}for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith(">>>>>>>"))break;t[1].push(e)}}else t[0].push(e),t[1].push(e)}return[t[0].join("\n"),t[1].join("\n")]}(A);let i,s;try{i=(0,he.parseSyml)(n),s=(0,he.parseSyml)(o)}catch(e){throw new V.lk(u.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...i,...s};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await y.xfs.changeFilePromise(r,(0,he.stringifySyml)(a),{automaticNewlines:!0}),!0}(A,l)&&(e.reportInfo(u.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍"),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{var t;(null===(t=s.VK.telemetry)||void 0===t?void 0:t.isNew)&&(e.reportInfo(u.b.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),e.reportInfo(u.b.TELEMETRY_NOTICE,`Run ${B.pretty(A,"yarn config set --home enableTelemetry 0",B.Type.CODE)} to disable`),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}const{project:d,workspace:C}=await h.I.find(A,this.context.cwd),f=await g.C.find(A,{immutable:this.immutableCache,check:this.checkCache});if(!C)throw new c.WorkspaceRequiredError(d.cwd,this.context.cwd);await d.restoreInstallState({restoreResolutions:!1});return(await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await d.install({cache:f,report:e,immutable:l,skipBuild:this.skipBuilds})})).exitCode()}}de.usage=C.Command.Usage({description:"install the project dependencies",details:"\n This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where are stored the cache files).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.js file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.js file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set, Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePaths` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--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).\n\n If the `--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.\n\n If the `--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.\n\n If the `--skip-builds` option is set, Yarn will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n ",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"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],de.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"})],de.prototype,"immutable",void 0),(0,a.gn)([C.Command.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"})],de.prototype,"immutableCache",void 0),(0,a.gn)([C.Command.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"})],de.prototype,"checkCache",void 0),(0,a.gn)([C.Command.Boolean("--production",{hidden:!0})],de.prototype,"production",void 0),(0,a.gn)([C.Command.Boolean("--non-interactive",{hidden:!0})],de.prototype,"nonInteractive",void 0),(0,a.gn)([C.Command.Boolean("--frozen-lockfile",{hidden:!0})],de.prototype,"frozenLockfile",void 0),(0,a.gn)([C.Command.Boolean("--prefer-offline",{hidden:!0})],de.prototype,"preferOffline",void 0),(0,a.gn)([C.Command.Boolean("--ignore-engines",{hidden:!0})],de.prototype,"ignoreEngines",void 0),(0,a.gn)([C.Command.String("--registry",{hidden:!0})],de.prototype,"registry",void 0),(0,a.gn)([C.Command.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"})],de.prototype,"inlineBuilds",void 0),(0,a.gn)([C.Command.Boolean("--skip-builds",{description:"Skip the build step altogether"})],de.prototype,"skipBuilds",void 0),(0,a.gn)([C.Command.String("--cache-folder",{hidden:!0})],de.prototype,"cacheFolder",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],de.prototype,"silent",void 0),(0,a.gn)([C.Command.Path(),C.Command.Path("install")],de.prototype,"execute",null);class Ce extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.destination)),o=await s.VK.find(n,this.context.plugins),{project:i,workspace:a}=await h.I.find(o,n);if(!a)throw new c.WorkspaceRequiredError(i.cwd,n);const l=t.topLevelWorkspace,u=[];if(this.all){for(const e of i.workspaces)!e.manifest.name||e.manifest.private&&!this.private||u.push(e);if(0===u.length)throw new C.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new C.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new C.UsageError("The target workspace is marked private - use the --private flag to link it anyway");u.push(a)}for(const e of u){const r=d.stringifyIdent(e.locator),A=this.relative?m.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+A})}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ce.usage=C.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\n There is no `yarn unlink` command. To unlink the workspaces from the current project one must revert the changes made to the `resolutions` field.\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"]]}),(0,a.gn)([C.Command.String()],Ce.prototype,"destination",void 0),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Link all workspaces belonging to the target project to the current one"})],Ce.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-p,--private",{description:"Also link private workspaces belonging to the target project to the current one"})],Ce.prototype,"private",void 0),(0,a.gn)([C.Command.Boolean("-r,--relative",{description:"Link workspaces using relative paths instead of absolute paths"})],Ce.prototype,"relative",void 0),(0,a.gn)([C.Command.Path("link")],Ce.prototype,"execute",null);class fe extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}fe.usage=C.Command.Usage({description:"run node with the hook already setup",details:"\n This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n ",examples:[["Run a Node script","$0 node ./my-script.js"]]}),(0,a.gn)([C.Command.Proxy()],fe.prototype,"args",void 0),(0,a.gn)([C.Command.Path("node")],fe.prototype,"execute",null);var Ie=r(20624),Ee=r(12087),Be=r(85622),ye=r.n(Be),me=r(79669);class we extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t;if("latest"===this.version||"berry"===this.version)t="https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js";else if("classic"===this.version)t="https://nightly.yarnpkg.com/latest.js";else if(ce.satisfiesWithPrereleases(this.version,">=2.0.0"))t=`https://github.com/yarnpkg/berry/raw/%40yarnpkg/cli/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else{if(!ce.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw Q().validRange(this.version)?new C.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new C.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,t,"green"));const A=await me.get(t,{configuration:e});await Qe(e,null,A,{report:r})})).exitCode()}}async function Qe(e,t,r,{report:A}){const n=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await y.xfs.mktempPromise(async e=>{const A=m.y1.join(e,"yarn.cjs");await y.xfs.writeFilePromise(A,r);const{stdout:o}=await se.execvp(process.execPath,[m.cS.fromPortablePath(A),"--version"],{cwd:n,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!Q().valid(t))throw new Error("Invalid semver version")});const o=m.y1.resolve(n,".yarn/releases"),i=m.y1.resolve(o,`yarn-${t}.cjs`),a=m.y1.relative(e.startingCwd,i),c=m.y1.relative(n,i),g=e.get("yarnPath"),l=null===g||g.startsWith(o+"/");A.reportInfo(u.b.UNNAMED,"Saving the new release in "+B.pretty(e,a,"magenta")),await y.xfs.removePromise(m.y1.dirname(i)),await y.xfs.mkdirPromise(m.y1.dirname(i),{recursive:!0}),await y.xfs.writeFilePromise(i,r),await y.xfs.chmodPromise(i,493),l&&await s.VK.updateConfiguration(n,{yarnPath:c})}we.usage=C.Command.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"]]}),(0,a.gn)([C.Command.Boolean("--only-if-needed",{description:"Only lock the Yarn version if it isn't already locked"})],we.prototype,"onlyIfNeeded",void 0),(0,a.gn)([C.Command.String()],we.prototype,"version",void 0),(0,a.gn)([C.Command.Path("policies","set-version"),C.Command.Path("set","version")],we.prototype,"execute",null);const De=/^[0-9]+$/;function be(e){return De.test(e)?`pull/${e}/head`:e}class ve extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.plugins=[],this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await Se((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",ye().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const A=m.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),n=await y.xfs.readFilePromise(A);await Qe(e,"sources",n,{report:r})})).exitCode()}}async function Se(e,{configuration:t,context:r,target:A}){for(const[n,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await se.pipevp(n,o,{cwd:A,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(B.pretty(t," $ "+[n,...o].join(" "),"grey")+"\n");try{await se.execvp(n,o,{cwd:A,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ke(e,{configuration:t,report:r,target:A}){let n=!1;if(!e.force&&y.xfs.existsSync(m.y1.join(A,".git"))){r.reportInfo(u.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await Se((({branch:e})=>[["git","fetch","origin",be(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:A}),n=!0}catch(e){r.reportSeparator(),r.reportWarning(u.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(u.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await y.xfs.removePromise(A),await y.xfs.mkdirPromise(A,{recursive:!0}),await Se((({repository:e,branch:t},r)=>[["git","init",m.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",be(t)],["git","reset","--hard","FETCH_HEAD"]])(e,A),{configuration:t,context:e.context,target:A}))}ve.usage=C.Command.Usage({description:"build Yarn from master",details:"\n This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n ",examples:[["Build Yarn from master","$0 set version from sources"]]}),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],ve.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],ve.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],ve.prototype,"branch",void 0),(0,a.gn)([C.Command.Array("--plugin",{description:"An array of additional plugins that should be included in the bundle"})],ve.prototype,"plugins",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a bundle for development (debugging) - non-minified and non-mangled"})],ve.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],ve.prototype,"force",void 0),(0,a.gn)([C.Command.Path("set","version","from","sources")],ve.prototype,"execute",null);var Ne=r(78835);const Fe=require("vm");async function Ke(e){const t=await me.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,he.parseSyml)(t.toString())}class Me extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await Ke(e);for(const[e,{experimental:A,...n}]of Object.entries(r)){let r=e;A&&(r+=" [experimental]"),t.reportJson({name:e,experimental:A,...n}),t.reportInfo(null,r)}})).exitCode()}}Me.usage=C.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 `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Me.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","list")],Me.prototype,"execute",null);class Re extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await h.I.find(e,this.context.cwd);let A,n;if(this.name.match(/^\.{0,2}[\\/]/)||m.cS.isAbsolute(this.name)){const o=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.name));t.reportInfo(u.b.UNNAMED,"Reading "+B.pretty(e,o,B.Type.PATH)),A=m.y1.relative(r.cwd,o),n=await y.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new Ne.URL(this.name)}catch(e){throw new V.lk(u.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}A=this.name,r=this.name}else{const t=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),n=d.stringifyIdent(t),o=await Ke(e);if(!Object.prototype.hasOwnProperty.call(o,n))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${n}" on the remote registry. Note that only the plugins referenced on our website (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).`);A=n,r=o[n].url}t.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,r,"green")),n=await me.get(r,{configuration:e})}await xe(A,n,{project:r,report:t})})).exitCode()}}async function xe(e,t,{project:r,report:A}){const{configuration:n}=r,o={},i={exports:o};(0,Fe.runInNewContext)(t.toString(),{module:i,exports:o});const a=i.exports.name,c=`.yarn/plugins/${a}.cjs`,g=m.y1.resolve(r.cwd,c);A.reportInfo(u.b.UNNAMED,"Saving the new plugin in "+B.pretty(n,c,"magenta")),await y.xfs.mkdirPromise(m.y1.dirname(g),{recursive:!0}),await y.xfs.writeFilePromise(g,t);const l={path:c,spec:e};await s.VK.updateConfiguration(r.cwd,e=>{const t=[];let A=!1;for(const n of e.plugins||[]){const e="string"!=typeof n?n.path:n,o=m.y1.resolve(r.cwd,m.cS.toPortablePath(e)),{name:i}=P.dynamicRequire(m.cS.fromPortablePath(o));i!==a?t.push(n):(t.push(l),A=!0)}return A||t.push(l),{...e,plugins:t}})}Re.usage=C.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:"\n This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n Three types of plugin references are accepted:\n\n - If the plugin is stored within the Yarn repository, it can be referenced by name.\n - Third-party plugins can be referenced directly through their public urls.\n - Local plugins can be referenced by their path on the disk.\n\n Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the `@yarnpkg/builder` package).\n ",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"]]}),(0,a.gn)([C.Command.String()],Re.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","import")],Re.prototype,"execute",null);class Le extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:A}=await h.I.find(e,this.context.cwd),n=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=d.stringifyIdent(n),i=await Ke(e);if(!Object.prototype.hasOwnProperty.call(i,o))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${o}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);const s=o,a=s.replace(/@yarnpkg\//,"");await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await Se((({pluginName:e,noMinify:t},r)=>[["yarn","build:"+e,...t?["--no-minify"]:[],"|"]])({pluginName:a,noMinify:this.noMinify}),{configuration:e,context:this.context,target:t}),r.reportSeparator();const c=m.y1.resolve(t,`packages/${a}/bundles/${s}.js`),g=await y.xfs.readFilePromise(c);await xe(s,g,{project:A,report:r})})).exitCode()}}Le.usage=C.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:"\n This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n The plugins can be referenced by their short name if sourced from the official Yarn repository.\n ",examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]}),(0,a.gn)([C.Command.String()],Le.prototype,"name",void 0),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],Le.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],Le.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],Le.prototype,"branch",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a plugin for development (debugging) - non-minified and non-mangled"})],Le.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],Le.prototype,"force",void 0),(0,a.gn)([C.Command.Path("plugin","import","from","sources")],Le.prototype,"execute",null);class Pe extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=this.name,n=d.parseIdent(A);if(!e.plugins.has(A))throw new C.UsageError(d.prettyIdent(e,n)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${A}.cjs`,i=m.y1.resolve(t.cwd,o);y.xfs.existsSync(i)&&(r.reportInfo(u.b.UNNAMED,`Removing ${B.pretty(e,o,B.Type.PATH)}...`),await y.xfs.removePromise(i)),r.reportInfo(u.b.UNNAMED,"Updating the configuration..."),await s.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return e;const t=e.plugins.filter(e=>e.path!==o);return e.plugins.length===t.length?e:{...e,plugins:t}})})).exitCode()}}Pe.usage=C.Command.Usage({category:"Plugin-related commands",description:"remove a plugin",details:"\n This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n **Note:** The plugins have to be referenced by their name property, which can be obtained using the `yarn plugin runtime` command. Shorthands are not allowed.\n ",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"]]}),(0,a.gn)([C.Command.String()],Pe.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","remove")],Pe.prototype,"execute",null);class Oe extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{for(const r of e.plugins.keys()){const e=this.context.plugins.plugins.has(r);let A=r;e&&(A+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+A)}})).exitCode()}}Oe.usage=C.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:"\n This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n ",examples:[["List the currently active plugins","$0 plugin runtime"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Oe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","runtime")],Oe.prototype,"execute",null);class Ue extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=new Set;for(const e of this.idents)n.add(d.parseIdent(e).identHash);await t.resolveEverything({cache:A,report:new I.$});const o=e.get("bstatePath"),i=y.xfs.existsSync(o)?(0,he.parseSyml)(await y.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(i,e.locatorHash))continue;if(0===n.size||n.has(e.identHash))continue;const t=i[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),A=h.I.generateBuildStateFile(a,t.storedPackages);await y.xfs.mkdirPromise(m.y1.dirname(r),{recursive:!0}),await y.xfs.changeFilePromise(r,A,{automaticNewlines:!0})}else await y.xfs.removePromise(o);return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ue.usage=C.Command.Usage({description:"rebuild the project's native packages",details:"\n This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n ",examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]}),(0,a.gn)([C.Command.Rest()],Ue.prototype,"idents",void 0),(0,a.gn)([C.Command.Path("rebuild")],Ue.prototype,"execute",null);class Te extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});const o=this.all?t.workspaces:[r],i=[n.REGULAR,n.DEVELOPMENT,n.PEER],a=[];let l=!1;const u=[];for(const e of this.patterns){let t=!1;const r=d.parseIdent(e);for(const A of o){const n=[...A.manifest.peerDependenciesMeta.keys()];for(const r of Z()(n,e))A.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of i){const n=A.manifest.getForScope(e),o=[...n.values()].map(e=>d.stringifyIdent(e));for(const i of Z()(o,d.stringifyIdent(r))){const{identHash:r}=d.parseIdent(i),o=n.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");A.manifest[e].delete(r),u.push([A,e,o]),l=!0,t=!0}}}t||a.push(e)}const f=a.length>1?"Patterns":"Pattern",I=a.length>1?"don't":"doesn't",E=this.all?"any":"this";if(a.length>0)throw new C.UsageError(`${f} ${B.prettyList(e,a,s.a5.CODE)} ${I} match any packages referenced by ${E} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,u);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}return 0}}Te.usage=C.Command.Usage({description:"remove dependencies from the project",details:"\n This command will remove the packages matching the specified patterns from the current workspace.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n ",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}'"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Apply the operation to all workspaces from the current project"})],Te.prototype,"all",void 0),(0,a.gn)([C.Command.Rest()],Te.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("remove")],Te.prototype,"execute",null);class je extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const A=r.manifest.scripts,n=P.sortMap(A.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},i=n.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of A.entries())t.reportInfo(null,`${e.padEnd(i," ")} ${(0,T.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([C.Command.Path("run")],je.prototype,"execute",null);class Ye extends c.BaseCommand{constructor(){super(...arguments),this.inspect=!1,this.inspectBrk=!1,this.topLevel=!1,this.binariesOnly=!1,this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:A}=await h.I.find(e,this.context.cwd);await t.restoreInstallState();const n=this.topLevel?t.topLevelWorkspace.anchoredLocator:A;if(!this.binariesOnly&&await R.hasPackageScript(n,this.scriptName,{project:t}))return await R.executePackageScript(n,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await R.getPackageAccessibleBinaries(n,{project:t})).get(this.scriptName)){const e=[];return this.inspect&&("string"==typeof this.inspect?e.push("--inspect="+this.inspect):e.push("--inspect")),this.inspectBrk&&("string"==typeof this.inspectBrk?e.push("--inspect-brk="+this.inspectBrk):e.push("--inspect-brk")),await R.executePackageAccessibleBinary(n,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:e})}if(!this.topLevel&&!this.binariesOnly&&r&&this.scriptName.includes(":")){const e=(await Promise.all(t.workspaces.map(async e=>e.manifest.scripts.has(this.scriptName)?e:null))).filter(e=>null!==e);if(1===e.length)return await R.executeWorkspaceScript(e[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw"node-gyp"===this.scriptName?new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}).`);{if("global"===this.scriptName)throw new C.UsageError("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");const e=[this.scriptName].concat(this.args);for(const[t,r]of c.pluginCommands)for(const A of r)if(e.length>=A.length&&JSON.stringify(e.slice(0,A.length))===JSON.stringify(A))throw new C.UsageError(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${t} plugin. You can install it with "yarn plugin import ${t}".`);throw new C.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Ye.usage=C.Command.Usage({description:"run a script defined in the package.json",details:"\n This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n - If the `scripts` field from your local package.json contains a matching script name, its definition will get executed.\n\n - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n ",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"]]}),(0,a.gn)([C.Command.String("--inspect",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspect",void 0),(0,a.gn)([C.Command.String("--inspect-brk",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspectBrk",void 0),(0,a.gn)([C.Command.Boolean("-T,--top-level",{hidden:!0})],Ye.prototype,"topLevel",void 0),(0,a.gn)([C.Command.Boolean("-B,--binaries-only",{hidden:!0})],Ye.prototype,"binariesOnly",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],Ye.prototype,"silent",void 0),(0,a.gn)([C.Command.String()],Ye.prototype,"scriptName",void 0),(0,a.gn)([C.Command.Proxy()],Ye.prototype,"args",void 0),(0,a.gn)([C.Command.Path("run")],Ye.prototype,"execute",null);class Ge extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=d.parseDescriptor(this.descriptor,!0),o=d.makeDescriptor(n,this.resolution);t.storedDescriptors.set(n.descriptorHash,n),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(n.descriptorHash,o.descriptorHash);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ge.usage=C.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"]]}),(0,a.gn)([C.Command.String()],Ge.prototype,"descriptor",void 0),(0,a.gn)([C.Command.String()],Ge.prototype,"resolution",void 0),(0,a.gn)([C.Command.Boolean("-s,--save",{description:"Persist the resolution inside the top-level manifest"})],Ge.prototype,"save",void 0),(0,a.gn)([C.Command.Path("set","resolution")],Ge.prototype,"execute",null);class He extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=null,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=a?[i.KEEP,i.REUSE,i.PROJECT,i.LATEST]:[i.PROJECT,i.LATEST],y=[],m=[];for(const e of this.patterns){let t=!1;const A=d.parseDescriptor(e);for(const e of r.workspaces)for(const i of[n.REGULAR,n.DEVELOPMENT]){const n=[...e.manifest.getForScope(i).values()].map(e=>d.stringifyIdent(e));for(const s of Z()(n,d.stringifyIdent(A))){const n=d.parseIdent(s),a=e.manifest[i].get(n.identHash);if(void 0===a)throw new Error("Assertion failed: Expected the descriptor to be registered");const c=d.makeDescriptor(n,A.range);y.push(Promise.resolve().then(async()=>[e,i,a,await F(c,{project:r,workspace:e,cache:o,target:i,modifier:I,strategies:E})])),t=!0}}t||m.push(e)}if(m.length>1)throw new C.UsageError(`Patterns ${B.prettyList(t,m,s.a5.CODE)} don't match any packages referenced by any workspace`);if(m.length>0)throw new C.UsageError(`Pattern ${B.prettyList(t,m,s.a5.CODE)} doesn't match any packages referenced by any workspace`);const w=await Promise.all(y),Q=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[,,A,{suggestions:n,rejections:o}]of w){const i=n.filter(e=>null!==e.descriptor);if(0===i.length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${i}`)}else i.length>1&&!a&&e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,d.prettyDescriptor(t,A)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(Q.hasErrors())return Q.exitCode();let b=!1;const v=[];for(const[e,A,,{suggestions:n}]of w){let o;const i=n.filter(e=>null!==e.descriptor),s=i[0].descriptor,a=i.every(e=>d.areDescriptorsEqual(e.descriptor,s));1===i.length||a?o=s:(b=!0,({answer:o}=await(0,f.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${d.prettyWorkspace(t,e)} ❯ ${A}?`,choices:n.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const c=e.manifest[A].get(o.identHash);if(void 0===c)throw new Error("Assertion failed: This descriptor should have a matching entry");if(c.descriptorHash!==o.descriptorHash)e.manifest[A].set(o.identHash,o),v.push([e,A,c,o]);else{const A=t.makeResolver(),n={project:r,resolver:A},o=A.bindDescriptor(c,e.anchoredLocator,n);r.forgetResolution(o)}}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),b&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,stdout:this.context.stdout},async e=>{await r.install({cache:o,report:e})})).exitCode()}}He.usage=C.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 `-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 Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),(0,a.gn)([C.Command.Rest()],He.prototype,"patterns",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"})],He.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],He.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],He.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],He.prototype,"caret",void 0),(0,a.gn)([C.Command.Path("up")],He.prototype,"execute",null);class Je extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.json=!1,this.peers=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const A=d.parseIdent(this.package).identHash,n=this.recursive?function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.workspaces,e=>d.stringifyLocator(e.anchoredLocator)),o=new Set,i=new Set,s=r=>{if(o.has(r.locatorHash))return i.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return i.add(r.locatorHash),!0;let n=!1;r.identHash===t&&(n=!0);for(const t of r.dependencies.values()){if(!A&&r.peerDependencies.has(t.identHash))continue;const o=e.storedResolutions.get(t.descriptorHash);if(!o)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(o);if(!i)throw new Error("Assertion failed: The package should have been registered");s(i)&&(n=!0)}return n&&i.add(r.locatorHash),n};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");s(r)}const a=new Set,c={},g={children:c},l=(t,r,n)=>{if(!i.has(t.locatorHash))return;const o={},s={value:null!==n?B.tuple(B.Type.DEPENDENT,{locator:t,descriptor:n}):B.tuple(B.Type.LOCATOR,t),children:o};if(r[d.stringifyLocator(t)]=s,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===n||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!A&&t.peerDependencies.has(r.identHash))continue;const n=e.storedResolutions.get(r.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(n);if(!i)throw new Error("Assertion failed: The package should have been registered");l(i,o,r)}};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");l(r,c,null)}return g}(t,A,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.storedPackages.values(),e=>d.stringifyLocator(e)),o={},i={children:o};for(const r of n){const n={},i=null;for(const s of r.dependencies.values()){if(!A&&r.peerDependencies.has(s.identHash))continue;const a=e.storedResolutions.get(s.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");const c=e.storedPackages.get(a);if(!c)throw new Error("Assertion failed: The package should have been registered");if(c.identHash!==t)continue;if(null===i){const e=d.stringifyLocator(r);o[e]={value:[r,B.Type.LOCATOR],children:n}}const g=d.stringifyLocator(c);n[g]={value:[{descriptor:s,locator:c},B.Type.DEPENDENT]}}}return i}(t,A,{configuration:e,peers:this.peers});le.emitTree(n,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}}Je.usage=C.Command.Usage({description:"display the reason why a package is needed",details:'\n This command prints the exact reasons why a package appears in the dependency tree.\n\n 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.\n ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([C.Command.String()],Je.prototype,"package",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"List, for each workspace, what are all the paths that lead to the dependency"})],Je.prototype,"recursive",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Je.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--peers",{description:"Also print the peer dependencies that match the specified name"})],Je.prototype,"peers",void 0),(0,a.gn)([C.Command.Path("why")],Je.prototype,"execute",null);class qe extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:A}=r;let n;if(this.verbose){const e=new Set,r=new Set;for(const n of E.G.hardDependencies)for(const[o,i]of A.getForScope(n)){const A=t.tryWorkspaceByDescriptor(i);null===A?t.workspacesByIdent.has(o)&&r.add(i):e.add(A)}n={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>d.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:A.name?d.stringifyIdent(A.name):null,...n})}})).exitCode()}}qe.usage=C.Command.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Also return the cross-dependencies between workspaces"})],qe.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],qe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("workspaces","list")],qe.prototype,"execute",null);class ze extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=t.workspaces,n=new Map(A.map(e=>{const t=d.convertToIdent(e.locator);return[d.stringifyIdent(t),e]})),o=n.get(this.workspaceName);if(void 0===o){const e=Array.from(n.keys()).sort();throw new C.UsageError(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n - ${e.join("\n - ")}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}}ze.usage=C.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:"\n This command will run a given sub-command on a single workspace.\n ",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"]]}),(0,a.gn)([C.Command.String()],ze.prototype,"workspaceName",void 0),(0,a.gn)([C.Command.String()],ze.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ze.prototype,"args",void 0),(0,a.gn)([C.Command.Path("workspace")],ze.prototype,"execute",null);const We={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:s.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:s.a2.STRING,values:["^","~",""],default:o.CARET}},commands:[L,j,q,Ge,ve,we,qe,re,Ae,ne,ie,M,x,z,te,ae,ge,ue,de,Ce,fe,Le,Re,Pe,Me,Oe,Ue,Te,je,Ye,He,Je,ze]}},68023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E,fileUtils:()=>A});var A={};r.r(A),r.d(A,{makeArchiveFromLocator:()=>p,makeBufferFromLocator:()=>d,makeLocator:()=>h,makeSpec:()=>u,parseSpec:()=>l});var n=r(54143),o=r(46009);const i=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,s=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(73632),c=r(72785),g=r(75448);function l(e){const{params:t,selector:r}=n.parseRange(e),A=o.cS.toPortablePath(r);return{parentLocator:t&&"string"==typeof t.locator?n.parseLocator(t.locator):null,path:A}}function u({parentLocator:e,path:t,folderHash:r,protocol:A}){const o=null!==e?{locator:n.stringifyLocator(e)}:{},i=void 0!==r?{hash:r}:{};return n.makeRange({protocol:A,source:t,selector:t,params:{...i,...o}})}function h(e,{parentLocator:t,path:r,folderHash:A,protocol:o}){return n.makeLocator(e,u({parentLocator:t,path:r,folderHash:A,protocol:o}))}async function p(e,{protocol:t,fetchOptions:r,inMemory:A=!1}){const{parentLocator:i,path:s}=n.parseFileStyleRange(e.reference,{protocol:t}),l=o.y1.isAbsolute(s)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await r.fetcher.fetch(i,r),u=l.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();const h=u.packageFs,p=o.y1.join(u.prefixPath,s);return await a.releaseAfterUseAsync(async()=>await c.makeArchiveFromDirectory(p,{baseFs:h,prefixPath:n.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:A}),u.releaseFs)}async function d(e,{protocol:t,fetchOptions:r}){return(await p(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var C=r(20624),f=r(32485),I=r(46611);const E={fetchers:[class{supports(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),checksum:i}}async fetchFromDisk(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"}),i=o.y1.isAbsolute(A)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await t.fetcher.fetch(r,t),s=i.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,i.localPath)}:i;i!==s&&i.releaseFs&&i.releaseFs();const l=s.packageFs,u=o.y1.join(s.prefixPath,A),h=await l.readFilePromise(u);return await a.releaseAfterUseAsync(async()=>await c.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.getIdentVendorPath(e),stripComponents:1}),s.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"});if(o.y1.isAbsolute(A))return A;const i=t.fetcher.getLocalPath(r,t);return null===i?null:o.y1.resolve(i,A)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:i}}async fetchFromDisk(e,t){return p(e,{protocol:"file:",fetchOptions:t})}}],resolvers:[class{supportsDescriptor(e,t){return!!s.test(e.range)&&(!!e.range.startsWith("file:")||!!i.test(e.range))}supportsLocator(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=e.range;return A.startsWith("file:")&&(A=A.slice("file:".length)),[n.makeLocator(e,"file:"+o.cS.toPortablePath(A))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(i)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{path:A,parentLocator:o}=l(e.range);if(null===o)throw new Error("Assertion failed: The descriptor should have been bound");const i=await d(n.makeLocator(e,n.makeRange({protocol:"file:",source:A,selector:A,params:{locator:n.stringifyLocator(o)}})),{protocol:"file:",fetchOptions:r.fetchOptions});return[h(e,{parentLocator:o,path:A,folderHash:C.makeHash("1",i).slice(0,6),protocol:"file:"})]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},75641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,gitUtils:()=>A});var A={};r.r(A),r.d(A,{TreeishProtocols:()=>y,clone:()=>S,isGitUrl:()=>m,lsRemote:()=>b,normalizeLocator:()=>D,normalizeRepoUrl:()=>Q,resolveUrl:()=>v,splitRepoUrl:()=>w});var n=r(39922),o=r(54143),i=r(63088),s=r(73632),a=r(72785),c=r(43896),g=r(46009),l=r(79669),u=r(6220),h=r(71191),p=r.n(h),d=r(53887),C=r.n(d),f=r(78835),I=r.n(f);function E(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const B=[/^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\/(.+)?$/];var y;function m(e){return!!e&&B.some(t=>!!e.match(t))}function w(e){const t=(e=Q(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:y.Head,request:"master"},extra:{}};const r=e.slice(0,t),A=e.slice(t+1);if(A.match(/^[a-z]+=/)){const e=p().parse(A);for(const[t,r]of Object.entries(e))if("string"!=typeof r)throw new Error(`Assertion failed: The ${t} parameter must be a literal string`);const t=Object.values(y).find(t=>Object.prototype.hasOwnProperty.call(e,t));let n,o;void 0!==t?(n=t,o=e[t]):(n=y.Head,o="master");for(const t of Object.values(y))delete e[t];return{repo:r,treeish:{protocol:n,request:o},extra:e}}{const e=A.indexOf(":");let t,n;return-1===e?(t=null,n=A):(t=A.slice(0,e),n=A.slice(e+1)),{repo:r,treeish:{protocol:t,request:n},extra:{}}}}function Q(e,{git:t=!1}={}){var r;if(e=(e=(e=e.replace(/^git\+https:/,"https:")).replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3")).replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let t;e=e.replace(/^git\+([^:]+):/,"$1:");try{t=I().parse(e)}catch(e){t=null}t&&"ssh:"===t.protocol&&(null===(r=t.path)||void 0===r?void 0:r.startsWith("/:"))&&(e=e.replace(/^ssh:\/\//,""))}return e}function D(e){return o.makeLocator(e,Q(e.reference))}async function b(e,t){const r=Q(e,{git:!0});if(!l.getNetworkSettings(r,{configuration:t}).enableNetwork)throw new Error(`Request to '${r}' has been blocked because of your configuration settings`);let A;try{A=await u.execvp("git",["ls-remote","--refs",r],{cwd:t.startingCwd,env:E(),strict:!0})}catch(t){throw t.message=`Listing the refs for ${e} failed`,t}const n=new Map,o=/^([a-f0-9]{40})\t(refs\/[^\n]+)/gm;let i;for(;null!==(i=o.exec(A.stdout));)n.set(i[2],i[1]);return n}async function v(e,t){const{repo:r,treeish:{protocol:A,request:n},extra:o}=w(e),i=await b(r,t),s=(e,t)=>{switch(e){case y.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return p().stringify({...o,commit:t});case y.Head:{const e=i.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return p().stringify({...o,commit:e})}case y.Tag:{const e=i.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return p().stringify({...o,commit:e})}case y.Semver:{if(!C().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...i.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[C().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=C().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return p().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=a(y.Commit,t)))return e;if(null!==(e=a(y.Tag,t)))return e;if(null!==(e=a(y.Head,t)))return e;throw t.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${e}")`)}},a=(e,t)=>{try{return s(e,t)}catch(e){return null}};return`${r}#${s(A,n)}`}async function S(e,t){return await t.getLimit("cloneConcurrency")(async()=>{const{repo:r,treeish:{protocol:A,request:n}}=w(e);if("commit"!==A)throw new Error("Invalid treeish protocol when cloning");const o=Q(r,{git:!0});if(!1===l.getNetworkSettings(o,{configuration:t}).enableNetwork)throw new Error(`Request to '${o}' has been blocked because of your configuration settings`);const i=await c.xfs.mktempPromise(),s={cwd:i,env:E(),strict:!0};try{await u.execvp("git",["clone","-c core.autocrlf=false",o,g.cS.fromPortablePath(i)],s),await u.execvp("git",["checkout",""+n],s)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return i})}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(y||(y={}));var k=r(32485),N=r(46611);const F={configuration:{cloneConcurrency:{description:"Maximal number of concurrent clones",type:n.a2.NUMBER,default:2}},fetchers:[class{supports(e,t){return m(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,A=D(e),n=new Map(t.checksums);n.set(A.locatorHash,r);const i={...t,checksums:n},s=await this.downloadHosted(A,i);if(null!==s)return s;const[a,c,g]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,o.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(A,i),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:o.getIdentVendorPath(e),checksum:g}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await S(e.reference,t.project.configuration),A=w(e.reference),n=g.y1.join(r,"package.tgz");await i.prepareExternalProject(r,n,{configuration:t.project.configuration,report:t.report,workspace:A.extra.workspace});const l=await c.xfs.readFilePromise(n);return await s.releaseAfterUseAsync(async()=>await a.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:o.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return m(e.range)}supportsLocator(e,t){return m(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=await v(e.range,r.project.configuration);return[o.makeLocator(e,A)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await s.releaseAfterUseAsync(async()=>await N.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:k.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},68126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var A=r(54143),n=r(79669),o=r(72785),i=r(63088),s=r(43896),a=r(75448),c=r(46009),g=r(75641),l=r(71191),u=r.n(l);const h=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class p{supports(e,t){return!(!(r=e.reference)||!h.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from GitHub"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await s.xfs.mktempPromise(async n=>{const l=new a.M(n);await o.extractArchiveTo(r,l,{stripComponents:1});const u=g.gitUtils.splitRepoUrl(e.reference),h=c.y1.join(n,"package.tgz");await i.prepareExternalProject(n,h,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const p=await s.xfs.readFilePromise(h);return await o.convertToZip(p,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:A,reponame:n,treeish:o}=function(e){let t;for(const r of h)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,A,n,o="master"]=t;const{commit:i}=u().parse(o);return o=i||o.replace(/[^:]*:/,""),{auth:r,username:A,reponame:n,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${A}/${n}/archive/${o}.tar.gz`}}const d={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const A=new p;if(!A.supports(t,r))return null;try{return await A.fetch(t,r)}catch(e){return null}}}}},99148:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var A=r(54143),n=r(79669),o=r(72785);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,s=/^https?:/;var a=r(46611),c=r(32485),g=r(73632);const l={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.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});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(e.reference,{configuration:t.project.configuration});return await o.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!s.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[A.convertDescriptorToLocator(e)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await g.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},64314:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var A=r(39922),n=r(36370),o=r(25413),i=r(46611),s=r(85824),a=r(6220),c=r(63088),g=r(54143),l=r(43896),u=r(46009),h=r(40822),p=r(80305),d=r.n(p),C=r(31669);class f extends o.BaseCommand{constructor(){super(...arguments),this.usev2=!1,this.assumeFreshProject=!1,this.yes=!1,this.private=!1,this.workspace=!1,this.install=!1}async execute(){if(l.xfs.existsSync(u.y1.join(this.context.cwd,i.G.fileName)))throw new h.UsageError("A package.json already exists in the specified directory");const e=await A.VK.find(this.context.cwd,this.context.plugins),t=this.install?!0===this.install?"latest":this.install:null;return null!==t?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(null!==e.get("yarnPath"))throw new h.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new h.UsageError("Cannot use the --install flag when the current directory is already part of a project");l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));l.xfs.existsSync(r)||await l.xfs.writeFilePromise(r,"");const A=await this.cli.run(["set","version",t]);if(0!==A)return A;this.context.stdout.write("\n");const n=["--assume-fresh-project"];return this.private&&n.push("-p"),this.workspace&&n.push("-w"),this.yes&&n.push("-y"),await l.xfs.mktempPromise(async e=>{const{code:t}=await a.pipevp("yarn",["init",...n],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await c.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await s.I.find(e,this.context.cwd)}catch(e){t=null}l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=new i.G,A=Object.fromEntries(e.get("initFields").entries());r.load(A),r.name=g.makeIdent(e.get("initScope"),u.y1.basename(this.context.cwd)),r.version=e.get("initVersion"),r.private=this.private||this.workspace,r.license=e.get("initLicense"),this.workspace&&(await l.xfs.mkdirPromise(u.y1.join(this.context.cwd,"packages"),{recursive:!0}),r.workspaceDefinitions=[{pattern:"packages/*"}]);const n={};r.exportTo(n),C.inspect.styles.name="cyan",this.context.stdout.write((0,C.inspect)(n,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,i.G.fileName);await l.xfs.changeFilePromise(o,JSON.stringify(n,null,2)+"\n");const c=u.y1.join(this.context.cwd,"README.md");if(l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,`# ${g.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await l.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),A=u.y1.join(this.context.cwd,".gitattributes");l.xfs.existsSync(A)||await l.xfs.writeFilePromise(A,r);const n=["/.yarn/*","!/.yarn/releases","!/.yarn/plugins","!/.yarn/sdks","","# 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(e=>e+"\n").join(""),o=u.y1.join(this.context.cwd,".gitignore");l.xfs.existsSync(o)||await l.xfs.writeFilePromise(o,n);const i={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};d()(i,e.get("initEditorConfig"));let s="root = true\n";for(const[e,t]of Object.entries(i)){s+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){s+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const c=u.y1.join(this.context.cwd,".editorconfig");l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,s),await a.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=h.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 `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]}),(0,n.gn)([h.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,n.gn)([h.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,n.gn)([h.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,n.gn)([h.Command.Boolean("-p,--private",{description:"Initialize a private package"})],f.prototype,"private",void 0),(0,n.gn)([h.Command.Boolean("-w,--workspace",{description:"Initialize a private workspace root with a `packages/` directory"})],f.prototype,"workspace",void 0),(0,n.gn)([h.Command.String("-i,--install",{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"})],f.prototype,"install",void 0),(0,n.gn)([h.Command.Path("init")],f.prototype,"execute",null);const I={configuration:{initLicense:{description:"License used when creating packages via the init command",type:A.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:A.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:A.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}}},commands:[f]}},92994:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143),n=r(46009),o=r(75448),i=r(10489);var s=r(46611),a=r(32485),c=r(73632);const g={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"link:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"link:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"portal:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot}}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("link:")}supportsLocator(e,t){return!!e.reference.startsWith("link:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[A.makeLocator(e,"link:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("portal:")}supportsLocator(e,t){return!!e.reference.startsWith("portal:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[A.makeLocator(e,"portal:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await c.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map([...A.dependencies,...A.devDependencies]),peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},8375:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ne,getPnpPath:()=>Ae});var A,n=r(39922),o=r(46009),i=r(54143);!function(e){e[e.YES=0]="YES",e[e.NO=1]="NO",e[e.DEPENDS=2]="DEPENDS"}(A||(A={}));const s=(e,t)=>`${e}@${t}`,a=(e,t)=>{const r=t.indexOf("#"),A=r>=0?t.substring(r+1):t;return s(e,A)};var c;!function(e){e[e.NONE=-1]="NONE",e[e.PERF=0]="PERF",e[e.CHECK=1]="CHECK",e[e.REASONS=2]="REASONS",e[e.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"}(c||(c={}));const g=(e,t)=>{if(t.decoupled)return t;const{name:r,references:A,ident:n,locator:o,dependencies:i,originalDependencies:s,hoistedDependencies:a,peerNames:c,reasons:g,isHoistBorder:l}=t,u={name:r,references:new Set(A),ident:n,locator:o,dependencies:new Map(i),originalDependencies:new Map(s),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(g),decoupled:!0,isHoistBorder:l},h=u.dependencies.get(r);return h&&h.ident==u.ident&&u.dependencies.set(r,u),e.dependencies.set(u.name,u),u},l=e=>{const t=new Set,r=(A,n=new Set)=>{if(!n.has(A)){n.add(A);for(const o of A.peerNames)if(!e.peerNames.has(o)){const A=e.dependencies.get(o);A&&!t.has(A)&&r(A,n)}t.add(A)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},u=(e,t,r,A,n=new Set)=>{const o=t[t.length-1];if(n.has(o))return;n.add(o);const i=((e,t)=>{const r=new Map([[e.name,[e.ident]]]);for(const t of e.dependencies.values())e.peerNames.has(t.name)||r.set(t.name,[t.ident]);const A=Array.from(t.keys());A.sort((e,r)=>{const A=t.get(e),n=t.get(r);return n.peerDependents.size!==A.peerDependents.size?n.peerDependents.size-A.peerDependents.size:n.dependents.size-A.dependents.size});for(const t of A){const A=t.substring(0,t.indexOf("@",1)),n=t.substring(A.length+1);if(!e.peerNames.has(A)){let e=r.get(A);e||(e=[],r.set(A,e)),e.indexOf(n)<0&&e.push(n)}}return r})(o,E(o)),s=new Map(Array.from(i.entries()).map(([e,t])=>[e,t[0]])),a=o===e?new Map:(e=>{const t=new Map,r=new Set,A=n=>{if(!r.has(n)){r.add(n);for(const r of n.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of n.dependencies.values())n.peerNames.has(e.name)||A(e)}};return A(e),t})(o);let c;do{p(e,t,r,a,s,i,A),c=!1;for(const[e,t]of i)t.length>1&&!o.dependencies.has(e)&&(s.delete(e),t.shift(),s.set(e,t[0]),c=!0)}while(c);for(const n of o.dependencies.values())o.peerNames.has(n.name)||r.has(n.locator)||(r.add(n.locator),u(e,[...t,n],r,A),r.delete(n.locator))},h=(e,t,r,n,o,i,{outputReason:s})=>{let a,c=null,g=new Set;s&&(a=""+Array.from(e).map(e=>B(e)).join("→"));const l=t[t.length-1],u=r.ident===l.ident,h=o.get(r.name);let p=h===r.ident&&!u;if(s&&!p&&h&&!u&&(c=`- filled by: ${B(i.get(r.name)[0])} at ${a}`),p){let e=!1;const A=n.get(r.name);if(e=!A||A.ident===r.ident,s&&!e&&(c=`- filled by: ${B(A.locator)} at ${a}`),e)for(let A=1;A=1;r--){const n=t[r];for(const o of A){if(n.peerNames.has(o)&&n.originalDependencies.has(o))continue;const i=n.dependencies.get(o);i&&(r===t.length-1?g.add(i):(g=null,e=!1,s&&(c=`- peer dependency ${B(i.locator)} from parent ${B(n.locator)} was not hoisted to ${a}`))),A.delete(o)}if(!e)break}p=e}return null!==g&&g.size>0?{isHoistable:A.DEPENDS,dependsOn:g,reason:c}:{isHoistable:p?A.YES:A.NO,reason:c}},p=(e,t,r,n,o,i,s)=>{const a=t[t.length-1],u=new Set,p=(t,C,I,E)=>{if(u.has(I))return;const m=[...C,I.locator],w=new Map,Q=new Map;for(const e of l(I)){let g=null;if(g||(g=h(r,[a,...t,I],e,n,o,i,{outputReason:s.debugLevel>=c.REASONS})),Q.set(e,g),g.isHoistable===A.DEPENDS)for(const t of g.dependsOn){const r=w.get(t.name)||new Set;r.add(e.name),w.set(t.name,r)}}const D=new Set,b=(e,t,r)=>{if(!D.has(e)){D.add(e),e.ident!==I.ident&&Q.set(e,{isHoistable:A.NO,reason:r});for(const A of w.get(e.name)||[])b(I.dependencies.get(A),t,r)}};let v;s.debugLevel>=c.REASONS&&(v=""+Array.from(r).map(e=>B(e)).join("→"));for(const[e,t]of Q)t.isHoistable===A.NO&&b(e,t,`- peer dependency ${B(e.locator)} from parent ${B(I.locator)} was not hoisted to ${v}`);for(const e of Q.keys())if(!D.has(e)){I.dependencies.delete(e.name),I.hoistedDependencies.set(e.name,e),I.reasons.delete(e.name);const t=a.dependencies.get(e.name);if(t)for(const r of e.references)t.references.add(r);else a.ident!==e.ident&&(a.dependencies.set(e.name,e),E.add(e))}if(s.check){const r=d(e);if(r)throw new Error(`${r}, after hoisting dependencies of ${[a,...t,I].map(e=>B(e.locator)).join("→")}:\n${y(e)}`)}const S=l(I);for(const e of S)if(D.has(e)&&m.indexOf(e.locator)<0){const r=Q.get(e);if(r.isHoistable!==A.YES&&I.reasons.set(e.name,r.reason),!e.isHoistBorder){u.add(I);const r=g(I,e);p([...t,I],[...C,I.locator],r,f),u.delete(I)}}};let C,f=new Set(l(a));do{C=f,f=new Set;for(const e of C){if(e.locator===a.locator||e.isHoistBorder)continue;const t=g(a,e);p([],Array.from(r),t,f)}}while(f.size>0)},d=e=>{const t=[],r=new Set,A=new Set,n=(e,o)=>{if(r.has(e))return;if(r.add(e),A.has(e))return;const i=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i.set(t.name,t);for(const r of e.originalDependencies.values()){const n=i.get(r.name),s=()=>""+Array.from(A).concat([e]).map(e=>B(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e===n&&e&&e.ident===r.ident||t.push(`${s()} - broken peer promise: expected ${r.ident} but found ${e?e.ident:e}`)}else n?n.ident!==r.ident&&t.push(`${s()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${n.ident}`):t.push(`${s()} - broken require promise: no required dependency ${r.locator} found`)}A.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,i);A.delete(e)};return n(e,e.dependencies),t.join("\n")},C=(e,t)=>{const{identName:r,name:A,reference:n,peerNames:o}=e,i={name:A,references:new Set([n]),locator:s(r,n),ident:a(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0,isHoistBorder:!0},c=new Map([[e,i]]),g=(e,r)=>{let A=c.get(e);const n=!!A;if(!A){const{name:n,identName:o,reference:i,peerNames:g}=e,l=t.hoistingLimits.get(r.locator);A={name:n,references:new Set([i]),locator:s(o,i),ident:a(o,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(g),reasons:new Map,decoupled:!0,isHoistBorder:!!l&&l.has(n)},c.set(e,A)}if(r.dependencies.set(e.name,A),r.originalDependencies.set(e.name,A),n){const e=new Set,t=r=>{if(!e.has(r)){e.add(r),r.decoupled=!1;for(const e of r.dependencies.values())r.peerNames.has(e.name)||t(e)}};t(A)}else for(const t of e.dependencies)g(t,A)};for(const t of e.dependencies)g(t,i);return i},f=e=>e.substring(0,e.indexOf("@",1)),I=e=>{const t={name:e.name,identName:f(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),A=(e,t,n)=>{const o=r.has(e);let i;if(t===e)i=n;else{const{name:t,references:r,locator:A}=e;i={name:t,identName:f(A),references:r,dependencies:new Set}}if(n.dependencies.add(i),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||A(t,e,i);r.delete(e)}};for(const r of e.dependencies.values())A(r,e,t);return t},E=e=>{const t=new Map,r=new Set([e]),A=e=>{const r=(e=>`${e.name}@${e.ident}`)(e);let A=t.get(r);return A||(A={dependents:new Set,peerDependents:new Set},t.set(r,A)),A},n=(e,t)=>{const o=!!r.has(t);if(A(t).dependents.add(e.ident),!o){r.add(t);for(const e of t.dependencies.values())if(t.peerNames.has(e.name)){A(e).peerDependents.add(t.ident)}else n(t,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},B=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),A=e.substring(t+1);if("workspace:."===A)return".";if(A){const e=(A.indexOf("#")>0?A.split("#")[1]:A).replace("npm:","");return A.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},y=e=>{let t=0;const r=(e,A,n="")=>{if(t>5e4||A.has(e))return"";t++;const o=Array.from(e.dependencies.values());let i="";A.add(e);for(let t=0;t":"")+(c!==s.name?`a:${s.name}:`:"")+B(s.locator)+(a?" "+a:"")}\n`,i+=r(s,A,`${n}${t5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var m,w;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(m||(m={})),function(e){e.WORKSPACES="workspaces",e.DEPENDENCIES="dependencies",e.NONE="none"}(w||(w={}));const Q=(e,t)=>{const{packageTree:r,hoistingLimits:A}=b(e,t),n=((e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||c.NONE),A={check:t.check||r>=c.INTENSIVE_CHECK,debugLevel:r,hoistingLimits:t.hoistingLimits||new Map};A.debugLevel>=c.PERF&&console.time("hoist");const n=C(e,A);if(u(n,[n],new Set([n.locator]),A),A.debugLevel>=c.PERF&&console.timeEnd("hoist"),A.debugLevel>=c.CHECK){const e=d(n);if(e)throw new Error(`${e}, after hoisting finished:\n${y(n)}`)}return A.debugLevel>=c.REASONS&&console.log(y(n)),I(n)})(r,{hoistingLimits:A});return v(e,n,t)},D=e=>`${e.name}@${e.reference}`;const b=(e,t)=>{const r=e.getDependencyTreeRoots(),A=new Map,n=new Map,s=e.getPackageInformation(e.topLevel);if(null===s)throw new Error("Assertion failed: Expected the top-level package to have been registered");const a=e.findPackageLocator(s.packageLocation);if(null===a)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");const c=o.cS.toPortablePath(s.packageLocation),g=D(a);if(t.project){const e={children:new Map},r=t.project.cwd.split(o.y1.sep);for(const[A,n]of t.project.workspacesByCwd){const t=A.split(o.y1.sep).slice(r.length);let s=e;for(const e of t){let t=s.children.get(e);t||(t={children:new Map},s.children.set(e,t)),s=t}s.workspaceLocator={name:i.stringifyIdent(n.anchoredLocator),reference:n.anchoredLocator.reference}}const A=(e,t)=>{if(e.workspaceLocator){const r=D(t);let A=n.get(r);A||(A=new Set,n.set(r,A)),A.add(e.workspaceLocator)}for(const r of e.children.values())A(r,e.workspaceLocator||t)};for(const t of e.children.values())A(t,e.workspaceLocator)}else for(const e of r)if(e.name!==a.name||e.reference!==a.reference){let t=n.get(g);t||(t=new Set,n.set(g,t)),t.add(e)}const l={name:a.name,identName:a.name,reference:a.reference,peerNames:s.packagePeers,dependencies:new Set},u=new Map,h=(r,s,g,p,d,C,f)=>{var I,E;const B=((e,t)=>`${D(t)}:${e}`)(r,g);let y=u.get(B);const m=!!y;if(m||g.name!==a.name||g.reference!==a.reference||(y=l,u.set(B,l)),y||(y={name:r,identName:g.name,reference:g.reference,dependencies:new Set,peerNames:s.packagePeers},u.set(B,y)),f){const e=D({name:p.identName,reference:p.reference}),t=A.get(e)||new Set;A.set(e,t),t.add(y.name)}const Q=new Map(s.packageDependencies);if(t.project){const e=t.project.workspacesByCwd.get(o.cS.toPortablePath(s.packageLocation.slice(0,-1)));if(e){const t=new Set([...Array.from(e.manifest.peerDependencies.values(),e=>i.stringifyIdent(e)),...Array.from(e.manifest.peerDependenciesMeta.keys())]);for(const e of t)Q.has(e)||(Q.set(e,d.get(e)||null),y.peerNames.add(e))}}const b=D(g),v=n.get(b);if(v)for(const e of v)Q.set(e.name+"$wsroot$",e.reference);p.dependencies.add(y);const S=t.pnpifyFs||!function(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(B);if(!m&&S)for(const[r,A]of Q)if(null!==A){const n=e.getLocator(r,A),i=e.getLocator(r.replace("$wsroot$",""),A),s=e.getPackageInformation(i);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");const a=null===(I=t.hoistingLimitsByCwd)||void 0===I?void 0:I.get(C),g=o.y1.relative(c,o.cS.toPortablePath(s.packageLocation))||o.LZ.dot,l=null===(E=t.hoistingLimitsByCwd)||void 0===E?void 0:E.get(g),u=a===w.DEPENDENCIES||l===w.DEPENDENCIES||l===w.WORKSPACES;h(r,s,n,y,Q,g,u)}};return h(a.name,s,a,l,s.packageDependencies,o.LZ.dot,!1),{packageTree:l,hoistingLimits:A}};const v=(e,t,r)=>{const A=new Map,n=(t,A)=>{const{linkType:n,target:i}=function(e,t,r){const A=t.getLocator(e.name.replace("$wsroot$",""),e.reference),n=t.getPackageInformation(A);if(null===n)throw new Error("Assertion failed: Expected the package to be registered");let i,s;if(r.pnpifyFs)s=o.cS.toPortablePath(n.packageLocation),i=m.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(n.packageLocation):n.packageLocation;s=o.cS.toPortablePath(r||n.packageLocation),i=n.linkType}return{linkType:i,target:s}}(t,e,r);return{locator:D(t),target:i,linkType:n,aliases:A}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,o.Zu)(t),name:(0,o.Zu)(r)}:{scope:null,name:(0,o.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e||e.identName.endsWith("$wsroot$")&&r.identName===e.identName.replace("$wsroot$",""))continue;const a=Array.from(r.references).sort(),g={name:r.identName,reference:a[0]},{name:l,scope:u}=s(r.name),h=u?[u,l]:[l],p=o.y1.join(t,"node_modules"),d=o.y1.join(p,...h),C=n(g,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=A.get(d);if(e){if(e.dirList)throw new Error(`Assertion failed: ${d} cannot merge dir node with leaf node`);{const t=i.parseLocator(e.locator),r=i.parseLocator(C.locator);if(e.linkType!==C.linkType)throw new Error(`Assertion failed: ${d} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${d} cannot merge nodes with different idents ${i.stringifyLocator(t)} and ${i.stringifyLocator(r)}`);C.aliases=[...C.aliases,...e.aliases,i.parseLocator(e.locator).reference]}}A.set(d,C);const t=d.split("/"),r=t.indexOf("node_modules");let n=t.length-1;for(;r>=0&&n>r;){const e=o.cS.toPortablePath(t.slice(0,n).join(o.y1.sep)),r=(0,o.Zu)(t[n]),i=A.get(e);if(i){if(i.dirList){if(i.dirList.has(r))break;i.dirList.add(r)}}else A.set(e,{dirList:new Set([r])});n--}}c(r,C.linkType===m.SOFT?C.target:d)}}},g=n({name:t.name,reference:Array.from(t.references)[0]},[]),l=g.target;return A.set(l,g),c(t,l),A};var S=r(92659),k=r(32485),N=r(73632),F=r(46611),K=r(35691),M=r(43896),R=r(17674),x=r(53660),L=r(65281),P=r(11640),O=r(83228),U=r(58069),T=r.n(U),j=r(40822),Y=r(35747),G=r.n(Y);const H="node_modules";class J{constructor(e){this.opts=e,this.localStore=new Map,this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){var r;const A=o.y1.resolve(t.packageFs.getRealPath(),t.prefixPath);let n=this.customData.store.get(e.locatorHash);if(void 0===n&&(n=await async function(e,t){var r;const A=null!==(r=await F.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new F.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{bin:A.bin,os:A.os,cpu:A.cpu,scripts:A.scripts},misc:{extractHint:O.jsInstallUtils.getExtractHint(t),hasBindingGyp:O.jsInstallUtils.hasBindingGyp(t)}}}(0,t),e.linkType===k.Un.HARD&&this.customData.store.set(e.locatorHash,n)),!O.jsInstallUtils.checkAndReportManifestCompatibility(e,n,"link",{configuration:this.opts.project.configuration,report:this.opts.report}))return{packageLocation:null,buildDirective:null};const s=new Map,a=new Set;if(s.has(i.stringifyIdent(e))||s.set(i.stringifyIdent(e),e.reference),i.isVirtualLocator(e))for(const t of e.peerDependencies.values())s.set(i.stringifyIdent(t),null),a.add(i.stringifyIdent(t));const c={packageLocation:o.cS.fromPortablePath(A)+"/",packageDependencies:s,packagePeers:a,linkType:e.linkType,discardFromLookup:null!==(r=t.discardFromLookup)&&void 0!==r&&r};return this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:c}),{packageLocation:A,buildDirective:null}}async attachInternalDependencies(e,t){const r=this.localStore.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected information object to have been registered");for(const[e,A]of t){const t=i.areIdentsEqual(e,A)?A.reference:[i.requirableIdent(A),A.reference];r.pnpNode.packageDependencies.set(i.requirableIdent(e),t)}}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const e=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let t=await q(this.opts.project);if(null===t){const e=this.opts.project.configuration.get("bstatePath");await M.xfs.existsPromise(e)&&await M.xfs.unlinkPromise(e),t={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const r=new Map(this.opts.project.workspaces.map(e=>{var t,r;let A=this.opts.project.configuration.get("nmHoistingLimits");try{A=N.validateEnum(w,null!==(r=null===(t=e.manifest.installConfig)||void 0===t?void 0:t.hoistingLimits)&&void 0!==r?r:A)}catch(t){const r=i.prettyWorkspace(this.opts.project.configuration,e);this.opts.report.reportWarning(S.b.INVALID_MANIFEST,`${r}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(w).join(", ")}, using default: "${A}"`)}return[e.relativeCwd,A]})),A=(e=>{const t=new Map;for(const[r,A]of e.entries())if(!A.dirList){let e=t.get(A.locator);e||(e={target:A.target,linkType:A.linkType,locations:[],aliases:A.aliases},t.set(A.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(o.y1.delimiter).length,A=t.split(o.y1.delimiter).length;return r!==A?A-r:t.localeCompare(e)});return t})(Q({VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(e=>{const t=e.anchoredLocator;return{name:i.stringifyIdent(e.locator),reference:t.reference}}),getPackageInformation:e=>{const t=null===e.reference?this.opts.project.topLevelWorkspace.anchoredLocator:i.makeLocator(i.parseIdent(e.name),e.reference),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the package reference to have been registered");return r.pnpNode},findPackageLocator:e=>{const t=this.opts.project.tryWorkspaceByCwd(o.cS.toPortablePath(e));if(null!==t){const e=t.anchoredLocator;return{name:i.stringifyIdent(e),reference:e.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:e=>o.cS.fromPortablePath(R.p.resolveVirtual(o.cS.toPortablePath(e)))},{pnpifyFs:!1,hoistingLimitsByCwd:r,project:this.opts.project}));await async function(e,t,{baseFs:r,project:A,report:n,loadManifest:s}){const a=o.y1.join(A.cwd,H),{locationTree:c,binSymlinks:g}=function(e,t){const r=new Map([...e]),A=new Map([...t]);for(const[t,r]of e){const e=o.y1.join(t,H);if(!M.xfs.existsSync(e)){r.children.delete(H);for(const t of A.keys())null!==o.y1.contains(e,t)&&A.delete(t)}}return{locationTree:r,binSymlinks:A}}(e.locationTree,e.binSymlinks),l=X(t,{skipPrefix:A.cwd}),u=[],h=async({srcDir:e,dstDir:t,linkType:A})=>{const n=(async()=>{try{A===k.Un.SOFT?(await M.xfs.mkdirPromise(o.y1.dirname(t),{recursive:!0}),await V(o.y1.resolve(e),t)):await _(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{I.tick()}})().then(()=>u.splice(u.indexOf(n),1));u.push(n),u.length>4&&await Promise.race(u)},p=async(e,t,r)=>{const A=(async()=>{const A=async(e,t,r)=>{try{r&&r.innerLoop||await M.xfs.mkdirPromise(t,{recursive:!0});const n=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of n){if(!(r&&r.innerLoop||".bin"!==i.name))continue;const n=o.y1.join(e,i.name),s=o.y1.join(t,i.name);i.isDirectory()?(i.name!==H||r&&r.innerLoop)&&(await M.xfs.mkdirPromise(s,{recursive:!0}),await A(n,s,{innerLoop:!0})):await M.xfs.copyFilePromise(n,s,G().constants.COPYFILE_FICLONE)}}catch(A){throw r&&r.innerLoop||(A.message=`While cloning ${e} -> ${t} ${A.message}`),A}finally{r&&r.innerLoop||I.tick()}};await A(e,t,r)})().then(()=>u.splice(u.indexOf(A),1));u.push(A),u.length>4&&await Promise.race(u)},d=async(e,t,r)=>{if(r)for(const[A,n]of t.children){const t=r.children.get(A);await d(o.y1.join(e,A),n,t)}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!1}),await z(e,{contentsOnly:e===a})};for(const[e,t]of c){const r=l.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await d(o.y1.join(e,A),n,t)}}const C=async(e,t,r)=>{if(r){$(t.locator,r.locator)||await z(e,{contentsOnly:t.linkType===k.Un.HARD});for(const[A,n]of t.children){const t=r.children.get(A);await C(o.y1.join(e,A),n,t)}}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!0}),await z(e,{contentsOnly:t.linkType===k.Un.HARD})};for(const[e,t]of l){const r=c.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await C(o.y1.join(e,A),n,t)}}const f=[];for(const[r,{locations:n}]of e.locatorMap.entries())for(const e of n){const{locationRoot:n,segments:i}=W(e,{skipPrefix:A.cwd});let s=l.get(n),a=n;if(s){for(const e of i)if(a=o.y1.join(a,e),s=s.children.get(e),!s)break;if(s&&!$(s.locator,r)){const e=t.get(s.locator),r=e.target,A=a,n=e.linkType;r!==A&&f.push({srcDir:r,dstDir:A,linkType:n})}}}for(const[e,{locations:r}]of t.entries())for(const n of r){const{locationRoot:r,segments:i}=W(n,{skipPrefix:A.cwd});let s=c.get(r),a=l.get(r),g=r;const u=t.get(e),h=u.target,p=n;if(h===p)continue;const d=u.linkType;for(const e of i)a=a.children.get(e);if(s){for(const e of i)if(g=o.y1.join(g,e),s=s.children.get(e),!s){f.push({srcDir:h,dstDir:p,linkType:d});break}}else f.push({srcDir:h,dstDir:p,linkType:d})}const I=K.yG.progressViaCounter(f.length),E=n.reportProgress(I);try{const e=new Map;for(const t of f)t.linkType!==k.Un.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await h({...t}));await Promise.all(u),u.length=0;for(const t of f){const r=e.get(t.srcDir);t.linkType!==k.Un.SOFT&&t.dstDir!==r&&await p(r,t.dstDir)}await Promise.all(u),await M.xfs.mkdirPromise(a,{recursive:!0});const r=await async function(e,t,r,{loadManifest:A}){const n=new Map;for(const[t,{locations:r}]of e){const e=Z(t)?null:await A(t,r[0]),i=new Map;if(e)for(const[t,A]of e.bin){const e=o.y1.join(r[0],A);""!==A&&M.xfs.existsSync(e)&&i.set(t,A)}n.set(t,i)}const i=new Map,s=(e,t,A)=>{const a=new Map,c=o.y1.contains(r,e);if(A.locator&&null!==c){const t=n.get(A.locator);for(const[r,A]of t){const t=o.y1.join(e,o.cS.toPortablePath(A));a.set((0,o.Zu)(r),t)}for(const[t,r]of A.children){const A=o.y1.join(e,t),n=s(A,A,r);n.size>0&&i.set(e,new Map([...i.get(e)||new Map,...n]))}}else for(const[r,n]of A.children){const A=s(o.y1.join(e,r),t,n);for(const[e,t]of A)a.set(e,t)}return a};for(const[e,r]of t){const t=s(e,e,r);t.size>0&&i.set(e,new Map([...i.get(e)||new Map,...t]))}return i}(t,l,A.cwd,{loadManifest:s});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=o.y1.join(r,H,".bin");await M.xfs.removePromise(e)}for(const[r,A]of t){const t=o.y1.join(r,H,".bin"),n=e.get(r)||new Map;await M.xfs.mkdirPromise(t,{recursive:!0});for(const e of n.keys())A.has(e)||(await M.xfs.removePromise(o.y1.join(t,e)),"win32"===process.platform&&await M.xfs.removePromise(o.y1.join(t,(0,o.Zu)(e+".cmd"))));for(const[e,r]of A){const A=n.get(e),i=o.y1.join(t,e);A!==r&&("win32"===process.platform?await T()(o.cS.fromPortablePath(r),o.cS.fromPortablePath(i),{createPwshFile:!1}):(await M.xfs.removePromise(i),await V(r,i),await M.xfs.chmodPromise(r,493)))}}}(g,r),await async function(e,t,r){let A="";A+="# Warning: This file is automatically generated. Removing it is fine, but will\n",A+="# cause your node_modules installation to become invalidated.\n",A+="\n",A+="__metadata:\n",A+=" version: 1\n";const n=Array.from(t.keys()).sort(),s=i.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(const i of n){const n=t.get(i);A+="\n",A+=JSON.stringify(i)+":\n",A+=" locations:\n";for(const t of n.locations){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` - ${JSON.stringify(r)}\n`}if(n.aliases.length>0){A+=" aliases:\n";for(const e of n.aliases)A+=` - ${JSON.stringify(e)}\n`}if(i===s&&r.size>0){A+=" bin:\n";for(const[t,n]of r){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of n){const n=o.y1.relative(o.y1.join(t,H),r);A+=` ${JSON.stringify(e)}: ${JSON.stringify(n)}\n`}}}}const a=e.cwd,c=o.y1.join(a,H,".yarn-state.yml");await M.xfs.changeFilePromise(c,A,{automaticNewlines:!0})}(A,t,r)}finally{E.stop()}}(t,A,{baseFs:e,project:this.opts.project,report:this.opts.report,loadManifest:async e=>{const t=i.parseLocator(e),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the slot to exist");return r.customPackageData.manifest}});const n=[];for(const[e,t]of A.entries()){if(Z(e))continue;const r=i.parseLocator(e),A=this.localStore.get(r.locatorHash);if(void 0===A)throw new Error("Assertion failed: Expected the slot to exist");const o=O.jsInstallUtils.extractBuildScripts(A.pkg,A.customPackageData,A.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});0!==o.length&&n.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:o})}return{customData:this.customData,records:n}}}async function q(e,{unrollAliases:t=!1}={}){const r=e.cwd,A=o.y1.join(r,H,".yarn-state.yml");if(!M.xfs.existsSync(A))return null;const n=(0,P.parseSyml)(await M.xfs.readFilePromise(A,"utf8"));if(n.__metadata.version>1)return null;const s=new Map,a=new Map;delete n.__metadata;for(const[e,A]of Object.entries(n)){const n=A.locations.map(e=>o.y1.join(r,e)),c=A.bin;if(c)for(const[e,t]of Object.entries(c)){const A=o.y1.join(r,o.cS.toPortablePath(e)),n=N.getMapWithDefault(a,A);for(const[e,r]of Object.entries(t))n.set((0,o.Zu)(e),o.cS.toPortablePath([A,H,r].join(o.y1.delimiter)))}if(s.set(e,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:A.aliases||[]}),t&&A.aliases)for(const t of A.aliases){const{scope:r,name:A}=i.parseLocator(e),a=i.makeLocator(i.makeIdent(r,A),t),c=i.stringifyLocator(a);s.set(c,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:[]})}}return{locatorMap:s,binSymlinks:a,locationTree:X(s,{skipPrefix:e.cwd})}}const z=async(e,t)=>{if(e.split(o.y1.sep).indexOf(H)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await M.xfs.lstatPromise(e)).isSymbolicLink())return void await M.xfs.unlinkPromise(e)}const r=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const A of r){const r=o.y1.join(e,(0,o.Zu)(A.name));A.isDirectory()?(A.name!==H||t&&t.innerLoop)&&await z(r,{innerLoop:!0,contentsOnly:!1}):await M.xfs.unlinkPromise(r)}t.contentsOnly||await M.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},W=(e,{skipPrefix:t})=>{const r=o.y1.contains(t,e);if(null===r)throw new Error(`Assertion failed: Cannot process a path that isn't part of the requested prefix (${e} isn't within ${t})`);const A=r.split(o.y1.sep).filter(e=>""!==e),n=A.indexOf(H),i=A.slice(0,n).join(o.y1.sep);return{locationRoot:o.y1.join(t,i),segments:A.slice(n)}},X=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const A=()=>({children:new Map,linkType:k.Un.HARD});for(const[n,i]of e.entries()){if(i.linkType===k.Un.SOFT){if(null!==o.y1.contains(t,i.target)){const e=N.getFactoryWithDefault(r,i.target,A);e.locator=n,e.linkType=i.linkType}}for(const e of i.locations){const{locationRoot:o,segments:s}=W(e,{skipPrefix:t});let a=N.getFactoryWithDefault(r,o,A);for(let e=0;e{let r;try{"win32"===process.platform&&(r=M.xfs.lstatSync(e))}catch(e){}"win32"!=process.platform||r&&!r.isDirectory()?M.xfs.symlinkPromise(o.y1.relative(o.y1.dirname(t),e),t):M.xfs.symlinkPromise(e,t,"junction")},_=async(e,t,{baseFs:r,innerLoop:A})=>{await M.xfs.mkdirPromise(e,{recursive:!0});const n=await r.readdirPromise(t,{withFileTypes:!0}),i=async(e,t,A)=>{if(A.isFile()){const A=await r.lstatPromise(t);await r.copyFilePromise(t,e);const n=511&A.mode;420!==n&&await M.xfs.chmodPromise(e,n)}else{if(!A.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await M.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const A=await r.readlinkPromise(t);await V(o.y1.resolve(o.y1.dirname(e),A),e)}}};for(const s of n){const n=o.y1.join(t,(0,o.Zu)(s.name)),a=o.y1.join(e,(0,o.Zu)(s.name));s.isDirectory()?(s.name!==H||A)&&await _(a,n,{baseFs:r,innerLoop:!0}):await i(a,n,s)}};function Z(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const $=(e,t)=>{if(!e||!t)return e===t;let r=i.parseLocator(e);i.isVirtualLocator(r)&&(r=i.devirtualizeLocator(r));let A=i.parseLocator(t);return i.isVirtualLocator(A)&&(A=i.devirtualizeLocator(A)),i.areLocatorsEqual(r,A)};var ee=r(34432);class te extends O.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new re(e)}}class re extends O.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,ee.oC)(e,this.opts.project.cwd,t),A=Q(r,{pnpifyFs:!1,project:this.opts.project}),n=new Map;e.fallbackPool=n;const s=(e,t)=>{const r=i.parseLocator(t.locator),A=i.stringifyIdent(r);A===e?n.set(e,r.reference):n.set(e,[A,r.reference])},a=o.y1.join(this.opts.project.cwd,o.QS.nodeModules),c=A.get(a);if(void 0===c)throw new Error("Assertion failed: Expected a root junction point");if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(const e of c.dirList){const t=o.y1.join(a,e),r=A.get(t);if(void 0===r)throw new Error("Assertion failed: Expected the child to have been registered");if("target"in r)s(e,r);else for(const n of r.dirList){const r=o.y1.join(t,n),i=A.get(r);if(void 0===i)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in i))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${n}`,i)}}return super.finalizeInstallWithPnp(e)}}const Ae=e=>o.y1.join(e.cwd,".pnp.js"),ne={configuration:{nmHoistingLimits:{description:"Prevent packages can be hoisted past specific levels",type:n.a2.STRING,values:[w.WORKSPACES,w.DEPENDENCIES,w.NONE],default:"none"}},linkers:[class{supportsPackage(e,t){return"node-modules"===t.project.configuration.get("nodeLinker")}async findPackageLocation(e,t){const r=t.project.tryWorkspaceByLocator(e);if(r)return r.cwd;const A=await q(t.project,{unrollAliases:!0});if(null===A)throw new j.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const n=A.locatorMap.get(i.stringifyLocator(e));if(!n){const r=new j.UsageError(`Couldn't find ${i.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw r.code="LOCATOR_NOT_INSTALLED",r}return n.locations[0]}async findPackageLocator(e,t){const r=await q(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:A,segments:n}=W(o.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(A);if(!s)return null;let a=s.locator;for(const e of n){if(s=s.children.get(e),!s)break;a=s.locator||a}return i.parseLocator(a)}makeInstaller(e){return new J(e)}},te]}},8190:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>V});var A,n,o=r(39922),i=r(36370),s=r(25413),a=r(85824),c=r(62152),g=r(35691),l=r(92659),u=r(85875),h=r(15815),p=r(14224),d=r(40822);!function(e){e.All="all",e.Production="production",e.Development="development"}(A||(A={})),function(e){e.Info="info",e.Low="low",e.Moderate="moderate",e.High="high",e.Critical="critical"}(n||(n={}));var C=r(54143),f=r(73632),I=r(71643);const E=[n.Info,n.Low,n.Moderate,n.High,n.Critical];function B(e,t){const r=[],A=new Set,n=e=>{A.has(e)||(A.add(e),r.push(e))};for(const e of t)n(e);const o=new Set;for(;r.length>0;){const t=r.shift(),A=e.storedResolutions.get(t);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to have been registered");const i=e.storedPackages.get(A);if(i){o.add(t);for(const e of i.dependencies.values())n(e.descriptorHash)}}return o}function y(e,t,{all:r}){const A=r?e.workspaces:[t],n=A.map(e=>e.manifest),o=new Set(n.map(e=>[...e.dependencies].map(([e,t])=>e)).flat()),i=new Set(n.map(e=>[...e.devDependencies].map(([e,t])=>e)).flat()),s=A.map(e=>[...e.dependencies.values()]).flat(),a=s.filter(e=>o.has(e.identHash)).map(e=>e.descriptorHash),c=s.filter(e=>i.has(e.identHash)).map(e=>e.descriptorHash),g=B(e,a),l=B(e,c);return u=l,h=g,new Set([...u].filter(e=>!h.has(e)));var u,h}function m(e){const t={};for(const r of e)t[C.stringifyIdent(r)]=C.parseRange(r.range).selector;return t}function w(e){if(void 0===e)return new Set;const t=E.indexOf(e),r=E.slice(t);return new Set(r)}function Q(e,t){var r;const A=function(e,t){const r=w(t),A={};for(const t of r)A[t]=e[t];return A}(e,t);for(const e of Object.keys(A))if(null!==(r=A[e])&&void 0!==r&&r)return!0;return!1}class D extends s.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.environment=A.All,this.json=!1,this.severity=n.Info}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=function(e,t,{all:r,environment:n}){const o=r?e.workspaces:[t],i=[];if([A.All,A.Production].includes(n))for(const e of o)for(const t of e.manifest.dependencies.values())i.push(t);const s=[];if([A.All,A.Development].includes(n))for(const e of o)for(const t of e.manifest.devDependencies.values())s.push(t);return m([...i,...s].filter(e=>null===C.parseRange(e.range).protocol))}(t,r,{all:this.all,environment:this.environment}),i=function(e,t,{all:r}){var A;const n=y(e,t,{all:r}),o={};for(const t of e.storedPackages.values())o[C.stringifyIdent(t)]={version:null!==(A=t.version)&&void 0!==A?A:"0.0.0",integrity:t.identHash,requires:m(t.dependencies.values()),dev:n.has(C.convertLocatorToDescriptor(t).descriptorHash)};return o}(t,r,{all:this.all});if(!this.recursive)for(const e of Object.keys(i))Object.prototype.hasOwnProperty.call(n,e)?i[e].requires={}:delete i[e];const d={requires:n,dependencies:i},E=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});let B;const D=await c.h.start({configuration:e,stdout:this.context.stdout},async()=>{try{B=await p.npmHttpUtils.post("/-/npm/v1/security/audits/quick",d,{authType:p.npmHttpUtils.AuthType.NO_AUTH,configuration:e,jsonResponse:!0,registry:E})}catch(e){throw"HTTPError"!==e.name?e:new g.lk(l.b.EXCEPTION,e.toString())}});if(D.hasErrors())return D.exitCode();const b=Q(B.metadata.vulnerabilities,this.severity);if(!this.json&&b)return u.emitTree(function(e,t){const r={},A={children:r};let n=Object.values(e.advisories);if(null!=t){const e=w(t);n=n.filter(t=>e.has(t.severity))}for(const e of f.sortMap(n,e=>e.module_name))r[e.module_name]={label:e.module_name,value:I.tuple(I.Type.RANGE,e.findings.map(e=>e.version).join(", ")),children:{Issue:{label:"Issue",value:I.tuple(I.Type.NO_HINT,e.title)},URL:{label:"URL",value:I.tuple(I.Type.URL,e.url)},Severity:{label:"Severity",value:I.tuple(I.Type.NO_HINT,e.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:I.tuple(I.Type.RANGE,e.vulnerable_versions)},"Patched Versions":{label:"Patched Versions",value:I.tuple(I.Type.RANGE,e.patched_versions)},Via:{label:"Via",value:I.tuple(I.Type.NO_HINT,Array.from(new Set(e.findings.map(e=>e.paths).flat().map(e=>e.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:I.tuple(I.Type.NO_HINT,e.recommendation.replace(/\n/g," "))}}};return A}(B,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1;return(await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(B),b||e.reportInfo(l.b.EXCEPTION,"No audit suggestions")})).exitCode()}}D.usage=d.Command.Usage({description:"perform a vulnerability audit against the installed packages",details:`\n This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.\n\n Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${E.map(e=>`\`${e}\``).join(", ")}.\n\n If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why \` to get more information as to who depends on them.\n `,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"]]}),(0,i.gn)([d.Command.Boolean("-A,--all")],D.prototype,"all",void 0),(0,i.gn)([d.Command.Boolean("-R,--recursive")],D.prototype,"recursive",void 0),(0,i.gn)([d.Command.String("--environment")],D.prototype,"environment",void 0),(0,i.gn)([d.Command.Boolean("--json")],D.prototype,"json",void 0),(0,i.gn)([d.Command.String("--severity")],D.prototype,"severity",void 0),(0,i.gn)([d.Command.Path("npm","audit")],D.prototype,"execute",null);var b=r(85622),v=r.n(b),S=r(53887),k=r.n(S),N=r(31669);class F extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t}=await a.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,A=[];let n=!1;const i=await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async o=>{for(const i of this.packages){let s;if("."===i){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new d.UsageError("Missing 'name' field in "+v().join(e.cwd,"package.json"));s=C.makeDescriptor(e.manifest.name,"unknown")}else s=C.parseDescriptor(i);const a=p.npmHttpUtils.getIdentUrl(s);let c;try{c=K(await p.npmHttpUtils.get(a,{configuration:e,ident:s,jsonResponse:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())}const u=Object.keys(c.versions).sort(k().compareLoose);let h=c["dist-tags"].latest||u[u.length-1];if(k().validRange(s.range)){const t=k().maxSatisfying(u,s.range);null!==t?h=t:(o.reportWarning(l.b.UNNAMED,`Unmet range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0)}else"unknown"!==s.range&&(o.reportWarning(l.b.UNNAMED,`Invalid range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0);const f=c.versions[h],I={...c,...f,version:h,versions:u};let E;if(null!==r){E={};for(const t of r){const r=I[t];void 0!==r?E[t]=r:(o.reportWarning(l.b.EXCEPTION,`The '${t}' field doesn't exist inside ${C.prettyIdent(e,s)}'s informations`),n=!0)}}else this.json||(delete I.dist,delete I.readme,delete I.users),E=I;o.reportJson(E),this.json||A.push(E)}});N.inspect.styles.name="cyan";for(const e of A)(e!==A[0]||n)&&this.context.stdout.write("\n"),this.context.stdout.write((0,N.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return i.exitCode()}}function K(e){if(Array.isArray(e)){const t=[];for(let r of e)r=K(r),r&&t.push(r);return t}if("object"==typeof e&&null!==e){const t={};for(const r of Object.keys(e)){if(r.startsWith("_"))continue;const A=K(e[r]);A&&(t[r]=A)}return t}return e||null}F.usage=d.Command.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command will fetch 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 `@` to the package argument to provide information specific to the latest version that satisfies the range. 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 informations.\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 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"]]}),(0,i.gn)([d.Command.Rest()],F.prototype,"packages",void 0),(0,i.gn)([d.Command.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"})],F.prototype,"fields",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],F.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","info")],F.prototype,"execute",null);var M=r(61899);class R extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await async function({registry:e,report:t,stdin:r,stdout:A}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};t.reportInfo(l.b.UNNAMED,"Logging in to "+e);let n=!1;e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(t.reportInfo(l.b.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0);t.reportSeparator();const{username:o,password:i}=await(0,M.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A}]);return t.reportSeparator(),{name:o,password:i}}({registry:t,report:r,stdin:this.context.stdin,stdout:this.context.stdout}),n="/-/user/org.couchdb.user:"+encodeURIComponent(A.name),i=await p.npmHttpUtils.put(n,A,{attemptedAs:A.name,configuration:e,registry:t,jsonResponse:!0,authType:p.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r,scope:A}){const n=e=>r=>{const A=f.isIndexableObject(r)?r:{},n=A[e],o=f.isIndexableObject(n)?n:{};return{...A,[e]:{...o,npmAuthToken:t}}},i=A?{npmScopes:n(A)}:{npmRegistries:n(e)};return await o.VK.updateHomeConfiguration(i)}(t,i.token,{configuration:e,scope:this.scope}),r.reportInfo(l.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function x({scope:e,publish:t,configuration:r,cwd:A}){return e&&t?p.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?p.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(r,A)).manifest,{configuration:r}):p.npmConfigUtils.getDefaultRegistry({configuration:r})}R.usage=d.Command.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Login to the registry configured for a given scope"})],R.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Login to the publish registry"})],R.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","login")],R.prototype,"execute",null);const L=new Set(["npmAuthIdent","npmAuthToken"]);class P extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=async()=>{var t;const r=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),A=await o.VK.find(this.context.cwd,this.context.plugins),n=C.makeIdent(null!==(t=this.scope)&&void 0!==t?t:null,"pkg");return!p.npmConfigUtils.getAuthConfiguration(r,{configuration:A,ident:n}).get("npmAuthToken")};return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{if(this.all&&(await async function(){const e=e=>{let t=!1;const r=f.isIndexableObject(e)?{...e}:{};r.npmAuthToken&&(delete r.npmAuthToken,t=!0);for(const e of Object.keys(r))O(r,e)&&(t=!0);if(0!==Object.keys(r).length)return t?r:e};return await o.VK.updateHomeConfiguration({npmRegistries:e,npmScopes:e})}(),r.reportInfo(l.b.UNNAMED,"Successfully logged out from everything")),this.scope)return await U("npmScopes",this.scope),void(await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+this.scope):r.reportWarning(l.b.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it"));const A=await x({configuration:e,cwd:this.context.cwd,publish:this.publish});await U("npmRegistries",A),await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+A):r.reportWarning(l.b.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}}function O(e,t){const r=e[t];if(!f.isIndexableObject(r))return!1;const A=new Set(Object.keys(r));if([...L].every(e=>!A.has(e)))return!1;for(const e of L)A.delete(e);if(0===A.size)return e[t]=void 0,!0;const n={...r};for(const e of L)delete n[e];return e[t]=n,!0}async function U(e,t){return await o.VK.updateHomeConfiguration({[e]:e=>{const r=f.isIndexableObject(e)?e:{};if(!Object.prototype.hasOwnProperty.call(r,t))return e;const A=r[t],n=f.isIndexableObject(A)?A:{},o=new Set(Object.keys(n));if([...L].every(e=>!o.has(e)))return e;for(const e of L)o.delete(e);if(0===o.size){if(1===Object.keys(r).length)return;return{...r,[t]:void 0}}const i={};for(const e of L)i[e]=void 0;return{...r,[t]:{...n,...i}}}})}P.usage=d.Command.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Logout of the registry configured for a given scope"})],P.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Logout of the publish registry"})],P.prototype,"publish",void 0),(0,i.gn)([d.Command.Boolean("-A,--all",{description:"Logout of all registries"})],P.prototype,"all",void 0),(0,i.gn)([d.Command.Path("npm","logout")],P.prototype,"execute",null);var T=r(63088),j=r(49881);class Y extends s.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new d.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new d.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const A=r.manifest.name,n=r.manifest.version,i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await p.npmHttpUtils.get(p.npmHttpUtils.getIdentUrl(A),{configuration:e,registry:i,ident:A,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new g.lk(l.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,n))return void t.reportWarning(l.b.UNNAMED,`Registry already knows about version ${n}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new g.lk(l.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await T.maybeExecuteWorkspaceLifecycleScript(r,"prepublish",{report:t}),await j.packUtils.prepareForPack(r,{report:t},async()=>{const n=await j.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await j.packUtils.genPackStream(r,n),s=await f.bufferStream(o),a=await p.npmPublishUtils.makePublishBody(r,s,{access:this.access,tag:this.tag,registry:i});try{await p.npmHttpUtils.put(p.npmHttpUtils.getIdentUrl(A),a,{configuration:e,registry:i,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(l.b.UNNAMED,"Package archive published")})).exitCode()}}Y.usage=d.Command.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]}),(0,i.gn)([d.Command.String("--access",{description:"The access for the published package (public or restricted)"})],Y.prototype,"access",void 0),(0,i.gn)([d.Command.String("--tag",{description:"The tag on the registry that the package should be attached to"})],Y.prototype,"tag",void 0),(0,i.gn)([d.Command.Boolean("--tolerate-republish",{description:"Warn and exit when republishing an already existing version of a package"})],Y.prototype,"tolerateRepublish",void 0),(0,i.gn)([d.Command.Path("npm","publish")],Y.prototype,"execute",null);var G=r(46009);class H extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);let A;if(void 0!==this.package)A=C.parseIdent(this.package);else{if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(!r.manifest.name)throw new d.UsageError("Missing 'name' field in "+G.y1.join(r.cwd,G.QS.manifest));A=r.manifest.name}const n=await J(A,e),i={children:f.sortMap(Object.entries(n),([e])=>e).map(([e,t])=>({value:I.tuple(I.Type.RESOLUTION,{descriptor:C.makeDescriptor(A,e),locator:C.makeLocator(A,t)})}))};return u.emitTree(i,{configuration:e,json:this.json,stdout:this.context.stdout})}}async function J(e,t){const r=`/-/package${p.npmHttpUtils.getIdentUrl(e)}/dist-tags`;return p.npmHttpUtils.get(r,{configuration:t,ident:e,jsonResponse:!0}).catch(e=>{throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())})}H.usage=d.Command.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:"\n This command will list all tags of a package from the npm registry.\n\n If the package is not specified, Yarn will default to the current workspace.\n ",examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]}),(0,i.gn)([d.Command.String({required:!1})],H.prototype,"package",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],H.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","tag","list")],H.prototype,"execute",null);class q extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseDescriptor(this.package,!0),n=A.range;if(!k().valid(n))throw new d.UsageError(`The range ${I.pretty(e,A.range,I.Type.RANGE)} must be a valid semver version`);const i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),c=I.pretty(e,A,I.Type.IDENT),g=I.pretty(e,n,I.Type.RANGE),u=I.pretty(e,this.tag,I.Type.CODE);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const r=await J(A,e);Object.prototype.hasOwnProperty.call(r,this.tag)&&r[this.tag]===n&&t.reportWarning(l.b.UNNAMED,`Tag ${u} is already set to version ${g}`);try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.put(t,n,{configuration:e,registry:i,ident:A,jsonRequest:!0,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${u} added to version ${g} of package ${c}`)})).exitCode()}}q.usage=d.Command.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:"\n This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n ",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"]]}),(0,i.gn)([d.Command.String()],q.prototype,"package",void 0),(0,i.gn)([d.Command.String()],q.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","add")],q.prototype,"execute",null);var z=r(15966);class W extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseIdent(this.package),n=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),i=I.pretty(e,this.tag,I.Type.CODE),c=I.pretty(e,A,I.Type.IDENT),g=await J(A,e);if(!Object.prototype.hasOwnProperty.call(g,this.tag))throw new d.UsageError(`${i} is not a tag of package ${c}`);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.del(t,{configuration:e,registry:n,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${i} removed from package ${c}`)})).exitCode()}}W.schema=z.object().shape({tag:z.string().notOneOf(["latest"])}),W.usage=d.Command.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:"\n This command will remove a tag from a package from the npm registry.\n ",examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]}),(0,i.gn)([d.Command.String()],W.prototype,"package",void 0),(0,i.gn)([d.Command.String()],W.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","remove")],W.prototype,"execute",null);class X extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):p.npmConfigUtils.getDefaultRegistry({configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{try{const A=await p.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:p.npmHttpUtils.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?C.makeIdent(this.scope,""):void 0});r.reportInfo(l.b.UNNAMED,A.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(l.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(l.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}X.usage=d.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"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Print username for the registry configured for a given scope"})],X.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Print username for the publish registry"})],X.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","whoami")],X.prototype,"execute",null);const V={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:o.a2.STRING,default:null}},commands:[D,F,R,P,Y,q,H,W,X]}},14224:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>W,npmConfigUtils:()=>A,npmHttpUtils:()=>n,npmPublishUtils:()=>o});var A={};r.r(A),r.d(A,{RegistryType:()=>l,getAuthConfiguration:()=>Q,getDefaultRegistry:()=>y,getPublishRegistry:()=>E,getRegistryConfiguration:()=>m,getScopeConfiguration:()=>w,getScopeRegistry:()=>B,normalizeRegistry:()=>I});var n={};r.r(n),r.d(n,{AuthType:()=>u,del:()=>N,get:()=>v,getIdentUrl:()=>b,handleInvalidAuthenticationError:()=>D,post:()=>S,put:()=>k});var o={};r.r(o),r.d(o,{makePublishBody:()=>J});var i=r(39922),s=r(54143),a=r(72785),c=r(53887),g=r.n(c);var l,u,h=r(79669),p=r(35691),d=r(92659),C=r(61899),f=r(78835);function I(e){return e.replace(/\/$/,"")}function E(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?I(e.publishConfig.registry):e.name?B(e.name.scope,{configuration:t,type:l.PUBLISH_REGISTRY}):y({configuration:t,type:l.PUBLISH_REGISTRY})}function B(e,{configuration:t,type:r=l.FETCH_REGISTRY}){const A=w(e,{configuration:t});if(null===A)return y({configuration:t,type:r});const n=A.get(r);return null===n?y({configuration:t,type:r}):I(n)}function y({configuration:e,type:t=l.FETCH_REGISTRY}){const r=e.get(t);return I(null!==r?r:e.get(l.FETCH_REGISTRY))}function m(e,{configuration:t}){const r=t.get("npmRegistries"),A=r.get(e);if(void 0!==A)return A;const n=r.get(e.replace(/^[a-z]+:/,""));return void 0!==n?n:null}function w(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function Q(e,{configuration:t,ident:r}){const A=r&&w(r.scope,{configuration:t});if((null==A?void 0:A.get("npmAuthIdent"))||(null==A?void 0:A.get("npmAuthToken")))return A;return m(e,{configuration:t})||t}async function D(e,{attemptedAs:t,registry:r,headers:A,configuration:n}){if("HTTPError"===e.name&&401===e.response.statusCode)throw new p.lk(d.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof t?"as "+await async function(e,t,{configuration:r}){var A;if(void 0===t||void 0===t.authorization)return"an anonymous user";try{const n=await h.get(new f.URL(e+"/-/whoami").href,{configuration:r,headers:t,jsonResponse:!0});return null!==(A=n.username)&&void 0!==A?A:"an unknown user"}catch(e){return"an unknown user"}}(r,A,{configuration:n}):"attempted as "+t})`)}function b(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function v(e,{configuration:t,headers:r,ident:A,authType:n,registry:o,...i}){if(A&&void 0===o&&(o=B(A.scope,{configuration:t})),A&&A.scope&&void 0===n&&(n=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const s=F(o,{authType:n,configuration:t,ident:A});let a;s&&(r={...r,authorization:s});try{a=new f.URL(e)}catch(t){a=new f.URL(o+e)}try{return await h.get(a.href,{configuration:t,headers:r,...i})}catch(e){throw await D(e,{registry:o,configuration:t,headers:r}),e}}async function S(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.post(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.post(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function k(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.put(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.put(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function N(e,{attemptedAs:t,configuration:r,headers:A,ident:n,authType:o=u.ALWAYS_AUTH,registry:i,...s}){if(n&&void 0===i&&(i=B(n.scope,{configuration:r})),"string"!=typeof i)throw new Error("Assertion failed: The registry should be a string");const a=F(i,{authType:o,configuration:r,ident:n});a&&(A={...A,authorization:a});try{return await h.del(i+e,{configuration:r,headers:A,...s})}catch(n){if(!M(n))throw await D(n,{attemptedAs:t,registry:i,configuration:r,headers:A}),n;const o=await K(),a={...A,...R(o)};try{return await h.del(`${i}${e}`,{configuration:r,headers:a,...s})}catch(e){throw await D(e,{attemptedAs:t,registry:i,configuration:r,headers:A}),e}}}function F(e,{authType:t=u.CONFIGURATION,configuration:r,ident:A}){const n=Q(e,{configuration:r,ident:A}),o=function(e,t){switch(t){case u.CONFIGURATION:return e.get("npmAlwaysAuth");case u.BEST_EFFORT:case u.ALWAYS_AUTH:return!0;case u.NO_AUTH:return!1;default:throw new Error("Unreachable")}}(n,t);if(!o)return null;if(n.get("npmAuthToken"))return"Bearer "+n.get("npmAuthToken");if(n.get("npmAuthIdent"))return"Basic "+n.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new p.lk(d.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function K(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const{otp:e}=await(0,C.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return e}function M(e){if("HTTPError"!==e.name)return!1;try{return e.response.headers["www-authenticate"].split(/,\s*/).map(e=>e.toLowerCase()).includes("otp")}catch(e){return!1}}function R(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(l||(l={})),function(e){e[e.NO_AUTH=0]="NO_AUTH",e[e.BEST_EFFORT=1]="BEST_EFFORT",e[e.CONFIGURATION=2]="CONFIGURATION",e[e.ALWAYS_AUTH=3]="ALWAYS_AUTH"}(u||(u={}));class x{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new f.URL(e.reference);return!!g().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote registry"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await v(x.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(A){r=await v(x.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await a.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let A=B(e.scope,{configuration:r});const n=x.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),A=A.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===A+n||t===A+n.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=g().clean(e.reference.slice("npm:".length));if(null===t)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${b(e)}/-/${e.name}-${t}.tgz`}}var L=r(46611),P=r(36545),O=r(32485);const U=s.makeIdent(null,"node-gyp"),T=/\b(node-gyp|prebuild-install)\b/;var j=r(52779);var Y=r(49881),G=r(76417),H=r(10129);async function J(e,t,{access:r,tag:A,registry:n}){const o=e.project.configuration,i=e.manifest.name,a=e.manifest.version,c=s.stringifyIdent(i),g=(0,G.createHash)("sha1").update(t).digest("hex"),l=H.Sd(t).toString();void 0===r&&(r=e.manifest.publishConfig&&"string"==typeof e.manifest.publishConfig.access?e.manifest.publishConfig.access:null!==o.get("npmPublishAccess")?o.get("npmPublishAccess"):i.scope?"restricted":"public");const u=await Y.packUtils.genPackageManifest(e),h=`${c}-${a}.tgz`,p=new f.URL(`${c}/-/${h}`,n);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[A]:a},versions:{[a]:{...u,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:g,integrity:l,tarball:p.toString()}}}}}const q={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:i.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:i.a2.SECRET,default:null}},z={npmPublishRegistry:{description:"Registry to push packages to",type:i.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.STRING,default:"https://registry.yarnpkg.com"}},W={configuration:{...q,...z,npmScopes:{description:"Settings per package scope",type:i.a2.MAP,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q,...z}}},npmRegistries:{description:"Settings per registry",type:i.a2.MAP,normalizeKeys:I,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:A}=s.parseRange(e.reference);return!!g().valid(r)&&(null!==A&&"string"==typeof A.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.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});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const A=await v(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await a.convertToZip(A,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}},x],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.tryParseDescriptor(e.range.slice("npm:".length),!0)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){const r=s.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(A,t,r)}async getSatisfying(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return r.resolver.getSatisfying(A,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!P.validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.parseRange(e.reference);return!!g().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));const n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0}),o=Object.keys(n.versions).map(e=>new(g().SemVer)(e)).filter(e=>A.test(e)),i=o.filter(e=>!n.versions[e.raw].deprecated),a=i.length>0?i:o;return a.sort((e,t)=>-e.compare(t)),a.map(t=>{const A=s.makeLocator(e,"npm:"+t.raw),o=n.versions[t.raw].dist.tarball;return x.isConventionalTarballUrl(A,o,{configuration:r.project.configuration})?A:s.bindLocator(A,{__archiveUrl:o})})}async getSatisfying(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));return t.map(e=>{try{return new(g().SemVer)(e.slice("npm:".length))}catch(e){return null}}).filter(e=>null!==e).filter(e=>A.test(e)).sort((e,t)=>-e.compare(t)).map(t=>s.makeLocator(e,"npm:"+t.raw))}async resolve(e,t){const{selector:r}=s.parseRange(e.reference),A=g().clean(r);if(null===A)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const n=await v(b(e),{configuration:t.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"versions"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(n.versions,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${A}"`);const o=new L.G;if(o.load(n.versions[A]),!o.dependencies.has(U.identHash)&&!o.peerDependencies.has(U.identHash))for(const r of o.scripts.values())if(r.match(T)){o.dependencies.set(U.identHash,s.makeDescriptor(U,"latest")),t.report.reportWarning(d.b.NODE_GYP_INJECTED,s.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(d.b.DEPRECATED_PACKAGE,`${s.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:A,languageName:"node",linkType:O.Un.HARD,dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!j.c.test(e.range.slice("npm:".length))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=e.range.slice("npm:".length),n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"dist-tags"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=n["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${A}"`);const i=o[A],a=s.makeLocator(e,"npm:"+i),c=n.versions[i].dist.tarball;return x.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.bindLocator(a,{__archiveUrl:c})]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Unreachable")}}]}},49881:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T,packUtils:()=>A});var A={};r.r(A),r.d(A,{genPackList:()=>K,genPackStream:()=>N,genPackageManifest:()=>F,hasPackScripts:()=>S,prepareForPack:()=>k});var n=r(54143),o=r(35691),i=r(92659),s=r(36370),a=r(40822);class c extends a.Command{}(0,s.gn)([a.Command.String("--cwd",{hidden:!0})],c.prototype,"cwd",void 0);var g=r(46611),l=r(46009);class u extends a.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${l.y1.relative(e,t)} isn't a workspace of ${l.y1.join(e,g.G.fileName)}).`)}}r(63129),r(5864),r(35747);new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);var h=r(71643),p=r(39922);(0,s.gn)([a.Command.Path("--welcome")],class extends c{async execute(){const e=await p.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${h.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${h.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${h.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${h.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${h.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${h.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${h.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var d=r(85824),C=r(28148),f=r(33720),I=r(15815),E=r(43896),B=r(63088),y=r(10489),m=r(2401),w=r.n(m),Q=r(59938),D=r(78761);const b=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],v=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function S(e){return!!B.hasWorkspaceScript(e,"prepack")||!!B.hasWorkspaceScript(e,"postpack")}async function k(e,{report:t},r){await B.maybeExecuteWorkspaceLifecycleScript(e,"prepack",{report:t});try{await r()}finally{await B.maybeExecuteWorkspaceLifecycleScript(e,"postpack",{report:t})}}async function N(e,t){var r,A;void 0===t&&(t=await K(e));const n=new Set;for(const t of null!==(A=null===(r=e.manifest.publishConfig)||void 0===r?void 0:r.executableFiles)&&void 0!==A?A:new Set)n.add(l.y1.normalize(t));for(const t of e.manifest.bin.values())n.add(l.y1.normalize(t));const o=Q.pack();process.nextTick(async()=>{for(const r of t){const t=l.y1.normalize(r),A=l.y1.resolve(e.cwd,t),i=l.y1.join("package",t),s=await E.xfs.lstatPromise(A),a={name:i,mtime:new Date(4567890e5)},c=n.has(t)?493:420;let g,u;const h=new Promise((e,t)=>{g=e,u=t}),p=e=>{e?u(e):g()};if(s.isFile()){let r;r="package.json"===t?Buffer.from(JSON.stringify(await F(e),null,2)):await E.xfs.readFilePromise(A),o.entry({...a,mode:c,type:"file"},r,p)}else s.isSymbolicLink()?o.entry({...a,mode:c,type:"symlink",linkname:await E.xfs.readlinkPromise(A)},p):p(new Error(`Unsupported file type ${s.mode} for ${l.cS.fromPortablePath(t)}`));await h}o.finalize()});const i=(0,D.createGzip)();return o.pipe(i),i}async function F(e){const t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(e=>e.beforeWorkspacePacking,e,t),t}async function K(e){var t,r,A,n,o,i,s,a;const c=e.project,g=c.configuration,u={accept:[],reject:[]};for(const e of v)u.reject.push(e);for(const e of b)u.accept.push(e);u.reject.push(g.get("rcFilename"));const h=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=l.y1.relative(e.cwd,t),A=l.y1.resolve(l.LZ.root,r);u.reject.push(A)};h(l.y1.resolve(c.cwd,g.get("lockfileFilename"))),h(g.get("bstatePath")),h(g.get("cacheFolder")),h(g.get("globalFolder")),h(g.get("installStatePath")),h(g.get("virtualFolder")),h(g.get("yarnPath")),await g.triggerHook(e=>e.populateYarnPaths,c,e=>{h(e)});for(const t of c.workspaces){const r=l.y1.relative(e.cwd,t.cwd);""===r||r.match(/^(\.\.)?\//)||u.reject.push("/"+r)}const p={accept:[],reject:[]},d=null!==(r=null===(t=e.manifest.publishConfig)||void 0===t?void 0:t.main)&&void 0!==r?r:e.manifest.main,C=null!==(n=null===(A=e.manifest.publishConfig)||void 0===A?void 0:A.module)&&void 0!==n?n:e.manifest.module,f=null!==(i=null===(o=e.manifest.publishConfig)||void 0===o?void 0:o.browser)&&void 0!==i?i:e.manifest.browser,I=null!==(a=null===(s=e.manifest.publishConfig)||void 0===s?void 0:s.bin)&&void 0!==a?a:e.manifest.bin;null!=d&&p.accept.push(l.y1.resolve(l.LZ.root,d)),null!=C&&p.accept.push(l.y1.resolve(l.LZ.root,C)),"string"==typeof f&&p.accept.push(l.y1.resolve(l.LZ.root,f));for(const e of I.values())p.accept.push(l.y1.resolve(l.LZ.root,e));if(f instanceof Map)for(const[e,t]of f.entries())p.accept.push(l.y1.resolve(l.LZ.root,e)),"string"==typeof t&&p.accept.push(l.y1.resolve(l.LZ.root,t));const E=null!==e.manifest.files;if(E){p.reject.push("/*");for(const t of e.manifest.files)R(p.accept,t,{cwd:l.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:A}){const n=[],o=new y.n(e),i=[[l.LZ.root,[A]]];for(;i.length>0;){const[e,A]=i.pop(),s=await o.lstatPromise(e);if(!x(e,{globalList:r,ignoreLists:s.isDirectory()?null:A}))if(s.isDirectory()){const n=await o.readdirPromise(e);let s=!1,a=!1;if(!t||e!==l.LZ.root)for(const e of n)s=s||".gitignore"===e,a=a||".npmignore"===e;const c=a?await M(o,e,".npmignore"):s?await M(o,e,".gitignore"):null;let g=null!==c?[c].concat(A):A;x(e,{globalList:r,ignoreLists:A})&&(g=[...A,{accept:[],reject:["**/*"]}]);for(const t of n)i.push([l.y1.resolve(e,t),g])}else(s.isFile()||s.isSymbolicLink())&&n.push(l.y1.relative(l.LZ.root,e))}return n.sort()}(e.cwd,{hasExplicitFileList:E,globalList:u,ignoreList:p})}async function M(e,t,r){const A={accept:[],reject:[]},n=await e.readFilePromise(l.y1.join(t,r),"utf8");for(const e of n.split(/\n/g))R(A.reject,e,{cwd:t});return A}function R(e,t,{cwd:r}){const A=t.trim();""!==A&&"#"!==A[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=l.y1.resolve(t,e)),r&&(e="!"+e),e}(A,{cwd:r}))}function x(e,{globalList:t,ignoreLists:r}){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0;if(null!==r)for(const t of r){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0}return!1}function L(e,t){let r=t;const A=[];for(let e=0;e{await k(r,{report:t},async()=>{t.reportJson({base:r.cwd});const e=await K(r);for(const r of e)t.reportInfo(null,r),t.reportJson({location:r});if(!this.dryRun){const t=await N(r,e),n=E.xfs.createWriteStream(A);t.pipe(n),await new Promise(e=>{n.on("finish",e)})}}),this.dryRun||(t.reportInfo(i.b.UNNAMED,"Package archive generated in "+h.pretty(e,A,h.Type.PATH)),t.reportJson({output:A}))})).exitCode()}}O.usage=a.Command.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]}),(0,s.gn)([a.Command.Boolean("--install-if-needed",{description:"Run a preliminary `yarn install` if the package contains build scripts"})],O.prototype,"installIfNeeded",void 0),(0,s.gn)([a.Command.Boolean("-n,--dry-run",{description:"Print the file paths without actually generating the package archive"})],O.prototype,"dryRun",void 0),(0,s.gn)([a.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],O.prototype,"json",void 0),(0,s.gn)([a.Command.String("--filename",{hidden:!1,description:"Create the archive at the specified path"}),a.Command.String("-o,--out",{description:"Create the archive at the specified path"})],O.prototype,"out",void 0),(0,s.gn)([a.Command.Path("pack")],O.prototype,"execute",null);const U=["dependencies","devDependencies","peerDependencies"],T={hooks:{beforeWorkspacePacking:(e,t)=>{t.publishConfig&&(t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const A of U)for(const s of e.manifest.getForScope(A).values()){const e=r.tryWorkspaceByDescriptor(s),a=n.parseRange(s.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(s))throw new o.lk(i.b.WORKSPACE_NOT_FOUND,n.prettyDescriptor(r.configuration,s)+": No local workspace found for this range")}else{let r;r=n.areDescriptorsEqual(s,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[A][n.stringifyIdent(s)]=r}}}},commands:[O]}},29936:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>re,patchUtils:()=>A});var A={};r.r(A),r.d(A,{applyPatchFile:()=>S,diffFolders:()=>H,extractPackageToDisk:()=>G,isParentRequired:()=>j,loadPatchFiles:()=>Y,makeDescriptor:()=>O,makeLocator:()=>U,parseDescriptor:()=>x,parseLocator:()=>L,parsePatchFile:()=>D});var n=r(39922),o=r(35691),i=r(92659),s=r(54143),a=r(73632),c=r(43896),g=r(46009),l=r(90739),u=r(75448),h=r(65281),p=r(33720),d=r(6220),C=r(36545),f=r(78420);class I extends Error{constructor(e,t){super("Cannot apply hunk #"+(e+1)),this.hunk=t}}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function B(e){return g.y1.relative(g.LZ.root,g.y1.resolve(g.LZ.root,g.cS.toPortablePath(e)))}function y(e){const t=e.trim().match(E);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var m;!function(e){e.Context="context",e.Insertion="insertion",e.Deletion="deletion"}(m||(m={}));const w={"@":"header","-":m.Deletion,"+":m.Insertion," ":m.Context,"\\":"pragma",undefined:m.Context};function Q(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function D(e){const t=e.split(/\n/g);return""===t[t.length-1]&&t.pop(),function(e){const t=[];for(const r of e){const{semverExclusivity:e,diffLineFromPath:A,diffLineToPath:n,oldMode:o,newMode:i,deletedFileMode:s,newFileMode:c,renameFrom:g,renameTo:l,beforeHash:u,afterHash:h,fromPath:p,toPath:d,hunks:C}=r,f=g?"rename":s?"file deletion":c?"file creation":C&&C.length>0?"patch":"mode change";let I=null;switch(f){case"rename":if(!g||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:B(g),toPath:B(l)}),I=l;break;case"file deletion":{const r=A||p;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(s),hash:u})}break;case"file creation":{const r=n||d;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(c),hash:h})}break;case"patch":case"mode change":I=d||n;break;default:a.assertNever(f)}I&&o&&i&&o!==i&&t.push({type:"mode change",semverExclusivity:e,path:B(I),oldMode:Q(o),newMode:Q(i)}),I&&C&&C.length&&t.push({type:"patch",semverExclusivity:e,path:B(I),hunks:C,beforeHash:u,afterHash:h})}return t}(function(e){const t=[];let r={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},A="parsing header",n=null,o=null;function i(){n&&(o&&(n.parts.push(o),o=null),r.hunks.push(n),n=null)}function s(){i(),t.push(r),r={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}}for(let t=0;te<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${A(e.header.original.length)} ${A(e.header.patched.length)} @@, got @@ ${A(t)} ${A(r)} @@)`)}}async function v(e,t,r){const A=await e.lstatPromise(t),n=await r();if(void 0!==n&&(t=n),e.lutimesPromise)await e.lutimesPromise(t,A.atime,A.mtime);else{if(A.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,A.atime,A.mtime)}}async function S(e,{baseFs:t=new f.S,dryRun:r=!1,version:A=null}={}){for(const n of e)if(null===n.semverExclusivity||null===A||C.satisfiesWithPrereleases(A,n.semverExclusivity))switch(n.type){case"file deletion":if(r){if(!t.existsSync(n.path))throw new Error("Trying to delete a file that doesn't exist: "+n.path)}else await v(t,g.y1.dirname(n.path),async()=>{await t.unlinkPromise(n.path)});break;case"rename":if(r){if(!t.existsSync(n.fromPath))throw new Error("Trying to move a file that doesn't exist: "+n.fromPath)}else await v(t,g.y1.dirname(n.fromPath),async()=>{await v(t,g.y1.dirname(n.toPath),async()=>{await v(t,n.fromPath,async()=>(await t.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(r){if(t.existsSync(n.path))throw new Error("Trying to create a file that already exists: "+n.path)}else{const e=n.hunk?n.hunk.parts[0].lines.join("\n")+(n.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(g.y1.dirname(n.path),{chmod:493,utimes:[315532800,315532800]}),await t.writeFilePromise(n.path,e,{mode:n.mode}),await t.utimesPromise(n.path,315532800,315532800)}break;case"patch":await v(t,n.path,async()=>{await F(n,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(n.path)).mode;if(k(n.newMode)!==k(e))continue;await v(t,n.path,async()=>{await t.chmodPromise(n.path,n.newMode)})}break;default:a.assertNever(n)}}function k(e){return(64&e)>0}function N(e){return e.replace(/\s+$/,"")}async function F({hunks:e,path:t},{baseFs:r,dryRun:A=!1}){const n=await r.statSync(t).mode,o=(await r.readFileSync(t,"utf8")).split(/\n/),i=[];let s=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+s),A=Math.max(0,r-c),n=Math.max(0,o.length-r-t.header.original.length),a=Math.max(A,n);let g=0,l=0,u=null;for(;g<=a;){if(g<=A&&(l=r-g,u=K(t,o,l),null!==u)){g=-g;break}if(g<=n&&(l=r+g,u=K(t,o,l),null!==u))break;g+=1}if(null===u)throw new I(e.indexOf(t),t);i.push(u),s+=g,c=l+t.header.original.length}if(A)return;let g=0;for(const e of i)for(const t of e)switch(t.type){case"splice":{const e=t.index+g;o.splice(e,t.numToDelete,...t.linesToInsert),g+=t.linesToInsert.length-t.numToDelete}break;case"pop":o.pop();break;case"push":o.push(t.line);break;default:a.assertNever(t)}await r.writeFilePromise(t,o.join("\n"),{mode:n})}function K(e,t,r){const A=[];for(const o of e.parts)switch(o.type){case m.Context:case m.Deletion:for(const e of o.lines){const A=t[r];if(null==A||(n=e,N(A)!==N(n)))return null;r+=1}o.type===m.Deletion&&(A.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&A.push({type:"push",line:""}));break;case m.Insertion:A.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&A.push({type:"pop"});break;default:a.assertNever(o.type)}var n;return A}const M=/^builtin<([^>]+)>$/;function R(e,t){const{source:r,selector:A,params:n}=s.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const o=A?A.split(/&/).map(e=>g.cS.toPortablePath(e)):[],i=n&&"string"==typeof n.locator?s.parseLocator(n.locator):null,a=n&&"string"==typeof n.version?n.version:null;return{parentLocator:i,sourceItem:t(r),patchPaths:o,sourceVersion:a}}function x(e){const{sourceItem:t,...r}=R(e.range,s.parseDescriptor);return{...r,sourceDescriptor:t}}function L(e){const{sourceItem:t,...r}=R(e.reference,s.parseLocator);return{...r,sourceLocator:t}}function P({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:A,patchHash:n},o){const i=null!==e?{locator:s.stringifyLocator(e)}:{},a=void 0!==A?{version:A}:{},c=void 0!==n?{hash:n}:{};return s.makeRange({protocol:"patch:",source:o(t),selector:r.join("&"),params:{...a,...c,...i}})}function O(e,{parentLocator:t,sourceDescriptor:r,patchPaths:A}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,patchPaths:A},s.stringifyDescriptor))}function U(e,{parentLocator:t,sourcePackage:r,patchPaths:A,patchHash:n}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:A,patchHash:n},s.stringifyLocator))}function T({onAbsolute:e,onRelative:t,onBuiltin:r},A){const n=A.match(M);return null!==n?r(n[1]):g.y1.isAbsolute(A)?e(A):t(A)}function j(e){return T({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function Y(e,t,r){const A=null!==e?await r.fetcher.fetch(e,r):null,n=A&&A.localPath?{packageFs:new u.M(g.LZ.root),prefixPath:g.y1.relative(g.LZ.root,A.localPath)}:A;A&&A!==n&&A.releaseFs&&A.releaseFs();return(await a.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>T({onAbsolute:async()=>await c.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===A)throw new Error("Assertion failed: The parent locator should have been fetched");return await A.packageFs.readFilePromise(e,"utf8")},onBuiltin:async e=>await r.project.configuration.firstHook(e=>e.getBuiltinPatch,r.project,e)},e))))).map(e=>"string"==typeof e?e.replace(/\r\n?/g,"\n"):e)}async function G(e,{cache:t,project:r}){const A=r.storedChecksums,n=new p.$,o=r.configuration.makeFetcher(),i=await o.fetch(e,{cache:t,project:r,fetcher:o,checksums:A,report:n}),a=await c.xfs.mktempPromise();return await c.xfs.copyPromise(a,i.prefixPath,{baseFs:i.packageFs}),await c.xfs.writeJsonPromise(g.y1.join(a,".yarn-patch.json"),{locator:s.stringifyLocator(e)}),c.xfs.detachTemp(a),a}async function H(e,t){const r=g.cS.fromPortablePath(e).replace(/\\/g,"/"),A=g.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:n}=await d.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,A],{cwd:g.cS.toPortablePath(process.cwd())}),o=r.startsWith("/")?e=>e.slice(1):e=>e;return n.replace(new RegExp(`(a|b)(${a.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+a.escapeRegExp(`/${o(A)}/`),"g"),"$1/").replace(new RegExp(a.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(a.escapeRegExp(A+"/"),"g"),"")}var J=r(71643);function q(e,{configuration:t,report:r}){for(const A of e.parts)for(const e of A.lines)switch(A.type){case m.Context:r.reportInfo(null," "+J.pretty(t,e,"grey"));break;case m.Deletion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"- "+J.pretty(t,e,J.Type.REMOVED));break;case m.Insertion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"+ "+J.pretty(t,e,J.Type.ADDED));break;default:a.assertNever(A.type)}}var z=r(20624);var W=r(36370),X=r(25413),V=r(85824),_=r(28148),Z=r(40822);class $ extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const o=g.y1.resolve(this.context.cwd,g.cS.toPortablePath(this.patchFolder)),i=g.y1.join(o,".yarn-patch.json");if(!c.xfs.existsSync(i))throw new Z.UsageError("The argument folder didn't get created by 'yarn patch'");const a=await c.xfs.readJsonPromise(i),l=s.parseLocator(a.locator,!0);if(!t.storedPackages.has(l.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");const u=await G(l,{cache:A,project:t});this.context.stdout.write(await H(u,o))}}$.usage=Z.Command.Usage({description:"\n This will turn the folder passed in parameter into a patchfile suitable for consumption with the `patch:` protocol.\n\n Only folders generated through `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "}),(0,W.gn)([Z.Command.String()],$.prototype,"patchFolder",void 0),(0,W.gn)([Z.Command.Path("patch-commit")],$.prototype,"execute",null);var ee=r(15815);class te extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let o=s.parseLocator(this.package);if("unknown"===o.reference){const r=a.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||s.isVirtualLocator(e)?a.mapAndFilter.skip:e);if(0===r.length)throw new Z.UsageError("No package found in the project for the given locator");if(r.length>1)throw new Z.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why ` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+s.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");await ee.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const n=await G(o,{cache:A,project:t});r.reportInfo(i.b.UNNAMED,`Package ${s.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(i.b.UNNAMED,"You can now edit the following folder: "+J.pretty(e,g.cS.fromPortablePath(n),"magenta")),r.reportInfo(i.b.UNNAMED,`Once you are done run ${J.pretty(e,"yarn patch-commit "+g.cS.fromPortablePath(n),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}te.usage=Z.Command.Usage({description:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '}),(0,W.gn)([Z.Command.String()],te.prototype,"package",void 0),(0,W.gn)([Z.Command.Path("patch")],te.prototype,"execute",null);const re={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:n.a2.BOOLEAN,default:!1}},commands:[$,te],fetchers:[class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:A,sourceVersion:n,patchPaths:p}=L(e),d=await Y(r,p,t),C=await c.xfs.mktempPromise(),f=g.y1.join(C,"patched.zip"),E=await t.fetcher.fetch(A,t),B=s.getIdentVendorPath(e),y=await(0,h.getLibzipPromise)(),m=new l.d(f,{libzip:y,create:!0,level:t.project.configuration.get("compressionLevel")});await m.mkdirpPromise(B),await a.releaseAfterUseAsync(async()=>{await m.copyPromise(B,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs);const w=new u.M(g.y1.resolve(g.LZ.root,B),{baseFs:m});for(const e of d)if(null!==e)try{await S(D(e),{baseFs:w,version:n})}catch(e){if(!(e instanceof I))throw e;const r=t.project.configuration.get("enableInlineHunks"),A=r?"":" (set enableInlineHunks for details)";throw new o.lk(i.b.PATCH_HUNK_FAILED,e.message+A,A=>{r&&q(e.hunk,{configuration:t.project.configuration,report:A})})}return m}}],resolvers:[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,r){const{patchPaths:A}=x(e);return A.every(e=>!j(e))?e:s.bindDescriptor(e,{locator:s.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=x(e);return[r]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{parentLocator:A,sourceDescriptor:n,patchPaths:o}=x(e),i=await Y(A,o,r.fetchOptions),s=t.get(n.descriptorHash);if(void 0===s)throw new Error("Assertion failed: The dependency should have been resolved");return[U(e,{parentLocator:A,sourcePackage:s,patchPaths:o,patchHash:z.makeHash("2",...i).slice(0,6)})]}async getSatisfying(e,t,r){return null}async resolve(e,t){const{sourceLocator:r}=L(e);return{...await t.resolver.resolve(r,t),...e}}}]}},83228:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PnpInstaller:()=>k,PnpLinker:()=>S,default:()=>Y,getPnpPath:()=>T,jsInstallUtils:()=>A,pnpUtils:()=>n,quotePathIfNeeded:()=>j});var A={};r.r(A),r.d(A,{checkAndReportManifestCompatibility:()=>y,extractBuildScripts:()=>m,getExtractHint:()=>Q,hasBindingGyp:()=>D});var n={};r.r(n),r.d(n,{getUnpluggedPath:()=>b});var o=r(39922),i=r(43896),s=r(46009),a=r(53887),c=r.n(a),g=r(54143),l=r(71643),u=r(73632),h=r(32485),p=r(92659),d=r(46611),C=r(17674),f=r(75448),I=r(34432),E=r(40822),B=r(92409);function y(e,t,r,{configuration:A,report:n}){return d.G.isManifestFieldCompatible(t.manifest.os,process.platform)?!!d.G.isManifestFieldCompatible(t.manifest.cpu,process.arch)||(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_CPU,`${g.prettyLocator(A,e)} The CPU architecture ${process.arch} is incompatible with this module, ${r} skipped.`),!1):(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_OS,`${g.prettyLocator(A,e)} The platform ${process.platform} is incompatible with this module, ${r} skipped.`),!1)}function m(e,t,r,{configuration:A,report:n}){const o=[];for(const e of["preinstall","install","postinstall"])t.manifest.scripts.has(e)&&o.push([B.k.SCRIPT,e]);if(!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&o.push([B.k.SHELLCODE,"node-gyp rebuild"]),0===o.length)return[];if(!A.get("enableScripts")&&!r.built)return null==n||n.reportWarningOnce(p.b.DISABLED_BUILD_SCRIPTS,g.prettyLocator(A,e)+" lists build scripts, but all build scripts have been disabled."),[];if(e.linkType!==h.Un.HARD)return null==n||n.reportWarningOnce(p.b.SOFT_LINK_BUILD,g.prettyLocator(A,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),[];if(r&&!1===r.built)return null==n||n.reportInfoOnce(p.b.BUILD_DISABLED,g.prettyLocator(A,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),[];return y(e,t,"build",{configuration:A,report:n})?o:[]}const w=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function Q(e){return e.packageFs.getExtractHint({relevantExtensions:w})}function D(e){const t=s.y1.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}function b(e,{configuration:t}){return s.y1.resolve(t.get("pnpUnpluggedFolder"),g.slugifyLocator(e))}const v=new Set([g.makeIdent(null,"nan").identHash,g.makeIdent(null,"node-gyp").identHash,g.makeIdent(null,"node-pre-gyp").identHash,g.makeIdent(null,"node-addon-api").identHash,g.makeIdent(null,"fsevents").identHash]);class S{constructor(){this.mode="strict"}supportsPackage(e,t){return"pnp"===t.project.configuration.get("nodeLinker")&&t.project.configuration.get("pnpMode")===this.mode}async findPackageLocation(e,t){const r=T(t.project).main;if(!i.xfs.existsSync(r))throw new E.UsageError(`The project in ${l.pretty(t.project.configuration,t.project.cwd+"/package.json",l.Type.PATH)} doesn't seem to have been installed - running an install there might help`);const A=u.dynamicRequireNoCache(r),n={name:g.requirableIdent(e),reference:e.reference},o=A.getPackageInformation(n);if(!o)throw new E.UsageError(`Couldn't find ${g.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return s.cS.toPortablePath(o.packageLocation)}async findPackageLocator(e,t){const A=T(t.project).main;if(!i.xfs.existsSync(A))return null;const n=s.cS.fromPortablePath(A),o=u.dynamicRequire(n);delete r.c[n];const a=o.findPackageLocator(s.cS.fromPortablePath(e));return a?g.makeLocator(g.parseIdent(a.name),a.reference):null}makeInstaller(e){return new k(e)}}class k{constructor(e){this.opts=e,this.mode="strict",this.packageRegistry=new Map,this.virtualTemplates=new Map,this.customData={store:new Map},this.unpluggedPaths=new Set,this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){const r=g.requirableIdent(e),A=e.reference,n=!!this.opts.project.tryWorkspaceByLocator(e),o=e.peerDependencies.size>0&&!g.isVirtualLocator(e),i=!o&&!n,a=!o&&e.linkType!==h.Un.SOFT;let c=this.customData.store.get(e.locatorHash);void 0===c&&(c=await async function(e,t){var r;const A=null!==(r=await d.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new d.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{os:A.os,cpu:A.cpu,scripts:A.scripts,preferUnplugged:A.preferUnplugged},misc:{extractHint:Q(t),hasBindingGyp:D(t)}}}(0,t),e.linkType===h.Un.HARD&&this.customData.store.set(e.locatorHash,c));const l=this.opts.project.getDependencyMeta(e,e.version),p=i?m(e,c,l,{configuration:this.opts.project.configuration,report:this.opts.report}):[],f=a?await this.unplugPackageIfNeeded(e,c,t,l):t.packageFs;if(s.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const I=s.y1.resolve(f.getRealPath(),t.prefixPath),E=N(this.opts.project.cwd,I),B=new Map,y=new Set;if(g.isVirtualLocator(e)){for(const t of e.peerDependencies.values())B.set(g.requirableIdent(t),null),y.add(g.stringifyIdent(t));if(!this.opts.project.tryWorkspaceByLocator(e)){const t=g.devirtualizeLocator(e);this.virtualTemplates.set(t.locatorHash,{location:N(this.opts.project.cwd,C.p.resolveVirtual(I)),locator:t})}}return u.getMapWithDefault(this.packageRegistry,r).set(A,{packageLocation:E,packageDependencies:B,packagePeers:y,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),{packageLocation:I,buildDirective:p.length>0?p:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,A]of t){const t=g.areIdentsEqual(e,A)?A.reference:[g.requirableIdent(A),A.reference];r.packageDependencies.set(g.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(g.requirableIdent(e),e.reference)}}async finalizeInstall(){const e=new Set;for(const{locator:e,location:t}of this.virtualTemplates.values())u.getMapWithDefault(this.packageRegistry,g.stringifyIdent(e)).set(e.reference,{packageLocation:t,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const t=this.opts.project.configuration.get("pnpFallbackMode"),r=e,A=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:g.requirableIdent(e),reference:e.reference})),n="none"!==t,o=[],i=new Map,s=u.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),a=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===t)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&o.push({name:g.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:r,dependencyTreeRoots:A,enableTopLevelFallback:n,fallbackExclusionList:o,fallbackPool:i,ignorePattern:s,packageRegistry:a,shebang:c}),{customData:this.customData}}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=T(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await i.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await i.xfs.removePromise(t.main),void await i.xfs.removePromise(r);const A=await this.locateNodeModules(e.ignorePattern);if(A.length>0){this.opts.report.reportWarning(p.b.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(const e of A)await i.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const A=(0,I.gY)(e);await i.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.removePromise(r)}else{const A=s.y1.relative(s.y1.dirname(t.main),r),{dataFile:n,loaderFile:o}=(0,I.Q$)({...e,dataLocation:A});await i.xfs.changeFilePromise(t.main,o,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.changeFilePromise(r,n,{automaticNewlines:!0}),await i.xfs.chmodPromise(r,420)}const n=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await i.xfs.removePromise(n);else for(const e of await i.xfs.readdirPromise(n)){const t=s.y1.resolve(n,e);this.unpluggedPaths.has(t)||await i.xfs.removePromise(t)}}async locateNodeModules(e){const t=[],r=e?new RegExp(e):null;for(const e of this.opts.project.workspaces){const A=s.y1.join(e.cwd,"node_modules");if(r&&r.test(s.y1.relative(this.opts.project.cwd,e.cwd))||!i.xfs.existsSync(A))continue;const n=await i.xfs.readdirPromise(A,{withFileTypes:!0}),o=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(o.length===n.length)t.push(A);else for(const e of o)t.push(s.y1.join(A,e.name))}return t}async unplugPackageIfNeeded(e,t,r,A){return this.shouldBeUnplugged(e,t,A)?this.unplugPackage(e,r):r.packageFs}shouldBeUnplugged(e,t,r){return void 0!==r.unplugged?r.unplugged:!!v.has(e.identHash)||(null!==t.manifest.preferUnplugged?t.manifest.preferUnplugged:!!(m(e,t,r,{configuration:this.opts.project.configuration}).length>0||t.misc.extractHint))}async unplugPackage(e,t){const r=b(e,{configuration:this.opts.project.configuration});this.unpluggedPaths.add(r);const A=s.y1.join(r,t.prefixPath,".ready");return await i.xfs.existsPromise(A)||(await i.xfs.mkdirPromise(r,{recursive:!0}),await i.xfs.copyPromise(r,s.LZ.dot,{baseFs:t.packageFs,overwrite:!1}),await i.xfs.writeFilePromise(A,"")),new f.M(r)}getPackageInformation(e){const t=g.requirableIdent(e),r=e.reference,A=this.packageRegistry.get(t);if(!A)throw new Error(`Assertion failed: The package information store should have been available (for ${g.prettyIdent(this.opts.project.configuration,e)})`);const n=A.get(r);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${g.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){const t=u.getMapWithDefault(this.packageRegistry,"@@disk"),r=N(this.opts.project.cwd,e);return u.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1}))}}function N(e,t){let r=s.y1.relative(e,t);return r.match(/^\.{0,2}\//)||(r="./"+r),r.replace(/\/?$/,"/")}var F=r(36370),K=r(25413),M=r(85824),R=r(28148),x=r(15815),L=r(36545),P=r(2401),O=r.n(P);class U extends K.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.all=!1,this.recursive=!1,this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await M.I.find(e,this.context.cwd),A=await R.C.find(e);if(!r)throw new K.WorkspaceRequiredError(t.cwd,this.context.cwd);if("pnp"!==e.get("nodeLinker"))throw new E.UsageError("This command can only be used if the `nodeLinker` option is set to `pnp`");await t.restoreInstallState();const n=new Set(this.patterns),i=this.patterns.map(t=>{const r=g.parseDescriptor(t),A="unknown"!==r.range?r:g.makeDescriptor(r,"*");if(!c().validRange(A.range))throw new E.UsageError(`The range of the descriptor patterns must be a valid semver range (${g.prettyDescriptor(e,A)})`);return e=>{const r=g.stringifyIdent(e);return!!O().isMatch(r,g.stringifyIdent(A))&&(!(e.version&&!L.satisfiesWithPrereleases(e.version,A.range))&&(n.delete(t),!0))}}),s=e=>{const r=new Set,A=[],n=(e,o)=>{if(!r.has(e.locatorHash)&&(r.add(e.locatorHash),!t.tryWorkspaceByLocator(e)&&i.some(t=>t(e))&&A.push(e),!(o>0)||this.recursive))for(const r of e.dependencies.values()){const e=t.storedResolutions.get(r.descriptorHash);if(!e)throw new Error("Assertion failed: The resolution should have been registered");const A=t.storedPackages.get(e);if(!A)throw new Error("Assertion failed: The package should have been registered");n(A,o+1)}};for(const r of e){const e=t.storedPackages.get(r.anchoredLocator.locatorHash);if(!e)throw new Error("Assertion failed: The package should have been registered");n(e,0)}return A};let a,h;if(this.all&&this.recursive?(a=(()=>{const e=[];for(const r of t.storedPackages.values())t.tryWorkspaceByLocator(r)||g.isVirtualLocator(r)||!i.some(e=>e(r))||e.push(r);return e})(),h="the project"):this.all?(a=s(t.workspaces),h="any workspace"):(a=s([r]),h="this workspace"),n.size>1)throw new E.UsageError(`Patterns ${l.prettyList(e,n,l.Type.CODE)} don't match any packages referenced by ${h}`);if(n.size>0)throw new E.UsageError(`Pattern ${l.prettyList(e,n,l.Type.CODE)} doesn't match any packages referenced by ${h}`);a=u.sortMap(a,e=>g.stringifyLocator(e));return(await x.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async r=>{var n;for(const A of a){const o=null!==(n=A.version)&&void 0!==n?n:"unknown";t.topLevelWorkspace.manifest.ensureDependencyMeta(g.makeDescriptor(A,o)).unplugged=!0,r.reportInfo(p.b.UNNAMED,`Will unpack ${g.prettyLocator(e,A)} to ${l.pretty(e,b(A,{configuration:e}),l.Type.PATH)}`),r.reportJson({locator:g.stringifyLocator(A),version:o})}await t.topLevelWorkspace.persistManifest(),r.reportSeparator(),await t.install({cache:A,report:r})})).exitCode()}}U.usage=E.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]}),(0,F.gn)([E.Command.Rest()],U.prototype,"patterns",void 0),(0,F.gn)([E.Command.Boolean("-A,--all",{description:"Unplug direct dependencies from the entire project"})],U.prototype,"all",void 0),(0,F.gn)([E.Command.Boolean("-R,--recursive",{description:"Unplug both direct and transitive dependencies"})],U.prototype,"recursive",void 0),(0,F.gn)([E.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],U.prototype,"json",void 0),(0,F.gn)([E.Command.Path("unplug")],U.prototype,"execute",null);const T=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:s.y1.join(e.cwd,t),other:s.y1.join(e.cwd,r)}},j=e=>/\s/.test(e)?JSON.stringify(e):e;const Y={hooks:{populateYarnPaths:async function(e,t){t(T(e).main),t(T(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const A=T(e).main,n="--require "+j(s.cS.fromPortablePath(A));if(A.includes(" ")&&c().lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(i.xfs.existsSync(A)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${n} ${e}`:n,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:o.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:o.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:o.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:o.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:o.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:o.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:o.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:o.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[S],commands:[U]}},43418:(e,t,r)=>{"use strict";r.r(t);var A=r(50683),n=r.n(A);Object.fromEntries||(Object.fromEntries=n());var o=r(59355),i=r(10419),s=r(45330);(0,i.D)({binaryVersion:o.o||"",pluginConfiguration:(0,s.e)()})},25413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>A.F,WorkspaceRequiredError:()=>s,getDynamicLibs:()=>c,getPluginConfiguration:()=>g.e,main:()=>h.D,openWorkspace:()=>u,pluginCommands:()=>p.f});var A=r(56087),n=r(46611),o=r(46009),i=r(40822);class s extends i.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${o.y1.relative(e,t)} isn't a workspace of ${o.y1.join(e,n.G.fileName)}).`)}}const a=["@yarnpkg/cli","@yarnpkg/core","@yarnpkg/fslib","@yarnpkg/libzip","@yarnpkg/parsers","@yarnpkg/shell","clipanion","semver","yup"],c=()=>new Map(a.map(e=>[e,r(98497)(e)]));var g=r(45330),l=r(85824);async function u(e,t){const{project:r,workspace:A}=await l.I.find(e,t);if(!A)throw new s(r.cwd,t);return A}var h=r(10419),p=r(15683)},10419:(e,t,r)=>{"use strict";r.d(t,{D:()=>f});var A=r(36545),n=r(39922),o=r(81832),i=r(43896),s=r(46009),a=r(63129),c=r(5864),g=r(40822),l=r(35747),u=r(15683),h=r(36370),p=r(71643),d=r(56087);class C extends d.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${p.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${p.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${p.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${p.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${p.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${p.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${p.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function f({binaryVersion:e,pluginConfiguration:t}){async function r(){const h=new g.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});h.register(C);try{await async function h(p){var d,C,f,I,E;const B=process.versions.node,y=">=10.17 <14 || >14.1";if("1"!==process.env.YARN_IGNORE_NODE&&!A.satisfiesWithPrereleases(B,y))throw new g.UsageError(`This tool requires a Node version compatible with ${y} (got ${B}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);const m=await n.VK.find(s.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),w=m.get("yarnPath"),Q=m.get("ignorePath"),D=m.get("ignoreCwd");if(!Q&&!D&&w===s.cS.toPortablePath(s.cS.resolve(process.argv[1])))return process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",void await h(p);if(null===w||Q){Q&&delete process.env.YARN_IGNORE_PATH;m.get("enableTelemetry")&&!c.isCI&&process.stdout.isTTY&&(n.VK.telemetry=new o.E(m,"puba9cdc10ec5790a2cf4969dd413a47270")),null===(d=n.VK.telemetry)||void 0===d||d.reportVersion(e);for(const[e,t]of m.plugins.entries()){u.f.has(null!==(f=null===(C=e.match(/^@yarnpkg\/plugin-(.*)$/))||void 0===C?void 0:C[1])&&void 0!==f?f:"")&&(null===(I=n.VK.telemetry)||void 0===I||I.reportPluginName(e));for(const e of t.commands||[])p.register(e)}const A=p.process(process.argv.slice(2));A.help||null===(E=n.VK.telemetry)||void 0===E||E.reportCommandName(A.path.join(" "));const i=A.cwd;if(void 0!==i&&!D){const e=(0,l.realpathSync)(process.cwd()),t=(0,l.realpathSync)(i);if(e!==t)return process.chdir(i),void await r()}await p.runExit(A,{cwd:s.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(i.xfs.existsSync(w))try{!function(e){const t=s.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,a.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,a.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(w)}catch(e){process.exitCode=e.code||1}else process.stdout.write(p.error(new Error(`The "yarn-path" option has been set (in ${m.sources.get("yarnPath")}), but the specified location doesn't exist (${w}).`))),process.exitCode=1}(h)}catch(e){process.stdout.write(h.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1}).finally(()=>i.xfs.rmtempPromise())}(0,h.gn)([g.Command.Path("--welcome")],C.prototype,"execute",null)},15683:(e,t,r)=>{"use strict";r.d(t,{f:()=>A});const A=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]])},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var A=r(36370),n=r(40822);class o extends n.Command{}(0,A.gn)([n.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>I});var A=r(78420),n=r(15037),o=r(90739),i=r(14626),s=r(46009),a=r(43896),c=r(65281),g=r(35747),l=r.n(g),u=r(92659),h=r(35691),p=r(20624),d=r(73632),C=r(54143);const f=7;class I{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:A=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=A;const n=t.get("cacheKeyOverride");if(null!==n)this.cacheKey=""+n;else{const e=t.get("compressionLevel"),r=e!==o.k?"c"+e:"";this.cacheKey=[f,r].join("")}}static async find(e,{immutable:t,check:r}={}){const A=new I(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await A.setup(),A}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;const e=this.configuration.get("globalFolder")+"/cache";return e!==this.cwd?e:null}getVersionFilename(e){return`${C.slugifyLocator(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){const r=function(e){const t=e.indexOf("/");return-1!==t?e.slice(t+1):e}(t).slice(0,10);return`${C.slugifyLocator(e)}-${r}.zip`}getLocatorPath(e,t){if(null===this.mirrorCwd)return s.y1.resolve(this.cwd,this.getVersionFilename(e));if(null===t)return null;return E(t)!==this.cacheKey?null:s.y1.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){const t=this.mirrorCwd;return null!==t?s.y1.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache")){await a.xfs.mkdirPromise(this.cwd,{recursive:!0});const e=s.y1.resolve(this.cwd,".gitignore");await a.xfs.changeFilePromise(e,"/.gitignore\n*.flock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:g,loader:f,skipIntegrityCheck:I}){const B=this.getLocatorMirrorPath(e),y=new A.S,m=async(e,r=null)=>{const A=I&&t?t:`${this.cacheKey}/${await p.checksumFile(e)}`;if(null!==r){if(A!==(I&&t?t:`${this.cacheKey}/${await p.checksumFile(r)}`))throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&A!==t){let e;switch(e=this.check?"throw":E(t)!==E(A)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return A;default:case"throw":throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return A},w=async t=>{if(!f)throw new Error("Cache check required but no loader configured for "+C.prettyLocator(this.configuration,e));const r=await f(),A=r.getRealPath();return r.saveAndClose(),await a.xfs.chmodPromise(A,420),await m(t,A)},Q=async()=>{if(null===B||!await a.xfs.existsPromise(B)){const e=await f(),t=e.getRealPath();return e.saveAndClose(),t}const t=await a.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await a.xfs.copyFilePromise(B,r,l().constants.COPYFILE_FICLONE),r},D=async()=>{if(!f)throw new Error("Cache entry required but missing for "+C.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(u.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+C.prettyLocator(this.configuration,e));const t=await Q();await a.xfs.chmodPromise(t,420);const r=await m(t),A=this.getLocatorPath(e,r);if(!A)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(A,async()=>await this.writeFileWithLock(B,async()=>(await a.xfs.movePromise(t,A),null!==B&&await a.xfs.copyFilePromise(A,B,l().constants.COPYFILE_FICLONE),[A,r])))};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const[b,v]=await(async()=>{const A=(async()=>{const A=this.getLocatorPath(e,t),n=null!==A&&await y.existsPromise(A),o=n?r:g;if(o&&o(),n){let e=null;const t=A;return e=this.check?await w(t):await m(t),[t,e]}return D()})();this.mutexes.set(e.locatorHash,A);try{return await A}finally{this.mutexes.delete(e.locatorHash)}})();this.markedFiles.add(b);let S=null;const k=await(0,c.getLibzipPromise)(),N=new n.v(()=>d.prettifySyncErrors(()=>S=new o.d(b,{baseFs:y,libzip:k,readOnly:!0}),t=>`Failed to open the cache entry for ${C.prettyLocator(this.configuration,e)}: ${t}`),s.y1);return[new i.K(b,{baseFs:N,pathUtils:s.y1}),()=>{null!==S&&S.discardAndClose()},v]}async writeFileWithLock(e,t){return null===e?await t():(await a.xfs.mkdirPromise(s.y1.dirname(e),{recursive:!0}),await a.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},39922:(e,t,r)=>{"use strict";r.d(t,{VK:()=>W,nh:()=>U,tr:()=>O,a5:()=>j,EW:()=>z,a2:()=>T});var A=r(43896),n=r(46009),o=r(90739),i=r(11640),s=r(54738),a=r.n(s),c=r(5864),g=r(40822),l=r(61578),u=r.n(l),h=r(53887),p=r.n(h),d=r(92413),C=r(92659),f=r(54143);const I={hooks:{reduceDependency:(e,t,r,A,{resolver:n,resolveOptions:o})=>{for(const{pattern:A,reference:i}of t.topLevelWorkspace.manifest.resolutions){if(A.from&&A.from.fullName!==f.requirableIdent(r))continue;if(A.from&&A.from.description&&A.from.description!==r.reference)continue;if(A.descriptor.fullName!==f.requirableIdent(e))continue;if(A.descriptor.description&&A.descriptor.description!==e.range)continue;return n.bindDescriptor(f.makeDescriptor(e,i),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const A=f.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${A}: ${r}`),reportError:(e,r)=>t.reportError(e,`${A}: ${r}`)})}},validateWorkspace:async(e,t)=>{const{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(const e of r.errors)t.reportWarning(C.b.INVALID_MANIFEST,e.message)}}};var E=r(46611),B=r(35691);class y{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){const r=this.getFetcher(e,t);return await r.fetch(e,t)}tryFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));return r||null}getFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));if(!r)throw new B.lk(C.b.FETCHER_NOT_FOUND,f.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var m=r(27092),w=r(52779),Q=r(60895);class D{static isVirtualDescriptor(e){return!!e.range.startsWith(D.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(D.protocol)}supportsDescriptor(e,t){return D.isVirtualDescriptor(e)}supportsLocator(e,t){return D.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,r){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,t,r){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}D.protocol="virtual:";var b=r(75448),v=r(94538);class S{supports(e){return!!e.reference.startsWith(v.d.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){const r=this.getWorkspace(e,t).cwd;return{packageFs:new b.M(r),prefixPath:n.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(v.d.protocol.length))}}var k=r(81111),N=r(71643),F=r(73632),K=r(32282),M=r.n(K);function R(e){return("undefined"!=typeof require?require:r(32178))(e)}var x=r(36545),L=r(32485);const P=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput"]),O=".yarnrc.yml",U="yarn.lock";var T;!function(e){e.ANY="ANY",e.BOOLEAN="BOOLEAN",e.ABSOLUTE_PATH="ABSOLUTE_PATH",e.LOCATOR="LOCATOR",e.LOCATOR_LOOSE="LOCATOR_LOOSE",e.NUMBER="NUMBER",e.STRING="STRING",e.SECRET="SECRET",e.SHAPE="SHAPE",e.MAP="MAP"}(T||(T={}));const j=N.Type,Y={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:T.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:T.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:T.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:T.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:T.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:T.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:T.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:T.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:o.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:T.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:T.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:T.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:T.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:T.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:T.STRING,default:q()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:T.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:T.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:T.BOOLEAN,default:N.supportsColor,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:T.BOOLEAN,default:N.supportsHyperlinks,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:T.BOOLEAN,default:c.isCI,defaultText:""},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:T.BOOLEAN,default:!c.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:T.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:T.BOOLEAN,default:c.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:T.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:T.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:T.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:T.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:T.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:T.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:T.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:T.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:T.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:T.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:T.NUMBER,default:1/0},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:T.MAP,valueDefinition:{description:"",type:T.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:T.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:T.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:T.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:T.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:T.STRING,values:Object.values(N.LogLevel),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:T.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:T.NUMBER,default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:T.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:T.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:T.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:T.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:T.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:T.SHAPE,properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:T.MAP,valueDefinition:{description:"A range",type:T.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:T.MAP,valueDefinition:{description:"A semver range",type:T.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:T.MAP,valueDefinition:{description:"The peerDependency meta",type:T.SHAPE,properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:T.BOOLEAN,default:!1}}}}}}}};function G(e,t,r,A,n){if(A.isArray)return Array.isArray(r)?r.map((r,o)=>H(e,`${t}[${o}]`,r,A,n)):String(r).split(/,/).map(r=>H(e,t,r,A,n));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return H(e,t,r,A,n)}function H(e,t,r,A,o){var i;switch(A.type){case T.ANY:return r;case T.SHAPE:return function(e,t,r,A,n){if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Object configuration settings "${t}" must be an object`);const o=J(e,A,{ignoreArrays:!0});if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=`${t}.${i}`;if(!A.properties[i])throw new g.UsageError(`Unrecognized configuration settings found: ${t}.${i} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(i,G(e,r,s,A.properties[i],n))}return o}(e,t,r,A,o);case T.MAP:return function(e,t,r,A,n){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=A.normalizeKeys?A.normalizeKeys(i):i,a=`${t}['${r}']`,c=A.valueDefinition;o.set(r,G(e,a,s,c,n))}return o}(e,t,r,A,o)}if(null===r&&!A.isNullable&&null!==A.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(i=A.values)||void 0===i?void 0:i.includes(r))return r;const s=(()=>{if(A.type===T.BOOLEAN)return F.parseBoolean(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=F.replaceEnvVariables(r,{env:process.env});switch(A.type){case T.ABSOLUTE_PATH:return n.y1.resolve(o,n.cS.toPortablePath(e));case T.LOCATOR_LOOSE:return f.parseLocator(e,!1);case T.NUMBER:return parseInt(e);case T.LOCATOR:return f.parseLocator(e);default:return e}})();if(A.values&&!A.values.includes(s))throw new Error("Invalid value, expected one of "+A.values.join(", "));return s}function J(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case T.SHAPE:{if(t.isArray&&!r)return[];const A=new Map;for(const[r,n]of Object.entries(t.properties))A.set(r,J(e,n));return A}case T.MAP:return t.isArray&&!r?[]:new Map;case T.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?n.y1.isAbsolute(t.default)?n.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>n.y1.resolve(e.projectCwd,t)):n.y1.resolve(e.projectCwd,t.default);default:return t.default}}function q(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var z;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(z||(z={}));class W{constructor(e){this.projectCwd=null,this.plugins=new Map,this.settings=new Map,this.values=new Map,this.sources=new Map,this.invalid=new Map,this.packageExtensions=new Map,this.limits=new Map,this.startingCwd=e}static create(e,t,r){const A=new W(e);void 0===t||t instanceof Map||(A.projectCwd=t),A.importSettings(Y);const n=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of n)A.activatePlugin(e,t);return A}static async find(e,t,{lookup:r=z.LOCKFILE,strict:o=!0,usePath:i=!1,useRc:s=!0}={}){const c=function(){const e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith("yarn_")&&(t=a()(t.slice("yarn_".length)),e[t]=r);return e}();delete c.rcFilename;const l=await W.findRcFiles(e),u=await W.findHomeRcFile(),h=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A}),p=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A,...n})=>n,d=new W(e);d.importSettings(h(Y)),d.useWithSource("",h(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,h(r),t,{strict:!1});if(u&&d.useWithSource(u.path,h(u.data),u.cwd,{strict:!1}),i){const e=d.get("yarnPath"),t=d.get("ignorePath");if(null!==e&&!t)return d}const C=d.get("lockfileFilename");let f;switch(r){case z.LOCKFILE:f=await W.findProjectCwd(e,C);break;case z.MANIFEST:f=await W.findProjectCwd(e,null);break;case z.NONE:f=A.xfs.existsSync(n.y1.join(e,"package.json"))?n.y1.resolve(e):null}d.startingCwd=e,d.projectCwd=f,d.importSettings(p(Y));const E=new Map([["@@core",I]]);if(null!==t){for(const e of t.plugins.keys())E.set(e,(B=t.modules.get(e)).__esModule?B.default:B);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>R(e));for(const[e,A]of t.modules)r.set(e,()=>A);const A=new Set,o=e=>e.default||e,i=(e,t)=>{const{factory:i,name:s}=R(n.cS.fromPortablePath(e));if(A.has(s))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new g.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},l=F.prettifySyncErrors(()=>o(i(c)),e=>`${e} (when initializing ${s}, defined in ${t})`);r.set(s,()=>l),A.add(s),E.set(s,l)};if(c.plugins)for(const t of c.plugins.split(";")){i(n.y1.resolve(e,n.cS.toPortablePath(t)),"")}for(const{path:e,cwd:t,data:r}of l)if(s&&Array.isArray(r.plugins))for(const A of r.plugins){const r="string"!=typeof A?A.path:A;i(n.y1.resolve(t,n.cS.toPortablePath(r)),e)}}var B;for(const[e,t]of E)d.activatePlugin(e,t);d.useWithSource("",p(c),e,{strict:o});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,p(r),t,{strict:o});return u&&d.useWithSource(u.path,p(u.data),u.cwd,{strict:!1}),d.get("enableGlobalCache")&&(d.values.set("cacheFolder",d.get("globalFolder")+"/cache"),d.sources.set("cacheFolder","")),await d.refreshPackageExtensions(),d}static async findRcFiles(e){const t=q(),r=[];let o=e,s=null;for(;o!==s;){s=o;const e=n.y1.join(s,t);if(A.xfs.existsSync(e)){const t=await A.xfs.readFilePromise(e,"utf8");let n;try{n=(0,i.parseSyml)(t)}catch(r){let A="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(A=" (in particular, make sure you list the colons after each key name)"),new g.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${A}`)}r.push({path:e,cwd:s,data:n})}o=n.y1.dirname(s)}return r}static async findHomeRcFile(){const e=q(),t=k.getHomeFolder(),r=n.y1.join(t,e);if(A.xfs.existsSync(r)){const e=await A.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,i.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,o=e,i=null;for(;o!==i;){if(i=o,A.xfs.existsSync(n.y1.join(i,"package.json"))&&(r=i),null!==t){if(A.xfs.existsSync(n.y1.join(i,t))){r=i;break}}else if(null!==r)break;o=n.y1.dirname(i)}return r}static async updateConfiguration(e,t){const r=q(),o=n.y1.join(e,r),s=A.xfs.existsSync(o)?(0,i.parseSyml)(await A.xfs.readFilePromise(o,"utf8")):{};let a,c=!1;if("function"==typeof t){try{a=t(s)}catch(e){a=t({})}if(a===s)return}else{a=s;for(const e of Object.keys(t)){const r=s[e],A=t[e];let n;if("function"==typeof A)try{n=A(r)}catch(e){n=A(void 0)}else n=A;r!==n&&(a[e]=n,c=!0)}if(!c)return}await A.xfs.changeFilePromise(o,(0,i.stringifySyml)(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await W.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),void 0!==t.configuration&&this.importSettings(t.configuration)}importSettings(e){for(const[t,r]of Object.entries(e))if(null!=r){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,J(this,r))}}useWithSource(e,t,r,A){try{this.use(e,t,r,A)}catch(t){throw t.message+=` (in ${N.pretty(this,e,N.Type.PATH)})`,t}}use(e,t,r,{strict:A=!0,overwrite:n=!1}={}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if(""===e&&P.has(o))continue;if("rcFilename"===o)throw new g.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const i=this.settings.get(o);if(!i){if(A)throw new g.UsageError(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!(n||i.type===T.MAP||i.isArray&&i.concatenateValues))continue;let s;try{s=G(this,o,t[o],i,r)}catch(t){throw t.message+=" in "+N.pretty(this,e,N.Type.PATH),t}if(i.type===T.MAP){const t=this.values.get(o);this.values.set(o,new Map(n?[...t,...s]:[...s,...t])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(i.isArray&&i.concatenateValues){const t=this.values.get(o);this.values.set(o,n?[...t,...s]:[...s,...t]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,s),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:r=!1}){const A=this.get(e),o=this.settings.get(e);if(void 0===o)throw new g.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,A){if(r.type===T.SECRET&&"string"==typeof t&&A.hideSecrets)return"********";if(r.type===T.ABSOLUTE_PATH&&"string"==typeof t&&A.getNativePaths)return n.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const n=[];for(const o of t)n.push(e(o,r,A));return n}if(r.type===T.MAP&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries())n.set(o,e(i,r.valueDefinition,A));return n}if(r.type===T.SHAPE&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries()){const t=r.properties[o];n.set(o,e(i,t,A))}return n}return t}(A,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let o,i;const s=A.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${N.pretty(this,"STDOUT","green")}`),t=n.createStreamReporter(`${r} ${N.pretty(this,"STDERR","red")}`);o=new d.PassThrough,o.pipe(e),o.pipe(s),i=new d.PassThrough,i.pipe(t),i.pipe(s)}else o=s,i=s,void 0!==t&&o.write(t+"\n");return{stdout:o,stderr:i}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new m.B([new D,new v.d,new w.O,...e])}makeFetcher(){const e=[];for(const t of this.plugins.values())for(const r of t.fetchers||[])e.push(new r);return new y([new Q.N,new S,...e])}getLinkers(){const e=[];for(const t of this.plugins.values())for(const r of t.linkers||[])e.push(new r);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;const e=this.packageExtensions,t=(t,r,{userProvided:A=!1}={})=>{if(!p().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new E.G;n.load(r,{yamlCompatibilityMode:!0});const o=[];F.getArrayWithDefault(e,t.identHash).push([t.range,o]);const i={status:L._u.Inactive,userProvided:A,parentDescriptor:t};for(const e of n.dependencies.values())o.push({...i,type:L.HN.Dependency,descriptor:e,description:`${f.stringifyIdent(t)} > ${f.stringifyIdent(e)}`});for(const e of n.peerDependencies.values())o.push({...i,type:L.HN.PeerDependency,descriptor:e,description:`${f.stringifyIdent(t)} >> ${f.stringifyIdent(e)}`});for(const[e,r]of n.peerDependenciesMeta)for(const[A,n]of Object.entries(r))o.push({...i,type:L.HN.PeerDependencyMeta,selector:e,key:A,value:n,description:`${f.stringifyIdent(t)} >> ${e} / ${A}`})};await this.triggerHook(e=>e.registerPackageExtensions,this,t);for(const[e,r]of this.get("packageExtensions"))t(f.parseDescriptor(e,!0),F.convertMapsToIndexableObjects(r),{userProvided:!0})}normalizePackage(e){const t=f.copyPackage(e);if(null==this.packageExtensions)throw new Error("refreshPackageExtensions has to be called before normalizing packages");const r=this.packageExtensions.get(e.identHash);if(void 0!==r){const A=e.version;if(null!==A)for(const[e,n]of r)if(x.satisfiesWithPrereleases(A,e))for(const e of n)switch(e.status===L._u.Inactive&&(e.status=L._u.Redundant),e.type){case L.HN.Dependency:void 0===t.dependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.dependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependency:void 0===t.peerDependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.peerDependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependencyMeta:{const r=t.peerDependenciesMeta.get(e.selector);void 0!==r&&Object.prototype.hasOwnProperty.call(r,e.key)&&r[e.key]===e.value||(e.status=L._u.Active,F.getFactoryWithDefault(t.peerDependenciesMeta,e.selector,()=>({}))[e.key]=e.value)}break;default:F.assertNever(e)}}const A=e=>e.scope?`${e.scope}__${e.name}`:""+e.name;for(const e of t.peerDependencies.values()){if("@types"===e.scope)continue;const r=A(e),n=f.makeIdent("types",r);t.peerDependencies.has(n.identHash)||t.peerDependenciesMeta.has(n.identHash)||t.peerDependenciesMeta.set(f.stringifyIdent(n),{optional:!0})}for(const e of t.peerDependenciesMeta.keys()){const r=f.parseIdent(e);t.peerDependencies.has(r.identHash)||t.peerDependencies.set(r.identHash,f.makeDescriptor(r,"*"))}return t.dependencies=new Map(F.sortMap(t.dependencies,([,e])=>f.stringifyDescriptor(e))),t.peerDependencies=new Map(F.sortMap(t.peerDependencies,([,e])=>f.stringifyDescriptor(e))),t}getLimit(e){return F.getFactoryWithDefault(this.limits,e,()=>u()(this.get(e)))}async triggerHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);n&&await n(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let A=t;for(const t of this.plugins.values()){const n=t.hooks;if(!n)continue;const o=e(n);o&&(A=await o(A,...r))}return A}async firstHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);if(!n)continue;const o=await n(...t);if(void 0!==o)return o}return null}format(e,t){return N.pretty(this,e,t)}}W.telemetry=null},92409:(e,t,r)=>{"use strict";var A;r.d(t,{k:()=>A}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(A||(A={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var A=r(35691),n=r(15815),o=r(71643);class i extends A.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,o.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.stdout=t,this.suggestInstall=r}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${o.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${t}\n`)}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(o.pretty(this.configuration,"➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(o.pretty(this.configuration,"➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatNameWithHyperlink(e){return(0,n.Qw)(e,{configuration:this.configuration,json:!1})}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>l});var A=r(78420),n=r(46009),o=r(11640),i=r(53887),s=r.n(i),a=r(73632),c=r(36545),g=r(54143);class l{constructor(){this.indent=" ",this.name=null,this.version=null,this.os=null,this.cpu=null,this.type=null,this.private=!1,this.license=null,this.main=null,this.module=null,this.browser=null,this.languageName=null,this.bin=new Map,this.scripts=new Map,this.dependencies=new Map,this.devDependencies=new Map,this.peerDependencies=new Map,this.workspaceDefinitions=[],this.dependenciesMeta=new Map,this.peerDependenciesMeta=new Map,this.resolutions=[],this.files=null,this.publishConfig=null,this.installConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new A.S}={}){const r=n.y1.join(e,"package.json");return await t.existsPromise(r)?await l.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await l.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new A.S}={}){const r=new l;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new l;return t.loadFromText(e),t}static isManifestFieldCompatible(e,t){if(null===e)return!0;let r=!0,A=!1;for(const n of e)if("!"===n[0]){if(A=!0,t===n.slice(1))return!1}else if(r=!1,n===t)return!0;return A&&r}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=u(e)}async loadFile(e,{baseFs:t=new A.S}){const r=await t.readFilePromise(e,"utf8");let n;try{n=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(n),this.indent=u(r)}load(e,{yamlCompatibilityMode:t=!1}={}){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const r=[];if("string"==typeof e.name)try{this.name=g.parseIdent(e.name)}catch(e){r.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const t=[];this.os=t;for(const A of e.os)"string"!=typeof A?r.push(new Error("Parsing failed for the 'os' field")):t.push(A)}if(Array.isArray(e.cpu)){const t=[];this.cpu=t;for(const A of e.cpu)"string"!=typeof A?r.push(new Error("Parsing failed for the 'cpu' field")):t.push(A)}if("string"==typeof e.type&&(this.type=e.type),"boolean"==typeof e.private&&(this.private=e.private),"string"==typeof e.license&&(this.license=e.license),"string"==typeof e.languageName&&(this.languageName=e.languageName),"string"==typeof e.main&&(this.main=p(e.main)),"string"==typeof e.module&&(this.module=p(e.module)),null!=e.browser)if("string"==typeof e.browser)this.browser=p(e.browser);else{this.browser=new Map;for(const[t,r]of Object.entries(e.browser))this.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,p(e.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[t,A]of Object.entries(e.bin))"string"==typeof A?this.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[t,A]of Object.entries(e.scripts))"string"==typeof A?this.scripts.set(t,A):r.push(new Error(`Invalid script definition for '${t}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[t,A]of Object.entries(e.dependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[t,A]of Object.entries(e.devDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.devDependencies.set(n.identHash,n)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[t,A]of Object.entries(e.peerDependencies)){let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}"string"==typeof A&&c.validRange(A)||(r.push(new Error(`Invalid dependency range for '${t}'`)),A="*");const n=g.makeDescriptor(e,A);this.peerDependencies.set(n.identHash,n)}"object"==typeof e.workspaces&&e.workspaces.nohoist&&r.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));const A=Array.isArray(e.workspaces)?e.workspaces:"object"==typeof e.workspaces&&null!==e.workspaces&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];for(const e of A)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):r.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[A,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error("Invalid meta field for '"+A));continue}const e=g.parseDescriptor(A),o=this.ensureDependencyMeta(e),i=d(n.built,{yamlCompatibilityMode:t});if(null===i){r.push(new Error(`Invalid built meta field for '${A}'`));continue}const s=d(n.optional,{yamlCompatibilityMode:t});if(null===s){r.push(new Error(`Invalid optional meta field for '${A}'`));continue}const a=d(n.unplugged,{yamlCompatibilityMode:t});null!==a?Object.assign(o,{built:i,optional:s,unplugged:a}):r.push(new Error(`Invalid unplugged meta field for '${A}'`))}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[A,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error(`Invalid meta field for '${A}'`));continue}const e=g.parseDescriptor(A),o=this.ensurePeerDependencyMeta(e),i=d(n.optional,{yamlCompatibilityMode:t});null!==i?Object.assign(o,{optional:i}):r.push(new Error(`Invalid optional meta field for '${A}'`))}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[t,A]of Object.entries(e.resolutions))if("string"==typeof A)try{this.resolutions.push({pattern:(0,o.parseResolution)(t),reference:A})}catch(e){r.push(e);continue}else r.push(new Error(`Invalid resolution entry for '${t}'`));if(Array.isArray(e.files)){this.files=new Set;for(const t of e.files)"string"==typeof t?this.files.add(t):r.push(new Error(`Invalid files entry for '${t}'`))}if("object"==typeof e.publishConfig&&null!==e.publishConfig){if(this.publishConfig={},"string"==typeof e.publishConfig.access&&(this.publishConfig.access=e.publishConfig.access),"string"==typeof e.publishConfig.main&&(this.publishConfig.main=p(e.publishConfig.main)),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=p(e.publishConfig.module)),null!=e.publishConfig.browser)if("string"==typeof e.publishConfig.browser)this.publishConfig.browser=p(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(const[t,r]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,p(e.publishConfig.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.publishConfig.bin&&null!==e.publishConfig.bin){this.publishConfig.bin=new Map;for(const[t,A]of Object.entries(e.publishConfig.bin))"string"==typeof A?this.publishConfig.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`))}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(const t of e.publishConfig.executableFiles)"string"==typeof t?this.publishConfig.executableFiles.add(p(t)):r.push(new Error("Invalid executable file definition"))}}if("object"==typeof e.installConfig&&null!==e.installConfig){this.installConfig={};for(const t of Object.keys(e.installConfig))"hoistingLimits"===t?"string"==typeof e.installConfig.hoistingLimits?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:r.push(new Error("Invalid hoisting limits definition")):r.push(new Error("Unrecognized installConfig key: "+t))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[t,A]of Object.entries(e.optionalDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n);const o=g.makeDescriptor(e,"unknown"),i=this.ensureDependencyMeta(o);Object.assign(i,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=r}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!this.dependencies.has(e.identHash)||!!this.peerDependencies.has(e.identHash)}hasHardDependency(e){return!!this.dependencies.has(e.identHash)||!!this.devDependencies.has(e.identHash)}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!this.hasHardDependency(e)||!!this.hasSoftDependency(e)}isCompatibleWithOS(e){return l.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return l.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!s().valid(e.range))throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let A=this.dependenciesMeta.get(t);A||this.dependenciesMeta.set(t,A=new Map);let n=A.get(r);return n||A.set(r,n={}),n}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),r}setRawField(e,t,{after:r=[]}={}){const A=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===A.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,n=this.raw={};let o=!1;for(const i of Object.keys(r))n[i]=r[i],o||(A.delete(i),0===A.size&&(n[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){if(Object.assign(e,this.raw),null!==this.name?e.name=g.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete e.os,null!==this.cpu?e.cpu=this.cpu:delete e.cpu,null!==this.type?e.type=this.type:delete e.type,this.private?e.private=!0:delete e.private,null!==this.license?e.license=this.license:delete e.license,null!==this.languageName?e.languageName=this.languageName:delete e.languageName,null!==this.main?e.main=this.main:delete e.main,null!==this.module?e.module=this.module:delete e.module,null!==this.browser){const t=this.browser;"string"==typeof t?e.browser=t:t instanceof Map&&(e.browser=Object.assign({},...Array.from(t.keys()).sort().map(e=>({[e]:t.get(e)}))))}else delete e.browser;1===this.bin.size&&null!==this.name&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(e=>({[e]:this.bin.get(e)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:e})=>e)}:e.workspaces=this.workspaceDefinitions.map(({pattern:e})=>e):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;const r=[],A=[];for(const e of this.dependencies.values()){const n=this.dependenciesMeta.get(g.stringifyIdent(e));let o=!1;if(t&&n){const e=n.get(null);e&&e.optional&&(o=!0)}o?A.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...g.sortDescriptors(r).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.dependencies,A.length>0?e.optionalDependencies=Object.assign({},...g.sortDescriptors(A).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...g.sortDescriptors(this.devDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...g.sortDescriptors(this.peerDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,A]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[n,o]of a.sortMap(A.entries(),([e,t])=>null!==e?"0"+e:"1")){const A=null!==n?g.stringifyDescriptor(g.makeDescriptor(g.parseIdent(r),n)):r,i={...o};t&&null===n&&delete i.optional,0!==Object.keys(i).length&&(e.dependenciesMeta[A]=i)}return 0===Object.keys(e.dependenciesMeta).length&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...a.sortMap(this.peerDependenciesMeta.entries(),([e,t])=>e).map(([e,t])=>({[e]:t}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:e,reference:t})=>({[(0,o.stringifyResolution)(e)]:t}))):delete e.resolutions,null!==this.files?e.files=Array.from(this.files):delete e.files,null!==this.preferUnplugged?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,e}}function u(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function p(e){return e.replace(/\\/g,"/")}function d(e,{yamlCompatibilityMode:t}){return t?a.tryParseOptionalBoolean(e):void 0===e||"boolean"==typeof e?e:null}l.fileName="package.json",l.allDependencies=["dependencies","devDependencies","peerDependencies"],l.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var A;function n(e){return"YN"+e.toString(10).padStart(4,"0")}r.d(t,{b:()=>A,i:()=>n}),function(e){e[e.UNNAMED=0]="UNNAMED",e[e.EXCEPTION=1]="EXCEPTION",e[e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",e[e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",e[e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",e[e.BUILD_DISABLED=5]="BUILD_DISABLED",e[e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",e[e.MUST_BUILD=7]="MUST_BUILD",e[e.MUST_REBUILD=8]="MUST_REBUILD",e[e.BUILD_FAILED=9]="BUILD_FAILED",e[e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",e[e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",e[e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",e[e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",e[e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",e[e.REMOTE_INVALID=15]="REMOTE_INVALID",e[e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",e[e.RESOLUTION_PACK=17]="RESOLUTION_PACK",e[e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",e[e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",e[e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",e[e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",e[e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",e[e.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",e[e.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",e[e.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",e[e.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",e[e.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",e[e.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",e[e.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",e[e.FETCH_FAILED=30]="FETCH_FAILED",e[e.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",e[e.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",e[e.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",e[e.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",e[e.NETWORK_ERROR=35]="NETWORK_ERROR",e[e.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",e[e.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",e[e.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",e[e.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",e[e.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",e[e.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",e[e.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",e[e.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",e[e.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",e[e.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",e[e.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",e[e.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",e[e.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",e[e.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",e[e.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",e[e.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",e[e.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",e[e.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",e[e.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",e[e.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",e[e.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",e[e.INVALID_MANIFEST=57]="INVALID_MANIFEST",e[e.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",e[e.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",e[e.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",e[e.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",e[e.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",e[e.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",e[e.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",e[e.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",e[e.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",e[e.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",e[e.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",e[e.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION"}(A||(A={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var A=r(54143);class n{constructor(e){this.resolvers=e.filter(e=>e)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.getResolverByDescriptor(e,r).bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,r){const A=this.getResolverByDescriptor(e,r);return await A.getCandidates(e,t,r)}async getSatisfying(e,t,r){return this.getResolverByDescriptor(e,r).getSatisfying(e,t,r)}async resolve(e,t){const r=this.getResolverByLocator(e,t);return await r.resolve(e,t)}tryResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));return r||null}getResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));if(!r)throw new Error(A.prettyDescriptor(t.project.configuration,e)+" isn't supported by any available resolver");return r}tryResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));return r||null}getResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));if(!r)throw new Error(A.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},85824:(e,t,r)=>{"use strict";r.d(t,{I:()=>ie});var A=r(43896),n=r(46009),o=r(5944),i=r(11640),s=r(40822),a=r(76417);function c(){}function g(e,t,r,A,n){for(var o=0,i=t.length,s=0,a=0;oe.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var u=t[i-1];return i>1&&"string"==typeof u.value&&(u.added||u.removed)&&e.equals("",u.value)&&(t[i-2].value+=u.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}c.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=r.callback;"function"==typeof r&&(A=r,r={}),this.options=r;var n=this;function o(e){return A?(setTimeout((function(){A(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var i=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,a=1,c=i+s,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=i&&h+1>=s)return o([{value:this.join(t),count:t.length}]);function p(){for(var r=-1*a;r<=a;r+=2){var A=void 0,c=u[r-1],h=u[r+1],p=(h?h.newPos:0)-r;c&&(u[r-1]=void 0);var d=c&&c.newPos+1=i&&p+1>=s)return o(g(n,A.components,t,e,n.useLongestToken));u[r]=A}else u[r]=void 0}a++}if(A)!function e(){setTimeout((function(){if(a>c)return A();p()||e()}),0)}();else for(;a<=c;){var d=p();if(d)return d}},pushComponent:function(e,t,r){var A=e[e.length-1];A&&A.added===t&&A.removed===r?e[e.length-1]={count:A.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,A){for(var n=t.length,o=r.length,i=e.newPos,s=i-A,a=0;i+10?a(d.lines.slice(-i.context)):[],g-=u.length,l-=u.length)}(o=u).push.apply(o,E(n.map((function(e){return(t.added?"+":"-")+e})))),t.added?p+=n.length:h+=n.length}else{if(g)if(n.length<=2*i.context&&e=s.length-2&&n.length<=i.context){var y=/\n$/.test(r),m=/\n$/.test(A),w=0==n.length&&u.length>B.oldLines;!y&&w&&u.splice(B.oldLines,0,"\\ No newline at end of file"),(y||w)&&m||u.push("\\ No newline at end of file")}c.push(B),g=0,l=0,u=[]}h+=n.length,p+=n.length}},f=0;f`${r}#commit=${A}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/,e=>"npm:"+e],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class T{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=n.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!A.xfs.existsSync(r))return;const o=await A.xfs.readFilePromise(r,"utf8"),s=(0,i.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(s)){let A=O.tryParseDescriptor(r);if(!A){t.reportWarning(P.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(A.range)&&(A=O.makeDescriptor(A,"npm:"+A.range));const{version:n,resolved:o}=s[r];if(!o)continue;let i;for(const[e,t]of U){const r=o.match(e);if(r){i=t(n,...r);break}}if(!i){t.reportWarning(P.b.YARN_IMPORT_FAILED,`${O.prettyDescriptor(e.configuration,A)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=O.makeLocator(A,i);a.set(A.descriptorHash,c)}}supportsDescriptor(e,t){return!!this.resolutions&&this.resolutions.has(e.descriptorHash)}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,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");const A=this.resolutions.get(e.descriptorHash);if(!A)throw new Error("Assertion failed: The resolution should have been registered");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class j{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(O.convertDescriptorToLocator(e).locatorHash)}supportsLocator(e,t){return!!t.project.originalPackages.has(e.locatorHash)}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,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=r.project.originalPackages.get(O.convertDescriptorToLocator(e).locatorHash);if(A)return[A];const n=r.project.storedResolutions.get(e.descriptorHash);if(!n)throw new Error("Expected the resolution to have been successful - resolution not found");if(A=r.project.originalPackages.get(n),!A)throw new Error("Expected the resolution to have been successful - package not found");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.originalPackages.get(e.locatorHash);if(!r)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return r}}var Y=r(46611),G=r(27092),H=r(35691);class J{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.resolver.bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async getSatisfying(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async resolve(e,t){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}}var q=r(33720),z=r(17722),W=r(81111),X=r(71643),V=r(20624),_=r(73632),Z=r(63088),$=r(36545),ee=r(32485);const te=/ *, */g,re=/\/$/,Ae=(0,N.promisify)(R().gzip),ne=(0,N.promisify)(R().gunzip),oe={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"]};class ie{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.accessibleLocators=new Set,this.originalPackages=new Map,this.optionalBuilds=new Set,this.peerRequirements=new Map,this.installersCustomData=new Map,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){var r,o,i;if(!e.projectCwd)throw new s.UsageError("No project found in "+t);let a=e.projectCwd,c=t,g=null;for(;g!==e.projectCwd;){if(g=c,A.xfs.existsSync(n.y1.join(g,n.QS.manifest))){a=g;break}c=n.y1.dirname(g)}const l=new ie(e.projectCwd,{configuration:e});null===(r=x.VK.telemetry)||void 0===r||r.reportProject(l.cwd),await l.setupResolutions(),await l.setupWorkspaces(),null===(o=x.VK.telemetry)||void 0===o||o.reportWorkspaceCount(l.workspaces.length),null===(i=x.VK.telemetry)||void 0===i||i.reportDependencyCount(l.workspaces.reduce((e,t)=>e+t.manifest.dependencies.size+t.manifest.devDependencies.size,0));const u=l.tryWorkspaceByCwd(a);if(u)return{project:l,workspace:u,locator:u.anchoredLocator};const h=await l.findLocatorForLocation(a+"/",{strict:!0});if(h)return{project:l,locator:h,workspace:null};throw new s.UsageError(`The nearest package directory (${X.pretty(e,a,X.Type.PATH)}) doesn't seem to be part of the project declared in ${X.pretty(e,l.cwd,X.Type.PATH)}.\n\n- If the project directory is right, it might be that you forgot to list ${X.pretty(e,n.y1.relative(l.cwd,a),X.Type.PATH)} as a workspace.\n- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`)}static generateBuildStateFile(e,t){let r="# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n";const A=[...e].map(([e,r])=>{const A=t.get(e);if(void 0===A)throw new Error("Assertion failed: The locator should have been registered");return[O.stringifyLocator(A),A.locatorHash,r]});for(const[e,t,n]of _.sortMap(A,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${n}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(A.xfs.existsSync(e)){const r=await A.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=V.makeHash("1",r);const n=(0,i.parseSyml)(r);if(n.__metadata){const e=n.__metadata.version,r=n.__metadata.cacheKey;for(const A of Object.keys(n)){if("__metadata"===A)continue;const o=n[A];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);const i=O.parseLocator(o.resolution,!0),s=new Y.G;s.load(o,{yamlCompatibilityMode:!0});const a=s.version,c=s.languageName||t,g=o.linkType.toUpperCase(),l=s.dependencies,u=s.peerDependencies,h=s.dependenciesMeta,p=s.peerDependenciesMeta,d=s.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(i.locatorHash,e)}if(e>=4){const e={...i,version:a,languageName:c,linkType:g,dependencies:l,peerDependencies:u,dependenciesMeta:h,peerDependenciesMeta:p,bin:d};this.originalPackages.set(e.locatorHash,e)}for(const t of A.split(te)){const r=O.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,i.locatorHash);else{const e=O.convertLocatorToDescriptor(i);e.descriptorHash!==r.descriptorHash&&(this.storedDescriptors.set(e.descriptorHash,e),this.resolutionAliases.set(r.descriptorHash,e.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){const t=e;e=[];for(const r of t){if(this.workspacesByCwd.has(r))continue;const t=await this.addWorkspace(r),A=this.storedPackages.get(t.anchoredLocator.locatorHash);A&&(t.dependencies=A.dependencies);for(const r of t.workspacesCwds)e.push(r)}}}async addWorkspace(e){const t=new z.j(e,{project:this});await t.setup();const r=this.workspacesByIdent.get(t.locator.identHash);if(void 0!==r)throw new Error(`Duplicate workspace name ${O.prettyIdent(this.configuration,t.locator)}: ${e} conflicts with ${r.cwd}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){n.y1.isAbsolute(e)||(e=n.y1.resolve(this.cwd,e)),e=n.y1.normalize(e).replace(/\/+$/,"");const t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){const t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(const r of this.workspaces){n.y1.relative(r.cwd,e).startsWith("../")||(t&&t.cwd.length>=r.cwd.length||(t=r))}return t||null}getWorkspaceByFilePath(e){const t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){const t=this.workspacesByIdent.get(e.identHash);return void 0===t?null:t}getWorkspaceByIdent(e){const t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${O.prettyIdent(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){const t=this.tryWorkspaceByIdent(e);return null!==t&&t.accepts(e.range)?t:null}getWorkspaceByDescriptor(e){const t=this.tryWorkspaceByDescriptor(e);if(null===t)throw new Error(`Workspace not found (${O.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){O.isVirtualLocator(e)&&(e=O.devirtualizeLocator(e));const t=this.tryWorkspaceByIdent(e);return null===t||t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash?null:t}getWorkspaceByLocator(e){const t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${O.prettyLocator(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(const e of this.workspaces){const t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error("Assertion failed: Expected workspace to have been resolved");e.dependencies=new Map(t.dependencies)}}forgetResolution(e){const t=e=>{this.storedResolutions.delete(e),this.storedDescriptors.delete(e)},r=e=>{this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)};if("descriptorHash"in e){const A=this.storedResolutions.get(e.descriptorHash);t(e.descriptorHash);const n=new Set(this.storedResolutions.values());void 0===A||n.has(A)||r(A)}if("locatorHash"in e){r(e.locatorHash);for(const[r,A]of this.storedResolutions)A===e.locatorHash&&t(r)}}forgetTransientResolutions(){const e=this.configuration.makeResolver();for(const t of this.originalPackages.values()){let r;try{r=e.shouldPersistResolution(t,{project:this,resolver:e})}catch(e){r=!1}r||this.forgetResolution(t)}}forgetVirtualResolutions(){for(const e of this.storedPackages.values())for(const[t,r]of e.dependencies)O.isVirtualDescriptor(r)&&e.dependencies.set(t,O.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},A=this.topLevelWorkspace.manifest.dependenciesMeta.get(O.stringifyIdent(e));if(!A)return r;const n=A.get(null);if(n&&Object.assign(r,n),null===t||!k().valid(t))return r;for(const[e,n]of A)null!==e&&e===t&&Object.assign(r,n);return r}async findLocatorForLocation(e,{strict:t=!1}={}){const r=new q.$,A=this.configuration.getLinkers(),n={project:this,report:r};for(const r of A){const A=await r.findPackageLocator(e,n);if(A){if(t){if((await r.findPackageLocation(A,n)).replace(re,"")!==e.replace(re,""))continue}return A}}return null}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();const t=e.resolver||this.configuration.makeResolver(),r=new T;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new G.B([new j,new J(t)]):new G.B([new j,r,t]),i=this.configuration.makeFetcher(),s=e.lockfileOnly?{project:this,report:e.report,resolver:o}:{project:this,report:e.report,resolver:o,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:i}},a=new Map,c=new Map,g=new Map,l=new Map,u=new Map,h=new Map,p=[],d=async e=>{const t=await _.prettifyAsyncErrors(async()=>await o.resolve(e,s),t=>`${O.prettyLocator(this.configuration,e)}: ${t}`);if(!O.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${O.prettyLocator(this.configuration,e)} to ${O.prettyLocator(this.configuration,t)})`);l.set(t.locatorHash,t);const r=this.configuration.normalizePackage(t);for(const[t,A]of r.dependencies){const n=await this.configuration.reduceHook(e=>e.reduceDependency,A,this,r,A,{resolver:o,resolveOptions:s});if(!O.areIdentsEqual(A,n))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const i=o.bindDescriptor(n,e,s);r.dependencies.set(t,i)}return p.push(Promise.all([...r.dependencies.values()].map(e=>f(e)))),c.set(r.locatorHash,r),r},C=async e=>{const t=this.resolutionAliases.get(e.descriptorHash);if(void 0!==t)return(async(e,t)=>{const r=await f(t);return a.set(e.descriptorHash,e),g.set(e.descriptorHash,r.locatorHash),r})(e,this.storedDescriptors.get(t));const r=o.getResolutionDependencies(e,s),A=new Map(await Promise.all(r.map(async e=>[e.descriptorHash,await f(e)]))),n=(await _.prettifyAsyncErrors(async()=>await o.getCandidates(e,A,s),t=>`${O.prettyDescriptor(this.configuration,e)}: ${t}`))[0];if(void 0===n)throw new Error(O.prettyDescriptor(this.configuration,e)+": No candidates found");return a.set(e.descriptorHash,e),g.set(e.descriptorHash,n.locatorHash),(async e=>{const t=u.get(e.locatorHash);if(void 0!==t)return t;const r=Promise.resolve().then(()=>d(e));return u.set(e.locatorHash,r),r})(n)},f=e=>{const t=h.get(e.descriptorHash);if(void 0!==t)return t;a.set(e.descriptorHash,e);const r=Promise.resolve().then(()=>C(e));return h.set(e.descriptorHash,r),r};for(const e of this.workspaces){const t=e.anchoredDescriptor;p.push(f(t))}for(;p.length>0;){const e=[...p];p.length=0,await Promise.all(e)}const I=new Set(this.resolutionAliases.values()),E=new Set(c.keys()),B=new Set,y=new Map;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:i=new Set,optionalBuilds:s=new Set,volatileDescriptors:a=new Set,peerRequirements:c=new Map,report:g,tolerateMissingPackages:l=!1}){var u;const h=new Map,p=[],d=new Map,C=new Map,f=new Map,I=new Map,E=new Map,B=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(l)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,O.copyPackage(r)]})),y=()=>{const e=A.xfs.mktempSync(),t=n.y1.join(e,"stacktrace.log"),r=String(p.length+1).length,o=p.map((e,t)=>`${(t+1+".").padStart(r," ")} ${O.stringifyLocator(e)}\n`).join("");throw A.xfs.writeFileSync(t,o),new H.lk(P.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},m=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const A=o.get(t);if(!A)throw new Error("Assertion failed: The package could not be found");return A},w=(e,t,{first:r,optional:A})=>{p.length>1e3&&y(),p.push(e);const n=Q(e,t,{first:r,optional:A});return p.pop(),n},Q=(A,n,{first:c,optional:g})=>{if(i.has(A.locatorHash))return;i.add(A.locatorHash),g||s.delete(A.locatorHash);const u=o.get(A.locatorHash);if(!u){if(l)return;throw new Error(`Assertion failed: The package (${O.prettyLocator(e.configuration,A)}) should have been registered`)}const p=[],m=[],Q=[],D=[],b=[];for(const i of Array.from(u.dependencies.values())){if(u.peerDependencies.has(i.identHash)&&!c)continue;if(O.isVirtualDescriptor(i))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(i.descriptorHash);let s=g;if(!s){const e=u.dependenciesMeta.get(O.stringifyIdent(i));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(s=!0)}}const C=r.get(i.descriptorHash);if(!C){if(l)continue;throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(e.configuration,i)}) should have been registered`)}const v=B.get(C)||o.get(C);if(!v)throw new Error(`Assertion failed: The package (${C}, resolved from ${O.prettyDescriptor(e.configuration,i)}) should have been registered`);if(0===v.peerDependencies.size){w(v,new Map,{first:!1,optional:s});continue}const S=h.get(v.locatorHash);let k,N;"number"==typeof S&&S>=2&&y();const F=new Set;let K;m.push(()=>{k=O.virtualizeDescriptor(i,A.locatorHash),N=O.virtualizePackage(v,A.locatorHash),u.dependencies.delete(i.identHash),u.dependencies.set(k.identHash,k),r.set(k.descriptorHash,N.locatorHash),t.set(k.descriptorHash,k),o.set(N.locatorHash,N),p.push([v,k,N])}),Q.push(()=>{var e;K=new Map;for(const o of N.peerDependencies.values()){let i=u.dependencies.get(o.identHash);if(!i&&O.areIdentsEqual(A,o)&&(i=O.convertLocatorToDescriptor(A),t.set(i.descriptorHash,i),r.set(i.descriptorHash,A.locatorHash),a.delete(i.descriptorHash)),i||!N.dependencies.has(o.identHash)){if(i||(i=O.makeDescriptor(o,"missing:")),N.dependencies.set(i.identHash,i),O.isVirtualDescriptor(i)){_.getSetWithDefault(f,i.descriptorHash).add(N.locatorHash)}d.set(i.identHash,i),"missing:"===i.range&&F.add(i.identHash),K.set(o.identHash,null!==(e=n.get(o.identHash))&&void 0!==e?e:N.locatorHash)}else N.peerDependencies.delete(o.identHash)}N.dependencies=new Map(_.sortMap(N.dependencies,([e,t])=>O.stringifyIdent(t)))}),D.push(()=>{if(!o.has(N.locatorHash))return;const e=h.get(v.locatorHash),t=void 0!==e?e+1:1;h.set(v.locatorHash,t),w(N,K,{first:!1,optional:s}),h.set(v.locatorHash,t-1)}),b.push(()=>{const e=u.dependencies.get(i.identHash);if(void 0===e)throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: Expected the descriptor to be registered");if(_.getSetWithDefault(E,t).add(A.locatorHash),o.has(N.locatorHash)){for(const e of N.peerDependencies.values()){const t=K.get(e.identHash);if(void 0===t)throw new Error("Assertion failed: Expected the peer dependency ident to be registered");_.getArrayWithDefault(_.getMapWithDefault(I,t),O.stringifyIdent(e)).push(N.locatorHash)}for(const e of F)N.dependencies.delete(e)}})}for(const e of[...m,...Q])e();let v;do{v=!0;for(const[A,n,s]of p){if(!o.has(s.locatorHash))continue;const a=_.getMapWithDefault(C,A.locatorHash),c=V.makeHash(...[...s.dependencies.values()].map(t=>{const A="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===A)throw new Error(`Assertion failed: Expected the resolution for ${O.prettyDescriptor(e.configuration,t)} to have been registered`);return A}),n.identHash),g=a.get(c);if(void 0===g){a.set(c,n);continue}if(g===n)continue;v=!1,o.delete(s.locatorHash),t.delete(n.descriptorHash),r.delete(n.descriptorHash),i.delete(s.locatorHash);const l=f.get(n.descriptorHash)||[],h=[u.locatorHash,...l];f.delete(n.descriptorHash);for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(n.identHash,g)}}}while(!v);for(const e of[...D,...b])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),w(t.anchoredLocator,new Map,{first:!0,optional:!1});let D;!function(e){e[e.NotProvided=0]="NotProvided",e[e.NotCompatible=1]="NotCompatible"}(D||(D={}));const b=[];for(const[e,t]of E){const r=o.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the root to be registered");const A=I.get(e);if(void 0!==A)for(const n of t){const t=o.get(n);if(void 0!==t)for(const[i,s]of A){const A=O.parseIdent(i);if(t.peerDependencies.has(A.identHash))continue;const a="p"+V.makeHash(n,i,e).slice(0,5);c.set(a,{subject:n,requested:A,rootRequester:e,allRequesters:s});const g=r.dependencies.get(A.identHash);if(void 0!==g){const e=m(g),n=null!==(u=e.version)&&void 0!==u?u:"0.0.0",i=new Set;for(const e of s){const t=o.get(e);if(void 0===t)throw new Error("Assertion failed: Expected the link to be registered");const r=t.peerDependencies.get(A.identHash);if(void 0===r)throw new Error("Assertion failed: Expected the ident to be registered");i.add(r.range)}[...i].every(e=>$.satisfiesWithPrereleases(n,e))||b.push({type:D.NotCompatible,subject:t,requested:A,requester:r,version:n,hash:a,requirementCount:s.length})}else{const e=r.peerDependenciesMeta.get(i);(null==e?void 0:e.optional)||b.push({type:D.NotProvided,subject:t,requested:A,requester:r,hash:a})}}}}const v=[e=>O.prettyLocatorNoColors(e.subject),e=>O.stringifyIdent(e.requested),e=>""+e.type];for(const t of _.sortMap(b,v))switch(t.type){case D.NotProvided:null==g||g.reportWarning(P.b.MISSING_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} doesn't provide ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}), requested by ${O.prettyIdent(e.configuration,t.requester)}`);break;case D.NotCompatible:{const r=t.requirementCount>1?"and some of its descendants request":"requests";null==g||g.reportWarning(P.b.INCOMPATIBLE_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} provides ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}) with version ${O.prettyReference(e.configuration,t.version)}, which doesn't satisfy what ${O.prettyIdent(e.configuration,t.requester)} ${r}`)}}b.length>0&&(null==g||g.reportWarning(P.b.UNNAMED,`Some peer dependencies are incorrectly met; run ${X.pretty(e.configuration,"yarn explain peer-requirements ",X.Type.CODE)} for details, where ${X.pretty(e.configuration,"",X.Type.CODE)} is the six-letter p-prefixed code`))}({project:this,report:e.report,accessibleLocators:B,volatileDescriptors:I,optionalBuilds:E,peerRequirements:y,allDescriptors:a,allResolutions:g,allPackages:c});for(const e of I)a.delete(e),g.delete(e);this.storedResolutions=g,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=B,this.originalPackages=l,this.optionalBuilds=E,this.peerRequirements=y,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const A=r||this.configuration.makeFetcher(),n={checksums:this.storedChecksums,project:this,cache:e,fetcher:A,report:t},o=Array.from(new Set(_.sortMap(this.storedResolutions.values(),[e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return O.stringifyLocator(t)}])));let i=!1;const s=H.yG.progressViaCounter(o.length);t.reportProgress(s);const a=v()(32);if(await t.startCacheReport(async()=>{await Promise.all(o.map(e=>a(async()=>{const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The locator should have been registered");if(O.isVirtualLocator(r))return;let o;try{o=await A.fetch(r,n)}catch(e){return e.message=`${O.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(i=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{s.tick()})))}),i)throw i}async linkEverything({cache:e,report:t,fetcher:r,skipBuild:o}){var s;const c=r||this.configuration.makeFetcher(),g={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:t,skipIntegrityCheck:!0},l=this.configuration.getLinkers(),u={project:this,report:t},h=new Map(l.map(e=>{const t=e.makeInstaller(u),r=t.getCustomDataKey(),A=this.installersCustomData.get(r);return void 0!==A&&t.attachCustomData(A),[e,t]})),p=new Map,d=new Map,C=new Map,f=new Map(await Promise.all([...this.accessibleLocators].map(async e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return[e,await c.fetch(t,g)]})));for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(void 0===t)throw new Error("Assertion failed: The locator should have been registered");const r=f.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: The fetch result should have been registered");const A=this.tryWorkspaceByLocator(t);if(null!==A){const e=[],{scripts:o}=A.manifest;for(const t of["preinstall","install","postinstall"])o.has(t)&&e.push([L.k.SCRIPT,t]);try{for(const e of h.values()){if(null!==(await e.installPackage(t,r)).buildDirective)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}}finally{r.releaseFs&&r.releaseFs()}const i=n.y1.join(r.packageFs.getRealPath(),r.prefixPath);d.set(t.locatorHash,i),e.length>0&&C.set(t.locatorHash,{directives:e,buildLocations:[i]})}else{const e=l.find(e=>e.supportsPackage(t,u));if(!e)throw new H.lk(P.b.LINKER_NOT_FOUND,O.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const A=h.get(e);if(!A)throw new Error("Assertion failed: The installer should have been registered");let n;try{n=await A.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}p.set(t.locatorHash,e),d.set(t.locatorHash,n.packageLocation),n.buildDirective&&n.packageLocation&&C.set(t.locatorHash,{directives:n.buildDirective,buildLocations:[n.packageLocation]})}}const I=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=null!==this.tryWorkspaceByLocator(t),A=async(e,A)=>{const n=d.get(t.locatorHash);if(void 0===n)throw new Error(`Assertion failed: The package (${O.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const A of t.dependencies.values()){const i=this.storedResolutions.get(A.descriptorHash);if(void 0===i)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,A)}, from ${O.prettyLocator(this.configuration,t)})should have been registered`);const s=this.storedPackages.get(i);if(void 0===s)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(s)?p.get(i):null;if(void 0===a)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==d.get(s.locatorHash)&&o.push([A,s]);else if(null!==n){_.getArrayWithDefault(I,i).push(n)}}null!==n&&await A.attachInternalDependencies(t,o)};if(r)for(const[e,t]of h)await A(e,t);else{const e=p.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=h.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await A(e,r)}}for(const[e,t]of I){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const A=p.get(r.locatorHash);if(!A)throw new Error("Assertion failed: The linker should have been found");const n=h.get(A);if(!n)throw new Error("Assertion failed: The installer should have been registered");await n.attachExternalDependents(r,t)}const E=new Map;for(const e of h.values()){const t=await e.finalizeInstall();for(const e of null!==(s=null==t?void 0:t.records)&&void 0!==s?s:[])C.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations});void 0!==(null==t?void 0:t.customData)&&E.set(e.getCustomDataKey(),t.customData)}if(this.installersCustomData=E,await this.persistInstallStateFile(),o)return;const B=new Set(this.storedPackages.keys()),y=new Set(C.keys());for(const e of y)B.delete(e);const m=(0,a.createHash)("sha512");m.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{m.update("\0"),m.update(e)});const w=m.digest("hex"),Q=new Map,D=e=>{let t=Q.get(e.locatorHash);if(void 0!==t)return t;const r=this.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const A=(0,a.createHash)("sha512");A.update(e.locatorHash),Q.set(e.locatorHash,"");for(const e of r.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(void 0===t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);const r=this.storedPackages.get(t);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");A.update(D(r))}return t=A.digest("hex"),Q.set(e.locatorHash,t),t},b=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(w),r.update(D(e));for(const e of t)r.update(e);return r.digest("hex")},v=this.configuration.get("bstatePath"),S=A.xfs.existsSync(v)?(0,i.parseSyml)(await A.xfs.readFilePromise(v,"utf8")):{},k=new Map;for(;y.size>0;){const e=y.size,r=[];for(const e of y){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let i=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);if(y.has(t)){i=!1;break}}if(!i)continue;y.delete(e);const s=C.get(o.locatorHash);if(!s)throw new Error("Assertion failed: The build directive should have been registered");const a=b(o,s.buildLocations);if(Object.prototype.hasOwnProperty.call(S,o.locatorHash)&&S[o.locatorHash]===a)k.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(S,o.locatorHash)?t.reportInfo(P.b.MUST_REBUILD,O.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(P.b.MUST_BUILD,O.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of s.buildLocations){if(!n.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,i]of s.directives){let s=`# This file contains the result of Yarn building a package (${O.stringifyLocator(o)})\n`;switch(r){case L.k.SCRIPT:s+=`# Script name: ${i}\n`;break;case L.k.SHELLCODE:s+=`# Script code: ${i}\n`}const c=null;await A.xfs.mktempPromise(async g=>{const l=n.y1.join(g,"build.log"),{stdout:u,stderr:h}=this.configuration.getSubprocessStreams(l,{header:s,prefix:O.prettyLocator(this.configuration,o),report:t});let p;try{switch(r){case L.k.SCRIPT:p=await Z.executePackageScript(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h});break;case L.k.SHELLCODE:p=await Z.executePackageShellcode(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h})}}catch(e){h.write(e.stack),p=1}if(u.end(),h.end(),0===p)return k.set(o.locatorHash,a),!0;A.xfs.detachTemp(g);const d=`${O.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${X.pretty(this.configuration,p,X.Type.NUMBER)}, logs can be found here: ${X.pretty(this.configuration,l,X.Type.PATH)})`;return t.reportInfo(P.b.BUILD_FAILED,d),this.optionalBuilds.has(o.locatorHash)?(k.set(o.locatorHash,a),!0):(t.reportError(P.b.BUILD_FAILED,d),!1)})}})())}}}if(await Promise.all(r),e===y.size){const e=Array.from(y).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return O.prettyLocator(this.configuration,t)}).join(", ");t.reportError(P.b.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${e})`);break}}if(k.size>0){const e=this.configuration.get("bstatePath"),t=ie.generateBuildStateFile(k,this.storedPackages);await A.xfs.mkdirPromise(n.y1.dirname(e),{recursive:!0}),await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await A.xfs.removePromise(v)}async install(e){var t,r;const i=this.configuration.get("nodeLinker");null===(t=x.VK.telemetry)||void 0===t||t.reportInstall(i),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.status=ee._u.Inactive;const s=n.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let a=null;if(e.immutable)try{a=await A.xfs.readFilePromise(s,"utf8")}catch(e){throw"ENOENT"===e.code?new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(const[,t]of this.configuration.packageExtensions)for(const[,r]of t)for(const t of r)if(t.userProvided){const r=X.pretty(this.configuration,t,X.Type.PACKAGE_EXTENSION);switch(t.status){case ee._u.Inactive:e.report.reportWarning(P.b.UNUSED_PACKAGE_EXTENSION,r+": No matching package in the dependency tree; you may not need this rule anymore.");break;case ee._u.Redundant:e.report.reportWarning(P.b.REDUNDANT_PACKAGE_EXTENSION,r+": This rule seems redundant when applied on the original package; the extension may have been applied upstream.")}}if(null!==a){const t=(0,o.qH)(a,this.generateLockfile());if(t!==a){const r=w(s,s,a,t);e.report.reportSeparator();for(const t of r.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.ADDED)):r.startsWith("-")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.REMOVED)):e.report.reportInfo(null,X.pretty(this.configuration,r,"grey"))}throw e.report.reportSeparator(),new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.userProvided&&e.status===ee._u.Active&&(null===(r=x.VK.telemetry)||void 0===r||r.reportPackageExtension(X.json(e,X.Type.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(void 0===e.persistProject||e.persistProject)&&await this.cacheCleanup(e)}),(void 0===e.persistProject||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{const t=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],r=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));await this.linkEverything(e);const A=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));for(let n=0;ne.afterAllInstalled,this,e)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let A=e.get(r);A||e.set(r,A=new Set),A.add(t)}const t={__metadata:{version:4}};for(const[r,A]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const n=[];for(const e of A){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");n.push(t)}const o=n.map(e=>O.stringifyDescriptor(e)).sort().join(", "),i=new Y.G;let s;i.version=e.linkType===ee.Un.HARD?e.version:"0.0.0-use.local",i.languageName=e.languageName,i.dependencies=new Map(e.dependencies),i.peerDependencies=new Map(e.peerDependencies),i.dependenciesMeta=new Map(e.dependenciesMeta),i.peerDependenciesMeta=new Map(e.peerDependenciesMeta),i.bin=new Map(e.bin);const a=this.storedChecksums.get(e.locatorHash);if(void 0!==a){const e=a.indexOf("/");if(-1===e)throw new Error("Assertion failed: Expecte the checksum to reference its cache key");const r=a.slice(0,e),A=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),s=r===t.__metadata.cacheKey?A:a}t[o]={...i.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:O.stringifyLocator(e),checksum:s}}return['# This file is generated by running "yarn install" inside your project.\n',"# Manual changes might be lost - proceed with caution!\n"].join("")+"\n"+(0,i.stringifySyml)(t)}async persistLockfile(){const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const e=[];for(const t of Object.values(oe))e.push(...t);const t=D()(this,e),r=await Ae(K().serialize(t)),o=this.configuration.get("installStatePath");await A.xfs.mkdirPromise(n.y1.dirname(o),{recursive:!0}),await A.xfs.changeFilePromise(o,r)}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0}={}){const r=this.configuration.get("installStatePath");if(!A.xfs.existsSync(r))return void(t&&await this.applyLightResolution());const n=await A.xfs.readFilePromise(r),o=K().deserialize(await ne(n));e&&void 0!==o.installersCustomData&&(this.installersCustomData=o.installersCustomData),t&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,D()(o,oe.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new q.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(A.xfs.existsSync(e.cwd)&&(0,W.isFolderInside)(e.cwd,this.cwd)){for(const o of await A.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const i=n.y1.resolve(e.cwd,o);e.markedFiles.has(i)||(e.immutable?t.reportError(P.b.IMMUTABLE_CACHE,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(P.b.UNUSED_CACHE_ENTRY,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused - removing"),await A.xfs.removePromise(i)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>a});var A=r(53887),n=r.n(A),o=r(36545),i=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class a{supportsDescriptor(e,t){return!!o.validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!n().valid(e.reference)||!!s.test(e.reference)}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,r){return r.resolver.bindDescriptor(this.forwardDescriptor(e,r),t,r)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,r){return await r.resolver.getCandidates(this.forwardDescriptor(e,r),t,r)}async getSatisfying(e,t,r){return await r.resolver.getSatisfying(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return i.renamePackage(r,e)}forwardDescriptor(e,t){return i.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return i.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>i,yG:()=>s});var A=r(92413),n=r(24304),o=r(92659);class i extends Error{constructor(e,t,r){super(t),this.reportExtra=r,this.reportCode=e}}class s{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,A=new Promise(e=>{t=e});const n=e=>{const n=t;A=new Promise(e=>{t=e}),r=e,n()},o=async function*(){for(;ro,set:n,tick:(e=0)=>{n(r+1)}}}reportInfoOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedInfos.has(A)||(this.reportedInfos.add(A),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedWarnings.has(A)||(this.reportedWarnings.add(A),this.reportWarning(e,t))}reportErrorOnce(e,t,r){var A;const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t),null===(A=null==r?void 0:r.reportExtra)||void 0===A||A.call(r,this))}reportExceptionOnce(e){!function(e){return void 0!==e.reportCode}(e)?this.reportErrorOnce(o.b.EXCEPTION,e.stack||e.message,{key:e}):this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra})}createStreamReporter(e=null){const t=new A.PassThrough,r=new n.StringDecoder;let o="";return t.on("data",t=>{let A,n=r.write(t);do{if(A=n.indexOf("\n"),-1!==A){const t=o+n.substr(0,A);n=n.substr(A+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==A);o+=n}),t.on("end",()=>{const t=r.end();""!==t&&(null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t))}),t}}},15815:(e,t,r)=>{"use strict";r.d(t,{Qw:()=>C,Pk:()=>f});var A=r(29148),n=r.n(A),o=r(92659),i=r(35691),s=r(71643);const a=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],c=new Set([o.b.FETCH_NOT_CACHED,o.b.UNUSED_CACHE_ENTRY]),g=process.env.GITHUB_ACTIONS?{start:e=>`::group::${e}\n`,end:e=>"::endgroup::\n"}:process.env.TRAVIS?{start:e=>`travis_fold:start:${e}\n`,end:e=>`travis_fold:end:${e}\n`}:process.env.GITLAB_CI?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r${e}\n`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r`}:null,l=new Date,u=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,h={patrick:{date:[17,3],chars:["🍀","🌱"],size:40},simba:{date:[19,7],chars:["🦁","🌴"],size:40},jack:{date:[31,10],chars:["🎃","🦇"],size:40},hogsfather:{date:[31,12],chars:["🎉","🎄"],size:40},default:{chars:["=","-"],size:80}},p=u&&Object.keys(h).find(e=>{const t=h[e];return!t.date||t.date[0]===l.getDate()&&t.date[1]===l.getMonth()+1})||"default";function d(e,{configuration:t,json:r}){const A=null===e?0:e,n=(0,o.i)(A);return r||null!==e?n:s.pretty(t,n,"grey")}function C(e,{configuration:t,json:r}){const A=d(e,{configuration:t,json:r});if(!t.get("enableHyperlinks"))return A;if(null===e||e===o.b.UNNAMED)return A;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${A}---${o.b[e]}`.toLowerCase()}${A}]8;;`}class f extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:A=!0,includeLogs:n=!r,includeInfos:o=n,includeWarnings:i=n,forgettableBufferSize:a=5,forgettableNames:g=new Set}){super(),this.uncommitted=new Set,this.cacheHitCount=0,this.cacheMissCount=0,this.warningCount=0,this.errorCount=0,this.startTime=Date.now(),this.indent=0,this.progress=new Map,this.progressTime=0,this.progressFrame=0,this.progressTimeout=null,this.forgettableLines=[],s.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...g,...c]),this.includeFooter=A,this.includeInfos=o,this.includeWarnings=i,this.json=r,this.stdout=t;const l=this.configuration.get("progressBarStyle")||p;if(!Object.prototype.hasOwnProperty.call(h,l))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=h[l];const u="➤ YN0000: ┌ ".length,d=Math.max(0,Math.min(process.stdout.columns-u,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*d/80)}static async start(e,t){const r=new this(e),A=process.emitWarning;process.emitWarning=(e,t)=>{if("string"!=typeof e){const r=e;e=r.message,t=null!=t?t:r.name}const A=void 0!==t?`${t}: ${e}`:e;r.reportWarning(o.b.UNNAMED,A)};try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize(),process.emitWarning=A}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.cacheMissCount+=1,void 0===t||this.configuration.get("preferAggregateCacheInfo")||this.reportInfo(o.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return await A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startCacheReport(e){const t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(e){throw this.reportExceptionOnce(e),e}finally{null!==t&&this.reportCacheChanges(t)}}reportSeparator(){0===this.indent?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(!this.includeInfos)return;this.commit();const r=`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(r),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(r,{truncate:!0});else this.writeLineWithForgettableReset(r)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.commit(),this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.commit(),this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`,{truncate:!1})}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,{definition:r,lastScaledSize:-1}),this.refreshProgress(-1);for await(const{progress:A,title:n}of e)t||r.progress===A&&r.title===n||(r.progress=A,r.title=n,this.refreshProgress());A()}),A=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:A}}reportJson(e){this.json&&this.writeLineWithForgettableReset(""+JSON.stringify(e))}async finalize(){if(!this.includeFooter)return;let e="";e=this.errorCount>0?"Failed with errors":this.warningCount>0?"Done with warnings":"Done";const t=s.pretty(this.configuration,Date.now()-this.startTime,s.Type.DURATION),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(o.b.UNNAMED,r):this.warningCount>0?this.reportWarning(o.b.UNNAMED,r):this.reportInfo(o.b.UNNAMED,r)}writeLine(e,{truncate:t}={}){this.clearProgress({clear:!0}),this.stdout.write(this.truncate(e,{truncate:t})+"\n"),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:t}={}){this.forgettableLines=[],this.writeLine(e,{truncate:t})}writeLines(e,{truncate:t}={}){this.clearProgress({delta:e.length});for(const r of e)this.stdout.write(this.truncate(r,{truncate:t})+"\n");this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,A=this.cacheMissCount-t;if(0===r&&0===A)return;let n="";this.cacheHitCount>1?n+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(n+=", one had to be fetched"):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(n+=" - one package had to be fetched"),this.reportInfo(o.b.FETCH_NOT_CACHED,n)}commit(){const e=this.uncommitted;this.uncommitted=new Set;for(const t of e)t.committed=!0,t.action()}clearProgress({delta:e=0,clear:t=!1}){this.configuration.get("enableProgressBars")&&!this.json&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json)return;if(null!==this.progressTimeout&&clearTimeout(this.progressTimeout),this.progressTimeout=null,0===this.progress.size)return;const e=Date.now();e-this.progressTime>80&&(this.progressFrame=(this.progressFrame+1)%a.length,this.progressTime=e);const t=a[this.progressFrame];for(const e of this.progress.values()){const r=this.progressStyle.chars[0].repeat(e.lastScaledSize),A=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-e.lastScaledSize);this.stdout.write(`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatName(null)}: ${t} ${r}${A}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},80)}refreshProgress(e=0){let t=!1;if(0===this.progress.size)t=!0;else for(const e of this.progress.values()){const r=Math.trunc(this.progressMaxScaledSize*e.definition.progress),A=e.lastScaledSize;if(e.lastScaledSize=r,r!==A){t=!0;break}}t&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:t}={}){return this.configuration.get("enableProgressBars")||(t=!1),void 0===t&&(t=this.configuration.get("preferTruncatedLines")),t&&(e=n()(e,0,process.stdout.columns-1)),e}formatName(e){return d(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return C(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"│ ".repeat(this.indent)}}},81832:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var A,n=r(43896),o=r(46009),i=r(79669),s=r(73632);!function(e){e.VERSION="version",e.COMMAND_NAME="commandName",e.PLUGIN_NAME="pluginName",e.INSTALL_COUNT="installCount",e.PROJECT_COUNT="projectCount",e.WORKSPACE_COUNT="workspaceCount",e.DEPENDENCY_COUNT="dependencyCount",e.EXTENSION="packageExtension"}(A||(A={}));class a{constructor(e,t){this.values=new Map,this.hits=new Map,this.enumerators=new Map,this.configuration=e;const r=this.getRegistryPath();this.isNew=!n.xfs.existsSync(r),this.sendReport(t),this.startBuffer()}reportVersion(e){this.reportValue(A.VERSION,e)}reportCommandName(e){this.reportValue(A.COMMAND_NAME,e||"")}reportPluginName(e){this.reportValue(A.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(A.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(A.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(A.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(A.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(A.DEPENDENCY_COUNT,String(e))}reportValue(e,t){s.getSetWithDefault(this.values,e).add(t)}reportEnumerator(e,t){s.getSetWithDefault(this.enumerators,e).add(t)}reportHit(e,t="*"){const r=s.getMapWithDefault(this.hits,e),A=s.getFactoryWithDefault(r,t,()=>0);r.set(t,A+1)}getRegistryPath(){const e=this.configuration.get("globalFolder");return o.y1.join(e,"telemetry.json")}sendReport(e){var t,r,A;const s=this.getRegistryPath();let a;try{a=n.xfs.readJsonSync(s)}catch(e){a={}}const c=Date.now(),g=24*this.configuration.get("telemetryInterval")*60*60*1e3,l=(null!==(t=a.lastUpdate)&&void 0!==t?t:c+g+Math.floor(g*Math.random()))+g;if(!(l>c&&null!=a.lastUpdate)){try{n.xfs.mkdirSync(o.y1.dirname(s),{recursive:!0}),n.xfs.writeJsonSync(s,{lastUpdate:c})}catch(e){return}if(!(l>c)&&a.blocks)for(const[t,n]of Object.entries(null!==(r=a.blocks)&&void 0!==r?r:{})){if(0===Object.keys(n).length)continue;const r=n;r.userId=t;for(const e of Object.keys(null!==(A=r.enumerators)&&void 0!==A?A:{}))r.enumerators[e]=r.enumerators[e].length;const o=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`;i.post(o,r,{configuration:this.configuration}).catch(()=>{})}}}applyChanges(){var e,t,r,A,i,s,a,c,g;const l=this.getRegistryPath();let u;try{u=n.xfs.readJsonSync(l)}catch(e){u={}}const h=null!==(e=this.configuration.get("telemetryUserId"))&&void 0!==e?e:"*",p=u.blocks=null!==(t=u.blocks)&&void 0!==t?t:{},d=p[h]=null!==(r=p[h])&&void 0!==r?r:{};for(const e of this.hits.keys()){const t=d.hits=null!==(A=d.hits)&&void 0!==A?A:{},r=t[e]=null!==(i=t[e])&&void 0!==i?i:{};for(const[t,A]of this.hits.get(e))r[t]=(null!==(s=r[t])&&void 0!==s?s:0)+A}for(const e of["values","enumerators"])for(const t of this[e].keys()){const r=d[e]=null!==(a=d[e])&&void 0!==a?a:{};r[t]=[...new Set([...null!==(c=r[t])&&void 0!==c?c:[],...null!==(g=this[e].get(t))&&void 0!==g?g:[]])]}n.xfs.mkdirSync(o.y1.dirname(l),{recursive:!0}),n.xfs.writeJsonSync(l,u)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch(e){}})}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var A=r(35691);class n extends A.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}},60895:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var A=r(17674),n=r(14626),o=r(46009),i=r(54143);class s{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A);return t.fetcher.getLocalPath(n,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A),o=await t.fetcher.fetch(n,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return i.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const i=t.packageFs.getRealPath(),s=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=A.p.makeVirtualPath(s,a,i),g=new n.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:g}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var A=r(43896),n=r(46009),o=r(58592),i=r.n(o),s=r(53887),a=r.n(s),c=r(46611),g=r(94538),l=r(20624),u=r(54143);class h{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=A.xfs.existsSync(n.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=n.y1.relative(this.project.cwd,this.cwd)||n.LZ.dot;const e=this.manifest.name?this.manifest.name:u.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=u.makeLocator(e,t),this.anchoredDescriptor=u.makeDescriptor(this.locator,`${g.d.protocol}${this.relativeCwd}`),this.anchoredLocator=u.makeLocator(this.locator,`${g.d.protocol}${this.relativeCwd}`);const r=this.manifest.workspaceDefinitions.map(({pattern:e})=>e),o=await i()(r,{absolute:!0,cwd:n.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort();for(const e of o){const t=n.y1.resolve(this.cwd,n.cS.toPortablePath(e));A.xfs.existsSync(n.y1.join(t,"package.json"))&&this.workspacesCwds.add(t)}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,A=-1!==t?e.slice(t+1):e;return r===g.d.protocol&&n.y1.normalize(A)===this.relativeCwd||(r===g.d.protocol&&"*"===A||!!a().validRange(A)&&(r===g.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",A):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,A))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+n.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=n.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await A.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});var A=r(32485);class n{supportsDescriptor(e,t){if(e.range.startsWith(n.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(n.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[r.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(n.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:A.Un.SOFT,dependencies:new Map([...r.manifest.dependencies,...r.manifest.devDependencies]),peerDependencies:new Map([...r.manifest.peerDependencies]),dependenciesMeta:r.manifest.dependenciesMeta,peerDependenciesMeta:r.manifest.peerDependenciesMeta,bin:r.manifest.bin}}}n.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>A});const A="2.4.0"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>A,pipevp:()=>g,execvp:()=>l});var A,n=r(46009),o=r(67566),i=r.n(o);function s(e){return null!==e&&"number"==typeof e.fd}function a(){}!function(e){e[e.Never=0]="Never",e[e.ErrorCode=1]="ErrorCode",e[e.Always=2]="Always"}(A||(A={}));let c=0;async function g(e,t,{cwd:r,env:o=process.env,strict:g=!1,stdin:l=null,stdout:u,stderr:p,end:d=A.Always}){const C=["pipe","pipe","pipe"];null===l?C[0]="ignore":s(l)&&(C[0]=l),s(u)&&(C[1]=u),s(p)&&(C[2]=p),0==c++&&process.on("SIGINT",a);const f=i()(e,t,{cwd:n.cS.fromPortablePath(r),env:{...o,PWD:n.cS.fromPortablePath(r)},stdio:C});s(l)||null===l||l.pipe(f.stdin),s(u)||f.stdout.pipe(u,{end:!1}),s(p)||f.stderr.pipe(p,{end:!1});const I=()=>{for(const e of new Set([u,p]))s(e)||e.end()};return new Promise((t,r)=>{f.on("error",e=>{0==--c&&process.off("SIGINT",a),d!==A.Always&&d!==A.ErrorCode||I(),r(e)}),f.on("close",(n,o)=>{0==--c&&process.off("SIGINT",a),(d===A.Always||d===A.ErrorCode&&n>0)&&I(),0!==n&&g?r(null!==n?new Error(`Child "${e}" exited with exit code ${n}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:h(n,o)})})})}async function l(e,t,{cwd:r,env:A=process.env,encoding:o="utf8",strict:s=!1}){const a=["ignore","pipe","pipe"],c=[],g=[],l=n.cS.fromPortablePath(r);void 0!==A.PWD&&(A={...A,PWD:l});const u=i()(e,t,{cwd:l,env:A,stdio:a});return u.stdout.on("data",e=>{c.push(e)}),u.stderr.on("data",e=>{g.push(e)}),await new Promise((t,r)=>{u.on("error",r),u.on("close",(A,n)=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),a="buffer"===o?Buffer.concat(g):Buffer.concat(g).toString(o);0!==A&&s?r(Object.assign(new Error(`Child "${e}" exited with exit code ${A}\n\n${a}`),{code:h(A,n),stdout:i,stderr:a})):t({code:h(A,n),stdout:i,stderr:a})})})}const u=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function h(e,t){const r=u.get(t);return void 0!==r?128+r:null!=e?e:1}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>i,isFolderInside:()=>s});var A=r(46009),n=r(12087);function o(){if("win32"===process.platform){const e=A.cS.toPortablePath(process.env.LOCALAPPDATA||A.cS.join((0,n.homedir)(),"AppData","Local"));return A.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=A.cS.toPortablePath(process.env.XDG_DATA_HOME);return A.y1.resolve(e,"yarn/berry")}return A.y1.resolve(i(),".yarn/berry")}function i(){return A.cS.toPortablePath((0,n.homedir)()||"/usr/local/share")}function s(e,t){const r=A.y1.relative(t,e);return r&&!r.startsWith("..")&&!A.y1.isAbsolute(r)}},71643:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Type:()=>A,Style:()=>n,supportsColor:()=>h,supportsHyperlinks:()=>p,tuple:()=>I,applyStyle:()=>E,applyColor:()=>B,pretty:()=>y,prettyList:()=>m,json:()=>w,mark:()=>Q,LogLevel:()=>D,addLogFilterSupport:()=>b});var A,n,o=r(46009),i=r(95882),s=r.n(i),a=r(92659),c=r(73632),g=r(54143),l=r(32485);!function(e){e.NO_HINT="NO_HINT",e.NULL="NULL",e.SCOPE="SCOPE",e.NAME="NAME",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.NUMBER="NUMBER",e.PATH="PATH",e.URL="URL",e.ADDED="ADDED",e.REMOVED="REMOVED",e.CODE="CODE",e.DURATION="DURATION",e.SIZE="SIZE",e.IDENT="IDENT",e.DESCRIPTOR="DESCRIPTOR",e.LOCATOR="LOCATOR",e.RESOLUTION="RESOLUTION",e.DEPENDENT="DEPENDENT",e.PACKAGE_EXTENSION="PACKAGE_EXTENSION"}(A||(A={})),function(e){e[e.BOLD=2]="BOLD"}(n||(n={}));const u=process.env.GITHUB_ACTIONS?{level:2}:s().supportsColor?{level:s().supportsColor.level}:{level:0},h=0!==u.level,p=h&&!process.env.GITHUB_ACTIONS,d=new(s().Instance)(u),C=new Map([[A.NO_HINT,null],[A.NULL,["#a853b5",129]],[A.SCOPE,["#d75f00",166]],[A.NAME,["#d7875f",173]],[A.RANGE,["#00afaf",37]],[A.REFERENCE,["#87afff",111]],[A.NUMBER,["#ffd700",220]],[A.PATH,["#d75fd7",170]],[A.URL,["#d75fd7",170]],[A.ADDED,["#5faf00",70]],[A.REMOVED,["#d70000",160]],[A.CODE,["#87afff",111]],[A.SIZE,["#ffd700",220]]]),f={[A.NUMBER]:{pretty:(e,t)=>""+t,json:e=>e},[A.IDENT]:{pretty:(e,t)=>g.prettyIdent(e,t),json:e=>g.stringifyIdent(e)},[A.LOCATOR]:{pretty:(e,t)=>g.prettyLocator(e,t),json:e=>g.stringifyLocator(e)},[A.DESCRIPTOR]:{pretty:(e,t)=>g.prettyDescriptor(e,t),json:e=>g.stringifyDescriptor(e)},[A.RESOLUTION]:{pretty:(e,{descriptor:t,locator:r})=>g.prettyResolution(e,t,r),json:({descriptor:e,locator:t})=>({descriptor:g.stringifyDescriptor(e),locator:null!==t?g.stringifyLocator(t):null})},[A.DEPENDENT]:{pretty:(e,{locator:t,descriptor:r})=>g.prettyDependent(e,t,r),json:({locator:e,descriptor:t})=>({locator:g.stringifyLocator(e),descriptor:g.stringifyDescriptor(t)})},[A.PACKAGE_EXTENSION]:{pretty:(e,t)=>{switch(t.type){case l.HN.Dependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"dependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependenciesMeta",A.CODE)} ➤ ${g.prettyIdent(e,g.parseIdent(t.selector))} ➤ ${B(e,t.key,A.CODE)}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+t.type)}},json:e=>{switch(e.type){case l.HN.Dependency:return`${g.stringifyIdent(e.parentDescriptor)} > ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependency:return`${g.stringifyIdent(e.parentDescriptor)} >> ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.stringifyIdent(e.parentDescriptor)} >> ${e.selector} / ${e.key}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+e.type)}}},[A.DURATION]:{pretty:(e,t)=>{if(t>6e4){const e=Math.floor(t/1e3/60),r=Math.ceil((t-60*e*1e3)/1e3);return 0===r?e+"m":`${e}m ${r}s`}{const e=Math.floor(t/1e3),r=t-1e3*e;return 0===r?e+"s":`${e}s ${r}ms`}},json:e=>e},[A.SIZE]:{pretty:(e,t)=>{const r=["KB","MB","GB","TB"];let n=r.length;for(;n>1&&t<1024**n;)n-=1;const o=1024**n;return B(e,`${Math.floor(100*t/o)/100} ${r[n-1]}`,A.NUMBER)},json:e=>e},[A.PATH]:{pretty:(e,t)=>B(e,o.cS.fromPortablePath(t),A.PATH),json:e=>o.cS.fromPortablePath(e)}};function I(e,t){return[t,e]}function E(e,t,r){return e.get("enableColors")?(r&n.BOLD&&(t=s().bold(t)),t):t}function B(e,t,r){if(!e.get("enableColors"))return t;const A=C.get(r);if(null===A)return t;const n=void 0===A?r:u.level>=3?A[0]:A[1],o="number"==typeof n?d.ansi256(n):n.startsWith("#")?d.hex(n):d[n];if("function"!=typeof o)throw new Error("Invalid format type "+n);return o(t)}function y(e,t,r){if(null===t)return B(e,"null",A.NULL);if(Object.prototype.hasOwnProperty.call(f,r)){return f[r].pretty(e,t)}if("string"!=typeof t)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof t);return B(e,t,r)}function m(e,t,r,{separator:A=", "}={}){return[...t].map(t=>y(e,t,r)).join(A)}function w(e,t){if(null===e)return null;if(Object.prototype.hasOwnProperty.call(f,t))return c.overrideType(t),f[t].json(e);if("string"!=typeof e)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof e);return e}function Q(e){return{Check:B(e,"✓","green"),Cross:B(e,"✘","red"),Question:B(e,"?","cyan")}}var D;function b(e,{configuration:t}){const r=t.get("logFilters"),A=new Map,n=new Map;for(const e of r){const t=e.get("level");if(void 0===t)continue;const r=e.get("code");void 0!==r&&A.set(r,t);const o=e.get("text");void 0!==o&&n.set(o,t)}const o=e.reportInfo,i=e.reportWarning,c=e.reportError,g=function(e,t,r,g){switch(((e,t,r)=>{if(null===e||e===a.b.UNNAMED)return r;if(n.size>0){const e=n.get(s().reset(t));if(void 0!==e)return null!=e?e:r}if(A.size>0){const t=A.get((0,a.i)(e));if(void 0!==t)return null!=t?t:r}return r})(t,r,g)){case D.Info:o.call(e,t,r);break;case D.Warning:i.call(e,null!=t?t:a.b.UNNAMED,r);break;case D.Error:c.call(e,null!=t?t:a.b.UNNAMED,r)}};e.reportInfo=function(...e){return g(this,...e,D.Info)},e.reportWarning=function(...e){return g(this,...e,D.Warning)},e.reportError=function(...e){return g(this,...e,D.Error)}}!function(e){e.Error="error",e.Warning="warning",e.Info="info",e.Discard="discard"}(D||(D={}))},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>a,checksumFile:()=>c,checksumPattern:()=>g});var A=r(43896),n=r(46009),o=r(76417),i=r(58592),s=r.n(i);function a(...e){const t=(0,o.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function c(e){return new Promise((t,r)=>{const n=(0,o.createHash)("sha512"),i=A.xfs.createReadStream(e);i.on("data",e=>{n.update(e)}),i.on("error",e=>{r(e)}),i.on("end",()=>{t(n.digest("hex"))})})}async function g(e,{cwd:t}){const r=(await s()(e,{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(e=>e+"/**/*"),i=await s()([e,...r],{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyFiles:!1,unique:!0});i.sort();const a=await Promise.all(i.map(async e=>{const t=[Buffer.from(e)],r=n.cS.toPortablePath(e),o=await A.xfs.lstatPromise(r);return o.isSymbolicLink()?t.push(Buffer.from(await A.xfs.readlinkPromise(r))):o.isFile()&&t.push(await A.xfs.readFilePromise(r)),t.join("\0")})),c=(0,o.createHash)("sha512");for(const e of a)c.update(e);return c.digest("hex")}},79669:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNetworkSettings:()=>d,Method:()=>C,request:()=>f,get:()=>I,put:()=>E,post:()=>B,del:()=>y});var A=r(43896),n=r(57211),o=r(98605),i=r(2401),s=r.n(i),a=r(98161),c=r(78835);const g=new Map,l=new Map,u=new o.Agent({keepAlive:!0}),h=new n.Agent({keepAlive:!0});function p(e){const t=new c.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}function d(e,t){const r=[...t.configuration.get("networkSettings")].sort(([e],[t])=>t.length-e.length),A={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(A),o=new c.URL(e);for(const[e,t]of r)if(s().isMatch(o.hostname,e))for(const e of n){const r=t.get(e);null!==r&&void 0===A[e]&&(A[e]=r)}for(const e of n)void 0===A[e]&&(A[e]=t.configuration.get(e));return A}var C;async function f(e,t,{configuration:n,headers:o,json:i,jsonRequest:g=i,jsonResponse:f=i,method:I=C.GET}){const E=d(e,{configuration:n});if(!1===E.enableNetwork)throw new Error(`Request to '${e}' has been blocked because of your configuration settings`);const B=new c.URL(e);if("http:"===B.protocol&&!s().isMatch(B.hostname,n.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${B.hostname})`);const y={agent:{http:E.httpProxy?a.httpOverHttp(p(E.httpProxy)):u,https:E.httpsProxy?a.httpsOverHttp(p(E.httpsProxy)):h},headers:o,method:I};y.responseType=f?"json":"buffer",null!==t&&(Buffer.isBuffer(t)||!g&&"string"==typeof t?y.body=t:y.json=t);const m=n.get("httpTimeout"),w=n.get("httpRetry"),Q=n.get("enableStrictSsl"),D=E.caFilePath,{default:b}=await Promise.resolve().then(r.t.bind(r,48722,7)),v=D?await async function(e){let t=l.get(e);return t||(t=A.xfs.readFilePromise(e).then(t=>(l.set(e,t),t)),l.set(e,t)),t}(D):void 0,S=b.extend({timeout:{socket:m},retry:w,https:{rejectUnauthorized:Q,certificateAuthority:v},...y});return n.getLimit("networkConcurrency")(()=>S(e))}async function I(e,{configuration:t,json:r,jsonResponse:A=r,...n}){let o=g.get(e);return o||(o=f(e,null,{configuration:t,...n}).then(t=>(g.set(e,t.body),t.body)),g.set(e,o)),!1===Buffer.isBuffer(o)&&(o=await o),A?JSON.parse(o.toString()):o}async function E(e,t,r){return(await f(e,t,{...r,method:C.PUT})).body}async function B(e,t,r){return(await f(e,t,{...r,method:C.POST})).body}async function y(e,t){return(await f(e,null,{...t,method:C.DELETE})).body}!function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(C||(C={}))},53836:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>p.C,DEFAULT_RC_FILENAME:()=>d.tr,DEFAULT_LOCK_FILENAME:()=>d.nh,Configuration:()=>d.VK,FormatType:()=>d.a5,ProjectLookup:()=>d.EW,SettingsType:()=>d.a2,BuildType:()=>C.k,LightReport:()=>f.h,Manifest:()=>I.G,MessageName:()=>E.b,Project:()=>B.I,TAG_REGEXP:()=>y.c,ReportError:()=>m.lk,Report:()=>m.yG,StreamReport:()=>w.Pk,TelemetryManager:()=>Q.E,ThrowReport:()=>D.$,VirtualFetcher:()=>b.N,WorkspaceResolver:()=>v.d,Workspace:()=>S.j,YarnVersion:()=>k.o,LinkType:()=>N.Un,PackageExtensionType:()=>N.HN,PackageExtensionStatus:()=>N._u,hashUtils:()=>i,httpUtils:()=>s,execUtils:()=>A,folderUtils:()=>n,formatUtils:()=>o,miscUtils:()=>a,scriptUtils:()=>c,semverUtils:()=>g,structUtils:()=>l,tgzUtils:()=>u,treeUtils:()=>h});var A=r(6220),n=r(81111),o=r(71643),i=r(20624),s=r(79669),a=r(73632),c=r(63088),g=r(36545),l=r(54143),u=r(72785),h=r(85875),p=r(28148),d=r(39922),C=r(92409),f=r(62152),I=r(46611),E=r(92659),B=r(85824),y=r(52779),m=r(35691),w=r(15815),Q=r(81832),D=r(33720),b=r(60895),v=r(94538),S=r(17722),k=r(59355),N=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,overrideType:()=>c,assertNever:()=>g,validateEnum:()=>l,mapAndFilter:()=>u,mapAndFind:()=>p,isIndexableObject:()=>C,convertMapsToIndexableObjects:()=>f,getFactoryWithDefault:()=>I,getArrayWithDefault:()=>E,getSetWithDefault:()=>B,getMapWithDefault:()=>y,releaseAfterUseAsync:()=>m,prettifyAsyncErrors:()=>w,prettifySyncErrors:()=>Q,bufferStream:()=>D,BufferStream:()=>b,DefaultStream:()=>v,dynamicRequire:()=>S,dynamicRequireNoCache:()=>k,sortMap:()=>N,buildIgnorePattern:()=>F,replaceEnvVariables:()=>K,parseBoolean:()=>M,parseOptionalBoolean:()=>R,tryParseOptionalBoolean:()=>x});var A=r(46009),n=r(40822),o=r(2401),i=r.n(o),s=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){}function g(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function l(e,t){if(!Object.values(e).includes(t))throw new Error("Assertion failed: Invalid value for enumeration");return t}function u(e,t){const r=[];for(const A of e){const e=t(A);e!==h&&r.push(e)}return r}e=r.hmd(e);const h=Symbol();function p(e,t){for(const r of e){const e=t(r);if(e!==d)return e}}u.skip=h;const d=Symbol();function C(e){return"object"==typeof e&&null!==e}function f(e){if(e instanceof Map&&(e=Object.fromEntries(e)),C(e))for(const t of Object.keys(e)){const r=e[t];C(r)&&(e[t]=f(r))}return e}function I(e,t,r){let A=e.get(t);return void 0===A&&e.set(t,A=r()),A}function E(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function B(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function y(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function m(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function w(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function Q(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function D(e){return await new Promise((t,r)=>{const A=[];e.on("error",e=>{r(e)}),e.on("data",e=>{A.push(e)}),e.on("end",()=>{t(Buffer.concat(A))})})}p.skip=d;class b extends s.Transform{constructor(){super(...arguments),this.chunks=[]}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),r(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}}class v extends s.Transform{constructor(e=Buffer.alloc(0)){super(),this.active=!0,this.ifEmpty=e}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,r(null,e)}_flush(e){this.active&&this.ifEmpty.length>0&&e(null,this.ifEmpty)}}function S(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function k(t){const n=A.cS.fromPortablePath(t),o=r.c[n];let i;delete r.c[n];try{i=S(n);const t=r.c[n],A=e.children.indexOf(t);-1!==A&&e.children.splice(A,1)}finally{r.c[n]=o}return i}function N(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const A=[];for(const e of t)A.push(r.map(t=>e(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function F(e){return 0===e.length?null:e.map(e=>`(${i().makeRe(e,{windows:!1}).source})`).join("|")}function K(e,{env:t}){return e.replace(/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g,(...e)=>{const{variableName:r,colon:A,fallback:o}=e[e.length-1],i=Object.prototype.hasOwnProperty.call(t,r),s=t[r];if(s)return s;if(i&&!A)return s;if(null!=o)return o;throw new n.UsageError(`Environment variable not found (${r})`)})}function M(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}function R(e){return void 0===e?e:M(e)}function x(e){try{return R(e)}catch(e){return null}}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>b,prepareExternalProject:()=>S,hasPackageScript:()=>k,executePackageScript:()=>N,executePackageShellcode:()=>F,executeWorkspaceScript:()=>M,hasWorkspaceScript:()=>R,executeWorkspaceLifecycleScript:()=>x,maybeExecuteWorkspaceLifecycleScript:()=>L,getPackageAccessibleBinaries:()=>P,getWorkspaceAccessibleBinaries:()=>O,executePackageAccessibleBinary:()=>U,executeWorkspaceAccessibleBinary:()=>T});var A,n=r(46009),o=r(53660),i=r(75448),s=r(43896),a=r(65281),c=r(76756),g=r(50730),l=r(61814),u=r.n(l),h=r(61578),p=r.n(h),d=r(92413),C=r(46611),f=r(92659),I=r(35691),E=r(15815),B=r(59355),y=r(6220),m=r(71643),w=r(73632),Q=r(54143);async function D(e,t,r,A=[]){"win32"===process.platform&&await Promise.all([s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe"}),(0,g.O9)()),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe.info"}),[r,...A].join("\n")),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${A.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`)]),await s.xfs.writeFilePromise(n.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${A.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await s.xfs.chmodPromise(n.y1.join(e,t),493)}async function b({project:e,binFolder:t,lifecycleScript:r}){const A={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(A["path"!==e.toLowerCase()?e:"PATH"]=t);const o=n.cS.fromPortablePath(t);A.BERRY_BIN_FOLDER=n.cS.fromPortablePath(o),await D(t,"node",process.execPath),null!==B.o&&(await D(t,"run",process.execPath,[process.argv[1],"run"]),await D(t,"yarn",process.execPath,[process.argv[1]]),await D(t,"yarnpkg",process.execPath,[process.argv[1]]),await D(t,"node-gyp",process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(A.INIT_CWD=n.cS.fromPortablePath(e.configuration.startingCwd)),A.PATH=A.PATH?`${o}${n.cS.delimiter}${A.PATH}`:""+o,A.npm_execpath=`${o}${n.cS.sep}yarn`,A.npm_node_execpath=`${o}${n.cS.sep}node`;const i=null!==B.o?"yarn/"+B.o:`yarn/${w.dynamicRequire("@yarnpkg/core").version}-core`;return A.npm_config_user_agent=`${i} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(A.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,A,async(e,r,A)=>await D(t,(0,n.Zu)(e),r,A)),A}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(A||(A={}));const v=p()(2);async function S(e,t,{configuration:r,report:o,workspace:i=null}){await v(async()=>{await s.xfs.mktempPromise(async a=>{const c=n.y1.join(a,"pack.log"),{stdout:g,stderr:l}=r.getSubprocessStreams(c,{prefix:e,report:o}),u=await async function(e){let t=null;try{t=await s.xfs.readFilePromise(n.y1.join(e,n.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?A.Yarn2:A.Yarn1:s.xfs.existsSync(n.y1.join(e,"package-lock.json"))?A.Npm:s.xfs.existsSync(n.y1.join(e,"pnpm-lock.yaml"))?A.Pnpm:null}(e);let h;null!==u?(g.write(`Installing the project using ${u}\n\n`),h=u):(g.write("No package manager detected; defaulting to Yarn\n\n"),h=A.Yarn2),await s.xfs.mktempPromise(async r=>{const o=await b({binFolder:r}),u=new Map([[A.Yarn1,async()=>{const r=null!==i?["workspace",i]:[],A=await y.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==A.code)return A.code;await s.xfs.appendFilePromise(n.y1.join(e,".npmignore"),"/.yarn\n"),g.write("\n");const a=await y.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==a.code)return a.code;g.write("\n");const c=await y.pipevp("yarn",[...r,"pack","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==c.code?c.code:0}],[A.Yarn2,async()=>{const r=null!==i?["workspace",i]:[];o.YARN_ENABLE_INLINE_BUILDS="1";const A=n.y1.join(e,n.QS.lockfile);await s.xfs.existsPromise(A)||await s.xfs.writeFilePromise(A,"");const a=await y.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==a.code?a.code:0}],[A.Npm,async()=>{if(null!==i)throw new Error("Workspaces aren't supported by npm, which has been detected as the primary package manager for "+e);delete o.npm_config_user_agent;const r=await y.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const A=new d.PassThrough,a=w.bufferStream(A);A.pipe(g);const c=await y.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:A,stderr:l});if(0!==c.code)return c.code;const u=(await a).toString().trim(),h=n.y1.resolve(e,n.cS.toPortablePath(u));return await s.xfs.renamePromise(h,t),0}]]).get(h);if(void 0===u)throw new Error("Assertion failed: Unsupported workflow");const p=await u();if(0!==p&&void 0!==p)throw s.xfs.detachTemp(a),new I.lk(f.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${p}, logs can be found here: ${c})`)})})})}async function k(e,t,{project:r}){const A=r.storedPackages.get(e.locatorHash);if(!A)throw new Error(`Package for ${Q.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,s=r.configuration.getLinkers(),a={project:r,report:new E.Pk({stdout:new d.PassThrough,configuration:o})},c=s.find(e=>e.supportsPackage(A,a));if(!c)throw new Error(`The package ${Q.prettyLocator(r.configuration,A)} isn't supported by any of the available linkers`);const g=await c.findPackageLocation(A,a),l=new i.M(g,{baseFs:e});return(await C.G.find(n.LZ.dot,{baseFs:l})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function N(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{manifest:g,env:l,cwd:u}=await K(e,{project:n,binFolder:s,cwd:A,lifecycleScript:t}),h=g.scripts.get(t);if(void 0===h)return 1;const p=await n.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(h,r,{cwd:u,env:l,stdin:o,stdout:i,stderr:a}),n,e,t,{script:h,args:r,cwd:u,env:l,stdin:o,stdout:i,stderr:a});return await p()})}async function F(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{env:g,cwd:l}=await K(e,{project:n,binFolder:s,cwd:A});return await(0,c.execute)(t,r,{cwd:l,env:g,stdin:o,stdout:i,stderr:a})})}async function K(e,{project:t,binFolder:r,cwd:A,lifecycleScript:s}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Q.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,g=t.configuration.getLinkers(),l={project:t,report:new E.Pk({stdout:new d.PassThrough,configuration:a})},u=g.find(e=>e.supportsPackage(c,l));if(!u)throw new Error(`The package ${Q.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const h=await b({project:t,binFolder:r,lifecycleScript:s});await Promise.all(Array.from(await P(e,{project:t}),([e,[,t]])=>D(r,(0,n.Zu)(e),process.execPath,[t])));const p=await u.findPackageLocation(c,l),f=new i.M(p,{baseFs:o}),I=await C.G.find(n.LZ.dot,{baseFs:f});return void 0===A&&(A=p),{manifest:I,binFolder:r,env:h,cwd:A}},{libzip:await(0,a.getLibzipPromise)()})}async function M(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await N(e.anchoredLocator,t,r,{cwd:A,project:e.project,stdin:n,stdout:o,stderr:i})}function R(e,t){return e.manifest.scripts.has(t)}async function x(e,t,{cwd:r,report:A}){const{configuration:o}=e.project;await s.xfs.mktempPromise(async i=>{const a=n.y1.join(i,t+".log"),c=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${e.cwd}")\n`,{stdout:g,stderr:l}=o.getSubprocessStreams(a,{report:A,prefix:Q.prettyLocator(o,e.anchoredLocator),header:c});A.reportInfo(f.b.LIFECYCLE_SCRIPT,`Calling the "${t}" lifecycle script`);const h=await M(e,t,[],{cwd:r,stdin:null,stdout:g,stderr:l});if(g.end(),l.end(),0!==h)throw s.xfs.detachTemp(i),new I.lk(f.b.LIFECYCLE_SCRIPT,`${u()(t)} script failed (exit code ${m.pretty(o,h,m.Type.NUMBER)}, logs can be found here: ${m.pretty(o,a,m.Type.PATH)}); run ${m.pretty(o,"yarn "+t,m.Type.CODE)} to investigate`)})}async function L(e,t,r){R(e,t)&&await x(e,t,r)}async function P(e,{project:t}){const r=t.configuration,A=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${Q.prettyLocator(r,e)} not found in the project`);const i=new d.Writable,s=r.getLinkers(),a={project:t,report:new E.Pk({configuration:r,stdout:i})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const A=t.storedResolutions.get(e.descriptorHash);if(!A)throw new Error(`Assertion failed: The resolution (${Q.prettyDescriptor(r,e)}) should have been registered`);c.add(A)}for(const e of c){const r=t.storedPackages.get(e);if(!r)throw new Error(`Assertion failed: The package (${e}) should have been registered`);if(0===r.bin.size)continue;const o=s.find(e=>e.supportsPackage(r,a));if(!o)continue;let i=null;try{i=await o.findPackageLocation(r,a)}catch(e){if("LOCATOR_NOT_INSTALLED"===e.code)continue;throw e}for(const[e,t]of r.bin)A.set(e,[r,n.cS.fromPortablePath(n.y1.resolve(i,t))])}return A}async function O(e){return await P(e.anchoredLocator,{project:e.project})}async function U(e,t,r,{cwd:A,project:o,stdin:i,stdout:a,stderr:c,nodeArgs:g=[]}){const l=await P(e,{project:o}),u=l.get(t);if(!u)throw new Error(`Binary not found (${t}) for ${Q.prettyLocator(o.configuration,e)}`);return await s.xfs.mktempPromise(async e=>{const[,t]=u,h=await b({project:o,binFolder:e});let p;await Promise.all(Array.from(l,([e,[,t]])=>D(h.BERRY_BIN_FOLDER,(0,n.Zu)(e),process.execPath,[t])));try{p=await y.pipevp(process.execPath,[...g,t,...r],{cwd:A,env:h,stdin:i,stdout:a,stderr:c})}finally{await s.xfs.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function T(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await U(e.anchoredLocator,t,r,{project:e.project,cwd:A,stdin:n,stdout:o,stderr:i})}},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o,validRange:()=>s});var A=r(53887),n=r.n(A);function o(e,t,r=!1){let A,o;try{A=new(n().Range)(t,{includePrerelease:!0,loose:r})}catch(e){return!1}if(!e)return!1;try{o=new(n().SemVer)(e,A),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return A.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}const i=new Map;function s(e){if(-1!==e.indexOf(":"))return null;let t=i.get(e);if(void 0!==t)return t;try{t=new(n().Range)(e)}catch(e){t=null}return i.set(e,t),t}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>u,makeDescriptor:()=>h,makeLocator:()=>p,convertToIdent:()=>d,convertDescriptorToLocator:()=>C,convertLocatorToDescriptor:()=>f,convertPackageToLocator:()=>I,renamePackage:()=>E,copyPackage:()=>B,virtualizeDescriptor:()=>y,virtualizePackage:()=>m,isVirtualDescriptor:()=>w,isVirtualLocator:()=>Q,devirtualizeDescriptor:()=>D,devirtualizeLocator:()=>b,bindDescriptor:()=>v,bindLocator:()=>S,areIdentsEqual:()=>k,areDescriptorsEqual:()=>N,areLocatorsEqual:()=>F,areVirtualPackagesEquivalent:()=>K,parseIdent:()=>M,tryParseIdent:()=>R,parseDescriptor:()=>x,tryParseDescriptor:()=>L,parseLocator:()=>P,tryParseLocator:()=>O,parseRange:()=>U,parseFileStyleRange:()=>T,makeRange:()=>Y,convertToManifestRange:()=>G,requirableIdent:()=>H,stringifyIdent:()=>J,stringifyDescriptor:()=>q,stringifyLocator:()=>z,slugifyIdent:()=>W,slugifyLocator:()=>X,prettyIdent:()=>V,prettyRange:()=>Z,prettyDescriptor:()=>$,prettyReference:()=>ee,prettyLocator:()=>te,prettyLocatorNoColors:()=>re,sortDescriptors:()=>Ae,prettyWorkspace:()=>ne,prettyResolution:()=>oe,prettyDependent:()=>ie,getIdentVendorPath:()=>se});var A=r(46009),n=r(71191),o=r.n(n),i=r(53887),s=r.n(i),a=r(71643),c=r(20624),g=r(73632),l=r(54143);function u(e,t){if(null==e?void 0:e.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:c.makeHash(e,t),scope:e,name:t}}function h(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:c.makeHash(e.identHash,t),range:t}}function p(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function I(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function E(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function B(e){return E(e,e)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,p(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function Q(e){return e.reference.startsWith("virtual:")}function D(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function b(e){if(!Q(e))throw new Error("Not a virtual descriptor");return p(e,e.reference.replace(/^[^#]*#/,""))}function v(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function S(e,t){return e.reference.includes("::")?e:p(e,`${e.reference}::${o().stringify(t)}`)}function k(e,t){return e.identHash===t.identHash}function N(e,t){return e.descriptorHash===t.descriptorHash}function F(e,t){return e.locatorHash===t.locatorHash}function K(e,t){if(!Q(e))throw new Error("Invalid package type");if(!Q(t))throw new Error("Invalid package type");if(!k(e,t))return!1;if(e.dependencies.size!==t.dependencies.size)return!1;for(const r of e.dependencies.values()){const e=t.dependencies.get(r.identHash);if(!e)return!1;if(!N(r,e))return!1}return!0}function M(e){const t=R(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function R(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,A]=t;return u(void 0!==r?r:null,A)}function x(e,t=!1){const r=L(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function L(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const i=void 0!==o?o:"unknown";return h(u(void 0!==A?A:null,n),i)}function P(e,t=!1){const r=O(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function O(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const i=void 0!==o?o:"unknown";return p(u(void 0!==A?A:null,n),i)}function U(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const A=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&A!==t.requireProtocol)throw new Error(`Invalid protocol (${A})`);if((null==t?void 0:t.requireProtocol)&&null===A)throw new Error(`Missing protocol (${A})`);const n=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===n)throw new Error(`Missing source (${e})`);const i=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:A,source:n,selector:(null==t?void 0:t.parseSelector)?o().parse(i):i,params:void 0!==r[4]?o().parse(r[4]):null}}function T(e,{protocol:t}){const{selector:r,params:A}=U(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof A.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:P(A.locator,!0),path:r}}function j(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function Y({protocol:e,source:t,selector:r,params:A}){let n="";return null!==e&&(n+=""+e),null!==t&&(n+=j(t)+"#"),n+=j(r),function(e){return null!==e&&Object.entries(e).length>0}(A)&&(n+="::"+o().stringify(A)),n}function G(e){const{params:t,protocol:r,source:A,selector:n}=U(e);for(const e in t)e.startsWith("__")&&delete t[e];return Y({protocol:r,source:A,params:t,selector:n})}function H(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function q(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function z(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function W(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function X(e){const{protocol:t,selector:r}=U(e.reference),n=null!==t?t.replace(/:$/,""):"exotic",o=s().valid(r),i=null!==o?`${n}-${o}`:""+n,a=(e.scope,`${W(e)}-${i}-${e.locatorHash.slice(0,10)}`);return(0,A.Zu)(a)}function V(e,t){return t.scope?`${a.pretty(e,`@${t.scope}/`,a.Type.SCOPE)}${a.pretty(e,t.name,a.Type.NAME)}`:""+a.pretty(e,t.name,a.Type.NAME)}function _(e){if(e.startsWith("virtual:")){return`${_(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function Z(e,t){return""+a.pretty(e,_(t),a.Type.RANGE)}function $(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.RANGE)}${Z(e,t.range)}`}function ee(e,t){return""+a.pretty(e,_(t),a.Type.REFERENCE)}function te(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.REFERENCE)}${ee(e,t.reference)}`}function re(e){return`${J(e)}@${_(e.reference)}`}function Ae(e){return g.sortMap(e,[e=>J(e),e=>e.range])}function ne(e,t){return V(e,t.locator)}function oe(e,t,r){const A=w(t)?D(t):t;return null===r?`${l.prettyDescriptor(e,A)} → ${a.mark(e).Cross}`:A.identHash===r.identHash?`${l.prettyDescriptor(e,A)} → ${ee(e,r.reference)}`:`${l.prettyDescriptor(e,A)} → ${te(e,r)}`}function ie(e,t,r){return null===r?""+te(e,t):`${te(e,t)} (via ${l.prettyRange(e,r.range)})`}function se(e){return"node_modules/"+H(e)}},72785:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeArchiveFromDirectory:()=>h,convertToZip:()=>p,extractArchiveTo:()=>d});var A=r(78420),n=r(46009),o=r(90739),i=r(43896),s=r(65281),a=r(59938),c=r(31669),g=r(78761),l=r.n(g);const u=(0,c.promisify)(l().gunzip);async function h(e,{baseFs:t=new A.S,prefixPath:r=n.LZ.root,compressionLevel:a,inMemory:c=!1}={}){const g=await(0,s.getLibzipPromise)();let l;if(c)l=new o.d(null,{libzip:g,level:a});else{const e=await i.xfs.mktempPromise(),t=n.y1.join(e,"archive.zip");l=new o.d(t,{create:!0,libzip:g,level:a})}const u=n.y1.resolve(n.LZ.root,r);return await l.copyPromise(u,e,{baseFs:t,stableTime:!0,stableSort:!0}),l}async function p(e,t){const r=await i.xfs.mktempPromise(),A=n.y1.join(r,"archive.zip"),{compressionLevel:a,...c}=t;return await d(e,new o.d(A,{create:!0,libzip:await(0,s.getLibzipPromise)(),level:a}),c)}async function d(e,t,{stripComponents:r=0,prefixPath:A=n.LZ.dot}={}){const o=a.extract();o.on("entry",(e,o,i)=>{var s,a;if(function(e){if("/"===e.name[0])return!0;const t=e.name.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void i();const c=n.y1.normalize(n.cS.toPortablePath(e.name)).replace(/\/$/,"").split(/\//g);if(c.length<=r)return o.resume(),void i();const g=c.slice(r).join("/"),l=n.y1.join(A,g);let u=420;switch("directory"!==e.type&&0==(73&(null!==(s=e.mode)&&void 0!==s?s:0))||(u|=73),e.type){case"directory":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.mkdirSync(l),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i();break;case"file":{t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]});const e=[];o.on("data",t=>e.push(t)),o.on("end",()=>{t.writeFileSync(l,Buffer.concat(e)),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i()})}break;case"symlink":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.symlinkSync(e.linkname,l),null===(a=t.lutimesSync)||void 0===a||a.call(t,l,315532800,315532800),i();break;default:o.resume(),i()}});const i=await u(e);return await new Promise((e,r)=>{o.on("error",e=>{r(e)}),o.on("finish",()=>{e(t)}),o.end(i)})}},85875:(e,t,r)=>{"use strict";r.r(t),r.d(t,{treeNodeToTreeify:()=>o,treeNodeToJson:()=>i,emitList:()=>s,emitTree:()=>a});var A=r(94682),n=r(71643);function o(e,{configuration:t}){const r={},A=(e,r)=>{const o=Array.isArray(e)?e.entries():Object.entries(e);for(const[e,{label:i,value:s,children:a}]of o){const o=[];void 0!==i&&o.push(n.applyStyle(t,i,n.Style.BOLD)),void 0!==s&&o.push(n.pretty(t,s[0],s[1])),0===o.length&&o.push(n.applyStyle(t,""+e,n.Style.BOLD));const c=r[o.join(": ")]={};void 0!==a&&A(a,c)}};if(void 0===e.children)throw new Error("The root node must only contain children");return A(e.children,r),r}function i(e){const t=e=>{var r;if(void 0===e.children){if(void 0===e.value)throw new Error("Assertion failed: Expected a value to be set if the children are missing");return n.json(e.value[0],e.value[1])}const A=Array.isArray(e.children)?e.children.entries():Object.entries(null!==(r=e.children)&&void 0!==r?r:{}),o=Array.isArray(e.children)?[]:{};for(const[e,r]of A)o[e]=t(r);return void 0===e.value?o:{value:n.json(e.value[0],e.value[1]),children:o}};return t(e)}function s(e,{configuration:t,stdout:r,json:A}){a({children:e.map(e=>({value:e}))},{configuration:t,stdout:r,json:A})}function a(e,{configuration:t,stdout:r,json:n,separators:s=0}){var a;if(n){const t=Array.isArray(e.children)?e.children.values():Object.values(null!==(a=e.children)&&void 0!==a?a:{});for(const e of t)r.write(JSON.stringify(i(e))+"\n");return}let c=(0,A.asTree)(o(e,{configuration:t}),!1,!1);if(s>=1&&(c=c.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,"")),s>=2)for(let e=0;e<2;++e)c=c.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,"$1$3 │\n$2").replace(/^│\n/,"");if(s>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(c)}},32485:(e,t,r)=>{"use strict";var A,n,o;r.d(t,{Un:()=>A,HN:()=>n,_u:()=>o}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.Dependency="Dependency",e.PeerDependency="PeerDependency",e.PeerDependencyMeta="PeerDependencyMeta"}(n||(n={})),function(e){e.Inactive="inactive",e.Redundant="redundant",e.Active="active"}(o||(o={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var A=r(42096);class n extends A.p{constructor(e,{baseFs:t,pathUtils:r}){super(r),this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}},75448:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var A=r(78420),n=r(42096),o=r(46009);class i extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?o.y1.normalize(e):this.baseFs.resolve(o.y1.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}},5944:(e,t,r)=>{"use strict";r.d(t,{fS:()=>g,uY:()=>c,qH:()=>l});var A=r(12087),n=r(35747),o=r.n(n),i=r(46009);const s=new Date(4567890e5);async function a(e,t,r,A,n,c,g,l){var u,h;const p=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(A,n),d=await c.lstatPromise(g),C=l.stableTime?{mtime:s,atime:s}:d;let f;switch(!0){case d.isDirectory():f=await async function(e,t,r,A,n,o,i,s,c,g){if(null!==o&&!o.isDirectory()){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}let l=!1;null===o&&(e.push(async()=>A.mkdirPromise(n,{mode:c.mode})),l=!0);const u=await i.readdirPromise(s);if(g.stableSort)for(const o of u.sort())await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)&&(l=!0);else{(await Promise.all(u.map(async o=>{await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)}))).some(e=>e)&&(l=!0)}return l}(e,t,r,A,n,p,c,g,d,l);break;case d.isFile():f=await async function(e,t,r,A,n,i,s,a,c,g){if(null!==i){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),i=null}const l=A===s?async()=>A.copyFilePromise(a,n,o().constants.COPYFILE_FICLONE):async()=>A.writeFilePromise(n,await s.readFilePromise(a));return e.push(async()=>l()),!0}(e,0,0,A,n,p,c,g,0,l);break;case d.isSymbolicLink():f=await async function(e,t,r,A,n,o,s,a,c,g){if(null!==o){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}return e.push(async()=>{await A.symlinkPromise((0,i.CI)(A.pathUtils,await s.readlinkPromise(a)),n)}),!0}(e,0,0,A,n,p,c,g,0,l);break;default:throw new Error(`Unsupported file type (${d.mode})`)}return(f||(null===(u=null==p?void 0:p.mtime)||void 0===u?void 0:u.getTime())!==C.mtime.getTime()||(null===(h=null==p?void 0:p.atime)||void 0===h?void 0:h.getTime())!==C.atime.getTime())&&(t.push(()=>r(n,C.atime,C.mtime)),f=!0),null!==p&&(511&p.mode)==(511&d.mode)||(t.push(()=>A.chmodPromise(n,511&d.mode)),f=!0),f}class c{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:t=!1}={}){const r=[e];for(;r.length>0;){const e=r.shift();if((await this.lstatPromise(e)).isDirectory()){const A=await this.readdirPromise(e);if(!t)throw new Error("Not supported");for(const t of A.sort())r.push(this.pathUtils.join(e,t))}else yield e}}async removePromise(e,{recursive:t=!0,maxRetries:r=5}={}){let A;try{A=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(A.isDirectory()){if(t)for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));let A=0;do{try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){if(0===r)break;await new Promise(e=>setTimeout(e,100*A));continue}throw e}}while(A++e()))}(this,e,r,t,{overwrite:A,stableSort:n,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:A=!0}={}){const n=r.lstatSync(t),o=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);const n=r.readdirSync(t);for(const o of n)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:A})}else if(n.isFile()){if(!o||A){o&&this.removeSync(e);const A=r.readFileSync(t);this.writeFileSync(e,A)}}else{if(!n.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);if(!o||A){o&&this.removeSync(e);const A=r.readlinkSync(t);this.symlinkSync((0,i.CI)(this.pathUtils,A),e)}}const s=511&n.mode;this.chmodSync(e,s)}async changeFilePromise(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferPromise(e,t):this.changeFileTextPromise(e,t,r)}async changeFileBufferPromise(e,t){let r=Buffer.alloc(0);try{r=await this.readFilePromise(e)}catch(e){}0!==Buffer.compare(r,t)&&await this.writeFilePromise(e,t)}async changeFileTextPromise(e,t,{automaticNewlines:r}={}){let A="";try{A=await this.readFilePromise(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&await this.writeFilePromise(e,n)}changeFileSync(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferSync(e,t):this.changeFileTextSync(e,t,r)}changeFileBufferSync(e,t){let r=Buffer.alloc(0);try{r=this.readFileSync(e)}catch(e){}0!==Buffer.compare(r,t)&&this.writeFileSync(e,t)}changeFileTextSync(e,t,{automaticNewlines:r=!1}={}){let A="";try{A=this.readFileSync(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&this.writeFileSync(e,n)}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(r){if("EXDEV"!==r.code)throw r;await this.copyPromise(t,e),await this.removePromise(e)}}moveSync(e,t){try{this.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;this.copySync(t,e),this.removeSync(e)}}async lockPromise(e,t){const r=e+".flock",A=Date.now();let n=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-A<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===n;)try{n=await this.openPromise(r,"wx")}catch(e){if("EEXIST"!==e.code)throw e;if(!await o())try{await this.unlinkPromise(r);continue}catch(e){}if(!(Date.now()-A<6e4))throw new Error(`Couldn't acquire a lock in a reasonable time (via ${r})`);await new Promise(e=>setTimeout(e,1e3/60))}await this.writePromise(n,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.closePromise(n),await this.unlinkPromise(r)}catch(e){}}}async readJsonPromise(e){const t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}readJsonSync(e){const t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,JSON.stringify(t,null,2)+"\n")}writeJsonSync(e,t){return this.writeFileSync(e,JSON.stringify(t,null,2)+"\n")}async preserveTimePromise(e,t){const r=await this.lstatPromise(e),A=await t();void 0!==A&&(e=A),this.lutimesPromise?await this.lutimesPromise(e,r.atime,r.mtime):r.isSymbolicLink()||await this.utimesPromise(e,r.atime,r.mtime)}async preserveTimeSync(e,t){const r=this.lstatSync(e),A=t();void 0!==A&&(e=A),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}c.DEFAULT_TIME=315532800;class g extends c{constructor(){super(i.y1)}}function l(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return A.EOL;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"}(e))}},10489:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var A=r(78420),n=r(42096),o=r(46009);const i=o.LZ.root;class s extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.resolve(o.LZ.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(o.LZ.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){const t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(i,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(i,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});var A=r(42096);class n extends A.p{constructor(e,t){super(t),this.instance=null,this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}}},78420:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var A=r(35747),n=r.n(A),o=r(5944),i=r(26984),s=r(46009);class a extends o.fS{constructor(e=n()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return s.LZ.root}resolve(e){return s.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.open(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}openSync(e,t,r){return this.realFs.openSync(s.cS.fromPortablePath(e),t,r)}async opendirPromise(e,t){return await new Promise((r,A)=>{void 0!==t?this.realFs.opendir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.opendir(s.cS.fromPortablePath(e),this.makeCallback(r,A))}).then(t=>Object.defineProperty(t,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,t){const r=void 0!==t?this.realFs.opendirSync(s.cS.fromPortablePath(e),t):this.realFs.opendirSync(s.cS.fromPortablePath(e));return Object.defineProperty(r,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,t,r=0,A=0,n=-1){return await new Promise((o,i)=>{this.realFs.read(e,t,r,A,n,(e,t)=>{e?i(e):o(t)})})}readSync(e,t,r,A,n){return this.realFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return await new Promise((o,i)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,i)):this.realFs.write(e,t,r,A,n,this.makeCallback(o,i)))}writeSync(e,t,r,A,n){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,A,n)}async closePromise(e){await new Promise((t,r)=>{this.realFs.close(e,this.makeCallback(t,r))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(s.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}realpathSync(e){return s.cS.toPortablePath(this.realFs.realpathSync(s.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(s.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(s.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,A)=>{this.realFs.access(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}existsSync(e){return this.realFs.existsSync(s.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(s.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(s.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,A)=>{this.realFs.chmod(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}chmodSync(e,t){return this.realFs.chmodSync(s.cS.fromPortablePath(e),t)}async chownPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.chown(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}chownSync(e,t,r){return this.realFs.chownSync(s.cS.fromPortablePath(e),t,r)}async renamePromise(e,t){return await new Promise((r,A)=>{this.realFs.rename(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}renameSync(e,t){return this.realFs.renameSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((A,n)=>{this.realFs.copyFile(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r,this.makeCallback(A,n))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(A,n)):this.realFs.appendFile(o,t,this.makeCallback(A,n))})}appendFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(A,t,r):this.realFs.appendFileSync(A,t)}async writeFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(A,n)):this.realFs.writeFile(o,t,this.makeCallback(A,n))})}writeFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(A,t,r):this.realFs.writeFileSync(A,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(s.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.utimes(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}utimesSync(e,t,r){this.realFs.utimesSync(s.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const A=this.realFs.lutimes;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((n,o)=>{A.call(this.realFs,s.cS.fromPortablePath(e),t,r,this.makeCallback(n,o))})}lutimesSyncImpl(e,t,r){const A=this.realFs.lutimesSync;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);A.call(this.realFs,s.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,A)=>{this.realFs.mkdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}mkdirSync(e,t){return this.realFs.mkdirSync(s.cS.fromPortablePath(e),t)}async rmdirPromise(e,t){return await new Promise((r,A)=>{t?this.realFs.rmdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.rmdir(s.cS.fromPortablePath(e),this.makeCallback(r,A))})}rmdirSync(e,t){return this.realFs.rmdirSync(s.cS.fromPortablePath(e),t)}async linkPromise(e,t){return await new Promise((r,A)=>{this.realFs.link(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}linkSync(e,t){return this.realFs.linkSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async symlinkPromise(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,n)=>{this.realFs.symlink(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A,this.makeCallback(r,n))})}symlinkSync(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A)}async readFilePromise(e,t){return await new Promise((r,A)=>{const n="string"==typeof e?s.cS.fromPortablePath(e):e;this.realFs.readFile(n,t,this.makeCallback(r,A))})}readFileSync(e,t){const r="string"==typeof e?s.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,A)=>{t?this.realFs.readdir(s.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,A)):this.realFs.readdir(s.cS.fromPortablePath(e),this.makeCallback(e=>r(e),A))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(s.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(s.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}readlinkSync(e){return s.cS.toPortablePath(this.realFs.readlinkSync(s.cS.fromPortablePath(e)))}async truncatePromise(e,t){return await new Promise((r,A)=>{this.realFs.truncate(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}truncateSync(e,t){return this.realFs.truncateSync(s.cS.fromPortablePath(e),t)}watch(e,t,r){return this.realFs.watch(s.cS.fromPortablePath(e),t,r)}watchFile(e,t,r){return this.realFs.watchFile(s.cS.fromPortablePath(e),t,r)}unwatchFile(e,t){return this.realFs.unwatchFile(s.cS.fromPortablePath(e),t)}makeCallback(e,t){return(r,A)=>{r?t(r):e(A)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var A=r(42096),n=r(46009);class o extends A.p{constructor(e){super(n.cS),this.baseFs=e}mapFromBase(e){return n.cS.fromPortablePath(e)}mapToBase(e){return n.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var A=r(5944);class n extends A.uY{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,t,r){return this.baseFs.openPromise(this.mapToBase(e),t,r)}openSync(e,t,r){return this.baseFs.openSync(this.mapToBase(e),t,r)}async opendirPromise(e,t){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),t),{path:e})}opendirSync(e,t){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),t),{path:e})}async readPromise(e,t,r,A,n){return await this.baseFs.readPromise(e,t,r,A,n)}readSync(e,t,r,A,n){return this.baseFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n)}writeSync(e,t,r,A,n){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(null!==e?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(null!==e?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}async accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}async statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}async lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}async chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}async chownPromise(e,t,r){return this.baseFs.chownPromise(this.mapToBase(e),t,r)}chownSync(e,t,r){return this.baseFs.chownSync(this.mapToBase(e),t,r)}async renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}async copyFilePromise(e,t,r=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),r)}copyFileSync(e,t,r=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),r)}async appendFilePromise(e,t,r){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,r)}appendFileSync(e,t,r){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,r)}async writeFilePromise(e,t,r){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,r)}writeFileSync(e,t,r){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,r)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,t,r){return this.baseFs.utimesPromise(this.mapToBase(e),t,r)}utimesSync(e,t,r){return this.baseFs.utimesSync(this.mapToBase(e),t,r)}async mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}async rmdirPromise(e,t){return this.baseFs.rmdirPromise(this.mapToBase(e),t)}rmdirSync(e,t){return this.baseFs.rmdirSync(this.mapToBase(e),t)}async linkPromise(e,t){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(t))}linkSync(e,t){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(t))}async symlinkPromise(e,t,r){return this.baseFs.symlinkPromise(this.mapToBase(e),this.mapToBase(t),r)}symlinkSync(e,t,r){return this.baseFs.symlinkSync(this.mapToBase(e),this.mapToBase(t),r)}async readFilePromise(e,t){return this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,{withFileTypes:t}={}){return this.baseFs.readdirPromise(this.mapToBase(e),{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){return this.baseFs.readdirSync(this.mapToBase(e),{withFileTypes:t})}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,t){return this.baseFs.truncatePromise(this.mapToBase(e),t)}truncateSync(e,t){return this.baseFs.truncateSync(this.mapToBase(e),t)}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}watchFile(e,t,r){return this.baseFs.watchFile(this.mapToBase(e),t,r)}unwatchFile(e,t){return this.baseFs.unwatchFile(this.mapToBase(e),t)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var A=r(78420),n=r(42096),o=r(46009);const i=/^[0-9]+$/,s=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends n.p{constructor({baseFs:e=new A.S}={}){super(o.y1),this.baseFs=e}static makeVirtualPath(e,t,r){if("$$virtual"!==o.y1.basename(e))throw new Error('Assertion failed: Virtual folders must be named "$$virtual"');if(!o.y1.basename(t).match(a))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");const A=o.y1.relative(o.y1.dirname(e),r).split("/");let n=0;for(;n{"use strict";r.d(t,{k:()=>C,d:()=>f});var A=r(35747),n=r(92413),o=r(31669),i=r(78761),s=r.n(i),a=r(5944),c=r(78420),g=r(19697),l=r(38783),u=r(22004),h=r(26984),p=r(46009),d=r(65760);const C="mixed";class f extends a.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fileSources=new Map,this.fds=new Map,this.nextFd=0,this.ready=!1,this.readOnly=!1,this.libzip=t.libzip;const r=t;if(this.level=void 0!==r.level?r.level:C,null===e&&(e=Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),"string"==typeof e){const{baseFs:t=new c.S}=r;this.baseFs=t,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if("string"==typeof e)try{this.stats=this.baseFs.statSync(e)}catch(e){if("ENOENT"!==e.code||!r.create)throw e;this.stats=d.makeDefaultStats()}else this.stats=d.makeDefaultStats();const A=this.libzip.malloc(4);try{let n=0;if("string"==typeof e&&r.create&&(n|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(n|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(p.cS.fromPortablePath(e),n,A);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,n,A),this.lzSource=t}catch(e){throw this.libzip.source.free(t),e}}if(0===this.zip){const e=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(e,this.libzip.getValue(A,"i32")),this.makeLibzipError(e)}}finally{this.libzip.free(A)}this.listings.set(p.LZ.root,new Set);const n=this.libzip.getNumEntries(this.zip,0);for(let e=0;ee)throw new Error("Overread");const A=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(A)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw h.Vw("archive closed, close");(0,l.L)(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),this.readOnly)return void this.discardAndClose();const e=this.baseFs.existsSync(this.path)?511&this.baseFs.statSync(this.path).mode:null;if(-1===this.libzip.close(this.zip))throw this.makeLibzipError(this.libzip.getError(this.zip));null===e?this.baseFs.chmodSync(this.path,this.stats.mode):e!==(511&this.baseFs.statSync(this.path).mode)&&this.baseFs.chmodSync(this.path,e),this.ready=!1}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return p.y1.resolve(p.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const A=this.nextFd++;return this.fds.set(A,{cursor:0,p:e}),A}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,t){return this.opendirSync(e,t)}opendirSync(e,t={}){const r=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`opendir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`opendir '${e}'`);const n=[...A],o=this.openSync(r,"r");return(0,g.a)(this,r,n,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,t,r,A,n){return this.readSync(e,t,r,A,n)}readSync(e,t,r=0,A=0,n=-1){const o=this.fds.get(e);if(void 0===o)throw h.Ch("read");let i;i=-1===n||null===n?o.cursor:n;const s=this.readFileSync(o.p);s.copy(t,r,i,i+A);const a=Math.max(0,Math.min(s.length-i,A));return-1!==n&&null!==n||(o.cursor+=a),a}async writePromise(e,t,r,A,n){return"string"==typeof t?this.writeSync(e,t,n):this.writeSync(e,t,r,A,n)}writeSync(e,t,r,A,n){if(void 0===this.fds.get(e))throw h.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw h.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=this.openSync(e,"r"),A=Object.assign(new n.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(e,t)=>{clearImmediate(o),this.closeSync(r),t(e)}}),{close(){A.destroy()},bytesRead:0,path:e}),o=setImmediate(async()=>{try{const r=await this.readFilePromise(e,t);A.bytesRead=r.length,A.end(r)}catch(e){A.destroy(e)}});return A}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw h.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=[],A=this.openSync(e,"w"),o=Object.assign(new n.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(n,o)=>{try{n?o(n):(this.writeFileSync(e,Buffer.concat(r),t),o(null))}catch(e){o(e)}finally{this.closeSync(A)}}}),{bytesWritten:0,path:e,close(){o.destroy()}});return o.on("data",e=>{const t=Buffer.from(e);o.bytesWritten+=t.length,r.push(t)}),o}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){const t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw h.Vw(`archive closed, existsSync '${e}'`);if(0===this.symlinkCount){const t=p.y1.resolve(p.LZ.root,e);return this.entries.has(t)||this.listings.has(t)}let t;try{t=this.resolveFilename(`stat '${e}'`,e)}catch(e){return!1}return this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=A.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`access '${e}'`);if(this.readOnly&&t&A.constants.W_OK)throw h.YW(`access '${e}'`)}async statPromise(e){return this.statSync(e)}statSync(e){const t=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`stat '${e}'`);return this.statImpl(`stat '${e}'`,t)}async lstatPromise(e){return this.lstatSync(e)}lstatSync(e){const t=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,t)}statImpl(e,t){const r=this.entries.get(t);if(void 0!==r){const e=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,r,0,0,e))throw this.makeLibzipError(this.libzip.getError(this.zip));const A=this.stats.uid,n=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,i=512,s=Math.ceil(o/i),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,g=a,l=a,h=new Date(c),p=new Date(g),C=new Date(l),f=new Date(a),I=this.listings.has(t)?u.QB:this.isSymbolicLink(r)?u.Zv:u.Pe,E=I===u.QB?493:420,B=I|511&this.getUnixMode(r,E);return Object.assign(new d.StatEntry,{uid:A,gid:n,size:o,blksize:i,blocks:s,atime:h,birthtime:p,ctime:C,mtime:f,atimeMs:c,birthtimeMs:g,ctimeMs:l,mtimeMs:a,mode:B})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,A=512,n=0,o=this.stats.mtimeMs,i=this.stats.mtimeMs,s=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),g=new Date(i),l=new Date(s),h=new Date(a),p=493|u.QB;return Object.assign(new d.StatEntry,{uid:e,gid:t,size:r,blksize:A,blocks:n,atime:c,birthtime:g,ctime:l,mtime:h,atimeMs:o,birthtimeMs:i,ctimeMs:s,mtimeMs:a,mode:p})}throw new Error("Unreachable")}getUnixMode(e,t){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;const r=this.registerListing(p.y1.dirname(e));return t=new Set,r.add(p.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(p.y1.dirname(e)).add(p.y1.basename(e)),this.entries.set(e,t)}unregisterListing(e){this.listings.delete(e);const t=this.listings.get(p.y1.dirname(e));null==t||t.delete(p.y1.basename(e))}unregisterEntry(e){this.unregisterListing(e);const t=this.entries.get(e);this.entries.delete(e),void 0!==t&&(this.fileSources.delete(t),this.isSymbolicLink(t)&&this.symlinkCount--)}deleteEntry(e,t){this.unregisterEntry(e);if(-1===this.libzip.delete(this.zip,t))throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,t,r=!0){if(!this.ready)throw h.Vw("archive closed, "+e);let A=p.y1.resolve(p.LZ.root,t);if("/"===A)return p.LZ.root;const n=this.entries.get(A);if(r&&void 0!==n){if(0!==this.symlinkCount&&this.isSymbolicLink(n)){const t=this.getFileSource(n).toString();return this.resolveFilename(e,p.y1.resolve(p.y1.dirname(A),t),!0)}return A}for(;;){const t=this.resolveFilename(e,p.y1.dirname(A),!0),n=this.listings.has(t),o=this.entries.has(t);if(!n&&!o)throw h.z6(e);if(!n)throw h.Ab(e);if(A=p.y1.resolve(t,p.y1.basename(A)),!r||0===this.symlinkCount)break;const i=this.libzip.name.locate(this.zip,A.slice(1));if(-1===i)break;if(!this.isSymbolicLink(i))break;{const e=this.getFileSource(i).toString();A=p.y1.resolve(p.y1.dirname(A),e)}}return A}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));const t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){const t=this.libzip.struct.errorS(),{buffer:r,byteLength:A}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(r,A,0,!0,t);if(0===n)throw this.libzip.free(t),this.makeLibzipError(t);return n}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),A=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===A)throw this.libzip.free(t),this.makeLibzipError(this.libzip.getError(this.zip));return A}setFileSource(e,t){const r=Buffer.isBuffer(t)?t:Buffer.from(t),A=p.y1.relative(p.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,A,n,this.libzip.ZIP_FL_OVERWRITE);if(-1===e)throw this.makeLibzipError(this.libzip.getError(this.zip));if("mixed"!==this.level){let t;t=0===this.level?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(-1===this.libzip.file.setCompression(this.zip,e,0,t,this.level))throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(e,r),e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(0===this.symlinkCount)return!1;if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&u.wK)===u.Zv}getFileSource(e,t={asyncDecompress:!1}){const r=this.fileSources.get(e);if(void 0!==r)return r;const A=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,A))throw this.makeLibzipError(this.libzip.getError(this.zip));const n=this.libzip.struct.statCompSize(A),o=this.libzip.struct.statCompMethod(A),i=this.libzip.malloc(n);try{const r=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(0===r)throw this.makeLibzipError(this.libzip.getError(this.zip));try{const A=this.libzip.fread(r,i,n,0);if(-1===A)throw this.makeLibzipError(this.libzip.file.getError(r));if(An)throw new Error("Overread");const a=this.libzip.HEAPU8.subarray(i,i+n),c=Buffer.from(a);if(0===o)return this.fileSources.set(e,c),c;if(t.asyncDecompress)return new Promise((t,r)=>{s().inflateRaw(c,(A,n)=>{A?r(A):(this.fileSources.set(e,n),t(n))})});{const t=s().inflateRawSync(c);return this.fileSources.set(e,t),t}}finally{this.libzip.fclose(r)}}finally{this.libzip.free(i)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw h.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),A=this.entries.get(r);if(void 0===A)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const n=-512&this.getUnixMode(A,0|u.Pe)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,n<<16))throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,t,r){return this.chownSync(e,t,r)}chownSync(e,t,r){throw new Error("Unimplemented")}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=await this.getFileSource(A,{asyncDecompress:!0}),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}copyFileSync(e,t,r=0){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=this.getFileSource(A),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}prepareCopyFile(e,t,r=0){if(this.readOnly)throw h.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw h.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const n=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(n);if(void 0===o)throw h.hq(`copyfile '${e}' -> '${t}'`);const i=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),s=this.entries.get(i);if(0!=(r&(A.constants.COPYFILE_EXCL|A.constants.COPYFILE_FICLONE_FORCE))&&void 0!==s)throw h.cT(`copyfile '${e}' -> '${t}'`);return{indexSource:o,resolvedDestP:i,indexDest:s}}async appendFilePromise(e,t,r){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFilePromise(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFileSync(e,t,r)}async writeFilePromise(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([await this.getFileSource(n,{asyncDecompress:!0}),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}writeFileSync(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(n),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}prepareWriteFile(e,t){if("string"!=typeof e)throw h.Ch("read");if(this.readOnly)throw h.YW(`open '${e}'`);const r=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(r))throw h.GA(`open '${e}'`);let A=null;"string"==typeof t?A=t:"object"==typeof t&&t.encoding&&(A=t.encoding);return{encoding:A,resolvedP:r,index:this.entries.get(r)}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw h.YW(`unlink '${e}'`);const t=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(t))throw h.GA(`unlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw h.hq(`unlink '${e}'`);this.deleteEntry(t,r)}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw h.YW(`utimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(A,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw h.YW(`lutimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(A,r)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));const r=this.entries.get(e);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.setMtime(this.zip,r,0,function(e){if("string"==typeof e&&String(+e)===e)return+e;if(Number.isFinite(e))return e<0?Date.now()/1e3:e;if((0,o.isDate)(e))return e.getTime()/1e3;throw new Error("Invalid time")}(t),0))throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:r=!1}={}){if(r)return void this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw h.YW(`mkdir '${e}'`);const A=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(A)||this.listings.has(A))throw h.cT(`mkdir '${e}'`);this.hydrateDirectory(A),this.chmodSync(A,t)}async rmdirPromise(e,t){return this.rmdirSync(e,t)}rmdirSync(e,{recursive:t=!1}={}){if(this.readOnly)throw h.YW(`rmdir '${e}'`);if(t)return void this.removeSync(e);const r=this.resolveFilename(`rmdir '${e}'`,e),A=this.listings.get(r);if(!A)throw h.Ab(`rmdir '${e}'`);if(A.size>0)throw h.re(`rmdir '${e}'`);const n=this.entries.get(r);if(void 0===n)throw h.hq(`rmdir '${e}'`);this.deleteEntry(e,n)}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,p.y1.relative(p.LZ.root,e));if(-1===t)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,t),t}async linkPromise(e,t){return this.linkSync(e,t)}linkSync(e,t){throw h.Hs(`link '${e}' -> '${t}'`)}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw h.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw h.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw h.cT(`symlink '${e}' -> '${t}'`);const A=this.setFileSource(r,e);this.registerEntry(r,A);if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,(511|u.Zv)<<16))throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=await this.readFileBuffer(e,{asyncDecompress:!0});return t?r.toString(t):r}readFileSync(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.readFileBuffer(e);return t?r.toString(t):r}readFileBuffer(e,t={asyncDecompress:!1}){if("string"!=typeof e)throw h.Ch("read");const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw h.Ab(`open '${e}'`);if(this.listings.has(r))throw h.GA("read");const A=this.entries.get(r);if(void 0===A)throw new Error("Unreachable");return this.getFileSource(A,t)}async readdirPromise(e,{withFileTypes:t}={}){return this.readdirSync(e,{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){const r=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`scandir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`scandir '${e}'`);const n=[...A];return t?n.map(t=>Object.assign(this.statImpl("lstat",p.y1.join(e,t)),{name:t})):n}async readlinkPromise(e){const t=this.prepareReadlink(e);return(await this.getFileSource(t,{asyncDecompress:!0})).toString()}readlinkSync(e){const t=this.prepareReadlink(e);return this.getFileSource(t).toString()}prepareReadlink(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`open '${e}'`);if(this.listings.has(t))throw h.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(!this.isSymbolicLink(r))throw h.hq(`readlink '${e}'`);return r}async truncatePromise(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=await this.getFileSource(A,{asyncDecompress:!0}),o=Buffer.alloc(t,0);return n.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=this.getFileSource(A),o=Buffer.alloc(t,0);return n.copy(o),this.writeFileSync(e,o)}watch(e,t,r){let A;switch(typeof t){case"function":case"string":case"undefined":A=!0;break;default:({persistent:A=!0}=t)}if(!A)return{on:()=>{},close:()=>{}};const n=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(n)}}}watchFile(e,t,r){const A=this.resolveFilename(`open '${e}'`,e);return(0,l._x)(this,A,t,r)}unwatchFile(e,t){const r=this.resolveFilename(`open '${e}'`,e);return(0,l.nd)(this,r,t)}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var A=r(35747),n=r(5944),o=r(78420),i=r(90739),s=r(38783),a=r(46009);const c=2147483648,g=/.*?(?await this.baseFs.openPromise(e,t,r),async(e,{subPath:A})=>this.remapFd(e,await e.openPromise(A,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:A})=>this.remapFd(e,e.openSync(A,t,r)))}async opendirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,t),async(e,{subPath:r})=>await e.opendirPromise(r,t),{requireSubpath:!1})}opendirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,t),(e,{subPath:r})=>e.opendirSync(r,t),{requireSubpath:!1})}async readPromise(e,t,r,A,n){if(0==(e&c))return await this.baseFs.readPromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return await i.readPromise(s,t,r,A,n)}readSync(e,t,r,A,n){if(0==(e&c))return this.baseFs.readSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return i.readSync(s,t,r,A,n)}async writePromise(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?await i.writePromise(s,t,r):await i.writePromise(s,t,r,A,n)}writeSync(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?i.writeSync(s,t,r):i.writeSync(s,t,r,A,n)}async closePromise(e){if(0==(e&c))return await this.baseFs.closePromise(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return await r.closePromise(A)}closeSync(e){if(0==(e&c))return this.baseFs.closeSync(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return r.closeSync(A)}createReadStream(e,t){return null===e?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(e,{subPath:r})=>e.createReadStream(r,t))}createWriteStream(e,t){return null===e?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(e,{subPath:r})=>e.createWriteStream(r,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=await this.baseFs.realpathPromise(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,await e.realpathPromise(r)))})}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=this.baseFs.realpathSync(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,e.realpathSync(r)))})}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(e,{subPath:t})=>await e.existsPromise(t))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(e,{subPath:t})=>e.existsSync(t))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(e,{subPath:r})=>await e.accessPromise(r,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(e,{subPath:r})=>e.accessSync(r,t))}async statPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e),async(e,{subPath:t})=>await e.statPromise(t))}statSync(e){return this.makeCallSync(e,()=>this.baseFs.statSync(e),(e,{subPath:t})=>e.statSync(t))}async lstatPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e),async(e,{subPath:t})=>await e.lstatPromise(t))}lstatSync(e){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e),(e,{subPath:t})=>e.lstatSync(t))}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(e,{subPath:r})=>await e.chmodPromise(r,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(e,{subPath:r})=>e.chmodSync(r,t))}async chownPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,t,r),async(e,{subPath:A})=>await e.chownPromise(A,t,r))}chownSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,t,r),(e,{subPath:A})=>e.chownSync(A,t,r))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(e,{subPath:r})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,A)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(e,{subPath:r})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,A)}))}async copyFilePromise(e,t,r=0){const n=async(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await n.writeFilePromise(o,i)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await n(this.baseFs,e,t,r)),async(e,{subPath:A})=>await this.makeCallPromise(t,async()=>await n(e,A,this.baseFs,t),async(t,{subPath:o})=>e!==t?await n(e,A,t,o):await e.copyFilePromise(A,o,r)))}copyFileSync(e,t,r=0){const n=(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}n.writeFileSync(o,i)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>n(this.baseFs,e,t,r)),(e,{subPath:A})=>this.makeCallSync(t,()=>n(e,A,this.baseFs,t),(t,{subPath:o})=>e!==t?n(e,A,t,o):e.copyFileSync(A,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:A})=>await e.appendFilePromise(A,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:A})=>e.appendFileSync(A,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:A})=>await e.writeFilePromise(A,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:A})=>e.writeFileSync(A,t,r))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(e,{subPath:t})=>await e.unlinkPromise(t))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(e,{subPath:t})=>e.unlinkSync(t))}async utimesPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,r),async(e,{subPath:A})=>await e.utimesPromise(A,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:A})=>e.utimesSync(A,t,r))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(e,{subPath:r})=>await e.mkdirPromise(r,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(e,{subPath:r})=>e.mkdirSync(r,t))}async rmdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,t),async(e,{subPath:r})=>await e.rmdirPromise(r,t))}rmdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,t),(e,{subPath:r})=>e.rmdirSync(r,t))}async linkPromise(e,t){return await this.makeCallPromise(t,async()=>await this.baseFs.linkPromise(e,t),async(t,{subPath:r})=>await t.linkPromise(e,r))}linkSync(e,t){return this.makeCallSync(t,()=>this.baseFs.linkSync(e,t),(t,{subPath:r})=>t.linkSync(e,r))}async symlinkPromise(e,t,r){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,r),async(t,{subPath:r})=>await t.symlinkPromise(e,r))}symlinkSync(e,t,r){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,r),(t,{subPath:r})=>t.symlinkSync(e,r))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":default:return await this.baseFs.readFilePromise(e,t)}},async(e,{subPath:r})=>await e.readFilePromise(r,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":default:return this.baseFs.readFileSync(e,t)}},(e,{subPath:r})=>e.readFileSync(r,t))}async readdirPromise(e,{withFileTypes:t}={}){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,{withFileTypes:t}),async(e,{subPath:r})=>await e.readdirPromise(r,{withFileTypes:t}),{requireSubpath:!1})}readdirSync(e,{withFileTypes:t}={}){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,{withFileTypes:t}),(e,{subPath:r})=>e.readdirSync(r,{withFileTypes:t}),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(e,{subPath:t})=>await e.readlinkPromise(t))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(e,{subPath:t})=>e.readlinkSync(t))}async truncatePromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,t),async(e,{subPath:r})=>await e.truncatePromise(r,t))}truncateSync(e,t){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,t),(e,{subPath:r})=>e.truncateSync(r,t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:A})=>e.watch(A,t,r))}watchFile(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,t,r),()=>(0,s._x)(this,e,t,r))}unwatchFile(e,t){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,t),()=>(0,s.nd)(this,e,t))}async makeCallPromise(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return await t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?t():this.getZipSync(o.archivePath,e=>r(e,o)):t()}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){const r=g.exec(e.substr(t.length));if(!r)return null;if(t=this.pathUtils.join(t,r[0]),!1===this.isZip.has(t)){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch(e){return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.join(a.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;const t=Date.now();let r=t+this.maxAge,A=null===e?0:this.zipInstances.size-e;for(const[n,{zipFs:o,expiresAt:i,refCount:s}]of this.zipInstances.entries())if(0===s&&!o.hasOpenFileHandles())if(t>=i)o.saveAndClose(),this.zipInstances.delete(n),A-=1;else{if(null===e||A<=0){r=i;break}o.saveAndClose(),this.zipInstances.delete(n),A-=1}null===this.limitOpenFilesTimeout&&(null===e&&this.zipInstances.size>0||null!==e)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},r-t).unref())}async getZipPromise(e,t){const r=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let A=this.zipInstances.get(e);if(!A){const t=await r();A=this.zipInstances.get(e),A||(A={zipFs:new i.d(e,t),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,A.refCount+=1;try{return await t(A.zipFs)}finally{A.refCount-=1}}else{const A=new i.d(e,await r());try{return await t(A)}finally{A.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let A=this.zipInstances.get(e);return A||(A={zipFs:new i.d(e,r()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,t(A.zipFs)}{const A=new i.d(e,r());try{return t(A)}finally{A.saveAndClose()}}}}},19697:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});var A=r(26984);class n{constructor(e,t,r={}){this.path=e,this.nextDirent=t,this.opts=r,this.closed=!1}throwIfClosed(){if(this.closed)throw A.Xh()}async*[Symbol.asyncIterator](){try{let e;for(;null!==(e=await this.read());)yield e}finally{await this.close()}}read(e){const t=this.readSync();return void 0!==e?e(null,t):Promise.resolve(t)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),void 0!==e?e(null):Promise.resolve()}closeSync(){var e,t;this.throwIfClosed(),null===(t=(e=this.opts).onClose)||void 0===t||t.call(e),this.closed=!0}}function o(e,t,r,A){return new n(t,()=>{const A=r.shift();return void 0===A?null:Object.assign(e.statSync(e.pathUtils.join(t,A)),{name:A})},A)}},38783:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,nd:()=>l,_x:()=>g});var A,n,o=r(28614),i=r(65760);function s(e,t){if(e!==t)throw new Error(`Invalid StatWatcher status: expected '${t}', got '${e}'`)}!function(e){e.Change="change",e.Stop="stop"}(A||(A={})),function(e){e.Ready="ready",e.Running="running",e.Stopped="stopped"}(n||(n={}));class a extends o.EventEmitter{constructor(e,t,{bigint:r=!1}={}){super(),this.status=n.Ready,this.changeListeners=new Map,this.startTimeout=null,this.fakeFs=e,this.path=t,this.bigint=r,this.lastStats=this.stat()}static create(e,t,r){const A=new a(e,t,r);return A.start(),A}start(){s(this.status,n.Ready),this.status=n.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(A.Change,this.lastStats,this.lastStats)},3)}stop(){s(this.status,n.Running),this.status=n.Stopped,null!==this.startTimeout&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(A.Stop)}stat(){try{return this.fakeFs.statSync(this.path)}catch(e){if("ENOENT"===e.code)return i.makeEmptyStats();throw e}}makeInterval(e){const t=setInterval(()=>{const e=this.stat(),t=this.lastStats;i.areStatsEqual(e,t)||(this.lastStats=e,this.emit(A.Change,e,t))},e.interval);return e.persistent?t:t.unref()}registerChangeListener(e,t){this.addListener(A.Change,e),this.changeListeners.set(e,this.makeInterval(t))}unregisterChangeListener(e){this.removeListener(A.Change,e);const t=this.changeListeners.get(e);void 0!==t&&clearInterval(t),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(const e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(const e of this.changeListeners.values())e.ref();return this}unref(){for(const e of this.changeListeners.values())e.unref();return this}}const c=new WeakMap;function g(e,t,r,A){let n,o,i,s;switch(typeof r){case"function":n=!1,o=!0,i=5007,s=r;break;default:({bigint:n=!1,persistent:o=!0,interval:i=5007}=r),s=A}let g=c.get(e);void 0===g&&c.set(e,g=new Map);let l=g.get(t);return void 0===l&&(l=a.create(e,t,{bigint:n}),g.set(t,l)),l.registerChangeListener(s,{persistent:o,interval:i}),l}function l(e,t,r){const A=c.get(e);if(void 0===A)return;const n=A.get(t);void 0!==n&&(void 0===r?n.unregisterAllChangeListeners():n.unregisterChangeListener(r),n.hasChangeListeners()||(n.stop(),A.delete(t)))}function u(e){const t=c.get(e);if(void 0!==t)for(const r of t.keys())l(e,r)}},22004:(e,t,r)=>{"use strict";r.d(t,{wK:()=>A,QB:()=>n,Pe:()=>o,Zv:()=>i});const A=61440,n=16384,o=32768,i=40960},26984:(e,t,r)=>{"use strict";function A(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n(e){return A("EBUSY",e)}function o(e,t){return A("ENOSYS",`${e}, ${t}`)}function i(e){return A("EINVAL","invalid argument, "+e)}function s(e){return A("EBADF","bad file descriptor, "+e)}function a(e){return A("ENOENT","no such file or directory, "+e)}function c(e){return A("ENOTDIR","not a directory, "+e)}function g(e){return A("EISDIR","illegal operation on a directory, "+e)}function l(e){return A("EEXIST","file already exists, "+e)}function u(e){return A("EROFS","read-only filesystem, "+e)}function h(e){return A("ENOTEMPTY","directory not empty, "+e)}function p(e){return A("EOPNOTSUPP","operation not supported, "+e)}function d(){return A("ERR_DIR_CLOSED","Directory handle was closed")}r.d(t,{Vw:()=>n,bk:()=>o,hq:()=>i,Ch:()=>s,z6:()=>a,Ab:()=>c,GA:()=>g,cT:()=>l,YW:()=>u,re:()=>h,Hs:()=>p,Xh:()=>d,Yn:()=>C});class C extends Error{constructor(e,t){super(e),this.name="Libzip Error",this.code=t}}},43896:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AliasFS:()=>u.K,CwdFS:()=>h.M,DEFAULT_COMPRESSION_LEVEL:()=>l.k,FakeFS:()=>g.uY,Filename:()=>s.QS,JailFS:()=>p.n,LazyFS:()=>d.v,NoFS:()=>f,NodeFS:()=>i.S,PortablePath:()=>s.LZ,PosixFS:()=>I.i,ProxiedFS:()=>E.p,VirtualFS:()=>B.p,ZipFS:()=>l.d,ZipOpenFS:()=>y.A,extendFs:()=>Q,normalizeLineEndings:()=>g.qH,npath:()=>s.cS,opendir:()=>c.a,patchFs:()=>w,ppath:()=>s.y1,statUtils:()=>a,toFilename:()=>s.Zu,xfs:()=>S});var A=r(12087),n=r.n(A),o=r(31669),i=r(78420),s=r(46009),a=r(65760),c=r(19697),g=r(5944),l=r(90739),u=r(14626),h=r(75448),p=r(10489),d=r(15037);const C=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class f extends g.uY{constructor(){super(s.y1)}getExtractHint(){throw C()}getRealPath(){throw C()}resolve(){throw C()}async openPromise(){throw C()}openSync(){throw C()}async opendirPromise(){throw C()}opendirSync(){throw C()}async readPromise(){throw C()}readSync(){throw C()}async writePromise(){throw C()}writeSync(){throw C()}async closePromise(){throw C()}closeSync(){throw C()}createWriteStream(){throw C()}createReadStream(){throw C()}async realpathPromise(){throw C()}realpathSync(){throw C()}async readdirPromise(){throw C()}readdirSync(){throw C()}async existsPromise(e){throw C()}existsSync(e){throw C()}async accessPromise(){throw C()}accessSync(){throw C()}async statPromise(){throw C()}statSync(){throw C()}async lstatPromise(e){throw C()}lstatSync(e){throw C()}async chmodPromise(){throw C()}chmodSync(){throw C()}async chownPromise(){throw C()}chownSync(){throw C()}async mkdirPromise(){throw C()}mkdirSync(){throw C()}async rmdirPromise(){throw C()}rmdirSync(){throw C()}async linkPromise(){throw C()}linkSync(){throw C()}async symlinkPromise(){throw C()}symlinkSync(){throw C()}async renamePromise(){throw C()}renameSync(){throw C()}async copyFilePromise(){throw C()}copyFileSync(){throw C()}async appendFilePromise(){throw C()}appendFileSync(){throw C()}async writeFilePromise(){throw C()}writeFileSync(){throw C()}async unlinkPromise(){throw C()}unlinkSync(){throw C()}async utimesPromise(){throw C()}utimesSync(){throw C()}async readFilePromise(){throw C()}readFileSync(){throw C()}async readlinkPromise(){throw C()}readlinkSync(){throw C()}async truncatePromise(){throw C()}truncateSync(){throw C()}watch(){throw C()}watchFile(){throw C()}unwatchFile(){throw C()}}f.instance=new f;var I=r(39725),E=r(42096),B=r(17674),y=r(53660);function m(e){const t=s.cS.toPortablePath(n().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return s.y1.join(t,`${e}${r}`)}function w(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),A=new Set(["accessPromise","appendFilePromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),n=new Set(["appendFilePromise","chmodPromise","chownPromise","closePromise","readPromise","readFilePromise","statPromise","truncatePromise","utimesPromise","writePromise","writeFilePromise"]),i=(e,t,r)=>{const A=e[t];e[t]=r,void 0!==(null==A?void 0:A[o.promisify.custom])&&(r[o.promisify.custom]=A[o.promisify.custom])};i(e,"exists",(e,...r)=>{const A="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{A(e)},()=>{A(!1)})})}),i(e,"read",(e,r,...A)=>{const n="function"==typeof A[A.length-1]?A.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...A).then(e=>{n(null,e,r)},e=>{n(e)})})});for(const r of A){const A=r.replace(/Promise$/,"");if(void 0===e[A])continue;const n=t[r];if(void 0===n)continue;i(e,A,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{n.apply(t,e).then(e=>{r(null,e)},e=>{r(e)})})})}e.realpath.native=e.realpath,i(e,"existsSync",e=>{try{return t.existsSync(e)}catch(e){return!1}});for(const A of r){const r=A;if(void 0===e[r])continue;const n=t[A];void 0!==n&&i(e,r,n.bind(t))}e.realpathSync.native=e.realpathSync;{const r=process.emitWarning;let o;process.emitWarning=()=>{};try{o=e.promises}finally{process.emitWarning=r}if(void 0!==o){for(const e of A){const r=e.replace(/Promise$/,"");if(void 0===o[r])continue;const A=t[e];void 0!==A&&("open"!==e&&i(o,r,A.bind(t)))}class e{constructor(e){this.fd=e}}for(const r of n){const A=r.replace(/Promise$/,""),n=t[r];void 0!==n&&i(e.prototype,A,(function(...e){return n.call(t,this.fd,...e)}))}i(o,"open",async(...r)=>{const A=await t.openPromise(...r);return new e(A)})}}e.read[o.promisify.custom]=async(e,r,...A)=>{const n=t.readPromise(e,r,...A);return{bytesRead:await n,buffer:r}}}function Q(e,t){const r=Object.create(e);return w(r,t),r}const D=new Set;let b=!1;function v(){b||(b=!0,process.once("exit",()=>{S.rmtempSync()}))}const S=Object.assign(new i.S,{detachTemp(e){D.delete(e)},mktempSync(e){for(v();;){const t=m("xfs-");try{this.mkdirSync(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=this.realpathSync(t);if(D.add(r),void 0===e)return t;try{return e(r)}finally{if(D.has(r)){D.delete(r);try{this.removeSync(r)}catch(e){}}}}},async mktempPromise(e){for(v();;){const t=m("xfs-");try{await this.mkdirPromise(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=await this.realpathPromise(t);if(D.add(r),void 0===e)return r;try{return await e(r)}finally{if(D.has(r)){D.delete(r);try{await this.removePromise(r)}catch(e){}}}}},async rmtempPromise(){await Promise.all(Array.from(D.values()).map(async e=>{try{await S.removePromise(e,{maxRetries:0}),D.delete(e)}catch(e){}}))},rmtempSync(){for(const e of D)try{S.removeSync(e),D.delete(e)}catch(e){}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>i,QS:()=>s,cS:()=>a,y1:()=>c,CI:()=>f,Zu:()=>I});var A,n=r(85622),o=r.n(n);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(A||(A={}));const i={root:"/",dot:"."},s={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",pnpJs:".pnp.js",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>C(process.cwd()),c.resolve=(...e)=>e.length>0&&c.isAbsolute(e[0])?o().posix.resolve(...e):o().posix.resolve(c.cwd(),...e);const g=function(e,t,r){return(t=e.normalize(t))===(r=e.normalize(r))?".":(t.endsWith(e.sep)||(t+=e.sep),r.startsWith(t)?r.slice(t.length):null)};a.fromPortablePath=d,a.toPortablePath=C,a.contains=(e,t)=>g(a,e,t),c.contains=(e,t)=>g(c,e,t);const l=/^([a-zA-Z]:.*)$/,u=/^\\\\(\.\\)?(.*)$/,h=/^\/([a-zA-Z]:.*)$/,p=/^\/unc\/(\.dot\/)?(.*)$/;function d(e){if("win32"!==process.platform)return e;if(e.match(h))e=e.replace(h,"$1");else{if(!e.match(p))return e;e=e.replace(p,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function C(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(u)&&(e=e.replace(u,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function f(e,t){return e===a?d(t):C(t)}function I(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},65760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DirEntry:()=>n,StatEntry:()=>o,makeDefaultStats:()=>i,makeEmptyStats:()=>s,areStatsEqual:()=>a});var A=r(22004);class n{constructor(){this.name="",this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}class o{constructor(){this.dev=0,this.ino=0,this.mode=0,this.nlink=1,this.rdev=0,this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}function i(){return Object.assign(new o,{uid:0,gid:0,size:0,blksize:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date(0),mtime:new Date(0),ctime:new Date(0),birthtime:new Date(0),mode:420|A.Pe})}function s(){return Object.assign(i(),{nlink:0,blocks:0,mode:0})}function a(e,t){return e.atimeMs===t.atimeMs&&(e.birthtimeMs===t.birthtimeMs&&(e.blksize===t.blksize&&(e.blocks===t.blocks&&(e.ctimeMs===t.ctimeMs&&(e.dev===t.dev&&(e.gid===t.gid&&(e.ino===t.ino&&(e.isBlockDevice()===t.isBlockDevice()&&(e.isCharacterDevice()===t.isCharacterDevice()&&(e.isDirectory()===t.isDirectory()&&(e.isFIFO()===t.isFIFO()&&(e.isFile()===t.isFile()&&(e.isSocket()===t.isSocket()&&(e.isSymbolicLink()===t.isSymbolicLink()&&(e.mode===t.mode&&(e.mtimeMs===t.mtimeMs&&(e.nlink===t.nlink&&(e.rdev===t.rdev&&(e.size===t.size&&e.uid===t.uid)))))))))))))))))))}},65281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipPromise:()=>s,getLibzipSync:()=>i});const A=["number","number"];var n;!function(e){e[e.ZIP_ER_OK=0]="ZIP_ER_OK",e[e.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",e[e.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",e[e.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",e[e.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",e[e.ZIP_ER_READ=5]="ZIP_ER_READ",e[e.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",e[e.ZIP_ER_CRC=7]="ZIP_ER_CRC",e[e.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",e[e.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",e[e.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",e[e.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",e[e.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",e[e.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",e[e.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",e[e.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",e[e.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",e[e.ZIP_ER_EOF=17]="ZIP_ER_EOF",e[e.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",e[e.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",e[e.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",e[e.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",e[e.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",e[e.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",e[e.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",e[e.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",e[e.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",e[e.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",e[e.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",e[e.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",e[e.ZIP_ER_TELL=30]="ZIP_ER_TELL",e[e.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"}(n||(n={}));let o=null;function i(){var e;return null===o&&(e=r(3368),o={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},errors:n,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint16S:e._malloc(2),uint32S:e._malloc(4),uint64S:e._malloc(8),malloc:e._malloc,free:e._free,getValue:e.getValue,open:e.cwrap("zip_open","number",["string","number","number"]),openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),delete:e.cwrap("zip_delete","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...A,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...A,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...A,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...A,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...A,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...A,"number","number"])},ext:{countSymlinks:e.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...A,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...A,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"]),setMtime:e.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:e.cwrap("zipstruct_stat","number",[]),statS:e.cwrap("zipstruct_statS","number",[]),statName:e.cwrap("zipstruct_stat_name","string",["number"]),statIndex:e.cwrap("zipstruct_stat_index","number",["number"]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:e.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:e.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[]),errorCodeZip:e.cwrap("zipstruct_error_code_zip","number",["number"])}}),o}async function s(){return i()}},11640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseResolution:()=>i,parseShell:()=>n,parseSyml:()=>I,stringifyResolution:()=>s,stringifySyml:()=>d});var A=r(92962);function n(e,t={isGlobPattern:()=>!1}){try{return(0,A.parse)(e,t)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}var o=r(98261);function i(e){const t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,o.parse)(e)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function s(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+="@"+e.from.description),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+="@"+e.descriptor.description),t}var a=r(21194),c=r(85443);const g=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class u{constructor(e){this.data=e}}function h(e){return e.match(g)?e:JSON.stringify(e)}function p(e,t,r){if(null===e)return"null\n";if("number"==typeof e||"boolean"==typeof e)return e.toString()+"\n";if("string"==typeof e)return h(e)+"\n";if(Array.isArray(e)){if(0===e.length)return"[]\n";const r=" ".repeat(t);return"\n"+e.map(e=>`${r}- ${p(e,t+1,!1)}`).join("")}if("object"==typeof e&&e){let A,n;e instanceof u?(A=e.data,n=!1):(A=e,n=!0);const o=" ".repeat(t),i=Object.keys(A);n&&i.sort((e,t)=>{const r=l.indexOf(e),A=l.indexOf(t);return-1===r&&-1===A?et?1:0:-1!==r&&-1===A?-1:-1===r&&-1!==A?1:r-A});const s=i.filter(e=>!function e(t){return void 0===t||"object"==typeof t&&null!==t&&Object.keys(t).every(r=>e(t[r]))}(A[e])).map((e,n)=>{const i=A[e],s=h(e),a=p(i,t+1,!0),c=n>0||r?o:"";return a.startsWith("\n")?`${c}${s}:${a}`:`${c}${s}: ${a}`}).join(0===t?"\n":"")||"\n";return r?"\n"+s:""+s}throw new Error(`Unsupported value type (${e})`)}function d(e){try{const t=p(e,0,!1);return"\n"!==t?t:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}d.PreserveOrdering=u;const C=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function f(e){if(C.test(e))return function(e){return e.endsWith("\n")||(e+="\n"),(0,c.parse)(e)}(e);const t=(0,a.safeLoad)(e,{schema:a.FAILSAFE_SCHEMA});if(null==t)return{};if("object"!=typeof t)throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function I(e){return f(e)}},34432:(e,t,r)=>{"use strict";var A,n;r.d(t,{gY:()=>E,Q$:()=>B,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.DEFAULT="DEFAULT",e.TOP_LEVEL="TOP_LEVEL",e.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",e.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",e.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",e.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",e.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",e.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",e.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",e.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",e.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",e.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"}(n||(n={}));const o={[n.DEFAULT]:{collapsed:!1,next:{"*":n.DEFAULT}},[n.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:n.FALLBACK_EXCLUSION_LIST,packageRegistryData:n.PACKAGE_REGISTRY_DATA,"*":n.DEFAULT}},[n.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":n.FALLBACK_EXCLUSION_ENTRIES}},[n.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":n.FALLBACK_EXCLUSION_DATA}},[n.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":n.DEFAULT}},[n.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_REGISTRY_ENTRIES}},[n.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_STORE_DATA}},[n.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_STORE_ENTRIES}},[n.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_INFORMATION_DATA}},[n.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:n.PACKAGE_DEPENDENCIES,"*":n.DEFAULT}},[n.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":n.PACKAGE_DEPENDENCY}},[n.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":n.DEFAULT}}};function i(e,t,r,A){const{next:n}=o[r];return s(t,n[e]||n["*"],A)}function s(e,t,r){const{collapsed:A}=o[t];return Array.isArray(e)?A?function(e,t,r){let A="";A+="[";for(let n=0,o=e.length;ne(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function g(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:A}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(A)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function u(e){const t=[];for(const[r,A]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:n,packageDependencies:o,packagePeers:i,linkType:s,discardFromLookup:a}]of c(A,([e])=>null===e?"0":"1"+e)){const A=[];null===r||null===t||o.has(r)||A.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))A.push([e,t]);const g=i&&i.size>0?Array.from(i):void 0,l=a||void 0;e.push([t,{packageLocation:n,packageDependencies:A,packagePeers:g,linkType:s,discardFromLookup:l}])}}return t}function h(e){return c(e.blacklistedLocations||[],e=>e)}function p(e){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:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:g(e),fallbackPool:l(e),locationBlacklistData:h(e),packageRegistryData:u(e)}}var d=r(20103),C=r.n(d);function f(e,t){return[e?e+"\n":"","/* eslint-disable */\n\n","try {\n"," Object.freeze({}).detectStrictMode = true;\n","} catch (error) {\n"," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n","}\n","\n","var __non_webpack_module__ = module;\n","\n","function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n",t.replace(/^/gm," "),"}\n","\n",C()()].join("")}function I(e){return JSON.stringify(e,null,2)}function E(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(p(e));return f(e.shebang,t)}function B(e){const t=p(e),r=(A=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(A)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var A;const n=f(e.shebang,r);return{dataFile:I(t),loaderFile:n}}var y=r(35747),m=(r(85622),r(31669)),w=r(46009);var Q,D=r(17674),b=r(32282);!function(e){e.API_ERROR="API_ERROR",e.BLACKLISTED="BLACKLISTED",e.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",e.MISSING_DEPENDENCY="MISSING_DEPENDENCY",e.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",e.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",e.INTERNAL="INTERNAL",e.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",e.UNSUPPORTED="UNSUPPORTED"}(Q||(Q={}));const v=new Set([Q.BLACKLISTED,Q.BUILTIN_NODE_RESOLUTION_FAILED,Q.MISSING_DEPENDENCY,Q.MISSING_PEER_DEPENDENCY,Q.QUALIFIED_PATH_RESOLUTION_FAILED,Q.UNDECLARED_DEPENDENCY]);function S(e,t,r={}){const A=v.has(e)?"MODULE_NOT_FOUND":e,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...n,value:A},pnpCode:{...n,value:e},data:{...n,value:r}})}function k(e){return w.cS.normalize(w.cS.fromPortablePath(e))}function N(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,A=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,i=/^(\/|\.{1,2}(\/|$))/,s=/\/$/,a={name:null,reference:null},c=[],g=new Set;if(!0===e.enableTopLevelFallback&&c.push(a),!1!==t.compatibilityMode)for(const t of["react-scripts","gatsby"]){const r=e.packageRegistry.get(t);if(r)for(const e of r.keys()){if(null===e)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:t,reference:e})}}const{ignorePattern:l,packageRegistry:u,packageLocatorsByLocations:h,packageLocationLengths:p}=e;function d(e,t){return{fn:e,args:t,error:null,result:null}}function C(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(A)){if(A>=2)return(...t)=>{const A=d(e,t);try{return A.result=r(...t)}catch(e){throw A.error=e}finally{console.trace(A)}};if(A>=1)return(...t)=>{try{return r(...t)}catch(r){const A=d(e,t);throw A.error=r,console.trace(A),r}}}return r}function f(e){const t=y(e);if(!t)throw S(Q.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function I(t){if(null===t.name)return!0;for(const r of e.dependencyTreeRoots)if(r.name===t.name&&r.reference===t.reference)return!0;return!1}function E(e,t){return t.endsWith("/")&&(t=w.y1.join(t,"internal.js")),b.Module._resolveFilename(w.cS.fromPortablePath(e),function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(w.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function B(t){if(null===l)return!1;const r=w.y1.contains(e.basePath,t);return null!==r&&!!l.test(r.replace(/\/$/,""))}function y({name:e,reference:t}){const r=u.get(e);if(!r)return null;const A=r.get(t);return A||null}function m(e,t){const r=new Map,A=new Set,n=t=>{const o=JSON.stringify(t.name);if(A.has(o))return;A.add(o);const i=function({name:e,reference:t}){const r=[];for(const[A,n]of u)if(null!==A)for(const[o,i]of n){if(null===o)continue;i.packageDependencies.get(e)===t&&(A===e&&o===t||r.push({name:A,reference:o}))}return r}(t);for(const t of i){if(f(t).packagePeers.has(e))n(t);else{let e=r.get(t.name);void 0===e&&r.set(t.name,e=new Set),e.add(t.reference)}}};n(t);const o=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())o.push({name:e,reference:t});return o}function v(t){if(B(t))return null;let r=(A=w.y1.relative(e.basePath,t),w.cS.toPortablePath(A));var A;r.match(i)||(r="./"+r),t.match(s)&&!r.endsWith("/")&&(r+="/");let n=0;for(;nr.length;)n+=1;for(let e=n;eI(e))?S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e}):S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e})}else void 0===d&&(B=!a&&n.has(A)?I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in ${s.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}):I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}));if(null==d){if(null===C||null===B)throw B||new Error("Assertion failed: Expected an error to have been set");d=C;const e=B.message.replace(/\n.*/g,"");B.message=e,g.has(e)||(g.add(e),process.emitWarning(B))}const y=Array.isArray(d)?{name:d[0],reference:d[1]}:{name:t,reference:d},D=f(y);if(!D.packageLocation)throw S(Q.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${y.name}@${y.reference} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,dependencyLocator:Object.assign({},y)});const b=D.packageLocation;h=o?w.y1.join(b,o):b}else{if(w.y1.isAbsolute(A))h=w.y1.normalize(A);else{if(!i)throw S(Q.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:l,issuer:u});const e=w.y1.resolve(i);h=i.match(s)?w.y1.normalize(w.y1.join(e,A)):w.y1.normalize(w.y1.join(w.y1.dirname(e),A))}v(h)}return w.y1.normalize(h)}function F(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const A=[],n=function e(r,A,{extensions:n}){let o;try{A.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,i;try{o=JSON.parse(t.fakeFs.readFileSync(w.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(i=w.y1.resolve(r,o.main)),i&&i!==r){const t=e(i,A,{extensions:n});if(null!==t)return t}}for(let e=0,o=n.length;e`Rejected candidate: ${k(e)}\n`).join("")}`,{unqualifiedPath:t})}}return{VERSIONS:{std:3,resolveVirtual:1,getAllLocators:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){const e=[];for(const[t,r]of u)for(const A of r.keys())null!==t&&null!==A&&e.push({name:t,reference:A});return e},getPackageInformation:e=>{const t=y(e);if(null===t)return null;const r=w.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>v(w.cS.toPortablePath(e)),resolveToUnqualified:C("resolveToUnqualified",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=N(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveUnqualified:C("resolveUnqualified",(e,t)=>w.cS.fromPortablePath(F(w.cS.toPortablePath(e),t))),resolveRequest:C("resolveRequest",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=function(e,t,{considerBuiltins:r,extensions:A}={}){const n=N(e,t,{considerBuiltins:r});if(null===n)return null;try{return F(n,{extensions:A})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:k(e),issuer:t&&k(t)}),r}}(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveVirtual:C("resolveVirtual",e=>{const t=function(e){const t=w.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(w.cS.toPortablePath(e));return null!==t?w.cS.fromPortablePath(t):null})}}(0,m.promisify)(y.readFile);const F=(e,t,r)=>N(function(e,{basePath:t}){const r=w.cS.toPortablePath(t),A=w.y1.resolve(r),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,o=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:w.y1.join(A,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),i=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,A]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(A.discardFromLookup)continue;const r={name:t,reference:e};i.set(A.packageLocation,r),s.add(A.packageLocation.length)}for(const t of e.locationBlacklistData)i.set(t,null);const a=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),c=new Map(e.fallbackPool);return{basePath:r,dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback,fallbackExclusionList:a,fallbackPool:c,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:i,packageRegistry:o}}(p(e),{basePath:t}),{fakeFs:r,pnpapiResolution:w.cS.join(t,".pnp.js")})},76756:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShellError:()=>c,execute:()=>Z,globUtils:()=>A});var A={};r.r(A),r.d(A,{fastGlobOptions:()=>E,isBraceExpansion:()=>m,isGlobPattern:()=>B,match:()=>y,micromatchOptions:()=>I});var n=r(46009),o=r(78420),i=r(11640),s=r(12087),a=r(92413);class c extends Error{constructor(e){super(e),this.name="ShellError"}}var g=r(43896),l=r(39725),u=r(19347),h=r.n(u),p=r(35747),d=r.n(p),C=r(2401),f=r.n(C);const I={strictBrackets:!0},E={onlyDirectories:!1,onlyFiles:!1};function B(e){if(!f().scan(e,I).isGlob)return!1;try{f().parse(e,I)}catch(e){return!1}return!0}function y(e,{cwd:t,baseFs:r}){return h()(e,{...E,cwd:n.cS.fromPortablePath(t),fs:(0,g.extendFs)(d(),new l.i(r))})}function m(e){return f().scan(e,I).isBrace}var w,Q=r(67566),D=r.n(Q);function b(){}!function(e){e[e.STDIN=0]="STDIN",e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(w||(w={}));let v=0;class S{constructor(e){this.stream=e}close(){}get(){return this.stream}}class k{constructor(){this.stream=null}close(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");return this.stream}}class N{constructor(e,t){this.stdin=null,this.stdout=null,this.stderr=null,this.pipe=null,this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:r,stderr:A}){const n=new N(null,e);return n.stdin=t,n.stdout=r,n.stderr=A,n}pipeTo(e,t=w.STDOUT){const r=new N(this,e),A=new k;return r.pipe=A,r.stdout=this.stdout,r.stderr=this.stderr,(t&w.STDOUT)===w.STDOUT?this.stdout=A:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&w.STDERR)===w.STDERR?this.stderr=A:null!==this.ancestor&&(this.stderr=this.ancestor.stderr),r}async exec(){const e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(null===this.stdin)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t,r;if(null===this.stdout)throw new Error("Assertion failed: No output stream registered");if(t=this.stdout,e[1]=t.get(),null===this.stderr)throw new Error("Assertion failed: No error stream registered");r=this.stderr,e[2]=r.get();const A=this.implementation(e);return this.pipe&&this.pipe.attach(A.stdin),await A.promise.then(e=>(t.close(),r.close(),e))}async run(){const e=[];for(let t=this;t;t=t.ancestor)e.push(t.exec());return(await Promise.all(e))[0]}}function F(e,t){return N.start(e,t)}var K;function M(e,t,r){const A=new a.PassThrough({autoDestroy:!0});switch(e){case w.STDIN:(t&K.Readable)===K.Readable&&r.stdin.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&r.stdin instanceof a.Writable&&A.pipe(r.stdin,{end:!1});break;case w.STDOUT:(t&K.Readable)===K.Readable&&r.stdout.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stdout,{end:!1});break;case w.STDERR:(t&K.Readable)===K.Readable&&r.stderr.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stderr,{end:!1});break;default:throw new c(`Bad file descriptor: "${e}"`)}return A}function R(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}!function(e){e[e.Readable=1]="Readable",e[e.Writable=2]="Writable"}(K||(K={}));const x=new Map([["cd",async([e=(0,s.homedir)(),...t],r,A)=>{const o=n.y1.resolve(A.cwd,n.cS.toPortablePath(e));return(await r.baseFs.statPromise(o)).isDirectory()?(A.cwd=o,0):(A.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(n.cS.fromPortablePath(r.cwd)+"\n"),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,A)=>A.exitCode=parseInt(null!=e?e:A.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const A=r.procedures[e[0]];return await F(A,{stdin:new S(r.stdin),stdout:new S(r.stdout),stderr:new S(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let A=r.stdin,o=r.stdout;const i=r.stderr,s=[],c=[];let g=0;for(;"--"!==e[g];){const A=e[g++],o=Number(e[g++]),i=g+o;for(let o=g;ot.baseFs.createReadStream(n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]))));break;case"<<<":s.push(()=>{const t=new a.PassThrough;return process.nextTick(()=>{t.write(e[o]+"\n"),t.end()}),t});break;case"<&":s.push(()=>M(Number(e[o]),K.Readable,r));break;case">":case">>":{const i=n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]));"/dev/null"===i?c.push(new a.Writable({autoDestroy:!0,emitClose:!0,write(e,t,r){setImmediate(r)}})):c.push(t.baseFs.createWriteStream(i,">>"===A?{flags:"a"}:void 0))}break;case">&":c.push(M(Number(e[o]),K.Writable,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${A}"`)}}if(s.length>0){const e=new a.PassThrough;A=e;const t=r=>{if(r===s.length)e.end();else{const A=s[r]();A.pipe(e,{end:!1}),A.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new a.PassThrough;o=e;for(const t of c)e.pipe(t)}const l=await F(G(e.slice(g+1),t,r),{stdin:new S(A),stdout:new S(o),stderr:new S(i)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),l}]]);async function L(e,t,r){const A=[],n=new a.PassThrough;return n.on("data",e=>A.push(e)),await W(e,t,R(r,{stdout:n})),Buffer.concat(A).toString().replace(/[\r\n]+$/,"")}async function P(e,t,r){const A=e.map(async e=>{const A=await Y(e.args,t,r);return{name:e.name,value:A.join(" ")}});return(await Promise.all(A)).reduce((e,t)=>(e[t.name]=t.value,e),{})}function O(e){return e.match(/[^ \r\n\t]+/g)||[]}async function U(e,t,r,A,n=A){switch(e.name){case"$":A(String(process.pid));break;case"#":A(String(t.args.length));break;case"@":if(e.quoted)for(const e of t.args)n(e);else for(const e of t.args){const t=O(e);for(let e=0;e=0&&ne+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)};async function j(e,t,r){if("number"===e.type){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}if("variable"===e.type){const A=[];await U({...e,quoted:!0},t,r,e=>A.push(e));const n=Number(A.join(" "));return Number.isNaN(n)?j({type:"variable",name:A.join(" ")},t,r):j({type:"number",value:n},t,r)}return T[e.type](await j(e.left,t,r),await j(e.right,t,r))}async function Y(e,t,r){const A=new Map,n=[];let o=[];const i=e=>{o.push(e)},s=()=>{o.length>0&&n.push(o.join("")),o=[]},a=e=>{i(e),s()},g=(e,t)=>{let r=A.get(e);void 0===r&&A.set(e,r=[]),r.push(t)};for(const A of e){let e=!1;switch(A.type){case"redirection":{const e=await Y(A.args,t,r);for(const t of e)g(A.subtype,t)}break;case"argument":for(const n of A.segments)switch(n.type){case"text":i(n.text);break;case"glob":i(n.pattern),e=!0;break;case"shell":{const e=await L(n.shell,t,r);if(n.quoted)i(e);else{const t=O(e);for(let e=0;e0){const e=[];for(const[t,r]of A.entries())e.splice(e.length,0,t,String(r.length),...r);n.splice(0,0,"__ysh_set_redirects",...e,"--")}return n}function G(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const A=n.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:A});const[i,...s]=e;if("command"===i)return function(e,t,r,A){return r=>{const n=r[0]instanceof a.Transform?"pipe":r[0],o=r[1]instanceof a.Transform?"pipe":r[1],i=r[2]instanceof a.Transform?"pipe":r[2],s=D()(e,t,{...A,stdio:[n,o,i]});return 0==v++&&process.on("SIGINT",b),r[0]instanceof a.Transform&&r[0].pipe(s.stdin),r[1]instanceof a.Transform&&s.stdout.pipe(r[1],{end:!1}),r[2]instanceof a.Transform&&s.stderr.pipe(r[2],{end:!1}),{stdin:s.stdin,promise:new Promise(t=>{s.on("error",A=>{switch(0==--v&&process.off("SIGINT",b),A.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCES":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${A.message}\n`),t(1)}}),s.on("exit",e=>{0==--v&&process.off("SIGINT",b),t(null!==e?e:129)})})}}}(s[0],s.slice(1),0,{cwd:A,env:o});const c=t.builtins.get(i);if(void 0===c)throw new Error(`Assertion failed: A builtin should exist for "${i}"`);return function(e){return t=>{const r="pipe"===t[0]?new a.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:A,stderr:n})=>(r.stdin=e,r.stdout=A,r.stderr=n,await c(s,t,r)))}function H(e,t,r){return A=>{const n=new a.PassThrough;return{stdin:n,promise:W(e,t,R(r,{stdin:n}))}}}function J(e,t,r){return A=>({stdin:new a.PassThrough,promise:W(e,t,r)})}function q(e,t,r,A){if(0===t.length)return e;{let n;do{n=String(Math.random())}while(Object.prototype.hasOwnProperty.call(A.procedures,n));return A.procedures={...A.procedures},A.procedures[n]=e,G([...t,"__ysh_run_procedure",n],r,A)}}async function z(e,t,r){let A;const n=e=>{A=e,r.variables["?"]=String(e)},o=async e=>{try{return await async function(e,t,r){let A=e,n=null,o=null;for(;A;){const e=A.then?{...r}:r;let i;switch(A.type){case"command":{const n=await Y(A.args,t,r),o=await P(A.envs,t,r);i=A.envs.length?G(n,t,R(e,{environment:o})):G(n,t,e)}break;case"subshell":{const n=await Y(A.args,t,r);i=q(H(A.subshell,t,e),n,t,e)}break;case"group":{const n=await Y(A.args,t,r);i=q(J(A.group,t,e),n,t,e)}break;case"envs":{const n=await P(A.envs,t,r);e.environment={...e.environment,...n},i=G(["true"],t,e)}}if(void 0===i)throw new Error("Assertion failed: An action should have been generated");if(null===n)o=F(i,{stdin:new S(e.stdin),stdout:new S(e.stdout),stderr:new S(e.stderr)});else{if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":o=o.pipeTo(i,w.STDOUT);break;case"|&":o=o.pipeTo(i,w.STDOUT|w.STDERR)}}A.then?(n=A.then.type,A=A.then.chain):A=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}(e,t,r)}catch(e){if(!(e instanceof c))throw e;return r.stderr.write(e.message+"\n"),1}};for(n(await o(e.chain));e.then;){if(null!==r.exitCode)return r.exitCode;switch(e.then.type){case"&&":0===A&&n(await o(e.then.line.chain));break;case"||":0!==A&&n(await o(e.then.line.chain));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return A}async function W(e,t,r){let A=0;for(const n of e){if(A=await z(n,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(A)}return A}function X(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(e=>V(e));case"arithmetic":return function e(t){switch(t.type){case"variable":return X(t);case"number":return!1;default:return e(t.left)||e(t.right)}}(e.arithmetic);case"shell":return _(e.shell);default:return!1}}function V(e){switch(e.type){case"redirection":return e.args.some(e=>V(e));case"argument":return e.segments.some(e=>X(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function _(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=_(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>V(e)))||t.args.some(e=>V(e))}if(e)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Z(e,t=[],{baseFs:r=new o.S,builtins:s={},cwd:c=n.cS.toPortablePath(process.cwd()),env:g=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:h=process.stderr,variables:p={},glob:d=A}={}){const C={};for(const[e,t]of Object.entries(g))void 0!==t&&(C[e]=t);const f=new Map(x);for(const[e,t]of Object.entries(s))f.set(e,t);null===l&&(l=new a.PassThrough).end();const I=(0,i.parseShell)(e,d);if(!_(I)&&I.length>0&&t.length>0){let e=I[I.length-1];for(;e.then;)e=e.then.line;let r=e.chain;for(;r.then;)r=r.then.chain;"command"===r.type&&(r.args=r.args.concat(t.map(e=>({type:"argument",segments:[{type:"text",text:e}]}))))}return await W(I,{args:t,baseFs:r,builtins:f,initialStdin:l,initialStdout:u,initialStderr:h,glob:d},{cwd:c,environment:C,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:h,variables:Object.assign({},p,{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([["@yarnpkg/cli",r(25413)],["@yarnpkg/core",r(53836)],["@yarnpkg/fslib",r(43896)],["@yarnpkg/libzip",r(65281)],["@yarnpkg/parsers",r(11640)],["@yarnpkg/shell",r(76756)],["clipanion",r(40822)],["semver",r(53887)],["yup",r(15966)],["@yarnpkg/plugin-essentials",r(34777)],["@yarnpkg/plugin-compat",r(44692)],["@yarnpkg/plugin-dlx",r(10189)],["@yarnpkg/plugin-file",r(68023)],["@yarnpkg/plugin-git",r(75641)],["@yarnpkg/plugin-github",r(68126)],["@yarnpkg/plugin-http",r(99148)],["@yarnpkg/plugin-init",r(64314)],["@yarnpkg/plugin-link",r(92994)],["@yarnpkg/plugin-node-modules",r(8375)],["@yarnpkg/plugin-npm",r(14224)],["@yarnpkg/plugin-npm-cli",r(8190)],["@yarnpkg/plugin-pack",r(49881)],["@yarnpkg/plugin-patch",r(29936)],["@yarnpkg/plugin-pnp",r(83228)]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-node-modules","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"])})},29148:(e,t,r)=>{const A=r(74988),n=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,o=new A;e.exports=(e,t=0,r=e.length)=>{if(t<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");const A=r-t;let i="",s=0,a=0;for(;e.length>0;){const r=e.match(n)||[e,e,void 0];let c=o.splitGraphemes(r[1]);const g=Math.min(t-s,c.length);c=c.slice(g);const l=Math.min(A-a,c.length);i+=c.slice(0,l).join(""),s+=g,a+=l,void 0!==r[2]&&(i+=r[2]),e=e.slice(r[0].length)}return i}},72912:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},19228:(e,t,r)=>{var A=r(54694);function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==A(e)&&"function"!=typeof e)return{default:e};var t=n();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}},74943:e=>{e.exports=function(e,t){if(null==e)return{};var r,A,n={},o=Object.keys(e);for(A=0;A=0||(n[r]=e[r]);return n}},62407:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},54694:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync,readdir:A.readdir,readdirSync:A.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},79774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=process.versions.node.split("."),A=parseInt(r[0],10),n=parseInt(r[1],10),o=A>10,i=10===A&&n>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||i},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(31020),n=r(35516),o=r(38844);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.scandir=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.scandirSync=function(e,t){const r=i(t);return n.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(69078),o=r(79774),i=r(65225);function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(A,o)=>{if(null!==A)return c(r,A);const s=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return g(r,s);const a=s.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(A,n)=>null!==A?t.throwErrorOnBrokenSymbolicLink?r(A):r(null,e):(e.dirent=i.fs.createDirentFromStats(e.name,n),r(null,e)))}}(e,t));n(a,(e,t)=>{if(null!==e)return c(r,e);g(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,s)=>{if(null!==o)return c(r,o);const a=s.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>A.stat(e,t.fsStatSettings,r));n(l,(e,A)=>{if(null!==e)return c(r,e);const n=[];s.forEach((e,r)=>{const o=A[r],s={name:e,path:a[r],dirent:i.fs.createDirentFromStats(e,o)};t.stats&&(s.stats=o),n.push(s)}),g(r,n)})})}function c(e,t){e(t)}function g(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):a(e,t,r)},t.readdirWithFileTypes=s,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(79774),o=r(65225);function i(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const A={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(A.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(A.path);A.dirent=o.fs.createDirentFromStats(A.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return A})}function s(e,t){return t.fs.readdirSync(e).map(r=>{const n=`${e}${t.pathSegmentSeparator}${r}`,i=A.statSync(n,t.fsStatSettings),s={name:r,path:n,dirent:o.fs.createDirentFromStats(r,i)};return t.stats&&(s.stats=i),s})}t.read=function(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t):s(e,t)},t.readdirWithFileTypes=i,t.readdir=s},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(53403),o=r(96117);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=o.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},72156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},65225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(72156);t.fs=A},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},53403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(17790),n=r(34846),o=r(92687);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.stat=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.statSync=function(e,t){const r=i(t);return n.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function A(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,n){t.fs.lstat(e,(o,i)=>null!==o?r(n,o):i.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(n,e):A(n,i);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),A(n,o)}):A(n,i))}},34846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}},92687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=A.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return void 0===e?t:e}}},72897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(42369),n=r(27696),o=r(22111),i=r(14954);function s(e={}){return e instanceof i.default?e:new i.default(e)}t.Settings=i.default,t.walk=function(e,t,r){if("function"==typeof t)return new A.default(e,s()).read(t);new A.default(e,s(t)).read(r)},t.walkSync=function(e,t){const r=s(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=s(t);return new n.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.add(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,[...this._storage])}),this._reader.read()}}},27696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings),this._stream=new A.Readable({objectMode:!0,read:()=>{},destroy:this._reader.destroy.bind(this._reader)})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}},22111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(28614),n=r(85670),o=r(98360),i=r(10750),s=r(75504);class a extends s.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=n.scandir,this._emitter=new A.EventEmitter,this._queue=o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,A)=>{if(null!==r)return t(r,void 0);for(const t of A)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){i.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}t.default=a},10750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},t.isAppliedFilter=function(e,t){return null===e||e(t)},t.replacePathSegmentSeparator=function(e,t){return e.split(/[\\/]/).join(t)},t.joinPathSegments=function(e,t,r){return""===e?t:e+r+t}},75504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=A.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85670),n=r(10750),o=r(75504);class i extends o.default{constructor(){super(...arguments),this._scandir=A.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=i},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(85670);t.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},7966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const A=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement",...r];const n=["null","undefined","string","number","bigint","boolean","symbol"];function o(e){return t=>typeof t===e}const{toString:i}=Object.prototype,s=e=>{const t=i.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&c.domElement(e)?"HTMLElement":(r=t,A.includes(r)?t:void 0);var r},a=e=>t=>s(t)===e;function c(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(e))return"Observable";if(c.array(e))return"Array";if(c.buffer(e))return"Buffer";const t=s(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=o("undefined"),c.string=o("string");const g=o("number");c.number=e=>g(e)&&!c.nan(e),c.bigint=o("bigint"),c.function_=o("function"),c.null_=e=>null===e,c.class_=e=>c.function_(e)&&e.toString().startsWith("class "),c.boolean=e=>!0===e||!1===e,c.symbol=o("symbol"),c.numericString=e=>c.string(e)&&!c.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),c.array=(e,t)=>!!Array.isArray(e)&&(!c.function_(t)||e.every(t)),c.buffer=e=>{var t,r,A,n;return null!==(n=null===(A=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===A?void 0:A.call(r,e))&&void 0!==n&&n},c.nullOrUndefined=e=>c.null_(e)||c.undefined(e),c.object=e=>!c.null_(e)&&("object"==typeof e||c.function_(e)),c.iterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},c.asyncIterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},c.generator=e=>c.iterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.asyncGenerator=e=>c.asyncIterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.nativePromise=e=>a("Promise")(e);c.promise=e=>c.nativePromise(e)||(e=>{var t,r;return c.function_(null===(t=e)||void 0===t?void 0:t.then)&&c.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),c.generatorFunction=a("GeneratorFunction"),c.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===s(e),c.asyncFunction=e=>"AsyncFunction"===s(e),c.boundFunction=e=>c.function_(e)&&!e.hasOwnProperty("prototype"),c.regExp=a("RegExp"),c.date=a("Date"),c.error=a("Error"),c.map=e=>a("Map")(e),c.set=e=>a("Set")(e),c.weakMap=e=>a("WeakMap")(e),c.weakSet=e=>a("WeakSet")(e),c.int8Array=a("Int8Array"),c.uint8Array=a("Uint8Array"),c.uint8ClampedArray=a("Uint8ClampedArray"),c.int16Array=a("Int16Array"),c.uint16Array=a("Uint16Array"),c.int32Array=a("Int32Array"),c.uint32Array=a("Uint32Array"),c.float32Array=a("Float32Array"),c.float64Array=a("Float64Array"),c.bigInt64Array=a("BigInt64Array"),c.bigUint64Array=a("BigUint64Array"),c.arrayBuffer=a("ArrayBuffer"),c.sharedArrayBuffer=a("SharedArrayBuffer"),c.dataView=a("DataView"),c.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,c.urlInstance=e=>a("URL")(e),c.urlString=e=>{if(!c.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},c.truthy=e=>Boolean(e),c.falsy=e=>!e,c.nan=e=>Number.isNaN(e),c.primitive=e=>{return c.null_(e)||(t=typeof e,n.includes(t));var t},c.integer=e=>Number.isInteger(e),c.safeInteger=e=>Number.isSafeInteger(e),c.plainObject=e=>{if("[object Object]"!==i.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},c.typedArray=e=>{return t=s(e),r.includes(t);var t};c.arrayLike=e=>!c.nullOrUndefined(e)&&!c.function_(e)&&(e=>c.safeInteger(e)&&e>=0)(e.length),c.inRange=(e,t)=>{if(c.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(c.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const l=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=e=>c.object(e)&&1===e.nodeType&&c.string(e.nodeName)&&!c.plainObject(e)&&l.every(t=>t in e),c.observable=e=>{var t,r,A,n;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(n=(A=e)["@@observable"])||void 0===n?void 0:n.call(A)))},c.nodeStream=e=>c.object(e)&&c.function_(e.pipe)&&!c.observable(e),c.infinite=e=>e===1/0||e===-1/0;const u=e=>t=>c.integer(t)&&Math.abs(t%2)===e;c.evenInteger=u(0),c.oddInteger=u(1),c.emptyArray=e=>c.array(e)&&0===e.length,c.nonEmptyArray=e=>c.array(e)&&e.length>0,c.emptyString=e=>c.string(e)&&0===e.length,c.nonEmptyString=e=>c.string(e)&&e.length>0;c.emptyStringOrWhitespace=e=>c.emptyString(e)||(e=>c.string(e)&&!/\S/.test(e))(e),c.emptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&0===Object.keys(e).length,c.nonEmptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&Object.keys(e).length>0,c.emptySet=e=>c.set(e)&&0===e.size,c.nonEmptySet=e=>c.set(e)&&e.size>0,c.emptyMap=e=>c.map(e)&&0===e.size,c.nonEmptyMap=e=>c.map(e)&&e.size>0;const h=(e,t,r)=>{if(!c.function_(t))throw new TypeError("Invalid predicate: "+JSON.stringify(t));if(0===r.length)throw new TypeError("Invalid number of values");return e.call(r,t)};c.any=(e,...t)=>(c.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),c.all=(e,...t)=>h(Array.prototype.every,e,t);const p=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${c(r)}\`.`)};t.assert={undefined:e=>p(c.undefined(e),"undefined",e),string:e=>p(c.string(e),"string",e),number:e=>p(c.number(e),"number",e),bigint:e=>p(c.bigint(e),"bigint",e),function_:e=>p(c.function_(e),"Function",e),null_:e=>p(c.null_(e),"null",e),class_:e=>p(c.class_(e),"Class",e),boolean:e=>p(c.boolean(e),"boolean",e),symbol:e=>p(c.symbol(e),"symbol",e),numericString:e=>p(c.numericString(e),"string with a number",e),array:(e,t)=>{p(c.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>p(c.buffer(e),"Buffer",e),nullOrUndefined:e=>p(c.nullOrUndefined(e),"null or undefined",e),object:e=>p(c.object(e),"Object",e),iterable:e=>p(c.iterable(e),"Iterable",e),asyncIterable:e=>p(c.asyncIterable(e),"AsyncIterable",e),generator:e=>p(c.generator(e),"Generator",e),asyncGenerator:e=>p(c.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>p(c.nativePromise(e),"native Promise",e),promise:e=>p(c.promise(e),"Promise",e),generatorFunction:e=>p(c.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>p(c.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>p(c.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>p(c.boundFunction(e),"Function",e),regExp:e=>p(c.regExp(e),"RegExp",e),date:e=>p(c.date(e),"Date",e),error:e=>p(c.error(e),"Error",e),map:e=>p(c.map(e),"Map",e),set:e=>p(c.set(e),"Set",e),weakMap:e=>p(c.weakMap(e),"WeakMap",e),weakSet:e=>p(c.weakSet(e),"WeakSet",e),int8Array:e=>p(c.int8Array(e),"Int8Array",e),uint8Array:e=>p(c.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>p(c.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>p(c.int16Array(e),"Int16Array",e),uint16Array:e=>p(c.uint16Array(e),"Uint16Array",e),int32Array:e=>p(c.int32Array(e),"Int32Array",e),uint32Array:e=>p(c.uint32Array(e),"Uint32Array",e),float32Array:e=>p(c.float32Array(e),"Float32Array",e),float64Array:e=>p(c.float64Array(e),"Float64Array",e),bigInt64Array:e=>p(c.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>p(c.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>p(c.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>p(c.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>p(c.dataView(e),"DataView",e),urlInstance:e=>p(c.urlInstance(e),"URL",e),urlString:e=>p(c.urlString(e),"string with a URL",e),truthy:e=>p(c.truthy(e),"truthy",e),falsy:e=>p(c.falsy(e),"falsy",e),nan:e=>p(c.nan(e),"NaN",e),primitive:e=>p(c.primitive(e),"primitive",e),integer:e=>p(c.integer(e),"integer",e),safeInteger:e=>p(c.safeInteger(e),"integer",e),plainObject:e=>p(c.plainObject(e),"plain object",e),typedArray:e=>p(c.typedArray(e),"TypedArray",e),arrayLike:e=>p(c.arrayLike(e),"array-like",e),domElement:e=>p(c.domElement(e),"HTMLElement",e),observable:e=>p(c.observable(e),"Observable",e),nodeStream:e=>p(c.nodeStream(e),"Node.js Stream",e),infinite:e=>p(c.infinite(e),"infinite number",e),emptyArray:e=>p(c.emptyArray(e),"empty array",e),nonEmptyArray:e=>p(c.nonEmptyArray(e),"non-empty array",e),emptyString:e=>p(c.emptyString(e),"empty string",e),nonEmptyString:e=>p(c.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>p(c.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>p(c.emptyObject(e),"empty object",e),nonEmptyObject:e=>p(c.nonEmptyObject(e),"non-empty object",e),emptySet:e=>p(c.emptySet(e),"empty set",e),nonEmptySet:e=>p(c.nonEmptySet(e),"non-empty set",e),emptyMap:e=>p(c.emptyMap(e),"empty map",e),nonEmptyMap:e=>p(c.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>p(c.evenInteger(e),"even integer",e),oddInteger:e=>p(c.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>p(c.directInstanceOf(e,t),"T",e),inRange:(e,t)=>p(c.inRange(e,t),"in range",e),any:(e,...t)=>p(c.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>p(c.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=c,e.exports=c,e.exports.default=c,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(93121),n=Number(process.versions.node.split(".")[0]),o=e=>{const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=(A,...n)=>("error"===A&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(A,...n))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||n>=13)&&(t.phases.total=Date.now()-t.start)});const o=e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r),A.default(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);const i=()=>{var e;t.upload=Date.now(),t.phases.request=t.upload-(null!=(e=t.secureConnect)?e:t.connect)};return("boolean"==typeof e.writableFinished?!e.writableFinished:!e.finished||0!==e.outputSize||e.socket&&0!==e.socket.writableLength)?e.prependOnceListener("finish",i):i(),e.prependOnceListener("response",e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,e.timings=t,r(e),e.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};t.default=o,e.exports=o,e.exports.default=o},58069:(e,t,r)=>{"use strict";l.ifExists=function(e,t,r){return l(e,t,r).catch(()=>{})};const A=r(31669),n=r(46227),o=r(85622),i=r(97369),s=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:i(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function g(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?A.promisify(r.chmod):async()=>{},stat:A.promisify(r.stat),unlink:A.promisify(r.unlink),readFile:A.promisify(r.readFile),writeFile:A.promisify(r.writeFile)},t}async function l(e,t,r){const A=g(r);await A.fs_.stat(e),await async function(e,t,r){const A=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),A=r.trim().split(/\r*\n/)[0].match(s);if(!A){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:A[1],additionalArgs:A[2]}}(e,r);return await function(e,t){return n(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,A){const n=g(A),o=[{generator:h,extension:""}];n.createCmdFile&&o.push({generator:u,extension:".cmd"});n.createPwshFile&&o.push({generator:p,extension:".ps1"});return Promise.all(o.map(A=>async function(e,t,r,A,n){const o=n.preserveSymlinks?"--preserve-symlinks":"",i=[r.additionalArgs,o].filter(e=>e).join(" ");return n=Object.assign({},n,{prog:r.program,args:i}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,n),await n.fs_.writeFile(t,A(e,t,n),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,n)}(e,t+A.extension,r,A.generator,n)))}(e,t,A,r)}(e,t,A)}function u(e,t,r){let A=o.relative(o.dirname(t),e).split("/").join("\\");const n=o.isAbsolute(A)?`"${A}"`:`"%~dp0\\${A}"`;let i,s=r.prog,a=r.args||"";const c=d(r.nodePath).win32;s?(i=`"%~dp0\\${s}.exe"`,A=n):(s=n,a="",A="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=i?`@IF EXIST ${i} (\r\n ${i} ${a} ${A} ${g}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${s} ${a} ${A} ${g}%*\r\n)`:`@${s} ${a} ${A} ${g}%*\r\n`,l}function h(e,t,r){let A,n=o.relative(o.dirname(t),e),i=r.prog&&r.prog.split("\\").join("/");n=n.split("\\").join("/");const s=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let a=r.args||"";const c=d(r.nodePath).posix;i?(A=`"$basedir/${r.prog}"`,n=s):(i=s,a="",n="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l="#!/bin/sh\n";l+='basedir=$(dirname "$(echo "$0" | sed -e \'s,\\\\,/,g\')")\n\ncase `uname` in\n *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\nesac\n\n';const u=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=A?u+`if [ -x ${A} ]; then\n`+` exec ${A} ${a} ${n} ${g}"$@"\nelse \n`+` exec ${i} ${a} ${n} ${g}"$@"\nfi\n`:`${u}${i} ${a} ${n} ${g}"$@"\nexit $?\n`,l}function p(e,t,r){let A=o.relative(o.dirname(t),e);const n=r.prog&&r.prog.split("\\").join("/");let i,s=n&&`"${n}$exe"`;A=A.split("\\").join("/");const a=o.isAbsolute(A)?`"${A}"`:`"$basedir/${A}"`;let c=r.args||"",g=d(r.nodePath);const l=g.win32,u=g.posix;s?(i=`"$basedir/${r.prog}$exe"`,A=a):(s=a,c="",A="");let h=r.progArgs?r.progArgs.join(" ")+" ":"",p='#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=""\n'+(r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH="${l}"\n`:"")+'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n # Fix case when both the Windows and Linux builds of Node\n # are installed in the same directory\n $exe=".exe"\n}';return r.nodePath&&(p=p+" else {\n"+` $env:NODE_PATH="${u}"\n}`),p+="\n",p=i?p+"$ret=0\n"+`if (Test-Path ${i}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${i} ${c} ${A} ${h}$args\n } else {\n`+` & ${i} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${A} ${h}$args\n } else {\n`+` & ${s} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":p+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${s} ${c} ${A} ${h}$args\n} else {\n`+` & ${s} ${c} ${A} ${h}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",p}function d(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${A}`:A,r.posix=r.posix?`${r.posix}:${n}`:n,r[e]={win32:A,posix:n}}return r}e.exports=l},97991:(e,t,r)=>{"use strict";const A=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,n=()=>{const e={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(e.enabled="0"!==process.env.FORCE_COLOR);const t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),n=(r,A)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let n=""+r,o=n.includes("\n"),i=A.length;for(i>0&&A.includes("unstyle")&&(A=[...new Set(["unstyle",...A])].reverse());i-- >0;)n=t(e.styles[A[i]],n,o);return n},o=(t,r,A)=>{e.styles[t]=(e=>{let t=e.open=`[${e.codes[0]}m`,r=e.close=`[${e.codes[1]}m`,A=e.regex=new RegExp(`\\u001b\\[${e.codes[1]}m`,"g");return e.wrap=(e,n)=>{e.includes(r)&&(e=e.replace(A,r+t));let o=t+e+r;return n?o.replace(/\r*\n/g,`${r}$&${t}`):o},e})({name:t,codes:r}),(e.keys[A]||(e.keys[A]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>n(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=A,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let A="string"==typeof r?e[r]:r;if("function"!=typeof A)throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:t}),e.styles[t]=A,A.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>n(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(A.stack):A.stack,t}})},e.theme=t=>{if(null===(r=t)||"object"!=typeof r||Array.isArray(r))throw new TypeError("Expected theme to be an object");var r;for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r(31283),e.define=o,e};e.exports=n(),e.exports.create=n},31283:e=>{"use strict";const t="Hyper"===process.env.TERM_PROGRAM,r="win32"===process.platform,A="linux"===process.platform,n={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"•",bulletWhite:"◦",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"※",middot:"·",minus:"-",multiplication:"×",obelus:"÷",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"¶",plusMinus:"±",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},o=Object.assign({},n,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"»",radioOff:"( )",radioOn:"(*)",warning:"‼"}),i=Object.assign({},n,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"…",info:"ℹ",question:"?",questionFull:"?",questionSmall:"﹖",pointer:A?"▸":"❯",pointerSmall:A?"‣":"›",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=r&&!t?o:i,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:o}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:i})},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const A=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};5;${A}m`},o=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};2;${A[0]};${A[1]};${A[2]}m`},i=e=>e,s=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const A=r();return Object.defineProperty(e,t,{value:A,enumerable:!0,configurable:!0}),A},enumerable:!0,configurable:!0})};let c;const g=(e,t,A,n)=>{void 0===c&&(c=r(2744));const o=n?10:0,i={};for(const[r,n]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?i[s]=e(A,o):"object"==typeof n&&(i[s]=e(n[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,A]of Object.entries(t)){for(const[r,n]of Object.entries(A))t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`},A[r]=t[r],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:A,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>g(A,"ansi16",i,!1)),a(t.color,"ansi256",()=>g(n,"ansi256",i,!1)),a(t.color,"ansi16m",()=>g(o,"rgb",s,!1)),a(t.bgColor,"ansi",()=>g(A,"ansi16",i,!0)),a(t.bgColor,"ansi256",()=>g(n,"ansi256",i,!0)),a(t.bgColor,"ansi16m",()=>g(o,"rgb",s,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},67648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBinjumper=void 0;const A=r(78761);let n=null;t.getBinjumper=function(){return n||(n=A.gunzipSync(Buffer.from("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","base64"))),n}},50730:(e,t,r)=>{"use strict";t.O9=void 0;const A=r(85622),n=r(35747),o=r(31669),i=r(67648);Object.defineProperty(t,"O9",{enumerable:!0,get:function(){return i.getBinjumper}})},73975:(e,t,r)=>{"use strict";var A=r(86897).Duplex;function n(e){if(!(this instanceof n))return new n(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);A.call(this)}r(31669).inherits(n,A),n.prototype._offset=function(e){var t,r=0,A=0;if(0===e)return[0,0];for(;Athis.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},n.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},n.prototype.copy=function(e,t,r,A){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof A||A>this.length)&&(A=this.length),r>=this.length)return e||Buffer.alloc(0);if(A<=0)return e||Buffer.alloc(0);var n,o,i=!!e,s=this._offset(r),a=A-r,c=a,g=i&&t||0,l=s[1];if(0===r&&A==this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o(n=this._bufs[o].length-l))){this._bufs[o].copy(e,g,l,l+c);break}this._bufs[o].copy(e,g,l),g+=n,c-=n,l&&(l=0)}return e},n.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new n;var r=this._offset(e),A=this._offset(t),o=this._bufs.slice(r[0],A[0]+1);return 0==A[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,A[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new n(o)},n.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},n.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},n.prototype.duplicate=function(){for(var e=0,t=new n;ethis.length?this.length:t;for(var A=this._offset(t),o=A[0],i=A[1];o=e.length){var a=s.indexOf(e,i);if(-1!==a)return this._reverseOffset([o,a]);i=s.length-e.length+1}else{var c=this._reverseOffset([o,i]);if(this._match(c,e))return c;i++}}i=0}return-1},n.prototype._match=function(e,t){if(this.length-e{"use strict";const A=r(54900),n=r(44617),o=r(1495),i=r(425),s=(e,t={})=>{let r=[];if(Array.isArray(e))for(let A of e){let e=s.create(A,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};s.parse=(e,t={})=>i(e,t),s.stringify=(e,t={})=>A("string"==typeof e?s.parse(e,t):e,t),s.compile=(e,t={})=>("string"==typeof e&&(e=s.parse(e,t)),n(e,t)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),e.exports=s},44617:(e,t,r)=>{"use strict";const A=r(52169),n=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let i=n.isInvalidBrace(o),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===i||!0===s,c=!0===t.escapeInvalid?"\\":"",g="";if(!0===e.isOpen)return c+e.value;if(!0===e.isClose)return c+e.value;if("open"===e.type)return a?c+e.value:"(";if("close"===e.type)return a?c+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=n.reduce(e.nodes),o=A(...r,{...t,wrap:!1,toRegex:!0});if(0!==o.length)return r.length>1&&o.length>1?`(${o})`:o}if(e.nodes)for(let t of e.nodes)g+=r(t,e);return g};return r(e)}},5384:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",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:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1495:(e,t,r)=>{"use strict";const A=r(52169),n=r(54900),o=r(4542),i=(e="",t="",r=!1)=>{let A=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let n of e)if(Array.isArray(n))for(let e of n)A.push(i(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),A.push(Array.isArray(e)?i(n,e,r):n+e);return o.flatten(A)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,s=(e,a={})=>{e.queue=[];let c=a,g=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,g=c.queue;if(e.invalid||e.dollar)return void g.push(i(g.pop(),n(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void g.push(i(g.pop(),["{}"]));if(e.nodes&&e.ranges>0){let s=o.reduce(e.nodes);if(o.exceedsLimit(...s,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=A(...s,t);return 0===a.length&&(a=n(e,t)),g.push(i(g.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),u=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,u=h.queue;for(let t=0;t{"use strict";const A=r(54900),{MAX_LENGTH:n,CHAR_BACKSLASH:o,CHAR_BACKTICK:i,CHAR_COMMA:s,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:d,CHAR_SINGLE_QUOTE:C,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:I}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},E="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(e.length>E)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${E})`);let B,y={type:"root",input:e,nodes:[]},m=[y],w=y,Q=y,D=0,b=e.length,v=0,S=0;const k=()=>e[v++],N=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return w.nodes.push(e),e.parent=w,e.prev=Q,Q=e,e;Q.value+=e.value};for(N({type:"bos"});v0){if(w.ranges>0){w.ranges=0;let e=w.nodes.shift();w.nodes=[e,{type:"text",value:A(w)}]}N({type:"comma",value:B}),w.commas++}else if(B===a&&S>0&&0===w.commas){let e=w.nodes;if(0===S||0===e.length){N({type:"text",value:B});continue}if("dot"===Q.type){if(w.range=[],Q.value+=B,Q.type="range",3!==w.nodes.length&&5!==w.nodes.length){w.invalid=!0,w.ranges=0,Q.type="text";continue}w.ranges++,w.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+B,Q=t,w.ranges--;continue}N({type:"dot",value:B})}else N({type:"text",value:B});else{if("brace"!==w.type){N({type:"text",value:B});continue}let e="close";w=m.pop(),w.close=!0,N({type:e,value:B}),S--,w=m[m.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===w.dollar;w=N({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),m.push(w),N({type:"open",value:B})}else{let e,r=B;for(!0!==t.keepQuotes&&(B="");v{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=m[m.length-1],t=e.nodes.indexOf(w);e.nodes.splice(t,1,...w.nodes)}}while(m.length>0);return N({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const A=r(4542);e.exports=(e,t={})=>{let r=(e,n={})=>{let o=t.escapeInvalid&&A.isInvalidBrace(n),i=!0===e.invalid&&!0===t.escapeInvalid,s="";if(e.value)return(o||i)&&A.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}},4542:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find(e=>e.type===t),t.exceedsLimit=(e,r,A=1,n)=>!1!==n&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(A)>=n),t.escapeNode=(e,t=0,r)=>{let A=e.nodes[t];A&&(r&&A.type===r||"open"===A.type||"close"===A.type)&&!0!==A.escaped&&(A.value="\\"+A.value,A.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let A=0;A{"use strict";const{V4MAPPED:A,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:s}=r(40881),{promisify:a}=r(31669),c=r(12087),g=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),u=Symbol("expires"),h="number"==typeof o,p=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},d=()=>{let e=!1,t=!1;for(const r of Object.values(c.networkInterfaces()))for(const A of r)if(!A.internal&&("IPv6"===A.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},C={ttl:!0},f={all:!0};class I{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:r=3600,errorTtl:A=.15,resolver:n=new i,lookup:o=s}={}){if(this.maxTtl=t,this.errorTtl=A,this._cache=e,this._resolver=n,this._dnsLookup=a(o),this._resolver instanceof i?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=a(this._resolver.resolve4.bind(this._resolver)),this._resolve6=a(this._resolver.resolve6.bind(this._resolver))),this._iface=d(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,r<1)this._fallback=!1;else{this._fallback=!0;const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*r);e.unref&&e.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if("function"==typeof t?(r=t,t={}):"number"==typeof t&&(t={family:t}),!r)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?r(null,e):r(null,e.address,e.family,e.expires,e.ttl)},r)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let r=await this.query(e);if(6===t.family){const e=r.filter(e=>6===e.family);t.hints&A&&(h&&t.hints&o||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address="::ffff:"+t.address,t.family=6)})(r):r=e}else 4===t.family&&(r=r.filter(e=>4===e.family));if(t.hints&n){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("cacheableLookup ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r)t=await r;else{const r=this.queryAndCache(e);this._pending[e]=r,t=await r}}return t=t.map(e=>({...e})),t}async _resolve(e){const[t,r]=await Promise.all([this._resolve4(e,C),this._resolve6(e,C)].map(e=>(async e=>{try{return await e}catch(e){if("ENODATA"===e.code||"ENOTFOUND"===e.code)return[];throw e}})(e)));let A=0,n=0,o=0;const i=Date.now();for(const e of t)e.family=4,e.expires=i+1e3*e.ttl,A=Math.max(A,e.ttl);for(const e of r)e.family=6,e.expires=i+1e3*e.ttl,n=Math.max(n,e.ttl);return o=t.length>0?r.length>0?Math.min(A,n):A:n,{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=1e3*Math.min(r,this.maxTtl),t[u]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}A=this._cache,Symbol.iterator in A&&this._tick(r)}var A}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,f);try{let t=await this._resolve(e);0===t.entries.length&&this._fallback&&(t=await this._lookup(e),0!==t.entries.length&&this._hostnamesToFallback.add(e));const r=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,r),delete this._pending[e],t.entries}catch(t){throw delete this._pending[e],t}}_tick(e){const t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,A]of this._cache){const n=A[u];t>=n?this._cache.delete(r):n("lookup"in t||(t.lookup=this.lookup),e[g](t,r))}uninstall(e){if(p(e),e[g]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[g],delete e[g],delete e[l]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=d(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=I,e.exports.default=I},11200:(e,t,r)=>{"use strict";const A=r(28614),n=r(78835),o=r(19793),i=r(58764),s=r(86834),a=r(48491),c=r(55737),g=r(15751),l=r(72515);class u{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new l({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let l;if("string"==typeof t)l=p(n.parse(t)),t={};else if(t instanceof n.URL)l=p(n.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),A=r.length>0?"?"+r.join("?"):"";l=p({...t,pathname:e,search:A})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...h(l)}).headers=c(t.headers);const d=new A,C=o(n.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${t.method}:${C}`;let I=!1,E=!1;const B=t=>{E=!0;let A,n=!1;const o=new Promise(e=>{A=()=>{n||(n=!0,e())}}),c=e=>{if(I&&!t.forceRefresh){e.status=e.statusCode;const r=s.fromObject(I.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(I.statusCode,t,I.body,I.url)).cachePolicy=r.policy,e.fromCache=!0}}let A;e.fromCache||(e.cachePolicy=new s(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(A=g(e),(async()=>{try{const r=i.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),n)return;const A=await r,s={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?I.statusCode:e.statusCode,body:A};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(f,s,a)}catch(e){d.emit("error",new u.CacheError(e))}})()):t.cache&&I&&(async()=>{try{await this.cache.delete(f)}catch(e){d.emit("error",new u.CacheError(e))}})(),d.emit("response",A||e),"function"==typeof r&&r(A||e)};try{const r=e(t,c);r.once("error",A),r.once("abort",A),d.emit("request",r)}catch(e){d.emit("error",new u.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(f):void 0;if(void 0===t)return B(e);const A=s.fromObject(t.cachePolicy);if(A.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=A.responseHeaders(),n=new a(t.statusCode,e,t.body,t.url);n.cachePolicy=A,n.fromCache=!0,d.emit("response",n),"function"==typeof r&&r(n)}else I=t,e.headers=A.revalidationHeaders(e),B(e)},A=e=>d.emit("error",new u.CacheError(e));this.cache.once("error",A),d.on("response",()=>this.cache.removeListener("error",A));try{await e(t)}catch(e){t.automaticFailover&&!E&&B(t),d.emit("error",new u.CacheError(e))}})(),d}}}function h(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function p(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}u.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},u.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=u},54738:e=>{"use strict";const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,A=!1;for(let n=0;nt.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};e.exports=t,e.exports.default=t},95882:(e,t,r)=>{"use strict";const A=r(18483),{stdout:n,stderr:o}=r(59428),{stringReplaceAll:i,stringEncaseCRLFWithFirstIndex:s}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class g{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");const r=n?n.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>E(t.template,...e),Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=g,t.template};function u(e){return l(e)}for(const[e,t]of Object.entries(A))c[e]={get(){const r=C(this,d(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=C(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)c[e]={get(){const{level:t}=this;return function(...r){const n=d(A.color[a[t]][e](...r),A.color.close,this._styler);return C(this,n,this._isEmpty)}}};for(const e of h){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=d(A.bgColor[a[t]][e](...r),A.bgColor.close,this._styler);return C(this,n,this._isEmpty)}}}}const p=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),d=(e,t,r)=>{let A,n;return void 0===r?(A=e,n=t):(A=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:A,closeAll:n,parent:r}},C=(e,t,r)=>{const A=(...e)=>f(A,1===e.length?""+e[0]:e.join(" "));return A.__proto__=p,A._generator=e,A._styler=t,A._isEmpty=r,A},f=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:A,closeAll:n}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=i(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=s(t,n,A,o)),A+t+n};let I;const E=(e,...t)=>{const[A]=t;if(!Array.isArray(A))return t.join(" ");const n=t.slice(1),o=[A.raw[0]];for(let e=1;e{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,A=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function i(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function s(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let s;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(s=t.match(A)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(s[2].replace(n,(e,t,r)=>t?i(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let A;for(;null!==(A=r.exec(e));){const e=A[1];if(A[2]){const r=s(e,A[2]);t.push([e].concat(r))}else t.push([e])}return t}function c(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let A=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in A))throw new Error("Unknown Chalk style: "+e);A=t.length>0?A[e](...t):A[e]}return A}e.exports=(e,r)=>{const A=[],n=[];let o=[];if(r.replace(t,(t,r,s,g,l,u)=>{if(r)o.push(i(r));else if(g){const t=o.join("");o=[],n.push(0===A.length?t:c(e,A)(t)),A.push({inverse:s,styles:a(g)})}else if(l){if(0===A.length)throw new Error("Found extraneous } in Chalk template literal");n.push(c(e,A)(o.join(""))),o=[],A.pop()}else o.push(u)}),n.push(o.join("")),A.length>0){const e=`Chalk template literal is missing ${A.length} closing bracket${1===A.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let A=e.indexOf(t);if(-1===A)return e;const n=t.length;let o=0,i="";do{i+=e.substr(o,A-o)+t+r,o=A+n,A=e.indexOf(t,o)}while(-1!==A);return i+=e.substr(o),i},stringEncaseCRLFWithFirstIndex:(e,t,r,A)=>{let n=0,o="";do{const i="\r"===e[A-1];o+=e.substr(n,(i?A-1:A)-n)+t+(i?"\r\n":"\n")+r,n=A+1,A=e.indexOf("\n",n)}while(-1!==A);return o+=e.substr(n),o}}},5864:(e,t,r)=>{"use strict";var A=r(85832),n=process.env;function o(e){return"string"==typeof e?!!n[e]:Object.keys(e).every((function(t){return n[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:A.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,A.forEach((function(e){var r=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return o(e)}));if(t[e.constant]=r,r)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!n[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!n[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(n.CI||n.CONTINUOUS_INTEGRATION||n.BUILD_NUMBER||n.RUN_ID||t.name)},85832:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},40822:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cli:()=>Y,Command:()=>M,UsageError:()=>a});const A=/^(-h|--help)(?:=([0-9]+))?$/,n=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,o=/^-[a-zA-Z]{2,}$/,i=/^([^=]+)=([\s\S]*)$/,s="1"===process.env.DEBUG_CLI;class a extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}}class c extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",0===this.candidates.length)this.message="Command not found, but we're not sure what's the alternative.";else if(1===this.candidates.length&&null!==this.candidates[0].reason){const[{usage:e,reason:t}]=this.candidates;this.message=`${t}\n\n$ ${e}`}else if(1===this.candidates.length){const[{usage:t}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${t}\n${l(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:e},t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}class g extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((e,t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}const l=e=>"While running "+e.filter(e=>"\0"!==e).map(e=>{const t=JSON.stringify(e);return e.match(/\s/)||0===e.length||t!==`"${e}"`?t:e}).join(" ");function u(e){s&&console.log(e)}const h={candidateUsage:null,errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:-1};function p(e,t){return e.nodes.push(t),e.nodes.length-1}function d(e,t,r=!1){u("Running a vm on "+JSON.stringify(t));let A=[{node:0,state:{candidateUsage:null,errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];!function(e,{prefix:t=""}={}){u(t+"Nodes are:");for(let r=0;r2!==e).map(({state:e})=>({usage:e.candidateUsage,reason:null})));if(s.every(({node:e})=>2===e))throw new c(t,s.map(({state:e})=>({usage:e.candidateUsage,reason:e.errorMessage})));A=I(s)}if(A.length>0){u(" Results:");for(const e of A)u(` - ${e.node} -> ${JSON.stringify(e.state)}`)}else u(" No results");return A}function C(e,t){if(null!==t.selectedIndex)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,"\0"))for(const{to:t}of e.statics["\0"])if(1===t)return!0;return!1}function f(e,t){return function(e,t){const r=t.filter(e=>null!==e.selectedIndex);if(0===r.length)throw new Error;let A=0;for(const e of r)e.path.length>A&&(A=e.path.length);const n=r.filter(e=>e.path.length===A),o=e=>e.positionals.filter(({extra:e})=>!e).length+e.options.length,i=n.map(e=>({state:e,positionalCount:o(e)}));let s=0;for(const{positionalCount:e}of i)e>s&&(s=e);const a=function(e){const t=[],r=[];for(const A of e)-1===A.selectedIndex?r.push(A):t.push(A);r.length>0&&t.push(Object.assign(Object.assign({},h),{path:E(...r.map(e=>e.path)),options:r.reduce((e,t)=>e.concat(t.options),[])}));return t}(i.filter(({positionalCount:e})=>e===s).map(({state:e})=>e));if(a.length>1)throw new g(e,a.map(e=>e.candidateUsage));return a[0]}(t,d(e,[...t,"\0"]).map(({state:e})=>e))}function I(e){let t=0;for(const{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:e})=>e.path.length===t)}function E(e,t,...r){return void 0===t?Array.from(e):E(e.filter((e,r)=>e===t[r]),...r)}function B(e){return 1===e||2===e}function y(e,t=0){return{to:B(e.to)?e.to:e.to>2?e.to+t-2:e.to+t,reducer:e.reducer}}function m(e,t=0){const r={dynamics:[],shortcuts:[],statics:{}};for(const[A,n]of e.dynamics)r.dynamics.push([A,y(n,t)]);for(const A of e.shortcuts)r.shortcuts.push(y(A,t));for(const[A,n]of Object.entries(e.statics))r.statics[A]=n.map(e=>y(e,t));return r}function w(e,t,r,A,n){e.nodes[t].dynamics.push([r,{to:A,reducer:n}])}function Q(e,t,r,A){e.nodes[t].shortcuts.push({to:r,reducer:A})}function D(e,t,r,A,n){(Object.prototype.hasOwnProperty.call(e.nodes[t].statics,r)?e.nodes[t].statics[r]:e.nodes[t].statics[r]=[]).push({to:A,reducer:n})}function b(e,t,r,A){if(Array.isArray(t)){const[n,...o]=t;return e[n](r,A,...o)}return e[t](r,A)}function v(e,t){const r=Array.isArray(e)?S[e[0]]:S[e];if(void 0===r.suggest)return null;const A=Array.isArray(e)?e.slice(1):[];return r.suggest(t,...A)}const S={always:()=>!0,isOptionLike:(e,t)=>!e.ignoreOptions&&t.startsWith("-"),isNotOptionLike:(e,t)=>e.ignoreOptions||!t.startsWith("-"),isOption:(e,t,r,A)=>!e.ignoreOptions&&t===r,isBatchOption:(e,t,r)=>!e.ignoreOptions&&o.test(t)&&[...t.slice(1)].every(e=>r.includes("-"+e)),isBoundOption:(e,t,r,A)=>{const o=t.match(i);return!e.ignoreOptions&&!!o&&n.test(o[1])&&r.includes(o[1])&&A.filter(e=>e.names.includes(o[1])).every(e=>e.allowBinding)},isNegatedOption:(e,t,r)=>!e.ignoreOptions&&t==="--no-"+r.slice(2),isHelp:(e,t)=>!e.ignoreOptions&&A.test(t),isUnsupportedOption:(e,t,r)=>!e.ignoreOptions&&t.startsWith("-")&&n.test(t)&&!r.includes(t),isInvalidOption:(e,t)=>!e.ignoreOptions&&t.startsWith("-")&&!n.test(t)};S.isOption.suggest=(e,t,r=!0)=>r?null:[t];const k={setCandidateUsage:(e,t,r)=>Object.assign(Object.assign({},e),{candidateUsage:r}),setSelectedIndex:(e,t,r)=>Object.assign(Object.assign({},e),{selectedIndex:r}),pushBatch:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat([...t.slice(1)].map(e=>({name:"-"+e,value:!0})))}),pushBound:(e,t)=>{const[,r,A]=t.match(i);return Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:A})})},pushPath:(e,t)=>Object.assign(Object.assign({},e),{path:e.path.concat(t)}),pushPositional:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!1})}),pushExtra:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!0})}),pushExtraNoLimits:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:N})}),pushTrue:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:!0})}),pushFalse:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:!1})}),pushUndefined:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:void 0})}),pushStringValue:(e,t)=>{var r;const A=Object.assign(Object.assign({},e),{options:[...e.options]}),n=e.options[e.options.length-1];return n.value=(null!==(r=n.value)&&void 0!==r?r:[]).concat([t]),A},setStringValue:(e,t)=>{const r=Object.assign(Object.assign({},e),{options:[...e.options]});return e.options[e.options.length-1].value=t,r},inhibateOptions:e=>Object.assign(Object.assign({},e),{ignoreOptions:!0}),useHelp:(e,t,r)=>{const[,n,o]=t.match(A);return void 0!==o?Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)},{name:"-i",value:o}]}):Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)}]})},setError:(e,t,r)=>"\0"===t?Object.assign(Object.assign({},e),{errorMessage:r+"."}):Object.assign(Object.assign({},e),{errorMessage:`${r} ("${t}").`}),setOptionArityError:(e,t)=>{const r=e.options[e.options.length-1];return Object.assign(Object.assign({},e),{errorMessage:`Not enough arguments to option ${r.name}.`})}},N=Symbol();class F{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:r=this.arity.extra,proxy:A=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:r,proxy:A})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===N)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");t||this.arity.extra===N?this.arity.extra!==N&&0===this.arity.extra.length?this.arity.leading.push(e):this.arity.trailing.push(e):this.arity.extra.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===N)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let r=0;r1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(r))throw new Error("The arity must be an integer, got "+r);if(r<0)throw new Error("The arity must be positive, got "+r);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:r,hidden:A,allowBinding:n})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){const r=[this.cliOpts.binaryName],A=[];if(this.paths.length>0&&r.push(...this.paths[0]),e){for(const{names:e,arity:n,hidden:o,description:i}of this.options){if(o)continue;const s=[];for(let e=0;e`<${e}>`)),this.arity.extra===N?r.push("..."):r.push(...this.arity.extra.map(e=>`[${e}]`)),r.push(...this.arity.trailing.map(e=>`<${e}>`))}return{usage:r.join(" "),options:A}}compile(){if(void 0===this.context)throw new Error("Assertion failed: No context attached");const e={nodes:[{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}}]};let t=0;t=p(e,{dynamics:[],shortcuts:[],statics:{}}),D(e,0,"",t,["setCandidateUsage",this.usage().usage]);const r=this.arity.proxy?"always":"isNotOptionLike",A=this.paths.length>0?this.paths:[[]];for(const n of A){let A=t;if(n.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});Q(e,A,t),this.registerOptions(e,t),A=t}for(let t=0;t0||!this.arity.proxy){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});w(e,A,"isHelp",t,["useHelp",this.cliIndex]),D(e,t,"\0",1,["setSelectedIndex",-1]),this.registerOptions(e,A)}this.arity.leading.length>0&&D(e,A,"\0",2,["setError","Not enough positional arguments"]);let o=A;for(let t=0;t0||t+1!==this.arity.leading.length)&&D(e,r,"\0",2,["setError","Not enough positional arguments"]),w(e,o,"isNotOptionLike",r,"pushPositional"),o=r}let i=o;if(this.arity.extra===N||this.arity.extra.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});if(Q(e,o,t),this.arity.extra===N){const A=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,A),w(e,o,r,A,"pushExtraNoLimits"),w(e,A,r,A,"pushExtraNoLimits"),Q(e,A,t)}else for(let A=0;A0&&D(e,i,"\0",2,["setError","Not enough positional arguments"]);let s=i;for(let t=0;tt.length>e.length?t:e,"");if(0===r.arity)for(const n of r.names)w(e,t,["isOption",n,r.hidden||n!==A],t,"pushTrue"),n.startsWith("--")&&!n.startsWith("--no-")&&w(e,t,["isNegatedOption",n],t,["pushFalse",n]);else{let n=p(e,{dynamics:[],shortcuts:[],statics:{}});for(const o of r.names)w(e,t,["isOption",o,r.hidden||o!==A],n,"pushUndefined");for(let t=0;t=0&&e{if(t.has(A))return;t.add(A);const n=e.nodes[A];for(const e of Object.values(n.statics))for(const{to:t}of e)r(t);for(const[,{to:e}]of n.dynamics)r(e);for(const{to:e}of n.shortcuts)r(e);const o=new Set(n.shortcuts.map(({to:e})=>e));for(;n.shortcuts.length>0;){const{to:t}=n.shortcuts.shift(),r=e.nodes[t];for(const[e,t]of Object.entries(r.statics)){let r=Object.prototype.hasOwnProperty.call(n.statics,e)?n.statics[e]:n.statics[e]=[];for(const e of t)r.some(({to:t})=>e.to===t)||r.push(e)}for(const[e,t]of r.dynamics)n.dynamics.some(([r,{to:A}])=>e===r&&t.to===A)||n.dynamics.push([e,t]);for(const e of r.shortcuts)o.has(e.to)||(n.shortcuts.push(e),o.add(e.to))}};r(0)}(r),{machine:r,contexts:t,process:e=>f(r,e),suggest:(e,t)=>function(e,t,r){const A=r&&t.length>0?[""]:[],n=d(e,t,r),o=[],i=new Set,s=(t,r,A=!0)=>{let n=[r];for(;n.length>0;){const r=n;n=[];for(const o of r){const r=e.nodes[o],i=Object.keys(r.statics);for(const e of Object.keys(r.statics)){const e=i[0];for(const{to:o,reducer:i}of r.statics[e])"pushPath"===i&&(A||t.push(e),n.push(o))}}A=!1}const s=JSON.stringify(t);i.has(s)||(o.push(t),i.add(s))};for(const{node:t,state:r}of n){if(null!==r.remainder){s([r.remainder],t);continue}const n=e.nodes[t],o=C(n,r);for(const[e,r]of Object.entries(n.statics))(o&&"\0"!==e||!e.startsWith("-")&&r.some(({reducer:e})=>"pushPath"===e))&&s([...A,e],t);if(o)for(const[e,{to:o}]of n.dynamics){if(2===o)continue;const n=v(e,r);if(null!==n)for(const e of n)s([...A,e],t)}}return[...o].sort()}(r,e,t)}}}class M{constructor(){this.help=!1}static getMeta(e){const t=e.constructor;return t.meta=Object.prototype.hasOwnProperty.call(t,"meta")?t.meta:{definitions:[],transformers:[(e,t)=>{for(const{name:r,value:A}of e.options)"-h"!==r&&"--help"!==r||(t.help=A)}]}}static resolveMeta(e){const t=[],r=[];for(let A=e;A instanceof M;A=A.__proto__){const e=this.getMeta(A);for(const r of e.definitions)t.push(r);for(const t of e.transformers)r.push(t)}return{definitions:t,transformers:r}}static registerDefinition(e,t){this.getMeta(e).definitions.push(t)}static registerTransformer(e,t){this.getMeta(e).transformers.push(t)}static addPath(...e){this.Path(...e)(this.prototype,"execute")}static addOption(e,t){t(this.prototype,e)}static Path(...e){return(t,r)=>{this.registerDefinition(t,t=>{t.addPath(e)})}}static Boolean(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{for(const{name:r,value:A}of e.options)o.includes(r)&&(t[n]=A)})}}static Counter(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{var r;for(const{name:A,value:i}of e.options)o.includes(A)&&(null!==(r=t[n])&&void 0!==r||(t[n]=0),i?t[n]++:t[n]=0)})}}static String(e={},{arity:t=1,tolerateBoolean:r=!1,hidden:A=!1,description:n}={}){return(o,i)=>{if("string"==typeof e){const s=e.split(",");this.registerDefinition(o,e=>{e.addOption({names:s,arity:r?0:t,hidden:A,description:n})}),this.registerTransformer(o,(e,t)=>{for(const{name:r,value:A}of e.options)s.includes(r)&&(t[i]=A)})}else{const{name:t=i,required:r=!0}=e;this.registerDefinition(o,e=>{e.addPositional({name:t,required:r})}),this.registerTransformer(o,(e,t)=>{for(let A=0;A{if(0===t)throw new Error("Array options are expected to have at least an arity of 1");const i=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:i,arity:t,hidden:r,description:A})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:A}of e.options)i.includes(r)&&(t[o]=t[o]||[],t[o].push(A))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t,A)=>{const n=t=>{const r=e.positionals[t];return r.extra===N||!1===r.extra&&te)})}}static Proxy({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addProxy({required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Usage(e){return e}static Schema(e){return e}async catch(e){throw e}async validateAndExecute(){const e=this.constructor.schema;if(void 0!==e)try{await e.validate(this)}catch(e){throw"ValidationError"===e.name&&(e.clipanion={type:"usage"}),e}const t=await this.execute();return void 0!==t?t:0}} +module.exports=(()=>{var e={25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},44692:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143);const n={optional:!0},o=[["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":n}}],["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":n,"postcss-jsx":n,"postcss-less":n,"postcss-markdown":n,"postcss-scss":n}}],["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"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:n}}],["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@*",{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@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4"},peerDependenciesMeta:{eslint:n}}],["rc-animate@*",{peerDependencies:{react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.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:n,"utf-8-validate":n}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}]];let i,s,a;const c=new Map([[A.makeIdent(null,"fsevents").identHash,function(){return void 0===i&&(i=r(78761).brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),i}],[A.makeIdent(null,"resolve").identHash,function(){return void 0===s&&(s=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4YABAMGcdPAWzTk26B7cKV91I2b0V/GYvnsEQ1YGntRqi5EQqTlgZszbV/32GuZtUF49JOA/r4jAdwUOsbPo6mNoBlJPYjM5axrZaWQf33bFsLWqiyvvDOM4x0Ng802T7cuP2a3q98GWq6yiq6q3M77hcZlOUnmryctRYmI4Hb2F5XixFohkBmySCjU+M7/WQVE5YAtnlxiUJDhFN0y1tNeMWY9E0MfZi2rQ4eC72WXjsAA==","base64")).toString()),s}],[A.makeIdent(null,"typescript").identHash,function(){return void 0===a&&(a=r(78761).brotliDecompressSync(Buffer.from("W/FcOBIh6A6ch1ZVK40i2DgInvHffCZC2DiAvIWvCah18cYQrZVDa/kQEQ4XZxwaXi59suGHIFFfXWfmr0IJmQMP7OmW19PK0KsK5SYxdxHgNvEjYtHF8+nIpGt4SgFjJxzvMnPmcgWkZf/dcu8yBWrIo4GrcbzmZOymmo/mxEhL7W8rtb8/L6ULH2ZTGymt4QJec0PwjqSURuTYuiUt+jAODSoyTIZotkF6ZhSqYii2d5mCzodUEilSnPYHHo4Tw386mbIVBjAkKIFEHfCbXdLdW/o7Mf///Wlv60/gCRB0KbpPVHThNqmzlrXvOffMiPxjSfYayfYHpHPPvU+S9eT5gytjfwCoki5cJU2dpk2VtKmmq2X6AFAFqAP+32lKs1GkDN/Pkrt8XTAEBaB2E9z3JGVs2m6YogngJS8nobaQZWCeA6wnhjPsqkvPRLKI7U5fUV8BCfRuv51OsKkRPs2/oMdQa+XWahoDiIg4m/Z9NZsl7V2HF2xtMsTJCKicYjNJ7aJJ4eL1Eodhj8QXOXv+nKdTow0dTo7nN9/Z7UIU1SnAj1m2C3XH/DeYr1IN6y8IitfnlPmcAN+nnq/xq5/eO/1KqkT+0+r1PRB0Pvh+Ub5g8Pybvs7aHeWfKIpw3EgtDEM8P2M0gkZv1nqmv8K1tbyvLYTI6eql9WsDu5y8gNqUknZQ4Dwaet0UA9kGYNvvGQqHHH3luYI8lQ6oCLE7VfWzZX+0lqNBlmbNMMQjkOCis0UOf4FGjvIu5RdL8NSz+jZDQGOwKKKuTE/J+mguq593ldeIr4or+bYdB+QRhud2sws1L2vayvX5KOFfg/skZLX4TaK9VFUPtlHP2+LhgIgy0z8vkMf+C//KorgcXRrI+4CAnfe/ujwW3Mj/PyBD6onW8FCEe+peXk3X4ZJvg1mUTxBwsru4DUJPINKPzZo4K4uuy7qbP50yqA2OhihkP4UyfjXPaiXbEitEqr8t7SG5efEqvivbuxCunXXZVRML+WCKL77hHBIEzBLjy6yqalURyBM3ag9BZ66XVGEUGu2A46XgAePKR9ttVA8aQhhEFyHt+EttqQrZh9yJgSGDCHrXVxSVCdiUsn96jBQH7jbChqviu2fPOf58OQa6+HrcBiQx+Dw5QZp+Zt81Z1VMkht3EoZB5pAMmUI9+vldXjucFpbWmk/squdlnXsbuhMyRTKwH900D7j1+pzEMWtoDD5nQAUAmw7VFkGIMgmrFl6rfIVYyHc+32EPKQ0CMBaQPqHPFIgmBRKcAiWjeqDESwTMCbcFqKruw9giq4mqYUc7i3C9AEf94cLtWLIoOqiyK552po+xWCzAMimiHrMwGd5wbQ5qXJsT0HBTon46vyJ3WgJuVEPIUZqLFbAwkHUVviWrQB93Hd8D6iYMeaHsW1ybZLbjiEmQZG9gCxBJQiWsYWdyA9Hbk+irMysIVLgeRtQUFGSbnSzX4+WuFT9Z4smbUEe1T0UqysuJd6Y05HS1iW0TdZIfMMg310/loSTpcRLIYK5eEAKLmzCgvTw6G2wQWGSVcaNudsjm1mqvO3NyQLIh72PxETtQY3w0+J98q3SXXNVA311BZ7EA9KrIXEZvmamvvNq/mkMQgjwXXMeFwnlF1MLweCqhj5lZOEUXkfowsJDWBee5g7LJHpVQFM2x8rNQxJOCuPuep+cDsSvQDogt+5pzWEaV8/PEZitbZe6zxA6bgWfZcmy6+P92xgxnTNZclUMuuwznWlflqwiJhktYyiGgQqzr8TL98sOH3IWftey1510Sm3cphSZL9ep0yQ2a47L9CeqX85K2FlMUQsLTvZA95maPte32YAq6R23G1f0lFN70TFQOgdrPcfcZhVCiZ5wwfQNzNAIdaHSlKnFpXV7zshpE9hA+zpw58OSPPQnmn3gvbqEWXnL0kfseCAouvKEQRvXK6IuP8/zoG97OwxX7ZWvlUj/tgEKc5rXbCDtdqssmh/DzXll08hFbiyS3GlqbZhQAvn3CB67sL0NkqqoqiE2IkuOLAuPJul12fzZnUH0jDhQaW8w6npGBnijnAWJE2riJGVJaZTBOcV0XansNYvC4JCs63X5acLvOgVMxc1Xppm1y2K4Cd673zuT2b3kBY7ZT/BDPpzK3Xqu4ouvsIUCSr55SgnDQtKWZ0aHctitBD6gWgHjXXnAZ6JkHTINWpU1YSyhTUGQXeofkMgEBOoiGSGzEhviWhoVLirfjG5dVDuwBX+0CJxs6saCuWl4lcUDJtZUuhTokl+a2sn9xH5pZPQEgXrd2Sog/5bL9g/bw7YGKAQpBpuoD5DqT3IqhGi9wydUo950EipH9DzJbIuKEBGCyS0bE1xEJke8OSEmSpIhYCJJk0YiLR9rO2YtlgN4DTChrsFNc2SVezjBtsxZL1wxDfaF8SCXlxsBBVI0Qq9yhGiKp4VHnSjXPNnLinXj6V23yDdZ/AZpX3wlsqesJt5Bpcmk79QzhvsK1DXY+OlG9s32TGAQrp0AAF+ougTH0Xa18kH0pF6Vho3Aowqitr3B9h3Iwn6mNQYQQYR/UuE7nYMh5XIZ1TxQuxyDYBYsashrUu/FO/wmN8Fb2TF3VGOJQ3uM3716D6O7rWxZB5aBr8GoGMi/S90Slr/T6KYgQnGKWxjiMxUbjDDd+JxKFYqNiq1KcXoFVWxaYaKX1ZrDlvwbaXf/WVK+/KrEmRHCMZfyIYRuqm/txKMr6N6YNqKqtMw2V4DXEc6PLUyUN4fzFp4xA2T91nQrlSE4EvQxqccpXtmD/8K+7YODYDQ10dOeOXzjCE2m8WZpVSHiTuXVhPdzvJJyZu1oRlFGvV8d3bIiVWL9AVceaug6E5MKry/vAwff77Me6uw/cWW+91LN8fQdzbifF28uVdb1tzntRF02Bf4mibjahfCe7raRDybnAo3+7Ju5WUfNwGHwA3tycufPKDO9qCoe4x2Qt1OReQOrW/QGMH6plBLi+YFnXqqqumIHUo4Hz8BOd4J3uyWNCmu4miez92Tqx/8ZweI3NIv0u3AHQOFJMeaT+gcQr8e1lPKmg0xgdsL9u3O/Jx7vrXyAAgTNwVrhHGTl6dwiWCWXH6noXBn/uusJK2vMiwrq6cTxJyy11txwOPOrkXxMKFNTsdqOYFj7Q5bnq3rEi0NN0seR8yehzuY51fHDo2zSw2GDY6xee61g73DGhWmpWJtvKVozLtLpk7nkoVcr2RkmkLG+jd09k8YtIU99qeUCIMfRBxAVm2YLozKvCl7kFAEK844oF8WRhc3jnRe27eEdqCjxdIwCwRGmoCwsUiTlYX9TlbVy5954Jf/rm80bf10NB9l2EZXsz0ZRXTV7uFgCYYBh4sbAaw+0Xt9MY7n25RwCAB8nKTLTl2OaiMW9jO1Dvtw7+Bh/odHtnwj4U0Zrj23m4rwJAcz7u9/f9r32elLsc3VT05m1UVb1oIDyP2sCxywj2YUgf34b0q+yXuQUAbAys+a4o7DQQ5LQjCO7ERFojABBuL2HjNrOZJHfifrPP3jH480TXwWbv5OxI72J2TMsAAHAh5eN5AfQkl60xadHVz5YJMtWqsk9xQYaqzvXDDBTbXEr+JPowCJsfsNF4mu+ItnZ2TL8FAHArqSyemDyQSJV8QkJ1aZIVJK5Lld3dAfGe/9YIAFhTEJqqsWLwgMMvzj0ugc+ruyEry+t4JTMuem0BgCIGzhgWBi7Rnqcxo19plwBAc3pK9PW8bGcQ2r855VMrS+iIGMyOaWwBAEEZNnaFZ4Fso70KM6Ugb1ojAFCUkaSxIgB+gLwfut90kQgNCMzyOp1XASA4i83QuIuvRtN+1XTr33Z6yzQvNkvuiBjyNZ0tADCLbLwxhgcDTrY3lRVlwPpGAIDbSs94D1paZuL32gGugJbWDQP1rpP6jFxkCpkd0zIAADxpNqVxrYHiZ6vwbLYSNHbbF0DZDPscFHeaXkz1I3n0+pDcL6DK03xPXO7ZMf0WAMD4pCWNa+0tBk8Bz6xN0dhp1yG4XiZSMwGAUBEGNNHM7zv0T9q5kQjLMhvSGJc9twBAGTW3C8KeQmAtE0b7MbheRsolAHDcB/V1824R2U744UT7YIW4LP4f13puAYBaBG4xYQiHgUWG0W4G12SkbAIApiJowIS9+eyRJdkhFSkxy/rXfRUAkrNY7vHkJ6Bove3NGKW5V39r+ZbdisZBqfia9hYAmFF2v5zhDgZouBsDTGsEAIzmLU/RIouvUlKCnmtGbmPV4mwkcDrpbbDwQj3ObFkf4F3qViC0d5N36kWqxySsWDscFymZAAOTRkcWeadIiIG/v4kF2Zn/8hF42ihb5efkULxFNXCk12cf7DJPzb/Bam929Wb57xsFoQOGcjr4iMks/kBBnm3wgfGz346J1f7kG/vanr6DerdxwA+RkW7zO+V6gsK5fi2fU7vWYmW7Pqy56+wTMoIPRxBJZ2FMoBq5tQRvAn2Xy8HcC4zH7yHeTG8B4+Gdad8tSjtq05zy0AlhMpOhlq3CX1WXPYNlJz9xc/ni/14GuTHUMv9HjhIEXszSK/pB0YjgCIGqAg3xePZRMdoyBIZpRoZpxla7kvl1MmHdA9MfgTlIJ+U97thWk+IYrYV9xN7HpmrJJL2ptRJASRqiW8t6ioqJpUDOrQ3EtFgdV6nL6LqwyND5aCwGFEo6dk3v4C8t9xgbiBGVy+uoOC8B+XseGAKz5kCmdHTidAb8cSkwuzQ5nKPQ0/wcK1/1NHaTDkt3T4Lv8NnnrsMt3dt7ykXssMtPueKKaqJg6U65mwYK0l7IKT2FaWrx8z8hKkcguliG6Nz7AC30YGBSSwT61FQWVdj3XzLGAB/3UyKQvhV+a/pYJNVVgZBF25fZbgfYxErIWPWh+JuVQ6I8Ga96oBdXg0dCCBO5w4bn+BWb3870n59iNsgjO1vH5fojuOHnnO54jwdEhKutrDxeWbwRh/5d4412T6w9MANoF1osCYhwwSOl/4WKHP/FM0yTJsdcYkoeFRyKEvO6x9A+hdFieS725qEJ0n5X5vl4YgI171qxwRfJt7Br+0mRh0UyhOwhJluuBMbrx/tZ3v9F+hH76Ypps58XLdnD3SA5H7h5fOPOE+qz/dRdCfC7qJjF6hvjZlTCsGCJSVjOBW7U26imcAgA7P3eSOwsVQvPRVnexvXr1pdztnXHdpDlk0na/DTWMj5exJwae8NClgleOwUR9qsXe1NisBmhvjzZ35YndxpLIwpgzpJpLyp7I9SxXx0BpvfXoWm7eJ6TW6dI/jgr49IZ9gyjG4sKYlnCRt/JBUuLgekouBmU6q/MdkJms4SBEH8P6MRcd++yTZYMYj7dX2EyLOOZ8wNVjn2YCEp4HKxSHgfrfRG8DNDPAJX4iJcB+ulMyY8xI2UlsuXRhzYCrWYsQ8mOM7GIRUu7iPheK26FN880OZmO9XO4fejbSnPKSmI3P4XE3CTWw1TPr7CC4sR5psE3apN0dmKn7Gp6TjdN+Dm6R4AkwPZtmnyreHZlsvAAmZZ14XTcAGJ6nRKEU+F8OgYopE5hiarElqwxc8Tm+Vj7XBCXNauBHxNtbd6vbHG9omNwyUzasZiNsqHSoD792EG8/1QHlwq7m1b1I3zUZPSIjWADVrtE5tZoUzYNa+AkvPw5FJdloZhmLmEP2sLpnj0cTDz1C/dGtscnJsecHi1v7Zr9ri39/09oRUw2qdon+Qr0fOg4UtOeVF32TMUb5oyyivv8Z7VaJKJYjeH2oxWngBfOka98OwqV4I3C2WLlmekdmHZdGnnQXCu92bXZninOFYxxpb4TmmBp7iUwRuaB2ygBjo6QBRzKO5ix50nF1BoufK12rNI2I00bfN0sQWKm0smf2WU7NcCkwj8dS+cTinRq4iULpFxpfsfWrpg3jqfs/8ss3VdmoIuKnqFtKdcM1ez6EgGYUvjidNQkxWoyzYZoSciqwR4qoa5DNd3QMS0eBN7O90ppGzkjTd6PZnDGss6wqZdndMsAgI3NQWMKnw0a7bLRFE0AQCLFljsgI0vghrPkuaRvT5whk5Im9SK6YY1anFpvFbyjR8+IlveZGaxY1gp44l0GAEAamh/JOA5G++4YX6MeTQBg9UZnW34Fms4U6GPIyuzzgu+ynopIasitFu/oZn7T8hgaeeouFYAxNfIaDq7FYx9+RvfNeBo5Lo6lGay1rLVg27cMAPjY1LxySWEXddpZNujRBABSooUtF0DrbAAJUTvJsg+//rvXH7t2b0B/cR0xXfeNuN/bFFjDT8chEsRhylcGANxIWEY+wa5AmeNzEem2kxDeqWM+M+SJWEtiOQ3sxOMDXrITisFEBEpVmDU2aSMJMTAiI5Z9YhAU9tQqxC/ODrRpmW29kWZDVFFWMa5ptrMNgkz3i7iYTUu/YoxiNTUcmnlrJEl1ikC9kt0yRIZVylFtnv0SQkjzlj4Ip+Qpg9Q5EyyyigB3p82NTNAktJjqxyT5vei0Y5baBF1qOXsf+gkLz1mnHl+mKCxY5BKpRmLi1q4wKFRDmQuoZT90vl0lT66J3p4qOxCDcHq0K7g9d10c9hlxSZZ2XB+dy57miYO7dXnMBLJUEYa1OCMa5Ul+7B1TYD6LaqgJSXW5W3SWLtokcZDp5rgtswslQ2NGFVm2KrRwymHmER9ttY19Iz54lrKO636M0t6x+sxlERbmNLq9BT2d7myJ0Ex7JxbgLkjB6sRj63ZHAUlONO0IN2/4zrZ3keMMwyMOM2fmFlXcBfVRhUUTAKUDRjh09MgjcXx1DQNiA8i0ZuDCKzutc3Z8jDxadOL4DowZMSJkQox6cWIapim9/0r0xnhb2CN7XIticq7Ju4XxSiQ5SDcZzqHeLsBn2Z090wYvXSniHIWlUiQOpMiUb4H3XX5Qfzz64qQwcPN9oB02j1V7Etbw/1KWAQD3JFsqCGcp3OKp5FxlR9W0shmhePxfJgCA2tluo4tX9+EUdxcv4Xn4fYzVi6BsIB4z9foY5TOa5JQjgNdf/c6W9nHwDc8/jy+Dy22AL6iyC84B3mNQPtImC8vHBFaOQNyKStZwenxxDt1Li239jQ5kny1KlT/qiNK44eP4NWzlUQ6lSgKZSV7fF4d9krlxOQW1wFsdTe9hVjYfRa9PwlHVU8AoHA63ofvfPSlm75k8DmCz0I+OqFvOqWNDV36/0gF+Ao7qyyCJCUOvUXMYzy5PVddZbGUjtUjWNxrEaHfncPCj3uWzqlMDsIUSS4TqWAujopMdFFM70PHTqQ5YYSWHK5nC+Qr2xOoYkOStnASeQiWLXyWz5bPKX27O5321gJrerr9lKDDPXFw2S9XTNEH2K8sfJqS2GFgLs+Ey4vWKUDPhSVRWlg+gIjz4s0u/sA5+adYGgMtEyDS4Gst6VTQC73qXAYBdkNYQVhpKG6iGbnsbJPg0AQAZnC273yI4932UAGC7GDOrZPI8gHdKmlKNiL3kU0OHqXljSR5w/aMpVaUimldH5QAUiBC4cZpq2Gqf9OnwA4eMf9vWoCxerZQDUEBC7C7hKrI/v6LvrBz+vlNBtJ/iEeIdFZufjlf3MAKQ/t4yAIAIYNYQRsuhUpDltjdBhkcTAGgy7mzW/R1DI79JAEAjau+qP/BzlJ9l1c8hrc18rJ3R+73NyD4qNj8dg1hHrci/UsoAABuhtMcipugb7tj8FaFrjiWHXTBC000pzd+KTzCV7wtLOm/Goc/9qM/DXDRKbTDEaRE49rnia/0r+aig6OJu98nPtWL8D7poAExnVP9zrztM8KWD8I0V67r77SdxEb4ObIqSS2zJDlN6CPsCgZr8Rnm6yaqYINI/FbUEnBthfhyjqp/TjQnSIYg9I4lk16sSPgMXzenMoJmH2vvxZI+56SBa/kJpK9PuCvK6H09vUu9NDzrk2UWpboZR54HRtC7K/LpSDl2D8LllJ1Ari0Rx/VsIRDBRZ+DU9NAjjuvDj+ON/aevT0499ictH0uH+omcu/Q7nti1GSZ3GJ3lvhIriXjHxNnQwdBffpaINbFHk3c9O/dN5PB0capHMBvmmT6bIWMlMh/aIiCga8PFvLdpG8ZUNbK3hbPErumX956RUrU8zwAAIKudmSx5e6fUWYc4Ss9f2xsMG86uaUdaBVo6NT/Ihqf6nucPfTvgKneER0QY6w3G916EX16I+QzolTCEFhl0bw5D7M9hg4vYLyHuinEkb8pE/3pL/noFCwJldDApCB9UzzxVsivBeTF8jVkDUx0Drdic4NGtZnEaaZViqxN9mLIhkAc3MKUVnurfEd4XTS3TSdshMDo7JtNkkDpzYrOVBiHFOUdWZjonWbH9lW2Oy1HYSAbE1x3faZFPFDcjhrkwUNDQuLl0HJV2kCq5Wbttk6d9VCYaZPiFA/QDwuPVFvn3FpS4Y3ggY+ruB1eU4TD+rRFIKXgP41IQF/87cTrPPABh/BNbN99Ue2W4pdzgO7hi1hQ73CCr2bGmpNPZ+rxwjyzX7/dfqVrAOjGee2FCTlbMVRMsSnFICneBI0p0P7fiGgswtsGaIetoRBmul7PWTzuiJFKhLUFfu4RdnZIDpJvCcuZGyEArU8bO/uLHx2HIi6tc5Xwiany0e0HABk2MxyD/zrSKY95+9jSdhp9tIExP1IN4kl849mIpdioNxuQQ6hABjIPm6OtD+6e4gNg0WGxoj/NsQW++gQ0mtGicAbhTSTe0P+17N5SBOlHQC6/wl1SlQdlORugyBRhmsb23jf2lTNVL88eCFpMTziomFZwxo5Q6CQk/JqwyifxvmAJaxkCF5QwlVqC4z3jq+Lw08+hqj6pE2zrb5HIUTd6MYYjJ4NHpyzPL5lyncUQcV8YjotIL3MiK3nk3gM88mV9JfK4jMzYrywiw2bJojg/rQ7Vpl1YS4CtGkius6/cGdMW1xkSug0Dpz5mqyKUX4gUYPFtzOaEf4wpJQeWqw8G8qgPfyvt/DVlaycH0maKvYXGLrpkrZh8uUom6R5QlrURpW+ipEmb7UUjQ6A9TmEj4qUDrBxU76J6zevRY40Lbwn1osRM+CxLPIMz7vSBi/hFlD26WzreghT28j/FZhMYP7bw/4PADokSKSObb/FlPNH9iQPstfzG4+fKt4yq4D4KyqsHOaxbCGv6fZhkA6AnsYRFTHHZxiYq7CDe1LBntrFFNzjUUXyYAQNwb62xd7apH/NcrRVMHv+Y9M6wEn7UKGIunNrphT59H/UTC0T7g4TDwytGVTdKFPOHrga7gH3pCQeJysXXE0qUdAGvRMRW+qRoRmrn+Pgcan3oTGLMBGexXQ8UOgRChxIfoCAwvkkzCH/RGfyta6Qddx9/i0we0+n+6ZSs2V5Q4gf+he66gprH10gIxSkAjinQyYKx0OFTsQNezLsvOJW5jC0g0GtMrZ3yvzX4S2HaLtRjiQ25nsFrDWDEnu/jHBXfLGM1wrPi5ksyn1s3Ocqi/fx2cp7txkpD/Ws5rs2QK/wPsYA8aXPF0/y7MvpHHdfMkCNIPsh6/IGx9gjZWbW/87rOdMxdzx2Nkj4W4L0zNYiCJRKMeDVg9BoqX/1svOUcRbGA1p2JK6ZkZfR40qO2aHNt1+1hQbyLQ6R0UNiy+4e3yp6Od0wAOBMj4hyWxru6DIPYPImGTzsW/n2AY3nxGXgxoLoGWOJ+vriBIdw7sCf08pH50Wbv+qsFHJCbOAD4JKzvrWkeUp56C1Uk50iWcq3WqUc40flU/alss/yMZbnSpM7R8ltU1G9wX1hmtJBkEwwUlc+tCxqJuij63yvqz83pZt+goa4eZDVzxoBFppzc+4fzEdqfudBvewAsLYbbDY02WLBELcV0z9ObN403Jt7dm8d3VPKI5RGxl+YyGiWS4m8GM2hCWN+ZvkArN4YECTtiBTqBR0I1ibkBzI8IwbRmHftxJuINreGR/csqPD2tgE2A5NVwKI+voAqwo8uPCktOM/t6zVwVT7VGngF46hwsG2oHgx2HPXmAHZo1rAIPulTSCp5oilyjw2NrIl9PaitujpaHN7+jNaULD2AzkumRisjImr0RfPuJM98gx3f4y+6WsnoMd1Xf0Vh7Ff67pn23t86tGVEnuYSJs04jEPrSc0RltGtVpkYVmOMtHlc68iVXARONK+ayG+EYI67C6iYV5gbXEBB8AHn09O8+lT6S6WAbe2xrCgRl4Zyyv7L4dErOrfdETYn5K1xuwvGdkyW668O9kOkIFcW5p7H6ha4tqhZ0M2cpFgzu5hF75qA/E52nahIamua94cVeYpo+qvXoYtdqgSlYoMf41/GdNtpm6ghK+izIHHaom4BPpD05vX/0B5mzDZUlo1yhLKj6BwdI0roKYLYEPfRgm7LzAK2Oi3mbJZaxr5zFLjRG7uBKXBU1bt1HyjYbLIS8M5w4GBisqn6HtmpUed+jRy1Vx4jDpQr0c56QZkSh4BtZt8D9bzLjJEOlslW91s//RI04wc8Tz4ipVCo4xCStcAzthSKQHcdRaINJ10ZYw3Wz5mpaZn+LxXt/vmvgrrpdzIxLD0sEYNkETL5vd3IEQMBWezGcX5dsyelfviI+UuL2r0uKYYT86gNKsiB1DIADbwfbvWxzHTxDH4YZ9R/NxVG99oQJGRswhLSxcU/SDVCNXy9/lGYP58wtTcn76+Jv+NfJu+JNPzKgB/9CSkcSPUSX02ervznnjb/pgoPLEXLsT2Rj8TSZsCH+ZCA6ES3sx88LI1um3943hU9ljufH3EvqCCjJAGoz9nNDR7Of0OlI809V7Sa0GfVKHpJmMxb2r1659xum0U+EfBHxMm33CEyOARZkx7sWaX64v4kJWK4FhMYeCZ8OUA+rZRz6mkShmrwVmWyYd9C2c9q/zQShF/NsT9VAJ5zkdp65hqQ5fk3+lKwMAMYLTx+LbxH4JCiUsJn2oIXHZiSOzR6ld5M0EAIJuRWbAhQWbnAGnSvTulrHr/V4/ABAsQKoItQawnZxP28CCebFcwHILf7oBTLgEd4+yyQDv2e/UNS8k1VmSDROyajopsSVAd7nZeQAcc4tVAFYXs/cMcJx/qwGAW1a0ACKCblODHJ7XGFpH5mItwazRQJy6AgmgbP/hOPwSahh+f+uNT9+E/Cmzzz7ysnh1ChJAfUSxMaUqMmq/Z5orjrqpsrue2ojiDdKxqumDDBPCKqZSlgGAlsBuFmYwjXAdUlz2wa8ax0uc0vt67NEEADCM6eLa3IBvs/SuGOry9gMAKDDbidKBm7aPAk+ssRbMcv9sMM4x8IIWubciRKVw3CZKjdYv4n7bQP7AtAViAjieIm/YPA45OE4heshGWhkAsBI0yML8tBHaLYbDvm2E6Q0jMz/2KeVEgysuNC+AYxKLP1eOgFviJ4/YjbnnEhBn3kngeHEum8dY8kMvLk5HbHzX3GWLfa1Z//wfnusE/h/cYoshJBI+zPp+VD+Q49k/sY5uq1k/TeH7I/6fpxQ1MRxHKY6Z2zzAKEUOJRfeHZ+nuHeGMyYYpTRHRYHAiC9TIu4vN0HlHrpaVcH8a+dB77Jrf1sLT+B4yrX5xuojB1vHsYevaZYBgC60JLhtFobwSlJVFJMd53AxQpijfD8TAFjkfR/Yw99qDbg9W3+YscPAc7QG+Z8c5+jnbEk6r1bomKu28KorqLO4MRGOP9e9tMUAwIqGjnhtko2uZB5WWopPpZ2zv95V3bRYvWZ9Eh6k4ejxt2FdXDYw7PiZc/bXuwZLS4EAHrmE4S3rHTh777zE7mgdQ50lVwbhLi4jaf2F2jS3efBn+lZ5WbFiGQix6z8VMIcQa1ayYRUhVPXHGz4Rcmc6FdFdiM/huM2ItfzHq3kED0i7fwv5ERyPas1Px1a2CfW9j9B5v/F6j9N6ITd94ynPgj/EqoanEh2eZQCgW3LuyifOfPa9ZIUkHRruWZohiTJd0WgCAO1WFGJ3KjYQd8IHoLtUbiXGtvr7BQGAprnU1RgHarbpiigwtXYPkAIzZYmxUmDQrh8kBThxClZSgKQt33NMlZJJDQF1lShpxMud2jI3GxDwdm4RCLCumJ0l4DD/zhXgVllRiojI4LhN9O6gnD9+XGN+a4MMkfEb6w0kgLr9hyOE4zYh4db4k9Dj6W3ywyuCzPyN9QsSQIFEwT+6ENP9JfKq5D3AK1nB5F/kPT8BHPOb9XiQZ1l54OqUZQCgzgguA9WawfQhLs/5l9E+PVZOQWefJgAwB6ZdGxZYypRTMz6R1yAAaIHHTtQSXGX7MOBea7wNHrl/AnjoGKjBiPW+AQ==","base64")).toString()),a}]]),g={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(A.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{var r;if(!t.startsWith("compat/"))return;const n=A.parseIdent(t.slice("compat/".length)),o=null===(r=c.get(n.identHash))||void 0===r?void 0:r();return void 0!==o?o:null},reduceDependency:async(e,t,r,n)=>void 0===c.get(e.identHash)?e:A.makeDescriptor(e,A.makeRange({protocol:"patch:",source:A.stringifyDescriptor(e),selector:`builtin`,params:null}))}}},10189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var A=r(36370),n=r(25413),o=r(54143),i=r(40822);class s extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){const e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");const t=o.parseIdent(this.command),r=o.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.stringifyIdent(r),...this.args])}}(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],s.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],s.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],s.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],s.prototype,"args",void 0),(0,A.gn)([i.Command.Path("create")],s.prototype,"execute",null);var a=r(39922),c=r(85824),g=r(63088),l=r(43896),u=r(46009);class h extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){return a.VK.telemetry=null,await l.xfs.mktempPromise(async e=>{const t=u.y1.join(e,"dlx-"+process.pid);await l.xfs.mkdirPromise(t),await l.xfs.writeFilePromise(u.y1.join(t,"package.json"),"{}\n"),await l.xfs.writeFilePromise(u.y1.join(t,"yarn.lock"),"");const r=u.y1.join(t,".yarnrc.yml"),A=await a.VK.findProjectCwd(this.context.cwd,u.QS.lockfile),i=null!==A?u.y1.join(A,".yarnrc.yml"):null;null!==i&&l.xfs.existsSync(i)?(await l.xfs.copyFilePromise(i,r),await a.VK.updateConfiguration(t,e=>{const t={...e,enableGlobalCache:!0,enableTelemetry:!1};return Array.isArray(e.plugins)&&(t.plugins=e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=u.cS.isAbsolute(t)?t:u.cS.resolve(u.cS.fromPortablePath(A),t);return"string"==typeof e?r:{path:r,spec:e.spec}})),t})):await l.xfs.writeFilePromise(r,"enableGlobalCache: true\nenableTelemetry: false\n");const s=void 0!==this.pkg?[this.pkg]:[this.command],h=o.parseDescriptor(this.command).name,p=await this.cli.run(["add","--",...s],{cwd:t,quiet:this.quiet});if(0!==p)return p;this.quiet||this.context.stdout.write("\n");const d=await a.VK.find(t,this.context.plugins),{project:C,workspace:f}=await c.I.find(d,t);if(null===f)throw new n.WorkspaceRequiredError(C.cwd,t);return await C.restoreInstallState(),await g.executeWorkspaceAccessibleBinary(f,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=i.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 `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]}),(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],h.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],h.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],h.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],h.prototype,"args",void 0),(0,A.gn)([i.Command.Path("dlx")],h.prototype,"execute",null);const p={commands:[s,h]}},34777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{dedupeUtils:()=>A,default:()=>We,suggestUtils:()=>A});var A={};r.r(A),r.d(A,{Modifier:()=>o,Strategy:()=>i,Target:()=>n,applyModifier:()=>S,extractDescriptorFromPath:()=>N,extractRangeModifier:()=>v,fetchDescriptorFrom:()=>K,findProjectDescriptors:()=>k,getModifier:()=>D,getSuggestedDescriptors:()=>F});var n,o,i,s=r(39922),a=r(36370),c=r(25413),g=r(28148),l=r(62152),u=r(92659),h=r(85824),p=r(15815),d=r(54143),C=r(40822),f=r(61899),I=r(33720),E=r(46611),B=r(71643),y=r(43896),m=r(46009),w=r(53887),Q=r.n(w);function D(e,t){return e.exact?o.EXACT:e.caret?o.CARET:e.tilde?o.TILDE:t.configuration.get("defaultSemverRangePrefix")}!function(e){e.REGULAR="dependencies",e.DEVELOPMENT="devDependencies",e.PEER="peerDependencies"}(n||(n={})),function(e){e.CARET="^",e.TILDE="~",e.EXACT=""}(o||(o={})),function(e){e.KEEP="keep",e.REUSE="reuse",e.PROJECT="project",e.LATEST="latest",e.CACHE="cache"}(i||(i={}));const b=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function v(e,{project:t}){const r=e.match(b);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function S(e,t){let{protocol:r,source:A,params:n,selector:o}=d.parseRange(e.range);return Q().valid(o)&&(o=`${t}${e.range}`),d.makeDescriptor(e,d.makeRange({protocol:r,source:A,params:n,selector:o}))}async function k(e,{project:t,target:r}){const A=new Map,o=e=>{let t=A.get(e.descriptorHash);return t||A.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const A of t.workspaces)if(r===n.PEER){const t=A.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(A.locator)}else{const t=A.manifest.dependencies.get(e.identHash),i=A.manifest.devDependencies.get(e.identHash);r===n.DEVELOPMENT?void 0!==i?o(i).locators.push(A.locator):void 0!==t&&o(t).locators.push(A.locator):void 0!==t?o(t).locators.push(A.locator):void 0!==i&&o(i).locators.push(A.locator)}return A}async function N(e,{cwd:t,workspace:r}){return await async function(e){return await y.xfs.mktempPromise(async t=>{const r=s.VK.create(t);return r.useWithSource(t,{enableMirror:!1,compressionLevel:0},t,{overwrite:!0}),await e(new g.C(t,{configuration:r,check:!1,immutable:!1}))})}(async A=>{m.y1.isAbsolute(e)||(e=m.y1.relative(r.cwd,m.y1.resolve(t,e))).match(/^\.{0,2}\//)||(e="./"+e);const{project:n}=r,o=await K(d.makeIdent(null,"archive"),e,{project:r.project,cache:A,workspace:r});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const i=new I.$,s=n.configuration.makeResolver(),a=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:A,fetcher:a,report:i,resolver:s},g=s.bindDescriptor(o,r.anchoredLocator,c),l=d.convertDescriptorToLocator(g),u=await a.fetch(l,c),h=await E.G.find(u.prefixPath,{baseFs:u.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return d.makeDescriptor(h.name,e)})}async function F(e,{project:t,workspace:r,cache:A,target:o,modifier:s,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return{suggestions:[{descriptor:e,name:"Use "+d.prettyDescriptor(t.configuration,e),reason:"(unambiguous explicit request)"}],rejections:[]};const g=null!=r&&r.manifest[o].get(e.identHash)||null,l=[],u=[],h=async e=>{try{await e()}catch(e){u.push(e)}};for(const u of a){if(l.length>=c)break;switch(u){case i.KEEP:await h(async()=>{g&&l.push({descriptor:g,name:"Keep "+d.prettyDescriptor(t.configuration,g),reason:"(no changes)"})});break;case i.REUSE:await h(async()=>{for(const{descriptor:A,locators:n}of(await k(e,{project:t,target:o})).values()){if(1===n.length&&n[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(i.KEEP))continue;let e="(originally used by "+d.prettyLocator(t.configuration,n[0]);e+=n.length>1?` and ${n.length-1} other${n.length>2?"s":""})`:")",l.push({descriptor:A,name:"Reuse "+d.prettyDescriptor(t.configuration,A),reason:e})}});break;case i.CACHE:await h(async()=>{for(const r of t.storedDescriptors.values())r.identHash===e.identHash&&l.push({descriptor:r,name:"Reuse "+d.prettyDescriptor(t.configuration,r),reason:"(already used somewhere in the lockfile)"})});break;case i.PROJECT:await h(async()=>{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)return;const A=t.tryWorkspaceByIdent(e);null!==A&&l.push({descriptor:A.anchoredDescriptor,name:"Attach "+d.prettyWorkspace(t.configuration,A),reason:`(local workspace at ${A.cwd})`})});break;case i.LATEST:await h(async()=>{if("unknown"!==e.range)l.push({descriptor:e,name:"Use "+d.prettyRange(t.configuration,e.range),reason:"(explicit range requested)"});else if(o===n.PEER)l.push({descriptor:d.makeDescriptor(e,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(t.configuration.get("enableNetwork")){let n=await K(e,"latest",{project:t,cache:A,workspace:r,preserveModifier:!1});n&&(n=S(n,s),l.push({descriptor:n,name:"Use "+d.prettyDescriptor(t.configuration,n),reason:"(resolved from latest)"}))}else l.push({descriptor:null,name:"Resolve from latest",reason:B.pretty(t.configuration,"(unavailable because enableNetwork is toggled off)","grey")})})}}return{suggestions:l.slice(0,c),rejections:u.slice(0,c)}}async function K(e,t,{project:r,cache:A,workspace:n,preserveModifier:o=!0}){const i=d.makeDescriptor(e,t),s=new I.$,a=r.configuration.makeFetcher(),c=r.configuration.makeResolver(),g={project:r,fetcher:a,cache:A,checksums:r.storedChecksums,report:s,skipIntegrityCheck:!0},l={...g,resolver:c,fetchOptions:g},u=c.bindDescriptor(i,n.anchoredLocator,l),h=await c.getCandidates(u,new Map,l);if(0===h.length)return null;const p=h[0];let{protocol:C,source:f,params:E,selector:B}=d.parseRange(d.convertToManifestRange(p.reference));if(C===r.configuration.get("defaultProtocol")&&(C=null),Q().valid(B)&&!1!==o){B=v("string"==typeof o?o:i.range,{project:r})+B}return d.makeDescriptor(p,d.makeRange({protocol:C,source:f,params:E,selector:B}))}class M extends c.BaseCommand{constructor(){super(...arguments),this.packages=[],this.json=!1,this.exact=!1,this.tilde=!1,this.caret=!1,this.dev=!1,this.peer=!1,this.optional=!1,this.preferDev=!1,this.interactive=null,this.cached=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=[...a?[i.REUSE]:[],i.PROJECT,...this.cached?[i.CACHE]:[],i.LATEST],B=a?1/0:1,y=await Promise.all(this.packages.map(async e=>{const t=e.match(/^\.{0,2}\//)?await N(e,{cwd:this.context.cwd,workspace:A}):d.parseDescriptor(e),i=function(e,t,{dev:r,peer:A,preferDev:o,optional:i}){const s=e.manifest[n.REGULAR].has(t.identHash),a=e.manifest[n.DEVELOPMENT].has(t.identHash),c=e.manifest[n.PEER].has(t.identHash);if((r||A)&&s)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(i&&a)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(i&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||o)&&i)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return A?n.PEER:r||o?n.DEVELOPMENT:s?n.REGULAR:a?n.DEVELOPMENT:n.REGULAR}(A,t,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[t,await F(t,{project:r,workspace:A,cache:o,target:i,modifier:I,strategies:E,maxResults:B}),i]})),m=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[A,{suggestions:n,rejections:o}]of y){if(0===n.filter(e=>null!==e.descriptor).length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range:\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled):\n\n${i}`)}}});if(m.hasErrors())return m.exitCode();let w=!1;const Q=[],b=[];for(const[,{suggestions:e},t]of y){let r;const n=e.filter(e=>null!==e.descriptor),o=n[0].descriptor,i=n.every(e=>d.areDescriptorsEqual(e.descriptor,o));1===n.length||i?r=o:(w=!0,({answer:r}=await(0,f.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const s=A.manifest[t].get(r.identHash);void 0!==s&&s.descriptorHash===r.descriptorHash||(A.manifest[t].set(r.identHash,r),this.optional&&("dependencies"===t?A.manifest.ensureDependencyMeta({...r,range:"unknown"}).optional=!0:"peerDependencies"===t&&(A.manifest.ensurePeerDependencyMeta({...r,range:"unknown"}).optional=!0)),void 0===s?Q.push([A,t,r,E]):b.push([A,t,s,r]))}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,Q),await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,b),w&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await r.install({cache:o,report:e})})).exitCode()}}M.usage=C.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\": { \"\": { \"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 For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]}),(0,a.gn)([C.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],M.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],M.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],M.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],M.prototype,"caret",void 0),(0,a.gn)([C.Command.Boolean("-D,--dev",{description:"Add a package as a dev dependency"})],M.prototype,"dev",void 0),(0,a.gn)([C.Command.Boolean("-P,--peer",{description:"Add a package as a peer dependency"})],M.prototype,"peer",void 0),(0,a.gn)([C.Command.Boolean("-O,--optional",{description:"Add / upgrade a package to an optional regular / peer dependency"})],M.prototype,"optional",void 0),(0,a.gn)([C.Command.Boolean("--prefer-dev",{description:"Add / upgrade a package to a dev dependency"})],M.prototype,"preferDev",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"})],M.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("--cached",{description:"Reuse the highest version already used somewhere within the project"})],M.prototype,"cached",void 0),(0,a.gn)([C.Command.Path("add")],M.prototype,"execute",null);var R=r(63088);class x extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await h.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const A=(await R.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!A)throw new C.UsageError(`Couldn't find a binary named "${this.name}" for package "${d.prettyLocator(e,r)}"`);const[,n]=A;return this.context.stdout.write(n+"\n"),0}return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async A=>{const n=await R.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(n.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of n)A.reportJson({name:e,source:d.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of n)A.reportInfo(null,`${t.padEnd(o," ")} ${d.prettyLocator(e,r)}`);else for(const e of n.keys())A.reportInfo(null,e)})).exitCode()}}x.usage=C.Command.Usage({description:"get the path to a binary script",details:"\n When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the `-v,--verbose` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([C.Command.String({required:!1})],x.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print both the binary name and the locator of the package that provides the binary"})],x.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],x.prototype,"json",void 0),(0,a.gn)([C.Command.Path("bin")],x.prototype,"execute",null);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=await g.C.find(e);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await y.xfs.removePromise(t.mirrorCwd),r&&await y.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=C.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\n ",examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]}),(0,a.gn)([C.Command.Boolean("--mirror",{description:"Remove the global cache files instead of the local cache files"})],L.prototype,"mirror",void 0),(0,a.gn)([C.Command.Boolean("--all",{description:"Remove both the global cache files and the local cache files of the current project"})],L.prototype,"all",void 0),(0,a.gn)([C.Command.Path("cache","clean")],L.prototype,"execute",null);var P=r(73632),O=r(44674),U=r.n(O),T=r(31669);class j extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0}),n=P.convertMapsToIndexableObjects(A),o=r?U()(n,r):n,i=await p.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(o)});if(!this.json){if("string"==typeof o)return this.context.stdout.write(o+"\n"),i.exitCode();T.inspect.styles.name="cyan",this.context.stdout.write((0,T.inspect)(o,{depth:1/0,colors:e.get("enableColors"),compact:!1})+"\n")}return i.exitCode()}}j.usage=C.Command.Usage({description:"read a configuration settings",details:"\n This command will print a configuration setting.\n\n Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the `--no-redacted` to get the untransformed value.\n ",examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration","yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'"],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]}),(0,a.gn)([C.Command.String()],j.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],j.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--no-redacted",{description:"Don't redact secrets (such as tokens) from the output"})],j.prototype,"unsafe",void 0),(0,a.gn)([C.Command.Path("config","get")],j.prototype,"execute",null);var Y=r(82558),G=r.n(Y),H=r(81534),J=r.n(H);class q extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.home=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new C.UsageError("This command must be run from within a project folder");const t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*\.?/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=this.json?JSON.parse(this.value):this.value,n=this.home?e=>s.VK.updateHomeConfiguration(e):t=>s.VK.updateConfiguration(e.projectCwd,t);await n(e=>{if(r){const t=G()(e);return J()(t,this.name,A),t}return{...e,[t]:A}});const o=(await s.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0}),i=P.convertMapsToIndexableObjects(o),a=r?U()(i,r):i;return(await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async t=>{T.inspect.styles.name="cyan",t.reportInfo(u.b.UNNAMED,`Successfully set ${this.name} to ${(0,T.inspect)(a,{depth:1/0,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}}q.usage=C.Command.Usage({description:"change a configuration settings",details:"\n This command will set a configuration setting.\n\n When used without the `--json` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n When used with the `--json` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n ",examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",'yarn config set unsafeHttpWhitelist --json \'["*.example.com", "example.com"]\''],["Set a complex configuration setting (an Object) using the `--json` flag",'yarn config set packageExtensions --json \'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }\''],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",'yarn config set \'npmRegistries["//npm.example.com"].npmAuthToken\' "ffffffff-ffff-ffff-ffff-ffffffffffff"']]}),(0,a.gn)([C.Command.String()],q.prototype,"name",void 0),(0,a.gn)([C.Command.String()],q.prototype,"value",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Set complex configuration settings to JSON values"})],q.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-H,--home",{description:"Update the home configuration instead of the project configuration"})],q.prototype,"home",void 0),(0,a.gn)([C.Command.Path("config","set")],q.prototype,"execute",null);class z extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,A]of e.invalid)t.reportError(u.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${A}`);t.reportSeparator()}if(this.json){const r=P.sortMap(e.settings.keys(),e=>e);for(const A of r){const r=e.settings.get(A),n=e.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(A);this.verbose?t.reportJson({key:A,effective:n,source:o}):t.reportJson({key:A,effective:n,source:o,...r})}}else{const r=P.sortMap(e.settings.keys(),e=>e),A=r.reduce((e,t)=>Math.max(e,t.length),0),n={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){const o=r.map(t=>{const r=e.settings.get(t);if(!r)throw new Error(`Assertion failed: This settings ("${t}") should have been registered`);return[t,this.why?e.sources.get(t)||"":r.description]}),i=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,s]of o)t.reportInfo(null,`${r.padEnd(A," ")} ${s.padEnd(i," ")} ${(0,T.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),n)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(A," ")} ${(0,T.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),n)}`)}})).exitCode()}}z.usage=C.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print the setting description on top of the regular key/value information"})],z.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--why",{description:"Print the reason why a setting is set a particular way"})],z.prototype,"why",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],z.prototype,"json",void 0),(0,a.gn)([C.Command.Path("config")],z.prototype,"execute",null);var W,X=r(15966),V=r(35691),_=r(2401),Z=r.n(_);!function(e){e.HIGHEST="highest"}(W||(W={}));const $=new Set(Object.values(W)),ee={highest:async(e,t,{resolver:r,fetcher:A,resolveOptions:n,fetchOptions:o})=>{const i=new Map;for(const[t,r]of e.storedResolutions){const A=e.storedDescriptors.get(t);if(void 0===A)throw new Error(`Assertion failed: The descriptor (${t}) should have been registered`);P.getSetWithDefault(i,A.identHash).add(r)}return Array.from(e.storedDescriptors.values(),async A=>{if(t.length&&!Z().isMatch(d.stringifyIdent(A),t))return null;const o=e.storedResolutions.get(A.descriptorHash);if(void 0===o)throw new Error(`Assertion failed: The resolution (${A.descriptorHash}) should have been registered`);const s=e.originalPackages.get(o);if(void 0===s)return null;if(!r.shouldPersistResolution(s,n))return null;const a=i.get(A.identHash);if(void 0===a)throw new Error(`Assertion failed: The resolutions (${A.identHash}) should have been registered`);if(1===a.size)return null;const c=[...a].map(t=>{const r=e.originalPackages.get(t);if(void 0===r)throw new Error(`Assertion failed: The package (${t}) should have been registered`);return r.reference}),g=await r.getSatisfying(A,c,n),l=null==g?void 0:g[0];if(void 0===l)return null;const u=l.locatorHash,h=e.originalPackages.get(u);if(void 0===h)throw new Error(`Assertion failed: The package (${u}) should have been registered`);return u===o?null:{descriptor:A,currentPackage:s,updatedPackage:h}})}};class te extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.strategy=W.HIGHEST,this.check=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd),r=await g.C.find(e);let A=0;const n=await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async e=>{A=await async function(e,{strategy:t,patterns:r,cache:A,report:n}){const{configuration:o}=e,i=new I.$,s=o.makeResolver(),a=o.makeFetcher(),c={cache:A,checksums:e.storedChecksums,fetcher:a,project:e,report:i,skipIntegrityCheck:!0},g={project:e,resolver:s,report:i,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{const A=ee[t],i=await A(e,r,{resolver:s,resolveOptions:g,fetcher:a,fetchOptions:c}),l=V.yG.progressViaCounter(i.length);n.reportProgress(l);let h,p=0;switch(await Promise.all(i.map(t=>t.then(t=>{if(null===t)return;p++;const{descriptor:r,currentPackage:A,updatedPackage:i}=t;n.reportInfo(u.b.UNNAMED,`${d.prettyDescriptor(o,r)} can be deduped from ${d.prettyLocator(o,A)} to ${d.prettyLocator(o,i)}`),n.reportJson({descriptor:d.stringifyDescriptor(r),currentResolution:d.stringifyLocator(A),updatedResolution:d.stringifyLocator(i)}),e.storedResolutions.set(r.descriptorHash,i.locatorHash)}).finally(()=>l.tick()))),p){case 0:h="No packages";break;case 1:h="One package";break;default:h=p+" packages"}const C=B.pretty(o,t,B.Type.CODE);return n.reportInfo(u.b.UNNAMED,`${h} can be deduped using the ${C} strategy`),p})}(t,{strategy:this.strategy,patterns:this.patterns,cache:r,report:e})});if(n.hasErrors())return n.exitCode();if(this.check)return A?1:0;return(await p.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async e=>{await t.install({cache:r,report:e})})).exitCode()}}te.schema=X.object().shape({strategy:X.string().test({name:"strategy",message:"${path} must be one of ${strategies}",params:{strategies:[...$].join(", ")},test:e=>$.has(e)})}),te.usage=C.Command.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]}),(0,a.gn)([C.Command.Rest()],te.prototype,"patterns",void 0),(0,a.gn)([C.Command.String("-s,--strategy",{description:"The strategy to use when deduping dependencies"})],te.prototype,"strategy",void 0),(0,a.gn)([C.Command.Boolean("-c,--check",{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"})],te.prototype,"check",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],te.prototype,"json",void 0),(0,a.gn)([C.Command.Path("dedupe")],te.prototype,"execute",null);class re extends C.Command{async execute(){const{plugins:e}=await s.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const A=C.Cli.from(e).definitions();t.push([r[0],A])}}const A=this.cli.definitions(),n=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)A.find(e=>{return t=e.path,A=r.path,t.split(" ").slice(1).join()===A.split(" ").slice(1).join();var t,A}).plugin={name:e[0],isDefault:n.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:A},null,2)+"\n")}}(0,a.gn)([C.Command.Path("--clipanion=definitions")],re.prototype,"execute",null);class Ae extends C.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([C.Command.Path("help"),C.Command.Path("--help"),C.Command.Path("-h")],Ae.prototype,"execute",null);class ne extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!d.tryParseIdent(this.leadingArgument)){const e=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}return await this.cli.run(["run",this.leadingArgument,...this.args])}}(0,a.gn)([C.Command.String()],ne.prototype,"leadingArgument",void 0),(0,a.gn)([C.Command.Proxy()],ne.prototype,"args",void 0);var oe=r(59355);class ie extends C.Command{async execute(){this.context.stdout.write((oe.o||"")+"\n")}}(0,a.gn)([C.Command.Path("-v"),C.Command.Path("--version")],ie.prototype,"execute",null);var se=r(6220);class ae extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return await y.xfs.mktempPromise(async e=>{const{code:r}=await se.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await R.makeScriptEnv({project:t,binFolder:e})});return r})}}ae.usage=C.Command.Usage({description:"execute a shell command",details:"\n This command simply executes a shell binary within the context of the root directory of the active workspace.\n\n It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n ",examples:[["Execute a shell command","$0 exec echo Hello World"]]}),(0,a.gn)([C.Command.String()],ae.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ae.prototype,"args",void 0),(0,a.gn)([C.Command.Path("exec")],ae.prototype,"execute",null);var ce=r(36545);class ge extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);if(await t.applyLightResolution(),void 0!==this.hash)return await async function(e,t,r){const{configuration:A}=t,n=t.peerRequirements.get(e);if(void 0===n)throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await p.Pk.start({configuration:A,stdout:r.stdout,includeFooter:!1},async e=>{var r,o;const i=t.storedPackages.get(n.subject);if(void 0===i)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(n.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(r=i.dependencies.get(n.requested.identHash))&&void 0!==r?r:null,c=null!==a?t.storedResolutions.get(a.descriptorHash):null;if(void 0===c)throw new Error("Assertion failed: Expected the resolution to have been registered");const g=null!==c?t.storedPackages.get(c):null;if(void 0===g)throw new Error("Assertion failed: Expected the provided package to have been registered");const l=[...n.allRequesters.values()].map(e=>{const r=t.storedPackages.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the package to be registered");const A=d.devirtualizeLocator(r),o=t.storedPackages.get(A.locatorHash);if(void 0===o)throw new Error("Assertion failed: Expected the package to be registered");const i=o.peerDependencies.get(n.requested.identHash);if(void 0===i)throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:r,peerDependency:i}});if(null!==g){const t=l.every(({peerDependency:e})=>ce.satisfiesWithPrereleases(g.version,e.range));e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} provides ${d.prettyLocator(A,g)} with version ${d.prettyReference(A,null!==(o=g.version)&&void 0!==o?o:"")}, which ${t?"satisfies":"doesn't satisfy"} the following requirements:`)}else e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} doesn't provide ${d.prettyIdent(A,n.requested)}, breaking the following requirements:`);e.reportSeparator();const h=B.mark(A),p=[];for(const{pkg:e,peerDependency:t}of P.sortMap(l,e=>d.stringifyLocator(e.pkg))){const r=null!==g&&ce.satisfiesWithPrereleases(g.version,t.range)?h.Check:h.Cross;p.push({stringifiedLocator:d.stringifyLocator(e),prettyLocator:d.prettyLocator(A,e),prettyRange:d.prettyRange(A,t.range),mark:r})}const C=Math.max(...p.map(({stringifiedLocator:e})=>e.length)),f=Math.max(...p.map(({prettyRange:e})=>e.length));for(const{stringifiedLocator:t,prettyLocator:r,prettyRange:A,mark:n}of P.sortMap(p,({stringifiedLocator:e})=>e))e.reportInfo(null,`${r.padEnd(C+(r.length-t.length)," ")} → ${A.padEnd(f," ")} ${n}`);p.length>1&&(e.reportSeparator(),e.reportInfo(u.b.UNNAMED,"Note: these requirements start with "+d.prettyLocator(t.configuration,s)))})).exitCode()}(this.hash,t,{stdout:this.context.stdout});return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async r=>{var A;const n=[([,e])=>d.stringifyLocator(t.storedPackages.get(e.subject)),([,e])=>d.stringifyIdent(e.requested)];for(const[o,i]of P.sortMap(t.peerRequirements,n)){const n=t.storedPackages.get(i.subject);if(void 0===n)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(i.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(A=n.dependencies.get(i.requested.identHash))&&void 0!==A?A:null,c=B.pretty(e,o,B.Type.CODE),g=d.prettyLocator(e,n),l=d.prettyIdent(e,i.requested),u=d.prettyIdent(e,s),h=i.allRequesters.length-1,p="descendant"+(1===h?"":"s"),C=h>0?` and ${h} ${p}`:"",f=null!==a?"provides":"doesn't provide";r.reportInfo(null,`${c} → ${g} ${f} ${l} to ${u}${C}`)}})).exitCode()}}ge.schema=X.object().shape({hash:X.string().matches(/^p[0-9a-f]{5}$/)}),ge.usage=C.Command.Usage({description:"explain a set of peer requirements",details:"\n A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.\n\n When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.\n\n When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.\n\n **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (`yarn explain peer-requirements`).\n ",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"]]}),(0,a.gn)([C.Command.String({required:!1})],ge.prototype,"hash",void 0),(0,a.gn)([C.Command.Path("explain","peer-requirements")],ge.prototype,"execute",null);var le=r(85875);class ue extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.extra=[],this.cache=!1,this.dependents=!1,this.manifest=!1,this.nameOnly=!1,this.virtuals=!1,this.json=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r&&!this.all)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");const o=(e,{recursive:r})=>{const A=e.anchoredLocator.locatorHash,n=new Map,o=[A];for(;o.length>0;){const e=o.shift();if(n.has(e))continue;const i=t.storedPackages.get(e);if(void 0===i)throw new Error("Assertion failed: Expected the package to be registered");if(n.set(e,i),d.isVirtualLocator(i)&&o.push(d.devirtualizeLocator(i).locatorHash),r||e===A)for(const e of i.dependencies.values()){const r=t.storedResolutions.get(e.descriptorHash);if(void 0===r)throw new Error("Assertion failed: Expected the resolution to be registered");o.push(r)}}return n.values()},i=({all:e,recursive:A})=>e&&A?t.storedPackages.values():e?(({recursive:e})=>{const r=new Map;for(const A of t.workspaces)for(const t of o(A,{recursive:e}))r.set(t.locatorHash,t);return r.values()})({recursive:A}):o(r,{recursive:A}),{selection:a,sortedLookup:l}=(({all:e,recursive:t})=>{const r=i({all:e,recursive:t}),A=this.patterns.map(e=>{const t=d.parseLocator(e),r=Z().makeRe(d.stringifyIdent(t)),A=d.isVirtualLocator(t),n=A?d.devirtualizeLocator(t):t;return e=>{const o=d.stringifyIdent(e);if(!r.test(o))return!1;if("unknown"===t.reference)return!0;const i=d.isVirtualLocator(e),s=i?d.devirtualizeLocator(e):e;return(!A||!i||t.reference===e.reference)&&n.reference===s.reference}}),n=P.sortMap([...r],e=>d.stringifyLocator(e));return{selection:n.filter(e=>0===A.length||A.some(t=>t(e))),sortedLookup:n}})({all:this.all,recursive:this.recursive});if(0===a.length)throw new C.UsageError("No package matched your request");const u=new Map;if(this.dependents)for(const e of l)for(const r of e.dependencies.values()){const A=t.storedResolutions.get(r.descriptorHash);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to be registered");P.getArrayWithDefault(u,A).push(e)}const p=new Map;for(const e of l){if(!d.isVirtualLocator(e))continue;const t=d.devirtualizeLocator(e);P.getArrayWithDefault(p,t.locatorHash).push(e)}const f={},m={children:f},w=e.makeFetcher(),Q={project:t,fetcher:w,cache:A,checksums:t.storedChecksums,report:new I.$,skipIntegrityCheck:!0},D=[async(e,t,r)=>{var A,n;if(!t.has("manifest"))return;const o=await w.fetch(e,Q);let i;try{i=await E.G.find(o.prefixPath,{baseFs:o.packageFs})}finally{null===(A=o.releaseFs)||void 0===A||A.call(o)}r("Manifest",{License:B.tuple(B.Type.NO_HINT,i.license),Homepage:B.tuple(B.Type.URL,null!==(n=i.raw.homepage)&&void 0!==n?n:null)})},async(e,r,n)=>{var o;if(!r.has("cache"))return;const i=null!==(o=t.storedChecksums.get(e.locatorHash))&&void 0!==o?o:null,s=A.getLocatorPath(e,i);let a;if(null!==s)try{a=y.xfs.statSync(s)}catch(e){}const c=void 0!==a?[a.size,B.Type.SIZE]:void 0;n("Cache",{Checksum:B.tuple(B.Type.NO_HINT,i),Path:B.tuple(B.Type.PATH,s),Size:c})}];for(const r of a){const A=d.isVirtualLocator(r);if(!this.virtuals&&A)continue;const o={},i={value:[r,B.Type.LOCATOR],children:o};if(f[d.stringifyLocator(r)]=i,this.nameOnly){delete i.children;continue}const s=p.get(r.locatorHash);void 0!==s&&(o.Instances={label:"Instances",value:B.tuple(B.Type.NUMBER,s.length)}),o.Version={label:"Version",value:B.tuple(B.Type.NO_HINT,r.version)};const a=(e,t)=>{const r={};if(o[e]=r,Array.isArray(t))r.children=t.map(e=>({value:e}));else{const e={};r.children=e;for(const[r,A]of Object.entries(t))void 0!==A&&(e[r]={label:r,value:A})}};if(!A){for(const e of D)await e(r,n,a);await e.triggerHook(e=>e.fetchPackageInfo,r,n,a)}r.bin.size>0&&!A&&a("Exported Binaries",[...r.bin.keys()].map(e=>B.tuple(B.Type.PATH,e)));const c=u.get(r.locatorHash);void 0!==c&&c.length>0&&a("Dependents",c.map(e=>B.tuple(B.Type.LOCATOR,e))),r.dependencies.size>0&&!A&&a("Dependencies",[...r.dependencies.values()].map(e=>{var r;const A=t.storedResolutions.get(e.descriptorHash),n=void 0!==A&&null!==(r=t.storedPackages.get(A))&&void 0!==r?r:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:n})})),r.peerDependencies.size>0&&A&&a("Peer dependencies",[...r.peerDependencies.values()].map(e=>{var A,n;const o=r.dependencies.get(e.identHash),i=void 0!==o&&null!==(A=t.storedResolutions.get(o.descriptorHash))&&void 0!==A?A:null,s=null!==i&&null!==(n=t.storedPackages.get(i))&&void 0!==n?n:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:s})}))}le.emitTree(m,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}}ue.usage=C.Command.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Print versions of a package from the whole project"})],ue.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"Print information for all packages, including transitive dependencies"})],ue.prototype,"recursive",void 0),(0,a.gn)([C.Command.Array("-X,--extra",{description:"An array of requests of extra data provided by plugins"})],ue.prototype,"extra",void 0),(0,a.gn)([C.Command.Boolean("--cache",{description:"Print information about the cache entry of a package (path, size, checksum)"})],ue.prototype,"cache",void 0),(0,a.gn)([C.Command.Boolean("--dependents",{description:"Print all dependents for each matching package"})],ue.prototype,"dependents",void 0),(0,a.gn)([C.Command.Boolean("--manifest",{description:"Print data obtained by looking at the package archive (license, homepage, ...)"})],ue.prototype,"manifest",void 0),(0,a.gn)([C.Command.Boolean("--name-only",{description:"Only print the name for the matching packages"})],ue.prototype,"nameOnly",void 0),(0,a.gn)([C.Command.Boolean("--virtuals",{description:"Print each instance of the virtual packages"})],ue.prototype,"virtuals",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],ue.prototype,"json",void 0),(0,a.gn)([C.Command.Rest()],ue.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("info")],ue.prototype,"execute",null);var he=r(11640),pe=r(5864);class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.skipBuilds=!1,this.silent=!1}async execute(){var e,t,r;const A=await s.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&A.useWithSource("",{enableInlineBuilds:this.inlineBuilds},A.startingCwd,{overwrite:!0});const n=!!process.env.NOW_BUILDER,o=!!process.env.NETLIFY,i=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(e,{error:t})=>{const r=await p.Pk.start({configuration:A,stdout:this.context.stdout,includeFooter:!1},async r=>{t?r.reportError(u.b.DEPRECATED_CLI_SETTINGS,e):r.reportWarning(u.b.DEPRECATED_CLI_SETTINGS,e)});return r.hasErrors()?r.exitCode():null};if(void 0!==this.ignoreEngines){const e=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!n});if(null!==e)return e}if(void 0!==this.registry){const e=await a("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(null!==e)return e}if(void 0!==this.preferOffline){const e=await a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!n});if(null!==e)return e}if(void 0!==this.production){const e=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(null!==e)return e}if(void 0!==this.nonInteractive){const e=await a("The --non-interactive option is deprecated",{error:!i});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!i&&!pe.TRAVIS});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!o});if(null!==e)return e}const l=void 0===this.immutable&&void 0===this.frozenLockfile?null!==(e=A.get("enableImmutableInstalls"))&&void 0!==e&&e:null!==(r=null!==(t=this.immutable)&&void 0!==t?t:this.frozenLockfile)&&void 0!==r&&r;if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{await async function(e,t){if(!e.projectCwd)return!1;const r=m.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await y.xfs.existsPromise(r))return!1;const A=await y.xfs.readFilePromise(r,"utf8");if(!A.includes("<<<<<<<"))return!1;if(t)throw new V.lk(u.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[n,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let A=!1;for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith("<<<<<<<")){for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if("======="===e){A=!1;break}A||e.startsWith("|||||||")?A=!0:t[0].push(e)}for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith(">>>>>>>"))break;t[1].push(e)}}else t[0].push(e),t[1].push(e)}return[t[0].join("\n"),t[1].join("\n")]}(A);let i,s;try{i=(0,he.parseSyml)(n),s=(0,he.parseSyml)(o)}catch(e){throw new V.lk(u.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...i,...s};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await y.xfs.changeFilePromise(r,(0,he.stringifySyml)(a),{automaticNewlines:!0}),!0}(A,l)&&(e.reportInfo(u.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍"),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{var t;(null===(t=s.VK.telemetry)||void 0===t?void 0:t.isNew)&&(e.reportInfo(u.b.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),e.reportInfo(u.b.TELEMETRY_NOTICE,`Run ${B.pretty(A,"yarn config set --home enableTelemetry 0",B.Type.CODE)} to disable`),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}const{project:d,workspace:C}=await h.I.find(A,this.context.cwd),f=await g.C.find(A,{immutable:this.immutableCache,check:this.checkCache});if(!C)throw new c.WorkspaceRequiredError(d.cwd,this.context.cwd);await d.restoreInstallState({restoreResolutions:!1});return(await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await d.install({cache:f,report:e,immutable:l,skipBuild:this.skipBuilds})})).exitCode()}}de.usage=C.Command.Usage({description:"install the project dependencies",details:"\n This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where are stored the cache files).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.js file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.js file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set, Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePaths` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--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).\n\n If the `--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.\n\n If the `--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.\n\n If the `--skip-builds` option is set, Yarn will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n ",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"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],de.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"})],de.prototype,"immutable",void 0),(0,a.gn)([C.Command.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"})],de.prototype,"immutableCache",void 0),(0,a.gn)([C.Command.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"})],de.prototype,"checkCache",void 0),(0,a.gn)([C.Command.Boolean("--production",{hidden:!0})],de.prototype,"production",void 0),(0,a.gn)([C.Command.Boolean("--non-interactive",{hidden:!0})],de.prototype,"nonInteractive",void 0),(0,a.gn)([C.Command.Boolean("--frozen-lockfile",{hidden:!0})],de.prototype,"frozenLockfile",void 0),(0,a.gn)([C.Command.Boolean("--prefer-offline",{hidden:!0})],de.prototype,"preferOffline",void 0),(0,a.gn)([C.Command.Boolean("--ignore-engines",{hidden:!0})],de.prototype,"ignoreEngines",void 0),(0,a.gn)([C.Command.String("--registry",{hidden:!0})],de.prototype,"registry",void 0),(0,a.gn)([C.Command.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"})],de.prototype,"inlineBuilds",void 0),(0,a.gn)([C.Command.Boolean("--skip-builds",{description:"Skip the build step altogether"})],de.prototype,"skipBuilds",void 0),(0,a.gn)([C.Command.String("--cache-folder",{hidden:!0})],de.prototype,"cacheFolder",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],de.prototype,"silent",void 0),(0,a.gn)([C.Command.Path(),C.Command.Path("install")],de.prototype,"execute",null);class Ce extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.destination)),o=await s.VK.find(n,this.context.plugins),{project:i,workspace:a}=await h.I.find(o,n);if(!a)throw new c.WorkspaceRequiredError(i.cwd,n);const l=t.topLevelWorkspace,u=[];if(this.all){for(const e of i.workspaces)!e.manifest.name||e.manifest.private&&!this.private||u.push(e);if(0===u.length)throw new C.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new C.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new C.UsageError("The target workspace is marked private - use the --private flag to link it anyway");u.push(a)}for(const e of u){const r=d.stringifyIdent(e.locator),A=this.relative?m.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+A})}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ce.usage=C.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\n There is no `yarn unlink` command. To unlink the workspaces from the current project one must revert the changes made to the `resolutions` field.\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"]]}),(0,a.gn)([C.Command.String()],Ce.prototype,"destination",void 0),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Link all workspaces belonging to the target project to the current one"})],Ce.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-p,--private",{description:"Also link private workspaces belonging to the target project to the current one"})],Ce.prototype,"private",void 0),(0,a.gn)([C.Command.Boolean("-r,--relative",{description:"Link workspaces using relative paths instead of absolute paths"})],Ce.prototype,"relative",void 0),(0,a.gn)([C.Command.Path("link")],Ce.prototype,"execute",null);class fe extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}fe.usage=C.Command.Usage({description:"run node with the hook already setup",details:"\n This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n ",examples:[["Run a Node script","$0 node ./my-script.js"]]}),(0,a.gn)([C.Command.Proxy()],fe.prototype,"args",void 0),(0,a.gn)([C.Command.Path("node")],fe.prototype,"execute",null);var Ie=r(20624),Ee=r(12087),Be=r(85622),ye=r.n(Be),me=r(79669);class we extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t;if("latest"===this.version||"berry"===this.version)t="https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js";else if("classic"===this.version)t="https://nightly.yarnpkg.com/latest.js";else if(ce.satisfiesWithPrereleases(this.version,">=2.0.0"))t=`https://github.com/yarnpkg/berry/raw/%40yarnpkg/cli/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else{if(!ce.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw Q().validRange(this.version)?new C.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new C.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,t,"green"));const A=await me.get(t,{configuration:e});await Qe(e,null,A,{report:r})})).exitCode()}}async function Qe(e,t,r,{report:A}){const n=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await y.xfs.mktempPromise(async e=>{const A=m.y1.join(e,"yarn.cjs");await y.xfs.writeFilePromise(A,r);const{stdout:o}=await se.execvp(process.execPath,[m.cS.fromPortablePath(A),"--version"],{cwd:n,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!Q().valid(t))throw new Error("Invalid semver version")});const o=m.y1.resolve(n,".yarn/releases"),i=m.y1.resolve(o,`yarn-${t}.cjs`),a=m.y1.relative(e.startingCwd,i),c=m.y1.relative(n,i),g=e.get("yarnPath"),l=null===g||g.startsWith(o+"/");A.reportInfo(u.b.UNNAMED,"Saving the new release in "+B.pretty(e,a,"magenta")),await y.xfs.removePromise(m.y1.dirname(i)),await y.xfs.mkdirPromise(m.y1.dirname(i),{recursive:!0}),await y.xfs.writeFilePromise(i,r),await y.xfs.chmodPromise(i,493),l&&await s.VK.updateConfiguration(n,{yarnPath:c})}we.usage=C.Command.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"]]}),(0,a.gn)([C.Command.Boolean("--only-if-needed",{description:"Only lock the Yarn version if it isn't already locked"})],we.prototype,"onlyIfNeeded",void 0),(0,a.gn)([C.Command.String()],we.prototype,"version",void 0),(0,a.gn)([C.Command.Path("policies","set-version"),C.Command.Path("set","version")],we.prototype,"execute",null);const De=/^[0-9]+$/;function be(e){return De.test(e)?`pull/${e}/head`:e}class ve extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.plugins=[],this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await Se((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",ye().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const A=m.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),n=await y.xfs.readFilePromise(A);await Qe(e,"sources",n,{report:r})})).exitCode()}}async function Se(e,{configuration:t,context:r,target:A}){for(const[n,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await se.pipevp(n,o,{cwd:A,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(B.pretty(t," $ "+[n,...o].join(" "),"grey")+"\n");try{await se.execvp(n,o,{cwd:A,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ke(e,{configuration:t,report:r,target:A}){let n=!1;if(!e.force&&y.xfs.existsSync(m.y1.join(A,".git"))){r.reportInfo(u.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await Se((({branch:e})=>[["git","fetch","origin",be(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:A}),n=!0}catch(e){r.reportSeparator(),r.reportWarning(u.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(u.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await y.xfs.removePromise(A),await y.xfs.mkdirPromise(A,{recursive:!0}),await Se((({repository:e,branch:t},r)=>[["git","init",m.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",be(t)],["git","reset","--hard","FETCH_HEAD"]])(e,A),{configuration:t,context:e.context,target:A}))}ve.usage=C.Command.Usage({description:"build Yarn from master",details:"\n This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n ",examples:[["Build Yarn from master","$0 set version from sources"]]}),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],ve.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],ve.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],ve.prototype,"branch",void 0),(0,a.gn)([C.Command.Array("--plugin",{description:"An array of additional plugins that should be included in the bundle"})],ve.prototype,"plugins",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a bundle for development (debugging) - non-minified and non-mangled"})],ve.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],ve.prototype,"force",void 0),(0,a.gn)([C.Command.Path("set","version","from","sources")],ve.prototype,"execute",null);var Ne=r(78835);const Fe=require("vm");async function Ke(e){const t=await me.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,he.parseSyml)(t.toString())}class Me extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await Ke(e);for(const[e,{experimental:A,...n}]of Object.entries(r)){let r=e;A&&(r+=" [experimental]"),t.reportJson({name:e,experimental:A,...n}),t.reportInfo(null,r)}})).exitCode()}}Me.usage=C.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 `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Me.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","list")],Me.prototype,"execute",null);class Re extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await h.I.find(e,this.context.cwd);let A,n;if(this.name.match(/^\.{0,2}[\\/]/)||m.cS.isAbsolute(this.name)){const o=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.name));t.reportInfo(u.b.UNNAMED,"Reading "+B.pretty(e,o,B.Type.PATH)),A=m.y1.relative(r.cwd,o),n=await y.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new Ne.URL(this.name)}catch(e){throw new V.lk(u.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}A=this.name,r=this.name}else{const t=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),n=d.stringifyIdent(t),o=await Ke(e);if(!Object.prototype.hasOwnProperty.call(o,n))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${n}" on the remote registry. Note that only the plugins referenced on our website (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).`);A=n,r=o[n].url}t.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,r,"green")),n=await me.get(r,{configuration:e})}await xe(A,n,{project:r,report:t})})).exitCode()}}async function xe(e,t,{project:r,report:A}){const{configuration:n}=r,o={},i={exports:o};(0,Fe.runInNewContext)(t.toString(),{module:i,exports:o});const a=i.exports.name,c=`.yarn/plugins/${a}.cjs`,g=m.y1.resolve(r.cwd,c);A.reportInfo(u.b.UNNAMED,"Saving the new plugin in "+B.pretty(n,c,"magenta")),await y.xfs.mkdirPromise(m.y1.dirname(g),{recursive:!0}),await y.xfs.writeFilePromise(g,t);const l={path:c,spec:e};await s.VK.updateConfiguration(r.cwd,e=>{const t=[];let A=!1;for(const n of e.plugins||[]){const e="string"!=typeof n?n.path:n,o=m.y1.resolve(r.cwd,m.cS.toPortablePath(e)),{name:i}=P.dynamicRequire(m.cS.fromPortablePath(o));i!==a?t.push(n):(t.push(l),A=!0)}return A||t.push(l),{...e,plugins:t}})}Re.usage=C.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:"\n This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n Three types of plugin references are accepted:\n\n - If the plugin is stored within the Yarn repository, it can be referenced by name.\n - Third-party plugins can be referenced directly through their public urls.\n - Local plugins can be referenced by their path on the disk.\n\n Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the `@yarnpkg/builder` package).\n ",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"]]}),(0,a.gn)([C.Command.String()],Re.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","import")],Re.prototype,"execute",null);class Le extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:A}=await h.I.find(e,this.context.cwd),n=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=d.stringifyIdent(n),i=await Ke(e);if(!Object.prototype.hasOwnProperty.call(i,o))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${o}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);const s=o,a=s.replace(/@yarnpkg\//,"");await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await Se((({pluginName:e,noMinify:t},r)=>[["yarn","build:"+e,...t?["--no-minify"]:[],"|"]])({pluginName:a,noMinify:this.noMinify}),{configuration:e,context:this.context,target:t}),r.reportSeparator();const c=m.y1.resolve(t,`packages/${a}/bundles/${s}.js`),g=await y.xfs.readFilePromise(c);await xe(s,g,{project:A,report:r})})).exitCode()}}Le.usage=C.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:"\n This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n The plugins can be referenced by their short name if sourced from the official Yarn repository.\n ",examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]}),(0,a.gn)([C.Command.String()],Le.prototype,"name",void 0),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],Le.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],Le.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],Le.prototype,"branch",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a plugin for development (debugging) - non-minified and non-mangled"})],Le.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],Le.prototype,"force",void 0),(0,a.gn)([C.Command.Path("plugin","import","from","sources")],Le.prototype,"execute",null);class Pe extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=this.name,n=d.parseIdent(A);if(!e.plugins.has(A))throw new C.UsageError(d.prettyIdent(e,n)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${A}.cjs`,i=m.y1.resolve(t.cwd,o);y.xfs.existsSync(i)&&(r.reportInfo(u.b.UNNAMED,`Removing ${B.pretty(e,o,B.Type.PATH)}...`),await y.xfs.removePromise(i)),r.reportInfo(u.b.UNNAMED,"Updating the configuration..."),await s.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return e;const t=e.plugins.filter(e=>e.path!==o);return e.plugins.length===t.length?e:{...e,plugins:t}})})).exitCode()}}Pe.usage=C.Command.Usage({category:"Plugin-related commands",description:"remove a plugin",details:"\n This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n **Note:** The plugins have to be referenced by their name property, which can be obtained using the `yarn plugin runtime` command. Shorthands are not allowed.\n ",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"]]}),(0,a.gn)([C.Command.String()],Pe.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","remove")],Pe.prototype,"execute",null);class Oe extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{for(const r of e.plugins.keys()){const e=this.context.plugins.plugins.has(r);let A=r;e&&(A+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+A)}})).exitCode()}}Oe.usage=C.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:"\n This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n ",examples:[["List the currently active plugins","$0 plugin runtime"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Oe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","runtime")],Oe.prototype,"execute",null);class Ue extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=new Set;for(const e of this.idents)n.add(d.parseIdent(e).identHash);await t.resolveEverything({cache:A,report:new I.$});const o=e.get("bstatePath"),i=y.xfs.existsSync(o)?(0,he.parseSyml)(await y.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(i,e.locatorHash))continue;if(0===n.size||n.has(e.identHash))continue;const t=i[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),A=h.I.generateBuildStateFile(a,t.storedPackages);await y.xfs.mkdirPromise(m.y1.dirname(r),{recursive:!0}),await y.xfs.changeFilePromise(r,A,{automaticNewlines:!0})}else await y.xfs.removePromise(o);return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ue.usage=C.Command.Usage({description:"rebuild the project's native packages",details:"\n This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n ",examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]}),(0,a.gn)([C.Command.Rest()],Ue.prototype,"idents",void 0),(0,a.gn)([C.Command.Path("rebuild")],Ue.prototype,"execute",null);class Te extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});const o=this.all?t.workspaces:[r],i=[n.REGULAR,n.DEVELOPMENT,n.PEER],a=[];let l=!1;const u=[];for(const e of this.patterns){let t=!1;const r=d.parseIdent(e);for(const A of o){const n=[...A.manifest.peerDependenciesMeta.keys()];for(const r of Z()(n,e))A.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of i){const n=A.manifest.getForScope(e),o=[...n.values()].map(e=>d.stringifyIdent(e));for(const i of Z()(o,d.stringifyIdent(r))){const{identHash:r}=d.parseIdent(i),o=n.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");A.manifest[e].delete(r),u.push([A,e,o]),l=!0,t=!0}}}t||a.push(e)}const f=a.length>1?"Patterns":"Pattern",I=a.length>1?"don't":"doesn't",E=this.all?"any":"this";if(a.length>0)throw new C.UsageError(`${f} ${B.prettyList(e,a,s.a5.CODE)} ${I} match any packages referenced by ${E} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,u);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}return 0}}Te.usage=C.Command.Usage({description:"remove dependencies from the project",details:"\n This command will remove the packages matching the specified patterns from the current workspace.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n ",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}'"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Apply the operation to all workspaces from the current project"})],Te.prototype,"all",void 0),(0,a.gn)([C.Command.Rest()],Te.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("remove")],Te.prototype,"execute",null);class je extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const A=r.manifest.scripts,n=P.sortMap(A.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},i=n.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of A.entries())t.reportInfo(null,`${e.padEnd(i," ")} ${(0,T.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([C.Command.Path("run")],je.prototype,"execute",null);class Ye extends c.BaseCommand{constructor(){super(...arguments),this.inspect=!1,this.inspectBrk=!1,this.topLevel=!1,this.binariesOnly=!1,this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:A}=await h.I.find(e,this.context.cwd);await t.restoreInstallState();const n=this.topLevel?t.topLevelWorkspace.anchoredLocator:A;if(!this.binariesOnly&&await R.hasPackageScript(n,this.scriptName,{project:t}))return await R.executePackageScript(n,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await R.getPackageAccessibleBinaries(n,{project:t})).get(this.scriptName)){const e=[];return this.inspect&&("string"==typeof this.inspect?e.push("--inspect="+this.inspect):e.push("--inspect")),this.inspectBrk&&("string"==typeof this.inspectBrk?e.push("--inspect-brk="+this.inspectBrk):e.push("--inspect-brk")),await R.executePackageAccessibleBinary(n,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:e})}if(!this.topLevel&&!this.binariesOnly&&r&&this.scriptName.includes(":")){const e=(await Promise.all(t.workspaces.map(async e=>e.manifest.scripts.has(this.scriptName)?e:null))).filter(e=>null!==e);if(1===e.length)return await R.executeWorkspaceScript(e[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw"node-gyp"===this.scriptName?new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}).`);{if("global"===this.scriptName)throw new C.UsageError("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");const e=[this.scriptName].concat(this.args);for(const[t,r]of c.pluginCommands)for(const A of r)if(e.length>=A.length&&JSON.stringify(e.slice(0,A.length))===JSON.stringify(A))throw new C.UsageError(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${t} plugin. You can install it with "yarn plugin import ${t}".`);throw new C.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Ye.usage=C.Command.Usage({description:"run a script defined in the package.json",details:"\n This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n - If the `scripts` field from your local package.json contains a matching script name, its definition will get executed.\n\n - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n ",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"]]}),(0,a.gn)([C.Command.String("--inspect",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspect",void 0),(0,a.gn)([C.Command.String("--inspect-brk",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspectBrk",void 0),(0,a.gn)([C.Command.Boolean("-T,--top-level",{hidden:!0})],Ye.prototype,"topLevel",void 0),(0,a.gn)([C.Command.Boolean("-B,--binaries-only",{hidden:!0})],Ye.prototype,"binariesOnly",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],Ye.prototype,"silent",void 0),(0,a.gn)([C.Command.String()],Ye.prototype,"scriptName",void 0),(0,a.gn)([C.Command.Proxy()],Ye.prototype,"args",void 0),(0,a.gn)([C.Command.Path("run")],Ye.prototype,"execute",null);class Ge extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=d.parseDescriptor(this.descriptor,!0),o=d.makeDescriptor(n,this.resolution);t.storedDescriptors.set(n.descriptorHash,n),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(n.descriptorHash,o.descriptorHash);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ge.usage=C.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"]]}),(0,a.gn)([C.Command.String()],Ge.prototype,"descriptor",void 0),(0,a.gn)([C.Command.String()],Ge.prototype,"resolution",void 0),(0,a.gn)([C.Command.Boolean("-s,--save",{description:"Persist the resolution inside the top-level manifest"})],Ge.prototype,"save",void 0),(0,a.gn)([C.Command.Path("set","resolution")],Ge.prototype,"execute",null);class He extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=null,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=a?[i.KEEP,i.REUSE,i.PROJECT,i.LATEST]:[i.PROJECT,i.LATEST],y=[],m=[];for(const e of this.patterns){let t=!1;const A=d.parseDescriptor(e);for(const e of r.workspaces)for(const i of[n.REGULAR,n.DEVELOPMENT]){const n=[...e.manifest.getForScope(i).values()].map(e=>d.stringifyIdent(e));for(const s of Z()(n,d.stringifyIdent(A))){const n=d.parseIdent(s),a=e.manifest[i].get(n.identHash);if(void 0===a)throw new Error("Assertion failed: Expected the descriptor to be registered");const c=d.makeDescriptor(n,A.range);y.push(Promise.resolve().then(async()=>[e,i,a,await F(c,{project:r,workspace:e,cache:o,target:i,modifier:I,strategies:E})])),t=!0}}t||m.push(e)}if(m.length>1)throw new C.UsageError(`Patterns ${B.prettyList(t,m,s.a5.CODE)} don't match any packages referenced by any workspace`);if(m.length>0)throw new C.UsageError(`Pattern ${B.prettyList(t,m,s.a5.CODE)} doesn't match any packages referenced by any workspace`);const w=await Promise.all(y),Q=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[,,A,{suggestions:n,rejections:o}]of w){const i=n.filter(e=>null!==e.descriptor);if(0===i.length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${i}`)}else i.length>1&&!a&&e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,d.prettyDescriptor(t,A)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(Q.hasErrors())return Q.exitCode();let b=!1;const v=[];for(const[e,A,,{suggestions:n}]of w){let o;const i=n.filter(e=>null!==e.descriptor),s=i[0].descriptor,a=i.every(e=>d.areDescriptorsEqual(e.descriptor,s));1===i.length||a?o=s:(b=!0,({answer:o}=await(0,f.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${d.prettyWorkspace(t,e)} ❯ ${A}?`,choices:n.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const c=e.manifest[A].get(o.identHash);if(void 0===c)throw new Error("Assertion failed: This descriptor should have a matching entry");if(c.descriptorHash!==o.descriptorHash)e.manifest[A].set(o.identHash,o),v.push([e,A,c,o]);else{const A=t.makeResolver(),n={project:r,resolver:A},o=A.bindDescriptor(c,e.anchoredLocator,n);r.forgetResolution(o)}}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),b&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,stdout:this.context.stdout},async e=>{await r.install({cache:o,report:e})})).exitCode()}}He.usage=C.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 `-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 Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),(0,a.gn)([C.Command.Rest()],He.prototype,"patterns",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"})],He.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],He.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],He.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],He.prototype,"caret",void 0),(0,a.gn)([C.Command.Path("up")],He.prototype,"execute",null);class Je extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.json=!1,this.peers=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const A=d.parseIdent(this.package).identHash,n=this.recursive?function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.workspaces,e=>d.stringifyLocator(e.anchoredLocator)),o=new Set,i=new Set,s=r=>{if(o.has(r.locatorHash))return i.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return i.add(r.locatorHash),!0;let n=!1;r.identHash===t&&(n=!0);for(const t of r.dependencies.values()){if(!A&&r.peerDependencies.has(t.identHash))continue;const o=e.storedResolutions.get(t.descriptorHash);if(!o)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(o);if(!i)throw new Error("Assertion failed: The package should have been registered");s(i)&&(n=!0)}return n&&i.add(r.locatorHash),n};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");s(r)}const a=new Set,c={},g={children:c},l=(t,r,n)=>{if(!i.has(t.locatorHash))return;const o={},s={value:null!==n?B.tuple(B.Type.DEPENDENT,{locator:t,descriptor:n}):B.tuple(B.Type.LOCATOR,t),children:o};if(r[d.stringifyLocator(t)]=s,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===n||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!A&&t.peerDependencies.has(r.identHash))continue;const n=e.storedResolutions.get(r.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(n);if(!i)throw new Error("Assertion failed: The package should have been registered");l(i,o,r)}};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");l(r,c,null)}return g}(t,A,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.storedPackages.values(),e=>d.stringifyLocator(e)),o={},i={children:o};for(const r of n){const n={},i=null;for(const s of r.dependencies.values()){if(!A&&r.peerDependencies.has(s.identHash))continue;const a=e.storedResolutions.get(s.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");const c=e.storedPackages.get(a);if(!c)throw new Error("Assertion failed: The package should have been registered");if(c.identHash!==t)continue;if(null===i){const e=d.stringifyLocator(r);o[e]={value:[r,B.Type.LOCATOR],children:n}}const g=d.stringifyLocator(c);n[g]={value:[{descriptor:s,locator:c},B.Type.DEPENDENT]}}}return i}(t,A,{configuration:e,peers:this.peers});le.emitTree(n,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}}Je.usage=C.Command.Usage({description:"display the reason why a package is needed",details:'\n This command prints the exact reasons why a package appears in the dependency tree.\n\n 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.\n ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([C.Command.String()],Je.prototype,"package",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"List, for each workspace, what are all the paths that lead to the dependency"})],Je.prototype,"recursive",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Je.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--peers",{description:"Also print the peer dependencies that match the specified name"})],Je.prototype,"peers",void 0),(0,a.gn)([C.Command.Path("why")],Je.prototype,"execute",null);class qe extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:A}=r;let n;if(this.verbose){const e=new Set,r=new Set;for(const n of E.G.hardDependencies)for(const[o,i]of A.getForScope(n)){const A=t.tryWorkspaceByDescriptor(i);null===A?t.workspacesByIdent.has(o)&&r.add(i):e.add(A)}n={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>d.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:A.name?d.stringifyIdent(A.name):null,...n})}})).exitCode()}}qe.usage=C.Command.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Also return the cross-dependencies between workspaces"})],qe.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],qe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("workspaces","list")],qe.prototype,"execute",null);class ze extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=t.workspaces,n=new Map(A.map(e=>{const t=d.convertToIdent(e.locator);return[d.stringifyIdent(t),e]})),o=n.get(this.workspaceName);if(void 0===o){const e=Array.from(n.keys()).sort();throw new C.UsageError(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n - ${e.join("\n - ")}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}}ze.usage=C.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:"\n This command will run a given sub-command on a single workspace.\n ",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"]]}),(0,a.gn)([C.Command.String()],ze.prototype,"workspaceName",void 0),(0,a.gn)([C.Command.String()],ze.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ze.prototype,"args",void 0),(0,a.gn)([C.Command.Path("workspace")],ze.prototype,"execute",null);const We={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:s.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:s.a2.STRING,values:["^","~",""],default:o.CARET}},commands:[L,j,q,Ge,ve,we,qe,re,Ae,ne,ie,M,x,z,te,ae,ge,ue,de,Ce,fe,Le,Re,Pe,Me,Oe,Ue,Te,je,Ye,He,Je,ze]}},68023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E,fileUtils:()=>A});var A={};r.r(A),r.d(A,{makeArchiveFromLocator:()=>p,makeBufferFromLocator:()=>d,makeLocator:()=>h,makeSpec:()=>u,parseSpec:()=>l});var n=r(54143),o=r(46009);const i=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,s=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(73632),c=r(72785),g=r(75448);function l(e){const{params:t,selector:r}=n.parseRange(e),A=o.cS.toPortablePath(r);return{parentLocator:t&&"string"==typeof t.locator?n.parseLocator(t.locator):null,path:A}}function u({parentLocator:e,path:t,folderHash:r,protocol:A}){const o=null!==e?{locator:n.stringifyLocator(e)}:{},i=void 0!==r?{hash:r}:{};return n.makeRange({protocol:A,source:t,selector:t,params:{...i,...o}})}function h(e,{parentLocator:t,path:r,folderHash:A,protocol:o}){return n.makeLocator(e,u({parentLocator:t,path:r,folderHash:A,protocol:o}))}async function p(e,{protocol:t,fetchOptions:r,inMemory:A=!1}){const{parentLocator:i,path:s}=n.parseFileStyleRange(e.reference,{protocol:t}),l=o.y1.isAbsolute(s)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await r.fetcher.fetch(i,r),u=l.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();const h=u.packageFs,p=o.y1.join(u.prefixPath,s);return await a.releaseAfterUseAsync(async()=>await c.makeArchiveFromDirectory(p,{baseFs:h,prefixPath:n.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:A}),u.releaseFs)}async function d(e,{protocol:t,fetchOptions:r}){return(await p(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var C=r(20624),f=r(32485),I=r(46611);const E={fetchers:[class{supports(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),checksum:i}}async fetchFromDisk(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"}),i=o.y1.isAbsolute(A)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await t.fetcher.fetch(r,t),s=i.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,i.localPath)}:i;i!==s&&i.releaseFs&&i.releaseFs();const l=s.packageFs,u=o.y1.join(s.prefixPath,A),h=await l.readFilePromise(u);return await a.releaseAfterUseAsync(async()=>await c.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.getIdentVendorPath(e),stripComponents:1}),s.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"});if(o.y1.isAbsolute(A))return A;const i=t.fetcher.getLocalPath(r,t);return null===i?null:o.y1.resolve(i,A)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:i}}async fetchFromDisk(e,t){return p(e,{protocol:"file:",fetchOptions:t})}}],resolvers:[class{supportsDescriptor(e,t){return!!s.test(e.range)&&(!!e.range.startsWith("file:")||!!i.test(e.range))}supportsLocator(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=e.range;return A.startsWith("file:")&&(A=A.slice("file:".length)),[n.makeLocator(e,"file:"+o.cS.toPortablePath(A))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(i)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{path:A,parentLocator:o}=l(e.range);if(null===o)throw new Error("Assertion failed: The descriptor should have been bound");const i=await d(n.makeLocator(e,n.makeRange({protocol:"file:",source:A,selector:A,params:{locator:n.stringifyLocator(o)}})),{protocol:"file:",fetchOptions:r.fetchOptions});return[h(e,{parentLocator:o,path:A,folderHash:C.makeHash("1",i).slice(0,6),protocol:"file:"})]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},75641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,gitUtils:()=>A});var A={};r.r(A),r.d(A,{TreeishProtocols:()=>y,clone:()=>S,isGitUrl:()=>m,lsRemote:()=>b,normalizeLocator:()=>D,normalizeRepoUrl:()=>Q,resolveUrl:()=>v,splitRepoUrl:()=>w});var n=r(39922),o=r(54143),i=r(63088),s=r(73632),a=r(72785),c=r(43896),g=r(46009),l=r(79669),u=r(6220),h=r(71191),p=r.n(h),d=r(53887),C=r.n(d),f=r(78835),I=r.n(f);function E(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const B=[/^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\/(.+)?$/];var y;function m(e){return!!e&&B.some(t=>!!e.match(t))}function w(e){const t=(e=Q(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:y.Head,request:"master"},extra:{}};const r=e.slice(0,t),A=e.slice(t+1);if(A.match(/^[a-z]+=/)){const e=p().parse(A);for(const[t,r]of Object.entries(e))if("string"!=typeof r)throw new Error(`Assertion failed: The ${t} parameter must be a literal string`);const t=Object.values(y).find(t=>Object.prototype.hasOwnProperty.call(e,t));let n,o;void 0!==t?(n=t,o=e[t]):(n=y.Head,o="master");for(const t of Object.values(y))delete e[t];return{repo:r,treeish:{protocol:n,request:o},extra:e}}{const e=A.indexOf(":");let t,n;return-1===e?(t=null,n=A):(t=A.slice(0,e),n=A.slice(e+1)),{repo:r,treeish:{protocol:t,request:n},extra:{}}}}function Q(e,{git:t=!1}={}){var r;if(e=(e=(e=e.replace(/^git\+https:/,"https:")).replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3")).replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let t;e=e.replace(/^git\+([^:]+):/,"$1:");try{t=I().parse(e)}catch(e){t=null}t&&"ssh:"===t.protocol&&(null===(r=t.path)||void 0===r?void 0:r.startsWith("/:"))&&(e=e.replace(/^ssh:\/\//,""))}return e}function D(e){return o.makeLocator(e,Q(e.reference))}async function b(e,t){const r=Q(e,{git:!0});if(!l.getNetworkSettings(r,{configuration:t}).enableNetwork)throw new Error(`Request to '${r}' has been blocked because of your configuration settings`);let A;try{A=await u.execvp("git",["ls-remote","--refs",r],{cwd:t.startingCwd,env:E(),strict:!0})}catch(t){throw t.message=`Listing the refs for ${e} failed`,t}const n=new Map,o=/^([a-f0-9]{40})\t(refs\/[^\n]+)/gm;let i;for(;null!==(i=o.exec(A.stdout));)n.set(i[2],i[1]);return n}async function v(e,t){const{repo:r,treeish:{protocol:A,request:n},extra:o}=w(e),i=await b(r,t),s=(e,t)=>{switch(e){case y.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return p().stringify({...o,commit:t});case y.Head:{const e=i.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return p().stringify({...o,commit:e})}case y.Tag:{const e=i.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return p().stringify({...o,commit:e})}case y.Semver:{if(!C().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...i.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[C().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=C().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return p().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=a(y.Commit,t)))return e;if(null!==(e=a(y.Tag,t)))return e;if(null!==(e=a(y.Head,t)))return e;throw t.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${e}")`)}},a=(e,t)=>{try{return s(e,t)}catch(e){return null}};return`${r}#${s(A,n)}`}async function S(e,t){return await t.getLimit("cloneConcurrency")(async()=>{const{repo:r,treeish:{protocol:A,request:n}}=w(e);if("commit"!==A)throw new Error("Invalid treeish protocol when cloning");const o=Q(r,{git:!0});if(!1===l.getNetworkSettings(o,{configuration:t}).enableNetwork)throw new Error(`Request to '${o}' has been blocked because of your configuration settings`);const i=await c.xfs.mktempPromise(),s={cwd:i,env:E(),strict:!0};try{await u.execvp("git",["clone","-c core.autocrlf=false",o,g.cS.fromPortablePath(i)],s),await u.execvp("git",["checkout",""+n],s)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return i})}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(y||(y={}));var k=r(32485),N=r(46611);const F={configuration:{cloneConcurrency:{description:"Maximal number of concurrent clones",type:n.a2.NUMBER,default:2}},fetchers:[class{supports(e,t){return m(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,A=D(e),n=new Map(t.checksums);n.set(A.locatorHash,r);const i={...t,checksums:n},s=await this.downloadHosted(A,i);if(null!==s)return s;const[a,c,g]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,o.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(A,i),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:o.getIdentVendorPath(e),checksum:g}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await S(e.reference,t.project.configuration),A=w(e.reference),n=g.y1.join(r,"package.tgz");await i.prepareExternalProject(r,n,{configuration:t.project.configuration,report:t.report,workspace:A.extra.workspace});const l=await c.xfs.readFilePromise(n);return await s.releaseAfterUseAsync(async()=>await a.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:o.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return m(e.range)}supportsLocator(e,t){return m(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=await v(e.range,r.project.configuration);return[o.makeLocator(e,A)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await s.releaseAfterUseAsync(async()=>await N.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:k.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},68126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var A=r(54143),n=r(79669),o=r(72785),i=r(63088),s=r(43896),a=r(75448),c=r(46009),g=r(75641),l=r(71191),u=r.n(l);const h=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class p{supports(e,t){return!(!(r=e.reference)||!h.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from GitHub"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await s.xfs.mktempPromise(async n=>{const l=new a.M(n);await o.extractArchiveTo(r,l,{stripComponents:1});const u=g.gitUtils.splitRepoUrl(e.reference),h=c.y1.join(n,"package.tgz");await i.prepareExternalProject(n,h,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const p=await s.xfs.readFilePromise(h);return await o.convertToZip(p,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:A,reponame:n,treeish:o}=function(e){let t;for(const r of h)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,A,n,o="master"]=t;const{commit:i}=u().parse(o);return o=i||o.replace(/[^:]*:/,""),{auth:r,username:A,reponame:n,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${A}/${n}/archive/${o}.tar.gz`}}const d={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const A=new p;if(!A.supports(t,r))return null;try{return await A.fetch(t,r)}catch(e){return null}}}}},99148:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var A=r(54143),n=r(79669),o=r(72785);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,s=/^https?:/;var a=r(46611),c=r(32485),g=r(73632);const l={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.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});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(e.reference,{configuration:t.project.configuration});return await o.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!s.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[A.convertDescriptorToLocator(e)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await g.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},64314:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var A=r(39922),n=r(36370),o=r(25413),i=r(46611),s=r(85824),a=r(6220),c=r(63088),g=r(54143),l=r(43896),u=r(46009),h=r(40822),p=r(80305),d=r.n(p),C=r(31669);class f extends o.BaseCommand{constructor(){super(...arguments),this.usev2=!1,this.assumeFreshProject=!1,this.yes=!1,this.private=!1,this.workspace=!1,this.install=!1}async execute(){if(l.xfs.existsSync(u.y1.join(this.context.cwd,i.G.fileName)))throw new h.UsageError("A package.json already exists in the specified directory");const e=await A.VK.find(this.context.cwd,this.context.plugins),t=this.install?!0===this.install?"latest":this.install:null;return null!==t?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(null!==e.get("yarnPath"))throw new h.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new h.UsageError("Cannot use the --install flag when the current directory is already part of a project");l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));l.xfs.existsSync(r)||await l.xfs.writeFilePromise(r,"");const A=await this.cli.run(["set","version",t]);if(0!==A)return A;this.context.stdout.write("\n");const n=["--assume-fresh-project"];return this.private&&n.push("-p"),this.workspace&&n.push("-w"),this.yes&&n.push("-y"),await l.xfs.mktempPromise(async e=>{const{code:t}=await a.pipevp("yarn",["init",...n],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await c.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await s.I.find(e,this.context.cwd)}catch(e){t=null}l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=new i.G,A=Object.fromEntries(e.get("initFields").entries());r.load(A),r.name=g.makeIdent(e.get("initScope"),u.y1.basename(this.context.cwd)),r.version=e.get("initVersion"),r.private=this.private||this.workspace,r.license=e.get("initLicense"),this.workspace&&(await l.xfs.mkdirPromise(u.y1.join(this.context.cwd,"packages"),{recursive:!0}),r.workspaceDefinitions=[{pattern:"packages/*"}]);const n={};r.exportTo(n),C.inspect.styles.name="cyan",this.context.stdout.write((0,C.inspect)(n,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,i.G.fileName);await l.xfs.changeFilePromise(o,JSON.stringify(n,null,2)+"\n");const c=u.y1.join(this.context.cwd,"README.md");if(l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,`# ${g.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await l.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),A=u.y1.join(this.context.cwd,".gitattributes");l.xfs.existsSync(A)||await l.xfs.writeFilePromise(A,r);const n=["/.yarn/*","!/.yarn/releases","!/.yarn/plugins","!/.yarn/sdks","","# 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(e=>e+"\n").join(""),o=u.y1.join(this.context.cwd,".gitignore");l.xfs.existsSync(o)||await l.xfs.writeFilePromise(o,n);const i={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};d()(i,e.get("initEditorConfig"));let s="root = true\n";for(const[e,t]of Object.entries(i)){s+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){s+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const c=u.y1.join(this.context.cwd,".editorconfig");l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,s),await a.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=h.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 `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]}),(0,n.gn)([h.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,n.gn)([h.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,n.gn)([h.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,n.gn)([h.Command.Boolean("-p,--private",{description:"Initialize a private package"})],f.prototype,"private",void 0),(0,n.gn)([h.Command.Boolean("-w,--workspace",{description:"Initialize a private workspace root with a `packages/` directory"})],f.prototype,"workspace",void 0),(0,n.gn)([h.Command.String("-i,--install",{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"})],f.prototype,"install",void 0),(0,n.gn)([h.Command.Path("init")],f.prototype,"execute",null);const I={configuration:{initLicense:{description:"License used when creating packages via the init command",type:A.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:A.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:A.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}}},commands:[f]}},92994:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143),n=r(46009),o=r(75448),i=r(10489);var s=r(46611),a=r(32485),c=r(73632);const g={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"link:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"link:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"portal:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot}}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("link:")}supportsLocator(e,t){return!!e.reference.startsWith("link:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[A.makeLocator(e,"link:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("portal:")}supportsLocator(e,t){return!!e.reference.startsWith("portal:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[A.makeLocator(e,"portal:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await c.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map([...A.dependencies,...A.devDependencies]),peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},8375:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ne,getPnpPath:()=>Ae});var A,n=r(39922),o=r(46009),i=r(54143);!function(e){e[e.YES=0]="YES",e[e.NO=1]="NO",e[e.DEPENDS=2]="DEPENDS"}(A||(A={}));const s=(e,t)=>`${e}@${t}`,a=(e,t)=>{const r=t.indexOf("#"),A=r>=0?t.substring(r+1):t;return s(e,A)};var c;!function(e){e[e.NONE=-1]="NONE",e[e.PERF=0]="PERF",e[e.CHECK=1]="CHECK",e[e.REASONS=2]="REASONS",e[e.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"}(c||(c={}));const g=(e,t)=>{if(t.decoupled)return t;const{name:r,references:A,ident:n,locator:o,dependencies:i,originalDependencies:s,hoistedDependencies:a,peerNames:c,reasons:g,isHoistBorder:l}=t,u={name:r,references:new Set(A),ident:n,locator:o,dependencies:new Map(i),originalDependencies:new Map(s),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(g),decoupled:!0,isHoistBorder:l},h=u.dependencies.get(r);return h&&h.ident==u.ident&&u.dependencies.set(r,u),e.dependencies.set(u.name,u),u},l=e=>{const t=new Set,r=(A,n=new Set)=>{if(!n.has(A)){n.add(A);for(const o of A.peerNames)if(!e.peerNames.has(o)){const A=e.dependencies.get(o);A&&!t.has(A)&&r(A,n)}t.add(A)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},u=(e,t,r,A,n=new Set)=>{const o=t[t.length-1];if(n.has(o))return;n.add(o);const i=((e,t)=>{const r=new Map([[e.name,[e.ident]]]);for(const t of e.dependencies.values())e.peerNames.has(t.name)||r.set(t.name,[t.ident]);const A=Array.from(t.keys());A.sort((e,r)=>{const A=t.get(e),n=t.get(r);return n.peerDependents.size!==A.peerDependents.size?n.peerDependents.size-A.peerDependents.size:n.dependents.size-A.dependents.size});for(const t of A){const A=t.substring(0,t.indexOf("@",1)),n=t.substring(A.length+1);if(!e.peerNames.has(A)){let e=r.get(A);e||(e=[],r.set(A,e)),e.indexOf(n)<0&&e.push(n)}}return r})(o,E(o)),s=new Map(Array.from(i.entries()).map(([e,t])=>[e,t[0]])),a=o===e?new Map:(e=>{const t=new Map,r=new Set,A=n=>{if(!r.has(n)){r.add(n);for(const r of n.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of n.dependencies.values())n.peerNames.has(e.name)||A(e)}};return A(e),t})(o);let c;do{p(e,t,r,a,s,i,A),c=!1;for(const[e,t]of i)t.length>1&&!o.dependencies.has(e)&&(s.delete(e),t.shift(),s.set(e,t[0]),c=!0)}while(c);for(const n of o.dependencies.values())o.peerNames.has(n.name)||r.has(n.locator)||(r.add(n.locator),u(e,[...t,n],r,A),r.delete(n.locator))},h=(e,t,r,n,o,i,{outputReason:s})=>{let a,c=null,g=new Set;s&&(a=""+Array.from(e).map(e=>B(e)).join("→"));const l=t[t.length-1],u=r.ident===l.ident,h=o.get(r.name);let p=h===r.ident&&!u;if(s&&!p&&h&&!u&&(c=`- filled by: ${B(i.get(r.name)[0])} at ${a}`),p){let e=!1;const A=n.get(r.name);if(e=!A||A.ident===r.ident,s&&!e&&(c=`- filled by: ${B(A.locator)} at ${a}`),e)for(let A=1;A=1;r--){const n=t[r];for(const o of A){if(n.peerNames.has(o)&&n.originalDependencies.has(o))continue;const i=n.dependencies.get(o);i&&(r===t.length-1?g.add(i):(g=null,e=!1,s&&(c=`- peer dependency ${B(i.locator)} from parent ${B(n.locator)} was not hoisted to ${a}`))),A.delete(o)}if(!e)break}p=e}return null!==g&&g.size>0?{isHoistable:A.DEPENDS,dependsOn:g,reason:c}:{isHoistable:p?A.YES:A.NO,reason:c}},p=(e,t,r,n,o,i,s)=>{const a=t[t.length-1],u=new Set,p=(t,C,I,E)=>{if(u.has(I))return;const m=[...C,I.locator],w=new Map,Q=new Map;for(const e of l(I)){let g=null;if(g||(g=h(r,[a,...t,I],e,n,o,i,{outputReason:s.debugLevel>=c.REASONS})),Q.set(e,g),g.isHoistable===A.DEPENDS)for(const t of g.dependsOn){const r=w.get(t.name)||new Set;r.add(e.name),w.set(t.name,r)}}const D=new Set,b=(e,t,r)=>{if(!D.has(e)){D.add(e),e.ident!==I.ident&&Q.set(e,{isHoistable:A.NO,reason:r});for(const A of w.get(e.name)||[])b(I.dependencies.get(A),t,r)}};let v;s.debugLevel>=c.REASONS&&(v=""+Array.from(r).map(e=>B(e)).join("→"));for(const[e,t]of Q)t.isHoistable===A.NO&&b(e,t,`- peer dependency ${B(e.locator)} from parent ${B(I.locator)} was not hoisted to ${v}`);for(const e of Q.keys())if(!D.has(e)){I.dependencies.delete(e.name),I.hoistedDependencies.set(e.name,e),I.reasons.delete(e.name);const t=a.dependencies.get(e.name);if(t)for(const r of e.references)t.references.add(r);else a.ident!==e.ident&&(a.dependencies.set(e.name,e),E.add(e))}if(s.check){const r=d(e);if(r)throw new Error(`${r}, after hoisting dependencies of ${[a,...t,I].map(e=>B(e.locator)).join("→")}:\n${y(e)}`)}const S=l(I);for(const e of S)if(D.has(e)&&m.indexOf(e.locator)<0){const r=Q.get(e);if(r.isHoistable!==A.YES&&I.reasons.set(e.name,r.reason),!e.isHoistBorder){u.add(I);const r=g(I,e);p([...t,I],[...C,I.locator],r,f),u.delete(I)}}};let C,f=new Set(l(a));do{C=f,f=new Set;for(const e of C){if(e.locator===a.locator||e.isHoistBorder)continue;const t=g(a,e);p([],Array.from(r),t,f)}}while(f.size>0)},d=e=>{const t=[],r=new Set,A=new Set,n=(e,o)=>{if(r.has(e))return;if(r.add(e),A.has(e))return;const i=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i.set(t.name,t);for(const r of e.originalDependencies.values()){const n=i.get(r.name),s=()=>""+Array.from(A).concat([e]).map(e=>B(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e===n&&e&&e.ident===r.ident||t.push(`${s()} - broken peer promise: expected ${r.ident} but found ${e?e.ident:e}`)}else n?n.ident!==r.ident&&t.push(`${s()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${n.ident}`):t.push(`${s()} - broken require promise: no required dependency ${r.locator} found`)}A.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,i);A.delete(e)};return n(e,e.dependencies),t.join("\n")},C=(e,t)=>{const{identName:r,name:A,reference:n,peerNames:o}=e,i={name:A,references:new Set([n]),locator:s(r,n),ident:a(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0,isHoistBorder:!0},c=new Map([[e,i]]),g=(e,r)=>{let A=c.get(e);const n=!!A;if(!A){const{name:n,identName:o,reference:i,peerNames:g}=e,l=t.hoistingLimits.get(r.locator);A={name:n,references:new Set([i]),locator:s(o,i),ident:a(o,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(g),reasons:new Map,decoupled:!0,isHoistBorder:!!l&&l.has(n)},c.set(e,A)}if(r.dependencies.set(e.name,A),r.originalDependencies.set(e.name,A),n){const e=new Set,t=r=>{if(!e.has(r)){e.add(r),r.decoupled=!1;for(const e of r.dependencies.values())r.peerNames.has(e.name)||t(e)}};t(A)}else for(const t of e.dependencies)g(t,A)};for(const t of e.dependencies)g(t,i);return i},f=e=>e.substring(0,e.indexOf("@",1)),I=e=>{const t={name:e.name,identName:f(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),A=(e,t,n)=>{const o=r.has(e);let i;if(t===e)i=n;else{const{name:t,references:r,locator:A}=e;i={name:t,identName:f(A),references:r,dependencies:new Set}}if(n.dependencies.add(i),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||A(t,e,i);r.delete(e)}};for(const r of e.dependencies.values())A(r,e,t);return t},E=e=>{const t=new Map,r=new Set([e]),A=e=>{const r=(e=>`${e.name}@${e.ident}`)(e);let A=t.get(r);return A||(A={dependents:new Set,peerDependents:new Set},t.set(r,A)),A},n=(e,t)=>{const o=!!r.has(t);if(A(t).dependents.add(e.ident),!o){r.add(t);for(const e of t.dependencies.values())if(t.peerNames.has(e.name)){A(e).peerDependents.add(t.ident)}else n(t,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},B=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),A=e.substring(t+1);if("workspace:."===A)return".";if(A){const e=(A.indexOf("#")>0?A.split("#")[1]:A).replace("npm:","");return A.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},y=e=>{let t=0;const r=(e,A,n="")=>{if(t>5e4||A.has(e))return"";t++;const o=Array.from(e.dependencies.values());let i="";A.add(e);for(let t=0;t":"")+(c!==s.name?`a:${s.name}:`:"")+B(s.locator)+(a?" "+a:"")}\n`,i+=r(s,A,`${n}${t5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var m,w;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(m||(m={})),function(e){e.WORKSPACES="workspaces",e.DEPENDENCIES="dependencies",e.NONE="none"}(w||(w={}));const Q=(e,t)=>{const{packageTree:r,hoistingLimits:A}=b(e,t),n=((e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||c.NONE),A={check:t.check||r>=c.INTENSIVE_CHECK,debugLevel:r,hoistingLimits:t.hoistingLimits||new Map};A.debugLevel>=c.PERF&&console.time("hoist");const n=C(e,A);if(u(n,[n],new Set([n.locator]),A),A.debugLevel>=c.PERF&&console.timeEnd("hoist"),A.debugLevel>=c.CHECK){const e=d(n);if(e)throw new Error(`${e}, after hoisting finished:\n${y(n)}`)}return A.debugLevel>=c.REASONS&&console.log(y(n)),I(n)})(r,{hoistingLimits:A});return v(e,n,t)},D=e=>`${e.name}@${e.reference}`;const b=(e,t)=>{const r=e.getDependencyTreeRoots(),A=new Map,n=new Map,s=e.getPackageInformation(e.topLevel);if(null===s)throw new Error("Assertion failed: Expected the top-level package to have been registered");const a=e.findPackageLocator(s.packageLocation);if(null===a)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");const c=o.cS.toPortablePath(s.packageLocation),g=D(a);if(t.project){const e={children:new Map},r=t.project.cwd.split(o.y1.sep);for(const[A,n]of t.project.workspacesByCwd){const t=A.split(o.y1.sep).slice(r.length);let s=e;for(const e of t){let t=s.children.get(e);t||(t={children:new Map},s.children.set(e,t)),s=t}s.workspaceLocator={name:i.stringifyIdent(n.anchoredLocator),reference:n.anchoredLocator.reference}}const A=(e,t)=>{if(e.workspaceLocator){const r=D(t);let A=n.get(r);A||(A=new Set,n.set(r,A)),A.add(e.workspaceLocator)}for(const r of e.children.values())A(r,e.workspaceLocator||t)};for(const t of e.children.values())A(t,e.workspaceLocator)}else for(const e of r)if(e.name!==a.name||e.reference!==a.reference){let t=n.get(g);t||(t=new Set,n.set(g,t)),t.add(e)}const l={name:a.name,identName:a.name,reference:a.reference,peerNames:s.packagePeers,dependencies:new Set},u=new Map,h=(r,s,g,p,d,C,f)=>{var I,E;const B=((e,t)=>`${D(t)}:${e}`)(r,g);let y=u.get(B);const m=!!y;if(m||g.name!==a.name||g.reference!==a.reference||(y=l,u.set(B,l)),y||(y={name:r,identName:g.name,reference:g.reference,dependencies:new Set,peerNames:s.packagePeers},u.set(B,y)),f){const e=D({name:p.identName,reference:p.reference}),t=A.get(e)||new Set;A.set(e,t),t.add(y.name)}const Q=new Map(s.packageDependencies);if(t.project){const e=t.project.workspacesByCwd.get(o.cS.toPortablePath(s.packageLocation.slice(0,-1)));if(e){const t=new Set([...Array.from(e.manifest.peerDependencies.values(),e=>i.stringifyIdent(e)),...Array.from(e.manifest.peerDependenciesMeta.keys())]);for(const e of t)Q.has(e)||(Q.set(e,d.get(e)||null),y.peerNames.add(e))}}const b=D(g),v=n.get(b);if(v)for(const e of v)Q.set(e.name+"$wsroot$",e.reference);p.dependencies.add(y);const S=t.pnpifyFs||!function(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(B);if(!m&&S)for(const[r,A]of Q)if(null!==A){const n=e.getLocator(r,A),i=e.getLocator(r.replace("$wsroot$",""),A),s=e.getPackageInformation(i);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");const a=null===(I=t.hoistingLimitsByCwd)||void 0===I?void 0:I.get(C),g=o.y1.relative(c,o.cS.toPortablePath(s.packageLocation))||o.LZ.dot,l=null===(E=t.hoistingLimitsByCwd)||void 0===E?void 0:E.get(g),u=a===w.DEPENDENCIES||l===w.DEPENDENCIES||l===w.WORKSPACES;h(r,s,n,y,Q,g,u)}};return h(a.name,s,a,l,s.packageDependencies,o.LZ.dot,!1),{packageTree:l,hoistingLimits:A}};const v=(e,t,r)=>{const A=new Map,n=(t,A)=>{const{linkType:n,target:i}=function(e,t,r){const A=t.getLocator(e.name.replace("$wsroot$",""),e.reference),n=t.getPackageInformation(A);if(null===n)throw new Error("Assertion failed: Expected the package to be registered");let i,s;if(r.pnpifyFs)s=o.cS.toPortablePath(n.packageLocation),i=m.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(n.packageLocation):n.packageLocation;s=o.cS.toPortablePath(r||n.packageLocation),i=n.linkType}return{linkType:i,target:s}}(t,e,r);return{locator:D(t),target:i,linkType:n,aliases:A}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,o.Zu)(t),name:(0,o.Zu)(r)}:{scope:null,name:(0,o.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e||e.identName.endsWith("$wsroot$")&&r.identName===e.identName.replace("$wsroot$",""))continue;const a=Array.from(r.references).sort(),g={name:r.identName,reference:a[0]},{name:l,scope:u}=s(r.name),h=u?[u,l]:[l],p=o.y1.join(t,"node_modules"),d=o.y1.join(p,...h),C=n(g,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=A.get(d);if(e){if(e.dirList)throw new Error(`Assertion failed: ${d} cannot merge dir node with leaf node`);{const t=i.parseLocator(e.locator),r=i.parseLocator(C.locator);if(e.linkType!==C.linkType)throw new Error(`Assertion failed: ${d} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${d} cannot merge nodes with different idents ${i.stringifyLocator(t)} and ${i.stringifyLocator(r)}`);C.aliases=[...C.aliases,...e.aliases,i.parseLocator(e.locator).reference]}}A.set(d,C);const t=d.split("/"),r=t.indexOf("node_modules");let n=t.length-1;for(;r>=0&&n>r;){const e=o.cS.toPortablePath(t.slice(0,n).join(o.y1.sep)),r=(0,o.Zu)(t[n]),i=A.get(e);if(i){if(i.dirList){if(i.dirList.has(r))break;i.dirList.add(r)}}else A.set(e,{dirList:new Set([r])});n--}}c(r,C.linkType===m.SOFT?C.target:d)}}},g=n({name:t.name,reference:Array.from(t.references)[0]},[]),l=g.target;return A.set(l,g),c(t,l),A};var S=r(92659),k=r(32485),N=r(73632),F=r(46611),K=r(35691),M=r(43896),R=r(17674),x=r(53660),L=r(65281),P=r(11640),O=r(83228),U=r(58069),T=r.n(U),j=r(40822),Y=r(35747),G=r.n(Y);const H="node_modules";class J{constructor(e){this.opts=e,this.localStore=new Map,this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){var r;const A=o.y1.resolve(t.packageFs.getRealPath(),t.prefixPath);let n=this.customData.store.get(e.locatorHash);if(void 0===n&&(n=await async function(e,t){var r;const A=null!==(r=await F.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new F.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{bin:A.bin,os:A.os,cpu:A.cpu,scripts:A.scripts},misc:{extractHint:O.jsInstallUtils.getExtractHint(t),hasBindingGyp:O.jsInstallUtils.hasBindingGyp(t)}}}(0,t),e.linkType===k.Un.HARD&&this.customData.store.set(e.locatorHash,n)),!O.jsInstallUtils.checkAndReportManifestCompatibility(e,n,"link",{configuration:this.opts.project.configuration,report:this.opts.report}))return{packageLocation:null,buildDirective:null};const s=new Map,a=new Set;if(s.has(i.stringifyIdent(e))||s.set(i.stringifyIdent(e),e.reference),i.isVirtualLocator(e))for(const t of e.peerDependencies.values())s.set(i.stringifyIdent(t),null),a.add(i.stringifyIdent(t));const c={packageLocation:o.cS.fromPortablePath(A)+"/",packageDependencies:s,packagePeers:a,linkType:e.linkType,discardFromLookup:null!==(r=t.discardFromLookup)&&void 0!==r&&r};return this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:c}),{packageLocation:A,buildDirective:null}}async attachInternalDependencies(e,t){const r=this.localStore.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected information object to have been registered");for(const[e,A]of t){const t=i.areIdentsEqual(e,A)?A.reference:[i.requirableIdent(A),A.reference];r.pnpNode.packageDependencies.set(i.requirableIdent(e),t)}}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const e=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let t=await q(this.opts.project);if(null===t){const e=this.opts.project.configuration.get("bstatePath");await M.xfs.existsPromise(e)&&await M.xfs.unlinkPromise(e),t={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const r=new Map(this.opts.project.workspaces.map(e=>{var t,r;let A=this.opts.project.configuration.get("nmHoistingLimits");try{A=N.validateEnum(w,null!==(r=null===(t=e.manifest.installConfig)||void 0===t?void 0:t.hoistingLimits)&&void 0!==r?r:A)}catch(t){const r=i.prettyWorkspace(this.opts.project.configuration,e);this.opts.report.reportWarning(S.b.INVALID_MANIFEST,`${r}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(w).join(", ")}, using default: "${A}"`)}return[e.relativeCwd,A]})),A=(e=>{const t=new Map;for(const[r,A]of e.entries())if(!A.dirList){let e=t.get(A.locator);e||(e={target:A.target,linkType:A.linkType,locations:[],aliases:A.aliases},t.set(A.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(o.y1.delimiter).length,A=t.split(o.y1.delimiter).length;return r!==A?A-r:t.localeCompare(e)});return t})(Q({VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(e=>{const t=e.anchoredLocator;return{name:i.stringifyIdent(e.locator),reference:t.reference}}),getPackageInformation:e=>{const t=null===e.reference?this.opts.project.topLevelWorkspace.anchoredLocator:i.makeLocator(i.parseIdent(e.name),e.reference),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the package reference to have been registered");return r.pnpNode},findPackageLocator:e=>{const t=this.opts.project.tryWorkspaceByCwd(o.cS.toPortablePath(e));if(null!==t){const e=t.anchoredLocator;return{name:i.stringifyIdent(e),reference:e.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:e=>o.cS.fromPortablePath(R.p.resolveVirtual(o.cS.toPortablePath(e)))},{pnpifyFs:!1,hoistingLimitsByCwd:r,project:this.opts.project}));await async function(e,t,{baseFs:r,project:A,report:n,loadManifest:s}){const a=o.y1.join(A.cwd,H),{locationTree:c,binSymlinks:g}=function(e,t){const r=new Map([...e]),A=new Map([...t]);for(const[t,r]of e){const e=o.y1.join(t,H);if(!M.xfs.existsSync(e)){r.children.delete(H);for(const t of A.keys())null!==o.y1.contains(e,t)&&A.delete(t)}}return{locationTree:r,binSymlinks:A}}(e.locationTree,e.binSymlinks),l=X(t,{skipPrefix:A.cwd}),u=[],h=async({srcDir:e,dstDir:t,linkType:A})=>{const n=(async()=>{try{A===k.Un.SOFT?(await M.xfs.mkdirPromise(o.y1.dirname(t),{recursive:!0}),await V(o.y1.resolve(e),t)):await _(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{I.tick()}})().then(()=>u.splice(u.indexOf(n),1));u.push(n),u.length>4&&await Promise.race(u)},p=async(e,t,r)=>{const A=(async()=>{const A=async(e,t,r)=>{try{r&&r.innerLoop||await M.xfs.mkdirPromise(t,{recursive:!0});const n=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of n){if(!(r&&r.innerLoop||".bin"!==i.name))continue;const n=o.y1.join(e,i.name),s=o.y1.join(t,i.name);i.isDirectory()?(i.name!==H||r&&r.innerLoop)&&(await M.xfs.mkdirPromise(s,{recursive:!0}),await A(n,s,{innerLoop:!0})):await M.xfs.copyFilePromise(n,s,G().constants.COPYFILE_FICLONE)}}catch(A){throw r&&r.innerLoop||(A.message=`While cloning ${e} -> ${t} ${A.message}`),A}finally{r&&r.innerLoop||I.tick()}};await A(e,t,r)})().then(()=>u.splice(u.indexOf(A),1));u.push(A),u.length>4&&await Promise.race(u)},d=async(e,t,r)=>{if(r)for(const[A,n]of t.children){const t=r.children.get(A);await d(o.y1.join(e,A),n,t)}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!1}),await z(e,{contentsOnly:e===a})};for(const[e,t]of c){const r=l.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await d(o.y1.join(e,A),n,t)}}const C=async(e,t,r)=>{if(r){$(t.locator,r.locator)||await z(e,{contentsOnly:t.linkType===k.Un.HARD});for(const[A,n]of t.children){const t=r.children.get(A);await C(o.y1.join(e,A),n,t)}}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!0}),await z(e,{contentsOnly:t.linkType===k.Un.HARD})};for(const[e,t]of l){const r=c.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await C(o.y1.join(e,A),n,t)}}const f=[];for(const[r,{locations:n}]of e.locatorMap.entries())for(const e of n){const{locationRoot:n,segments:i}=W(e,{skipPrefix:A.cwd});let s=l.get(n),a=n;if(s){for(const e of i)if(a=o.y1.join(a,e),s=s.children.get(e),!s)break;if(s&&!$(s.locator,r)){const e=t.get(s.locator),r=e.target,A=a,n=e.linkType;r!==A&&f.push({srcDir:r,dstDir:A,linkType:n})}}}for(const[e,{locations:r}]of t.entries())for(const n of r){const{locationRoot:r,segments:i}=W(n,{skipPrefix:A.cwd});let s=c.get(r),a=l.get(r),g=r;const u=t.get(e),h=u.target,p=n;if(h===p)continue;const d=u.linkType;for(const e of i)a=a.children.get(e);if(s){for(const e of i)if(g=o.y1.join(g,e),s=s.children.get(e),!s){f.push({srcDir:h,dstDir:p,linkType:d});break}}else f.push({srcDir:h,dstDir:p,linkType:d})}const I=K.yG.progressViaCounter(f.length),E=n.reportProgress(I);try{const e=new Map;for(const t of f)t.linkType!==k.Un.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await h({...t}));await Promise.all(u),u.length=0;for(const t of f){const r=e.get(t.srcDir);t.linkType!==k.Un.SOFT&&t.dstDir!==r&&await p(r,t.dstDir)}await Promise.all(u),await M.xfs.mkdirPromise(a,{recursive:!0});const r=await async function(e,t,r,{loadManifest:A}){const n=new Map;for(const[t,{locations:r}]of e){const e=Z(t)?null:await A(t,r[0]),i=new Map;if(e)for(const[t,A]of e.bin){const e=o.y1.join(r[0],A);""!==A&&M.xfs.existsSync(e)&&i.set(t,A)}n.set(t,i)}const i=new Map,s=(e,t,A)=>{const a=new Map,c=o.y1.contains(r,e);if(A.locator&&null!==c){const t=n.get(A.locator);for(const[r,A]of t){const t=o.y1.join(e,o.cS.toPortablePath(A));a.set((0,o.Zu)(r),t)}for(const[t,r]of A.children){const A=o.y1.join(e,t),n=s(A,A,r);n.size>0&&i.set(e,new Map([...i.get(e)||new Map,...n]))}}else for(const[r,n]of A.children){const A=s(o.y1.join(e,r),t,n);for(const[e,t]of A)a.set(e,t)}return a};for(const[e,r]of t){const t=s(e,e,r);t.size>0&&i.set(e,new Map([...i.get(e)||new Map,...t]))}return i}(t,l,A.cwd,{loadManifest:s});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=o.y1.join(r,H,".bin");await M.xfs.removePromise(e)}for(const[r,A]of t){const t=o.y1.join(r,H,".bin"),n=e.get(r)||new Map;await M.xfs.mkdirPromise(t,{recursive:!0});for(const e of n.keys())A.has(e)||(await M.xfs.removePromise(o.y1.join(t,e)),"win32"===process.platform&&await M.xfs.removePromise(o.y1.join(t,(0,o.Zu)(e+".cmd"))));for(const[e,r]of A){const A=n.get(e),i=o.y1.join(t,e);A!==r&&("win32"===process.platform?await T()(o.cS.fromPortablePath(r),o.cS.fromPortablePath(i),{createPwshFile:!1}):(await M.xfs.removePromise(i),await V(r,i),await M.xfs.chmodPromise(r,493)))}}}(g,r),await async function(e,t,r){let A="";A+="# Warning: This file is automatically generated. Removing it is fine, but will\n",A+="# cause your node_modules installation to become invalidated.\n",A+="\n",A+="__metadata:\n",A+=" version: 1\n";const n=Array.from(t.keys()).sort(),s=i.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(const i of n){const n=t.get(i);A+="\n",A+=JSON.stringify(i)+":\n",A+=" locations:\n";for(const t of n.locations){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` - ${JSON.stringify(r)}\n`}if(n.aliases.length>0){A+=" aliases:\n";for(const e of n.aliases)A+=` - ${JSON.stringify(e)}\n`}if(i===s&&r.size>0){A+=" bin:\n";for(const[t,n]of r){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of n){const n=o.y1.relative(o.y1.join(t,H),r);A+=` ${JSON.stringify(e)}: ${JSON.stringify(n)}\n`}}}}const a=e.cwd,c=o.y1.join(a,H,".yarn-state.yml");await M.xfs.changeFilePromise(c,A,{automaticNewlines:!0})}(A,t,r)}finally{E.stop()}}(t,A,{baseFs:e,project:this.opts.project,report:this.opts.report,loadManifest:async e=>{const t=i.parseLocator(e),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the slot to exist");return r.customPackageData.manifest}});const n=[];for(const[e,t]of A.entries()){if(Z(e))continue;const r=i.parseLocator(e),A=this.localStore.get(r.locatorHash);if(void 0===A)throw new Error("Assertion failed: Expected the slot to exist");const o=O.jsInstallUtils.extractBuildScripts(A.pkg,A.customPackageData,A.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});0!==o.length&&n.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:o})}return{customData:this.customData,records:n}}}async function q(e,{unrollAliases:t=!1}={}){const r=e.cwd,A=o.y1.join(r,H,".yarn-state.yml");if(!M.xfs.existsSync(A))return null;const n=(0,P.parseSyml)(await M.xfs.readFilePromise(A,"utf8"));if(n.__metadata.version>1)return null;const s=new Map,a=new Map;delete n.__metadata;for(const[e,A]of Object.entries(n)){const n=A.locations.map(e=>o.y1.join(r,e)),c=A.bin;if(c)for(const[e,t]of Object.entries(c)){const A=o.y1.join(r,o.cS.toPortablePath(e)),n=N.getMapWithDefault(a,A);for(const[e,r]of Object.entries(t))n.set((0,o.Zu)(e),o.cS.toPortablePath([A,H,r].join(o.y1.delimiter)))}if(s.set(e,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:A.aliases||[]}),t&&A.aliases)for(const t of A.aliases){const{scope:r,name:A}=i.parseLocator(e),a=i.makeLocator(i.makeIdent(r,A),t),c=i.stringifyLocator(a);s.set(c,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:[]})}}return{locatorMap:s,binSymlinks:a,locationTree:X(s,{skipPrefix:e.cwd})}}const z=async(e,t)=>{if(e.split(o.y1.sep).indexOf(H)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await M.xfs.lstatPromise(e)).isSymbolicLink())return void await M.xfs.unlinkPromise(e)}const r=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const A of r){const r=o.y1.join(e,(0,o.Zu)(A.name));A.isDirectory()?(A.name!==H||t&&t.innerLoop)&&await z(r,{innerLoop:!0,contentsOnly:!1}):await M.xfs.unlinkPromise(r)}t.contentsOnly||await M.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},W=(e,{skipPrefix:t})=>{const r=o.y1.contains(t,e);if(null===r)throw new Error(`Assertion failed: Cannot process a path that isn't part of the requested prefix (${e} isn't within ${t})`);const A=r.split(o.y1.sep).filter(e=>""!==e),n=A.indexOf(H),i=A.slice(0,n).join(o.y1.sep);return{locationRoot:o.y1.join(t,i),segments:A.slice(n)}},X=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const A=()=>({children:new Map,linkType:k.Un.HARD});for(const[n,i]of e.entries()){if(i.linkType===k.Un.SOFT){if(null!==o.y1.contains(t,i.target)){const e=N.getFactoryWithDefault(r,i.target,A);e.locator=n,e.linkType=i.linkType}}for(const e of i.locations){const{locationRoot:o,segments:s}=W(e,{skipPrefix:t});let a=N.getFactoryWithDefault(r,o,A);for(let e=0;e{let r;try{"win32"===process.platform&&(r=M.xfs.lstatSync(e))}catch(e){}"win32"!=process.platform||r&&!r.isDirectory()?M.xfs.symlinkPromise(o.y1.relative(o.y1.dirname(t),e),t):M.xfs.symlinkPromise(e,t,"junction")},_=async(e,t,{baseFs:r,innerLoop:A})=>{await M.xfs.mkdirPromise(e,{recursive:!0});const n=await r.readdirPromise(t,{withFileTypes:!0}),i=async(e,t,A)=>{if(A.isFile()){const A=await r.lstatPromise(t);await r.copyFilePromise(t,e);const n=511&A.mode;420!==n&&await M.xfs.chmodPromise(e,n)}else{if(!A.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await M.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const A=await r.readlinkPromise(t);await V(o.y1.resolve(o.y1.dirname(e),A),e)}}};for(const s of n){const n=o.y1.join(t,(0,o.Zu)(s.name)),a=o.y1.join(e,(0,o.Zu)(s.name));s.isDirectory()?(s.name!==H||A)&&await _(a,n,{baseFs:r,innerLoop:!0}):await i(a,n,s)}};function Z(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const $=(e,t)=>{if(!e||!t)return e===t;let r=i.parseLocator(e);i.isVirtualLocator(r)&&(r=i.devirtualizeLocator(r));let A=i.parseLocator(t);return i.isVirtualLocator(A)&&(A=i.devirtualizeLocator(A)),i.areLocatorsEqual(r,A)};var ee=r(34432);class te extends O.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new re(e)}}class re extends O.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,ee.oC)(e,this.opts.project.cwd,t),A=Q(r,{pnpifyFs:!1,project:this.opts.project}),n=new Map;e.fallbackPool=n;const s=(e,t)=>{const r=i.parseLocator(t.locator),A=i.stringifyIdent(r);A===e?n.set(e,r.reference):n.set(e,[A,r.reference])},a=o.y1.join(this.opts.project.cwd,o.QS.nodeModules),c=A.get(a);if(void 0===c)throw new Error("Assertion failed: Expected a root junction point");if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(const e of c.dirList){const t=o.y1.join(a,e),r=A.get(t);if(void 0===r)throw new Error("Assertion failed: Expected the child to have been registered");if("target"in r)s(e,r);else for(const n of r.dirList){const r=o.y1.join(t,n),i=A.get(r);if(void 0===i)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in i))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${n}`,i)}}return super.finalizeInstallWithPnp(e)}}const Ae=e=>o.y1.join(e.cwd,".pnp.js"),ne={configuration:{nmHoistingLimits:{description:"Prevent packages can be hoisted past specific levels",type:n.a2.STRING,values:[w.WORKSPACES,w.DEPENDENCIES,w.NONE],default:"none"}},linkers:[class{supportsPackage(e,t){return"node-modules"===t.project.configuration.get("nodeLinker")}async findPackageLocation(e,t){const r=t.project.tryWorkspaceByLocator(e);if(r)return r.cwd;const A=await q(t.project,{unrollAliases:!0});if(null===A)throw new j.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const n=A.locatorMap.get(i.stringifyLocator(e));if(!n){const r=new j.UsageError(`Couldn't find ${i.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw r.code="LOCATOR_NOT_INSTALLED",r}return n.locations[0]}async findPackageLocator(e,t){const r=await q(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:A,segments:n}=W(o.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(A);if(!s)return null;let a=s.locator;for(const e of n){if(s=s.children.get(e),!s)break;a=s.locator||a}return i.parseLocator(a)}makeInstaller(e){return new J(e)}},te]}},8190:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>V});var A,n,o=r(39922),i=r(36370),s=r(25413),a=r(85824),c=r(62152),g=r(35691),l=r(92659),u=r(85875),h=r(15815),p=r(14224),d=r(40822);!function(e){e.All="all",e.Production="production",e.Development="development"}(A||(A={})),function(e){e.Info="info",e.Low="low",e.Moderate="moderate",e.High="high",e.Critical="critical"}(n||(n={}));var C=r(54143),f=r(73632),I=r(71643);const E=[n.Info,n.Low,n.Moderate,n.High,n.Critical];function B(e,t){const r=[],A=new Set,n=e=>{A.has(e)||(A.add(e),r.push(e))};for(const e of t)n(e);const o=new Set;for(;r.length>0;){const t=r.shift(),A=e.storedResolutions.get(t);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to have been registered");const i=e.storedPackages.get(A);if(i){o.add(t);for(const e of i.dependencies.values())n(e.descriptorHash)}}return o}function y(e,t,{all:r}){const A=r?e.workspaces:[t],n=A.map(e=>e.manifest),o=new Set(n.map(e=>[...e.dependencies].map(([e,t])=>e)).flat()),i=new Set(n.map(e=>[...e.devDependencies].map(([e,t])=>e)).flat()),s=A.map(e=>[...e.dependencies.values()]).flat(),a=s.filter(e=>o.has(e.identHash)).map(e=>e.descriptorHash),c=s.filter(e=>i.has(e.identHash)).map(e=>e.descriptorHash),g=B(e,a),l=B(e,c);return u=l,h=g,new Set([...u].filter(e=>!h.has(e)));var u,h}function m(e){const t={};for(const r of e)t[C.stringifyIdent(r)]=C.parseRange(r.range).selector;return t}function w(e){if(void 0===e)return new Set;const t=E.indexOf(e),r=E.slice(t);return new Set(r)}function Q(e,t){var r;const A=function(e,t){const r=w(t),A={};for(const t of r)A[t]=e[t];return A}(e,t);for(const e of Object.keys(A))if(null!==(r=A[e])&&void 0!==r&&r)return!0;return!1}class D extends s.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.environment=A.All,this.json=!1,this.severity=n.Info}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=function(e,t,{all:r,environment:n}){const o=r?e.workspaces:[t],i=[];if([A.All,A.Production].includes(n))for(const e of o)for(const t of e.manifest.dependencies.values())i.push(t);const s=[];if([A.All,A.Development].includes(n))for(const e of o)for(const t of e.manifest.devDependencies.values())s.push(t);return m([...i,...s].filter(e=>null===C.parseRange(e.range).protocol))}(t,r,{all:this.all,environment:this.environment}),i=function(e,t,{all:r}){var A;const n=y(e,t,{all:r}),o={};for(const t of e.storedPackages.values())o[C.stringifyIdent(t)]={version:null!==(A=t.version)&&void 0!==A?A:"0.0.0",integrity:t.identHash,requires:m(t.dependencies.values()),dev:n.has(C.convertLocatorToDescriptor(t).descriptorHash)};return o}(t,r,{all:this.all});if(!this.recursive)for(const e of Object.keys(i))Object.prototype.hasOwnProperty.call(n,e)?i[e].requires={}:delete i[e];const d={requires:n,dependencies:i},E=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});let B;const D=await c.h.start({configuration:e,stdout:this.context.stdout},async()=>{try{B=await p.npmHttpUtils.post("/-/npm/v1/security/audits/quick",d,{authType:p.npmHttpUtils.AuthType.NO_AUTH,configuration:e,jsonResponse:!0,registry:E})}catch(e){throw"HTTPError"!==e.name?e:new g.lk(l.b.EXCEPTION,e.toString())}});if(D.hasErrors())return D.exitCode();const b=Q(B.metadata.vulnerabilities,this.severity);if(!this.json&&b)return u.emitTree(function(e,t){const r={},A={children:r};let n=Object.values(e.advisories);if(null!=t){const e=w(t);n=n.filter(t=>e.has(t.severity))}for(const e of f.sortMap(n,e=>e.module_name))r[e.module_name]={label:e.module_name,value:I.tuple(I.Type.RANGE,e.findings.map(e=>e.version).join(", ")),children:{Issue:{label:"Issue",value:I.tuple(I.Type.NO_HINT,e.title)},URL:{label:"URL",value:I.tuple(I.Type.URL,e.url)},Severity:{label:"Severity",value:I.tuple(I.Type.NO_HINT,e.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:I.tuple(I.Type.RANGE,e.vulnerable_versions)},"Patched Versions":{label:"Patched Versions",value:I.tuple(I.Type.RANGE,e.patched_versions)},Via:{label:"Via",value:I.tuple(I.Type.NO_HINT,Array.from(new Set(e.findings.map(e=>e.paths).flat().map(e=>e.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:I.tuple(I.Type.NO_HINT,e.recommendation.replace(/\n/g," "))}}};return A}(B,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1;return(await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(B),b||e.reportInfo(l.b.EXCEPTION,"No audit suggestions")})).exitCode()}}D.usage=d.Command.Usage({description:"perform a vulnerability audit against the installed packages",details:`\n This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.\n\n Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${E.map(e=>`\`${e}\``).join(", ")}.\n\n If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why \` to get more information as to who depends on them.\n `,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"]]}),(0,i.gn)([d.Command.Boolean("-A,--all")],D.prototype,"all",void 0),(0,i.gn)([d.Command.Boolean("-R,--recursive")],D.prototype,"recursive",void 0),(0,i.gn)([d.Command.String("--environment")],D.prototype,"environment",void 0),(0,i.gn)([d.Command.Boolean("--json")],D.prototype,"json",void 0),(0,i.gn)([d.Command.String("--severity")],D.prototype,"severity",void 0),(0,i.gn)([d.Command.Path("npm","audit")],D.prototype,"execute",null);var b=r(85622),v=r.n(b),S=r(53887),k=r.n(S),N=r(31669);class F extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t}=await a.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,A=[];let n=!1;const i=await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async o=>{for(const i of this.packages){let s;if("."===i){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new d.UsageError("Missing 'name' field in "+v().join(e.cwd,"package.json"));s=C.makeDescriptor(e.manifest.name,"unknown")}else s=C.parseDescriptor(i);const a=p.npmHttpUtils.getIdentUrl(s);let c;try{c=K(await p.npmHttpUtils.get(a,{configuration:e,ident:s,jsonResponse:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())}const u=Object.keys(c.versions).sort(k().compareLoose);let h=c["dist-tags"].latest||u[u.length-1];if(k().validRange(s.range)){const t=k().maxSatisfying(u,s.range);null!==t?h=t:(o.reportWarning(l.b.UNNAMED,`Unmet range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0)}else"unknown"!==s.range&&(o.reportWarning(l.b.UNNAMED,`Invalid range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0);const f=c.versions[h],I={...c,...f,version:h,versions:u};let E;if(null!==r){E={};for(const t of r){const r=I[t];void 0!==r?E[t]=r:(o.reportWarning(l.b.EXCEPTION,`The '${t}' field doesn't exist inside ${C.prettyIdent(e,s)}'s informations`),n=!0)}}else this.json||(delete I.dist,delete I.readme,delete I.users),E=I;o.reportJson(E),this.json||A.push(E)}});N.inspect.styles.name="cyan";for(const e of A)(e!==A[0]||n)&&this.context.stdout.write("\n"),this.context.stdout.write((0,N.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return i.exitCode()}}function K(e){if(Array.isArray(e)){const t=[];for(let r of e)r=K(r),r&&t.push(r);return t}if("object"==typeof e&&null!==e){const t={};for(const r of Object.keys(e)){if(r.startsWith("_"))continue;const A=K(e[r]);A&&(t[r]=A)}return t}return e||null}F.usage=d.Command.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command will fetch 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 `@` to the package argument to provide information specific to the latest version that satisfies the range. 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 informations.\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 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"]]}),(0,i.gn)([d.Command.Rest()],F.prototype,"packages",void 0),(0,i.gn)([d.Command.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"})],F.prototype,"fields",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],F.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","info")],F.prototype,"execute",null);var M=r(61899);class R extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await async function({registry:e,report:t,stdin:r,stdout:A}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};t.reportInfo(l.b.UNNAMED,"Logging in to "+e);let n=!1;e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(t.reportInfo(l.b.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0);t.reportSeparator();const{username:o,password:i}=await(0,M.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A}]);return t.reportSeparator(),{name:o,password:i}}({registry:t,report:r,stdin:this.context.stdin,stdout:this.context.stdout}),n="/-/user/org.couchdb.user:"+encodeURIComponent(A.name),i=await p.npmHttpUtils.put(n,A,{attemptedAs:A.name,configuration:e,registry:t,jsonResponse:!0,authType:p.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r,scope:A}){const n=e=>r=>{const A=f.isIndexableObject(r)?r:{},n=A[e],o=f.isIndexableObject(n)?n:{};return{...A,[e]:{...o,npmAuthToken:t}}},i=A?{npmScopes:n(A)}:{npmRegistries:n(e)};return await o.VK.updateHomeConfiguration(i)}(t,i.token,{configuration:e,scope:this.scope}),r.reportInfo(l.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function x({scope:e,publish:t,configuration:r,cwd:A}){return e&&t?p.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?p.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(r,A)).manifest,{configuration:r}):p.npmConfigUtils.getDefaultRegistry({configuration:r})}R.usage=d.Command.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Login to the registry configured for a given scope"})],R.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Login to the publish registry"})],R.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","login")],R.prototype,"execute",null);const L=new Set(["npmAuthIdent","npmAuthToken"]);class P extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=async()=>{var t;const r=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),A=await o.VK.find(this.context.cwd,this.context.plugins),n=C.makeIdent(null!==(t=this.scope)&&void 0!==t?t:null,"pkg");return!p.npmConfigUtils.getAuthConfiguration(r,{configuration:A,ident:n}).get("npmAuthToken")};return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{if(this.all&&(await async function(){const e=e=>{let t=!1;const r=f.isIndexableObject(e)?{...e}:{};r.npmAuthToken&&(delete r.npmAuthToken,t=!0);for(const e of Object.keys(r))O(r,e)&&(t=!0);if(0!==Object.keys(r).length)return t?r:e};return await o.VK.updateHomeConfiguration({npmRegistries:e,npmScopes:e})}(),r.reportInfo(l.b.UNNAMED,"Successfully logged out from everything")),this.scope)return await U("npmScopes",this.scope),void(await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+this.scope):r.reportWarning(l.b.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it"));const A=await x({configuration:e,cwd:this.context.cwd,publish:this.publish});await U("npmRegistries",A),await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+A):r.reportWarning(l.b.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}}function O(e,t){const r=e[t];if(!f.isIndexableObject(r))return!1;const A=new Set(Object.keys(r));if([...L].every(e=>!A.has(e)))return!1;for(const e of L)A.delete(e);if(0===A.size)return e[t]=void 0,!0;const n={...r};for(const e of L)delete n[e];return e[t]=n,!0}async function U(e,t){return await o.VK.updateHomeConfiguration({[e]:e=>{const r=f.isIndexableObject(e)?e:{};if(!Object.prototype.hasOwnProperty.call(r,t))return e;const A=r[t],n=f.isIndexableObject(A)?A:{},o=new Set(Object.keys(n));if([...L].every(e=>!o.has(e)))return e;for(const e of L)o.delete(e);if(0===o.size){if(1===Object.keys(r).length)return;return{...r,[t]:void 0}}const i={};for(const e of L)i[e]=void 0;return{...r,[t]:{...n,...i}}}})}P.usage=d.Command.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Logout of the registry configured for a given scope"})],P.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Logout of the publish registry"})],P.prototype,"publish",void 0),(0,i.gn)([d.Command.Boolean("-A,--all",{description:"Logout of all registries"})],P.prototype,"all",void 0),(0,i.gn)([d.Command.Path("npm","logout")],P.prototype,"execute",null);var T=r(63088),j=r(49881);class Y extends s.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new d.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new d.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const A=r.manifest.name,n=r.manifest.version,i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await p.npmHttpUtils.get(p.npmHttpUtils.getIdentUrl(A),{configuration:e,registry:i,ident:A,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new g.lk(l.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,n))return void t.reportWarning(l.b.UNNAMED,`Registry already knows about version ${n}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new g.lk(l.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await T.maybeExecuteWorkspaceLifecycleScript(r,"prepublish",{report:t}),await j.packUtils.prepareForPack(r,{report:t},async()=>{const n=await j.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await j.packUtils.genPackStream(r,n),s=await f.bufferStream(o),a=await p.npmPublishUtils.makePublishBody(r,s,{access:this.access,tag:this.tag,registry:i});try{await p.npmHttpUtils.put(p.npmHttpUtils.getIdentUrl(A),a,{configuration:e,registry:i,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(l.b.UNNAMED,"Package archive published")})).exitCode()}}Y.usage=d.Command.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]}),(0,i.gn)([d.Command.String("--access",{description:"The access for the published package (public or restricted)"})],Y.prototype,"access",void 0),(0,i.gn)([d.Command.String("--tag",{description:"The tag on the registry that the package should be attached to"})],Y.prototype,"tag",void 0),(0,i.gn)([d.Command.Boolean("--tolerate-republish",{description:"Warn and exit when republishing an already existing version of a package"})],Y.prototype,"tolerateRepublish",void 0),(0,i.gn)([d.Command.Path("npm","publish")],Y.prototype,"execute",null);var G=r(46009);class H extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);let A;if(void 0!==this.package)A=C.parseIdent(this.package);else{if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(!r.manifest.name)throw new d.UsageError("Missing 'name' field in "+G.y1.join(r.cwd,G.QS.manifest));A=r.manifest.name}const n=await J(A,e),i={children:f.sortMap(Object.entries(n),([e])=>e).map(([e,t])=>({value:I.tuple(I.Type.RESOLUTION,{descriptor:C.makeDescriptor(A,e),locator:C.makeLocator(A,t)})}))};return u.emitTree(i,{configuration:e,json:this.json,stdout:this.context.stdout})}}async function J(e,t){const r=`/-/package${p.npmHttpUtils.getIdentUrl(e)}/dist-tags`;return p.npmHttpUtils.get(r,{configuration:t,ident:e,jsonResponse:!0}).catch(e=>{throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())})}H.usage=d.Command.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:"\n This command will list all tags of a package from the npm registry.\n\n If the package is not specified, Yarn will default to the current workspace.\n ",examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]}),(0,i.gn)([d.Command.String({required:!1})],H.prototype,"package",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],H.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","tag","list")],H.prototype,"execute",null);class q extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseDescriptor(this.package,!0),n=A.range;if(!k().valid(n))throw new d.UsageError(`The range ${I.pretty(e,A.range,I.Type.RANGE)} must be a valid semver version`);const i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),c=I.pretty(e,A,I.Type.IDENT),g=I.pretty(e,n,I.Type.RANGE),u=I.pretty(e,this.tag,I.Type.CODE);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const r=await J(A,e);Object.prototype.hasOwnProperty.call(r,this.tag)&&r[this.tag]===n&&t.reportWarning(l.b.UNNAMED,`Tag ${u} is already set to version ${g}`);try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.put(t,n,{configuration:e,registry:i,ident:A,jsonRequest:!0,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${u} added to version ${g} of package ${c}`)})).exitCode()}}q.usage=d.Command.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:"\n This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n ",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"]]}),(0,i.gn)([d.Command.String()],q.prototype,"package",void 0),(0,i.gn)([d.Command.String()],q.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","add")],q.prototype,"execute",null);var z=r(15966);class W extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseIdent(this.package),n=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),i=I.pretty(e,this.tag,I.Type.CODE),c=I.pretty(e,A,I.Type.IDENT),g=await J(A,e);if(!Object.prototype.hasOwnProperty.call(g,this.tag))throw new d.UsageError(`${i} is not a tag of package ${c}`);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.del(t,{configuration:e,registry:n,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${i} removed from package ${c}`)})).exitCode()}}W.schema=z.object().shape({tag:z.string().notOneOf(["latest"])}),W.usage=d.Command.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:"\n This command will remove a tag from a package from the npm registry.\n ",examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]}),(0,i.gn)([d.Command.String()],W.prototype,"package",void 0),(0,i.gn)([d.Command.String()],W.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","remove")],W.prototype,"execute",null);class X extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):p.npmConfigUtils.getDefaultRegistry({configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{try{const A=await p.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:p.npmHttpUtils.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?C.makeIdent(this.scope,""):void 0});r.reportInfo(l.b.UNNAMED,A.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(l.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(l.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}X.usage=d.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"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Print username for the registry configured for a given scope"})],X.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Print username for the publish registry"})],X.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","whoami")],X.prototype,"execute",null);const V={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:o.a2.STRING,default:null}},commands:[D,F,R,P,Y,q,H,W,X]}},14224:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>W,npmConfigUtils:()=>A,npmHttpUtils:()=>n,npmPublishUtils:()=>o});var A={};r.r(A),r.d(A,{RegistryType:()=>l,getAuthConfiguration:()=>Q,getDefaultRegistry:()=>y,getPublishRegistry:()=>E,getRegistryConfiguration:()=>m,getScopeConfiguration:()=>w,getScopeRegistry:()=>B,normalizeRegistry:()=>I});var n={};r.r(n),r.d(n,{AuthType:()=>u,del:()=>N,get:()=>v,getIdentUrl:()=>b,handleInvalidAuthenticationError:()=>D,post:()=>S,put:()=>k});var o={};r.r(o),r.d(o,{makePublishBody:()=>J});var i=r(39922),s=r(54143),a=r(72785),c=r(53887),g=r.n(c);var l,u,h=r(79669),p=r(35691),d=r(92659),C=r(61899),f=r(78835);function I(e){return e.replace(/\/$/,"")}function E(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?I(e.publishConfig.registry):e.name?B(e.name.scope,{configuration:t,type:l.PUBLISH_REGISTRY}):y({configuration:t,type:l.PUBLISH_REGISTRY})}function B(e,{configuration:t,type:r=l.FETCH_REGISTRY}){const A=w(e,{configuration:t});if(null===A)return y({configuration:t,type:r});const n=A.get(r);return null===n?y({configuration:t,type:r}):I(n)}function y({configuration:e,type:t=l.FETCH_REGISTRY}){const r=e.get(t);return I(null!==r?r:e.get(l.FETCH_REGISTRY))}function m(e,{configuration:t}){const r=t.get("npmRegistries"),A=r.get(e);if(void 0!==A)return A;const n=r.get(e.replace(/^[a-z]+:/,""));return void 0!==n?n:null}function w(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function Q(e,{configuration:t,ident:r}){const A=r&&w(r.scope,{configuration:t});if((null==A?void 0:A.get("npmAuthIdent"))||(null==A?void 0:A.get("npmAuthToken")))return A;return m(e,{configuration:t})||t}async function D(e,{attemptedAs:t,registry:r,headers:A,configuration:n}){if("HTTPError"===e.name&&401===e.response.statusCode)throw new p.lk(d.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof t?"as "+await async function(e,t,{configuration:r}){var A;if(void 0===t||void 0===t.authorization)return"an anonymous user";try{const n=await h.get(new f.URL(e+"/-/whoami").href,{configuration:r,headers:t,jsonResponse:!0});return null!==(A=n.username)&&void 0!==A?A:"an unknown user"}catch(e){return"an unknown user"}}(r,A,{configuration:n}):"attempted as "+t})`)}function b(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function v(e,{configuration:t,headers:r,ident:A,authType:n,registry:o,...i}){if(A&&void 0===o&&(o=B(A.scope,{configuration:t})),A&&A.scope&&void 0===n&&(n=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const s=F(o,{authType:n,configuration:t,ident:A});let a;s&&(r={...r,authorization:s});try{a=new f.URL(e)}catch(t){a=new f.URL(o+e)}try{return await h.get(a.href,{configuration:t,headers:r,...i})}catch(e){throw await D(e,{registry:o,configuration:t,headers:r}),e}}async function S(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.post(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.post(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function k(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.put(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.put(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function N(e,{attemptedAs:t,configuration:r,headers:A,ident:n,authType:o=u.ALWAYS_AUTH,registry:i,...s}){if(n&&void 0===i&&(i=B(n.scope,{configuration:r})),"string"!=typeof i)throw new Error("Assertion failed: The registry should be a string");const a=F(i,{authType:o,configuration:r,ident:n});a&&(A={...A,authorization:a});try{return await h.del(i+e,{configuration:r,headers:A,...s})}catch(n){if(!M(n))throw await D(n,{attemptedAs:t,registry:i,configuration:r,headers:A}),n;const o=await K(),a={...A,...R(o)};try{return await h.del(`${i}${e}`,{configuration:r,headers:a,...s})}catch(e){throw await D(e,{attemptedAs:t,registry:i,configuration:r,headers:A}),e}}}function F(e,{authType:t=u.CONFIGURATION,configuration:r,ident:A}){const n=Q(e,{configuration:r,ident:A}),o=function(e,t){switch(t){case u.CONFIGURATION:return e.get("npmAlwaysAuth");case u.BEST_EFFORT:case u.ALWAYS_AUTH:return!0;case u.NO_AUTH:return!1;default:throw new Error("Unreachable")}}(n,t);if(!o)return null;if(n.get("npmAuthToken"))return"Bearer "+n.get("npmAuthToken");if(n.get("npmAuthIdent"))return"Basic "+n.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new p.lk(d.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function K(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const{otp:e}=await(0,C.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return e}function M(e){if("HTTPError"!==e.name)return!1;try{return e.response.headers["www-authenticate"].split(/,\s*/).map(e=>e.toLowerCase()).includes("otp")}catch(e){return!1}}function R(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(l||(l={})),function(e){e[e.NO_AUTH=0]="NO_AUTH",e[e.BEST_EFFORT=1]="BEST_EFFORT",e[e.CONFIGURATION=2]="CONFIGURATION",e[e.ALWAYS_AUTH=3]="ALWAYS_AUTH"}(u||(u={}));class x{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new f.URL(e.reference);return!!g().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote registry"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await v(x.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(A){r=await v(x.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await a.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let A=B(e.scope,{configuration:r});const n=x.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),A=A.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===A+n||t===A+n.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=g().clean(e.reference.slice("npm:".length));if(null===t)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${b(e)}/-/${e.name}-${t}.tgz`}}var L=r(46611),P=r(36545),O=r(32485);const U=s.makeIdent(null,"node-gyp"),T=/\b(node-gyp|prebuild-install)\b/;var j=r(52779);var Y=r(49881),G=r(76417),H=r(10129);async function J(e,t,{access:r,tag:A,registry:n}){const o=e.project.configuration,i=e.manifest.name,a=e.manifest.version,c=s.stringifyIdent(i),g=(0,G.createHash)("sha1").update(t).digest("hex"),l=H.Sd(t).toString();void 0===r&&(r=e.manifest.publishConfig&&"string"==typeof e.manifest.publishConfig.access?e.manifest.publishConfig.access:null!==o.get("npmPublishAccess")?o.get("npmPublishAccess"):i.scope?"restricted":"public");const u=await Y.packUtils.genPackageManifest(e),h=`${c}-${a}.tgz`,p=new f.URL(`${c}/-/${h}`,n);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[A]:a},versions:{[a]:{...u,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:g,integrity:l,tarball:p.toString()}}}}}const q={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:i.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:i.a2.SECRET,default:null}},z={npmPublishRegistry:{description:"Registry to push packages to",type:i.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.STRING,default:"https://registry.yarnpkg.com"}},W={configuration:{...q,...z,npmScopes:{description:"Settings per package scope",type:i.a2.MAP,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q,...z}}},npmRegistries:{description:"Settings per registry",type:i.a2.MAP,normalizeKeys:I,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:A}=s.parseRange(e.reference);return!!g().valid(r)&&(null!==A&&"string"==typeof A.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.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});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const A=await v(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await a.convertToZip(A,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}},x],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.tryParseDescriptor(e.range.slice("npm:".length),!0)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){const r=s.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(A,t,r)}async getSatisfying(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return r.resolver.getSatisfying(A,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!P.validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.parseRange(e.reference);return!!g().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));const n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0}),o=Object.keys(n.versions).map(e=>new(g().SemVer)(e)).filter(e=>A.test(e)),i=o.filter(e=>!n.versions[e.raw].deprecated),a=i.length>0?i:o;return a.sort((e,t)=>-e.compare(t)),a.map(t=>{const A=s.makeLocator(e,"npm:"+t.raw),o=n.versions[t.raw].dist.tarball;return x.isConventionalTarballUrl(A,o,{configuration:r.project.configuration})?A:s.bindLocator(A,{__archiveUrl:o})})}async getSatisfying(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));return t.map(e=>{try{return new(g().SemVer)(e.slice("npm:".length))}catch(e){return null}}).filter(e=>null!==e).filter(e=>A.test(e)).sort((e,t)=>-e.compare(t)).map(t=>s.makeLocator(e,"npm:"+t.raw))}async resolve(e,t){const{selector:r}=s.parseRange(e.reference),A=g().clean(r);if(null===A)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const n=await v(b(e),{configuration:t.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"versions"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(n.versions,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${A}"`);const o=new L.G;if(o.load(n.versions[A]),!o.dependencies.has(U.identHash)&&!o.peerDependencies.has(U.identHash))for(const r of o.scripts.values())if(r.match(T)){o.dependencies.set(U.identHash,s.makeDescriptor(U,"latest")),t.report.reportWarning(d.b.NODE_GYP_INJECTED,s.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(d.b.DEPRECATED_PACKAGE,`${s.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:A,languageName:"node",linkType:O.Un.HARD,dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!j.c.test(e.range.slice("npm:".length))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=e.range.slice("npm:".length),n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"dist-tags"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=n["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${A}"`);const i=o[A],a=s.makeLocator(e,"npm:"+i),c=n.versions[i].dist.tarball;return x.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.bindLocator(a,{__archiveUrl:c})]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Unreachable")}}]}},49881:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T,packUtils:()=>A});var A={};r.r(A),r.d(A,{genPackList:()=>K,genPackStream:()=>N,genPackageManifest:()=>F,hasPackScripts:()=>S,prepareForPack:()=>k});var n=r(54143),o=r(35691),i=r(92659),s=r(36370),a=r(40822);class c extends a.Command{}(0,s.gn)([a.Command.String("--cwd",{hidden:!0})],c.prototype,"cwd",void 0);var g=r(46611),l=r(46009);class u extends a.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${l.y1.relative(e,t)} isn't a workspace of ${l.y1.join(e,g.G.fileName)}).`)}}r(63129),r(5864),r(35747);new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);var h=r(71643),p=r(39922);(0,s.gn)([a.Command.Path("--welcome")],class extends c{async execute(){const e=await p.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${h.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${h.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${h.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${h.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${h.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${h.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${h.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var d=r(85824),C=r(28148),f=r(33720),I=r(15815),E=r(43896),B=r(63088),y=r(10489),m=r(2401),w=r.n(m),Q=r(59938),D=r(78761);const b=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],v=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function S(e){return!!B.hasWorkspaceScript(e,"prepack")||!!B.hasWorkspaceScript(e,"postpack")}async function k(e,{report:t},r){await B.maybeExecuteWorkspaceLifecycleScript(e,"prepack",{report:t});try{await r()}finally{await B.maybeExecuteWorkspaceLifecycleScript(e,"postpack",{report:t})}}async function N(e,t){var r,A;void 0===t&&(t=await K(e));const n=new Set;for(const t of null!==(A=null===(r=e.manifest.publishConfig)||void 0===r?void 0:r.executableFiles)&&void 0!==A?A:new Set)n.add(l.y1.normalize(t));for(const t of e.manifest.bin.values())n.add(l.y1.normalize(t));const o=Q.pack();process.nextTick(async()=>{for(const r of t){const t=l.y1.normalize(r),A=l.y1.resolve(e.cwd,t),i=l.y1.join("package",t),s=await E.xfs.lstatPromise(A),a={name:i,mtime:new Date(4567890e5)},c=n.has(t)?493:420;let g,u;const h=new Promise((e,t)=>{g=e,u=t}),p=e=>{e?u(e):g()};if(s.isFile()){let r;r="package.json"===t?Buffer.from(JSON.stringify(await F(e),null,2)):await E.xfs.readFilePromise(A),o.entry({...a,mode:c,type:"file"},r,p)}else s.isSymbolicLink()?o.entry({...a,mode:c,type:"symlink",linkname:await E.xfs.readlinkPromise(A)},p):p(new Error(`Unsupported file type ${s.mode} for ${l.cS.fromPortablePath(t)}`));await h}o.finalize()});const i=(0,D.createGzip)();return o.pipe(i),i}async function F(e){const t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(e=>e.beforeWorkspacePacking,e,t),t}async function K(e){var t,r,A,n,o,i,s,a;const c=e.project,g=c.configuration,u={accept:[],reject:[]};for(const e of v)u.reject.push(e);for(const e of b)u.accept.push(e);u.reject.push(g.get("rcFilename"));const h=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=l.y1.relative(e.cwd,t),A=l.y1.resolve(l.LZ.root,r);u.reject.push(A)};h(l.y1.resolve(c.cwd,g.get("lockfileFilename"))),h(g.get("bstatePath")),h(g.get("cacheFolder")),h(g.get("globalFolder")),h(g.get("installStatePath")),h(g.get("virtualFolder")),h(g.get("yarnPath")),await g.triggerHook(e=>e.populateYarnPaths,c,e=>{h(e)});for(const t of c.workspaces){const r=l.y1.relative(e.cwd,t.cwd);""===r||r.match(/^(\.\.)?\//)||u.reject.push("/"+r)}const p={accept:[],reject:[]},d=null!==(r=null===(t=e.manifest.publishConfig)||void 0===t?void 0:t.main)&&void 0!==r?r:e.manifest.main,C=null!==(n=null===(A=e.manifest.publishConfig)||void 0===A?void 0:A.module)&&void 0!==n?n:e.manifest.module,f=null!==(i=null===(o=e.manifest.publishConfig)||void 0===o?void 0:o.browser)&&void 0!==i?i:e.manifest.browser,I=null!==(a=null===(s=e.manifest.publishConfig)||void 0===s?void 0:s.bin)&&void 0!==a?a:e.manifest.bin;null!=d&&p.accept.push(l.y1.resolve(l.LZ.root,d)),null!=C&&p.accept.push(l.y1.resolve(l.LZ.root,C)),"string"==typeof f&&p.accept.push(l.y1.resolve(l.LZ.root,f));for(const e of I.values())p.accept.push(l.y1.resolve(l.LZ.root,e));if(f instanceof Map)for(const[e,t]of f.entries())p.accept.push(l.y1.resolve(l.LZ.root,e)),"string"==typeof t&&p.accept.push(l.y1.resolve(l.LZ.root,t));const E=null!==e.manifest.files;if(E){p.reject.push("/*");for(const t of e.manifest.files)R(p.accept,t,{cwd:l.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:A}){const n=[],o=new y.n(e),i=[[l.LZ.root,[A]]];for(;i.length>0;){const[e,A]=i.pop(),s=await o.lstatPromise(e);if(!x(e,{globalList:r,ignoreLists:s.isDirectory()?null:A}))if(s.isDirectory()){const n=await o.readdirPromise(e);let s=!1,a=!1;if(!t||e!==l.LZ.root)for(const e of n)s=s||".gitignore"===e,a=a||".npmignore"===e;const c=a?await M(o,e,".npmignore"):s?await M(o,e,".gitignore"):null;let g=null!==c?[c].concat(A):A;x(e,{globalList:r,ignoreLists:A})&&(g=[...A,{accept:[],reject:["**/*"]}]);for(const t of n)i.push([l.y1.resolve(e,t),g])}else(s.isFile()||s.isSymbolicLink())&&n.push(l.y1.relative(l.LZ.root,e))}return n.sort()}(e.cwd,{hasExplicitFileList:E,globalList:u,ignoreList:p})}async function M(e,t,r){const A={accept:[],reject:[]},n=await e.readFilePromise(l.y1.join(t,r),"utf8");for(const e of n.split(/\n/g))R(A.reject,e,{cwd:t});return A}function R(e,t,{cwd:r}){const A=t.trim();""!==A&&"#"!==A[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=l.y1.resolve(t,e)),r&&(e="!"+e),e}(A,{cwd:r}))}function x(e,{globalList:t,ignoreLists:r}){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0;if(null!==r)for(const t of r){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0}return!1}function L(e,t){let r=t;const A=[];for(let e=0;e{await k(r,{report:t},async()=>{t.reportJson({base:r.cwd});const e=await K(r);for(const r of e)t.reportInfo(null,r),t.reportJson({location:r});if(!this.dryRun){const t=await N(r,e),n=E.xfs.createWriteStream(A);t.pipe(n),await new Promise(e=>{n.on("finish",e)})}}),this.dryRun||(t.reportInfo(i.b.UNNAMED,"Package archive generated in "+h.pretty(e,A,h.Type.PATH)),t.reportJson({output:A}))})).exitCode()}}O.usage=a.Command.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]}),(0,s.gn)([a.Command.Boolean("--install-if-needed",{description:"Run a preliminary `yarn install` if the package contains build scripts"})],O.prototype,"installIfNeeded",void 0),(0,s.gn)([a.Command.Boolean("-n,--dry-run",{description:"Print the file paths without actually generating the package archive"})],O.prototype,"dryRun",void 0),(0,s.gn)([a.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],O.prototype,"json",void 0),(0,s.gn)([a.Command.String("--filename",{hidden:!1,description:"Create the archive at the specified path"}),a.Command.String("-o,--out",{description:"Create the archive at the specified path"})],O.prototype,"out",void 0),(0,s.gn)([a.Command.Path("pack")],O.prototype,"execute",null);const U=["dependencies","devDependencies","peerDependencies"],T={hooks:{beforeWorkspacePacking:(e,t)=>{t.publishConfig&&(t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const A of U)for(const s of e.manifest.getForScope(A).values()){const e=r.tryWorkspaceByDescriptor(s),a=n.parseRange(s.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(s))throw new o.lk(i.b.WORKSPACE_NOT_FOUND,n.prettyDescriptor(r.configuration,s)+": No local workspace found for this range")}else{let r;r=n.areDescriptorsEqual(s,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[A][n.stringifyIdent(s)]=r}}}},commands:[O]}},29936:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>re,patchUtils:()=>A});var A={};r.r(A),r.d(A,{applyPatchFile:()=>S,diffFolders:()=>H,extractPackageToDisk:()=>G,isParentRequired:()=>j,loadPatchFiles:()=>Y,makeDescriptor:()=>O,makeLocator:()=>U,parseDescriptor:()=>x,parseLocator:()=>L,parsePatchFile:()=>D});var n=r(39922),o=r(35691),i=r(92659),s=r(54143),a=r(73632),c=r(43896),g=r(46009),l=r(90739),u=r(75448),h=r(65281),p=r(33720),d=r(6220),C=r(36545),f=r(78420);class I extends Error{constructor(e,t){super("Cannot apply hunk #"+(e+1)),this.hunk=t}}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function B(e){return g.y1.relative(g.LZ.root,g.y1.resolve(g.LZ.root,g.cS.toPortablePath(e)))}function y(e){const t=e.trim().match(E);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var m;!function(e){e.Context="context",e.Insertion="insertion",e.Deletion="deletion"}(m||(m={}));const w={"@":"header","-":m.Deletion,"+":m.Insertion," ":m.Context,"\\":"pragma",undefined:m.Context};function Q(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function D(e){const t=e.split(/\n/g);return""===t[t.length-1]&&t.pop(),function(e){const t=[];for(const r of e){const{semverExclusivity:e,diffLineFromPath:A,diffLineToPath:n,oldMode:o,newMode:i,deletedFileMode:s,newFileMode:c,renameFrom:g,renameTo:l,beforeHash:u,afterHash:h,fromPath:p,toPath:d,hunks:C}=r,f=g?"rename":s?"file deletion":c?"file creation":C&&C.length>0?"patch":"mode change";let I=null;switch(f){case"rename":if(!g||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:B(g),toPath:B(l)}),I=l;break;case"file deletion":{const r=A||p;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(s),hash:u})}break;case"file creation":{const r=n||d;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(c),hash:h})}break;case"patch":case"mode change":I=d||n;break;default:a.assertNever(f)}I&&o&&i&&o!==i&&t.push({type:"mode change",semverExclusivity:e,path:B(I),oldMode:Q(o),newMode:Q(i)}),I&&C&&C.length&&t.push({type:"patch",semverExclusivity:e,path:B(I),hunks:C,beforeHash:u,afterHash:h})}return t}(function(e){const t=[];let r={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},A="parsing header",n=null,o=null;function i(){n&&(o&&(n.parts.push(o),o=null),r.hunks.push(n),n=null)}function s(){i(),t.push(r),r={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}}for(let t=0;te<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${A(e.header.original.length)} ${A(e.header.patched.length)} @@, got @@ ${A(t)} ${A(r)} @@)`)}}async function v(e,t,r){const A=await e.lstatPromise(t),n=await r();if(void 0!==n&&(t=n),e.lutimesPromise)await e.lutimesPromise(t,A.atime,A.mtime);else{if(A.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,A.atime,A.mtime)}}async function S(e,{baseFs:t=new f.S,dryRun:r=!1,version:A=null}={}){for(const n of e)if(null===n.semverExclusivity||null===A||C.satisfiesWithPrereleases(A,n.semverExclusivity))switch(n.type){case"file deletion":if(r){if(!t.existsSync(n.path))throw new Error("Trying to delete a file that doesn't exist: "+n.path)}else await v(t,g.y1.dirname(n.path),async()=>{await t.unlinkPromise(n.path)});break;case"rename":if(r){if(!t.existsSync(n.fromPath))throw new Error("Trying to move a file that doesn't exist: "+n.fromPath)}else await v(t,g.y1.dirname(n.fromPath),async()=>{await v(t,g.y1.dirname(n.toPath),async()=>{await v(t,n.fromPath,async()=>(await t.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(r){if(t.existsSync(n.path))throw new Error("Trying to create a file that already exists: "+n.path)}else{const e=n.hunk?n.hunk.parts[0].lines.join("\n")+(n.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(g.y1.dirname(n.path),{chmod:493,utimes:[456789000,456789000]}),await t.writeFilePromise(n.path,e,{mode:n.mode}),await t.utimesPromise(n.path,456789000,456789000)}break;case"patch":await v(t,n.path,async()=>{await F(n,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(n.path)).mode;if(k(n.newMode)!==k(e))continue;await v(t,n.path,async()=>{await t.chmodPromise(n.path,n.newMode)})}break;default:a.assertNever(n)}}function k(e){return(64&e)>0}function N(e){return e.replace(/\s+$/,"")}async function F({hunks:e,path:t},{baseFs:r,dryRun:A=!1}){const n=await r.statSync(t).mode,o=(await r.readFileSync(t,"utf8")).split(/\n/),i=[];let s=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+s),A=Math.max(0,r-c),n=Math.max(0,o.length-r-t.header.original.length),a=Math.max(A,n);let g=0,l=0,u=null;for(;g<=a;){if(g<=A&&(l=r-g,u=K(t,o,l),null!==u)){g=-g;break}if(g<=n&&(l=r+g,u=K(t,o,l),null!==u))break;g+=1}if(null===u)throw new I(e.indexOf(t),t);i.push(u),s+=g,c=l+t.header.original.length}if(A)return;let g=0;for(const e of i)for(const t of e)switch(t.type){case"splice":{const e=t.index+g;o.splice(e,t.numToDelete,...t.linesToInsert),g+=t.linesToInsert.length-t.numToDelete}break;case"pop":o.pop();break;case"push":o.push(t.line);break;default:a.assertNever(t)}await r.writeFilePromise(t,o.join("\n"),{mode:n})}function K(e,t,r){const A=[];for(const o of e.parts)switch(o.type){case m.Context:case m.Deletion:for(const e of o.lines){const A=t[r];if(null==A||(n=e,N(A)!==N(n)))return null;r+=1}o.type===m.Deletion&&(A.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&A.push({type:"push",line:""}));break;case m.Insertion:A.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&A.push({type:"pop"});break;default:a.assertNever(o.type)}var n;return A}const M=/^builtin<([^>]+)>$/;function R(e,t){const{source:r,selector:A,params:n}=s.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const o=A?A.split(/&/).map(e=>g.cS.toPortablePath(e)):[],i=n&&"string"==typeof n.locator?s.parseLocator(n.locator):null,a=n&&"string"==typeof n.version?n.version:null;return{parentLocator:i,sourceItem:t(r),patchPaths:o,sourceVersion:a}}function x(e){const{sourceItem:t,...r}=R(e.range,s.parseDescriptor);return{...r,sourceDescriptor:t}}function L(e){const{sourceItem:t,...r}=R(e.reference,s.parseLocator);return{...r,sourceLocator:t}}function P({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:A,patchHash:n},o){const i=null!==e?{locator:s.stringifyLocator(e)}:{},a=void 0!==A?{version:A}:{},c=void 0!==n?{hash:n}:{};return s.makeRange({protocol:"patch:",source:o(t),selector:r.join("&"),params:{...a,...c,...i}})}function O(e,{parentLocator:t,sourceDescriptor:r,patchPaths:A}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,patchPaths:A},s.stringifyDescriptor))}function U(e,{parentLocator:t,sourcePackage:r,patchPaths:A,patchHash:n}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:A,patchHash:n},s.stringifyLocator))}function T({onAbsolute:e,onRelative:t,onBuiltin:r},A){const n=A.match(M);return null!==n?r(n[1]):g.y1.isAbsolute(A)?e(A):t(A)}function j(e){return T({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function Y(e,t,r){const A=null!==e?await r.fetcher.fetch(e,r):null,n=A&&A.localPath?{packageFs:new u.M(g.LZ.root),prefixPath:g.y1.relative(g.LZ.root,A.localPath)}:A;A&&A!==n&&A.releaseFs&&A.releaseFs();return(await a.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>T({onAbsolute:async()=>await c.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===A)throw new Error("Assertion failed: The parent locator should have been fetched");return await A.packageFs.readFilePromise(e,"utf8")},onBuiltin:async e=>await r.project.configuration.firstHook(e=>e.getBuiltinPatch,r.project,e)},e))))).map(e=>"string"==typeof e?e.replace(/\r\n?/g,"\n"):e)}async function G(e,{cache:t,project:r}){const A=r.storedChecksums,n=new p.$,o=r.configuration.makeFetcher(),i=await o.fetch(e,{cache:t,project:r,fetcher:o,checksums:A,report:n}),a=await c.xfs.mktempPromise();return await c.xfs.copyPromise(a,i.prefixPath,{baseFs:i.packageFs}),await c.xfs.writeJsonPromise(g.y1.join(a,".yarn-patch.json"),{locator:s.stringifyLocator(e)}),c.xfs.detachTemp(a),a}async function H(e,t){const r=g.cS.fromPortablePath(e).replace(/\\/g,"/"),A=g.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:n}=await d.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,A],{cwd:g.cS.toPortablePath(process.cwd())}),o=r.startsWith("/")?e=>e.slice(1):e=>e;return n.replace(new RegExp(`(a|b)(${a.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+a.escapeRegExp(`/${o(A)}/`),"g"),"$1/").replace(new RegExp(a.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(a.escapeRegExp(A+"/"),"g"),"")}var J=r(71643);function q(e,{configuration:t,report:r}){for(const A of e.parts)for(const e of A.lines)switch(A.type){case m.Context:r.reportInfo(null," "+J.pretty(t,e,"grey"));break;case m.Deletion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"- "+J.pretty(t,e,J.Type.REMOVED));break;case m.Insertion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"+ "+J.pretty(t,e,J.Type.ADDED));break;default:a.assertNever(A.type)}}var z=r(20624);var W=r(36370),X=r(25413),V=r(85824),_=r(28148),Z=r(40822);class $ extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const o=g.y1.resolve(this.context.cwd,g.cS.toPortablePath(this.patchFolder)),i=g.y1.join(o,".yarn-patch.json");if(!c.xfs.existsSync(i))throw new Z.UsageError("The argument folder didn't get created by 'yarn patch'");const a=await c.xfs.readJsonPromise(i),l=s.parseLocator(a.locator,!0);if(!t.storedPackages.has(l.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");const u=await G(l,{cache:A,project:t});this.context.stdout.write(await H(u,o))}}$.usage=Z.Command.Usage({description:"\n This will turn the folder passed in parameter into a patchfile suitable for consumption with the `patch:` protocol.\n\n Only folders generated through `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "}),(0,W.gn)([Z.Command.String()],$.prototype,"patchFolder",void 0),(0,W.gn)([Z.Command.Path("patch-commit")],$.prototype,"execute",null);var ee=r(15815);class te extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let o=s.parseLocator(this.package);if("unknown"===o.reference){const r=a.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||s.isVirtualLocator(e)?a.mapAndFilter.skip:e);if(0===r.length)throw new Z.UsageError("No package found in the project for the given locator");if(r.length>1)throw new Z.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why ` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+s.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");await ee.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const n=await G(o,{cache:A,project:t});r.reportInfo(i.b.UNNAMED,`Package ${s.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(i.b.UNNAMED,"You can now edit the following folder: "+J.pretty(e,g.cS.fromPortablePath(n),"magenta")),r.reportInfo(i.b.UNNAMED,`Once you are done run ${J.pretty(e,"yarn patch-commit "+g.cS.fromPortablePath(n),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}te.usage=Z.Command.Usage({description:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '}),(0,W.gn)([Z.Command.String()],te.prototype,"package",void 0),(0,W.gn)([Z.Command.Path("patch")],te.prototype,"execute",null);const re={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:n.a2.BOOLEAN,default:!1}},commands:[$,te],fetchers:[class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:A,sourceVersion:n,patchPaths:p}=L(e),d=await Y(r,p,t),C=await c.xfs.mktempPromise(),f=g.y1.join(C,"patched.zip"),E=await t.fetcher.fetch(A,t),B=s.getIdentVendorPath(e),y=await(0,h.getLibzipPromise)(),m=new l.d(f,{libzip:y,create:!0,level:t.project.configuration.get("compressionLevel")});await m.mkdirpPromise(B),await a.releaseAfterUseAsync(async()=>{await m.copyPromise(B,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs);const w=new u.M(g.y1.resolve(g.LZ.root,B),{baseFs:m});for(const e of d)if(null!==e)try{await S(D(e),{baseFs:w,version:n})}catch(e){if(!(e instanceof I))throw e;const r=t.project.configuration.get("enableInlineHunks"),A=r?"":" (set enableInlineHunks for details)";throw new o.lk(i.b.PATCH_HUNK_FAILED,e.message+A,A=>{r&&q(e.hunk,{configuration:t.project.configuration,report:A})})}return m}}],resolvers:[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,r){const{patchPaths:A}=x(e);return A.every(e=>!j(e))?e:s.bindDescriptor(e,{locator:s.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=x(e);return[r]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{parentLocator:A,sourceDescriptor:n,patchPaths:o}=x(e),i=await Y(A,o,r.fetchOptions),s=t.get(n.descriptorHash);if(void 0===s)throw new Error("Assertion failed: The dependency should have been resolved");return[U(e,{parentLocator:A,sourcePackage:s,patchPaths:o,patchHash:z.makeHash("2",...i).slice(0,6)})]}async getSatisfying(e,t,r){return null}async resolve(e,t){const{sourceLocator:r}=L(e);return{...await t.resolver.resolve(r,t),...e}}}]}},83228:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PnpInstaller:()=>k,PnpLinker:()=>S,default:()=>Y,getPnpPath:()=>T,jsInstallUtils:()=>A,pnpUtils:()=>n,quotePathIfNeeded:()=>j});var A={};r.r(A),r.d(A,{checkAndReportManifestCompatibility:()=>y,extractBuildScripts:()=>m,getExtractHint:()=>Q,hasBindingGyp:()=>D});var n={};r.r(n),r.d(n,{getUnpluggedPath:()=>b});var o=r(39922),i=r(43896),s=r(46009),a=r(53887),c=r.n(a),g=r(54143),l=r(71643),u=r(73632),h=r(32485),p=r(92659),d=r(46611),C=r(17674),f=r(75448),I=r(34432),E=r(40822),B=r(92409);function y(e,t,r,{configuration:A,report:n}){return d.G.isManifestFieldCompatible(t.manifest.os,process.platform)?!!d.G.isManifestFieldCompatible(t.manifest.cpu,process.arch)||(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_CPU,`${g.prettyLocator(A,e)} The CPU architecture ${process.arch} is incompatible with this module, ${r} skipped.`),!1):(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_OS,`${g.prettyLocator(A,e)} The platform ${process.platform} is incompatible with this module, ${r} skipped.`),!1)}function m(e,t,r,{configuration:A,report:n}){const o=[];for(const e of["preinstall","install","postinstall"])t.manifest.scripts.has(e)&&o.push([B.k.SCRIPT,e]);if(!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&o.push([B.k.SHELLCODE,"node-gyp rebuild"]),0===o.length)return[];if(!A.get("enableScripts")&&!r.built)return null==n||n.reportWarningOnce(p.b.DISABLED_BUILD_SCRIPTS,g.prettyLocator(A,e)+" lists build scripts, but all build scripts have been disabled."),[];if(e.linkType!==h.Un.HARD)return null==n||n.reportWarningOnce(p.b.SOFT_LINK_BUILD,g.prettyLocator(A,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),[];if(r&&!1===r.built)return null==n||n.reportInfoOnce(p.b.BUILD_DISABLED,g.prettyLocator(A,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),[];return y(e,t,"build",{configuration:A,report:n})?o:[]}const w=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function Q(e){return e.packageFs.getExtractHint({relevantExtensions:w})}function D(e){const t=s.y1.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}function b(e,{configuration:t}){return s.y1.resolve(t.get("pnpUnpluggedFolder"),g.slugifyLocator(e))}const v=new Set([g.makeIdent(null,"nan").identHash,g.makeIdent(null,"node-gyp").identHash,g.makeIdent(null,"node-pre-gyp").identHash,g.makeIdent(null,"node-addon-api").identHash,g.makeIdent(null,"fsevents").identHash]);class S{constructor(){this.mode="strict"}supportsPackage(e,t){return"pnp"===t.project.configuration.get("nodeLinker")&&t.project.configuration.get("pnpMode")===this.mode}async findPackageLocation(e,t){const r=T(t.project).main;if(!i.xfs.existsSync(r))throw new E.UsageError(`The project in ${l.pretty(t.project.configuration,t.project.cwd+"/package.json",l.Type.PATH)} doesn't seem to have been installed - running an install there might help`);const A=u.dynamicRequireNoCache(r),n={name:g.requirableIdent(e),reference:e.reference},o=A.getPackageInformation(n);if(!o)throw new E.UsageError(`Couldn't find ${g.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return s.cS.toPortablePath(o.packageLocation)}async findPackageLocator(e,t){const A=T(t.project).main;if(!i.xfs.existsSync(A))return null;const n=s.cS.fromPortablePath(A),o=u.dynamicRequire(n);delete r.c[n];const a=o.findPackageLocator(s.cS.fromPortablePath(e));return a?g.makeLocator(g.parseIdent(a.name),a.reference):null}makeInstaller(e){return new k(e)}}class k{constructor(e){this.opts=e,this.mode="strict",this.packageRegistry=new Map,this.virtualTemplates=new Map,this.customData={store:new Map},this.unpluggedPaths=new Set,this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){const r=g.requirableIdent(e),A=e.reference,n=!!this.opts.project.tryWorkspaceByLocator(e),o=e.peerDependencies.size>0&&!g.isVirtualLocator(e),i=!o&&!n,a=!o&&e.linkType!==h.Un.SOFT;let c=this.customData.store.get(e.locatorHash);void 0===c&&(c=await async function(e,t){var r;const A=null!==(r=await d.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new d.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{os:A.os,cpu:A.cpu,scripts:A.scripts,preferUnplugged:A.preferUnplugged},misc:{extractHint:Q(t),hasBindingGyp:D(t)}}}(0,t),e.linkType===h.Un.HARD&&this.customData.store.set(e.locatorHash,c));const l=this.opts.project.getDependencyMeta(e,e.version),p=i?m(e,c,l,{configuration:this.opts.project.configuration,report:this.opts.report}):[],f=a?await this.unplugPackageIfNeeded(e,c,t,l):t.packageFs;if(s.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const I=s.y1.resolve(f.getRealPath(),t.prefixPath),E=N(this.opts.project.cwd,I),B=new Map,y=new Set;if(g.isVirtualLocator(e)){for(const t of e.peerDependencies.values())B.set(g.requirableIdent(t),null),y.add(g.stringifyIdent(t));if(!this.opts.project.tryWorkspaceByLocator(e)){const t=g.devirtualizeLocator(e);this.virtualTemplates.set(t.locatorHash,{location:N(this.opts.project.cwd,C.p.resolveVirtual(I)),locator:t})}}return u.getMapWithDefault(this.packageRegistry,r).set(A,{packageLocation:E,packageDependencies:B,packagePeers:y,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),{packageLocation:I,buildDirective:p.length>0?p:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,A]of t){const t=g.areIdentsEqual(e,A)?A.reference:[g.requirableIdent(A),A.reference];r.packageDependencies.set(g.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(g.requirableIdent(e),e.reference)}}async finalizeInstall(){const e=new Set;for(const{locator:e,location:t}of this.virtualTemplates.values())u.getMapWithDefault(this.packageRegistry,g.stringifyIdent(e)).set(e.reference,{packageLocation:t,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const t=this.opts.project.configuration.get("pnpFallbackMode"),r=e,A=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:g.requirableIdent(e),reference:e.reference})),n="none"!==t,o=[],i=new Map,s=u.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),a=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===t)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&o.push({name:g.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:r,dependencyTreeRoots:A,enableTopLevelFallback:n,fallbackExclusionList:o,fallbackPool:i,ignorePattern:s,packageRegistry:a,shebang:c}),{customData:this.customData}}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=T(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await i.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await i.xfs.removePromise(t.main),void await i.xfs.removePromise(r);const A=await this.locateNodeModules(e.ignorePattern);if(A.length>0){this.opts.report.reportWarning(p.b.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(const e of A)await i.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const A=(0,I.gY)(e);await i.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.removePromise(r)}else{const A=s.y1.relative(s.y1.dirname(t.main),r),{dataFile:n,loaderFile:o}=(0,I.Q$)({...e,dataLocation:A});await i.xfs.changeFilePromise(t.main,o,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.changeFilePromise(r,n,{automaticNewlines:!0}),await i.xfs.chmodPromise(r,420)}const n=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await i.xfs.removePromise(n);else for(const e of await i.xfs.readdirPromise(n)){const t=s.y1.resolve(n,e);this.unpluggedPaths.has(t)||await i.xfs.removePromise(t)}}async locateNodeModules(e){const t=[],r=e?new RegExp(e):null;for(const e of this.opts.project.workspaces){const A=s.y1.join(e.cwd,"node_modules");if(r&&r.test(s.y1.relative(this.opts.project.cwd,e.cwd))||!i.xfs.existsSync(A))continue;const n=await i.xfs.readdirPromise(A,{withFileTypes:!0}),o=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(o.length===n.length)t.push(A);else for(const e of o)t.push(s.y1.join(A,e.name))}return t}async unplugPackageIfNeeded(e,t,r,A){return this.shouldBeUnplugged(e,t,A)?this.unplugPackage(e,r):r.packageFs}shouldBeUnplugged(e,t,r){return void 0!==r.unplugged?r.unplugged:!!v.has(e.identHash)||(null!==t.manifest.preferUnplugged?t.manifest.preferUnplugged:!!(m(e,t,r,{configuration:this.opts.project.configuration}).length>0||t.misc.extractHint))}async unplugPackage(e,t){const r=b(e,{configuration:this.opts.project.configuration});this.unpluggedPaths.add(r);const A=s.y1.join(r,t.prefixPath,".ready");return await i.xfs.existsPromise(A)||(await i.xfs.mkdirPromise(r,{recursive:!0}),await i.xfs.copyPromise(r,s.LZ.dot,{baseFs:t.packageFs,overwrite:!1}),await i.xfs.writeFilePromise(A,"")),new f.M(r)}getPackageInformation(e){const t=g.requirableIdent(e),r=e.reference,A=this.packageRegistry.get(t);if(!A)throw new Error(`Assertion failed: The package information store should have been available (for ${g.prettyIdent(this.opts.project.configuration,e)})`);const n=A.get(r);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${g.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){const t=u.getMapWithDefault(this.packageRegistry,"@@disk"),r=N(this.opts.project.cwd,e);return u.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1}))}}function N(e,t){let r=s.y1.relative(e,t);return r.match(/^\.{0,2}\//)||(r="./"+r),r.replace(/\/?$/,"/")}var F=r(36370),K=r(25413),M=r(85824),R=r(28148),x=r(15815),L=r(36545),P=r(2401),O=r.n(P);class U extends K.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.all=!1,this.recursive=!1,this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await M.I.find(e,this.context.cwd),A=await R.C.find(e);if(!r)throw new K.WorkspaceRequiredError(t.cwd,this.context.cwd);if("pnp"!==e.get("nodeLinker"))throw new E.UsageError("This command can only be used if the `nodeLinker` option is set to `pnp`");await t.restoreInstallState();const n=new Set(this.patterns),i=this.patterns.map(t=>{const r=g.parseDescriptor(t),A="unknown"!==r.range?r:g.makeDescriptor(r,"*");if(!c().validRange(A.range))throw new E.UsageError(`The range of the descriptor patterns must be a valid semver range (${g.prettyDescriptor(e,A)})`);return e=>{const r=g.stringifyIdent(e);return!!O().isMatch(r,g.stringifyIdent(A))&&(!(e.version&&!L.satisfiesWithPrereleases(e.version,A.range))&&(n.delete(t),!0))}}),s=e=>{const r=new Set,A=[],n=(e,o)=>{if(!r.has(e.locatorHash)&&(r.add(e.locatorHash),!t.tryWorkspaceByLocator(e)&&i.some(t=>t(e))&&A.push(e),!(o>0)||this.recursive))for(const r of e.dependencies.values()){const e=t.storedResolutions.get(r.descriptorHash);if(!e)throw new Error("Assertion failed: The resolution should have been registered");const A=t.storedPackages.get(e);if(!A)throw new Error("Assertion failed: The package should have been registered");n(A,o+1)}};for(const r of e){const e=t.storedPackages.get(r.anchoredLocator.locatorHash);if(!e)throw new Error("Assertion failed: The package should have been registered");n(e,0)}return A};let a,h;if(this.all&&this.recursive?(a=(()=>{const e=[];for(const r of t.storedPackages.values())t.tryWorkspaceByLocator(r)||g.isVirtualLocator(r)||!i.some(e=>e(r))||e.push(r);return e})(),h="the project"):this.all?(a=s(t.workspaces),h="any workspace"):(a=s([r]),h="this workspace"),n.size>1)throw new E.UsageError(`Patterns ${l.prettyList(e,n,l.Type.CODE)} don't match any packages referenced by ${h}`);if(n.size>0)throw new E.UsageError(`Pattern ${l.prettyList(e,n,l.Type.CODE)} doesn't match any packages referenced by ${h}`);a=u.sortMap(a,e=>g.stringifyLocator(e));return(await x.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async r=>{var n;for(const A of a){const o=null!==(n=A.version)&&void 0!==n?n:"unknown";t.topLevelWorkspace.manifest.ensureDependencyMeta(g.makeDescriptor(A,o)).unplugged=!0,r.reportInfo(p.b.UNNAMED,`Will unpack ${g.prettyLocator(e,A)} to ${l.pretty(e,b(A,{configuration:e}),l.Type.PATH)}`),r.reportJson({locator:g.stringifyLocator(A),version:o})}await t.topLevelWorkspace.persistManifest(),r.reportSeparator(),await t.install({cache:A,report:r})})).exitCode()}}U.usage=E.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]}),(0,F.gn)([E.Command.Rest()],U.prototype,"patterns",void 0),(0,F.gn)([E.Command.Boolean("-A,--all",{description:"Unplug direct dependencies from the entire project"})],U.prototype,"all",void 0),(0,F.gn)([E.Command.Boolean("-R,--recursive",{description:"Unplug both direct and transitive dependencies"})],U.prototype,"recursive",void 0),(0,F.gn)([E.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],U.prototype,"json",void 0),(0,F.gn)([E.Command.Path("unplug")],U.prototype,"execute",null);const T=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:s.y1.join(e.cwd,t),other:s.y1.join(e.cwd,r)}},j=e=>/\s/.test(e)?JSON.stringify(e):e;const Y={hooks:{populateYarnPaths:async function(e,t){t(T(e).main),t(T(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const A=T(e).main,n="--require "+j(s.cS.fromPortablePath(A));if(A.includes(" ")&&c().lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(i.xfs.existsSync(A)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${n} ${e}`:n,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:o.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:o.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:o.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:o.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:o.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:o.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:o.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:o.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[S],commands:[U]}},43418:(e,t,r)=>{"use strict";r.r(t);var A=r(50683),n=r.n(A);Object.fromEntries||(Object.fromEntries=n());var o=r(59355),i=r(10419),s=r(45330);(0,i.D)({binaryVersion:o.o||"",pluginConfiguration:(0,s.e)()})},25413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>A.F,WorkspaceRequiredError:()=>s,getDynamicLibs:()=>c,getPluginConfiguration:()=>g.e,main:()=>h.D,openWorkspace:()=>u,pluginCommands:()=>p.f});var A=r(56087),n=r(46611),o=r(46009),i=r(40822);class s extends i.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${o.y1.relative(e,t)} isn't a workspace of ${o.y1.join(e,n.G.fileName)}).`)}}const a=["@yarnpkg/cli","@yarnpkg/core","@yarnpkg/fslib","@yarnpkg/libzip","@yarnpkg/parsers","@yarnpkg/shell","clipanion","semver","yup"],c=()=>new Map(a.map(e=>[e,r(98497)(e)]));var g=r(45330),l=r(85824);async function u(e,t){const{project:r,workspace:A}=await l.I.find(e,t);if(!A)throw new s(r.cwd,t);return A}var h=r(10419),p=r(15683)},10419:(e,t,r)=>{"use strict";r.d(t,{D:()=>f});var A=r(36545),n=r(39922),o=r(81832),i=r(43896),s=r(46009),a=r(63129),c=r(5864),g=r(40822),l=r(35747),u=r(15683),h=r(36370),p=r(71643),d=r(56087);class C extends d.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${p.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${p.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${p.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${p.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${p.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${p.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${p.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function f({binaryVersion:e,pluginConfiguration:t}){async function r(){const h=new g.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});h.register(C);try{await async function h(p){var d,C,f,I,E;const B=process.versions.node,y=">=10.17 <14 || >14.1";if("1"!==process.env.YARN_IGNORE_NODE&&!A.satisfiesWithPrereleases(B,y))throw new g.UsageError(`This tool requires a Node version compatible with ${y} (got ${B}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);const m=await n.VK.find(s.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),w=m.get("yarnPath"),Q=m.get("ignorePath"),D=m.get("ignoreCwd");if(!Q&&!D&&w===s.cS.toPortablePath(s.cS.resolve(process.argv[1])))return process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",void await h(p);if(null===w||Q){Q&&delete process.env.YARN_IGNORE_PATH;m.get("enableTelemetry")&&!c.isCI&&process.stdout.isTTY&&(n.VK.telemetry=new o.E(m,"puba9cdc10ec5790a2cf4969dd413a47270")),null===(d=n.VK.telemetry)||void 0===d||d.reportVersion(e);for(const[e,t]of m.plugins.entries()){u.f.has(null!==(f=null===(C=e.match(/^@yarnpkg\/plugin-(.*)$/))||void 0===C?void 0:C[1])&&void 0!==f?f:"")&&(null===(I=n.VK.telemetry)||void 0===I||I.reportPluginName(e));for(const e of t.commands||[])p.register(e)}const A=p.process(process.argv.slice(2));A.help||null===(E=n.VK.telemetry)||void 0===E||E.reportCommandName(A.path.join(" "));const i=A.cwd;if(void 0!==i&&!D){const e=(0,l.realpathSync)(process.cwd()),t=(0,l.realpathSync)(i);if(e!==t)return process.chdir(i),void await r()}await p.runExit(A,{cwd:s.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(i.xfs.existsSync(w))try{!function(e){const t=s.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,a.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,a.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(w)}catch(e){process.exitCode=e.code||1}else process.stdout.write(p.error(new Error(`The "yarn-path" option has been set (in ${m.sources.get("yarnPath")}), but the specified location doesn't exist (${w}).`))),process.exitCode=1}(h)}catch(e){process.stdout.write(h.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1}).finally(()=>i.xfs.rmtempPromise())}(0,h.gn)([g.Command.Path("--welcome")],C.prototype,"execute",null)},15683:(e,t,r)=>{"use strict";r.d(t,{f:()=>A});const A=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]])},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var A=r(36370),n=r(40822);class o extends n.Command{}(0,A.gn)([n.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>I});var A=r(78420),n=r(15037),o=r(90739),i=r(14626),s=r(46009),a=r(43896),c=r(65281),g=r(35747),l=r.n(g),u=r(92659),h=r(35691),p=r(20624),d=r(73632),C=r(54143);const f=7;class I{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:A=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=A;const n=t.get("cacheKeyOverride");if(null!==n)this.cacheKey=""+n;else{const e=t.get("compressionLevel"),r=e!==o.k?"c"+e:"";this.cacheKey=[f,r].join("")}}static async find(e,{immutable:t,check:r}={}){const A=new I(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await A.setup(),A}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;const e=this.configuration.get("globalFolder")+"/cache";return e!==this.cwd?e:null}getVersionFilename(e){return`${C.slugifyLocator(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){const r=function(e){const t=e.indexOf("/");return-1!==t?e.slice(t+1):e}(t).slice(0,10);return`${C.slugifyLocator(e)}-${r}.zip`}getLocatorPath(e,t){if(null===this.mirrorCwd)return s.y1.resolve(this.cwd,this.getVersionFilename(e));if(null===t)return null;return E(t)!==this.cacheKey?null:s.y1.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){const t=this.mirrorCwd;return null!==t?s.y1.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache")){await a.xfs.mkdirPromise(this.cwd,{recursive:!0});const e=s.y1.resolve(this.cwd,".gitignore");await a.xfs.changeFilePromise(e,"/.gitignore\n*.flock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:g,loader:f,skipIntegrityCheck:I}){const B=this.getLocatorMirrorPath(e),y=new A.S,m=async(e,r=null)=>{const A=I&&t?t:`${this.cacheKey}/${await p.checksumFile(e)}`;if(null!==r){if(A!==(I&&t?t:`${this.cacheKey}/${await p.checksumFile(r)}`))throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&A!==t){let e;switch(e=this.check?"throw":E(t)!==E(A)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return A;default:case"throw":throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return A},w=async t=>{if(!f)throw new Error("Cache check required but no loader configured for "+C.prettyLocator(this.configuration,e));const r=await f(),A=r.getRealPath();return r.saveAndClose(),await a.xfs.chmodPromise(A,420),await m(t,A)},Q=async()=>{if(null===B||!await a.xfs.existsPromise(B)){const e=await f(),t=e.getRealPath();return e.saveAndClose(),t}const t=await a.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await a.xfs.copyFilePromise(B,r,l().constants.COPYFILE_FICLONE),r},D=async()=>{if(!f)throw new Error("Cache entry required but missing for "+C.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(u.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+C.prettyLocator(this.configuration,e));const t=await Q();await a.xfs.chmodPromise(t,420);const r=await m(t),A=this.getLocatorPath(e,r);if(!A)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(A,async()=>await this.writeFileWithLock(B,async()=>(await a.xfs.movePromise(t,A),null!==B&&await a.xfs.copyFilePromise(A,B,l().constants.COPYFILE_FICLONE),[A,r])))};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const[b,v]=await(async()=>{const A=(async()=>{const A=this.getLocatorPath(e,t),n=null!==A&&await y.existsPromise(A),o=n?r:g;if(o&&o(),n){let e=null;const t=A;return e=this.check?await w(t):await m(t),[t,e]}return D()})();this.mutexes.set(e.locatorHash,A);try{return await A}finally{this.mutexes.delete(e.locatorHash)}})();this.markedFiles.add(b);let S=null;const k=await(0,c.getLibzipPromise)(),N=new n.v(()=>d.prettifySyncErrors(()=>S=new o.d(b,{baseFs:y,libzip:k,readOnly:!0}),t=>`Failed to open the cache entry for ${C.prettyLocator(this.configuration,e)}: ${t}`),s.y1);return[new i.K(b,{baseFs:N,pathUtils:s.y1}),()=>{null!==S&&S.discardAndClose()},v]}async writeFileWithLock(e,t){return null===e?await t():(await a.xfs.mkdirPromise(s.y1.dirname(e),{recursive:!0}),await a.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},39922:(e,t,r)=>{"use strict";r.d(t,{VK:()=>W,nh:()=>U,tr:()=>O,a5:()=>j,EW:()=>z,a2:()=>T});var A=r(43896),n=r(46009),o=r(90739),i=r(11640),s=r(54738),a=r.n(s),c=r(5864),g=r(40822),l=r(61578),u=r.n(l),h=r(53887),p=r.n(h),d=r(92413),C=r(92659),f=r(54143);const I={hooks:{reduceDependency:(e,t,r,A,{resolver:n,resolveOptions:o})=>{for(const{pattern:A,reference:i}of t.topLevelWorkspace.manifest.resolutions){if(A.from&&A.from.fullName!==f.requirableIdent(r))continue;if(A.from&&A.from.description&&A.from.description!==r.reference)continue;if(A.descriptor.fullName!==f.requirableIdent(e))continue;if(A.descriptor.description&&A.descriptor.description!==e.range)continue;return n.bindDescriptor(f.makeDescriptor(e,i),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const A=f.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${A}: ${r}`),reportError:(e,r)=>t.reportError(e,`${A}: ${r}`)})}},validateWorkspace:async(e,t)=>{const{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(const e of r.errors)t.reportWarning(C.b.INVALID_MANIFEST,e.message)}}};var E=r(46611),B=r(35691);class y{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){const r=this.getFetcher(e,t);return await r.fetch(e,t)}tryFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));return r||null}getFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));if(!r)throw new B.lk(C.b.FETCHER_NOT_FOUND,f.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var m=r(27092),w=r(52779),Q=r(60895);class D{static isVirtualDescriptor(e){return!!e.range.startsWith(D.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(D.protocol)}supportsDescriptor(e,t){return D.isVirtualDescriptor(e)}supportsLocator(e,t){return D.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,r){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,t,r){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}D.protocol="virtual:";var b=r(75448),v=r(94538);class S{supports(e){return!!e.reference.startsWith(v.d.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){const r=this.getWorkspace(e,t).cwd;return{packageFs:new b.M(r),prefixPath:n.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(v.d.protocol.length))}}var k=r(81111),N=r(71643),F=r(73632),K=r(32282),M=r.n(K);function R(e){return("undefined"!=typeof require?require:r(32178))(e)}var x=r(36545),L=r(32485);const P=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput"]),O=".yarnrc.yml",U="yarn.lock";var T;!function(e){e.ANY="ANY",e.BOOLEAN="BOOLEAN",e.ABSOLUTE_PATH="ABSOLUTE_PATH",e.LOCATOR="LOCATOR",e.LOCATOR_LOOSE="LOCATOR_LOOSE",e.NUMBER="NUMBER",e.STRING="STRING",e.SECRET="SECRET",e.SHAPE="SHAPE",e.MAP="MAP"}(T||(T={}));const j=N.Type,Y={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:T.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:T.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:T.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:T.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:T.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:T.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:T.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:T.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:o.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:T.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:T.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:T.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:T.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:T.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:T.STRING,default:q()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:T.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:T.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:T.BOOLEAN,default:N.supportsColor,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:T.BOOLEAN,default:N.supportsHyperlinks,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:T.BOOLEAN,default:c.isCI,defaultText:""},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:T.BOOLEAN,default:!c.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:T.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:T.BOOLEAN,default:c.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:T.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:T.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:T.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:T.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:T.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:T.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:T.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:T.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:T.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:T.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:T.NUMBER,default:1/0},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:T.MAP,valueDefinition:{description:"",type:T.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:T.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:T.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:T.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:T.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:T.STRING,values:Object.values(N.LogLevel),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:T.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:T.NUMBER,default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:T.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:T.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:T.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:T.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:T.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:T.SHAPE,properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:T.MAP,valueDefinition:{description:"A range",type:T.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:T.MAP,valueDefinition:{description:"A semver range",type:T.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:T.MAP,valueDefinition:{description:"The peerDependency meta",type:T.SHAPE,properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:T.BOOLEAN,default:!1}}}}}}}};function G(e,t,r,A,n){if(A.isArray)return Array.isArray(r)?r.map((r,o)=>H(e,`${t}[${o}]`,r,A,n)):String(r).split(/,/).map(r=>H(e,t,r,A,n));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return H(e,t,r,A,n)}function H(e,t,r,A,o){var i;switch(A.type){case T.ANY:return r;case T.SHAPE:return function(e,t,r,A,n){if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Object configuration settings "${t}" must be an object`);const o=J(e,A,{ignoreArrays:!0});if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=`${t}.${i}`;if(!A.properties[i])throw new g.UsageError(`Unrecognized configuration settings found: ${t}.${i} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(i,G(e,r,s,A.properties[i],n))}return o}(e,t,r,A,o);case T.MAP:return function(e,t,r,A,n){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=A.normalizeKeys?A.normalizeKeys(i):i,a=`${t}['${r}']`,c=A.valueDefinition;o.set(r,G(e,a,s,c,n))}return o}(e,t,r,A,o)}if(null===r&&!A.isNullable&&null!==A.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(i=A.values)||void 0===i?void 0:i.includes(r))return r;const s=(()=>{if(A.type===T.BOOLEAN)return F.parseBoolean(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=F.replaceEnvVariables(r,{env:process.env});switch(A.type){case T.ABSOLUTE_PATH:return n.y1.resolve(o,n.cS.toPortablePath(e));case T.LOCATOR_LOOSE:return f.parseLocator(e,!1);case T.NUMBER:return parseInt(e);case T.LOCATOR:return f.parseLocator(e);default:return e}})();if(A.values&&!A.values.includes(s))throw new Error("Invalid value, expected one of "+A.values.join(", "));return s}function J(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case T.SHAPE:{if(t.isArray&&!r)return[];const A=new Map;for(const[r,n]of Object.entries(t.properties))A.set(r,J(e,n));return A}case T.MAP:return t.isArray&&!r?[]:new Map;case T.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?n.y1.isAbsolute(t.default)?n.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>n.y1.resolve(e.projectCwd,t)):n.y1.resolve(e.projectCwd,t.default);default:return t.default}}function q(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var z;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(z||(z={}));class W{constructor(e){this.projectCwd=null,this.plugins=new Map,this.settings=new Map,this.values=new Map,this.sources=new Map,this.invalid=new Map,this.packageExtensions=new Map,this.limits=new Map,this.startingCwd=e}static create(e,t,r){const A=new W(e);void 0===t||t instanceof Map||(A.projectCwd=t),A.importSettings(Y);const n=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of n)A.activatePlugin(e,t);return A}static async find(e,t,{lookup:r=z.LOCKFILE,strict:o=!0,usePath:i=!1,useRc:s=!0}={}){const c=function(){const e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith("yarn_")&&(t=a()(t.slice("yarn_".length)),e[t]=r);return e}();delete c.rcFilename;const l=await W.findRcFiles(e),u=await W.findHomeRcFile(),h=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A}),p=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A,...n})=>n,d=new W(e);d.importSettings(h(Y)),d.useWithSource("",h(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,h(r),t,{strict:!1});if(u&&d.useWithSource(u.path,h(u.data),u.cwd,{strict:!1}),i){const e=d.get("yarnPath"),t=d.get("ignorePath");if(null!==e&&!t)return d}const C=d.get("lockfileFilename");let f;switch(r){case z.LOCKFILE:f=await W.findProjectCwd(e,C);break;case z.MANIFEST:f=await W.findProjectCwd(e,null);break;case z.NONE:f=A.xfs.existsSync(n.y1.join(e,"package.json"))?n.y1.resolve(e):null}d.startingCwd=e,d.projectCwd=f,d.importSettings(p(Y));const E=new Map([["@@core",I]]);if(null!==t){for(const e of t.plugins.keys())E.set(e,(B=t.modules.get(e)).__esModule?B.default:B);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>R(e));for(const[e,A]of t.modules)r.set(e,()=>A);const A=new Set,o=e=>e.default||e,i=(e,t)=>{const{factory:i,name:s}=R(n.cS.fromPortablePath(e));if(A.has(s))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new g.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},l=F.prettifySyncErrors(()=>o(i(c)),e=>`${e} (when initializing ${s}, defined in ${t})`);r.set(s,()=>l),A.add(s),E.set(s,l)};if(c.plugins)for(const t of c.plugins.split(";")){i(n.y1.resolve(e,n.cS.toPortablePath(t)),"")}for(const{path:e,cwd:t,data:r}of l)if(s&&Array.isArray(r.plugins))for(const A of r.plugins){const r="string"!=typeof A?A.path:A;i(n.y1.resolve(t,n.cS.toPortablePath(r)),e)}}var B;for(const[e,t]of E)d.activatePlugin(e,t);d.useWithSource("",p(c),e,{strict:o});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,p(r),t,{strict:o});return u&&d.useWithSource(u.path,p(u.data),u.cwd,{strict:!1}),d.get("enableGlobalCache")&&(d.values.set("cacheFolder",d.get("globalFolder")+"/cache"),d.sources.set("cacheFolder","")),await d.refreshPackageExtensions(),d}static async findRcFiles(e){const t=q(),r=[];let o=e,s=null;for(;o!==s;){s=o;const e=n.y1.join(s,t);if(A.xfs.existsSync(e)){const t=await A.xfs.readFilePromise(e,"utf8");let n;try{n=(0,i.parseSyml)(t)}catch(r){let A="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(A=" (in particular, make sure you list the colons after each key name)"),new g.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${A}`)}r.push({path:e,cwd:s,data:n})}o=n.y1.dirname(s)}return r}static async findHomeRcFile(){const e=q(),t=k.getHomeFolder(),r=n.y1.join(t,e);if(A.xfs.existsSync(r)){const e=await A.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,i.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,o=e,i=null;for(;o!==i;){if(i=o,A.xfs.existsSync(n.y1.join(i,"package.json"))&&(r=i),null!==t){if(A.xfs.existsSync(n.y1.join(i,t))){r=i;break}}else if(null!==r)break;o=n.y1.dirname(i)}return r}static async updateConfiguration(e,t){const r=q(),o=n.y1.join(e,r),s=A.xfs.existsSync(o)?(0,i.parseSyml)(await A.xfs.readFilePromise(o,"utf8")):{};let a,c=!1;if("function"==typeof t){try{a=t(s)}catch(e){a=t({})}if(a===s)return}else{a=s;for(const e of Object.keys(t)){const r=s[e],A=t[e];let n;if("function"==typeof A)try{n=A(r)}catch(e){n=A(void 0)}else n=A;r!==n&&(a[e]=n,c=!0)}if(!c)return}await A.xfs.changeFilePromise(o,(0,i.stringifySyml)(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await W.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),void 0!==t.configuration&&this.importSettings(t.configuration)}importSettings(e){for(const[t,r]of Object.entries(e))if(null!=r){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,J(this,r))}}useWithSource(e,t,r,A){try{this.use(e,t,r,A)}catch(t){throw t.message+=` (in ${N.pretty(this,e,N.Type.PATH)})`,t}}use(e,t,r,{strict:A=!0,overwrite:n=!1}={}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if(""===e&&P.has(o))continue;if("rcFilename"===o)throw new g.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const i=this.settings.get(o);if(!i){if(A)throw new g.UsageError(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!(n||i.type===T.MAP||i.isArray&&i.concatenateValues))continue;let s;try{s=G(this,o,t[o],i,r)}catch(t){throw t.message+=" in "+N.pretty(this,e,N.Type.PATH),t}if(i.type===T.MAP){const t=this.values.get(o);this.values.set(o,new Map(n?[...t,...s]:[...s,...t])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(i.isArray&&i.concatenateValues){const t=this.values.get(o);this.values.set(o,n?[...t,...s]:[...s,...t]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,s),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:r=!1}){const A=this.get(e),o=this.settings.get(e);if(void 0===o)throw new g.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,A){if(r.type===T.SECRET&&"string"==typeof t&&A.hideSecrets)return"********";if(r.type===T.ABSOLUTE_PATH&&"string"==typeof t&&A.getNativePaths)return n.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const n=[];for(const o of t)n.push(e(o,r,A));return n}if(r.type===T.MAP&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries())n.set(o,e(i,r.valueDefinition,A));return n}if(r.type===T.SHAPE&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries()){const t=r.properties[o];n.set(o,e(i,t,A))}return n}return t}(A,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let o,i;const s=A.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${N.pretty(this,"STDOUT","green")}`),t=n.createStreamReporter(`${r} ${N.pretty(this,"STDERR","red")}`);o=new d.PassThrough,o.pipe(e),o.pipe(s),i=new d.PassThrough,i.pipe(t),i.pipe(s)}else o=s,i=s,void 0!==t&&o.write(t+"\n");return{stdout:o,stderr:i}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new m.B([new D,new v.d,new w.O,...e])}makeFetcher(){const e=[];for(const t of this.plugins.values())for(const r of t.fetchers||[])e.push(new r);return new y([new Q.N,new S,...e])}getLinkers(){const e=[];for(const t of this.plugins.values())for(const r of t.linkers||[])e.push(new r);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;const e=this.packageExtensions,t=(t,r,{userProvided:A=!1}={})=>{if(!p().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new E.G;n.load(r,{yamlCompatibilityMode:!0});const o=[];F.getArrayWithDefault(e,t.identHash).push([t.range,o]);const i={status:L._u.Inactive,userProvided:A,parentDescriptor:t};for(const e of n.dependencies.values())o.push({...i,type:L.HN.Dependency,descriptor:e,description:`${f.stringifyIdent(t)} > ${f.stringifyIdent(e)}`});for(const e of n.peerDependencies.values())o.push({...i,type:L.HN.PeerDependency,descriptor:e,description:`${f.stringifyIdent(t)} >> ${f.stringifyIdent(e)}`});for(const[e,r]of n.peerDependenciesMeta)for(const[A,n]of Object.entries(r))o.push({...i,type:L.HN.PeerDependencyMeta,selector:e,key:A,value:n,description:`${f.stringifyIdent(t)} >> ${e} / ${A}`})};await this.triggerHook(e=>e.registerPackageExtensions,this,t);for(const[e,r]of this.get("packageExtensions"))t(f.parseDescriptor(e,!0),F.convertMapsToIndexableObjects(r),{userProvided:!0})}normalizePackage(e){const t=f.copyPackage(e);if(null==this.packageExtensions)throw new Error("refreshPackageExtensions has to be called before normalizing packages");const r=this.packageExtensions.get(e.identHash);if(void 0!==r){const A=e.version;if(null!==A)for(const[e,n]of r)if(x.satisfiesWithPrereleases(A,e))for(const e of n)switch(e.status===L._u.Inactive&&(e.status=L._u.Redundant),e.type){case L.HN.Dependency:void 0===t.dependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.dependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependency:void 0===t.peerDependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.peerDependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependencyMeta:{const r=t.peerDependenciesMeta.get(e.selector);void 0!==r&&Object.prototype.hasOwnProperty.call(r,e.key)&&r[e.key]===e.value||(e.status=L._u.Active,F.getFactoryWithDefault(t.peerDependenciesMeta,e.selector,()=>({}))[e.key]=e.value)}break;default:F.assertNever(e)}}const A=e=>e.scope?`${e.scope}__${e.name}`:""+e.name;for(const e of t.peerDependencies.values()){if("@types"===e.scope)continue;const r=A(e),n=f.makeIdent("types",r);t.peerDependencies.has(n.identHash)||t.peerDependenciesMeta.has(n.identHash)||t.peerDependenciesMeta.set(f.stringifyIdent(n),{optional:!0})}for(const e of t.peerDependenciesMeta.keys()){const r=f.parseIdent(e);t.peerDependencies.has(r.identHash)||t.peerDependencies.set(r.identHash,f.makeDescriptor(r,"*"))}return t.dependencies=new Map(F.sortMap(t.dependencies,([,e])=>f.stringifyDescriptor(e))),t.peerDependencies=new Map(F.sortMap(t.peerDependencies,([,e])=>f.stringifyDescriptor(e))),t}getLimit(e){return F.getFactoryWithDefault(this.limits,e,()=>u()(this.get(e)))}async triggerHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);n&&await n(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let A=t;for(const t of this.plugins.values()){const n=t.hooks;if(!n)continue;const o=e(n);o&&(A=await o(A,...r))}return A}async firstHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);if(!n)continue;const o=await n(...t);if(void 0!==o)return o}return null}format(e,t){return N.pretty(this,e,t)}}W.telemetry=null},92409:(e,t,r)=>{"use strict";var A;r.d(t,{k:()=>A}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(A||(A={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var A=r(35691),n=r(15815),o=r(71643);class i extends A.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,o.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.stdout=t,this.suggestInstall=r}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${o.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${t}\n`)}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(o.pretty(this.configuration,"➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(o.pretty(this.configuration,"➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatNameWithHyperlink(e){return(0,n.Qw)(e,{configuration:this.configuration,json:!1})}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>l});var A=r(78420),n=r(46009),o=r(11640),i=r(53887),s=r.n(i),a=r(73632),c=r(36545),g=r(54143);class l{constructor(){this.indent=" ",this.name=null,this.version=null,this.os=null,this.cpu=null,this.type=null,this.private=!1,this.license=null,this.main=null,this.module=null,this.browser=null,this.languageName=null,this.bin=new Map,this.scripts=new Map,this.dependencies=new Map,this.devDependencies=new Map,this.peerDependencies=new Map,this.workspaceDefinitions=[],this.dependenciesMeta=new Map,this.peerDependenciesMeta=new Map,this.resolutions=[],this.files=null,this.publishConfig=null,this.installConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new A.S}={}){const r=n.y1.join(e,"package.json");return await t.existsPromise(r)?await l.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await l.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new A.S}={}){const r=new l;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new l;return t.loadFromText(e),t}static isManifestFieldCompatible(e,t){if(null===e)return!0;let r=!0,A=!1;for(const n of e)if("!"===n[0]){if(A=!0,t===n.slice(1))return!1}else if(r=!1,n===t)return!0;return A&&r}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=u(e)}async loadFile(e,{baseFs:t=new A.S}){const r=await t.readFilePromise(e,"utf8");let n;try{n=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(n),this.indent=u(r)}load(e,{yamlCompatibilityMode:t=!1}={}){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const r=[];if("string"==typeof e.name)try{this.name=g.parseIdent(e.name)}catch(e){r.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const t=[];this.os=t;for(const A of e.os)"string"!=typeof A?r.push(new Error("Parsing failed for the 'os' field")):t.push(A)}if(Array.isArray(e.cpu)){const t=[];this.cpu=t;for(const A of e.cpu)"string"!=typeof A?r.push(new Error("Parsing failed for the 'cpu' field")):t.push(A)}if("string"==typeof e.type&&(this.type=e.type),"boolean"==typeof e.private&&(this.private=e.private),"string"==typeof e.license&&(this.license=e.license),"string"==typeof e.languageName&&(this.languageName=e.languageName),"string"==typeof e.main&&(this.main=p(e.main)),"string"==typeof e.module&&(this.module=p(e.module)),null!=e.browser)if("string"==typeof e.browser)this.browser=p(e.browser);else{this.browser=new Map;for(const[t,r]of Object.entries(e.browser))this.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,p(e.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[t,A]of Object.entries(e.bin))"string"==typeof A?this.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[t,A]of Object.entries(e.scripts))"string"==typeof A?this.scripts.set(t,A):r.push(new Error(`Invalid script definition for '${t}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[t,A]of Object.entries(e.dependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[t,A]of Object.entries(e.devDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.devDependencies.set(n.identHash,n)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[t,A]of Object.entries(e.peerDependencies)){let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}"string"==typeof A&&c.validRange(A)||(r.push(new Error(`Invalid dependency range for '${t}'`)),A="*");const n=g.makeDescriptor(e,A);this.peerDependencies.set(n.identHash,n)}"object"==typeof e.workspaces&&e.workspaces.nohoist&&r.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));const A=Array.isArray(e.workspaces)?e.workspaces:"object"==typeof e.workspaces&&null!==e.workspaces&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];for(const e of A)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):r.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[A,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error("Invalid meta field for '"+A));continue}const e=g.parseDescriptor(A),o=this.ensureDependencyMeta(e),i=d(n.built,{yamlCompatibilityMode:t});if(null===i){r.push(new Error(`Invalid built meta field for '${A}'`));continue}const s=d(n.optional,{yamlCompatibilityMode:t});if(null===s){r.push(new Error(`Invalid optional meta field for '${A}'`));continue}const a=d(n.unplugged,{yamlCompatibilityMode:t});null!==a?Object.assign(o,{built:i,optional:s,unplugged:a}):r.push(new Error(`Invalid unplugged meta field for '${A}'`))}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[A,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error(`Invalid meta field for '${A}'`));continue}const e=g.parseDescriptor(A),o=this.ensurePeerDependencyMeta(e),i=d(n.optional,{yamlCompatibilityMode:t});null!==i?Object.assign(o,{optional:i}):r.push(new Error(`Invalid optional meta field for '${A}'`))}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[t,A]of Object.entries(e.resolutions))if("string"==typeof A)try{this.resolutions.push({pattern:(0,o.parseResolution)(t),reference:A})}catch(e){r.push(e);continue}else r.push(new Error(`Invalid resolution entry for '${t}'`));if(Array.isArray(e.files)){this.files=new Set;for(const t of e.files)"string"==typeof t?this.files.add(t):r.push(new Error(`Invalid files entry for '${t}'`))}if("object"==typeof e.publishConfig&&null!==e.publishConfig){if(this.publishConfig={},"string"==typeof e.publishConfig.access&&(this.publishConfig.access=e.publishConfig.access),"string"==typeof e.publishConfig.main&&(this.publishConfig.main=p(e.publishConfig.main)),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=p(e.publishConfig.module)),null!=e.publishConfig.browser)if("string"==typeof e.publishConfig.browser)this.publishConfig.browser=p(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(const[t,r]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,p(e.publishConfig.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.publishConfig.bin&&null!==e.publishConfig.bin){this.publishConfig.bin=new Map;for(const[t,A]of Object.entries(e.publishConfig.bin))"string"==typeof A?this.publishConfig.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`))}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(const t of e.publishConfig.executableFiles)"string"==typeof t?this.publishConfig.executableFiles.add(p(t)):r.push(new Error("Invalid executable file definition"))}}if("object"==typeof e.installConfig&&null!==e.installConfig){this.installConfig={};for(const t of Object.keys(e.installConfig))"hoistingLimits"===t?"string"==typeof e.installConfig.hoistingLimits?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:r.push(new Error("Invalid hoisting limits definition")):r.push(new Error("Unrecognized installConfig key: "+t))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[t,A]of Object.entries(e.optionalDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n);const o=g.makeDescriptor(e,"unknown"),i=this.ensureDependencyMeta(o);Object.assign(i,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=r}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!this.dependencies.has(e.identHash)||!!this.peerDependencies.has(e.identHash)}hasHardDependency(e){return!!this.dependencies.has(e.identHash)||!!this.devDependencies.has(e.identHash)}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!this.hasHardDependency(e)||!!this.hasSoftDependency(e)}isCompatibleWithOS(e){return l.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return l.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!s().valid(e.range))throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let A=this.dependenciesMeta.get(t);A||this.dependenciesMeta.set(t,A=new Map);let n=A.get(r);return n||A.set(r,n={}),n}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),r}setRawField(e,t,{after:r=[]}={}){const A=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===A.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,n=this.raw={};let o=!1;for(const i of Object.keys(r))n[i]=r[i],o||(A.delete(i),0===A.size&&(n[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){if(Object.assign(e,this.raw),null!==this.name?e.name=g.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete e.os,null!==this.cpu?e.cpu=this.cpu:delete e.cpu,null!==this.type?e.type=this.type:delete e.type,this.private?e.private=!0:delete e.private,null!==this.license?e.license=this.license:delete e.license,null!==this.languageName?e.languageName=this.languageName:delete e.languageName,null!==this.main?e.main=this.main:delete e.main,null!==this.module?e.module=this.module:delete e.module,null!==this.browser){const t=this.browser;"string"==typeof t?e.browser=t:t instanceof Map&&(e.browser=Object.assign({},...Array.from(t.keys()).sort().map(e=>({[e]:t.get(e)}))))}else delete e.browser;1===this.bin.size&&null!==this.name&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(e=>({[e]:this.bin.get(e)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:e})=>e)}:e.workspaces=this.workspaceDefinitions.map(({pattern:e})=>e):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;const r=[],A=[];for(const e of this.dependencies.values()){const n=this.dependenciesMeta.get(g.stringifyIdent(e));let o=!1;if(t&&n){const e=n.get(null);e&&e.optional&&(o=!0)}o?A.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...g.sortDescriptors(r).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.dependencies,A.length>0?e.optionalDependencies=Object.assign({},...g.sortDescriptors(A).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...g.sortDescriptors(this.devDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...g.sortDescriptors(this.peerDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,A]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[n,o]of a.sortMap(A.entries(),([e,t])=>null!==e?"0"+e:"1")){const A=null!==n?g.stringifyDescriptor(g.makeDescriptor(g.parseIdent(r),n)):r,i={...o};t&&null===n&&delete i.optional,0!==Object.keys(i).length&&(e.dependenciesMeta[A]=i)}return 0===Object.keys(e.dependenciesMeta).length&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...a.sortMap(this.peerDependenciesMeta.entries(),([e,t])=>e).map(([e,t])=>({[e]:t}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:e,reference:t})=>({[(0,o.stringifyResolution)(e)]:t}))):delete e.resolutions,null!==this.files?e.files=Array.from(this.files):delete e.files,null!==this.preferUnplugged?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,e}}function u(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function p(e){return e.replace(/\\/g,"/")}function d(e,{yamlCompatibilityMode:t}){return t?a.tryParseOptionalBoolean(e):void 0===e||"boolean"==typeof e?e:null}l.fileName="package.json",l.allDependencies=["dependencies","devDependencies","peerDependencies"],l.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var A;function n(e){return"YN"+e.toString(10).padStart(4,"0")}r.d(t,{b:()=>A,i:()=>n}),function(e){e[e.UNNAMED=0]="UNNAMED",e[e.EXCEPTION=1]="EXCEPTION",e[e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",e[e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",e[e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",e[e.BUILD_DISABLED=5]="BUILD_DISABLED",e[e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",e[e.MUST_BUILD=7]="MUST_BUILD",e[e.MUST_REBUILD=8]="MUST_REBUILD",e[e.BUILD_FAILED=9]="BUILD_FAILED",e[e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",e[e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",e[e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",e[e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",e[e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",e[e.REMOTE_INVALID=15]="REMOTE_INVALID",e[e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",e[e.RESOLUTION_PACK=17]="RESOLUTION_PACK",e[e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",e[e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",e[e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",e[e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",e[e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",e[e.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",e[e.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",e[e.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",e[e.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",e[e.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",e[e.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",e[e.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",e[e.FETCH_FAILED=30]="FETCH_FAILED",e[e.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",e[e.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",e[e.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",e[e.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",e[e.NETWORK_ERROR=35]="NETWORK_ERROR",e[e.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",e[e.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",e[e.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",e[e.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",e[e.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",e[e.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",e[e.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",e[e.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",e[e.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",e[e.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",e[e.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",e[e.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",e[e.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",e[e.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",e[e.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",e[e.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",e[e.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",e[e.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",e[e.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",e[e.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",e[e.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",e[e.INVALID_MANIFEST=57]="INVALID_MANIFEST",e[e.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",e[e.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",e[e.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",e[e.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",e[e.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",e[e.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",e[e.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",e[e.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",e[e.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",e[e.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",e[e.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",e[e.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION"}(A||(A={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var A=r(54143);class n{constructor(e){this.resolvers=e.filter(e=>e)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.getResolverByDescriptor(e,r).bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,r){const A=this.getResolverByDescriptor(e,r);return await A.getCandidates(e,t,r)}async getSatisfying(e,t,r){return this.getResolverByDescriptor(e,r).getSatisfying(e,t,r)}async resolve(e,t){const r=this.getResolverByLocator(e,t);return await r.resolve(e,t)}tryResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));return r||null}getResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));if(!r)throw new Error(A.prettyDescriptor(t.project.configuration,e)+" isn't supported by any available resolver");return r}tryResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));return r||null}getResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));if(!r)throw new Error(A.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},85824:(e,t,r)=>{"use strict";r.d(t,{I:()=>ie});var A=r(43896),n=r(46009),o=r(5944),i=r(11640),s=r(40822),a=r(76417);function c(){}function g(e,t,r,A,n){for(var o=0,i=t.length,s=0,a=0;oe.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var u=t[i-1];return i>1&&"string"==typeof u.value&&(u.added||u.removed)&&e.equals("",u.value)&&(t[i-2].value+=u.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}c.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=r.callback;"function"==typeof r&&(A=r,r={}),this.options=r;var n=this;function o(e){return A?(setTimeout((function(){A(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var i=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,a=1,c=i+s,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=i&&h+1>=s)return o([{value:this.join(t),count:t.length}]);function p(){for(var r=-1*a;r<=a;r+=2){var A=void 0,c=u[r-1],h=u[r+1],p=(h?h.newPos:0)-r;c&&(u[r-1]=void 0);var d=c&&c.newPos+1=i&&p+1>=s)return o(g(n,A.components,t,e,n.useLongestToken));u[r]=A}else u[r]=void 0}a++}if(A)!function e(){setTimeout((function(){if(a>c)return A();p()||e()}),0)}();else for(;a<=c;){var d=p();if(d)return d}},pushComponent:function(e,t,r){var A=e[e.length-1];A&&A.added===t&&A.removed===r?e[e.length-1]={count:A.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,A){for(var n=t.length,o=r.length,i=e.newPos,s=i-A,a=0;i+10?a(d.lines.slice(-i.context)):[],g-=u.length,l-=u.length)}(o=u).push.apply(o,E(n.map((function(e){return(t.added?"+":"-")+e})))),t.added?p+=n.length:h+=n.length}else{if(g)if(n.length<=2*i.context&&e=s.length-2&&n.length<=i.context){var y=/\n$/.test(r),m=/\n$/.test(A),w=0==n.length&&u.length>B.oldLines;!y&&w&&u.splice(B.oldLines,0,"\\ No newline at end of file"),(y||w)&&m||u.push("\\ No newline at end of file")}c.push(B),g=0,l=0,u=[]}h+=n.length,p+=n.length}},f=0;f`${r}#commit=${A}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/,e=>"npm:"+e],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class T{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=n.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!A.xfs.existsSync(r))return;const o=await A.xfs.readFilePromise(r,"utf8"),s=(0,i.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(s)){let A=O.tryParseDescriptor(r);if(!A){t.reportWarning(P.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(A.range)&&(A=O.makeDescriptor(A,"npm:"+A.range));const{version:n,resolved:o}=s[r];if(!o)continue;let i;for(const[e,t]of U){const r=o.match(e);if(r){i=t(n,...r);break}}if(!i){t.reportWarning(P.b.YARN_IMPORT_FAILED,`${O.prettyDescriptor(e.configuration,A)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=O.makeLocator(A,i);a.set(A.descriptorHash,c)}}supportsDescriptor(e,t){return!!this.resolutions&&this.resolutions.has(e.descriptorHash)}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,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");const A=this.resolutions.get(e.descriptorHash);if(!A)throw new Error("Assertion failed: The resolution should have been registered");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class j{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(O.convertDescriptorToLocator(e).locatorHash)}supportsLocator(e,t){return!!t.project.originalPackages.has(e.locatorHash)}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,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=r.project.originalPackages.get(O.convertDescriptorToLocator(e).locatorHash);if(A)return[A];const n=r.project.storedResolutions.get(e.descriptorHash);if(!n)throw new Error("Expected the resolution to have been successful - resolution not found");if(A=r.project.originalPackages.get(n),!A)throw new Error("Expected the resolution to have been successful - package not found");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.originalPackages.get(e.locatorHash);if(!r)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return r}}var Y=r(46611),G=r(27092),H=r(35691);class J{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.resolver.bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async getSatisfying(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async resolve(e,t){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}}var q=r(33720),z=r(17722),W=r(81111),X=r(71643),V=r(20624),_=r(73632),Z=r(63088),$=r(36545),ee=r(32485);const te=/ *, */g,re=/\/$/,Ae=(0,N.promisify)(R().gzip),ne=(0,N.promisify)(R().gunzip),oe={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"]};class ie{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.accessibleLocators=new Set,this.originalPackages=new Map,this.optionalBuilds=new Set,this.peerRequirements=new Map,this.installersCustomData=new Map,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){var r,o,i;if(!e.projectCwd)throw new s.UsageError("No project found in "+t);let a=e.projectCwd,c=t,g=null;for(;g!==e.projectCwd;){if(g=c,A.xfs.existsSync(n.y1.join(g,n.QS.manifest))){a=g;break}c=n.y1.dirname(g)}const l=new ie(e.projectCwd,{configuration:e});null===(r=x.VK.telemetry)||void 0===r||r.reportProject(l.cwd),await l.setupResolutions(),await l.setupWorkspaces(),null===(o=x.VK.telemetry)||void 0===o||o.reportWorkspaceCount(l.workspaces.length),null===(i=x.VK.telemetry)||void 0===i||i.reportDependencyCount(l.workspaces.reduce((e,t)=>e+t.manifest.dependencies.size+t.manifest.devDependencies.size,0));const u=l.tryWorkspaceByCwd(a);if(u)return{project:l,workspace:u,locator:u.anchoredLocator};const h=await l.findLocatorForLocation(a+"/",{strict:!0});if(h)return{project:l,locator:h,workspace:null};throw new s.UsageError(`The nearest package directory (${X.pretty(e,a,X.Type.PATH)}) doesn't seem to be part of the project declared in ${X.pretty(e,l.cwd,X.Type.PATH)}.\n\n- If the project directory is right, it might be that you forgot to list ${X.pretty(e,n.y1.relative(l.cwd,a),X.Type.PATH)} as a workspace.\n- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`)}static generateBuildStateFile(e,t){let r="# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n";const A=[...e].map(([e,r])=>{const A=t.get(e);if(void 0===A)throw new Error("Assertion failed: The locator should have been registered");return[O.stringifyLocator(A),A.locatorHash,r]});for(const[e,t,n]of _.sortMap(A,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${n}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(A.xfs.existsSync(e)){const r=await A.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=V.makeHash("1",r);const n=(0,i.parseSyml)(r);if(n.__metadata){const e=n.__metadata.version,r=n.__metadata.cacheKey;for(const A of Object.keys(n)){if("__metadata"===A)continue;const o=n[A];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);const i=O.parseLocator(o.resolution,!0),s=new Y.G;s.load(o,{yamlCompatibilityMode:!0});const a=s.version,c=s.languageName||t,g=o.linkType.toUpperCase(),l=s.dependencies,u=s.peerDependencies,h=s.dependenciesMeta,p=s.peerDependenciesMeta,d=s.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(i.locatorHash,e)}if(e>=4){const e={...i,version:a,languageName:c,linkType:g,dependencies:l,peerDependencies:u,dependenciesMeta:h,peerDependenciesMeta:p,bin:d};this.originalPackages.set(e.locatorHash,e)}for(const t of A.split(te)){const r=O.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,i.locatorHash);else{const e=O.convertLocatorToDescriptor(i);e.descriptorHash!==r.descriptorHash&&(this.storedDescriptors.set(e.descriptorHash,e),this.resolutionAliases.set(r.descriptorHash,e.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){const t=e;e=[];for(const r of t){if(this.workspacesByCwd.has(r))continue;const t=await this.addWorkspace(r),A=this.storedPackages.get(t.anchoredLocator.locatorHash);A&&(t.dependencies=A.dependencies);for(const r of t.workspacesCwds)e.push(r)}}}async addWorkspace(e){const t=new z.j(e,{project:this});await t.setup();const r=this.workspacesByIdent.get(t.locator.identHash);if(void 0!==r)throw new Error(`Duplicate workspace name ${O.prettyIdent(this.configuration,t.locator)}: ${e} conflicts with ${r.cwd}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){n.y1.isAbsolute(e)||(e=n.y1.resolve(this.cwd,e)),e=n.y1.normalize(e).replace(/\/+$/,"");const t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){const t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(const r of this.workspaces){n.y1.relative(r.cwd,e).startsWith("../")||(t&&t.cwd.length>=r.cwd.length||(t=r))}return t||null}getWorkspaceByFilePath(e){const t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){const t=this.workspacesByIdent.get(e.identHash);return void 0===t?null:t}getWorkspaceByIdent(e){const t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${O.prettyIdent(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){const t=this.tryWorkspaceByIdent(e);return null!==t&&t.accepts(e.range)?t:null}getWorkspaceByDescriptor(e){const t=this.tryWorkspaceByDescriptor(e);if(null===t)throw new Error(`Workspace not found (${O.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){O.isVirtualLocator(e)&&(e=O.devirtualizeLocator(e));const t=this.tryWorkspaceByIdent(e);return null===t||t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash?null:t}getWorkspaceByLocator(e){const t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${O.prettyLocator(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(const e of this.workspaces){const t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error("Assertion failed: Expected workspace to have been resolved");e.dependencies=new Map(t.dependencies)}}forgetResolution(e){const t=e=>{this.storedResolutions.delete(e),this.storedDescriptors.delete(e)},r=e=>{this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)};if("descriptorHash"in e){const A=this.storedResolutions.get(e.descriptorHash);t(e.descriptorHash);const n=new Set(this.storedResolutions.values());void 0===A||n.has(A)||r(A)}if("locatorHash"in e){r(e.locatorHash);for(const[r,A]of this.storedResolutions)A===e.locatorHash&&t(r)}}forgetTransientResolutions(){const e=this.configuration.makeResolver();for(const t of this.originalPackages.values()){let r;try{r=e.shouldPersistResolution(t,{project:this,resolver:e})}catch(e){r=!1}r||this.forgetResolution(t)}}forgetVirtualResolutions(){for(const e of this.storedPackages.values())for(const[t,r]of e.dependencies)O.isVirtualDescriptor(r)&&e.dependencies.set(t,O.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},A=this.topLevelWorkspace.manifest.dependenciesMeta.get(O.stringifyIdent(e));if(!A)return r;const n=A.get(null);if(n&&Object.assign(r,n),null===t||!k().valid(t))return r;for(const[e,n]of A)null!==e&&e===t&&Object.assign(r,n);return r}async findLocatorForLocation(e,{strict:t=!1}={}){const r=new q.$,A=this.configuration.getLinkers(),n={project:this,report:r};for(const r of A){const A=await r.findPackageLocator(e,n);if(A){if(t){if((await r.findPackageLocation(A,n)).replace(re,"")!==e.replace(re,""))continue}return A}}return null}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();const t=e.resolver||this.configuration.makeResolver(),r=new T;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new G.B([new j,new J(t)]):new G.B([new j,r,t]),i=this.configuration.makeFetcher(),s=e.lockfileOnly?{project:this,report:e.report,resolver:o}:{project:this,report:e.report,resolver:o,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:i}},a=new Map,c=new Map,g=new Map,l=new Map,u=new Map,h=new Map,p=[],d=async e=>{const t=await _.prettifyAsyncErrors(async()=>await o.resolve(e,s),t=>`${O.prettyLocator(this.configuration,e)}: ${t}`);if(!O.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${O.prettyLocator(this.configuration,e)} to ${O.prettyLocator(this.configuration,t)})`);l.set(t.locatorHash,t);const r=this.configuration.normalizePackage(t);for(const[t,A]of r.dependencies){const n=await this.configuration.reduceHook(e=>e.reduceDependency,A,this,r,A,{resolver:o,resolveOptions:s});if(!O.areIdentsEqual(A,n))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const i=o.bindDescriptor(n,e,s);r.dependencies.set(t,i)}return p.push(Promise.all([...r.dependencies.values()].map(e=>f(e)))),c.set(r.locatorHash,r),r},C=async e=>{const t=this.resolutionAliases.get(e.descriptorHash);if(void 0!==t)return(async(e,t)=>{const r=await f(t);return a.set(e.descriptorHash,e),g.set(e.descriptorHash,r.locatorHash),r})(e,this.storedDescriptors.get(t));const r=o.getResolutionDependencies(e,s),A=new Map(await Promise.all(r.map(async e=>[e.descriptorHash,await f(e)]))),n=(await _.prettifyAsyncErrors(async()=>await o.getCandidates(e,A,s),t=>`${O.prettyDescriptor(this.configuration,e)}: ${t}`))[0];if(void 0===n)throw new Error(O.prettyDescriptor(this.configuration,e)+": No candidates found");return a.set(e.descriptorHash,e),g.set(e.descriptorHash,n.locatorHash),(async e=>{const t=u.get(e.locatorHash);if(void 0!==t)return t;const r=Promise.resolve().then(()=>d(e));return u.set(e.locatorHash,r),r})(n)},f=e=>{const t=h.get(e.descriptorHash);if(void 0!==t)return t;a.set(e.descriptorHash,e);const r=Promise.resolve().then(()=>C(e));return h.set(e.descriptorHash,r),r};for(const e of this.workspaces){const t=e.anchoredDescriptor;p.push(f(t))}for(;p.length>0;){const e=[...p];p.length=0,await Promise.all(e)}const I=new Set(this.resolutionAliases.values()),E=new Set(c.keys()),B=new Set,y=new Map;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:i=new Set,optionalBuilds:s=new Set,volatileDescriptors:a=new Set,peerRequirements:c=new Map,report:g,tolerateMissingPackages:l=!1}){var u;const h=new Map,p=[],d=new Map,C=new Map,f=new Map,I=new Map,E=new Map,B=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(l)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,O.copyPackage(r)]})),y=()=>{const e=A.xfs.mktempSync(),t=n.y1.join(e,"stacktrace.log"),r=String(p.length+1).length,o=p.map((e,t)=>`${(t+1+".").padStart(r," ")} ${O.stringifyLocator(e)}\n`).join("");throw A.xfs.writeFileSync(t,o),new H.lk(P.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},m=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const A=o.get(t);if(!A)throw new Error("Assertion failed: The package could not be found");return A},w=(e,t,{first:r,optional:A})=>{p.length>1e3&&y(),p.push(e);const n=Q(e,t,{first:r,optional:A});return p.pop(),n},Q=(A,n,{first:c,optional:g})=>{if(i.has(A.locatorHash))return;i.add(A.locatorHash),g||s.delete(A.locatorHash);const u=o.get(A.locatorHash);if(!u){if(l)return;throw new Error(`Assertion failed: The package (${O.prettyLocator(e.configuration,A)}) should have been registered`)}const p=[],m=[],Q=[],D=[],b=[];for(const i of Array.from(u.dependencies.values())){if(u.peerDependencies.has(i.identHash)&&!c)continue;if(O.isVirtualDescriptor(i))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(i.descriptorHash);let s=g;if(!s){const e=u.dependenciesMeta.get(O.stringifyIdent(i));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(s=!0)}}const C=r.get(i.descriptorHash);if(!C){if(l)continue;throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(e.configuration,i)}) should have been registered`)}const v=B.get(C)||o.get(C);if(!v)throw new Error(`Assertion failed: The package (${C}, resolved from ${O.prettyDescriptor(e.configuration,i)}) should have been registered`);if(0===v.peerDependencies.size){w(v,new Map,{first:!1,optional:s});continue}const S=h.get(v.locatorHash);let k,N;"number"==typeof S&&S>=2&&y();const F=new Set;let K;m.push(()=>{k=O.virtualizeDescriptor(i,A.locatorHash),N=O.virtualizePackage(v,A.locatorHash),u.dependencies.delete(i.identHash),u.dependencies.set(k.identHash,k),r.set(k.descriptorHash,N.locatorHash),t.set(k.descriptorHash,k),o.set(N.locatorHash,N),p.push([v,k,N])}),Q.push(()=>{var e;K=new Map;for(const o of N.peerDependencies.values()){let i=u.dependencies.get(o.identHash);if(!i&&O.areIdentsEqual(A,o)&&(i=O.convertLocatorToDescriptor(A),t.set(i.descriptorHash,i),r.set(i.descriptorHash,A.locatorHash),a.delete(i.descriptorHash)),i||!N.dependencies.has(o.identHash)){if(i||(i=O.makeDescriptor(o,"missing:")),N.dependencies.set(i.identHash,i),O.isVirtualDescriptor(i)){_.getSetWithDefault(f,i.descriptorHash).add(N.locatorHash)}d.set(i.identHash,i),"missing:"===i.range&&F.add(i.identHash),K.set(o.identHash,null!==(e=n.get(o.identHash))&&void 0!==e?e:N.locatorHash)}else N.peerDependencies.delete(o.identHash)}N.dependencies=new Map(_.sortMap(N.dependencies,([e,t])=>O.stringifyIdent(t)))}),D.push(()=>{if(!o.has(N.locatorHash))return;const e=h.get(v.locatorHash),t=void 0!==e?e+1:1;h.set(v.locatorHash,t),w(N,K,{first:!1,optional:s}),h.set(v.locatorHash,t-1)}),b.push(()=>{const e=u.dependencies.get(i.identHash);if(void 0===e)throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: Expected the descriptor to be registered");if(_.getSetWithDefault(E,t).add(A.locatorHash),o.has(N.locatorHash)){for(const e of N.peerDependencies.values()){const t=K.get(e.identHash);if(void 0===t)throw new Error("Assertion failed: Expected the peer dependency ident to be registered");_.getArrayWithDefault(_.getMapWithDefault(I,t),O.stringifyIdent(e)).push(N.locatorHash)}for(const e of F)N.dependencies.delete(e)}})}for(const e of[...m,...Q])e();let v;do{v=!0;for(const[A,n,s]of p){if(!o.has(s.locatorHash))continue;const a=_.getMapWithDefault(C,A.locatorHash),c=V.makeHash(...[...s.dependencies.values()].map(t=>{const A="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===A)throw new Error(`Assertion failed: Expected the resolution for ${O.prettyDescriptor(e.configuration,t)} to have been registered`);return A}),n.identHash),g=a.get(c);if(void 0===g){a.set(c,n);continue}if(g===n)continue;v=!1,o.delete(s.locatorHash),t.delete(n.descriptorHash),r.delete(n.descriptorHash),i.delete(s.locatorHash);const l=f.get(n.descriptorHash)||[],h=[u.locatorHash,...l];f.delete(n.descriptorHash);for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(n.identHash,g)}}}while(!v);for(const e of[...D,...b])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),w(t.anchoredLocator,new Map,{first:!0,optional:!1});let D;!function(e){e[e.NotProvided=0]="NotProvided",e[e.NotCompatible=1]="NotCompatible"}(D||(D={}));const b=[];for(const[e,t]of E){const r=o.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the root to be registered");const A=I.get(e);if(void 0!==A)for(const n of t){const t=o.get(n);if(void 0!==t)for(const[i,s]of A){const A=O.parseIdent(i);if(t.peerDependencies.has(A.identHash))continue;const a="p"+V.makeHash(n,i,e).slice(0,5);c.set(a,{subject:n,requested:A,rootRequester:e,allRequesters:s});const g=r.dependencies.get(A.identHash);if(void 0!==g){const e=m(g),n=null!==(u=e.version)&&void 0!==u?u:"0.0.0",i=new Set;for(const e of s){const t=o.get(e);if(void 0===t)throw new Error("Assertion failed: Expected the link to be registered");const r=t.peerDependencies.get(A.identHash);if(void 0===r)throw new Error("Assertion failed: Expected the ident to be registered");i.add(r.range)}[...i].every(e=>$.satisfiesWithPrereleases(n,e))||b.push({type:D.NotCompatible,subject:t,requested:A,requester:r,version:n,hash:a,requirementCount:s.length})}else{const e=r.peerDependenciesMeta.get(i);(null==e?void 0:e.optional)||b.push({type:D.NotProvided,subject:t,requested:A,requester:r,hash:a})}}}}const v=[e=>O.prettyLocatorNoColors(e.subject),e=>O.stringifyIdent(e.requested),e=>""+e.type];for(const t of _.sortMap(b,v))switch(t.type){case D.NotProvided:null==g||g.reportWarning(P.b.MISSING_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} doesn't provide ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}), requested by ${O.prettyIdent(e.configuration,t.requester)}`);break;case D.NotCompatible:{const r=t.requirementCount>1?"and some of its descendants request":"requests";null==g||g.reportWarning(P.b.INCOMPATIBLE_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} provides ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}) with version ${O.prettyReference(e.configuration,t.version)}, which doesn't satisfy what ${O.prettyIdent(e.configuration,t.requester)} ${r}`)}}b.length>0&&(null==g||g.reportWarning(P.b.UNNAMED,`Some peer dependencies are incorrectly met; run ${X.pretty(e.configuration,"yarn explain peer-requirements ",X.Type.CODE)} for details, where ${X.pretty(e.configuration,"",X.Type.CODE)} is the six-letter p-prefixed code`))}({project:this,report:e.report,accessibleLocators:B,volatileDescriptors:I,optionalBuilds:E,peerRequirements:y,allDescriptors:a,allResolutions:g,allPackages:c});for(const e of I)a.delete(e),g.delete(e);this.storedResolutions=g,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=B,this.originalPackages=l,this.optionalBuilds=E,this.peerRequirements=y,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const A=r||this.configuration.makeFetcher(),n={checksums:this.storedChecksums,project:this,cache:e,fetcher:A,report:t},o=Array.from(new Set(_.sortMap(this.storedResolutions.values(),[e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return O.stringifyLocator(t)}])));let i=!1;const s=H.yG.progressViaCounter(o.length);t.reportProgress(s);const a=v()(32);if(await t.startCacheReport(async()=>{await Promise.all(o.map(e=>a(async()=>{const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The locator should have been registered");if(O.isVirtualLocator(r))return;let o;try{o=await A.fetch(r,n)}catch(e){return e.message=`${O.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(i=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{s.tick()})))}),i)throw i}async linkEverything({cache:e,report:t,fetcher:r,skipBuild:o}){var s;const c=r||this.configuration.makeFetcher(),g={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:t,skipIntegrityCheck:!0},l=this.configuration.getLinkers(),u={project:this,report:t},h=new Map(l.map(e=>{const t=e.makeInstaller(u),r=t.getCustomDataKey(),A=this.installersCustomData.get(r);return void 0!==A&&t.attachCustomData(A),[e,t]})),p=new Map,d=new Map,C=new Map,f=new Map(await Promise.all([...this.accessibleLocators].map(async e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return[e,await c.fetch(t,g)]})));for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(void 0===t)throw new Error("Assertion failed: The locator should have been registered");const r=f.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: The fetch result should have been registered");const A=this.tryWorkspaceByLocator(t);if(null!==A){const e=[],{scripts:o}=A.manifest;for(const t of["preinstall","install","postinstall"])o.has(t)&&e.push([L.k.SCRIPT,t]);try{for(const e of h.values()){if(null!==(await e.installPackage(t,r)).buildDirective)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}}finally{r.releaseFs&&r.releaseFs()}const i=n.y1.join(r.packageFs.getRealPath(),r.prefixPath);d.set(t.locatorHash,i),e.length>0&&C.set(t.locatorHash,{directives:e,buildLocations:[i]})}else{const e=l.find(e=>e.supportsPackage(t,u));if(!e)throw new H.lk(P.b.LINKER_NOT_FOUND,O.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const A=h.get(e);if(!A)throw new Error("Assertion failed: The installer should have been registered");let n;try{n=await A.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}p.set(t.locatorHash,e),d.set(t.locatorHash,n.packageLocation),n.buildDirective&&n.packageLocation&&C.set(t.locatorHash,{directives:n.buildDirective,buildLocations:[n.packageLocation]})}}const I=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=null!==this.tryWorkspaceByLocator(t),A=async(e,A)=>{const n=d.get(t.locatorHash);if(void 0===n)throw new Error(`Assertion failed: The package (${O.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const A of t.dependencies.values()){const i=this.storedResolutions.get(A.descriptorHash);if(void 0===i)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,A)}, from ${O.prettyLocator(this.configuration,t)})should have been registered`);const s=this.storedPackages.get(i);if(void 0===s)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(s)?p.get(i):null;if(void 0===a)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==d.get(s.locatorHash)&&o.push([A,s]);else if(null!==n){_.getArrayWithDefault(I,i).push(n)}}null!==n&&await A.attachInternalDependencies(t,o)};if(r)for(const[e,t]of h)await A(e,t);else{const e=p.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=h.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await A(e,r)}}for(const[e,t]of I){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const A=p.get(r.locatorHash);if(!A)throw new Error("Assertion failed: The linker should have been found");const n=h.get(A);if(!n)throw new Error("Assertion failed: The installer should have been registered");await n.attachExternalDependents(r,t)}const E=new Map;for(const e of h.values()){const t=await e.finalizeInstall();for(const e of null!==(s=null==t?void 0:t.records)&&void 0!==s?s:[])C.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations});void 0!==(null==t?void 0:t.customData)&&E.set(e.getCustomDataKey(),t.customData)}if(this.installersCustomData=E,await this.persistInstallStateFile(),o)return;const B=new Set(this.storedPackages.keys()),y=new Set(C.keys());for(const e of y)B.delete(e);const m=(0,a.createHash)("sha512");m.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{m.update("\0"),m.update(e)});const w=m.digest("hex"),Q=new Map,D=e=>{let t=Q.get(e.locatorHash);if(void 0!==t)return t;const r=this.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const A=(0,a.createHash)("sha512");A.update(e.locatorHash),Q.set(e.locatorHash,"");for(const e of r.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(void 0===t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);const r=this.storedPackages.get(t);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");A.update(D(r))}return t=A.digest("hex"),Q.set(e.locatorHash,t),t},b=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(w),r.update(D(e));for(const e of t)r.update(e);return r.digest("hex")},v=this.configuration.get("bstatePath"),S=A.xfs.existsSync(v)?(0,i.parseSyml)(await A.xfs.readFilePromise(v,"utf8")):{},k=new Map;for(;y.size>0;){const e=y.size,r=[];for(const e of y){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let i=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);if(y.has(t)){i=!1;break}}if(!i)continue;y.delete(e);const s=C.get(o.locatorHash);if(!s)throw new Error("Assertion failed: The build directive should have been registered");const a=b(o,s.buildLocations);if(Object.prototype.hasOwnProperty.call(S,o.locatorHash)&&S[o.locatorHash]===a)k.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(S,o.locatorHash)?t.reportInfo(P.b.MUST_REBUILD,O.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(P.b.MUST_BUILD,O.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of s.buildLocations){if(!n.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,i]of s.directives){let s=`# This file contains the result of Yarn building a package (${O.stringifyLocator(o)})\n`;switch(r){case L.k.SCRIPT:s+=`# Script name: ${i}\n`;break;case L.k.SHELLCODE:s+=`# Script code: ${i}\n`}const c=null;await A.xfs.mktempPromise(async g=>{const l=n.y1.join(g,"build.log"),{stdout:u,stderr:h}=this.configuration.getSubprocessStreams(l,{header:s,prefix:O.prettyLocator(this.configuration,o),report:t});let p;try{switch(r){case L.k.SCRIPT:p=await Z.executePackageScript(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h});break;case L.k.SHELLCODE:p=await Z.executePackageShellcode(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h})}}catch(e){h.write(e.stack),p=1}if(u.end(),h.end(),0===p)return k.set(o.locatorHash,a),!0;A.xfs.detachTemp(g);const d=`${O.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${X.pretty(this.configuration,p,X.Type.NUMBER)}, logs can be found here: ${X.pretty(this.configuration,l,X.Type.PATH)})`;return t.reportInfo(P.b.BUILD_FAILED,d),this.optionalBuilds.has(o.locatorHash)?(k.set(o.locatorHash,a),!0):(t.reportError(P.b.BUILD_FAILED,d),!1)})}})())}}}if(await Promise.all(r),e===y.size){const e=Array.from(y).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return O.prettyLocator(this.configuration,t)}).join(", ");t.reportError(P.b.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${e})`);break}}if(k.size>0){const e=this.configuration.get("bstatePath"),t=ie.generateBuildStateFile(k,this.storedPackages);await A.xfs.mkdirPromise(n.y1.dirname(e),{recursive:!0}),await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await A.xfs.removePromise(v)}async install(e){var t,r;const i=this.configuration.get("nodeLinker");null===(t=x.VK.telemetry)||void 0===t||t.reportInstall(i),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.status=ee._u.Inactive;const s=n.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let a=null;if(e.immutable)try{a=await A.xfs.readFilePromise(s,"utf8")}catch(e){throw"ENOENT"===e.code?new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(const[,t]of this.configuration.packageExtensions)for(const[,r]of t)for(const t of r)if(t.userProvided){const r=X.pretty(this.configuration,t,X.Type.PACKAGE_EXTENSION);switch(t.status){case ee._u.Inactive:e.report.reportWarning(P.b.UNUSED_PACKAGE_EXTENSION,r+": No matching package in the dependency tree; you may not need this rule anymore.");break;case ee._u.Redundant:e.report.reportWarning(P.b.REDUNDANT_PACKAGE_EXTENSION,r+": This rule seems redundant when applied on the original package; the extension may have been applied upstream.")}}if(null!==a){const t=(0,o.qH)(a,this.generateLockfile());if(t!==a){const r=w(s,s,a,t);e.report.reportSeparator();for(const t of r.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.ADDED)):r.startsWith("-")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.REMOVED)):e.report.reportInfo(null,X.pretty(this.configuration,r,"grey"))}throw e.report.reportSeparator(),new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.userProvided&&e.status===ee._u.Active&&(null===(r=x.VK.telemetry)||void 0===r||r.reportPackageExtension(X.json(e,X.Type.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(void 0===e.persistProject||e.persistProject)&&await this.cacheCleanup(e)}),(void 0===e.persistProject||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{const t=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],r=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));await this.linkEverything(e);const A=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));for(let n=0;ne.afterAllInstalled,this,e)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let A=e.get(r);A||e.set(r,A=new Set),A.add(t)}const t={__metadata:{version:4}};for(const[r,A]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const n=[];for(const e of A){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");n.push(t)}const o=n.map(e=>O.stringifyDescriptor(e)).sort().join(", "),i=new Y.G;let s;i.version=e.linkType===ee.Un.HARD?e.version:"0.0.0-use.local",i.languageName=e.languageName,i.dependencies=new Map(e.dependencies),i.peerDependencies=new Map(e.peerDependencies),i.dependenciesMeta=new Map(e.dependenciesMeta),i.peerDependenciesMeta=new Map(e.peerDependenciesMeta),i.bin=new Map(e.bin);const a=this.storedChecksums.get(e.locatorHash);if(void 0!==a){const e=a.indexOf("/");if(-1===e)throw new Error("Assertion failed: Expecte the checksum to reference its cache key");const r=a.slice(0,e),A=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),s=r===t.__metadata.cacheKey?A:a}t[o]={...i.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:O.stringifyLocator(e),checksum:s}}return['# This file is generated by running "yarn install" inside your project.\n',"# Manual changes might be lost - proceed with caution!\n"].join("")+"\n"+(0,i.stringifySyml)(t)}async persistLockfile(){const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const e=[];for(const t of Object.values(oe))e.push(...t);const t=D()(this,e),r=await Ae(K().serialize(t)),o=this.configuration.get("installStatePath");await A.xfs.mkdirPromise(n.y1.dirname(o),{recursive:!0}),await A.xfs.changeFilePromise(o,r)}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0}={}){const r=this.configuration.get("installStatePath");if(!A.xfs.existsSync(r))return void(t&&await this.applyLightResolution());const n=await A.xfs.readFilePromise(r),o=K().deserialize(await ne(n));e&&void 0!==o.installersCustomData&&(this.installersCustomData=o.installersCustomData),t&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,D()(o,oe.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new q.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(A.xfs.existsSync(e.cwd)&&(0,W.isFolderInside)(e.cwd,this.cwd)){for(const o of await A.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const i=n.y1.resolve(e.cwd,o);e.markedFiles.has(i)||(e.immutable?t.reportError(P.b.IMMUTABLE_CACHE,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(P.b.UNUSED_CACHE_ENTRY,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused - removing"),await A.xfs.removePromise(i)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>a});var A=r(53887),n=r.n(A),o=r(36545),i=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class a{supportsDescriptor(e,t){return!!o.validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!n().valid(e.reference)||!!s.test(e.reference)}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,r){return r.resolver.bindDescriptor(this.forwardDescriptor(e,r),t,r)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,r){return await r.resolver.getCandidates(this.forwardDescriptor(e,r),t,r)}async getSatisfying(e,t,r){return await r.resolver.getSatisfying(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return i.renamePackage(r,e)}forwardDescriptor(e,t){return i.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return i.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>i,yG:()=>s});var A=r(92413),n=r(24304),o=r(92659);class i extends Error{constructor(e,t,r){super(t),this.reportExtra=r,this.reportCode=e}}class s{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,A=new Promise(e=>{t=e});const n=e=>{const n=t;A=new Promise(e=>{t=e}),r=e,n()},o=async function*(){for(;ro,set:n,tick:(e=0)=>{n(r+1)}}}reportInfoOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedInfos.has(A)||(this.reportedInfos.add(A),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedWarnings.has(A)||(this.reportedWarnings.add(A),this.reportWarning(e,t))}reportErrorOnce(e,t,r){var A;const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t),null===(A=null==r?void 0:r.reportExtra)||void 0===A||A.call(r,this))}reportExceptionOnce(e){!function(e){return void 0!==e.reportCode}(e)?this.reportErrorOnce(o.b.EXCEPTION,e.stack||e.message,{key:e}):this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra})}createStreamReporter(e=null){const t=new A.PassThrough,r=new n.StringDecoder;let o="";return t.on("data",t=>{let A,n=r.write(t);do{if(A=n.indexOf("\n"),-1!==A){const t=o+n.substr(0,A);n=n.substr(A+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==A);o+=n}),t.on("end",()=>{const t=r.end();""!==t&&(null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t))}),t}}},15815:(e,t,r)=>{"use strict";r.d(t,{Qw:()=>C,Pk:()=>f});var A=r(29148),n=r.n(A),o=r(92659),i=r(35691),s=r(71643);const a=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],c=new Set([o.b.FETCH_NOT_CACHED,o.b.UNUSED_CACHE_ENTRY]),g=process.env.GITHUB_ACTIONS?{start:e=>`::group::${e}\n`,end:e=>"::endgroup::\n"}:process.env.TRAVIS?{start:e=>`travis_fold:start:${e}\n`,end:e=>`travis_fold:end:${e}\n`}:process.env.GITLAB_CI?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r${e}\n`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r`}:null,l=new Date,u=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,h={patrick:{date:[17,3],chars:["🍀","🌱"],size:40},simba:{date:[19,7],chars:["🦁","🌴"],size:40},jack:{date:[31,10],chars:["🎃","🦇"],size:40},hogsfather:{date:[31,12],chars:["🎉","🎄"],size:40},default:{chars:["=","-"],size:80}},p=u&&Object.keys(h).find(e=>{const t=h[e];return!t.date||t.date[0]===l.getDate()&&t.date[1]===l.getMonth()+1})||"default";function d(e,{configuration:t,json:r}){const A=null===e?0:e,n=(0,o.i)(A);return r||null!==e?n:s.pretty(t,n,"grey")}function C(e,{configuration:t,json:r}){const A=d(e,{configuration:t,json:r});if(!t.get("enableHyperlinks"))return A;if(null===e||e===o.b.UNNAMED)return A;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${A}---${o.b[e]}`.toLowerCase()}${A}]8;;`}class f extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:A=!0,includeLogs:n=!r,includeInfos:o=n,includeWarnings:i=n,forgettableBufferSize:a=5,forgettableNames:g=new Set}){super(),this.uncommitted=new Set,this.cacheHitCount=0,this.cacheMissCount=0,this.warningCount=0,this.errorCount=0,this.startTime=Date.now(),this.indent=0,this.progress=new Map,this.progressTime=0,this.progressFrame=0,this.progressTimeout=null,this.forgettableLines=[],s.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...g,...c]),this.includeFooter=A,this.includeInfos=o,this.includeWarnings=i,this.json=r,this.stdout=t;const l=this.configuration.get("progressBarStyle")||p;if(!Object.prototype.hasOwnProperty.call(h,l))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=h[l];const u="➤ YN0000: ┌ ".length,d=Math.max(0,Math.min(process.stdout.columns-u,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*d/80)}static async start(e,t){const r=new this(e),A=process.emitWarning;process.emitWarning=(e,t)=>{if("string"!=typeof e){const r=e;e=r.message,t=null!=t?t:r.name}const A=void 0!==t?`${t}: ${e}`:e;r.reportWarning(o.b.UNNAMED,A)};try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize(),process.emitWarning=A}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.cacheMissCount+=1,void 0===t||this.configuration.get("preferAggregateCacheInfo")||this.reportInfo(o.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return await A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startCacheReport(e){const t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(e){throw this.reportExceptionOnce(e),e}finally{null!==t&&this.reportCacheChanges(t)}}reportSeparator(){0===this.indent?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(!this.includeInfos)return;this.commit();const r=`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(r),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(r,{truncate:!0});else this.writeLineWithForgettableReset(r)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.commit(),this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.commit(),this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`,{truncate:!1})}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,{definition:r,lastScaledSize:-1}),this.refreshProgress(-1);for await(const{progress:A,title:n}of e)t||r.progress===A&&r.title===n||(r.progress=A,r.title=n,this.refreshProgress());A()}),A=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:A}}reportJson(e){this.json&&this.writeLineWithForgettableReset(""+JSON.stringify(e))}async finalize(){if(!this.includeFooter)return;let e="";e=this.errorCount>0?"Failed with errors":this.warningCount>0?"Done with warnings":"Done";const t=s.pretty(this.configuration,Date.now()-this.startTime,s.Type.DURATION),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(o.b.UNNAMED,r):this.warningCount>0?this.reportWarning(o.b.UNNAMED,r):this.reportInfo(o.b.UNNAMED,r)}writeLine(e,{truncate:t}={}){this.clearProgress({clear:!0}),this.stdout.write(this.truncate(e,{truncate:t})+"\n"),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:t}={}){this.forgettableLines=[],this.writeLine(e,{truncate:t})}writeLines(e,{truncate:t}={}){this.clearProgress({delta:e.length});for(const r of e)this.stdout.write(this.truncate(r,{truncate:t})+"\n");this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,A=this.cacheMissCount-t;if(0===r&&0===A)return;let n="";this.cacheHitCount>1?n+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(n+=", one had to be fetched"):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(n+=" - one package had to be fetched"),this.reportInfo(o.b.FETCH_NOT_CACHED,n)}commit(){const e=this.uncommitted;this.uncommitted=new Set;for(const t of e)t.committed=!0,t.action()}clearProgress({delta:e=0,clear:t=!1}){this.configuration.get("enableProgressBars")&&!this.json&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json)return;if(null!==this.progressTimeout&&clearTimeout(this.progressTimeout),this.progressTimeout=null,0===this.progress.size)return;const e=Date.now();e-this.progressTime>80&&(this.progressFrame=(this.progressFrame+1)%a.length,this.progressTime=e);const t=a[this.progressFrame];for(const e of this.progress.values()){const r=this.progressStyle.chars[0].repeat(e.lastScaledSize),A=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-e.lastScaledSize);this.stdout.write(`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatName(null)}: ${t} ${r}${A}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},80)}refreshProgress(e=0){let t=!1;if(0===this.progress.size)t=!0;else for(const e of this.progress.values()){const r=Math.trunc(this.progressMaxScaledSize*e.definition.progress),A=e.lastScaledSize;if(e.lastScaledSize=r,r!==A){t=!0;break}}t&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:t}={}){return this.configuration.get("enableProgressBars")||(t=!1),void 0===t&&(t=this.configuration.get("preferTruncatedLines")),t&&(e=n()(e,0,process.stdout.columns-1)),e}formatName(e){return d(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return C(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"│ ".repeat(this.indent)}}},81832:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var A,n=r(43896),o=r(46009),i=r(79669),s=r(73632);!function(e){e.VERSION="version",e.COMMAND_NAME="commandName",e.PLUGIN_NAME="pluginName",e.INSTALL_COUNT="installCount",e.PROJECT_COUNT="projectCount",e.WORKSPACE_COUNT="workspaceCount",e.DEPENDENCY_COUNT="dependencyCount",e.EXTENSION="packageExtension"}(A||(A={}));class a{constructor(e,t){this.values=new Map,this.hits=new Map,this.enumerators=new Map,this.configuration=e;const r=this.getRegistryPath();this.isNew=!n.xfs.existsSync(r),this.sendReport(t),this.startBuffer()}reportVersion(e){this.reportValue(A.VERSION,e)}reportCommandName(e){this.reportValue(A.COMMAND_NAME,e||"")}reportPluginName(e){this.reportValue(A.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(A.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(A.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(A.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(A.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(A.DEPENDENCY_COUNT,String(e))}reportValue(e,t){s.getSetWithDefault(this.values,e).add(t)}reportEnumerator(e,t){s.getSetWithDefault(this.enumerators,e).add(t)}reportHit(e,t="*"){const r=s.getMapWithDefault(this.hits,e),A=s.getFactoryWithDefault(r,t,()=>0);r.set(t,A+1)}getRegistryPath(){const e=this.configuration.get("globalFolder");return o.y1.join(e,"telemetry.json")}sendReport(e){var t,r,A;const s=this.getRegistryPath();let a;try{a=n.xfs.readJsonSync(s)}catch(e){a={}}const c=Date.now(),g=24*this.configuration.get("telemetryInterval")*60*60*1e3,l=(null!==(t=a.lastUpdate)&&void 0!==t?t:c+g+Math.floor(g*Math.random()))+g;if(!(l>c&&null!=a.lastUpdate)){try{n.xfs.mkdirSync(o.y1.dirname(s),{recursive:!0}),n.xfs.writeJsonSync(s,{lastUpdate:c})}catch(e){return}if(!(l>c)&&a.blocks)for(const[t,n]of Object.entries(null!==(r=a.blocks)&&void 0!==r?r:{})){if(0===Object.keys(n).length)continue;const r=n;r.userId=t;for(const e of Object.keys(null!==(A=r.enumerators)&&void 0!==A?A:{}))r.enumerators[e]=r.enumerators[e].length;const o=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`;i.post(o,r,{configuration:this.configuration}).catch(()=>{})}}}applyChanges(){var e,t,r,A,i,s,a,c,g;const l=this.getRegistryPath();let u;try{u=n.xfs.readJsonSync(l)}catch(e){u={}}const h=null!==(e=this.configuration.get("telemetryUserId"))&&void 0!==e?e:"*",p=u.blocks=null!==(t=u.blocks)&&void 0!==t?t:{},d=p[h]=null!==(r=p[h])&&void 0!==r?r:{};for(const e of this.hits.keys()){const t=d.hits=null!==(A=d.hits)&&void 0!==A?A:{},r=t[e]=null!==(i=t[e])&&void 0!==i?i:{};for(const[t,A]of this.hits.get(e))r[t]=(null!==(s=r[t])&&void 0!==s?s:0)+A}for(const e of["values","enumerators"])for(const t of this[e].keys()){const r=d[e]=null!==(a=d[e])&&void 0!==a?a:{};r[t]=[...new Set([...null!==(c=r[t])&&void 0!==c?c:[],...null!==(g=this[e].get(t))&&void 0!==g?g:[]])]}n.xfs.mkdirSync(o.y1.dirname(l),{recursive:!0}),n.xfs.writeJsonSync(l,u)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch(e){}})}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var A=r(35691);class n extends A.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}},60895:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var A=r(17674),n=r(14626),o=r(46009),i=r(54143);class s{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A);return t.fetcher.getLocalPath(n,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A),o=await t.fetcher.fetch(n,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return i.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const i=t.packageFs.getRealPath(),s=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=A.p.makeVirtualPath(s,a,i),g=new n.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:g}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var A=r(43896),n=r(46009),o=r(58592),i=r.n(o),s=r(53887),a=r.n(s),c=r(46611),g=r(94538),l=r(20624),u=r(54143);class h{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=A.xfs.existsSync(n.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=n.y1.relative(this.project.cwd,this.cwd)||n.LZ.dot;const e=this.manifest.name?this.manifest.name:u.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=u.makeLocator(e,t),this.anchoredDescriptor=u.makeDescriptor(this.locator,`${g.d.protocol}${this.relativeCwd}`),this.anchoredLocator=u.makeLocator(this.locator,`${g.d.protocol}${this.relativeCwd}`);const r=this.manifest.workspaceDefinitions.map(({pattern:e})=>e),o=await i()(r,{absolute:!0,cwd:n.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort();for(const e of o){const t=n.y1.resolve(this.cwd,n.cS.toPortablePath(e));A.xfs.existsSync(n.y1.join(t,"package.json"))&&this.workspacesCwds.add(t)}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,A=-1!==t?e.slice(t+1):e;return r===g.d.protocol&&n.y1.normalize(A)===this.relativeCwd||(r===g.d.protocol&&"*"===A||!!a().validRange(A)&&(r===g.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",A):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,A))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+n.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=n.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await A.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});var A=r(32485);class n{supportsDescriptor(e,t){if(e.range.startsWith(n.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(n.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[r.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(n.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:A.Un.SOFT,dependencies:new Map([...r.manifest.dependencies,...r.manifest.devDependencies]),peerDependencies:new Map([...r.manifest.peerDependencies]),dependenciesMeta:r.manifest.dependenciesMeta,peerDependenciesMeta:r.manifest.peerDependenciesMeta,bin:r.manifest.bin}}}n.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>A});const A="2.4.0"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>A,pipevp:()=>g,execvp:()=>l});var A,n=r(46009),o=r(67566),i=r.n(o);function s(e){return null!==e&&"number"==typeof e.fd}function a(){}!function(e){e[e.Never=0]="Never",e[e.ErrorCode=1]="ErrorCode",e[e.Always=2]="Always"}(A||(A={}));let c=0;async function g(e,t,{cwd:r,env:o=process.env,strict:g=!1,stdin:l=null,stdout:u,stderr:p,end:d=A.Always}){const C=["pipe","pipe","pipe"];null===l?C[0]="ignore":s(l)&&(C[0]=l),s(u)&&(C[1]=u),s(p)&&(C[2]=p),0==c++&&process.on("SIGINT",a);const f=i()(e,t,{cwd:n.cS.fromPortablePath(r),env:{...o,PWD:n.cS.fromPortablePath(r)},stdio:C});s(l)||null===l||l.pipe(f.stdin),s(u)||f.stdout.pipe(u,{end:!1}),s(p)||f.stderr.pipe(p,{end:!1});const I=()=>{for(const e of new Set([u,p]))s(e)||e.end()};return new Promise((t,r)=>{f.on("error",e=>{0==--c&&process.off("SIGINT",a),d!==A.Always&&d!==A.ErrorCode||I(),r(e)}),f.on("close",(n,o)=>{0==--c&&process.off("SIGINT",a),(d===A.Always||d===A.ErrorCode&&n>0)&&I(),0!==n&&g?r(null!==n?new Error(`Child "${e}" exited with exit code ${n}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:h(n,o)})})})}async function l(e,t,{cwd:r,env:A=process.env,encoding:o="utf8",strict:s=!1}){const a=["ignore","pipe","pipe"],c=[],g=[],l=n.cS.fromPortablePath(r);void 0!==A.PWD&&(A={...A,PWD:l});const u=i()(e,t,{cwd:l,env:A,stdio:a});return u.stdout.on("data",e=>{c.push(e)}),u.stderr.on("data",e=>{g.push(e)}),await new Promise((t,r)=>{u.on("error",r),u.on("close",(A,n)=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),a="buffer"===o?Buffer.concat(g):Buffer.concat(g).toString(o);0!==A&&s?r(Object.assign(new Error(`Child "${e}" exited with exit code ${A}\n\n${a}`),{code:h(A,n),stdout:i,stderr:a})):t({code:h(A,n),stdout:i,stderr:a})})})}const u=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function h(e,t){const r=u.get(t);return void 0!==r?128+r:null!=e?e:1}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>i,isFolderInside:()=>s});var A=r(46009),n=r(12087);function o(){if("win32"===process.platform){const e=A.cS.toPortablePath(process.env.LOCALAPPDATA||A.cS.join((0,n.homedir)(),"AppData","Local"));return A.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=A.cS.toPortablePath(process.env.XDG_DATA_HOME);return A.y1.resolve(e,"yarn/berry")}return A.y1.resolve(i(),".yarn/berry")}function i(){return A.cS.toPortablePath((0,n.homedir)()||"/usr/local/share")}function s(e,t){const r=A.y1.relative(t,e);return r&&!r.startsWith("..")&&!A.y1.isAbsolute(r)}},71643:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Type:()=>A,Style:()=>n,supportsColor:()=>h,supportsHyperlinks:()=>p,tuple:()=>I,applyStyle:()=>E,applyColor:()=>B,pretty:()=>y,prettyList:()=>m,json:()=>w,mark:()=>Q,LogLevel:()=>D,addLogFilterSupport:()=>b});var A,n,o=r(46009),i=r(95882),s=r.n(i),a=r(92659),c=r(73632),g=r(54143),l=r(32485);!function(e){e.NO_HINT="NO_HINT",e.NULL="NULL",e.SCOPE="SCOPE",e.NAME="NAME",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.NUMBER="NUMBER",e.PATH="PATH",e.URL="URL",e.ADDED="ADDED",e.REMOVED="REMOVED",e.CODE="CODE",e.DURATION="DURATION",e.SIZE="SIZE",e.IDENT="IDENT",e.DESCRIPTOR="DESCRIPTOR",e.LOCATOR="LOCATOR",e.RESOLUTION="RESOLUTION",e.DEPENDENT="DEPENDENT",e.PACKAGE_EXTENSION="PACKAGE_EXTENSION"}(A||(A={})),function(e){e[e.BOLD=2]="BOLD"}(n||(n={}));const u=process.env.GITHUB_ACTIONS?{level:2}:s().supportsColor?{level:s().supportsColor.level}:{level:0},h=0!==u.level,p=h&&!process.env.GITHUB_ACTIONS,d=new(s().Instance)(u),C=new Map([[A.NO_HINT,null],[A.NULL,["#a853b5",129]],[A.SCOPE,["#d75f00",166]],[A.NAME,["#d7875f",173]],[A.RANGE,["#00afaf",37]],[A.REFERENCE,["#87afff",111]],[A.NUMBER,["#ffd700",220]],[A.PATH,["#d75fd7",170]],[A.URL,["#d75fd7",170]],[A.ADDED,["#5faf00",70]],[A.REMOVED,["#d70000",160]],[A.CODE,["#87afff",111]],[A.SIZE,["#ffd700",220]]]),f={[A.NUMBER]:{pretty:(e,t)=>""+t,json:e=>e},[A.IDENT]:{pretty:(e,t)=>g.prettyIdent(e,t),json:e=>g.stringifyIdent(e)},[A.LOCATOR]:{pretty:(e,t)=>g.prettyLocator(e,t),json:e=>g.stringifyLocator(e)},[A.DESCRIPTOR]:{pretty:(e,t)=>g.prettyDescriptor(e,t),json:e=>g.stringifyDescriptor(e)},[A.RESOLUTION]:{pretty:(e,{descriptor:t,locator:r})=>g.prettyResolution(e,t,r),json:({descriptor:e,locator:t})=>({descriptor:g.stringifyDescriptor(e),locator:null!==t?g.stringifyLocator(t):null})},[A.DEPENDENT]:{pretty:(e,{locator:t,descriptor:r})=>g.prettyDependent(e,t,r),json:({locator:e,descriptor:t})=>({locator:g.stringifyLocator(e),descriptor:g.stringifyDescriptor(t)})},[A.PACKAGE_EXTENSION]:{pretty:(e,t)=>{switch(t.type){case l.HN.Dependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"dependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependenciesMeta",A.CODE)} ➤ ${g.prettyIdent(e,g.parseIdent(t.selector))} ➤ ${B(e,t.key,A.CODE)}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+t.type)}},json:e=>{switch(e.type){case l.HN.Dependency:return`${g.stringifyIdent(e.parentDescriptor)} > ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependency:return`${g.stringifyIdent(e.parentDescriptor)} >> ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.stringifyIdent(e.parentDescriptor)} >> ${e.selector} / ${e.key}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+e.type)}}},[A.DURATION]:{pretty:(e,t)=>{if(t>6e4){const e=Math.floor(t/1e3/60),r=Math.ceil((t-60*e*1e3)/1e3);return 0===r?e+"m":`${e}m ${r}s`}{const e=Math.floor(t/1e3),r=t-1e3*e;return 0===r?e+"s":`${e}s ${r}ms`}},json:e=>e},[A.SIZE]:{pretty:(e,t)=>{const r=["KB","MB","GB","TB"];let n=r.length;for(;n>1&&t<1024**n;)n-=1;const o=1024**n;return B(e,`${Math.floor(100*t/o)/100} ${r[n-1]}`,A.NUMBER)},json:e=>e},[A.PATH]:{pretty:(e,t)=>B(e,o.cS.fromPortablePath(t),A.PATH),json:e=>o.cS.fromPortablePath(e)}};function I(e,t){return[t,e]}function E(e,t,r){return e.get("enableColors")?(r&n.BOLD&&(t=s().bold(t)),t):t}function B(e,t,r){if(!e.get("enableColors"))return t;const A=C.get(r);if(null===A)return t;const n=void 0===A?r:u.level>=3?A[0]:A[1],o="number"==typeof n?d.ansi256(n):n.startsWith("#")?d.hex(n):d[n];if("function"!=typeof o)throw new Error("Invalid format type "+n);return o(t)}function y(e,t,r){if(null===t)return B(e,"null",A.NULL);if(Object.prototype.hasOwnProperty.call(f,r)){return f[r].pretty(e,t)}if("string"!=typeof t)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof t);return B(e,t,r)}function m(e,t,r,{separator:A=", "}={}){return[...t].map(t=>y(e,t,r)).join(A)}function w(e,t){if(null===e)return null;if(Object.prototype.hasOwnProperty.call(f,t))return c.overrideType(t),f[t].json(e);if("string"!=typeof e)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof e);return e}function Q(e){return{Check:B(e,"✓","green"),Cross:B(e,"✘","red"),Question:B(e,"?","cyan")}}var D;function b(e,{configuration:t}){const r=t.get("logFilters"),A=new Map,n=new Map;for(const e of r){const t=e.get("level");if(void 0===t)continue;const r=e.get("code");void 0!==r&&A.set(r,t);const o=e.get("text");void 0!==o&&n.set(o,t)}const o=e.reportInfo,i=e.reportWarning,c=e.reportError,g=function(e,t,r,g){switch(((e,t,r)=>{if(null===e||e===a.b.UNNAMED)return r;if(n.size>0){const e=n.get(s().reset(t));if(void 0!==e)return null!=e?e:r}if(A.size>0){const t=A.get((0,a.i)(e));if(void 0!==t)return null!=t?t:r}return r})(t,r,g)){case D.Info:o.call(e,t,r);break;case D.Warning:i.call(e,null!=t?t:a.b.UNNAMED,r);break;case D.Error:c.call(e,null!=t?t:a.b.UNNAMED,r)}};e.reportInfo=function(...e){return g(this,...e,D.Info)},e.reportWarning=function(...e){return g(this,...e,D.Warning)},e.reportError=function(...e){return g(this,...e,D.Error)}}!function(e){e.Error="error",e.Warning="warning",e.Info="info",e.Discard="discard"}(D||(D={}))},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>a,checksumFile:()=>c,checksumPattern:()=>g});var A=r(43896),n=r(46009),o=r(76417),i=r(58592),s=r.n(i);function a(...e){const t=(0,o.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function c(e){return new Promise((t,r)=>{const n=(0,o.createHash)("sha512"),i=A.xfs.createReadStream(e);i.on("data",e=>{n.update(e)}),i.on("error",e=>{r(e)}),i.on("end",()=>{t(n.digest("hex"))})})}async function g(e,{cwd:t}){const r=(await s()(e,{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(e=>e+"/**/*"),i=await s()([e,...r],{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyFiles:!1,unique:!0});i.sort();const a=await Promise.all(i.map(async e=>{const t=[Buffer.from(e)],r=n.cS.toPortablePath(e),o=await A.xfs.lstatPromise(r);return o.isSymbolicLink()?t.push(Buffer.from(await A.xfs.readlinkPromise(r))):o.isFile()&&t.push(await A.xfs.readFilePromise(r)),t.join("\0")})),c=(0,o.createHash)("sha512");for(const e of a)c.update(e);return c.digest("hex")}},79669:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNetworkSettings:()=>d,Method:()=>C,request:()=>f,get:()=>I,put:()=>E,post:()=>B,del:()=>y});var A=r(43896),n=r(57211),o=r(98605),i=r(2401),s=r.n(i),a=r(98161),c=r(78835);const g=new Map,l=new Map,u=new o.Agent({keepAlive:!0}),h=new n.Agent({keepAlive:!0});function p(e){const t=new c.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}function d(e,t){const r=[...t.configuration.get("networkSettings")].sort(([e],[t])=>t.length-e.length),A={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(A),o=new c.URL(e);for(const[e,t]of r)if(s().isMatch(o.hostname,e))for(const e of n){const r=t.get(e);null!==r&&void 0===A[e]&&(A[e]=r)}for(const e of n)void 0===A[e]&&(A[e]=t.configuration.get(e));return A}var C;async function f(e,t,{configuration:n,headers:o,json:i,jsonRequest:g=i,jsonResponse:f=i,method:I=C.GET}){const E=d(e,{configuration:n});if(!1===E.enableNetwork)throw new Error(`Request to '${e}' has been blocked because of your configuration settings`);const B=new c.URL(e);if("http:"===B.protocol&&!s().isMatch(B.hostname,n.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${B.hostname})`);const y={agent:{http:E.httpProxy?a.httpOverHttp(p(E.httpProxy)):u,https:E.httpsProxy?a.httpsOverHttp(p(E.httpsProxy)):h},headers:o,method:I};y.responseType=f?"json":"buffer",null!==t&&(Buffer.isBuffer(t)||!g&&"string"==typeof t?y.body=t:y.json=t);const m=n.get("httpTimeout"),w=n.get("httpRetry"),Q=n.get("enableStrictSsl"),D=E.caFilePath,{default:b}=await Promise.resolve().then(r.t.bind(r,48722,7)),v=D?await async function(e){let t=l.get(e);return t||(t=A.xfs.readFilePromise(e).then(t=>(l.set(e,t),t)),l.set(e,t)),t}(D):void 0,S=b.extend({timeout:{socket:m},retry:w,https:{rejectUnauthorized:Q,certificateAuthority:v},...y});return n.getLimit("networkConcurrency")(()=>S(e))}async function I(e,{configuration:t,json:r,jsonResponse:A=r,...n}){let o=g.get(e);return o||(o=f(e,null,{configuration:t,...n}).then(t=>(g.set(e,t.body),t.body)),g.set(e,o)),!1===Buffer.isBuffer(o)&&(o=await o),A?JSON.parse(o.toString()):o}async function E(e,t,r){return(await f(e,t,{...r,method:C.PUT})).body}async function B(e,t,r){return(await f(e,t,{...r,method:C.POST})).body}async function y(e,t){return(await f(e,null,{...t,method:C.DELETE})).body}!function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(C||(C={}))},53836:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>p.C,DEFAULT_RC_FILENAME:()=>d.tr,DEFAULT_LOCK_FILENAME:()=>d.nh,Configuration:()=>d.VK,FormatType:()=>d.a5,ProjectLookup:()=>d.EW,SettingsType:()=>d.a2,BuildType:()=>C.k,LightReport:()=>f.h,Manifest:()=>I.G,MessageName:()=>E.b,Project:()=>B.I,TAG_REGEXP:()=>y.c,ReportError:()=>m.lk,Report:()=>m.yG,StreamReport:()=>w.Pk,TelemetryManager:()=>Q.E,ThrowReport:()=>D.$,VirtualFetcher:()=>b.N,WorkspaceResolver:()=>v.d,Workspace:()=>S.j,YarnVersion:()=>k.o,LinkType:()=>N.Un,PackageExtensionType:()=>N.HN,PackageExtensionStatus:()=>N._u,hashUtils:()=>i,httpUtils:()=>s,execUtils:()=>A,folderUtils:()=>n,formatUtils:()=>o,miscUtils:()=>a,scriptUtils:()=>c,semverUtils:()=>g,structUtils:()=>l,tgzUtils:()=>u,treeUtils:()=>h});var A=r(6220),n=r(81111),o=r(71643),i=r(20624),s=r(79669),a=r(73632),c=r(63088),g=r(36545),l=r(54143),u=r(72785),h=r(85875),p=r(28148),d=r(39922),C=r(92409),f=r(62152),I=r(46611),E=r(92659),B=r(85824),y=r(52779),m=r(35691),w=r(15815),Q=r(81832),D=r(33720),b=r(60895),v=r(94538),S=r(17722),k=r(59355),N=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,overrideType:()=>c,assertNever:()=>g,validateEnum:()=>l,mapAndFilter:()=>u,mapAndFind:()=>p,isIndexableObject:()=>C,convertMapsToIndexableObjects:()=>f,getFactoryWithDefault:()=>I,getArrayWithDefault:()=>E,getSetWithDefault:()=>B,getMapWithDefault:()=>y,releaseAfterUseAsync:()=>m,prettifyAsyncErrors:()=>w,prettifySyncErrors:()=>Q,bufferStream:()=>D,BufferStream:()=>b,DefaultStream:()=>v,dynamicRequire:()=>S,dynamicRequireNoCache:()=>k,sortMap:()=>N,buildIgnorePattern:()=>F,replaceEnvVariables:()=>K,parseBoolean:()=>M,parseOptionalBoolean:()=>R,tryParseOptionalBoolean:()=>x});var A=r(46009),n=r(40822),o=r(2401),i=r.n(o),s=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){}function g(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function l(e,t){if(!Object.values(e).includes(t))throw new Error("Assertion failed: Invalid value for enumeration");return t}function u(e,t){const r=[];for(const A of e){const e=t(A);e!==h&&r.push(e)}return r}e=r.hmd(e);const h=Symbol();function p(e,t){for(const r of e){const e=t(r);if(e!==d)return e}}u.skip=h;const d=Symbol();function C(e){return"object"==typeof e&&null!==e}function f(e){if(e instanceof Map&&(e=Object.fromEntries(e)),C(e))for(const t of Object.keys(e)){const r=e[t];C(r)&&(e[t]=f(r))}return e}function I(e,t,r){let A=e.get(t);return void 0===A&&e.set(t,A=r()),A}function E(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function B(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function y(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function m(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function w(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function Q(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function D(e){return await new Promise((t,r)=>{const A=[];e.on("error",e=>{r(e)}),e.on("data",e=>{A.push(e)}),e.on("end",()=>{t(Buffer.concat(A))})})}p.skip=d;class b extends s.Transform{constructor(){super(...arguments),this.chunks=[]}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),r(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}}class v extends s.Transform{constructor(e=Buffer.alloc(0)){super(),this.active=!0,this.ifEmpty=e}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,r(null,e)}_flush(e){this.active&&this.ifEmpty.length>0&&e(null,this.ifEmpty)}}function S(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function k(t){const n=A.cS.fromPortablePath(t),o=r.c[n];let i;delete r.c[n];try{i=S(n);const t=r.c[n],A=e.children.indexOf(t);-1!==A&&e.children.splice(A,1)}finally{r.c[n]=o}return i}function N(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const A=[];for(const e of t)A.push(r.map(t=>e(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function F(e){return 0===e.length?null:e.map(e=>`(${i().makeRe(e,{windows:!1}).source})`).join("|")}function K(e,{env:t}){return e.replace(/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g,(...e)=>{const{variableName:r,colon:A,fallback:o}=e[e.length-1],i=Object.prototype.hasOwnProperty.call(t,r),s=t[r];if(s)return s;if(i&&!A)return s;if(null!=o)return o;throw new n.UsageError(`Environment variable not found (${r})`)})}function M(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}function R(e){return void 0===e?e:M(e)}function x(e){try{return R(e)}catch(e){return null}}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>b,prepareExternalProject:()=>S,hasPackageScript:()=>k,executePackageScript:()=>N,executePackageShellcode:()=>F,executeWorkspaceScript:()=>M,hasWorkspaceScript:()=>R,executeWorkspaceLifecycleScript:()=>x,maybeExecuteWorkspaceLifecycleScript:()=>L,getPackageAccessibleBinaries:()=>P,getWorkspaceAccessibleBinaries:()=>O,executePackageAccessibleBinary:()=>U,executeWorkspaceAccessibleBinary:()=>T});var A,n=r(46009),o=r(53660),i=r(75448),s=r(43896),a=r(65281),c=r(76756),g=r(50730),l=r(61814),u=r.n(l),h=r(61578),p=r.n(h),d=r(92413),C=r(46611),f=r(92659),I=r(35691),E=r(15815),B=r(59355),y=r(6220),m=r(71643),w=r(73632),Q=r(54143);async function D(e,t,r,A=[]){"win32"===process.platform&&await Promise.all([s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe"}),(0,g.O9)()),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe.info"}),[r,...A].join("\n")),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${A.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`)]),await s.xfs.writeFilePromise(n.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${A.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await s.xfs.chmodPromise(n.y1.join(e,t),493)}async function b({project:e,binFolder:t,lifecycleScript:r}){const A={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(A["path"!==e.toLowerCase()?e:"PATH"]=t);const o=n.cS.fromPortablePath(t);A.BERRY_BIN_FOLDER=n.cS.fromPortablePath(o),await D(t,"node",process.execPath),null!==B.o&&(await D(t,"run",process.execPath,[process.argv[1],"run"]),await D(t,"yarn",process.execPath,[process.argv[1]]),await D(t,"yarnpkg",process.execPath,[process.argv[1]]),await D(t,"node-gyp",process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(A.INIT_CWD=n.cS.fromPortablePath(e.configuration.startingCwd)),A.PATH=A.PATH?`${o}${n.cS.delimiter}${A.PATH}`:""+o,A.npm_execpath=`${o}${n.cS.sep}yarn`,A.npm_node_execpath=`${o}${n.cS.sep}node`;const i=null!==B.o?"yarn/"+B.o:`yarn/${w.dynamicRequire("@yarnpkg/core").version}-core`;return A.npm_config_user_agent=`${i} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(A.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,A,async(e,r,A)=>await D(t,(0,n.Zu)(e),r,A)),A}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(A||(A={}));const v=p()(2);async function S(e,t,{configuration:r,report:o,workspace:i=null}){await v(async()=>{await s.xfs.mktempPromise(async a=>{const c=n.y1.join(a,"pack.log"),{stdout:g,stderr:l}=r.getSubprocessStreams(c,{prefix:e,report:o}),u=await async function(e){let t=null;try{t=await s.xfs.readFilePromise(n.y1.join(e,n.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?A.Yarn2:A.Yarn1:s.xfs.existsSync(n.y1.join(e,"package-lock.json"))?A.Npm:s.xfs.existsSync(n.y1.join(e,"pnpm-lock.yaml"))?A.Pnpm:null}(e);let h;null!==u?(g.write(`Installing the project using ${u}\n\n`),h=u):(g.write("No package manager detected; defaulting to Yarn\n\n"),h=A.Yarn2),await s.xfs.mktempPromise(async r=>{const o=await b({binFolder:r}),u=new Map([[A.Yarn1,async()=>{const r=null!==i?["workspace",i]:[],A=await y.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==A.code)return A.code;await s.xfs.appendFilePromise(n.y1.join(e,".npmignore"),"/.yarn\n"),g.write("\n");const a=await y.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==a.code)return a.code;g.write("\n");const c=await y.pipevp("yarn",[...r,"pack","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==c.code?c.code:0}],[A.Yarn2,async()=>{const r=null!==i?["workspace",i]:[];o.YARN_ENABLE_INLINE_BUILDS="1";const A=n.y1.join(e,n.QS.lockfile);await s.xfs.existsPromise(A)||await s.xfs.writeFilePromise(A,"");const a=await y.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==a.code?a.code:0}],[A.Npm,async()=>{if(null!==i)throw new Error("Workspaces aren't supported by npm, which has been detected as the primary package manager for "+e);delete o.npm_config_user_agent;const r=await y.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const A=new d.PassThrough,a=w.bufferStream(A);A.pipe(g);const c=await y.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:A,stderr:l});if(0!==c.code)return c.code;const u=(await a).toString().trim(),h=n.y1.resolve(e,n.cS.toPortablePath(u));return await s.xfs.renamePromise(h,t),0}]]).get(h);if(void 0===u)throw new Error("Assertion failed: Unsupported workflow");const p=await u();if(0!==p&&void 0!==p)throw s.xfs.detachTemp(a),new I.lk(f.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${p}, logs can be found here: ${c})`)})})})}async function k(e,t,{project:r}){const A=r.storedPackages.get(e.locatorHash);if(!A)throw new Error(`Package for ${Q.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,s=r.configuration.getLinkers(),a={project:r,report:new E.Pk({stdout:new d.PassThrough,configuration:o})},c=s.find(e=>e.supportsPackage(A,a));if(!c)throw new Error(`The package ${Q.prettyLocator(r.configuration,A)} isn't supported by any of the available linkers`);const g=await c.findPackageLocation(A,a),l=new i.M(g,{baseFs:e});return(await C.G.find(n.LZ.dot,{baseFs:l})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function N(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{manifest:g,env:l,cwd:u}=await K(e,{project:n,binFolder:s,cwd:A,lifecycleScript:t}),h=g.scripts.get(t);if(void 0===h)return 1;const p=await n.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(h,r,{cwd:u,env:l,stdin:o,stdout:i,stderr:a}),n,e,t,{script:h,args:r,cwd:u,env:l,stdin:o,stdout:i,stderr:a});return await p()})}async function F(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{env:g,cwd:l}=await K(e,{project:n,binFolder:s,cwd:A});return await(0,c.execute)(t,r,{cwd:l,env:g,stdin:o,stdout:i,stderr:a})})}async function K(e,{project:t,binFolder:r,cwd:A,lifecycleScript:s}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Q.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,g=t.configuration.getLinkers(),l={project:t,report:new E.Pk({stdout:new d.PassThrough,configuration:a})},u=g.find(e=>e.supportsPackage(c,l));if(!u)throw new Error(`The package ${Q.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const h=await b({project:t,binFolder:r,lifecycleScript:s});await Promise.all(Array.from(await P(e,{project:t}),([e,[,t]])=>D(r,(0,n.Zu)(e),process.execPath,[t])));const p=await u.findPackageLocation(c,l),f=new i.M(p,{baseFs:o}),I=await C.G.find(n.LZ.dot,{baseFs:f});return void 0===A&&(A=p),{manifest:I,binFolder:r,env:h,cwd:A}},{libzip:await(0,a.getLibzipPromise)()})}async function M(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await N(e.anchoredLocator,t,r,{cwd:A,project:e.project,stdin:n,stdout:o,stderr:i})}function R(e,t){return e.manifest.scripts.has(t)}async function x(e,t,{cwd:r,report:A}){const{configuration:o}=e.project;await s.xfs.mktempPromise(async i=>{const a=n.y1.join(i,t+".log"),c=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${e.cwd}")\n`,{stdout:g,stderr:l}=o.getSubprocessStreams(a,{report:A,prefix:Q.prettyLocator(o,e.anchoredLocator),header:c});A.reportInfo(f.b.LIFECYCLE_SCRIPT,`Calling the "${t}" lifecycle script`);const h=await M(e,t,[],{cwd:r,stdin:null,stdout:g,stderr:l});if(g.end(),l.end(),0!==h)throw s.xfs.detachTemp(i),new I.lk(f.b.LIFECYCLE_SCRIPT,`${u()(t)} script failed (exit code ${m.pretty(o,h,m.Type.NUMBER)}, logs can be found here: ${m.pretty(o,a,m.Type.PATH)}); run ${m.pretty(o,"yarn "+t,m.Type.CODE)} to investigate`)})}async function L(e,t,r){R(e,t)&&await x(e,t,r)}async function P(e,{project:t}){const r=t.configuration,A=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${Q.prettyLocator(r,e)} not found in the project`);const i=new d.Writable,s=r.getLinkers(),a={project:t,report:new E.Pk({configuration:r,stdout:i})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const A=t.storedResolutions.get(e.descriptorHash);if(!A)throw new Error(`Assertion failed: The resolution (${Q.prettyDescriptor(r,e)}) should have been registered`);c.add(A)}for(const e of c){const r=t.storedPackages.get(e);if(!r)throw new Error(`Assertion failed: The package (${e}) should have been registered`);if(0===r.bin.size)continue;const o=s.find(e=>e.supportsPackage(r,a));if(!o)continue;let i=null;try{i=await o.findPackageLocation(r,a)}catch(e){if("LOCATOR_NOT_INSTALLED"===e.code)continue;throw e}for(const[e,t]of r.bin)A.set(e,[r,n.cS.fromPortablePath(n.y1.resolve(i,t))])}return A}async function O(e){return await P(e.anchoredLocator,{project:e.project})}async function U(e,t,r,{cwd:A,project:o,stdin:i,stdout:a,stderr:c,nodeArgs:g=[]}){const l=await P(e,{project:o}),u=l.get(t);if(!u)throw new Error(`Binary not found (${t}) for ${Q.prettyLocator(o.configuration,e)}`);return await s.xfs.mktempPromise(async e=>{const[,t]=u,h=await b({project:o,binFolder:e});let p;await Promise.all(Array.from(l,([e,[,t]])=>D(h.BERRY_BIN_FOLDER,(0,n.Zu)(e),process.execPath,[t])));try{p=await y.pipevp(process.execPath,[...g,t,...r],{cwd:A,env:h,stdin:i,stdout:a,stderr:c})}finally{await s.xfs.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function T(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await U(e.anchoredLocator,t,r,{project:e.project,cwd:A,stdin:n,stdout:o,stderr:i})}},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o,validRange:()=>s});var A=r(53887),n=r.n(A);function o(e,t,r=!1){let A,o;try{A=new(n().Range)(t,{includePrerelease:!0,loose:r})}catch(e){return!1}if(!e)return!1;try{o=new(n().SemVer)(e,A),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return A.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}const i=new Map;function s(e){if(-1!==e.indexOf(":"))return null;let t=i.get(e);if(void 0!==t)return t;try{t=new(n().Range)(e)}catch(e){t=null}return i.set(e,t),t}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>u,makeDescriptor:()=>h,makeLocator:()=>p,convertToIdent:()=>d,convertDescriptorToLocator:()=>C,convertLocatorToDescriptor:()=>f,convertPackageToLocator:()=>I,renamePackage:()=>E,copyPackage:()=>B,virtualizeDescriptor:()=>y,virtualizePackage:()=>m,isVirtualDescriptor:()=>w,isVirtualLocator:()=>Q,devirtualizeDescriptor:()=>D,devirtualizeLocator:()=>b,bindDescriptor:()=>v,bindLocator:()=>S,areIdentsEqual:()=>k,areDescriptorsEqual:()=>N,areLocatorsEqual:()=>F,areVirtualPackagesEquivalent:()=>K,parseIdent:()=>M,tryParseIdent:()=>R,parseDescriptor:()=>x,tryParseDescriptor:()=>L,parseLocator:()=>P,tryParseLocator:()=>O,parseRange:()=>U,parseFileStyleRange:()=>T,makeRange:()=>Y,convertToManifestRange:()=>G,requirableIdent:()=>H,stringifyIdent:()=>J,stringifyDescriptor:()=>q,stringifyLocator:()=>z,slugifyIdent:()=>W,slugifyLocator:()=>X,prettyIdent:()=>V,prettyRange:()=>Z,prettyDescriptor:()=>$,prettyReference:()=>ee,prettyLocator:()=>te,prettyLocatorNoColors:()=>re,sortDescriptors:()=>Ae,prettyWorkspace:()=>ne,prettyResolution:()=>oe,prettyDependent:()=>ie,getIdentVendorPath:()=>se});var A=r(46009),n=r(71191),o=r.n(n),i=r(53887),s=r.n(i),a=r(71643),c=r(20624),g=r(73632),l=r(54143);function u(e,t){if(null==e?void 0:e.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:c.makeHash(e,t),scope:e,name:t}}function h(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:c.makeHash(e.identHash,t),range:t}}function p(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function I(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function E(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function B(e){return E(e,e)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,p(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function Q(e){return e.reference.startsWith("virtual:")}function D(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function b(e){if(!Q(e))throw new Error("Not a virtual descriptor");return p(e,e.reference.replace(/^[^#]*#/,""))}function v(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function S(e,t){return e.reference.includes("::")?e:p(e,`${e.reference}::${o().stringify(t)}`)}function k(e,t){return e.identHash===t.identHash}function N(e,t){return e.descriptorHash===t.descriptorHash}function F(e,t){return e.locatorHash===t.locatorHash}function K(e,t){if(!Q(e))throw new Error("Invalid package type");if(!Q(t))throw new Error("Invalid package type");if(!k(e,t))return!1;if(e.dependencies.size!==t.dependencies.size)return!1;for(const r of e.dependencies.values()){const e=t.dependencies.get(r.identHash);if(!e)return!1;if(!N(r,e))return!1}return!0}function M(e){const t=R(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function R(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,A]=t;return u(void 0!==r?r:null,A)}function x(e,t=!1){const r=L(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function L(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const i=void 0!==o?o:"unknown";return h(u(void 0!==A?A:null,n),i)}function P(e,t=!1){const r=O(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function O(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const i=void 0!==o?o:"unknown";return p(u(void 0!==A?A:null,n),i)}function U(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const A=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&A!==t.requireProtocol)throw new Error(`Invalid protocol (${A})`);if((null==t?void 0:t.requireProtocol)&&null===A)throw new Error(`Missing protocol (${A})`);const n=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===n)throw new Error(`Missing source (${e})`);const i=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:A,source:n,selector:(null==t?void 0:t.parseSelector)?o().parse(i):i,params:void 0!==r[4]?o().parse(r[4]):null}}function T(e,{protocol:t}){const{selector:r,params:A}=U(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof A.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:P(A.locator,!0),path:r}}function j(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function Y({protocol:e,source:t,selector:r,params:A}){let n="";return null!==e&&(n+=""+e),null!==t&&(n+=j(t)+"#"),n+=j(r),function(e){return null!==e&&Object.entries(e).length>0}(A)&&(n+="::"+o().stringify(A)),n}function G(e){const{params:t,protocol:r,source:A,selector:n}=U(e);for(const e in t)e.startsWith("__")&&delete t[e];return Y({protocol:r,source:A,params:t,selector:n})}function H(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function q(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function z(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function W(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function X(e){const{protocol:t,selector:r}=U(e.reference),n=null!==t?t.replace(/:$/,""):"exotic",o=s().valid(r),i=null!==o?`${n}-${o}`:""+n,a=(e.scope,`${W(e)}-${i}-${e.locatorHash.slice(0,10)}`);return(0,A.Zu)(a)}function V(e,t){return t.scope?`${a.pretty(e,`@${t.scope}/`,a.Type.SCOPE)}${a.pretty(e,t.name,a.Type.NAME)}`:""+a.pretty(e,t.name,a.Type.NAME)}function _(e){if(e.startsWith("virtual:")){return`${_(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function Z(e,t){return""+a.pretty(e,_(t),a.Type.RANGE)}function $(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.RANGE)}${Z(e,t.range)}`}function ee(e,t){return""+a.pretty(e,_(t),a.Type.REFERENCE)}function te(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.REFERENCE)}${ee(e,t.reference)}`}function re(e){return`${J(e)}@${_(e.reference)}`}function Ae(e){return g.sortMap(e,[e=>J(e),e=>e.range])}function ne(e,t){return V(e,t.locator)}function oe(e,t,r){const A=w(t)?D(t):t;return null===r?`${l.prettyDescriptor(e,A)} → ${a.mark(e).Cross}`:A.identHash===r.identHash?`${l.prettyDescriptor(e,A)} → ${ee(e,r.reference)}`:`${l.prettyDescriptor(e,A)} → ${te(e,r)}`}function ie(e,t,r){return null===r?""+te(e,t):`${te(e,t)} (via ${l.prettyRange(e,r.range)})`}function se(e){return"node_modules/"+H(e)}},72785:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeArchiveFromDirectory:()=>h,convertToZip:()=>p,extractArchiveTo:()=>d});var A=r(78420),n=r(46009),o=r(90739),i=r(43896),s=r(65281),a=r(59938),c=r(31669),g=r(78761),l=r.n(g);const u=(0,c.promisify)(l().gunzip);async function h(e,{baseFs:t=new A.S,prefixPath:r=n.LZ.root,compressionLevel:a,inMemory:c=!1}={}){const g=await(0,s.getLibzipPromise)();let l;if(c)l=new o.d(null,{libzip:g,level:a});else{const e=await i.xfs.mktempPromise(),t=n.y1.join(e,"archive.zip");l=new o.d(t,{create:!0,libzip:g,level:a})}const u=n.y1.resolve(n.LZ.root,r);return await l.copyPromise(u,e,{baseFs:t,stableTime:!0,stableSort:!0}),l}async function p(e,t){const r=await i.xfs.mktempPromise(),A=n.y1.join(r,"archive.zip"),{compressionLevel:a,...c}=t;return await d(e,new o.d(A,{create:!0,libzip:await(0,s.getLibzipPromise)(),level:a}),c)}async function d(e,t,{stripComponents:r=0,prefixPath:A=n.LZ.dot}={}){const o=a.extract();o.on("entry",(e,o,i)=>{var s,a;if(function(e){if("/"===e.name[0])return!0;const t=e.name.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void i();const c=n.y1.normalize(n.cS.toPortablePath(e.name)).replace(/\/$/,"").split(/\//g);if(c.length<=r)return o.resume(),void i();const g=c.slice(r).join("/"),l=n.y1.join(A,g);let u=420;switch("directory"!==e.type&&0==(73&(null!==(s=e.mode)&&void 0!==s?s:0))||(u|=73),e.type){case"directory":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[456789000,456789000]}),t.mkdirSync(l),t.chmodSync(l,u),t.utimesSync(l,456789000,456789000),i();break;case"file":{t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[456789000,456789000]});const e=[];o.on("data",t=>e.push(t)),o.on("end",()=>{t.writeFileSync(l,Buffer.concat(e)),t.chmodSync(l,u),t.utimesSync(l,456789000,456789000),i()})}break;case"symlink":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[456789000,456789000]}),t.symlinkSync(e.linkname,l),null===(a=t.lutimesSync)||void 0===a||a.call(t,l,456789000,456789000),i();break;default:o.resume(),i()}});const i=await u(e);return await new Promise((e,r)=>{o.on("error",e=>{r(e)}),o.on("finish",()=>{e(t)}),o.end(i)})}},85875:(e,t,r)=>{"use strict";r.r(t),r.d(t,{treeNodeToTreeify:()=>o,treeNodeToJson:()=>i,emitList:()=>s,emitTree:()=>a});var A=r(94682),n=r(71643);function o(e,{configuration:t}){const r={},A=(e,r)=>{const o=Array.isArray(e)?e.entries():Object.entries(e);for(const[e,{label:i,value:s,children:a}]of o){const o=[];void 0!==i&&o.push(n.applyStyle(t,i,n.Style.BOLD)),void 0!==s&&o.push(n.pretty(t,s[0],s[1])),0===o.length&&o.push(n.applyStyle(t,""+e,n.Style.BOLD));const c=r[o.join(": ")]={};void 0!==a&&A(a,c)}};if(void 0===e.children)throw new Error("The root node must only contain children");return A(e.children,r),r}function i(e){const t=e=>{var r;if(void 0===e.children){if(void 0===e.value)throw new Error("Assertion failed: Expected a value to be set if the children are missing");return n.json(e.value[0],e.value[1])}const A=Array.isArray(e.children)?e.children.entries():Object.entries(null!==(r=e.children)&&void 0!==r?r:{}),o=Array.isArray(e.children)?[]:{};for(const[e,r]of A)o[e]=t(r);return void 0===e.value?o:{value:n.json(e.value[0],e.value[1]),children:o}};return t(e)}function s(e,{configuration:t,stdout:r,json:A}){a({children:e.map(e=>({value:e}))},{configuration:t,stdout:r,json:A})}function a(e,{configuration:t,stdout:r,json:n,separators:s=0}){var a;if(n){const t=Array.isArray(e.children)?e.children.values():Object.values(null!==(a=e.children)&&void 0!==a?a:{});for(const e of t)r.write(JSON.stringify(i(e))+"\n");return}let c=(0,A.asTree)(o(e,{configuration:t}),!1,!1);if(s>=1&&(c=c.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,"")),s>=2)for(let e=0;e<2;++e)c=c.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,"$1$3 │\n$2").replace(/^│\n/,"");if(s>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(c)}},32485:(e,t,r)=>{"use strict";var A,n,o;r.d(t,{Un:()=>A,HN:()=>n,_u:()=>o}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.Dependency="Dependency",e.PeerDependency="PeerDependency",e.PeerDependencyMeta="PeerDependencyMeta"}(n||(n={})),function(e){e.Inactive="inactive",e.Redundant="redundant",e.Active="active"}(o||(o={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var A=r(42096);class n extends A.p{constructor(e,{baseFs:t,pathUtils:r}){super(r),this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}},75448:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var A=r(78420),n=r(42096),o=r(46009);class i extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?o.y1.normalize(e):this.baseFs.resolve(o.y1.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}},5944:(e,t,r)=>{"use strict";r.d(t,{fS:()=>g,uY:()=>c,qH:()=>l});var A=r(12087),n=r(35747),o=r.n(n),i=r(46009);const s=new Date(4567890e5);async function a(e,t,r,A,n,c,g,l){var u,h;const p=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(A,n),d=await c.lstatPromise(g),C=l.stableTime?{mtime:s,atime:s}:d;let f;switch(!0){case d.isDirectory():f=await async function(e,t,r,A,n,o,i,s,c,g){if(null!==o&&!o.isDirectory()){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}let l=!1;null===o&&(e.push(async()=>A.mkdirPromise(n,{mode:c.mode})),l=!0);const u=await i.readdirPromise(s);if(g.stableSort)for(const o of u.sort())await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)&&(l=!0);else{(await Promise.all(u.map(async o=>{await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)}))).some(e=>e)&&(l=!0)}return l}(e,t,r,A,n,p,c,g,d,l);break;case d.isFile():f=await async function(e,t,r,A,n,i,s,a,c,g){if(null!==i){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),i=null}const l=A===s?async()=>A.copyFilePromise(a,n,o().constants.COPYFILE_FICLONE):async()=>A.writeFilePromise(n,await s.readFilePromise(a));return e.push(async()=>l()),!0}(e,0,0,A,n,p,c,g,0,l);break;case d.isSymbolicLink():f=await async function(e,t,r,A,n,o,s,a,c,g){if(null!==o){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}return e.push(async()=>{await A.symlinkPromise((0,i.CI)(A.pathUtils,await s.readlinkPromise(a)),n)}),!0}(e,0,0,A,n,p,c,g,0,l);break;default:throw new Error(`Unsupported file type (${d.mode})`)}return(f||(null===(u=null==p?void 0:p.mtime)||void 0===u?void 0:u.getTime())!==C.mtime.getTime()||(null===(h=null==p?void 0:p.atime)||void 0===h?void 0:h.getTime())!==C.atime.getTime())&&(t.push(()=>r(n,C.atime,C.mtime)),f=!0),null!==p&&(511&p.mode)==(511&d.mode)||(t.push(()=>A.chmodPromise(n,511&d.mode)),f=!0),f}class c{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:t=!1}={}){const r=[e];for(;r.length>0;){const e=r.shift();if((await this.lstatPromise(e)).isDirectory()){const A=await this.readdirPromise(e);if(!t)throw new Error("Not supported");for(const t of A.sort())r.push(this.pathUtils.join(e,t))}else yield e}}async removePromise(e,{recursive:t=!0,maxRetries:r=5}={}){let A;try{A=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(A.isDirectory()){if(t)for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));let A=0;do{try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){if(0===r)break;await new Promise(e=>setTimeout(e,100*A));continue}throw e}}while(A++e()))}(this,e,r,t,{overwrite:A,stableSort:n,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:A=!0}={}){const n=r.lstatSync(t),o=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);const n=r.readdirSync(t);for(const o of n)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:A})}else if(n.isFile()){if(!o||A){o&&this.removeSync(e);const A=r.readFileSync(t);this.writeFileSync(e,A)}}else{if(!n.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);if(!o||A){o&&this.removeSync(e);const A=r.readlinkSync(t);this.symlinkSync((0,i.CI)(this.pathUtils,A),e)}}const s=511&n.mode;this.chmodSync(e,s)}async changeFilePromise(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferPromise(e,t):this.changeFileTextPromise(e,t,r)}async changeFileBufferPromise(e,t){let r=Buffer.alloc(0);try{r=await this.readFilePromise(e)}catch(e){}0!==Buffer.compare(r,t)&&await this.writeFilePromise(e,t)}async changeFileTextPromise(e,t,{automaticNewlines:r}={}){let A="";try{A=await this.readFilePromise(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&await this.writeFilePromise(e,n)}changeFileSync(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferSync(e,t):this.changeFileTextSync(e,t,r)}changeFileBufferSync(e,t){let r=Buffer.alloc(0);try{r=this.readFileSync(e)}catch(e){}0!==Buffer.compare(r,t)&&this.writeFileSync(e,t)}changeFileTextSync(e,t,{automaticNewlines:r=!1}={}){let A="";try{A=this.readFileSync(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&this.writeFileSync(e,n)}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(r){if("EXDEV"!==r.code)throw r;await this.copyPromise(t,e),await this.removePromise(e)}}moveSync(e,t){try{this.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;this.copySync(t,e),this.removeSync(e)}}async lockPromise(e,t){const r=e+".flock",A=Date.now();let n=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-A<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===n;)try{n=await this.openPromise(r,"wx")}catch(e){if("EEXIST"!==e.code)throw e;if(!await o())try{await this.unlinkPromise(r);continue}catch(e){}if(!(Date.now()-A<6e4))throw new Error(`Couldn't acquire a lock in a reasonable time (via ${r})`);await new Promise(e=>setTimeout(e,1e3/60))}await this.writePromise(n,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.closePromise(n),await this.unlinkPromise(r)}catch(e){}}}async readJsonPromise(e){const t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}readJsonSync(e){const t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,JSON.stringify(t,null,2)+"\n")}writeJsonSync(e,t){return this.writeFileSync(e,JSON.stringify(t,null,2)+"\n")}async preserveTimePromise(e,t){const r=await this.lstatPromise(e),A=await t();void 0!==A&&(e=A),this.lutimesPromise?await this.lutimesPromise(e,r.atime,r.mtime):r.isSymbolicLink()||await this.utimesPromise(e,r.atime,r.mtime)}async preserveTimeSync(e,t){const r=this.lstatSync(e),A=t();void 0!==A&&(e=A),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}c.DEFAULT_TIME=456789000;class g extends c{constructor(){super(i.y1)}}function l(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return A.EOL;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"}(e))}},10489:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var A=r(78420),n=r(42096),o=r(46009);const i=o.LZ.root;class s extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.resolve(o.LZ.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(o.LZ.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){const t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(i,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(i,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});var A=r(42096);class n extends A.p{constructor(e,t){super(t),this.instance=null,this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}}},78420:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var A=r(35747),n=r.n(A),o=r(5944),i=r(26984),s=r(46009);class a extends o.fS{constructor(e=n()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return s.LZ.root}resolve(e){return s.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.open(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}openSync(e,t,r){return this.realFs.openSync(s.cS.fromPortablePath(e),t,r)}async opendirPromise(e,t){return await new Promise((r,A)=>{void 0!==t?this.realFs.opendir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.opendir(s.cS.fromPortablePath(e),this.makeCallback(r,A))}).then(t=>Object.defineProperty(t,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,t){const r=void 0!==t?this.realFs.opendirSync(s.cS.fromPortablePath(e),t):this.realFs.opendirSync(s.cS.fromPortablePath(e));return Object.defineProperty(r,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,t,r=0,A=0,n=-1){return await new Promise((o,i)=>{this.realFs.read(e,t,r,A,n,(e,t)=>{e?i(e):o(t)})})}readSync(e,t,r,A,n){return this.realFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return await new Promise((o,i)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,i)):this.realFs.write(e,t,r,A,n,this.makeCallback(o,i)))}writeSync(e,t,r,A,n){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,A,n)}async closePromise(e){await new Promise((t,r)=>{this.realFs.close(e,this.makeCallback(t,r))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(s.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}realpathSync(e){return s.cS.toPortablePath(this.realFs.realpathSync(s.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(s.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(s.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,A)=>{this.realFs.access(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}existsSync(e){return this.realFs.existsSync(s.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(s.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(s.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,A)=>{this.realFs.chmod(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}chmodSync(e,t){return this.realFs.chmodSync(s.cS.fromPortablePath(e),t)}async chownPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.chown(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}chownSync(e,t,r){return this.realFs.chownSync(s.cS.fromPortablePath(e),t,r)}async renamePromise(e,t){return await new Promise((r,A)=>{this.realFs.rename(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}renameSync(e,t){return this.realFs.renameSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((A,n)=>{this.realFs.copyFile(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r,this.makeCallback(A,n))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(A,n)):this.realFs.appendFile(o,t,this.makeCallback(A,n))})}appendFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(A,t,r):this.realFs.appendFileSync(A,t)}async writeFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(A,n)):this.realFs.writeFile(o,t,this.makeCallback(A,n))})}writeFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(A,t,r):this.realFs.writeFileSync(A,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(s.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.utimes(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}utimesSync(e,t,r){this.realFs.utimesSync(s.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const A=this.realFs.lutimes;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((n,o)=>{A.call(this.realFs,s.cS.fromPortablePath(e),t,r,this.makeCallback(n,o))})}lutimesSyncImpl(e,t,r){const A=this.realFs.lutimesSync;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);A.call(this.realFs,s.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,A)=>{this.realFs.mkdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}mkdirSync(e,t){return this.realFs.mkdirSync(s.cS.fromPortablePath(e),t)}async rmdirPromise(e,t){return await new Promise((r,A)=>{t?this.realFs.rmdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.rmdir(s.cS.fromPortablePath(e),this.makeCallback(r,A))})}rmdirSync(e,t){return this.realFs.rmdirSync(s.cS.fromPortablePath(e),t)}async linkPromise(e,t){return await new Promise((r,A)=>{this.realFs.link(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}linkSync(e,t){return this.realFs.linkSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async symlinkPromise(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,n)=>{this.realFs.symlink(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A,this.makeCallback(r,n))})}symlinkSync(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A)}async readFilePromise(e,t){return await new Promise((r,A)=>{const n="string"==typeof e?s.cS.fromPortablePath(e):e;this.realFs.readFile(n,t,this.makeCallback(r,A))})}readFileSync(e,t){const r="string"==typeof e?s.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,A)=>{t?this.realFs.readdir(s.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,A)):this.realFs.readdir(s.cS.fromPortablePath(e),this.makeCallback(e=>r(e),A))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(s.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(s.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}readlinkSync(e){return s.cS.toPortablePath(this.realFs.readlinkSync(s.cS.fromPortablePath(e)))}async truncatePromise(e,t){return await new Promise((r,A)=>{this.realFs.truncate(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}truncateSync(e,t){return this.realFs.truncateSync(s.cS.fromPortablePath(e),t)}watch(e,t,r){return this.realFs.watch(s.cS.fromPortablePath(e),t,r)}watchFile(e,t,r){return this.realFs.watchFile(s.cS.fromPortablePath(e),t,r)}unwatchFile(e,t){return this.realFs.unwatchFile(s.cS.fromPortablePath(e),t)}makeCallback(e,t){return(r,A)=>{r?t(r):e(A)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var A=r(42096),n=r(46009);class o extends A.p{constructor(e){super(n.cS),this.baseFs=e}mapFromBase(e){return n.cS.fromPortablePath(e)}mapToBase(e){return n.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var A=r(5944);class n extends A.uY{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,t,r){return this.baseFs.openPromise(this.mapToBase(e),t,r)}openSync(e,t,r){return this.baseFs.openSync(this.mapToBase(e),t,r)}async opendirPromise(e,t){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),t),{path:e})}opendirSync(e,t){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),t),{path:e})}async readPromise(e,t,r,A,n){return await this.baseFs.readPromise(e,t,r,A,n)}readSync(e,t,r,A,n){return this.baseFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n)}writeSync(e,t,r,A,n){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(null!==e?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(null!==e?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}async accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}async statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}async lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}async chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}async chownPromise(e,t,r){return this.baseFs.chownPromise(this.mapToBase(e),t,r)}chownSync(e,t,r){return this.baseFs.chownSync(this.mapToBase(e),t,r)}async renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}async copyFilePromise(e,t,r=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),r)}copyFileSync(e,t,r=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),r)}async appendFilePromise(e,t,r){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,r)}appendFileSync(e,t,r){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,r)}async writeFilePromise(e,t,r){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,r)}writeFileSync(e,t,r){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,r)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,t,r){return this.baseFs.utimesPromise(this.mapToBase(e),t,r)}utimesSync(e,t,r){return this.baseFs.utimesSync(this.mapToBase(e),t,r)}async mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}async rmdirPromise(e,t){return this.baseFs.rmdirPromise(this.mapToBase(e),t)}rmdirSync(e,t){return this.baseFs.rmdirSync(this.mapToBase(e),t)}async linkPromise(e,t){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(t))}linkSync(e,t){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(t))}async symlinkPromise(e,t,r){return this.baseFs.symlinkPromise(this.mapToBase(e),this.mapToBase(t),r)}symlinkSync(e,t,r){return this.baseFs.symlinkSync(this.mapToBase(e),this.mapToBase(t),r)}async readFilePromise(e,t){return this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,{withFileTypes:t}={}){return this.baseFs.readdirPromise(this.mapToBase(e),{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){return this.baseFs.readdirSync(this.mapToBase(e),{withFileTypes:t})}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,t){return this.baseFs.truncatePromise(this.mapToBase(e),t)}truncateSync(e,t){return this.baseFs.truncateSync(this.mapToBase(e),t)}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}watchFile(e,t,r){return this.baseFs.watchFile(this.mapToBase(e),t,r)}unwatchFile(e,t){return this.baseFs.unwatchFile(this.mapToBase(e),t)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var A=r(78420),n=r(42096),o=r(46009);const i=/^[0-9]+$/,s=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends n.p{constructor({baseFs:e=new A.S}={}){super(o.y1),this.baseFs=e}static makeVirtualPath(e,t,r){if("$$virtual"!==o.y1.basename(e))throw new Error('Assertion failed: Virtual folders must be named "$$virtual"');if(!o.y1.basename(t).match(a))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");const A=o.y1.relative(o.y1.dirname(e),r).split("/");let n=0;for(;n{"use strict";r.d(t,{k:()=>C,d:()=>f});var A=r(35747),n=r(92413),o=r(31669),i=r(78761),s=r.n(i),a=r(5944),c=r(78420),g=r(19697),l=r(38783),u=r(22004),h=r(26984),p=r(46009),d=r(65760);const C="mixed";class f extends a.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fileSources=new Map,this.fds=new Map,this.nextFd=0,this.ready=!1,this.readOnly=!1,this.libzip=t.libzip;const r=t;if(this.level=void 0!==r.level?r.level:C,null===e&&(e=Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),"string"==typeof e){const{baseFs:t=new c.S}=r;this.baseFs=t,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if("string"==typeof e)try{this.stats=this.baseFs.statSync(e)}catch(e){if("ENOENT"!==e.code||!r.create)throw e;this.stats=d.makeDefaultStats()}else this.stats=d.makeDefaultStats();const A=this.libzip.malloc(4);try{let n=0;if("string"==typeof e&&r.create&&(n|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(n|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(p.cS.fromPortablePath(e),n,A);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,n,A),this.lzSource=t}catch(e){throw this.libzip.source.free(t),e}}if(0===this.zip){const e=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(e,this.libzip.getValue(A,"i32")),this.makeLibzipError(e)}}finally{this.libzip.free(A)}this.listings.set(p.LZ.root,new Set);const n=this.libzip.getNumEntries(this.zip,0);for(let e=0;ee)throw new Error("Overread");const A=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(A)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw h.Vw("archive closed, close");(0,l.L)(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),this.readOnly)return void this.discardAndClose();const e=this.baseFs.existsSync(this.path)?511&this.baseFs.statSync(this.path).mode:null;if(-1===this.libzip.close(this.zip))throw this.makeLibzipError(this.libzip.getError(this.zip));null===e?this.baseFs.chmodSync(this.path,this.stats.mode):e!==(511&this.baseFs.statSync(this.path).mode)&&this.baseFs.chmodSync(this.path,e),this.ready=!1}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return p.y1.resolve(p.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const A=this.nextFd++;return this.fds.set(A,{cursor:0,p:e}),A}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,t){return this.opendirSync(e,t)}opendirSync(e,t={}){const r=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`opendir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`opendir '${e}'`);const n=[...A],o=this.openSync(r,"r");return(0,g.a)(this,r,n,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,t,r,A,n){return this.readSync(e,t,r,A,n)}readSync(e,t,r=0,A=0,n=-1){const o=this.fds.get(e);if(void 0===o)throw h.Ch("read");let i;i=-1===n||null===n?o.cursor:n;const s=this.readFileSync(o.p);s.copy(t,r,i,i+A);const a=Math.max(0,Math.min(s.length-i,A));return-1!==n&&null!==n||(o.cursor+=a),a}async writePromise(e,t,r,A,n){return"string"==typeof t?this.writeSync(e,t,n):this.writeSync(e,t,r,A,n)}writeSync(e,t,r,A,n){if(void 0===this.fds.get(e))throw h.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw h.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=this.openSync(e,"r"),A=Object.assign(new n.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(e,t)=>{clearImmediate(o),this.closeSync(r),t(e)}}),{close(){A.destroy()},bytesRead:0,path:e}),o=setImmediate(async()=>{try{const r=await this.readFilePromise(e,t);A.bytesRead=r.length,A.end(r)}catch(e){A.destroy(e)}});return A}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw h.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=[],A=this.openSync(e,"w"),o=Object.assign(new n.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(n,o)=>{try{n?o(n):(this.writeFileSync(e,Buffer.concat(r),t),o(null))}catch(e){o(e)}finally{this.closeSync(A)}}}),{bytesWritten:0,path:e,close(){o.destroy()}});return o.on("data",e=>{const t=Buffer.from(e);o.bytesWritten+=t.length,r.push(t)}),o}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){const t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw h.Vw(`archive closed, existsSync '${e}'`);if(0===this.symlinkCount){const t=p.y1.resolve(p.LZ.root,e);return this.entries.has(t)||this.listings.has(t)}let t;try{t=this.resolveFilename(`stat '${e}'`,e)}catch(e){return!1}return this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=A.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`access '${e}'`);if(this.readOnly&&t&A.constants.W_OK)throw h.YW(`access '${e}'`)}async statPromise(e){return this.statSync(e)}statSync(e){const t=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`stat '${e}'`);return this.statImpl(`stat '${e}'`,t)}async lstatPromise(e){return this.lstatSync(e)}lstatSync(e){const t=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,t)}statImpl(e,t){const r=this.entries.get(t);if(void 0!==r){const e=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,r,0,0,e))throw this.makeLibzipError(this.libzip.getError(this.zip));const A=this.stats.uid,n=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,i=512,s=Math.ceil(o/i),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,g=a,l=a,h=new Date(c),p=new Date(g),C=new Date(l),f=new Date(a),I=this.listings.has(t)?u.QB:this.isSymbolicLink(r)?u.Zv:u.Pe,E=I===u.QB?493:420,B=I|511&this.getUnixMode(r,E);return Object.assign(new d.StatEntry,{uid:A,gid:n,size:o,blksize:i,blocks:s,atime:h,birthtime:p,ctime:C,mtime:f,atimeMs:c,birthtimeMs:g,ctimeMs:l,mtimeMs:a,mode:B})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,A=512,n=0,o=this.stats.mtimeMs,i=this.stats.mtimeMs,s=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),g=new Date(i),l=new Date(s),h=new Date(a),p=493|u.QB;return Object.assign(new d.StatEntry,{uid:e,gid:t,size:r,blksize:A,blocks:n,atime:c,birthtime:g,ctime:l,mtime:h,atimeMs:o,birthtimeMs:i,ctimeMs:s,mtimeMs:a,mode:p})}throw new Error("Unreachable")}getUnixMode(e,t){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;const r=this.registerListing(p.y1.dirname(e));return t=new Set,r.add(p.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(p.y1.dirname(e)).add(p.y1.basename(e)),this.entries.set(e,t)}unregisterListing(e){this.listings.delete(e);const t=this.listings.get(p.y1.dirname(e));null==t||t.delete(p.y1.basename(e))}unregisterEntry(e){this.unregisterListing(e);const t=this.entries.get(e);this.entries.delete(e),void 0!==t&&(this.fileSources.delete(t),this.isSymbolicLink(t)&&this.symlinkCount--)}deleteEntry(e,t){this.unregisterEntry(e);if(-1===this.libzip.delete(this.zip,t))throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,t,r=!0){if(!this.ready)throw h.Vw("archive closed, "+e);let A=p.y1.resolve(p.LZ.root,t);if("/"===A)return p.LZ.root;const n=this.entries.get(A);if(r&&void 0!==n){if(0!==this.symlinkCount&&this.isSymbolicLink(n)){const t=this.getFileSource(n).toString();return this.resolveFilename(e,p.y1.resolve(p.y1.dirname(A),t),!0)}return A}for(;;){const t=this.resolveFilename(e,p.y1.dirname(A),!0),n=this.listings.has(t),o=this.entries.has(t);if(!n&&!o)throw h.z6(e);if(!n)throw h.Ab(e);if(A=p.y1.resolve(t,p.y1.basename(A)),!r||0===this.symlinkCount)break;const i=this.libzip.name.locate(this.zip,A.slice(1));if(-1===i)break;if(!this.isSymbolicLink(i))break;{const e=this.getFileSource(i).toString();A=p.y1.resolve(p.y1.dirname(A),e)}}return A}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));const t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){const t=this.libzip.struct.errorS(),{buffer:r,byteLength:A}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(r,A,0,!0,t);if(0===n)throw this.libzip.free(t),this.makeLibzipError(t);return n}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),A=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===A)throw this.libzip.free(t),this.makeLibzipError(this.libzip.getError(this.zip));return A}setFileSource(e,t){const r=Buffer.isBuffer(t)?t:Buffer.from(t),A=p.y1.relative(p.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,A,n,this.libzip.ZIP_FL_OVERWRITE);if(-1===e)throw this.makeLibzipError(this.libzip.getError(this.zip));if("mixed"!==this.level){let t;t=0===this.level?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(-1===this.libzip.file.setCompression(this.zip,e,0,t,this.level))throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(e,r),e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(0===this.symlinkCount)return!1;if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&u.wK)===u.Zv}getFileSource(e,t={asyncDecompress:!1}){const r=this.fileSources.get(e);if(void 0!==r)return r;const A=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,A))throw this.makeLibzipError(this.libzip.getError(this.zip));const n=this.libzip.struct.statCompSize(A),o=this.libzip.struct.statCompMethod(A),i=this.libzip.malloc(n);try{const r=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(0===r)throw this.makeLibzipError(this.libzip.getError(this.zip));try{const A=this.libzip.fread(r,i,n,0);if(-1===A)throw this.makeLibzipError(this.libzip.file.getError(r));if(An)throw new Error("Overread");const a=this.libzip.HEAPU8.subarray(i,i+n),c=Buffer.from(a);if(0===o)return this.fileSources.set(e,c),c;if(t.asyncDecompress)return new Promise((t,r)=>{s().inflateRaw(c,(A,n)=>{A?r(A):(this.fileSources.set(e,n),t(n))})});{const t=s().inflateRawSync(c);return this.fileSources.set(e,t),t}}finally{this.libzip.fclose(r)}}finally{this.libzip.free(i)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw h.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),A=this.entries.get(r);if(void 0===A)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const n=-512&this.getUnixMode(A,0|u.Pe)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,n<<16))throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,t,r){return this.chownSync(e,t,r)}chownSync(e,t,r){throw new Error("Unimplemented")}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=await this.getFileSource(A,{asyncDecompress:!0}),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}copyFileSync(e,t,r=0){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=this.getFileSource(A),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}prepareCopyFile(e,t,r=0){if(this.readOnly)throw h.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw h.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const n=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(n);if(void 0===o)throw h.hq(`copyfile '${e}' -> '${t}'`);const i=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),s=this.entries.get(i);if(0!=(r&(A.constants.COPYFILE_EXCL|A.constants.COPYFILE_FICLONE_FORCE))&&void 0!==s)throw h.cT(`copyfile '${e}' -> '${t}'`);return{indexSource:o,resolvedDestP:i,indexDest:s}}async appendFilePromise(e,t,r){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFilePromise(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFileSync(e,t,r)}async writeFilePromise(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([await this.getFileSource(n,{asyncDecompress:!0}),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}writeFileSync(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(n),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}prepareWriteFile(e,t){if("string"!=typeof e)throw h.Ch("read");if(this.readOnly)throw h.YW(`open '${e}'`);const r=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(r))throw h.GA(`open '${e}'`);let A=null;"string"==typeof t?A=t:"object"==typeof t&&t.encoding&&(A=t.encoding);return{encoding:A,resolvedP:r,index:this.entries.get(r)}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw h.YW(`unlink '${e}'`);const t=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(t))throw h.GA(`unlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw h.hq(`unlink '${e}'`);this.deleteEntry(t,r)}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw h.YW(`utimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(A,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw h.YW(`lutimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(A,r)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));const r=this.entries.get(e);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.setMtime(this.zip,r,0,function(e){if("string"==typeof e&&String(+e)===e)return+e;if(Number.isFinite(e))return e<0?Date.now()/1e3:e;if((0,o.isDate)(e))return e.getTime()/1e3;throw new Error("Invalid time")}(t),0))throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:r=!1}={}){if(r)return void this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw h.YW(`mkdir '${e}'`);const A=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(A)||this.listings.has(A))throw h.cT(`mkdir '${e}'`);this.hydrateDirectory(A),this.chmodSync(A,t)}async rmdirPromise(e,t){return this.rmdirSync(e,t)}rmdirSync(e,{recursive:t=!1}={}){if(this.readOnly)throw h.YW(`rmdir '${e}'`);if(t)return void this.removeSync(e);const r=this.resolveFilename(`rmdir '${e}'`,e),A=this.listings.get(r);if(!A)throw h.Ab(`rmdir '${e}'`);if(A.size>0)throw h.re(`rmdir '${e}'`);const n=this.entries.get(r);if(void 0===n)throw h.hq(`rmdir '${e}'`);this.deleteEntry(e,n)}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,p.y1.relative(p.LZ.root,e));if(-1===t)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,t),t}async linkPromise(e,t){return this.linkSync(e,t)}linkSync(e,t){throw h.Hs(`link '${e}' -> '${t}'`)}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw h.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw h.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw h.cT(`symlink '${e}' -> '${t}'`);const A=this.setFileSource(r,e);this.registerEntry(r,A);if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,(511|u.Zv)<<16))throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=await this.readFileBuffer(e,{asyncDecompress:!0});return t?r.toString(t):r}readFileSync(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.readFileBuffer(e);return t?r.toString(t):r}readFileBuffer(e,t={asyncDecompress:!1}){if("string"!=typeof e)throw h.Ch("read");const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw h.Ab(`open '${e}'`);if(this.listings.has(r))throw h.GA("read");const A=this.entries.get(r);if(void 0===A)throw new Error("Unreachable");return this.getFileSource(A,t)}async readdirPromise(e,{withFileTypes:t}={}){return this.readdirSync(e,{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){const r=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`scandir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`scandir '${e}'`);const n=[...A];return t?n.map(t=>Object.assign(this.statImpl("lstat",p.y1.join(e,t)),{name:t})):n}async readlinkPromise(e){const t=this.prepareReadlink(e);return(await this.getFileSource(t,{asyncDecompress:!0})).toString()}readlinkSync(e){const t=this.prepareReadlink(e);return this.getFileSource(t).toString()}prepareReadlink(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`open '${e}'`);if(this.listings.has(t))throw h.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(!this.isSymbolicLink(r))throw h.hq(`readlink '${e}'`);return r}async truncatePromise(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=await this.getFileSource(A,{asyncDecompress:!0}),o=Buffer.alloc(t,0);return n.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=this.getFileSource(A),o=Buffer.alloc(t,0);return n.copy(o),this.writeFileSync(e,o)}watch(e,t,r){let A;switch(typeof t){case"function":case"string":case"undefined":A=!0;break;default:({persistent:A=!0}=t)}if(!A)return{on:()=>{},close:()=>{}};const n=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(n)}}}watchFile(e,t,r){const A=this.resolveFilename(`open '${e}'`,e);return(0,l._x)(this,A,t,r)}unwatchFile(e,t){const r=this.resolveFilename(`open '${e}'`,e);return(0,l.nd)(this,r,t)}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var A=r(35747),n=r(5944),o=r(78420),i=r(90739),s=r(38783),a=r(46009);const c=2147483648,g=/.*?(?await this.baseFs.openPromise(e,t,r),async(e,{subPath:A})=>this.remapFd(e,await e.openPromise(A,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:A})=>this.remapFd(e,e.openSync(A,t,r)))}async opendirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,t),async(e,{subPath:r})=>await e.opendirPromise(r,t),{requireSubpath:!1})}opendirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,t),(e,{subPath:r})=>e.opendirSync(r,t),{requireSubpath:!1})}async readPromise(e,t,r,A,n){if(0==(e&c))return await this.baseFs.readPromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return await i.readPromise(s,t,r,A,n)}readSync(e,t,r,A,n){if(0==(e&c))return this.baseFs.readSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return i.readSync(s,t,r,A,n)}async writePromise(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?await i.writePromise(s,t,r):await i.writePromise(s,t,r,A,n)}writeSync(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?i.writeSync(s,t,r):i.writeSync(s,t,r,A,n)}async closePromise(e){if(0==(e&c))return await this.baseFs.closePromise(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return await r.closePromise(A)}closeSync(e){if(0==(e&c))return this.baseFs.closeSync(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return r.closeSync(A)}createReadStream(e,t){return null===e?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(e,{subPath:r})=>e.createReadStream(r,t))}createWriteStream(e,t){return null===e?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(e,{subPath:r})=>e.createWriteStream(r,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=await this.baseFs.realpathPromise(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,await e.realpathPromise(r)))})}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=this.baseFs.realpathSync(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,e.realpathSync(r)))})}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(e,{subPath:t})=>await e.existsPromise(t))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(e,{subPath:t})=>e.existsSync(t))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(e,{subPath:r})=>await e.accessPromise(r,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(e,{subPath:r})=>e.accessSync(r,t))}async statPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e),async(e,{subPath:t})=>await e.statPromise(t))}statSync(e){return this.makeCallSync(e,()=>this.baseFs.statSync(e),(e,{subPath:t})=>e.statSync(t))}async lstatPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e),async(e,{subPath:t})=>await e.lstatPromise(t))}lstatSync(e){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e),(e,{subPath:t})=>e.lstatSync(t))}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(e,{subPath:r})=>await e.chmodPromise(r,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(e,{subPath:r})=>e.chmodSync(r,t))}async chownPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,t,r),async(e,{subPath:A})=>await e.chownPromise(A,t,r))}chownSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,t,r),(e,{subPath:A})=>e.chownSync(A,t,r))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(e,{subPath:r})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,A)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(e,{subPath:r})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,A)}))}async copyFilePromise(e,t,r=0){const n=async(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await n.writeFilePromise(o,i)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await n(this.baseFs,e,t,r)),async(e,{subPath:A})=>await this.makeCallPromise(t,async()=>await n(e,A,this.baseFs,t),async(t,{subPath:o})=>e!==t?await n(e,A,t,o):await e.copyFilePromise(A,o,r)))}copyFileSync(e,t,r=0){const n=(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}n.writeFileSync(o,i)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>n(this.baseFs,e,t,r)),(e,{subPath:A})=>this.makeCallSync(t,()=>n(e,A,this.baseFs,t),(t,{subPath:o})=>e!==t?n(e,A,t,o):e.copyFileSync(A,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:A})=>await e.appendFilePromise(A,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:A})=>e.appendFileSync(A,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:A})=>await e.writeFilePromise(A,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:A})=>e.writeFileSync(A,t,r))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(e,{subPath:t})=>await e.unlinkPromise(t))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(e,{subPath:t})=>e.unlinkSync(t))}async utimesPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,r),async(e,{subPath:A})=>await e.utimesPromise(A,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:A})=>e.utimesSync(A,t,r))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(e,{subPath:r})=>await e.mkdirPromise(r,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(e,{subPath:r})=>e.mkdirSync(r,t))}async rmdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,t),async(e,{subPath:r})=>await e.rmdirPromise(r,t))}rmdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,t),(e,{subPath:r})=>e.rmdirSync(r,t))}async linkPromise(e,t){return await this.makeCallPromise(t,async()=>await this.baseFs.linkPromise(e,t),async(t,{subPath:r})=>await t.linkPromise(e,r))}linkSync(e,t){return this.makeCallSync(t,()=>this.baseFs.linkSync(e,t),(t,{subPath:r})=>t.linkSync(e,r))}async symlinkPromise(e,t,r){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,r),async(t,{subPath:r})=>await t.symlinkPromise(e,r))}symlinkSync(e,t,r){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,r),(t,{subPath:r})=>t.symlinkSync(e,r))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":default:return await this.baseFs.readFilePromise(e,t)}},async(e,{subPath:r})=>await e.readFilePromise(r,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":default:return this.baseFs.readFileSync(e,t)}},(e,{subPath:r})=>e.readFileSync(r,t))}async readdirPromise(e,{withFileTypes:t}={}){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,{withFileTypes:t}),async(e,{subPath:r})=>await e.readdirPromise(r,{withFileTypes:t}),{requireSubpath:!1})}readdirSync(e,{withFileTypes:t}={}){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,{withFileTypes:t}),(e,{subPath:r})=>e.readdirSync(r,{withFileTypes:t}),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(e,{subPath:t})=>await e.readlinkPromise(t))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(e,{subPath:t})=>e.readlinkSync(t))}async truncatePromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,t),async(e,{subPath:r})=>await e.truncatePromise(r,t))}truncateSync(e,t){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,t),(e,{subPath:r})=>e.truncateSync(r,t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:A})=>e.watch(A,t,r))}watchFile(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,t,r),()=>(0,s._x)(this,e,t,r))}unwatchFile(e,t){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,t),()=>(0,s.nd)(this,e,t))}async makeCallPromise(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return await t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?t():this.getZipSync(o.archivePath,e=>r(e,o)):t()}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){const r=g.exec(e.substr(t.length));if(!r)return null;if(t=this.pathUtils.join(t,r[0]),!1===this.isZip.has(t)){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch(e){return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.join(a.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;const t=Date.now();let r=t+this.maxAge,A=null===e?0:this.zipInstances.size-e;for(const[n,{zipFs:o,expiresAt:i,refCount:s}]of this.zipInstances.entries())if(0===s&&!o.hasOpenFileHandles())if(t>=i)o.saveAndClose(),this.zipInstances.delete(n),A-=1;else{if(null===e||A<=0){r=i;break}o.saveAndClose(),this.zipInstances.delete(n),A-=1}null===this.limitOpenFilesTimeout&&(null===e&&this.zipInstances.size>0||null!==e)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},r-t).unref())}async getZipPromise(e,t){const r=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let A=this.zipInstances.get(e);if(!A){const t=await r();A=this.zipInstances.get(e),A||(A={zipFs:new i.d(e,t),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,A.refCount+=1;try{return await t(A.zipFs)}finally{A.refCount-=1}}else{const A=new i.d(e,await r());try{return await t(A)}finally{A.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let A=this.zipInstances.get(e);return A||(A={zipFs:new i.d(e,r()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,t(A.zipFs)}{const A=new i.d(e,r());try{return t(A)}finally{A.saveAndClose()}}}}},19697:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});var A=r(26984);class n{constructor(e,t,r={}){this.path=e,this.nextDirent=t,this.opts=r,this.closed=!1}throwIfClosed(){if(this.closed)throw A.Xh()}async*[Symbol.asyncIterator](){try{let e;for(;null!==(e=await this.read());)yield e}finally{await this.close()}}read(e){const t=this.readSync();return void 0!==e?e(null,t):Promise.resolve(t)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),void 0!==e?e(null):Promise.resolve()}closeSync(){var e,t;this.throwIfClosed(),null===(t=(e=this.opts).onClose)||void 0===t||t.call(e),this.closed=!0}}function o(e,t,r,A){return new n(t,()=>{const A=r.shift();return void 0===A?null:Object.assign(e.statSync(e.pathUtils.join(t,A)),{name:A})},A)}},38783:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,nd:()=>l,_x:()=>g});var A,n,o=r(28614),i=r(65760);function s(e,t){if(e!==t)throw new Error(`Invalid StatWatcher status: expected '${t}', got '${e}'`)}!function(e){e.Change="change",e.Stop="stop"}(A||(A={})),function(e){e.Ready="ready",e.Running="running",e.Stopped="stopped"}(n||(n={}));class a extends o.EventEmitter{constructor(e,t,{bigint:r=!1}={}){super(),this.status=n.Ready,this.changeListeners=new Map,this.startTimeout=null,this.fakeFs=e,this.path=t,this.bigint=r,this.lastStats=this.stat()}static create(e,t,r){const A=new a(e,t,r);return A.start(),A}start(){s(this.status,n.Ready),this.status=n.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(A.Change,this.lastStats,this.lastStats)},3)}stop(){s(this.status,n.Running),this.status=n.Stopped,null!==this.startTimeout&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(A.Stop)}stat(){try{return this.fakeFs.statSync(this.path)}catch(e){if("ENOENT"===e.code)return i.makeEmptyStats();throw e}}makeInterval(e){const t=setInterval(()=>{const e=this.stat(),t=this.lastStats;i.areStatsEqual(e,t)||(this.lastStats=e,this.emit(A.Change,e,t))},e.interval);return e.persistent?t:t.unref()}registerChangeListener(e,t){this.addListener(A.Change,e),this.changeListeners.set(e,this.makeInterval(t))}unregisterChangeListener(e){this.removeListener(A.Change,e);const t=this.changeListeners.get(e);void 0!==t&&clearInterval(t),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(const e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(const e of this.changeListeners.values())e.ref();return this}unref(){for(const e of this.changeListeners.values())e.unref();return this}}const c=new WeakMap;function g(e,t,r,A){let n,o,i,s;switch(typeof r){case"function":n=!1,o=!0,i=5007,s=r;break;default:({bigint:n=!1,persistent:o=!0,interval:i=5007}=r),s=A}let g=c.get(e);void 0===g&&c.set(e,g=new Map);let l=g.get(t);return void 0===l&&(l=a.create(e,t,{bigint:n}),g.set(t,l)),l.registerChangeListener(s,{persistent:o,interval:i}),l}function l(e,t,r){const A=c.get(e);if(void 0===A)return;const n=A.get(t);void 0!==n&&(void 0===r?n.unregisterAllChangeListeners():n.unregisterChangeListener(r),n.hasChangeListeners()||(n.stop(),A.delete(t)))}function u(e){const t=c.get(e);if(void 0!==t)for(const r of t.keys())l(e,r)}},22004:(e,t,r)=>{"use strict";r.d(t,{wK:()=>A,QB:()=>n,Pe:()=>o,Zv:()=>i});const A=61440,n=16384,o=32768,i=40960},26984:(e,t,r)=>{"use strict";function A(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n(e){return A("EBUSY",e)}function o(e,t){return A("ENOSYS",`${e}, ${t}`)}function i(e){return A("EINVAL","invalid argument, "+e)}function s(e){return A("EBADF","bad file descriptor, "+e)}function a(e){return A("ENOENT","no such file or directory, "+e)}function c(e){return A("ENOTDIR","not a directory, "+e)}function g(e){return A("EISDIR","illegal operation on a directory, "+e)}function l(e){return A("EEXIST","file already exists, "+e)}function u(e){return A("EROFS","read-only filesystem, "+e)}function h(e){return A("ENOTEMPTY","directory not empty, "+e)}function p(e){return A("EOPNOTSUPP","operation not supported, "+e)}function d(){return A("ERR_DIR_CLOSED","Directory handle was closed")}r.d(t,{Vw:()=>n,bk:()=>o,hq:()=>i,Ch:()=>s,z6:()=>a,Ab:()=>c,GA:()=>g,cT:()=>l,YW:()=>u,re:()=>h,Hs:()=>p,Xh:()=>d,Yn:()=>C});class C extends Error{constructor(e,t){super(e),this.name="Libzip Error",this.code=t}}},43896:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AliasFS:()=>u.K,CwdFS:()=>h.M,DEFAULT_COMPRESSION_LEVEL:()=>l.k,FakeFS:()=>g.uY,Filename:()=>s.QS,JailFS:()=>p.n,LazyFS:()=>d.v,NoFS:()=>f,NodeFS:()=>i.S,PortablePath:()=>s.LZ,PosixFS:()=>I.i,ProxiedFS:()=>E.p,VirtualFS:()=>B.p,ZipFS:()=>l.d,ZipOpenFS:()=>y.A,extendFs:()=>Q,normalizeLineEndings:()=>g.qH,npath:()=>s.cS,opendir:()=>c.a,patchFs:()=>w,ppath:()=>s.y1,statUtils:()=>a,toFilename:()=>s.Zu,xfs:()=>S});var A=r(12087),n=r.n(A),o=r(31669),i=r(78420),s=r(46009),a=r(65760),c=r(19697),g=r(5944),l=r(90739),u=r(14626),h=r(75448),p=r(10489),d=r(15037);const C=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class f extends g.uY{constructor(){super(s.y1)}getExtractHint(){throw C()}getRealPath(){throw C()}resolve(){throw C()}async openPromise(){throw C()}openSync(){throw C()}async opendirPromise(){throw C()}opendirSync(){throw C()}async readPromise(){throw C()}readSync(){throw C()}async writePromise(){throw C()}writeSync(){throw C()}async closePromise(){throw C()}closeSync(){throw C()}createWriteStream(){throw C()}createReadStream(){throw C()}async realpathPromise(){throw C()}realpathSync(){throw C()}async readdirPromise(){throw C()}readdirSync(){throw C()}async existsPromise(e){throw C()}existsSync(e){throw C()}async accessPromise(){throw C()}accessSync(){throw C()}async statPromise(){throw C()}statSync(){throw C()}async lstatPromise(e){throw C()}lstatSync(e){throw C()}async chmodPromise(){throw C()}chmodSync(){throw C()}async chownPromise(){throw C()}chownSync(){throw C()}async mkdirPromise(){throw C()}mkdirSync(){throw C()}async rmdirPromise(){throw C()}rmdirSync(){throw C()}async linkPromise(){throw C()}linkSync(){throw C()}async symlinkPromise(){throw C()}symlinkSync(){throw C()}async renamePromise(){throw C()}renameSync(){throw C()}async copyFilePromise(){throw C()}copyFileSync(){throw C()}async appendFilePromise(){throw C()}appendFileSync(){throw C()}async writeFilePromise(){throw C()}writeFileSync(){throw C()}async unlinkPromise(){throw C()}unlinkSync(){throw C()}async utimesPromise(){throw C()}utimesSync(){throw C()}async readFilePromise(){throw C()}readFileSync(){throw C()}async readlinkPromise(){throw C()}readlinkSync(){throw C()}async truncatePromise(){throw C()}truncateSync(){throw C()}watch(){throw C()}watchFile(){throw C()}unwatchFile(){throw C()}}f.instance=new f;var I=r(39725),E=r(42096),B=r(17674),y=r(53660);function m(e){const t=s.cS.toPortablePath(n().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return s.y1.join(t,`${e}${r}`)}function w(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),A=new Set(["accessPromise","appendFilePromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),n=new Set(["appendFilePromise","chmodPromise","chownPromise","closePromise","readPromise","readFilePromise","statPromise","truncatePromise","utimesPromise","writePromise","writeFilePromise"]),i=(e,t,r)=>{const A=e[t];e[t]=r,void 0!==(null==A?void 0:A[o.promisify.custom])&&(r[o.promisify.custom]=A[o.promisify.custom])};i(e,"exists",(e,...r)=>{const A="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{A(e)},()=>{A(!1)})})}),i(e,"read",(e,r,...A)=>{const n="function"==typeof A[A.length-1]?A.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...A).then(e=>{n(null,e,r)},e=>{n(e)})})});for(const r of A){const A=r.replace(/Promise$/,"");if(void 0===e[A])continue;const n=t[r];if(void 0===n)continue;i(e,A,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{n.apply(t,e).then(e=>{r(null,e)},e=>{r(e)})})})}e.realpath.native=e.realpath,i(e,"existsSync",e=>{try{return t.existsSync(e)}catch(e){return!1}});for(const A of r){const r=A;if(void 0===e[r])continue;const n=t[A];void 0!==n&&i(e,r,n.bind(t))}e.realpathSync.native=e.realpathSync;{const r=process.emitWarning;let o;process.emitWarning=()=>{};try{o=e.promises}finally{process.emitWarning=r}if(void 0!==o){for(const e of A){const r=e.replace(/Promise$/,"");if(void 0===o[r])continue;const A=t[e];void 0!==A&&("open"!==e&&i(o,r,A.bind(t)))}class e{constructor(e){this.fd=e}}for(const r of n){const A=r.replace(/Promise$/,""),n=t[r];void 0!==n&&i(e.prototype,A,(function(...e){return n.call(t,this.fd,...e)}))}i(o,"open",async(...r)=>{const A=await t.openPromise(...r);return new e(A)})}}e.read[o.promisify.custom]=async(e,r,...A)=>{const n=t.readPromise(e,r,...A);return{bytesRead:await n,buffer:r}}}function Q(e,t){const r=Object.create(e);return w(r,t),r}const D=new Set;let b=!1;function v(){b||(b=!0,process.once("exit",()=>{S.rmtempSync()}))}const S=Object.assign(new i.S,{detachTemp(e){D.delete(e)},mktempSync(e){for(v();;){const t=m("xfs-");try{this.mkdirSync(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=this.realpathSync(t);if(D.add(r),void 0===e)return t;try{return e(r)}finally{if(D.has(r)){D.delete(r);try{this.removeSync(r)}catch(e){}}}}},async mktempPromise(e){for(v();;){const t=m("xfs-");try{await this.mkdirPromise(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=await this.realpathPromise(t);if(D.add(r),void 0===e)return r;try{return await e(r)}finally{if(D.has(r)){D.delete(r);try{await this.removePromise(r)}catch(e){}}}}},async rmtempPromise(){await Promise.all(Array.from(D.values()).map(async e=>{try{await S.removePromise(e,{maxRetries:0}),D.delete(e)}catch(e){}}))},rmtempSync(){for(const e of D)try{S.removeSync(e),D.delete(e)}catch(e){}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>i,QS:()=>s,cS:()=>a,y1:()=>c,CI:()=>f,Zu:()=>I});var A,n=r(85622),o=r.n(n);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(A||(A={}));const i={root:"/",dot:"."},s={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",pnpJs:".pnp.js",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>C(process.cwd()),c.resolve=(...e)=>e.length>0&&c.isAbsolute(e[0])?o().posix.resolve(...e):o().posix.resolve(c.cwd(),...e);const g=function(e,t,r){return(t=e.normalize(t))===(r=e.normalize(r))?".":(t.endsWith(e.sep)||(t+=e.sep),r.startsWith(t)?r.slice(t.length):null)};a.fromPortablePath=d,a.toPortablePath=C,a.contains=(e,t)=>g(a,e,t),c.contains=(e,t)=>g(c,e,t);const l=/^([a-zA-Z]:.*)$/,u=/^\\\\(\.\\)?(.*)$/,h=/^\/([a-zA-Z]:.*)$/,p=/^\/unc\/(\.dot\/)?(.*)$/;function d(e){if("win32"!==process.platform)return e;if(e.match(h))e=e.replace(h,"$1");else{if(!e.match(p))return e;e=e.replace(p,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function C(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(u)&&(e=e.replace(u,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function f(e,t){return e===a?d(t):C(t)}function I(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},65760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DirEntry:()=>n,StatEntry:()=>o,makeDefaultStats:()=>i,makeEmptyStats:()=>s,areStatsEqual:()=>a});var A=r(22004);class n{constructor(){this.name="",this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}class o{constructor(){this.dev=0,this.ino=0,this.mode=0,this.nlink=1,this.rdev=0,this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}function i(){return Object.assign(new o,{uid:0,gid:0,size:0,blksize:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date(0),mtime:new Date(0),ctime:new Date(0),birthtime:new Date(0),mode:420|A.Pe})}function s(){return Object.assign(i(),{nlink:0,blocks:0,mode:0})}function a(e,t){return e.atimeMs===t.atimeMs&&(e.birthtimeMs===t.birthtimeMs&&(e.blksize===t.blksize&&(e.blocks===t.blocks&&(e.ctimeMs===t.ctimeMs&&(e.dev===t.dev&&(e.gid===t.gid&&(e.ino===t.ino&&(e.isBlockDevice()===t.isBlockDevice()&&(e.isCharacterDevice()===t.isCharacterDevice()&&(e.isDirectory()===t.isDirectory()&&(e.isFIFO()===t.isFIFO()&&(e.isFile()===t.isFile()&&(e.isSocket()===t.isSocket()&&(e.isSymbolicLink()===t.isSymbolicLink()&&(e.mode===t.mode&&(e.mtimeMs===t.mtimeMs&&(e.nlink===t.nlink&&(e.rdev===t.rdev&&(e.size===t.size&&e.uid===t.uid)))))))))))))))))))}},65281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipPromise:()=>s,getLibzipSync:()=>i});const A=["number","number"];var n;!function(e){e[e.ZIP_ER_OK=0]="ZIP_ER_OK",e[e.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",e[e.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",e[e.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",e[e.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",e[e.ZIP_ER_READ=5]="ZIP_ER_READ",e[e.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",e[e.ZIP_ER_CRC=7]="ZIP_ER_CRC",e[e.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",e[e.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",e[e.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",e[e.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",e[e.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",e[e.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",e[e.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",e[e.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",e[e.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",e[e.ZIP_ER_EOF=17]="ZIP_ER_EOF",e[e.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",e[e.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",e[e.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",e[e.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",e[e.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",e[e.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",e[e.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",e[e.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",e[e.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",e[e.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",e[e.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",e[e.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",e[e.ZIP_ER_TELL=30]="ZIP_ER_TELL",e[e.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"}(n||(n={}));let o=null;function i(){var e;return null===o&&(e=r(3368),o={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},errors:n,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint16S:e._malloc(2),uint32S:e._malloc(4),uint64S:e._malloc(8),malloc:e._malloc,free:e._free,getValue:e.getValue,open:e.cwrap("zip_open","number",["string","number","number"]),openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),delete:e.cwrap("zip_delete","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...A,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...A,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...A,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...A,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...A,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...A,"number","number"])},ext:{countSymlinks:e.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...A,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...A,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"]),setMtime:e.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:e.cwrap("zipstruct_stat","number",[]),statS:e.cwrap("zipstruct_statS","number",[]),statName:e.cwrap("zipstruct_stat_name","string",["number"]),statIndex:e.cwrap("zipstruct_stat_index","number",["number"]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:e.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:e.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[]),errorCodeZip:e.cwrap("zipstruct_error_code_zip","number",["number"])}}),o}async function s(){return i()}},11640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseResolution:()=>i,parseShell:()=>n,parseSyml:()=>I,stringifyResolution:()=>s,stringifySyml:()=>d});var A=r(92962);function n(e,t={isGlobPattern:()=>!1}){try{return(0,A.parse)(e,t)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}var o=r(98261);function i(e){const t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,o.parse)(e)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function s(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+="@"+e.from.description),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+="@"+e.descriptor.description),t}var a=r(21194),c=r(85443);const g=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class u{constructor(e){this.data=e}}function h(e){return e.match(g)?e:JSON.stringify(e)}function p(e,t,r){if(null===e)return"null\n";if("number"==typeof e||"boolean"==typeof e)return e.toString()+"\n";if("string"==typeof e)return h(e)+"\n";if(Array.isArray(e)){if(0===e.length)return"[]\n";const r=" ".repeat(t);return"\n"+e.map(e=>`${r}- ${p(e,t+1,!1)}`).join("")}if("object"==typeof e&&e){let A,n;e instanceof u?(A=e.data,n=!1):(A=e,n=!0);const o=" ".repeat(t),i=Object.keys(A);n&&i.sort((e,t)=>{const r=l.indexOf(e),A=l.indexOf(t);return-1===r&&-1===A?et?1:0:-1!==r&&-1===A?-1:-1===r&&-1!==A?1:r-A});const s=i.filter(e=>!function e(t){return void 0===t||"object"==typeof t&&null!==t&&Object.keys(t).every(r=>e(t[r]))}(A[e])).map((e,n)=>{const i=A[e],s=h(e),a=p(i,t+1,!0),c=n>0||r?o:"";return a.startsWith("\n")?`${c}${s}:${a}`:`${c}${s}: ${a}`}).join(0===t?"\n":"")||"\n";return r?"\n"+s:""+s}throw new Error(`Unsupported value type (${e})`)}function d(e){try{const t=p(e,0,!1);return"\n"!==t?t:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}d.PreserveOrdering=u;const C=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function f(e){if(C.test(e))return function(e){return e.endsWith("\n")||(e+="\n"),(0,c.parse)(e)}(e);const t=(0,a.safeLoad)(e,{schema:a.FAILSAFE_SCHEMA});if(null==t)return{};if("object"!=typeof t)throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function I(e){return f(e)}},34432:(e,t,r)=>{"use strict";var A,n;r.d(t,{gY:()=>E,Q$:()=>B,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.DEFAULT="DEFAULT",e.TOP_LEVEL="TOP_LEVEL",e.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",e.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",e.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",e.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",e.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",e.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",e.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",e.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",e.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",e.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"}(n||(n={}));const o={[n.DEFAULT]:{collapsed:!1,next:{"*":n.DEFAULT}},[n.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:n.FALLBACK_EXCLUSION_LIST,packageRegistryData:n.PACKAGE_REGISTRY_DATA,"*":n.DEFAULT}},[n.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":n.FALLBACK_EXCLUSION_ENTRIES}},[n.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":n.FALLBACK_EXCLUSION_DATA}},[n.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":n.DEFAULT}},[n.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_REGISTRY_ENTRIES}},[n.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_STORE_DATA}},[n.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_STORE_ENTRIES}},[n.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_INFORMATION_DATA}},[n.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:n.PACKAGE_DEPENDENCIES,"*":n.DEFAULT}},[n.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":n.PACKAGE_DEPENDENCY}},[n.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":n.DEFAULT}}};function i(e,t,r,A){const{next:n}=o[r];return s(t,n[e]||n["*"],A)}function s(e,t,r){const{collapsed:A}=o[t];return Array.isArray(e)?A?function(e,t,r){let A="";A+="[";for(let n=0,o=e.length;ne(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function g(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:A}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(A)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function u(e){const t=[];for(const[r,A]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:n,packageDependencies:o,packagePeers:i,linkType:s,discardFromLookup:a}]of c(A,([e])=>null===e?"0":"1"+e)){const A=[];null===r||null===t||o.has(r)||A.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))A.push([e,t]);const g=i&&i.size>0?Array.from(i):void 0,l=a||void 0;e.push([t,{packageLocation:n,packageDependencies:A,packagePeers:g,linkType:s,discardFromLookup:l}])}}return t}function h(e){return c(e.blacklistedLocations||[],e=>e)}function p(e){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:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:g(e),fallbackPool:l(e),locationBlacklistData:h(e),packageRegistryData:u(e)}}var d=r(20103),C=r.n(d);function f(e,t){return[e?e+"\n":"","/* eslint-disable */\n\n","try {\n"," Object.freeze({}).detectStrictMode = true;\n","} catch (error) {\n"," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n","}\n","\n","var __non_webpack_module__ = module;\n","\n","function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n",t.replace(/^/gm," "),"}\n","\n",C()()].join("")}function I(e){return JSON.stringify(e,null,2)}function E(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(p(e));return f(e.shebang,t)}function B(e){const t=p(e),r=(A=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(A)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var A;const n=f(e.shebang,r);return{dataFile:I(t),loaderFile:n}}var y=r(35747),m=(r(85622),r(31669)),w=r(46009);var Q,D=r(17674),b=r(32282);!function(e){e.API_ERROR="API_ERROR",e.BLACKLISTED="BLACKLISTED",e.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",e.MISSING_DEPENDENCY="MISSING_DEPENDENCY",e.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",e.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",e.INTERNAL="INTERNAL",e.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",e.UNSUPPORTED="UNSUPPORTED"}(Q||(Q={}));const v=new Set([Q.BLACKLISTED,Q.BUILTIN_NODE_RESOLUTION_FAILED,Q.MISSING_DEPENDENCY,Q.MISSING_PEER_DEPENDENCY,Q.QUALIFIED_PATH_RESOLUTION_FAILED,Q.UNDECLARED_DEPENDENCY]);function S(e,t,r={}){const A=v.has(e)?"MODULE_NOT_FOUND":e,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...n,value:A},pnpCode:{...n,value:e},data:{...n,value:r}})}function k(e){return w.cS.normalize(w.cS.fromPortablePath(e))}function N(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,A=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,i=/^(\/|\.{1,2}(\/|$))/,s=/\/$/,a={name:null,reference:null},c=[],g=new Set;if(!0===e.enableTopLevelFallback&&c.push(a),!1!==t.compatibilityMode)for(const t of["react-scripts","gatsby"]){const r=e.packageRegistry.get(t);if(r)for(const e of r.keys()){if(null===e)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:t,reference:e})}}const{ignorePattern:l,packageRegistry:u,packageLocatorsByLocations:h,packageLocationLengths:p}=e;function d(e,t){return{fn:e,args:t,error:null,result:null}}function C(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(A)){if(A>=2)return(...t)=>{const A=d(e,t);try{return A.result=r(...t)}catch(e){throw A.error=e}finally{console.trace(A)}};if(A>=1)return(...t)=>{try{return r(...t)}catch(r){const A=d(e,t);throw A.error=r,console.trace(A),r}}}return r}function f(e){const t=y(e);if(!t)throw S(Q.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function I(t){if(null===t.name)return!0;for(const r of e.dependencyTreeRoots)if(r.name===t.name&&r.reference===t.reference)return!0;return!1}function E(e,t){return t.endsWith("/")&&(t=w.y1.join(t,"internal.js")),b.Module._resolveFilename(w.cS.fromPortablePath(e),function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(w.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function B(t){if(null===l)return!1;const r=w.y1.contains(e.basePath,t);return null!==r&&!!l.test(r.replace(/\/$/,""))}function y({name:e,reference:t}){const r=u.get(e);if(!r)return null;const A=r.get(t);return A||null}function m(e,t){const r=new Map,A=new Set,n=t=>{const o=JSON.stringify(t.name);if(A.has(o))return;A.add(o);const i=function({name:e,reference:t}){const r=[];for(const[A,n]of u)if(null!==A)for(const[o,i]of n){if(null===o)continue;i.packageDependencies.get(e)===t&&(A===e&&o===t||r.push({name:A,reference:o}))}return r}(t);for(const t of i){if(f(t).packagePeers.has(e))n(t);else{let e=r.get(t.name);void 0===e&&r.set(t.name,e=new Set),e.add(t.reference)}}};n(t);const o=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())o.push({name:e,reference:t});return o}function v(t){if(B(t))return null;let r=(A=w.y1.relative(e.basePath,t),w.cS.toPortablePath(A));var A;r.match(i)||(r="./"+r),t.match(s)&&!r.endsWith("/")&&(r+="/");let n=0;for(;nr.length;)n+=1;for(let e=n;eI(e))?S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e}):S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e})}else void 0===d&&(B=!a&&n.has(A)?I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in ${s.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}):I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}));if(null==d){if(null===C||null===B)throw B||new Error("Assertion failed: Expected an error to have been set");d=C;const e=B.message.replace(/\n.*/g,"");B.message=e,g.has(e)||(g.add(e),process.emitWarning(B))}const y=Array.isArray(d)?{name:d[0],reference:d[1]}:{name:t,reference:d},D=f(y);if(!D.packageLocation)throw S(Q.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${y.name}@${y.reference} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,dependencyLocator:Object.assign({},y)});const b=D.packageLocation;h=o?w.y1.join(b,o):b}else{if(w.y1.isAbsolute(A))h=w.y1.normalize(A);else{if(!i)throw S(Q.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:l,issuer:u});const e=w.y1.resolve(i);h=i.match(s)?w.y1.normalize(w.y1.join(e,A)):w.y1.normalize(w.y1.join(w.y1.dirname(e),A))}v(h)}return w.y1.normalize(h)}function F(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const A=[],n=function e(r,A,{extensions:n}){let o;try{A.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,i;try{o=JSON.parse(t.fakeFs.readFileSync(w.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(i=w.y1.resolve(r,o.main)),i&&i!==r){const t=e(i,A,{extensions:n});if(null!==t)return t}}for(let e=0,o=n.length;e`Rejected candidate: ${k(e)}\n`).join("")}`,{unqualifiedPath:t})}}return{VERSIONS:{std:3,resolveVirtual:1,getAllLocators:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){const e=[];for(const[t,r]of u)for(const A of r.keys())null!==t&&null!==A&&e.push({name:t,reference:A});return e},getPackageInformation:e=>{const t=y(e);if(null===t)return null;const r=w.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>v(w.cS.toPortablePath(e)),resolveToUnqualified:C("resolveToUnqualified",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=N(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveUnqualified:C("resolveUnqualified",(e,t)=>w.cS.fromPortablePath(F(w.cS.toPortablePath(e),t))),resolveRequest:C("resolveRequest",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=function(e,t,{considerBuiltins:r,extensions:A}={}){const n=N(e,t,{considerBuiltins:r});if(null===n)return null;try{return F(n,{extensions:A})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:k(e),issuer:t&&k(t)}),r}}(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveVirtual:C("resolveVirtual",e=>{const t=function(e){const t=w.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(w.cS.toPortablePath(e));return null!==t?w.cS.fromPortablePath(t):null})}}(0,m.promisify)(y.readFile);const F=(e,t,r)=>N(function(e,{basePath:t}){const r=w.cS.toPortablePath(t),A=w.y1.resolve(r),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,o=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:w.y1.join(A,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),i=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,A]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(A.discardFromLookup)continue;const r={name:t,reference:e};i.set(A.packageLocation,r),s.add(A.packageLocation.length)}for(const t of e.locationBlacklistData)i.set(t,null);const a=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),c=new Map(e.fallbackPool);return{basePath:r,dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback,fallbackExclusionList:a,fallbackPool:c,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:i,packageRegistry:o}}(p(e),{basePath:t}),{fakeFs:r,pnpapiResolution:w.cS.join(t,".pnp.js")})},76756:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShellError:()=>c,execute:()=>Z,globUtils:()=>A});var A={};r.r(A),r.d(A,{fastGlobOptions:()=>E,isBraceExpansion:()=>m,isGlobPattern:()=>B,match:()=>y,micromatchOptions:()=>I});var n=r(46009),o=r(78420),i=r(11640),s=r(12087),a=r(92413);class c extends Error{constructor(e){super(e),this.name="ShellError"}}var g=r(43896),l=r(39725),u=r(19347),h=r.n(u),p=r(35747),d=r.n(p),C=r(2401),f=r.n(C);const I={strictBrackets:!0},E={onlyDirectories:!1,onlyFiles:!1};function B(e){if(!f().scan(e,I).isGlob)return!1;try{f().parse(e,I)}catch(e){return!1}return!0}function y(e,{cwd:t,baseFs:r}){return h()(e,{...E,cwd:n.cS.fromPortablePath(t),fs:(0,g.extendFs)(d(),new l.i(r))})}function m(e){return f().scan(e,I).isBrace}var w,Q=r(67566),D=r.n(Q);function b(){}!function(e){e[e.STDIN=0]="STDIN",e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(w||(w={}));let v=0;class S{constructor(e){this.stream=e}close(){}get(){return this.stream}}class k{constructor(){this.stream=null}close(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");return this.stream}}class N{constructor(e,t){this.stdin=null,this.stdout=null,this.stderr=null,this.pipe=null,this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:r,stderr:A}){const n=new N(null,e);return n.stdin=t,n.stdout=r,n.stderr=A,n}pipeTo(e,t=w.STDOUT){const r=new N(this,e),A=new k;return r.pipe=A,r.stdout=this.stdout,r.stderr=this.stderr,(t&w.STDOUT)===w.STDOUT?this.stdout=A:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&w.STDERR)===w.STDERR?this.stderr=A:null!==this.ancestor&&(this.stderr=this.ancestor.stderr),r}async exec(){const e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(null===this.stdin)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t,r;if(null===this.stdout)throw new Error("Assertion failed: No output stream registered");if(t=this.stdout,e[1]=t.get(),null===this.stderr)throw new Error("Assertion failed: No error stream registered");r=this.stderr,e[2]=r.get();const A=this.implementation(e);return this.pipe&&this.pipe.attach(A.stdin),await A.promise.then(e=>(t.close(),r.close(),e))}async run(){const e=[];for(let t=this;t;t=t.ancestor)e.push(t.exec());return(await Promise.all(e))[0]}}function F(e,t){return N.start(e,t)}var K;function M(e,t,r){const A=new a.PassThrough({autoDestroy:!0});switch(e){case w.STDIN:(t&K.Readable)===K.Readable&&r.stdin.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&r.stdin instanceof a.Writable&&A.pipe(r.stdin,{end:!1});break;case w.STDOUT:(t&K.Readable)===K.Readable&&r.stdout.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stdout,{end:!1});break;case w.STDERR:(t&K.Readable)===K.Readable&&r.stderr.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stderr,{end:!1});break;default:throw new c(`Bad file descriptor: "${e}"`)}return A}function R(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}!function(e){e[e.Readable=1]="Readable",e[e.Writable=2]="Writable"}(K||(K={}));const x=new Map([["cd",async([e=(0,s.homedir)(),...t],r,A)=>{const o=n.y1.resolve(A.cwd,n.cS.toPortablePath(e));return(await r.baseFs.statPromise(o)).isDirectory()?(A.cwd=o,0):(A.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(n.cS.fromPortablePath(r.cwd)+"\n"),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,A)=>A.exitCode=parseInt(null!=e?e:A.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const A=r.procedures[e[0]];return await F(A,{stdin:new S(r.stdin),stdout:new S(r.stdout),stderr:new S(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let A=r.stdin,o=r.stdout;const i=r.stderr,s=[],c=[];let g=0;for(;"--"!==e[g];){const A=e[g++],o=Number(e[g++]),i=g+o;for(let o=g;ot.baseFs.createReadStream(n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]))));break;case"<<<":s.push(()=>{const t=new a.PassThrough;return process.nextTick(()=>{t.write(e[o]+"\n"),t.end()}),t});break;case"<&":s.push(()=>M(Number(e[o]),K.Readable,r));break;case">":case">>":{const i=n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]));"/dev/null"===i?c.push(new a.Writable({autoDestroy:!0,emitClose:!0,write(e,t,r){setImmediate(r)}})):c.push(t.baseFs.createWriteStream(i,">>"===A?{flags:"a"}:void 0))}break;case">&":c.push(M(Number(e[o]),K.Writable,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${A}"`)}}if(s.length>0){const e=new a.PassThrough;A=e;const t=r=>{if(r===s.length)e.end();else{const A=s[r]();A.pipe(e,{end:!1}),A.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new a.PassThrough;o=e;for(const t of c)e.pipe(t)}const l=await F(G(e.slice(g+1),t,r),{stdin:new S(A),stdout:new S(o),stderr:new S(i)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),l}]]);async function L(e,t,r){const A=[],n=new a.PassThrough;return n.on("data",e=>A.push(e)),await W(e,t,R(r,{stdout:n})),Buffer.concat(A).toString().replace(/[\r\n]+$/,"")}async function P(e,t,r){const A=e.map(async e=>{const A=await Y(e.args,t,r);return{name:e.name,value:A.join(" ")}});return(await Promise.all(A)).reduce((e,t)=>(e[t.name]=t.value,e),{})}function O(e){return e.match(/[^ \r\n\t]+/g)||[]}async function U(e,t,r,A,n=A){switch(e.name){case"$":A(String(process.pid));break;case"#":A(String(t.args.length));break;case"@":if(e.quoted)for(const e of t.args)n(e);else for(const e of t.args){const t=O(e);for(let e=0;e=0&&ne+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)};async function j(e,t,r){if("number"===e.type){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}if("variable"===e.type){const A=[];await U({...e,quoted:!0},t,r,e=>A.push(e));const n=Number(A.join(" "));return Number.isNaN(n)?j({type:"variable",name:A.join(" ")},t,r):j({type:"number",value:n},t,r)}return T[e.type](await j(e.left,t,r),await j(e.right,t,r))}async function Y(e,t,r){const A=new Map,n=[];let o=[];const i=e=>{o.push(e)},s=()=>{o.length>0&&n.push(o.join("")),o=[]},a=e=>{i(e),s()},g=(e,t)=>{let r=A.get(e);void 0===r&&A.set(e,r=[]),r.push(t)};for(const A of e){let e=!1;switch(A.type){case"redirection":{const e=await Y(A.args,t,r);for(const t of e)g(A.subtype,t)}break;case"argument":for(const n of A.segments)switch(n.type){case"text":i(n.text);break;case"glob":i(n.pattern),e=!0;break;case"shell":{const e=await L(n.shell,t,r);if(n.quoted)i(e);else{const t=O(e);for(let e=0;e0){const e=[];for(const[t,r]of A.entries())e.splice(e.length,0,t,String(r.length),...r);n.splice(0,0,"__ysh_set_redirects",...e,"--")}return n}function G(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const A=n.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:A});const[i,...s]=e;if("command"===i)return function(e,t,r,A){return r=>{const n=r[0]instanceof a.Transform?"pipe":r[0],o=r[1]instanceof a.Transform?"pipe":r[1],i=r[2]instanceof a.Transform?"pipe":r[2],s=D()(e,t,{...A,stdio:[n,o,i]});return 0==v++&&process.on("SIGINT",b),r[0]instanceof a.Transform&&r[0].pipe(s.stdin),r[1]instanceof a.Transform&&s.stdout.pipe(r[1],{end:!1}),r[2]instanceof a.Transform&&s.stderr.pipe(r[2],{end:!1}),{stdin:s.stdin,promise:new Promise(t=>{s.on("error",A=>{switch(0==--v&&process.off("SIGINT",b),A.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCES":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${A.message}\n`),t(1)}}),s.on("exit",e=>{0==--v&&process.off("SIGINT",b),t(null!==e?e:129)})})}}}(s[0],s.slice(1),0,{cwd:A,env:o});const c=t.builtins.get(i);if(void 0===c)throw new Error(`Assertion failed: A builtin should exist for "${i}"`);return function(e){return t=>{const r="pipe"===t[0]?new a.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:A,stderr:n})=>(r.stdin=e,r.stdout=A,r.stderr=n,await c(s,t,r)))}function H(e,t,r){return A=>{const n=new a.PassThrough;return{stdin:n,promise:W(e,t,R(r,{stdin:n}))}}}function J(e,t,r){return A=>({stdin:new a.PassThrough,promise:W(e,t,r)})}function q(e,t,r,A){if(0===t.length)return e;{let n;do{n=String(Math.random())}while(Object.prototype.hasOwnProperty.call(A.procedures,n));return A.procedures={...A.procedures},A.procedures[n]=e,G([...t,"__ysh_run_procedure",n],r,A)}}async function z(e,t,r){let A;const n=e=>{A=e,r.variables["?"]=String(e)},o=async e=>{try{return await async function(e,t,r){let A=e,n=null,o=null;for(;A;){const e=A.then?{...r}:r;let i;switch(A.type){case"command":{const n=await Y(A.args,t,r),o=await P(A.envs,t,r);i=A.envs.length?G(n,t,R(e,{environment:o})):G(n,t,e)}break;case"subshell":{const n=await Y(A.args,t,r);i=q(H(A.subshell,t,e),n,t,e)}break;case"group":{const n=await Y(A.args,t,r);i=q(J(A.group,t,e),n,t,e)}break;case"envs":{const n=await P(A.envs,t,r);e.environment={...e.environment,...n},i=G(["true"],t,e)}}if(void 0===i)throw new Error("Assertion failed: An action should have been generated");if(null===n)o=F(i,{stdin:new S(e.stdin),stdout:new S(e.stdout),stderr:new S(e.stderr)});else{if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":o=o.pipeTo(i,w.STDOUT);break;case"|&":o=o.pipeTo(i,w.STDOUT|w.STDERR)}}A.then?(n=A.then.type,A=A.then.chain):A=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}(e,t,r)}catch(e){if(!(e instanceof c))throw e;return r.stderr.write(e.message+"\n"),1}};for(n(await o(e.chain));e.then;){if(null!==r.exitCode)return r.exitCode;switch(e.then.type){case"&&":0===A&&n(await o(e.then.line.chain));break;case"||":0!==A&&n(await o(e.then.line.chain));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return A}async function W(e,t,r){let A=0;for(const n of e){if(A=await z(n,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(A)}return A}function X(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(e=>V(e));case"arithmetic":return function e(t){switch(t.type){case"variable":return X(t);case"number":return!1;default:return e(t.left)||e(t.right)}}(e.arithmetic);case"shell":return _(e.shell);default:return!1}}function V(e){switch(e.type){case"redirection":return e.args.some(e=>V(e));case"argument":return e.segments.some(e=>X(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function _(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=_(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>V(e)))||t.args.some(e=>V(e))}if(e)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Z(e,t=[],{baseFs:r=new o.S,builtins:s={},cwd:c=n.cS.toPortablePath(process.cwd()),env:g=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:h=process.stderr,variables:p={},glob:d=A}={}){const C={};for(const[e,t]of Object.entries(g))void 0!==t&&(C[e]=t);const f=new Map(x);for(const[e,t]of Object.entries(s))f.set(e,t);null===l&&(l=new a.PassThrough).end();const I=(0,i.parseShell)(e,d);if(!_(I)&&I.length>0&&t.length>0){let e=I[I.length-1];for(;e.then;)e=e.then.line;let r=e.chain;for(;r.then;)r=r.then.chain;"command"===r.type&&(r.args=r.args.concat(t.map(e=>({type:"argument",segments:[{type:"text",text:e}]}))))}return await W(I,{args:t,baseFs:r,builtins:f,initialStdin:l,initialStdout:u,initialStderr:h,glob:d},{cwd:c,environment:C,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:h,variables:Object.assign({},p,{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([["@yarnpkg/cli",r(25413)],["@yarnpkg/core",r(53836)],["@yarnpkg/fslib",r(43896)],["@yarnpkg/libzip",r(65281)],["@yarnpkg/parsers",r(11640)],["@yarnpkg/shell",r(76756)],["clipanion",r(40822)],["semver",r(53887)],["yup",r(15966)],["@yarnpkg/plugin-essentials",r(34777)],["@yarnpkg/plugin-compat",r(44692)],["@yarnpkg/plugin-dlx",r(10189)],["@yarnpkg/plugin-file",r(68023)],["@yarnpkg/plugin-git",r(75641)],["@yarnpkg/plugin-github",r(68126)],["@yarnpkg/plugin-http",r(99148)],["@yarnpkg/plugin-init",r(64314)],["@yarnpkg/plugin-link",r(92994)],["@yarnpkg/plugin-node-modules",r(8375)],["@yarnpkg/plugin-npm",r(14224)],["@yarnpkg/plugin-npm-cli",r(8190)],["@yarnpkg/plugin-pack",r(49881)],["@yarnpkg/plugin-patch",r(29936)],["@yarnpkg/plugin-pnp",r(83228)]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-node-modules","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"])})},29148:(e,t,r)=>{const A=r(74988),n=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,o=new A;e.exports=(e,t=0,r=e.length)=>{if(t<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");const A=r-t;let i="",s=0,a=0;for(;e.length>0;){const r=e.match(n)||[e,e,void 0];let c=o.splitGraphemes(r[1]);const g=Math.min(t-s,c.length);c=c.slice(g);const l=Math.min(A-a,c.length);i+=c.slice(0,l).join(""),s+=g,a+=l,void 0!==r[2]&&(i+=r[2]),e=e.slice(r[0].length)}return i}},72912:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},19228:(e,t,r)=>{var A=r(54694);function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==A(e)&&"function"!=typeof e)return{default:e};var t=n();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}},74943:e=>{e.exports=function(e,t){if(null==e)return{};var r,A,n={},o=Object.keys(e);for(A=0;A=0||(n[r]=e[r]);return n}},62407:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},54694:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync,readdir:A.readdir,readdirSync:A.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},79774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=process.versions.node.split("."),A=parseInt(r[0],10),n=parseInt(r[1],10),o=A>10,i=10===A&&n>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||i},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(31020),n=r(35516),o=r(38844);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.scandir=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.scandirSync=function(e,t){const r=i(t);return n.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(69078),o=r(79774),i=r(65225);function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(A,o)=>{if(null!==A)return c(r,A);const s=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return g(r,s);const a=s.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(A,n)=>null!==A?t.throwErrorOnBrokenSymbolicLink?r(A):r(null,e):(e.dirent=i.fs.createDirentFromStats(e.name,n),r(null,e)))}}(e,t));n(a,(e,t)=>{if(null!==e)return c(r,e);g(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,s)=>{if(null!==o)return c(r,o);const a=s.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>A.stat(e,t.fsStatSettings,r));n(l,(e,A)=>{if(null!==e)return c(r,e);const n=[];s.forEach((e,r)=>{const o=A[r],s={name:e,path:a[r],dirent:i.fs.createDirentFromStats(e,o)};t.stats&&(s.stats=o),n.push(s)}),g(r,n)})})}function c(e,t){e(t)}function g(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):a(e,t,r)},t.readdirWithFileTypes=s,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(79774),o=r(65225);function i(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const A={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(A.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(A.path);A.dirent=o.fs.createDirentFromStats(A.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return A})}function s(e,t){return t.fs.readdirSync(e).map(r=>{const n=`${e}${t.pathSegmentSeparator}${r}`,i=A.statSync(n,t.fsStatSettings),s={name:r,path:n,dirent:o.fs.createDirentFromStats(r,i)};return t.stats&&(s.stats=i),s})}t.read=function(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t):s(e,t)},t.readdirWithFileTypes=i,t.readdir=s},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(53403),o=r(96117);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=o.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},72156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},65225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(72156);t.fs=A},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},53403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(17790),n=r(34846),o=r(92687);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.stat=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.statSync=function(e,t){const r=i(t);return n.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function A(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,n){t.fs.lstat(e,(o,i)=>null!==o?r(n,o):i.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(n,e):A(n,i);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),A(n,o)}):A(n,i))}},34846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}},92687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=A.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return void 0===e?t:e}}},72897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(42369),n=r(27696),o=r(22111),i=r(14954);function s(e={}){return e instanceof i.default?e:new i.default(e)}t.Settings=i.default,t.walk=function(e,t,r){if("function"==typeof t)return new A.default(e,s()).read(t);new A.default(e,s(t)).read(r)},t.walkSync=function(e,t){const r=s(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=s(t);return new n.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.add(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,[...this._storage])}),this._reader.read()}}},27696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings),this._stream=new A.Readable({objectMode:!0,read:()=>{},destroy:this._reader.destroy.bind(this._reader)})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}},22111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(28614),n=r(85670),o=r(98360),i=r(10750),s=r(75504);class a extends s.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=n.scandir,this._emitter=new A.EventEmitter,this._queue=o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,A)=>{if(null!==r)return t(r,void 0);for(const t of A)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){i.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}t.default=a},10750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},t.isAppliedFilter=function(e,t){return null===e||e(t)},t.replacePathSegmentSeparator=function(e,t){return e.split(/[\\/]/).join(t)},t.joinPathSegments=function(e,t,r){return""===e?t:e+r+t}},75504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=A.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85670),n=r(10750),o=r(75504);class i extends o.default{constructor(){super(...arguments),this._scandir=A.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=i},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(85670);t.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},7966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const A=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement",...r];const n=["null","undefined","string","number","bigint","boolean","symbol"];function o(e){return t=>typeof t===e}const{toString:i}=Object.prototype,s=e=>{const t=i.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&c.domElement(e)?"HTMLElement":(r=t,A.includes(r)?t:void 0);var r},a=e=>t=>s(t)===e;function c(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(e))return"Observable";if(c.array(e))return"Array";if(c.buffer(e))return"Buffer";const t=s(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=o("undefined"),c.string=o("string");const g=o("number");c.number=e=>g(e)&&!c.nan(e),c.bigint=o("bigint"),c.function_=o("function"),c.null_=e=>null===e,c.class_=e=>c.function_(e)&&e.toString().startsWith("class "),c.boolean=e=>!0===e||!1===e,c.symbol=o("symbol"),c.numericString=e=>c.string(e)&&!c.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),c.array=(e,t)=>!!Array.isArray(e)&&(!c.function_(t)||e.every(t)),c.buffer=e=>{var t,r,A,n;return null!==(n=null===(A=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===A?void 0:A.call(r,e))&&void 0!==n&&n},c.nullOrUndefined=e=>c.null_(e)||c.undefined(e),c.object=e=>!c.null_(e)&&("object"==typeof e||c.function_(e)),c.iterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},c.asyncIterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},c.generator=e=>c.iterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.asyncGenerator=e=>c.asyncIterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.nativePromise=e=>a("Promise")(e);c.promise=e=>c.nativePromise(e)||(e=>{var t,r;return c.function_(null===(t=e)||void 0===t?void 0:t.then)&&c.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),c.generatorFunction=a("GeneratorFunction"),c.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===s(e),c.asyncFunction=e=>"AsyncFunction"===s(e),c.boundFunction=e=>c.function_(e)&&!e.hasOwnProperty("prototype"),c.regExp=a("RegExp"),c.date=a("Date"),c.error=a("Error"),c.map=e=>a("Map")(e),c.set=e=>a("Set")(e),c.weakMap=e=>a("WeakMap")(e),c.weakSet=e=>a("WeakSet")(e),c.int8Array=a("Int8Array"),c.uint8Array=a("Uint8Array"),c.uint8ClampedArray=a("Uint8ClampedArray"),c.int16Array=a("Int16Array"),c.uint16Array=a("Uint16Array"),c.int32Array=a("Int32Array"),c.uint32Array=a("Uint32Array"),c.float32Array=a("Float32Array"),c.float64Array=a("Float64Array"),c.bigInt64Array=a("BigInt64Array"),c.bigUint64Array=a("BigUint64Array"),c.arrayBuffer=a("ArrayBuffer"),c.sharedArrayBuffer=a("SharedArrayBuffer"),c.dataView=a("DataView"),c.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,c.urlInstance=e=>a("URL")(e),c.urlString=e=>{if(!c.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},c.truthy=e=>Boolean(e),c.falsy=e=>!e,c.nan=e=>Number.isNaN(e),c.primitive=e=>{return c.null_(e)||(t=typeof e,n.includes(t));var t},c.integer=e=>Number.isInteger(e),c.safeInteger=e=>Number.isSafeInteger(e),c.plainObject=e=>{if("[object Object]"!==i.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},c.typedArray=e=>{return t=s(e),r.includes(t);var t};c.arrayLike=e=>!c.nullOrUndefined(e)&&!c.function_(e)&&(e=>c.safeInteger(e)&&e>=0)(e.length),c.inRange=(e,t)=>{if(c.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(c.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const l=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=e=>c.object(e)&&1===e.nodeType&&c.string(e.nodeName)&&!c.plainObject(e)&&l.every(t=>t in e),c.observable=e=>{var t,r,A,n;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(n=(A=e)["@@observable"])||void 0===n?void 0:n.call(A)))},c.nodeStream=e=>c.object(e)&&c.function_(e.pipe)&&!c.observable(e),c.infinite=e=>e===1/0||e===-1/0;const u=e=>t=>c.integer(t)&&Math.abs(t%2)===e;c.evenInteger=u(0),c.oddInteger=u(1),c.emptyArray=e=>c.array(e)&&0===e.length,c.nonEmptyArray=e=>c.array(e)&&e.length>0,c.emptyString=e=>c.string(e)&&0===e.length,c.nonEmptyString=e=>c.string(e)&&e.length>0;c.emptyStringOrWhitespace=e=>c.emptyString(e)||(e=>c.string(e)&&!/\S/.test(e))(e),c.emptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&0===Object.keys(e).length,c.nonEmptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&Object.keys(e).length>0,c.emptySet=e=>c.set(e)&&0===e.size,c.nonEmptySet=e=>c.set(e)&&e.size>0,c.emptyMap=e=>c.map(e)&&0===e.size,c.nonEmptyMap=e=>c.map(e)&&e.size>0;const h=(e,t,r)=>{if(!c.function_(t))throw new TypeError("Invalid predicate: "+JSON.stringify(t));if(0===r.length)throw new TypeError("Invalid number of values");return e.call(r,t)};c.any=(e,...t)=>(c.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),c.all=(e,...t)=>h(Array.prototype.every,e,t);const p=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${c(r)}\`.`)};t.assert={undefined:e=>p(c.undefined(e),"undefined",e),string:e=>p(c.string(e),"string",e),number:e=>p(c.number(e),"number",e),bigint:e=>p(c.bigint(e),"bigint",e),function_:e=>p(c.function_(e),"Function",e),null_:e=>p(c.null_(e),"null",e),class_:e=>p(c.class_(e),"Class",e),boolean:e=>p(c.boolean(e),"boolean",e),symbol:e=>p(c.symbol(e),"symbol",e),numericString:e=>p(c.numericString(e),"string with a number",e),array:(e,t)=>{p(c.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>p(c.buffer(e),"Buffer",e),nullOrUndefined:e=>p(c.nullOrUndefined(e),"null or undefined",e),object:e=>p(c.object(e),"Object",e),iterable:e=>p(c.iterable(e),"Iterable",e),asyncIterable:e=>p(c.asyncIterable(e),"AsyncIterable",e),generator:e=>p(c.generator(e),"Generator",e),asyncGenerator:e=>p(c.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>p(c.nativePromise(e),"native Promise",e),promise:e=>p(c.promise(e),"Promise",e),generatorFunction:e=>p(c.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>p(c.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>p(c.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>p(c.boundFunction(e),"Function",e),regExp:e=>p(c.regExp(e),"RegExp",e),date:e=>p(c.date(e),"Date",e),error:e=>p(c.error(e),"Error",e),map:e=>p(c.map(e),"Map",e),set:e=>p(c.set(e),"Set",e),weakMap:e=>p(c.weakMap(e),"WeakMap",e),weakSet:e=>p(c.weakSet(e),"WeakSet",e),int8Array:e=>p(c.int8Array(e),"Int8Array",e),uint8Array:e=>p(c.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>p(c.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>p(c.int16Array(e),"Int16Array",e),uint16Array:e=>p(c.uint16Array(e),"Uint16Array",e),int32Array:e=>p(c.int32Array(e),"Int32Array",e),uint32Array:e=>p(c.uint32Array(e),"Uint32Array",e),float32Array:e=>p(c.float32Array(e),"Float32Array",e),float64Array:e=>p(c.float64Array(e),"Float64Array",e),bigInt64Array:e=>p(c.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>p(c.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>p(c.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>p(c.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>p(c.dataView(e),"DataView",e),urlInstance:e=>p(c.urlInstance(e),"URL",e),urlString:e=>p(c.urlString(e),"string with a URL",e),truthy:e=>p(c.truthy(e),"truthy",e),falsy:e=>p(c.falsy(e),"falsy",e),nan:e=>p(c.nan(e),"NaN",e),primitive:e=>p(c.primitive(e),"primitive",e),integer:e=>p(c.integer(e),"integer",e),safeInteger:e=>p(c.safeInteger(e),"integer",e),plainObject:e=>p(c.plainObject(e),"plain object",e),typedArray:e=>p(c.typedArray(e),"TypedArray",e),arrayLike:e=>p(c.arrayLike(e),"array-like",e),domElement:e=>p(c.domElement(e),"HTMLElement",e),observable:e=>p(c.observable(e),"Observable",e),nodeStream:e=>p(c.nodeStream(e),"Node.js Stream",e),infinite:e=>p(c.infinite(e),"infinite number",e),emptyArray:e=>p(c.emptyArray(e),"empty array",e),nonEmptyArray:e=>p(c.nonEmptyArray(e),"non-empty array",e),emptyString:e=>p(c.emptyString(e),"empty string",e),nonEmptyString:e=>p(c.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>p(c.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>p(c.emptyObject(e),"empty object",e),nonEmptyObject:e=>p(c.nonEmptyObject(e),"non-empty object",e),emptySet:e=>p(c.emptySet(e),"empty set",e),nonEmptySet:e=>p(c.nonEmptySet(e),"non-empty set",e),emptyMap:e=>p(c.emptyMap(e),"empty map",e),nonEmptyMap:e=>p(c.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>p(c.evenInteger(e),"even integer",e),oddInteger:e=>p(c.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>p(c.directInstanceOf(e,t),"T",e),inRange:(e,t)=>p(c.inRange(e,t),"in range",e),any:(e,...t)=>p(c.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>p(c.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=c,e.exports=c,e.exports.default=c,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(93121),n=Number(process.versions.node.split(".")[0]),o=e=>{const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=(A,...n)=>("error"===A&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(A,...n))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||n>=13)&&(t.phases.total=Date.now()-t.start)});const o=e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r),A.default(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);const i=()=>{var e;t.upload=Date.now(),t.phases.request=t.upload-(null!=(e=t.secureConnect)?e:t.connect)};return("boolean"==typeof e.writableFinished?!e.writableFinished:!e.finished||0!==e.outputSize||e.socket&&0!==e.socket.writableLength)?e.prependOnceListener("finish",i):i(),e.prependOnceListener("response",e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,e.timings=t,r(e),e.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};t.default=o,e.exports=o,e.exports.default=o},58069:(e,t,r)=>{"use strict";l.ifExists=function(e,t,r){return l(e,t,r).catch(()=>{})};const A=r(31669),n=r(46227),o=r(85622),i=r(97369),s=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:i(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function g(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?A.promisify(r.chmod):async()=>{},stat:A.promisify(r.stat),unlink:A.promisify(r.unlink),readFile:A.promisify(r.readFile),writeFile:A.promisify(r.writeFile)},t}async function l(e,t,r){const A=g(r);await A.fs_.stat(e),await async function(e,t,r){const A=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),A=r.trim().split(/\r*\n/)[0].match(s);if(!A){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:A[1],additionalArgs:A[2]}}(e,r);return await function(e,t){return n(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,A){const n=g(A),o=[{generator:h,extension:""}];n.createCmdFile&&o.push({generator:u,extension:".cmd"});n.createPwshFile&&o.push({generator:p,extension:".ps1"});return Promise.all(o.map(A=>async function(e,t,r,A,n){const o=n.preserveSymlinks?"--preserve-symlinks":"",i=[r.additionalArgs,o].filter(e=>e).join(" ");return n=Object.assign({},n,{prog:r.program,args:i}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,n),await n.fs_.writeFile(t,A(e,t,n),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,n)}(e,t+A.extension,r,A.generator,n)))}(e,t,A,r)}(e,t,A)}function u(e,t,r){let A=o.relative(o.dirname(t),e).split("/").join("\\");const n=o.isAbsolute(A)?`"${A}"`:`"%~dp0\\${A}"`;let i,s=r.prog,a=r.args||"";const c=d(r.nodePath).win32;s?(i=`"%~dp0\\${s}.exe"`,A=n):(s=n,a="",A="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=i?`@IF EXIST ${i} (\r\n ${i} ${a} ${A} ${g}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${s} ${a} ${A} ${g}%*\r\n)`:`@${s} ${a} ${A} ${g}%*\r\n`,l}function h(e,t,r){let A,n=o.relative(o.dirname(t),e),i=r.prog&&r.prog.split("\\").join("/");n=n.split("\\").join("/");const s=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let a=r.args||"";const c=d(r.nodePath).posix;i?(A=`"$basedir/${r.prog}"`,n=s):(i=s,a="",n="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l="#!/bin/sh\n";l+='basedir=$(dirname "$(echo "$0" | sed -e \'s,\\\\,/,g\')")\n\ncase `uname` in\n *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\nesac\n\n';const u=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=A?u+`if [ -x ${A} ]; then\n`+` exec ${A} ${a} ${n} ${g}"$@"\nelse \n`+` exec ${i} ${a} ${n} ${g}"$@"\nfi\n`:`${u}${i} ${a} ${n} ${g}"$@"\nexit $?\n`,l}function p(e,t,r){let A=o.relative(o.dirname(t),e);const n=r.prog&&r.prog.split("\\").join("/");let i,s=n&&`"${n}$exe"`;A=A.split("\\").join("/");const a=o.isAbsolute(A)?`"${A}"`:`"$basedir/${A}"`;let c=r.args||"",g=d(r.nodePath);const l=g.win32,u=g.posix;s?(i=`"$basedir/${r.prog}$exe"`,A=a):(s=a,c="",A="");let h=r.progArgs?r.progArgs.join(" ")+" ":"",p='#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=""\n'+(r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH="${l}"\n`:"")+'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n # Fix case when both the Windows and Linux builds of Node\n # are installed in the same directory\n $exe=".exe"\n}';return r.nodePath&&(p=p+" else {\n"+` $env:NODE_PATH="${u}"\n}`),p+="\n",p=i?p+"$ret=0\n"+`if (Test-Path ${i}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${i} ${c} ${A} ${h}$args\n } else {\n`+` & ${i} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${A} ${h}$args\n } else {\n`+` & ${s} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":p+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${s} ${c} ${A} ${h}$args\n} else {\n`+` & ${s} ${c} ${A} ${h}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",p}function d(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${A}`:A,r.posix=r.posix?`${r.posix}:${n}`:n,r[e]={win32:A,posix:n}}return r}e.exports=l},97991:(e,t,r)=>{"use strict";const A=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,n=()=>{const e={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(e.enabled="0"!==process.env.FORCE_COLOR);const t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),n=(r,A)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let n=""+r,o=n.includes("\n"),i=A.length;for(i>0&&A.includes("unstyle")&&(A=[...new Set(["unstyle",...A])].reverse());i-- >0;)n=t(e.styles[A[i]],n,o);return n},o=(t,r,A)=>{e.styles[t]=(e=>{let t=e.open=`[${e.codes[0]}m`,r=e.close=`[${e.codes[1]}m`,A=e.regex=new RegExp(`\\u001b\\[${e.codes[1]}m`,"g");return e.wrap=(e,n)=>{e.includes(r)&&(e=e.replace(A,r+t));let o=t+e+r;return n?o.replace(/\r*\n/g,`${r}$&${t}`):o},e})({name:t,codes:r}),(e.keys[A]||(e.keys[A]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>n(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=A,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let A="string"==typeof r?e[r]:r;if("function"!=typeof A)throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:t}),e.styles[t]=A,A.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>n(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(A.stack):A.stack,t}})},e.theme=t=>{if(null===(r=t)||"object"!=typeof r||Array.isArray(r))throw new TypeError("Expected theme to be an object");var r;for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r(31283),e.define=o,e};e.exports=n(),e.exports.create=n},31283:e=>{"use strict";const t="Hyper"===process.env.TERM_PROGRAM,r="win32"===process.platform,A="linux"===process.platform,n={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"•",bulletWhite:"◦",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"※",middot:"·",minus:"-",multiplication:"×",obelus:"÷",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"¶",plusMinus:"±",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},o=Object.assign({},n,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"»",radioOff:"( )",radioOn:"(*)",warning:"‼"}),i=Object.assign({},n,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"…",info:"ℹ",question:"?",questionFull:"?",questionSmall:"﹖",pointer:A?"▸":"❯",pointerSmall:A?"‣":"›",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=r&&!t?o:i,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:o}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:i})},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const A=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};5;${A}m`},o=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};2;${A[0]};${A[1]};${A[2]}m`},i=e=>e,s=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const A=r();return Object.defineProperty(e,t,{value:A,enumerable:!0,configurable:!0}),A},enumerable:!0,configurable:!0})};let c;const g=(e,t,A,n)=>{void 0===c&&(c=r(2744));const o=n?10:0,i={};for(const[r,n]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?i[s]=e(A,o):"object"==typeof n&&(i[s]=e(n[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,A]of Object.entries(t)){for(const[r,n]of Object.entries(A))t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`},A[r]=t[r],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:A,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>g(A,"ansi16",i,!1)),a(t.color,"ansi256",()=>g(n,"ansi256",i,!1)),a(t.color,"ansi16m",()=>g(o,"rgb",s,!1)),a(t.bgColor,"ansi",()=>g(A,"ansi16",i,!0)),a(t.bgColor,"ansi256",()=>g(n,"ansi256",i,!0)),a(t.bgColor,"ansi16m",()=>g(o,"rgb",s,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},67648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBinjumper=void 0;const A=r(78761);let n=null;t.getBinjumper=function(){return n||(n=A.gunzipSync(Buffer.from("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","base64"))),n}},50730:(e,t,r)=>{"use strict";t.O9=void 0;const A=r(85622),n=r(35747),o=r(31669),i=r(67648);Object.defineProperty(t,"O9",{enumerable:!0,get:function(){return i.getBinjumper}})},73975:(e,t,r)=>{"use strict";var A=r(86897).Duplex;function n(e){if(!(this instanceof n))return new n(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);A.call(this)}r(31669).inherits(n,A),n.prototype._offset=function(e){var t,r=0,A=0;if(0===e)return[0,0];for(;Athis.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},n.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},n.prototype.copy=function(e,t,r,A){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof A||A>this.length)&&(A=this.length),r>=this.length)return e||Buffer.alloc(0);if(A<=0)return e||Buffer.alloc(0);var n,o,i=!!e,s=this._offset(r),a=A-r,c=a,g=i&&t||0,l=s[1];if(0===r&&A==this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o(n=this._bufs[o].length-l))){this._bufs[o].copy(e,g,l,l+c);break}this._bufs[o].copy(e,g,l),g+=n,c-=n,l&&(l=0)}return e},n.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new n;var r=this._offset(e),A=this._offset(t),o=this._bufs.slice(r[0],A[0]+1);return 0==A[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,A[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new n(o)},n.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},n.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},n.prototype.duplicate=function(){for(var e=0,t=new n;ethis.length?this.length:t;for(var A=this._offset(t),o=A[0],i=A[1];o=e.length){var a=s.indexOf(e,i);if(-1!==a)return this._reverseOffset([o,a]);i=s.length-e.length+1}else{var c=this._reverseOffset([o,i]);if(this._match(c,e))return c;i++}}i=0}return-1},n.prototype._match=function(e,t){if(this.length-e{"use strict";const A=r(54900),n=r(44617),o=r(1495),i=r(425),s=(e,t={})=>{let r=[];if(Array.isArray(e))for(let A of e){let e=s.create(A,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};s.parse=(e,t={})=>i(e,t),s.stringify=(e,t={})=>A("string"==typeof e?s.parse(e,t):e,t),s.compile=(e,t={})=>("string"==typeof e&&(e=s.parse(e,t)),n(e,t)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),e.exports=s},44617:(e,t,r)=>{"use strict";const A=r(52169),n=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let i=n.isInvalidBrace(o),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===i||!0===s,c=!0===t.escapeInvalid?"\\":"",g="";if(!0===e.isOpen)return c+e.value;if(!0===e.isClose)return c+e.value;if("open"===e.type)return a?c+e.value:"(";if("close"===e.type)return a?c+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=n.reduce(e.nodes),o=A(...r,{...t,wrap:!1,toRegex:!0});if(0!==o.length)return r.length>1&&o.length>1?`(${o})`:o}if(e.nodes)for(let t of e.nodes)g+=r(t,e);return g};return r(e)}},5384:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",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:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1495:(e,t,r)=>{"use strict";const A=r(52169),n=r(54900),o=r(4542),i=(e="",t="",r=!1)=>{let A=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let n of e)if(Array.isArray(n))for(let e of n)A.push(i(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),A.push(Array.isArray(e)?i(n,e,r):n+e);return o.flatten(A)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,s=(e,a={})=>{e.queue=[];let c=a,g=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,g=c.queue;if(e.invalid||e.dollar)return void g.push(i(g.pop(),n(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void g.push(i(g.pop(),["{}"]));if(e.nodes&&e.ranges>0){let s=o.reduce(e.nodes);if(o.exceedsLimit(...s,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=A(...s,t);return 0===a.length&&(a=n(e,t)),g.push(i(g.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),u=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,u=h.queue;for(let t=0;t{"use strict";const A=r(54900),{MAX_LENGTH:n,CHAR_BACKSLASH:o,CHAR_BACKTICK:i,CHAR_COMMA:s,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:d,CHAR_SINGLE_QUOTE:C,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:I}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},E="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(e.length>E)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${E})`);let B,y={type:"root",input:e,nodes:[]},m=[y],w=y,Q=y,D=0,b=e.length,v=0,S=0;const k=()=>e[v++],N=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return w.nodes.push(e),e.parent=w,e.prev=Q,Q=e,e;Q.value+=e.value};for(N({type:"bos"});v0){if(w.ranges>0){w.ranges=0;let e=w.nodes.shift();w.nodes=[e,{type:"text",value:A(w)}]}N({type:"comma",value:B}),w.commas++}else if(B===a&&S>0&&0===w.commas){let e=w.nodes;if(0===S||0===e.length){N({type:"text",value:B});continue}if("dot"===Q.type){if(w.range=[],Q.value+=B,Q.type="range",3!==w.nodes.length&&5!==w.nodes.length){w.invalid=!0,w.ranges=0,Q.type="text";continue}w.ranges++,w.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+B,Q=t,w.ranges--;continue}N({type:"dot",value:B})}else N({type:"text",value:B});else{if("brace"!==w.type){N({type:"text",value:B});continue}let e="close";w=m.pop(),w.close=!0,N({type:e,value:B}),S--,w=m[m.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===w.dollar;w=N({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),m.push(w),N({type:"open",value:B})}else{let e,r=B;for(!0!==t.keepQuotes&&(B="");v{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=m[m.length-1],t=e.nodes.indexOf(w);e.nodes.splice(t,1,...w.nodes)}}while(m.length>0);return N({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const A=r(4542);e.exports=(e,t={})=>{let r=(e,n={})=>{let o=t.escapeInvalid&&A.isInvalidBrace(n),i=!0===e.invalid&&!0===t.escapeInvalid,s="";if(e.value)return(o||i)&&A.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}},4542:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find(e=>e.type===t),t.exceedsLimit=(e,r,A=1,n)=>!1!==n&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(A)>=n),t.escapeNode=(e,t=0,r)=>{let A=e.nodes[t];A&&(r&&A.type===r||"open"===A.type||"close"===A.type)&&!0!==A.escaped&&(A.value="\\"+A.value,A.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let A=0;A{"use strict";const{V4MAPPED:A,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:s}=r(40881),{promisify:a}=r(31669),c=r(12087),g=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),u=Symbol("expires"),h="number"==typeof o,p=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},d=()=>{let e=!1,t=!1;for(const r of Object.values(c.networkInterfaces()))for(const A of r)if(!A.internal&&("IPv6"===A.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},C={ttl:!0},f={all:!0};class I{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:r=3600,errorTtl:A=.15,resolver:n=new i,lookup:o=s}={}){if(this.maxTtl=t,this.errorTtl=A,this._cache=e,this._resolver=n,this._dnsLookup=a(o),this._resolver instanceof i?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=a(this._resolver.resolve4.bind(this._resolver)),this._resolve6=a(this._resolver.resolve6.bind(this._resolver))),this._iface=d(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,r<1)this._fallback=!1;else{this._fallback=!0;const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*r);e.unref&&e.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if("function"==typeof t?(r=t,t={}):"number"==typeof t&&(t={family:t}),!r)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?r(null,e):r(null,e.address,e.family,e.expires,e.ttl)},r)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let r=await this.query(e);if(6===t.family){const e=r.filter(e=>6===e.family);t.hints&A&&(h&&t.hints&o||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address="::ffff:"+t.address,t.family=6)})(r):r=e}else 4===t.family&&(r=r.filter(e=>4===e.family));if(t.hints&n){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("cacheableLookup ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r)t=await r;else{const r=this.queryAndCache(e);this._pending[e]=r,t=await r}}return t=t.map(e=>({...e})),t}async _resolve(e){const[t,r]=await Promise.all([this._resolve4(e,C),this._resolve6(e,C)].map(e=>(async e=>{try{return await e}catch(e){if("ENODATA"===e.code||"ENOTFOUND"===e.code)return[];throw e}})(e)));let A=0,n=0,o=0;const i=Date.now();for(const e of t)e.family=4,e.expires=i+1e3*e.ttl,A=Math.max(A,e.ttl);for(const e of r)e.family=6,e.expires=i+1e3*e.ttl,n=Math.max(n,e.ttl);return o=t.length>0?r.length>0?Math.min(A,n):A:n,{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=1e3*Math.min(r,this.maxTtl),t[u]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}A=this._cache,Symbol.iterator in A&&this._tick(r)}var A}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,f);try{let t=await this._resolve(e);0===t.entries.length&&this._fallback&&(t=await this._lookup(e),0!==t.entries.length&&this._hostnamesToFallback.add(e));const r=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,r),delete this._pending[e],t.entries}catch(t){throw delete this._pending[e],t}}_tick(e){const t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,A]of this._cache){const n=A[u];t>=n?this._cache.delete(r):n("lookup"in t||(t.lookup=this.lookup),e[g](t,r))}uninstall(e){if(p(e),e[g]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[g],delete e[g],delete e[l]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=d(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=I,e.exports.default=I},11200:(e,t,r)=>{"use strict";const A=r(28614),n=r(78835),o=r(19793),i=r(58764),s=r(86834),a=r(48491),c=r(55737),g=r(15751),l=r(72515);class u{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new l({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let l;if("string"==typeof t)l=p(n.parse(t)),t={};else if(t instanceof n.URL)l=p(n.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),A=r.length>0?"?"+r.join("?"):"";l=p({...t,pathname:e,search:A})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...h(l)}).headers=c(t.headers);const d=new A,C=o(n.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${t.method}:${C}`;let I=!1,E=!1;const B=t=>{E=!0;let A,n=!1;const o=new Promise(e=>{A=()=>{n||(n=!0,e())}}),c=e=>{if(I&&!t.forceRefresh){e.status=e.statusCode;const r=s.fromObject(I.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(I.statusCode,t,I.body,I.url)).cachePolicy=r.policy,e.fromCache=!0}}let A;e.fromCache||(e.cachePolicy=new s(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(A=g(e),(async()=>{try{const r=i.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),n)return;const A=await r,s={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?I.statusCode:e.statusCode,body:A};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(f,s,a)}catch(e){d.emit("error",new u.CacheError(e))}})()):t.cache&&I&&(async()=>{try{await this.cache.delete(f)}catch(e){d.emit("error",new u.CacheError(e))}})(),d.emit("response",A||e),"function"==typeof r&&r(A||e)};try{const r=e(t,c);r.once("error",A),r.once("abort",A),d.emit("request",r)}catch(e){d.emit("error",new u.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(f):void 0;if(void 0===t)return B(e);const A=s.fromObject(t.cachePolicy);if(A.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=A.responseHeaders(),n=new a(t.statusCode,e,t.body,t.url);n.cachePolicy=A,n.fromCache=!0,d.emit("response",n),"function"==typeof r&&r(n)}else I=t,e.headers=A.revalidationHeaders(e),B(e)},A=e=>d.emit("error",new u.CacheError(e));this.cache.once("error",A),d.on("response",()=>this.cache.removeListener("error",A));try{await e(t)}catch(e){t.automaticFailover&&!E&&B(t),d.emit("error",new u.CacheError(e))}})(),d}}}function h(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function p(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}u.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},u.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=u},54738:e=>{"use strict";const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,A=!1;for(let n=0;nt.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};e.exports=t,e.exports.default=t},95882:(e,t,r)=>{"use strict";const A=r(18483),{stdout:n,stderr:o}=r(59428),{stringReplaceAll:i,stringEncaseCRLFWithFirstIndex:s}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class g{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");const r=n?n.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>E(t.template,...e),Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=g,t.template};function u(e){return l(e)}for(const[e,t]of Object.entries(A))c[e]={get(){const r=C(this,d(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=C(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)c[e]={get(){const{level:t}=this;return function(...r){const n=d(A.color[a[t]][e](...r),A.color.close,this._styler);return C(this,n,this._isEmpty)}}};for(const e of h){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=d(A.bgColor[a[t]][e](...r),A.bgColor.close,this._styler);return C(this,n,this._isEmpty)}}}}const p=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),d=(e,t,r)=>{let A,n;return void 0===r?(A=e,n=t):(A=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:A,closeAll:n,parent:r}},C=(e,t,r)=>{const A=(...e)=>f(A,1===e.length?""+e[0]:e.join(" "));return A.__proto__=p,A._generator=e,A._styler=t,A._isEmpty=r,A},f=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:A,closeAll:n}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=i(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=s(t,n,A,o)),A+t+n};let I;const E=(e,...t)=>{const[A]=t;if(!Array.isArray(A))return t.join(" ");const n=t.slice(1),o=[A.raw[0]];for(let e=1;e{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,A=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function i(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function s(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let s;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(s=t.match(A)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(s[2].replace(n,(e,t,r)=>t?i(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let A;for(;null!==(A=r.exec(e));){const e=A[1];if(A[2]){const r=s(e,A[2]);t.push([e].concat(r))}else t.push([e])}return t}function c(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let A=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in A))throw new Error("Unknown Chalk style: "+e);A=t.length>0?A[e](...t):A[e]}return A}e.exports=(e,r)=>{const A=[],n=[];let o=[];if(r.replace(t,(t,r,s,g,l,u)=>{if(r)o.push(i(r));else if(g){const t=o.join("");o=[],n.push(0===A.length?t:c(e,A)(t)),A.push({inverse:s,styles:a(g)})}else if(l){if(0===A.length)throw new Error("Found extraneous } in Chalk template literal");n.push(c(e,A)(o.join(""))),o=[],A.pop()}else o.push(u)}),n.push(o.join("")),A.length>0){const e=`Chalk template literal is missing ${A.length} closing bracket${1===A.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let A=e.indexOf(t);if(-1===A)return e;const n=t.length;let o=0,i="";do{i+=e.substr(o,A-o)+t+r,o=A+n,A=e.indexOf(t,o)}while(-1!==A);return i+=e.substr(o),i},stringEncaseCRLFWithFirstIndex:(e,t,r,A)=>{let n=0,o="";do{const i="\r"===e[A-1];o+=e.substr(n,(i?A-1:A)-n)+t+(i?"\r\n":"\n")+r,n=A+1,A=e.indexOf("\n",n)}while(-1!==A);return o+=e.substr(n),o}}},5864:(e,t,r)=>{"use strict";var A=r(85832),n=process.env;function o(e){return"string"==typeof e?!!n[e]:Object.keys(e).every((function(t){return n[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:A.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,A.forEach((function(e){var r=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return o(e)}));if(t[e.constant]=r,r)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!n[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!n[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(n.CI||n.CONTINUOUS_INTEGRATION||n.BUILD_NUMBER||n.RUN_ID||t.name)},85832:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},40822:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cli:()=>Y,Command:()=>M,UsageError:()=>a});const A=/^(-h|--help)(?:=([0-9]+))?$/,n=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,o=/^-[a-zA-Z]{2,}$/,i=/^([^=]+)=([\s\S]*)$/,s="1"===process.env.DEBUG_CLI;class a extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}}class c extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",0===this.candidates.length)this.message="Command not found, but we're not sure what's the alternative.";else if(1===this.candidates.length&&null!==this.candidates[0].reason){const[{usage:e,reason:t}]=this.candidates;this.message=`${t}\n\n$ ${e}`}else if(1===this.candidates.length){const[{usage:t}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${t}\n${l(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:e},t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}class g extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((e,t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}const l=e=>"While running "+e.filter(e=>"\0"!==e).map(e=>{const t=JSON.stringify(e);return e.match(/\s/)||0===e.length||t!==`"${e}"`?t:e}).join(" ");function u(e){s&&console.log(e)}const h={candidateUsage:null,errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:-1};function p(e,t){return e.nodes.push(t),e.nodes.length-1}function d(e,t,r=!1){u("Running a vm on "+JSON.stringify(t));let A=[{node:0,state:{candidateUsage:null,errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];!function(e,{prefix:t=""}={}){u(t+"Nodes are:");for(let r=0;r2!==e).map(({state:e})=>({usage:e.candidateUsage,reason:null})));if(s.every(({node:e})=>2===e))throw new c(t,s.map(({state:e})=>({usage:e.candidateUsage,reason:e.errorMessage})));A=I(s)}if(A.length>0){u(" Results:");for(const e of A)u(` - ${e.node} -> ${JSON.stringify(e.state)}`)}else u(" No results");return A}function C(e,t){if(null!==t.selectedIndex)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,"\0"))for(const{to:t}of e.statics["\0"])if(1===t)return!0;return!1}function f(e,t){return function(e,t){const r=t.filter(e=>null!==e.selectedIndex);if(0===r.length)throw new Error;let A=0;for(const e of r)e.path.length>A&&(A=e.path.length);const n=r.filter(e=>e.path.length===A),o=e=>e.positionals.filter(({extra:e})=>!e).length+e.options.length,i=n.map(e=>({state:e,positionalCount:o(e)}));let s=0;for(const{positionalCount:e}of i)e>s&&(s=e);const a=function(e){const t=[],r=[];for(const A of e)-1===A.selectedIndex?r.push(A):t.push(A);r.length>0&&t.push(Object.assign(Object.assign({},h),{path:E(...r.map(e=>e.path)),options:r.reduce((e,t)=>e.concat(t.options),[])}));return t}(i.filter(({positionalCount:e})=>e===s).map(({state:e})=>e));if(a.length>1)throw new g(e,a.map(e=>e.candidateUsage));return a[0]}(t,d(e,[...t,"\0"]).map(({state:e})=>e))}function I(e){let t=0;for(const{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:e})=>e.path.length===t)}function E(e,t,...r){return void 0===t?Array.from(e):E(e.filter((e,r)=>e===t[r]),...r)}function B(e){return 1===e||2===e}function y(e,t=0){return{to:B(e.to)?e.to:e.to>2?e.to+t-2:e.to+t,reducer:e.reducer}}function m(e,t=0){const r={dynamics:[],shortcuts:[],statics:{}};for(const[A,n]of e.dynamics)r.dynamics.push([A,y(n,t)]);for(const A of e.shortcuts)r.shortcuts.push(y(A,t));for(const[A,n]of Object.entries(e.statics))r.statics[A]=n.map(e=>y(e,t));return r}function w(e,t,r,A,n){e.nodes[t].dynamics.push([r,{to:A,reducer:n}])}function Q(e,t,r,A){e.nodes[t].shortcuts.push({to:r,reducer:A})}function D(e,t,r,A,n){(Object.prototype.hasOwnProperty.call(e.nodes[t].statics,r)?e.nodes[t].statics[r]:e.nodes[t].statics[r]=[]).push({to:A,reducer:n})}function b(e,t,r,A){if(Array.isArray(t)){const[n,...o]=t;return e[n](r,A,...o)}return e[t](r,A)}function v(e,t){const r=Array.isArray(e)?S[e[0]]:S[e];if(void 0===r.suggest)return null;const A=Array.isArray(e)?e.slice(1):[];return r.suggest(t,...A)}const S={always:()=>!0,isOptionLike:(e,t)=>!e.ignoreOptions&&t.startsWith("-"),isNotOptionLike:(e,t)=>e.ignoreOptions||!t.startsWith("-"),isOption:(e,t,r,A)=>!e.ignoreOptions&&t===r,isBatchOption:(e,t,r)=>!e.ignoreOptions&&o.test(t)&&[...t.slice(1)].every(e=>r.includes("-"+e)),isBoundOption:(e,t,r,A)=>{const o=t.match(i);return!e.ignoreOptions&&!!o&&n.test(o[1])&&r.includes(o[1])&&A.filter(e=>e.names.includes(o[1])).every(e=>e.allowBinding)},isNegatedOption:(e,t,r)=>!e.ignoreOptions&&t==="--no-"+r.slice(2),isHelp:(e,t)=>!e.ignoreOptions&&A.test(t),isUnsupportedOption:(e,t,r)=>!e.ignoreOptions&&t.startsWith("-")&&n.test(t)&&!r.includes(t),isInvalidOption:(e,t)=>!e.ignoreOptions&&t.startsWith("-")&&!n.test(t)};S.isOption.suggest=(e,t,r=!0)=>r?null:[t];const k={setCandidateUsage:(e,t,r)=>Object.assign(Object.assign({},e),{candidateUsage:r}),setSelectedIndex:(e,t,r)=>Object.assign(Object.assign({},e),{selectedIndex:r}),pushBatch:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat([...t.slice(1)].map(e=>({name:"-"+e,value:!0})))}),pushBound:(e,t)=>{const[,r,A]=t.match(i);return Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:A})})},pushPath:(e,t)=>Object.assign(Object.assign({},e),{path:e.path.concat(t)}),pushPositional:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!1})}),pushExtra:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!0})}),pushExtraNoLimits:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:N})}),pushTrue:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:!0})}),pushFalse:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:!1})}),pushUndefined:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:void 0})}),pushStringValue:(e,t)=>{var r;const A=Object.assign(Object.assign({},e),{options:[...e.options]}),n=e.options[e.options.length-1];return n.value=(null!==(r=n.value)&&void 0!==r?r:[]).concat([t]),A},setStringValue:(e,t)=>{const r=Object.assign(Object.assign({},e),{options:[...e.options]});return e.options[e.options.length-1].value=t,r},inhibateOptions:e=>Object.assign(Object.assign({},e),{ignoreOptions:!0}),useHelp:(e,t,r)=>{const[,n,o]=t.match(A);return void 0!==o?Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)},{name:"-i",value:o}]}):Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)}]})},setError:(e,t,r)=>"\0"===t?Object.assign(Object.assign({},e),{errorMessage:r+"."}):Object.assign(Object.assign({},e),{errorMessage:`${r} ("${t}").`}),setOptionArityError:(e,t)=>{const r=e.options[e.options.length-1];return Object.assign(Object.assign({},e),{errorMessage:`Not enough arguments to option ${r.name}.`})}},N=Symbol();class F{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:r=this.arity.extra,proxy:A=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:r,proxy:A})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===N)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");t||this.arity.extra===N?this.arity.extra!==N&&0===this.arity.extra.length?this.arity.leading.push(e):this.arity.trailing.push(e):this.arity.extra.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===N)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let r=0;r1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(r))throw new Error("The arity must be an integer, got "+r);if(r<0)throw new Error("The arity must be positive, got "+r);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:r,hidden:A,allowBinding:n})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){const r=[this.cliOpts.binaryName],A=[];if(this.paths.length>0&&r.push(...this.paths[0]),e){for(const{names:e,arity:n,hidden:o,description:i}of this.options){if(o)continue;const s=[];for(let e=0;e`<${e}>`)),this.arity.extra===N?r.push("..."):r.push(...this.arity.extra.map(e=>`[${e}]`)),r.push(...this.arity.trailing.map(e=>`<${e}>`))}return{usage:r.join(" "),options:A}}compile(){if(void 0===this.context)throw new Error("Assertion failed: No context attached");const e={nodes:[{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}}]};let t=0;t=p(e,{dynamics:[],shortcuts:[],statics:{}}),D(e,0,"",t,["setCandidateUsage",this.usage().usage]);const r=this.arity.proxy?"always":"isNotOptionLike",A=this.paths.length>0?this.paths:[[]];for(const n of A){let A=t;if(n.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});Q(e,A,t),this.registerOptions(e,t),A=t}for(let t=0;t0||!this.arity.proxy){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});w(e,A,"isHelp",t,["useHelp",this.cliIndex]),D(e,t,"\0",1,["setSelectedIndex",-1]),this.registerOptions(e,A)}this.arity.leading.length>0&&D(e,A,"\0",2,["setError","Not enough positional arguments"]);let o=A;for(let t=0;t0||t+1!==this.arity.leading.length)&&D(e,r,"\0",2,["setError","Not enough positional arguments"]),w(e,o,"isNotOptionLike",r,"pushPositional"),o=r}let i=o;if(this.arity.extra===N||this.arity.extra.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});if(Q(e,o,t),this.arity.extra===N){const A=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,A),w(e,o,r,A,"pushExtraNoLimits"),w(e,A,r,A,"pushExtraNoLimits"),Q(e,A,t)}else for(let A=0;A0&&D(e,i,"\0",2,["setError","Not enough positional arguments"]);let s=i;for(let t=0;tt.length>e.length?t:e,"");if(0===r.arity)for(const n of r.names)w(e,t,["isOption",n,r.hidden||n!==A],t,"pushTrue"),n.startsWith("--")&&!n.startsWith("--no-")&&w(e,t,["isNegatedOption",n],t,["pushFalse",n]);else{let n=p(e,{dynamics:[],shortcuts:[],statics:{}});for(const o of r.names)w(e,t,["isOption",o,r.hidden||o!==A],n,"pushUndefined");for(let t=0;t=0&&e{if(t.has(A))return;t.add(A);const n=e.nodes[A];for(const e of Object.values(n.statics))for(const{to:t}of e)r(t);for(const[,{to:e}]of n.dynamics)r(e);for(const{to:e}of n.shortcuts)r(e);const o=new Set(n.shortcuts.map(({to:e})=>e));for(;n.shortcuts.length>0;){const{to:t}=n.shortcuts.shift(),r=e.nodes[t];for(const[e,t]of Object.entries(r.statics)){let r=Object.prototype.hasOwnProperty.call(n.statics,e)?n.statics[e]:n.statics[e]=[];for(const e of t)r.some(({to:t})=>e.to===t)||r.push(e)}for(const[e,t]of r.dynamics)n.dynamics.some(([r,{to:A}])=>e===r&&t.to===A)||n.dynamics.push([e,t]);for(const e of r.shortcuts)o.has(e.to)||(n.shortcuts.push(e),o.add(e.to))}};r(0)}(r),{machine:r,contexts:t,process:e=>f(r,e),suggest:(e,t)=>function(e,t,r){const A=r&&t.length>0?[""]:[],n=d(e,t,r),o=[],i=new Set,s=(t,r,A=!0)=>{let n=[r];for(;n.length>0;){const r=n;n=[];for(const o of r){const r=e.nodes[o],i=Object.keys(r.statics);for(const e of Object.keys(r.statics)){const e=i[0];for(const{to:o,reducer:i}of r.statics[e])"pushPath"===i&&(A||t.push(e),n.push(o))}}A=!1}const s=JSON.stringify(t);i.has(s)||(o.push(t),i.add(s))};for(const{node:t,state:r}of n){if(null!==r.remainder){s([r.remainder],t);continue}const n=e.nodes[t],o=C(n,r);for(const[e,r]of Object.entries(n.statics))(o&&"\0"!==e||!e.startsWith("-")&&r.some(({reducer:e})=>"pushPath"===e))&&s([...A,e],t);if(o)for(const[e,{to:o}]of n.dynamics){if(2===o)continue;const n=v(e,r);if(null!==n)for(const e of n)s([...A,e],t)}}return[...o].sort()}(r,e,t)}}}class M{constructor(){this.help=!1}static getMeta(e){const t=e.constructor;return t.meta=Object.prototype.hasOwnProperty.call(t,"meta")?t.meta:{definitions:[],transformers:[(e,t)=>{for(const{name:r,value:A}of e.options)"-h"!==r&&"--help"!==r||(t.help=A)}]}}static resolveMeta(e){const t=[],r=[];for(let A=e;A instanceof M;A=A.__proto__){const e=this.getMeta(A);for(const r of e.definitions)t.push(r);for(const t of e.transformers)r.push(t)}return{definitions:t,transformers:r}}static registerDefinition(e,t){this.getMeta(e).definitions.push(t)}static registerTransformer(e,t){this.getMeta(e).transformers.push(t)}static addPath(...e){this.Path(...e)(this.prototype,"execute")}static addOption(e,t){t(this.prototype,e)}static Path(...e){return(t,r)=>{this.registerDefinition(t,t=>{t.addPath(e)})}}static Boolean(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{for(const{name:r,value:A}of e.options)o.includes(r)&&(t[n]=A)})}}static Counter(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{var r;for(const{name:A,value:i}of e.options)o.includes(A)&&(null!==(r=t[n])&&void 0!==r||(t[n]=0),i?t[n]++:t[n]=0)})}}static String(e={},{arity:t=1,tolerateBoolean:r=!1,hidden:A=!1,description:n}={}){return(o,i)=>{if("string"==typeof e){const s=e.split(",");this.registerDefinition(o,e=>{e.addOption({names:s,arity:r?0:t,hidden:A,description:n})}),this.registerTransformer(o,(e,t)=>{for(const{name:r,value:A}of e.options)s.includes(r)&&(t[i]=A)})}else{const{name:t=i,required:r=!0}=e;this.registerDefinition(o,e=>{e.addPositional({name:t,required:r})}),this.registerTransformer(o,(e,t)=>{for(let A=0;A{if(0===t)throw new Error("Array options are expected to have at least an arity of 1");const i=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:i,arity:t,hidden:r,description:A})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:A}of e.options)i.includes(r)&&(t[o]=t[o]||[],t[o].push(A))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t,A)=>{const n=t=>{const r=e.positionals[t];return r.extra===N||!1===r.extra&&te)})}}static Proxy({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addProxy({required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Usage(e){return e}static Schema(e){return e}async catch(e){throw e}async validateAndExecute(){const e=this.constructor.schema;if(void 0!==e)try{await e.validate(this)}catch(e){throw"ValidationError"===e.name&&(e.clipanion={type:"usage"}),e}const t=await this.execute();return void 0!==t?t:0}} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. diff --git a/Makefile b/Makefile index b798591f7556..29ee918cd0ee 100644 --- a/Makefile +++ b/Makefile @@ -219,9 +219,9 @@ publish: $(MAKE) clean check-yarn-bug-1882: -ifneq ("$(shell grep 3155328e5 .yarn/releases/yarn-*.cjs -c)", "0") +ifneq ("$(shell grep 3155328 .yarn/releases/yarn-*.cjs -c)", "0") @echo "Your version of yarn is affected by https://github.com/yarnpkg/berry/issues/1882" - @echo "Please run \`sed -i -e "s/3155328e5/4567890e5/g" .yarn/releases/yarn-*.cjs\`" + @echo "Please run \`sed -i -e "s/3155328/4567890/g" .yarn/releases/yarn-*.cjs\`" @exit 1 endif