tsx 4.5.0 → 4.6.0
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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.mjs +1 -1
- package/dist/cli.cjs +27 -27
- package/dist/cli.mjs +27 -27
- package/dist/client-2f0df4a6.cjs +1 -0
- package/dist/client-e665d820.mjs +1 -0
- package/dist/esm/index.cjs +5 -13
- package/dist/esm/index.mjs +5 -13
- package/dist/get-pipe-path-86e97fc9.cjs +1 -0
- package/dist/get-pipe-path-b74d9893.mjs +1 -0
- package/dist/{index-bb73d2cd.cjs → index-5d1f01e6.cjs} +14 -14
- package/dist/{index-a0bec4d2.mjs → index-bd1ceb03.mjs} +14 -14
- package/dist/loader.cjs +1 -1
- package/dist/loader.mjs +1 -1
- package/dist/package-2fc9fdf9.cjs +1 -0
- package/dist/package-de54d60d.mjs +1 -0
- package/dist/preflight.cjs +1 -1
- package/dist/preflight.mjs +1 -1
- package/dist/repl.cjs +3 -3
- package/dist/repl.mjs +3 -3
- package/dist/temporary-directory-04b36185.mjs +1 -0
- package/dist/temporary-directory-2a027842.cjs +1 -0
- package/package.json +1 -1
- package/dist/package-a7ea436f.mjs +0 -1
- package/dist/package-f376e6bd.cjs +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import Rs from"tty";import{transformSync as bs}from"esbuild";import{v as vs}from"./package-a7ea436f.mjs";import{r as ft}from"./pkgroll_create-require-b92e8e0d.mjs";import{pathToFileURL as Bs,fileURLToPath as Ss}from"url";import $s from"child_process";import K from"path";import ie from"fs";import{s as Ts,t as xs}from"./node-features-32913946.mjs";import _u,{constants as Os}from"os";import Ns from"events";import me from"util";import Hs from"stream";import"module";const Ls="known-flag",Is="unknown-flag",Ps="argument",{stringify:_e}=JSON,ks=/\B([A-Z])/g,Ms=t=>t.replace(ks,"-$1").toLowerCase(),{hasOwnProperty:Ws}=Object.prototype,Ae=(t,e)=>Ws.call(t,e),Gs=t=>Array.isArray(t),Au=t=>typeof t=="function"?[t,!1]:Gs(t)?[t[0],!0]:Au(t.type),js=(t,e)=>t===Boolean?e!=="false":e,Us=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),Ks=/[\s.:=]/,Vs=t=>{const e=`Flag name ${_e(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(Ks);if(u)throw new Error(`${e} cannot contain ${_e(u==null?void 0:u[0])}`)},zs=t=>{const e={},u=(n,s)=>{if(Ae(e,n))throw new Error(`Duplicate flags named ${_e(n)}`);e[n]=s};for(const n in t){if(!Ae(t,n))continue;Vs(n);const s=t[n],r=[[],...Au(s),s];u(n,r);const i=Ms(n);if(n!==i&&u(i,r),"alias"in s&&typeof s.alias=="string"){const{alias:D}=s,o=`Flag alias ${_e(D)} for flag ${_e(n)}`;if(D.length===0)throw new Error(`${o} cannot be empty`);if(D.length>1)throw new Error(`${o} must be a single character`);u(D,r)}}return e},Ys=(t,e)=>{const u={};for(const n in t){if(!Ae(t,n))continue;const[s,,r,i]=e[n];if(s.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[n]=D}else u[n]=r?s:s.pop()}return u},We="--",qs=/[.:=]/,Xs=/^-{1,2}\w/,Qs=t=>{if(!Xs.test(t))return;const e=!t.startsWith(We);let u=t.slice(e?1:2),n;const s=u.match(qs);if(s){const{index:r}=s;n=u.slice(r+1),u=u.slice(0,r)}return[u,n,e]},Zs=(t,{onFlag:e,onArgument:u})=>{let n;const s=(r,i)=>{if(typeof n!="function")return!0;n(r,i),n=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===We){s();const o=t.slice(r+1);u==null||u(o,[r],!0);break}const D=Qs(i);if(D){if(s(),!e)continue;const[o,l,f]=D;if(f)for(let c=0;c<o.length;c+=1){s();const a=c===o.length-1;n=e(o[c],a?l:void 0,[r,c+1,a])}else n=e(o,l,[r])}else s(i,[r])&&(u==null||u([i],[r]))}s()},Js=(t,e)=>{for(const[u,n,s]of e.reverse()){if(n){const r=t[u];let i=r.slice(0,n);if(s||(i+=r.slice(n+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},yu=(t,e=process.argv.slice(2),{ignore:u}={})=>{const n=[],s=zs(t),r={},i=[];return i[We]=[],Zs(e,{onFlag(D,o,l){const f=Ae(s,D);if(!(u!=null&&u(f?Ls:Is,D,o))){if(f){const[c,a]=s[D],E=js(a,o),C=(F,A)=>{n.push(l),A&&n.push(A),c.push(Us(a,F||""))};return E===void 0?C:C(E)}Ae(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),n.push(l)}},onArgument(D,o,l){u!=null&&u(Ps,e[o[0]])||(i.push(...D),l?(i[We]=D,e.splice(o[0])):n.push(o))}}),Js(e,n),{flags:Ys(t,s),unknownFlags:r,_:i}};var er=Object.create,Ge=Object.defineProperty,tr=Object.defineProperties,ur=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,sr=Object.getOwnPropertyNames,wu=Object.getOwnPropertySymbols,rr=Object.getPrototypeOf,Ru=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,bu=(t,e,u)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,je=(t,e)=>{for(var u in e||(e={}))Ru.call(e,u)&&bu(t,u,e[u]);if(wu)for(var u of wu(e))ir.call(e,u)&&bu(t,u,e[u]);return t},ht=(t,e)=>tr(t,nr(e)),Dr=t=>Ge(t,"__esModule",{value:!0}),or=(t,e)=>()=>(t&&(e=t(t=0)),e),ar=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lr=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of sr(e))!Ru.call(t,s)&&(u||s!=="default")&&Ge(t,s,{get:()=>e[s],enumerable:!(n=ur(e,s))||n.enumerable});return t},cr=(t,e)=>lr(Dr(Ge(t!=null?er(rr(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=or(()=>{}),fr=ar((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var hr=t=>{var e,u,n;let s=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(s)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:s}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(n=t.stdoutColumns)!=null?n:s}};U(),U(),U(),U(),U();function dr({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function vu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(dr(),"")}U();function Er(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var pr=cr(fr(),1);function De(t){if(typeof t!="string"||t.length===0||(t=vu(t),t.length===0))return 0;t=t.replace((0,pr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let n=t.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,e+=Er(n)?2:1)}return e}var Bu=t=>Math.max(...t.split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`)];for(let[
|
|
5
|
-
`?(r&&(
|
|
6
|
-
`&&(
|
|
2
|
+
import Au,{constants as ft}from"os";import vn from"tty";import{transformSync as Bn}from"esbuild";import{v as Sn}from"./package-de54d60d.mjs";import{r as ht}from"./pkgroll_create-require-b92e8e0d.mjs";import{pathToFileURL as $n,fileURLToPath as Tn}from"url";import xn from"child_process";import K from"path";import te from"fs";import{s as On,t as Nn}from"./node-features-32913946.mjs";import Hn from"events";import me from"util";import Ln from"stream";import In from"net";import{t as Pn}from"./temporary-directory-04b36185.mjs";import{g as kn}from"./get-pipe-path-b74d9893.mjs";import"module";const Mn="known-flag",Wn="unknown-flag",Gn="argument",{stringify:_e}=JSON,jn=/\B([A-Z])/g,Un=t=>t.replace(jn,"-$1").toLowerCase(),{hasOwnProperty:Kn}=Object.prototype,Ae=(t,e)=>Kn.call(t,e),Vn=t=>Array.isArray(t),yu=t=>typeof t=="function"?[t,!1]:Vn(t)?[t[0],!0]:yu(t.type),zn=(t,e)=>t===Boolean?e!=="false":e,Yn=(t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),qn=/[\s.:=]/,Xn=t=>{const e=`Flag name ${_e(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(qn);if(u)throw new Error(`${e} cannot contain ${_e(u==null?void 0:u[0])}`)},Qn=t=>{const e={},u=(s,n)=>{if(Ae(e,s))throw new Error(`Duplicate flags named ${_e(s)}`);e[s]=n};for(const s in t){if(!Ae(t,s))continue;Xn(s);const n=t[s],r=[[],...yu(n),n];u(s,r);const i=Un(s);if(s!==i&&u(i,r),"alias"in n&&typeof n.alias=="string"){const{alias:o}=n,D=`Flag alias ${_e(o)} for flag ${_e(s)}`;if(o.length===0)throw new Error(`${D} cannot be empty`);if(o.length>1)throw new Error(`${D} must be a single character`);u(o,r)}}return e},Zn=(t,e)=>{const u={};for(const s in t){if(!Ae(t,s))continue;const[n,,r,i]=e[s];if(n.length===0&&"default"in i){let{default:o}=i;typeof o=="function"&&(o=o()),u[s]=o}else u[s]=r?n:n.pop()}return u},We="--",Jn=/[.:=]/,er=/^-{1,2}\w/,tr=t=>{if(!er.test(t))return;const e=!t.startsWith(We);let u=t.slice(e?1:2),s;const n=u.match(Jn);if(n){const{index:r}=n;s=u.slice(r+1),u=u.slice(0,r)}return[u,s,e]},ur=(t,{onFlag:e,onArgument:u})=>{let s;const n=(r,i)=>{if(typeof s!="function")return!0;s(r,i),s=void 0};for(let r=0;r<t.length;r+=1){const i=t[r];if(i===We){n();const D=t.slice(r+1);u==null||u(D,[r],!0);break}const o=tr(i);if(o){if(n(),!e)continue;const[D,a,c]=o;if(c)for(let f=0;f<D.length;f+=1){n();const l=f===D.length-1;s=e(D[f],l?a:void 0,[r,f+1,l])}else s=e(D,a,[r])}else n(i,[r])&&(u==null||u([i],[r]))}n()},sr=(t,e)=>{for(const[u,s,n]of e.reverse()){if(s){const r=t[u];let i=r.slice(0,s);if(n||(i+=r.slice(s+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},wu=(t,e=process.argv.slice(2),{ignore:u}={})=>{const s=[],n=Qn(t),r={},i=[];return i[We]=[],ur(e,{onFlag(o,D,a){const c=Ae(n,o);if(!(u!=null&&u(c?Mn:Wn,o,D))){if(c){const[f,l]=n[o],E=zn(l,D),p=(F,A)=>{s.push(a),A&&s.push(A),f.push(Yn(l,F||""))};return E===void 0?p:p(E)}Ae(r,o)||(r[o]=[]),r[o].push(D===void 0?!0:D),s.push(a)}},onArgument(o,D,a){u!=null&&u(Gn,e[D[0]])||(i.push(...o),a?(i[We]=o,e.splice(D[0])):s.push(D))}}),sr(e,s),{flags:Zn(t,n),unknownFlags:r,_:i}};var nr=Object.create,Ge=Object.defineProperty,rr=Object.defineProperties,ir=Object.getOwnPropertyDescriptor,or=Object.getOwnPropertyDescriptors,Dr=Object.getOwnPropertyNames,Ru=Object.getOwnPropertySymbols,ar=Object.getPrototypeOf,bu=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,vu=(t,e,u)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,je=(t,e)=>{for(var u in e||(e={}))bu.call(e,u)&&vu(t,u,e[u]);if(Ru)for(var u of Ru(e))lr.call(e,u)&&vu(t,u,e[u]);return t},dt=(t,e)=>rr(t,or(e)),cr=t=>Ge(t,"__esModule",{value:!0}),fr=(t,e)=>()=>(t&&(e=t(t=0)),e),hr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),dr=(t,e,u,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Dr(e))!bu.call(t,n)&&(u||n!=="default")&&Ge(t,n,{get:()=>e[n],enumerable:!(s=ir(e,n))||s.enumerable});return t},Er=(t,e)=>dr(cr(Ge(t!=null?nr(ar(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),U=fr(()=>{}),pr=hr((t,e)=>{U(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});U(),U(),U();var Cr=t=>{var e,u,s;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(n)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:n}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(s=t.stdoutColumns)!=null?s:n}};U(),U(),U(),U(),U();function Fr({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function Bu(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Fr(),"")}U();function gr(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var mr=Er(pr(),1);function oe(t){if(typeof t!="string"||t.length===0||(t=Bu(t),t.length===0))return 0;t=t.replace((0,mr.default)()," ");let e=0;for(let u=0;u<t.length;u++){let s=t.codePointAt(u);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&u++,e+=gr(s)?2:1)}return e}var Su=t=>Math.max(...t.split(`
|
|
3
|
+
`).map(oe)),_r=t=>{let e=[];for(let u of t){let{length:s}=u,n=s-e.length;for(let r=0;r<n;r+=1)e.push(0);for(let r=0;r<s;r+=1){let i=Su(u[r]);i>e[r]&&(e[r]=i)}}return e};U();var $u=/^\d+%$/,Tu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Ar=(t,e)=>{var u;let s=[];for(let n=0;n<t.length;n+=1){let r=(u=e[n])!=null?u:"auto";if(typeof r=="number"||r==="auto"||r==="content-width"||typeof r=="string"&&$u.test(r)){s.push(dt(je({},Tu),{width:r,contentWidth:t[n]}));continue}if(r&&typeof r=="object"){let i=dt(je(je({},Tu),r),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,s.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(r)}`)}return s};function yr(t,e){for(let u of t){let{width:s}=u;if(s==="content-width"&&(u.width=u.contentWidth),s==="auto"){let D=Math.min(20,u.contentWidth);u.width=D,u.autoOverflow=u.contentWidth-D}if(typeof s=="string"&&$u.test(s)){let D=Number.parseFloat(s.slice(0,-1))/100;u.width=Math.floor(e*D)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,r=1,i=r+n;if(i>=e){let D=i-e,a=Math.ceil(u.paddingLeft/n*D),c=D-a;u.paddingLeft-=a,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let o=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,o),r)}}var xu=()=>Object.assign([],{columns:0});function wr(t,e){let u=[xu()],[s]=u;for(let n of t){let r=n.width+n.horizontalPadding;s.columns+r>e&&(s=xu(),u.push(s)),s.push(n),s.columns+=r}for(let n of u){let r=n.reduce((l,E)=>l+E.width+E.horizontalPadding,0),i=e-r;if(i===0)continue;let o=n.filter(l=>"autoOverflow"in l),D=o.filter(l=>l.autoOverflow>0),a=D.reduce((l,E)=>l+E.autoOverflow,0),c=Math.min(a,i);for(let l of D){let E=Math.floor(l.autoOverflow/a*c);l.width+=E,i-=E}let f=Math.floor(i/o.length);for(let l=0;l<o.length;l+=1){let E=o[l];l===o.length-1?E.width+=i:E.width+=f,i-=f}}return u}function Rr(t,e,u){let s=Ar(u,e);return yr(s,t),wr(s,t)}U(),U(),U();var Et=10,Ou=(t=0)=>e=>`\x1B[${e+t}m`,Nu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Hu=(t=0)=>(e,u,s)=>`\x1B[${38+t};2;${e};${u};${s}m`;function br(){let t=new Map,e={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],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,s]of Object.entries(e)){for(let[n,r]of Object.entries(s))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},s[n]=e[n],t.set(r[0],r[1]);Object.defineProperty(e,u,{value:s,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Ou(),e.color.ansi256=Nu(),e.color.ansi16m=Hu(),e.bgColor.ansi=Ou(Et),e.bgColor.ansi256=Nu(Et),e.bgColor.ansi16m=Hu(Et),Object.defineProperties(e,{rgbToAnsi256:{value:(u,s,n)=>u===s&&s===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(s/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:u=>{let s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!s)return[0,0,0];let{colorString:n}=s.groups;n.length===3&&(n=n.split("").map(i=>i+i).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let s,n,r;if(u>=232)s=((u-232)*10+8)/255,n=s,r=s;else{u-=16;let D=u%36;s=Math.floor(u/36)/5,n=Math.floor(D/6)/5,r=D%6/5}let i=Math.max(s,n,r)*2;if(i===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,s,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,s,n)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var vr=br(),Br=vr,Ue=new Set(["\x1B","\x9B"]),Sr=39,pt="\x07",Lu="[",$r="]",Iu="m",Ct=`${$r}8;;`,Pu=t=>`${Ue.values().next().value}${Lu}${t}${Iu}`,ku=t=>`${Ue.values().next().value}${Ct}${t}${pt}`,Tr=t=>t.split(" ").map(e=>oe(e)),Ft=(t,e,u)=>{let s=[...e],n=!1,r=!1,i=oe(Bu(t[t.length-1]));for(let[o,D]of s.entries()){let a=oe(D);if(i+a<=u?t[t.length-1]+=D:(t.push(D),i=0),Ue.has(D)&&(n=!0,r=s.slice(o+1).join("").startsWith(Ct)),n){r?D===pt&&(n=!1,r=!1):D===Iu&&(n=!1);continue}i+=a,i===u&&o<s.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},xr=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(oe(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},Or=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let s="",n,r,i=Tr(t),o=[""];for(let[a,c]of t.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let f=oe(o[o.length-1]);if(a!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),f=0),(f>0||u.trim===!1)&&(o[o.length-1]+=" ",f++)),u.hard&&i[a]>e){let l=e-f,E=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<E&&o.push(""),Ft(o,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){Ft(o,c,e);continue}o.push("")}if(f+i[a]>e&&u.wordWrap===!1){Ft(o,c,e);continue}o[o.length-1]+=c}u.trim!==!1&&(o=o.map(a=>xr(a)));let D=[...o.join(`
|
|
4
|
+
`)];for(let[a,c]of D.entries()){if(s+=c,Ue.has(c)){let{groups:l}=new RegExp(`(?:\\${Lu}(?<code>\\d+)m|\\${Ct}(?<uri>.*)${pt})`).exec(D.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let E=Number.parseFloat(l.code);n=E===Sr?void 0:E}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let f=Br.codes.get(Number(n));D[a+1]===`
|
|
5
|
+
`?(r&&(s+=ku("")),n&&f&&(s+=Pu(f))):c===`
|
|
6
|
+
`&&(n&&f&&(s+=Pu(n)),r&&(s+=ku(r)))}return s};function Nr(t,e,u){return String(t).normalize().replace(/\r\n/g,`
|
|
7
7
|
`).split(`
|
|
8
|
-
`).map(
|
|
9
|
-
`)}var
|
|
10
|
-
`);if(
|
|
8
|
+
`).map(s=>Or(s,e,u)).join(`
|
|
9
|
+
`)}var Mu=t=>Array.from({length:t}).fill("");function Hr(t,e){let u=[],s=0;for(let n of t){let r=0,i=n.map(D=>{var a;let c=(a=e[s])!=null?a:"";s+=1,D.preprocess&&(c=D.preprocess(c)),Su(c)>D.width&&(c=Nr(c,D.width,{hard:!0}));let f=c.split(`
|
|
10
|
+
`);if(D.postprocess){let{postprocess:l}=D;f=f.map((E,p)=>l.call(D,E,p))}return D.paddingTop&&f.unshift(...Mu(D.paddingTop)),D.paddingBottom&&f.push(...Mu(D.paddingBottom)),f.length>r&&(r=f.length),dt(je({},D),{lines:f})}),o=[];for(let D=0;D<r;D+=1){let a=i.map(c=>{var f;let l=(f=c.lines[D])!=null?f:"",E=Number.isFinite(c.width)?" ".repeat(c.width-oe(l)):"",p=c.paddingLeftString;return c.align==="right"&&(p+=E),p+=l,c.align==="left"&&(p+=E),p+c.paddingRightString}).join("");o.push(a)}u.push(o.join(`
|
|
11
11
|
`))}return u.join(`
|
|
12
|
-
`)}function
|
|
13
|
-
`)}U();var
|
|
14
|
-
`}}function
|
|
15
|
-
`}}function
|
|
16
|
-
`):e.usage}}:void 0;if(t.name){const
|
|
17
|
-
`)}}}}function
|
|
18
|
-
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function
|
|
19
|
-
`:"")+(u?this.indentText({text:this.render(u),spaces:
|
|
20
|
-
`}table({tableData:e,tableOptions:u,tableBreakpoints:
|
|
21
|
-
`);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const
|
|
22
|
-
`),n(),process.exit(1);t[o]=l}}function Qr(t){return t===void 0||t!==!1}function Gu(t,e,u,n){const s={...e.flags},r=e.version;r&&(s.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Qr(i);D&&!("help"in s)&&(s.help={type:Boolean,alias:"h",description:"Show help"});const o=yu(s,n,{ignore:e.ignoreArgv}),l=()=>{console.log(e.version)};if(r&&o.flags.version===!0)return l(),process.exit(0);const f=new qr,c=D&&(i!=null&&i.render)?i.render:C=>f.render(C),a=C=>{const F=zr({...e,...C?{help:C}:{},flags:s});console.log(c(F,f))};if(D&&o.flags.help===!0)return a(),process.exit(0);if(e.parameters){let{parameters:C}=e,F=o._;const A=C.indexOf("--"),B=C.slice(A+1),H=Object.create(null);if(A>-1&&B.length>0){C=C.slice(0,A);const S=o._["--"];F=F.slice(0,-S.length||void 0),mt(H,gt(C),F,a),mt(H,gt(B),S,a)}else mt(H,gt(C),F,a);Object.assign(o._,H)}const E={...o,showVersion:l,showHelp:a};return typeof u=="function"&&u(E),{command:t,...E}}function Zr(t,e){const u=new Map;for(const n of e){const s=[n.options.name],{alias:r}=n.options;r&&(Array.isArray(r)?s.push(...r):s.push(r));for(const i of s){if(u.has(i))throw new Error(`Duplicate command name found: ${J(i)}`);u.set(i,n)}}return u.get(t)}function ju(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!Ft.test(t.name)))throw new Error(`Invalid script name: ${J(t.name)}`);const n=u[0];if(t.commands&&Ft.test(n)){const s=Zr(n,t.commands);if(s)return Gu(s.options.name,{...s.options,parent:t},s.callback,u.slice(1))}return Gu(void 0,t,e,u)}function Jr(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!Ft.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ti(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},_t,Uu;function ui(){if(Uu)return _t;Uu=1,_t=n,n.sync=s;var t=ie;function e(r,i){var D=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!D||(D=D.split(";"),D.indexOf("")!==-1))return!0;for(var o=0;o<D.length;o++){var l=D[o].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l)return!0}return!1}function u(r,i,D){return!r.isSymbolicLink()&&!r.isFile()?!1:e(i,D)}function n(r,i,D){t.stat(r,function(o,l){D(o,o?!1:u(l,r,i))})}function s(r,i){return u(t.statSync(r),r,i)}return _t}var At,Ku;function ni(){if(Ku)return At;Ku=1,At=e,e.sync=u;var t=ie;function e(r,i,D){t.stat(r,function(o,l){D(o,o?!1:n(l,i))})}function u(r,i){return n(t.statSync(r),i)}function n(r,i){return r.isFile()&&s(r,i)}function s(r,i){var D=r.mode,o=r.uid,l=r.gid,f=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),c=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),a=parseInt("100",8),E=parseInt("010",8),C=parseInt("001",8),F=a|E,A=D&C||D&E&&l===c||D&a&&o===f||D&F&&f===0;return A}return At}var Ke;process.platform==="win32"||ei.TESTING_WINDOWS?Ke=ui():Ke=ni();var si=yt;yt.sync=ri;function yt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,s){yt(t,e||{},function(r,i){r?s(r):n(i)})})}Ke(t,e||{},function(n,s){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,s=!1),u(n,s)})}function ri(t,e){try{return Ke.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}const he=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vu=K,ii=he?";":":",zu=si,Yu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),qu=(t,e)=>{const u=e.colon||ii,n=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],s=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?s.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:n,pathExt:r,pathExtExe:s}},Xu=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:n,pathExt:s,pathExtExe:r}=qu(t,e),i=[],D=l=>new Promise((f,c)=>{if(l===n.length)return e.all&&i.length?f(i):c(Yu(t));const a=n[l],E=/^".*"$/.test(a)?a.slice(1,-1):a,C=Vu.join(E,t),F=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+C:C;f(o(F,l,0))}),o=(l,f,c)=>new Promise((a,E)=>{if(c===s.length)return a(D(f+1));const C=s[c];zu(l+C,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(l+C);else return a(l+C);return a(o(l,f,c+1))})});return u?D(0).then(l=>u(null,l),u):D(0)},Di=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:n,pathExtExe:s}=qu(t,e),r=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,l=Vu.join(o,t),f=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let c=0;c<n.length;c++){const a=f+n[c];try{if(zu.sync(a,{pathExt:s}))if(e.all)r.push(a);else return a}catch{}}}if(e.all&&r.length)return r;if(e.nothrow)return null;throw Yu(t)};var oi=Xu;Xu.sync=Di;var wt={exports:{}};const Qu=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};wt.exports=Qu,wt.exports.default=Qu;var ai=wt.exports;const Zu=K,li=oi,ci=ai;function Ju(t,e){const u=t.options.env||process.env,n=process.cwd(),s=t.options.cwd!=null,r=s&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=li.sync(t.command,{path:u[ci({env:u})],pathExt:e?Zu.delimiter:void 0})}catch{}finally{r&&process.chdir(n)}return i&&(i=Zu.resolve(s?t.options.cwd:"",i)),i}function fi(t){return Ju(t)||Ju(t,!0)}var hi=fi,Rt={};const bt=/([()\][%!^"`<>&|;, *?])/g;function di(t){return t=t.replace(bt,"^$1"),t}function Ei(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(bt,"^$1"),e&&(t=t.replace(bt,"^$1")),t}Rt.command=di,Rt.argument=Ei;var pi=/^#!(.*)/;const Ci=pi;var Fi=(t="")=>{const e=t.match(Ci);if(!e)return null;const[u,n]=e[0].replace(/#! ?/,"").split(" "),s=u.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s};const vt=ie,gi=Fi;function mi(t){const u=Buffer.alloc(150);let n;try{n=vt.openSync(t,"r"),vt.readSync(n,u,0,150,0),vt.closeSync(n)}catch{}return gi(u.toString())}var _i=mi;const Ai=K,en=hi,tn=Rt,yi=_i,wi=process.platform==="win32",Ri=/\.(?:com|exe)$/i,bi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function vi(t){t.file=en(t);const e=t.file&&yi(t.file);return e?(t.args.unshift(t.file),t.command=e,en(t)):t.file}function Bi(t){if(!wi)return t;const e=vi(t),u=!Ri.test(e);if(t.options.forceShell||u){const n=bi.test(e);t.command=Ai.normalize(t.command),t.command=tn.command(t.command),t.args=t.args.map(r=>tn.argument(r,n));const s=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${s}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Si(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const n={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?n:Bi(n)}var $i=Si;const Bt=process.platform==="win32";function St(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Ti(t,e){if(!Bt)return;const u=t.emit;t.emit=function(n,s){if(n==="exit"){const r=un(s,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function un(t,e){return Bt&&t===1&&!e.file?St(e.original,"spawn"):null}function xi(t,e){return Bt&&t===1&&!e.file?St(e.original,"spawnSync"):null}var Oi={hookChildProcess:Ti,verifyENOENT:un,verifyENOENTSync:xi,notFoundError:St};const nn=$s,$t=$i,Tt=Oi;function sn(t,e,u){const n=$t(t,e,u),s=nn.spawn(n.command,n.args,n.options);return Tt.hookChildProcess(s,n),s}function Ni(t,e,u){const n=$t(t,e,u),s=nn.spawnSync(n.command,n.args,n.options);return s.error=s.error||Tt.verifyENOENTSync(s.status,n),s}fe.exports=sn,fe.exports.spawn=sn,fe.exports.sync=Ni,fe.exports._parse=$t,fe.exports._enoent=Tt;var Hi=fe.exports,Li=ti(Hi);const rn=(t,e)=>{const u={...process.env},n=["inherit","inherit","inherit","ipc"];return e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Li(process.execPath,["--require",ft.resolve("./preflight.cjs"),Ts?"--import":"--loader",Bs(ft.resolve("./loader.mjs")).toString(),...t],{stdio:n,env:u})};var Ve={};const Ii=K,ee="\\\\/",Dn=`[^${ee}]`,te="\\.",Pi="\\+",ki="\\?",ze="\\/",Mi="(?=.)",on="[^/]",xt=`(?:${ze}|$)`,an=`(?:^|${ze})`,Ot=`${te}{1,2}${xt}`,Wi=`(?!${te})`,Gi=`(?!${an}${Ot})`,ji=`(?!${te}{0,1}${xt})`,Ui=`(?!${Ot})`,Ki=`[^.${ze}]`,Vi=`${on}*?`,ln={DOT_LITERAL:te,PLUS_LITERAL:Pi,QMARK_LITERAL:ki,SLASH_LITERAL:ze,ONE_CHAR:Mi,QMARK:on,END_ANCHOR:xt,DOTS_SLASH:Ot,NO_DOT:Wi,NO_DOTS:Gi,NO_DOT_SLASH:ji,NO_DOTS_SLASH:Ui,QMARK_NO_DOT:Ki,STAR:Vi,START_ANCHOR:an},zi={...ln,SLASH_LITERAL:`[${ee}]`,QMARK:Dn,STAR:`${Dn}*?`,DOTS_SLASH:`${te}{1,2}(?:[${ee}]|$)`,NO_DOT:`(?!${te})`,NO_DOTS:`(?!(?:^|[${ee}])${te}{1,2}(?:[${ee}]|$))`,NO_DOT_SLASH:`(?!${te}{0,1}(?:[${ee}]|$))`,NO_DOTS_SLASH:`(?!${te}{1,2}(?:[${ee}]|$))`,QMARK_NO_DOT:`[^.${ee}]`,START_ANCHOR:`(?:^|[${ee}])`,END_ANCHOR:`(?:[${ee}]|$)`},Yi={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ye={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Yi,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Ii.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?zi:ln}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ye;t.isObject=D=>D!==null&&typeof D=="object"&&!Array.isArray(D),t.hasRegexChars=D=>r.test(D),t.isRegexChar=D=>D.length===1&&t.hasRegexChars(D),t.escapeRegex=D=>D.replace(i,"\\$1"),t.toPosixSlashes=D=>D.replace(n,"/"),t.removeBackslashes=D=>D.replace(s,o=>o==="\\"?"":o),t.supportsLookbehinds=()=>{const D=process.version.slice(1).split(".").map(Number);return D.length===3&&D[0]>=9||D[0]===8&&D[1]>=10},t.isWindows=D=>D&&typeof D.windows=="boolean"?D.windows:u===!0||e.sep==="\\",t.escapeLast=(D,o,l)=>{const f=D.lastIndexOf(o,l);return f===-1?D:D[f-1]==="\\"?t.escapeLast(D,o,f-1):`${D.slice(0,f)}\\${D.slice(f)}`},t.removePrefix=(D,o={})=>{let l=D;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(D,o={},l={})=>{const f=l.contains?"":"^",c=l.contains?"":"$";let a=`${f}(?:${D})${c}`;return o.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}})(Ve);const cn=Ve,{CHAR_ASTERISK:Nt,CHAR_AT:qi,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:Xi,CHAR_DOT:Ht,CHAR_EXCLAMATION_MARK:Lt,CHAR_FORWARD_SLASH:fn,CHAR_LEFT_CURLY_BRACE:It,CHAR_LEFT_PARENTHESES:Pt,CHAR_LEFT_SQUARE_BRACKET:Qi,CHAR_PLUS:Zi,CHAR_QUESTION_MARK:hn,CHAR_RIGHT_CURLY_BRACE:Ji,CHAR_RIGHT_PARENTHESES:dn,CHAR_RIGHT_SQUARE_BRACKET:eD}=Ye,En=t=>t===fn||t===ye,pn=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},tD=(t,e)=>{const u=e||{},n=t.length-1,s=u.parts===!0||u.scanToEnd===!0,r=[],i=[],D=[];let o=t,l=-1,f=0,c=0,a=!1,E=!1,C=!1,F=!1,A=!1,B=!1,H=!1,S=!1,X=!1,M=!1,ne=0,W,_,b={value:"",depth:0,isGlob:!1};const k=()=>l>=n,p=()=>o.charCodeAt(l+1),x=()=>(W=_,o.charCodeAt(++l));for(;l<n;){_=x();let G;if(_===ye){H=b.backslashes=!0,_=x(),_===It&&(B=!0);continue}if(B===!0||_===It){for(ne++;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,x();continue}if(_===It){ne++;continue}if(B!==!0&&_===Ht&&(_=x())===Ht){if(a=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(B!==!0&&_===Xi){if(a=b.isBrace=!0,C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Ji&&(ne--,ne===0)){B=!1,a=b.isBrace=!0,M=!0;break}}if(s===!0)continue;break}if(_===fn){if(r.push(l),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(W===Ht&&l===f+1){f+=2;continue}c=l+1;continue}if(u.noext!==!0&&(_===Zi||_===qi||_===Nt||_===hn||_===Lt)===!0&&p()===Pt){if(C=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===Lt&&l===f&&(X=!0),s===!0){for(;k()!==!0&&(_=x());){if(_===ye){H=b.backslashes=!0,_=x();continue}if(_===dn){C=b.isGlob=!0,M=!0;break}}continue}break}if(_===Nt){if(W===Nt&&(A=b.isGlobstar=!0),C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===hn){if(C=b.isGlob=!0,M=!0,s===!0)continue;break}if(_===Qi){for(;k()!==!0&&(G=x());){if(G===ye){H=b.backslashes=!0,x();continue}if(G===eD){E=b.isBracket=!0,C=b.isGlob=!0,M=!0;break}}if(s===!0)continue;break}if(u.nonegate!==!0&&_===Lt&&l===f){S=b.negated=!0,f++;continue}if(u.noparen!==!0&&_===Pt){if(C=b.isGlob=!0,s===!0){for(;k()!==!0&&(_=x());){if(_===Pt){H=b.backslashes=!0,_=x();continue}if(_===dn){M=!0;break}}continue}break}if(C===!0){if(M=!0,s===!0)continue;break}}u.noext===!0&&(F=!1,C=!1);let $=o,se="",h="";f>0&&(se=o.slice(0,f),o=o.slice(f),c-=f),$&&C===!0&&c>0?($=o.slice(0,c),h=o.slice(c)):C===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&En($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=cn.removeBackslashes(h)),$&&H===!0&&($=cn.removeBackslashes($)));const d={prefix:se,input:t,start:f,base:$,glob:h,isBrace:a,isBracket:E,isGlob:C,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,En(_)||i.push(b),d.tokens=i),u.parts===!0||u.tokens===!0){let G;for(let R=0;R<r.length;R++){const Q=G?G+1:f,Z=r[R],V=t.slice(Q,Z);u.tokens&&(R===0&&f!==0?(i[R].isPrefix=!0,i[R].value=se):i[R].value=V,pn(i[R]),d.maxDepth+=i[R].depth),(R!==0||V!=="")&&D.push(V),G=Z}if(G&&G+1<t.length){const R=t.slice(G+1);D.push(R),u.tokens&&(i[i.length-1].value=R,pn(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=D}return d};var uD=tD;const qe=Ye,z=Ve,{MAX_LENGTH:Xe,POSIX_REGEX_SOURCE:nD,REGEX_NON_SPECIAL_CHARS:sD,REGEX_SPECIAL_CHARS_BACKREF:rD,REPLACEMENTS:Cn}=qe,iD=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(s=>z.escapeRegex(s)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,kt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Cn[t]||t;const u={...e},n=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe;let s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],D=u.capture?"":"?:",o=z.isWindows(e),l=qe.globChars(o),f=qe.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:a,SLASH_LITERAL:E,ONE_CHAR:C,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:H,QMARK:S,QMARK_NO_DOT:X,STAR:M,START_ANCHOR:ne}=l,W=m=>`(${D}(?:(?!${ne}${m.dot?F:c}).)*?)`,_=u.dot?"":A,b=u.dot?S:X;let k=u.bash===!0?W(u):M;u.capture&&(k=`(${k})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const p={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=z.removePrefix(t,p),s=t.length;const x=[],$=[],se=[];let h=r,d;const G=()=>p.index===s-1,R=p.peek=(m=1)=>t[p.index+m],Q=p.advance=()=>t[++p.index]||"",Z=()=>t.slice(p.index+1),V=(m="",T=0)=>{p.consumed+=m,p.index+=T},Ie=m=>{p.output+=m.output!=null?m.output:m.value,V(m.value)},ys=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),p.start++,m++;return m%2===0?!1:(p.negated=!0,p.start++,!0)},Pe=m=>{p[m]++,se.push(m)},re=m=>{p[m]--,se.pop()},w=m=>{if(h.type==="globstar"){const T=p.braces>0&&(m.type==="comma"||m.type==="brace"),g=m.extglob===!0||x.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!T&&!g&&(p.output=p.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,p.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Ie(m),h&&h.type==="text"&&m.type==="text"){h.value+=m.value,h.output=(h.output||"")+m.value;return}m.prev=h,i.push(m),h=m},ke=(m,T)=>{const g={...f[T],conditions:1,inner:""};g.prev=h,g.parens=p.parens,g.output=p.output;const y=(u.capture?"(":"")+g.open;Pe("parens"),w({type:m,value:T,output:p.output?"":C}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},ws=m=>{let T=m.close+(u.capture?")":""),g;if(m.type==="negate"){let y=k;if(m.inner&&m.inner.length>1&&m.inner.includes("/")&&(y=W(u)),(y!==k||G()||/^\)+$/.test(Z()))&&(T=m.close=`)$))${y}`),m.inner.includes("*")&&(g=Z())&&/^\.[^\\/.]+$/.test(g)){const O=kt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(p.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),re("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(rD,(g,y,O,j,L,ct)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?S.repeat(L.length):""):ct===0?b+(L?S.repeat(L.length):""):S.repeat(O.length):j==="."?c.repeat(O.length):j==="*"?y?y+j+(L?k:""):k:y?g:`\\${g}`);return m===!0&&(u.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),T===t&&u.contains===!0?(p.output=t,p):(p.output=z.wrapOutput(T,p,e),p)}for(;!G();){if(d=Q(),d==="\0")continue;if(d==="\\"){const g=R();if(g==="/"&&u.bash!==!0||g==="."||g===";")continue;if(!g){d+="\\",w({type:"text",value:d});continue}const y=/^\\+/.exec(Z());let O=0;if(y&&y[0].length>2&&(O=y[0].length,p.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),p.brackets===0){w({type:"text",value:d});continue}}if(p.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(u.posix!==!1&&d===":"){const g=h.value.slice(1);if(g.includes("[")&&(h.posix=!0,g.includes(":"))){const y=h.value.lastIndexOf("["),O=h.value.slice(0,y),j=h.value.slice(y+2),L=nD[j];if(L){h.value=O+L,p.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=C);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Ie({value:d});continue}if(p.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Ie({value:d});continue}if(d==='"'){p.quotes=p.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){Pe("parens"),w({type:"paren",value:d});continue}if(d===")"){if(p.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&p.parens===g.parens+1){ws(x.pop());continue}w({type:"paren",value:d,output:p.parens?")":"\\)"}),re("parens");continue}if(d==="["){if(u.nobracket===!0||!Z().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));d=`\\${d}`}else Pe("brackets");w({type:"bracket",value:d});continue}if(d==="]"){if(u.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){w({type:"text",value:d,output:`\\${d}`});continue}if(p.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}re("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Ie({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(p.output=p.output.slice(0,-h.value.length),u.literalBrackets===!0){p.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,p.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){Pe("braces");const g={type:"brace",value:d,output:"(",outputIndex:p.output.length,tokensIndex:p.tokens.length};$.push(g),w(g);continue}if(d==="}"){const g=$[$.length-1];if(u.nobrace===!0||!g){w({type:"text",value:d,output:d});continue}let y=")";if(g.dots===!0){const O=i.slice(),j=[];for(let L=O.length-1;L>=0&&(i.pop(),O[L].type!=="brace");L--)O[L].type!=="dots"&&j.unshift(O[L].value);y=iD(j,u),p.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=p.output.slice(0,g.outputIndex),j=p.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",p.output=O;for(const L of j)p.output+=L.output||L.value}w({type:"brace",value:d,output:y}),re("braces"),$.pop();continue}if(d==="|"){x.length>0&&x[x.length-1].conditions++,w({type:"text",value:d});continue}if(d===","){let g=d;const y=$[$.length-1];y&&se[se.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&p.index===p.start+1){p.start=p.index+1,p.consumed="",p.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:E});continue}if(d==="."){if(p.braces>0&&h.type==="dot"){h.value==="."&&(h.output=c);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(p.braces+p.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:c});continue}w({type:"dot",value:d,output:c});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("qmark",d);continue}if(h&&h.type==="paren"){const y=R();let O=d;if(y==="<"&&!z.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(O=`\\${d}`),w({type:"text",value:d,output:O});continue}if(u.dot!==!0&&(h.type==="slash"||h.type==="bos")){w({type:"qmark",value:d,output:X});continue}w({type:"qmark",value:d,output:S});continue}if(d==="!"){if(u.noextglob!==!0&&R()==="("&&(R(2)!=="?"||!/[!=<:]/.test(R(3)))){ke("negate",d);continue}if(u.nonegate!==!0&&p.index===0){ys();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("plus",d);continue}if(h&&h.value==="("||u.regex===!1){w({type:"plus",value:d,output:a});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||p.parens>0){w({type:"plus",value:d});continue}w({type:"plus",value:a});continue}if(d==="@"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){w({type:"at",extglob:!0,value:d,output:""});continue}w({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const g=sD.exec(Z());g&&(d+=g[0],p.index+=g[0].length),w({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=k,p.backtrack=!0,p.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){ke("star",d);continue}if(h.type==="star"){if(u.noglobstar===!0){V(d);continue}const g=h.prev,y=g.prev,O=g.type==="slash"||g.type==="bos",j=y&&(y.type==="star"||y.type==="globstar");if(u.bash===!0&&(!O||m[0]&&m[0]!=="/")){w({type:"star",value:d,output:""});continue}const L=p.braces>0&&(g.type==="comma"||g.type==="brace"),ct=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ct){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const Me=t[p.index+4];if(Me&&Me!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&G()){h.type="globstar",h.value+=d,h.output=W(u),p.output=h.output,p.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&G()){p.output=p.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=W(u)+(u.strictSlashes?")":"|$)"),h.value+=d,p.globstar=!0,p.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const Me=m[1]!==void 0?"|$":"";p.output=p.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${W(u)}${E}|${E}${Me})`,h.value+=d,p.output+=g.output+h.output,p.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&m[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${E}|${W(u)}${E})`,p.output=h.output,p.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}p.output=p.output.slice(0,-h.output.length),h.type="globstar",h.output=W(u),h.value+=d,p.output+=h.output,p.globstar=!0,V(d);continue}const T={type:"star",value:d,output:k};if(u.bash===!0){T.output=".*?",(h.type==="bos"||h.type==="slash")&&(T.output=_+T.output),w(T);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&u.regex===!0){T.output=d,w(T);continue}(p.index===p.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(p.output+=B,h.output+=B):u.dot===!0?(p.output+=H,h.output+=H):(p.output+=_,h.output+=_),R()!=="*"&&(p.output+=C,h.output+=C)),w(T)}for(;p.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));p.output=z.escapeLast(p.output,"["),re("brackets")}for(;p.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));p.output=z.escapeLast(p.output,"("),re("parens")}for(;p.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));p.output=z.escapeLast(p.output,"{"),re("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${E}?`}),p.backtrack===!0){p.output="";for(const m of p.tokens)p.output+=m.output!=null?m.output:m.value,m.suffix&&(p.output+=m.suffix)}return p};kt.fastpaths=(t,e)=>{const u={...e},n=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe,s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);t=Cn[t]||t;const r=z.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:D,ONE_CHAR:o,DOTS_SLASH:l,NO_DOT:f,NO_DOTS:c,NO_DOTS_SLASH:a,STAR:E,START_ANCHOR:C}=qe.globChars(r),F=u.dot?c:f,A=u.dot?a:f,B=u.capture?"":"?:",H={negated:!1,prefix:""};let S=u.bash===!0?".*?":E;u.capture&&(S=`(${S})`);const X=_=>_.noglobstar===!0?S:`(${B}(?:(?!${C}${_.dot?l:i}).)*?)`,M=_=>{switch(_){case"*":return`${F}${o}${S}`;case".*":return`${i}${o}${S}`;case"*.*":return`${F}${S}${i}${o}${S}`;case"*/*":return`${F}${S}${D}${o}${A}${S}`;case"**":return F+X(u);case"**/*":return`(?:${F}${X(u)}${D})?${A}${o}${S}`;case"**/*.*":return`(?:${F}${X(u)}${D})?${A}${S}${i}${o}${S}`;case"**/.*":return`(?:${F}${X(u)}${D})?${i}${o}${S}`;default:{const b=/^(.*?)\.(\w+)$/.exec(_);if(!b)return;const k=M(b[1]);return k?k+i+b[2]:void 0}}},ne=z.removePrefix(t,H);let W=M(ne);return W&&u.strictSlashes!==!0&&(W+=`${D}?`),W};var DD=kt;const oD=K,aD=uD,Mt=DD,Wt=Ve,lD=Ye,cD=t=>t&&typeof t=="object"&&!Array.isArray(t),N=(t,e,u=!1)=>{if(Array.isArray(t)){const f=t.map(a=>N(a,e,u));return a=>{for(const E of f){const C=E(a);if(C)return C}return!1}}const n=cD(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const s=e||{},r=Wt.isWindows(e),i=n?N.compileRe(t,e):N.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(s.ignore){const f={...e,ignore:null,onMatch:null,onResult:null};o=N(s.ignore,f,u)}const l=(f,c=!1)=>{const{isMatch:a,match:E,output:C}=N.test(f,i,e,{glob:t,posix:r}),F={glob:t,state:D,regex:i,posix:r,input:f,output:C,match:E,isMatch:a};return typeof s.onResult=="function"&&s.onResult(F),a===!1?(F.isMatch=!1,c?F:!1):o(f)?(typeof s.onIgnore=="function"&&s.onIgnore(F),F.isMatch=!1,c?F:!1):(typeof s.onMatch=="function"&&s.onMatch(F),c?F:!0)};return u&&(l.state=D),l};N.test=(t,e,u,{glob:n,posix:s}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const r=u||{},i=r.format||(s?Wt.toPosixSlashes:null);let D=t===n,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===n),(D===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?D=N.matchBase(t,e,u,s):D=e.exec(o)),{isMatch:!!D,match:D,output:o}},N.matchBase=(t,e,u,n=Wt.isWindows(u))=>(e instanceof RegExp?e:N.makeRe(e,u)).test(oD.basename(t)),N.isMatch=(t,e,u)=>N(e,u)(t),N.parse=(t,e)=>Array.isArray(t)?t.map(u=>N.parse(u,e)):Mt(t,{...e,fastpaths:!1}),N.scan=(t,e)=>aD(t,e),N.compileRe=(t,e,u=!1,n=!1)=>{if(u===!0)return t.output;const s=e||{},r=s.contains?"":"^",i=s.contains?"":"$";let D=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=N.toRegex(D,e);return n===!0&&(o.state=t),o},N.makeRe=(t,e={},u=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(s.output=Mt.fastpaths(t,e)),s.output||(s=Mt(t,e)),N.compileRe(s,e,u,n)},N.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},N.constants=lD;var fD=N,Fn=fD;const we=ie,{Readable:hD}=Hs,Re=K,{promisify:Qe}=me,Gt=Fn,dD=Qe(we.readdir),ED=Qe(we.stat),gn=Qe(we.lstat),pD=Qe(we.realpath),CD="!",mn="READDIRP_RECURSIVE_ERROR",FD=new Set(["ENOENT","EPERM","EACCES","ELOOP",mn]),jt="files",_n="directories",Ze="files_directories",Je="all",An=[jt,_n,Ze,Je],gD=t=>FD.has(t.code),[yn,mD]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),_D=process.platform==="win32"&&(yn>10||yn===10&&mD>=5),wn=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=Gt(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const n of t){const s=n.trim();s.charAt(0)===CD?u.push(Gt(s.slice(1))):e.push(Gt(s))}return u.length>0?e.length>0?n=>e.some(s=>s(n.basename))&&!u.some(s=>s(n.basename)):n=>!u.some(s=>s(n.basename)):n=>e.some(s=>s(n.basename))}}};class lt extends hD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:jt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...lt.defaultOptions,...e},{root:n,type:s}=u;this._fileFilter=wn(u.fileFilter),this._directoryFilter=wn(u.directoryFilter);const r=u.lstat?gn:ED;_D?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[_n,Ze,Je].includes(s),this._wantsFile=[jt,Ze,Je].includes(s),this._wantsEverything=s===Je,this._root=Re.resolve(n),this._isDirent="Dirent"in we&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:n,files:s=[]}=this.parent||{};if(s.length>0){const r=s.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(r)){if(this.destroyed)return;const D=await this._getEntryType(i);D==="directory"&&this._directoryFilter(i)?(n<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,n+1)),this._wantsDir&&(this.push(i),e--)):(D==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let n;try{n=await dD(e,this._rdOptions)}catch(s){this._onError(s)}return{files:n,depth:u,path:e}}async _formatEntry(e,u){let n;try{const s=this._isDirent?e.name:e,r=Re.resolve(Re.join(u,s));n={path:Re.relative(this._root,r),fullPath:r,basename:s},n[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(s){this._onError(s)}return n}_onError(e){gD(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const n=e.fullPath;try{const s=await pD(n),r=await gn(s);if(r.isFile())return"file";if(r.isDirectory()){const i=s.length;if(n.startsWith(s)&&n.substr(i,1)===Re.sep){const D=new Error(`Circular symlink detected: "${n}" points to "${s}"`);return D.code=mn,this._onError(D)}return"directory"}}catch(s){this._onError(s)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ee=(t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=Ze),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!An.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${An.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new lt(e)},AD=(t,e={})=>new Promise((u,n)=>{const s=[];Ee(t,e).on("data",r=>s.push(r)).on("end",()=>u(s)).on("error",r=>n(r))});Ee.promise=AD,Ee.ReaddirpStream=lt,Ee.default=Ee;var yD=Ee,Ut={exports:{}};/*!
|
|
12
|
+
`)}function Lr(t,e){if(!t||t.length===0)return"";let u=_r(t),s=u.length;if(s===0)return"";let{stdoutColumns:n,columns:r}=Cr(e);if(r.length>s)throw new Error(`${r.length} columns defined, but only ${s} columns found`);let i=Rr(n,r,u);return t.map(o=>Hr(i,o)).join(`
|
|
13
|
+
`)}U();var Ir=["<",">","=",">=","<="];function Pr(t){if(!Ir.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function kr(t){let e=Object.keys(t).map(u=>{let[s,n]=u.split(" ");Pr(s);let r=Number.parseInt(n,10);if(Number.isNaN(r))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:s,breakpoint:r,value:i}}).sort((u,s)=>s.breakpoint-u.breakpoint);return u=>{var s;return(s=e.find(({operator:n,breakpoint:r})=>n==="="&&u===r||n===">"&&u>r||n==="<"&&u<r||n===">="&&u>=r||n==="<="&&u<=r))==null?void 0:s.value}}const Mr=t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),Wr=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),Gr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:t=>t.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function jr(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,s)=>u.localeCompare(s)).map(u=>{const s=t[u],n="alias"in s;return n&&(e=!0),{name:u,flag:s,flagFormatted:`--${Wr(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${s.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Gr}}}const Wu=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},Gu=t=>{var u;const e="parent"in t&&((u=t.parent)==null?void 0:u.name);return(e?`${e} `:"")+t.name};function Ur(t){var s;const e=[];t.name&&e.push(Gu(t));const u=(s=Wu(t))!=null?s:"parent"in t&&Wu(t.parent);if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
|
|
14
|
+
`}}function Kr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
|
|
15
|
+
`}}function Vr(t){var u;const e=t.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
|
|
16
|
+
`):e.usage}}:void 0;if(t.name){const s=[],n=[Gu(t)];if(t.flags&&Object.keys(t.flags).length>0&&n.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:r}=t,i=r.indexOf("--"),o=i>-1&&r.slice(i+1).some(D=>D.startsWith("<"));n.push(r.map(D=>D!=="--"?D:o?"--":"[--]").join(" "))}if(n.length>1&&s.push(n.join(" ")),"commands"in t&&((u=t.commands)!=null&&u.length)&&s.push(`${t.name} <command>`),s.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:s.join(`
|
|
17
|
+
`)}}}}function zr(t){var e;return!("commands"in t)||!((e=t.commands)!=null&&e.length)?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:t.commands.map(u=>[u.options.name,u.options.help?u.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function Yr(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:jr(t.flags),indentBody:0}}}function qr(t){const{help:e}=t;if(!e||!e.examples||e.examples.length===0)return;let{examples:u}=e;if(Array.isArray(u)&&(u=u.join(`
|
|
18
|
+
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function Xr(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}const Qr=t=>[Ur,Kr,Vr,zr,Yr,qr,Xr].map(e=>e(t)).filter(Boolean),Zr=vn.WriteStream.prototype.hasColors();class Jr{text(e){return e}bold(e){return Zr?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:s=2}){return`${(e?`${this.heading(e)}
|
|
19
|
+
`:"")+(u?this.indentText({text:this.render(u),spaces:s}):"")}
|
|
20
|
+
`}table({tableData:e,tableOptions:u,tableBreakpoints:s}){return Lr(e.map(n=>n.map(r=>this.render(r))),s?kr(s):u)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:u,flagFormatted:s,aliasesEnabled:n,aliasFormatted:r}=e;let i="";if(r?i+=`${r}, `:n&&(i+=" "),i+=s,"placeholder"in u&&typeof u.placeholder=="string")i+=`${this.flagOperator(e)}${u.placeholder}`;else{const o=this.flagParameter("type"in u?u.type:u);o&&(i+=`${this.flagOperator(e)}${o}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){var s;let u="description"in e&&(s=e.description)!=null?s:"";if("default"in e){let{default:n}=e;typeof n=="function"&&(n=n()),n&&(u+=` (default: ${this.flagDefault(n)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
|
|
21
|
+
`);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const gt=/^[\w.-]+$/,{stringify:J}=JSON,ei=/[|\\{}()[\]^$+*?.]/;function mt(t){const e=[];let u,s;for(const n of t){if(s)throw new Error(`Invalid parameter: Spread parameter ${J(s)} must be last`);const r=n[0],i=n[n.length-1];let o;if(r==="<"&&i===">"&&(o=!0,u))throw new Error(`Invalid parameter: Required parameter ${J(n)} cannot come after optional parameter ${J(u)}`);if(r==="["&&i==="]"&&(o=!1,u=n),o===void 0)throw new Error(`Invalid parameter: ${J(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let D=n.slice(1,-1);const a=D.slice(-3)==="...";a&&(s=n,D=D.slice(0,-3));const c=D.match(ei);if(c)throw new Error(`Invalid parameter: ${J(n)}. Invalid character found ${J(c[0])}`);e.push({name:D,required:o,spread:a})}return e}function _t(t,e,u,s){for(let n=0;n<e.length;n+=1){const{name:r,required:i,spread:o}=e[n],D=Mr(r);if(D in t)throw new Error(`Invalid parameter: ${J(r)} is used more than once.`);const a=o?u.slice(n):u[n];if(o&&(n=e.length),i&&(!a||o&&a.length===0))return console.error(`Error: Missing required parameter ${J(r)}
|
|
22
|
+
`),s(),process.exit(1);t[D]=a}}function ti(t){return t===void 0||t!==!1}function ju(t,e,u,s){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,o=ti(i);o&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const D=wu(n,s,{ignore:e.ignoreArgv}),a=()=>{console.log(e.version)};if(r&&D.flags.version===!0)return a(),process.exit(0);const c=new Jr,f=o&&(i!=null&&i.render)?i.render:p=>c.render(p),l=p=>{const F=Qr({...e,...p?{help:p}:{},flags:n});console.log(f(F,c))};if(o&&D.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:p}=e,F=D._;const A=p.indexOf("--"),B=p.slice(A+1),N=Object.create(null);if(A>-1&&B.length>0){p=p.slice(0,A);const S=D._["--"];F=F.slice(0,-S.length||void 0),_t(N,mt(p),F,l),_t(N,mt(B),S,l)}else _t(N,mt(p),F,l);Object.assign(D._,N)}const E={...D,showVersion:a,showHelp:l};return typeof u=="function"&&u(E),{command:t,...E}}function ui(t,e){const u=new Map;for(const s of e){const n=[s.options.name],{alias:r}=s.options;r&&(Array.isArray(r)?n.push(...r):n.push(r));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${J(i)}`);u.set(i,s)}}return u.get(t)}function Uu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!gt.test(t.name)))throw new Error(`Invalid script name: ${J(t.name)}`);const s=u[0];if(t.commands&>.test(s)){const n=ui(s,t.commands);if(n)return ju(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return ju(void 0,t,e,u)}function si(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!gt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var ni=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fe={exports:{}},At,Ku;function ii(){if(Ku)return At;Ku=1,At=s,s.sync=n;var t=te;function e(r,i){var o=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!o||(o=o.split(";"),o.indexOf("")!==-1))return!0;for(var D=0;D<o.length;D++){var a=o[D].toLowerCase();if(a&&r.substr(-a.length).toLowerCase()===a)return!0}return!1}function u(r,i,o){return!r.isSymbolicLink()&&!r.isFile()?!1:e(i,o)}function s(r,i,o){t.stat(r,function(D,a){o(D,D?!1:u(a,r,i))})}function n(r,i){return u(t.statSync(r),r,i)}return At}var yt,Vu;function oi(){if(Vu)return yt;Vu=1,yt=e,e.sync=u;var t=te;function e(r,i,o){t.stat(r,function(D,a){o(D,D?!1:s(a,i))})}function u(r,i){return s(t.statSync(r),i)}function s(r,i){return r.isFile()&&n(r,i)}function n(r,i){var o=r.mode,D=r.uid,a=r.gid,c=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),l=parseInt("100",8),E=parseInt("010",8),p=parseInt("001",8),F=l|E,A=o&p||o&E&&a===f||o&l&&D===c||o&F&&c===0;return A}return yt}var Ke;process.platform==="win32"||ni.TESTING_WINDOWS?Ke=ii():Ke=oi();var Di=wt;wt.sync=ai;function wt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,n){wt(t,e||{},function(r,i){r?n(r):s(i)})})}Ke(t,e||{},function(s,n){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,n=!1),u(s,n)})}function ai(t,e){try{return Ke.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}const he=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=K,li=he?";":":",Yu=Di,qu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Xu=(t,e)=>{const u=e.colon||li,s=t.match(/\//)||he&&t.match(/\\/)?[""]:[...he?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],n=he?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",r=he?n.split(u):[""];return he&&t.indexOf(".")!==-1&&r[0]!==""&&r.unshift(""),{pathEnv:s,pathExt:r,pathExtExe:n}},Qu=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:s,pathExt:n,pathExtExe:r}=Xu(t,e),i=[],o=a=>new Promise((c,f)=>{if(a===s.length)return e.all&&i.length?c(i):f(qu(t));const l=s[a],E=/^".*"$/.test(l)?l.slice(1,-1):l,p=zu.join(E,t),F=!E&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(D(F,a,0))}),D=(a,c,f)=>new Promise((l,E)=>{if(f===n.length)return l(o(c+1));const p=n[f];Yu(a+p,{pathExt:r},(F,A)=>{if(!F&&A)if(e.all)i.push(a+p);else return l(a+p);return l(D(a,c,f+1))})});return u?o(0).then(a=>u(null,a),u):o(0)},ci=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:s,pathExtExe:n}=Xu(t,e),r=[];for(let i=0;i<u.length;i++){const o=u[i],D=/^".*"$/.test(o)?o.slice(1,-1):o,a=zu.join(D,t),c=!D&&/^\.[\\\/]/.test(t)?t.slice(0,2)+a:a;for(let f=0;f<s.length;f++){const l=c+s[f];try{if(Yu.sync(l,{pathExt:n}))if(e.all)r.push(l);else return l}catch{}}}if(e.all&&r.length)return r;if(e.nothrow)return null;throw qu(t)};var fi=Qu;Qu.sync=ci;var Rt={exports:{}};const Zu=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};Rt.exports=Zu,Rt.exports.default=Zu;var hi=Rt.exports;const Ju=K,di=fi,Ei=hi;function es(t,e){const u=t.options.env||process.env,s=process.cwd(),n=t.options.cwd!=null,r=n&&process.chdir!==void 0&&!process.chdir.disabled;if(r)try{process.chdir(t.options.cwd)}catch{}let i;try{i=di.sync(t.command,{path:u[Ei({env:u})],pathExt:e?Ju.delimiter:void 0})}catch{}finally{r&&process.chdir(s)}return i&&(i=Ju.resolve(n?t.options.cwd:"",i)),i}function pi(t){return es(t)||es(t,!0)}var Ci=pi,bt={};const vt=/([()\][%!^"`<>&|;, *?])/g;function Fi(t){return t=t.replace(vt,"^$1"),t}function gi(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(vt,"^$1"),e&&(t=t.replace(vt,"^$1")),t}bt.command=Fi,bt.argument=gi;var mi=/^#!(.*)/;const _i=mi;var Ai=(t="")=>{const e=t.match(_i);if(!e)return null;const[u,s]=e[0].replace(/#! ?/,"").split(" "),n=u.split("/").pop();return n==="env"?s:s?`${n} ${s}`:n};const Bt=te,yi=Ai;function wi(t){const u=Buffer.alloc(150);let s;try{s=Bt.openSync(t,"r"),Bt.readSync(s,u,0,150,0),Bt.closeSync(s)}catch{}return yi(u.toString())}var Ri=wi;const bi=K,ts=Ci,us=bt,vi=Ri,Bi=process.platform==="win32",Si=/\.(?:com|exe)$/i,$i=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ti(t){t.file=ts(t);const e=t.file&&vi(t.file);return e?(t.args.unshift(t.file),t.command=e,ts(t)):t.file}function xi(t){if(!Bi)return t;const e=Ti(t),u=!Si.test(e);if(t.options.forceShell||u){const s=$i.test(e);t.command=bi.normalize(t.command),t.command=us.command(t.command),t.args=t.args.map(r=>us.argument(r,s));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Oi(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const s={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?s:xi(s)}var Ni=Oi;const St=process.platform==="win32";function $t(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Hi(t,e){if(!St)return;const u=t.emit;t.emit=function(s,n){if(s==="exit"){const r=ss(n,e);if(r)return u.call(t,"error",r)}return u.apply(t,arguments)}}function ss(t,e){return St&&t===1&&!e.file?$t(e.original,"spawn"):null}function Li(t,e){return St&&t===1&&!e.file?$t(e.original,"spawnSync"):null}var Ii={hookChildProcess:Hi,verifyENOENT:ss,verifyENOENTSync:Li,notFoundError:$t};const ns=xn,Tt=Ni,xt=Ii;function rs(t,e,u){const s=Tt(t,e,u),n=ns.spawn(s.command,s.args,s.options);return xt.hookChildProcess(n,s),n}function Pi(t,e,u){const s=Tt(t,e,u),n=ns.spawnSync(s.command,s.args,s.options);return n.error=n.error||xt.verifyENOENTSync(n.status,s),n}fe.exports=rs,fe.exports.spawn=rs,fe.exports.sync=Pi,fe.exports._parse=Tt,fe.exports._enoent=xt;var ki=fe.exports,Mi=ri(ki);const is=(t,e)=>{const u={...process.env},s=["inherit","inherit","inherit"];return process.send&&s.push("ipc"),e&&(e.noCache&&(u.TSX_DISABLE_CACHE="1"),e.tsconfigPath&&(u.TSX_TSCONFIG_PATH=e.tsconfigPath)),Mi(process.execPath,["--require",ht.resolve("./preflight.cjs"),On?"--import":"--loader",$n(ht.resolve("./loader.mjs")).toString(),...t],{stdio:s,env:u})};var Ve={};const Wi=K,ee="\\\\/",os=`[^${ee}]`,ue="\\.",Gi="\\+",ji="\\?",ze="\\/",Ui="(?=.)",Ds="[^/]",Ot=`(?:${ze}|$)`,as=`(?:^|${ze})`,Nt=`${ue}{1,2}${Ot}`,Ki=`(?!${ue})`,Vi=`(?!${as}${Nt})`,zi=`(?!${ue}{0,1}${Ot})`,Yi=`(?!${Nt})`,qi=`[^.${ze}]`,Xi=`${Ds}*?`,ls={DOT_LITERAL:ue,PLUS_LITERAL:Gi,QMARK_LITERAL:ji,SLASH_LITERAL:ze,ONE_CHAR:Ui,QMARK:Ds,END_ANCHOR:Ot,DOTS_SLASH:Nt,NO_DOT:Ki,NO_DOTS:Vi,NO_DOT_SLASH:zi,NO_DOTS_SLASH:Yi,QMARK_NO_DOT:qi,STAR:Xi,START_ANCHOR:as},Qi={...ls,SLASH_LITERAL:`[${ee}]`,QMARK:os,STAR:`${os}*?`,DOTS_SLASH:`${ue}{1,2}(?:[${ee}]|$)`,NO_DOT:`(?!${ue})`,NO_DOTS:`(?!(?:^|[${ee}])${ue}{1,2}(?:[${ee}]|$))`,NO_DOT_SLASH:`(?!${ue}{0,1}(?:[${ee}]|$))`,NO_DOTS_SLASH:`(?!${ue}{1,2}(?:[${ee}]|$))`,QMARK_NO_DOT:`[^.${ee}]`,START_ANCHOR:`(?:^|[${ee}])`,END_ANCHOR:`(?:[${ee}]|$)`},Zi={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ye={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Zi,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Wi.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Qi:ls}};(function(t){const e=K,u=process.platform==="win32",{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ye;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>r.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(i,"\\$1"),t.toPosixSlashes=o=>o.replace(s,"/"),t.removeBackslashes=o=>o.replace(n,D=>D==="\\"?"":D),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:u===!0||e.sep==="\\",t.escapeLast=(o,D,a)=>{const c=o.lastIndexOf(D,a);return c===-1?o:o[c-1]==="\\"?t.escapeLast(o,D,c-1):`${o.slice(0,c)}\\${o.slice(c)}`},t.removePrefix=(o,D={})=>{let a=o;return a.startsWith("./")&&(a=a.slice(2),D.prefix="./"),a},t.wrapOutput=(o,D={},a={})=>{const c=a.contains?"":"^",f=a.contains?"":"$";let l=`${c}(?:${o})${f}`;return D.negated===!0&&(l=`(?:^(?!${l}).*$)`),l}})(Ve);const cs=Ve,{CHAR_ASTERISK:Ht,CHAR_AT:Ji,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:eo,CHAR_DOT:Lt,CHAR_EXCLAMATION_MARK:It,CHAR_FORWARD_SLASH:fs,CHAR_LEFT_CURLY_BRACE:Pt,CHAR_LEFT_PARENTHESES:kt,CHAR_LEFT_SQUARE_BRACKET:to,CHAR_PLUS:uo,CHAR_QUESTION_MARK:hs,CHAR_RIGHT_CURLY_BRACE:so,CHAR_RIGHT_PARENTHESES:ds,CHAR_RIGHT_SQUARE_BRACKET:no}=Ye,Es=t=>t===fs||t===ye,ps=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},ro=(t,e)=>{const u=e||{},s=t.length-1,n=u.parts===!0||u.scanToEnd===!0,r=[],i=[],o=[];let D=t,a=-1,c=0,f=0,l=!1,E=!1,p=!1,F=!1,A=!1,B=!1,N=!1,S=!1,X=!1,M=!1,ne=0,W,_,b={value:"",depth:0,isGlob:!1};const k=()=>a>=s,C=()=>D.charCodeAt(a+1),x=()=>(W=_,D.charCodeAt(++a));for(;a<s;){_=x();let G;if(_===ye){N=b.backslashes=!0,_=x(),_===Pt&&(B=!0);continue}if(B===!0||_===Pt){for(ne++;k()!==!0&&(_=x());){if(_===ye){N=b.backslashes=!0,x();continue}if(_===Pt){ne++;continue}if(B!==!0&&_===Lt&&(_=x())===Lt){if(l=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(B!==!0&&_===eo){if(l=b.isBrace=!0,p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===so&&(ne--,ne===0)){B=!1,l=b.isBrace=!0,M=!0;break}}if(n===!0)continue;break}if(_===fs){if(r.push(a),i.push(b),b={value:"",depth:0,isGlob:!1},M===!0)continue;if(W===Lt&&a===c+1){c+=2;continue}f=a+1;continue}if(u.noext!==!0&&(_===uo||_===Ji||_===Ht||_===hs||_===It)===!0&&C()===kt){if(p=b.isGlob=!0,F=b.isExtglob=!0,M=!0,_===It&&a===c&&(X=!0),n===!0){for(;k()!==!0&&(_=x());){if(_===ye){N=b.backslashes=!0,_=x();continue}if(_===ds){p=b.isGlob=!0,M=!0;break}}continue}break}if(_===Ht){if(W===Ht&&(A=b.isGlobstar=!0),p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===hs){if(p=b.isGlob=!0,M=!0,n===!0)continue;break}if(_===to){for(;k()!==!0&&(G=x());){if(G===ye){N=b.backslashes=!0,x();continue}if(G===no){E=b.isBracket=!0,p=b.isGlob=!0,M=!0;break}}if(n===!0)continue;break}if(u.nonegate!==!0&&_===It&&a===c){S=b.negated=!0,c++;continue}if(u.noparen!==!0&&_===kt){if(p=b.isGlob=!0,n===!0){for(;k()!==!0&&(_=x());){if(_===kt){N=b.backslashes=!0,_=x();continue}if(_===ds){M=!0;break}}continue}break}if(p===!0){if(M=!0,n===!0)continue;break}}u.noext===!0&&(F=!1,p=!1);let $=D,re="",h="";c>0&&(re=D.slice(0,c),D=D.slice(c),f-=c),$&&p===!0&&f>0?($=D.slice(0,f),h=D.slice(f)):p===!0?($="",h=D):$=D,$&&$!==""&&$!=="/"&&$!==D&&Es($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=cs.removeBackslashes(h)),$&&N===!0&&($=cs.removeBackslashes($)));const d={prefix:re,input:t,start:c,base:$,glob:h,isBrace:l,isBracket:E,isGlob:p,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:X};if(u.tokens===!0&&(d.maxDepth=0,Es(_)||i.push(b),d.tokens=i),u.parts===!0||u.tokens===!0){let G;for(let R=0;R<r.length;R++){const Q=G?G+1:c,Z=r[R],V=t.slice(Q,Z);u.tokens&&(R===0&&c!==0?(i[R].isPrefix=!0,i[R].value=re):i[R].value=V,ps(i[R]),d.maxDepth+=i[R].depth),(R!==0||V!=="")&&o.push(V),G=Z}if(G&&G+1<t.length){const R=t.slice(G+1);o.push(R),u.tokens&&(i[i.length-1].value=R,ps(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=r,d.parts=o}return d};var io=ro;const qe=Ye,z=Ve,{MAX_LENGTH:Xe,POSIX_REGEX_SOURCE:oo,REGEX_NON_SPECIAL_CHARS:Do,REGEX_SPECIAL_CHARS_BACKREF:ao,REPLACEMENTS:Cs}=qe,lo=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(n=>z.escapeRegex(n)).join("..")}return u},de=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Mt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Cs[t]||t;const u={...e},s=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe;let n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);const r={type:"bos",value:"",output:u.prepend||""},i=[r],o=u.capture?"":"?:",D=z.isWindows(e),a=qe.globChars(D),c=qe.extglobChars(a),{DOT_LITERAL:f,PLUS_LITERAL:l,SLASH_LITERAL:E,ONE_CHAR:p,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:N,QMARK:S,QMARK_NO_DOT:X,STAR:M,START_ANCHOR:ne}=a,W=m=>`(${o}(?:(?!${ne}${m.dot?F:f}).)*?)`,_=u.dot?"":A,b=u.dot?S:X;let k=u.bash===!0?W(u):M;u.capture&&(k=`(${k})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const C={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=z.removePrefix(t,C),n=t.length;const x=[],$=[],re=[];let h=r,d;const G=()=>C.index===n-1,R=C.peek=(m=1)=>t[C.index+m],Q=C.advance=()=>t[++C.index]||"",Z=()=>t.slice(C.index+1),V=(m="",T=0)=>{C.consumed+=m,C.index+=T},Ie=m=>{C.output+=m.output!=null?m.output:m.value,V(m.value)},Rn=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Q(),C.start++,m++;return m%2===0?!1:(C.negated=!0,C.start++,!0)},Pe=m=>{C[m]++,re.push(m)},ie=m=>{C[m]--,re.pop()},w=m=>{if(h.type==="globstar"){const T=C.braces>0&&(m.type==="comma"||m.type==="brace"),g=m.extglob===!0||x.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!T&&!g&&(C.output=C.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,C.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Ie(m),h&&h.type==="text"&&m.type==="text"){h.value+=m.value,h.output=(h.output||"")+m.value;return}m.prev=h,i.push(m),h=m},ke=(m,T)=>{const g={...c[T],conditions:1,inner:""};g.prev=h,g.parens=C.parens,g.output=C.output;const y=(u.capture?"(":"")+g.open;Pe("parens"),w({type:m,value:T,output:C.output?"":p}),w({type:"paren",extglob:!0,value:Q(),output:y}),x.push(g)},bn=m=>{let T=m.close+(u.capture?")":""),g;if(m.type==="negate"){let y=k;if(m.inner&&m.inner.length>1&&m.inner.includes("/")&&(y=W(u)),(y!==k||G()||/^\)+$/.test(Z()))&&(T=m.close=`)$))${y}`),m.inner.includes("*")&&(g=Z())&&/^\.[^\\/.]+$/.test(g)){const O=Mt(g,{...e,fastpaths:!1}).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(C.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),ie("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(ao,(g,y,O,j,L,ct)=>j==="\\"?(m=!0,g):j==="?"?y?y+j+(L?S.repeat(L.length):""):ct===0?b+(L?S.repeat(L.length):""):S.repeat(O.length):j==="."?f.repeat(O.length):j==="*"?y?y+j+(L?k:""):k:y?g:`\\${g}`);return m===!0&&(u.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),T===t&&u.contains===!0?(C.output=t,C):(C.output=z.wrapOutput(T,C,e),C)}for(;!G();){if(d=Q(),d==="\0")continue;if(d==="\\"){const g=R();if(g==="/"&&u.bash!==!0||g==="."||g===";")continue;if(!g){d+="\\",w({type:"text",value:d});continue}const y=/^\\+/.exec(Z());let O=0;if(y&&y[0].length>2&&(O=y[0].length,C.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Q():d+=Q(),C.brackets===0){w({type:"text",value:d});continue}}if(C.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(u.posix!==!1&&d===":"){const g=h.value.slice(1);if(g.includes("[")&&(h.posix=!0,g.includes(":"))){const y=h.value.lastIndexOf("["),O=h.value.slice(0,y),j=h.value.slice(y+2),L=oo[j];if(L){h.value=O+L,C.backtrack=!0,Q(),!r.output&&i.indexOf(h)===1&&(r.output=p);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Ie({value:d});continue}if(C.quotes===1&&d!=='"'){d=z.escapeRegex(d),h.value+=d,Ie({value:d});continue}if(d==='"'){C.quotes=C.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){Pe("parens"),w({type:"paren",value:d});continue}if(d===")"){if(C.parens===0&&u.strictBrackets===!0)throw new SyntaxError(de("opening","("));const g=x[x.length-1];if(g&&C.parens===g.parens+1){bn(x.pop());continue}w({type:"paren",value:d,output:C.parens?")":"\\)"}),ie("parens");continue}if(d==="["){if(u.nobracket===!0||!Z().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));d=`\\${d}`}else Pe("brackets");w({type:"bracket",value:d});continue}if(d==="]"){if(u.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){w({type:"text",value:d,output:`\\${d}`});continue}if(C.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(de("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}ie("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Ie({value:d}),u.literalBrackets===!1||z.hasRegexChars(g))continue;const y=z.escapeRegex(h.value);if(C.output=C.output.slice(0,-h.value.length),u.literalBrackets===!0){C.output+=y,h.value=y;continue}h.value=`(${o}${y}|${h.value})`,C.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){Pe("braces");const g={type:"brace",value:d,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};$.push(g),w(g);continue}if(d==="}"){const g=$[$.length-1];if(u.nobrace===!0||!g){w({type:"text",value:d,output:d});continue}let y=")";if(g.dots===!0){const O=i.slice(),j=[];for(let L=O.length-1;L>=0&&(i.pop(),O[L].type!=="brace");L--)O[L].type!=="dots"&&j.unshift(O[L].value);y=lo(j,u),C.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=C.output.slice(0,g.outputIndex),j=C.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",C.output=O;for(const L of j)C.output+=L.output||L.value}w({type:"brace",value:d,output:y}),ie("braces"),$.pop();continue}if(d==="|"){x.length>0&&x[x.length-1].conditions++,w({type:"text",value:d});continue}if(d===","){let g=d;const y=$[$.length-1];y&&re[re.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),h=r;continue}w({type:"slash",value:d,output:E});continue}if(d==="."){if(C.braces>0&&h.type==="dot"){h.value==="."&&(h.output=f);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(C.braces+C.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:f});continue}w({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("qmark",d);continue}if(h&&h.type==="paren"){const y=R();let O=d;if(y==="<"&&!z.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(O=`\\${d}`),w({type:"text",value:d,output:O});continue}if(u.dot!==!0&&(h.type==="slash"||h.type==="bos")){w({type:"qmark",value:d,output:X});continue}w({type:"qmark",value:d,output:S});continue}if(d==="!"){if(u.noextglob!==!0&&R()==="("&&(R(2)!=="?"||!/[!=<:]/.test(R(3)))){ke("negate",d);continue}if(u.nonegate!==!0&&C.index===0){Rn();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){ke("plus",d);continue}if(h&&h.value==="("||u.regex===!1){w({type:"plus",value:d,output:l});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||C.parens>0){w({type:"plus",value:d});continue}w({type:"plus",value:l});continue}if(d==="@"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){w({type:"at",extglob:!0,value:d,output:""});continue}w({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const g=Do.exec(Z());g&&(d+=g[0],C.index+=g[0].length),w({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=k,C.backtrack=!0,C.globstar=!0,V(d);continue}let m=Z();if(u.noextglob!==!0&&/^\([^?]/.test(m)){ke("star",d);continue}if(h.type==="star"){if(u.noglobstar===!0){V(d);continue}const g=h.prev,y=g.prev,O=g.type==="slash"||g.type==="bos",j=y&&(y.type==="star"||y.type==="globstar");if(u.bash===!0&&(!O||m[0]&&m[0]!=="/")){w({type:"star",value:d,output:""});continue}const L=C.braces>0&&(g.type==="comma"||g.type==="brace"),ct=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!L&&!ct){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const Me=t[C.index+4];if(Me&&Me!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&G()){h.type="globstar",h.value+=d,h.output=W(u),C.output=h.output,C.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&G()){C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=W(u)+(u.strictSlashes?")":"|$)"),h.value+=d,C.globstar=!0,C.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const Me=m[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${W(u)}${E}|${E}${Me})`,h.value+=d,C.output+=g.output+h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&m[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${E}|${W(u)}${E})`,C.output=h.output,C.globstar=!0,V(d+Q()),w({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-h.output.length),h.type="globstar",h.output=W(u),h.value+=d,C.output+=h.output,C.globstar=!0,V(d);continue}const T={type:"star",value:d,output:k};if(u.bash===!0){T.output=".*?",(h.type==="bos"||h.type==="slash")&&(T.output=_+T.output),w(T);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&u.regex===!0){T.output=d,w(T);continue}(C.index===C.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(C.output+=B,h.output+=B):u.dot===!0?(C.output+=N,h.output+=N):(C.output+=_,h.output+=_),R()!=="*"&&(C.output+=p,h.output+=p)),w(T)}for(;C.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","]"));C.output=z.escapeLast(C.output,"["),ie("brackets")}for(;C.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing",")"));C.output=z.escapeLast(C.output,"("),ie("parens")}for(;C.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(de("closing","}"));C.output=z.escapeLast(C.output,"{"),ie("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${E}?`}),C.backtrack===!0){C.output="";for(const m of C.tokens)C.output+=m.output!=null?m.output:m.value,m.suffix&&(C.output+=m.suffix)}return C};Mt.fastpaths=(t,e)=>{const u={...e},s=typeof u.maxLength=="number"?Math.min(Xe,u.maxLength):Xe,n=t.length;if(n>s)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`);t=Cs[t]||t;const r=z.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:D,DOTS_SLASH:a,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:l,STAR:E,START_ANCHOR:p}=qe.globChars(r),F=u.dot?f:c,A=u.dot?l:c,B=u.capture?"":"?:",N={negated:!1,prefix:""};let S=u.bash===!0?".*?":E;u.capture&&(S=`(${S})`);const X=_=>_.noglobstar===!0?S:`(${B}(?:(?!${p}${_.dot?a:i}).)*?)`,M=_=>{switch(_){case"*":return`${F}${D}${S}`;case".*":return`${i}${D}${S}`;case"*.*":return`${F}${S}${i}${D}${S}`;case"*/*":return`${F}${S}${o}${D}${A}${S}`;case"**":return F+X(u);case"**/*":return`(?:${F}${X(u)}${o})?${A}${D}${S}`;case"**/*.*":return`(?:${F}${X(u)}${o})?${A}${S}${i}${D}${S}`;case"**/.*":return`(?:${F}${X(u)}${o})?${i}${D}${S}`;default:{const b=/^(.*?)\.(\w+)$/.exec(_);if(!b)return;const k=M(b[1]);return k?k+i+b[2]:void 0}}},ne=z.removePrefix(t,N);let W=M(ne);return W&&u.strictSlashes!==!0&&(W+=`${o}?`),W};var co=Mt;const fo=K,ho=io,Wt=co,Gt=Ve,Eo=Ye,po=t=>t&&typeof t=="object"&&!Array.isArray(t),H=(t,e,u=!1)=>{if(Array.isArray(t)){const c=t.map(l=>H(l,e,u));return l=>{for(const E of c){const p=E(l);if(p)return p}return!1}}const s=po(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},r=Gt.isWindows(e),i=s?H.compileRe(t,e):H.makeRe(t,e,!1,!0),o=i.state;delete i.state;let D=()=>!1;if(n.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};D=H(n.ignore,c,u)}const a=(c,f=!1)=>{const{isMatch:l,match:E,output:p}=H.test(c,i,e,{glob:t,posix:r}),F={glob:t,state:o,regex:i,posix:r,input:c,output:p,match:E,isMatch:l};return typeof n.onResult=="function"&&n.onResult(F),l===!1?(F.isMatch=!1,f?F:!1):D(c)?(typeof n.onIgnore=="function"&&n.onIgnore(F),F.isMatch=!1,f?F:!1):(typeof n.onMatch=="function"&&n.onMatch(F),f?F:!0)};return u&&(a.state=o),a};H.test=(t,e,u,{glob:s,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const r=u||{},i=r.format||(n?Gt.toPosixSlashes:null);let o=t===s,D=o&&i?i(t):t;return o===!1&&(D=i?i(t):t,o=D===s),(o===!1||r.capture===!0)&&(r.matchBase===!0||r.basename===!0?o=H.matchBase(t,e,u,n):o=e.exec(D)),{isMatch:!!o,match:o,output:D}},H.matchBase=(t,e,u,s=Gt.isWindows(u))=>(e instanceof RegExp?e:H.makeRe(e,u)).test(fo.basename(t)),H.isMatch=(t,e,u)=>H(e,u)(t),H.parse=(t,e)=>Array.isArray(t)?t.map(u=>H.parse(u,e)):Wt(t,{...e,fastpaths:!1}),H.scan=(t,e)=>ho(t,e),H.compileRe=(t,e,u=!1,s=!1)=>{if(u===!0)return t.output;const n=e||{},r=n.contains?"":"^",i=n.contains?"":"$";let o=`${r}(?:${t.output})${i}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const D=H.toRegex(o,e);return s===!0&&(D.state=t),D},H.makeRe=(t,e={},u=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Wt.fastpaths(t,e)),n.output||(n=Wt(t,e)),H.compileRe(n,e,u,s)},H.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},H.constants=Eo;var Co=H,Fs=Co;const we=te,{Readable:Fo}=Ln,Re=K,{promisify:Qe}=me,jt=Fs,go=Qe(we.readdir),mo=Qe(we.stat),gs=Qe(we.lstat),_o=Qe(we.realpath),Ao="!",ms="READDIRP_RECURSIVE_ERROR",yo=new Set(["ENOENT","EPERM","EACCES","ELOOP",ms]),Ut="files",_s="directories",Ze="files_directories",Je="all",As=[Ut,_s,Ze,Je],wo=t=>yo.has(t.code),[ys,Ro]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),bo=process.platform==="win32"&&(ys>10||ys===10&&Ro>=5),ws=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=jt(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const s of t){const n=s.trim();n.charAt(0)===Ao?u.push(jt(n.slice(1))):e.push(jt(n))}return u.length>0?e.length>0?s=>e.some(n=>n(s.basename))&&!u.some(n=>n(s.basename)):s=>!u.some(n=>n(s.basename)):s=>e.some(n=>n(s.basename))}}};class lt extends Fo{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Ut,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u={...lt.defaultOptions,...e},{root:s,type:n}=u;this._fileFilter=ws(u.fileFilter),this._directoryFilter=ws(u.directoryFilter);const r=u.lstat?gs:mo;bo?this._stat=i=>r(i,{bigint:!0}):this._stat=r,this._maxDepth=u.depth,this._wantsDir=[_s,Ze,Je].includes(n),this._wantsFile=[Ut,Ze,Je].includes(n),this._wantsEverything=n===Je,this._root=Re.resolve(s),this._isDirent="Dirent"in we&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:s,files:n=[]}=this.parent||{};if(n.length>0){const r=n.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(r)){if(this.destroyed)return;const o=await this._getEntryType(i);o==="directory"&&this._directoryFilter(i)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,s+1)),this._wantsDir&&(this.push(i),e--)):(o==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let s;try{s=await go(e,this._rdOptions)}catch(n){this._onError(n)}return{files:s,depth:u,path:e}}async _formatEntry(e,u){let s;try{const n=this._isDirent?e.name:e,r=Re.resolve(Re.join(u,n));s={path:Re.relative(this._root,r),fullPath:r,basename:n},s[this._statsProp]=this._isDirent?e:await this._stat(r)}catch(n){this._onError(n)}return s}_onError(e){wo(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const s=e.fullPath;try{const n=await _o(s),r=await gs(n);if(r.isFile())return"file";if(r.isDirectory()){const i=n.length;if(s.startsWith(n)&&s.substr(i,1)===Re.sep){const o=new Error(`Circular symlink detected: "${s}" points to "${n}"`);return o.code=ms,this._onError(o)}return"directory"}}catch(n){this._onError(n)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ee=(t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=Ze),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!As.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${As.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new lt(e)},vo=(t,e={})=>new Promise((u,s)=>{const n=[];Ee(t,e).on("data",r=>n.push(r)).on("end",()=>u(n)).on("error",r=>s(r))});Ee.promise=vo,Ee.ReaddirpStream=lt,Ee.default=Ee;var Bo=Ee,Kt={exports:{}};/*!
|
|
23
23
|
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
24
24
|
*
|
|
25
25
|
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
26
26
|
* Released under the MIT License.
|
|
27
|
-
*/var
|
|
27
|
+
*/var Rs=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var s="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),s="//")}var r=t.split(/[/\\]+/);return e!==!1&&r[r.length-1]===""&&r.pop(),s+r.join("/")},So=Kt.exports;Object.defineProperty(So,"__esModule",{value:!0});const bs=Fs,$o=Rs,vs="!",To={returnIndex:!1},xo=t=>Array.isArray(t)?t:[t],Oo=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=bs(t,e);return s=>t===s||u(s)}return t instanceof RegExp?u=>t.test(u):u=>!1},Bs=(t,e,u,s)=>{const n=Array.isArray(u),r=n?u[0]:u;if(!n&&typeof r!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r));const i=$o(r,!1);for(let D=0;D<e.length;D++){const a=e[D];if(a(i))return s?-1:!1}const o=n&&[i].concat(u.slice(1));for(let D=0;D<t.length;D++){const a=t[D];if(n?a(...o):a(i))return s?D:!0}return s?-1:!1},Vt=(t,e,u=To)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const s=typeof u=="boolean"?{returnIndex:u}:u,n=s.returnIndex||!1,r=xo(t),i=r.filter(D=>typeof D=="string"&&D.charAt(0)===vs).map(D=>D.slice(1)).map(D=>bs(D,s)),o=r.filter(D=>typeof D!="string"||typeof D=="string"&&D.charAt(0)!==vs).map(D=>Oo(D,s));return e==null?(D,a=!1)=>Bs(o,i,D,typeof a=="boolean"?a:!1):Bs(o,i,e,n)};Vt.default=Vt,Kt.exports=Vt;var No=Kt.exports;/*!
|
|
28
28
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
29
29
|
*
|
|
30
30
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
31
31
|
* Licensed under the MIT License.
|
|
32
|
-
*/var
|
|
32
|
+
*/var Ho=function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1};/*!
|
|
33
33
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
34
34
|
*
|
|
35
35
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
36
36
|
* Released under the MIT License.
|
|
37
|
-
*/var
|
|
37
|
+
*/var Lo=Ho,Ss={"{":"}","(":")","[":"]"},Io=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,s=-2,n=-2,r=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||s!==-1&&t[e]==="["&&t[e+1]!=="]"&&(s<e&&(s=t.indexOf("]",e)),s>e&&(i===-1||i>s||(i=t.indexOf("\\",e),i===-1||i>s)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||r!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(r=t.indexOf(")",e),r>e&&(i=t.indexOf("\\",e),i===-1||i>r))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(r=t.indexOf(")",u),r>u&&(i=t.indexOf("\\",u),i===-1||i>r))))return!0;if(t[e]==="\\"){var o=t[e+1];e+=2;var D=Ss[o];if(D){var a=t.indexOf(D,e);a!==-1&&(e=a+1)}if(t[e]==="!")return!0}else e++}return!1},Po=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var s=Ss[u];if(s){var n=t.indexOf(s,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},$s=function(e,u){if(typeof e!="string"||e==="")return!1;if(Lo(e))return!0;var s=Io;return u&&u.strict===!1&&(s=Po),s(e)},ko=$s,Mo=K.posix.dirname,Wo=Au.platform()==="win32",zt="/",Go=/\\/g,jo=/[\{\[].*[\}\]]$/,Uo=/(^|[^\\])([\{\[]|\([^\)]+$)/,Ko=/\\([\!\*\?\|\[\]\(\)\{\}])/g,Vo=function(e,u){var s=Object.assign({flipBackslashes:!0},u);s.flipBackslashes&&Wo&&e.indexOf(zt)<0&&(e=e.replace(Go,zt)),jo.test(e)&&(e+=zt),e+="a";do e=Mo(e);while(ko(e)||Uo.test(e));return e.replace(Ko,"$1")},et={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(s=>s.type===u),t.exceedsLimit=(e,u,s=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(s)>=n,t.escapeNode=(e,u=0,s)=>{let n=e.nodes[u];n&&(s&&n.type===s||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,s)=>(s.type==="text"&&u.push(s.value),s.type==="range"&&(s.type="text"),u),[]),t.flatten=(...e)=>{const u=[],s=n=>{for(let r=0;r<n.length;r++){let i=n[r];Array.isArray(i)?s(i):i!==void 0&&u.push(i)}return u};return s(e),u}})(et);const Ts=et;var Yt=(t,e={})=>{let u=(s,n={})=>{let r=e.escapeInvalid&&Ts.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,o="";if(s.value)return(r||i)&&Ts.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let D of s.nodes)o+=u(D);return o};return u(t)};/*!
|
|
38
38
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
41
41
|
* Released under the MIT License.
|
|
42
|
-
*/var
|
|
42
|
+
*/var zo=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
|
|
43
43
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
44
44
|
*
|
|
45
45
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
46
46
|
* Released under the MIT License.
|
|
47
|
-
*/const
|
|
47
|
+
*/const xs=zo,De=(t,e,u)=>{if(xs(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(xs(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...u};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let n=String(s.relaxZeros),r=String(s.shorthand),i=String(s.capture),o=String(s.wrap),D=t+":"+e+"="+n+r+i+o;if(De.cache.hasOwnProperty(D))return De.cache[D].result;let a=Math.min(t,e),c=Math.max(t,e);if(Math.abs(a-c)===1){let F=t+"|"+e;return s.capture?`(${F})`:s.wrap===!1?F:`(?:${F})`}let f=Ps(t)||Ps(e),l={min:t,max:e,a,b:c},E=[],p=[];if(f&&(l.isPadded=f,l.maxLen=String(l.max).length),a<0){let F=c<0?Math.abs(c):1;p=Os(F,Math.abs(a),l,s),a=l.a=0}return c>=0&&(E=Os(a,c,l,s)),l.negatives=p,l.positives=E,l.result=Yo(p,E),s.capture===!0?l.result=`(${l.result})`:s.wrap!==!1&&E.length+p.length>1&&(l.result=`(?:${l.result})`),De.cache[D]=l,l.result};function Yo(t,e,u){let s=qt(t,e,"-",!1)||[],n=qt(e,t,"",!1)||[],r=qt(t,e,"-?",!0)||[];return s.concat(r).concat(n).join("|")}function qo(t,e){let u=1,s=1,n=Hs(t,u),r=new Set([e]);for(;t<=n&&n<=e;)r.add(n),u+=1,n=Hs(t,u);for(n=Ls(e+1,s)-1;t<n&&n<=e;)r.add(n),s+=1,n=Ls(e+1,s)-1;return r=[...r],r.sort(Zo),r}function Xo(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let s=Qo(t,e),n=s.length,r="",i=0;for(let o=0;o<n;o++){let[D,a]=s[o];D===a?r+=D:D!=="0"||a!=="9"?r+=Jo(D,a):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:n}}function Os(t,e,u,s){let n=qo(t,e),r=[],i=t,o;for(let D=0;D<n.length;D++){let a=n[D],c=Xo(String(i),String(a),s),f="";if(!u.isPadded&&o&&o.pattern===c.pattern){o.count.length>1&&o.count.pop(),o.count.push(c.count[0]),o.string=o.pattern+Is(o.count),i=a+1;continue}u.isPadded&&(f=eD(a,u,s)),c.string=f+c.pattern+Is(c.count),r.push(c),i=a+1,o=c}return r}function qt(t,e,u,s,n){let r=[];for(let i of t){let{string:o}=i;!s&&!Ns(e,"string",o)&&r.push(u+o),s&&Ns(e,"string",o)&&r.push(u+o)}return r}function Qo(t,e){let u=[];for(let s=0;s<t.length;s++)u.push([t[s],e[s]]);return u}function Zo(t,e){return t>e?1:e>t?-1:0}function Ns(t,e,u){return t.some(s=>s[e]===u)}function Hs(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Ls(t,e){return t-t%Math.pow(10,e)}function Is(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function Jo(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function Ps(t){return/^-?(0+)\d/.test(t)}function eD(t,e,u){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}De.cache={},De.clearCache=()=>De.cache={};var tD=De;/*!
|
|
48
48
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
49
49
|
*
|
|
50
50
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
51
51
|
* Licensed under the MIT License.
|
|
52
|
-
*/const
|
|
53
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const fo=zt,{MAX_LENGTH:qn,CHAR_BACKSLASH:Qt,CHAR_BACKTICK:ho,CHAR_COMMA:Eo,CHAR_DOT:po,CHAR_LEFT_PARENTHESES:Co,CHAR_RIGHT_PARENTHESES:Fo,CHAR_LEFT_CURLY_BRACE:go,CHAR_RIGHT_CURLY_BRACE:mo,CHAR_LEFT_SQUARE_BRACKET:Xn,CHAR_RIGHT_SQUARE_BRACKET:Qn,CHAR_DOUBLE_QUOTE:_o,CHAR_SINGLE_QUOTE:Ao,CHAR_NO_BREAK_SPACE:yo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:wo}=co,Ro=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},n=typeof u.maxLength=="number"?Math.min(qn,u.maxLength):qn;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let s={type:"root",input:t,nodes:[]},r=[s],i=s,D=s,o=0,l=t.length,f=0,c=0,a;const E=()=>t[f++],C=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(C({type:"bos"});f<l;)if(i=r[r.length-1],a=E(),!(a===wo||a===yo)){if(a===Qt){C({type:"text",value:(e.keepEscaping?a:"")+E()});continue}if(a===Qn){C({type:"text",value:"\\"+a});continue}if(a===Xn){o++;let F;for(;f<l&&(F=E());){if(a+=F,F===Xn){o++;continue}if(F===Qt){a+=E();continue}if(F===Qn&&(o--,o===0))break}C({type:"text",value:a});continue}if(a===Co){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:a});continue}if(a===Fo){if(i.type!=="paren"){C({type:"text",value:a});continue}i=r.pop(),C({type:"text",value:a}),i=r[r.length-1];continue}if(a===_o||a===Ao||a===ho){let F=a,A;for(e.keepQuotes!==!0&&(a="");f<l&&(A=E());){if(A===Qt){a+=A+E();continue}if(A===F){e.keepQuotes===!0&&(a+=A);break}a+=A}C({type:"text",value:a});continue}if(a===go){c++;let A={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:c,commas:0,ranges:0,nodes:[]};i=C(A),r.push(i),C({type:"open",value:a});continue}if(a===mo){if(i.type!=="brace"){C({type:"text",value:a});continue}let F="close";i=r.pop(),i.close=!0,C({type:F,value:a}),c--,i=r[r.length-1];continue}if(a===Eo&&c>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:fo(i)}]}C({type:"comma",value:a}),i.commas++;continue}if(a===po&&c>0&&i.commas===0){let F=i.nodes;if(c===0||F.length===0){C({type:"text",value:a});continue}if(D.type==="dot"){if(i.range=[],D.value+=a,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let A=F[F.length-1];A.value+=D.value+a,D=A,i.ranges--;continue}C({type:"dot",value:a});continue}C({type:"text",value:a})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let F=r[r.length-1],A=F.nodes.indexOf(i);F.nodes.splice(A,1,...i.nodes)}while(r.length>0);return C({type:"eos"}),s};var bo=Ro;const Zn=zt,vo=Do,Bo=lo,So=bo,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let n of t){let s=Y.create(n,e);Array.isArray(s)?u.push(...s):u.push(s)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>So(t,e),Y.stringify=(t,e={})=>Zn(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),vo(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=Bo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var $o=Y,To=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],xo=To;const Oo=K,No=xo,Ho=new Set(No);var Lo=t=>Ho.has(Oo.extname(t).slice(1).toLowerCase()),ut={};(function(t){const{sep:e}=K,{platform:u}=process,n=_u;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=s=>s,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=n.type()==="OS400"})(ut);const ue=ie,I=K,{promisify:ve}=me,Io=Lo,{isWindows:Po,isLinux:ko,EMPTY_FN:Mo,EMPTY_STR:Wo,KEY_LISTENERS:Ce,KEY_ERR:Zt,KEY_RAW:Be,HANDLER_KEYS:Go,EV_CHANGE:nt,EV_ADD:st,EV_ADD_DIR:jo,EV_ERROR:Jn,STR_DATA:Uo,STR_END:Ko,BRACE_START:Vo,STAR:zo}=ut,Yo="watch",qo=ve(ue.open),es=ve(ue.stat),Xo=ve(ue.lstat),Qo=ve(ue.close),Jt=ve(ue.realpath),Zo={lstat:Xo,stat:es},eu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(u)},Jo=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const n=t[e];n instanceof Set?n.delete(u):n===u&&delete t[e]},ts=t=>t instanceof Set?t.size===0:!t,rt=new Map;function us(t,e,u,n,s){const r=(i,D)=>{u(t),s(i,D,{watchedPath:t}),D&&t!==D&&it(I.resolve(t,D),Ce,I.join(t,D))};try{return ue.watch(t,e,r)}catch(i){n(i)}}const it=(t,e,u,n,s)=>{const r=rt.get(t);r&&eu(r[e],i=>{i(u,n,s)})},ea=(t,e,u,n)=>{const{listener:s,errHandler:r,rawEmitter:i}=n;let D=rt.get(e),o;if(!u.persistent)return o=us(t,u,s,r,i),o.close.bind(o);if(D)Se(D,Ce,s),Se(D,Zt,r),Se(D,Be,i);else{if(o=us(t,u,it.bind(null,e,Ce),r,it.bind(null,e,Be)),!o)return;o.on(Jn,async l=>{const f=it.bind(null,e,Zt);if(D.watcherUnusable=!0,Po&&l.code==="EPERM")try{const c=await qo(t,"r");await Qo(c),f(l)}catch{}else f(l)}),D={listeners:s,errHandlers:r,rawEmitters:i,watcher:o},rt.set(e,D)}return()=>{$e(D,Ce,s),$e(D,Zt,r),$e(D,Be,i),ts(D.listeners)&&(D.watcher.close(),rt.delete(e),Go.forEach(Jo(D)),D.watcher=void 0,Object.freeze(D))}},tu=new Map,ta=(t,e,u,n)=>{const{listener:s,rawEmitter:r}=n;let i=tu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(i.listeners,i.rawEmitters,ue.unwatchFile(e),i=void 0),i?(Se(i,Ce,s),Se(i,Be,r)):(i={listeners:s,rawEmitters:r,options:u,watcher:ue.watchFile(e,u,(o,l)=>{eu(i.rawEmitters,c=>{c(nt,e,{curr:o,prev:l})});const f=o.mtimeMs;(o.size!==l.size||f>l.mtimeMs||f===0)&&eu(i.listeners,c=>c(t,o))})},tu.set(e,i)),()=>{$e(i,Ce,s),$e(i,Be,r),ts(i.listeners)&&(tu.delete(e),ue.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let ua=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const n=this.fsw.options,s=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(s).add(r);const D=I.resolve(e),o={persistent:n.persistent};u||(u=Mo);let l;return n.usePolling?(o.interval=n.enableBinaryInterval&&Io(r)?n.binaryInterval:n.interval,l=ta(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):l=ea(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(e,u,n){if(this.fsw.closed)return;const s=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(s);let D=u;if(i.has(r))return;const o=async(f,c)=>{if(this.fsw._throttle(Yo,e,5)){if(!c||c.mtimeMs===0)try{const a=await es(e);if(this.fsw.closed)return;const E=a.atimeMs,C=a.mtimeMs;(!E||E<=C||C!==D.mtimeMs)&&this.fsw._emit(nt,e,a),ko&&D.ino!==a.ino?(this.fsw._closeFile(f),D=a,this.fsw._addPathCloser(f,this._watchWithNodeFs(e,o))):D=a}catch{this.fsw._remove(s,r)}else if(i.has(r)){const a=c.atimeMs,E=c.mtimeMs;(!a||a<=E||E!==D.mtimeMs)&&this.fsw._emit(nt,e,c),D=c}}},l=this._watchWithNodeFs(e,o);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(st,e,0))return;this.fsw._emit(st,e,u)}return l}async _handleSymlink(e,u,n,s){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await Jt(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(s)?this.fsw._symlinkPaths.get(r)!==D&&(this.fsw._symlinkPaths.set(r,D),this.fsw._emit(nt,n,e.stats)):(i.add(s),this.fsw._symlinkPaths.set(r,D),this.fsw._emit(st,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,n,s,r,i,D){if(e=I.join(e,Wo),!n.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(n.path),l=new Set;let f=this.fsw._readdirp(e,{fileFilter:c=>n.filterPath(c),directoryFilter:c=>n.filterDir(c),depth:0}).on(Uo,async c=>{if(this.fsw.closed){f=void 0;return}const a=c.path;let E=I.join(e,a);if(l.add(a),!(c.stats.isSymbolicLink()&&await this._handleSymlink(c,e,E,a))){if(this.fsw.closed){f=void 0;return}(a===s||!s&&!o.has(a))&&(this.fsw._incrReadyCount(),E=I.join(r,I.relative(r,E)),this._addToNodeFs(E,u,n,i+1))}}).on(Jn,this._boundHandleError);return new Promise(c=>f.once(Ko,()=>{if(this.fsw.closed){f=void 0;return}const a=D?D.clear():!1;c(),o.getChildren().filter(E=>E!==e&&!l.has(E)&&(!n.hasGlob||n.filterPath({fullPath:I.resolve(e,E)}))).forEach(E=>{this.fsw._remove(e,E)}),f=void 0,a&&this._handleRead(e,!1,n,s,r,i,D)}))}async _handleDir(e,u,n,s,r,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),l=o.has(I.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!r&&!l&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(jo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let f,c;const a=this.fsw.options.depth;if((a==null||s<=a)&&!this.fsw._symlinkPaths.has(D)){if(!r&&(await this._handleRead(e,n,i,r,e,s,f),this.fsw.closed))return;c=this._watchWithNodeFs(e,(E,C)=>{C&&C.mtimeMs===0||this._handleRead(E,!1,i,r,e,s,f)})}return c}async _addToNodeFs(e,u,n,s,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,s);!D.hasGlob&&n&&(D.hasGlob=n.hasGlob,D.globFilter=n.globFilter,D.filterPath=o=>n.filterPath(o),D.filterDir=o=>n.filterDir(o));try{const o=await Zo[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const l=this.fsw.options.followSymlinks&&!e.includes(zo)&&!e.includes(Vo);let f;if(o.isDirectory()){const c=I.resolve(e),a=l?await Jt(e):e;if(this.fsw.closed||(f=await this._handleDir(D.watchPath,o,u,s,r,D,a),this.fsw.closed))return;c!==a&&a!==void 0&&this.fsw._symlinkPaths.set(c,a)}else if(o.isSymbolicLink()){const c=l?await Jt(e):e;if(this.fsw.closed)return;const a=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(a).add(D.watchPath),this.fsw._emit(st,D.watchPath,o),f=await this._handleDir(a,o,u,s,e,D,c),this.fsw.closed)return;c!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),c)}else f=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,f),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}};var na=ua,uu={exports:{}};const nu=ie,P=K,{promisify:su}=me;let Fe;try{Fe=ft("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(Fe){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(Fe=void 0)}}const{EV_ADD:ru,EV_CHANGE:sa,EV_ADD_DIR:ns,EV_UNLINK:Dt,EV_ERROR:ra,STR_DATA:ia,STR_END:Da,FSEVENT_CREATED:oa,FSEVENT_MODIFIED:aa,FSEVENT_DELETED:la,FSEVENT_MOVED:ca,FSEVENT_UNKNOWN:fa,FSEVENT_TYPE_FILE:ha,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:ss,ROOT_GLOBSTAR:rs,DIR_SUFFIX:da,DOT_SLASH:is,FUNCTION_TYPE:iu,EMPTY_FN:Ea,IDENTITY_FN:pa}=ut,Ca=t=>isNaN(t)?{}:{depth:t},Du=su(nu.stat),Fa=su(nu.lstat),Ds=su(nu.realpath),ga={stat:Du,lstat:Fa},le=new Map,ma=10,_a=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Aa=(t,e)=>({stop:Fe.watch(t,e)});function ya(t,e,u,n){let s=P.extname(e)?P.dirname(e):e;const r=P.dirname(s);let i=le.get(s);wa(r)&&(s=r);const D=P.resolve(t),o=D!==e,l=(c,a,E)=>{o&&(c=c.replace(e,D)),(c===D||!c.indexOf(D+P.sep))&&u(c,a,E)};let f=!1;for(const c of le.keys())if(e.indexOf(P.resolve(c)+P.sep)===0){s=c,i=le.get(s),f=!0;break}return i||f?i.listeners.add(l):(i={listeners:new Set([l]),rawEmitter:n,watcher:Aa(s,(c,a)=>{if(!i.listeners.size)return;const E=Fe.getInfo(c,a);i.listeners.forEach(C=>{C(c,a,E)}),i.rawEmitter(E.event,c,E)})},le.set(s,i)),()=>{const c=i.listeners;if(c.delete(l),!c.size&&(le.delete(s),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const wa=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=ma))return!0;return!1},Ra=()=>Fe&&le.size<128,ou=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=P.dirname(t))!==e;)u++;return u},os=(t,e)=>t.type===Te&&e.isDirectory()||t.type===ss&&e.isSymbolicLink()||t.type===ha&&e.isFile();let ba=class{constructor(e){this.fsw=e}checkIgnored(e,u){const n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return n.add(e),u&&u.isDirectory()&&n.add(e+rs),!0;n.delete(e),n.delete(e+rs)}addOrChange(e,u,n,s,r,i,D,o){const l=r.has(i)?sa:ru;this.handleEvent(l,e,u,n,s,r,i,D,o)}async checkExists(e,u,n,s,r,i,D,o){try{const l=await Du(e);if(this.fsw.closed)return;os(D,l)?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(Dt,e,u,n,s,r,i,D,o)}catch(l){l.code==="EACCES"?this.addOrChange(e,u,n,s,r,i,D,o):this.handleEvent(Dt,e,u,n,s,r,i,D,o)}}handleEvent(e,u,n,s,r,i,D,o,l){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===Dt){const f=o.type===Te;(f||i.has(D))&&this.fsw._remove(r,D,f)}else{if(e===ru){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===ss&&l.followSymlinks){const c=l.depth===void 0?void 0:ou(n,s)+1;return this._addToFsEvents(u,!1,!0,c)}this.fsw._getWatchedDir(r).add(D)}const f=o.type===Te?e+da:e;this.fsw._emit(f,u),f===ns&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,n,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,D=ya(e,u,async(o,l,f)=>{if(this.fsw.closed||r.depth!==void 0&&ou(o,u)>r.depth)return;const c=n(P.join(e,P.relative(e,o)));if(s&&!s(c))return;const a=P.dirname(c),E=P.basename(c),C=this.fsw._getWatchedDir(f.type===Te?c:a);if(_a.has(l)||f.event===fa)if(typeof r.ignored===iu){let F;try{F=await Du(c)}catch{}if(this.fsw.closed||this.checkIgnored(c,F))return;os(f,F)?this.addOrChange(c,o,u,a,C,E,f,r):this.handleEvent(Dt,c,o,u,a,C,E,f,r)}else this.checkExists(c,o,u,a,C,E,f,r);else switch(f.event){case oa:case aa:return this.addOrChange(c,o,u,a,C,E,f,r);case la:case ca:return this.checkExists(c,o,u,a,C,E,f,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,n,s){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await Ds(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let D=e;return r&&r!==is?D=i.replace(r,e):i!==is&&(D=P.join(e,i)),n(D)},!1,s)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,n,s,r){const i=n(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(P.dirname(i)),l=P.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(l)&&(o.add(l),(!s.ignoreInitial||r===!0)&&this.fsw._emit(D?ns:ru,i,u))}initWatch(e,u,n,s){if(this.fsw.closed)return;const r=this._watchWithFsEvents(n.watchPath,P.resolve(e||n.watchPath),s,n.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,n,s){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===iu?u:pa,D=this.fsw._getWatchHelpers(e);try{const o=await ga[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,r,n),s&&s>r.depth)return;this.fsw._readdirp(D.watchPath,{fileFilter:l=>D.filterPath(l),directoryFilter:l=>D.filterDir(l),...Ca(r.depth-(s||0))}).on(ia,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!D.filterPath(l))return;const f=P.join(D.watchPath,l.path),{fullPath:c}=l;if(D.followSymlinks&&l.stats.isSymbolicLink()){const a=r.depth===void 0?void 0:ou(f,P.resolve(D.watchPath))+1;this._handleFsEventsSymlink(f,c,i,a)}else this.emitAdd(f,l.stats,i,r,n)}).on(ra,Ea).on(Da,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,r,n),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&n!==!0)if(typeof u===iu)this.initWatch(void 0,e,D,i);else{let o;try{o=await Ds(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}};uu.exports=ba,uu.exports.canUse=Ra;var va=uu.exports;const{EventEmitter:Ba}=Ns,au=ie,v=K,{promisify:as}=me,Sa=yD,lu=SD.default,$a=WD,cu=$n,Ta=$o,xa=Rn,Oa=na,ls=va,{EV_ALL:fu,EV_READY:Na,EV_ADD:ot,EV_CHANGE:xe,EV_UNLINK:cs,EV_ADD_DIR:Ha,EV_UNLINK_DIR:La,EV_RAW:Ia,EV_ERROR:hu,STR_CLOSE:Pa,STR_END:ka,BACK_SLASH_RE:Ma,DOUBLE_SLASH_RE:fs,SLASH_OR_BACK_SLASH_RE:Wa,DOT_RE:Ga,REPLACER_RE:ja,SLASH:du,SLASH_SLASH:Ua,BRACE_START:Ka,BANG:Eu,ONE_DOT:hs,TWO_DOTS:Va,GLOBSTAR:za,SLASH_GLOBSTAR:pu,ANYMATCH_OPTS:Cu,STRING_TYPE:Fu,FUNCTION_TYPE:Ya,EMPTY_STR:gu,EMPTY_FN:qa,isWindows:Xa,isMacos:Qa,isIBMi:Za}=ut,Ja=as(au.stat),el=as(au.readdir),mu=(t=[])=>Array.isArray(t)?t:[t],ds=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?ds(u,e):e.push(u)}),e),Es=t=>{const e=ds(mu(t));if(!e.every(u=>typeof u===Fu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Cs)},ps=t=>{let e=t.replace(Ma,du),u=!1;for(e.startsWith(Ua)&&(u=!0);e.match(fs);)e=e.replace(fs,du);return u&&(e=du+e),e},Cs=t=>ps(v.normalize(ps(t))),Fs=(t=gu)=>e=>typeof e!==Fu?e:Cs(v.isAbsolute(e)?e:v.join(t,e)),tl=(t,e)=>v.isAbsolute(t)?t:t.startsWith(Eu)?Eu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class ul{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==hs&&e!==Va&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const n=this.path;try{await el(n)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(n),v.basename(n))}}has(e){const{items:u}=this;if(u)return u.has(e)}getChildren(){const{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const nl="stat",sl="lstat";class rl{constructor(e,u,n,s){this.fsw=s,this.path=e=e.replace(ja,gu),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===gu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?lu(e,void 0,Cu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=n,this.statMethod=n?nl:sl}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return v.join(this.watchPath,v.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Ya?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(Ka)?Ta.expand(e):[e]).forEach(s=>{u.push(v.relative(this.watchPath,s).split(Wa))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let n=!1;this.unmatchedGlob=!this.dirParts.some(s=>s.every((r,i)=>(r===za&&(n=!0),n||!u[0][i]||lu(r,u[0][i],Cu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class il extends Ba{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),ls.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=Qa),Za&&(u.usePolling=!0);const s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){const o=s.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=mu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=qa,this._readyEmitted=!0,process.nextTick(()=>this.emit(Na)))},this._emitRaw=(...o)=>this.emit(Ia,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new ls(this):this._nodeFsHandler=new Oa(this),Object.freeze(u)}add(e,u,n){const{cwd:s,disableGlobbing:r}=this.options;this.closed=!1;let i=Es(e);return s&&(i=i.map(D=>{const o=tl(D,s);return r||!cu(D)?o:xa(o)})),i=i.filter(D=>D.startsWith(Eu)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+pu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!n,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(v.dirname(o),v.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=Es(e),{cwd:n}=this.options;return u.forEach(s=>{!v.isAbsolute(s)&&!this._closers.has(s)&&(n&&(s=v.join(n,s)),s=v.resolve(s)),this._closePath(s),this._ignoredPaths.add(s),this._watched.has(s)&&this._ignoredPaths.add(s+pu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(n=>{const s=n();s instanceof Promise&&e.push(s)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,n)=>{const s=this.options.cwd?v.relative(this.options.cwd,n):n;e[s||hs]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==hu&&this.emit(fu,...u)}async _emit(e,u,n,s,r){if(this.closed)return;const i=this.options;Xa&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const D=[e,u];r!==void 0?D.push(n,s,r):s!==void 0?D.push(n,s):n!==void 0&&D.push(n);const o=i.awaitWriteFinish;let l;if(o&&(l=this._pendingWrites.get(u)))return l.lastChange=new Date,this;if(i.atomic){if(e===cs)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((f,c)=>{this.emit(...f),this.emit(fu,...f),this._pendingUnlinks.delete(c)})},typeof i.atomic=="number"?i.atomic:100),this;e===ot&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===ot||e===xe)&&this._readyEmitted){const f=(c,a)=>{c?(e=D[0]=hu,D[1]=c,this.emitWithAll(e,D)):a&&(D.length>2?D[2]=a:D.push(a),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,f),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&n===void 0&&(e===ot||e===Ha||e===xe)){const f=i.cwd?v.join(i.cwd,u):u;let c;try{c=await Ja(f)}catch{}if(!c||this.closed)return;D.push(c)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(hu,e),e||this.closed}_throttle(e,u,n){this._throttled.has(e)||this._throttled.set(e,new Map);const s=this._throttled.get(e),r=s.get(u);if(r)return r.count++,!1;let i;const D=()=>{const l=s.get(u),f=l?l.count:0;return s.delete(u),clearTimeout(i),l&&clearTimeout(l.timeoutObject),f};i=setTimeout(D,n);const o={timeoutObject:i,clear:D,count:0};return s.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,n,s){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=l=>{au.stat(i,(f,c)=>{if(f||!this._pendingWrites.has(e)){f&&f.code!=="ENOENT"&&s(f);return}const a=Number(new Date);l&&c.size!==l.size&&(this._pendingWrites.get(e).lastChange=a);const E=this._pendingWrites.get(e);a-E.lastChange>=u?(this._pendingWrites.delete(e),s(void 0,c)):r=setTimeout(o,this.options.awaitWriteFinish.pollInterval,c)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),n)}),r=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ga.test(e))return!0;if(!this._userIgnored){const{cwd:n}=this.options,s=this.options.ignored,r=s&&s.map(Fs(n)),i=mu(r).filter(o=>typeof o===Fu&&!cu(o)).map(o=>o+pu),D=this._getGlobIgnored().map(Fs(n)).concat(r,i);this._userIgnored=lu(D,void 0,Cu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const n=u||this.options.disableGlobbing||!cu(e)?e:$a(e),s=this.options.followSymlinks;return new rl(e,n,s,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=v.resolve(e);return this._watched.has(u)||this._watched.set(u,new ul(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const n=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(n.toString(8)[0],10))}_remove(e,u,n){const s=v.join(e,u),r=v.resolve(s);if(n=n!=null?n:this._watched.has(s)||this._watched.has(r),!this._throttle("remove",s,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(s).getChildren().forEach(a=>this._remove(s,a));const o=this._getWatchedDir(e),l=o.has(u);o.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let f=s;if(this.options.cwd&&(f=v.relative(this.options.cwd,s)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===ot)return;this._watched.delete(s),this._watched.delete(r);const c=n?La:cs;l&&!this._isIgnored(s)&&this._emit(c,s),this.options.useFsEvents||this._closePath(s)}_closePath(e){this._closeFile(e);const u=v.dirname(e);this._getWatchedDir(u).remove(v.basename(e))}_closeFile(e){const u=this._closers.get(e);u&&(u.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(u)}_readdirp(e,u){if(this.closed)return;const n={type:fu,alwaysStat:!0,lstat:!0,...u};let s=Sa(e,n);return this._streams.add(s),s.once(Pa,()=>{s=void 0}),s.once(ka,()=>{s&&(this._streams.delete(s),s=void 0)}),s}}const Dl=(t,e)=>{const u=new il(e);return u.add(t),u};var ol=Dl;let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Oe=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:n,COLORTERM:s}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:n==="dumb"?ce=!1:"CI"in ge.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(process.platform==="win32"||s&&(s==="truecolor"||s==="24bit")?Oe=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?Oe=2:Oe=1)}let gs={enabled:ce,supportLevel:Oe};function Ne(t,e,u=1){const n=`\x1B[${t}m`,s=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>gs.enabled&&gs.supportLevel>=u?n+(""+i).replace(r,n)+s:""+i}const He=Ne(33,39),al=Ne(90,39),ll=Ne(92,39),cl=Ne(95,39),fl=Ne(96,39),at=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},ms=(t,e=process.argv.slice(2))=>(yu(t,e,{ignore:at()}),e),hl=()=>new Date().toLocaleTimeString(),Le=(...t)=>console.log(al(hl()),fl("[tsx]"),...t),dl="\x1Bc",El=(t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},_s={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},pl=Jr({name:"watch",parameters:["<script path>"],flags:_s,help:{description:"Run the script and watch for changes"},ignoreArgv:at(!1)},t=>{const e=ms(_s,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let n,s=!1;const r=()=>{if(s)return;const c=rn(e,u);return c.on("message",a=>{if(a&&typeof a=="object"&&"type"in a&&a.type==="dependency"&&"path"in a&&typeof a.path=="string"){const E=a.path.startsWith("file:")?Ss(a.path):a.path;K.isAbsolute(E)&&f.add(E)}}),c};let i=!1;const D=async(c,a="SIGTERM",E=5e3)=>{let C=!1;const F=new Promise(A=>{c.on("exit",B=>{C=!0,i=!1,A(B)})});return i=!0,c.kill(a),setTimeout(()=>{C||(Le(He(`Process didn't exit in ${Math.floor(E/1e3)}s. Force killing...`)),c.kill("SIGKILL"))},E),await F},o=El(async(c,a)=>{const E=c?`${c?cl(c):""}${a?` in ${ll(`./${a}`)}`:""}`:"";if(i){Le(E,He("Process hasn't exited. Killing process...")),n.kill("SIGKILL");return}n&&(n.exitCode===null?(Le(E,He("Restarting...")),await D(n)):Le(E,He("Rerunning...")),u.clearScreen&&process.stdout.write(dl)),n=r()},100);o();const l=c=>{s=!0,(n==null?void 0:n.exitCode)===null?(i&&Le(He("Previous process hasn't exited yet. Force killing...")),D(n,i?"SIGKILL":c).then(a=>{process.exit(a!=null?a:0)},()=>{})):process.exit(Os.signals[c])};process.on("SIGINT",l),process.on("SIGTERM",l);const f=ol(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",o);process.stdin.on("data",()=>o("Return key"))}),Cl=t=>{let e;t.on("message",s=>{s&&s.type==="kill"&&e&&e(s.signal)});const u=()=>{const s=new Promise(r=>{setTimeout(()=>r(void 0),30),e=r});return s.then(()=>{e=void 0},()=>{}),s},n=async s=>{await u()!==s&&(t.kill(s),await u()!==s&&t.kill("SIGKILL"))};process.on("SIGINT",n),process.on("SIGTERM",n)},As={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};ju({name:"tsx",parameters:["[script path]"],commands:[pl],flags:{...As,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:at()},t=>{t.flags.version?process.stdout.write(`tsx v${vs}
|
|
52
|
+
*/const uD=me,ks=tD,Ms=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),sD=t=>e=>t===!0?Number(e):String(e),Xt=t=>typeof t=="number"||typeof t=="string"&&t!=="",be=t=>Number.isInteger(+t),Qt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},nD=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,rD=(t,e,u)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return u===!1?String(t):t},Ws=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},iD=(t,e)=>{t.negatives.sort((i,o)=>i<o?-1:i>o?1:0),t.positives.sort((i,o)=>i<o?-1:i>o?1:0);let u=e.capture?"":"?:",s="",n="",r;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),s&&n?r=`${s}|${n}`:r=s||n,e.wrap?`(${u}${r})`:r},Gs=(t,e,u,s)=>{if(u)return ks(t,e,{wrap:!1,...s});let n=String.fromCharCode(t);if(t===e)return n;let r=String.fromCharCode(e);return`[${n}-${r}]`},js=(t,e,u)=>{if(Array.isArray(t)){let s=u.wrap===!0,n=u.capture?"":"?:";return s?`(${n}${t.join("|")})`:t.join("|")}return ks(t,e,u)},Us=(...t)=>new RangeError("Invalid range arguments: "+uD.inspect(...t)),Ks=(t,e,u)=>{if(u.strictRanges===!0)throw Us([t,e]);return[]},oD=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},DD=(t,e,u=1,s={})=>{let n=Number(t),r=Number(e);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===!0)throw Us([t,e]);return[]}n===0&&(n=0),r===0&&(r=0);let i=n>r,o=String(t),D=String(e),a=String(u);u=Math.max(Math.abs(u),1);let c=Qt(o)||Qt(D)||Qt(a),f=c?Math.max(o.length,D.length,a.length):0,l=c===!1&&nD(t,e,s)===!1,E=s.transform||sD(l);if(s.toRegex&&u===1)return Gs(Ws(t,f),Ws(e,f),!0,s);let p={negatives:[],positives:[]},F=N=>p[N<0?"negatives":"positives"].push(Math.abs(N)),A=[],B=0;for(;i?n>=r:n<=r;)s.toRegex===!0&&u>1?F(n):A.push(rD(E(n,B),f,l)),n=i?n-u:n+u,B++;return s.toRegex===!0?u>1?iD(p,s):js(A,null,{wrap:!1,...s}):A},aD=(t,e,u=1,s={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return Ks(t,e,s);let n=s.transform||(l=>String.fromCharCode(l)),r=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),o=r>i,D=Math.min(r,i),a=Math.max(r,i);if(s.toRegex&&u===1)return Gs(D,a,!1,s);let c=[],f=0;for(;o?r>=i:r<=i;)c.push(n(r,f)),r=o?r-u:r+u,f++;return s.toRegex===!0?js(c,null,{wrap:!1,options:s}):c},tt=(t,e,u,s={})=>{if(e==null&&Xt(t))return[t];if(!Xt(t)||!Xt(e))return Ks(t,e,s);if(typeof u=="function")return tt(t,e,1,{transform:u});if(Ms(u))return tt(t,e,0,u);let n={...s};return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,be(u)?be(t)&&be(e)?DD(t,e,u,n):aD(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Ms(u)?oD(u,n):tt(t,e,1,u)};var Vs=tt;const lD=Vs,zs=et,cD=(t,e={})=>{let u=(s,n={})=>{let r=zs.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,o=r===!0||i===!0,D=e.escapeInvalid===!0?"\\":"",a="";if(s.isOpen===!0||s.isClose===!0)return D+s.value;if(s.type==="open")return o?D+s.value:"(";if(s.type==="close")return o?D+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":o?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let c=zs.reduce(s.nodes),f=lD(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(s.nodes)for(let c of s.nodes)a+=u(c,s);return a};return u(t)};var fD=cD;const hD=Vs,Ys=Yt,pe=et,ae=(t="",e="",u=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?pe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let r of n)s.push(ae(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),s.push(Array.isArray(r)?ae(n,r,u):n+r);return pe.flatten(s)},dD=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(n,r={})=>{n.queue=[];let i=r,o=r.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(n.invalid||n.dollar){o.push(ae(o.pop(),Ys(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){o.push(ae(o.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=pe.reduce(n.nodes);if(pe.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=hD(...f,e);l.length===0&&(l=Ys(n,e)),o.push(ae(o.pop(),l)),n.nodes=[];return}let D=pe.encloseBrace(n),a=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<n.nodes.length;f++){let l=n.nodes[f];if(l.type==="comma"&&n.type==="brace"){f===1&&a.push(""),a.push("");continue}if(l.type==="close"){o.push(ae(o.pop(),a,D));continue}if(l.value&&l.type!=="open"){a.push(ae(a.pop(),l.value));continue}l.nodes&&s(l,n)}return a};return pe.flatten(s(t))};var ED=dD,pD={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
53
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const CD=Yt,{MAX_LENGTH:qs,CHAR_BACKSLASH:Zt,CHAR_BACKTICK:FD,CHAR_COMMA:gD,CHAR_DOT:mD,CHAR_LEFT_PARENTHESES:_D,CHAR_RIGHT_PARENTHESES:AD,CHAR_LEFT_CURLY_BRACE:yD,CHAR_RIGHT_CURLY_BRACE:wD,CHAR_LEFT_SQUARE_BRACKET:Xs,CHAR_RIGHT_SQUARE_BRACKET:Qs,CHAR_DOUBLE_QUOTE:RD,CHAR_SINGLE_QUOTE:bD,CHAR_NO_BREAK_SPACE:vD,CHAR_ZERO_WIDTH_NOBREAK_SPACE:BD}=pD,SD=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},s=typeof u.maxLength=="number"?Math.min(qs,u.maxLength):qs;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let n={type:"root",input:t,nodes:[]},r=[n],i=n,o=n,D=0,a=t.length,c=0,f=0,l;const E=()=>t[c++],p=F=>{if(F.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&F.type==="text"){o.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=o,o=F,F};for(p({type:"bos"});c<a;)if(i=r[r.length-1],l=E(),!(l===BD||l===vD)){if(l===Zt){p({type:"text",value:(e.keepEscaping?l:"")+E()});continue}if(l===Qs){p({type:"text",value:"\\"+l});continue}if(l===Xs){D++;let F;for(;c<a&&(F=E());){if(l+=F,F===Xs){D++;continue}if(F===Zt){l+=E();continue}if(F===Qs&&(D--,D===0))break}p({type:"text",value:l});continue}if(l===_D){i=p({type:"paren",nodes:[]}),r.push(i),p({type:"text",value:l});continue}if(l===AD){if(i.type!=="paren"){p({type:"text",value:l});continue}i=r.pop(),p({type:"text",value:l}),i=r[r.length-1];continue}if(l===RD||l===bD||l===FD){let F=l,A;for(e.keepQuotes!==!0&&(l="");c<a&&(A=E());){if(A===Zt){l+=A+E();continue}if(A===F){e.keepQuotes===!0&&(l+=A);break}l+=A}p({type:"text",value:l});continue}if(l===yD){f++;let A={type:"brace",open:!0,close:!1,dollar:o.value&&o.value.slice(-1)==="$"||i.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};i=p(A),r.push(i),p({type:"open",value:l});continue}if(l===wD){if(i.type!=="brace"){p({type:"text",value:l});continue}let F="close";i=r.pop(),i.close=!0,p({type:F,value:l}),f--,i=r[r.length-1];continue}if(l===gD&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:CD(i)}]}p({type:"comma",value:l}),i.commas++;continue}if(l===mD&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){p({type:"text",value:l});continue}if(o.type==="dot"){if(i.range=[],o.value+=l,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){F.pop();let A=F[F.length-1];A.value+=o.value+l,o=A,i.ranges--;continue}p({type:"dot",value:l});continue}p({type:"text",value:l})}do if(i=r.pop(),i.type!=="root"){i.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let F=r[r.length-1],A=F.nodes.indexOf(i);F.nodes.splice(A,1,...i.nodes)}while(r.length>0);return p({type:"eos"}),n};var $D=SD;const Zs=Yt,TD=fD,xD=ED,OD=$D,Y=(t,e={})=>{let u=[];if(Array.isArray(t))for(let s of t){let n=Y.create(s,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(Y.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};Y.parse=(t,e={})=>OD(t,e),Y.stringify=(t,e={})=>Zs(typeof t=="string"?Y.parse(t,e):t,e),Y.compile=(t,e={})=>(typeof t=="string"&&(t=Y.parse(t,e)),TD(t,e)),Y.expand=(t,e={})=>{typeof t=="string"&&(t=Y.parse(t,e));let u=xD(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},Y.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Y.compile(t,e):Y.expand(t,e);var ND=Y,HD=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],LD=HD;const ID=K,PD=LD,kD=new Set(PD);var MD=t=>kD.has(ID.extname(t).slice(1).toLowerCase()),ut={};(function(t){const{sep:e}=K,{platform:u}=process,s=Au;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=n=>n,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=s.type()==="OS400"})(ut);const se=te,I=K,{promisify:ve}=me,WD=MD,{isWindows:GD,isLinux:jD,EMPTY_FN:UD,EMPTY_STR:KD,KEY_LISTENERS:Ce,KEY_ERR:Jt,KEY_RAW:Be,HANDLER_KEYS:VD,EV_CHANGE:st,EV_ADD:nt,EV_ADD_DIR:zD,EV_ERROR:Js,STR_DATA:YD,STR_END:qD,BRACE_START:XD,STAR:QD}=ut,ZD="watch",JD=ve(se.open),en=ve(se.stat),ea=ve(se.lstat),ta=ve(se.close),eu=ve(se.realpath),ua={lstat:ea,stat:en},tu=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let s=t[e];s instanceof Set||(t[e]=s=new Set([s])),s.add(u)},sa=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const s=t[e];s instanceof Set?s.delete(u):s===u&&delete t[e]},tn=t=>t instanceof Set?t.size===0:!t,rt=new Map;function un(t,e,u,s,n){const r=(i,o)=>{u(t),n(i,o,{watchedPath:t}),o&&t!==o&&it(I.resolve(t,o),Ce,I.join(t,o))};try{return se.watch(t,e,r)}catch(i){s(i)}}const it=(t,e,u,s,n)=>{const r=rt.get(t);r&&tu(r[e],i=>{i(u,s,n)})},na=(t,e,u,s)=>{const{listener:n,errHandler:r,rawEmitter:i}=s;let o=rt.get(e),D;if(!u.persistent)return D=un(t,u,n,r,i),D.close.bind(D);if(o)Se(o,Ce,n),Se(o,Jt,r),Se(o,Be,i);else{if(D=un(t,u,it.bind(null,e,Ce),r,it.bind(null,e,Be)),!D)return;D.on(Js,async a=>{const c=it.bind(null,e,Jt);if(o.watcherUnusable=!0,GD&&a.code==="EPERM")try{const f=await JD(t,"r");await ta(f),c(a)}catch{}else c(a)}),o={listeners:n,errHandlers:r,rawEmitters:i,watcher:D},rt.set(e,o)}return()=>{$e(o,Ce,n),$e(o,Jt,r),$e(o,Be,i),tn(o.listeners)&&(o.watcher.close(),rt.delete(e),VD.forEach(sa(o)),o.watcher=void 0,Object.freeze(o))}},uu=new Map,ra=(t,e,u,s)=>{const{listener:n,rawEmitter:r}=s;let i=uu.get(e);const o=i&&i.options;return o&&(o.persistent<u.persistent||o.interval>u.interval)&&(i.listeners,i.rawEmitters,se.unwatchFile(e),i=void 0),i?(Se(i,Ce,n),Se(i,Be,r)):(i={listeners:n,rawEmitters:r,options:u,watcher:se.watchFile(e,u,(D,a)=>{tu(i.rawEmitters,f=>{f(st,e,{curr:D,prev:a})});const c=D.mtimeMs;(D.size!==a.size||c>a.mtimeMs||c===0)&&tu(i.listeners,f=>f(t,D))})},uu.set(e,i)),()=>{$e(i,Ce,n),$e(i,Be,r),tn(i.listeners)&&(uu.delete(e),se.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};let ia=class{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const s=this.fsw.options,n=I.dirname(e),r=I.basename(e);this.fsw._getWatchedDir(n).add(r);const o=I.resolve(e),D={persistent:s.persistent};u||(u=UD);let a;return s.usePolling?(D.interval=s.enableBinaryInterval&&WD(r)?s.binaryInterval:s.interval,a=ra(e,o,D,{listener:u,rawEmitter:this.fsw._emitRaw})):a=na(e,o,D,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,s){if(this.fsw.closed)return;const n=I.dirname(e),r=I.basename(e),i=this.fsw._getWatchedDir(n);let o=u;if(i.has(r))return;const D=async(c,f)=>{if(this.fsw._throttle(ZD,e,5)){if(!f||f.mtimeMs===0)try{const l=await en(e);if(this.fsw.closed)return;const E=l.atimeMs,p=l.mtimeMs;(!E||E<=p||p!==o.mtimeMs)&&this.fsw._emit(st,e,l),jD&&o.ino!==l.ino?(this.fsw._closeFile(c),o=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,D))):o=l}catch{this.fsw._remove(n,r)}else if(i.has(r)){const l=f.atimeMs,E=f.mtimeMs;(!l||l<=E||E!==o.mtimeMs)&&this.fsw._emit(st,e,f),o=f}}},a=this._watchWithNodeFs(e,D);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(nt,e,0))return;this.fsw._emit(nt,e,u)}return a}async _handleSymlink(e,u,s,n){if(this.fsw.closed)return;const r=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let o;try{o=await eu(s)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(n)?this.fsw._symlinkPaths.get(r)!==o&&(this.fsw._symlinkPaths.set(r,o),this.fsw._emit(st,s,e.stats)):(i.add(n),this.fsw._symlinkPaths.set(r,o),this.fsw._emit(nt,s,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(r))return!0;this.fsw._symlinkPaths.set(r,!0)}_handleRead(e,u,s,n,r,i,o){if(e=I.join(e,KD),!s.hasGlob&&(o=this.fsw._throttle("readdir",e,1e3),!o))return;const D=this.fsw._getWatchedDir(s.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>s.filterPath(f),directoryFilter:f=>s.filterDir(f),depth:0}).on(YD,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let E=I.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,E,l))){if(this.fsw.closed){c=void 0;return}(l===n||!n&&!D.has(l))&&(this.fsw._incrReadyCount(),E=I.join(r,I.relative(r,E)),this._addToNodeFs(E,u,s,i+1))}}).on(Js,this._boundHandleError);return new Promise(f=>c.once(qD,()=>{if(this.fsw.closed){c=void 0;return}const l=o?o.clear():!1;f(),D.getChildren().filter(E=>E!==e&&!a.has(E)&&(!s.hasGlob||s.filterPath({fullPath:I.resolve(e,E)}))).forEach(E=>{this.fsw._remove(e,E)}),c=void 0,l&&this._handleRead(e,!1,s,n,r,i,o)}))}async _handleDir(e,u,s,n,r,i,o){const D=this.fsw._getWatchedDir(I.dirname(e)),a=D.has(I.basename(e));!(s&&this.fsw.options.ignoreInitial)&&!r&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(zD,e,u),D.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||n<=l)&&!this.fsw._symlinkPaths.has(o)){if(!r&&(await this._handleRead(e,s,i,r,e,n,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(E,p)=>{p&&p.mtimeMs===0||this._handleRead(E,!1,i,r,e,n,c)})}return f}async _addToNodeFs(e,u,s,n,r){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const o=this.fsw._getWatchHelpers(e,n);!o.hasGlob&&s&&(o.hasGlob=s.hasGlob,o.globFilter=s.globFilter,o.filterPath=D=>s.filterPath(D),o.filterDir=D=>s.filterDir(D));try{const D=await ua[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,D))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(QD)&&!e.includes(XD);let c;if(D.isDirectory()){const f=I.resolve(e),l=a?await eu(e):e;if(this.fsw.closed||(c=await this._handleDir(o.watchPath,D,u,n,r,o,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(D.isSymbolicLink()){const f=a?await eu(e):e;if(this.fsw.closed)return;const l=I.dirname(o.watchPath);if(this.fsw._getWatchedDir(l).add(o.watchPath),this.fsw._emit(nt,o.watchPath,D),c=await this._handleDir(l,D,u,n,e,o,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(o.watchPath,D,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(D){if(this.fsw._handleError(D))return i(),e}}};var oa=ia,su={exports:{}};const nu=te,P=K,{promisify:ru}=me;let Fe;try{Fe=ht("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(Fe){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(Fe=void 0)}}const{EV_ADD:iu,EV_CHANGE:Da,EV_ADD_DIR:sn,EV_UNLINK:ot,EV_ERROR:aa,STR_DATA:la,STR_END:ca,FSEVENT_CREATED:fa,FSEVENT_MODIFIED:ha,FSEVENT_DELETED:da,FSEVENT_MOVED:Ea,FSEVENT_UNKNOWN:pa,FSEVENT_TYPE_FILE:Ca,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:nn,ROOT_GLOBSTAR:rn,DIR_SUFFIX:Fa,DOT_SLASH:on,FUNCTION_TYPE:ou,EMPTY_FN:ga,IDENTITY_FN:ma}=ut,_a=t=>isNaN(t)?{}:{depth:t},Du=ru(nu.stat),Aa=ru(nu.lstat),Dn=ru(nu.realpath),ya={stat:Du,lstat:Aa},le=new Map,wa=10,Ra=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),ba=(t,e)=>({stop:Fe.watch(t,e)});function va(t,e,u,s){let n=P.extname(e)?P.dirname(e):e;const r=P.dirname(n);let i=le.get(n);Ba(r)&&(n=r);const o=P.resolve(t),D=o!==e,a=(f,l,E)=>{D&&(f=f.replace(e,o)),(f===o||!f.indexOf(o+P.sep))&&u(f,l,E)};let c=!1;for(const f of le.keys())if(e.indexOf(P.resolve(f)+P.sep)===0){n=f,i=le.get(n),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:s,watcher:ba(n,(f,l)=>{if(!i.listeners.size)return;const E=Fe.getInfo(f,l);i.listeners.forEach(p=>{p(f,l,E)}),i.rawEmitter(E.event,f,E)})},le.set(n,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(le.delete(n),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const Ba=t=>{let e=0;for(const u of le.keys())if(u.indexOf(t)===0&&(e++,e>=wa))return!0;return!1},Sa=()=>Fe&&le.size<128,au=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=P.dirname(t))!==e;)u++;return u},an=(t,e)=>t.type===Te&&e.isDirectory()||t.type===nn&&e.isSymbolicLink()||t.type===Ca&&e.isFile();let $a=class{constructor(e){this.fsw=e}checkIgnored(e,u){const s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return s.add(e),u&&u.isDirectory()&&s.add(e+rn),!0;s.delete(e),s.delete(e+rn)}addOrChange(e,u,s,n,r,i,o,D){const a=r.has(i)?Da:iu;this.handleEvent(a,e,u,s,n,r,i,o,D)}async checkExists(e,u,s,n,r,i,o,D){try{const a=await Du(e);if(this.fsw.closed)return;an(o,a)?this.addOrChange(e,u,s,n,r,i,o,D):this.handleEvent(ot,e,u,s,n,r,i,o,D)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,s,n,r,i,o,D):this.handleEvent(ot,e,u,s,n,r,i,o,D)}}handleEvent(e,u,s,n,r,i,o,D,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===ot){const c=D.type===Te;(c||i.has(o))&&this.fsw._remove(r,o,c)}else{if(e===iu){if(D.type===Te&&this.fsw._getWatchedDir(u),D.type===nn&&a.followSymlinks){const f=a.depth===void 0?void 0:au(s,n)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(r).add(o)}const c=D.type===Te?e+Fa:e;this.fsw._emit(c,u),c===sn&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,s,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const r=this.fsw.options,o=va(e,u,async(D,a,c)=>{if(this.fsw.closed||r.depth!==void 0&&au(D,u)>r.depth)return;const f=s(P.join(e,P.relative(e,D)));if(n&&!n(f))return;const l=P.dirname(f),E=P.basename(f),p=this.fsw._getWatchedDir(c.type===Te?f:l);if(Ra.has(a)||c.event===pa)if(typeof r.ignored===ou){let F;try{F=await Du(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;an(c,F)?this.addOrChange(f,D,u,l,p,E,c,r):this.handleEvent(ot,f,D,u,l,p,E,c,r)}else this.checkExists(f,D,u,l,p,E,c,r);else switch(c.event){case fa:case ha:return this.addOrChange(f,D,u,l,p,E,c,r);case da:case Ea:return this.checkExists(f,D,u,l,p,E,c,r)}},this.fsw._emitRaw);return this.fsw._emitReady(),o}async _handleFsEventsSymlink(e,u,s,n){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const r=await Dn(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(r||e,i=>{let o=e;return r&&r!==on?o=i.replace(r,e):i!==on&&(o=P.join(e,i)),s(o)},!1,n)}catch(r){if(this.fsw._handleError(r))return this.fsw._emitReady()}}}emitAdd(e,u,s,n,r){const i=s(e),o=u.isDirectory(),D=this.fsw._getWatchedDir(P.dirname(i)),a=P.basename(i);o&&this.fsw._getWatchedDir(i),!D.has(a)&&(D.add(a),(!n.ignoreInitial||r===!0)&&this.fsw._emit(o?sn:iu,i,u))}initWatch(e,u,s,n){if(this.fsw.closed)return;const r=this._watchWithFsEvents(s.watchPath,P.resolve(e||s.watchPath),n,s.globFilter);this.fsw._addPathCloser(u,r)}async _addToFsEvents(e,u,s,n){if(this.fsw.closed)return;const r=this.fsw.options,i=typeof u===ou?u:ma,o=this.fsw._getWatchHelpers(e);try{const D=await ya[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,D))throw null;if(D.isDirectory()){if(o.globFilter||this.emitAdd(i(e),D,i,r,s),n&&n>r.depth)return;this.fsw._readdirp(o.watchPath,{fileFilter:a=>o.filterPath(a),directoryFilter:a=>o.filterDir(a),..._a(r.depth-(n||0))}).on(la,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!o.filterPath(a))return;const c=P.join(o.watchPath,a.path),{fullPath:f}=a;if(o.followSymlinks&&a.stats.isSymbolicLink()){const l=r.depth===void 0?void 0:au(c,P.resolve(o.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,r,s)}).on(aa,ga).on(ca,()=>{this.fsw._emitReady()})}else this.emitAdd(o.watchPath,D,i,r,s),this.fsw._emitReady()}catch(D){(!D||this.fsw._handleError(D))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(r.persistent&&s!==!0)if(typeof u===ou)this.initWatch(void 0,e,o,i);else{let D;try{D=await Dn(o.watchPath)}catch{}this.initWatch(D,e,o,i)}}};su.exports=$a,su.exports.canUse=Sa;var Ta=su.exports;const{EventEmitter:xa}=Hn,lu=te,v=K,{promisify:ln}=me,Oa=Bo,cu=No.default,Na=Vo,fu=$s,Ha=ND,La=Rs,Ia=oa,cn=Ta,{EV_ALL:hu,EV_READY:Pa,EV_ADD:Dt,EV_CHANGE:xe,EV_UNLINK:fn,EV_ADD_DIR:ka,EV_UNLINK_DIR:Ma,EV_RAW:Wa,EV_ERROR:du,STR_CLOSE:Ga,STR_END:ja,BACK_SLASH_RE:Ua,DOUBLE_SLASH_RE:hn,SLASH_OR_BACK_SLASH_RE:Ka,DOT_RE:Va,REPLACER_RE:za,SLASH:Eu,SLASH_SLASH:Ya,BRACE_START:qa,BANG:pu,ONE_DOT:dn,TWO_DOTS:Xa,GLOBSTAR:Qa,SLASH_GLOBSTAR:Cu,ANYMATCH_OPTS:Fu,STRING_TYPE:gu,FUNCTION_TYPE:Za,EMPTY_STR:mu,EMPTY_FN:Ja,isWindows:el,isMacos:tl,isIBMi:ul}=ut,sl=ln(lu.stat),nl=ln(lu.readdir),_u=(t=[])=>Array.isArray(t)?t:[t],En=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?En(u,e):e.push(u)}),e),pn=t=>{const e=En(_u(t));if(!e.every(u=>typeof u===gu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Fn)},Cn=t=>{let e=t.replace(Ua,Eu),u=!1;for(e.startsWith(Ya)&&(u=!0);e.match(hn);)e=e.replace(hn,Eu);return u&&(e=Eu+e),e},Fn=t=>Cn(v.normalize(Cn(t))),gn=(t=mu)=>e=>typeof e!==gu?e:Fn(v.isAbsolute(e)?e:v.join(t,e)),rl=(t,e)=>v.isAbsolute(t)?t:t.startsWith(pu)?pu+v.join(e,t.slice(1)):v.join(e,t),q=(t,e)=>t[e]===void 0;class il{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;u&&e!==dn&&e!==Xa&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const s=this.path;try{await nl(s)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(s),v.basename(s))}}has(e){const{items:u}=this;if(u)return u.has(e)}getChildren(){const{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const ol="stat",Dl="lstat";class al{constructor(e,u,s,n){this.fsw=n,this.path=e=e.replace(za,mu),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===mu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&s?void 0:!1,this.globFilter=this.hasGlob?cu(e,void 0,Fu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(r=>{r.length>1&&r.pop()}),this.followSymlinks=s,this.statMethod=s?ol:Dl}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return v.join(this.watchPath,v.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const s=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===Za?this.globFilter(s):!0)&&this.fsw._isntIgnored(s,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(qa)?Ha.expand(e):[e]).forEach(n=>{u.push(v.relative(this.watchPath,n).split(Ka))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let s=!1;this.unmatchedGlob=!this.dirParts.some(n=>n.every((r,i)=>(r===Qa&&(s=!0),s||!u[0][i]||cu(r,u[0][i],Fu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class ll extends xa{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,q(u,"persistent")&&(u.persistent=!0),q(u,"ignoreInitial")&&(u.ignoreInitial=!1),q(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),q(u,"interval")&&(u.interval=100),q(u,"binaryInterval")&&(u.binaryInterval=300),q(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,q(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),cn.canUse()||(u.useFsEvents=!1),q(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=tl),ul&&(u.usePolling=!0);const n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){const D=n.toLowerCase();D==="false"||D==="0"?u.usePolling=!1:D==="true"||D==="1"?u.usePolling=!0:u.usePolling=!!D}const r=process.env.CHOKIDAR_INTERVAL;r&&(u.interval=Number.parseInt(r,10)),q(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),q(u,"followSymlinks")&&(u.followSymlinks=!0),q(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=_u(u.ignored));let o=0;this._emitReady=()=>{o++,o>=this._readyCount&&(this._emitReady=Ja,this._readyEmitted=!0,process.nextTick(()=>this.emit(Pa)))},this._emitRaw=(...D)=>this.emit(Wa,...D),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new cn(this):this._nodeFsHandler=new Ia(this),Object.freeze(u)}add(e,u,s){const{cwd:n,disableGlobbing:r}=this.options;this.closed=!1;let i=pn(e);return n&&(i=i.map(o=>{const D=rl(o,n);return r||!fu(o)?D:La(D)})),i=i.filter(o=>o.startsWith(pu)?(this._ignoredPaths.add(o.slice(1)),!1):(this._ignoredPaths.delete(o),this._ignoredPaths.delete(o+Cu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(o=>this._fsEventsHandler._addToFsEvents(o))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async o=>{const D=await this._nodeFsHandler._addToNodeFs(o,!s,0,0,u);return D&&this._emitReady(),D})).then(o=>{this.closed||o.filter(D=>D).forEach(D=>{this.add(v.dirname(D),v.basename(u||D))})})),this}unwatch(e){if(this.closed)return this;const u=pn(e),{cwd:s}=this.options;return u.forEach(n=>{!v.isAbsolute(n)&&!this._closers.has(n)&&(s&&(n=v.join(s,n)),n=v.resolve(n)),this._closePath(n),this._ignoredPaths.add(n),this._watched.has(n)&&this._ignoredPaths.add(n+Cu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(s=>{const n=s();n instanceof Promise&&e.push(n)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,s)=>{const n=this.options.cwd?v.relative(this.options.cwd,s):s;e[n||dn]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==du&&this.emit(hu,...u)}async _emit(e,u,s,n,r){if(this.closed)return;const i=this.options;el&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const o=[e,u];r!==void 0?o.push(s,n,r):n!==void 0?o.push(s,n):s!==void 0&&o.push(s);const D=i.awaitWriteFinish;let a;if(D&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===fn)return this._pendingUnlinks.set(u,o),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(hu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===Dt&&this._pendingUnlinks.has(u)&&(e=o[0]=xe,this._pendingUnlinks.delete(u))}if(D&&(e===Dt||e===xe)&&this._readyEmitted){const c=(f,l)=>{f?(e=o[0]=du,o[1]=f,this.emitWithAll(e,o)):l&&(o.length>2?o[2]=l:o.push(l),this.emitWithAll(e,o))};return this._awaitWriteFinish(u,D.stabilityThreshold,e,c),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&s===void 0&&(e===Dt||e===ka||e===xe)){const c=i.cwd?v.join(i.cwd,u):u;let f;try{f=await sl(c)}catch{}if(!f||this.closed)return;o.push(f)}return this.emitWithAll(e,o),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(du,e),e||this.closed}_throttle(e,u,s){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e),r=n.get(u);if(r)return r.count++,!1;let i;const o=()=>{const a=n.get(u),c=a?a.count:0;return n.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(o,s);const D={timeoutObject:i,clear:o,count:0};return n.set(u,D),D}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,s,n){let r,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const o=new Date,D=a=>{lu.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&n(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const E=this._pendingWrites.get(e);l-E.lastChange>=u?(this._pendingWrites.delete(e),n(void 0,f)):r=setTimeout(D,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:o,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(r),s)}),r=setTimeout(D,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Va.test(e))return!0;if(!this._userIgnored){const{cwd:s}=this.options,n=this.options.ignored,r=n&&n.map(gn(s)),i=_u(r).filter(D=>typeof D===gu&&!fu(D)).map(D=>D+Cu),o=this._getGlobIgnored().map(gn(s)).concat(r,i);this._userIgnored=cu(o,void 0,Fu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const s=u||this.options.disableGlobbing||!fu(e)?e:Na(e),n=this.options.followSymlinks;return new al(e,s,n,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=v.resolve(e);return this._watched.has(u)||this._watched.set(u,new il(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const s=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(s.toString(8)[0],10))}_remove(e,u,s){const n=v.join(e,u),r=v.resolve(n);if(s=s!=null?s:this._watched.has(n)||this._watched.has(r),!this._throttle("remove",n,100))return;!s&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(n).getChildren().forEach(l=>this._remove(n,l));const D=this._getWatchedDir(e),a=D.has(u);D.remove(u),this._symlinkPaths.has(r)&&this._symlinkPaths.delete(r);let c=n;if(this.options.cwd&&(c=v.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===Dt)return;this._watched.delete(n),this._watched.delete(r);const f=s?Ma:fn;a&&!this._isIgnored(n)&&this._emit(f,n),this.options.useFsEvents||this._closePath(n)}_closePath(e){this._closeFile(e);const u=v.dirname(e);this._getWatchedDir(u).remove(v.basename(e))}_closeFile(e){const u=this._closers.get(e);u&&(u.forEach(s=>s()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let s=this._closers.get(e);s||(s=[],this._closers.set(e,s)),s.push(u)}_readdirp(e,u){if(this.closed)return;const s={type:hu,alwaysStat:!0,lstat:!0,...u};let n=Oa(e,s);return this._streams.add(n),n.once(Ga,()=>{n=void 0}),n.once(ja,()=>{n&&(this._streams.delete(n),n=void 0)}),n}}const cl=(t,e)=>{const u=new ll(e);return u.add(t),u};var fl=cl;let ce=!0;const ge=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let Oe=0;if(ge.process&&ge.process.env&&ge.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:u,TERM:s,COLORTERM:n}=ge.process.env;e||u||t==="0"?ce=!1:t==="1"||t==="2"||t==="3"?ce=!0:s==="dumb"?ce=!1:"CI"in ge.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(r=>r in ge.process.env)?ce=!0:ce=process.stdout.isTTY,ce&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?Oe=3:s&&(s.endsWith("-256color")||s.endsWith("256"))?Oe=2:Oe=1)}let mn={enabled:ce,supportLevel:Oe};function Ne(t,e,u=1){const s=`\x1B[${t}m`,n=`\x1B[${e}m`,r=new RegExp(`\\x1b\\[${e}m`,"g");return i=>mn.enabled&&mn.supportLevel>=u?s+(""+i).replace(r,s)+n:""+i}const He=Ne(33,39),hl=Ne(90,39),dl=Ne(92,39),El=Ne(95,39),pl=Ne(96,39),at=(t=!0)=>{let e=!1;return u=>{if(e||u==="unknown-flag")return!0;if(u==="argument")return e=!0,t}},_n=(t,e=process.argv.slice(2))=>(wu(t,e,{ignore:at()}),e),Cl=t=>{let e=Buffer.alloc(0);return u=>{for(e=Buffer.concat([e,u]);e.length>4;){const s=e.readInt32BE(0);if(e.length>=4+s){const n=e.slice(4,4+s);t(n),e=e.slice(4+s)}else break}}},An=async()=>{const t=In.createServer(u=>{u.on("data",Cl(s=>{const n=JSON.parse(s.toString());t.emit("data",n)}))}),e=kn(process.pid);return await te.promises.mkdir(Pn,{recursive:!0}),await new Promise((u,s)=>{t.listen(e,u),t.on("error",s)}),t.unref(),process.on("exit",()=>{if(t.close(),process.platform!=="win32")try{te.rmSync(e)}catch{}}),t},Fl=()=>new Date().toLocaleTimeString(),Le=(...t)=>console.log(hl(Fl()),pl("[tsx]"),...t),gl="\x1Bc",ml=(t,e)=>{let u;return function(){u&&clearTimeout(u),u=setTimeout(()=>Reflect.apply(t,this,arguments),e)}},yn={noCache:{type:Boolean,description:"Disable caching",default:!1},tsconfig:{type:String,description:"Custom tsconfig.json path"},clearScreen:{type:Boolean,description:"Clearing the screen on rerun",default:!0},ignore:{type:[String],description:"Paths & globs to exclude from being watched"}},_l=si({name:"watch",parameters:["<script path>"],flags:yn,help:{description:"Run the script and watch for changes"},ignoreArgv:at(!1)},async t=>{const e=_n(yn,process.argv.slice(3)),u={noCache:t.flags.noCache,tsconfigPath:t.flags.tsconfig,clearScreen:t.flags.clearScreen,ignore:t.flags.ignore,ipc:!0};let s,n=!1;(await An()).on("data",l=>{if(l&&typeof l=="object"&&"type"in l&&l.type==="dependency"&&"path"in l&&typeof l.path=="string"){const E=l.path.startsWith("file:")?Tn(l.path):l.path;K.isAbsolute(E)&&f.add(E)}});const i=()=>{if(!n)return is(e,u)};let o=!1;const D=async(l,E="SIGTERM",p=5e3)=>{let F=!1;const A=new Promise(B=>{l.on("exit",N=>{F=!0,o=!1,B(N)})});return o=!0,l.kill(E),setTimeout(()=>{F||(Le(He(`Process didn't exit in ${Math.floor(p/1e3)}s. Force killing...`)),l.kill("SIGKILL"))},p),await A},a=ml(async(l,E)=>{const p=l?`${l?El(l):""}${E?` in ${dl(`./${E}`)}`:""}`:"";if(o){Le(p,He("Process hasn't exited. Killing process...")),s.kill("SIGKILL");return}s&&(s.exitCode===null?(Le(p,He("Restarting...")),await D(s)):Le(p,He("Rerunning...")),u.clearScreen&&process.stdout.write(gl)),s=i()},100);a();const c=l=>{n=!0,(s==null?void 0:s.exitCode)===null?(o&&Le(He("Previous process hasn't exited yet. Force killing...")),D(s,o?"SIGKILL":l).then(E=>{process.exit(E!=null?E:0)},()=>{})):process.exit(ft.signals[l])};process.on("SIGINT",c),process.on("SIGTERM",c);const f=fl(t._,{cwd:process.cwd(),ignoreInitial:!0,ignored:["**/.*/**","**/.*","**/{node_modules,bower_components,vendor}/**",...u.ignore],ignorePermissionErrors:!0}).on("all",a);process.stdin.on("data",()=>a("Return key"))}),Al=(t,e)=>{let u;e.on("data",r=>{r&&r.type==="signal"&&u&&u(r.signal)});const s=()=>{const r=new Promise(i=>{setTimeout(()=>i(void 0),30),u=i});return r.then(()=>{u=void 0},()=>{}),r},n=async r=>{await s()!==r&&(t.kill(r),await s()!==r&&(t.on("exit",()=>{const D=ft.signals[r];process.exit(128+D)}),t.kill("SIGKILL")))};process.on("SIGINT",n),process.on("SIGTERM",n)},wn={noCache:{type:Boolean,description:"Disable caching"},tsconfig:{type:String,description:"Custom tsconfig.json path"}};Uu({name:"tsx",parameters:["[script path]"],commands:[_l],flags:{...wn,version:{type:Boolean,alias:"v",description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1,ignoreArgv:at()},async t=>{t.flags.version?process.stdout.write(`tsx v${Sn}
|
|
54
54
|
node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
|
|
55
|
-
`));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:
|
|
55
|
+
`));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:s}=Uu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:at(!1)}),n=_n({...wn,...e}),i=["print","eval"].find(a=>!!s[a]);if(i){const{inputType:a}=s,c=s[i],f=Bn(c,{loader:"default",sourcefile:"/eval.ts",format:a==="module"?"esm":"cjs"});n.unshift(`--${i}`,f.code)}Nn&&s.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const o=await An(),D=is(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});Al(D,o),process.send&&D.on("message",a=>{process.send(a)}),D.send&&process.on("message",a=>{D.send(a)}),D.on("close",a=>{a===null&&(a=ft.signals[D.signalCode]+128),process.exit(a)})});
|