@tsmodule/tsmodule 31.0.1 → 32.0.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.
Files changed (39) hide show
  1. package/dist/commands/build/index.d.ts +20 -0
  2. package/dist/commands/build/index.js +63 -5
  3. package/dist/commands/build/lib/emitTsDeclarations.d.ts +13 -0
  4. package/dist/commands/build/lib/emitTsDeclarations.js +18 -3
  5. package/dist/commands/create/index.d.ts +3 -0
  6. package/dist/commands/create/index.js +18 -1
  7. package/dist/commands/create/lib/createTemplate.d.ts +1 -0
  8. package/dist/commands/create/lib/createTemplate.js +10 -1
  9. package/dist/commands/create/lib/rewritePkgJson.d.ts +1 -0
  10. package/dist/commands/create/lib/rewritePkgJson.js +4 -1
  11. package/dist/commands/dev/index.d.ts +1 -0
  12. package/dist/commands/dev/index.js +68 -3
  13. package/dist/commands/execute/index.d.ts +1 -0
  14. package/dist/commands/execute/index.js +10 -1
  15. package/dist/commands/normalize/index.d.ts +14 -0
  16. package/dist/commands/normalize/index.js +58 -3
  17. package/dist/commands/normalize/lib/typescriptApi.d.ts +7 -0
  18. package/dist/commands/normalize/lib/typescriptApi.js +50 -1
  19. package/dist/constants.d.ts +10 -0
  20. package/dist/constants.js +4 -1
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.js +89 -5
  23. package/dist/loader/index.d.ts +11 -0
  24. package/dist/loader/index.js +12 -1
  25. package/dist/loader/types.d.ts +22 -0
  26. package/dist/loader/types.js +3 -0
  27. package/dist/types/index.d.ts +1 -0
  28. package/dist/types/index.js +3 -1
  29. package/dist/utils/cwd.d.ts +7 -0
  30. package/dist/utils/cwd.js +8 -1
  31. package/dist/utils/pkgJson.d.ts +2 -0
  32. package/dist/utils/pkgJson.js +4 -1
  33. package/dist/utils/require.d.ts +1 -0
  34. package/dist/utils/require.js +4 -1
  35. package/dist/utils/resolve.d.ts +28 -0
  36. package/dist/utils/resolve.js +4 -1
  37. package/dist/utils/stdin.d.ts +1 -0
  38. package/dist/utils/stdin.js +12 -1
  39. package/package.json +16 -15
package/dist/index.js CHANGED
@@ -1,7 +1,91 @@
1
1
  #!/usr/bin/env node
2
- var r="@tsmodule/tsmodule",s="node",a="module",d="31.0.1",l="tsmodule/tsmodule",m="TypeScript Module loader and compiler",p="MIT",c="dist/types/index.d.ts",u={tsmodule:"dist/index.js"},f={".":"./dist/loader/index.js","./*":"./dist/*/index.js","./package.json":"./package.json"},b=["dist/","templates/"],g={node:">=14"},y={prebootload:"node bootstrap.js",bootload:"node --no-warnings --loader ./dist/loader/index.js src/index.ts build -r",prebuild:"yarn bootload && yarn link -f",build:"tsmodule build",dev:"tsmodule dev",pretest:"yarn build -b",test:"ava --no-worker-threads",retest:"SKIP_TEST_SETUP=1 yarn test",lint:"eslint --fix src",prepare:"yarn build -r",prepublishOnly:"yarn test",release:"release-it -VV"},h={"@types/glob":"^7.2.0","@types/node":"^17.0.21","@typescript-eslint/eslint-plugin":"^5.14.0","@typescript-eslint/parser":"^5.14.0",ava:"^4.1.0","await-shell":"^32.0.0",chalk:"^5.0.1",commander:"^9.0.0","create-debug-logger":"^3.0.0",esbuild:"^0.14.25",eslint:"^8.11.0","fast-glob":"^3.2.10","fs-extra":"^10.0.1",glob:"^7.2.0","node-watch":"^0.7.3",ora:"^6.1.0",path:"^0.12.7",typescript:"^4.6.2"},S={"@types/fs-extra":"^9.0.13","eslint-config-next":"^12.1.0","release-it":"^14.12.5"},v={git:{commitMessage:"chore: release v${version}",tagAnnotation:"v${version}"},github:{release:!0,releaseName:"v${version}"}},w={timeout:"10 minutes",files:["test/**/*.test.ts"],extensions:{ts:"module"},nodeArguments:["--no-warnings","--loader=@tsmodule/tsmodule"]},C=["esm","es module","ts module","bundle","loader","typescript","loader hook","require hook","experimental-loader"],R=[{name:"C. Lewis",email:"ctj.lewis@icloud.com",url:"https://ctjlewis.com"}],n={name:r,platform:s,type:a,version:d,repository:l,description:m,license:p,types:c,bin:u,exports:f,files:b,engines:g,scripts:y,dependencies:h,devDependencies:S,"release-it":v,ava:w,keywords:C,contributors:R};import t from"chalk";import{Command as x}from"commander";import{build as B}from"./commands/build/index.js";import{create as E}from"./commands/create/index.js";import{dev as T}from"./commands/dev/index.js";import{execute as A}from"./commands/execute/index.js";import{normalizeImportSpecifiers as j}from"./commands/normalize/index.js";const{version:k}=n,o=new x;o.name(t.white(t.bold("tsmodule"))).usage(t.white(t.bold("<file | command> [options]"))).description(t.blueBright(`A tool for building TypeScript modules.
3
2
 
4
- Run TS directly: ${t.bold("tsmodule src/index.ts")}
5
- Use a command: ${t.bold("tsmodule build")}`)).version(String(k)),o.command("dev").description("Build and watch for changes.").action(T),o.command("build").description("Builds TS files to output in dist/.").option("-i, --input <files>","Entrypoints to compile.","src/**/*").option("--styles <styles>","Specify stylesheet entrypoint.","src/components/index.css").option("-t, --target <target>","ECMAScript featureset to target.","esnext").option("-b, --bundle","Bundle dependencies into entrypoints.",!1).option("-d, --dev","Build development runtime.",!1).option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.",!1).option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
6
- For programmatic use alongside { stdin: ... }.`,!1).option("--no-standard-styles","Do not add standard styles to bundled CSS.",!1).action(async i=>{await B(i)}),o.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(E),o.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
7
- (default: dist/**/*.js)`).action(async({files:i})=>{await j(i)}),o.command("run",{isDefault:!0}).argument("<file>","The file to run.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(A),o.parse(process.argv);
3
+ await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
4
+
5
+ var Vh=Object.create;var mo=Object.defineProperty;var Wh=Object.getOwnPropertyDescriptor;var Gh=Object.getOwnPropertyNames;var Yh=Object.getPrototypeOf,Kh=Object.prototype.hasOwnProperty;var A=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Jh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Gh(e))!Kh.call(t,i)&&i!==r&&mo(t,i,{get:()=>e[i],enumerable:!(n=Wh(e,i))||n.enumerable});return t};var Be=(t,e,r)=>(r=t!=null?Vh(Yh(t)):{},Jh(e||!t||!t.__esModule?mo(r,"default",{value:t,enumerable:!0}):r,t));var Vt=_(qn=>{var Hn=class extends Error{constructor(e,r,n){super(n);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},To=class extends Hn{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};qn.CommanderError=Hn;qn.InvalidArgumentError=To});var Sr=_(jn=>{var{InvalidArgumentError:up}=Vt(),Po=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new up(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function cp(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}jn.Argument=Po;jn.humanReadableArgName=cp});var Un=_(Lo=>{var{humanReadableArgName:fp}=Sr(),Do=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let r=e.commands.filter(n=>!n._hidden);if(e._hasImplicitHelpCommand()){let[,n,i]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),s=e.createCommand(n).helpOption(!1);s.description(e._helpCommandDescription),i&&s.arguments(i),r.push(s)}return this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}visibleOptions(e){let r=e.options.filter(s=>!s.hidden),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||i){let s;n?i?s=e.createOption(e._helpFlags,e._helpDescription):s=e.createOption(e._helpShortFlag,e._helpDescription):s=e.createOption(e._helpLongFlag,e._helpDescription),r.push(s)}if(this.sortOptions){let s=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");r.sort((o,a)=>s(o).localeCompare(s(a)))}return r}visibleArguments(e){return e._argsDescription&&e._args.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e._args.find(r=>r.description)?e._args:[]}subcommandTerm(e){let r=e._args.map(n=>fp(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,r.subcommandTerm(i).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,r.optionTerm(i).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,r.argumentTerm(i).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth||80,s=2,o=2;function a(m,y){if(y){let S=`${m.padEnd(n+o)}${y}`;return r.wrap(S,i-s,n+o)}return m}function l(m){return m.join(`
6
+ `).replace(/^/gm," ".repeat(s))}let c=[`Usage: ${r.commandUsage(e)}`,""],u=r.commandDescription(e);u.length>0&&(c=c.concat([u,""]));let f=r.visibleArguments(e).map(m=>a(r.argumentTerm(m),r.argumentDescription(m)));f.length>0&&(c=c.concat(["Arguments:",l(f),""]));let h=r.visibleOptions(e).map(m=>a(r.optionTerm(m),r.optionDescription(m)));h.length>0&&(c=c.concat(["Options:",l(h),""]));let E=r.visibleCommands(e).map(m=>a(r.subcommandTerm(m),r.subcommandDescription(m)));return E.length>0&&(c=c.concat(["Commands:",l(E),""])),c.join(`
7
+ `)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,n,i=40){if(e.match(/[\n]\s+/))return e;let s=r-n;if(s<i)return e;let o=e.substr(0,n),a=e.substr(n),l=" ".repeat(n),c=new RegExp(".{1,"+(s-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g"),u=a.match(c)||[];return o+u.map((f,h)=>(f.slice(-1)===`
8
+ `&&(f=f.slice(0,f.length-1)),(h>0?l:"")+f.trimRight())).join(`
9
+ `)}};Lo.Help=Do});var Wn=_(Vn=>{var{InvalidArgumentError:hp}=Vt(),Mo=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=ko(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[]}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new hp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return pp(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}};function pp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function ko(t){let e,r,n=t.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),r=n.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Vn.Option=Mo;Vn.splitOptionFlags=ko});var Bo=_(No=>{function dp(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let s=1;t[i-1]===e[n-1]?s=0:s=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+s),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function gp(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=dp(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),r&&(n=n.map(o=>`--${o}`)),n.length>1?`
10
+ (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
11
+ (Did you mean ${n[0]}?)`:""}No.suggestSimilar=gp});var jo=_(qo=>{var _p=A("events").EventEmitter,Gn=A("child_process"),Ie=A("path"),Yn=A("fs"),W=A("process"),{Argument:mp,humanReadableArgName:yp}=Sr(),{CommanderError:Kn}=Vt(),{Help:bp}=Un(),{Option:Io,splitOptionFlags:vp}=Wn(),{suggestSimilar:Fo}=Bo(),Ar=class extends _p{constructor(e){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:r=>W.stdout.write(r),writeErr:r=>W.stderr.write(r),getOutHelpWidth:()=>W.stdout.isTTY?W.stdout.columns:void 0,getErrHelpWidth:()=>W.stderr.isTTY?W.stderr.columns:void 0,outputError:(r,n)=>n(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,r,n){let i=r,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return i&&(l.description(i),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this.commands.push(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(e){return new Ar(e)}createHelp(){return Object.assign(new bp,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new mp(e,r)}argument(e,r,n,i){let s=this.createArgument(e,r);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this._args.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let n=["preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new Kn(e,r,n)),W.exit(e)}action(e){let r=n=>{let i=this._args.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new Io(e,r)}addOption(e){let r=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(n);if(s!==null&&e.parseArg)try{s=e.parseArg(s,l)}catch(c){if(c.code==="commander.invalidArgument"){let u=`${o} ${c.message}`;this.error(u,{exitCode:c.exitCode,code:c.code})}throw c}else s!==null&&e.variadic&&(s=e._concatValue(s,l));s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+r,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,r,n,i,s){if(typeof r=="object"&&r instanceof Io)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,!!this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this}setOptionValueWithSource(e,r,n){return this.setOptionValue(e,r),this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=W.argv,W.versions&&W.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":W.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){let n=this._prepareUserArgs(e,r);return await this._parseCommand([],n),this}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let h=Ie.resolve(u,f);if(Yn.existsSync(h))return h;if(i.includes(Ie.extname(f)))return;let E=i.find(m=>Yn.existsSync(`${h}${m}`));if(E)return`${h}${E}`}this._checkForMissingMandatoryOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Yn.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Ie.resolve(Ie.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=Ie.basename(this._scriptPath,Ie.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}n=i.includes(Ie.extname(o));let l;W.platform!=="win32"?n?(r.unshift(o),r=Ho(W.execArgv).concat(r),l=Gn.spawn(W.argv[0],r,{stdio:"inherit"})):l=Gn.spawn(o,r,{stdio:"inherit"}):(r.unshift(o),r=Ho(W.execArgv).concat(r),l=Gn.spawn(W.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{W.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;c?l.on("close",()=>{c(new Kn(W.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):l.on("close",W.exit.bind(W)),l.on("error",u=>{if(u.code==="ENOENT"){let f=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",h=`'${o}' does not exist
14
+ - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
15
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
16
+ - ${f}`;throw new Error(h)}else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)W.exit(1);else{let f=new Kn(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);if(i||this.help({error:!0}),i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}_checkNumberOfArguments(){this._args.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg)try{o=n.parseArg(i,s)}catch(a){if(a.code==="commander.invalidArgument"){let l=`error: command-argument value '${i}' is invalid for argument '${n.name()}'. ${a.message}`;this.error(l,{exitCode:a.exitCode,code:a.code})}throw a}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return wr(this).reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return $o(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),$o(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(!!e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}_checkForConflictingOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}parseOptions(e){let r=[],n=[],i=r,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){i===n&&i.push(l),i.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!o(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),u=this._findOption(l.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(c+1));continue}}if(o(l)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&n.push(...s);break}else if(l===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){n.push(l),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(l),s.length>0&&i.push(...s);break}i.push(l)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return wr(this).reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
17
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
18
+ `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
19
+ `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in W.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,W.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},i=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=Fo(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this._args.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=Fo(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this.options.push(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
20
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this._args.map(n=>yp(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Ie.basename(e,Ie.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},n;return r.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),r.write=e.write||n,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getHelpContext(e);wr(this).reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this.emit(this._helpLongFlag),this.emit("afterHelp",n),wr(this).forEach(s=>s.emit("afterAllHelp",n))}helpOption(e,r){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=r||this._helpDescription;let n=vp(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let r=W.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
21
+ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
22
+ `)}),this}};function $o(t,e){t._hasHelpOption&&e.find(n=>n===t._helpLongFlag||n===t._helpShortFlag)&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Ho(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],i=s[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function wr(t){let e=[];for(let r=t;r;r=r.parent)e.push(r);return e}qo.Command=Ar});var Go=_((ve,Wo)=>{var{Argument:Ep}=Sr(),{Command:Uo}=jo(),{CommanderError:xp,InvalidArgumentError:Vo}=Vt(),{Help:Sp}=Un(),{Option:wp}=Wn();ve=Wo.exports=new Uo;ve.program=ve;ve.Argument=Ep;ve.Command=Uo;ve.CommanderError=xp;ve.Help=Sp;ve.InvalidArgumentError=Vo;ve.InvalidOptionArgumentError=Vo;ve.Option=wp});var Jo=_(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.splitWhen=bt.flatten=void 0;function Ap(t){return t.reduce((e,r)=>[].concat(e,r),[])}bt.flatten=Ap;function Rp(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}bt.splitWhen=Rp});var Qo=_(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.isEnoentCodeError=void 0;function Cp(t){return t.code==="ENOENT"}Rr.isEnoentCodeError=Cp});var Zo=_(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.createDirentFromStats=void 0;var Xo=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Op(t,e){return new Xo(t,e)}Cr.createDirentFromStats=Op});var zo=_(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.removeLeadingDotSegment=Ce.escape=Ce.makeAbsolute=Ce.unixify=void 0;var Tp=A("path"),Pp=2,Dp=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function Lp(t){return t.replace(/\\/g,"/")}Ce.unixify=Lp;function Mp(t,e){return Tp.resolve(t,e)}Ce.makeAbsolute=Mp;function kp(t){return t.replace(Dp,"\\$2")}Ce.escape=kp;function Np(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Pp)}return t}Ce.removeLeadingDotSegment=Np});var ta=_((jv,ea)=>{ea.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var ia=_((Uv,na)=>{var Bp=ta(),ra={"{":"}","(":")","[":"]"},Ip=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var l=ra[a];if(l){var c=t.indexOf(l,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},Fp=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=ra[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};na.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Bp(e))return!0;var n=Ip;return r&&r.strict===!1&&(n=Fp),n(e)}});var oa=_((Vv,sa)=>{"use strict";var $p=ia(),Hp=A("path").posix.dirname,qp=A("os").platform()==="win32",Jn="/",jp=/\\/g,Up=/[\{\[].*[\}\]]$/,Vp=/(^|[^\\])([\{\[]|\([^\)]+$)/,Wp=/\\([\!\*\?\|\[\]\(\)\{\}])/g;sa.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&qp&&e.indexOf(Jn)<0&&(e=e.replace(jp,Jn)),Up.test(e)&&(e+=Jn),e+="a";do e=Hp(e);while($p(e)||Vp.test(e));return e.replace(Wp,"$1")}});var Or=_(pe=>{"use strict";pe.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;pe.find=(t,e)=>t.nodes.find(r=>r.type===e);pe.exceedsLimit=(t,e,r=1,n)=>n===!1||!pe.isInteger(t)||!pe.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;pe.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};pe.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;pe.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;pe.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;pe.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);pe.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var Tr=_((Gv,la)=>{"use strict";var aa=Or();la.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&aa.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&aa.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let l of n.nodes)a+=r(l);return a};return r(t)}});var ca=_((Yv,ua)=>{"use strict";ua.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var ba=_((Kv,ya)=>{"use strict";var fa=ca(),tt=(t,e,r)=>{if(fa(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(fa(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),l=t+":"+e+"="+i+s+o+a;if(tt.cache.hasOwnProperty(l))return tt.cache[l].result;let c=Math.min(t,e),u=Math.max(t,e);if(Math.abs(c-u)===1){let y=t+"|"+e;return n.capture?`(${y})`:n.wrap===!1?y:`(?:${y})`}let f=ma(t)||ma(e),h={min:t,max:e,a:c,b:u},E=[],m=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),c<0){let y=u<0?Math.abs(u):1;m=ha(y,Math.abs(c),h,n),c=h.a=0}return u>=0&&(E=ha(c,u,h,n)),h.negatives=m,h.positives=E,h.result=Gp(m,E,n),n.capture===!0?h.result=`(${h.result})`:n.wrap!==!1&&E.length+m.length>1&&(h.result=`(?:${h.result})`),tt.cache[l]=h,h.result};function Gp(t,e,r){let n=Qn(t,e,"-",!1,r)||[],i=Qn(e,t,"",!1,r)||[],s=Qn(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function Yp(t,e){let r=1,n=1,i=da(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=da(t,r);for(i=ga(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=ga(e+1,n)-1;return s=[...s],s.sort(Qp),s}function Kp(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=Jp(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[l,c]=n[a];l===c?s+=l:l!=="0"||c!=="9"?s+=Xp(l,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function ha(t,e,r,n){let i=Yp(t,e),s=[],o=t,a;for(let l=0;l<i.length;l++){let c=i[l],u=Kp(String(o),String(c),n),f="";if(!r.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+_a(a.count),o=c+1;continue}r.isPadded&&(f=Zp(c,r,n)),u.string=f+u.pattern+_a(u.count),s.push(u),o=c+1,a=u}return s}function Qn(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!pa(e,"string",a)&&s.push(r+a),n&&pa(e,"string",a)&&s.push(r+a)}return s}function Jp(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Qp(t,e){return t>e?1:e>t?-1:0}function pa(t,e,r){return t.some(n=>n[e]===r)}function da(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function ga(t,e){return t-t%Math.pow(10,e)}function _a(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Xp(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function ma(t){return/^-?(0+)\d/.test(t)}function Zp(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}tt.cache={};tt.clearCache=()=>tt.cache={};ya.exports=tt});var zn=_((Jv,Ca)=>{"use strict";var zp=A("util"),xa=ba(),va=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),ed=t=>e=>t===!0?Number(e):String(e),Xn=t=>typeof t=="number"||typeof t=="string"&&t!=="",Wt=t=>Number.isInteger(+t),Zn=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},td=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,rd=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Ea=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},nd=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",n="",i="",s;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(i=`-(${r}${t.negatives.join("|")})`),n&&i?s=`${n}|${i}`:s=n||i,e.wrap?`(${r}${s})`:s},Sa=(t,e,r,n)=>{if(r)return xa(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},wa=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return xa(t,e,r)},Aa=(...t)=>new RangeError("Invalid range arguments: "+zp.inspect(...t)),Ra=(t,e,r)=>{if(r.strictRanges===!0)throw Aa([t,e]);return[]},id=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},sd=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw Aa([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),l=String(e),c=String(r);r=Math.max(Math.abs(r),1);let u=Zn(a)||Zn(l)||Zn(c),f=u?Math.max(a.length,l.length,c.length):0,h=u===!1&&td(t,e,n)===!1,E=n.transform||ed(h);if(n.toRegex&&r===1)return Sa(Ea(t,f),Ea(e,f),!0,n);let m={negatives:[],positives:[]},y=M=>m[M<0?"negatives":"positives"].push(Math.abs(M)),S=[],x=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?y(i):S.push(rd(E(i,x),f,h)),i=o?i-r:i+r,x++;return n.toRegex===!0?r>1?nd(m,n):wa(S,null,{wrap:!1,...n}):S},od=(t,e,r=1,n={})=>{if(!Wt(t)&&t.length>1||!Wt(e)&&e.length>1)return Ra(t,e,n);let i=n.transform||(h=>String.fromCharCode(h)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),c=Math.max(s,o);if(n.toRegex&&r===1)return Sa(l,c,!1,n);let u=[],f=0;for(;a?s>=o:s<=o;)u.push(i(s,f)),s=a?s-r:s+r,f++;return n.toRegex===!0?wa(u,null,{wrap:!1,options:n}):u},Pr=(t,e,r,n={})=>{if(e==null&&Xn(t))return[t];if(!Xn(t)||!Xn(e))return Ra(t,e,n);if(typeof r=="function")return Pr(t,e,1,{transform:r});if(va(r))return Pr(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,Wt(r)?Wt(t)&&Wt(e)?sd(t,e,r,i):od(t,e,Math.max(Math.abs(r),1),i):r!=null&&!va(r)?id(r,i):Pr(t,e,1,r)};Ca.exports=Pr});var Pa=_((Qv,Ta)=>{"use strict";var ad=zn(),Oa=Or(),ld=(t,e={})=>{let r=(n,i={})=>{let s=Oa.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0||n.isClose===!0)return l+n.value;if(n.type==="open")return a?l+n.value:"(";if(n.type==="close")return a?l+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let u=Oa.reduce(n.nodes),f=ad(...u,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return u.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let u of n.nodes)c+=r(u,n);return c};return r(t)};Ta.exports=ld});var Ma=_((Xv,La)=>{"use strict";var ud=zn(),Da=Tr(),vt=Or(),rt=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?vt.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(rt(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?rt(i,s,r):i+s);return vt.flatten(n)},cd=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(rt(a.pop(),Da(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(rt(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let f=vt.reduce(i.nodes);if(vt.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let h=ud(...f,e);h.length===0&&(h=Da(i,e)),a.push(rt(a.pop(),h)),i.nodes=[];return}let l=vt.encloseBrace(i),c=i.queue,u=i;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,c=u.queue;for(let f=0;f<i.nodes.length;f++){let h=i.nodes[f];if(h.type==="comma"&&i.type==="brace"){f===1&&c.push(""),c.push("");continue}if(h.type==="close"){a.push(rt(a.pop(),c,l));continue}if(h.value&&h.type!=="open"){c.push(rt(c.pop(),h.value));continue}h.nodes&&n(h,i)}return c};return vt.flatten(n(t))};La.exports=cd});var Na=_((Zv,ka)=>{"use strict";ka.exports={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:`
23
+ `,CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Ha=_((zv,$a)=>{"use strict";var fd=Tr(),{MAX_LENGTH:Ba,CHAR_BACKSLASH:ei,CHAR_BACKTICK:hd,CHAR_COMMA:pd,CHAR_DOT:dd,CHAR_LEFT_PARENTHESES:gd,CHAR_RIGHT_PARENTHESES:_d,CHAR_LEFT_CURLY_BRACE:md,CHAR_RIGHT_CURLY_BRACE:yd,CHAR_LEFT_SQUARE_BRACKET:Ia,CHAR_RIGHT_SQUARE_BRACKET:Fa,CHAR_DOUBLE_QUOTE:bd,CHAR_SINGLE_QUOTE:vd,CHAR_NO_BREAK_SPACE:Ed,CHAR_ZERO_WIDTH_NOBREAK_SPACE:xd}=Na(),Sd=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(Ba,r.maxLength):Ba;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,l=0,c=t.length,u=0,f=0,h,E={},m=()=>t[u++],y=S=>{if(S.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&S.type==="text"){a.value+=S.value;return}return o.nodes.push(S),S.parent=o,S.prev=a,a=S,S};for(y({type:"bos"});u<c;)if(o=s[s.length-1],h=m(),!(h===xd||h===Ed)){if(h===ei){y({type:"text",value:(e.keepEscaping?h:"")+m()});continue}if(h===Fa){y({type:"text",value:"\\"+h});continue}if(h===Ia){l++;let S=!0,x;for(;u<c&&(x=m());){if(h+=x,x===Ia){l++;continue}if(x===ei){h+=m();continue}if(x===Fa&&(l--,l===0))break}y({type:"text",value:h});continue}if(h===gd){o=y({type:"paren",nodes:[]}),s.push(o),y({type:"text",value:h});continue}if(h===_d){if(o.type!=="paren"){y({type:"text",value:h});continue}o=s.pop(),y({type:"text",value:h}),o=s[s.length-1];continue}if(h===bd||h===vd||h===hd){let S=h,x;for(e.keepQuotes!==!0&&(h="");u<c&&(x=m());){if(x===ei){h+=x+m();continue}if(x===S){e.keepQuotes===!0&&(h+=x);break}h+=x}y({type:"text",value:h});continue}if(h===md){f++;let S=a.value&&a.value.slice(-1)==="$"||o.dollar===!0;o=y({type:"brace",open:!0,close:!1,dollar:S,depth:f,commas:0,ranges:0,nodes:[]}),s.push(o),y({type:"open",value:h});continue}if(h===yd){if(o.type!=="brace"){y({type:"text",value:h});continue}let S="close";o=s.pop(),o.close=!0,y({type:S,value:h}),f--,o=s[s.length-1];continue}if(h===pd&&f>0){if(o.ranges>0){o.ranges=0;let S=o.nodes.shift();o.nodes=[S,{type:"text",value:fd(o)}]}y({type:"comma",value:h}),o.commas++;continue}if(h===dd&&f>0&&o.commas===0){let S=o.nodes;if(f===0||S.length===0){y({type:"text",value:h});continue}if(a.type==="dot"){if(o.range=[],a.value+=h,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){S.pop();let x=S[S.length-1];x.value+=a.value+h,a=x,o.ranges--;continue}y({type:"dot",value:h});continue}y({type:"text",value:h})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(M=>{M.nodes||(M.type==="open"&&(M.isOpen=!0),M.type==="close"&&(M.isClose=!0),M.nodes||(M.type="text"),M.invalid=!0)});let S=s[s.length-1],x=S.nodes.indexOf(o);S.nodes.splice(x,1,...o.nodes)}while(s.length>0);return y({type:"eos"}),i};$a.exports=Sd});var Ua=_((eE,ja)=>{"use strict";var qa=Tr(),wd=Pa(),Ad=Ma(),Rd=Ha(),ue=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=ue.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(ue.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};ue.parse=(t,e={})=>Rd(t,e);ue.stringify=(t,e={})=>qa(typeof t=="string"?ue.parse(t,e):t,e);ue.compile=(t,e={})=>(typeof t=="string"&&(t=ue.parse(t,e)),wd(t,e));ue.expand=(t,e={})=>{typeof t=="string"&&(t=ue.parse(t,e));let r=Ad(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};ue.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?ue.compile(t,e):ue.expand(t,e);ja.exports=ue});var Gt=_((tE,Ka)=>{"use strict";var Cd=A("path"),Oe="\\\\/",Va=`[^${Oe}]`,Fe="\\.",Od="\\+",Td="\\?",Dr="\\/",Pd="(?=.)",Wa="[^/]",ti=`(?:${Dr}|$)`,Ga=`(?:^|${Dr})`,ri=`${Fe}{1,2}${ti}`,Dd=`(?!${Fe})`,Ld=`(?!${Ga}${ri})`,Md=`(?!${Fe}{0,1}${ti})`,kd=`(?!${ri})`,Nd=`[^.${Dr}]`,Bd=`${Wa}*?`,Ya={DOT_LITERAL:Fe,PLUS_LITERAL:Od,QMARK_LITERAL:Td,SLASH_LITERAL:Dr,ONE_CHAR:Pd,QMARK:Wa,END_ANCHOR:ti,DOTS_SLASH:ri,NO_DOT:Dd,NO_DOTS:Ld,NO_DOT_SLASH:Md,NO_DOTS_SLASH:kd,QMARK_NO_DOT:Nd,STAR:Bd,START_ANCHOR:Ga},Id={...Ya,SLASH_LITERAL:`[${Oe}]`,QMARK:Va,STAR:`${Va}*?`,DOTS_SLASH:`${Fe}{1,2}(?:[${Oe}]|$)`,NO_DOT:`(?!${Fe})`,NO_DOTS:`(?!(?:^|[${Oe}])${Fe}{1,2}(?:[${Oe}]|$))`,NO_DOT_SLASH:`(?!${Fe}{0,1}(?:[${Oe}]|$))`,NO_DOTS_SLASH:`(?!${Fe}{1,2}(?:[${Oe}]|$))`,QMARK_NO_DOT:`[^.${Oe}]`,START_ANCHOR:`(?:^|[${Oe}])`,END_ANCHOR:`(?:[${Oe}]|$)`},Fd={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"};Ka.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Fd,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:Cd.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?Id:Ya}}});var Yt=_(ae=>{"use strict";var $d=A("path"),Hd=process.platform==="win32",{REGEX_BACKSLASH:qd,REGEX_REMOVE_BACKSLASH:jd,REGEX_SPECIAL_CHARS:Ud,REGEX_SPECIAL_CHARS_GLOBAL:Vd}=Gt();ae.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ae.hasRegexChars=t=>Ud.test(t);ae.isRegexChar=t=>t.length===1&&ae.hasRegexChars(t);ae.escapeRegex=t=>t.replace(Vd,"\\$1");ae.toPosixSlashes=t=>t.replace(qd,"/");ae.removeBackslashes=t=>t.replace(jd,e=>e==="\\"?"":e);ae.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ae.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Hd===!0||$d.sep==="\\";ae.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?ae.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};ae.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ae.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var rl=_((nE,tl)=>{"use strict";var Ja=Yt(),{CHAR_ASTERISK:ni,CHAR_AT:Wd,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Gd,CHAR_DOT:ii,CHAR_EXCLAMATION_MARK:si,CHAR_FORWARD_SLASH:el,CHAR_LEFT_CURLY_BRACE:oi,CHAR_LEFT_PARENTHESES:ai,CHAR_LEFT_SQUARE_BRACKET:Yd,CHAR_PLUS:Kd,CHAR_QUESTION_MARK:Qa,CHAR_RIGHT_CURLY_BRACE:Jd,CHAR_RIGHT_PARENTHESES:Xa,CHAR_RIGHT_SQUARE_BRACKET:Qd}=Gt(),Za=t=>t===el||t===Kt,za=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Xd=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],l=t,c=-1,u=0,f=0,h=!1,E=!1,m=!1,y=!1,S=!1,x=!1,M=!1,N=!1,z=!1,T=!1,q=0,P,R,F={value:"",depth:0,isGlob:!1},w=()=>c>=n,p=()=>l.charCodeAt(c+1),H=()=>(P=R,l.charCodeAt(++c));for(;c<n;){R=H();let se;if(R===Kt){M=F.backslashes=!0,R=H(),R===oi&&(x=!0);continue}if(x===!0||R===oi){for(q++;w()!==!0&&(R=H());){if(R===Kt){M=F.backslashes=!0,H();continue}if(R===oi){q++;continue}if(x!==!0&&R===ii&&(R=H())===ii){if(h=F.isBrace=!0,m=F.isGlob=!0,T=!0,i===!0)continue;break}if(x!==!0&&R===Gd){if(h=F.isBrace=!0,m=F.isGlob=!0,T=!0,i===!0)continue;break}if(R===Jd&&(q--,q===0)){x=!1,h=F.isBrace=!0,T=!0;break}}if(i===!0)continue;break}if(R===el){if(s.push(c),o.push(F),F={value:"",depth:0,isGlob:!1},T===!0)continue;if(P===ii&&c===u+1){u+=2;continue}f=c+1;continue}if(r.noext!==!0&&(R===Kd||R===Wd||R===ni||R===Qa||R===si)===!0&&p()===ai){if(m=F.isGlob=!0,y=F.isExtglob=!0,T=!0,R===si&&c===u&&(z=!0),i===!0){for(;w()!==!0&&(R=H());){if(R===Kt){M=F.backslashes=!0,R=H();continue}if(R===Xa){m=F.isGlob=!0,T=!0;break}}continue}break}if(R===ni){if(P===ni&&(S=F.isGlobstar=!0),m=F.isGlob=!0,T=!0,i===!0)continue;break}if(R===Qa){if(m=F.isGlob=!0,T=!0,i===!0)continue;break}if(R===Yd){for(;w()!==!0&&(se=H());){if(se===Kt){M=F.backslashes=!0,H();continue}if(se===Qd){E=F.isBracket=!0,m=F.isGlob=!0,T=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&R===si&&c===u){N=F.negated=!0,u++;continue}if(r.noparen!==!0&&R===ai){if(m=F.isGlob=!0,i===!0){for(;w()!==!0&&(R=H());){if(R===ai){M=F.backslashes=!0,R=H();continue}if(R===Xa){T=!0;break}}continue}break}if(m===!0){if(T=!0,i===!0)continue;break}}r.noext===!0&&(y=!1,m=!1);let $=l,je="",d="";u>0&&(je=l.slice(0,u),l=l.slice(u),f-=u),$&&m===!0&&f>0?($=l.slice(0,f),d=l.slice(f)):m===!0?($="",d=l):$=l,$&&$!==""&&$!=="/"&&$!==l&&Za($.charCodeAt($.length-1))&&($=$.slice(0,-1)),r.unescape===!0&&(d&&(d=Ja.removeBackslashes(d)),$&&M===!0&&($=Ja.removeBackslashes($)));let g={prefix:je,input:t,start:u,base:$,glob:d,isBrace:h,isBracket:E,isGlob:m,isExtglob:y,isGlobstar:S,negated:N,negatedExtglob:z};if(r.tokens===!0&&(g.maxDepth=0,Za(R)||o.push(F),g.tokens=o),r.parts===!0||r.tokens===!0){let se;for(let I=0;I<s.length;I++){let Ae=se?se+1:u,Re=s[I],le=t.slice(Ae,Re);r.tokens&&(I===0&&u!==0?(o[I].isPrefix=!0,o[I].value=je):o[I].value=le,za(o[I]),g.maxDepth+=o[I].depth),(I!==0||le!=="")&&a.push(le),se=Re}if(se&&se+1<t.length){let I=t.slice(se+1);a.push(I),r.tokens&&(o[o.length-1].value=I,za(o[o.length-1]),g.maxDepth+=o[o.length-1].depth)}g.slashes=s,g.parts=a}return g};tl.exports=Xd});var sl=_((iE,il)=>{"use strict";var Lr=Gt(),ce=Yt(),{MAX_LENGTH:Mr,POSIX_REGEX_SOURCE:Zd,REGEX_NON_SPECIAL_CHARS:zd,REGEX_SPECIAL_CHARS_BACKREF:eg,REPLACEMENTS:nl}=Lr,tg=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>ce.escapeRegex(i)).join("..")}return r},Et=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,li=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=nl[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(Mr,r.maxLength):Mr,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",l=ce.isWindows(e),c=Lr.globChars(l),u=Lr.extglobChars(c),{DOT_LITERAL:f,PLUS_LITERAL:h,SLASH_LITERAL:E,ONE_CHAR:m,DOTS_SLASH:y,NO_DOT:S,NO_DOT_SLASH:x,NO_DOTS_SLASH:M,QMARK:N,QMARK_NO_DOT:z,STAR:T,START_ANCHOR:q}=c,P=v=>`(${a}(?:(?!${q}${v.dot?y:f}).)*?)`,R=r.dot?"":S,F=r.dot?N:z,w=r.bash===!0?P(r):T;r.capture&&(w=`(${w})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let p={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=ce.removePrefix(t,p),i=t.length;let H=[],$=[],je=[],d=s,g,se=()=>p.index===i-1,I=p.peek=(v=1)=>t[p.index+v],Ae=p.advance=()=>t[++p.index]||"",Re=()=>t.slice(p.index+1),le=(v="",V=0)=>{p.consumed+=v,p.index+=V},mr=v=>{p.output+=v.output!=null?v.output:v.value,le(v.value)},jh=()=>{let v=1;for(;I()==="!"&&(I(2)!=="("||I(3)==="?");)Ae(),p.start++,v++;return v%2===0?!1:(p.negated=!0,p.start++,!0)},yr=v=>{p[v]++,je.push(v)},et=v=>{p[v]--,je.pop()},k=v=>{if(d.type==="globstar"){let V=p.braces>0&&(v.type==="comma"||v.type==="brace"),b=v.extglob===!0||H.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!V&&!b&&(p.output=p.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=w,p.output+=d.output)}if(H.length&&v.type!=="paren"&&(H[H.length-1].inner+=v.value),(v.value||v.output)&&mr(v),d&&d.type==="text"&&v.type==="text"){d.value+=v.value,d.output=(d.output||"")+v.value;return}v.prev=d,o.push(v),d=v},br=(v,V)=>{let b={...u[V],conditions:1,inner:""};b.prev=d,b.parens=p.parens,b.output=p.output;let D=(r.capture?"(":"")+b.open;yr("parens"),k({type:v,value:V,output:p.output?"":m}),k({type:"paren",extglob:!0,value:Ae(),output:D}),H.push(b)},Uh=v=>{let V=v.close+(r.capture?")":""),b;if(v.type==="negate"){let D=w;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(D=P(r)),(D!==w||se()||/^\)+$/.test(Re()))&&(V=v.close=`)$))${D}`),v.inner.includes("*")&&(b=Re())&&/^\.[^\\/.]+$/.test(b)){let K=li(b,{...e,fastpaths:!1}).output;V=v.close=`)${K})${D})`}v.prev.type==="bos"&&(p.negatedExtglob=!0)}k({type:"paren",extglob:!0,value:g,output:V}),et("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let v=!1,V=t.replace(eg,(b,D,K,oe,ee,Nn)=>oe==="\\"?(v=!0,b):oe==="?"?D?D+oe+(ee?N.repeat(ee.length):""):Nn===0?F+(ee?N.repeat(ee.length):""):N.repeat(K.length):oe==="."?f.repeat(K.length):oe==="*"?D?D+oe+(ee?w:""):w:D?b:`\\${b}`);return v===!0&&(r.unescape===!0?V=V.replace(/\\/g,""):V=V.replace(/\\+/g,b=>b.length%2===0?"\\\\":b?"\\":"")),V===t&&r.contains===!0?(p.output=t,p):(p.output=ce.wrapOutput(V,p,e),p)}for(;!se();){if(g=Ae(),g==="\0")continue;if(g==="\\"){let b=I();if(b==="/"&&r.bash!==!0||b==="."||b===";")continue;if(!b){g+="\\",k({type:"text",value:g});continue}let D=/^\\+/.exec(Re()),K=0;if(D&&D[0].length>2&&(K=D[0].length,p.index+=K,K%2!==0&&(g+="\\")),r.unescape===!0?g=Ae():g+=Ae(),p.brackets===0){k({type:"text",value:g});continue}}if(p.brackets>0&&(g!=="]"||d.value==="["||d.value==="[^")){if(r.posix!==!1&&g===":"){let b=d.value.slice(1);if(b.includes("[")&&(d.posix=!0,b.includes(":"))){let D=d.value.lastIndexOf("["),K=d.value.slice(0,D),oe=d.value.slice(D+2),ee=Zd[oe];if(ee){d.value=K+ee,p.backtrack=!0,Ae(),!s.output&&o.indexOf(d)===1&&(s.output=m);continue}}}(g==="["&&I()!==":"||g==="-"&&I()==="]")&&(g=`\\${g}`),g==="]"&&(d.value==="["||d.value==="[^")&&(g=`\\${g}`),r.posix===!0&&g==="!"&&d.value==="["&&(g="^"),d.value+=g,mr({value:g});continue}if(p.quotes===1&&g!=='"'){g=ce.escapeRegex(g),d.value+=g,mr({value:g});continue}if(g==='"'){p.quotes=p.quotes===1?0:1,r.keepQuotes===!0&&k({type:"text",value:g});continue}if(g==="("){yr("parens"),k({type:"paren",value:g});continue}if(g===")"){if(p.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Et("opening","("));let b=H[H.length-1];if(b&&p.parens===b.parens+1){Uh(H.pop());continue}k({type:"paren",value:g,output:p.parens?")":"\\)"}),et("parens");continue}if(g==="["){if(r.nobracket===!0||!Re().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Et("closing","]"));g=`\\${g}`}else yr("brackets");k({type:"bracket",value:g});continue}if(g==="]"){if(r.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){k({type:"text",value:g,output:`\\${g}`});continue}if(p.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Et("opening","["));k({type:"text",value:g,output:`\\${g}`});continue}et("brackets");let b=d.value.slice(1);if(d.posix!==!0&&b[0]==="^"&&!b.includes("/")&&(g=`/${g}`),d.value+=g,mr({value:g}),r.literalBrackets===!1||ce.hasRegexChars(b))continue;let D=ce.escapeRegex(d.value);if(p.output=p.output.slice(0,-d.value.length),r.literalBrackets===!0){p.output+=D,d.value=D;continue}d.value=`(${a}${D}|${d.value})`,p.output+=d.value;continue}if(g==="{"&&r.nobrace!==!0){yr("braces");let b={type:"brace",value:g,output:"(",outputIndex:p.output.length,tokensIndex:p.tokens.length};$.push(b),k(b);continue}if(g==="}"){let b=$[$.length-1];if(r.nobrace===!0||!b){k({type:"text",value:g,output:g});continue}let D=")";if(b.dots===!0){let K=o.slice(),oe=[];for(let ee=K.length-1;ee>=0&&(o.pop(),K[ee].type!=="brace");ee--)K[ee].type!=="dots"&&oe.unshift(K[ee].value);D=tg(oe,r),p.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let K=p.output.slice(0,b.outputIndex),oe=p.tokens.slice(b.tokensIndex);b.value=b.output="\\{",g=D="\\}",p.output=K;for(let ee of oe)p.output+=ee.output||ee.value}k({type:"brace",value:g,output:D}),et("braces"),$.pop();continue}if(g==="|"){H.length>0&&H[H.length-1].conditions++,k({type:"text",value:g});continue}if(g===","){let b=g,D=$[$.length-1];D&&je[je.length-1]==="braces"&&(D.comma=!0,b="|"),k({type:"comma",value:g,output:b});continue}if(g==="/"){if(d.type==="dot"&&p.index===p.start+1){p.start=p.index+1,p.consumed="",p.output="",o.pop(),d=s;continue}k({type:"slash",value:g,output:E});continue}if(g==="."){if(p.braces>0&&d.type==="dot"){d.value==="."&&(d.output=f);let b=$[$.length-1];d.type="dots",d.output+=g,d.value+=g,b.dots=!0;continue}if(p.braces+p.parens===0&&d.type!=="bos"&&d.type!=="slash"){k({type:"text",value:g,output:f});continue}k({type:"dot",value:g,output:f});continue}if(g==="?"){if(!(d&&d.value==="(")&&r.noextglob!==!0&&I()==="("&&I(2)!=="?"){br("qmark",g);continue}if(d&&d.type==="paren"){let D=I(),K=g;if(D==="<"&&!ce.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(d.value==="("&&!/[!=<:]/.test(D)||D==="<"&&!/<([!=]|\w+>)/.test(Re()))&&(K=`\\${g}`),k({type:"text",value:g,output:K});continue}if(r.dot!==!0&&(d.type==="slash"||d.type==="bos")){k({type:"qmark",value:g,output:z});continue}k({type:"qmark",value:g,output:N});continue}if(g==="!"){if(r.noextglob!==!0&&I()==="("&&(I(2)!=="?"||!/[!=<:]/.test(I(3)))){br("negate",g);continue}if(r.nonegate!==!0&&p.index===0){jh();continue}}if(g==="+"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){br("plus",g);continue}if(d&&d.value==="("||r.regex===!1){k({type:"plus",value:g,output:h});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||p.parens>0){k({type:"plus",value:g});continue}k({type:"plus",value:h});continue}if(g==="@"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){k({type:"at",extglob:!0,value:g,output:""});continue}k({type:"text",value:g});continue}if(g!=="*"){(g==="$"||g==="^")&&(g=`\\${g}`);let b=zd.exec(Re());b&&(g+=b[0],p.index+=b[0].length),k({type:"text",value:g});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=g,d.output=w,p.backtrack=!0,p.globstar=!0,le(g);continue}let v=Re();if(r.noextglob!==!0&&/^\([^?]/.test(v)){br("star",g);continue}if(d.type==="star"){if(r.noglobstar===!0){le(g);continue}let b=d.prev,D=b.prev,K=b.type==="slash"||b.type==="bos",oe=D&&(D.type==="star"||D.type==="globstar");if(r.bash===!0&&(!K||v[0]&&v[0]!=="/")){k({type:"star",value:g,output:""});continue}let ee=p.braces>0&&(b.type==="comma"||b.type==="brace"),Nn=H.length&&(b.type==="pipe"||b.type==="paren");if(!K&&b.type!=="paren"&&!ee&&!Nn){k({type:"star",value:g,output:""});continue}for(;v.slice(0,3)==="/**";){let vr=t[p.index+4];if(vr&&vr!=="/")break;v=v.slice(3),le("/**",3)}if(b.type==="bos"&&se()){d.type="globstar",d.value+=g,d.output=P(r),p.output=d.output,p.globstar=!0,le(g);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&!oe&&se()){p.output=p.output.slice(0,-(b.output+d.output).length),b.output=`(?:${b.output}`,d.type="globstar",d.output=P(r)+(r.strictSlashes?")":"|$)"),d.value+=g,p.globstar=!0,p.output+=b.output+d.output,le(g);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&v[0]==="/"){let vr=v[1]!==void 0?"|$":"";p.output=p.output.slice(0,-(b.output+d.output).length),b.output=`(?:${b.output}`,d.type="globstar",d.output=`${P(r)}${E}|${E}${vr})`,d.value+=g,p.output+=b.output+d.output,p.globstar=!0,le(g+Ae()),k({type:"slash",value:"/",output:""});continue}if(b.type==="bos"&&v[0]==="/"){d.type="globstar",d.value+=g,d.output=`(?:^|${E}|${P(r)}${E})`,p.output=d.output,p.globstar=!0,le(g+Ae()),k({type:"slash",value:"/",output:""});continue}p.output=p.output.slice(0,-d.output.length),d.type="globstar",d.output=P(r),d.value+=g,p.output+=d.output,p.globstar=!0,le(g);continue}let V={type:"star",value:g,output:w};if(r.bash===!0){V.output=".*?",(d.type==="bos"||d.type==="slash")&&(V.output=R+V.output),k(V);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&r.regex===!0){V.output=g,k(V);continue}(p.index===p.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(p.output+=x,d.output+=x):r.dot===!0?(p.output+=M,d.output+=M):(p.output+=R,d.output+=R),I()!=="*"&&(p.output+=m,d.output+=m)),k(V)}for(;p.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Et("closing","]"));p.output=ce.escapeLast(p.output,"["),et("brackets")}for(;p.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Et("closing",")"));p.output=ce.escapeLast(p.output,"("),et("parens")}for(;p.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Et("closing","}"));p.output=ce.escapeLast(p.output,"{"),et("braces")}if(r.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&k({type:"maybe_slash",value:"",output:`${E}?`}),p.backtrack===!0){p.output="";for(let v of p.tokens)p.output+=v.output!=null?v.output:v.value,v.suffix&&(p.output+=v.suffix)}return p};li.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(Mr,r.maxLength):Mr,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=nl[t]||t;let s=ce.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:f,NO_DOTS_SLASH:h,STAR:E,START_ANCHOR:m}=Lr.globChars(s),y=r.dot?f:u,S=r.dot?h:u,x=r.capture?"":"?:",M={negated:!1,prefix:""},N=r.bash===!0?".*?":E;r.capture&&(N=`(${N})`);let z=R=>R.noglobstar===!0?N:`(${x}(?:(?!${m}${R.dot?c:o}).)*?)`,T=R=>{switch(R){case"*":return`${y}${l}${N}`;case".*":return`${o}${l}${N}`;case"*.*":return`${y}${N}${o}${l}${N}`;case"*/*":return`${y}${N}${a}${l}${S}${N}`;case"**":return y+z(r);case"**/*":return`(?:${y}${z(r)}${a})?${S}${l}${N}`;case"**/*.*":return`(?:${y}${z(r)}${a})?${S}${N}${o}${l}${N}`;case"**/.*":return`(?:${y}${z(r)}${a})?${o}${l}${N}`;default:{let F=/^(.*?)\.(\w+)$/.exec(R);if(!F)return;let w=T(F[1]);return w?w+o+F[2]:void 0}}},q=ce.removePrefix(t,M),P=T(q);return P&&r.strictSlashes!==!0&&(P+=`${a}?`),P};il.exports=li});var al=_((sE,ol)=>{"use strict";var rg=A("path"),ng=rl(),ui=sl(),ci=Yt(),ig=Gt(),sg=t=>t&&typeof t=="object"&&!Array.isArray(t),Q=(t,e,r=!1)=>{if(Array.isArray(t)){let u=t.map(h=>Q(h,e,r));return h=>{for(let E of u){let m=E(h);if(m)return m}return!1}}let n=sg(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=ci.isWindows(e),o=n?Q.compileRe(t,e):Q.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let u={...e,ignore:null,onMatch:null,onResult:null};l=Q(i.ignore,u,r)}let c=(u,f=!1)=>{let{isMatch:h,match:E,output:m}=Q.test(u,o,e,{glob:t,posix:s}),y={glob:t,state:a,regex:o,posix:s,input:u,output:m,match:E,isMatch:h};return typeof i.onResult=="function"&&i.onResult(y),h===!1?(y.isMatch=!1,f?y:!1):l(u)?(typeof i.onIgnore=="function"&&i.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof i.onMatch=="function"&&i.onMatch(y),f?y:!0)};return r&&(c.state=a),c};Q.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?ci.toPosixSlashes:null),a=t===n,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Q.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:Boolean(a),match:a,output:l}};Q.matchBase=(t,e,r,n=ci.isWindows(r))=>(e instanceof RegExp?e:Q.makeRe(e,r)).test(rg.basename(t));Q.isMatch=(t,e,r)=>Q(e,r)(t);Q.parse=(t,e)=>Array.isArray(t)?t.map(r=>Q.parse(r,e)):ui(t,{...e,fastpaths:!1});Q.scan=(t,e)=>ng(t,e);Q.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Q.toRegex(a,e);return n===!0&&(l.state=t),l};Q.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=ui.fastpaths(t,e)),i.output||(i=ui(t,e)),Q.compileRe(i,e,r,n)};Q.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Q.constants=ig;ol.exports=Q});var ul=_((oE,ll)=>{"use strict";ll.exports=al()});var dl=_((aE,pl)=>{"use strict";var fl=A("util"),hl=Ua(),Te=ul(),fi=Yt(),cl=t=>t===""||t==="./",G=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=u=>{s.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<e.length;u++){let f=Te(String(e[u]),{...r,onResult:a},!0),h=f.state.negated||f.state.negatedExtglob;h&&o++;for(let E of t){let m=f(E,!0);!(h?!m.isMatch:m.isMatch)||(h?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let c=(o===e.length?[...s]:[...i]).filter(u=>!n.has(u));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(u=>u.replace(/\\/g,"")):e}return c};G.match=G;G.matcher=(t,e)=>Te(t,e);G.isMatch=(t,e,r)=>Te(e,r)(t);G.any=G.isMatch;G.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],o=G(t,e,{...r,onResult:a=>{r.onResult&&r.onResult(a),i.push(a.output)}});for(let a of i)o.includes(a)||n.add(a);return[...n]};G.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${fl.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>G.contains(t,n,r));if(typeof e=="string"){if(cl(t)||cl(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return G.isMatch(t,e,{...r,contains:!0})};G.matchKeys=(t,e,r)=>{if(!fi.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=G(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};G.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Te(String(i),r);if(n.some(o=>s(o)))return!0}return!1};G.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Te(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};G.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${fl.inspect(t)}"`);return[].concat(e).every(n=>Te(n,r)(t))};G.capture=(t,e,r)=>{let n=fi.isWindows(r),s=Te.makeRe(String(t),{...r,capture:!0}).exec(n?fi.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};G.makeRe=(...t)=>Te.makeRe(...t);G.scan=(...t)=>Te.scan(...t);G.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of hl(String(n),e))r.push(Te.parse(i,e));return r};G.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:hl(t,e)};G.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return G.braces(t,{...e,expand:!0})};pl.exports=G});var xl=_(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.matchAny=O.convertPatternsToRe=O.makeRe=O.getPatternParts=O.expandBraceExpansion=O.expandPatternsWithBraceExpansion=O.isAffectDepthOfReadingPattern=O.endsWithSlashGlobStar=O.hasGlobStar=O.getBaseDirectory=O.isPatternRelatedToParentDirectory=O.getPatternsOutsideCurrentDirectory=O.getPatternsInsideCurrentDirectory=O.getPositivePatterns=O.getNegativePatterns=O.isPositivePattern=O.isNegativePattern=O.convertToNegativePattern=O.convertToPositivePattern=O.isDynamicPattern=O.isStaticPattern=void 0;var og=A("path"),ag=oa(),hi=dl(),gl="**",lg="\\",ug=/[*?]|^!/,cg=/\[[^[]*]/,fg=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,hg=/[!*+?@]\([^(]*\)/,pg=/,|\.\./;function _l(t,e={}){return!ml(t,e)}O.isStaticPattern=_l;function ml(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(lg)||ug.test(t)||cg.test(t)||fg.test(t)||e.extglob!==!1&&hg.test(t)||e.braceExpansion!==!1&&dg(t))}O.isDynamicPattern=ml;function dg(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return pg.test(n)}function gg(t){return kr(t)?t.slice(1):t}O.convertToPositivePattern=gg;function _g(t){return"!"+t}O.convertToNegativePattern=_g;function kr(t){return t.startsWith("!")&&t[1]!=="("}O.isNegativePattern=kr;function yl(t){return!kr(t)}O.isPositivePattern=yl;function mg(t){return t.filter(kr)}O.getNegativePatterns=mg;function yg(t){return t.filter(yl)}O.getPositivePatterns=yg;function bg(t){return t.filter(e=>!pi(e))}O.getPatternsInsideCurrentDirectory=bg;function vg(t){return t.filter(pi)}O.getPatternsOutsideCurrentDirectory=vg;function pi(t){return t.startsWith("..")||t.startsWith("./..")}O.isPatternRelatedToParentDirectory=pi;function Eg(t){return ag(t,{flipBackslashes:!1})}O.getBaseDirectory=Eg;function xg(t){return t.includes(gl)}O.hasGlobStar=xg;function bl(t){return t.endsWith("/"+gl)}O.endsWithSlashGlobStar=bl;function Sg(t){let e=og.basename(t);return bl(t)||_l(e)}O.isAffectDepthOfReadingPattern=Sg;function wg(t){return t.reduce((e,r)=>e.concat(vl(r)),[])}O.expandPatternsWithBraceExpansion=wg;function vl(t){return hi.braces(t,{expand:!0,nodupes:!0})}O.expandBraceExpansion=vl;function Ag(t,e){let{parts:r}=hi.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}O.getPatternParts=Ag;function El(t,e){return hi.makeRe(t,e)}O.makeRe=El;function Rg(t,e){return t.map(r=>El(r,e))}O.convertPatternsToRe=Rg;function Cg(t,e){return e.some(r=>r.test(t))}O.matchAny=Cg});var Rl=_((uE,Al)=>{"use strict";var Og=A("stream"),Sl=Og.PassThrough,Tg=Array.prototype.slice;Al.exports=Pg;function Pg(){let t=[],e=Tg.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=Sl(n);function a(){for(let u=0,f=arguments.length;u<f;u++)t.push(wl(arguments[u],n));return l(),this}function l(){if(r)return;r=!0;let u=t.shift();if(!u){process.nextTick(c);return}Array.isArray(u)||(u=[u]);let f=u.length+1;function h(){--f>0||(r=!1,l())}function E(m){function y(){m.removeListener("merge2UnpipeEnd",y),m.removeListener("end",y),s&&m.removeListener("error",S),h()}function S(x){o.emit("error",x)}if(m._readableState.endEmitted)return h();m.on("merge2UnpipeEnd",y),m.on("end",y),s&&m.on("error",S),m.pipe(o,{end:!1}),m.resume()}for(let m=0;m<u.length;m++)E(u[m]);h()}function c(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function wl(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=wl(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Sl(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var Ol=_(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.merge=void 0;var Dg=Rl();function Lg(t){let e=Dg(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>Cl(t)),e.once("end",()=>Cl(t)),e}Nr.merge=Lg;function Cl(t){t.forEach(e=>e.emit("close"))}});var Tl=_(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.isEmpty=xt.isString=void 0;function Mg(t){return typeof t=="string"}xt.isString=Mg;function kg(t){return t===""}xt.isEmpty=kg});var $e=_(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.string=re.stream=re.pattern=re.path=re.fs=re.errno=re.array=void 0;var Ng=Jo();re.array=Ng;var Bg=Qo();re.errno=Bg;var Ig=Zo();re.fs=Ig;var Fg=zo();re.path=Fg;var $g=xl();re.pattern=$g;var Hg=Ol();re.stream=Hg;var qg=Tl();re.string=qg});var Ll=_(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.convertPatternGroupToTask=ne.convertPatternGroupsToTasks=ne.groupPatternsByBaseDirectory=ne.getNegativePatternsAsPositive=ne.getPositivePatterns=ne.convertPatternsToTasks=ne.generate=void 0;var He=$e();function jg(t,e){let r=Pl(t),n=Dl(t,e.ignore),i=r.filter(l=>He.pattern.isStaticPattern(l,e)),s=r.filter(l=>He.pattern.isDynamicPattern(l,e)),o=di(i,n,!1),a=di(s,n,!0);return o.concat(a)}ne.generate=jg;function di(t,e,r){let n=[],i=He.pattern.getPatternsOutsideCurrentDirectory(t),s=He.pattern.getPatternsInsideCurrentDirectory(t),o=gi(i),a=gi(s);return n.push(..._i(o,e,r)),"."in a?n.push(mi(".",s,e,r)):n.push(..._i(a,e,r)),n}ne.convertPatternsToTasks=di;function Pl(t){return He.pattern.getPositivePatterns(t)}ne.getPositivePatterns=Pl;function Dl(t,e){return He.pattern.getNegativePatterns(t).concat(e).map(He.pattern.convertToPositivePattern)}ne.getNegativePatternsAsPositive=Dl;function gi(t){let e={};return t.reduce((r,n)=>{let i=He.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}ne.groupPatternsByBaseDirectory=gi;function _i(t,e,r){return Object.keys(t).map(n=>mi(n,t[n],e,r))}ne.convertPatternGroupsToTasks=_i;function mi(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(He.pattern.convertToNegativePattern))}}ne.convertPatternGroupToTask=mi});var kl=_(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.removeDuplicateSlashes=St.transform=void 0;var Ug=/(?!^)\/{2,}/g;function Vg(t){return t.map(e=>Ml(e))}St.transform=Vg;function Ml(t){return t.replace(Ug,"/")}St.removeDuplicateSlashes=Ml});var Bl=_(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.read=void 0;function Wg(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){Nl(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){yi(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Nl(r,s);return}yi(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),yi(r,o)})})}Br.read=Wg;function Nl(t,e){t(e)}function yi(t,e){t(null,e)}});var Il=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.read=void 0;function Gg(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}Ir.read=Gg});var Fl=_(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.createFileSystemAdapter=Ue.FILE_SYSTEM_ADAPTER=void 0;var Fr=A("fs");Ue.FILE_SYSTEM_ADAPTER={lstat:Fr.lstat,stat:Fr.stat,lstatSync:Fr.lstatSync,statSync:Fr.statSync};function Yg(t){return t===void 0?Ue.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ue.FILE_SYSTEM_ADAPTER),t)}Ue.createFileSystemAdapter=Yg});var Hl=_(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});var Kg=Fl(),$l=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Kg.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};bi.default=$l});var nt=_(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.statSync=Ve.stat=Ve.Settings=void 0;var ql=Bl(),Jg=Il(),vi=Hl();Ve.Settings=vi.default;function Qg(t,e,r){if(typeof e=="function"){ql.read(t,Ei(),e);return}ql.read(t,Ei(e),r)}Ve.stat=Qg;function Xg(t,e){let r=Ei(e);return Jg.read(t,r)}Ve.statSync=Xg;function Ei(t={}){return t instanceof vi.default?t:new vi.default(t)}});var Vl=_((vE,Ul)=>{var jl;Ul.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(jl||(jl=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var Gl=_((EE,Wl)=>{Wl.exports=zg;var Zg=Vl();function zg(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(l){function c(){e&&e(l,r),e=null}s?Zg(c):c()}function a(l,c,u){r[l]=u,(--n===0||c)&&o(c)}n?i?i.forEach(function(l){t[l](function(c,u){a(l,c,u)})}):t.forEach(function(l,c){l(function(u,f){a(c,u,f)})}):o(null),s=!1}});var xi=_(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var $r=process.versions.node.split(".");if($r[0]===void 0||$r[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Yl=Number.parseInt($r[0],10),e_=Number.parseInt($r[1],10),Kl=10,t_=10,r_=Yl>Kl,n_=Yl===Kl&&e_>=t_;Hr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r_||n_});var Ql=_(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.createDirentFromStats=void 0;var Jl=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function i_(t,e){return new Jl(t,e)}qr.createDirentFromStats=i_});var Si=_(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.fs=void 0;var s_=Ql();jr.fs=s_});var wi=_(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.joinPathSegments=void 0;function o_(t,e,r){return t.endsWith(r)?t+e:t+r+e}Ur.joinPathSegments=o_});var ru=_(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.readdir=We.readdirWithFileTypes=We.read=void 0;var a_=nt(),Xl=Gl(),l_=xi(),Zl=Si(),zl=wi();function u_(t,e,r){if(!e.stats&&l_.IS_SUPPORT_READDIR_WITH_FILE_TYPES){eu(t,e,r);return}tu(t,e,r)}We.read=u_;function eu(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Vr(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:zl.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Ai(r,s);return}let o=s.map(a=>c_(a,e));Xl(o,(a,l)=>{if(a!==null){Vr(r,a);return}Ai(r,l)})})}We.readdirWithFileTypes=eu;function c_(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=Zl.fs.createDirentFromStats(t.name,i),r(null,t)})}}function tu(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Vr(r,n);return}let s=i.map(o=>{let a=zl.joinPathSegments(t,o,e.pathSegmentSeparator);return l=>{a_.stat(a,e.fsStatSettings,(c,u)=>{if(c!==null){l(c);return}let f={name:o,path:a,dirent:Zl.fs.createDirentFromStats(o,u)};e.stats&&(f.stats=u),l(null,f)})}});Xl(s,(o,a)=>{if(o!==null){Vr(r,o);return}Ai(r,a)})})}We.readdir=tu;function Vr(t,e){t(e)}function Ai(t,e){t(null,e)}});var au=_(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.readdir=Ge.readdirWithFileTypes=Ge.read=void 0;var f_=nt(),h_=xi(),nu=Si(),iu=wi();function p_(t,e){return!e.stats&&h_.IS_SUPPORT_READDIR_WITH_FILE_TYPES?su(t,e):ou(t,e)}Ge.read=p_;function su(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:iu.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=nu.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ge.readdirWithFileTypes=su;function ou(t,e){return e.fs.readdirSync(t).map(n=>{let i=iu.joinPathSegments(t,n,e.pathSegmentSeparator),s=f_.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:nu.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Ge.readdir=ou});var lu=_(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createFileSystemAdapter=Ye.FILE_SYSTEM_ADAPTER=void 0;var wt=A("fs");Ye.FILE_SYSTEM_ADAPTER={lstat:wt.lstat,stat:wt.stat,lstatSync:wt.lstatSync,statSync:wt.statSync,readdir:wt.readdir,readdirSync:wt.readdirSync};function d_(t){return t===void 0?Ye.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ye.FILE_SYSTEM_ADAPTER),t)}Ye.createFileSystemAdapter=d_});var cu=_(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var g_=A("path"),__=nt(),m_=lu(),uu=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=m_.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,g_.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new __.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Ri.default=uu});var Wr=_(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Settings=Ke.scandirSync=Ke.scandir=void 0;var fu=ru(),y_=au(),Ci=cu();Ke.Settings=Ci.default;function b_(t,e,r){if(typeof e=="function"){fu.read(t,Oi(),e);return}fu.read(t,Oi(e),r)}Ke.scandir=b_;function v_(t,e){let r=Oi(e);return y_.read(t,r)}Ke.scandirSync=v_;function Oi(t={}){return t instanceof Ci.default?t:new Ci.default(t)}});var pu=_((DE,hu)=>{"use strict";function E_(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}hu.exports=E_});var gu=_((LE,Ti)=>{"use strict";var x_=pu();function du(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=x_(S_),i=null,s=null,o=0,a=null,l={push:y,drain:de,saturated:de,pause:u,paused:!1,concurrency:r,running:c,resume:E,idle:m,length:f,getQueue:h,unshift:S,empty:de,kill:M,killAndDrain:N,error:z};return l;function c(){return o}function u(){l.paused=!0}function f(){for(var T=i,q=0;T;)T=T.next,q++;return q}function h(){for(var T=i,q=[];T;)q.push(T.value),T=T.next;return q}function E(){if(!!l.paused){l.paused=!1;for(var T=0;T<l.concurrency;T++)o++,x()}}function m(){return o===0&&l.length()===0}function y(T,q){var P=n.get();P.context=t,P.release=x,P.value=T,P.callback=q||de,P.errorHandler=a,o===l.concurrency||l.paused?s?(s.next=P,s=P):(i=P,s=P,l.saturated()):(o++,e.call(t,P.value,P.worked))}function S(T,q){var P=n.get();P.context=t,P.release=x,P.value=T,P.callback=q||de,o===l.concurrency||l.paused?i?(P.next=i,i=P):(i=P,s=P,l.saturated()):(o++,e.call(t,P.value,P.worked))}function x(T){T&&n.release(T);var q=i;q?l.paused?o--:(s===i&&(s=null),i=q.next,q.next=null,e.call(t,q.value,q.worked),s===null&&l.empty()):--o===0&&l.drain()}function M(){i=null,s=null,l.drain=de}function N(){i=null,s=null,l.drain(),l.drain=de}function z(T){a=T}}function de(){}function S_(){this.value=null,this.callback=de,this.next=null,this.release=de,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=de,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function w_(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(u,f){e.call(this,u).then(function(h){f(null,h)},f)}var i=du(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=l,i.drained=c,i;function a(u){var f=new Promise(function(h,E){s(u,function(m,y){if(m){E(m);return}h(y)})});return f.catch(de),f}function l(u){var f=new Promise(function(h,E){o(u,function(m,y){if(m){E(m);return}h(y)})});return f.catch(de),f}function c(){var u=i.drain,f=new Promise(function(h){i.drain=function(){u(),h()}});return f}}Ti.exports=du;Ti.exports.promise=w_});var Gr=_(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.joinPathSegments=Pe.replacePathSegmentSeparator=Pe.isAppliedFilter=Pe.isFatalError=void 0;function A_(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Pe.isFatalError=A_;function R_(t,e){return t===null||t(e)}Pe.isAppliedFilter=R_;function C_(t,e){return t.split(/[/\\]/).join(e)}Pe.replacePathSegmentSeparator=C_;function O_(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Pe.joinPathSegments=O_});var Di=_(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var T_=Gr(),_u=class{constructor(e,r){this._root=e,this._settings=r,this._root=T_.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Pi.default=_u});var Mi=_(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});var P_=A("events"),D_=Wr(),L_=gu(),Yr=Gr(),M_=Di(),mu=class extends M_.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=D_.scandir,this._emitter=new P_.EventEmitter,this._queue=L_(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Yr.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=Yr.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Yr.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Yr.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Li.default=mu});var bu=_(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});var k_=Mi(),yu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new k_.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{N_(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{B_(e,this._storage)}),this._reader.read()}};ki.default=yu;function N_(t,e){t(e)}function B_(t,e){t(null,e)}});var Eu=_(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});var I_=A("stream"),F_=Mi(),vu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new F_.default(this._root,this._settings),this._stream=new I_.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Ni.default=vu});var Su=_(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});var $_=Wr(),Kr=Gr(),H_=Di(),xu=class extends H_.default{constructor(){super(...arguments);this._scandir=$_.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(!!Kr.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=Kr.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Kr.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Kr.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};Bi.default=xu});var Au=_(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var q_=Su(),wu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new q_.default(this._root,this._settings)}read(){return this._reader.read()}};Ii.default=wu});var Cu=_(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var j_=A("path"),U_=Wr(),Ru=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,j_.sep),this.fsScandirSettings=new U_.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Fi.default=Ru});var Hi=_(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.Settings=De.walkStream=De.walkSync=De.walk=void 0;var Ou=bu(),V_=Eu(),W_=Au(),$i=Cu();De.Settings=$i.default;function G_(t,e,r){if(typeof e=="function"){new Ou.default(t,Jr()).read(e);return}new Ou.default(t,Jr(e)).read(r)}De.walk=G_;function Y_(t,e){let r=Jr(e);return new W_.default(t,r).read()}De.walkSync=Y_;function K_(t,e){let r=Jr(e);return new V_.default(t,r).read()}De.walkStream=K_;function Jr(t={}){return t instanceof $i.default?t:new $i.default(t)}});var ji=_(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});var J_=A("path"),Q_=nt(),Tu=$e(),Pu=class{constructor(e){this._settings=e,this._fsStatSettings=new Q_.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return J_.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:Tu.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!Tu.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};qi.default=Pu});var Vi=_(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});var X_=A("stream"),Z_=nt(),z_=Hi(),em=ji(),Du=class extends em.default{constructor(){super(...arguments);this._walkStream=z_.walkStream,this._stat=Z_.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new X_.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(l=>{l!==null&&r.entryFilter(l)&&i.push(l),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Ui.default=Du});var Mu=_(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});var At=$e(),Lu=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){let e=At.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let n=this._getPatternSegments(r),i=this._splitSegmentsIntoSections(n);this._storage.push({complete:i.length<=1,pattern:r,segments:n,sections:i})}}_getPatternSegments(e){return At.pattern.getPatternParts(e,this._micromatchOptions).map(n=>At.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:At.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return At.array.splitWhen(e,r=>r.dynamic&&At.pattern.hasGlobStar(r.pattern))}};Wi.default=Lu});var Nu=_(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});var tm=Mu(),ku=class extends tm.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((l,c)=>{let u=s.segments[c];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};Gi.default=ku});var Iu=_(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});var Qr=$e(),rm=Nu(),Bu=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new rm.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(Qr.pattern.isAffectDepthOfReadingPattern);return Qr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=Qr.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Qr.pattern.matchAny(e,r)}};Yi.default=Bu});var $u=_(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});var it=$e(),Fu=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let n=it.pattern.convertPatternsToRe(e,this._micromatchOptions),i=it.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,n,i)}_filter(e,r,n){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,n))return!1;let i=this._settings.baseNameMatch?e.name:e.path,s=this._isMatchToPatterns(i,r)&&!this._isMatchToPatterns(e.path,n);return this._settings.unique&&s&&this._createIndexRecord(e),s}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let n=it.path.makeAbsolute(this._settings.cwd,e);return it.pattern.matchAny(n,r)}_isMatchToPatterns(e,r){let n=it.path.removeLeadingDotSegment(e);return it.pattern.matchAny(n,r)||it.pattern.matchAny(n+"/",r)}};Ki.default=Fu});var qu=_(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});var nm=$e(),Hu=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return nm.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Ji.default=Hu});var Vu=_(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var ju=$e(),Uu=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=ju.path.makeAbsolute(this._settings.cwd,r),r=ju.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};Qi.default=Uu});var Xr=_(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});var im=A("path"),sm=Iu(),om=$u(),am=qu(),lm=Vu(),Wu=class{constructor(e){this._settings=e,this.errorFilter=new am.default(this._settings),this.entryFilter=new om.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new sm.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new lm.default(this._settings)}_getRootDirectory(e){return im.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};Xi.default=Wu});var Yu=_(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});var um=Vi(),cm=Xr(),Gu=class extends cm.default{constructor(){super(...arguments);this._reader=new um.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=[];return new Promise((s,o)=>{let a=this.api(r,e,n);a.once("error",o),a.on("data",l=>i.push(n.transform(l))),a.once("end",()=>s(i))})}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};Zi.default=Gu});var Ju=_(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});var fm=A("stream"),hm=Vi(),pm=Xr(),Ku=class extends pm.default{constructor(){super(...arguments);this._reader=new hm.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new fm.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};zi.default=Ku});var Xu=_(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var dm=nt(),gm=Hi(),_m=ji(),Qu=class extends _m.default{constructor(){super(...arguments);this._walkSync=gm.walkSync,this._statSync=dm.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};es.default=Qu});var zu=_(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var mm=Xu(),ym=Xr(),Zu=class extends ym.default{constructor(){super(...arguments);this._reader=new mm.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};ts.default=Zu});var tc=_(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Rt=A("fs"),bm=A("os"),vm=Math.max(bm.cpus().length,1);Ct.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Rt.lstat,lstatSync:Rt.lstatSync,stat:Rt.stat,statSync:Rt.statSync,readdir:Rt.readdir,readdirSync:Rt.readdirSync};var ec=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,vm),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},Ct.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};Ct.default=ec});var ss=_((rx,ic)=>{"use strict";var rc=Ll(),nc=kl(),Em=Yu(),xm=Ju(),Sm=zu(),rs=tc(),st=$e();async function ns(t,e){Ot(t);let r=is(t,Em.default,e),n=await Promise.all(r);return st.array.flatten(n)}(function(t){function e(o,a){Ot(o);let l=is(o,Sm.default,a);return st.array.flatten(l)}t.sync=e;function r(o,a){Ot(o);let l=is(o,xm.default,a);return st.stream.merge(l)}t.stream=r;function n(o,a){Ot(o);let l=nc.transform([].concat(o)),c=new rs.default(a);return rc.generate(l,c)}t.generateTasks=n;function i(o,a){Ot(o);let l=new rs.default(a);return st.pattern.isDynamicPattern(o,l)}t.isDynamicPattern=i;function s(o){return Ot(o),st.path.escape(o)}t.escapePath=s})(ns||(ns={}));function is(t,e,r){let n=nc.transform([].concat(t)),i=new rs.default(r),s=rc.generate(n,i),o=new e(i);return s.map(o.read,o)}function Ot(t){if(![].concat(t).every(n=>st.string.isString(n)&&!st.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}ic.exports=ns});var oc=_((nx,os)=>{"use strict";var sc=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};os.exports=sc;os.exports.default=sc});var lc=_((ix,zr)=>{"use strict";var wm=oc(),Zr=new WeakMap,ac=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0,i=t.displayName||t.name||"<anonymous>",s=function(...o){if(Zr.set(s,++n),n===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return wm(s,t),Zr.set(s,n),s};zr.exports=ac;zr.exports.default=ac;zr.exports.callCount=t=>{if(!Zr.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Zr.get(t)}});var uc=_((sx,en)=>{en.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&en.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&en.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var dc=_((ox,Dt)=>{var Y=global.process,ot=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};ot(Y)?(cc=A("assert"),Tt=uc(),fc=/^win/i.test(Y.platform),Jt=A("events"),typeof Jt!="function"&&(Jt=Jt.EventEmitter),Y.__signal_exit_emitter__?te=Y.__signal_exit_emitter__:(te=Y.__signal_exit_emitter__=new Jt,te.count=0,te.emitted={}),te.infinite||(te.setMaxListeners(1/0),te.infinite=!0),Dt.exports=function(t,e){if(!ot(global.process))return function(){};cc.equal(typeof t,"function","a callback must be provided for exit handler"),Pt===!1&&as();var r="exit";e&&e.alwaysLast&&(r="afterexit");var n=function(){te.removeListener(r,t),te.listeners("exit").length===0&&te.listeners("afterexit").length===0&&tn()};return te.on(r,t),n},tn=function(){!Pt||!ot(global.process)||(Pt=!1,Tt.forEach(function(e){try{Y.removeListener(e,rn[e])}catch{}}),Y.emit=nn,Y.reallyExit=ls,te.count-=1)},Dt.exports.unload=tn,at=function(e,r,n){te.emitted[e]||(te.emitted[e]=!0,te.emit(e,r,n))},rn={},Tt.forEach(function(t){rn[t]=function(){if(!!ot(global.process)){var r=Y.listeners(t);r.length===te.count&&(tn(),at("exit",null,t),at("afterexit",null,t),fc&&t==="SIGHUP"&&(t="SIGINT"),Y.kill(Y.pid,t))}}}),Dt.exports.signals=function(){return Tt},Pt=!1,as=function(){Pt||!ot(global.process)||(Pt=!0,te.count+=1,Tt=Tt.filter(function(e){try{return Y.on(e,rn[e]),!0}catch{return!1}}),Y.emit=pc,Y.reallyExit=hc)},Dt.exports.load=as,ls=Y.reallyExit,hc=function(e){!ot(global.process)||(Y.exitCode=e||0,at("exit",Y.exitCode,null),at("afterexit",Y.exitCode,null),ls.call(Y,Y.exitCode))},nn=Y.emit,pc=function(e,r){if(e==="exit"&&ot(global.process)){r!==void 0&&(Y.exitCode=r);var n=nn.apply(this,arguments);return at("exit",Y.exitCode,null),at("afterexit",Y.exitCode,null),n}else return nn.apply(this,arguments)}):Dt.exports=function(){return function(){}};var cc,Tt,fc,Jt,te,tn,at,rn,Pt,as,ls,hc,nn,pc});var bc=_((hx,Cm)=>{Cm.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]}}});var xc=_((px,Ec)=>{"use strict";var on=Object.assign({},bc()),vc=Object.keys(on);Object.defineProperty(on,"random",{get(){let t=Math.floor(Math.random()*vc.length),e=vc[t];return on[e]}});Ec.exports=on});var Sc=_((Ex,an)=>{var Dm=function(){"use strict";function t(o,a,l,c){var u;typeof a=="object"&&(l=a.depth,c=a.prototype,u=a.filter,a=a.circular);var f=[],h=[],E=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof l>"u"&&(l=1/0);function m(y,S){if(y===null)return null;if(S==0)return y;var x,M;if(typeof y!="object")return y;if(t.__isArray(y))x=[];else if(t.__isRegExp(y))x=new RegExp(y.source,s(y)),y.lastIndex&&(x.lastIndex=y.lastIndex);else if(t.__isDate(y))x=new Date(y.getTime());else{if(E&&Buffer.isBuffer(y))return Buffer.allocUnsafe?x=Buffer.allocUnsafe(y.length):x=new Buffer(y.length),y.copy(x),x;typeof c>"u"?(M=Object.getPrototypeOf(y),x=Object.create(M)):(x=Object.create(c),M=c)}if(a){var N=f.indexOf(y);if(N!=-1)return h[N];f.push(y),h.push(x)}for(var z in y){var T;M&&(T=Object.getOwnPropertyDescriptor(M,z)),!(T&&T.set==null)&&(x[z]=m(y[z],S-1))}return x}return m(o,l)}t.clonePrototype=function(a){if(a===null)return null;var l=function(){};return l.prototype=a,new l};function e(o){return Object.prototype.toString.call(o)}t.__objToStr=e;function r(o){return typeof o=="object"&&e(o)==="[object Date]"}t.__isDate=r;function n(o){return typeof o=="object"&&e(o)==="[object Array]"}t.__isArray=n;function i(o){return typeof o=="object"&&e(o)==="[object RegExp]"}t.__isRegExp=i;function s(o){var a="";return o.global&&(a+="g"),o.ignoreCase&&(a+="i"),o.multiline&&(a+="m"),a}return t.__getRegExpFlags=s,t}();typeof an=="object"&&an.exports&&(an.exports=Dm)});var Ac=_((xx,wc)=>{var Lm=Sc();wc.exports=function(t,e){return t=t||{},Object.keys(e).forEach(function(r){typeof t[r]>"u"&&(t[r]=Lm(e[r]))}),t}});var Cc=_((Sx,Rc)=>{Rc.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var Dc=_((wx,hs)=>{"use strict";var Mm=Ac(),Zt=Cc(),Tc={nul:0,control:0};hs.exports=function(e){return Pc(e,Tc)};hs.exports.config=function(t){return t=Mm(t||{},Tc),function(r){return Pc(r,t)}};function Pc(t,e){if(typeof t!="string")return Oc(t,e);for(var r=0,n=0;n<t.length;n++){var i=Oc(t.charCodeAt(n),e);if(i<0)return-1;r+=i}return r}function Oc(t,e){return t===0?e.nul:t<32||t>=127&&t<160?e.control:km(t)?0:1+(t>=4352&&(t<=4447||t==9001||t==9002||t>=11904&&t<=42191&&t!=12351||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141))}function km(t){var e=0,r=Zt.length-1,n;if(t<Zt[0][0]||t>Zt[r][1])return!1;for(;r>=e;)if(n=Math.floor((e+r)/2),t>Zt[n][1])e=n+1;else if(t<Zt[n][0])r=n-1;else return!0;return!1}});var ds=_((Rx,Lc)=>{Lc.exports=A("stream")});var Bc=_((Cx,Nc)=>{"use strict";function Mc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mc(Object(r),!0).forEach(function(n){Bm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Bm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fm(t,e,r){return e&&kc(t.prototype,e),r&&kc(t,r),t}var $m=A("buffer"),ln=$m.Buffer,Hm=A("util"),gs=Hm.inspect,qm=gs&&gs.custom||"inspect";function jm(t,e,r){ln.prototype.copy.call(t,e,r)}Nc.exports=function(){function t(){Im(this,t),this.head=null,this.tail=null,this.length=0}return Fm(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return ln.alloc(0);for(var n=ln.allocUnsafe(r>>>0),i=this.head,s=0;i;)jm(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=ln.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s}return this.length-=s,n}},{key:qm,value:function(r,n){return gs(this,Nm({},n,{depth:0,customInspect:!1}))}}]),t}()});var ms=_((Ox,Fc)=>{"use strict";function Um(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(_s,this,t)):process.nextTick(_s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(un,r):(r._writableState.errorEmitted=!0,process.nextTick(Ic,r,s)):process.nextTick(Ic,r,s):e?(process.nextTick(un,r),e(s)):process.nextTick(un,r)}),this)}function Ic(t,e){_s(t,e),un(t)}function un(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Vm(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function _s(t,e){t.emit("error",e)}function Wm(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Fc.exports={destroy:Um,undestroy:Vm,errorOrDestroy:Wm}});var Je=_((Tx,qc)=>{"use strict";var Hc={};function ge(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}class i extends r{constructor(o,a,l){super(n(o,a,l))}}i.prototype.name=r.name,i.prototype.code=t,Hc[t]=i}function $c(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Gm(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Ym(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Km(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ge("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ge("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&Gm(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Ym(t," argument"))i=`The ${t} ${n} ${$c(e,"type")}`;else{let s=Km(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${$c(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);ge("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ge("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});ge("ERR_STREAM_PREMATURE_CLOSE","Premature close");ge("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});ge("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ge("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ge("ERR_STREAM_WRITE_AFTER_END","write after end");ge("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ge("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);ge("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");qc.exports.codes=Hc});var ys=_((Px,jc)=>{"use strict";var Jm=Je().codes.ERR_INVALID_OPT_VALUE;function Qm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Xm(t,e,r,n){var i=Qm(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Jm(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}jc.exports={getHighWaterMark:Xm}});var Uc=_((Dx,bs)=>{typeof Object.create=="function"?bs.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:bs.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var lt=_((Lx,Es)=>{try{if(vs=A("util"),typeof vs.inherits!="function")throw"";Es.exports=vs.inherits}catch{Es.exports=Uc()}var vs});var Wc=_((Mx,Vc)=>{Vc.exports=A("util").deprecate});var ws=_((kx,Xc)=>{"use strict";Xc.exports=J;function Yc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){w0(e,t)}}var Mt;J.WritableState=er;var Zm={deprecate:Wc()},Kc=ds(),fn=A("buffer").Buffer,zm=global.Uint8Array||function(){};function e0(t){return fn.from(t)}function t0(t){return fn.isBuffer(t)||t instanceof zm}var Ss=ms(),r0=ys(),n0=r0.getHighWaterMark,Qe=Je().codes,i0=Qe.ERR_INVALID_ARG_TYPE,s0=Qe.ERR_METHOD_NOT_IMPLEMENTED,o0=Qe.ERR_MULTIPLE_CALLBACK,a0=Qe.ERR_STREAM_CANNOT_PIPE,l0=Qe.ERR_STREAM_DESTROYED,u0=Qe.ERR_STREAM_NULL_VALUES,c0=Qe.ERR_STREAM_WRITE_AFTER_END,f0=Qe.ERR_UNKNOWN_ENCODING,kt=Ss.errorOrDestroy;lt()(J,Kc);function h0(){}function er(t,e,r){Mt=Mt||ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof Mt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=n0(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){b0(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Yc(this)}er.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(er.prototype,"buffer",{get:Zm.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var cn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(cn=Function.prototype[Symbol.hasInstance],Object.defineProperty(J,Symbol.hasInstance,{value:function(e){return cn.call(this,e)?!0:this!==J?!1:e&&e._writableState instanceof er}})):cn=function(e){return e instanceof this};function J(t){Mt=Mt||ut();var e=this instanceof Mt;if(!e&&!cn.call(J,this))return new J(t);this._writableState=new er(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Kc.call(this)}J.prototype.pipe=function(){kt(this,new a0)};function p0(t,e){var r=new c0;kt(t,r),process.nextTick(e,r)}function d0(t,e,r,n){var i;return r===null?i=new u0:typeof r!="string"&&!e.objectMode&&(i=new i0("chunk",["string","Buffer"],r)),i?(kt(t,i),process.nextTick(n,i),!1):!0}J.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&t0(t);return s&&!fn.isBuffer(t)&&(t=e0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=h0),n.ending?p0(this,r):(s||d0(this,n,t,r))&&(n.pendingcb++,i=_0(this,n,s,t,e,r)),i};J.prototype.cork=function(){this._writableState.corked++};J.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Jc(this,t))};J.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new f0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(J.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function g0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=fn.from(e,r)),e}Object.defineProperty(J.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _0(t,e,r,n,i,s){if(!r){var o=g0(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xs(t,e,!1,a,n,i,s);return l}function xs(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new l0("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function m0(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(zt,t,e),t._writableState.errorEmitted=!0,kt(t,n)):(i(n),t._writableState.errorEmitted=!0,kt(t,n),zt(t,e))}function y0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function b0(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new o0;if(y0(r),e)m0(t,r,n,e,i);else{var s=Qc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Jc(t,r),n?process.nextTick(Gc,t,r,s,i):Gc(t,r,s,i)}}function Gc(t,e,r,n){r||v0(t,e),e.pendingcb--,n(),zt(t,e)}function v0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Jc(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,xs(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Yc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,f=e.objectMode?1:l.length;if(xs(t,e,!1,f,l,c,u),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}J.prototype._write=function(t,e,r){r(new s0("_write()"))};J.prototype._writev=null;J.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||S0(this,n,r),this};Object.defineProperty(J.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Qc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function E0(t,e){t._final(function(r){e.pendingcb--,r&&kt(t,r),e.prefinished=!0,t.emit("prefinish"),zt(t,e)})}function x0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(E0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zt(t,e){var r=Qc(e);if(r&&(x0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function S0(t,e,r){e.ending=!0,zt(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function w0(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});J.prototype.destroy=Ss.destroy;J.prototype._undestroy=Ss.undestroy;J.prototype._destroy=function(t,e){e(t)}});var ut=_((Nx,zc)=>{"use strict";var A0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};zc.exports=Le;var Zc=Cs(),Rs=ws();lt()(Le,Zc);for(As=A0(Rs.prototype),hn=0;hn<As.length;hn++)pn=As[hn],Le.prototype[pn]||(Le.prototype[pn]=Rs.prototype[pn]);var As,pn,hn;function Le(t){if(!(this instanceof Le))return new Le(t);Zc.call(this,t),Rs.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",R0)))}Object.defineProperty(Le.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Le.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Le.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function R0(){this._writableState.ended||process.nextTick(C0,this)}function C0(t){t.end()}Object.defineProperty(Le.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var rf=_((Os,tf)=>{var dn=A("buffer"),Me=dn.Buffer;function ef(t,e){for(var r in t)e[r]=t[r]}Me.from&&Me.alloc&&Me.allocUnsafe&&Me.allocUnsafeSlow?tf.exports=dn:(ef(dn,Os),Os.Buffer=ct);function ct(t,e,r){return Me(t,e,r)}ct.prototype=Object.create(Me.prototype);ef(Me,ct);ct.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Me(t,e,r)};ct.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Me(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};ct.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Me(t)};ct.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return dn.SlowBuffer(t)}});var Ds=_(sf=>{"use strict";var Ps=rf().Buffer,nf=Ps.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O0(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function T0(t){var e=O0(t);if(typeof e!="string"&&(Ps.isEncoding===nf||!nf(t)))throw new Error("Unknown encoding: "+t);return e||t}sf.StringDecoder=tr;function tr(t){this.encoding=T0(t);var e;switch(this.encoding){case"utf16le":this.text=N0,this.end=B0,e=4;break;case"utf8":this.fillLast=L0,e=4;break;case"base64":this.text=I0,this.end=F0,e=3;break;default:this.write=$0,this.end=H0;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ps.allocUnsafe(e)}tr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};tr.prototype.end=k0;tr.prototype.text=M0;tr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Ts(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function P0(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Ts(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Ts(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Ts(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function D0(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function L0(t){var e=this.lastTotal-this.lastNeed,r=D0(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function M0(t,e){var r=P0(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function k0(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function N0(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function B0(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function I0(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function F0(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function $0(t){return t.toString(this.encoding)}function H0(t){return t&&t.length?this.write(t):""}});var gn=_((Ix,lf)=>{"use strict";var of=Je().codes.ERR_STREAM_PREMATURE_CLOSE;function q0(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function j0(){}function U0(t){return t.setHeader&&typeof t.abort=="function"}function af(t,e,r){if(typeof e=="function")return af(t,null,e);e||(e={}),r=q0(r||j0);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){i=!1,o=!0,n||r.call(t)},l=t._readableState&&t._readableState.endEmitted,c=function(){n=!1,l=!0,i||r.call(t)},u=function(m){r.call(t,m)},f=function(){var m;if(n&&!l)return(!t._readableState||!t._readableState.ended)&&(m=new of),r.call(t,m);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(m=new of),r.call(t,m)},h=function(){t.req.on("finish",a)};return U0(t)?(t.on("complete",a),t.on("abort",f),t.req?h():t.on("request",h)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",c),t.on("finish",a),e.error!==!1&&t.on("error",u),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",c),t.removeListener("error",u),t.removeListener("close",f)}}lf.exports=af});var cf=_((Fx,uf)=>{"use strict";var _n;function Xe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var V0=gn(),Ze=Symbol("lastResolve"),ft=Symbol("lastReject"),rr=Symbol("error"),mn=Symbol("ended"),ht=Symbol("lastPromise"),Ls=Symbol("handlePromise"),pt=Symbol("stream");function ze(t,e){return{value:t,done:e}}function W0(t){var e=t[Ze];if(e!==null){var r=t[pt].read();r!==null&&(t[ht]=null,t[Ze]=null,t[ft]=null,e(ze(r,!1)))}}function G0(t){process.nextTick(W0,t)}function Y0(t,e){return function(r,n){t.then(function(){if(e[mn]){r(ze(void 0,!0));return}e[Ls](r,n)},n)}}var K0=Object.getPrototypeOf(function(){}),J0=Object.setPrototypeOf((_n={get stream(){return this[pt]},next:function(){var e=this,r=this[rr];if(r!==null)return Promise.reject(r);if(this[mn])return Promise.resolve(ze(void 0,!0));if(this[pt].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[rr]?a(e[rr]):o(ze(void 0,!0))})});var n=this[ht],i;if(n)i=new Promise(Y0(n,this));else{var s=this[pt].read();if(s!==null)return Promise.resolve(ze(s,!1));i=new Promise(this[Ls])}return this[ht]=i,i}},Xe(_n,Symbol.asyncIterator,function(){return this}),Xe(_n,"return",function(){var e=this;return new Promise(function(r,n){e[pt].destroy(null,function(i){if(i){n(i);return}r(ze(void 0,!0))})})}),_n),K0),Q0=function(e){var r,n=Object.create(J0,(r={},Xe(r,pt,{value:e,writable:!0}),Xe(r,Ze,{value:null,writable:!0}),Xe(r,ft,{value:null,writable:!0}),Xe(r,rr,{value:null,writable:!0}),Xe(r,mn,{value:e._readableState.endEmitted,writable:!0}),Xe(r,Ls,{value:function(s,o){var a=n[pt].read();a?(n[ht]=null,n[Ze]=null,n[ft]=null,s(ze(a,!1))):(n[Ze]=s,n[ft]=o)},writable:!0}),r));return n[ht]=null,V0(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[ft];s!==null&&(n[ht]=null,n[Ze]=null,n[ft]=null,s(i)),n[rr]=i;return}var o=n[Ze];o!==null&&(n[ht]=null,n[Ze]=null,n[ft]=null,o(ze(void 0,!0))),n[mn]=!0}),e.on("readable",G0.bind(null,n)),n};uf.exports=Q0});var df=_(($x,pf)=>{"use strict";function ff(t,e,r,n,i,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(n,i)}function X0(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(l){ff(s,n,i,o,a,"next",l)}function a(l){ff(s,n,i,o,a,"throw",l)}o(void 0)})}}function hf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Z0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hf(Object(r),!0).forEach(function(n){z0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function z0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ey=Je().codes.ERR_INVALID_ARG_TYPE;function ty(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new ey("iterable",["Iterable"],e);var i=new t(Z0({objectMode:!0},r)),s=!1;i._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=X0(function*(){try{var l=yield n.next(),c=l.value,u=l.done;u?i.push(null):i.push(yield c)?o():s=!1}catch(f){i.destroy(f)}}),a.apply(this,arguments)}return i}pf.exports=ty});var Cs=_((qx,wf)=>{"use strict";wf.exports=B;var Nt;B.ReadableState=yf;var Hx=A("events").EventEmitter,mf=function(e,r){return e.listeners(r).length},ir=ds(),yn=A("buffer").Buffer,ry=global.Uint8Array||function(){};function ny(t){return yn.from(t)}function iy(t){return yn.isBuffer(t)||t instanceof ry}var Ms=A("util"),L;Ms&&Ms.debuglog?L=Ms.debuglog("stream"):L=function(){};var sy=Bc(),Hs=ms(),oy=ys(),ay=oy.getHighWaterMark,bn=Je().codes,ly=bn.ERR_INVALID_ARG_TYPE,uy=bn.ERR_STREAM_PUSH_AFTER_EOF,cy=bn.ERR_METHOD_NOT_IMPLEMENTED,fy=bn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Bt,ks,Ns;lt()(B,ir);var nr=Hs.errorOrDestroy,Bs=["error","close","destroy","pause","resume"];function hy(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function yf(t,e,r){Nt=Nt||ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof Nt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=ay(this,t,"readableHighWaterMark",r),this.buffer=new sy,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Bt||(Bt=Ds().StringDecoder),this.decoder=new Bt(t.encoding),this.encoding=t.encoding)}function B(t){if(Nt=Nt||ut(),!(this instanceof B))return new B(t);var e=this instanceof Nt;this._readableState=new yf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ir.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});B.prototype.destroy=Hs.destroy;B.prototype._undestroy=Hs.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=yn.from(t,e),e=""),n=!0),bf(this,t,e,!1,n)};B.prototype.unshift=function(t){return bf(this,t,null,!0,!1)};function bf(t,e,r,n,i){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,gy(t,s);else{var o;if(i||(o=py(s,e)),o)nr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==yn.prototype&&(e=ny(e)),n)s.endEmitted?nr(t,new fy):Is(t,s,e,!0);else if(s.ended)nr(t,new uy);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Is(t,s,e,!1):$s(t,s)):Is(t,s,e,!1)}else n||(s.reading=!1,$s(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Is(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&vn(t)),$s(t,e)}function py(t,e){var r;return!iy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new ly("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){Bt||(Bt=Ds().StringDecoder);var e=new Bt(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var gf=1073741824;function dy(t){return t>=gf?t=gf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function _f(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=dy(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){L("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return L("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Fs(this):vn(this),null;if(t=_f(t,e),t===0&&e.ended)return e.length===0&&Fs(this),null;var n=e.needReadable;L("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,L("length less than watermark",n)),e.ended||e.reading?(n=!1,L("reading or ended",n)):n&&(L("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=_f(r,e)));var i;return t>0?i=xf(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Fs(this)),i!==null&&this.emit("data",i),i};function gy(t,e){if(L("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?vn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,vf(t)))}}function vn(t){var e=t._readableState;L("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(L("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(vf,t))}function vf(t){var e=t._readableState;L("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,qs(t)}function $s(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(_y,t,e))}function _y(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(L("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){nr(this,new cy("_read()"))};B.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,L("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?a:y;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(S,x){L("onunpipe"),S===r&&x&&x.hasUnpiped===!1&&(x.hasUnpiped=!0,u())}function a(){L("onend"),t.end()}var l=my(r);t.on("drain",l);var c=!1;function u(){L("cleanup"),t.removeListener("close",E),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",h),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(S){L("ondata");var x=t.write(S);L("dest.write",x),x===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Sf(n.pipes,t)!==-1)&&!c&&(L("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(S){L("onerror",S),y(),t.removeListener("error",h),mf(t,"error")===0&&nr(t,S)}hy(t,"error",h);function E(){t.removeListener("finish",m),y()}t.once("close",E);function m(){L("onfinish"),t.removeListener("close",E),y()}t.once("finish",m);function y(){L("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(L("pipe resume"),r.resume()),t};function my(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&mf(t,"data")&&(r.flowing=!0,qs(t))}}B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Sf(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=ir.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,L("on readable",n.length,n.reading),n.length?vn(this):n.reading||process.nextTick(yy,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=ir.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Ef,this),r};B.prototype.removeAllListeners=function(t){var e=ir.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Ef,this),e};function Ef(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function yy(t){L("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,by(this,t)),t.paused=!1,this};function by(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(vy,t,e))}function vy(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),qs(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function qs(t){var e=t._readableState;for(L("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(L("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(a){return function(){return t[a].apply(t,arguments)}}(i));for(var s=0;s<Bs.length;s++)t.on(Bs[s],this.emit.bind(this,Bs[s]));return this._read=function(o){L("wrapped _read",o),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return ks===void 0&&(ks=cf()),ks(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=xf;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Fs(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Ey,e,t))}function Ey(t,e){if(L("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(B.from=function(t,e){return Ns===void 0&&(Ns=df()),Ns(B,t,e)});function Sf(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var js=_((jx,Rf)=>{"use strict";Rf.exports=qe;var En=Je().codes,xy=En.ERR_METHOD_NOT_IMPLEMENTED,Sy=En.ERR_MULTIPLE_CALLBACK,wy=En.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ay=En.ERR_TRANSFORM_WITH_LENGTH_0,xn=ut();lt()(qe,xn);function Ry(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Sy);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function qe(t){if(!(this instanceof qe))return new qe(t);xn.call(this,t),this._transformState={afterTransform:Ry.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Cy)}function Cy(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Af(t,e,r)}):Af(this,null,null)}qe.prototype.push=function(t,e){return this._transformState.needTransform=!1,xn.prototype.push.call(this,t,e)};qe.prototype._transform=function(t,e,r){r(new xy("_transform()"))};qe.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};qe.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};qe.prototype._destroy=function(t,e){xn.prototype._destroy.call(this,t,function(r){e(r)})};function Af(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Ay;if(t._transformState.transforming)throw new wy;return t.push(null)}});var Tf=_((Ux,Of)=>{"use strict";Of.exports=sr;var Cf=js();lt()(sr,Cf);function sr(t){if(!(this instanceof sr))return new sr(t);Cf.call(this,t)}sr.prototype._transform=function(t,e,r){r(null,t)}});var kf=_((Vx,Mf)=>{"use strict";var Us;function Oy(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Lf=Je().codes,Ty=Lf.ERR_MISSING_ARGS,Py=Lf.ERR_STREAM_DESTROYED;function Pf(t){if(t)throw t}function Dy(t){return t.setHeader&&typeof t.abort=="function"}function Ly(t,e,r,n){n=Oy(n);var i=!1;t.on("close",function(){i=!0}),Us===void 0&&(Us=gn()),Us(t,{readable:e,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Dy(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new Py("pipe"))}}}function Df(t){t()}function My(t,e){return t.pipe(e)}function ky(t){return!t.length||typeof t[t.length-1]!="function"?Pf:t.pop()}function Ny(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ky(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Ty("streams");var i,s=e.map(function(o,a){var l=a<e.length-1,c=a>0;return Ly(o,l,c,function(u){i||(i=u),u&&s.forEach(Df),!l&&(s.forEach(Df),n(i))})});return e.reduce(My)}Mf.exports=Ny});var Nf=_((_e,ar)=>{var or=A("stream");process.env.READABLE_STREAM==="disable"&&or?(ar.exports=or.Readable,Object.assign(ar.exports,or),ar.exports.Stream=or):(_e=ar.exports=Cs(),_e.Stream=or||_e,_e.Readable=_e,_e.Writable=ws(),_e.Duplex=ut(),_e.Transform=js(),_e.PassThrough=Tf(),_e.finished=gn(),_e.pipeline=kf())});var Ff=_((Wx,If)=>{"use strict";var{Buffer:Ee}=A("buffer"),Bf=Symbol.for("BufferList");function U(t){if(!(this instanceof U))return new U(t);U._init.call(this,t)}U._init=function(e){Object.defineProperty(this,Bf,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};U.prototype._new=function(e){return new U(e)};U.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let i=r+this._bufs[n].length;if(e<i||n===this._bufs.length-1)return[n,e-r];r=i}};U.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let n=0;n<e;n++)r+=this._bufs[n].length;return r};U.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};U.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};U.prototype.copy=function(e,r,n,i){if((typeof n!="number"||n<0)&&(n=0),(typeof i!="number"||i>this.length)&&(i=this.length),n>=this.length||i<=0)return e||Ee.alloc(0);let s=!!e,o=this._offset(n),a=i-n,l=a,c=s&&r||0,u=o[1];if(n===0&&i===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:Ee.concat(this._bufs,this.length);for(let f=0;f<this._bufs.length;f++)this._bufs[f].copy(e,c),c+=this._bufs[f].length;return e}if(l<=this._bufs[o[0]].length-u)return s?this._bufs[o[0]].copy(e,r,u,u+l):this._bufs[o[0]].slice(u,u+l);s||(e=Ee.allocUnsafe(a));for(let f=o[0];f<this._bufs.length;f++){let h=this._bufs[f].length-u;if(l>h)this._bufs[f].copy(e,c,u),c+=h;else{this._bufs[f].copy(e,c,u,u+l),c+=h;break}l-=h,u&&(u=0)}return e.length>c?e.slice(0,c):e};U.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let n=this._offset(e),i=this._offset(r),s=this._bufs.slice(n[0],i[0]+1);return i[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,i[1]),n[1]!==0&&(s[0]=s[0].slice(n[1])),this._new(s)};U.prototype.toString=function(e,r,n){return this.slice(r,n).toString(e)};U.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};U.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};U.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(Ee.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e=="number"&&(e=e.toString()),this._appendBuffer(Ee.from(e));return this};U.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};U.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e=="string"&&(r=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=Ee.from([t]):typeof t=="string"?t=Ee.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=Ee.from(t.buffer,t.byteOffset,t.byteLength):Ee.isBuffer(t)||(t=Ee.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let n=this._offset(e),i=n[0],s=n[1];for(;i<this._bufs.length;i++){let o=this._bufs[i];for(;s<o.length;)if(o.length-s>=t.length){let l=o.indexOf(t,s);if(l!==-1)return this._reverseOffset([i,l]);s=o.length-t.length+1}else{let l=this._reverseOffset([i,s]);if(this._match(l,t))return l;s++}s=0}return-1};U.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?U.prototype[r]=function(n,i){return this.slice(n,n+i)[r](0,i)}:U.prototype[r]=function(n=0){return this.slice(n,n+t[r])[r](0)}})(e)})();U.prototype._isBufferList=function(e){return e instanceof U||U.isBufferList(e)};U.isBufferList=function(e){return e!=null&&e[Bf]};If.exports=U});var $f=_((Gx,Sn)=>{"use strict";var Vs=Nf().Duplex,By=lt(),lr=Ff();function ie(t){if(!(this instanceof ie))return new ie(t);if(typeof t=="function"){this._callback=t;let e=function(n){this._callback&&(this._callback(n),this._callback=null)}.bind(this);this.on("pipe",function(n){n.on("error",e)}),this.on("unpipe",function(n){n.removeListener("error",e)}),t=null}lr._init.call(this,t),Vs.call(this)}By(ie,Vs);Object.assign(ie.prototype,lr.prototype);ie.prototype._new=function(e){return new ie(e)};ie.prototype._write=function(e,r,n){this._appendBuffer(e),typeof n=="function"&&n()};ie.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};ie.prototype.end=function(e){Vs.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};ie.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};ie.prototype._isBufferList=function(e){return e instanceof ie||e instanceof lr||ie.isBufferList(e)};ie.isBufferList=lr.isBufferList;Sn.exports=ie;Sn.exports.BufferListStream=ie;Sn.exports.BufferList=lr});var co=_((kw,vh)=>{var Ln=A("fs"),bh=A("path"),Ub=A("os");function lo(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function uo(t,e){try{return e(t)}catch(r){if(/^(ENOENT|EPERM|EACCES)$/.test(r.code))return r.code!=="ENOENT"&&console.warn("Warning: Cannot access %s",t),!1;throw r}}var Vb={nil:function(t){return t==null},array:function(t){return Array.isArray(t)},emptyObject:function(t){for(var e in t)return!1;return!0},buffer:function(t){return Buffer.isBuffer(t)},regExp:function(t){return lo(t,"RegExp")},string:function(t){return lo(t,"String")},func:function(t){return typeof t=="function"},number:function(t){return lo(t,"Number")},exists:function(t){return Ln.existsSync(t)},file:function(t){return uo(t,function(e){return Ln.statSync(e).isFile()})},samePath:function(t,e){return bh.resolve(t)===bh.resolve(e)},directory:function(t){return uo(t,function(e){return Ln.statSync(e).isDirectory()})},symbolicLink:function(t){return uo(t,function(e){return Ln.lstatSync(e).isSymbolicLink()})},windows:function(){return Ub.platform()==="win32"}};vh.exports=Vb});var Ah=_((Nw,wh)=>{var gr=A("fs"),Eh=A("os"),fo=A("path"),Mn=co(),dr,Wb=Eh.tmpdir&&Eh.tmpdir()||process.env.TMPDIR||process.env.TEMP||process.cwd();function Sh(){this.stack=[]}Sh.prototype={create:function(t,e){var r=fo.join(e,"node-watch-"+Math.random().toString(16).substr(2));return this.stack.push({name:r,type:t}),r},write:function(){for(var t=0;t<arguments.length;++t)gr.writeFileSync(arguments[t]," ")},mkdir:function(){for(var t=0;t<arguments.length;++t)gr.mkdirSync(arguments[t])},cleanup:function(t){try{for(var e;e=this.stack.pop();){var r=e.type,n=e.name;r==="file"&&Mn.file(n)?gr.unlinkSync(n):r==="dir"&&Mn.directory(n)&&gr.rmdirSync(n)}}finally{Mn.func(t)&&t()}}};var xh=!1;wh.exports=function t(e){if(!Mn.func(e))return!1;if(dr!==void 0)return e(dr);if(!xh)xh=!0;else return setTimeout(function(){t(e)},300);var r=new Sh,n=r.create("dir",Wb),i=r.create("dir",n),s=r.create("file",i);r.mkdir(n,i);var o={recursive:!0},a;try{a=gr.watch(n,o)}catch(c){if(c.code=="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM")return e(dr=!1);throw c}if(!a)return!1;var l=setTimeout(function(){a.close(),r.cleanup(function(){e(dr=!1)})},200);a.on("change",function(c,u){fo.basename(s)===fo.basename(u)&&(a.close(),clearTimeout(l),r.cleanup(function(){e(dr=!0)}))}),r.write(s)}});var Bh=_((Bw,_o)=>{var po=A("fs"),_r=A("path"),Ch=A("util"),Oh=A("events"),Th=Ah(),j=co(),Gb="update",Ph="remove",Rh=Symbol("skip");function Yb(t){return t.some(function(e,r,n){return n.indexOf(e)!==r})}function go(t){return t.filter(function(e,r,n){return n.indexOf(e)===r})}function Kb(t){return t.reduce(function(e,r){return e.concat(r)},[])}function Jb(t){if(t&&t!=="buffer"&&!Buffer.isEncoding(t))throw new Error("Unknown encoding: "+t)}function Qb(t){return j.func(t)?function(e,r){t(e,!1)&&r()}:j.regExp(t)?function(e,r){t.test(e)&&r()}:function(e,r){r()}}function Xb(t){return t.map(function(e){return j.exists(e)?[Gb,e]:[Ph,e]})}function Zb(t){var e=go(t),r=/~$|^\.#|^##$/g,n=t.some(function(s){return r.test(s)});if(n){var i=Yb(t.map(function(s){return s.replace(r,"")}));i&&(e=e.filter(function(s){return j.exists(s)}))}return Xb(e)}function zb(t,e){var r,n=[],i=t.options.encoding,s=t.options.delay;j.number(s)||(s=200);function o(){Zb(n).forEach(function(a){a[1]=Buffer.from(a[1]),i!=="buffer"&&(a[1]=a[1].toString(i)),e.apply(null,a)}),r=null,n=[]}return function(a,l){n.push(l),r||(r=setTimeout(o,s))}}function Dh(){var t={};return function(e){return function(r,n){t[r+n]=[r,n],setTimeout(function(){Object.keys(t).forEach(function(i){e.apply(null,t[i])}),t={}})}}}function Lh(t,e,r=function(){}){j.directory(t)?po.readdir(t,function(n,i){if(n)if(/^(EPERM|EACCES)$/.test(n.code))console.warn("Warning: Cannot access %s.",t);else throw n;else i.forEach(function(s){var o=_r.join(t,s);j.directory(o)&&e(o)}),r()}):r()}function ev(t){var e=0;return function(){return e++,function(){e--,e===0&&t()}}}function tv(){return function(){}}function Mh(t,e){return!j.func(e)||e(t,Rh)!==Rh}var kh=Ch.deprecate(function(){},"(node-watch) First param in callback function is replaced with event name since 0.5.0, use `(evt, filename) => {}` if you want to get the filename");function Ne(){Oh.EventEmitter.call(this),this.watchers={},this._isReady=!1,this._isClosed=!1}Ch.inherits(Ne,Oh.EventEmitter);Ne.prototype.expose=function(){var t={},e=this,r=["on","emit","once","close","isClosed","listeners","setMaxListeners","getMaxListeners","getWatchedPaths"];return r.forEach(function(n){t[n]=function(){return e[n].apply(e,arguments)}}),t};Ne.prototype.isClosed=function(){return this._isClosed};Ne.prototype.close=function(t){var e=this;if(t){var r=this.watchers[t];r&&r.close&&(r.close(),delete e.watchers[t]),Lh(t,function(n){e.close(n)})}else Object.keys(e.watchers).forEach(function(n){var i=e.watchers[n];i&&i.close&&i.close()}),this.watchers={};j.emptyObject(e.watchers)&&(this._isClosed||(this._isClosed=!0,process.nextTick(Nh,this)))};Ne.prototype.getWatchedPaths=function(t){if(j.func(t)){var e=this;e._isReady?t(Object.keys(e.watchers)):e.on("ready",function(){t(Object.keys(e.watchers))})}};function ho(t){t._isReady||(t._isReady=!0,process.nextTick(function(){t.emit("ready")}))}function Nh(t){t.emit("close")}Ne.prototype.add=function(t,e){var r=this;e=e||{fpath:""};var n=_r.resolve(e.fpath);this.watchers[n]=t;var i=function(o,a){if(!r.isClosed()){var l=a;j.nil(l)&&(l=""),l=_r.join(e.fpath,l),e.options.recursive&&Th(function(c){if(!c){var u=_r.resolve(l);if(!j.exists(l))r.close(u);else{var f=j.directory(l)&&!r.watchers[u]&&Mh(l,e.options.filter);f&&r.watchDirectory(l,e.options)}}}),s(o,l)}},s=zb(e,function(o,a){if(e.compareName)e.compareName(a)&&r.emit("change",o,a);else{var l=Qb(e.options.filter);l(a,function(){r.flag?r.flag="":r.emit("change",o,a)})}});t.on("error",function(o){r.isClosed()||(j.windows()&&o.code==="EPERM"?(t.emit("change",Ph,e.fpath&&""),r.flag="windows-error",r.close(n)):r.emit("error",o))}),t.on("change",i)};Ne.prototype.watchFile=function(t,e,r){var n=_r.join(t,"../"),i=Object.assign({},e,{filter:null,encoding:"utf8"});delete i.recursive;var s=po.watch(n,i);this.add(s,{type:"file",fpath:n,options:Object.assign({},i,{encoding:e.encoding}),compareName:function(o){return j.samePath(o,t)}}),j.func(r)&&(r.length===1&&kh(),this.on("change",r))};Ne.prototype.watchDirectory=function(t,e,r,n=tv){var i=this,s=n();Th(function(o){e.recursive=!!e.recursive;var a=Object.assign({},e,{encoding:"utf8"});if(o||delete a.recursive,i._isClosed)return s(),i.close();var l=po.watch(t,a);i.add(l,{type:"dir",fpath:t,options:e}),j.func(r)&&(r.length===1&&kh(),i.on("change",r)),e.recursive&&!o&&Lh(t,function(c){Mh(c,e.filter)&&i.watchDirectory(c,e,null,n)},n()),s()})};function rv(t){var e=new Ne,r=Dh(),n=t.length;return t.forEach(function(i){i.on("change",r(function(s,o){e.emit("change",s,o)})),i.on("error",function(s){e.emit("error",s)}),i.on("ready",function(){--n||ho(e)})}),e.close=function(){t.forEach(function(i){i.close()}),process.nextTick(Nh,e)},e.getWatchedPaths=function(i){if(j.func(i)){var s=t.map(function(o){return new Promise(function(a){o.getWatchedPaths(a)})});Promise.all(s).then(function(o){var a=go(Kb(o));i(a)})}},e.expose()}function kn(t,e,r){var n=new Ne;if(j.buffer(t)&&(t=t.toString()),!j.array(t)&&!j.exists(t)&&n.emit("error",new Error(t+" does not exist.")),j.string(e)&&(e={encoding:e}),j.func(e)&&(r=e,e={}),arguments.length<2&&(e={}),e.encoding?Jb(e.encoding):e.encoding="utf8",j.array(t)){if(t.length===1)return kn(t[0],e,r);var i=Dh();return rv(go(t).map(function(o){var a=kn(o,e);return j.func(r)&&a.on("change",i(r)),a}))}if(j.file(t))n.watchFile(t,e,r),ho(n);else if(j.directory(t)){var s=ev(function(){ho(n)});n.watchDirectory(t,e,r,s)}return n.expose()}_o.exports=kn;_o.exports.default=kn});var yo=(t=0)=>e=>`\x1B[${e+t}m`,bo=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,vo=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`;function Qh(){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[r,n]of Object.entries(e)){for(let[i,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=yo(),e.color.ansi256=bo(),e.color.ansi16m=vo(),e.bgColor.ansi=yo(10),e.bgColor.ansi256=bo(10),e.bgColor.ansi16m=vo(10),Object.defineProperties(e,{rgbToAnsi256:{value:(r,n,i)=>r===n&&n===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:r=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(r.toString(16));if(!n)return[0,0,0];let{colorString:i}=n.groups;i.length===3&&(i=[...i].map(o=>o+o).join(""));let s=Number.parseInt(i,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:r=>e.rgbToAnsi256(...e.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let n,i,s;if(r>=232)n=((r-232)*10+8)/255,i=n,s=n;else{r-=16;let l=r%36;n=Math.floor(r/36)/5,i=Math.floor(l/6)/5,s=l%6/5}let o=Math.max(n,i,s)*2;if(o===0)return 30;let a=30+(Math.round(s)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(r,n,i)=>e.ansi256ToAnsi(e.rgbToAnsi256(r,n,i)),enumerable:!1},hexToAnsi:{value:r=>e.ansi256ToAnsi(e.hexToAnsi256(r)),enumerable:!1}}),e}var Xh=Qh(),be=Xh;import Bn from"node:process";import Zh from"node:os";import Eo from"node:tty";function he(t,e=Bn.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:X}=Bn,Er;he("no-color")||he("no-colors")||he("color=false")||he("color=never")?Er=0:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Er=1);function zh(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function ep(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function tp(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=zh();n!==void 0&&(Er=n);let i=r?Er:n;if(i===0)return 0;if(r){if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let s=i||0;if(X.TERM==="dumb")return s;if(Bn.platform==="win32"){let o=Zh.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(X.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:s}function xo(t,e={}){let r=tp(t,{streamIsTTY:t&&t.isTTY,...e});return ep(r)}var rp={stdout:xo({isTTY:Eo.isatty(1)}),stderr:xo({isTTY:Eo.isatty(2)})},So=rp;function wo(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.slice(s),o}function Ao(t,e,r,n){let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
24
+ `:`
25
+ `)+r,i=n+1,n=t.indexOf(`
26
+ `,i)}while(n!==-1);return s+=t.slice(i),s}var{stdout:Ro,stderr:Co}=So,In=Symbol("GENERATOR"),mt=Symbol("STYLER"),jt=Symbol("IS_EMPTY"),Oo=["ansi","ansi","ansi256","ansi16m"],yt=Object.create(null),np=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ro?Ro.level:0;t.level=e.level===void 0?r:e.level};var ip=t=>{let e=(...r)=>r.join(" ");return np(e,t),Object.setPrototypeOf(e,Ut.prototype),e};function Ut(t){return ip(t)}Object.setPrototypeOf(Ut.prototype,Function.prototype);for(let[t,e]of Object.entries(be))yt[t]={get(){let r=xr(this,$n(e.open,e.close,this[mt]),this[jt]);return Object.defineProperty(this,t,{value:r}),r}};yt.visible={get(){let t=xr(this,this[mt],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Fn=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?be[r].ansi16m(...n):e==="ansi256"?be[r].ansi256(be.rgbToAnsi256(...n)):be[r].ansi(be.rgbToAnsi(...n)):t==="hex"?Fn("rgb",e,r,...be.hexToRgb(...n)):be[r][t](...n),sp=["rgb","hex","ansi256"];for(let t of sp){yt[t]={get(){let{level:r}=this;return function(...n){let i=$n(Fn(t,Oo[r],"color",...n),be.color.close,this[mt]);return xr(this,i,this[jt])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);yt[e]={get(){let{level:r}=this;return function(...n){let i=$n(Fn(t,Oo[r],"bgColor",...n),be.bgColor.close,this[mt]);return xr(this,i,this[jt])}}}}var op=Object.defineProperties(()=>{},{...yt,level:{enumerable:!0,get(){return this[In].level},set(t){this[In].level=t}}}),$n=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},xr=(t,e,r)=>{let n=(...i)=>ap(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,op),n[In]=t,n[mt]=e,n[jt]=r,n},ap=(t,e)=>{if(t.level<=0||!e)return t[jt]?"":e;let r=t[mt];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=wo(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
27
+ `);return s!==-1&&(e=Ao(e,i,n,s)),n+e+i};Object.defineProperties(Ut.prototype,yt);var lp=Ut(),vv=Ut({level:Co?Co.level:0});var C=lp;var Yo=Be(Go(),1),{program:Ov,createCommand:Tv,createArgument:Pv,createOption:Dv,CommanderError:Lv,InvalidArgumentError:Mv,Command:Ko,Argument:kv,Option:Nv,Help:Bv}=Yo.default;import{constants as Ob,existsSync as uh}from"fs";import{copyFile as Tb,mkdir as Pb,readFile as so,rm as ih,writeFile as ch}from"fs/promises";import{dirname as fh,extname as Db,isAbsolute as Lb,resolve as Mb,resolve as Dn}from"path";import{build as no,transform as kb}from"esbuild";var io=Be(ss(),1);import{env as sh}from"process";import wn from"node:process";import yc from"node:process";var gc=Be(lc(),1),_c=Be(dc(),1);import Am from"node:process";var Rm=(0,gc.default)(()=>{(0,_c.default)(()=>{Am.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),mc=Rm;var sn=!1,Lt={};Lt.show=(t=yc.stderr)=>{!t.isTTY||(sn=!1,t.write("\x1B[?25h"))};Lt.hide=(t=yc.stderr)=>{!t.isTTY||(mc(),sn=!0,t.write("\x1B[?25l"))};Lt.toggle=(t,e)=>{t!==void 0&&(sn=t),sn?Lt.show(e):Lt.hide(e)};var us=Lt;var ur=Be(xc(),1);function Qt(){return process.platform!=="win32"?process.env.TERM!=="linux":Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.ConEmuTask==="{cmd::Cmder}"||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}var Om={info:C.blue("ℹ"),success:C.green("✔"),warning:C.yellow("⚠"),error:C.red("✖")},Tm={info:C.blue("i"),success:C.green("√"),warning:C.yellow("‼"),error:C.red("×")},Pm=Qt()?Om:Tm,Xt=Pm;function cs({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 fs(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(cs(),"")}var qf=Be(Dc(),1);function ps({stream:t=process.stdout}={}){return Boolean(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Hf=Be($f(),1);import xe from"node:process";import Iy from"node:readline";var Fy=3,Ws=class{#r=0;#c=new Hf.BufferListStream;#i;#n;constructor(){this.#c.pipe(xe.stdout);let e=this;this.#i=function(r,n,...i){let{stdin:s}=xe;if(e.#r>0||s.emit===e.#i){if(r==="keypress")return;r==="data"&&n.includes(Fy)&&xe.emit("SIGINT"),Reflect.apply(e.#i,this,[r,n,...i])}else Reflect.apply(xe.stdin.emit,this,[r,n,...i])}}start(){this.#r++,this.#r===1&&this._realStart()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this._realStop()}_realStart(){xe.platform!=="win32"&&(this.#n=Iy.createInterface({input:xe.stdin,output:this.#c}),this.#n.on("SIGINT",()=>{xe.listenerCount("SIGINT")===0?xe.emit("SIGINT"):(this.#n.close(),xe.kill(xe.pid,"SIGINT"))}))}_realStop(){xe.platform!=="win32"&&(this.#n.close(),this.#n=void 0)}};var An,jf=class{#r=0;#c=!1;#i=0;#n=0;#e;#o;#t;#f;#h;#a;#l;#u;#p;#s;color;constructor(e){An||(An=new Ws),typeof e=="string"&&(e={text:e}),this.#e={color:"cyan",stream:wn.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#e.color,this.spinner=this.#e.spinner,this.#h=this.#e.interval,this.#t=this.#e.stream,this.#a=typeof this.#e.isEnabled=="boolean"?this.#e.isEnabled:ps({stream:this.#t}),this.#l=typeof this.#e.isSilent=="boolean"?this.#e.isSilent:!1,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.indent=this.#e.indent,wn.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#a,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(r){this.#r=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){return this.#i}}))}get indent(){return this.#u}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#u=e,this.updateLineCount()}get interval(){return this.#h||this.#o.interval||100}get spinner(){return this.#o}set spinner(e){if(this.#n=0,this.#h=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=e}else if(!Qt())this.#o=ur.default.line;else if(e===void 0)this.#o=ur.default.dots;else if(e!=="default"&&ur.default[e])this.#o=ur.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(e){this.#p=e||"",this.updateLineCount()}get prefixText(){return this.#s}set prefixText(e){this.#s=e||"",this.updateLineCount()}get isSpinning(){return this.#f!==void 0}getFullPrefixText(e=this.#s,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}updateLineCount(){let e=this.#t.columns||80,r=this.getFullPrefixText(this.#s,"-");this.#i=0;for(let n of fs(" ".repeat(this.#u)+r+"--"+this.#p).split(`
28
+ `))this.#i+=Math.max(1,Math.ceil((0,qf.default)(n)/e))}get isEnabled(){return this.#a&&!this.#l}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#a=e}get isSilent(){return this.#l}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=e}frame(){let{frames:e}=this.#o,r=e[this.#n];this.color&&(r=C[this.color](r)),this.#n=++this.#n%e.length;let n=typeof this.#s=="string"&&this.#s!==""?this.#s+" ":"",i=typeof this.text=="string"?" "+this.text:"";return n+r+i}clear(){if(!this.#a||!this.#t.isTTY)return this;this.#t.cursorTo(0);for(let e=0;e<this.#r;e++)e>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return(this.#u||this.lastIndent!==this.#u)&&this.#t.cursorTo(this.#u),this.lastIndent=this.#u,this.#r=0,this}render(){return this.#l?this:(this.clear(),this.#t.write(this.frame()),this.#r=this.#i,this)}start(e){return e&&(this.text=e),this.#l?this:this.#a?this.isSpinning?this:(this.#e.hideCursor&&us.hide(this.#t),this.#e.discardStdin&&wn.stdin.isTTY&&(this.#c=!0,An.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#t.write(`- ${this.text}
29
+ `),this)}stop(){return this.#a?(clearInterval(this.#f),this.#f=void 0,this.#n=0,this.clear(),this.#e.hideCursor&&us.show(this.#t),this.#e.discardStdin&&wn.stdin.isTTY&&this.#c&&(An.stop(),this.#c=!1),this):this}succeed(e){return this.stopAndPersist({symbol:Xt.success,text:e})}fail(e){return this.stopAndPersist({symbol:Xt.error,text:e})}warn(e){return this.stopAndPersist({symbol:Xt.warning,text:e})}info(e){return this.stopAndPersist({symbol:Xt.info,text:e})}stopAndPersist(e={}){if(this.#l)return this;let r=e.prefixText||this.#s,n=e.text||this.text,i=typeof n=="string"?" "+n:"";return this.stop(),this.#t.write(`${this.getFullPrefixText(r," ")}${e.symbol||" "}${i}
30
+ `),this}};function fe(t){return new jf(t)}var Uf={NODE_ENV:"production"};try{let{env:t}=await import("process");t.NODE_ENV&&(Uf.NODE_ENV=t.NODE_ENV)}catch{}var Gs=Uf.NODE_ENV==="development";import{Console as $y}from"console";var dt=new $y({stdout:process.stdout,stderr:process.stderr,groupIndentation:4}),Se=t=>{if(Gs){let{name:e}=t;return{log(...r){let n=C.bgBlue.white(` [${e}] `);dt.log(`${n}`,`
31
+
32
+ `,...r),dt.log()},group(){dt.log();let r=C.bgBlue.white(` [${e}] `);dt.group(r),dt.log()},groupEnd(){dt.log(`
33
+ `,"-".repeat(20),`
34
+ `),dt.groupEnd()}}}else return{log(){},group(){},groupEnd(){}}};var we=(...t)=>{console.log(),console.log(...t),console.log()};import{spawn as Hy,execSync as qy}from"child_process";import Xs from"node:process";import Vy from"node:os";import Yf from"node:tty";await(async()=>{let{dirname:t}=await import("path"),{fileURLToPath:e}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=e(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=t(globalThis.__filename)),typeof globalThis.require>"u"){let{default:r}=await import("module");globalThis.require=r.createRequire(import.meta.url)}})();var Vf=(t=0)=>e=>`\x1B[${e+t}m`,Wf=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Gf=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`;function jy(){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[r,n]of Object.entries(e)){for(let[i,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Vf(),e.color.ansi256=Wf(),e.color.ansi16m=Gf(),e.bgColor.ansi=Vf(10),e.bgColor.ansi256=Wf(10),e.bgColor.ansi16m=Gf(10),Object.defineProperties(e,{rgbToAnsi256:{value:(r,n,i)=>r===n&&n===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:r=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(r.toString(16));if(!n)return[0,0,0];let{colorString:i}=n.groups;i.length===3&&(i=[...i].map(o=>o+o).join(""));let s=Number.parseInt(i,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:r=>e.rgbToAnsi256(...e.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let n,i,s;if(r>=232)n=((r-232)*10+8)/255,i=n,s=n;else{r-=16;let l=r%36;n=Math.floor(r/36)/5,i=Math.floor(l/6)/5,s=l%6/5}let o=Math.max(n,i,s)*2;if(o===0)return 30;let a=30+(Math.round(s)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(r,n,i)=>e.ansi256ToAnsi(e.rgbToAnsi256(r,n,i)),enumerable:!1},hexToAnsi:{value:r=>e.ansi256ToAnsi(e.hexToAnsi256(r)),enumerable:!1}}),e}var Uy=jy(),ke=Uy;function me(t,e=Xs.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:Z}=Xs,Rn;me("no-color")||me("no-colors")||me("color=false")||me("color=never")?Rn=0:(me("color")||me("colors")||me("color=true")||me("color=always"))&&(Rn=1);function Wy(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function Gy(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Yy(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Wy();n!==void 0&&(Rn=n);let i=r?Rn:n;if(i===0)return 0;if(r){if(me("color=16m")||me("color=full")||me("color=truecolor"))return 3;if(me("color=256"))return 2}if(t&&!e&&i===void 0)return 0;let s=i||0;if(Z.TERM==="dumb")return s;if(Xs.platform==="win32"){let o=Vy.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Z)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in Z)||Z.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let o=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:s}function Kf(t,e={}){let r=Yy(t,{streamIsTTY:t&&t.isTTY,...e});return Gy(r)}var Ky={stdout:Kf({isTTY:Yf.isatty(1)}),stderr:Kf({isTTY:Yf.isatty(2)})},Jy=Ky;function Qy(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.slice(s),o}function Xy(t,e,r,n){let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
35
+ `:`
36
+ `)+r,i=n+1,n=t.indexOf(`
37
+ `,i)}while(n!==-1);return s+=t.slice(i),s}var{stdout:Jf,stderr:Qf}=Jy,Ys=Symbol("GENERATOR"),It=Symbol("STYLER"),cr=Symbol("IS_EMPTY"),Xf=["ansi","ansi","ansi256","ansi16m"],Ft=Object.create(null),Zy=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Jf?Jf.level:0;t.level=e.level===void 0?r:e.level},zy=t=>{let e=(...r)=>r.join(" ");return Zy(e,t),Object.setPrototypeOf(e,fr.prototype),e};function fr(t){return zy(t)}Object.setPrototypeOf(fr.prototype,Function.prototype);for(let[t,e]of Object.entries(ke))Ft[t]={get(){let r=Cn(this,Js(e.open,e.close,this[It]),this[cr]);return Object.defineProperty(this,t,{value:r}),r}};Ft.visible={get(){let t=Cn(this,this[It],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ks=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?ke[r].ansi16m(...n):e==="ansi256"?ke[r].ansi256(ke.rgbToAnsi256(...n)):ke[r].ansi(ke.rgbToAnsi(...n)):t==="hex"?Ks("rgb",e,r,...ke.hexToRgb(...n)):ke[r][t](...n),eb=["rgb","hex","ansi256"];for(let t of eb){Ft[t]={get(){let{level:r}=this;return function(...n){let i=Js(Ks(t,Xf[r],"color",...n),ke.color.close,this[It]);return Cn(this,i,this[cr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Ft[e]={get(){let{level:r}=this;return function(...n){let i=Js(Ks(t,Xf[r],"bgColor",...n),ke.bgColor.close,this[It]);return Cn(this,i,this[cr])}}}}var tb=Object.defineProperties(()=>{},{...Ft,level:{enumerable:!0,get(){return this[Ys].level},set(t){this[Ys].level=t}}}),Js=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Cn=(t,e,r)=>{let n=(...i)=>rb(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,tb),n[Ys]=t,n[It]=e,n[cr]=r,n},rb=(t,e)=>{if(t.level<=0||!e)return t[cr]?"":e;let r=t[It];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Qy(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
38
+ `);return s!==-1&&(e=Xy(e,i,n,s)),n+e+i};Object.defineProperties(fr.prototype,Ft);var nb=fr(),yS=fr({level:Qf?Qf.level:0}),ib=nb,sb={win32:t=>({cmd:"cmd.exe",args:["/d","/s","/c",t]})},ob={"cp -rf":{win32:t=>{let e="xcopy /E /S /G /Q /Y",r=t.map(n=>n.endsWith("\\")?n:`${n}\\`).map(n=>n.replace(/\*\\$/,""));return`${e} ${r.join(" ")}`}},ln:{win32:t=>`mklink /D ${t.join(" ")}`},pkill:{win32:t=>`taskkill /T /F /pid ${t.join(" ")}`}},ab=(t,e,r)=>{let n={...sb,...e},i={...ob,...r},s=a=>{let l=process.platform,c=n[l];if(c)return c(a);let[u,...f]=a.split(" ");return{cmd:u,args:f}},o=(a=>{let l=Object.entries(i);for(let[c,u]of l)if(a.startsWith(c)){let f=process.platform,h=u[f];if(!h)break;let E=a.slice(c.length).trim().split(" ");return h(E)}return a})(t);return s(o)},lb=process.platform==="linux"||process.platform==="darwin",Qs=process.platform==="win32",ub={stdio:"pipe",shell:!0,detached:!Qs,env:process.env},cb={log:!0,commandTranslations:{},shellTranslations:{},...ub},ye=({log:t=!0,commandTranslations:e={},shellTranslations:r={},...n}=cb)=>{let i=null;return{childProcess:i,async run(s){if(i)throw new Error("Only one command per shell.");if(typeof s=="object"){let l=process.platform;s.posix&&lb&&(l="posix");let c=s[l];if(!c)throw new Error("No command found for platform: "+JSON.stringify({platform:process.platform,command:s}));s=c}let{cmd:o,args:a}=ab(s,r,e);return t&&console.log(ib.dim(`
39
+ $ ${o} ${a.join(" ")}
40
+ `)),await new Promise((l,c)=>{i=Hy(o,a,n);let u="",f="";if(!i)throw new Error("Child process was not set.");let h=E=>{i=null;let m={code:E,stdout:u,stderr:f};E===0||E===1&&!Qs?l(m):c(m)};i.stdout?.on("data",E=>{u+=E.toString()}),i.stderr?.on("data",E=>{f+=E.toString()}),i.on("close",h),i.on("exit",h),i.on("error",h),i.stdout?.pipe(process.stdout),i.stderr?.pipe(process.stderr)})},kill(s="SIGKILL"){if(i?.pid)if(Qs)qy(`taskkill /t /f /pid ${i.pid}`);else return process.kill(-i.pid,s);return!0}}};import{extname as SS,resolve as Zs}from"path";var Ht=/\.[mc]?tsx?(?=\?|$)/;var gt=/\.([mc])?[tj]sx$/,Zf=/\.([mc])?[tj]sx?$/,$t={format:"esm",charset:"utf8",sourcemap:"inline",target:"node16",minify:!1},fb={".mts":{...$t,loader:"ts"},".jsx":{...$t,loader:"jsx"},".tsx":{...$t,loader:"tsx"},".cts":{...$t,loader:"ts"},".ts":{...$t,loader:"ts"},".json":{...$t,loader:"json"}},vS=Object.keys(fb);var zs=()=>{let t=process.cwd(),e=Zs(t,"src"),r=Zs(t,"dist");return{cwd:t,srcDir:e,outDir:r}},On=t=>{t=Zs(t);let{srcDir:e,outDir:r}=zs();return t.replace(e,r).replace(Ht,".js").replace(gt,".js")};var hb={moduleResolution:"node",module:"esnext",target:"esnext",esModuleInterop:!0,incremental:!1,rootDir:"src",outDir:"dist",declaration:!0,noEmit:!1,emitDeclarationOnly:!0},eo=async()=>{let t=Se(eo),e=ye({log:!1}),r=Object.entries(hb).map(([i,s])=>`--${i} ${s}`).join(" "),n=`tsc -p tsconfig.json ${r}`;t.log(`Calling: ${n}`),await e.run(`tsc -p tsconfig.json ${r}`)};import{readFile as pb}from"fs/promises";import{resolve as db}from"path";var zf=async()=>{let t=process.cwd(),e=db(t,"package.json");return await pb(e,"utf-8")};var nh=Be(ss(),1);import{existsSync as xb}from"fs";import{writeFile as Sb}from"fs/promises";import{isAbsolute as wb,resolve as Ab}from"path";import{existsSync as eh}from"fs";import{readFile as gb}from"fs/promises";import{dirname as _b,normalize as mb,posix as Tn,resolve as yb}from"path";var bb=[".js",".mjs",".jsx",".json",".ts",".mts",".tsx"],vb=async(t,e)=>{let r=_b(mb(e)),n=Pn(yb(r,t)),i=n.replace(Tn.extname(n),"");for(let s of bb){let o=`${i}${s}`,a=`${i}/index${s}`;if(eh(o))return o;if(eh(a))return a}},Pn=t=>t.replace(/\\/g,"/"),Eb=(t,e)=>{t=Pn(t),e=Pn(e);let r=Tn.relative(Tn.dirname(t),e);return r.startsWith(".")?r:`./${r}`},to=async t=>{let e=Se(to);e.log("Getting rewritten specifiers:",{modulePath:t}),t=Pn(t);let r=new RegExp(th,"g"),n=await gb(t,"utf8"),i=n.match(r);if(e.log("Found import statements:",{importStatements:i}),i)for(let s of i){let o=new RegExp(rh),a=s.match(o);if(!a)throw e.log("No specifier match",{importStatement:s,specifierPattern:o}),new Error(`Could not identify specifier in import statement: ${s}`);let l=a[0];if(e.log("Found specifier:",{specifier:l}),!l.startsWith(".")||Tn.extname(l))continue;let c=await vb(l,t);if(!c)throw new Error(`Could not resolve specifier "${l}" from "${t}"`);e.log("Resolved specifier:",{resolvedSpecifier:c});let u=Eb(t,c);e.log("Specifier replacement:",{specifierReplacement:u});let f=s.replace(l,u);e.log("Import statement replacement:",{importStatementReplacement:f}),n=n.replace(s,f)}return n};var th=`(^|(?<=[
41
+ \r;] *))(import|export) *({?)[^
42
+ \r;]+(((from)[
43
+ \r; *]+)|(["'][
44
+ \r;]))`,rh=`(?<=["'])([^
45
+ \r]+)(?=['"])`,hr=async(t="dist/**/*.js")=>{let e=Se(hr),n=wb(t)&&xb(t)?[t]:nh.default.sync(t);e.log("Normalizing import/require specifiers:",{files:t,filesToNormalize:n});for(let i of n){let s=Ab(i),o=await to(s);e.log("Normalizing",{file:i,normalized:o}),await Sb(s,o,{flag:"w",encoding:"utf-8"})}e.log("Normalized",{filesToNormalize:n})};import{readFileSync as Rb}from"fs";function Cb(t){return new Promise((e,r)=>{let n=[];function i(l){n.push(l)}function s(){a(),e(Buffer.concat(n))}function o(l){a(),r(l)}function a(){t.removeListener("data",i),t.removeListener("end",s),t.removeListener("error",o)}t.on("data",i),t.on("end",s),t.on("error",o)})}var ro=async()=>{let t=Se(ro);t.log("Reading stdin");try{let r=Rb(0).toString();if(r)return t.log("Found stdin",{stdin:r}),r}catch(r){t.log("Could not read stdin",{e:r})}return we(C.gray("Type your source code. Press Ctrl+D to finish.")),(await Cb(process.stdin)).toString()};var Nb=`import React from "react";
46
+ import ReactDOM from "react-dom";
47
+ `,oh=t=>{let e=` ${t} `;we(C.bgBlue(C.bold(C.white(e))))},Bb=async()=>{let t;if(uh("dist/package.json")?t=JSON.parse(await so("dist/package.json","utf-8")):t={},t?.module==="module")return!0;t.type="module",await ch("dist/package.json",JSON.stringify(t,null,2))},ah=(t,e,r)=>{e=Dn(e);let n=On(e);return{stdin:{contents:t,sourcefile:e,resolveDir:fh(e),loader:r},outdir:void 0,outfile:n}},lh=async(t,e,r,n)=>{t=Dn(t),e=Dn(e);let i="npx tailwindcss",s=r?"":"-m",o="--postcss postcss.config.js",a=await so(t,"utf-8"),c=n?a:`@import "@tsmodule/react";
48
+
49
+ ${a}`,u=On(t);await ch(u,c);let f=[i,s,o,`-i ${u}`,"-o",e];await ye({log:!1,stdio:"ignore"}).run(f.join(" "))},Ib=`
50
+ await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
51
+ `,qt=async({input:t="src/**/*",styles:e="src/components/index.css",target:r="esnext",dev:n=!1,bundle:i=!1,runtimeOnly:s=n,noWrite:o=!1,noStandardStyles:a=!1,stdin:l=void 0,stdinFile:c=void 0})=>{sh.NODE_ENV=n?"development":"production";let u=Se(qt);n&&(s=!0);let{cwd:f,srcDir:h,outDir:E}=zs(),m=await zf(),y=JSON.parse(m),S={treeShaking:i,target:r,minify:!n,jsx:"transform",jsxFactory:"React.createElement",format:"esm",charset:"utf8",logLevel:n?"warning":"error",define:{"process.env.NODE_ENV":n?JSON.stringify("development"):JSON.stringify("production")}},x={...S,bundle:i,absWorkingDir:f,outbase:"src",outdir:"dist",assetNames:"[name].js",format:"esm",target:"esnext",platform:y?.platform??"node",write:!o,external:i?["esbuild"]:void 0,banner:i?{js:Ib}:void 0},M="";if(l){u.log("Building file from stdin",{stdin:l,stdinFile:c,noWrite:o}),c||(we(C.red("ERROR: --stdin-file must be specified to emulate a file location when using stdin.")),process.exit(1)),typeof l=="string"&&l.length?M=l:M=await ro();let w={...S,sourcefile:c,loader:"tsx",banner:void 0,footer:void 0};if(o)return(await kb(M,w)).code;{let p=ah(M,c,"tsx");await no({...x,...p}),we(C.green("Successfully built stdin file to dist/.")),we(C.grey("Use --no-write to print to stdout instead."));return}}u.log("Building",{files:t,dev:n,runtimeOnly:s}),oh(`${C.bold("TS Module")} [${sh.NODE_ENV}]`);let N=io.default.sync(t,{cwd:f}).filter(w=>Db(w)!==".d.ts").map(w=>Dn(w));if(Lb(t)){N.length||N.push(t);let w=t.replace(h,E).replace(Ht,".js").replace(gt,".js");u.log("Cleaning emitted file:",{outfile:w}),await ih(w,{force:!0})}else u.log("Cleaning old output:",{outDir:E}),await ih(E,{force:!0,recursive:!0});let z=N.filter(w=>gt.test(w));u.log("Compiling TSX files:",{tsxJsxInput:z});let T=z.filter(w=>!w.endsWith(".d.ts"));await Promise.all(T.map(async w=>{let p=await so(w,"utf-8"),H=Nb+p,$=ah(H,w,"tsx");await no({...x,...$})})),fe("Built TSX files.").succeed();let q=N.filter(w=>Ht.test(w)).filter(w=>!gt.test(w));u.log("Compiling TS files:",{tsJsInput:q}),await no({...x,entryPoints:q.filter(w=>!w.endsWith(".d.ts"))}),fe("Built TS files.").succeed();let P=N.filter(w=>!Zf.test(w));u.log("Copying non-JS/TS files.",{allFiles:N,nonTsJsInput:P});for(let w of P){let p=On(w);u.log("Copying non-source file:",{file:w,emittedFile:p}),await Pb(fh(p),{recursive:!0}),await Tb(w,p,Ob.COPYFILE_FICLONE)}if(!process.env.NO_REWRITES){let w=t.replace(h,E).replace(/^(\.\/)?src\//,"dist/").replace(Ht,".js").replace(gt,".js");u.log("Normalizing import specifiers in emitted JS.",{emittedJs:w}),await hr(w.endsWith(".js")?w:`${w}.js`),fe("Normalized import specifiers.").succeed()}if(await Bb()&&fe('Forced "type": "module" in output.').succeed(),s)return;if(uh(Mb(e))){u.log("Building styles for production.");let{style:w="./dist/bundle.css"}=y;if(u.log("Building style bundle.",{bundleInput:e,bundleOutput:w,dev:n,noStandardStyles:a}),await lh(e,w,n,a),i){u.log("Bundling all styles.");let p=io.default.sync("dist/**/*.css"),H=fe("Bundled emitted styles.").start();await Promise.all(p.map(async $=>await lh($,$,n,a))),H.succeed()}fe(`Bundled all styles to ${C.bold(w)}.`).succeed()}else we(C.grey("Bundle styles not found for this projected. Checked:"),{styles:e});oh("Running post-build setup.");let F=fe("Generating type declarations.").start();await eo(),F.succeed(`Generated delcarations for ${N.length} files.`),we(C.green("Build complete."))};import{readFile as Fb}from"fs/promises";import{dirname as $b,resolve as hh}from"path";import{fileURLToPath as Hb}from"url";var ph={default:[],react:["@tsmodule/react","react","react-dom"]},oo={default:["@types/node"],react:["next","@types/node","@types/react","@types/react-dom","eslint","eslint-config-next","tailwindcss","autoprefixer","cssnano","postcss","postcss-import"]},pr=hh($b(Hb(import.meta.url)),".."),dh=async()=>{let t=await Fb(hh(pr,"package.json"),"utf-8");return JSON.parse(t)};import{mkdir as qb}from"fs/promises";import{resolve as gh}from"path";var ao=async(t,e)=>{let r=ye(),n=gh(pr,`./templates/${t}`,"*"),i=gh(e);await qb(i,{recursive:!0}),await r.run(`cp -rf ${n} ${i}`)};import _h from"fs/promises";import{resolve as jb}from"path";var mh=async t=>{let e=jb(process.cwd(),t,"package.json"),r=await _h.readFile(e,"utf-8"),n=JSON.parse(r);n.name=t,await _h.writeFile(e,JSON.stringify(n,null,2))};globalThis.SHELL_OPTIONS={stdio:["ignore","ignore","inherit"]};var yh=async(t,{react:e=!1})=>{let r=ye(),n=fe(`Creating new module ${C.blueBright(t)}.`).start();await ao("default",t),e&&await ao("react",t),await mh(t),n.succeed("Project created."),process.chdir(t);let i=[],s=["@tsmodule/tsmodule"];e?(i.push(...ph.react),s.push(...oo.react)):s.push(...oo.default),i.length&&await r.run(`yarn add ${i.join(" ")}`),s.length&&await r.run(`yarn add -D ${s.join(" ")}`),n.succeed("Dependencies installed."),await r.run("git init"),n.succeed("Git initialized.")};import{relative as nv,resolve as iv}from"path";import{existsSync as sv}from"fs";import{lstat as ov}from"fs/promises";var $h=Be(Bh(),1);var Ih=()=>{console.clear()},Fh=t=>{we(`
52
+ `,C.gray(`Built ${C.bold(t)}.`),`
53
+ `,C.blue(new Date().toLocaleString()))},Hh=async()=>{let t=process.cwd(),e=ye();process.platform!=="win32"&&await e.run("clear"),Ih(),await qt({dev:!0}),Fh("src/**/*"),(0,$h.default)(iv(t,"src"),{recursive:!0}).on("change",async(r,n)=>{if(!sv(n)||(await ov(n)).isDirectory())return;Ih();let a=Date.now();await qt({dev:!0,input:n});let l=Date.now()-a;fe(C.blueBright(`Dev refresh finished in ${C.bold(`${l}ms`)}.`)).succeed(),Fh(nv(t,n))})};import{pathToFileURL as av}from"url";import{resolve as lv}from"path";var qh=async()=>{let t=lv(pr,"dist/loader/index.js"),e=["--no-warnings","--loader",av(t).href,...process.argv.slice(2)];await ye().run(`node ${e.join(" ")}`)};var{version:uv}=await dh(),_t=new Ko;_t.name(C.white(C.bold("tsmodule"))).usage(C.white(C.bold("<file | command> [options]"))).description(C.blueBright(`A tool for building TypeScript modules.
54
+
55
+ Run TS directly: ${C.bold("tsmodule src/index.ts")}
56
+ Use a command: ${C.bold("tsmodule build")}`)).version(String(uv));_t.command("dev").description("Build and watch for changes.").action(Hh);_t.command("build").description("Builds TS files to output in dist/.").option("-i, --input <files>","Entrypoints to compile.","src/**/*").option("--styles <styles>","Specify stylesheet entrypoint.","src/components/index.css").option("-t, --target <target>","ECMAScript featureset to target.","esnext").option("-b, --bundle","Bundle dependencies into entrypoints.",!1).option("-d, --dev","Build development runtime.",!1).option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.",!1).option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
57
+ For programmatic use alongside { stdin: ... }.`,!1).option("--no-standard-styles","Do not add standard styles to bundled CSS.",!1).action(async t=>{await qt(t)});_t.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(yh);_t.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
58
+ (default: dist/**/*.js)`).action(async({files:t})=>{await hr(t)});_t.command("run",{isDefault:!0}).argument("<file>","The file to run.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(qh);_t.parse(process.argv);
59
+ /*!
60
+ * fill-range <https://github.com/jonschlinkert/fill-range>
61
+ *
62
+ * Copyright (c) 2014-present, Jon Schlinkert.
63
+ * Licensed under the MIT License.
64
+ */
65
+ /*!
66
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
67
+ *
68
+ * Copyright (c) 2014-2016, Jon Schlinkert.
69
+ * Licensed under the MIT License.
70
+ */
71
+ /*!
72
+ * is-glob <https://github.com/jonschlinkert/is-glob>
73
+ *
74
+ * Copyright (c) 2014-2017, Jon Schlinkert.
75
+ * Released under the MIT License.
76
+ */
77
+ /*!
78
+ * is-number <https://github.com/jonschlinkert/is-number>
79
+ *
80
+ * Copyright (c) 2014-present, Jon Schlinkert.
81
+ * Released under the MIT License.
82
+ */
83
+ /*!
84
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
85
+ *
86
+ * Copyright (c) 2015-present, Jon Schlinkert.
87
+ * Released under the MIT License.
88
+ */
89
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
90
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
91
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */