clerc 0.32.1 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -19,6 +19,65 @@ declare global {
19
19
  }
20
20
  }
21
21
 
22
+ /**
23
+ Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
24
+
25
+ @example
26
+ ```
27
+ import type {Simplify} from 'type-fest';
28
+
29
+ type PositionProps = {
30
+ top: number;
31
+ left: number;
32
+ };
33
+
34
+ type SizeProps = {
35
+ width: number;
36
+ height: number;
37
+ };
38
+
39
+ // In your editor, hovering over `Props` will show a flattened object with all the properties.
40
+ type Props = Simplify<PositionProps & SizeProps>;
41
+ ```
42
+
43
+ Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.
44
+
45
+ If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.
46
+
47
+ @example
48
+ ```
49
+ import type {Simplify} from 'type-fest';
50
+
51
+ interface SomeInterface {
52
+ foo: number;
53
+ bar?: string;
54
+ baz: number | undefined;
55
+ }
56
+
57
+ type SomeType = {
58
+ foo: number;
59
+ bar?: string;
60
+ baz: number | undefined;
61
+ };
62
+
63
+ const literal = {foo: 123, bar: 'hello', baz: 456};
64
+ const someType: SomeType = literal;
65
+ const someInterface: SomeInterface = literal;
66
+
67
+ function fn(object: Record<string, unknown>): void {}
68
+
69
+ fn(literal); // Good: literal object type is sealed
70
+ fn(someType); // Good: type is sealed
71
+ fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
72
+ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
73
+ ```
74
+
75
+ @link https://github.com/microsoft/TypeScript/issues/15300
76
+
77
+ @category Object
78
+ */
79
+ type Simplify<T> = {[KeyType in keyof T]: T[KeyType]} & {};
80
+
22
81
  /**
23
82
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
24
83
 
@@ -246,13 +305,13 @@ type TransformParameters<C extends Command> = {
246
305
  type MakeEventMap<T extends Commands> = {
247
306
  [K in keyof T]: [InspectorContext];
248
307
  };
249
- type FallbackFlags<C extends Command> = Equals<NonNullableFlag<C>["flags"], {}> extends true ? Dict<any> : NonNullableFlag<C>["flags"];
250
- type NonNullableFlag<C extends Command> = TypeFlag<NonNullable<C["flags"]>>;
251
- type ParseFlag<C extends Commands, N extends keyof C> = N extends keyof C ? OmitIndexSignature<NonNullableFlag<C[N]>["flags"]> : FallbackFlags<C[N]>["flags"];
252
- type ParseRaw<C extends Command> = NonNullableFlag<C> & {
253
- flags: FallbackFlags<C>;
308
+ type FallbackFlags<F extends Flags | undefined> = Equals<NonNullableFlag<F>["flags"], {}> extends true ? Dict<any> : NonNullableFlag<F>["flags"];
309
+ type NonNullableFlag<F extends Flags | undefined> = TypeFlag<NonNullable<F>>;
310
+ type ParseFlag<C extends Commands, N extends keyof C, GF extends FlagsWithoutDescription = {}> = N extends keyof C ? OmitIndexSignature<NonNullableFlag<C[N]["flags"] & GF>["flags"]> : FallbackFlags<C[N]["flags"] & GF>["flags"];
311
+ type ParseRaw<C extends Command, GF extends FlagsWithoutDescription = {}> = NonNullableFlag<C["flags"] & GF> & {
312
+ flags: FallbackFlags<C["flags"] & GF>;
254
313
  parameters: string[];
255
- mergedFlags: FallbackFlags<C> & NonNullableFlag<C>["unknownFlags"];
314
+ mergedFlags: FallbackFlags<C["flags"] & GF> & NonNullableFlag<C["flags"] & GF>["unknownFlags"];
256
315
  };
257
316
  type ParseParameters<C extends Commands = Commands, N extends keyof C = keyof C> = Equals<TransformParameters<C[N]>, {}> extends true ? N extends keyof C ? TransformParameters<C[N]> : Dict<string | string[] | undefined> : TransformParameters<C[N]>;
258
317
 
@@ -269,12 +328,14 @@ interface I18N {
269
328
 
270
329
  type CommandType = RootType | string;
271
330
  type FlagOptions = FlagSchema & {
272
- description?: string;
331
+ description: string;
273
332
  };
274
333
  type Flag = FlagOptions & {
275
334
  name: string;
276
335
  };
336
+ type FlagWithoutDescription = Omit<Flag, "description">;
277
337
  type Flags = Dict<FlagOptions>;
338
+ type FlagsWithoutDescription = Dict<FlagWithoutDescription>;
278
339
  declare interface CommandCustomProperties {
279
340
  }
280
341
  interface CommandOptions<P extends string[] = string[], A extends MaybeArray$1<string | RootType> = MaybeArray$1<string | RootType>, F extends Flags = Flags> extends CommandCustomProperties {
@@ -301,25 +362,19 @@ interface ParseOptions {
301
362
  argv?: string[];
302
363
  run?: boolean;
303
364
  }
304
- interface HandlerContext<C extends Commands = Commands, N extends keyof C = keyof C> {
365
+ interface HandlerContext<C extends Commands = Commands, N extends keyof C = keyof C, GF extends FlagsWithoutDescription = {}> {
305
366
  name?: LiteralUnion<N, string>;
306
367
  called?: string | RootType;
307
368
  resolved: boolean;
308
369
  hasRootOrAlias: boolean;
309
370
  hasRoot: boolean;
310
- raw: {
311
- [K in keyof ParseRaw<C[N]>]: ParseRaw<C[N]>[K];
312
- };
313
- parameters: {
314
- [K in keyof ParseParameters<C, N>]: ParseParameters<C, N>[K];
315
- };
371
+ raw: Simplify<ParseRaw<C[N], GF>>;
372
+ parameters: Simplify<ParseParameters<C, N>>;
316
373
  unknownFlags: ParsedFlags["unknownFlags"];
317
- flags: {
318
- [K in keyof ParseFlag<C, N>]: ParseFlag<C, N>[K];
319
- };
320
- cli: Clerc<C>;
374
+ flags: Simplify<ParseFlag<C, N, GF> & Record<string, any>>;
375
+ cli: Clerc<C, GF>;
321
376
  }
322
- type Handler<C extends Commands = Commands, K extends keyof C = keyof C> = (ctx: HandlerContext<C, K>) => void;
377
+ type Handler<C extends Commands = Commands, K extends keyof C = keyof C, GF extends FlagsWithoutDescription = {}> = (ctx: HandlerContext<C, K, GF>) => void;
323
378
  type HandlerInCommand<C extends HandlerContext> = (ctx: {
324
379
  [K in keyof C]: C[K];
325
380
  }) => void;
@@ -336,7 +391,7 @@ interface InspectorObject<C extends Commands = Commands> {
336
391
 
337
392
  declare const Root: unique symbol;
338
393
  type RootType = typeof Root;
339
- declare class Clerc<C extends Commands = {}> {
394
+ declare class Clerc<C extends Commands = {}, GF extends FlagsWithoutDescription = {}> {
340
395
  #private;
341
396
  i18n: I18N;
342
397
  private constructor();
@@ -345,6 +400,7 @@ declare class Clerc<C extends Commands = {}> {
345
400
  get _version(): string;
346
401
  get _inspectors(): Inspector<Commands>[];
347
402
  get _commands(): C;
403
+ get _flags(): GF;
348
404
  /**
349
405
  * Create a new cli
350
406
  * @returns
@@ -353,7 +409,7 @@ declare class Clerc<C extends Commands = {}> {
353
409
  * const cli = Clerc.create()
354
410
  * ```
355
411
  */
356
- static create(name?: string, description?: string, version?: string): Clerc<{}>;
412
+ static create(name?: string, description?: string, version?: string): Clerc<{}, {}>;
357
413
  /**
358
414
  * Set the name of the cli
359
415
  * @param name
@@ -456,8 +512,23 @@ declare class Clerc<C extends Commands = {}> {
456
512
  * })
457
513
  * ```
458
514
  */
459
- command<N extends string | RootType, O extends CommandOptions<[...P], A, F>, P extends string[] = string[], A extends MaybeArray$1<string | RootType> = MaybeArray$1<string | RootType>, F extends Flags = Flags>(c: CommandWithHandler<N, O & CommandOptions<[...P], A, F>>): this & Clerc<C & Record<N, Command<N, O>>>;
460
- command<N extends string | RootType, O extends CommandOptions<[...P], A, F>, P extends string[] = string[], A extends MaybeArray$1<string | RootType> = MaybeArray$1<string | RootType>, F extends Flags = Flags>(name: N, description: string, options?: O & CommandOptions<[...P], A, F>): this & Clerc<C & Record<N, Command<N, O>>>;
515
+ command<N extends string | RootType, O extends CommandOptions<[...P], A, F>, P extends string[] = string[], A extends MaybeArray$1<string | RootType> = MaybeArray$1<string | RootType>, F extends Flags = Flags>(c: CommandWithHandler<N, O & CommandOptions<[...P], A, F>>): this & Clerc<C & Record<N, Command<N, O>>, GF>;
516
+ command<N extends string | RootType, O extends CommandOptions<[...P], A, F>, P extends string[] = string[], A extends MaybeArray$1<string | RootType> = MaybeArray$1<string | RootType>, F extends Flags = Flags>(name: N, description: string, options?: O & CommandOptions<[...P], A, F>): this & Clerc<C & Record<N, Command<N, O>>, GF>;
517
+ /**
518
+ * Register a global flag
519
+ * @param name
520
+ * @param options
521
+ * @returns
522
+ * @example
523
+ * ```ts
524
+ * Clerc.create()
525
+ * .flag("help", {
526
+ * alias: "h",
527
+ * description: "help",
528
+ * })
529
+ * ```
530
+ */
531
+ flag<N extends string, O extends FlagWithoutDescription>(name: N, description: string, options: O): this & Clerc<C, GF & Record<N, O>>;
461
532
  /**
462
533
  * Register a handler
463
534
  * @param name
@@ -472,7 +543,7 @@ declare class Clerc<C extends Commands = {}> {
472
543
  * })
473
544
  * ```
474
545
  */
475
- on<K extends LiteralUnion<keyof CM, string | RootType>, CM extends this["_commands"] = this["_commands"]>(name: K, handler: Handler<CM, K>): this;
546
+ on<K extends LiteralUnion<keyof CM, string | RootType>, CM extends this["_commands"] = this["_commands"]>(name: K, handler: Handler<CM, K, this["_flags"]>): this;
476
547
  /**
477
548
  * Use a plugin
478
549
  * @param plugin
@@ -524,10 +595,10 @@ declare class Clerc<C extends Commands = {}> {
524
595
 
525
596
  type MaybeArray<T> = T | T[];
526
597
 
527
- declare const definePlugin: <T extends Clerc<{}>, U extends Clerc<{}>>(p: Plugin<T, U>) => Plugin<T, U>;
528
- declare const defineHandler: <C extends Clerc<{}>, K extends keyof C["_commands"]>(_cli: C, _key: K, handler: Handler<C["_commands"], K>) => Handler<C["_commands"], K>;
529
- declare const defineInspector: <C extends Clerc<{}>>(_cli: C, inspector: Inspector<C["_commands"]>) => Inspector<C["_commands"]>;
530
- declare const defineCommand: <N extends string | typeof Root, O extends CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>, P extends string[]>(command: Command<N, O & CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>>, handler?: HandlerInCommand<HandlerContext<Record<N, Command<N, O>> & Record<never, never>, N>> | undefined) => CommandWithHandler<N, O & CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>>;
598
+ declare const definePlugin: <T extends Clerc<{}, {}>, U extends Clerc<{}, {}>>(p: Plugin<T, U>) => Plugin<T, U>;
599
+ declare const defineHandler: <C extends Clerc<{}, {}>, K extends keyof C["_commands"]>(_cli: C, _key: K, handler: Handler<C["_commands"], K, {}>) => Handler<C["_commands"], K, {}>;
600
+ declare const defineInspector: <C extends Clerc<{}, {}>>(_cli: C, inspector: Inspector<C["_commands"]>) => Inspector<C["_commands"]>;
601
+ declare const defineCommand: <N extends string | typeof Root, O extends CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>, P extends string[]>(command: Command<N, O & CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>>, handler?: HandlerInCommand<HandlerContext<Record<N, Command<N, O>> & Record<never, never>, N, {}>> | undefined) => CommandWithHandler<N, O & CommandOptions<[...P], MaybeArray<string | typeof Root>, Flags>>;
531
602
 
532
603
  declare class CommandExistsError extends Error {
533
604
  commandName: string;
@@ -563,22 +634,22 @@ declare class LocaleNotCalledFirstError extends Error {
563
634
  }
564
635
 
565
636
  declare function resolveFlattenCommands(commands: Commands, t: TranslateFn): Map<string[] | typeof Root, CommandAlias<string, CommandOptions<string[], MaybeArray$1<string | typeof Root>, Flags>>>;
566
- declare function resolveCommand(commands: Commands, name: CommandType | string[], t: TranslateFn): [Command<string | RootType> | undefined, string[] | RootType | undefined];
637
+ declare function resolveCommand(commands: Commands, argv: string[], t: TranslateFn): [Command<string | RootType> | undefined, string[] | RootType | undefined];
567
638
  declare function resolveCommandStrict(commands: Commands, name: CommandType | string[], t: TranslateFn): [Command<string | RootType> | undefined, string[] | RootType | undefined];
568
639
  declare function resolveSubcommandsByParent(commands: Commands, parent: string | string[], depth?: number): Command<string, CommandOptions<string[], MaybeArray$1<string | typeof Root>, Flags>>[];
569
640
  declare const resolveRootCommands: (commands: Commands) => Command<string, CommandOptions<string[], MaybeArray$1<string | typeof Root>, Flags>>[];
570
- declare function resolveParametersBeforeFlag(argv: string[]): string[];
571
641
  declare const resolveArgv: () => string[];
572
- declare function compose(inspectors: Inspector[]): (getCtx: () => InspectorContext) => void;
642
+ declare function compose(inspectors: Inspector[]): (ctx: InspectorContext) => void;
573
643
  declare const isValidName: (name: CommandType) => boolean;
574
644
  declare const withBrackets: (s: string, isOptional?: boolean) => string;
575
645
  declare const formatCommandName: (name: string | string[] | RootType) => string;
576
- declare const detectLocale: () => string;
646
+ declare const detectLocale: () => string;
647
+ declare const stripFlags: (argv: string[]) => string[];
577
648
 
578
649
  interface CompletionsPluginOptions {
579
650
  command?: boolean;
580
651
  }
581
- declare const completionsPlugin: (options?: CompletionsPluginOptions) => Plugin<Clerc<{}>, Clerc<{}>>;
652
+ declare const completionsPlugin: (options?: CompletionsPluginOptions) => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
582
653
 
583
654
  interface BlockSection {
584
655
  type?: "block";
@@ -607,10 +678,15 @@ declare module "@clerc/core" {
607
678
  }
608
679
  interface HelpPluginOptions {
609
680
  /**
610
- * Whether to registr the help command.
681
+ * Whether to register the help command.
611
682
  * @default true
612
683
  */
613
684
  command?: boolean;
685
+ /**
686
+ * Whether to register the global help flag.
687
+ * @default true
688
+ */
689
+ flag?: boolean;
614
690
  /**
615
691
  * Whether to show help when no command is specified.
616
692
  * @default true
@@ -625,22 +701,30 @@ interface HelpPluginOptions {
625
701
  */
626
702
  examples?: [string, string][];
627
703
  /**
628
- * Banner
704
+ * Banner.
629
705
  */
630
706
  banner?: string;
631
707
  }
632
- declare const helpPlugin: ({ command, showHelpWhenNoCommand, notes, examples, banner, }?: HelpPluginOptions) => Plugin<Clerc<{}>, Clerc<{}>>;
708
+ declare const helpPlugin: ({ command, flag, showHelpWhenNoCommand, notes, examples, banner, }?: HelpPluginOptions) => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
633
709
 
634
- declare const notFoundPlugin: () => Plugin<Clerc<{}>, Clerc<{}>>;
710
+ declare const notFoundPlugin: () => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
635
711
 
636
- declare const strictFlagsPlugin: () => Plugin<Clerc<{}>, Clerc<{}>>;
712
+ declare const strictFlagsPlugin: () => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
637
713
 
638
714
  interface VersionPluginOptions {
639
- alias?: string[];
715
+ /**
716
+ * Whether to register the help command.
717
+ * @default true
718
+ */
640
719
  command?: boolean;
720
+ /**
721
+ * Whether to register the global help flag.
722
+ * @default true
723
+ */
724
+ flag?: boolean;
641
725
  }
642
- declare const versionPlugin: ({ alias, command, }?: VersionPluginOptions) => Plugin<Clerc<{}>, Clerc<{}>>;
726
+ declare const versionPlugin: ({ command, flag, }?: VersionPluginOptions) => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
643
727
 
644
- declare const friendlyErrorPlugin: () => Plugin<Clerc<{}>, Clerc<{}>>;
728
+ declare const friendlyErrorPlugin: () => Plugin<Clerc<{}, {}>, Clerc<{}, {}>>;
645
729
 
646
- export { Clerc, Command, CommandAlias, CommandCustomProperties, CommandExistsError, CommandNameConflictError, CommandOptions, CommandType, CommandWithHandler, Commands, CompletionsPluginOptions, DescriptionNotSetError, FallbackType, Flag, FlagOptions, Flags, Handler, HandlerContext, HandlerInCommand, HelpPluginOptions, I18N, Inspector, InspectorContext, InspectorFn, InspectorObject, InvalidCommandNameError, LocaleNotCalledFirstError, Locales, MakeEventMap, NameNotSetError, NoCommandGivenError, NoSuchCommandError, ParseOptions, Plugin, Root, RootType, TranslateFn, VersionNotSetError, completionsPlugin, compose, defineCommand, defineHandler, defineInspector, definePlugin, detectLocale, formatCommandName, friendlyErrorPlugin, helpPlugin, isValidName, notFoundPlugin, resolveArgv, resolveCommand, resolveCommandStrict, resolveFlattenCommands, resolveParametersBeforeFlag, resolveRootCommands, resolveSubcommandsByParent, strictFlagsPlugin, versionPlugin, withBrackets };
730
+ export { Clerc, Command, CommandAlias, CommandCustomProperties, CommandExistsError, CommandNameConflictError, CommandOptions, CommandType, CommandWithHandler, Commands, CompletionsPluginOptions, DescriptionNotSetError, FallbackType, Flag, FlagOptions, FlagWithoutDescription, Flags, FlagsWithoutDescription, Handler, HandlerContext, HandlerInCommand, HelpPluginOptions, I18N, Inspector, InspectorContext, InspectorFn, InspectorObject, InvalidCommandNameError, LocaleNotCalledFirstError, Locales, MakeEventMap, NameNotSetError, NoCommandGivenError, NoSuchCommandError, ParseOptions, Plugin, Root, RootType, TranslateFn, VersionNotSetError, completionsPlugin, compose, defineCommand, defineHandler, defineInspector, definePlugin, detectLocale, formatCommandName, friendlyErrorPlugin, helpPlugin, isValidName, notFoundPlugin, resolveArgv, resolveCommand, resolveCommandStrict, resolveFlattenCommands, resolveRootCommands, resolveSubcommandsByParent, strictFlagsPlugin, stripFlags, versionPlugin, withBrackets };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import{format as Wu}from"node:util";import Bu from"tty";class WD{constructor(){this.listenerMap={},this.wildcardListeners=new Set}on(e,t){return e==="*"?(this.wildcardListeners.add(t),this):(this.listenerMap[e]||(this.listenerMap[e]=new Set),this.listenerMap[e].add(t),this)}emit(e,...t){return this.listenerMap[e]&&(this.wildcardListeners.forEach(n=>n(e,...t)),this.listenerMap[e].forEach(n=>n(...t))),this}off(e,t){var n,s;return e==="**"?(this.listenerMap={},this.wildcardListeners.clear(),this):e==="*"?(t?this.wildcardListeners.delete(t):this.wildcardListeners.clear(),this):(t?(n=this.listenerMap[e])==null||n.delete(t):(s=this.listenerMap[e])==null||s.clear(),this)}}const PD="known-flag",HD="unknown-flag",UD="argument",{stringify:G}=JSON,YD=/\B([A-Z])/g,qD=D=>D.replace(YD,"-$1").toLowerCase(),{hasOwnProperty:zD}=Object.prototype,V=(D,e)=>zD.call(D,e),GD=D=>Array.isArray(D),Pu=D=>typeof D=="function"?[D,!1]:GD(D)?[D[0],!0]:Pu(D.type),VD=(D,e)=>D===Boolean?e!=="false":e,ZD=(D,e)=>typeof e=="boolean"?e:D===Number&&e===""?Number.NaN:D(e),JD=/[\s.:=]/,KD=D=>{const e=`Flag name ${G(D)}`;if(D.length===0)throw new Error(`${e} cannot be empty`);if(D.length===1)throw new Error(`${e} must be longer than a character`);const t=D.match(JD);if(t)throw new Error(`${e} cannot contain ${G(t==null?void 0:t[0])}`)},QD=D=>{const e={},t=(n,s)=>{if(V(e,n))throw new Error(`Duplicate flags named ${G(n)}`);e[n]=s};for(const n in D){if(!V(D,n))continue;KD(n);const s=D[n],r=[[],...Pu(s),s];t(n,r);const u=qD(n);if(n!==u&&t(u,r),"alias"in s&&typeof s.alias=="string"){const{alias:a}=s,o=`Flag alias ${G(a)} for flag ${G(n)}`;if(a.length===0)throw new Error(`${o} cannot be empty`);if(a.length>1)throw new Error(`${o} must be a single character`);t(a,r)}}return e},XD=(D,e)=>{const t={};for(const n in D){if(!V(D,n))continue;const[s,,r,u]=e[n];if(s.length===0&&"default"in u){let{default:a}=u;typeof a=="function"&&(a=a()),t[n]=a}else t[n]=r?s:s.pop()}return t},ru="--",ue=/[.:=]/,De=/^-{1,2}\w/,ee=D=>{if(!De.test(D))return;const e=!D.startsWith(ru);let t=D.slice(e?1:2),n;const s=t.match(ue);if(s){const{index:r}=s;n=t.slice(r+1),t=t.slice(0,r)}return[t,n,e]},te=(D,{onFlag:e,onArgument:t})=>{let n;const s=(r,u)=>{if(typeof n!="function")return!0;n(r,u),n=void 0};for(let r=0;r<D.length;r+=1){const u=D[r];if(u===ru){s();const o=D.slice(r+1);t==null||t(o,[r],!0);break}const a=ee(u);if(a){if(s(),!e)continue;const[o,F,i]=a;if(i)for(let c=0;c<o.length;c+=1){s();const C=c===o.length-1;n=e(o[c],C?F:void 0,[r,c+1,C])}else n=e(o,F,[r])}else s(u,[r])&&(t==null||t([u],[r]))}s()},ne=(D,e)=>{for(const[t,n,s]of e.reverse()){if(n){const r=D[t];let u=r.slice(0,n);if(s||(u+=r.slice(n+1)),u!=="-"){D[t]=u;continue}}D.splice(t,1)}},re=(D,e=process.argv.slice(2),{ignore:t}={})=>{const n=[],s=QD(D),r={},u=[];return u[ru]=[],te(e,{onFlag(a,o,F){const i=V(s,a);if(!(t!=null&&t(i?PD:HD,a,o))){if(i){const[c,C]=s[a],E=VD(C,o),l=(B,h)=>{n.push(F),h&&n.push(h),c.push(ZD(C,B||""))};return E===void 0?l:l(E)}V(r,a)||(r[a]=[]),r[a].push(o===void 0?!0:o),n.push(F)}},onArgument(a,o,F){t!=null&&t(UD,e[o[0]])||(u.push(...a),F?(u[ru]=a,e.splice(o[0])):n.push(o))}}),ne(e,n),{flags:XD(D,s),unknownFlags:r,_:u}};function hu(D){return D!==null&&typeof D=="object"}function pu(D,e,t=".",n){if(!hu(e))return pu(D,{},t,n);const s=Object.assign({},e);for(const r in D){if(r==="__proto__"||r==="constructor")continue;const u=D[r];u!=null&&(n&&n(s,r,u,t)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:hu(u)&&hu(s[r])?s[r]=pu(u,s[r],(t?`${t}.`:"")+r.toString(),n):s[r]=u))}return s}function se(D){return(...e)=>e.reduce((t,n)=>pu(t,n,"",D),{})}const oe=se(),su=D=>Array.isArray(D)?D:[D],ae=D=>D.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),Hu=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]),Uu=(D,e)=>e.length>D.length?!1:Hu(D.slice(0,e.length),e),Z=JSON.stringify;class Yu extends Error{constructor(e,t){super(t("core.commandExists",Z(e))),this.commandName=e}}class ou extends Error{constructor(e,t){super(t("core.noSuchCommand",Z(e))),this.commandName=e}}class au extends Error{constructor(e){super(e("core.noCommandGiven"))}}class qu extends Error{constructor(e,t,n){super(n("core.commandNameConflict",Z(e),Z(t))),this.n1=e,this.n2=t}}class zu extends Error{constructor(e){super(e("core.nameNotSet"))}}class Gu extends Error{constructor(e){super(e("core.descriptionNotSet"))}}class Vu extends Error{constructor(e){super(e("core.versionNotSet"))}}class Zu extends Error{constructor(e,t){super(t("core.badNameFormat",Z(e))),this.commandName=e}}class du extends Error{constructor(e){super(e("core.localeMustBeCalledFirst"))}}const Ju=typeof Deno!="undefined",Fe=typeof process!="undefined"&&!Ju,ie=process.versions.electron&&!process.defaultApp;function Ku(D,e,t,n){if(t.alias){const s=su(t.alias);for(const r of s){if(r in e)throw new qu(e[r].name,t.name,n);D.set(typeof r=="symbol"?r:r.split(" "),{...t,__isAlias:!0})}}}function gu(D,e){const t=new Map;D[p]&&(t.set(p,D[p]),Ku(t,D,D[p],e));for(const n of Object.values(D))Ku(t,D,n,e),t.set(n.name.split(" "),n);return t}function Qu(D,e,t){if(e===p)return[D[p],p];const n=su(e),s=gu(D,t);let r,u;return s.forEach((a,o)=>{if(o===p){r=D[p],u=p;return}Uu(n,o)&&(!u||u===p||o.length>u.length)&&(r=a,u=o)}),[r,u]}function Xu(D,e,t){if(e===p)return[D[p],p];const n=su(e),s=gu(D,t);let r,u;return s.forEach((a,o)=>{o===p||u===p||Hu(n,o)&&(r=a,u=o)}),[r,u]}function uD(D,e,t=1/0){const n=e===""?[]:Array.isArray(e)?e:e.split(" ");return Object.values(D).filter(s=>{const r=s.name.split(" ");return Uu(r,n)&&r.length-n.length<=t})}const Ce=D=>uD(D,"",1);function DD(D){const e=[];for(const t of D){if(t.startsWith("-"))break;e.push(t)}return e}const fu=()=>Fe?process.argv.slice(ie?1:2):Ju?Deno.args:[];function eD(D){const e={pre:[],normal:[],post:[]};for(const n of D){const s=typeof n=="object"?n:{fn:n},{enforce:r,fn:u}=s;r==="post"||r==="pre"?e[r].push(u):e.normal.push(u)}const t=[...e.pre,...e.normal,...e.post];return n=>{const s=[];let r=0;const u=a=>{r=a;const o=t[a],F=o(n(),u.bind(null,a+1));F&&s.push(F)};if(u(0),r+1===t.length)for(const a of s)a()}}const le=/\s\s+/,tD=D=>D===p?!0:!(D.startsWith(" ")||D.endsWith(" "))&&!le.test(D),nD=(D,e)=>e?`[${D}]`:`<${D}>`,ce="<Root>",U=D=>Array.isArray(D)?D.join(" "):typeof D=="string"?D:ce,rD=()=>process.env.CLERC_LOCALE?process.env.CLERC_LOCALE:Intl.DateTimeFormat().resolvedOptions().locale,{stringify:Y}=JSON;function Au(D,e){const t=[];let n,s;for(const r of D){if(s)throw new Error(e("core.spreadParameterMustBeLast",Y(s)));const u=r[0],a=r[r.length-1];let o;if(u==="<"&&a===">"&&(o=!0,n))throw new Error(e("core.requiredParameterMustBeBeforeOptional",Y(r),Y(n)));if(u==="["&&a==="]"&&(o=!1,n=r),o===void 0)throw new Error(e("core.parameterMustBeWrappedInBrackets",Y(r)));let F=r.slice(1,-1);const i=F.slice(-3)==="...";i&&(s=r,F=F.slice(0,-3)),t.push({name:F,required:o,spread:i})}return t}function xu(D,e,t,n){for(let s=0;s<e.length;s+=1){const{name:r,required:u,spread:a}=e[s],o=ae(r);if(o in D)throw new Error(n("core.parameterIsUsedMoreThanOnce",Y(r)));const F=a?t.slice(s):t[s];if(a&&(s=e.length),u&&(!F||a&&F.length===0))throw new Error(n("core.missingRequiredParameter",Y(r)));D[o]=F}}const Ee={en:{"core.commandExists":'Command "%s" exists.',"core.noSuchCommand":"No such command: %s.","core.noCommandGiven":"No command given.","core.commandNameConflict":"Command name %s conflicts with %s. Maybe caused by alias.","core.nameNotSet":"Name not set.","core.descriptionNotSet":"Description not set.","core.versionNotSet":"Version not set.","core.badNameFormat":"Bad name format: %s.","core.localeMustBeCalledFirst":"locale() or fallbackLocale() must be called at first.","core.cliParseMustBeCalled":"cli.parse() must be called.","core.spreadParameterMustBeLast":"Invalid Parameter: Spread parameter %s must be last.","core.requiredParameterCannotComeAfterOptionalParameter":"Invalid Parameter: Required parameter %s cannot come after optional parameter %s.","core.parameterMustBeWrappedInBrackets":"Invalid Parameter: Parameter %s must be wrapped in <> (required parameter) or [] (optional parameter).","core.parameterIsUsedMoreThanOnce":"Invalid Parameter: Parameter %s is used more than once.","core.missingRequiredParameter":"Missing required parameter %s."},"zh-CN":{"core.commandExists":'\u547D\u4EE4 "%s" \u5DF2\u5B58\u5728\u3002',"core.noSuchCommand":"\u627E\u4E0D\u5230\u547D\u4EE4: %s\u3002","core.noCommandGiven":"\u6CA1\u6709\u8F93\u5165\u547D\u4EE4\u3002","core.commandNameConflict":"\u547D\u4EE4\u540D\u79F0 %s \u548C %s \u51B2\u7A81\u3002 \u53EF\u80FD\u662F\u7531\u4E8E\u522B\u540D\u5BFC\u81F4\u7684\u3002","core.nameNotSet":"\u672A\u8BBE\u7F6ECLI\u540D\u79F0\u3002","core.descriptionNotSet":"\u672A\u8BBE\u7F6ECLI\u63CF\u8FF0\u3002","core.versionNotSet":"\u672A\u8BBE\u7F6ECLI\u7248\u672C\u3002","core.badNameFormat":"\u9519\u8BEF\u7684\u547D\u4EE4\u540D\u5B57\u683C\u5F0F: %s\u3002","core.localeMustBeCalledFirst":"locale() \u6216 fallbackLocale() \u5FC5\u987B\u5728\u6700\u5F00\u59CB\u8C03\u7528\u3002","core.cliParseMustBeCalled":"cli.parse() \u5FC5\u987B\u88AB\u8C03\u7528\u3002","core.spreadParameterMustBeLast":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5C55\u5F00\u53C2\u6570 %s \u5FC5\u987B\u5728\u6700\u540E\u3002","core.requiredParameterCannotComeAfterOptionalParameter":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5FC5\u586B\u53C2\u6570 %s \u4E0D\u80FD\u5728\u53EF\u9009\u53C2\u6570 %s \u4E4B\u540E\u3002","core.parameterMustBeWrappedInBrackets":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u5FC5\u987B\u88AB <> (\u5FC5\u586B\u53C2\u6570) \u6216 [] (\u53EF\u9009\u53C2\u6570) \u5305\u88F9\u3002","core.parameterIsUsedMoreThanOnce":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u88AB\u4F7F\u7528\u4E86\u591A\u6B21\u3002","core.missingRequiredParameter":"\u7F3A\u5C11\u5FC5\u586B\u53C2\u6570 %s\u3002"}};var $u=(D,e,t)=>{if(!e.has(D))throw TypeError("Cannot "+t)},m=(D,e,t)=>($u(D,e,"read from private field"),t?t.call(D):e.get(D)),x=(D,e,t)=>{if(e.has(D))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(D):e.set(D,t)},w=(D,e,t,n)=>($u(D,e,"write to private field"),n?n.call(D,t):e.set(D,t),t),$=(D,e,t)=>($u(D,e,"access private method"),t),k,I,R,J,K,Fu,q,Q,X,uu,Du,eu,j,Su,sD,wu,oD,bu,aD,M,T,yu,FD,vu,iD,Ou,CD,iu,Mu,_u,lD;const p=Symbol.for("Clerc.Root"),cD=class{constructor(D,e,t){x(this,Su),x(this,wu),x(this,bu),x(this,M),x(this,yu),x(this,vu),x(this,Ou),x(this,iu),x(this,_u),x(this,k,""),x(this,I,""),x(this,R,""),x(this,J,[]),x(this,K,{}),x(this,Fu,new WD),x(this,q,new Set),x(this,Q,void 0),x(this,X,[]),x(this,uu,!1),x(this,Du,"en"),x(this,eu,"en"),x(this,j,{}),this.i18n={add:n=>{w(this,j,oe(m(this,j),n))},t:(n,...s)=>{const r=m(this,j)[m(this,eu)]||m(this,j)[m(this,Du)],u=m(this,j)[m(this,Du)];return r[n]?Wu(r[n],...s):u[n]?Wu(u[n],...s):void 0}},w(this,k,D||m(this,k)),w(this,I,e||m(this,I)),w(this,R,t||m(this,R)),w(this,eu,rD()),$(this,bu,aD).call(this)}get _name(){return m(this,k)}get _description(){return m(this,I)}get _version(){return m(this,R)}get _inspectors(){return m(this,J)}get _commands(){return m(this,K)}static create(D,e,t){return new cD(D,e,t)}name(D){return $(this,M,T).call(this),w(this,k,D),this}description(D){return $(this,M,T).call(this),w(this,I,D),this}version(D){return $(this,M,T).call(this),w(this,R,D),this}locale(D){if(m(this,uu))throw new du(this.i18n.t);return w(this,eu,D),this}fallbackLocale(D){if(m(this,uu))throw new du(this.i18n.t);return w(this,Du,D),this}errorHandler(D){return m(this,X).push(D),this}command(D,e,t={}){return $(this,iu,Mu).call(this,()=>$(this,yu,FD).call(this,D,e,t)),this}on(D,e){return m(this,Fu).on(D,e),this}use(D){return $(this,M,T).call(this),D.setup(this)}inspector(D){return $(this,M,T).call(this),m(this,J).push(D),this}parse(D=fu()){$(this,M,T).call(this);const{argv:e,run:t}=Array.isArray(D)?{argv:D,run:!0}:{argv:fu(),...D};return w(this,Q,[...e]),$(this,vu,iD).call(this),t&&this.runMatchedCommand(),this}runMatchedCommand(){return $(this,iu,Mu).call(this,()=>$(this,_u,lD).call(this)),process.title=m(this,k),this}};let me=cD;k=new WeakMap,I=new WeakMap,R=new WeakMap,J=new WeakMap,K=new WeakMap,Fu=new WeakMap,q=new WeakMap,Q=new WeakMap,X=new WeakMap,uu=new WeakMap,Du=new WeakMap,eu=new WeakMap,j=new WeakMap,Su=new WeakSet,sD=function(){return m(this,q).has(p)},wu=new WeakSet,oD=function(){return Object.prototype.hasOwnProperty.call(this._commands,p)},bu=new WeakSet,aD=function(){this.i18n.add(Ee)},M=new WeakSet,T=function(){w(this,uu,!0)},yu=new WeakSet,FD=function(D,e,t={}){$(this,M,T).call(this);const{t:n}=this.i18n,s=(i=>!(typeof i=="string"||i===p))(D),r=s?D.name:D;if(!tD(r))throw new Zu(r,n);const{handler:u=void 0,...a}=s?D:{name:r,description:e,...t},o=[a.name],F=a.alias?su(a.alias):[];a.alias&&o.push(...F);for(const i of o)if(m(this,q).has(i))throw new Yu(U(i),n);return m(this,K)[r]=a,m(this,q).add(a.name),F.forEach(i=>m(this,q).add(i)),s&&u&&this.on(D.name,u),this},vu=new WeakSet,iD=function(){const{t:D}=this.i18n;if(!m(this,k))throw new zu(D);if(!m(this,I))throw new Gu(D);if(!m(this,R))throw new Vu(D)},Ou=new WeakSet,CD=function(D){const e=m(this,Q),{t}=this.i18n,[n,s]=D(),r=!!n,u=re((n==null?void 0:n.flags)||{},[...e]),{_:a,flags:o,unknownFlags:F}=u;let i=!r||n.name===p?a:a.slice(n.name.split(" ").length),c=(n==null?void 0:n.parameters)||[];const C=c.indexOf("--"),E=c.slice(C+1)||[],l=Object.create(null);if(C>-1&&E.length>0){c=c.slice(0,C);const h=a["--"];i=i.slice(0,-h.length||void 0),xu(l,Au(c,t),i,t),xu(l,Au(E,t),h,t)}else xu(l,Au(c,t),i,t);const B={...o,...F};return{name:n==null?void 0:n.name,called:Array.isArray(s)?s.join(" "):s,resolved:r,hasRootOrAlias:m(this,Su,sD),hasRoot:m(this,wu,oD),raw:{...u,parameters:i,mergedFlags:B},parameters:l,flags:o,unknownFlags:F,cli:this}},iu=new WeakSet,Mu=function(D){try{D()}catch(e){if(m(this,X).length>0)m(this,X).forEach(t=>t(e));else throw e}},_u=new WeakSet,lD=function(){$(this,M,T).call(this);const{t:D}=this.i18n,e=m(this,Q);if(!e)throw new Error(D("core.cliParseMustBeCalled"));const t=DD(e),n=t.join(" "),s=()=>Qu(m(this,K),t,D),r=()=>$(this,Ou,CD).call(this,s),u={enforce:"post",fn:()=>{const[o]=s(),F=r();if(!o)throw n?new ou(n,D):new au(D);m(this,Fu).emit(o.name,F)}},a=[...m(this,J),u];eD(a)(r)};const W=D=>D,Be=(D,e,t)=>t,he=(D,e)=>e,pe=(D,e)=>({...D,handler:e}),de=D=>`
1
+ import{format as Hu}from"node:util";import Bu from"tty";class YD{constructor(){this.listenerMap={},this.wildcardListeners=new Set}on(e,t){return e==="*"?(this.wildcardListeners.add(t),this):(this.listenerMap[e]||(this.listenerMap[e]=new Set),this.listenerMap[e].add(t),this)}emit(e,...t){return this.listenerMap[e]&&(this.wildcardListeners.forEach(n=>n(e,...t)),this.listenerMap[e].forEach(n=>n(...t))),this}off(e,t){var n,s;return e==="**"?(this.listenerMap={},this.wildcardListeners.clear(),this):e==="*"?(t?this.wildcardListeners.delete(t):this.wildcardListeners.clear(),this):(t?(n=this.listenerMap[e])==null||n.delete(t):(s=this.listenerMap[e])==null||s.clear(),this)}}const qD="known-flag",zD="unknown-flag",GD="argument",{stringify:G}=JSON,ZD=/\B([A-Z])/g,VD=D=>D.replace(ZD,"-$1").toLowerCase(),{hasOwnProperty:JD}=Object.prototype,Z=(D,e)=>JD.call(D,e),KD=D=>Array.isArray(D),Uu=D=>typeof D=="function"?[D,!1]:KD(D)?[D[0],!0]:Uu(D.type),QD=(D,e)=>D===Boolean?e!=="false":e,XD=(D,e)=>typeof e=="boolean"?e:D===Number&&e===""?Number.NaN:D(e),ue=/[\s.:=]/,De=D=>{const e=`Flag name ${G(D)}`;if(D.length===0)throw new Error(`${e} cannot be empty`);if(D.length===1)throw new Error(`${e} must be longer than a character`);const t=D.match(ue);if(t)throw new Error(`${e} cannot contain ${G(t==null?void 0:t[0])}`)},ee=D=>{const e={},t=(n,s)=>{if(Z(e,n))throw new Error(`Duplicate flags named ${G(n)}`);e[n]=s};for(const n in D){if(!Z(D,n))continue;De(n);const s=D[n],r=[[],...Uu(s),s];t(n,r);const u=VD(n);if(n!==u&&t(u,r),"alias"in s&&typeof s.alias=="string"){const{alias:a}=s,o=`Flag alias ${G(a)} for flag ${G(n)}`;if(a.length===0)throw new Error(`${o} cannot be empty`);if(a.length>1)throw new Error(`${o} must be a single character`);t(a,r)}}return e},te=(D,e)=>{const t={};for(const n in D){if(!Z(D,n))continue;const[s,,r,u]=e[n];if(s.length===0&&"default"in u){let{default:a}=u;typeof a=="function"&&(a=a()),t[n]=a}else t[n]=r?s:s.pop()}return t},su="--",ne=/[.:=]/,re=/^-{1,2}\w/,se=D=>{if(!re.test(D))return;const e=!D.startsWith(su);let t=D.slice(e?1:2),n;const s=t.match(ne);if(s){const{index:r}=s;n=t.slice(r+1),t=t.slice(0,r)}return[t,n,e]},oe=(D,{onFlag:e,onArgument:t})=>{let n;const s=(r,u)=>{if(typeof n!="function")return!0;n(r,u),n=void 0};for(let r=0;r<D.length;r+=1){const u=D[r];if(u===su){s();const o=D.slice(r+1);t==null||t(o,[r],!0);break}const a=se(u);if(a){if(s(),!e)continue;const[o,i,F]=a;if(F)for(let l=0;l<o.length;l+=1){s();const C=l===o.length-1;n=e(o[l],C?i:void 0,[r,l+1,C])}else n=e(o,i,[r])}else s(u,[r])&&(t==null||t([u],[r]))}s()},ae=(D,e)=>{for(const[t,n,s]of e.reverse()){if(n){const r=D[t];let u=r.slice(0,n);if(s||(u+=r.slice(n+1)),u!=="-"){D[t]=u;continue}}D.splice(t,1)}},Yu=(D,e=process.argv.slice(2),{ignore:t}={})=>{const n=[],s=ee(D),r={},u=[];return u[su]=[],oe(e,{onFlag(a,o,i){const F=Z(s,a);if(!(t!=null&&t(F?qD:zD,a,o))){if(F){const[l,C]=s[a],E=QD(C,o),c=(h,p)=>{n.push(i),p&&n.push(p),l.push(XD(C,h||""))};return E===void 0?c:c(E)}Z(r,a)||(r[a]=[]),r[a].push(o===void 0?!0:o),n.push(i)}},onArgument(a,o,i){t!=null&&t(GD,e[o[0]])||(u.push(...a),i?(u[su]=a,e.splice(o[0])):n.push(o))}}),ae(e,n),{flags:te(D,s),unknownFlags:r,_:u}};function pu(D){return D!==null&&typeof D=="object"}function du(D,e,t=".",n){if(!pu(e))return du(D,{},t,n);const s=Object.assign({},e);for(const r in D){if(r==="__proto__"||r==="constructor")continue;const u=D[r];u!=null&&(n&&n(s,r,u,t)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:pu(u)&&pu(s[r])?s[r]=du(u,s[r],(t?`${t}.`:"")+r.toString(),n):s[r]=u))}return s}function ie(D){return(...e)=>e.reduce((t,n)=>du(t,n,"",D),{})}const Fe=ie(),gu=D=>Array.isArray(D)?D:[D],Ce=D=>D.replace(/[\W_]([a-z\d])?/gi,(e,t)=>t?t.toUpperCase():""),qu=(D,e)=>e.length!==D.length?!1:D.every((t,n)=>t===e[n]),zu=(D,e)=>e.length>D.length?!1:qu(D.slice(0,e.length),e),V=JSON.stringify;class Gu extends Error{constructor(e,t){super(t("core.commandExists",V(e))),this.commandName=e}}class ou extends Error{constructor(e,t){super(t("core.noSuchCommand",V(e))),this.commandName=e}}class au extends Error{constructor(e){super(e("core.noCommandGiven"))}}class Zu extends Error{constructor(e,t,n){super(n("core.commandNameConflict",V(e),V(t))),this.n1=e,this.n2=t}}class Vu extends Error{constructor(e){super(e("core.nameNotSet"))}}class Ju extends Error{constructor(e){super(e("core.descriptionNotSet"))}}class Ku extends Error{constructor(e){super(e("core.versionNotSet"))}}class Qu extends Error{constructor(e,t){super(t("core.badNameFormat",V(e))),this.commandName=e}}class fu extends Error{constructor(e){super(e("core.localeMustBeCalledFirst"))}}const Xu=typeof Deno!="undefined",le=typeof process!="undefined"&&!Xu,ce=process.versions.electron&&!process.defaultApp;function uD(D,e,t,n){if(t.alias){const s=gu(t.alias);for(const r of s){if(r in e)throw new Zu(e[r].name,t.name,n);D.set(typeof r=="symbol"?r:r.split(" "),{...t,__isAlias:!0})}}}function Au(D,e){const t=new Map;D[B]&&(t.set(B,D[B]),uD(t,D,D[B],e));for(const n of Object.values(D))uD(t,D,n,e),t.set(n.name.split(" "),n);return t}function DD(D,e,t){const n=Au(D,t);for(const[s,r]of n.entries()){const u=Yu((r==null?void 0:r.flags)||{},[...e]),{_:a}=u;if(s!==B&&zu(a,s))return[r,s]}return n.has(B)?[n.get(B),B]:[void 0,void 0]}function eD(D,e,t){if(e===B)return[D[B],B];const n=gu(e),s=Au(D,t);let r,u;return s.forEach((a,o)=>{o===B||u===B||qu(n,o)&&(r=a,u=o)}),[r,u]}function tD(D,e,t=1/0){const n=e===""?[]:Array.isArray(e)?e:e.split(" ");return Object.values(D).filter(s=>{const r=s.name.split(" ");return zu(r,n)&&r.length-n.length<=t})}const Ee=D=>tD(D,"",1),xu=()=>le?process.argv.slice(ce?1:2):Xu?Deno.args:[];function nD(D){const e={pre:[],normal:[],post:[]};for(const n of D){const s=typeof n=="object"?n:{fn:n},{enforce:r,fn:u}=s;r==="post"||r==="pre"?e[r].push(u):e.normal.push(u)}const t=[...e.pre,...e.normal,...e.post];return n=>{const s=[];let r=0;const u=a=>{r=a;const o=t[a],i=o(n,u.bind(null,a+1));i&&s.push(i)};if(u(0),r+1===t.length)for(const a of s)a()}}const me=/\s\s+/,rD=D=>D===B?!0:!(D.startsWith(" ")||D.endsWith(" "))&&!me.test(D),sD=(D,e)=>e?`[${D}]`:`<${D}>`,he="<Root>",U=D=>Array.isArray(D)?D.join(" "):typeof D=="string"?D:he,oD=()=>process.env.CLERC_LOCALE?process.env.CLERC_LOCALE:Intl.DateTimeFormat().resolvedOptions().locale,aD=D=>D.filter(e=>!e.startsWith("-")),{stringify:Y}=JSON;function $u(D,e){const t=[];let n,s;for(const r of D){if(s)throw new Error(e("core.spreadParameterMustBeLast",Y(s)));const u=r[0],a=r[r.length-1];let o;if(u==="<"&&a===">"&&(o=!0,n))throw new Error(e("core.requiredParameterMustBeBeforeOptional",Y(r),Y(n)));if(u==="["&&a==="]"&&(o=!1,n=r),o===void 0)throw new Error(e("core.parameterMustBeWrappedInBrackets",Y(r)));let i=r.slice(1,-1);const F=i.slice(-3)==="...";F&&(s=r,i=i.slice(0,-3)),t.push({name:i,required:o,spread:F})}return t}function Su(D,e,t,n){for(let s=0;s<e.length;s+=1){const{name:r,required:u,spread:a}=e[s],o=Ce(r);if(o in D)throw new Error(n("core.parameterIsUsedMoreThanOnce",Y(r)));const i=a?t.slice(s):t[s];if(a&&(s=e.length),u&&(!i||a&&i.length===0))throw new Error(n("core.missingRequiredParameter",Y(r)));D[o]=i}}const Be={en:{"core.commandExists":'Command "%s" exists.',"core.noSuchCommand":"No such command: %s.","core.noCommandGiven":"No command given.","core.commandNameConflict":"Command name %s conflicts with %s. Maybe caused by alias.","core.nameNotSet":"Name not set.","core.descriptionNotSet":"Description not set.","core.versionNotSet":"Version not set.","core.badNameFormat":"Bad name format: %s.","core.localeMustBeCalledFirst":"locale() or fallbackLocale() must be called at first.","core.cliParseMustBeCalled":"cli.parse() must be called.","core.spreadParameterMustBeLast":"Invalid Parameter: Spread parameter %s must be last.","core.requiredParameterCannotComeAfterOptionalParameter":"Invalid Parameter: Required parameter %s cannot come after optional parameter %s.","core.parameterMustBeWrappedInBrackets":"Invalid Parameter: Parameter %s must be wrapped in <> (required parameter) or [] (optional parameter).","core.parameterIsUsedMoreThanOnce":"Invalid Parameter: Parameter %s is used more than once.","core.missingRequiredParameter":"Missing required parameter %s."},"zh-CN":{"core.commandExists":'\u547D\u4EE4 "%s" \u5DF2\u5B58\u5728\u3002',"core.noSuchCommand":"\u627E\u4E0D\u5230\u547D\u4EE4: %s\u3002","core.noCommandGiven":"\u6CA1\u6709\u8F93\u5165\u547D\u4EE4\u3002","core.commandNameConflict":"\u547D\u4EE4\u540D\u79F0 %s \u548C %s \u51B2\u7A81\u3002 \u53EF\u80FD\u662F\u7531\u4E8E\u522B\u540D\u5BFC\u81F4\u7684\u3002","core.nameNotSet":"\u672A\u8BBE\u7F6ECLI\u540D\u79F0\u3002","core.descriptionNotSet":"\u672A\u8BBE\u7F6ECLI\u63CF\u8FF0\u3002","core.versionNotSet":"\u672A\u8BBE\u7F6ECLI\u7248\u672C\u3002","core.badNameFormat":"\u9519\u8BEF\u7684\u547D\u4EE4\u540D\u5B57\u683C\u5F0F: %s\u3002","core.localeMustBeCalledFirst":"locale() \u6216 fallbackLocale() \u5FC5\u987B\u5728\u6700\u5F00\u59CB\u8C03\u7528\u3002","core.cliParseMustBeCalled":"cli.parse() \u5FC5\u987B\u88AB\u8C03\u7528\u3002","core.spreadParameterMustBeLast":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5C55\u5F00\u53C2\u6570 %s \u5FC5\u987B\u5728\u6700\u540E\u3002","core.requiredParameterCannotComeAfterOptionalParameter":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u5FC5\u586B\u53C2\u6570 %s \u4E0D\u80FD\u5728\u53EF\u9009\u53C2\u6570 %s \u4E4B\u540E\u3002","core.parameterMustBeWrappedInBrackets":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u5FC5\u987B\u88AB <> (\u5FC5\u586B\u53C2\u6570) \u6216 [] (\u53EF\u9009\u53C2\u6570) \u5305\u88F9\u3002","core.parameterIsUsedMoreThanOnce":"\u4E0D\u5408\u6CD5\u7684\u53C2\u6570: \u53C2\u6570 %s \u88AB\u4F7F\u7528\u4E86\u591A\u6B21\u3002","core.missingRequiredParameter":"\u7F3A\u5C11\u5FC5\u586B\u53C2\u6570 %s\u3002"}};var wu=(D,e,t)=>{if(!e.has(D))throw TypeError("Cannot "+t)},m=(D,e,t)=>(wu(D,e,"read from private field"),t?t.call(D):e.get(D)),x=(D,e,t)=>{if(e.has(D))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(D):e.set(D,t)},b=(D,e,t,n)=>(wu(D,e,"write to private field"),n?n.call(D,t):e.set(D,t),t),$=(D,e,t)=>(wu(D,e,"access private method"),t),N,I,R,J,K,iu,Fu,q,Q,X,uu,Du,eu,j,bu,iD,yu,FD,vu,CD,O,M,Ou,lD,_u,cD,Mu,ED,Cu,Tu,Lu,mD;const B=Symbol.for("Clerc.Root"),hD=class{constructor(D,e,t){x(this,bu),x(this,yu),x(this,vu),x(this,O),x(this,Ou),x(this,_u),x(this,Mu),x(this,Cu),x(this,Lu),x(this,N,""),x(this,I,""),x(this,R,""),x(this,J,[]),x(this,K,{}),x(this,iu,new YD),x(this,Fu,{}),x(this,q,new Set),x(this,Q,void 0),x(this,X,[]),x(this,uu,!1),x(this,Du,"en"),x(this,eu,"en"),x(this,j,{}),this.i18n={add:n=>{b(this,j,Fe(m(this,j),n))},t:(n,...s)=>{const r=m(this,j)[m(this,eu)]||m(this,j)[m(this,Du)],u=m(this,j)[m(this,Du)];return r[n]?Hu(r[n],...s):u[n]?Hu(u[n],...s):void 0}},b(this,N,D||m(this,N)),b(this,I,e||m(this,I)),b(this,R,t||m(this,R)),b(this,eu,oD()),$(this,vu,CD).call(this)}get _name(){return m(this,N)}get _description(){return m(this,I)}get _version(){return m(this,R)}get _inspectors(){return m(this,J)}get _commands(){return m(this,K)}get _flags(){return m(this,Fu)}static create(D,e,t){return new hD(D,e,t)}name(D){return $(this,O,M).call(this),b(this,N,D),this}description(D){return $(this,O,M).call(this),b(this,I,D),this}version(D){return $(this,O,M).call(this),b(this,R,D),this}locale(D){if(m(this,uu))throw new fu(this.i18n.t);return b(this,eu,D),this}fallbackLocale(D){if(m(this,uu))throw new fu(this.i18n.t);return b(this,Du,D),this}errorHandler(D){return m(this,X).push(D),this}command(D,e,t={}){return $(this,Cu,Tu).call(this,()=>$(this,Ou,lD).call(this,D,e,t)),this}flag(D,e,t){return m(this,Fu)[D]={description:e,...t},this}on(D,e){return m(this,iu).on(D,e),this}use(D){return $(this,O,M).call(this),D.setup(this)}inspector(D){return $(this,O,M).call(this),m(this,J).push(D),this}parse(D=xu()){$(this,O,M).call(this);const{argv:e,run:t}=Array.isArray(D)?{argv:D,run:!0}:{argv:xu(),...D};return b(this,Q,[...e]),$(this,_u,cD).call(this),t&&this.runMatchedCommand(),this}runMatchedCommand(){return $(this,Cu,Tu).call(this,()=>$(this,Lu,mD).call(this)),process.title=m(this,N),this}};let pe=hD;N=new WeakMap,I=new WeakMap,R=new WeakMap,J=new WeakMap,K=new WeakMap,iu=new WeakMap,Fu=new WeakMap,q=new WeakMap,Q=new WeakMap,X=new WeakMap,uu=new WeakMap,Du=new WeakMap,eu=new WeakMap,j=new WeakMap,bu=new WeakSet,iD=function(){return m(this,q).has(B)},yu=new WeakSet,FD=function(){return Object.prototype.hasOwnProperty.call(this._commands,B)},vu=new WeakSet,CD=function(){this.i18n.add(Be)},O=new WeakSet,M=function(){b(this,uu,!0)},Ou=new WeakSet,lD=function(D,e,t={}){$(this,O,M).call(this);const{t:n}=this.i18n,s=(F=>!(typeof F=="string"||F===B))(D),r=s?D.name:D;if(!rD(r))throw new Qu(r,n);const{handler:u=void 0,...a}=s?D:{name:r,description:e,...t},o=[a.name],i=a.alias?gu(a.alias):[];a.alias&&o.push(...i);for(const F of o)if(m(this,q).has(F))throw new Gu(U(F),n);return m(this,K)[r]=a,m(this,q).add(a.name),i.forEach(F=>m(this,q).add(F)),s&&u&&this.on(D.name,u),this},_u=new WeakSet,cD=function(){const{t:D}=this.i18n;if(!m(this,N))throw new Vu(D);if(!m(this,I))throw new Ju(D);if(!m(this,R))throw new Ku(D)},Mu=new WeakSet,ED=function(D){const e=m(this,Q),{t}=this.i18n,[n,s]=D(),r=!!n,u=Yu((n==null?void 0:n.flags)||{},[...e]),{_:a,flags:o,unknownFlags:i}=u;let F=!r||n.name===B?a:a.slice(n.name.split(" ").length),l=(n==null?void 0:n.parameters)||[];const C=l.indexOf("--"),E=l.slice(C+1)||[],c=Object.create(null);if(C>-1&&E.length>0){l=l.slice(0,C);const p=a["--"];F=F.slice(0,-p.length||void 0),Su(c,$u(l,t),F,t),Su(c,$u(E,t),p,t)}else Su(c,$u(l,t),F,t);const h={...o,...i};return{name:n==null?void 0:n.name,called:Array.isArray(s)?s.join(" "):s,resolved:r,hasRootOrAlias:m(this,bu,iD),hasRoot:m(this,yu,FD),raw:{...u,parameters:F,mergedFlags:h},parameters:c,flags:o,unknownFlags:i,cli:this}},Cu=new WeakSet,Tu=function(D){try{D()}catch(e){if(m(this,X).length>0)m(this,X).forEach(t=>t(e));else throw e}},Lu=new WeakSet,mD=function(){$(this,O,M).call(this);const{t:D}=this.i18n,e=m(this,Q);if(!e)throw new Error(D("core.cliParseMustBeCalled"));const t=()=>DD(m(this,K),e,D),n=()=>$(this,Mu,ED).call(this,t),s={enforce:"post",fn:u=>{const[a]=t(),o=aD(e).join(" ");if(!a)throw o?new ou(o,D):new au(D);m(this,iu).emit(a.name,u)}},r=[...m(this,J),s];nD(r)(n())};const W=D=>D,de=(D,e,t)=>t,ge=(D,e)=>e,fe=(D,e)=>({...D,handler:e}),Ae=D=>`
2
2
  ${D})
3
3
  cmd+="__${D}"
4
- ;;`,ge=D=>{const{cli:e}=D,{_name:t,_commands:n}=e;return`_${t}() {
4
+ ;;`,xe=D=>{const{cli:e}=D,{_name:t,_commands:n}=e;return`_${t}() {
5
5
  local i cur prev opts cmds
6
6
  COMPREPLY=()
7
7
  cur="\${COMP_WORDS[COMP_CWORD]}"
@@ -15,7 +15,7 @@ import{format as Wu}from"node:util";import Bu from"tty";class WD{constructor(){t
15
15
  "$1")
16
16
  cmd="${t}"
17
17
  ;;
18
- ${Object.keys(n).map(de).join("")}
18
+ ${Object.keys(n).map(Ae).join("")}
19
19
  *)
20
20
  ;;
21
21
  esac
@@ -23,9 +23,9 @@ ${Object.keys(n).map(de).join("")}
23
23
  }
24
24
 
25
25
  complete -F _${t} -o bashdefault -o default ${t}
26
- `},ED=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),mD=D=>D.length<=1?`-${D}`:`--${ED(D)}`,BD="(No Description)",fe=D=>`[CompletionResult]::new('${D.name}', '${D.name}', [CompletionResultType]::ParameterValue, '${D.description}')`,Ae=D=>Object.entries(D.flags||{}).map(([e,t])=>{const n=[`[CompletionResult]::new('${mD(e)}', '${ED(e)}', [CompletionResultType]::ParameterName, '${D.flags[e].description||BD}')`];return t!=null&&t.alias&&n.push(`[CompletionResult]::new('${mD(t.alias)}', '${t.alias}', [CompletionResultType]::ParameterName, '${D.flags[e].description||BD}')`),n.join(`
26
+ `},BD=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),pD=D=>D.length<=1?`-${D}`:`--${BD(D)}`,dD="(No Description)",$e=D=>`[CompletionResult]::new('${D.name}', '${D.name}', [CompletionResultType]::ParameterValue, '${D.description}')`,Se=D=>Object.entries(D.flags||{}).map(([e,t])=>{const n=[`[CompletionResult]::new('${pD(e)}', '${BD(e)}', [CompletionResultType]::ParameterName, '${D.flags[e].description||dD}')`];return t!=null&&t.alias&&n.push(`[CompletionResult]::new('${pD(t.alias)}', '${t.alias}', [CompletionResultType]::ParameterName, '${D.flags[e].description||dD}')`),n.join(`
27
27
  `)}).join(`
28
- `),xe=D=>{const{cli:e}=D,{_name:t,_commands:n}=e;return`using namespace System.Management.Automation
28
+ `),we=D=>{const{cli:e}=D,{_name:t,_commands:n}=e;return`using namespace System.Management.Automation
29
29
  using namespace System.Management.Automation.Language
30
30
 
31
31
  Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
@@ -47,12 +47,12 @@ Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
47
47
 
48
48
  $completions = @(switch ($command) {
49
49
  '${t}' {
50
- ${Object.entries(n).map(([s,r])=>fe(r)).join(`
50
+ ${Object.entries(n).map(([s,r])=>$e(r)).join(`
51
51
  `)}
52
52
  break
53
53
  }
54
54
  ${Object.entries(n).map(([s,r])=>`'${t};${s.split(" ").join(";")}' {
55
- ${Ae(r)}
55
+ ${Se(r)}
56
56
  break
57
57
  }`).join(`
58
58
  `)}
@@ -60,18 +60,17 @@ Register-ArgumentCompleter -Native -CommandName '${t}' -ScriptBlock {
60
60
 
61
61
  $completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
62
62
  Sort-Object -Property ListItemText
63
- }`},hD={bash:ge,pwsh:xe},$e=(D={})=>W({setup:e=>{const{command:t=!0}=D;return t&&(e=e.command("completions","Print shell completions to stdout",{flags:{shell:{description:"Shell type",type:String,default:""}},parameters:["[shell]"]}).on("completions",n=>{if(!e._name)throw new Error("CLI name is not defined!");const s=String(n.parameters.shell||n.flags.shell);if(!s)throw new Error("Missing shell name");if(s in hD)process.stdout.write(hD[s](n));else throw new Error(`No such shell: ${s}`)})),e}}),Se=D=>Array.isArray(D)?D:[D],we=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),pD=D=>D.length<=1?`-${D}`:`--${we(D)}`;var b={exports:{}};let be=Bu,ye=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||be.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),d=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+dD(s,e,t,r)+e:D+s+e},dD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+dD(r,e,t,u):s+r},gD=(D=ye)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?d("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?d("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?d("\x1B[3m","\x1B[23m"):String,underline:D?d("\x1B[4m","\x1B[24m"):String,inverse:D?d("\x1B[7m","\x1B[27m"):String,hidden:D?d("\x1B[8m","\x1B[28m"):String,strikethrough:D?d("\x1B[9m","\x1B[29m"):String,black:D?d("\x1B[30m","\x1B[39m"):String,red:D?d("\x1B[31m","\x1B[39m"):String,green:D?d("\x1B[32m","\x1B[39m"):String,yellow:D?d("\x1B[33m","\x1B[39m"):String,blue:D?d("\x1B[34m","\x1B[39m"):String,magenta:D?d("\x1B[35m","\x1B[39m"):String,cyan:D?d("\x1B[36m","\x1B[39m"):String,white:D?d("\x1B[37m","\x1B[39m"):String,gray:D?d("\x1B[90m","\x1B[39m"):String,bgBlack:D?d("\x1B[40m","\x1B[49m"):String,bgRed:D?d("\x1B[41m","\x1B[49m"):String,bgGreen:D?d("\x1B[42m","\x1B[49m"):String,bgYellow:D?d("\x1B[43m","\x1B[49m"):String,bgBlue:D?d("\x1B[44m","\x1B[49m"):String,bgMagenta:D?d("\x1B[45m","\x1B[49m"):String,bgCyan:D?d("\x1B[46m","\x1B[49m"):String,bgWhite:D?d("\x1B[47m","\x1B[49m"):String});b.exports=gD(),b.exports.createColors=gD;var ve=function(D,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,n=e.align||[],s=e.stringLength||function(o){return String(o).length},r=AD(D,function(o,F){return xD(F,function(i,c){var C=fD(i);(!o[c]||C>o[c])&&(o[c]=C)}),o},[]),u=Cu(D,function(o){return Cu(o,function(F,i){var c=String(F);if(n[i]==="."){var C=fD(c),E=r[i]+(/\./.test(c)?1:2)-(s(c)-C);return c+Array(E).join(" ")}else return c})}),a=AD(u,function(o,F){return xD(F,function(i,c){var C=s(i);(!o[c]||C>o[c])&&(o[c]=C)}),o},[]);return Cu(u,function(o){return Cu(o,function(F,i){var c=a[i]-s(F)||0,C=Array(Math.max(c+1,1)).join(" ");return n[i]==="r"||n[i]==="."?C+F:n[i]==="c"?Array(Math.ceil(c/2+1)).join(" ")+F+Array(Math.floor(c/2+1)).join(" "):F+C}).join(t).replace(/\s+$/,"")}).join(`
64
- `)};function fD(D){var e=/\.[^.]*$/.exec(D);return e?e.index+1:D.length}function AD(D,e,t){if(D.reduce)return D.reduce(e,t);for(var n=0,s=arguments.length>=3?t:D[n++];n<D.length;n++)e(s,D[n],n);return s}function xD(D,e){if(D.forEach)return D.forEach(e);for(var t=0;t<D.length;t++)e.call(D,D[t],t)}function Cu(D,e){if(D.map)return D.map(e);for(var t=[],n=0;n<D.length;n++)t.push(e.call(D,D[n],n));return t}function Oe({onlyFirst:D=!1}={}){const 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,D?void 0:"g")}function Me(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(Oe(),"")}var $D={exports:{}};(function(D){var e={};D.exports=e,e.eastAsianWidth=function(n){var s=n.charCodeAt(0),r=n.length==2?n.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=r&&r<=57343&&(s&=1023,r&=1023,u=s<<10|r,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(n){var s=this.eastAsianWidth(n);return s=="F"||s=="W"||s=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var s=t(n),r=0,u=0;u<s.length;u++)r=r+this.characterLength(s[u]);return r},e.slice=function(n,s,r){textLen=e.length(n),s=s||0,r=r||1,s<0&&(s=textLen+s),r<0&&(r=textLen+r);for(var u="",a=0,o=t(n),F=0;F<o.length;F++){var i=o[F],c=e.length(i);if(a>=s-(c==2?1:0))if(a+c<=r)u+=i;else break;a+=c}return u}})($D);var _e=$D.exports,Te=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function Ne(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Me(D),D.length===0))return 0;D=D.replace(Te()," ");const t=e.ambiguousIsNarrow?1:2;let n=0;for(const s of D){const r=s.codePointAt(0);if(!(r<=31||r>=127&&r<=159||r>=768&&r<=879))switch(_e.eastAsianWidth(s)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}const Tu=D=>ve(D,{stringLength:Ne}),Nu=D=>Tu(D).split(`
65
- `),SD=new Map([[Boolean,""],[String,"string"],[Number,"number"]]),Le=(D,e=!1)=>{const t=SD.has(D)?SD.get(D):"value";return e?`[${t}]`:`<${t}>`},P=D=>{const e=[];for(const t of D){if(t.type==="block"||!t.type){const n=" ",s=t.body.map(u=>n+u);s.unshift("");const r=s.join(`
66
- `);e.push(Tu([[b.exports.bold(`${t.title}:`)],[r]]).toString())}else if(t.type==="inline"){const n=t.items.map(r=>[b.exports.bold(`${r.title}:`),r.body]),s=Tu(n);e.push(s.toString())}e.push("")}return e.join(`
67
- `)},ke={renderFlagName:D=>D,renderSections:D=>D,renderType:(D,e)=>Le(D,e),renderDefault:D=>JSON.stringify(D)},Ie={en:{"help.name":"Name","help.version":"Version","help.subcommand":"Subcommand","help.commands":"Commands","help.flags":"Flags","help.description":"Description","help.usage":"Usage","help.examples":"Examples","help.notes":"Notes","help.noDescription":"(No description)","help.notes.1":"If no command is specified, show help for the CLI.","help.notes.2":"If a command is specified, show help for the command.","help.notes.3":"-h is an alias for --help.","help.examples.1":"Show help","help.examples.2":"Show help for a specific command","help.commandDescription":"Show help","help.default":"Default: "},"zh-CN":{"help.name":"\u540D\u79F0","help.version":"\u7248\u672C","help.subcommand":"\u5B50\u547D\u4EE4","help.commands":"\u547D\u4EE4","help.flags":"\u6807\u5FD7","help.description":"\u63CF\u8FF0","help.usage":"\u4F7F\u7528","help.examples":"\u793A\u4F8B","help.notes":"\u5907\u6CE8","help.noDescription":"(\u65E0\u63CF\u8FF0)","help.notes.1":"\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u5C55\u793A\u54EA\u4E2A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u5C55\u793ACLI\u7684\u3002","help.notes.2":"\u5982\u679C\u6307\u5B9A\u4E86\u5219\u5C55\u793A\u8BE5\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\u3002","help.notes.3":"-h \u662F --help \u7684\u4E00\u4E2A\u522B\u540D\u3002","help.examples.1":"\u5C55\u793A CLI \u7684\u5E2E\u52A9\u4FE1\u606F","help.examples.2":"\u5C55\u793A\u6307\u5B9A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F","help.commandDescription":"\u5C55\u793A\u5E2E\u52A9\u4FE1\u606F","help.default":"\u9ED8\u8BA4\u503C: %s"}},Lu=b.exports.yellow("-"),wD=D=>{process.stdout.write(D)},ku=(D,e,t)=>{const{t:n}=e.i18n,s=[{title:n("help.name"),body:b.exports.red(e._name)},{title:n("help.version"),body:b.exports.yellow(e._version)}];t&&s.push({title:n("help.subcommand"),body:b.exports.green(`${e._name} ${U(t.name)}`)}),D.push({type:"inline",items:s}),D.push({title:n("help.description"),body:[(t==null?void 0:t.description)||e._description]})},bD=(D,e,t)=>{const n=e.map(([s,r])=>[s,Lu,r]);D.push({title:t("help.examples"),body:Nu(n)})},lu=(D,e,t,n)=>{const{cli:s}=e,{t:r}=s.i18n,u=[];ku(u,s),u.push({title:r("help.usage"),body:[b.exports.magenta(`$ ${s._name} ${nD("command",e.hasRootOrAlias)} [flags]`)]});const a=[...e.hasRoot?[s._commands[p]]:[],...Object.values(s._commands)].map(o=>{const F=[typeof o.name=="symbol"?"":o.name,...Se(o.alias||[])].sort((i,c)=>i===p?-1:c===p?1:i.length-c.length).map(i=>i===""||typeof i=="symbol"?`${s._name}`:`${s._name} ${i}`).join(", ");return[b.exports.cyan(F),Lu,o.description]});return u.push({title:r("help.commands"),body:Nu(a)}),t&&u.push({title:r("help.notes"),body:t}),n&&bD(u,n,r),D(u)},Iu=(D,e,t)=>{var n;const{cli:s}=e,{t:r}=s.i18n,[u]=Xu(s._commands,t,r);if(!u)throw new ou(U(t),r);const a=Object.assign({},ke,u.help);let o=[];t===p?ku(o,s):ku(o,s,{...u,name:U(t)});const F=((n=u.parameters)==null?void 0:n.join(" "))||void 0,i=t===p?"":` ${U(t)}`,c=F?` ${F}`:"",C=u.flags?" [flags]":"";return o.push({title:r("help.usage"),body:[b.exports.magenta(`$ ${s._name}${i}${c}${C}`)]}),u.flags&&o.push({title:r("help.flags"),body:Nu(Object.entries(u.flags).map(([E,l])=>{const B=l.default!==void 0;let h=[pD(E)];l.alias&&h.push(pD(l.alias)),h=h.map(a.renderFlagName);const y=[b.exports.blue(h.join(", ")),a.renderType(l.type,B)];return y.push(Lu,l.description||r("help.noDescription")),B&&y.push(`(${r("help.default",a.renderDefault(l.default))})`),y}))}),u.notes&&o.push({title:r("help.notes"),body:u.notes}),u.examples&&bD(o,u.examples,r),o=a.renderSections(o),D(o)},Re=({command:D=!0,showHelpWhenNoCommand:e=!0,notes:t,examples:n,banner:s}={})=>W({setup:r=>{const{add:u,t:a}=r.i18n;u(Ie);const o=F=>{s&&wD(`${s}
68
- `),wD(F)};return D&&(r=r.command("help",a("help.commandDescription"),{parameters:["[command...]"],notes:[a("help.notes.1"),a("help.notes.2"),a("help.notes.3")],examples:[[`$ ${r._name} help`,a("help.examples.1")],[`$ ${r._name} help <command>`,a("help.examples.2")],[`$ ${r._name} <command> --help`,a("help.examples.2")]]}).on("help",F=>{F.parameters.command.length?o(Iu(P,F,F.parameters.command)):o(lu(P,F,t,n))})),r.inspector((F,i)=>{const c=F.raw.mergedFlags.h||F.raw.mergedFlags.help;if(!F.hasRootOrAlias&&!F.raw._.length&&e&&!c){let C=`${a("core.noCommandGiven")}
63
+ }`},gD={bash:xe,pwsh:we},be=(D={})=>W({setup:e=>{const{command:t=!0}=D;return t&&(e=e.command("completions","Print shell completions to stdout",{flags:{shell:{description:"Shell type",type:String,default:""}},parameters:["[shell]"]}).on("completions",n=>{if(!e._name)throw new Error("CLI name is not defined!");const s=String(n.parameters.shell||n.flags.shell);if(!s)throw new Error("Missing shell name");if(s in gD)process.stdout.write(gD[s](n));else throw new Error(`No such shell: ${s}`)})),e}}),ye=D=>Array.isArray(D)?D:[D],ve=D=>D.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`),fD=D=>D.length<=1?`-${D}`:`--${ve(D)}`;var S={exports:{}};let Oe=Bu,_e=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Oe.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),d=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+AD(s,e,t,r)+e:D+s+e},AD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+AD(r,e,t,u):s+r},xD=(D=_e)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?d("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?d("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?d("\x1B[3m","\x1B[23m"):String,underline:D?d("\x1B[4m","\x1B[24m"):String,inverse:D?d("\x1B[7m","\x1B[27m"):String,hidden:D?d("\x1B[8m","\x1B[28m"):String,strikethrough:D?d("\x1B[9m","\x1B[29m"):String,black:D?d("\x1B[30m","\x1B[39m"):String,red:D?d("\x1B[31m","\x1B[39m"):String,green:D?d("\x1B[32m","\x1B[39m"):String,yellow:D?d("\x1B[33m","\x1B[39m"):String,blue:D?d("\x1B[34m","\x1B[39m"):String,magenta:D?d("\x1B[35m","\x1B[39m"):String,cyan:D?d("\x1B[36m","\x1B[39m"):String,white:D?d("\x1B[37m","\x1B[39m"):String,gray:D?d("\x1B[90m","\x1B[39m"):String,bgBlack:D?d("\x1B[40m","\x1B[49m"):String,bgRed:D?d("\x1B[41m","\x1B[49m"):String,bgGreen:D?d("\x1B[42m","\x1B[49m"):String,bgYellow:D?d("\x1B[43m","\x1B[49m"):String,bgBlue:D?d("\x1B[44m","\x1B[49m"):String,bgMagenta:D?d("\x1B[45m","\x1B[49m"):String,bgCyan:D?d("\x1B[46m","\x1B[49m"):String,bgWhite:D?d("\x1B[47m","\x1B[49m"):String});S.exports=xD(),S.exports.createColors=xD;var Me=function(D,e){e||(e={});var t=e.hsep===void 0?" ":e.hsep,n=e.align||[],s=e.stringLength||function(o){return String(o).length},r=SD(D,function(o,i){return wD(i,function(F,l){var C=$D(F);(!o[l]||C>o[l])&&(o[l]=C)}),o},[]),u=lu(D,function(o){return lu(o,function(i,F){var l=String(i);if(n[F]==="."){var C=$D(l),E=r[F]+(/\./.test(l)?1:2)-(s(l)-C);return l+Array(E).join(" ")}else return l})}),a=SD(u,function(o,i){return wD(i,function(F,l){var C=s(F);(!o[l]||C>o[l])&&(o[l]=C)}),o},[]);return lu(u,function(o){return lu(o,function(i,F){var l=a[F]-s(i)||0,C=Array(Math.max(l+1,1)).join(" ");return n[F]==="r"||n[F]==="."?C+i:n[F]==="c"?Array(Math.ceil(l/2+1)).join(" ")+i+Array(Math.floor(l/2+1)).join(" "):i+C}).join(t).replace(/\s+$/,"")}).join(`
64
+ `)};function $D(D){var e=/\.[^.]*$/.exec(D);return e?e.index+1:D.length}function SD(D,e,t){if(D.reduce)return D.reduce(e,t);for(var n=0,s=arguments.length>=3?t:D[n++];n<D.length;n++)e(s,D[n],n);return s}function wD(D,e){if(D.forEach)return D.forEach(e);for(var t=0;t<D.length;t++)e.call(D,D[t],t)}function lu(D,e){if(D.map)return D.map(e);for(var t=[],n=0;n<D.length;n++)t.push(e.call(D,D[n],n));return t}function Te({onlyFirst:D=!1}={}){const 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,D?void 0:"g")}function Le(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(Te(),"")}var bD={exports:{}};(function(D){var e={};D.exports=e,e.eastAsianWidth=function(n){var s=n.charCodeAt(0),r=n.length==2?n.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=r&&r<=57343&&(s&=1023,r&=1023,u=s<<10|r,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},e.characterLength=function(n){var s=this.eastAsianWidth(n);return s=="F"||s=="W"||s=="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var s=t(n),r=0,u=0;u<s.length;u++)r=r+this.characterLength(s[u]);return r},e.slice=function(n,s,r){textLen=e.length(n),s=s||0,r=r||1,s<0&&(s=textLen+s),r<0&&(r=textLen+r);for(var u="",a=0,o=t(n),i=0;i<o.length;i++){var F=o[i],l=e.length(F);if(a>=s-(l==2?1:0))if(a+l<=r)u+=F;else break;a+=l}return u}})(bD);var Ne=bD.exports,ke=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};function Ie(D,e={}){if(typeof D!="string"||D.length===0||(e={ambiguousIsNarrow:!0,...e},D=Le(D),D.length===0))return 0;D=D.replace(ke()," ");const t=e.ambiguousIsNarrow?1:2;let n=0;for(const s of D){const r=s.codePointAt(0);if(!(r<=31||r>=127&&r<=159||r>=768&&r<=879))switch(Ne.eastAsianWidth(s)){case"F":case"W":n+=2;break;case"A":n+=t;break;default:n+=1}}return n}const Nu=D=>Me(D,{stringLength:Ie}),tu=D=>Nu(D).split(`
65
+ `),yD=new Map([[Boolean,""],[String,"string"],[Number,"number"]]),vD=(D,e=!1)=>{const t=yD.has(D)?yD.get(D):"value";return e?`[${t}]`:`<${t}>`},Re=(D,e)=>D===B?-1:e===B?1:D.length-e.length,ku=S.exports.yellow("-"),OD=D=>{process.stdout.write(D)},Iu=(D,e,t)=>{const{t:n}=e.i18n,s=[{title:n("help.name"),body:S.exports.red(e._name)},{title:n("help.version"),body:S.exports.yellow(e._version)}];t&&s.push({title:n("help.subcommand"),body:S.exports.green(`${e._name} ${U(t.name)}`)}),D.push({type:"inline",items:s}),D.push({title:n("help.description"),body:[(t==null?void 0:t.description)||e._description]})},_D=(D,e,t)=>{const n=e.map(([s,r])=>[s,ku,r]);D.push({title:t("help.examples"),body:tu(n)})},Ru=D=>Object.entries(D).map(([e,t])=>{const n=[fD(e)];t.alias&&n.push(fD(t.alias));const s=[S.exports.blue(n.join(", "))];if(s.push(ku,t.description),t.type){const r=vD(t.type);s.push(S.exports.gray(`(${r})`))}return s}),P=D=>{const e=[];for(const t of D){if(t.type==="block"||!t.type){const n=" ",s=t.body.map(u=>n+u);s.unshift("");const r=s.join(`
66
+ `);e.push(Nu([[S.exports.bold(`${t.title}:`)],[r]]).toString())}else if(t.type==="inline"){const n=t.items.map(r=>[S.exports.bold(`${r.title}:`),r.body]),s=Nu(n);e.push(s.toString())}e.push("")}return e.join(`
67
+ `)},je={renderFlagName:D=>D,renderSections:D=>D,renderType:(D,e)=>vD(D,e),renderDefault:D=>JSON.stringify(D)},We={en:{"help.name":"Name","help.version":"Version","help.subcommand":"Subcommand","help.commands":"Commands","help.globalFlags":"Global Flags","help.flags":"Flags","help.description":"Description","help.usage":"Usage","help.examples":"Examples","help.notes":"Notes","help.notes.1":"If no command is specified, show help for the CLI.","help.notes.2":"If a command is specified, show help for the command.","help.notes.3":"-h is an alias for --help.","help.examples.1":"Show help","help.examples.2":"Show help for a specific command","help.commandDescription":"Show help","help.default":"Default: "},"zh-CN":{"help.name":"\u540D\u79F0","help.version":"\u7248\u672C","help.subcommand":"\u5B50\u547D\u4EE4","help.commands":"\u547D\u4EE4","help.globalFlags":"\u5168\u5C40\u6807\u5FD7","help.flags":"\u6807\u5FD7","help.description":"\u63CF\u8FF0","help.usage":"\u4F7F\u7528","help.examples":"\u793A\u4F8B","help.notes":"\u5907\u6CE8","help.notes.1":"\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u5C55\u793A\u54EA\u4E2A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u5C55\u793ACLI\u7684\u3002","help.notes.2":"\u5982\u679C\u6307\u5B9A\u4E86\u5219\u5C55\u793A\u8BE5\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\u3002","help.notes.3":"-h \u662F --help \u7684\u4E00\u4E2A\u522B\u540D\u3002","help.examples.1":"\u5C55\u793A CLI \u7684\u5E2E\u52A9\u4FE1\u606F","help.examples.2":"\u5C55\u793A\u6307\u5B9A\u547D\u4EE4\u7684\u5E2E\u52A9\u4FE1\u606F","help.commandDescription":"\u5C55\u793A\u5E2E\u52A9\u4FE1\u606F","help.default":"\u9ED8\u8BA4\u503C: %s"}},cu=(D,e,t,n)=>{const{cli:s}=e,{t:r}=s.i18n,u=[];Iu(u,s),u.push({title:r("help.usage"),body:[S.exports.magenta(`$ ${s._name} ${sD("command",e.hasRootOrAlias)} [flags]`)]});const a=[...e.hasRoot?[s._commands[B]]:[],...Object.values(s._commands)].map(i=>{const F=[typeof i.name=="symbol"?"":i.name,...ye(i.alias||[])].sort(Re).map(l=>l===""||typeof l=="symbol"?`${s._name}`:`${s._name} ${l}`).join(", ");return[S.exports.cyan(F),ku,i.description]});a.length&&u.push({title:r("help.commands"),body:tu(a)});const o=Ru(s._flags);return o.length&&u.push({title:r("help.globalFlags"),body:tu(o)}),t&&u.push({title:r("help.notes"),body:t}),n&&_D(u,n,r),D(u)},ju=(D,e,t)=>{var n;const{cli:s}=e,{t:r}=s.i18n,[u]=eD(s._commands,t,r);if(!u)throw new ou(U(t),r);const a=Object.assign({},je,u.help);let o=[];t===B?Iu(o,s):Iu(o,s,{...u,name:U(t)});const i=((n=u.parameters)==null?void 0:n.join(" "))||void 0,F=t===B?"":` ${U(t)}`,l=i?` ${i}`:"",C=u.flags?" [flags]":"";o.push({title:r("help.usage"),body:[S.exports.magenta(`$ ${s._name}${F}${l}${C}`)]});const E=Ru(s._flags);return E.length&&o.push({title:r("help.globalFlags"),body:tu(E)}),u.flags&&o.push({title:r("help.flags"),body:tu(Ru(u.flags))}),u.notes&&o.push({title:r("help.notes"),body:u.notes}),u.examples&&_D(o,u.examples,r),o=a.renderSections(o),D(o)},Pe=({command:D=!0,flag:e=!0,showHelpWhenNoCommand:t=!0,notes:n,examples:s,banner:r}={})=>W({setup:u=>{const{add:a,t:o}=u.i18n;a(We);const i=F=>{r&&OD(`${r}
68
+ `),OD(F)};return D&&(u=u.command("help",o("help.helpDdescription"),{parameters:["[command...]"],notes:[o("help.notes.1"),o("help.notes.2"),o("help.notes.3")],examples:[[`$ ${u._name} help`,o("help.examples.1")],[`$ ${u._name} help <command>`,o("help.examples.2")],[`$ ${u._name} <command> --help`,o("help.examples.2")]]}).on("help",F=>{F.parameters.command.length?i(ju(P,F,F.parameters.command)):i(cu(P,F,n,s))})),e&&(u=u.flag("help",o("help.helpDdescription"),{alias:"h",type:Boolean,default:!1})),u.inspector((F,l)=>{const C=F.flags.help;if(!F.hasRootOrAlias&&!F.raw._.length&&t&&!C){let E=`${o("core.noCommandGiven")}
69
69
 
70
- `;C+=lu(P,F,t,n),C+=`
71
- `,o(C),process.exit(1)}else c?F.raw._.length?F.called!==p&&F.name===p?o(lu(P,F,t,n)):o(Iu(P,F,F.raw._)):F.hasRootOrAlias?o(Iu(P,F,p)):o(lu(P,F,t,n)):i()}),r}}),je={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},We=(D,{add:e,t})=>(e(je),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),N=new Uint32Array(65536),Pe=(D,e)=>{const t=D.length,n=e.length,s=1<<t-1;let r=-1,u=0,a=t,o=t;for(;o--;)N[D.charCodeAt(o)]|=1<<o;for(o=0;o<n;o++){let F=N[e.charCodeAt(o)];const i=F|u;F|=(F&r)+r^r,u|=~(F|r),r&=F,u&s&&a++,r&s&&a--,u=u<<1|1,r=r<<1|~(i|u),u&=i}for(o=t;o--;)N[D.charCodeAt(o)]=0;return a},He=(D,e)=>{const t=e.length,n=D.length,s=[],r=[],u=Math.ceil(t/32),a=Math.ceil(n/32);for(let l=0;l<u;l++)r[l]=-1,s[l]=0;let o=0;for(;o<a-1;o++){let l=0,B=-1;const h=o*32,y=Math.min(32,n)+h;for(let A=h;A<y;A++)N[D.charCodeAt(A)]|=1<<A;for(let A=0;A<t;A++){const H=N[e.charCodeAt(A)],_=r[A/32|0]>>>A&1,O=s[A/32|0]>>>A&1,Ru=H|l,ju=((H|O)&B)+B^B|H|O;let z=l|~(ju|B),nu=B&ju;z>>>31^_&&(r[A/32|0]^=1<<A),nu>>>31^O&&(s[A/32|0]^=1<<A),z=z<<1|_,nu=nu<<1|O,B=nu|~(Ru|z),l=z&Ru}for(let A=h;A<y;A++)N[D.charCodeAt(A)]=0}let F=0,i=-1;const c=o*32,C=Math.min(32,n-c)+c;for(let l=c;l<C;l++)N[D.charCodeAt(l)]|=1<<l;let E=n;for(let l=0;l<t;l++){const B=N[e.charCodeAt(l)],h=r[l/32|0]>>>l&1,y=s[l/32|0]>>>l&1,A=B|F,H=((B|y)&i)+i^i|B|y;let _=F|~(H|i),O=i&H;E+=_>>>n-1&1,E-=O>>>n-1&1,_>>>31^h&&(r[l/32|0]^=1<<l),O>>>31^y&&(s[l/32|0]^=1<<l),_=_<<1|h,O=O<<1|y,i=O|~(A|_),F=_&A}for(let l=c;l<C;l++)N[D.charCodeAt(l)]=0;return E},yD=(D,e)=>{if(D.length<e.length){const t=e;e=D,D=t}return e.length===0?D.length:D.length<=32?Pe(D,e):He(D,e)};var cu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ue=1/0,Ye="[object Symbol]",qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ze="\\u0300-\\u036f\\ufe20-\\ufe23",Ge="\\u20d0-\\u20f0",Ve="["+ze+Ge+"]",Ze=RegExp(Ve,"g"),Je={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Ke=typeof cu=="object"&&cu&&cu.Object===Object&&cu,Qe=typeof self=="object"&&self&&self.Object===Object&&self,Xe=Ke||Qe||Function("return this")();function ut(D){return function(e){return D==null?void 0:D[e]}}var Dt=ut(Je),et=Object.prototype,tt=et.toString,vD=Xe.Symbol,OD=vD?vD.prototype:void 0,MD=OD?OD.toString:void 0;function nt(D){if(typeof D=="string")return D;if(st(D))return MD?MD.call(D):"";var e=D+"";return e=="0"&&1/D==-Ue?"-0":e}function rt(D){return!!D&&typeof D=="object"}function st(D){return typeof D=="symbol"||rt(D)&&tt.call(D)==Ye}function ot(D){return D==null?"":nt(D)}function at(D){return D=ot(D),D&&D.replace(qe,Dt).replace(Ze,"")}var Ft=at;let S,v;(function(D){D.ALL_CLOSEST_MATCHES="all-closest-matches",D.ALL_MATCHES="all-matches",D.ALL_SORTED_MATCHES="all-sorted-matches",D.FIRST_CLOSEST_MATCH="first-closest-match",D.FIRST_MATCH="first-match"})(S||(S={})),function(D){D.EDIT_DISTANCE="edit-distance",D.SIMILARITY="similarity"}(v||(v={}));const _D=new Error("unknown returnType"),Eu=new Error("unknown thresholdType"),TD=(D,e)=>{let t=D;return e.trimSpaces&&(t=t.trim().replace(/\s+/g," ")),e.deburr&&(t=Ft(t)),e.caseSensitive||(t=t.toLowerCase()),t},ND=(D,e)=>{const{matchPath:t}=e,n=((s,r)=>{const u=r.length>0?r.reduce((a,o)=>a==null?void 0:a[o],s):s;return typeof u!="string"?"":u})(D,t);return TD(n,e)};function it(D,e,t){const n=(C=>{const E={caseSensitive:!1,deburr:!0,matchPath:[],returnType:S.FIRST_CLOSEST_MATCH,thresholdType:v.SIMILARITY,trimSpaces:!0,...C};switch(E.thresholdType){case v.EDIT_DISTANCE:return{threshold:20,...E};case v.SIMILARITY:return{threshold:.4,...E};default:throw Eu}})(t),{returnType:s,threshold:r,thresholdType:u}=n,a=TD(D,n);let o,F;switch(u){case v.EDIT_DISTANCE:o=C=>C<=r,F=C=>yD(a,ND(C,n));break;case v.SIMILARITY:o=C=>C>=r,F=C=>((E,l)=>{if(!E||!l)return 0;if(E===l)return 1;const B=yD(E,l),h=Math.max(E.length,l.length);return(h-B)/h})(a,ND(C,n));break;default:throw Eu}const i=[],c=e.length;switch(s){case S.ALL_CLOSEST_MATCHES:case S.FIRST_CLOSEST_MATCH:{const C=[];let E;switch(u){case v.EDIT_DISTANCE:E=1/0;for(let B=0;B<c;B+=1){const h=F(e[B]);E>h&&(E=h),C.push(h)}break;case v.SIMILARITY:E=0;for(let B=0;B<c;B+=1){const h=F(e[B]);E<h&&(E=h),C.push(h)}break;default:throw Eu}const l=C.length;for(let B=0;B<l;B+=1){const h=C[B];o(h)&&h===E&&i.push(B)}break}case S.ALL_MATCHES:for(let C=0;C<c;C+=1)o(F(e[C]))&&i.push(C);break;case S.ALL_SORTED_MATCHES:{const C=[];for(let E=0;E<c;E+=1){const l=F(e[E]);o(l)&&C.push({score:l,index:E})}switch(u){case v.EDIT_DISTANCE:C.sort((E,l)=>E.score-l.score);break;case v.SIMILARITY:C.sort((E,l)=>l.score-E.score);break;default:throw Eu}for(const E of C)i.push(E.index);break}case S.FIRST_MATCH:for(let C=0;C<c;C+=1)if(o(F(e[C]))){i.push(C);break}break;default:throw _D}return((C,E,l)=>{switch(l){case S.ALL_CLOSEST_MATCHES:case S.ALL_MATCHES:case S.ALL_SORTED_MATCHES:return E.map(B=>C[B]);case S.FIRST_CLOSEST_MATCH:case S.FIRST_MATCH:return E.length?C[E[0]]:null;default:throw _D}})(e,i,s)}var mu={exports:{}};let Ct=Bu,lt=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Ct.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),g=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+LD(s,e,t,r)+e:D+s+e},LD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+LD(r,e,t,u):s+r},kD=(D=lt)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?g("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?g("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?g("\x1B[3m","\x1B[23m"):String,underline:D?g("\x1B[4m","\x1B[24m"):String,inverse:D?g("\x1B[7m","\x1B[27m"):String,hidden:D?g("\x1B[8m","\x1B[28m"):String,strikethrough:D?g("\x1B[9m","\x1B[29m"):String,black:D?g("\x1B[30m","\x1B[39m"):String,red:D?g("\x1B[31m","\x1B[39m"):String,green:D?g("\x1B[32m","\x1B[39m"):String,yellow:D?g("\x1B[33m","\x1B[39m"):String,blue:D?g("\x1B[34m","\x1B[39m"):String,magenta:D?g("\x1B[35m","\x1B[39m"):String,cyan:D?g("\x1B[36m","\x1B[39m"):String,white:D?g("\x1B[37m","\x1B[39m"):String,gray:D?g("\x1B[90m","\x1B[39m"):String,bgBlack:D?g("\x1B[40m","\x1B[49m"):String,bgRed:D?g("\x1B[41m","\x1B[49m"):String,bgGreen:D?g("\x1B[42m","\x1B[49m"):String,bgYellow:D?g("\x1B[43m","\x1B[49m"):String,bgBlue:D?g("\x1B[44m","\x1B[49m"):String,bgMagenta:D?g("\x1B[45m","\x1B[49m"):String,bgCyan:D?g("\x1B[46m","\x1B[49m"):String,bgWhite:D?g("\x1B[47m","\x1B[49m"):String});mu.exports=kD(),mu.exports.createColors=kD;const ct={en:{"notFound.possibleCommands":"Possible commands: %s.","notFound.commandNotFound":'Command "%s" not found.',"notFound.didyoumean":'Did you mean "%s"?',"notFound.commandNotRegisteredNote":"NOTE: You haven't register any command yet."},"zh-CN":{"notFound.possibleCommands":"\u53EF\u80FD\u7684\u547D\u4EE4: %s\u3002","notFound.commandNotFound":'\u672A\u627E\u5230\u547D\u4EE4 "%s"\u3002',"notFound.didyoumean":'\u4F60\u662F\u4E0D\u662F\u6307 "%s"\uFF1F',"notFound.commandNotRegisteredNote":"\u63D0\u793A: \u4F60\u8FD8\u6CA1\u6709\u6CE8\u518C\u4EFB\u4F55\u547D\u4EE4\u3002"}},Et=()=>W({setup:D=>{const{t:e,add:t}=D.i18n;return t(ct),D.inspector({enforce:"pre",fn:(n,s)=>{const r=Object.keys(D._commands),u=!!r.length;try{s()}catch(a){if(!(a instanceof ou||a instanceof au))throw a;if(n.raw._.length===0||a instanceof au){console.error(e("core.noCommandGiven")),u&&console.error(e("notFound.possibleCommands",We(r,D.i18n)));return}const o=a.commandName,F=it(o,r);console.error(e("notFound.commandNotFound",mu.exports.strikethrough(o))),u&&F?console.error(e("notFound.didyoumean",mu.exports.bold(F))):u||console.error(e("notFound.commandNotRegisteredNote")),process.stderr.write(`
72
- `),process.exit(2)}}})}}),mt={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},ID=(D,{add:e,t})=>(e(mt),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),Bt={en:{"strictFlags.unexpectedSingle":"Unexpected flag: %s.","strictFlags.unexpectedMore":"Unexpected flags: %s.","strictFlags.and":"%s and %s"},"zh-CN":{"strictFlags.unexpectedSingle":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.unexpectedMore":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.and":"%s \u548C %s"}},ht=()=>W({setup:D=>{const{add:e,t}=D.i18n;return e(Bt),D.inspector((n,s)=>{const r=Object.keys(n.unknownFlags);if(!n.resolved||r.length===0)s();else throw r.length>1?new Error(t("strictFlags.unexpectedMore",ID(r,D.i18n))):new Error(t("strictFlags.unexpectedSingle",ID(r,D.i18n)))})}}),pt=D=>D.length===0?"":D.startsWith("v")?D:`v${D}`,dt={en:{"version.commandDescription":"Show CLI version","version.notes.1":'The version string begins with a "v".'},"zh-CN":{"version.commandDescription":"\u5C55\u793A CLI \u7248\u672C","version.notes.1":'\u7248\u672C\u53F7\u5F00\u5934\u5E26\u6709 "v"\u3002'}},gt=({alias:D=["V"],command:e=!0}={})=>W({setup:t=>{const{add:n,t:s}=t.i18n;n(dt);const r=pt(t._version);return e&&(t=t.command("version",s("version.commandDescription"),{notes:[s("version.notes.1")]}).on("version",()=>{process.stdout.write(r)})),t.inspector({enforce:"pre",fn:(u,a)=>{let o=!1;const F=["version",...D];for(const i of Object.keys(u.raw.mergedFlags))if(F.includes(i)){o=!0;break}o?process.stdout.write(r):a()}})}});var L={exports:{}};let ft=Bu,At=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||ft.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),f=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+RD(s,e,t,r)+e:D+s+e},RD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+RD(r,e,t,u):s+r},jD=(D=At)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?f("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?f("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?f("\x1B[3m","\x1B[23m"):String,underline:D?f("\x1B[4m","\x1B[24m"):String,inverse:D?f("\x1B[7m","\x1B[27m"):String,hidden:D?f("\x1B[8m","\x1B[28m"):String,strikethrough:D?f("\x1B[9m","\x1B[29m"):String,black:D?f("\x1B[30m","\x1B[39m"):String,red:D?f("\x1B[31m","\x1B[39m"):String,green:D?f("\x1B[32m","\x1B[39m"):String,yellow:D?f("\x1B[33m","\x1B[39m"):String,blue:D?f("\x1B[34m","\x1B[39m"):String,magenta:D?f("\x1B[35m","\x1B[39m"):String,cyan:D?f("\x1B[36m","\x1B[39m"):String,white:D?f("\x1B[37m","\x1B[39m"):String,gray:D?f("\x1B[90m","\x1B[39m"):String,bgBlack:D?f("\x1B[40m","\x1B[49m"):String,bgRed:D?f("\x1B[41m","\x1B[49m"):String,bgGreen:D?f("\x1B[42m","\x1B[49m"):String,bgYellow:D?f("\x1B[43m","\x1B[49m"):String,bgBlue:D?f("\x1B[44m","\x1B[49m"):String,bgMagenta:D?f("\x1B[45m","\x1B[49m"):String,bgCyan:D?f("\x1B[46m","\x1B[49m"):String,bgWhite:D?f("\x1B[47m","\x1B[49m"):String});L.exports=jD(),L.exports.createColors=jD;function xt(D){return D.split(`
73
- `).splice(1).map(e=>e.trim().replace("file://",""))}function $t(D){return`
74
- ${xt(D).map(e=>` ${e.replace(/^at ([\s\S]+) \((.+)\)/,(t,n,s)=>L.exports.gray(`at ${n} (${L.exports.cyan(s)})`))}`).join(`
75
- `)}`}function St(D){return D.map(e=>typeof(e==null?void 0:e.stack)=="string"?`${e.message}
76
- ${$t(e.stack)}`:e)}function wt(D,e){const t=D.toUpperCase(),n=L.exports[e];return L.exports.bold(L.exports.inverse(n(` ${t} `)))}function tu(D,e,t){const n=L.exports[e],s=t!=null&&t.textColor?L.exports[t.textColor]:n,r=(t==null?void 0:t.target)||console.log;return(...u)=>{const a=St(u);r(`${wt(D,e)} ${s(a.join(" "))}
77
- `)}}tu("log","gray"),tu("info","blue",{target:console.info}),tu("warn","yellow",{target:console.warn}),tu("success","green");const bt=tu("error","red",{target:console.error}),yt=()=>W({setup:D=>D.errorHandler(e=>{bt(e.message),process.exit(1)})});export{me as Clerc,Yu as CommandExistsError,qu as CommandNameConflictError,Gu as DescriptionNotSetError,Zu as InvalidCommandNameError,du as LocaleNotCalledFirstError,zu as NameNotSetError,au as NoCommandGivenError,ou as NoSuchCommandError,p as Root,Vu as VersionNotSetError,$e as completionsPlugin,eD as compose,pe as defineCommand,Be as defineHandler,he as defineInspector,W as definePlugin,rD as detectLocale,U as formatCommandName,yt as friendlyErrorPlugin,Re as helpPlugin,tD as isValidName,Et as notFoundPlugin,fu as resolveArgv,Qu as resolveCommand,Xu as resolveCommandStrict,gu as resolveFlattenCommands,DD as resolveParametersBeforeFlag,Ce as resolveRootCommands,uD as resolveSubcommandsByParent,ht as strictFlagsPlugin,gt as versionPlugin,nD as withBrackets};
70
+ `;E+=cu(P,F,n,s),E+=`
71
+ `,i(E),process.exit(1)}else C?F.raw._.length?F.called!==B&&F.name===B?i(cu(P,F,n,s)):i(ju(P,F,F.raw._)):F.hasRootOrAlias?i(ju(P,F,B)):i(cu(P,F,n,s)):l()}),u}}),He={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},Ue=(D,{add:e,t})=>(e(He),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),T=new Uint32Array(65536),Ye=(D,e)=>{const t=D.length,n=e.length,s=1<<t-1;let r=-1,u=0,a=t,o=t;for(;o--;)T[D.charCodeAt(o)]|=1<<o;for(o=0;o<n;o++){let i=T[e.charCodeAt(o)];const F=i|u;i|=(i&r)+r^r,u|=~(i|r),r&=i,u&s&&a++,r&s&&a--,u=u<<1|1,r=r<<1|~(F|u),u&=F}for(o=t;o--;)T[D.charCodeAt(o)]=0;return a},qe=(D,e)=>{const t=e.length,n=D.length,s=[],r=[],u=Math.ceil(t/32),a=Math.ceil(n/32);for(let c=0;c<u;c++)r[c]=-1,s[c]=0;let o=0;for(;o<a-1;o++){let c=0,h=-1;const p=o*32,k=Math.min(32,n)+p;for(let A=p;A<k;A++)T[D.charCodeAt(A)]|=1<<A;for(let A=0;A<t;A++){const H=T[e.charCodeAt(A)],_=r[A/32|0]>>>A&1,v=s[A/32|0]>>>A&1,Wu=H|c,Pu=((H|v)&h)+h^h|H|v;let z=c|~(Pu|h),ru=h&Pu;z>>>31^_&&(r[A/32|0]^=1<<A),ru>>>31^v&&(s[A/32|0]^=1<<A),z=z<<1|_,ru=ru<<1|v,h=ru|~(Wu|z),c=z&Wu}for(let A=p;A<k;A++)T[D.charCodeAt(A)]=0}let i=0,F=-1;const l=o*32,C=Math.min(32,n-l)+l;for(let c=l;c<C;c++)T[D.charCodeAt(c)]|=1<<c;let E=n;for(let c=0;c<t;c++){const h=T[e.charCodeAt(c)],p=r[c/32|0]>>>c&1,k=s[c/32|0]>>>c&1,A=h|i,H=((h|k)&F)+F^F|h|k;let _=i|~(H|F),v=F&H;E+=_>>>n-1&1,E-=v>>>n-1&1,_>>>31^p&&(r[c/32|0]^=1<<c),v>>>31^k&&(s[c/32|0]^=1<<c),_=_<<1|p,v=v<<1|k,F=v|~(A|_),i=_&A}for(let c=l;c<C;c++)T[D.charCodeAt(c)]=0;return E},MD=(D,e)=>{if(D.length<e.length){const t=e;e=D,D=t}return e.length===0?D.length:D.length<=32?Ye(D,e):qe(D,e)};var Eu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ze=1/0,Ge="[object Symbol]",Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ve="\\u0300-\\u036f\\ufe20-\\ufe23",Je="\\u20d0-\\u20f0",Ke="["+Ve+Je+"]",Qe=RegExp(Ke,"g"),Xe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},ut=typeof Eu=="object"&&Eu&&Eu.Object===Object&&Eu,Dt=typeof self=="object"&&self&&self.Object===Object&&self,et=ut||Dt||Function("return this")();function tt(D){return function(e){return D==null?void 0:D[e]}}var nt=tt(Xe),rt=Object.prototype,st=rt.toString,TD=et.Symbol,LD=TD?TD.prototype:void 0,ND=LD?LD.toString:void 0;function ot(D){if(typeof D=="string")return D;if(it(D))return ND?ND.call(D):"";var e=D+"";return e=="0"&&1/D==-ze?"-0":e}function at(D){return!!D&&typeof D=="object"}function it(D){return typeof D=="symbol"||at(D)&&st.call(D)==Ge}function Ft(D){return D==null?"":ot(D)}function Ct(D){return D=Ft(D),D&&D.replace(Ze,nt).replace(Qe,"")}var lt=Ct;let w,y;(function(D){D.ALL_CLOSEST_MATCHES="all-closest-matches",D.ALL_MATCHES="all-matches",D.ALL_SORTED_MATCHES="all-sorted-matches",D.FIRST_CLOSEST_MATCH="first-closest-match",D.FIRST_MATCH="first-match"})(w||(w={})),function(D){D.EDIT_DISTANCE="edit-distance",D.SIMILARITY="similarity"}(y||(y={}));const kD=new Error("unknown returnType"),mu=new Error("unknown thresholdType"),ID=(D,e)=>{let t=D;return e.trimSpaces&&(t=t.trim().replace(/\s+/g," ")),e.deburr&&(t=lt(t)),e.caseSensitive||(t=t.toLowerCase()),t},RD=(D,e)=>{const{matchPath:t}=e,n=((s,r)=>{const u=r.length>0?r.reduce((a,o)=>a==null?void 0:a[o],s):s;return typeof u!="string"?"":u})(D,t);return ID(n,e)};function ct(D,e,t){const n=(C=>{const E={caseSensitive:!1,deburr:!0,matchPath:[],returnType:w.FIRST_CLOSEST_MATCH,thresholdType:y.SIMILARITY,trimSpaces:!0,...C};switch(E.thresholdType){case y.EDIT_DISTANCE:return{threshold:20,...E};case y.SIMILARITY:return{threshold:.4,...E};default:throw mu}})(t),{returnType:s,threshold:r,thresholdType:u}=n,a=ID(D,n);let o,i;switch(u){case y.EDIT_DISTANCE:o=C=>C<=r,i=C=>MD(a,RD(C,n));break;case y.SIMILARITY:o=C=>C>=r,i=C=>((E,c)=>{if(!E||!c)return 0;if(E===c)return 1;const h=MD(E,c),p=Math.max(E.length,c.length);return(p-h)/p})(a,RD(C,n));break;default:throw mu}const F=[],l=e.length;switch(s){case w.ALL_CLOSEST_MATCHES:case w.FIRST_CLOSEST_MATCH:{const C=[];let E;switch(u){case y.EDIT_DISTANCE:E=1/0;for(let h=0;h<l;h+=1){const p=i(e[h]);E>p&&(E=p),C.push(p)}break;case y.SIMILARITY:E=0;for(let h=0;h<l;h+=1){const p=i(e[h]);E<p&&(E=p),C.push(p)}break;default:throw mu}const c=C.length;for(let h=0;h<c;h+=1){const p=C[h];o(p)&&p===E&&F.push(h)}break}case w.ALL_MATCHES:for(let C=0;C<l;C+=1)o(i(e[C]))&&F.push(C);break;case w.ALL_SORTED_MATCHES:{const C=[];for(let E=0;E<l;E+=1){const c=i(e[E]);o(c)&&C.push({score:c,index:E})}switch(u){case y.EDIT_DISTANCE:C.sort((E,c)=>E.score-c.score);break;case y.SIMILARITY:C.sort((E,c)=>c.score-E.score);break;default:throw mu}for(const E of C)F.push(E.index);break}case w.FIRST_MATCH:for(let C=0;C<l;C+=1)if(o(i(e[C]))){F.push(C);break}break;default:throw kD}return((C,E,c)=>{switch(c){case w.ALL_CLOSEST_MATCHES:case w.ALL_MATCHES:case w.ALL_SORTED_MATCHES:return E.map(h=>C[h]);case w.FIRST_CLOSEST_MATCH:case w.FIRST_MATCH:return E.length?C[E[0]]:null;default:throw kD}})(e,F,s)}var hu={exports:{}};let Et=Bu,mt=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Et.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),g=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+jD(s,e,t,r)+e:D+s+e},jD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+jD(r,e,t,u):s+r},WD=(D=mt)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?g("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?g("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?g("\x1B[3m","\x1B[23m"):String,underline:D?g("\x1B[4m","\x1B[24m"):String,inverse:D?g("\x1B[7m","\x1B[27m"):String,hidden:D?g("\x1B[8m","\x1B[28m"):String,strikethrough:D?g("\x1B[9m","\x1B[29m"):String,black:D?g("\x1B[30m","\x1B[39m"):String,red:D?g("\x1B[31m","\x1B[39m"):String,green:D?g("\x1B[32m","\x1B[39m"):String,yellow:D?g("\x1B[33m","\x1B[39m"):String,blue:D?g("\x1B[34m","\x1B[39m"):String,magenta:D?g("\x1B[35m","\x1B[39m"):String,cyan:D?g("\x1B[36m","\x1B[39m"):String,white:D?g("\x1B[37m","\x1B[39m"):String,gray:D?g("\x1B[90m","\x1B[39m"):String,bgBlack:D?g("\x1B[40m","\x1B[49m"):String,bgRed:D?g("\x1B[41m","\x1B[49m"):String,bgGreen:D?g("\x1B[42m","\x1B[49m"):String,bgYellow:D?g("\x1B[43m","\x1B[49m"):String,bgBlue:D?g("\x1B[44m","\x1B[49m"):String,bgMagenta:D?g("\x1B[45m","\x1B[49m"):String,bgCyan:D?g("\x1B[46m","\x1B[49m"):String,bgWhite:D?g("\x1B[47m","\x1B[49m"):String});hu.exports=WD(),hu.exports.createColors=WD;const ht={en:{"notFound.possibleCommands":"Possible commands: %s.","notFound.commandNotFound":'Command "%s" not found.',"notFound.didyoumean":'Did you mean "%s"?',"notFound.commandNotRegisteredNote":"NOTE: You haven't register any command yet."},"zh-CN":{"notFound.possibleCommands":"\u53EF\u80FD\u7684\u547D\u4EE4: %s\u3002","notFound.commandNotFound":'\u672A\u627E\u5230\u547D\u4EE4 "%s"\u3002',"notFound.didyoumean":'\u4F60\u662F\u4E0D\u662F\u6307 "%s"\uFF1F',"notFound.commandNotRegisteredNote":"\u63D0\u793A: \u4F60\u8FD8\u6CA1\u6709\u6CE8\u518C\u4EFB\u4F55\u547D\u4EE4\u3002"}},Bt=()=>W({setup:D=>{const{t:e,add:t}=D.i18n;return t(ht),D.inspector({enforce:"pre",fn:(n,s)=>{const r=Object.keys(D._commands),u=!!r.length;try{s()}catch(a){if(!(a instanceof ou||a instanceof au))throw a;if(n.raw._.length===0||a instanceof au){console.error(e("core.noCommandGiven")),u&&console.error(e("notFound.possibleCommands",Ue(r,D.i18n)));return}const o=a.commandName,i=ct(o,r);console.error(e("notFound.commandNotFound",hu.exports.strikethrough(o))),u&&i?console.error(e("notFound.didyoumean",hu.exports.bold(i))):u||console.error(e("notFound.commandNotRegisteredNote")),process.stderr.write(`
72
+ `),process.exit(2)}}})}}),pt={en:{"utils.and":"%s and %s"},"zh-CN":{"utils.and":"%s \u548C %s"}},PD=(D,{add:e,t})=>(e(pt),D.length<=1?D[0]:t("utils.and",D.slice(0,-1).join(", "),D[D.length-1])),dt={en:{"strictFlags.unexpectedSingle":"Unexpected flag: %s.","strictFlags.unexpectedMore":"Unexpected flags: %s.","strictFlags.and":"%s and %s"},"zh-CN":{"strictFlags.unexpectedSingle":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.unexpectedMore":"\u9884\u671F\u4E4B\u5916\u7684\u6807\u5FD7: %s\u3002","strictFlags.and":"%s \u548C %s"}},gt=()=>W({setup:D=>{const{add:e,t}=D.i18n;return e(dt),D.inspector((n,s)=>{const r=Object.keys(n.unknownFlags);if(!n.resolved||r.length===0)s();else throw r.length>1?new Error(t("strictFlags.unexpectedMore",PD(r,D.i18n))):new Error(t("strictFlags.unexpectedSingle",PD(r,D.i18n)))})}}),ft=D=>D.length===0?"":D.startsWith("v")?D:`v${D}`,At={en:{"version.description":"Show CLI version","version.notes.1":'The version string begins with a "v".'},"zh-CN":{"version.description":"\u5C55\u793A CLI \u7248\u672C","version.notes.1":'\u7248\u672C\u53F7\u5F00\u5934\u5E26\u6709 "v"\u3002'}},xt=({command:D=!0,flag:e=!0}={})=>W({setup:t=>{const{add:n,t:s}=t.i18n;n(At);const r=ft(t._version);return D&&(t=t.command("version",s("version.description"),{notes:[s("version.notes.1")]}).on("version",()=>{process.stdout.write(r)})),e&&(t=t.flag("version",s("version.description"),{alias:"V",type:Boolean,default:!1}),t.inspector({enforce:"pre",fn:(u,a)=>{u.flags.version?process.stdout.write(r):a()}})),t}});var L={exports:{}};let $t=Bu,St=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||$t.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),f=(D,e,t=D)=>n=>{let s=""+n,r=s.indexOf(e,D.length);return~r?D+HD(s,e,t,r)+e:D+s+e},HD=(D,e,t,n)=>{let s=D.substring(0,n)+t,r=D.substring(n+e.length),u=r.indexOf(e);return~u?s+HD(r,e,t,u):s+r},UD=(D=St)=>({isColorSupported:D,reset:D?e=>`\x1B[0m${e}\x1B[0m`:String,bold:D?f("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?f("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?f("\x1B[3m","\x1B[23m"):String,underline:D?f("\x1B[4m","\x1B[24m"):String,inverse:D?f("\x1B[7m","\x1B[27m"):String,hidden:D?f("\x1B[8m","\x1B[28m"):String,strikethrough:D?f("\x1B[9m","\x1B[29m"):String,black:D?f("\x1B[30m","\x1B[39m"):String,red:D?f("\x1B[31m","\x1B[39m"):String,green:D?f("\x1B[32m","\x1B[39m"):String,yellow:D?f("\x1B[33m","\x1B[39m"):String,blue:D?f("\x1B[34m","\x1B[39m"):String,magenta:D?f("\x1B[35m","\x1B[39m"):String,cyan:D?f("\x1B[36m","\x1B[39m"):String,white:D?f("\x1B[37m","\x1B[39m"):String,gray:D?f("\x1B[90m","\x1B[39m"):String,bgBlack:D?f("\x1B[40m","\x1B[49m"):String,bgRed:D?f("\x1B[41m","\x1B[49m"):String,bgGreen:D?f("\x1B[42m","\x1B[49m"):String,bgYellow:D?f("\x1B[43m","\x1B[49m"):String,bgBlue:D?f("\x1B[44m","\x1B[49m"):String,bgMagenta:D?f("\x1B[45m","\x1B[49m"):String,bgCyan:D?f("\x1B[46m","\x1B[49m"):String,bgWhite:D?f("\x1B[47m","\x1B[49m"):String});L.exports=UD(),L.exports.createColors=UD;function wt(D){return D.split(`
73
+ `).splice(1).map(e=>e.trim().replace("file://",""))}function bt(D){return`
74
+ ${wt(D).map(e=>` ${e.replace(/^at ([\s\S]+) \((.+)\)/,(t,n,s)=>L.exports.gray(`at ${n} (${L.exports.cyan(s)})`))}`).join(`
75
+ `)}`}const yt=/\r?\n/g;function vt(D){return D.map(e=>typeof(e==null?void 0:e.stack)=="string"?[e.message,bt(e.stack)]:typeof e=="string"?e.split(yt):e).flat()}function Ot(D,e){const t=D.toUpperCase(),n=L.exports[e];return L.exports.bold(L.exports.inverse(n(` ${t} `)))}function nu(D,e,{target:t=console.log,textColor:n,newline:s=!0}={}){const r=L.exports[e],u=n?L.exports[n]:r;return(...a)=>{const o=vt(a),i=Ot(D,e);for(const F of o)t(`${i} ${u(F)}${s?`
76
+ `:""}}`)}}nu("log","gray"),nu("info","blue",{target:console.info}),nu("warn","yellow",{target:console.warn}),nu("success","green");const _t=nu("error","red",{target:console.error}),Mt=()=>W({setup:D=>D.errorHandler(e=>{_t(e.message),process.exit(1)})});export{pe as Clerc,Gu as CommandExistsError,Zu as CommandNameConflictError,Ju as DescriptionNotSetError,Qu as InvalidCommandNameError,fu as LocaleNotCalledFirstError,Vu as NameNotSetError,au as NoCommandGivenError,ou as NoSuchCommandError,B as Root,Ku as VersionNotSetError,be as completionsPlugin,nD as compose,fe as defineCommand,de as defineHandler,ge as defineInspector,W as definePlugin,oD as detectLocale,U as formatCommandName,Mt as friendlyErrorPlugin,Pe as helpPlugin,rD as isValidName,Bt as notFoundPlugin,xu as resolveArgv,DD as resolveCommand,eD as resolveCommandStrict,Au as resolveFlattenCommands,Ee as resolveRootCommands,tD as resolveSubcommandsByParent,gt as strictFlagsPlugin,aD as stripFlags,xt as versionPlugin,sD as withBrackets};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clerc",
3
- "version": "0.32.1",
3
+ "version": "0.34.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "description": "Clerc: The full-featured cli framework.",
6
6
  "keywords": [
@@ -47,13 +47,13 @@
47
47
  "access": "public"
48
48
  },
49
49
  "devDependencies": {
50
- "@clerc/core": "0.32.1",
51
- "@clerc/plugin-version": "0.32.1",
52
- "@clerc/plugin-completions": "0.32.1",
53
- "@clerc/plugin-strict-flags": "0.32.1",
54
- "@clerc/plugin-friendly-error": "0.32.1",
55
- "@clerc/plugin-not-found": "0.32.1",
56
- "@clerc/plugin-help": "0.32.1"
50
+ "@clerc/core": "0.34.0",
51
+ "@clerc/plugin-completions": "0.34.0",
52
+ "@clerc/plugin-strict-flags": "0.34.0",
53
+ "@clerc/plugin-help": "0.34.0",
54
+ "@clerc/plugin-not-found": "0.34.0",
55
+ "@clerc/plugin-version": "0.34.0",
56
+ "@clerc/plugin-friendly-error": "0.34.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "puild --minify",