codigo0/backend/node_modules/tsx/dist/cli.mjs

56 lines
118 KiB
JavaScript
Raw Normal View History

#!/usr/bin/env node
var Rn=Object.defineProperty;var a=(t,e)=>Rn(t,"name",{value:e,configurable:!0});import{constants as lt}from"node:os";import bn from"tty";import{transformSync as vn}from"esbuild";import{v as Sn}from"./package-CeBgXWuR.mjs";import{r as Ie,g as Bn,i as $n}from"./get-pipe-path-BHW2eJdv.mjs";import{pathToFileURL as Tn,fileURLToPath as xn}from"node:url";import On from"child_process";import z from"path";import De from"fs";import{i as mu,m as Nn,t as Hn}from"./node-features-_8ZFwP_x.mjs";import Pn from"node:path";import Ln from"events";import ge from"util";import In from"stream";import _u from"os";import{g as kn,l as Mn,e as Gn,f as Wn,y as me}from"./index-gbaejti9.mjs";import jn from"node:net";import ct from"node:fs";import{t as Un}from"./temporary-directory-CwHp0_NW.mjs";import"module";const Kn="known-flag",Vn="unknown-flag",zn="argument",{stringify:_e}=JSON,Yn=/\B([A-Z])/g,qn=a(t=>t.replace(Yn,"-$1").toLowerCase(),"v$1"),{hasOwnProperty:Xn}=Object.prototype,Ae=a((t,e)=>Xn.call(t,e),"w$2"),Qn=a(t=>Array.isArray(t),"L$2"),Au=a(t=>typeof t=="function"?[t,!1]:Qn(t)?[t[0],!0]:Au(t.type),"b$2"),Zn=a((t,e)=>t===Boolean?e!=="false":e,"d$2"),Jn=a((t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),"m$1"),er=/[\s.:=]/,tr=a(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(er);if(u)throw new Error(`${e} cannot contain ${_e(u?.[0])}`)},"B"),ur=a(t=>{const e={},u=a((s,n)=>{if(Ae(e,s))throw new Error(`Duplicate flags named ${_e(s)}`);e[s]=n},"r");for(const s in t){if(!Ae(t,s))continue;tr(s);const n=t[s],r=[[],...Au(n),n];u(s,r);const i=qn(s);if(s!==i&&u(i,r),"alias"in n&&typeof n.alias=="string"){const{alias:D}=n,o=`Flag alias ${_e(D)} for flag ${_e(s)}`;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},"K$1"),sr=a((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:D}=i;typeof D=="function"&&(D=D()),u[s]=D}else u[s]=r?n:n.pop()}return u},"_$2"),ke="--",nr=/[.:=]/,rr=/^-{1,2}\w/,ir=a(t=>{if(!rr.test(t))return;const e=!t.startsWith(ke);let u=t.slice(e?1:2),s;const n=u.match(nr);if(n){const{index:r}=n;s=u.slice(r+1),u=u.slice(0,r)}return[u,s,e]},"N"),Dr=a((t,{onFlag:e,onArgument:u})=>{let s;const n=a((r,i)=>{if(typeof s!="function")return!0;s(r,i),s=void 0},"o");for(let r=0;r<t.length;r+=1){const i=t[r];if(i===ke){n();const o=t.slice(r+1);u?.(o,[r],!0);break}const D=ir(i);if(D){if(n(),!e)continue;const[o,c,f]=D;if(f)for(let h=0;h<o.length;h+=1){n();const l=h===o.length-1;s=e(o[h],l?c:void 0,[r,h+1,l])}else s=e(o,c,[r])}else n(i,[r])&&u?.([i],[r])}n()},"$$1"),or=a((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)}},"E"),yu=a((t,e=process.argv.slice(2),{ignore:u}={})=>{const s=[],n=ur(t),r={},i=[];return i[ke]=[],Dr(e,{onFlag(D,o,c){const f=Ae(n,D);if(!u?.(f?Kn:Vn,D,o)){if(f){const[h,l]=n[D],p=Zn(l,o),C=a((g,y)=>{s.push(c),y&&s.push(y),h.push(Jn(l,g||""))},"p");return p===void 0?C:C(p)}Ae(r,D)||(r[D]=[]),r[D].push(o===void 0?!0:o),s.push(c)}},onArgument(D,o,c){u?.(zn,e[o[0]])||(i.push(...D),c?(i[ke]=D,e.splice(o[0])):s.push(o))}}),or(e,s),{flags:sr(t,n),unknownFlags:r,_:i}},"U$2");var ar=Object.create,Me=Object.defineProperty,lr=Object.defineProperties,cr=Object.getOwnPropertyDescriptor,fr=Object.getOwnPropertyDescriptors,hr=Object.getOwnPropertyNames,wu=Object.getOwnPropertySymbols,dr=Object.getPrototypeOf,Ru=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,bu=a((t,e,u)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,"W$1"),Ge=a((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))Er.call(e,u)&&bu(t,u,e[u]);return t},"p"),ft=a((t,e)=>lr(t,fr(e)),"c"),pr=a(t=>Me(t,"__esModule",{value:!0}),"nD"),Cr=a((t,e)=>()=>(t&&(e=t(t=0)),e),"rD"),Fr=a((t,e)=>()=>(e||t((e={exports:{}}).exports,
`).map(oe)),"b$1"),br=a(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},"k$1");K();var Bu=/^\d+%$/,$u={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},vr=a((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"&&Bu.test(r)){s.push(ft(Ge({},$u),{width:r,contentWidth:t[n]}));continue}if(r&&typeof r=="object"){let i=ft(Ge(Ge({},$u),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},"sD");function Sr(t,e){for(let u of t){let{width:s}=u;if(s==="content-width"&&(u.width=u.contentWidth),s==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof s=="string"&&Bu.test(s)){let o=Number.parseFloat(s.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,r=1,i=r+n;if(i>=e){let o=i-e,c=Math.ceil(u.paddingLeft/n*o),f=o-c;u.paddingLeft-=c,u.paddingRight-=f,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),r)}}a(Sr,"aD");var Tu=a(()=>Object.assign([],{columns:0}),"G$1");function Br(t,e){let u=[Tu()],[s]=u;for(let n of t){let r=n.width+n.horizontalPadding;s.columns+r>e&&(s=Tu(),u.push(s)),s.push(n),s.columns+=r}for(let n of u){let r=n.reduce((l,p)=>l+p.width+p.horizontalPadding,0),i=e-r;if(i===0)continue;let D=n.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),c=o.reduce((l,p)=>l+p.autoOverflow,0),f=Math.min(c,i);for(let l of o){let p=Math.floor(l.autoOverflow/c*f);l.width+=p,i-=p}let h=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let p=D[l];l===D.length-1?p.width+=i:p.width+=h,i-=h}}return u}a(Br,"lD");function $r(t,e,u){let s=vr(u,e);return Sr(s,t),Br(s,t)}a($r,"Z$1"),K(),K(),K();var ht=10,xu=a((t=0)=>e=>`\x1B[${e+t}m`,"U$1"),Ou=a((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"V$1"),Nu=a((t=0)=>(e,u,s)=>`\x1B[${38+t};2;${e};${u};${s}m`,"Y");function Tr(){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=xu(),e.color.ansi256=Ou(),e.color.ansi16m=Nu(),e.bgColor.ansi=xu(ht),e.bgColor.ansi256=Ou(ht),e.bgColor.ansi16m=Nu(ht),Object.defineProperties(e,{rgbToAnsi256:{value:a((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),"value"),enumerable:!1},hexToRgb:{value:a(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===
`)];for(let[c,f]of o.entries()){if(s+=f,We.has(f)){let{groups:l}=new RegExp(`(?:\\${Hu}(?<code>\\d+)m|\\${Et}(?<uri>.*)${dt})`).exec(o.slice(c).join(""))||{groups:{}};if(l.code!==void 0){let p=Number.parseFloat(l.code);n=p===Nr?void 0:p}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let h=Or.codes.get(Number(n));o[c+1]===`
`?(r&&(s+=Iu("")),n&&h&&(s+=Lu(h))):f===`
`&&(n&&h&&(s+=Lu(n)),r&&(s+=Iu(r)))}return s},"dD");function kr(t,e,u){return String(t).normalize().replace(/\r\n/g,`
`).split(`
`).map(s=>Ir(s,e,u)).join(`
`)}a(kr,"T$1");var ku=a(t=>Array.from({length:t}).fill(""),"X");function Mr(t,e){let u=[],s=0;for(let n of t){let r=0,i=n.map(o=>{var c;let f=(c=e[s])!=null?c:"";s+=1,o.preprocess&&(f=o.preprocess(f)),Su(f)>o.width&&(f=kr(f,o.width,{hard:!0}));let h=f.split(`
`);if(o.postprocess){let{postprocess:l}=o;h=h.map((p,C)=>l.call(o,p,C))}return o.paddingTop&&h.unshift(...ku(o.paddingTop)),o.paddingBottom&&h.push(...ku(o.paddingBottom)),h.length>r&&(r=h.length),ft(Ge({},o),{lines:h})}),D=[];for(let o=0;o<r;o+=1){let c=i.map(f=>{var h;let l=(h=f.lines[o])!=null?h:"",p=Number.isFinite(f.width)?" ".repeat(f.width-oe(l)):"",C=f.paddingLeftString;return f.align==="right"&&(C+=p),C+=l,f.align==="left"&&(C+=p),C+f.paddingRightString}).join("");D.push(c)}u.push(D.join(`
`))}return u.join(`
`)}a(Mr,"P");function Gr(t,e){if(!t||t.length===0)return"";let u=br(t),s=u.length;if(s===0)return"";let{stdoutColumns:n,columns:r}=Ar(e);if(r.length>s)throw new Error(`${r.length} columns defined, but only ${s} columns found`);let i=$r(n,r,u);return t.map(D=>Mr(i,D)).join(`
`)}a(Gr,"mD"),K();var Wr=["<",">","=",">=","<="];function jr(t){if(!Wr.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}a(jr,"xD");function Ur(t){let e=Object.keys(t).map(u=>{let[s,n]=u.split(" ");jr(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}}a(Ur,"wD");const Kr=a(t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),"S"),Vr=a(t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q"),zr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:a(t=>t.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Yr(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:`--${Vr(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${s.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:zr}}}a(Yr,"D");const Mu=a(t=>!t||(t.version??(t.help?t.help.version:void 0)),"A"),Gu=a(t=>{const e="parent"in t&&t.parent?.name;return(e?`${e} `:"")+t.name},"C");function qr(t){const e=[];t.name&&e.push(Gu(t));const u=Mu(t)??("parent"in t&&Mu(t.parent));if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
`}}a(qr,"R");function Xr(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
`}}a(Xr,"L");function Qr(t){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(`
`):e.usage}}:void 0;if(t.name){const u=[],s=[Gu(t)];if(t.flags&&Object.keys(t.flags).length>0&&s.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:n}=t,r=n.indexOf("--"),i=r>-1&&n.slice(r+1).some(D=>D.startsWith("<"));s.push(n.map(D=>D!=="--"?D:i?"--":"[--]").join(" "))}if(s.length>1&&u.push(s.join(" ")),"commands"in t&&t.commands?.length&&u.push(`${t.name} <command>`),u.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:u.join(`
`)}}}}a(Qr,"T");function Zr(t){return!("commands"in t)||!t.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:t.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}a(Zr,"_");function Jr(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Yr(t.flags),indentBody:0}}}a(Jr,"k");function ei(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(`
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}a(ei,"F");function ti(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}}}a(ti,"H");const ui=a(t=>[qr,Xr,Qr,Zr,Jr,ei,ti].map(e=>e(t)).filter(Boolean),"U"),si=bn.WriteStream.prototype.hasColors();class ni{static{a(this,"M")}text(e){return e}bold(e){return si?`\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)}
`:"")+(u?this.indentText({text:this.render(u),spaces:s}):"")}
`}table({tableData:e,tableOptions:u,tableBreakpoints:s}){return Gr(e.map(n=>n.map(r=>this.render(r))),s?Ur(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 D=this.flagParameter("type"in u?u.type:u);D&&(i+=`${this.flagOperator(e)}${D}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let u="description"in e?e.description??"":"";if("default"in e){let{default:s}=e;typeof s=="function"&&(s=s()),s&&(u+=` (default: ${this.flagDefault(s)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
`);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 Ct=/^[\w.-]+$/,{stringify:ee}=JSON,ri=/[|\\{}()[\]^$+*?.]/;function Ft(t){const e=[];let u,s;for(const n of t){if(s)throw new Error(`Invalid parameter: Spread parameter ${ee(s)} must be last`);const r=n[0],i=n[n.length-1];let D;if(r==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${ee(n)} cannot come after optional parameter ${ee(u)}`);if(r==="["&&i==="]"&&(D=!1,u=n),D===void 0)throw new Error(`Invalid parameter: ${ee(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=n.slice(1,-1);const c=o.slice(-3)==="...";c&&(s=n,o=o.slice(0,-3));const f=o.match(ri);if(f)throw new Error(`Invalid parameter: ${ee(n)}. Invalid character found ${ee(f[0])}`);e.push({name:o,required:D,spread:c})}return e}a(Ft,"w");function gt(t,e,u,s){for(let n=0;n<e.length;n+=1){const{name:r,required:i,spread:D}=e[n],o=Kr(r);if(o in t)throw new Error(`Invalid parameter: ${ee(r)} is used more than once.`);const c=D?u.slice(n):u[n];if(D&&(n=e.length),i&&(!c||D&&c.length===0))return console.error(`Error: Missing required parameter ${ee(r)}
`),s(),process.exit(1);t[o]=c}}a(gt,"b");function ii(t){return t===void 0||t!==!1}a(ii,"W");function Wu(t,e,u,s){const n={...e.flags},r=e.version;r&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,D=ii(i);D&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const o=yu(n,s,{ignore:e.ignoreArgv}),c=a(()=>{console.log(e.version)},"f");if(r&&o.flags.version===!0)return c(),process.exit(0);const f=new ni,h=D&&i?.render?i.render:C=>f.render(C),l=a(C=>{const g=ui({...e,...C?{help:C}:{},flags:n});console.log(h(g,f))},"u");if(D&&o.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:C}=e,g=o._;const y=C.indexOf("--"),B=C.slice(y+1),H=Object.create(null);if(y>-1&&B.length>0){C=C.slice(0,y);const $=o._["--"];g=g.slice(0,-$.length||void 0),gt(H,Ft(C),g,l),gt(H,Ft(B),$,l)}else gt(H,Ft(C),g,l);Object.assign(o._,H)}const p={...o,showVersion:c,showHelp:l};return typeof u=="function"&&u(p),{command:t,...p}}a(Wu,"x");function Di(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: ${ee(i)}`);u.set(i,s)}}return u.get(t)}a(Di,"z");function ju(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!Ct.test(t.name)))throw new Error(`Invalid script name: ${ee(t.name)}`);const s=u[0];if(t.commands&&Ct.test(s)){const n=Di(s,t.commands);if(n)return Wu(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return Wu(void 0,t,e,u)}a(ju,"Z");function oi(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(!Ct.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}a(oi,"G");var ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function li(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}a(li,"getDefaultExportFromCjs");var fe={exports:{}},mt,Uu;function ci(){if(Uu)return mt;Uu=1,mt=s,s.sync=n;var t=De;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 c=D[o].toLowerCase();if(c&&r.substr(-c.length).toLowerCase()===c)return!0}return!1}a(e,"checkPathExt");function u(r,i,D){return!r.isSymbolicLink()&&!r.isFile()?!1:e(i,D)}a(u,"checkStat");function s(r,i,D){t.stat(r,function(o,c){D(o,o?!1:u(c,r,i))})}a(s,"isexe");function n(r,i){return u(t.statSync(r),r,i)}return a(n,"sync"),mt}a(ci,"requireWindows");var _t,Ku;function fi(){if(Ku)return _t;Ku=1,_t=e,e.sync=u;var t=De;function e(r,i,D){t.stat(r,function(o,c){D(o,o?!1:s(c,i))})}a(e,"isexe");function u(r,i){return s(t.statSync(r),i)}a(u,"sync");function s(r,i){return r.isFile()&&n(r,i)}a(s,"checkStat");function n(r,i){var D=r.mode,o=r.uid,c=r.gid,f=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),h=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),l=parseInt("100",8),p=parseInt("010",8),C=parseInt("001",8),g=l|p,y=D&C||D&p&&c===h||D&l&&o===f||D&g&&f===0;return y}return a(n,"checkMode"),_t}a(fi,"requireMode");var je;process.platform==="win32"||ai.TESTING_WINDOWS?je=ci():je=fi();var hi=At;At.sync=di;function At(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){At(t,e||{},function(r,i){r?n(r):s(i)})})}je(t,e||{},function(s,n){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,n=!1),u(s,n)})}a(At,"isexe$1");function di(t,e){try{return je.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}a(di,"sync");const he=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vu=z,Ei=he?";":":",zu=hi,Yu=a(t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),"getNotFoundError"),qu=a((t,e)=>{const u=e.colon||Ei,s=t.ma
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/var ws=a(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("/")},"normalizePath$2"),OD=jt.exports;Object.defineProperty(OD,"__esModule",{value:!0});const Rs=Cs,ND=ws,bs="!",HD={returnIndex:!1},PD=a(t=>Array.isArray(t)?t:[t],"arrify$1"),LD=a((t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=Rs(t,e);return s=>t===s||u(s)}return t instanceof RegExp?u=>t.test(u):u=>!1},"createPattern"),vs=a((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=ND(r,!1);for(let o=0;o<e.length;o++){const c=e[o];if(c(i))return s?-1:!1}const D=n&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const c=t[o];if(n?c(...D):c(i))return s?o:!0}return s?-1:!1},"matchPatterns"),Ut=a((t,e,u=HD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const s=typeof u=="boolean"?{returnIndex:u}:u,n=s.returnIndex||!1,r=PD(t),i=r.filter(o=>typeof o=="string"&&o.charAt(0)===bs).map(o=>o.slice(1)).map(o=>Rs(o,s)),D=r.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==bs).map(o=>LD(o,s));return e==null?(o,c=!1)=>vs(D,i,o,typeof c=="boolean"?c:!1):vs(D,i,e,n)},"anymatch$1");Ut.default=Ut,jt.exports=Ut;var ID=jt.exports;/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/var kD=a(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},"isExtglob");/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var MD=kD,Ss={"{":"}","(":")","[":"]"},GD=a(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 D=t[e+1];e+=2;var o=Ss[D];if(o){var c=t.indexOf(o,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},"strictCheck"),WD=a(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},"relaxedCheck"),Bs=a(function(e,u){if(typeof e!="string"||e==="")return!1;if(MD(e))return!0;var s=GD;return u&&u.strict===!1&&(s=WD),s(e)},"isGlob"),jD=Bs,UD=z.posix.dirname,KD=_u.platform()==="win32",Kt="/",VD=/\\/g,zD=/[\{\[].*[\}\]]$/,YD=/(^|[^\\])([\{\[]|\([^\)]+$)/,qD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,XD=a(function(e,u){var s=Object.assign({flipBackslashes:!0},u);s.flipBackslashes&&KD&&e.indexOf(Kt)<0&&(e=e.replace(VD,Kt)),zD.test(e)&&(e+=Kt),e+="a";do e=UD(e);while(jD(e)||YD.test(e));return e.replace(qD,"$1")},"globParent"),Ze={};(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=a(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},"flat");return s(e),u}})(Ze);const $s=Ze;var Vt=a((t,e={})=>{let u=a((s,n={})=>{let r=e.escapeInvalid&&$s.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D="";if(s.value)return(r||i)&&$s.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let o of s.nodes)D+=u(o);return D},"stringify");return u(t)},"stringify$4");/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/var QD=a(function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1},"isNumber$2");/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/const Ts=QD,ae=a((t,e,u)=>{if(Ts(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Ts(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),D=String(s.wrap),o=t+":"+e+"="+n+r+i+D;if(ae.cache.hasOwnProperty(o))return ae.cache[o].result;let c=Math.min(t,e),f=Math.max(t,e);if(Math.abs(c-f)===1){let g=t+"|"+e;return s.capture?`(${g})`:s.wrap===!1?g:`(?:${g})`}let h=Ls(t)||Ls(e),l={min:t,max:e,a:c,b:f},p=[],C=[];if(h&&(l.isPadded=h,l.maxLen=String(l.max).length),c<0){let g=f<0?Math.abs(f):1;C=xs(g,Math.abs(c),l,s),c=l.a=0}return f>=0&&(p=xs(c,f,l,s)),l.negatives=C,l.positives=p,l.result=ZD(C,p),s.capture===!0?l.result=`(${l.result})`:s.wrap!==!1&&p.length+C.length>1&&(l.result=`(?:${l.result})`),ae.cache[o]=l,l.result},"toRegexRange$1");function ZD(t,e,u){let s=zt(t,e,"-",!1)||[],n=zt(e,t,"",!1)||[],r=zt(t,e,"-?",!0)||[];return s.concat(r).concat(n).join("|")}a(ZD,"collatePatterns");function JD(t,e){let u=1,s=1,n=Ns(t,u),r=new Set([e]);for(;t<=n&&n<=e;)r.add(n),u+=1,n=Ns(t,u);for(n=Hs(e+1,s)-1;t<n&&n<=e;)r.add(n),s+=1,n=Hs(e+1,s)-1;return r=[...r],r.sort(uo),r}a(JD,"splitToRanges");function eo(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let s=to(t,e),n=s.length,r="",i=0;for(let D=0;D<n;D++){let[o,c]=s[D];o===c?r+=o:o!=="0"||c!=="9"?r+=so(o,c):i++}return i&&(r+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:r,count:[i],digits:n}}a(eo,"rangeToPattern");function xs(t,e,u,s){let n=JD(t,e),r=[],i=t,D;for(let o=0;o<n.length;o++){let c=n[o],f=eo(String(i),String(c),s),h="";if(!u.isPadded&&D&&D.pattern===f.pattern){D.count.length>1&&D.count.pop(),D.count.push(f.count[0]),D.string=D.pattern+Ps(D.count),i=c+1;continue}u.isPadded&&(h=no(c,u,s)),f.string=h+f.pattern+Ps(f.count),r.push(f),i=c+1,D=f}return r}a(xs,"splitToPatterns");function zt(t,e,u,s,n){let r=[];for(let i of t){let{string:D}=i;!s&&!Os(e,"string",D)&&r.push(u+D),s&&Os(e,"string",D)&&r.push(u+D)}return r}a(zt,"filterPatterns");function to(t,e){let u=[];for(let s=0;s<t.length;s++)u.push([t[s],e[s]]);return u}a(to,"zip");function uo(t,e){return t>e?1:e>t?-1:0}a(uo,"compare");function Os(t,e,u){return t.some(s=>s[e]===u)}a(Os,"contains");function Ns(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}a(Ns,"countNines");function Hs(t,e){return t-t%Math.pow(10,e)}a(Hs,"countZeros");function Ps(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}a(Ps,"toQuantifier");function so(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}a(so,"toCharacterClass");function Ls(t){return/^-?(0+)\d/.test(t)}a(Ls,"hasPadding");function no(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}}`}}a(no,"padZeros"),ae.cache={},ae.clearCache=()=>ae.cache={};var ro=ae;/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/const io=ge,Is=ro,ks=a(t=>t!==null&&typeof t=="object"&&!Array.isArray(t),"isObject"),Do=a(t=>e=>t===!0?Number(e):String(e),"transform"),Yt=a(t=>typeof t=="number"||typeof t=="string"&&t!=="","isValidValue"),be=a(t=>Number.isInteger(+t),"isNumber"),qt=a(t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},"zeros"),oo=a((t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,"stringify$3"),ao=a((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},"pad"),Ms=a((t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},"toMaxLen"),lo=a((t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?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},"toSequence"),Gs=a((t,e,u,s)=>{if(u)return Is(t,e,{wrap:!1,...s});let n=String.fromCharCode(t);if(t===e)return n;let r=String.fromCharCode(e);return`[${n}-${r}]`},"toRange"),Ws=a((t,e,u)=>{if(Array.isArray(t)){let s=u.wrap===!0,n=u.capture?"":"?:";return s?`(${n}${t.join("|")})`:t.join("|")}return Is(t,e,u)},"toRegex"),js=a((...t)=>new RangeError("Invalid range arguments: "+io.inspect(...t)),"rangeError"),Us=a((t,e,u)=>{if(u.strictRanges===!0)throw js([t,e]);return[]},"invalidRange"),co=a((t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},"invalidStep"),fo=a((t,e,u=1,s={})=>{let n=Number(t),r=Number(e);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===!0)throw js([t,e]);return[]}n===0&&(n=0),r===0&&(r=0);let i=n>r,D=String(t),o=String(e),c=String(u);u=Math.max(Math.abs(u),1);let f=qt(D)||qt(o)||qt(c),h=f?Math.max(D.length,o.length,c.length):0,l=f===!1&&oo(t,e,s)===!1,p=s.transform||Do(l);if(s.toRegex&&u===1)return Gs(Ms(t,h),Ms(e,h),!0,s);let C={negatives:[],positives:[]},g=a(H=>C[H<0?"negatives":"positives"].push(Math.abs(H)),"push"),y=[],B=0;for(;i?n>=r:n<=r;)s.toRegex===!0&&u>1?g(n):y.push(ao(p(n,B),h,l)),n=i?n-u:n+u,B++;return s.toRegex===!0?u>1?lo(C,s):Ws(y,null,{wrap:!1,...s}):y},"fillNumbers"),ho=a((t,e,u=1,s={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return Us(t,e,s);let n=s.transform||(l=>String.fromCharCode(l)),r=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=r>i,o=Math.min(r,i),c=Math.max(r,i);if(s.toRegex&&u===1)return Gs(o,c,!1,s);let f=[],h=0;for(;D?r>=i:r<=i;)f.push(n(r,h)),r=D?r-u:r+u,h++;return s.toRegex===!0?Ws(f,null,{wrap:!1,options:s}):f},"fillLetters"),Je=a((t,e,u,s={})=>{if(e==null&&Yt(t))return[t];if(!Yt(t)||!Yt(e))return Us(t,e,s);if(typeof u=="function")return Je(t,e,1,{transform:u});if(ks(u))return Je(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)?fo(t,e,u,n):ho(t,e,Math.max(Math.abs(u),1),n):u!=null&&!ks(u)?co(u,n):Je(t,e,1,u)},"fill$2");var Ks=Je;const Eo=Ks,Vs=Ze,po=a((t,e={})=>{let u=a((s,n={})=>{let r=Vs.isInvalidBrace(n),i=s.invalid===!0&&e.escapeInvalid===!0,D=r===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",c="";if(s.isOpen===!0||s.isClose===!0)return o+s.value;if(s.type==="open")return D?o+s.value:"(";if(s.type==="close")return D?o+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":D?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let f=Vs.reduce(s.nodes),h=Eo(...f,{...e,wrap:!1,toRegex:!0});if(h.length!==0)return f.length>1&&h.length>1?`(${h})`:h}if(s.nodes)for(let f of s.nodes)c+=u(f,s);return c},"walk");return u(t)},"compile$1");var Co=po;const Fo=Ks,zs=Vt,pe=Ze,le=a((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(le(r,e,u));else for(let r of e)u===!0&&typeof r=="string"&&(r=`{${r}}`),s.push(Array.isArray(r)?le(n,r,u):n+r);return pe.flatten(s)},"append"),go=a((t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,s=a((n,r={})=>{n.queue=[];
`,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 Ao=Vt,{MAX_LENGTH:Ys,CHAR_BACKSLASH:Xt,CHAR_BACKTICK:yo,CHAR_COMMA:wo,CHAR_DOT:Ro,CHAR_LEFT_PARENTHESES:bo,CHAR_RIGHT_PARENTHESES:vo,CHAR_LEFT_CURLY_BRACE:So,CHAR_RIGHT_CURLY_BRACE:Bo,CHAR_LEFT_SQUARE_BRACKET:qs,CHAR_RIGHT_SQUARE_BRACKET:Xs,CHAR_DOUBLE_QUOTE:$o,CHAR_SINGLE_QUOTE:To,CHAR_NO_BREAK_SPACE:xo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Oo}=_o,No=a((t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},s=typeof u.maxLength=="number"?Math.min(Ys,u.maxLength):Ys;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,D=n,o=0,c=t.length,f=0,h=0,l;const p=a(()=>t[f++],"advance"),C=a(g=>{if(g.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&g.type==="text"){D.value+=g.value;return}return i.nodes.push(g),g.parent=i,g.prev=D,D=g,g},"push");for(C({type:"bos"});f<c;)if(i=r[r.length-1],l=p(),!(l===Oo||l===xo)){if(l===Xt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===Xs){C({type:"text",value:"\\"+l});continue}if(l===qs){o++;let g;for(;f<c&&(g=p());){if(l+=g,g===qs){o++;continue}if(g===Xt){l+=p();continue}if(g===Xs&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===bo){i=C({type:"paren",nodes:[]}),r.push(i),C({type:"text",value:l});continue}if(l===vo){if(i.type!=="paren"){C({type:"text",value:l});continue}i=r.pop(),C({type:"text",value:l}),i=r[r.length-1];continue}if(l===$o||l===To||l===yo){let g=l,y;for(e.keepQuotes!==!0&&(l="");f<c&&(y=p());){if(y===Xt){l+=y+p();continue}if(y===g){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===So){h++;let y={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:h,commas:0,ranges:0,nodes:[]};i=C(y),r.push(i),C({type:"open",value:l});continue}if(l===Bo){if(i.type!=="brace"){C({type:"text",value:l});continue}let g="close";i=r.pop(),i.close=!0,C({type:g,value:l}),h--,i=r[r.length-1];continue}if(l===wo&&h>0){if(i.ranges>0){i.ranges=0;let g=i.nodes.shift();i.nodes=[g,{type:"text",value:Ao(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===Ro&&h>0&&i.commas===0){let g=i.nodes;if(h===0||g.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,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"){g.pop();let y=g[g.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({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 g=r[r.length-1],y=g.nodes.indexOf(i);g.nodes.splice(y,1,...i.nodes)}while(r.length>0);return C({type:"eos"}),n},"parse$1");var Ho=No;const Qs=Vt,Po=Co,Lo=mo,Io=Ho,q=a((t,e={})=>{let u=[];if(Array.isArray(t))for(let s of t){let n=q.create(s,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(q.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u},"braces$1");q.parse=(t,e={})=>Io(t,e),q.stringify=(t,e={})=>Qs(typeof t=="string"?q.parse(t,e):t,e),q.compile=(t,e={})=>(typeof t=="string"&&(t=q.parse(t,e)),Po(t,e)),q.expand=(t,e={})=>{typeof t=="string"&&(t=q.parse(t,e));let u=Lo(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},q.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?q.compile(t,e):q.expand(t,e);var ko=q,Mo=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","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",
node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
`));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:s}=ju({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:Dt(!1)}),n=gn({...An,...e}),i=["print","eval"].find(c=>!!s[c]);if(i){const{inputType:c}=s,f=s[i],h=vn(f,{loader:"default",sourcefile:"/eval.ts",format:c==="module"?"esm":"cjs"});n.unshift(`--${i}`,h.code)}mu(Hn)&&s.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=await mn(),o=rs(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});wl(o,D),process.send&&o.on("message",c=>{process.send(c)}),o.send&&process.on("message",c=>{o.send(c)}),o.on("close",c=>{c===null&&(c=lt.signals[o.signalCode]+128),process.exit(c)})});