@onyxsecurity/mcp-gateway 2.1.43 → 2.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/bin/mcp-gateway.js +2 -2
  2. package/dist/bin/mcp-gateway.js.map +1 -1
  3. package/dist/cli-CNtgMMkg.js +3 -0
  4. package/dist/cli-CNtgMMkg.js.map +1 -0
  5. package/dist/env-BDKldJJk.js +2 -0
  6. package/dist/env-BDKldJJk.js.map +1 -0
  7. package/dist/env-CgxPliUz.js +1 -0
  8. package/dist/helpers-DOLqaEj0.js +93 -0
  9. package/dist/helpers-DOLqaEj0.js.map +1 -0
  10. package/dist/index.d.ts +21 -0
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/logger-CilZJgRr.js +5 -0
  14. package/dist/{logger-CWUh95SA.js.map → logger-CilZJgRr.js.map} +1 -1
  15. package/dist/logger-e6I79GjO.js +1 -0
  16. package/dist/main-BFGMEBYS.js +6 -0
  17. package/dist/main-BFGMEBYS.js.map +1 -0
  18. package/dist/{normalizeUrl-DoppHGlo.js → normalizeUrl-DUUGubD4.js} +1 -1
  19. package/dist/{normalizeUrl-DoppHGlo.js.map → normalizeUrl-DUUGubD4.js.map} +1 -1
  20. package/dist/oauthProvidersClient-CbHTOMq_.js +2 -0
  21. package/dist/oauthProvidersClient-CbHTOMq_.js.map +1 -0
  22. package/dist/oauthProvidersClient-gES4TS6R.js +1 -0
  23. package/dist/pkce-C7ZxslWt.js +1 -0
  24. package/dist/{pkce-DKfQXsGm.js → pkce-DUsFn3Kw.js} +1 -1
  25. package/dist/{pkce-DKfQXsGm.js.map → pkce-DUsFn3Kw.js.map} +1 -1
  26. package/dist/{providers-DiyaT-nZ.js → providers-DdC7BWQI.js} +2 -2
  27. package/dist/{providers-DiyaT-nZ.js.map → providers-DdC7BWQI.js.map} +1 -1
  28. package/dist/proxyFetch-C1EVTHaR.js +2 -0
  29. package/dist/proxyFetch-C1EVTHaR.js.map +1 -0
  30. package/dist/{secretstore-B7UBzLo4.js → secretstore-Bb_yKd3c.js} +3 -3
  31. package/dist/{secretstore-B7UBzLo4.js.map → secretstore-Bb_yKd3c.js.map} +1 -1
  32. package/dist/transportDetection-Dw8flZ7W.js +136 -0
  33. package/dist/transportDetection-Dw8flZ7W.js.map +1 -0
  34. package/dist/upstreamNegotiation-CRw30abB.js +15 -0
  35. package/dist/upstreamNegotiation-CRw30abB.js.map +1 -0
  36. package/package.json +1 -1
  37. package/dist/chunk-CrDKVgUD.js +0 -1
  38. package/dist/cli-C7vmKlGv.js +0 -3
  39. package/dist/cli-C7vmKlGv.js.map +0 -1
  40. package/dist/env-BYAgFtQA.js +0 -1
  41. package/dist/env-DXIcThnP.js +0 -2
  42. package/dist/env-DXIcThnP.js.map +0 -1
  43. package/dist/helpers-BLNSu673.js +0 -92
  44. package/dist/helpers-BLNSu673.js.map +0 -1
  45. package/dist/logger-CWUh95SA.js +0 -5
  46. package/dist/main-CIjGR_ZE.js +0 -6
  47. package/dist/main-CIjGR_ZE.js.map +0 -1
  48. package/dist/oauthProvidersClient-CC-cNbIE.js +0 -2
  49. package/dist/oauthProvidersClient-CC-cNbIE.js.map +0 -1
  50. package/dist/oauthProvidersClient-DJPWxaxB.js +0 -1
  51. package/dist/pkce-CYE2WffE.js +0 -1
  52. package/dist/transportDetection-DmhqNhkc.js +0 -136
  53. package/dist/transportDetection-DmhqNhkc.js.map +0 -1
  54. package/dist/upstreamNegotiation-BT6dzuoL.js +0 -15
  55. package/dist/upstreamNegotiation-BT6dzuoL.js.map +0 -1
@@ -0,0 +1,93 @@
1
+ import{__commonJSMin as e,__toESM as t,configureProxy as n,parseNoProxy as r,probeProxyReachable as i}from"./proxyFetch-C1EVTHaR.js";import{createRequire as a}from"node:module";import{readFileSync as o,readdirSync as s}from"node:fs";import{format as c,inspect as l}from"util";import{spawn as u}from"node:child_process";import{notStrictEqual as d,strictEqual as f}from"assert";import{basename as p,dirname as m,extname as h,join as g,normalize as ee,relative as _,resolve as v}from"path";import{readFileSync as y,readdirSync as te,statSync as ne,writeFile as re}from"fs";import{fileURLToPath as b}from"url";let x=null;function ie(e,t=x){if(t===null)return;let n={caller:`gateway_startup`,event:`keychain_outcome`,keychain_disabled_env_set:t.keychainDisabledEnvSet,op:`get`,outcome:t.source,platform:t.platform,reason:t.source};if(t.source===`error`||t.source===`missing`||t.source===`timeout`){e.warn(`keychain_outcome`,n);return}e.info(`keychain_outcome`,n)}function ae(e,t={}){return x={keychainDisabledEnvSet:t.keychainDisabledEnvSet??process.env.MCP_GATEWAY_DISABLE_KEYCHAIN===`1`,platform:t.platform??process.platform,source:e},x}const S=[`MCP_GATEWAY_HTTPS_PROXY`,`HTTPS_PROXY`,`https_proxy`],oe=[`MCP_GATEWAY_HTTP_PROXY`,`HTTP_PROXY`,`http_proxy`],se=[`MCP_GATEWAY_NO_PROXY`,`NO_PROXY`,`no_proxy`],ce=[`HTTP_PROXY`,`http_proxy`,`HTTPS_PROXY`,`https_proxy`,`NO_PROXY`,`no_proxy`,`ALL_PROXY`,`all_proxy`],le=[`MCP_GATEWAY_HTTP_PROXY`,`MCP_GATEWAY_HTTPS_PROXY`,`MCP_GATEWAY_NO_PROXY`],ue=[...ce,...le],de=`ONYX_MCP_GATEWAY_PROXY_ACTIVE`,fe=`ONYX_MCP_GATEWAY_PROXY_HTTP`,C=`ONYX_MCP_GATEWAY_PROXY_HTTPS`,w=`ONYX_MCP_GATEWAY_PROXY_NO_PROXY`,pe=`ONYX_MCP_GATEWAY_PROXY_SOURCE`,T=`ONYX_MCP_GATEWAY_PROXY_ORIGINAL_ENV`,me=[de,fe,C,w,pe,T];let he={status:`not-needed`};function ge(e){let{argv:t,env:n,execPath:i}=e;if(n[de]===`1`){let e=D(n[fe]),t=D(n[C]);return{config:{enabled:!0,httpProxy:e,httpsProxy:t,noProxy:r(D(n[w])),source:D(n[pe])},mode:`child`,result:De(n[pe],t??e)}}let a=we(n);return a?{args:Me(t),childEnv:Ce(n,a),command:i,mode:`reexec`,result:De(a.source,a.httpsProxy??a.httpProxy)}:{mode:`direct`,result:{status:`not-needed`}}}function _e(e,t=he){switch(t.status){case`failed`:e.warn(`Proxy routing setup failed; egress may be blocked`,{error:t.error,eventType:`proxy_routing_failed`,source:t.source,target:t.target});return;case`installed`:e.info(`Proxy routing enabled for fetch()`,{eventType:`proxy_routing_enabled`,source:t.source,target:t.target});return;case`not-needed`:return}}function ve(e){let t=Ae(e),n=e=>t.find(([t])=>e.includes(t))?.[1];return n([`HTTPS_PROXY`,`https_proxy`])??n([`HTTP_PROXY`,`http_proxy`])}function ye(e,t,n){let r;try{r=t(e.command,e.args,{env:e.childEnv,stdio:`inherit`})}catch(e){Te(e),n(1);return}let i=[`SIGINT`,`SIGTERM`,`SIGHUP`],a=new Map;for(let e of i){let t=()=>{try{r.kill(e)}catch{}};a.set(e,t),process.on(e,t)}r.on(`error`,e=>{Te(e),n(1)}),r.on(`exit`,(e,t)=>{for(let[e,t]of a)process.removeListener(e,t);if(t){process.kill(process.pid,t);return}n(e??0)})}async function be(e,t={}){let n=ve(e);return n===void 0?{proxyHost:void 0,reachability:`indeterminate`}:{proxyHost:Ne(n),reachability:await i(n,t)}}function xe(e,t=`indeterminate`){let n={...e};for(let e of me)delete n[e];for(let e of le)delete n[e];if(t!==`unreachable`)for(let[t,r]of Ae(e))n[t]=r;return n}async function E(e={}){let t=ge({argv:e.argv??process.argv,env:e.env??process.env,execPath:e.execPath??process.execPath});return t.mode===`direct`?(n({enabled:!1,noProxy:[]}),he=t.result,he):t.mode===`child`?(n(t.config),he=t.result,he):(he=t.result,ye(t,e.spawn??Se,e.exit??(e=>process.exit(e))),new Promise(()=>{}))}const Se=(e,t,n)=>u(e,t,{env:n.env,stdio:n.stdio});function Ce(e,t){let n={...e},r={};for(let t of ue){let i=D(e[t]);i!==void 0&&ce.includes(t)&&(r[t]=i),delete n[t]}return n[T]=JSON.stringify(r),n[de]=`1`,n[pe]=t.source,t.httpProxy&&(n[fe]=t.httpProxy),t.httpsProxy&&(n[C]=t.httpsProxy),t.noProxy&&(n[w]=t.noProxy),n}function we(e){let t=je(e,S),n=je(e,oe);if(!t&&!n)return;let r=t??n;return{httpProxy:n?.value,httpsProxy:t?.value,noProxy:Ee(...se.map(t=>e[t])),source:r?.name??`HTTPS_PROXY`}}function Te(e){let t=e instanceof Error?e.message:String(e);process.stderr.write(JSON.stringify({caller:`gateway_startup`,error:t,event:`proxy_reexec_failed`})+`
2
+ `)}function Ee(...e){for(let t of e){let e=D(t);if(e!==void 0)return e}}function De(e,t){return{source:e??`HTTPS_PROXY`,status:`installed`,target:Pe(t??``)}}function Oe(e){return e.startsWith(`/$bunfs/`)||/[/\\]\$bunfs[/\\]/.test(e)||/~BUN/.test(e)}function ke(e){return e!==void 0&&le.includes(e)}function D(e){return typeof e==`string`&&e.length>0?e:void 0}function Ae(e){let t=D(e[T]);if(t!==void 0)try{let e=JSON.parse(t);if(typeof e==`object`&&e&&!Array.isArray(e))return Object.entries(e).filter(e=>ce.includes(e[0])&&typeof e[1]==`string`)}catch{}if(ke(D(e[pe])))return[];let n=[],r=D(e[fe]),i=D(e[C]),a=D(e[w]);return r!==void 0&&n.push([`HTTP_PROXY`,r]),i!==void 0&&n.push([`HTTPS_PROXY`,i]),a!==void 0&&n.push([`NO_PROXY`,a]),n}function je(e,t){for(let n of t){let t=D(e[n]);if(t!==void 0)return{name:n,value:t}}}function Me(e){let t=e[1]??``;return Oe(t)?e.slice(2):e.slice(1)}function Ne(e){try{let t=new URL(e);return t.hostname.includes(`:`)&&!t.hostname.startsWith(`[`)?`[${t.hostname}]`:t.hostname}catch{return`(unparseable proxy URL)`}}function Pe(e){try{let t=new URL(e),n=t.port||(t.protocol===`https:`?`443`:`80`),r=t.hostname.includes(`:`)&&!t.hostname.startsWith(`[`)?`[${t.hostname}]`:t.hostname;return`${t.protocol}//${r}:${n}`}catch{return`(unparseable proxy URL)`}}const Fe={right:Be,center:Ve};var Ie=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
3
+ `).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&O.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),O.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=O.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
4
+ `)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>O.stringWidth(n)&&(c+=` `.repeat(s-O.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=Fe[e[a].align];c=t(c,s),O.stringWidth(c)<s&&(c+=` `.repeat((o||0)-O.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[3]&&(i+=` `.repeat(l[3])),i+=Le(e[a],c,`| `),i+=c,i+=Le(e[a],c,` |`),l[1]&&(i+=` `.repeat(l[1])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=O.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?O.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
5
+ `):e.text.split(`
6
+ `),e.border&&(r.unshift(`.`+`-`.repeat(this.negatePadding(e)+2)+`.`),r.push(`'`+`-`.repeat(this.negatePadding(e)+2)+`'`)),e.padding&&(r.unshift(...Array(e.padding[0]||0).fill(``)),r.push(...Array(e.padding[2]||0).fill(``))),r.forEach((e,n)=>{t[n]||t.push([]);let r=t[n];for(let e=0;e<i;e++)r[e]===void 0&&r.push(``);r.push(e)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[3]||0)+(e.padding[1]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(e=>e.width||O.stringWidth(e.text));let t=e.length,n=this.width,r=e.map(e=>{if(e.width)return t--,n-=e.width,e.width}),i=t?Math.floor(n/t):0;return r.map((t,n)=>t===void 0?Math.max(i,Re(e[n])):t)}};function Le(e,t,n){return e.border?/[.']-+[.']/.test(t)?``:t.trim().length===0?` `:n:``}function Re(e){let t=e.padding||[],n=1+(t[3]||0)+(t[1]||0);return e.border?n+4:n}function ze(){return typeof process==`object`&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Be(e,t){e=e.trim();let n=O.stringWidth(e);return n<t?` `.repeat(t-n)+e:e}function Ve(e,t){e=e.trim();let n=O.stringWidth(e);return n>=t?e:` `.repeat(t-n>>1)+e}let O;function He(e,t){return O=t,new Ie({width:e?.width||ze(),wrap:e?.wrap})}function Ue({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const We=Ue();function Ge(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(We,``)}function Ke(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function qe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Je(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Ye(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Xe(e,{ambiguousAsWide:t=!1}={}){return Ye(e),qe(e)||Je(e)||t&&Ke(e)?2:1}var Ze=t(e(((exports,t)=>{t.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}))(),1);const Qe=new Intl.Segmenter,$e=/^\p{Default_Ignorable_Code_Point}$/u;function et(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=Ge(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of Qe.segment(e)){let e=t.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=8203&&e<=8207||e===65279||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||$e.test(t))continue;if((0,Ze.default)().test(t)){i+=2;continue}i+=Xe(e,a)}return i}const tt=(e=0)=>t=>`\u001B[${t+e}m`,nt=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,rt=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,k={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(k.modifier);const it=Object.keys(k.color),at=Object.keys(k.bgColor);[...it,...at];function ot(){let e=new Map;for(let[t,n]of Object.entries(k)){for(let[t,r]of Object.entries(n))k[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=k[t],e.set(r[0],r[1]);Object.defineProperty(k,t,{value:n,enumerable:!1})}return Object.defineProperty(k,`codes`,{value:e,enumerable:!1}),k.color.close=`\x1B[39m`,k.bgColor.close=`\x1B[49m`,k.color.ansi=tt(),k.color.ansi256=nt(),k.color.ansi16m=rt(),k.bgColor.ansi=tt(10),k.bgColor.ansi256=nt(10),k.bgColor.ansi16m=rt(10),Object.defineProperties(k,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>k.rgbToAnsi256(...k.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>k.ansi256ToAnsi(k.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>k.ansi256ToAnsi(k.hexToAnsi256(e)),enumerable:!1}}),k}var st=ot();const ct=new Set([`\x1B`,`›`]),lt=`]8;;`,ut=e=>`${ct.values().next().value}[${e}m`,dt=e=>`${ct.values().next().value}${lt}${e}`,ft=e=>e.split(` `).map(e=>et(e)),pt=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=et(Ge(e.at(-1)));for(let[t,s]of r.entries()){let c=et(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),ct.has(s)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===lt),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},mt=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(et(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},ht=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=ft(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s.at(-1).trimStart());let e=et(s.at(-1));if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),pt(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){pt(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){pt(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>mt(e)));let c=s.join(`
7
+ `),l=[...c],u=0;for(let[e,t]of l.entries()){if(r+=t,ct.has(t)){let{groups:e}=RegExp(`(?:\\[(?<code>\\d+)m|\\${lt}(?<uri>.*))`).exec(c.slice(u))||{groups:{}};if(e.code!==void 0){let t=Number.parseFloat(e.code);i=t===39?void 0:t}else e.uri!==void 0&&(a=e.uri.length===0?void 0:e.uri)}let n=st.codes.get(Number(i));l[e+1]===`
8
+ `?(a&&(r+=dt(``)),i&&n&&(r+=ut(n))):t===`
9
+ `&&(i&&n&&(r+=ut(i)),a&&(r+=dt(a))),u+=t.length}return r};function gt(e,t,n){return String(e).normalize().replaceAll(`\r
10
+ `,`
11
+ `).split(`
12
+ `).map(e=>ht(e,t,n)).join(`
13
+ `)}function _t(e){return He(e,{stringWidth:et,stripAnsi:Ge,wrap:gt})}function vt(e,t){let n=v(`.`,e),r;for(ne(n).isDirectory()||(n=m(n));;){if(r=t(n,te(n)),r)return v(n,r);if(n=m(r=n),r===n)break}}
14
+ /**
15
+ * @license
16
+ * Copyright (c) 2016, Contributors
17
+ * SPDX-License-Identifier: ISC
18
+ */
19
+ function yt(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf(`-`)===-1&&e.indexOf(`_`)===-1)return e;{let t=``,n=!1,r=e.match(/^-+/);for(let i=r?r[0].length:0;i<e.length;i++){let r=e.charAt(i);n&&(n=!1,r=r.toUpperCase()),i!==0&&(r===`-`||r===`_`)?n=!0:r!==`-`&&r!==`_`&&(t+=r)}return t}}function bt(e,t){let n=e.toLowerCase();t||=`-`;let r=``;for(let i=0;i<e.length;i++){let a=n.charAt(i),o=e.charAt(i);a!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function xt(e){return e==null?!1:typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}
20
+ /**
21
+ * @license
22
+ * Copyright (c) 2016, Contributors
23
+ * SPDX-License-Identifier: ISC
24
+ */
25
+ function St(e){if(Array.isArray(e))return e.map(e=>typeof e==`string`?e:e+``);e=e.trim();let t=0,n=null,r=null,i=null,a=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===` `&&!i){n!==` `&&t++;continue}r===i?i=null:(r===`'`||r===`"`)&&!i&&(i=r),a[t]||(a[t]=``),a[t]+=r}return a}
26
+ /**
27
+ * @license
28
+ * Copyright (c) 2016, Contributors
29
+ * SPDX-License-Identifier: ISC
30
+ */
31
+ var A;(function(e){e.BOOLEAN=`boolean`,e.STRING=`string`,e.NUMBER=`number`,e.ARRAY=`array`})(A||={});let j;var Ct=class{constructor(e){j=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=St(e),i=typeof e==`string`,a=wt(Object.assign(Object.create(null),n.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":`no-`,"parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),s=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o[`populate--`],d=u?`--`:`_`,f=Object.create(null),p=Object.create(null),m=n.__||j.format,h={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,ee=RegExp(`^--`+o[`negation-prefix`]+`(.+)`);[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t=typeof e==`object`?e.key:e,n=Object.keys(e).map(function(e){return{boolean:`bools`,string:`strings`,number:`numbers`}[e]}).filter(Boolean).pop();n&&(h[n][t]=!0),h.arrays[t]=!0,h.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){h.bools[e]=!0,h.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){h.strings[e]=!0,h.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){h.numbers[e]=!0,h.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){h.counts[e]=!0,h.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){h.normalize[e]=!0,h.keys.push(e)}),typeof n.narg==`object`&&Object.entries(n.narg).forEach(([e,t])=>{typeof t==`number`&&(h.nargs[e]=t,h.keys.push(e))}),typeof n.coerce==`object`&&Object.entries(n.coerce).forEach(([e,t])=>{typeof t==`function`&&(h.coercions[e]=t,h.keys.push(e))}),n.config!==void 0&&(Array.isArray(n.config)||typeof n.config==`string`?[].concat(n.config).filter(Boolean).forEach(function(e){h.configs[e]=!0}):typeof n.config==`object`&&Object.entries(n.config).forEach(([e,t])=>{(typeof t==`boolean`||typeof t==`function`)&&(h.configs[e]=t)})),pe(n.key,a,n.default,h.arrays),Object.keys(s).forEach(function(e){(h.aliases[e]||[]).forEach(function(t){s[t]=s[e]})});let _=null;Se();let v=[],y=Object.assign(Object.create(null),{_:[]}),te={};for(let e=0;e<r.length;e++){let t=r[e],n=t.replace(/^-{3,}/,`---`),i,a,s,c,l,u;if(t!==`--`&&/^-/.test(t)&&_e(t))ne(t);else if(n.match(/^---+(=|$)/)){ne(t);continue}else if(t.match(/^--.+=/)||!o[`short-option-groups`]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(T(c[1],h.arrays)?e=b(e,c[1],r,c[2]):T(c[1],h.nargs)===!1?x(c[1],c[2],!0):e=re(e,c[1],r,c[2]));else if(t.match(ee)&&o[`boolean-negation`])c=t.match(ee),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],x(a,T(a,h.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!o[`short-option-groups`]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],T(a,h.arrays)?e=b(e,a,r):T(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!l.match(/^-/)||l.match(g))&&!T(a,h.bools)&&!T(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,ye(a))):e=re(e,a,r));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&x(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(g))l=r[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],l!==void 0&&!l.match(/^-/)&&!T(a,h.bools)&&!T(a,h.counts)?(x(a,l),e++):x(a,ye(a)));else if(t.match(/^-[^-]+/)&&!t.match(g)){s=t.slice(1,-1).split(``),i=!1;for(let n=0;n<s.length;n++){if(l=t.slice(n+2),s[n+1]&&s[n+1]===`=`){u=t.slice(n+3),a=s[n],T(a,h.arrays)?e=b(e,a,r,u):T(a,h.nargs)===!1?x(a,u):e=re(e,a,r,u),i=!0;break}if(l===`-`){x(s[n],l);continue}if(/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&T(l,h.bools)===!1){x(s[n],l),i=!0;break}if(s[n+1]&&s[n+1].match(/\W/)){x(s[n],l),i=!0;break}else x(s[n],ye(s[n]))}a=t.slice(-1)[0],!i&&a!==`-`&&(T(a,h.arrays)?e=b(e,a,r):T(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!/^(-|--)[^-]/.test(l)||l.match(g))&&!T(a,h.bools)&&!T(a,h.counts)||/^(true|false)$/.test(l)?(x(a,l),e++):x(a,ye(a))):e=re(e,a,r))}else if(t.match(/^-[0-9]$/)&&t.match(g)&&T(t.slice(1),h.bools))a=t.slice(1),x(a,ye(a));else if(t===`--`){v=r.slice(e+1);break}else if(o[`halt-at-non-option`]){v=r.slice(e);break}else ne(t)}le(y,!0),le(y,!1),oe(y),ce(),fe(y,h.aliases,s,!0),ue(y),o[`set-placeholder-key`]&&de(y),Object.keys(h.counts).forEach(function(e){C(y,e.split(`.`))||x(e,0)}),u&&v.length&&(y[d]=[]),v.forEach(function(e){y[d].push(e)}),o[`camel-case-expansion`]&&o[`strip-dashed`]&&Object.keys(y).filter(e=>e!==`--`&&e.includes(`-`)).forEach(e=>{delete y[e]}),o[`strip-aliased`]&&[].concat(...Object.keys(a).map(e=>a[e])).forEach(e=>{o[`camel-case-expansion`]&&e.includes(`-`)&&delete y[e.split(`.`).map(e=>yt(e)).join(`.`)],delete y[e]});function ne(e){let t=S(`_`,e);(typeof t==`string`||typeof t==`number`)&&y._.push(t)}function re(e,t,n,r){let i,a=T(t,h.nargs);if(a=typeof a!=`number`||isNaN(a)?1:a,a===0)return E(r)||(_=Error(m(`Argument unexpected for: %s`,t))),x(t,ye(t)),e;let s=E(r)?0:1;if(o[`nargs-eats-options`])n.length-(e+1)+s<a&&(_=Error(m(`Not enough arguments following: %s`,t))),s=a;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(g)||_e(n[i]));i++)s++;s<a&&(_=Error(m(`Not enough arguments following: %s`,t)))}let c=Math.min(s,a);for(!E(r)&&c>0&&(x(t,r),c--),i=e+1;i<c+e+1;i++)x(t,n[i]);return e+c}function b(e,t,n,r){let a=[],c=r||n[e+1],l=T(t,h.nargs);if(T(t,h.bools)&&!/^(true|false)$/.test(c))a.push(!0);else if(E(c)||E(r)&&/^-/.test(c)&&!g.test(c)&&!_e(c)){if(s[t]!==void 0){let e=s[t];a=Array.isArray(e)?e:[e]}}else{E(r)||a.push(ae(t,r,!0));for(let r=e+1;r<n.length&&!(!o[`greedy-arrays`]&&a.length>0||l&&typeof l==`number`&&a.length>=l||(c=n[r],/^-/.test(c)&&!g.test(c)&&!_e(c)));r++)e=r,a.push(ae(t,c,i))}return typeof l==`number`&&(l&&a.length<l||isNaN(l)&&a.length===0)&&(_=Error(m(`Not enough arguments following: %s`,t))),x(t,a),e}function x(e,t,n=i){if(/-/.test(e)&&o[`camel-case-expansion`]){let t=e.split(`.`).map(function(e){return yt(e)}).join(`.`);ie(e,t)}let r=ae(e,t,n),a=e.split(`.`);w(y,a,r),h.aliases[e]&&h.aliases[e].forEach(function(e){let t=e.split(`.`);w(y,t,r)}),a.length>1&&o[`dot-notation`]&&(h.aliases[a[0]]||[]).forEach(function(t){let n=t.split(`.`),i=[].concat(a);i.shift(),n=n.concat(i),(h.aliases[e]||[]).includes(n.join(`.`))||w(y,n,r)}),T(e,h.normalize)&&!T(e,h.arrays)&&[e].concat(h.aliases[e]||[]).forEach(function(e){Object.defineProperty(te,e,{enumerable:!0,get(){return t},set(e){t=typeof e==`string`?j.normalize(e):e}})})}function ie(e,t){h.aliases[e]&&h.aliases[e].length||(h.aliases[e]=[t],f[t]=!0),h.aliases[t]&&h.aliases[t].length||ie(t,e)}function ae(e,t,n){n&&(t=Dt(t)),(T(e,h.bools)||T(e,h.counts))&&typeof t==`string`&&(t=t===`true`);let r=Array.isArray(t)?t.map(function(t){return S(e,t)}):S(e,t);return T(e,h.counts)&&(E(r)||typeof r==`boolean`)&&(r=Tt()),T(e,h.normalize)&&T(e,h.arrays)&&(r=Array.isArray(t)?t.map(e=>j.normalize(e)):j.normalize(t)),r}function S(e,t){return!o[`parse-positional-numbers`]&&e===`_`||!T(e,h.strings)&&!T(e,h.bools)&&!Array.isArray(t)&&(xt(t)&&o[`parse-numbers`]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!E(t)&&T(e,h.numbers))&&(t=Number(t)),t}function oe(e){let t=Object.create(null);fe(t,h.aliases,s),Object.keys(h.configs).forEach(function(n){let r=e[n]||t[n];if(r)try{let e=null,t=j.resolve(j.cwd(),r),i=h.configs[n];if(typeof i==`function`){try{e=i(t)}catch(t){e=t}if(e instanceof Error){_=e;return}}else e=j.require(t);se(e)}catch(t){t.name===`PermissionDenied`?_=t:e[n]&&(_=Error(m(`Invalid JSON config file: %s`,r)))}})}function se(e,t){Object.keys(e).forEach(function(n){let r=e[n],i=t?t+`.`+n:n;typeof r==`object`&&r&&!Array.isArray(r)&&o[`dot-notation`]?se(r,i):(!C(y,i.split(`.`))||T(i,h.arrays)&&o[`combine-arrays`])&&x(i,r)})}function ce(){c!==void 0&&c.forEach(function(e){se(e)})}function le(e,t){if(l===void 0)return;let n=typeof l==`string`?l:``,r=j.env();Object.keys(r).forEach(function(i){if(n===``||i.lastIndexOf(n,0)===0){let a=i.split(`__`).map(function(e,t){return t===0&&(e=e.substring(n.length)),yt(e)});(t&&h.configs[a.join(`.`)]||!t)&&!C(e,a)&&x(a.join(`.`),r[i])}})}function ue(e){let t,n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&(t=T(r,h.coercions),typeof t==`function`))try{let i=S(r,t(e[r]));[].concat(h.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=i})}catch(e){_=e}})}function de(e){return h.keys.forEach(t=>{~t.indexOf(`.`)||e[t]===void 0&&(e[t]=void 0)}),e}function fe(e,t,n,r=!1){Object.keys(n).forEach(function(i){C(e,i.split(`.`))||(w(e,i.split(`.`),n[i]),r&&(p[i]=!0),(t[i]||[]).forEach(function(t){C(e,t.split(`.`))||w(e,t.split(`.`),n[i])}))})}function C(e,t){let n=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return typeof n==`object`?r in n:!1}function w(e,t,n){let r=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){e=Et(e),typeof r==`object`&&r[e]===void 0&&(r[e]={}),typeof r[e]!=`object`||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]});let i=Et(t[t.length-1]),a=T(t.join(`.`),h.arrays),s=Array.isArray(n),c=o[`duplicate-arguments-array`];!c&&T(i,h.nargs)&&(c=!0,(!E(r[i])&&h.nargs[i]===1||Array.isArray(r[i])&&r[i].length===h.nargs[i])&&(r[i]=void 0)),n===Tt()?r[i]=Tt(r[i]):Array.isArray(r[i])?c&&a&&s?r[i]=o[`flatten-duplicate-arrays`]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):!c&&!!a==!!s?r[i]=n:r[i]=r[i].concat([n]):r[i]===void 0&&a?r[i]=s?n:[n]:c&&!(r[i]===void 0||T(i,h.counts)||T(i,h.bools))?r[i]=[r[i],n]:r[i]=n}function pe(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){h.aliases[e]||(h.aliases[e]=[].concat(a[e]||[]),h.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&o[`camel-case-expansion`]){let n=yt(t);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&o[`camel-case-expansion`]){let n=bt(t,`-`);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].forEach(function(t){h.aliases[t]=[e].concat(h.aliases[e].filter(function(e){return t!==e}))}))})})}function T(e,t){let n=[].concat(h.aliases[e]||[],e),r=Object.keys(t),i=n.find(e=>r.includes(e));return i?t[i]:!1}function me(e){let t=Object.keys(h);return[].concat(t.map(e=>h[e])).some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function he(e,...t){return[].concat(...t).some(function(t){let n=e.match(t);return n&&me(n[1])})}function ge(e){if(e.match(g)||!e.match(/^-[^-]+/))return!1;let t=!0,n,r=e.slice(1).split(``);for(let i=0;i<r.length;i++){if(n=e.slice(i+2),!me(r[i])){t=!1;break}if(r[i+1]&&r[i+1]===`=`||n===`-`||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(n)||r[i+1]&&r[i+1].match(/\W/))break}return t}function _e(e){return o[`unknown-options-as-args`]&&ve(e)}function ve(e){return e=e.replace(/^-{3,}/,`--`),e.match(g)||ge(e)?!1:!he(e,/^-+([^=]+?)=[\s\S]*$/,ee,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ye(e){return!T(e,h.bools)&&!T(e,h.counts)&&`${e}`in s?s[e]:be(xe(e))}function be(e){return{[A.BOOLEAN]:!0,[A.STRING]:``,[A.NUMBER]:void 0,[A.ARRAY]:[]}[e]}function xe(e){let t=A.BOOLEAN;return T(e,h.strings)?t=A.STRING:T(e,h.numbers)?t=A.NUMBER:T(e,h.bools)?t=A.BOOLEAN:T(e,h.arrays)&&(t=A.ARRAY),t}function E(e){return e===void 0}function Se(){Object.keys(h.counts).find(e=>T(e,h.arrays)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.array.`,e)),!0):T(e,h.nargs)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.narg.`,e)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(te,y),configuration:o,defaulted:Object.assign({},p),error:_,newAliases:Object.assign({},f)}}};function wt(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++)if(t[e].filter(function(e){return t[n].indexOf(e)!==-1}).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}return t.forEach(function(e){e=e.filter(function(e,t,n){return n.indexOf(e)===t});let t=e.pop();t!==void 0&&typeof t==`string`&&(n[t]=e)}),n}function Tt(e){return e===void 0?1:e+1}function Et(e){return e===`__proto__`?`___proto___`:e}function Dt(e){return typeof e==`string`&&(e[0]===`'`||e[0]===`"`)&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}const Ot=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,kt=(process==null?void 0:process.versions)?.node??(process==null?void 0:process.version)?.slice(1);if(kt&&Number(kt.match(/^([^.]+)/)[1])<Ot)throw Error(`yargs parser supports a minimum Node.js version of ${Ot}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const At=process?process.env:{},jt=a?a(import.meta.url):void 0,Mt=new Ct({cwd:process.cwd,env:()=>At,format:c,normalize:ee,resolve:v,require:e=>{if(jt!==void 0)return jt(e);if(e.match(/\.json$/))return JSON.parse(y(e,`utf8`));throw Error(`only .json config files are supported in ESM`)}}),Nt=function(e,t){return Mt.parse(e.slice(),t).argv};Nt.detailed=function(e,t){return Mt.parse(e.slice(),t)},Nt.camelCase=yt,Nt.decamelize=bt,Nt.looksLikeNumber=xt;var Pt=Nt;function Ft(){return It()?0:1}function It(){return Lt()&&!process.defaultApp}function Lt(){return!!process.versions.electron}function Rt(e){return e.slice(Ft()+1)}function zt(){return process.argv[Ft()]}var Bt={fs:{readFileSync:y,writeFile:re},format:c,resolve:v,exists:e=>{try{return ne(e).isFile()}catch{return!1}}};let M;var Vt=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles==`boolean`?e.updateFiles:!0,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage==`boolean`?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),n||=function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),M.format.apply(M.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;this.cache[this.locale][t]&&(a=this.cache[this.locale][t][r===1?`one`:`other`]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[a];return~a.indexOf(`%d`)&&o.push(r),M.format.apply(M.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){for(let t in this.cache[this.locale]||this._readLocaleFile(),e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n=``;return e.forEach(function(e,r){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);M.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{M.fs.readFileSync&&(e=JSON.parse(M.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=M.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=M.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return M.exists(e)}};function Ht(e,t){M=t;let n=new Vt(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var Ut=e=>Ht(e,Bt),Wt=t(e(((exports,t)=>{t.exports=function(e){if(e===void 0&&(e=2),e>=Error.stackTraceLimit)throw TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+e+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var n=Error().stack;if(Error.prepareStackTrace=t,typeof n==`object`&&n)return n[e]?n[e].getFileName():void 0}}))(),1);const Gt=b(import.meta.url),Kt=Gt.substring(0,Gt.lastIndexOf(`node_modules`)),qt=a(import.meta.url);var Jt={assert:{notStrictEqual:d,strictEqual:f},cliui:_t,findUp:vt,getEnv:e=>process.env[e],inspect:l,getProcessArgvBin:zt,mainFilename:Kt||process.cwd(),Parser:Pt,path:{basename:p,dirname:m,extname:h,relative:_,resolve:v,join:g},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:e=>{process.exit(e)},nextTick:process.nextTick,stdColumns:process.stdout.columns===void 0?null:process.stdout.columns},readFileSync:o,readdirSync:s,require:qt,getCallerFile:()=>{let e=(0,Wt.default)(3);return e.match(/^file:\/\//)?b(e):e},stringWidth:et,y18n:Ut({directory:v(Gt,`../../../locales`),updateFiles:!1})};function N(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function Yt(e,t){t.assert.strictEqual(typeof e,`string`)}function Xt(e){return Object.keys(e)}function P(e){return!!e&&!!e.then&&typeof e.then==`function`}var F=class e extends Error{constructor(t){super(t||`yargs error`),this.name=`YError`,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Zt(e){let t=e.replace(/\s{2,}/g,` `).split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw Error(`No command found in: ${e}`);let i={cmd:r.replace(n,``),demanded:[],optional:[]};return t.forEach((e,r)=>{let a=!1;e=e.replace(/\s/g,``),/\.+[\]>]/.test(e)&&r===t.length-1&&(a=!0),/^\[/.test(e)?i.optional.push({cmd:e.replace(n,``).split(`|`),variadic:a}):i.demanded.push({cmd:e.replace(n,``).split(`|`),variadic:a})}),i}const Qt=[`first`,`second`,`third`,`fourth`,`fifth`,`sixth`];function I(e,t,n){function r(){return typeof e==`object`?[{demanded:[],optional:[]},e,t]:[Zt(`cmd ${e}`),t,n]}try{let e=0,[t,n,i]=r(),a=[].slice.call(n);for(;a.length&&a[a.length-1]===void 0;)a.pop();let o=i||a.length;if(o<t.demanded.length)throw new F(`Not enough arguments provided. Expected ${t.demanded.length} but received ${a.length}.`);let s=t.demanded.length+t.optional.length;if(o>s)throw new F(`Too many arguments provided. Expected max ${s} but received ${o}.`);t.demanded.forEach(t=>{let n=a.shift(),r=$t(n);t.cmd.filter(e=>e===r||e===`*`).length===0&&en(r,t.cmd,e),e+=1}),t.optional.forEach(t=>{if(a.length===0)return;let n=a.shift(),r=$t(n);t.cmd.filter(e=>e===r||e===`*`).length===0&&en(r,t.cmd,e),e+=1})}catch(e){console.warn(e.stack)}}function $t(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function en(e,t,n){throw new F(`Invalid ${Qt[n]||`manyith`} argument. Expected ${t.join(` or `)} but received ${e}.`)}var tn=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(I(`<array|function> [boolean] [boolean] [boolean]`,[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if(typeof e[r]!=`function`)throw Error(`middleware must be a function`);let i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e==`function`){let i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(e=>{let r=[...n[t]||[],t];return e.option?!r.includes(e.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function nn(e){return e?e.map(e=>(e.applyBeforeValidation=!1,e)):[]}function rn(e,t,n,r){return n.reduce((e,n)=>{if(n.applyBeforeValidation!==r)return e;if(n.mutates){if(n.applied)return e;n.applied=!0}if(P(e))return e.then(e=>Promise.all([e,n(e,t)])).then(([e,t])=>Object.assign(e,t));{let r=n(e,t);return P(r)?r.then(t=>Object.assign(e,t)):Object.assign(e,r)}},e)}function an(e,t,n=e=>{throw e}){try{let n=on(e)?e():e;return P(n)?n.then(e=>t(e)):t(n)}catch(e){return n(e)}}function on(e){return typeof e==`function`}const sn=/(^\*)|(^\$0)/;var cn=class{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){r||={},this.requireCache.add(n);let i=this.shim.path.resolve(this.shim.path.dirname(n),e),a=this.shim.readdirSync(i,{recursive:!!r.recurse});Array.isArray(r.extensions)||(r.extensions=[`js`]);let o=typeof r.visit==`function`?r.visit:e=>e;for(let e of a){let n=e.toString();if(r.exclude){let e=!1;if(e=typeof r.exclude==`function`?r.exclude(n):r.exclude.test(n),e)continue}if(r.include){let e=!1;if(e=typeof r.include==`function`?r.include(n):r.include.test(n),!e)continue}let a=!1;for(let e of r.extensions)n.endsWith(e)&&(a=!0);if(a){let e=this.shim.path.join(i,n),r=t(e),a=Object.create(null,Object.getOwnPropertyDescriptors({...r}));if(o(a,e,n)){if(this.requireCache.has(e))continue;this.requireCache.add(e),a.command||=this.shim.path.basename(e,this.shim.path.extname(e)),this.addHandler(a)}}}}addHandler(e,t,n,r,i,a){let o=[],s=nn(i);if(r||=(()=>{}),Array.isArray(e))if(dn(e))[e,...o]=e;else for(let t of e)this.addHandler(t);else if(mn(e)){let t=Array.isArray(e.command)||typeof e.command==`string`?e.command:null;if(t===null)throw Error(`No command name given for module: ${this.shim.inspect(e)}`);e.aliases&&(t=[].concat(t,e.aliases)),this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(un(n)){this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e==`string`){let i=Zt(e);o=o.map(e=>Zt(e).cmd);let c=!1,l=[i.cmd].concat(o).filter(e=>sn.test(e)?(c=!0,!1):!0);l.length===0&&c&&l.push(`$0`),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(sn,i.cmd)),o.forEach(e=>{this.aliasMap[e]=i.cmd}),t!==!1&&this.usage.command(e,t,c,o,a),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:s,deprecated:a,demanded:i.demanded,optional:i.optional},c&&(this.defaultCommand=this.handlers[i.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,i,a){let o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,s=t.getInternalMethods().getContext(),c=s.commands.slice(),l=!e;e&&(s.commands.push(e),s.fullCommands.push(o.original));let u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,a);return P(u)?u.then(e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,s,i,e.aliases,t)):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,s,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,a,o,s){let c=t.builder,l=n;if(fn(c)){n.getInternalMethods().getUsageInstance().freeze();let u=c(n.getInternalMethods().reset(r),s);if(P(u))return u.then(r=>(l=Br(r)?r:n,this.parseAndUpdateUsage(e,t,l,i,a,o)))}else pn(c)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(e=>{l.option(e,c[e])}));return this.parseAndUpdateUsage(e,t,l,i,a,o)}parseAndUpdateUsage(e,t,n,r,i,a){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,a);return P(o)?o.then(e=>({aliases:n.parsed.aliases,innerArgv:e})):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=sn.test(t.original)?t.original.replace(sn,``).trim():t.original,r=e.filter(e=>!sn.test(e));return r.push(n),`$0 ${r.join(` `)}`}handleValidationAndGetResult(e,t,n,r,i,a,o,s){if(!a.getInternalMethods().getHasOutput()){let t=a.getInternalMethods().runValidation(i,s,a.parsed.error,e);n=an(n,e=>(t(e),e))}if(t.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let r=!!a.getOptions().configuration[`populate--`];a.getInternalMethods().postProcess(n,r,!1,!1),n=rn(n,a,o,!1),n=an(n,e=>{let n=t.handler(e);return P(n)?n.then(()=>e):e}),e||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),P(n)&&!a.getInternalMethods().hasParseCallback()&&n.catch(e=>{try{a.getInternalMethods().getUsageInstance().fail(null,e)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,a,o){let s={};if(i)return n;o.getInternalMethods().getHasOutput()||(s=this.populatePositionals(t,n,r,o));let c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=rn(n,o,c,!0);return P(l)?l.then(n=>this.handleValidationAndGetResult(e,t,n,r,a,o,c,s)):this.handleValidationAndGetResult(e,t,l,r,a,o,c,s)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let i=e.demanded.slice(0),a=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){let e=i.shift();this.populatePositional(e,t,o)}for(;a.length;){let e=a.shift();this.populatePositional(e,t,o)}return t._=n.commands.concat(t._.map(e=>``+e)),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),r),o}populatePositional(e,t,n){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=Zt(e);return n.demanded.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r,t.demand[n]=!0}),n.optional.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r}),t}postProcessPositionals(e,t,n,r){let i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(let e of Object.keys(n.alias))i.alias[e]=(i.alias[e]||[]).concat(n.alias[e]);i.array=i.array.concat(n.array),i.config={};let a=[];if(Object.keys(t).forEach(e=>{t[e].map(t=>{i.configuration[`unknown-options-as-args`]&&(i.key[e]=!0),a.push(`--${e}`),a.push(t)})}),!a.length)return;let o=Object.assign({},i.configuration,{"populate--":!1}),s=this.shim.Parser.detailed(a,Object.assign({},i,{configuration:o}));if(s.error)r.getInternalMethods().getUsageInstance().fail(s.error.message,s.error);else{let n=Object.keys(t);Object.keys(t).forEach(e=>{n.push(...s.aliases[e])}),Object.keys(s.argv).forEach(i=>{n.includes(i)&&(t[i]||(t[i]=s.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(s.argv,i)&&(Array.isArray(e[i])||Array.isArray(s.argv[i]))?e[i]=[].concat(e[i],s.argv[i]):e[i]=s.argv[i])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:n}=e.getOptions();return n.some(e=>Object.prototype.hasOwnProperty.call(e,t))||n.some(e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let t=sn.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,`$0 `);e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(fn(t))return t(e,!0);un(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r==`string`||r===!1)return r;N(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();N(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function ln(e,t,n,r){return new cn(e,t,n,r)}function un(e){return typeof e==`object`&&!!e.builder&&typeof e.handler==`function`}function dn(e){return e.every(e=>typeof e==`string`)}function fn(e){return typeof e==`function`}function pn(e){return typeof e==`object`}function mn(e){return typeof e==`object`&&!Array.isArray(e)}function hn(e={},t=()=>!0){let n={};return Xt(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}function gn(e){typeof process>`u`||[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking==`function`&&n._handle.setBlocking(e)})}function _n(e){return typeof e==`boolean`}function vn(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let a=null,o=null,s=!0;r.showHelpOnFail=function(t=!0,n){let[i,c]=typeof t==`string`?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),a=c,s=i,r};let c=!1;r.fail=function(t,n){let l=e.getInternalMethods().getLoggerInstance();if(i.length)for(let e=i.length-1;e>=0;--e){let a=i[e];if(_n(a)){if(n)throw n;if(t)throw Error(t)}else a(t,n,r)}else{if(e.getExitProcess()&&gn(!0),!c){c=!0,s&&(e.showHelp(`error`),l.error()),(t||n)&&l.error(t||n);let r=a||o;r&&((t||n)&&l.error(``),l.error(r))}if(n||=new F(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}};let l=[],u=!1;r.usage=(e,t)=>e===null?(u=!0,l=[],r):(u=!1,l.push([e,t||``]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>u,r.getPositionalGroupName=()=>n(`Positionals:`);let d=[];r.example=(e,t)=>{d.push([e,t||``])};let f=[];r.command=function(e,t,n,r,i=!1){n&&(f=f.map(e=>(e[2]=!1,e))),f.push([e,t||``,n,r,i])},r.getCommands=()=>f;let p={};r.describe=function(e,t){Array.isArray(e)?e.forEach(e=>{r.describe(e,t)}):typeof e==`object`?Object.keys(e).forEach(t=>{r.describe(t,e[t])}):p[e]=t},r.getDescriptions=()=>p;let m=[];r.epilog=e=>{m.push(e)};let h=!1,g;r.wrap=e=>{h=!0,g=e},r.getWrap=()=>t.getEnv(`YARGS_DISABLE_WRAP`)?null:(h||=(g=b(),!0),g);let ee=`__yargsString__:`;r.deferY18nLookup=e=>ee+e,r.help=function(){if(y)return y;v();let i=e.customScriptName?e.$0:t.path.basename(e.$0),a=e.getDemandedOptions(),o=e.getDemandedCommands(),s=e.getDeprecatedOptions(),c=e.getGroups(),h=e.getOptions(),g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(a)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(h.default)),g=g.filter(ne),g=Object.keys(g.reduce((e,t)=>(t!==`_`&&(e[t]=!0),e),{}));let b=r.getWrap(),x=t.cliui({width:b,wrap:!!b});if(!u){if(l.length)l.forEach(e=>{x.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&x.div({text:`${e[1]}`,padding:[1,0,0,0]})}),x.div();else if(f.length){let e=null;e=o._?`${i} <${n(`command`)}>\n`:`${i} [${n(`command`)}]\n`,x.div(`${e}`)}}if(f.length>1||f.length===1&&!f[0][2]){x.div(n(`Commands:`));let t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(` `)} `:``;e.getInternalMethods().getParserConfiguration()[`sort-commands`]===!0&&(f=f.sort((e,t)=>e[0].localeCompare(t[0])));let a=i?`${i} `:``;f.forEach(e=>{let t=`${a}${r}${e[0].replace(/^\$0 ?/,``)}`;x.span({text:t,padding:[0,2,0,2],width:_(f,b,`${i}${r}`)+4},{text:e[1]});let o=[];e[2]&&o.push(`[${n(`default`)}]`),e[3]&&e[3].length&&o.push(`[${n(`aliases:`)} ${e[3].join(`, `)}]`),e[4]&&(typeof e[4]==`string`?o.push(`[${n(`deprecated: %s`,e[4])}]`):o.push(`[${n(`deprecated`)}]`)),o.length?x.div({text:o.join(` `),padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}let ie=(Object.keys(h.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter(t=>!e.parsed.newAliases[t]&&ie.every(e=>(h.alias[e]||[]).indexOf(t)===-1));let ae=n(`Options:`);c[ae]||(c[ae]=[]),te(g,h.alias,c,ae);let S=e=>/^--/.test(Sn(e)),oe=Object.keys(c).filter(e=>c[e].length>0).map(e=>{let t=c[e].filter(ne).map(e=>{if(ie.includes(e))return e;for(let t=0,n;(n=ie[t])!==void 0;t++)if((h.alias[n]||[]).includes(e))return n;return e});return{groupName:e,normalizedKeys:t}}).filter(({normalizedKeys:e})=>e.length>0).map(({groupName:e,normalizedKeys:t})=>{let n=t.reduce((t,n)=>(t[n]=[n].concat(h.alias[n]||[]).map(t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?h.boolean.includes(n)?`-`:`--`:t.length>1?`--`:`-`)+t).sort((e,t)=>S(e)===S(t)?0:S(e)?1:-1).join(`, `),t),{});return{groupName:e,normalizedKeys:t,switches:n}});if(oe.filter(({groupName:e})=>e!==r.getPositionalGroupName()).some(({normalizedKeys:e,switches:t})=>!e.every(e=>S(t[e])))&&oe.filter(({groupName:e})=>e!==r.getPositionalGroupName()).forEach(({normalizedKeys:e,switches:t})=>{e.forEach(e=>{S(t[e])&&(t[e]=bn(t[e],4))})}),oe.forEach(({groupName:t,normalizedKeys:i,switches:o})=>{x.div(t),i.forEach(t=>{let i=o[t],c=p[t]||``,l=null;c.includes(ee)&&(c=n(c.substring(16))),h.boolean.includes(t)&&(l=`[${n(`boolean`)}]`),h.count.includes(t)&&(l=`[${n(`count`)}]`),h.string.includes(t)&&(l=`[${n(`string`)}]`),h.normalize.includes(t)&&(l=`[${n(`string`)}]`),h.array.includes(t)&&(l=`[${n(`array`)}]`),h.number.includes(t)&&(l=`[${n(`number`)}]`);let u=[t in s?(e=>typeof e==`string`?`[${n(`deprecated: %s`,e)}]`:`[${n(`deprecated`)}]`)(s[t]):null,l,t in a?`[${n(`required`)}]`:null,h.choices&&h.choices[t]?`[${n(`choices:`)} ${r.stringifiedValues(h.choices[t])}]`:null,re(h.default[t],h.defaultDescription[t])].filter(Boolean).join(` `);x.span({text:Sn(i),padding:[0,2,0,2+xn(i)],width:_(o,b)+4},c);let d=e.getInternalMethods().getUsageConfiguration()[`hide-types`]===!0;u&&!d?x.div({text:u,padding:[0,0,0,2],align:`right`}):x.div()}),x.div()}),d.length&&(x.div(n(`Examples:`)),d.forEach(e=>{e[0]=e[0].replace(/\$0/g,i)}),d.forEach(e=>{e[1]===``?x.div({text:e[0],padding:[0,2,0,2]}):x.div({text:e[0],padding:[0,2,0,2],width:_(d,b)+4},{text:e[1]})}),x.div()),m.length>0){let e=m.map(e=>e.replace(/\$0/g,i)).join(`
32
+ `);x.div(`${e}\n`)}return x.toString().replace(/\s*$/,``)};function _(e,n,r){let i=0;return Array.isArray(e)||(e=Object.values(e).map(e=>[e])),e.forEach(e=>{i=Math.max(t.stringWidth(r?`${r} ${Sn(e[0])}`:Sn(e[0]))+xn(e[0]),i)}),n&&(i=Math.min(i,parseInt((n*.5).toString(),10))),i}function v(){let t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach(i=>{n.alias[i].forEach(a=>{p[a]&&r.describe(i,p[a]),a in t&&e.demandOption(i,t[a]),n.boolean.includes(a)&&e.boolean(i),n.count.includes(a)&&e.count(i),n.string.includes(a)&&e.string(i),n.normalize.includes(a)&&e.normalize(i),n.array.includes(a)&&e.array(i),n.number.includes(a)&&e.number(i)})})}let y;r.cacheHelpMessage=function(){y=this.help()},r.clearCachedHelpMessage=function(){y=void 0},r.hasCachedHelpMessage=function(){return!!y};function te(e,t,n,r){let i=[],a=null;return Object.keys(n).forEach(e=>{i=i.concat(n[e])}),e.forEach(e=>{a=[e].concat(t[e]),a.some(e=>i.indexOf(e)!==-1)||n[r].push(e)}),i}function ne(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`,(typeof t==`function`?t:n[t])(r.help())},r.functionDescription=e=>[`(`,e.name?t.Parser.decamelize(e.name,`-`):n(`generated-value`),`)`].join(``),r.stringifiedValues=function(e,t){let n=``,r=t||`, `,i=[].concat(e);return!e||!i.length||i.forEach(e=>{n.length&&(n+=r),n+=JSON.stringify(e)}),n};function re(e,t){let r=`[${n(`default:`)} `;if(e===void 0&&!t)return null;if(t)r+=t;else switch(typeof e){case`string`:r+=`"${e}"`;break;case`object`:r+=JSON.stringify(e);break;default:r+=e}return`${r}]`}function b(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let x=null;r.version=e=>{x=e},r.showVersion=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`,(typeof t==`function`?t:n[t])(x)},r.reset=function(e){return a=null,c=!1,l=[],u=!1,m=[],d=[],f=[],p=hn(p,t=>!e[t]),r};let ie=[];return r.freeze=function(){ie.push({failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p})},r.unfreeze=function(e=!1){let t=ie.pop();t&&(e?(p={...t.descriptions,...p},f=[...t.commands,...f],l=[...t.usages,...l],d=[...t.examples,...d],m=[...t.epilogs,...m]):{failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p}=t)},r}function yn(e){return typeof e==`object`}function bn(e,t){return yn(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function xn(e){return yn(e)?e.indentation:0}function Sn(e){return yn(e)?e.text:e}var Cn=class{constructor(e,t,n,r){this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey=`get-yargs-completions`,this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(this.shim.getEnv(`SHELL`)?.includes(`zsh`)||this.shim.getEnv(`ZSH_NAME`)?.includes(`zsh`))??!1}defaultCompletion(e,t,n,r){let i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){let n=i[e[t]].builder;if(fn(n)){this.indexAfterLastReset=t+1;let e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}let a=[];this.commandCompletions(a,e,n),this.optionCompletions(a,e,t,n),this.choicesFromOptionsCompletions(a,e,t,n),this.choicesFromPositionalsCompletions(a,e,t,n),r(null,a)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(n=>{let r=Zt(n[0]).cmd;if(t.indexOf(r)===-1)if(!this.zshShell)e.push(r);else{let t=n[1]||``;e.push(r.replace(/:/g,`\\:`)+`:`+t)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===``&&e.length===0)&&!this.previousArgHasChoices(t)){let n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach(a=>{let o=!!n.configuration[`boolean-negation`]&&n.boolean.includes(a);!i.includes(a)&&!n.hiddenOptions.includes(a)&&!this.argsContainKey(t,a,o)&&this.completeOptionKey(a,e,r,o&&!!n.default[a])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let n=this.getPreviousArgChoices(t);n&&n.length>0&&e.push(...n.map(e=>e.replace(/:/g,`\\:`)))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===``&&e.length>0&&this.previousArgHasChoices(t))return;let i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-a-1];if(!o)return;let s=this.yargs.getOptions().choices[o]||[];for(let t of s)t.startsWith(r)&&e.push(t.replace(/:/g,`\\:`))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n=``;if(!t.startsWith(`-`)&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith(`-`))return;let r=t.replace(/^-+/,``),i=this.yargs.getOptions(),a=[r,...this.yargs.getAliases()[r]||[]],o;for(let e of a)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}if(o)return o.filter(e=>!n||e.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=t=>e.indexOf((/^[^0-9]$/.test(t)?`-`:`--`)+t)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let e of this.aliases[t])if(r(e))return!0}return!1}completeOptionKey(e,t,n,r){let i=e;if(this.zshShell){let t=this.usage.getDescriptions(),n=((this===null||this===void 0?void 0:this.aliases)?.[e])?.find(e=>{let n=t[e];return typeof n==`string`&&n.length>0}),r=n?t[n]:void 0,a=t[e]??r??``;i=`${e.replace(/:/g,`\\:`)}:${a.replace(`__yargsString__:`,``).replace(/(\r\n|\n|\r)/gm,` `)}`}let a=!(e=>/^--/.test(e))(n)&&(e=>/^[^0-9]$/.test(e))(e)?`-`:`--`;t.push(a+i),r&&t.push(a+`no-`+i)}customCompletion(e,t,n,r){if(N(this.customCompletionFunction,null,this.shim),Tn(this.customCompletionFunction)){let e=this.customCompletionFunction(n,t);return P(e)?e.then(e=>{this.shim.process.nextTick(()=>{r(null,e)})}).catch(e=>{this.shim.process.nextTick(()=>{r(e,void 0)})}):r(null,e)}else if(En(this.customCompletionFunction))return this.customCompletionFunction(n,t,(i=r)=>this.defaultCompletion(e,t,n,i),e=>{r(null,e)});else return this.customCompletionFunction(n,t,e=>{r(null,e)})}getCompletion(e,t){let n=e.length?e[e.length-1]:``,r=this.yargs.parse(e,!0),i=this.customCompletionFunction?r=>this.customCompletion(e,r,n,t):r=>this.defaultCompletion(e,r,n,t);return P(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=this.zshShell?`#compdef {{app_name}}
33
+ ###-begin-{{app_name}}-completions-###
34
+ #
35
+ # yargs command completion script
36
+ #
37
+ # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
38
+ # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
39
+ #
40
+ _{{app_name}}_yargs_completions()
41
+ {
42
+ local reply
43
+ local si=$IFS
44
+ IFS=$'
45
+ ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
46
+ IFS=$si
47
+ if [[ \${#reply} -gt 0 ]]; then
48
+ _describe 'values' reply
49
+ else
50
+ _default
51
+ fi
52
+ }
53
+ if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
54
+ _{{app_name}}_yargs_completions "$@"
55
+ else
56
+ compdef _{{app_name}}_yargs_completions {{app_name}}
57
+ fi
58
+ ###-end-{{app_name}}-completions-###
59
+ `:`###-begin-{{app_name}}-completions-###
60
+ #
61
+ # yargs command completion script
62
+ #
63
+ # Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
64
+ # or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
65
+ #
66
+ _{{app_name}}_yargs_completions()
67
+ {
68
+ local cur_word args type_list
69
+
70
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
71
+ args=("\${COMP_WORDS[@]}")
72
+
73
+ # ask yargs to generate completions.
74
+ # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk
75
+ mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}")
76
+ mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" |
77
+ awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }')
78
+
79
+ # if no match was found, fall back to filename completion
80
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
81
+ COMPREPLY=()
82
+ fi
83
+
84
+ return 0
85
+ }
86
+ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
87
+ ###-end-{{app_name}}-completions-###
88
+ `,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function wn(e,t,n,r){return new Cn(e,t,n,r)}function Tn(e){return e.length<3}function En(e){return e.length>3}function Dn(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}const On=[`$0`,`--`,`_`];function kn(e,t,n){let r=n.y18n.__,i=n.y18n.__n,a={};a.nonOptionCount=function(n){let r=e.getDemandedCommands(),a=n._.length+(n[`--`]?n[`--`].length:0)-e.getInternalMethods().getContext().commands.length;r._&&(a<r._.min||a>r._.max)&&(a<r._.min?r._.minMsg===void 0?t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,a,a.toString(),r._.min.toString())):t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,a.toString()).replace(/\$1/,r._.min.toString()):null):a>r._.max&&(r._.maxMsg===void 0?t.fail(i(`Too many non-option arguments: got %s, maximum of %s`,`Too many non-option arguments: got %s, maximum of %s`,a,a.toString(),r._.max.toString())):t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,a.toString()).replace(/\$1/,r._.max.toString()):null)))},a.positionalCount=function(e,n){n<e&&t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,n,n+``,e+``))},a.requiredArguments=function(e,n){let r=null;for(let t of Object.keys(n))(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&(r||={},r[t]=n[t]);if(r){let e=[];for(let t of Object.keys(r)){let n=r[t];n&&e.indexOf(n)<0&&e.push(n)}let n=e.length?`\n${e.join(`
89
+ `)}`:``;t.fail(i(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(r).length,Object.keys(r).join(`, `)+n))}},a.unknownArguments=function(n,r,o,s,c=!0){let l=e.getInternalMethods().getCommandInstance().getCommands(),u=[],d=e.getInternalMethods().getContext();if(Object.keys(n).forEach(t=>{!On.includes(t)&&!Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)&&!a.isValidAndSomeAliasIsNotNew(t,r)&&u.push(t)}),c&&(d.commands.length>0||l.length>0||s)&&n._.slice(d.commands.length).forEach(e=>{l.includes(``+e)||u.push(``+e)}),c){let t=e.getDemandedCommands()._?.max||0,r=d.commands.length+t;r<n._.length&&n._.slice(r).forEach(e=>{e=String(e),!d.commands.includes(e)&&!u.includes(e)&&u.push(e)})}u.length&&t.fail(i(`Unknown argument: %s`,`Unknown arguments: %s`,u.length,u.map(e=>e.trim()?e:`"${e}"`).join(`, `)))},a.unknownCommands=function(n){let r=e.getInternalMethods().getCommandInstance().getCommands(),a=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach(e=>{r.includes(``+e)||a.push(``+e)}),a.length>0?(t.fail(i(`Unknown command: %s`,`Unknown commands: %s`,a.length,a.join(`, `))),!0):!1},a.isValidAndSomeAliasIsNotNew=function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;let r=e.parsed.newAliases;return[t,...n[t]].some(e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t])},a.limitedChoices=function(n){let i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{On.indexOf(e)===-1&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach(t=>{i.choices[e].indexOf(t)===-1&&t!==void 0&&(a[e]=(a[e]||[]).concat(t))})});let o=Object.keys(a);if(!o.length)return;let s=r(`Invalid values:`);o.forEach(e=>{s+=`\n ${r(`Argument: %s, Given: %s, Choices: %s`,e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(s)};let o={};a.implies=function(t,r){I(`<string|object> [array|number|string]`,[t,r],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach(e=>a.implies(t,e)):(N(r,void 0,n),o[t].push(r)))},a.getImplied=function(){return o};function s(e,t){let n=Number(t);return t=isNaN(n)?t:n,typeof t==`number`?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}a.implications=function(e){let n=[];if(Object.keys(o).forEach(t=>{let r=t;(o[t]||[]).forEach(t=>{let i=r,a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r(`Implications failed:`)}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let c={};a.conflicts=function(t,n){I(`<string|object> [array|string]`,[t,n],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):c[t].push(n))},a.getConflicting=()=>c,a.conflicting=function(i){Object.keys(i).forEach(e=>{c[e]&&c[e].forEach(n=>{n&&i[e]!==void 0&&i[n]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,n))})}),e.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(c).forEach(e=>{c[e].forEach(a=>{a&&i[n.Parser.camelCase(e)]!==void 0&&i[n.Parser.camelCase(a)]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,a))})})},a.recommendCommands=function(e,n){n=n.sort((e,t)=>t.length-e.length);let i=null,a=1/0;for(let t=0,r;(r=n[t])!==void 0;t++){let t=Dn(e,r);t<=3&&t<a&&(a=t,i=r)}i&&t.fail(r(`Did you mean %s?`,i))},a.reset=function(e){return o=hn(o,t=>!e[t]),c=hn(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();N(e,void 0,n),{implied:o,conflicting:c}=e},a}let An=[],jn;function Mn(e,t,n,r){jn=r;let i={};if(Object.prototype.hasOwnProperty.call(e,`extends`)){if(typeof e.extends!=`string`)return i;let a=/\.json|\..*rc$/.test(e.extends),o=null;if(a)o=Pn(t,e.extends);else try{o=import.meta.resolve(e.extends)}catch{return e}Nn(o),An.push(o),i=a?JSON.parse(jn.readFileSync(o,`utf8`)):r.require(e.extends),delete e.extends,i=Mn(i,jn.path.dirname(o),n,jn)}return An=[],n?Fn(i,e):Object.assign({},i,e)}function Nn(e){if(An.indexOf(e)>-1)throw new F(`Circular extended configurations: '${e}'.`)}function Pn(e,t){return jn.path.resolve(e,t)}function Fn(e,t){let n={};function r(e){return e&&typeof e==`object`&&!Array.isArray(e)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=Fn(e[i],t[i]):n[i]=t[i];return n}var L=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},R=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},z,In,Ln,B,V,Rn,zn,Bn,Vn,H,Hn,U,W,G,K,Un,Wn,q,J,Gn,Kn,Y,qn,Jn,Yn,Xn,Zn,X,Qn,$n,er,Z,tr,Q,$;function nr(e){return(t=[],n=e.process.cwd(),r)=>{let i=new zr(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const rr=Symbol(`copyDoubleDash`),ir=Symbol(`copyDoubleDash`),ar=Symbol(`deleteFromParserHintObject`),or=Symbol(`emitWarning`),sr=Symbol(`freeze`),cr=Symbol(`getDollarZero`),lr=Symbol(`getParserConfiguration`),ur=Symbol(`getUsageConfiguration`),dr=Symbol(`guessLocale`),fr=Symbol(`guessVersion`),pr=Symbol(`parsePositionalNumbers`),mr=Symbol(`pkgUp`),hr=Symbol(`populateParserHintArray`),gr=Symbol(`populateParserHintSingleValueDictionary`),_r=Symbol(`populateParserHintArrayDictionary`),vr=Symbol(`populateParserHintDictionary`),yr=Symbol(`sanitizeKey`),br=Symbol(`setKey`),xr=Symbol(`unfreeze`),Sr=Symbol(`validateAsync`),Cr=Symbol(`getCommandInstance`),wr=Symbol(`getContext`),Tr=Symbol(`getHasOutput`),Er=Symbol(`getLoggerInstance`),Dr=Symbol(`getParseContext`),Or=Symbol(`getUsageInstance`),kr=Symbol(`getValidationInstance`),Ar=Symbol(`hasParseCallback`),jr=Symbol(`isGlobalContext`),Mr=Symbol(`postProcess`),Nr=Symbol(`rebase`),Pr=Symbol(`reset`),Fr=Symbol(`runYargsParserAndExecuteCommands`),Ir=Symbol(`runValidation`),Lr=Symbol(`setHasOutput`),Rr=Symbol(`kTrackManuallySetKeys`);var zr=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,z.set(this,void 0),In.set(this,void 0),Ln.set(this,{commands:[],fullCommands:[]}),B.set(this,null),V.set(this,null),Rn.set(this,`show-hidden`),zn.set(this,null),Bn.set(this,!0),Vn.set(this,{}),H.set(this,!0),Hn.set(this,[]),U.set(this,void 0),W.set(this,{}),G.set(this,!1),K.set(this,null),Un.set(this,!0),Wn.set(this,void 0),q.set(this,``),J.set(this,void 0),Gn.set(this,void 0),Kn.set(this,{}),Y.set(this,null),qn.set(this,null),Jn.set(this,{}),Yn.set(this,{}),Xn.set(this,void 0),Zn.set(this,!1),X.set(this,void 0),Qn.set(this,!1),$n.set(this,!1),er.set(this,!1),Z.set(this,void 0),tr.set(this,{}),Q.set(this,null),$.set(this,void 0),L(this,X,r,`f`),L(this,Xn,e,`f`),L(this,In,t,`f`),L(this,Gn,n,`f`),L(this,U,new tn(this),`f`),this.$0=this[cr](),this[Pr](),L(this,z,R(this,z,`f`),`f`),L(this,Z,R(this,Z,`f`),`f`),L(this,$,R(this,$,`f`),`f`),L(this,J,R(this,J,`f`),`f`),R(this,J,`f`).showHiddenOpt=R(this,Rn,`f`),L(this,Wn,this[ir](),`f`),R(this,X,`f`).y18n.setLocale(`en_US`)}addHelpOpt(e,t){return I(`[string|boolean] [string]`,[e,t],arguments.length),R(this,K,`f`)&&(this[ar](R(this,K,`f`)),L(this,K,null,`f`)),e===!1&&t===void 0?this:(L(this,K,typeof e==`string`?e:`help`,`f`),this.boolean(R(this,K,`f`)),this.describe(R(this,K,`f`),t||R(this,Z,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(I(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:R(this,Rn,`f`);return this.boolean(n),this.describe(n,t||R(this,Z,`f`).deferY18nLookup(`Show hidden options`)),R(this,J,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return I(`<object|string|array> [string|array]`,[e,t],arguments.length),this[_r](this.alias.bind(this),`alias`,e,t),this}array(e){return I(`<array|string>`,[e],arguments.length),this[hr](`array`,e),this[Rr](e),this}boolean(e){return I(`<array|string>`,[e],arguments.length),this[hr](`boolean`,e),this[Rr](e),this}check(e,t){return I(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>an(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&R(this,Z,`f`).fail(n.toString(),n):R(this,Z,`f`).fail(R(this,X,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(R(this,Z,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return I(`<object|string|array> [string|array]`,[e,t],arguments.length),this[_r](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(I(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new F(`coerce callback must be provided`);for(let n of e)this.coerce(n,t);return this}else if(typeof e==`object`){for(let t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new F(`coerce callback must be provided`);let n=e;return R(this,J,`f`).key[n]=!0,R(this,U,`f`).addCoerceMiddleware((e,r)=>{let i=r.getAliases()[n]??[],a=[n,...i].filter(t=>Object.prototype.hasOwnProperty.call(e,t));return a.length===0?e:an(()=>t(e[a[0]]),t=>(a.forEach(n=>{e[n]=t}),e),e=>{throw new F(e.message)})},n),this}conflicts(e,t){return I(`<string|object> [string|array]`,[e,t],arguments.length),R(this,$,`f`).conflicts(e,t),this}config(e=`config`,t,n){return I(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=Mn(e,R(this,In,`f`),this[lr]()[`deep-merge-config`]||!1,R(this,X,`f`)),R(this,J,`f`).configObjects=(R(this,J,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||R(this,Z,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{R(this,J,`f`).config[e]=n||!0}),this)}completion(e,t,n){return I(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),L(this,V,e||R(this,V,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(R(this,V,`f`),t),n&&R(this,B,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return I(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),R(this,z,`f`).addHandler(e,t,n,r,i,a),this}commands(e,t,n,r,i,a){return this.command(e,t,n,r,i,a)}commandDir(e,t){I(`<string> [object]`,[e,t],arguments.length);let n=R(this,Gn,`f`)||R(this,X,`f`).require;return R(this,z,`f`).addDirectory(e,n,R(this,X,`f`).getCallerFile(),t),this}count(e){return I(`<array|string>`,[e],arguments.length),this[hr](`count`,e),this[Rr](e),this}default(e,t,n){return I(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(Yt(e,R(this,X,`f`)),R(this,J,`f`).defaultDescription[e]=n),typeof t==`function`&&(Yt(e,R(this,X,`f`)),R(this,J,`f`).defaultDescription[e]||(R(this,J,`f`).defaultDescription[e]=R(this,Z,`f`).functionDescription(t)),t=t.call()),this[gr](this.default.bind(this),`default`,e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return I(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[e,t,n,r],arguments.length),typeof t!=`number`&&(n=t,t=1/0),this.global(`_`,!1),R(this,J,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{N(n,!0,R(this,X,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(N(n,!0,R(this,X,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{N(n,!0,R(this,X,`f`)),this.demandOption(e,n)}):typeof n==`string`?this.demandOption(e,n):(n===!0||n===void 0)&&this.demandOption(e),this}demandOption(e,t){return I(`<object|string|array> [string]`,[e,t],arguments.length),this[gr](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return I(`<string> [string|boolean]`,[e,t],arguments.length),R(this,J,`f`).deprecatedOptions[e]=t,this}describe(e,t){return I(`<object|string|array> [string]`,[e,t],arguments.length),this[br](e,!0),R(this,Z,`f`).describe(e,t),this}detectLocale(e){return I(`<boolean>`,[e],arguments.length),L(this,Bn,e,`f`),this}env(e){return I(`[string|boolean]`,[e],arguments.length),e===!1?delete R(this,J,`f`).envPrefix:R(this,J,`f`).envPrefix=e||``,this}epilogue(e){return I(`<string>`,[e],arguments.length),R(this,Z,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return I(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):R(this,Z,`f`).example(e,t),this}exit(e,t){L(this,G,!0,`f`),L(this,zn,t,`f`),R(this,H,`f`)&&R(this,X,`f`).process.exit(e)}exitProcess(e=!0){return I(`[boolean]`,[e],arguments.length),L(this,H,e,`f`),this}fail(e){if(I(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new F(`Invalid first argument. Expected function or boolean 'false'`);return R(this,Z,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return I(`<array> [function]`,[e,t],arguments.length),t?R(this,B,`f`).getCompletion(e,t):new Promise((t,n)=>{R(this,B,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return I([],0),R(this,J,`f`).demandedOptions}getDemandedCommands(){return I([],0),R(this,J,`f`).demandedCommands}getDeprecatedOptions(){return I([],0),R(this,J,`f`).deprecatedOptions}getDetectLocale(){return R(this,Bn,`f`)}getExitProcess(){return R(this,H,`f`)}getGroups(){return Object.assign({},R(this,W,`f`),R(this,Yn,`f`))}getHelp(){if(L(this,G,!0,`f`),!R(this,Z,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[Fr](R(this,Xn,`f`),void 0,void 0,0,!0);if(P(e))return e.then(()=>R(this,Z,`f`).help())}let e=R(this,z,`f`).runDefaultBuilderOn(this);if(P(e))return e.then(()=>R(this,Z,`f`).help())}return Promise.resolve(R(this,Z,`f`).help())}getOptions(){return R(this,J,`f`)}getStrict(){return R(this,Qn,`f`)}getStrictCommands(){return R(this,$n,`f`)}getStrictOptions(){return R(this,er,`f`)}global(e,t){return I(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{R(this,J,`f`).local.includes(e)||R(this,J,`f`).local.push(e)}):R(this,J,`f`).local=R(this,J,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){I(`<string|array> <string>`,[e,t],arguments.length);let n=R(this,Yn,`f`)[t]||R(this,W,`f`)[t];R(this,Yn,`f`)[t]&&delete R(this,Yn,`f`)[t];let r={};return R(this,W,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return I(`<string>`,[e],arguments.length),R(this,J,`f`).hiddenOptions.push(e),this}implies(e,t){return I(`<string|object> [number|string|array]`,[e,t],arguments.length),R(this,$,`f`).implies(e,t),this}locale(e){return I(`[string]`,[e],arguments.length),e===void 0?(this[dr](),R(this,X,`f`).y18n.getLocale()):(L(this,Bn,!1,`f`),R(this,X,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return R(this,U,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return I(`<string|object|array> [number]`,[e,t],arguments.length),this[gr](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return I(`<array|string>`,[e],arguments.length),this[hr](`normalize`,e),this}number(e){return I(`<array|string>`,[e],arguments.length),this[hr](`number`,e),this[Rr](e),this}option(e,t){if(I(`<string|object> [object]`,[e,t],arguments.length),typeof e==`object`)Object.keys(e).forEach(t=>{this.options(t,e[t])});else{typeof t!=`object`&&(t={}),this[Rr](e),R(this,Q,`f`)&&(e===`version`||t?.alias===`version`)&&this[or]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
90
+ `),void 0,`versionWarning`),R(this,J,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(R(this,J,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=R(this,Z,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(a,e)||typeof i==`string`)&&this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){I(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[sr](),e===void 0&&(e=R(this,Xn,`f`)),typeof t==`object`&&(L(this,qn,t,`f`),t=n),typeof t==`function`&&(L(this,Y,t,`f`),t=!1),t||L(this,Xn,e,`f`),R(this,Y,`f`)&&L(this,H,!1,`f`);let r=this[Fr](e,!!t),i=this.parsed;return R(this,B,`f`).setParsed(this.parsed),P(r)?r.then(e=>(R(this,Y,`f`)&&R(this,Y,`f`).call(this,R(this,zn,`f`),e,R(this,q,`f`)),e)).catch(e=>{throw R(this,Y,`f`)&&R(this,Y,`f`)(e,this.parsed.argv,R(this,q,`f`)),e}).finally(()=>{this[xr](),this.parsed=i}):(R(this,Y,`f`)&&R(this,Y,`f`).call(this,R(this,zn,`f`),r,R(this,q,`f`)),this[xr](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return P(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(P(r))throw new F(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return I(`<object>`,[e],arguments.length),L(this,Kn,e,`f`),this}pkgConf(e,t){I(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[mr](t||R(this,In,`f`));return r[e]&&typeof r[e]==`object`&&(n=Mn(r[e],t||R(this,In,`f`),this[lr]()[`deep-merge-config`]||!1,R(this,X,`f`)),R(this,J,`f`).configObjects=(R(this,J,`f`).configObjects||[]).concat(n)),this}positional(e,t){I(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=hn(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=R(this,Ln,`f`).fullCommands[R(this,Ln,`f`).fullCommands.length-1],i=r?R(this,z,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return Xt(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,R(this,Z,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return I(`[boolean]`,[e],arguments.length),L(this,Zn,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return I(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&R(this,J,`f`).narg[e]||this[gr](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return I(`[string] [string]`,[e,t],arguments.length),e||=this.$0,R(this,Wn,`f`).log(R(this,B,`f`).generateCompletionScript(e,t||R(this,V,`f`)||`completion`)),this}showHelp(e){if(I(`[string|function]`,[e],arguments.length),L(this,G,!0,`f`),!R(this,Z,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[Fr](R(this,Xn,`f`),void 0,void 0,0,!0);if(P(t))return t.then(()=>{R(this,Z,`f`).showHelp(e)}),this}let t=R(this,z,`f`).runDefaultBuilderOn(this);if(P(t))return t.then(()=>{R(this,Z,`f`).showHelp(e)}),this}return R(this,Z,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return I(`[boolean|string] [string]`,[e,t],arguments.length),R(this,Z,`f`).showHelpOnFail(e,t),this}showVersion(e){return I(`[string|function]`,[e],arguments.length),R(this,Z,`f`).showVersion(e),this}skipValidation(e){return I(`<array|string>`,[e],arguments.length),this[hr](`skipValidation`,e),this}strict(e){return I(`[boolean]`,[e],arguments.length),L(this,Qn,e!==!1,`f`),this}strictCommands(e){return I(`[boolean]`,[e],arguments.length),L(this,$n,e!==!1,`f`),this}strictOptions(e){return I(`[boolean]`,[e],arguments.length),L(this,er,e!==!1,`f`),this}string(e){return I(`<array|string>`,[e],arguments.length),this[hr](`string`,e),this[Rr](e),this}terminalWidth(){return I([],0),R(this,X,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return I(`<object>`,[e],arguments.length),L(this,Bn,!1,`f`),R(this,X,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(I(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(N(e,null,R(this,X,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new F(`.usage() description must start with $0 if being used as alias for .command()`)}else return R(this,Z,`f`).usage(e),this}usageConfiguration(e){return I(`<object>`,[e],arguments.length),L(this,tr,e,`f`),this}version(e,t,n){let r=`version`;if(I(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),R(this,Q,`f`)&&(this[ar](R(this,Q,`f`)),R(this,Z,`f`).version(void 0),L(this,Q,null,`f`)),arguments.length===0)n=this[fr](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return L(this,Q,typeof e==`string`?e:r,`f`),t||=R(this,Z,`f`).deferY18nLookup(`Show version number`),R(this,Z,`f`).version(n||void 0),this.boolean(R(this,Q,`f`)),this.describe(R(this,Q,`f`),t),this}wrap(e){return I(`<number|null|undefined>`,[e],arguments.length),R(this,Z,`f`).wrap(e),this}[(z=new WeakMap,In=new WeakMap,Ln=new WeakMap,B=new WeakMap,V=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,H=new WeakMap,Hn=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,K=new WeakMap,Un=new WeakMap,Wn=new WeakMap,q=new WeakMap,J=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,Y=new WeakMap,qn=new WeakMap,Jn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,X=new WeakMap,Qn=new WeakMap,$n=new WeakMap,er=new WeakMap,Z=new WeakMap,tr=new WeakMap,Q=new WeakMap,$=new WeakMap,rr)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[ir](){return{log:(...e)=>{this[Ar]()||console.log(...e),L(this,G,!0,`f`),R(this,q,`f`).length&&L(this,q,R(this,q,`f`)+`
91
+ `,`f`),L(this,q,R(this,q,`f`)+e.join(` `),`f`)},error:(...e)=>{this[Ar]()||console.error(...e),L(this,G,!0,`f`),R(this,q,`f`).length&&L(this,q,R(this,q,`f`)+`
92
+ `,`f`),L(this,q,R(this,q,`f`)+e.join(` `),`f`)}}}[ar](e){Xt(R(this,J,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=R(this,J,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete R(this,Z,`f`).getDescriptions()[e]}[or](e,t,n){R(this,Vn,`f`)[n]||(R(this,X,`f`).process.emitWarning(e,t),R(this,Vn,`f`)[n]=!0)}[sr](){R(this,Hn,`f`).push({options:R(this,J,`f`),configObjects:R(this,J,`f`).configObjects.slice(0),exitProcess:R(this,H,`f`),groups:R(this,W,`f`),strict:R(this,Qn,`f`),strictCommands:R(this,$n,`f`),strictOptions:R(this,er,`f`),completionCommand:R(this,V,`f`),output:R(this,q,`f`),exitError:R(this,zn,`f`),hasOutput:R(this,G,`f`),parsed:this.parsed,parseFn:R(this,Y,`f`),parseContext:R(this,qn,`f`)}),R(this,Z,`f`).freeze(),R(this,$,`f`).freeze(),R(this,z,`f`).freeze(),R(this,U,`f`).freeze()}[cr](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(R(this,X,`f`).process.argv()[0])?R(this,X,`f`).process.argv().slice(1,2):R(this,X,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[Nr](R(this,In,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),R(this,X,`f`).getEnv(`_`)&&R(this,X,`f`).getProcessArgvBin()===R(this,X,`f`).getEnv(`_`)&&(e=R(this,X,`f`).getEnv(`_`).replace(`${R(this,X,`f`).path.dirname(R(this,X,`f`).process.execPath())}/`,``)),e}[lr](){return R(this,Kn,`f`)}[ur](){return R(this,tr,`f`)}[dr](){if(!R(this,Bn,`f`))return;let e=R(this,X,`f`).getEnv(`LC_ALL`)||R(this,X,`f`).getEnv(`LC_MESSAGES`)||R(this,X,`f`).getEnv(`LANG`)||R(this,X,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[fr](){return this[mr]().version||`unknown`}[pr](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)R(this,X,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[mr](e){let t=e||`*`;if(R(this,Jn,`f`)[t])return R(this,Jn,`f`)[t];let n={};try{let t=e||R(this,X,`f`).mainFilename;R(this,X,`f`).path.extname(t)&&(t=R(this,X,`f`).path.dirname(t));let r=R(this,X,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});N(r,void 0,R(this,X,`f`)),n=JSON.parse(R(this,X,`f`).readFileSync(r,`utf8`))}catch{}return R(this,Jn,`f`)[t]=n||{},R(this,Jn,`f`)[t]}[hr](e,t){t=[].concat(t),t.forEach(t=>{t=this[yr](t),R(this,J,`f`)[e].push(t)})}[gr](e,t,n,r){this[vr](e,t,n,r,(e,t,n)=>{R(this,J,`f`)[e][t]=n})}[_r](e,t,n,r){this[vr](e,t,n,r,(e,t,n)=>{R(this,J,`f`)[e][t]=(R(this,J,`f`)[e][t]||[]).concat(n)})}[vr](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of Xt(n))e(t,n[t]);else i(t,this[yr](n),r)}[yr](e){return e===`__proto__`?`___proto___`:e}[br](e,t){return this[gr](this[br].bind(this),`key`,e,t),this}[xr](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=R(this,Hn,`f`).pop();N(f,void 0,R(this,X,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){L(e,J,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){L(t,H,e,`f`)}}.value,groups:{set value(e){L(n,W,e,`f`)}}.value,output:{set value(e){L(r,q,e,`f`)}}.value,exitError:{set value(e){L(i,zn,e,`f`)}}.value,hasOutput:{set value(e){L(a,G,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){L(o,Qn,e,`f`)}}.value,strictCommands:{set value(e){L(s,$n,e,`f`)}}.value,strictOptions:{set value(e){L(c,er,e,`f`)}}.value,completionCommand:{set value(e){L(l,V,e,`f`)}}.value,parseFn:{set value(e){L(u,Y,e,`f`)}}.value,parseContext:{set value(e){L(d,qn,e,`f`)}}.value}=f,R(this,J,`f`).configObjects=p,R(this,Z,`f`).unfreeze(),R(this,$,`f`).unfreeze(),R(this,z,`f`).unfreeze(),R(this,U,`f`).unfreeze()}[Sr](e,t){return an(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Cr].bind(this),getContext:this[wr].bind(this),getHasOutput:this[Tr].bind(this),getLoggerInstance:this[Er].bind(this),getParseContext:this[Dr].bind(this),getParserConfiguration:this[lr].bind(this),getUsageConfiguration:this[ur].bind(this),getUsageInstance:this[Or].bind(this),getValidationInstance:this[kr].bind(this),hasParseCallback:this[Ar].bind(this),isGlobalContext:this[jr].bind(this),postProcess:this[Mr].bind(this),reset:this[Pr].bind(this),runValidation:this[Ir].bind(this),runYargsParserAndExecuteCommands:this[Fr].bind(this),setHasOutput:this[Lr].bind(this)}}[Cr](){return R(this,z,`f`)}[wr](){return R(this,Ln,`f`)}[Tr](){return R(this,G,`f`)}[Er](){return R(this,Wn,`f`)}[Dr](){return R(this,qn,`f`)||{}}[Or](){return R(this,Z,`f`)}[kr](){return R(this,$,`f`)}[Ar](){return!!R(this,Y,`f`)}[jr](){return R(this,Un,`f`)}[Mr](e,t,n,r){return n||P(e)?e:(t||(e=this[rr](e)),(this[lr]()[`parse-positional-numbers`]||this[lr]()[`parse-positional-numbers`]===void 0)&&(e=this[pr](e)),r&&(e=rn(e,this,R(this,U,`f`).getMiddleware(),!1)),e)}[Pr](e={}){L(this,J,R(this,J,`f`)||{},`f`);let t={};t.local=R(this,J,`f`).local||[],t.configObjects=R(this,J,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(R(this,Yn,`f`),Object.keys(R(this,W,`f`)).reduce((e,t)=>{let r=R(this,W,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),L(this,W,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(R(this,J,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=hn(R(this,J,`f`)[e],e=>!n[e])}),t.envPrefix=R(this,J,`f`).envPrefix,L(this,J,t,`f`),L(this,Z,R(this,Z,`f`)?R(this,Z,`f`).reset(n):vn(this,R(this,X,`f`)),`f`),L(this,$,R(this,$,`f`)?R(this,$,`f`).reset(n):kn(this,R(this,Z,`f`),R(this,X,`f`)),`f`),L(this,z,R(this,z,`f`)?R(this,z,`f`).reset():ln(R(this,Z,`f`),R(this,$,`f`),R(this,U,`f`),R(this,X,`f`)),`f`),R(this,B,`f`)||L(this,B,wn(this,R(this,Z,`f`),R(this,z,`f`),R(this,X,`f`)),`f`),R(this,U,`f`).reset(),L(this,V,null,`f`),L(this,q,``,`f`),L(this,zn,null,`f`),L(this,G,!1,`f`),this.parsed=!1,this}[Nr](e,t){return R(this,X,`f`).path.relative(e,t)}[Fr](e,t,n,r=0,i=!1){let a=!!n||i;e||=R(this,Xn,`f`),R(this,J,`f`).__=R(this,X,`f`).y18n.__,R(this,J,`f`).configuration=this[lr]();let o=!!R(this,J,`f`).configuration[`populate--`],s=Object.assign({},R(this,J,`f`).configuration,{"populate--":!0}),c=R(this,X,`f`).Parser.detailed(e,Object.assign({},R(this,J,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,R(this,qn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===R(this,K,`f`)&&l[e]?f=!0:e===R(this,Q,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&R(this,Z,`f`).clearCachedHelpMessage();try{if(this[dr](),t)return this[Mr](l,o,!!n,!1);R(this,K,`f`)&&[R(this,K,`f`)].concat(d[R(this,K,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),L(this,Un,!1,`f`);let s=R(this,z,`f`).getCommands(),m=R(this,B,`f`)?.completionKey?[R(this,B,`f`)?.completionKey,...this.getAliases()[R(this,B,`f`)?.completionKey]??[]].some(e=>Object.prototype.hasOwnProperty.call(l,e)):!1,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==R(this,V,`f`)){let e=R(this,z,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[Mr](e,o,!!n,!1)}else if(!e&&a!==R(this,V,`f`)){e=a;break}!R(this,z,`f`).hasDefaultCommand()&&R(this,Zn,`f`)&&e&&!h&&R(this,$,`f`).recommendCommands(e,s)}R(this,V,`f`)&&l._.includes(R(this,V,`f`))&&!m&&(R(this,H,`f`)&&gn(!0),this.showCompletionScript(),this.exit(0))}if(R(this,z,`f`).hasDefaultCommand()&&!h){let e=R(this,z,`f`).runCommand(null,this,c,0,i,f||p||i);return this[Mr](e,o,!!n,!1)}if(m){R(this,H,`f`)&&gn(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${R(this,B,`f`).completionKey}`)+1);return R(this,B,`f`).getCompletion(t,(e,t)=>{if(e)throw new F(e.message);(t||[]).forEach(e=>{R(this,Wn,`f`).log(e)}),this.exit(0)}),this[Mr](l,!o,!!n,!1)}if(R(this,G,`f`)||(f?(R(this,H,`f`)&&gn(!0),a=!0,this.showHelp(e=>{R(this,Wn,`f`).log(e),this.exit(0)})):p&&(R(this,H,`f`)&&gn(!0),a=!0,R(this,Z,`f`).showVersion(`log`),this.exit(0))),!a&&R(this,J,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>R(this,J,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new F(c.error.message);if(!m){let e=this[Ir](d,{},c.error);n||(u=rn(l,this,R(this,U,`f`).getMiddleware(),!0)),u=this[Sr](e,u??l),P(u)&&!n&&(u=u.then(()=>rn(l,this,R(this,U,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof F)R(this,Z,`f`).fail(e.message,e);else throw e}return this[Mr](u??l,o,!!n,!0)}[Ir](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new F(n.message);R(this,$,`f`).nonOptionCount(a),R(this,$,`f`).requiredArguments(a,i);let o=!1;R(this,$n,`f`)&&(o=R(this,$,`f`).unknownCommands(a)),R(this,Qn,`f`)&&!o?R(this,$,`f`).unknownArguments(a,e,t,!!r):R(this,er,`f`)&&R(this,$,`f`).unknownArguments(a,e,{},!1,!1),R(this,$,`f`).limitedChoices(a),R(this,$,`f`).implications(a),R(this,$,`f`).conflicting(a)}}[Lr](){L(this,G,!0,`f`)}[Rr](e){if(typeof e==`string`)R(this,J,`f`).key[e]=!0;else for(let t of e)R(this,J,`f`).key[t]=!0}};function Br(e){return!!e&&typeof e.getInternalMethods==`function`}var Vr=nr(Jt);export{ie as emitKeychainOutcomeLog,_e as emitProxySetupLog,Rt as hideBin,be as probeOperatorProxyForChild,ae as recordKeychainOutcome,xe as restoreOperatorProxyEnv,E as setupProxyDispatcher,Vr as yargs_default};
93
+ //# sourceMappingURL=helpers-DOLqaEj0.js.map