vidjutsu 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3348 @@
1
+ #!/usr/bin/env node
2
+ var __defProp = Object.defineProperty;
3
+ var __returnValue = (v) => v;
4
+ function __exportSetter(name, newValue) {
5
+ this[name] = __returnValue.bind(null, newValue);
6
+ }
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true,
12
+ configurable: true,
13
+ set: __exportSetter.bind(all, name)
14
+ });
15
+ };
16
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
17
+
18
+ // node_modules/consola/dist/core.mjs
19
+ function isPlainObject$1(value) {
20
+ if (value === null || typeof value !== "object") {
21
+ return false;
22
+ }
23
+ const prototype = Object.getPrototypeOf(value);
24
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
25
+ return false;
26
+ }
27
+ if (Symbol.iterator in value) {
28
+ return false;
29
+ }
30
+ if (Symbol.toStringTag in value) {
31
+ return Object.prototype.toString.call(value) === "[object Module]";
32
+ }
33
+ return true;
34
+ }
35
+ function _defu(baseObject, defaults, namespace = ".", merger) {
36
+ if (!isPlainObject$1(defaults)) {
37
+ return _defu(baseObject, {}, namespace, merger);
38
+ }
39
+ const object = Object.assign({}, defaults);
40
+ for (const key in baseObject) {
41
+ if (key === "__proto__" || key === "constructor") {
42
+ continue;
43
+ }
44
+ const value = baseObject[key];
45
+ if (value === null || value === undefined) {
46
+ continue;
47
+ }
48
+ if (merger && merger(object, key, value, namespace)) {
49
+ continue;
50
+ }
51
+ if (Array.isArray(value) && Array.isArray(object[key])) {
52
+ object[key] = [...value, ...object[key]];
53
+ } else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
54
+ object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
55
+ } else {
56
+ object[key] = value;
57
+ }
58
+ }
59
+ return object;
60
+ }
61
+ function createDefu(merger) {
62
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
63
+ }
64
+ function isPlainObject(obj) {
65
+ return Object.prototype.toString.call(obj) === "[object Object]";
66
+ }
67
+ function isLogObj(arg) {
68
+ if (!isPlainObject(arg)) {
69
+ return false;
70
+ }
71
+ if (!arg.message && !arg.args) {
72
+ return false;
73
+ }
74
+ if (arg.stack) {
75
+ return false;
76
+ }
77
+ return true;
78
+ }
79
+
80
+ class Consola {
81
+ options;
82
+ _lastLog;
83
+ _mockFn;
84
+ constructor(options = {}) {
85
+ const types = options.types || LogTypes;
86
+ this.options = defu({
87
+ ...options,
88
+ defaults: { ...options.defaults },
89
+ level: _normalizeLogLevel(options.level, types),
90
+ reporters: [...options.reporters || []]
91
+ }, {
92
+ types: LogTypes,
93
+ throttle: 1000,
94
+ throttleMin: 5,
95
+ formatOptions: {
96
+ date: true,
97
+ colors: false,
98
+ compact: true
99
+ }
100
+ });
101
+ for (const type in types) {
102
+ const defaults = {
103
+ type,
104
+ ...this.options.defaults,
105
+ ...types[type]
106
+ };
107
+ this[type] = this._wrapLogFn(defaults);
108
+ this[type].raw = this._wrapLogFn(defaults, true);
109
+ }
110
+ if (this.options.mockFn) {
111
+ this.mockTypes();
112
+ }
113
+ this._lastLog = {};
114
+ }
115
+ get level() {
116
+ return this.options.level;
117
+ }
118
+ set level(level) {
119
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
120
+ }
121
+ prompt(message, opts) {
122
+ if (!this.options.prompt) {
123
+ throw new Error("prompt is not supported!");
124
+ }
125
+ return this.options.prompt(message, opts);
126
+ }
127
+ create(options) {
128
+ const instance = new Consola({
129
+ ...this.options,
130
+ ...options
131
+ });
132
+ if (this._mockFn) {
133
+ instance.mockTypes(this._mockFn);
134
+ }
135
+ return instance;
136
+ }
137
+ withDefaults(defaults) {
138
+ return this.create({
139
+ ...this.options,
140
+ defaults: {
141
+ ...this.options.defaults,
142
+ ...defaults
143
+ }
144
+ });
145
+ }
146
+ withTag(tag) {
147
+ return this.withDefaults({
148
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
149
+ });
150
+ }
151
+ addReporter(reporter) {
152
+ this.options.reporters.push(reporter);
153
+ return this;
154
+ }
155
+ removeReporter(reporter) {
156
+ if (reporter) {
157
+ const i = this.options.reporters.indexOf(reporter);
158
+ if (i !== -1) {
159
+ return this.options.reporters.splice(i, 1);
160
+ }
161
+ } else {
162
+ this.options.reporters.splice(0);
163
+ }
164
+ return this;
165
+ }
166
+ setReporters(reporters) {
167
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
168
+ return this;
169
+ }
170
+ wrapAll() {
171
+ this.wrapConsole();
172
+ this.wrapStd();
173
+ }
174
+ restoreAll() {
175
+ this.restoreConsole();
176
+ this.restoreStd();
177
+ }
178
+ wrapConsole() {
179
+ for (const type in this.options.types) {
180
+ if (!console["__" + type]) {
181
+ console["__" + type] = console[type];
182
+ }
183
+ console[type] = this[type].raw;
184
+ }
185
+ }
186
+ restoreConsole() {
187
+ for (const type in this.options.types) {
188
+ if (console["__" + type]) {
189
+ console[type] = console["__" + type];
190
+ delete console["__" + type];
191
+ }
192
+ }
193
+ }
194
+ wrapStd() {
195
+ this._wrapStream(this.options.stdout, "log");
196
+ this._wrapStream(this.options.stderr, "log");
197
+ }
198
+ _wrapStream(stream, type) {
199
+ if (!stream) {
200
+ return;
201
+ }
202
+ if (!stream.__write) {
203
+ stream.__write = stream.write;
204
+ }
205
+ stream.write = (data) => {
206
+ this[type].raw(String(data).trim());
207
+ };
208
+ }
209
+ restoreStd() {
210
+ this._restoreStream(this.options.stdout);
211
+ this._restoreStream(this.options.stderr);
212
+ }
213
+ _restoreStream(stream) {
214
+ if (!stream) {
215
+ return;
216
+ }
217
+ if (stream.__write) {
218
+ stream.write = stream.__write;
219
+ delete stream.__write;
220
+ }
221
+ }
222
+ pauseLogs() {
223
+ paused = true;
224
+ }
225
+ resumeLogs() {
226
+ paused = false;
227
+ const _queue = queue.splice(0);
228
+ for (const item of _queue) {
229
+ item[0]._logFn(item[1], item[2]);
230
+ }
231
+ }
232
+ mockTypes(mockFn) {
233
+ const _mockFn = mockFn || this.options.mockFn;
234
+ this._mockFn = _mockFn;
235
+ if (typeof _mockFn !== "function") {
236
+ return;
237
+ }
238
+ for (const type in this.options.types) {
239
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
240
+ this[type].raw = this[type];
241
+ }
242
+ }
243
+ _wrapLogFn(defaults, isRaw) {
244
+ return (...args) => {
245
+ if (paused) {
246
+ queue.push([this, defaults, args, isRaw]);
247
+ return;
248
+ }
249
+ return this._logFn(defaults, args, isRaw);
250
+ };
251
+ }
252
+ _logFn(defaults, args, isRaw) {
253
+ if ((defaults.level || 0) > this.level) {
254
+ return false;
255
+ }
256
+ const logObj = {
257
+ date: /* @__PURE__ */ new Date,
258
+ args: [],
259
+ ...defaults,
260
+ level: _normalizeLogLevel(defaults.level, this.options.types)
261
+ };
262
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
263
+ Object.assign(logObj, args[0]);
264
+ } else {
265
+ logObj.args = [...args];
266
+ }
267
+ if (logObj.message) {
268
+ logObj.args.unshift(logObj.message);
269
+ delete logObj.message;
270
+ }
271
+ if (logObj.additional) {
272
+ if (!Array.isArray(logObj.additional)) {
273
+ logObj.additional = logObj.additional.split(`
274
+ `);
275
+ }
276
+ logObj.args.push(`
277
+ ` + logObj.additional.join(`
278
+ `));
279
+ delete logObj.additional;
280
+ }
281
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
282
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
283
+ const resolveLog = (newLog = false) => {
284
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
285
+ if (this._lastLog.object && repeated > 0) {
286
+ const args2 = [...this._lastLog.object.args];
287
+ if (repeated > 1) {
288
+ args2.push(`(repeated ${repeated} times)`);
289
+ }
290
+ this._log({ ...this._lastLog.object, args: args2 });
291
+ this._lastLog.count = 1;
292
+ }
293
+ if (newLog) {
294
+ this._lastLog.object = logObj;
295
+ this._log(logObj);
296
+ }
297
+ };
298
+ clearTimeout(this._lastLog.timeout);
299
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
300
+ this._lastLog.time = logObj.date;
301
+ if (diffTime < this.options.throttle) {
302
+ try {
303
+ const serializedLog = JSON.stringify([
304
+ logObj.type,
305
+ logObj.tag,
306
+ logObj.args
307
+ ]);
308
+ const isSameLog = this._lastLog.serialized === serializedLog;
309
+ this._lastLog.serialized = serializedLog;
310
+ if (isSameLog) {
311
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
312
+ if (this._lastLog.count > this.options.throttleMin) {
313
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
314
+ return;
315
+ }
316
+ }
317
+ } catch {}
318
+ }
319
+ resolveLog(true);
320
+ }
321
+ _log(logObj) {
322
+ for (const reporter of this.options.reporters) {
323
+ reporter.log(logObj, {
324
+ options: this.options
325
+ });
326
+ }
327
+ }
328
+ }
329
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
330
+ if (input === undefined) {
331
+ return defaultLevel;
332
+ }
333
+ if (typeof input === "number") {
334
+ return input;
335
+ }
336
+ if (types[input] && types[input].level !== undefined) {
337
+ return types[input].level;
338
+ }
339
+ return defaultLevel;
340
+ }
341
+ function createConsola(options = {}) {
342
+ return new Consola(options);
343
+ }
344
+ var LogLevels, LogTypes, defu, paused = false, queue;
345
+ var init_core = __esm(() => {
346
+ LogLevels = {
347
+ silent: Number.NEGATIVE_INFINITY,
348
+ fatal: 0,
349
+ error: 0,
350
+ warn: 1,
351
+ log: 2,
352
+ info: 3,
353
+ success: 3,
354
+ fail: 3,
355
+ ready: 3,
356
+ start: 3,
357
+ box: 3,
358
+ debug: 4,
359
+ trace: 5,
360
+ verbose: Number.POSITIVE_INFINITY
361
+ };
362
+ LogTypes = {
363
+ silent: {
364
+ level: -1
365
+ },
366
+ fatal: {
367
+ level: LogLevels.fatal
368
+ },
369
+ error: {
370
+ level: LogLevels.error
371
+ },
372
+ warn: {
373
+ level: LogLevels.warn
374
+ },
375
+ log: {
376
+ level: LogLevels.log
377
+ },
378
+ info: {
379
+ level: LogLevels.info
380
+ },
381
+ success: {
382
+ level: LogLevels.success
383
+ },
384
+ fail: {
385
+ level: LogLevels.fail
386
+ },
387
+ ready: {
388
+ level: LogLevels.info
389
+ },
390
+ start: {
391
+ level: LogLevels.info
392
+ },
393
+ box: {
394
+ level: LogLevels.info
395
+ },
396
+ debug: {
397
+ level: LogLevels.debug
398
+ },
399
+ trace: {
400
+ level: LogLevels.trace
401
+ },
402
+ verbose: {
403
+ level: LogLevels.verbose
404
+ }
405
+ };
406
+ defu = createDefu();
407
+ queue = [];
408
+ Consola.prototype.add = Consola.prototype.addReporter;
409
+ Consola.prototype.remove = Consola.prototype.removeReporter;
410
+ Consola.prototype.clear = Consola.prototype.removeReporter;
411
+ Consola.prototype.withScope = Consola.prototype.withTag;
412
+ Consola.prototype.mock = Consola.prototype.mockTypes;
413
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
414
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
415
+ });
416
+
417
+ // node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
418
+ import { formatWithOptions } from "node:util";
419
+ import { sep } from "node:path";
420
+ function parseStack(stack, message) {
421
+ const cwd = process.cwd() + sep;
422
+ const lines = stack.split(`
423
+ `).splice(message.split(`
424
+ `).length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
425
+ return lines;
426
+ }
427
+ function writeStream(data, stream) {
428
+ const write = stream.__write || stream.write;
429
+ return write.call(stream, data);
430
+ }
431
+
432
+ class BasicReporter {
433
+ formatStack(stack, message, opts) {
434
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
435
+ return indent + parseStack(stack, message).join(`
436
+ ${indent}`);
437
+ }
438
+ formatError(err, opts) {
439
+ const message = err.message ?? formatWithOptions(opts, err);
440
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
441
+ const level = opts?.errorLevel || 0;
442
+ const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
443
+ const causedError = err.cause ? `
444
+
445
+ ` + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
446
+ return causedPrefix + message + `
447
+ ` + stack + causedError;
448
+ }
449
+ formatArgs(args, opts) {
450
+ const _args = args.map((arg) => {
451
+ if (arg && typeof arg.stack === "string") {
452
+ return this.formatError(arg, opts);
453
+ }
454
+ return arg;
455
+ });
456
+ return formatWithOptions(opts, ..._args);
457
+ }
458
+ formatDate(date, opts) {
459
+ return opts.date ? date.toLocaleTimeString() : "";
460
+ }
461
+ filterAndJoin(arr) {
462
+ return arr.filter(Boolean).join(" ");
463
+ }
464
+ formatLogObj(logObj, opts) {
465
+ const message = this.formatArgs(logObj.args, opts);
466
+ if (logObj.type === "box") {
467
+ return `
468
+ ` + [
469
+ bracket(logObj.tag),
470
+ logObj.title && logObj.title,
471
+ ...message.split(`
472
+ `)
473
+ ].filter(Boolean).map((l) => " > " + l).join(`
474
+ `) + `
475
+ `;
476
+ }
477
+ return this.filterAndJoin([
478
+ bracket(logObj.type),
479
+ bracket(logObj.tag),
480
+ message
481
+ ]);
482
+ }
483
+ log(logObj, ctx) {
484
+ const line = this.formatLogObj(logObj, {
485
+ columns: ctx.options.stdout.columns || 0,
486
+ ...ctx.options.formatOptions
487
+ });
488
+ return writeStream(line + `
489
+ `, logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
490
+ }
491
+ }
492
+ var bracket = (x) => x ? `[${x}]` : "";
493
+ var init_consola_DRwqZj3T = () => {};
494
+
495
+ // node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
496
+ import * as tty from "node:tty";
497
+ function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
498
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
499
+ }
500
+ function clearBleed(index, string, open, close, replace) {
501
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
502
+ }
503
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
504
+ return (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
505
+ }
506
+ function init(open, close, replace) {
507
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
508
+ }
509
+ function createColors(useColor = isColorSupported) {
510
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
511
+ }
512
+ function getColor(color, fallback = "reset") {
513
+ return colors[color] || colors[fallback];
514
+ }
515
+ function stripAnsi(text) {
516
+ return text.replace(new RegExp(ansiRegex, "g"), "");
517
+ }
518
+ function box(text, _opts = {}) {
519
+ const opts = {
520
+ ..._opts,
521
+ style: {
522
+ ...defaultStyle,
523
+ ..._opts.style
524
+ }
525
+ };
526
+ const textLines = text.split(`
527
+ `);
528
+ const boxLines = [];
529
+ const _color = getColor(opts.style.borderColor);
530
+ const borderStyle = {
531
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
532
+ };
533
+ if (_color) {
534
+ for (const key in borderStyle) {
535
+ borderStyle[key] = _color(borderStyle[key]);
536
+ }
537
+ }
538
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
539
+ const height = textLines.length + paddingOffset;
540
+ const width = Math.max(...textLines.map((line) => stripAnsi(line).length), opts.title ? stripAnsi(opts.title).length : 0) + paddingOffset;
541
+ const widthOffset = width + paddingOffset;
542
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
543
+ if (opts.style.marginTop > 0) {
544
+ boxLines.push("".repeat(opts.style.marginTop));
545
+ }
546
+ if (opts.title) {
547
+ const title = _color ? _color(opts.title) : opts.title;
548
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
549
+ const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
550
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
551
+ } else {
552
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
553
+ }
554
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
555
+ for (let i = 0;i < height; i++) {
556
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
557
+ boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
558
+ } else {
559
+ const line = textLines[i - valignOffset];
560
+ const left = " ".repeat(paddingOffset);
561
+ const right = " ".repeat(width - stripAnsi(line).length);
562
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
563
+ }
564
+ }
565
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
566
+ if (opts.style.marginBottom > 0) {
567
+ boxLines.push("".repeat(opts.style.marginBottom));
568
+ }
569
+ return boxLines.join(`
570
+ `);
571
+ }
572
+ var env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
573
+ var init_consola_DXBYu_KD = __esm(() => {
574
+ ({
575
+ env = {},
576
+ argv = [],
577
+ platform = ""
578
+ } = typeof process === "undefined" ? {} : process);
579
+ isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
580
+ isForced = "FORCE_COLOR" in env || argv.includes("--color");
581
+ isWindows = platform === "win32";
582
+ isDumbTerminal = env.TERM === "dumb";
583
+ isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
584
+ isCI = "CI" in env && (("GITHUB_ACTIONS" in env) || ("GITLAB_CI" in env) || ("CIRCLECI" in env));
585
+ isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
586
+ colorDefs = {
587
+ reset: init(0, 0),
588
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
589
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
590
+ italic: init(3, 23),
591
+ underline: init(4, 24),
592
+ inverse: init(7, 27),
593
+ hidden: init(8, 28),
594
+ strikethrough: init(9, 29),
595
+ black: init(30, 39),
596
+ red: init(31, 39),
597
+ green: init(32, 39),
598
+ yellow: init(33, 39),
599
+ blue: init(34, 39),
600
+ magenta: init(35, 39),
601
+ cyan: init(36, 39),
602
+ white: init(37, 39),
603
+ gray: init(90, 39),
604
+ bgBlack: init(40, 49),
605
+ bgRed: init(41, 49),
606
+ bgGreen: init(42, 49),
607
+ bgYellow: init(43, 49),
608
+ bgBlue: init(44, 49),
609
+ bgMagenta: init(45, 49),
610
+ bgCyan: init(46, 49),
611
+ bgWhite: init(47, 49),
612
+ blackBright: init(90, 39),
613
+ redBright: init(91, 39),
614
+ greenBright: init(92, 39),
615
+ yellowBright: init(93, 39),
616
+ blueBright: init(94, 39),
617
+ magentaBright: init(95, 39),
618
+ cyanBright: init(96, 39),
619
+ whiteBright: init(97, 39),
620
+ bgBlackBright: init(100, 49),
621
+ bgRedBright: init(101, 49),
622
+ bgGreenBright: init(102, 49),
623
+ bgYellowBright: init(103, 49),
624
+ bgBlueBright: init(104, 49),
625
+ bgMagentaBright: init(105, 49),
626
+ bgCyanBright: init(106, 49),
627
+ bgWhiteBright: init(107, 49)
628
+ };
629
+ colors = createColors();
630
+ ansiRegex = [
631
+ String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
632
+ String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
633
+ ].join("|");
634
+ boxStylePresets = {
635
+ solid: {
636
+ tl: "┌",
637
+ tr: "┐",
638
+ bl: "└",
639
+ br: "┘",
640
+ h: "─",
641
+ v: "│"
642
+ },
643
+ double: {
644
+ tl: "╔",
645
+ tr: "╗",
646
+ bl: "╚",
647
+ br: "╝",
648
+ h: "═",
649
+ v: "║"
650
+ },
651
+ doubleSingle: {
652
+ tl: "╓",
653
+ tr: "╖",
654
+ bl: "╙",
655
+ br: "╜",
656
+ h: "─",
657
+ v: "║"
658
+ },
659
+ doubleSingleRounded: {
660
+ tl: "╭",
661
+ tr: "╮",
662
+ bl: "╰",
663
+ br: "╯",
664
+ h: "─",
665
+ v: "║"
666
+ },
667
+ singleThick: {
668
+ tl: "┏",
669
+ tr: "┓",
670
+ bl: "┗",
671
+ br: "┛",
672
+ h: "━",
673
+ v: "┃"
674
+ },
675
+ singleDouble: {
676
+ tl: "╒",
677
+ tr: "╕",
678
+ bl: "╘",
679
+ br: "╛",
680
+ h: "═",
681
+ v: "│"
682
+ },
683
+ singleDoubleRounded: {
684
+ tl: "╭",
685
+ tr: "╮",
686
+ bl: "╰",
687
+ br: "╯",
688
+ h: "═",
689
+ v: "│"
690
+ },
691
+ rounded: {
692
+ tl: "╭",
693
+ tr: "╮",
694
+ bl: "╰",
695
+ br: "╯",
696
+ h: "─",
697
+ v: "│"
698
+ }
699
+ };
700
+ defaultStyle = {
701
+ borderColor: "white",
702
+ borderStyle: "rounded",
703
+ valign: "center",
704
+ padding: 2,
705
+ marginLeft: 1,
706
+ marginTop: 1,
707
+ marginBottom: 1
708
+ };
709
+ });
710
+
711
+ // node_modules/consola/dist/chunks/prompt.mjs
712
+ var exports_prompt = {};
713
+ __export(exports_prompt, {
714
+ prompt: () => prompt,
715
+ kCancel: () => kCancel
716
+ });
717
+ import g, { stdin, stdout } from "node:process";
718
+ import f from "node:readline";
719
+ import { WriteStream } from "node:tty";
720
+ function getDefaultExportFromCjs(x) {
721
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
722
+ }
723
+ function requireSrc() {
724
+ if (hasRequiredSrc)
725
+ return src;
726
+ hasRequiredSrc = 1;
727
+ const ESC = "\x1B";
728
+ const CSI = `${ESC}[`;
729
+ const beep = "\x07";
730
+ const cursor = {
731
+ to(x, y) {
732
+ if (!y)
733
+ return `${CSI}${x + 1}G`;
734
+ return `${CSI}${y + 1};${x + 1}H`;
735
+ },
736
+ move(x, y) {
737
+ let ret = "";
738
+ if (x < 0)
739
+ ret += `${CSI}${-x}D`;
740
+ else if (x > 0)
741
+ ret += `${CSI}${x}C`;
742
+ if (y < 0)
743
+ ret += `${CSI}${-y}A`;
744
+ else if (y > 0)
745
+ ret += `${CSI}${y}B`;
746
+ return ret;
747
+ },
748
+ up: (count = 1) => `${CSI}${count}A`,
749
+ down: (count = 1) => `${CSI}${count}B`,
750
+ forward: (count = 1) => `${CSI}${count}C`,
751
+ backward: (count = 1) => `${CSI}${count}D`,
752
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
753
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
754
+ left: `${CSI}G`,
755
+ hide: `${CSI}?25l`,
756
+ show: `${CSI}?25h`,
757
+ save: `${ESC}7`,
758
+ restore: `${ESC}8`
759
+ };
760
+ const scroll = {
761
+ up: (count = 1) => `${CSI}S`.repeat(count),
762
+ down: (count = 1) => `${CSI}T`.repeat(count)
763
+ };
764
+ const erase = {
765
+ screen: `${CSI}2J`,
766
+ up: (count = 1) => `${CSI}1J`.repeat(count),
767
+ down: (count = 1) => `${CSI}J`.repeat(count),
768
+ line: `${CSI}2K`,
769
+ lineEnd: `${CSI}K`,
770
+ lineStart: `${CSI}1K`,
771
+ lines(count) {
772
+ let clear = "";
773
+ for (let i = 0;i < count; i++)
774
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
775
+ if (count)
776
+ clear += cursor.left;
777
+ return clear;
778
+ }
779
+ };
780
+ src = { cursor, scroll, erase, beep };
781
+ return src;
782
+ }
783
+ function requirePicocolors() {
784
+ if (hasRequiredPicocolors)
785
+ return picocolors.exports;
786
+ hasRequiredPicocolors = 1;
787
+ let p = process || {}, argv2 = p.argv || [], env2 = p.env || {};
788
+ let isColorSupported2 = !(!!env2.NO_COLOR || argv2.includes("--no-color")) && (!!env2.FORCE_COLOR || argv2.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
789
+ let formatter = (open, close, replace = open) => (input) => {
790
+ let string = "" + input, index = string.indexOf(close, open.length);
791
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
792
+ };
793
+ let replaceClose2 = (string, close, replace, index) => {
794
+ let result = "", cursor = 0;
795
+ do {
796
+ result += string.substring(cursor, index) + replace;
797
+ cursor = index + close.length;
798
+ index = string.indexOf(close, cursor);
799
+ } while (~index);
800
+ return result + string.substring(cursor);
801
+ };
802
+ let createColors2 = (enabled = isColorSupported2) => {
803
+ let f2 = enabled ? formatter : () => String;
804
+ return {
805
+ isColorSupported: enabled,
806
+ reset: f2("\x1B[0m", "\x1B[0m"),
807
+ bold: f2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
808
+ dim: f2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
809
+ italic: f2("\x1B[3m", "\x1B[23m"),
810
+ underline: f2("\x1B[4m", "\x1B[24m"),
811
+ inverse: f2("\x1B[7m", "\x1B[27m"),
812
+ hidden: f2("\x1B[8m", "\x1B[28m"),
813
+ strikethrough: f2("\x1B[9m", "\x1B[29m"),
814
+ black: f2("\x1B[30m", "\x1B[39m"),
815
+ red: f2("\x1B[31m", "\x1B[39m"),
816
+ green: f2("\x1B[32m", "\x1B[39m"),
817
+ yellow: f2("\x1B[33m", "\x1B[39m"),
818
+ blue: f2("\x1B[34m", "\x1B[39m"),
819
+ magenta: f2("\x1B[35m", "\x1B[39m"),
820
+ cyan: f2("\x1B[36m", "\x1B[39m"),
821
+ white: f2("\x1B[37m", "\x1B[39m"),
822
+ gray: f2("\x1B[90m", "\x1B[39m"),
823
+ bgBlack: f2("\x1B[40m", "\x1B[49m"),
824
+ bgRed: f2("\x1B[41m", "\x1B[49m"),
825
+ bgGreen: f2("\x1B[42m", "\x1B[49m"),
826
+ bgYellow: f2("\x1B[43m", "\x1B[49m"),
827
+ bgBlue: f2("\x1B[44m", "\x1B[49m"),
828
+ bgMagenta: f2("\x1B[45m", "\x1B[49m"),
829
+ bgCyan: f2("\x1B[46m", "\x1B[49m"),
830
+ bgWhite: f2("\x1B[47m", "\x1B[49m"),
831
+ blackBright: f2("\x1B[90m", "\x1B[39m"),
832
+ redBright: f2("\x1B[91m", "\x1B[39m"),
833
+ greenBright: f2("\x1B[92m", "\x1B[39m"),
834
+ yellowBright: f2("\x1B[93m", "\x1B[39m"),
835
+ blueBright: f2("\x1B[94m", "\x1B[39m"),
836
+ magentaBright: f2("\x1B[95m", "\x1B[39m"),
837
+ cyanBright: f2("\x1B[96m", "\x1B[39m"),
838
+ whiteBright: f2("\x1B[97m", "\x1B[39m"),
839
+ bgBlackBright: f2("\x1B[100m", "\x1B[49m"),
840
+ bgRedBright: f2("\x1B[101m", "\x1B[49m"),
841
+ bgGreenBright: f2("\x1B[102m", "\x1B[49m"),
842
+ bgYellowBright: f2("\x1B[103m", "\x1B[49m"),
843
+ bgBlueBright: f2("\x1B[104m", "\x1B[49m"),
844
+ bgMagentaBright: f2("\x1B[105m", "\x1B[49m"),
845
+ bgCyanBright: f2("\x1B[106m", "\x1B[49m"),
846
+ bgWhiteBright: f2("\x1B[107m", "\x1B[49m")
847
+ };
848
+ };
849
+ picocolors.exports = createColors2();
850
+ picocolors.exports.createColors = createColors2;
851
+ return picocolors.exports;
852
+ }
853
+ function J({ onlyFirst: t = false } = {}) {
854
+ const F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
855
+ return new RegExp(F, t ? undefined : "g");
856
+ }
857
+ function T$1(t) {
858
+ if (typeof t != "string")
859
+ throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
860
+ return t.replace(Q, "");
861
+ }
862
+ function O(t) {
863
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
864
+ }
865
+ function A$1(t, u = {}) {
866
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = T$1(t), t.length === 0))
867
+ return 0;
868
+ t = t.replace(FD(), " ");
869
+ const F = u.ambiguousIsNarrow ? 1 : 2;
870
+ let e2 = 0;
871
+ for (const s of t) {
872
+ const i = s.codePointAt(0);
873
+ if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879)
874
+ continue;
875
+ switch (DD.eastAsianWidth(s)) {
876
+ case "F":
877
+ case "W":
878
+ e2 += 2;
879
+ break;
880
+ case "A":
881
+ e2 += F;
882
+ break;
883
+ default:
884
+ e2 += 1;
885
+ }
886
+ }
887
+ return e2;
888
+ }
889
+ function sD() {
890
+ const t = new Map;
891
+ for (const [u, F] of Object.entries(r)) {
892
+ for (const [e2, s] of Object.entries(F))
893
+ r[e2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[e2] = r[e2], t.set(s[0], s[1]);
894
+ Object.defineProperty(r, u, { value: F, enumerable: false });
895
+ }
896
+ return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e2) => u === F && F === e2 ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
897
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
898
+ if (!F)
899
+ return [0, 0, 0];
900
+ let [e2] = F;
901
+ e2.length === 3 && (e2 = [...e2].map((i) => i + i).join(""));
902
+ const s = Number.parseInt(e2, 16);
903
+ return [s >> 16 & 255, s >> 8 & 255, s & 255];
904
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
905
+ if (u < 8)
906
+ return 30 + u;
907
+ if (u < 16)
908
+ return 90 + (u - 8);
909
+ let F, e2, s;
910
+ if (u >= 232)
911
+ F = ((u - 232) * 10 + 8) / 255, e2 = F, s = F;
912
+ else {
913
+ u -= 16;
914
+ const C = u % 36;
915
+ F = Math.floor(u / 36) / 5, e2 = Math.floor(C / 6) / 5, s = C % 6 / 5;
916
+ }
917
+ const i = Math.max(F, e2, s) * 2;
918
+ if (i === 0)
919
+ return 30;
920
+ let D = 30 + (Math.round(s) << 2 | Math.round(e2) << 1 | Math.round(F));
921
+ return i === 2 && (D += 60), D;
922
+ }, enumerable: false }, rgbToAnsi: { value: (u, F, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e2)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
923
+ }
924
+ function G(t, u, F) {
925
+ return String(t).normalize().replace(/\r\n/g, `
926
+ `).split(`
927
+ `).map((e2) => oD(e2, u, F)).join(`
928
+ `);
929
+ }
930
+ function k$1(t, u) {
931
+ if (typeof t == "string")
932
+ return c.aliases.get(t) === u;
933
+ for (const F of t)
934
+ if (F !== undefined && k$1(F, u))
935
+ return true;
936
+ return false;
937
+ }
938
+ function lD(t, u) {
939
+ if (t === u)
940
+ return;
941
+ const F = t.split(`
942
+ `), e2 = u.split(`
943
+ `), s = [];
944
+ for (let i = 0;i < Math.max(F.length, e2.length); i++)
945
+ F[i] !== e2[i] && s.push(i);
946
+ return s;
947
+ }
948
+ function d$1(t, u) {
949
+ const F = t;
950
+ F.isTTY && F.setRawMode(u);
951
+ }
952
+
953
+ class x {
954
+ constructor(u, F = true) {
955
+ h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", new Map), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
956
+ const { input: e2 = stdin, output: s = stdout, render: i, signal: D, ...C } = u;
957
+ this.opts = C, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F, this._abortSignal = D, this.input = e2, this.output = s;
958
+ }
959
+ unsubscribe() {
960
+ this._subscribers.clear();
961
+ }
962
+ setSubscriber(u, F) {
963
+ const e2 = this._subscribers.get(u) ?? [];
964
+ e2.push(F), this._subscribers.set(u, e2);
965
+ }
966
+ on(u, F) {
967
+ this.setSubscriber(u, { cb: F });
968
+ }
969
+ once(u, F) {
970
+ this.setSubscriber(u, { cb: F, once: true });
971
+ }
972
+ emit(u, ...F) {
973
+ const e2 = this._subscribers.get(u) ?? [], s = [];
974
+ for (const i of e2)
975
+ i.cb(...F), i.once && s.push(() => e2.splice(e2.indexOf(i), 1));
976
+ for (const i of s)
977
+ i();
978
+ }
979
+ prompt() {
980
+ return new Promise((u, F) => {
981
+ if (this._abortSignal) {
982
+ if (this._abortSignal.aborted)
983
+ return this.state = "cancel", this.close(), u(S);
984
+ this._abortSignal.addEventListener("abort", () => {
985
+ this.state = "cancel", this.close();
986
+ }, { once: true });
987
+ }
988
+ const e2 = new WriteStream(0);
989
+ e2._write = (s, i, D) => {
990
+ this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
991
+ }, this.input.pipe(e2), this.rl = f.createInterface({ input: this.input, output: e2, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), f.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== undefined && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d$1(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
992
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(this.value);
993
+ }), this.once("cancel", () => {
994
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(S);
995
+ });
996
+ });
997
+ }
998
+ onKeypress(u, F) {
999
+ if (this.state === "error" && (this.state = "active"), F?.name && (!this._track && c.aliases.has(F.name) && this.emit("cursor", c.aliases.get(F.name)), c.actions.has(F.name) && this.emit("cursor", F.name)), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === "\t" && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
1000
+ if (this.opts.validate) {
1001
+ const e2 = this.opts.validate(this.value);
1002
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.value));
1003
+ }
1004
+ this.state !== "error" && (this.state = "submit");
1005
+ }
1006
+ k$1([u, F?.name, F?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1007
+ }
1008
+ close() {
1009
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1010
+ `), d$1(this.input, false), this.rl?.close(), this.rl = undefined, this.emit(`${this.state}`, this.value), this.unsubscribe();
1011
+ }
1012
+ restoreCursor() {
1013
+ const u = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
1014
+ `).length - 1;
1015
+ this.output.write(srcExports.cursor.move(-999, u * -1));
1016
+ }
1017
+ render() {
1018
+ const u = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
1019
+ if (u !== this._prevFrame) {
1020
+ if (this.state === "initial")
1021
+ this.output.write(srcExports.cursor.hide);
1022
+ else {
1023
+ const F = lD(this._prevFrame, u);
1024
+ if (this.restoreCursor(), F && F?.length === 1) {
1025
+ const e2 = F[0];
1026
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.lines(1));
1027
+ const s = u.split(`
1028
+ `);
1029
+ this.output.write(s[e2]), this._prevFrame = u, this.output.write(srcExports.cursor.move(0, s.length - e2 - 1));
1030
+ return;
1031
+ }
1032
+ if (F && F?.length > 1) {
1033
+ const e2 = F[0];
1034
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.down());
1035
+ const s = u.split(`
1036
+ `).slice(e2);
1037
+ this.output.write(s.join(`
1038
+ `)), this._prevFrame = u;
1039
+ return;
1040
+ }
1041
+ this.output.write(srcExports.erase.down());
1042
+ }
1043
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
1044
+ }
1045
+ }
1046
+ }
1047
+ function ce() {
1048
+ return g.platform !== "win32" ? g.env.TERM !== "linux" : !!g.env.CI || !!g.env.WT_SESSION || !!g.env.TERMINUS_SUBLIME || g.env.ConEmuTask === "{cmd::Cmder}" || g.env.TERM_PROGRAM === "Terminus-Sublime" || g.env.TERM_PROGRAM === "vscode" || g.env.TERM === "xterm-256color" || g.env.TERM === "alacritty" || g.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1049
+ }
1050
+ async function prompt(message, opts = {}) {
1051
+ const handleCancel = (value) => {
1052
+ if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") {
1053
+ return value;
1054
+ }
1055
+ switch (opts.cancel) {
1056
+ case "reject": {
1057
+ const error = new Error("Prompt cancelled.");
1058
+ error.name = "ConsolaPromptCancelledError";
1059
+ if (Error.captureStackTrace) {
1060
+ Error.captureStackTrace(error, prompt);
1061
+ }
1062
+ throw error;
1063
+ }
1064
+ case "undefined": {
1065
+ return;
1066
+ }
1067
+ case "null": {
1068
+ return null;
1069
+ }
1070
+ case "symbol": {
1071
+ return kCancel;
1072
+ }
1073
+ default:
1074
+ case "default": {
1075
+ return opts.default ?? opts.initial;
1076
+ }
1077
+ }
1078
+ };
1079
+ if (!opts.type || opts.type === "text") {
1080
+ return await he({
1081
+ message,
1082
+ defaultValue: opts.default,
1083
+ placeholder: opts.placeholder,
1084
+ initialValue: opts.initial
1085
+ }).then(handleCancel);
1086
+ }
1087
+ if (opts.type === "confirm") {
1088
+ return await ye({
1089
+ message,
1090
+ initialValue: opts.initial
1091
+ }).then(handleCancel);
1092
+ }
1093
+ if (opts.type === "select") {
1094
+ return await ve({
1095
+ message,
1096
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
1097
+ initialValue: opts.initial
1098
+ }).then(handleCancel);
1099
+ }
1100
+ if (opts.type === "multiselect") {
1101
+ return await fe({
1102
+ message,
1103
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
1104
+ required: opts.required,
1105
+ initialValues: opts.initial
1106
+ }).then(handleCancel);
1107
+ }
1108
+ throw new Error(`Unknown prompt type: ${opts.type}`);
1109
+ }
1110
+ var src, hasRequiredSrc, srcExports, picocolors, hasRequiredPicocolors, picocolorsExports, e, Q, P$1, X, DD, uD = function() {
1111
+ 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;
1112
+ }, FD, m = 10, L$1 = (t = 0) => (u) => `\x1B[${u + t}m`, N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`, I = (t = 0) => (u, F, e2) => `\x1B[${38 + t};2;${u};${F};${e2}m`, r, tD, eD, iD, v, CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u) => A$1(u)), _ = (t, u, F) => {
1113
+ const e2 = [...u];
1114
+ let s = false, i = false, D = A$1(T$1(t[t.length - 1]));
1115
+ for (const [C, o] of e2.entries()) {
1116
+ const E = A$1(o);
1117
+ if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), v.has(o) && (s = true, i = e2.slice(C + 1).join("").startsWith(y)), s) {
1118
+ i ? o === w$1 && (s = false, i = false) : o === R && (s = false);
1119
+ continue;
1120
+ }
1121
+ D += E, D === F && C < e2.length - 1 && (t.push(""), D = 0);
1122
+ }
1123
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
1124
+ }, nD = (t) => {
1125
+ const u = t.split(" ");
1126
+ let F = u.length;
1127
+ for (;F > 0 && !(A$1(u[F - 1]) > 0); )
1128
+ F--;
1129
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
1130
+ }, oD = (t, u, F = {}) => {
1131
+ if (F.trim !== false && t.trim() === "")
1132
+ return "";
1133
+ let e2 = "", s, i;
1134
+ const D = ED(t);
1135
+ let C = [""];
1136
+ for (const [E, a] of t.split(" ").entries()) {
1137
+ F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
1138
+ let n = A$1(C[C.length - 1]);
1139
+ if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (C.push(""), n = 0), (n > 0 || F.trim === false) && (C[C.length - 1] += " ", n++)), F.hard && D[E] > u) {
1140
+ const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
1141
+ Math.floor((D[E] - 1) / u) < p && C.push(""), _(C, a, u);
1142
+ continue;
1143
+ }
1144
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
1145
+ if (F.wordWrap === false && n < u) {
1146
+ _(C, a, u);
1147
+ continue;
1148
+ }
1149
+ C.push("");
1150
+ }
1151
+ if (n + D[E] > u && F.wordWrap === false) {
1152
+ _(C, a, u);
1153
+ continue;
1154
+ }
1155
+ C[C.length - 1] += a;
1156
+ }
1157
+ F.trim !== false && (C = C.map((E) => nD(E)));
1158
+ const o = [...C.join(`
1159
+ `)];
1160
+ for (const [E, a] of o.entries()) {
1161
+ if (e2 += a, v.has(a)) {
1162
+ const { groups: B } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o.slice(E).join("")) || { groups: {} };
1163
+ if (B.code !== undefined) {
1164
+ const p = Number.parseFloat(B.code);
1165
+ s = p === CD ? undefined : p;
1166
+ } else
1167
+ B.uri !== undefined && (i = B.uri.length === 0 ? undefined : B.uri);
1168
+ }
1169
+ const n = iD.codes.get(Number(s));
1170
+ o[E + 1] === `
1171
+ ` ? (i && (e2 += z("")), s && n && (e2 += V$1(n))) : a === `
1172
+ ` && (s && n && (e2 += V$1(s)), i && (e2 += z(i)));
1173
+ }
1174
+ return e2;
1175
+ }, aD, c, S, AD, pD = (t, u, F) => (u in t) ? AD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F), fD, bD, mD = (t, u, F) => (u in t) ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F), wD, SD, $D = (t, u, F) => (u in t) ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F, q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F), jD, PD, V, u = (t, n) => V ? t : n, le, L, W, C, o, d, k, P, A, T, F, w = (t) => {
1176
+ switch (t) {
1177
+ case "initial":
1178
+ case "active":
1179
+ return e.cyan(le);
1180
+ case "cancel":
1181
+ return e.red(L);
1182
+ case "error":
1183
+ return e.yellow(W);
1184
+ case "submit":
1185
+ return e.green(C);
1186
+ }
1187
+ }, B = (t) => {
1188
+ const { cursor: n, options: s, style: r2 } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c2 = Math.min(a, Math.max(i, 5));
1189
+ let l = 0;
1190
+ n >= l + c2 - 3 ? l = Math.max(Math.min(n - c2 + 3, s.length - c2), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
1191
+ const $ = c2 < s.length && l > 0, p = c2 < s.length && l + c2 < s.length;
1192
+ return s.slice(l, l + c2).map((M, v2, x2) => {
1193
+ const j = v2 === 0 && $, E = v2 === x2.length - 1 && p;
1194
+ return j || E ? e.dim("...") : r2(M, v2 + l === n);
1195
+ });
1196
+ }, he = (t) => new PD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
1197
+ const n = `${e.gray(o)}
1198
+ ${w(this.state)} ${t.message}
1199
+ `, s = t.placeholder ? e.inverse(t.placeholder[0]) + e.dim(t.placeholder.slice(1)) : e.inverse(e.hidden("_")), r2 = this.value ? this.valueWithCursor : s;
1200
+ switch (this.state) {
1201
+ case "error":
1202
+ return `${n.trim()}
1203
+ ${e.yellow(o)} ${r2}
1204
+ ${e.yellow(d)} ${e.yellow(this.error)}
1205
+ `;
1206
+ case "submit":
1207
+ return `${n}${e.gray(o)} ${e.dim(this.value || t.placeholder)}`;
1208
+ case "cancel":
1209
+ return `${n}${e.gray(o)} ${e.strikethrough(e.dim(this.value ?? ""))}${this.value?.trim() ? `
1210
+ ${e.gray(o)}` : ""}`;
1211
+ default:
1212
+ return `${n}${e.cyan(o)} ${r2}
1213
+ ${e.cyan(d)}
1214
+ `;
1215
+ }
1216
+ } }).prompt(), ye = (t) => {
1217
+ const n = t.active ?? "Yes", s = t.inactive ?? "No";
1218
+ return new fD({ active: n, inactive: s, initialValue: t.initialValue ?? true, render() {
1219
+ const r2 = `${e.gray(o)}
1220
+ ${w(this.state)} ${t.message}
1221
+ `, i = this.value ? n : s;
1222
+ switch (this.state) {
1223
+ case "submit":
1224
+ return `${r2}${e.gray(o)} ${e.dim(i)}`;
1225
+ case "cancel":
1226
+ return `${r2}${e.gray(o)} ${e.strikethrough(e.dim(i))}
1227
+ ${e.gray(o)}`;
1228
+ default:
1229
+ return `${r2}${e.cyan(o)} ${this.value ? `${e.green(k)} ${n}` : `${e.dim(P)} ${e.dim(n)}`} ${e.dim("/")} ${this.value ? `${e.dim(P)} ${e.dim(s)}` : `${e.green(k)} ${s}`}
1230
+ ${e.cyan(d)}
1231
+ `;
1232
+ }
1233
+ } }).prompt();
1234
+ }, ve = (t) => {
1235
+ const n = (s, r2) => {
1236
+ const i = s.label ?? String(s.value);
1237
+ switch (r2) {
1238
+ case "selected":
1239
+ return `${e.dim(i)}`;
1240
+ case "active":
1241
+ return `${e.green(k)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}`;
1242
+ case "cancelled":
1243
+ return `${e.strikethrough(e.dim(i))}`;
1244
+ default:
1245
+ return `${e.dim(P)} ${e.dim(i)}`;
1246
+ }
1247
+ };
1248
+ return new jD({ options: t.options, initialValue: t.initialValue, render() {
1249
+ const s = `${e.gray(o)}
1250
+ ${w(this.state)} ${t.message}
1251
+ `;
1252
+ switch (this.state) {
1253
+ case "submit":
1254
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "selected")}`;
1255
+ case "cancel":
1256
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "cancelled")}
1257
+ ${e.gray(o)}`;
1258
+ default:
1259
+ return `${s}${e.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (r2, i) => n(r2, i ? "active" : "inactive") }).join(`
1260
+ ${e.cyan(o)} `)}
1261
+ ${e.cyan(d)}
1262
+ `;
1263
+ }
1264
+ } }).prompt();
1265
+ }, fe = (t) => {
1266
+ const n = (s, r2) => {
1267
+ const i = s.label ?? String(s.value);
1268
+ return r2 === "active" ? `${e.cyan(A)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r2 === "selected" ? `${e.green(T)} ${e.dim(i)}` : r2 === "cancelled" ? `${e.strikethrough(e.dim(i))}` : r2 === "active-selected" ? `${e.green(T)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r2 === "submitted" ? `${e.dim(i)}` : `${e.dim(F)} ${e.dim(i)}`;
1269
+ };
1270
+ return new wD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(s) {
1271
+ if (this.required && s.length === 0)
1272
+ return `Please select at least one option.
1273
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`;
1274
+ }, render() {
1275
+ const s = `${e.gray(o)}
1276
+ ${w(this.state)} ${t.message}
1277
+ `, r2 = (i, a) => {
1278
+ const c2 = this.value.includes(i.value);
1279
+ return a && c2 ? n(i, "active-selected") : c2 ? n(i, "selected") : n(i, a ? "active" : "inactive");
1280
+ };
1281
+ switch (this.state) {
1282
+ case "submit":
1283
+ return `${s}${e.gray(o)} ${this.options.filter(({ value: i }) => this.value.includes(i)).map((i) => n(i, "submitted")).join(e.dim(", ")) || e.dim("none")}`;
1284
+ case "cancel": {
1285
+ const i = this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => n(a, "cancelled")).join(e.dim(", "));
1286
+ return `${s}${e.gray(o)} ${i.trim() ? `${i}
1287
+ ${e.gray(o)}` : ""}`;
1288
+ }
1289
+ case "error": {
1290
+ const i = this.error.split(`
1291
+ `).map((a, c2) => c2 === 0 ? `${e.yellow(d)} ${e.yellow(a)}` : ` ${a}`).join(`
1292
+ `);
1293
+ return `${s + e.yellow(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
1294
+ ${e.yellow(o)} `)}
1295
+ ${i}
1296
+ `;
1297
+ }
1298
+ default:
1299
+ return `${s}${e.cyan(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
1300
+ ${e.cyan(o)} `)}
1301
+ ${e.cyan(d)}
1302
+ `;
1303
+ }
1304
+ } }).prompt();
1305
+ }, kCancel;
1306
+ var init_prompt = __esm(() => {
1307
+ srcExports = requireSrc();
1308
+ picocolors = { exports: {} };
1309
+ picocolorsExports = /* @__PURE__ */ requirePicocolors();
1310
+ e = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
1311
+ Q = J();
1312
+ P$1 = { exports: {} };
1313
+ (function(t) {
1314
+ var u = {};
1315
+ t.exports = u, u.eastAsianWidth = function(e2) {
1316
+ var s = e2.charCodeAt(0), i = e2.length == 2 ? e2.charCodeAt(1) : 0, D = s;
1317
+ return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
1318
+ }, u.characterLength = function(e2) {
1319
+ var s = this.eastAsianWidth(e2);
1320
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
1321
+ };
1322
+ function F(e2) {
1323
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
1324
+ }
1325
+ u.length = function(e2) {
1326
+ for (var s = F(e2), i = 0, D = 0;D < s.length; D++)
1327
+ i = i + this.characterLength(s[D]);
1328
+ return i;
1329
+ }, u.slice = function(e2, s, i) {
1330
+ textLen = u.length(e2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
1331
+ for (var D = "", C = 0, o = F(e2), E = 0;E < o.length; E++) {
1332
+ var a = o[E], n = u.length(a);
1333
+ if (C >= s - (n == 2 ? 1 : 0))
1334
+ if (C + n <= i)
1335
+ D += a;
1336
+ else
1337
+ break;
1338
+ C += n;
1339
+ }
1340
+ return D;
1341
+ };
1342
+ })(P$1);
1343
+ X = P$1.exports;
1344
+ DD = O(X);
1345
+ FD = O(uD);
1346
+ r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
1347
+ Object.keys(r.modifier);
1348
+ tD = Object.keys(r.color);
1349
+ eD = Object.keys(r.bgColor);
1350
+ [...tD, ...eD];
1351
+ iD = sD();
1352
+ v = new Set(["\x1B", "›"]);
1353
+ y = `${rD}8;;`;
1354
+ aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
1355
+ c = { actions: new Set(aD), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]) };
1356
+ globalThis.process.platform.startsWith("win");
1357
+ S = Symbol("clack:cancel");
1358
+ AD = Object.defineProperty;
1359
+ fD = class fD extends x {
1360
+ get cursor() {
1361
+ return this.value ? 0 : 1;
1362
+ }
1363
+ get _value() {
1364
+ return this.cursor === 0;
1365
+ }
1366
+ constructor(u) {
1367
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
1368
+ this.value = this._value;
1369
+ }), this.on("confirm", (F) => {
1370
+ this.output.write(srcExports.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
1371
+ }), this.on("cursor", () => {
1372
+ this.value = !this.value;
1373
+ });
1374
+ }
1375
+ };
1376
+ bD = Object.defineProperty;
1377
+ wD = class extends x {
1378
+ constructor(u) {
1379
+ super(u, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
1380
+ F === "a" && this.toggleAll();
1381
+ }), this.on("cursor", (F) => {
1382
+ switch (F) {
1383
+ case "left":
1384
+ case "up":
1385
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1386
+ break;
1387
+ case "down":
1388
+ case "right":
1389
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1390
+ break;
1391
+ case "space":
1392
+ this.toggleValue();
1393
+ break;
1394
+ }
1395
+ });
1396
+ }
1397
+ get _value() {
1398
+ return this.options[this.cursor].value;
1399
+ }
1400
+ toggleAll() {
1401
+ const u = this.value.length === this.options.length;
1402
+ this.value = u ? [] : this.options.map((F) => F.value);
1403
+ }
1404
+ toggleValue() {
1405
+ const u = this.value.includes(this._value);
1406
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
1407
+ }
1408
+ };
1409
+ SD = Object.defineProperty;
1410
+ jD = class jD extends x {
1411
+ constructor(u) {
1412
+ super(u, false), q(this, "options"), q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
1413
+ switch (F) {
1414
+ case "left":
1415
+ case "up":
1416
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1417
+ break;
1418
+ case "down":
1419
+ case "right":
1420
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1421
+ break;
1422
+ }
1423
+ this.changeValue();
1424
+ });
1425
+ }
1426
+ get _value() {
1427
+ return this.options[this.cursor];
1428
+ }
1429
+ changeValue() {
1430
+ this.value = this._value.value;
1431
+ }
1432
+ };
1433
+ PD = class PD extends x {
1434
+ get valueWithCursor() {
1435
+ if (this.state === "submit")
1436
+ return this.value;
1437
+ if (this.cursor >= this.value.length)
1438
+ return `${this.value}█`;
1439
+ const u = this.value.slice(0, this.cursor), [F, ...e$1] = this.value.slice(this.cursor);
1440
+ return `${u}${e.inverse(F)}${e$1.join("")}`;
1441
+ }
1442
+ get cursor() {
1443
+ return this._cursor;
1444
+ }
1445
+ constructor(u) {
1446
+ super(u), this.on("finalize", () => {
1447
+ this.value || (this.value = u.defaultValue);
1448
+ });
1449
+ }
1450
+ };
1451
+ V = ce();
1452
+ le = u("❯", ">");
1453
+ L = u("■", "x");
1454
+ W = u("▲", "x");
1455
+ C = u("✔", "√");
1456
+ o = u("");
1457
+ d = u("");
1458
+ k = u("●", ">");
1459
+ P = u("○", " ");
1460
+ A = u("◻", "[•]");
1461
+ T = u("◼", "[+]");
1462
+ F = u("◻", "[ ]");
1463
+ `${e.gray(o)} `;
1464
+ kCancel = Symbol.for("cancel");
1465
+ });
1466
+
1467
+ // node_modules/consola/dist/index.mjs
1468
+ import g$1 from "node:process";
1469
+ function b() {
1470
+ if (globalThis.process?.env)
1471
+ for (const e2 of f2) {
1472
+ const s = e2[1] || e2[0];
1473
+ if (globalThis.process?.env[s])
1474
+ return { name: e2[0].toLowerCase(), ...e2[2] };
1475
+ }
1476
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
1477
+ }
1478
+ function n(e2) {
1479
+ return e2 ? e2 !== "false" : false;
1480
+ }
1481
+ function G2() {
1482
+ const e2 = F2.find((s) => s[0]);
1483
+ if (e2)
1484
+ return { name: e2[1] };
1485
+ }
1486
+ function ansiRegex2({ onlyFirst = false } = {}) {
1487
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
1488
+ const pattern = [
1489
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
1490
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
1491
+ ].join("|");
1492
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
1493
+ }
1494
+ function stripAnsi2(string) {
1495
+ if (typeof string !== "string") {
1496
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1497
+ }
1498
+ return string.replace(regex, "");
1499
+ }
1500
+ function isAmbiguous(x2) {
1501
+ return x2 === 161 || x2 === 164 || x2 === 167 || x2 === 168 || x2 === 170 || x2 === 173 || x2 === 174 || x2 >= 176 && x2 <= 180 || x2 >= 182 && x2 <= 186 || x2 >= 188 && x2 <= 191 || x2 === 198 || x2 === 208 || x2 === 215 || x2 === 216 || x2 >= 222 && x2 <= 225 || x2 === 230 || x2 >= 232 && x2 <= 234 || x2 === 236 || x2 === 237 || x2 === 240 || x2 === 242 || x2 === 243 || x2 >= 247 && x2 <= 250 || x2 === 252 || x2 === 254 || x2 === 257 || x2 === 273 || x2 === 275 || x2 === 283 || x2 === 294 || x2 === 295 || x2 === 299 || x2 >= 305 && x2 <= 307 || x2 === 312 || x2 >= 319 && x2 <= 322 || x2 === 324 || x2 >= 328 && x2 <= 331 || x2 === 333 || x2 === 338 || x2 === 339 || x2 === 358 || x2 === 359 || x2 === 363 || x2 === 462 || x2 === 464 || x2 === 466 || x2 === 468 || x2 === 470 || x2 === 472 || x2 === 474 || x2 === 476 || x2 === 593 || x2 === 609 || x2 === 708 || x2 === 711 || x2 >= 713 && x2 <= 715 || x2 === 717 || x2 === 720 || x2 >= 728 && x2 <= 731 || x2 === 733 || x2 === 735 || x2 >= 768 && x2 <= 879 || x2 >= 913 && x2 <= 929 || x2 >= 931 && x2 <= 937 || x2 >= 945 && x2 <= 961 || x2 >= 963 && x2 <= 969 || x2 === 1025 || x2 >= 1040 && x2 <= 1103 || x2 === 1105 || x2 === 8208 || x2 >= 8211 && x2 <= 8214 || x2 === 8216 || x2 === 8217 || x2 === 8220 || x2 === 8221 || x2 >= 8224 && x2 <= 8226 || x2 >= 8228 && x2 <= 8231 || x2 === 8240 || x2 === 8242 || x2 === 8243 || x2 === 8245 || x2 === 8251 || x2 === 8254 || x2 === 8308 || x2 === 8319 || x2 >= 8321 && x2 <= 8324 || x2 === 8364 || x2 === 8451 || x2 === 8453 || x2 === 8457 || x2 === 8467 || x2 === 8470 || x2 === 8481 || x2 === 8482 || x2 === 8486 || x2 === 8491 || x2 === 8531 || x2 === 8532 || x2 >= 8539 && x2 <= 8542 || x2 >= 8544 && x2 <= 8555 || x2 >= 8560 && x2 <= 8569 || x2 === 8585 || x2 >= 8592 && x2 <= 8601 || x2 === 8632 || x2 === 8633 || x2 === 8658 || x2 === 8660 || x2 === 8679 || x2 === 8704 || x2 === 8706 || x2 === 8707 || x2 === 8711 || x2 === 8712 || x2 === 8715 || x2 === 8719 || x2 === 8721 || x2 === 8725 || x2 === 8730 || x2 >= 8733 && x2 <= 8736 || x2 === 8739 || x2 === 8741 || x2 >= 8743 && x2 <= 8748 || x2 === 8750 || x2 >= 8756 && x2 <= 8759 || x2 === 8764 || x2 === 8765 || x2 === 8776 || x2 === 8780 || x2 === 8786 || x2 === 8800 || x2 === 8801 || x2 >= 8804 && x2 <= 8807 || x2 === 8810 || x2 === 8811 || x2 === 8814 || x2 === 8815 || x2 === 8834 || x2 === 8835 || x2 === 8838 || x2 === 8839 || x2 === 8853 || x2 === 8857 || x2 === 8869 || x2 === 8895 || x2 === 8978 || x2 >= 9312 && x2 <= 9449 || x2 >= 9451 && x2 <= 9547 || x2 >= 9552 && x2 <= 9587 || x2 >= 9600 && x2 <= 9615 || x2 >= 9618 && x2 <= 9621 || x2 === 9632 || x2 === 9633 || x2 >= 9635 && x2 <= 9641 || x2 === 9650 || x2 === 9651 || x2 === 9654 || x2 === 9655 || x2 === 9660 || x2 === 9661 || x2 === 9664 || x2 === 9665 || x2 >= 9670 && x2 <= 9672 || x2 === 9675 || x2 >= 9678 && x2 <= 9681 || x2 >= 9698 && x2 <= 9701 || x2 === 9711 || x2 === 9733 || x2 === 9734 || x2 === 9737 || x2 === 9742 || x2 === 9743 || x2 === 9756 || x2 === 9758 || x2 === 9792 || x2 === 9794 || x2 === 9824 || x2 === 9825 || x2 >= 9827 && x2 <= 9829 || x2 >= 9831 && x2 <= 9834 || x2 === 9836 || x2 === 9837 || x2 === 9839 || x2 === 9886 || x2 === 9887 || x2 === 9919 || x2 >= 9926 && x2 <= 9933 || x2 >= 9935 && x2 <= 9939 || x2 >= 9941 && x2 <= 9953 || x2 === 9955 || x2 === 9960 || x2 === 9961 || x2 >= 9963 && x2 <= 9969 || x2 === 9972 || x2 >= 9974 && x2 <= 9977 || x2 === 9979 || x2 === 9980 || x2 === 9982 || x2 === 9983 || x2 === 10045 || x2 >= 10102 && x2 <= 10111 || x2 >= 11094 && x2 <= 11097 || x2 >= 12872 && x2 <= 12879 || x2 >= 57344 && x2 <= 63743 || x2 >= 65024 && x2 <= 65039 || x2 === 65533 || x2 >= 127232 && x2 <= 127242 || x2 >= 127248 && x2 <= 127277 || x2 >= 127280 && x2 <= 127337 || x2 >= 127344 && x2 <= 127373 || x2 === 127375 || x2 === 127376 || x2 >= 127387 && x2 <= 127404 || x2 >= 917760 && x2 <= 917999 || x2 >= 983040 && x2 <= 1048573 || x2 >= 1048576 && x2 <= 1114109;
1502
+ }
1503
+ function isFullWidth(x2) {
1504
+ return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
1505
+ }
1506
+ function isWide(x2) {
1507
+ return x2 >= 4352 && x2 <= 4447 || x2 === 8986 || x2 === 8987 || x2 === 9001 || x2 === 9002 || x2 >= 9193 && x2 <= 9196 || x2 === 9200 || x2 === 9203 || x2 === 9725 || x2 === 9726 || x2 === 9748 || x2 === 9749 || x2 >= 9776 && x2 <= 9783 || x2 >= 9800 && x2 <= 9811 || x2 === 9855 || x2 >= 9866 && x2 <= 9871 || x2 === 9875 || x2 === 9889 || x2 === 9898 || x2 === 9899 || x2 === 9917 || x2 === 9918 || x2 === 9924 || x2 === 9925 || x2 === 9934 || x2 === 9940 || x2 === 9962 || x2 === 9970 || x2 === 9971 || x2 === 9973 || x2 === 9978 || x2 === 9981 || x2 === 9989 || x2 === 9994 || x2 === 9995 || x2 === 10024 || x2 === 10060 || x2 === 10062 || x2 >= 10067 && x2 <= 10069 || x2 === 10071 || x2 >= 10133 && x2 <= 10135 || x2 === 10160 || x2 === 10175 || x2 === 11035 || x2 === 11036 || x2 === 11088 || x2 === 11093 || x2 >= 11904 && x2 <= 11929 || x2 >= 11931 && x2 <= 12019 || x2 >= 12032 && x2 <= 12245 || x2 >= 12272 && x2 <= 12287 || x2 >= 12289 && x2 <= 12350 || x2 >= 12353 && x2 <= 12438 || x2 >= 12441 && x2 <= 12543 || x2 >= 12549 && x2 <= 12591 || x2 >= 12593 && x2 <= 12686 || x2 >= 12688 && x2 <= 12773 || x2 >= 12783 && x2 <= 12830 || x2 >= 12832 && x2 <= 12871 || x2 >= 12880 && x2 <= 42124 || x2 >= 42128 && x2 <= 42182 || x2 >= 43360 && x2 <= 43388 || x2 >= 44032 && x2 <= 55203 || x2 >= 63744 && x2 <= 64255 || x2 >= 65040 && x2 <= 65049 || x2 >= 65072 && x2 <= 65106 || x2 >= 65108 && x2 <= 65126 || x2 >= 65128 && x2 <= 65131 || x2 >= 94176 && x2 <= 94180 || x2 === 94192 || x2 === 94193 || x2 >= 94208 && x2 <= 100343 || x2 >= 100352 && x2 <= 101589 || x2 >= 101631 && x2 <= 101640 || x2 >= 110576 && x2 <= 110579 || x2 >= 110581 && x2 <= 110587 || x2 === 110589 || x2 === 110590 || x2 >= 110592 && x2 <= 110882 || x2 === 110898 || x2 >= 110928 && x2 <= 110930 || x2 === 110933 || x2 >= 110948 && x2 <= 110951 || x2 >= 110960 && x2 <= 111355 || x2 >= 119552 && x2 <= 119638 || x2 >= 119648 && x2 <= 119670 || x2 === 126980 || x2 === 127183 || x2 === 127374 || x2 >= 127377 && x2 <= 127386 || x2 >= 127488 && x2 <= 127490 || x2 >= 127504 && x2 <= 127547 || x2 >= 127552 && x2 <= 127560 || x2 === 127568 || x2 === 127569 || x2 >= 127584 && x2 <= 127589 || x2 >= 127744 && x2 <= 127776 || x2 >= 127789 && x2 <= 127797 || x2 >= 127799 && x2 <= 127868 || x2 >= 127870 && x2 <= 127891 || x2 >= 127904 && x2 <= 127946 || x2 >= 127951 && x2 <= 127955 || x2 >= 127968 && x2 <= 127984 || x2 === 127988 || x2 >= 127992 && x2 <= 128062 || x2 === 128064 || x2 >= 128066 && x2 <= 128252 || x2 >= 128255 && x2 <= 128317 || x2 >= 128331 && x2 <= 128334 || x2 >= 128336 && x2 <= 128359 || x2 === 128378 || x2 === 128405 || x2 === 128406 || x2 === 128420 || x2 >= 128507 && x2 <= 128591 || x2 >= 128640 && x2 <= 128709 || x2 === 128716 || x2 >= 128720 && x2 <= 128722 || x2 >= 128725 && x2 <= 128727 || x2 >= 128732 && x2 <= 128735 || x2 === 128747 || x2 === 128748 || x2 >= 128756 && x2 <= 128764 || x2 >= 128992 && x2 <= 129003 || x2 === 129008 || x2 >= 129292 && x2 <= 129338 || x2 >= 129340 && x2 <= 129349 || x2 >= 129351 && x2 <= 129535 || x2 >= 129648 && x2 <= 129660 || x2 >= 129664 && x2 <= 129673 || x2 >= 129679 && x2 <= 129734 || x2 >= 129742 && x2 <= 129756 || x2 >= 129759 && x2 <= 129769 || x2 >= 129776 && x2 <= 129784 || x2 >= 131072 && x2 <= 196605 || x2 >= 196608 && x2 <= 262141;
1508
+ }
1509
+ function validate(codePoint) {
1510
+ if (!Number.isSafeInteger(codePoint)) {
1511
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1512
+ }
1513
+ }
1514
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
1515
+ validate(codePoint);
1516
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
1517
+ return 2;
1518
+ }
1519
+ return 1;
1520
+ }
1521
+ function stringWidth$1(string, options = {}) {
1522
+ if (typeof string !== "string" || string.length === 0) {
1523
+ return 0;
1524
+ }
1525
+ const {
1526
+ ambiguousIsNarrow = true,
1527
+ countAnsiEscapeCodes = false
1528
+ } = options;
1529
+ if (!countAnsiEscapeCodes) {
1530
+ string = stripAnsi2(string);
1531
+ }
1532
+ if (string.length === 0) {
1533
+ return 0;
1534
+ }
1535
+ let width = 0;
1536
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1537
+ for (const { segment: character } of segmenter.segment(string)) {
1538
+ const codePoint = character.codePointAt(0);
1539
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
1540
+ continue;
1541
+ }
1542
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
1543
+ continue;
1544
+ }
1545
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
1546
+ continue;
1547
+ }
1548
+ if (codePoint >= 55296 && codePoint <= 57343) {
1549
+ continue;
1550
+ }
1551
+ if (codePoint >= 65024 && codePoint <= 65039) {
1552
+ continue;
1553
+ }
1554
+ if (defaultIgnorableCodePointRegex.test(character)) {
1555
+ continue;
1556
+ }
1557
+ if (emojiRegex().test(character)) {
1558
+ width += 2;
1559
+ continue;
1560
+ }
1561
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1562
+ }
1563
+ return width;
1564
+ }
1565
+ function isUnicodeSupported() {
1566
+ const { env: env2 } = g$1;
1567
+ const { TERM, TERM_PROGRAM } = env2;
1568
+ if (g$1.platform !== "win32") {
1569
+ return TERM !== "linux";
1570
+ }
1571
+ return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1572
+ }
1573
+ function stringWidth(str) {
1574
+ const hasICU = typeof Intl === "object";
1575
+ if (!hasICU || !Intl.Segmenter) {
1576
+ return stripAnsi(str).length;
1577
+ }
1578
+ return stringWidth$1(str);
1579
+ }
1580
+ function characterFormat(str) {
1581
+ return str.replace(/`([^`]+)`/gm, (_3, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_3, m2) => ` ${colors.underline(m2)} `);
1582
+ }
1583
+ function getColor2(color = "white") {
1584
+ return colors[color] || colors.white;
1585
+ }
1586
+ function getBgColor(color = "bgWhite") {
1587
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
1588
+ }
1589
+ function createConsola2(options = {}) {
1590
+ let level = _getDefaultLogLevel();
1591
+ if (process.env.CONSOLA_LEVEL) {
1592
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
1593
+ }
1594
+ const consola2 = createConsola({
1595
+ level,
1596
+ defaults: { level },
1597
+ stdout: process.stdout,
1598
+ stderr: process.stderr,
1599
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
1600
+ reporters: options.reporters || [
1601
+ options.fancy ?? !(T2 || R2) ? new FancyReporter : new BasicReporter
1602
+ ],
1603
+ ...options
1604
+ });
1605
+ return consola2;
1606
+ }
1607
+ function _getDefaultLogLevel() {
1608
+ if (g2) {
1609
+ return LogLevels.debug;
1610
+ }
1611
+ if (R2) {
1612
+ return LogLevels.warn;
1613
+ }
1614
+ return LogLevels.info;
1615
+ }
1616
+ var r2, i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r2 : globalThis), o2, t, f2, l, I2, T2, a, g2, R2, A2, C2, y2, _2, c2, O2, D, L2, S2, u2, N2, F2, P2, regex, emojiRegex = () => {
1617
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
1618
+ }, segmenter, defaultIgnorableCodePointRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode, s = (c3, fallback) => unicode ? c3 : fallback, TYPE_ICONS, FancyReporter, consola;
1619
+ var init_dist = __esm(() => {
1620
+ init_core();
1621
+ init_core();
1622
+ init_consola_DRwqZj3T();
1623
+ init_consola_DXBYu_KD();
1624
+ r2 = Object.create(null);
1625
+ o2 = new Proxy(r2, { get(e2, s) {
1626
+ return i()[s] ?? r2[s];
1627
+ }, has(e2, s) {
1628
+ const E = i();
1629
+ return s in E || s in r2;
1630
+ }, set(e2, s, E) {
1631
+ const B2 = i(true);
1632
+ return B2[s] = E, true;
1633
+ }, deleteProperty(e2, s) {
1634
+ if (!s)
1635
+ return false;
1636
+ const E = i(true);
1637
+ return delete E[s], true;
1638
+ }, ownKeys() {
1639
+ const e2 = i(true);
1640
+ return Object.keys(e2);
1641
+ } });
1642
+ t = typeof process < "u" && process.env && "development" || "";
1643
+ f2 = [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }]];
1644
+ l = b();
1645
+ l.name;
1646
+ I2 = globalThis.process?.platform || "";
1647
+ T2 = n(o2.CI) || l.ci !== false;
1648
+ a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
1649
+ g2 = n(o2.DEBUG);
1650
+ R2 = t === "test" || n(o2.TEST);
1651
+ n(o2.MINIMAL);
1652
+ A2 = /^win/i.test(I2);
1653
+ !n(o2.NO_COLOR) && (n(o2.FORCE_COLOR) || (a || A2) && o2.TERM);
1654
+ C2 = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
1655
+ Number(C2?.split(".")[0]);
1656
+ y2 = globalThis.process || Object.create(null);
1657
+ _2 = { versions: {} };
1658
+ new Proxy(y2, { get(e2, s) {
1659
+ if (s === "env")
1660
+ return o2;
1661
+ if (s in e2)
1662
+ return e2[s];
1663
+ if (s in _2)
1664
+ return _2[s];
1665
+ } });
1666
+ c2 = globalThis.process?.release?.name === "node";
1667
+ O2 = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
1668
+ D = !!globalThis.Deno;
1669
+ L2 = !!globalThis.fastly;
1670
+ S2 = !!globalThis.Netlify;
1671
+ u2 = !!globalThis.EdgeRuntime;
1672
+ N2 = globalThis.navigator?.userAgent === "Cloudflare-Workers";
1673
+ F2 = [[S2, "netlify"], [u2, "edge-light"], [N2, "workerd"], [L2, "fastly"], [D, "deno"], [O2, "bun"], [c2, "node"]];
1674
+ P2 = G2();
1675
+ P2?.name;
1676
+ regex = ansiRegex2();
1677
+ segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter : { segment: (str) => str.split("") };
1678
+ defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
1679
+ TYPE_COLOR_MAP = {
1680
+ info: "cyan",
1681
+ fail: "red",
1682
+ success: "green",
1683
+ ready: "green",
1684
+ start: "magenta"
1685
+ };
1686
+ LEVEL_COLOR_MAP = {
1687
+ 0: "red",
1688
+ 1: "yellow"
1689
+ };
1690
+ unicode = isUnicodeSupported();
1691
+ TYPE_ICONS = {
1692
+ error: s("✖", "×"),
1693
+ fatal: s("✖", "×"),
1694
+ ready: s("✔", "√"),
1695
+ warn: s("⚠", "‼"),
1696
+ info: s("ℹ", "i"),
1697
+ success: s("✔", "√"),
1698
+ debug: s("⚙", "D"),
1699
+ trace: s("→", "→"),
1700
+ fail: s("✖", "×"),
1701
+ start: s("◐", "o"),
1702
+ log: ""
1703
+ };
1704
+ FancyReporter = class FancyReporter extends BasicReporter {
1705
+ formatStack(stack, message, opts) {
1706
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1707
+ return `
1708
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_3, m2) => `(${colors.cyan(m2)})`)).join(`
1709
+ ${indent}`);
1710
+ }
1711
+ formatType(logObj, isBadge, opts) {
1712
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
1713
+ if (isBadge) {
1714
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
1715
+ }
1716
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
1717
+ return _type ? getColor2(typeColor)(_type) : "";
1718
+ }
1719
+ formatLogObj(logObj, opts) {
1720
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(`
1721
+ `);
1722
+ if (logObj.type === "box") {
1723
+ return box(characterFormat(message + (additional.length > 0 ? `
1724
+ ` + additional.join(`
1725
+ `) : "")), {
1726
+ title: logObj.title ? characterFormat(logObj.title) : undefined,
1727
+ style: logObj.style
1728
+ });
1729
+ }
1730
+ const date = this.formatDate(logObj.date, opts);
1731
+ const coloredDate = date && colors.gray(date);
1732
+ const isBadge = logObj.badge ?? logObj.level < 2;
1733
+ const type = this.formatType(logObj, isBadge, opts);
1734
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
1735
+ let line;
1736
+ const left = this.filterAndJoin([type, characterFormat(message)]);
1737
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
1738
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
1739
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
1740
+ line += characterFormat(additional.length > 0 ? `
1741
+ ` + additional.join(`
1742
+ `) : "");
1743
+ if (logObj.type === "trace") {
1744
+ const _err = new Error("Trace: " + logObj.message);
1745
+ line += this.formatStack(_err.stack || "", _err.message);
1746
+ }
1747
+ return isBadge ? `
1748
+ ` + line + `
1749
+ ` : line;
1750
+ }
1751
+ };
1752
+ consola = createConsola2();
1753
+ });
1754
+
1755
+ // node_modules/consola/dist/utils.mjs
1756
+ var init_utils = __esm(() => {
1757
+ init_consola_DXBYu_KD();
1758
+ init_consola_DXBYu_KD();
1759
+ });
1760
+
1761
+ // node_modules/citty/dist/index.mjs
1762
+ function toArray(val) {
1763
+ if (Array.isArray(val)) {
1764
+ return val;
1765
+ }
1766
+ return val === undefined ? [] : [val];
1767
+ }
1768
+ function formatLineColumns(lines, linePrefix = "") {
1769
+ const maxLengh = [];
1770
+ for (const line of lines) {
1771
+ for (const [i2, element] of line.entries()) {
1772
+ maxLengh[i2] = Math.max(maxLengh[i2] || 0, element.length);
1773
+ }
1774
+ }
1775
+ return lines.map((l2) => l2.map((c3, i2) => linePrefix + c3[i2 === 0 ? "padStart" : "padEnd"](maxLengh[i2])).join(" ")).join(`
1776
+ `);
1777
+ }
1778
+ function resolveValue(input) {
1779
+ return typeof input === "function" ? input() : input;
1780
+ }
1781
+ function isUppercase(char = "") {
1782
+ if (NUMBER_CHAR_RE.test(char)) {
1783
+ return;
1784
+ }
1785
+ return char !== char.toLowerCase();
1786
+ }
1787
+ function splitByCase(str, separators) {
1788
+ const splitters = separators ?? STR_SPLITTERS;
1789
+ const parts = [];
1790
+ if (!str || typeof str !== "string") {
1791
+ return parts;
1792
+ }
1793
+ let buff = "";
1794
+ let previousUpper;
1795
+ let previousSplitter;
1796
+ for (const char of str) {
1797
+ const isSplitter = splitters.includes(char);
1798
+ if (isSplitter === true) {
1799
+ parts.push(buff);
1800
+ buff = "";
1801
+ previousUpper = undefined;
1802
+ continue;
1803
+ }
1804
+ const isUpper = isUppercase(char);
1805
+ if (previousSplitter === false) {
1806
+ if (previousUpper === false && isUpper === true) {
1807
+ parts.push(buff);
1808
+ buff = char;
1809
+ previousUpper = isUpper;
1810
+ continue;
1811
+ }
1812
+ if (previousUpper === true && isUpper === false && buff.length > 1) {
1813
+ const lastChar = buff.at(-1);
1814
+ parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
1815
+ buff = lastChar + char;
1816
+ previousUpper = isUpper;
1817
+ continue;
1818
+ }
1819
+ }
1820
+ buff += char;
1821
+ previousUpper = isUpper;
1822
+ previousSplitter = isSplitter;
1823
+ }
1824
+ parts.push(buff);
1825
+ return parts;
1826
+ }
1827
+ function upperFirst(str) {
1828
+ return str ? str[0].toUpperCase() + str.slice(1) : "";
1829
+ }
1830
+ function lowerFirst(str) {
1831
+ return str ? str[0].toLowerCase() + str.slice(1) : "";
1832
+ }
1833
+ function pascalCase(str, opts) {
1834
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
1835
+ }
1836
+ function camelCase(str, opts) {
1837
+ return lowerFirst(pascalCase(str || "", opts));
1838
+ }
1839
+ function kebabCase(str, joiner) {
1840
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
1841
+ }
1842
+ function toArr(any) {
1843
+ return any == undefined ? [] : Array.isArray(any) ? any : [any];
1844
+ }
1845
+ function toVal(out, key, val, opts) {
1846
+ let x2;
1847
+ const old = out[key];
1848
+ const nxt = ~opts.string.indexOf(key) ? val == undefined || val === true ? "" : String(val) : typeof val === "boolean" ? val : ~opts.boolean.indexOf(key) ? val === "false" ? false : val === "true" || (out._.push((x2 = +val, x2 * 0 === 0) ? x2 : val), !!val) : (x2 = +val, x2 * 0 === 0) ? x2 : val;
1849
+ out[key] = old == undefined ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];
1850
+ }
1851
+ function parseRawArgs(args = [], opts = {}) {
1852
+ let k2;
1853
+ let arr;
1854
+ let arg;
1855
+ let name;
1856
+ let val;
1857
+ const out = { _: [] };
1858
+ let i2 = 0;
1859
+ let j = 0;
1860
+ let idx = 0;
1861
+ const len = args.length;
1862
+ const alibi = opts.alias !== undefined;
1863
+ const strict = opts.unknown !== undefined;
1864
+ const defaults = opts.default !== undefined;
1865
+ opts.alias = opts.alias || {};
1866
+ opts.string = toArr(opts.string);
1867
+ opts.boolean = toArr(opts.boolean);
1868
+ if (alibi) {
1869
+ for (k2 in opts.alias) {
1870
+ arr = opts.alias[k2] = toArr(opts.alias[k2]);
1871
+ for (i2 = 0;i2 < arr.length; i2++) {
1872
+ (opts.alias[arr[i2]] = arr.concat(k2)).splice(i2, 1);
1873
+ }
1874
+ }
1875
+ }
1876
+ for (i2 = opts.boolean.length;i2-- > 0; ) {
1877
+ arr = opts.alias[opts.boolean[i2]] || [];
1878
+ for (j = arr.length;j-- > 0; ) {
1879
+ opts.boolean.push(arr[j]);
1880
+ }
1881
+ }
1882
+ for (i2 = opts.string.length;i2-- > 0; ) {
1883
+ arr = opts.alias[opts.string[i2]] || [];
1884
+ for (j = arr.length;j-- > 0; ) {
1885
+ opts.string.push(arr[j]);
1886
+ }
1887
+ }
1888
+ if (defaults) {
1889
+ for (k2 in opts.default) {
1890
+ name = typeof opts.default[k2];
1891
+ arr = opts.alias[k2] = opts.alias[k2] || [];
1892
+ if (opts[name] !== undefined) {
1893
+ opts[name].push(k2);
1894
+ for (i2 = 0;i2 < arr.length; i2++) {
1895
+ opts[name].push(arr[i2]);
1896
+ }
1897
+ }
1898
+ }
1899
+ }
1900
+ const keys = strict ? Object.keys(opts.alias) : [];
1901
+ for (i2 = 0;i2 < len; i2++) {
1902
+ arg = args[i2];
1903
+ if (arg === "--") {
1904
+ out._ = out._.concat(args.slice(++i2));
1905
+ break;
1906
+ }
1907
+ for (j = 0;j < arg.length; j++) {
1908
+ if (arg.charCodeAt(j) !== 45) {
1909
+ break;
1910
+ }
1911
+ }
1912
+ if (j === 0) {
1913
+ out._.push(arg);
1914
+ } else if (arg.substring(j, j + 3) === "no-") {
1915
+ name = arg.slice(Math.max(0, j + 3));
1916
+ if (strict && !~keys.indexOf(name)) {
1917
+ return opts.unknown(arg);
1918
+ }
1919
+ out[name] = false;
1920
+ } else {
1921
+ for (idx = j + 1;idx < arg.length; idx++) {
1922
+ if (arg.charCodeAt(idx) === 61) {
1923
+ break;
1924
+ }
1925
+ }
1926
+ name = arg.substring(j, idx);
1927
+ val = arg.slice(Math.max(0, ++idx)) || i2 + 1 === len || ("" + args[i2 + 1]).charCodeAt(0) === 45 || args[++i2];
1928
+ arr = j === 2 ? [name] : name;
1929
+ for (idx = 0;idx < arr.length; idx++) {
1930
+ name = arr[idx];
1931
+ if (strict && !~keys.indexOf(name)) {
1932
+ return opts.unknown("-".repeat(j) + name);
1933
+ }
1934
+ toVal(out, name, idx + 1 < arr.length || val, opts);
1935
+ }
1936
+ }
1937
+ }
1938
+ if (defaults) {
1939
+ for (k2 in opts.default) {
1940
+ if (out[k2] === undefined) {
1941
+ out[k2] = opts.default[k2];
1942
+ }
1943
+ }
1944
+ }
1945
+ if (alibi) {
1946
+ for (k2 in out) {
1947
+ arr = opts.alias[k2] || [];
1948
+ while (arr.length > 0) {
1949
+ out[arr.shift()] = out[k2];
1950
+ }
1951
+ }
1952
+ }
1953
+ return out;
1954
+ }
1955
+ function parseArgs(rawArgs, argsDef) {
1956
+ const parseOptions = {
1957
+ boolean: [],
1958
+ string: [],
1959
+ mixed: [],
1960
+ alias: {},
1961
+ default: {}
1962
+ };
1963
+ const args = resolveArgs(argsDef);
1964
+ for (const arg of args) {
1965
+ if (arg.type === "positional") {
1966
+ continue;
1967
+ }
1968
+ if (arg.type === "string") {
1969
+ parseOptions.string.push(arg.name);
1970
+ } else if (arg.type === "boolean") {
1971
+ parseOptions.boolean.push(arg.name);
1972
+ }
1973
+ if (arg.default !== undefined) {
1974
+ parseOptions.default[arg.name] = arg.default;
1975
+ }
1976
+ if (arg.alias) {
1977
+ parseOptions.alias[arg.name] = arg.alias;
1978
+ }
1979
+ }
1980
+ const parsed = parseRawArgs(rawArgs, parseOptions);
1981
+ const [...positionalArguments] = parsed._;
1982
+ const parsedArgsProxy = new Proxy(parsed, {
1983
+ get(target, prop) {
1984
+ return target[prop] ?? target[camelCase(prop)] ?? target[kebabCase(prop)];
1985
+ }
1986
+ });
1987
+ for (const [, arg] of args.entries()) {
1988
+ if (arg.type === "positional") {
1989
+ const nextPositionalArgument = positionalArguments.shift();
1990
+ if (nextPositionalArgument !== undefined) {
1991
+ parsedArgsProxy[arg.name] = nextPositionalArgument;
1992
+ } else if (arg.default === undefined && arg.required !== false) {
1993
+ throw new CLIError(`Missing required positional argument: ${arg.name.toUpperCase()}`, "EARG");
1994
+ } else {
1995
+ parsedArgsProxy[arg.name] = arg.default;
1996
+ }
1997
+ } else if (arg.required && parsedArgsProxy[arg.name] === undefined) {
1998
+ throw new CLIError(`Missing required argument: --${arg.name}`, "EARG");
1999
+ }
2000
+ }
2001
+ return parsedArgsProxy;
2002
+ }
2003
+ function resolveArgs(argsDef) {
2004
+ const args = [];
2005
+ for (const [name, argDef] of Object.entries(argsDef || {})) {
2006
+ args.push({
2007
+ ...argDef,
2008
+ name,
2009
+ alias: toArray(argDef.alias)
2010
+ });
2011
+ }
2012
+ return args;
2013
+ }
2014
+ function defineCommand(def) {
2015
+ return def;
2016
+ }
2017
+ async function runCommand(cmd, opts) {
2018
+ const cmdArgs = await resolveValue(cmd.args || {});
2019
+ const parsedArgs = parseArgs(opts.rawArgs, cmdArgs);
2020
+ const context = {
2021
+ rawArgs: opts.rawArgs,
2022
+ args: parsedArgs,
2023
+ data: opts.data,
2024
+ cmd
2025
+ };
2026
+ if (typeof cmd.setup === "function") {
2027
+ await cmd.setup(context);
2028
+ }
2029
+ let result;
2030
+ try {
2031
+ const subCommands = await resolveValue(cmd.subCommands);
2032
+ if (subCommands && Object.keys(subCommands).length > 0) {
2033
+ const subCommandArgIndex = opts.rawArgs.findIndex((arg) => !arg.startsWith("-"));
2034
+ const subCommandName = opts.rawArgs[subCommandArgIndex];
2035
+ if (subCommandName) {
2036
+ if (!subCommands[subCommandName]) {
2037
+ throw new CLIError(`Unknown command \`${subCommandName}\``, "E_UNKNOWN_COMMAND");
2038
+ }
2039
+ const subCommand = await resolveValue(subCommands[subCommandName]);
2040
+ if (subCommand) {
2041
+ await runCommand(subCommand, {
2042
+ rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1)
2043
+ });
2044
+ }
2045
+ } else if (!cmd.run) {
2046
+ throw new CLIError(`No command specified.`, "E_NO_COMMAND");
2047
+ }
2048
+ }
2049
+ if (typeof cmd.run === "function") {
2050
+ result = await cmd.run(context);
2051
+ }
2052
+ } finally {
2053
+ if (typeof cmd.cleanup === "function") {
2054
+ await cmd.cleanup(context);
2055
+ }
2056
+ }
2057
+ return { result };
2058
+ }
2059
+ async function resolveSubCommand(cmd, rawArgs, parent) {
2060
+ const subCommands = await resolveValue(cmd.subCommands);
2061
+ if (subCommands && Object.keys(subCommands).length > 0) {
2062
+ const subCommandArgIndex = rawArgs.findIndex((arg) => !arg.startsWith("-"));
2063
+ const subCommandName = rawArgs[subCommandArgIndex];
2064
+ const subCommand = await resolveValue(subCommands[subCommandName]);
2065
+ if (subCommand) {
2066
+ return resolveSubCommand(subCommand, rawArgs.slice(subCommandArgIndex + 1), cmd);
2067
+ }
2068
+ }
2069
+ return [cmd, parent];
2070
+ }
2071
+ async function showUsage(cmd, parent) {
2072
+ try {
2073
+ consola.log(await renderUsage(cmd, parent) + `
2074
+ `);
2075
+ } catch (error) {
2076
+ consola.error(error);
2077
+ }
2078
+ }
2079
+ async function renderUsage(cmd, parent) {
2080
+ const cmdMeta = await resolveValue(cmd.meta || {});
2081
+ const cmdArgs = resolveArgs(await resolveValue(cmd.args || {}));
2082
+ const parentMeta = await resolveValue(parent?.meta || {});
2083
+ const commandName = `${parentMeta.name ? `${parentMeta.name} ` : ""}` + (cmdMeta.name || process.argv[1]);
2084
+ const argLines = [];
2085
+ const posLines = [];
2086
+ const commandsLines = [];
2087
+ const usageLine = [];
2088
+ for (const arg of cmdArgs) {
2089
+ if (arg.type === "positional") {
2090
+ const name = arg.name.toUpperCase();
2091
+ const isRequired = arg.required !== false && arg.default === undefined;
2092
+ const defaultHint = arg.default ? `="${arg.default}"` : "";
2093
+ posLines.push([
2094
+ "`" + name + defaultHint + "`",
2095
+ arg.description || "",
2096
+ arg.valueHint ? `<${arg.valueHint}>` : ""
2097
+ ]);
2098
+ usageLine.push(isRequired ? `<${name}>` : `[${name}]`);
2099
+ } else {
2100
+ const isRequired = arg.required === true && arg.default === undefined;
2101
+ const argStr = (arg.type === "boolean" && arg.default === true ? [
2102
+ ...(arg.alias || []).map((a2) => `--no-${a2}`),
2103
+ `--no-${arg.name}`
2104
+ ].join(", ") : [...(arg.alias || []).map((a2) => `-${a2}`), `--${arg.name}`].join(", ")) + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : "");
2105
+ argLines.push([
2106
+ "`" + argStr + (isRequired ? " (required)" : "") + "`",
2107
+ arg.description || ""
2108
+ ]);
2109
+ if (isRequired) {
2110
+ usageLine.push(argStr);
2111
+ }
2112
+ }
2113
+ }
2114
+ if (cmd.subCommands) {
2115
+ const commandNames = [];
2116
+ const subCommands = await resolveValue(cmd.subCommands);
2117
+ for (const [name, sub] of Object.entries(subCommands)) {
2118
+ const subCmd = await resolveValue(sub);
2119
+ const meta = await resolveValue(subCmd?.meta);
2120
+ commandsLines.push([`\`${name}\``, meta?.description || ""]);
2121
+ commandNames.push(name);
2122
+ }
2123
+ usageLine.push(commandNames.join("|"));
2124
+ }
2125
+ const usageLines = [];
2126
+ const version = cmdMeta.version || parentMeta.version;
2127
+ usageLines.push(colors.gray(`${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})`), "");
2128
+ const hasOptions = argLines.length > 0 || posLines.length > 0;
2129
+ usageLines.push(`${colors.underline(colors.bold("USAGE"))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(" ")}\``, "");
2130
+ if (posLines.length > 0) {
2131
+ usageLines.push(colors.underline(colors.bold("ARGUMENTS")), "");
2132
+ usageLines.push(formatLineColumns(posLines, " "));
2133
+ usageLines.push("");
2134
+ }
2135
+ if (argLines.length > 0) {
2136
+ usageLines.push(colors.underline(colors.bold("OPTIONS")), "");
2137
+ usageLines.push(formatLineColumns(argLines, " "));
2138
+ usageLines.push("");
2139
+ }
2140
+ if (commandsLines.length > 0) {
2141
+ usageLines.push(colors.underline(colors.bold("COMMANDS")), "");
2142
+ usageLines.push(formatLineColumns(commandsLines, " "));
2143
+ usageLines.push("", `Use \`${commandName} <command> --help\` for more information about a command.`);
2144
+ }
2145
+ return usageLines.filter((l2) => typeof l2 === "string").join(`
2146
+ `);
2147
+ }
2148
+ async function runMain(cmd, opts = {}) {
2149
+ const rawArgs = opts.rawArgs || process.argv.slice(2);
2150
+ const showUsage$1 = opts.showUsage || showUsage;
2151
+ try {
2152
+ if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
2153
+ await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
2154
+ process.exit(0);
2155
+ } else if (rawArgs.length === 1 && rawArgs[0] === "--version") {
2156
+ const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta;
2157
+ if (!meta?.version) {
2158
+ throw new CLIError("No version specified", "E_NO_VERSION");
2159
+ }
2160
+ consola.log(meta.version);
2161
+ } else {
2162
+ await runCommand(cmd, { rawArgs });
2163
+ }
2164
+ } catch (error) {
2165
+ const isCLIError = error instanceof CLIError;
2166
+ if (!isCLIError) {
2167
+ consola.error(error, `
2168
+ `);
2169
+ }
2170
+ if (isCLIError) {
2171
+ await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
2172
+ }
2173
+ consola.error(error.message);
2174
+ process.exit(1);
2175
+ }
2176
+ }
2177
+ var CLIError, NUMBER_CHAR_RE, STR_SPLITTERS;
2178
+ var init_dist2 = __esm(() => {
2179
+ init_dist();
2180
+ init_utils();
2181
+ CLIError = class CLIError extends Error {
2182
+ constructor(message, code) {
2183
+ super(message);
2184
+ this.code = code;
2185
+ this.name = "CLIError";
2186
+ }
2187
+ };
2188
+ NUMBER_CHAR_RE = /\d/;
2189
+ STR_SPLITTERS = ["-", "_", "/", "."];
2190
+ });
2191
+
2192
+ // src/cli/version.ts
2193
+ var VERSION = "1.0.0";
2194
+
2195
+ // src/cli/client.ts
2196
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
2197
+ import { join } from "path";
2198
+ import { homedir } from "os";
2199
+ function loadConfig() {
2200
+ if (existsSync(CONFIG_FILE)) {
2201
+ const raw = JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
2202
+ if (!raw.apiUrl || raw.apiUrl.includes(".convex.site")) {
2203
+ raw.apiUrl = DEFAULT_API_URL;
2204
+ }
2205
+ return raw;
2206
+ }
2207
+ return { apiUrl: DEFAULT_API_URL };
2208
+ }
2209
+ function saveConfig(config) {
2210
+ if (!existsSync(CONFIG_DIR))
2211
+ mkdirSync(CONFIG_DIR, { recursive: true });
2212
+ writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
2213
+ }
2214
+ function getConfig() {
2215
+ return loadConfig();
2216
+ }
2217
+ function setApiKey(apiKey) {
2218
+ const config = loadConfig();
2219
+ config.apiKey = apiKey;
2220
+ saveConfig(config);
2221
+ }
2222
+ async function publicRequest(method, path, body) {
2223
+ const config = loadConfig();
2224
+ const url = `${config.apiUrl}${path}`;
2225
+ const headers = {
2226
+ "Content-Type": "application/json"
2227
+ };
2228
+ const res = await fetch(url, {
2229
+ method,
2230
+ headers,
2231
+ ...body && { body: JSON.stringify(body) }
2232
+ });
2233
+ const json = await res.json();
2234
+ if (!res.ok) {
2235
+ const msg = typeof json === "object" && json !== null && "error" in json ? json.message ?? json.error : `HTTP ${res.status}`;
2236
+ throw new Error(msg);
2237
+ }
2238
+ return json;
2239
+ }
2240
+ async function apiRequest(method, path, body) {
2241
+ const config = loadConfig();
2242
+ if (!config.apiKey) {
2243
+ throw new Error('Not authenticated. Run "vidjutsu auth --key <your_api_key>" first.');
2244
+ }
2245
+ const url = `${config.apiUrl}${path}`;
2246
+ const headers = {
2247
+ Authorization: `Bearer ${config.apiKey}`,
2248
+ "Content-Type": "application/json"
2249
+ };
2250
+ const res = await fetch(url, {
2251
+ method,
2252
+ headers,
2253
+ ...body && { body: JSON.stringify(body) }
2254
+ });
2255
+ const json = await res.json();
2256
+ if (!res.ok) {
2257
+ const msg = typeof json === "object" && json !== null && "error" in json ? json.message ?? json.error : `HTTP ${res.status}`;
2258
+ throw new Error(msg);
2259
+ }
2260
+ return json;
2261
+ }
2262
+ var CONFIG_DIR, CONFIG_FILE, DEFAULT_API_URL = "https://api.vidjutsu.ai";
2263
+ var init_client = __esm(() => {
2264
+ CONFIG_DIR = join(homedir(), ".vidjutsu");
2265
+ CONFIG_FILE = join(CONFIG_DIR, "config.json");
2266
+ });
2267
+
2268
+ // src/cli/commands/auth.ts
2269
+ var exports_auth = {};
2270
+ __export(exports_auth, {
2271
+ default: () => auth_default
2272
+ });
2273
+ import { writeFileSync as writeFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs";
2274
+ import { join as join2 } from "path";
2275
+ var CREDENTIALS_FILE, auth_default;
2276
+ var init_auth = __esm(() => {
2277
+ init_dist2();
2278
+ init_client();
2279
+ CREDENTIALS_FILE = join2(CONFIG_DIR, "credentials.json");
2280
+ auth_default = defineCommand({
2281
+ meta: { name: "auth", description: "Authenticate with your VidJutsu API key" },
2282
+ args: {
2283
+ key: { type: "string", description: "Your VidJutsu API key (vj_...)" },
2284
+ recover: { type: "string", description: "Request verification code via email" },
2285
+ verify: { type: "boolean", description: "Submit verification code" },
2286
+ email: { type: "string", description: "Email for verification" },
2287
+ code: { type: "string", description: "Verification code from email" },
2288
+ export: { type: "boolean", description: "Export credentials to file" }
2289
+ },
2290
+ async run({ args }) {
2291
+ if (args.key) {
2292
+ setApiKey(args.key);
2293
+ console.log(`Credentials saved to ${CONFIG_FILE}`);
2294
+ return;
2295
+ }
2296
+ if (args.recover) {
2297
+ await publicRequest("POST", "/v1/auth/verify/request", {
2298
+ email: args.recover
2299
+ });
2300
+ console.log("Verification code sent. Run:");
2301
+ console.log(` vidjutsu auth --verify --email ${args.recover} --code <code>`);
2302
+ return;
2303
+ }
2304
+ if (args.verify) {
2305
+ if (!args.email || !args.code) {
2306
+ console.error("Both --email and --code are required with --verify.");
2307
+ console.error(" vidjutsu auth --verify --email you@example.com --code 123456");
2308
+ process.exit(1);
2309
+ }
2310
+ const result = await publicRequest("POST", "/v1/auth/verify/confirm", {
2311
+ email: args.email,
2312
+ code: args.code
2313
+ });
2314
+ setApiKey(result.apiKey);
2315
+ console.log(`Credentials saved to ${CONFIG_FILE}`);
2316
+ return;
2317
+ }
2318
+ if (args.export) {
2319
+ const config2 = getConfig();
2320
+ if (!config2.apiKey) {
2321
+ console.error("Not authenticated. Nothing to export.");
2322
+ process.exit(1);
2323
+ }
2324
+ if (!existsSync2(CONFIG_DIR))
2325
+ mkdirSync2(CONFIG_DIR, { recursive: true });
2326
+ writeFileSync2(CREDENTIALS_FILE, JSON.stringify({
2327
+ apiKey: config2.apiKey
2328
+ }, null, 2));
2329
+ console.log(`Credentials written to ${CREDENTIALS_FILE}`);
2330
+ return;
2331
+ }
2332
+ const config = getConfig();
2333
+ if (config.apiKey) {
2334
+ console.log("Authenticated");
2335
+ console.log(`Config: ${CONFIG_FILE}`);
2336
+ } else {
2337
+ console.log("Not authenticated.");
2338
+ console.log(" Subscribe: vidjutsu subscribe --email you@example.com");
2339
+ console.log(" Manual key: vidjutsu auth --key <your_api_key>");
2340
+ }
2341
+ }
2342
+ });
2343
+ });
2344
+
2345
+ // src/cli/commands/check.ts
2346
+ var exports_check = {};
2347
+ __export(exports_check, {
2348
+ default: () => check_default
2349
+ });
2350
+ import { readFileSync as readFileSync2 } from "fs";
2351
+ var check_default;
2352
+ var init_check = __esm(() => {
2353
+ init_dist2();
2354
+ init_client();
2355
+ check_default = defineCommand({
2356
+ meta: { name: "check", description: "Validate a VidLang spec against rules" },
2357
+ subCommands: {
2358
+ run: defineCommand({
2359
+ meta: { name: "run", description: "Run spec validation" },
2360
+ args: {
2361
+ spec: { type: "string", required: true, description: "Path to spec JSON file" },
2362
+ rules: { type: "string", required: true, description: `Rules config JSON or comma-separated rule IDs to enable (e.g. VL013,VL011 or '{"VL013":true}')` }
2363
+ },
2364
+ async run({ args }) {
2365
+ const config = getConfig();
2366
+ if (!config.apiKey) {
2367
+ throw new Error('Not authenticated. Run "vidjutsu auth --key <your_api_key>" first.');
2368
+ }
2369
+ const specContent = readFileSync2(args.spec, "utf-8");
2370
+ let spec;
2371
+ try {
2372
+ spec = JSON.parse(specContent);
2373
+ } catch {
2374
+ throw new Error(`Failed to parse spec file: ${args.spec}`);
2375
+ }
2376
+ let rules;
2377
+ try {
2378
+ rules = JSON.parse(args.rules);
2379
+ } catch {
2380
+ rules = {};
2381
+ for (const id of args.rules.split(",").map((r3) => r3.trim())) {
2382
+ rules[id] = true;
2383
+ }
2384
+ }
2385
+ console.log(`Checking spec with ${Object.keys(rules).length} rules...`);
2386
+ const res = await fetch(`${config.apiUrl}/v1/check`, {
2387
+ method: "POST",
2388
+ headers: { Authorization: `Bearer ${config.apiKey}`, "Content-Type": "application/json" },
2389
+ body: JSON.stringify({ spec, rules })
2390
+ });
2391
+ const json = await res.json();
2392
+ if (!res.ok) {
2393
+ const msg = typeof json === "object" && json !== null && "error" in json ? json.message ?? json.error : `HTTP ${res.status}`;
2394
+ throw new Error(msg);
2395
+ }
2396
+ const data = json;
2397
+ if (data.passed) {
2398
+ console.log("✓ All checks passed");
2399
+ } else {
2400
+ console.log("✗ Failed checks:");
2401
+ for (const r3 of data.results ?? []) {
2402
+ if (!r3.passed) {
2403
+ console.log(` [${r3.severity}] ${r3.rule}: ${r3.message}`);
2404
+ }
2405
+ }
2406
+ }
2407
+ const total = data.results?.length ?? 0;
2408
+ const passed = data.results?.filter((r3) => r3.passed !== false).length ?? 0;
2409
+ console.log(`
2410
+ ${passed}/${total} rules passed`);
2411
+ }
2412
+ }),
2413
+ rules: defineCommand({
2414
+ meta: { name: "rules", description: "Manage check rules" },
2415
+ subCommands: {
2416
+ list: defineCommand({
2417
+ meta: { name: "list", description: "List saved check rules" },
2418
+ args: {},
2419
+ async run() {
2420
+ const result = await apiRequest("GET", "/v1/check/rules");
2421
+ console.log(JSON.stringify(result, null, 2));
2422
+ }
2423
+ }),
2424
+ set: defineCommand({
2425
+ meta: { name: "set", description: "Save check rules" },
2426
+ args: {
2427
+ rules: { type: "positional", description: "Rules (comma-separated)", required: true }
2428
+ },
2429
+ async run({ args }) {
2430
+ const rules = args.rules.split(",").map((r3) => r3.trim());
2431
+ const result = await apiRequest("PUT", "/v1/check/rules", { rules });
2432
+ console.log(JSON.stringify(result, null, 2));
2433
+ }
2434
+ })
2435
+ }
2436
+ })
2437
+ }
2438
+ });
2439
+ });
2440
+
2441
+ // src/cli/commands/upload.ts
2442
+ var exports_upload = {};
2443
+ __export(exports_upload, {
2444
+ default: () => upload_default
2445
+ });
2446
+ import { readFileSync as readFileSync3 } from "fs";
2447
+ var upload_default;
2448
+ var init_upload = __esm(() => {
2449
+ init_dist2();
2450
+ init_client();
2451
+ upload_default = defineCommand({
2452
+ meta: { name: "upload", description: "Upload a file or URL to VidJutsu CDN" },
2453
+ args: {
2454
+ file: { type: "positional", description: "File path to upload" },
2455
+ url: { type: "string", description: "URL to upload via POST /v1/upload/url" }
2456
+ },
2457
+ async run({ args }) {
2458
+ const config = getConfig();
2459
+ if (!config.apiKey) {
2460
+ throw new Error('Not authenticated. Run "vidjutsu auth --key <your_api_key>" first.');
2461
+ }
2462
+ if (args.url) {
2463
+ const res2 = await fetch(`${config.apiUrl}/v1/upload/url`, {
2464
+ method: "POST",
2465
+ headers: {
2466
+ Authorization: `Bearer ${config.apiKey}`,
2467
+ "Content-Type": "application/json"
2468
+ },
2469
+ body: JSON.stringify({ sourceUrl: args.url })
2470
+ });
2471
+ const json2 = await res2.json();
2472
+ if (!res2.ok) {
2473
+ const msg = typeof json2 === "object" && json2 !== null && "error" in json2 ? json2.message ?? json2.error : `HTTP ${res2.status}`;
2474
+ throw new Error(msg);
2475
+ }
2476
+ console.log(JSON.stringify(json2, null, 2));
2477
+ return;
2478
+ }
2479
+ if (!args.file) {
2480
+ throw new Error("Provide a file path or --url <url>");
2481
+ }
2482
+ const filePath = args.file;
2483
+ const buffer = readFileSync3(filePath);
2484
+ const ext = filePath.split(".").pop()?.toLowerCase() ?? "";
2485
+ const contentTypes = {
2486
+ mp4: "video/mp4",
2487
+ mov: "video/quicktime",
2488
+ webm: "video/webm",
2489
+ png: "image/png",
2490
+ jpg: "image/jpeg",
2491
+ jpeg: "image/jpeg",
2492
+ webp: "image/webp",
2493
+ mp3: "audio/mpeg",
2494
+ wav: "audio/wav"
2495
+ };
2496
+ const contentType = contentTypes[ext] ?? "application/octet-stream";
2497
+ console.log(`Uploading ${filePath} (${Math.round(buffer.length / 1024)}KB, ${contentType})...`);
2498
+ const res = await fetch(`${config.apiUrl}/v1/upload`, {
2499
+ method: "POST",
2500
+ headers: {
2501
+ Authorization: `Bearer ${config.apiKey}`,
2502
+ "Content-Type": contentType
2503
+ },
2504
+ body: buffer
2505
+ });
2506
+ const json = await res.json();
2507
+ if (!res.ok) {
2508
+ const msg = typeof json === "object" && json !== null && "error" in json ? json.message ?? json.error : `HTTP ${res.status}`;
2509
+ throw new Error(msg);
2510
+ }
2511
+ console.log(JSON.stringify(json, null, 2));
2512
+ }
2513
+ });
2514
+ });
2515
+
2516
+ // src/cli/commands/subscribe.ts
2517
+ var exports_subscribe = {};
2518
+ __export(exports_subscribe, {
2519
+ default: () => subscribe_default
2520
+ });
2521
+ function sleep(ms) {
2522
+ return new Promise((resolve) => setTimeout(resolve, ms));
2523
+ }
2524
+ var subscribe_default;
2525
+ var init_subscribe = __esm(() => {
2526
+ init_dist2();
2527
+ init_client();
2528
+ subscribe_default = defineCommand({
2529
+ meta: { name: "subscribe", description: "Subscribe to VidJutsu ($99/mo)" },
2530
+ args: {
2531
+ email: { type: "string", description: "Email for checkout", required: true },
2532
+ claim: { type: "string", description: "Claim token to resume polling (claim_xxx)" }
2533
+ },
2534
+ async run({ args }) {
2535
+ if (!args.email) {
2536
+ console.error("Email is required. Usage: vidjutsu subscribe --email you@example.com");
2537
+ process.exit(1);
2538
+ }
2539
+ let claimToken;
2540
+ if (args.claim) {
2541
+ claimToken = args.claim;
2542
+ } else {
2543
+ const checkout = await publicRequest("POST", "/v1/subscribe", {
2544
+ email: args.email
2545
+ });
2546
+ claimToken = checkout.claimToken;
2547
+ console.log(`
2548
+ Checkout: ${checkout.url}`);
2549
+ console.log(`
2550
+ Complete payment in your browser.`);
2551
+ }
2552
+ console.log("Waiting for payment...");
2553
+ const startTime = Date.now();
2554
+ const timeoutMs = 15 * 60 * 1000;
2555
+ while (Date.now() - startTime < timeoutMs) {
2556
+ const elapsed = Date.now() - startTime;
2557
+ const interval = elapsed < 60000 ? 3000 : 5000;
2558
+ await sleep(interval);
2559
+ try {
2560
+ const result = await publicRequest("GET", `/v1/credits/status?session=${claimToken}`);
2561
+ if (result.status === "completed") {
2562
+ setApiKey(result.apiKey);
2563
+ console.log(`
2564
+ Credentials saved to ${CONFIG_FILE}`);
2565
+ console.log('Run "vidjutsu auth --export" to download a credentials file.');
2566
+ return;
2567
+ }
2568
+ if (result.status === "already_claimed") {
2569
+ console.log(`
2570
+ This checkout has already been claimed.`);
2571
+ console.log("If you lost your credentials, recover them:");
2572
+ console.log(` vidjutsu auth --recover ${args.email ?? "<your_email>"}`);
2573
+ process.exit(1);
2574
+ }
2575
+ if (result.status === "invalid_token") {
2576
+ console.error(`
2577
+ Invalid claim token.`);
2578
+ process.exit(1);
2579
+ }
2580
+ } catch {}
2581
+ }
2582
+ console.log(`
2583
+ Timed out waiting for payment.`);
2584
+ console.log(`
2585
+ If you already paid, recover your credentials:`);
2586
+ console.log(` vidjutsu auth --recover ${args.email ?? "<your_email>"}`);
2587
+ process.exit(1);
2588
+ }
2589
+ });
2590
+ });
2591
+
2592
+ // src/cli/commands/status.ts
2593
+ var exports_status = {};
2594
+ __export(exports_status, {
2595
+ default: () => status_default
2596
+ });
2597
+ var status_default;
2598
+ var init_status = __esm(() => {
2599
+ init_dist2();
2600
+ init_client();
2601
+ status_default = defineCommand({
2602
+ meta: { name: "status", description: "Check resource status by ID" },
2603
+ args: {
2604
+ id: { type: "positional", description: "Resource ID (acc_xxx, post_xxx, ref_xxx)", required: true }
2605
+ },
2606
+ async run({ args }) {
2607
+ const id = args.id;
2608
+ let path;
2609
+ if (id.startsWith("acc_"))
2610
+ path = `/v1/accounts?id=${id}`;
2611
+ else if (id.startsWith("post_"))
2612
+ path = `/v1/posts?id=${id}`;
2613
+ else if (id.startsWith("ref_"))
2614
+ path = `/v1/references?id=${id}`;
2615
+ else {
2616
+ console.error("Unknown ID prefix. Expected acc_, post_, or ref_");
2617
+ process.exit(1);
2618
+ }
2619
+ const result = await apiRequest("GET", path);
2620
+ console.log(JSON.stringify(result, null, 2));
2621
+ }
2622
+ });
2623
+ });
2624
+
2625
+ // src/cli/commands/version.ts
2626
+ var exports_version = {};
2627
+ __export(exports_version, {
2628
+ default: () => version_default
2629
+ });
2630
+ var version_default;
2631
+ var init_version = __esm(() => {
2632
+ init_dist2();
2633
+ version_default = defineCommand({
2634
+ meta: { name: "version", description: "Print the CLI version" },
2635
+ run() {
2636
+ console.log(`vidjutsu v${VERSION}`);
2637
+ }
2638
+ });
2639
+ });
2640
+
2641
+ // src/cli/commands/update.ts
2642
+ var exports_update = {};
2643
+ __export(exports_update, {
2644
+ default: () => update_default
2645
+ });
2646
+ import { execSync } from "child_process";
2647
+ import { existsSync as existsSync3, unlinkSync } from "fs";
2648
+ function detectPlatform() {
2649
+ const os = process.platform === "darwin" ? "darwin" : "linux";
2650
+ const arch = process.arch === "arm64" ? "arm64" : "x64";
2651
+ return `${os}-${arch}`;
2652
+ }
2653
+ function getCurrentVersion() {
2654
+ return VERSION;
2655
+ }
2656
+ async function getLatestVersion() {
2657
+ const res = await fetch(`https://api.github.com/repos/${REPO}/releases/latest`);
2658
+ if (!res.ok)
2659
+ throw new Error(`GitHub API returned ${res.status}`);
2660
+ const data = await res.json();
2661
+ return data.tag_name.replace(/^v/, "");
2662
+ }
2663
+ function getBinaryPath() {
2664
+ try {
2665
+ return execSync(`which ${BINARY_NAME}`, { encoding: "utf-8" }).trim();
2666
+ } catch {
2667
+ return `${process.env.HOME}/.local/bin/${BINARY_NAME}`;
2668
+ }
2669
+ }
2670
+ var REPO = "tfcbot/vidjutsu-sdk", BINARY_NAME = "vidjutsu", update_default;
2671
+ var init_update = __esm(() => {
2672
+ init_dist2();
2673
+ update_default = defineCommand({
2674
+ meta: { name: "update", description: "Update VidJutsu CLI to the latest version" },
2675
+ args: {
2676
+ force: {
2677
+ type: "boolean",
2678
+ description: "Force update even if already on latest",
2679
+ default: false
2680
+ }
2681
+ },
2682
+ async run({ args }) {
2683
+ const current = getCurrentVersion();
2684
+ console.log(`Current version: v${current}`);
2685
+ const latest = await getLatestVersion();
2686
+ console.log(`Latest version: v${latest}`);
2687
+ if (current === latest && !args.force) {
2688
+ console.log("Already on the latest version.");
2689
+ return;
2690
+ }
2691
+ const platform2 = detectPlatform();
2692
+ const url = `https://github.com/${REPO}/releases/download/v${latest}/${BINARY_NAME}-${platform2}`;
2693
+ const installDir = `${process.env.HOME}/.local/bin`;
2694
+ const installPath = `${installDir}/${BINARY_NAME}`;
2695
+ console.log(`Downloading v${latest} for ${platform2}...`);
2696
+ const res = await fetch(url);
2697
+ if (!res.ok)
2698
+ throw new Error(`Download failed: HTTP ${res.status}`);
2699
+ const binary = await res.arrayBuffer();
2700
+ const oldPath = `/usr/local/bin/${BINARY_NAME}`;
2701
+ const currentPath = getBinaryPath();
2702
+ if (currentPath === oldPath && existsSync3(oldPath)) {
2703
+ try {
2704
+ unlinkSync(oldPath);
2705
+ console.log(`Removed old binary at ${oldPath}`);
2706
+ } catch {
2707
+ console.log(`Could not remove ${oldPath} — run: sudo rm ${oldPath}`);
2708
+ }
2709
+ }
2710
+ execSync(`mkdir -p ${installDir}`);
2711
+ const file = Bun.file(installPath);
2712
+ await Bun.write(file, binary);
2713
+ execSync(`chmod +x ${installPath}`);
2714
+ console.log(`Updated to v${latest} at ${installPath}`);
2715
+ }
2716
+ });
2717
+ });
2718
+
2719
+ // src/cli/commands/generated/watch.ts
2720
+ var exports_watch = {};
2721
+ __export(exports_watch, {
2722
+ default: () => watch_default
2723
+ });
2724
+ var watch_default;
2725
+ var init_watch = __esm(() => {
2726
+ init_dist2();
2727
+ init_client();
2728
+ watch_default = defineCommand({
2729
+ meta: { name: "watch", description: "AI watches a video and answers your prompt" },
2730
+ args: {
2731
+ mediaUrl: { type: "string", description: "URL of the media to analyze", required: true },
2732
+ prompt: { type: "string", description: "Freeform prompt — tell AI what to look for", required: true }
2733
+ },
2734
+ async run({ args }) {
2735
+ const body = {};
2736
+ if (args["mediaUrl"] !== undefined)
2737
+ body["mediaUrl"] = args["mediaUrl"];
2738
+ if (args["prompt"] !== undefined)
2739
+ body["prompt"] = args["prompt"];
2740
+ const result = await apiRequest("POST", "/v1/watch", body);
2741
+ console.log(JSON.stringify(result, null, 2));
2742
+ }
2743
+ });
2744
+ });
2745
+
2746
+ // src/cli/commands/generated/extract.ts
2747
+ var exports_extract = {};
2748
+ __export(exports_extract, {
2749
+ default: () => extract_default
2750
+ });
2751
+ var extract_default;
2752
+ var init_extract = __esm(() => {
2753
+ init_dist2();
2754
+ init_client();
2755
+ extract_default = defineCommand({
2756
+ meta: { name: "extract", description: "Extract frames, audio, and metadata from a video" },
2757
+ args: {
2758
+ mediaUrl: { type: "string", description: "URL of the video to extract from", required: true },
2759
+ frames: { type: "string", description: "Frame indices to extract. Use [0, 75, 150] for specific frames, 'auto' for 3 evenly spaced, or 'last' for the final frame" },
2760
+ audio: { type: "string", description: "Extract audio track as WAV" },
2761
+ metadata: { type: "string", description: "Return video metadata (width, height, fps, duration). Defaults to true" }
2762
+ },
2763
+ async run({ args }) {
2764
+ const body = {};
2765
+ if (args["mediaUrl"] !== undefined)
2766
+ body["mediaUrl"] = args["mediaUrl"];
2767
+ if (args["frames"] !== undefined)
2768
+ body["frames"] = args["frames"];
2769
+ if (args["audio"] !== undefined)
2770
+ body["audio"] = args["audio"];
2771
+ if (args["metadata"] !== undefined)
2772
+ body["metadata"] = args["metadata"];
2773
+ const result = await apiRequest("POST", "/v1/extract", body);
2774
+ console.log(JSON.stringify(result, null, 2));
2775
+ }
2776
+ });
2777
+ });
2778
+
2779
+ // src/cli/commands/generated/transcribe.ts
2780
+ var exports_transcribe = {};
2781
+ __export(exports_transcribe, {
2782
+ default: () => transcribe_default
2783
+ });
2784
+ var transcribe_default;
2785
+ var init_transcribe = __esm(() => {
2786
+ init_dist2();
2787
+ init_client();
2788
+ transcribe_default = defineCommand({
2789
+ meta: { name: "transcribe", description: "Speech-to-text with word-level timing" },
2790
+ args: {
2791
+ mediaUrl: { type: "string", description: "URL of the video or audio to transcribe", required: true },
2792
+ language: { type: "string", description: "Language code (e.g. 'en', 'es'). Auto-detected if omitted" }
2793
+ },
2794
+ async run({ args }) {
2795
+ const body = {};
2796
+ if (args["mediaUrl"] !== undefined)
2797
+ body["mediaUrl"] = args["mediaUrl"];
2798
+ if (args["language"] !== undefined)
2799
+ body["language"] = args["language"];
2800
+ const result = await apiRequest("POST", "/v1/transcribe", body);
2801
+ console.log(JSON.stringify(result, null, 2));
2802
+ }
2803
+ });
2804
+ });
2805
+
2806
+ // src/cli/commands/generated/overlay.ts
2807
+ var exports_overlay = {};
2808
+ __export(exports_overlay, {
2809
+ default: () => overlay_default
2810
+ });
2811
+ var overlay_default;
2812
+ var init_overlay = __esm(() => {
2813
+ init_dist2();
2814
+ init_client();
2815
+ overlay_default = defineCommand({
2816
+ meta: { name: "overlay", description: "Burn text overlay onto video" },
2817
+ args: {
2818
+ videoUrl: { type: "string", description: "URL of the source video", required: true },
2819
+ text: { type: "string", description: "Overlay text. Use \\n for line breaks.", required: true },
2820
+ position: { type: "string", description: "Vertical text placement" },
2821
+ fontSize: { type: "string", description: "Font size in pixels. Defaults to 4% of video height." },
2822
+ strokeThickness: { type: "string", description: "Text outline thickness (0-10). Defaults to 2." }
2823
+ },
2824
+ async run({ args }) {
2825
+ const body = {};
2826
+ if (args["videoUrl"] !== undefined)
2827
+ body["videoUrl"] = args["videoUrl"];
2828
+ if (args["text"] !== undefined)
2829
+ body["text"] = args["text"];
2830
+ if (args["position"] !== undefined)
2831
+ body["position"] = args["position"];
2832
+ if (args["fontSize"] !== undefined)
2833
+ body["fontSize"] = args["fontSize"];
2834
+ if (args["strokeThickness"] !== undefined)
2835
+ body["strokeThickness"] = args["strokeThickness"];
2836
+ const result = await apiRequest("POST", "/v1/overlay", body);
2837
+ console.log(JSON.stringify(result, null, 2));
2838
+ }
2839
+ });
2840
+ });
2841
+
2842
+ // src/cli/commands/generated/account.ts
2843
+ var exports_account = {};
2844
+ __export(exports_account, {
2845
+ default: () => account_default
2846
+ });
2847
+ function parseTags(raw) {
2848
+ if (!raw)
2849
+ return;
2850
+ return raw.split(",").map((pair) => {
2851
+ const [key, ...rest] = pair.split("=");
2852
+ return { key: key.trim(), value: rest.join("=").trim() };
2853
+ });
2854
+ }
2855
+ var account_default;
2856
+ var init_account = __esm(() => {
2857
+ init_dist2();
2858
+ init_client();
2859
+ account_default = defineCommand({
2860
+ meta: { name: "account", description: "Manage accounts" },
2861
+ subCommands: {
2862
+ create: defineCommand({
2863
+ meta: { name: "create", description: "Create a draft account" },
2864
+ args: {
2865
+ platform: { type: "string", description: "platform", required: true },
2866
+ name: { type: "string", description: "name", required: true },
2867
+ handle: { type: "string", description: "handle" },
2868
+ bio: { type: "string", description: "bio" },
2869
+ pfp: { type: "string", description: "pfp" },
2870
+ niche: { type: "string", description: "niche" },
2871
+ linkInBio: { type: "string", description: "linkInBio" },
2872
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" }
2873
+ },
2874
+ async run({ args }) {
2875
+ const body = {};
2876
+ if (args["platform"] !== undefined)
2877
+ body["platform"] = args["platform"];
2878
+ if (args["name"] !== undefined)
2879
+ body["name"] = args["name"];
2880
+ if (args["handle"] !== undefined)
2881
+ body["handle"] = args["handle"];
2882
+ if (args["bio"] !== undefined)
2883
+ body["bio"] = args["bio"];
2884
+ if (args["pfp"] !== undefined)
2885
+ body["pfp"] = args["pfp"];
2886
+ if (args["niche"] !== undefined)
2887
+ body["niche"] = args["niche"];
2888
+ if (args["linkInBio"] !== undefined)
2889
+ body["linkInBio"] = args["linkInBio"];
2890
+ const tags = parseTags(args.tags);
2891
+ if (tags)
2892
+ body.tags = tags;
2893
+ const result = await apiRequest("POST", "/v1/accounts", body);
2894
+ console.log(JSON.stringify(result, null, 2));
2895
+ }
2896
+ }),
2897
+ edit: defineCommand({
2898
+ meta: { name: "edit", description: "Edit an account" },
2899
+ args: {
2900
+ id: { type: "positional", description: "Account ID", required: true },
2901
+ handle: { type: "string", description: "handle" },
2902
+ name: { type: "string", description: "name" },
2903
+ bio: { type: "string", description: "bio" },
2904
+ pfp: { type: "string", description: "pfp" },
2905
+ niche: { type: "string", description: "niche" },
2906
+ linkInBio: { type: "string", description: "linkInBio" },
2907
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" }
2908
+ },
2909
+ async run({ args }) {
2910
+ const body = {};
2911
+ if (args["handle"] !== undefined)
2912
+ body["handle"] = args["handle"];
2913
+ if (args["name"] !== undefined)
2914
+ body["name"] = args["name"];
2915
+ if (args["bio"] !== undefined)
2916
+ body["bio"] = args["bio"];
2917
+ if (args["pfp"] !== undefined)
2918
+ body["pfp"] = args["pfp"];
2919
+ if (args["niche"] !== undefined)
2920
+ body["niche"] = args["niche"];
2921
+ if (args["linkInBio"] !== undefined)
2922
+ body["linkInBio"] = args["linkInBio"];
2923
+ const tags = parseTags(args.tags);
2924
+ if (tags)
2925
+ body.tags = tags;
2926
+ const result = await apiRequest("PUT", "/v1/accounts?id=" + args.id, body);
2927
+ console.log(JSON.stringify(result, null, 2));
2928
+ }
2929
+ }),
2930
+ list: defineCommand({
2931
+ meta: { name: "list", description: "List accounts" },
2932
+ args: {
2933
+ id: { type: "string", description: "Account ID (omit to list all)" }
2934
+ },
2935
+ async run({ args }) {
2936
+ let path = "/v1/accounts";
2937
+ const params = new URLSearchParams;
2938
+ if (args["id"])
2939
+ params.set("id", args["id"]);
2940
+ const qs = params.toString();
2941
+ if (qs)
2942
+ path += "?" + qs;
2943
+ const result = await apiRequest("GET", path);
2944
+ console.log(JSON.stringify(result, null, 2));
2945
+ }
2946
+ }),
2947
+ delete: defineCommand({
2948
+ meta: { name: "delete", description: "Delete an account" },
2949
+ args: {
2950
+ id: { type: "positional", description: "Account ID", required: true }
2951
+ },
2952
+ async run({ args }) {
2953
+ const result = await apiRequest("DELETE", "/v1/accounts?id=" + args.id);
2954
+ console.log(JSON.stringify(result, null, 2));
2955
+ }
2956
+ })
2957
+ }
2958
+ });
2959
+ });
2960
+
2961
+ // src/cli/commands/generated/post.ts
2962
+ var exports_post = {};
2963
+ __export(exports_post, {
2964
+ default: () => post_default
2965
+ });
2966
+ function parseTags2(raw) {
2967
+ if (!raw)
2968
+ return;
2969
+ return raw.split(",").map((pair) => {
2970
+ const [key, ...rest] = pair.split("=");
2971
+ return { key: key.trim(), value: rest.join("=").trim() };
2972
+ });
2973
+ }
2974
+ var post_default;
2975
+ var init_post = __esm(() => {
2976
+ init_dist2();
2977
+ init_client();
2978
+ post_default = defineCommand({
2979
+ meta: { name: "post", description: "Manage posts" },
2980
+ subCommands: {
2981
+ create: defineCommand({
2982
+ meta: { name: "create", description: "Create a draft post" },
2983
+ args: {
2984
+ accountId: { type: "string", description: "accountId" },
2985
+ videoId: { type: "string", description: "videoId" },
2986
+ mediaUrl: { type: "string", description: "mediaUrl" },
2987
+ caption: { type: "string", description: "caption" },
2988
+ brief: { type: "string", description: "brief" },
2989
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" }
2990
+ },
2991
+ async run({ args }) {
2992
+ const body = {};
2993
+ if (args["accountId"] !== undefined)
2994
+ body["accountId"] = args["accountId"];
2995
+ if (args["videoId"] !== undefined)
2996
+ body["videoId"] = args["videoId"];
2997
+ if (args["mediaUrl"] !== undefined)
2998
+ body["mediaUrl"] = args["mediaUrl"];
2999
+ if (args["caption"] !== undefined)
3000
+ body["caption"] = args["caption"];
3001
+ if (args["brief"] !== undefined)
3002
+ body["brief"] = args["brief"];
3003
+ const tags = parseTags2(args.tags);
3004
+ if (tags)
3005
+ body.tags = tags;
3006
+ const result = await apiRequest("POST", "/v1/posts", body);
3007
+ console.log(JSON.stringify(result, null, 2));
3008
+ }
3009
+ }),
3010
+ edit: defineCommand({
3011
+ meta: { name: "edit", description: "Edit a post" },
3012
+ args: {
3013
+ id: { type: "positional", description: "Post ID", required: true },
3014
+ caption: { type: "string", description: "caption" },
3015
+ mediaUrl: { type: "string", description: "mediaUrl" },
3016
+ videoId: { type: "string", description: "videoId" },
3017
+ accountId: { type: "string", description: "accountId" },
3018
+ brief: { type: "string", description: "brief" },
3019
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" }
3020
+ },
3021
+ async run({ args }) {
3022
+ const body = {};
3023
+ if (args["caption"] !== undefined)
3024
+ body["caption"] = args["caption"];
3025
+ if (args["mediaUrl"] !== undefined)
3026
+ body["mediaUrl"] = args["mediaUrl"];
3027
+ if (args["videoId"] !== undefined)
3028
+ body["videoId"] = args["videoId"];
3029
+ if (args["accountId"] !== undefined)
3030
+ body["accountId"] = args["accountId"];
3031
+ if (args["brief"] !== undefined)
3032
+ body["brief"] = args["brief"];
3033
+ const tags = parseTags2(args.tags);
3034
+ if (tags)
3035
+ body.tags = tags;
3036
+ const result = await apiRequest("PUT", "/v1/posts?id=" + args.id, body);
3037
+ console.log(JSON.stringify(result, null, 2));
3038
+ }
3039
+ }),
3040
+ list: defineCommand({
3041
+ meta: { name: "list", description: "List posts" },
3042
+ args: {
3043
+ id: { type: "string", description: "Post ID (omit to list all)" },
3044
+ accountId: { type: "string", description: "accountId" }
3045
+ },
3046
+ async run({ args }) {
3047
+ let path = "/v1/posts";
3048
+ const params = new URLSearchParams;
3049
+ if (args["id"])
3050
+ params.set("id", args["id"]);
3051
+ if (args["accountId"])
3052
+ params.set("accountId", args["accountId"]);
3053
+ const qs = params.toString();
3054
+ if (qs)
3055
+ path += "?" + qs;
3056
+ const result = await apiRequest("GET", path);
3057
+ console.log(JSON.stringify(result, null, 2));
3058
+ }
3059
+ }),
3060
+ delete: defineCommand({
3061
+ meta: { name: "delete", description: "Delete a post" },
3062
+ args: {
3063
+ id: { type: "positional", description: "Post ID", required: true }
3064
+ },
3065
+ async run({ args }) {
3066
+ const result = await apiRequest("DELETE", "/v1/posts?id=" + args.id);
3067
+ console.log(JSON.stringify(result, null, 2));
3068
+ }
3069
+ })
3070
+ }
3071
+ });
3072
+ });
3073
+
3074
+ // src/cli/commands/generated/asset.ts
3075
+ var exports_asset = {};
3076
+ __export(exports_asset, {
3077
+ default: () => asset_default
3078
+ });
3079
+ function parseTags3(raw) {
3080
+ if (!raw)
3081
+ return;
3082
+ return raw.split(",").map((pair) => {
3083
+ const [key, ...rest] = pair.split("=");
3084
+ return { key: key.trim(), value: rest.join("=").trim() };
3085
+ });
3086
+ }
3087
+ var asset_default;
3088
+ var init_asset = __esm(() => {
3089
+ init_dist2();
3090
+ init_client();
3091
+ asset_default = defineCommand({
3092
+ meta: { name: "asset", description: "Manage assets" },
3093
+ subCommands: {
3094
+ create: defineCommand({
3095
+ meta: { name: "create", description: "Create an asset record" },
3096
+ args: {
3097
+ url: { type: "string", description: "url", required: true },
3098
+ name: { type: "string", description: "name" },
3099
+ contentType: { type: "string", description: "contentType" },
3100
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" },
3101
+ metadata: { type: "string", description: "metadata" }
3102
+ },
3103
+ async run({ args }) {
3104
+ const body = {};
3105
+ if (args["url"] !== undefined)
3106
+ body["url"] = args["url"];
3107
+ if (args["name"] !== undefined)
3108
+ body["name"] = args["name"];
3109
+ if (args["contentType"] !== undefined)
3110
+ body["contentType"] = args["contentType"];
3111
+ const tags = parseTags3(args.tags);
3112
+ if (tags)
3113
+ body.tags = tags;
3114
+ if (args["metadata"] !== undefined)
3115
+ body["metadata"] = args["metadata"];
3116
+ const result = await apiRequest("POST", "/v1/assets", body);
3117
+ console.log(JSON.stringify(result, null, 2));
3118
+ }
3119
+ }),
3120
+ edit: defineCommand({
3121
+ meta: { name: "edit", description: "Edit an asset" },
3122
+ args: {
3123
+ id: { type: "positional", description: "Asset ID", required: true },
3124
+ name: { type: "string", description: "name" },
3125
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" },
3126
+ metadata: { type: "string", description: "metadata" }
3127
+ },
3128
+ async run({ args }) {
3129
+ const body = {};
3130
+ if (args["name"] !== undefined)
3131
+ body["name"] = args["name"];
3132
+ const tags = parseTags3(args.tags);
3133
+ if (tags)
3134
+ body.tags = tags;
3135
+ if (args["metadata"] !== undefined)
3136
+ body["metadata"] = args["metadata"];
3137
+ const result = await apiRequest("PUT", "/v1/assets?id=" + args.id, body);
3138
+ console.log(JSON.stringify(result, null, 2));
3139
+ }
3140
+ }),
3141
+ list: defineCommand({
3142
+ meta: { name: "list", description: "List assets" },
3143
+ args: {
3144
+ id: { type: "string", description: "Asset ID (omit to list all)" },
3145
+ type: { type: "string", description: "type" }
3146
+ },
3147
+ async run({ args }) {
3148
+ let path = "/v1/assets";
3149
+ const params = new URLSearchParams;
3150
+ if (args["id"])
3151
+ params.set("id", args["id"]);
3152
+ if (args["type"])
3153
+ params.set("type", args["type"]);
3154
+ const qs = params.toString();
3155
+ if (qs)
3156
+ path += "?" + qs;
3157
+ const result = await apiRequest("GET", path);
3158
+ console.log(JSON.stringify(result, null, 2));
3159
+ }
3160
+ }),
3161
+ delete: defineCommand({
3162
+ meta: { name: "delete", description: "Delete an asset" },
3163
+ args: {
3164
+ id: { type: "positional", description: "Asset ID", required: true }
3165
+ },
3166
+ async run({ args }) {
3167
+ const result = await apiRequest("DELETE", "/v1/assets?id=" + args.id);
3168
+ console.log(JSON.stringify(result, null, 2));
3169
+ }
3170
+ })
3171
+ }
3172
+ });
3173
+ });
3174
+
3175
+ // src/cli/commands/generated/reference.ts
3176
+ var exports_reference = {};
3177
+ __export(exports_reference, {
3178
+ default: () => reference_default
3179
+ });
3180
+ function parseTags4(raw) {
3181
+ if (!raw)
3182
+ return;
3183
+ return raw.split(",").map((pair) => {
3184
+ const [key, ...rest] = pair.split("=");
3185
+ return { key: key.trim(), value: rest.join("=").trim() };
3186
+ });
3187
+ }
3188
+ var reference_default;
3189
+ var init_reference = __esm(() => {
3190
+ init_dist2();
3191
+ init_client();
3192
+ reference_default = defineCommand({
3193
+ meta: { name: "reference", description: "Manage references" },
3194
+ subCommands: {
3195
+ create: defineCommand({
3196
+ meta: { name: "create", description: "Create a reference" },
3197
+ args: {
3198
+ url: { type: "string", description: "url", required: true },
3199
+ platform: { type: "string", description: "platform" },
3200
+ notes: { type: "string", description: "notes" },
3201
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" },
3202
+ metadata: { type: "string", description: "metadata" }
3203
+ },
3204
+ async run({ args }) {
3205
+ const body = {};
3206
+ if (args["url"] !== undefined)
3207
+ body["url"] = args["url"];
3208
+ if (args["platform"] !== undefined)
3209
+ body["platform"] = args["platform"];
3210
+ if (args["notes"] !== undefined)
3211
+ body["notes"] = args["notes"];
3212
+ const tags = parseTags4(args.tags);
3213
+ if (tags)
3214
+ body.tags = tags;
3215
+ if (args["metadata"] !== undefined)
3216
+ body["metadata"] = args["metadata"];
3217
+ const result = await apiRequest("POST", "/v1/references", body);
3218
+ console.log(JSON.stringify(result, null, 2));
3219
+ }
3220
+ }),
3221
+ edit: defineCommand({
3222
+ meta: { name: "edit", description: "Edit a reference" },
3223
+ args: {
3224
+ id: { type: "positional", description: "Reference ID", required: true },
3225
+ url: { type: "string", description: "url" },
3226
+ platform: { type: "string", description: "platform" },
3227
+ notes: { type: "string", description: "notes" },
3228
+ tags: { type: "string", description: "Tags as key=value pairs, comma-separated" },
3229
+ metadata: { type: "string", description: "metadata" }
3230
+ },
3231
+ async run({ args }) {
3232
+ const body = {};
3233
+ if (args["url"] !== undefined)
3234
+ body["url"] = args["url"];
3235
+ if (args["platform"] !== undefined)
3236
+ body["platform"] = args["platform"];
3237
+ if (args["notes"] !== undefined)
3238
+ body["notes"] = args["notes"];
3239
+ const tags = parseTags4(args.tags);
3240
+ if (tags)
3241
+ body.tags = tags;
3242
+ if (args["metadata"] !== undefined)
3243
+ body["metadata"] = args["metadata"];
3244
+ const result = await apiRequest("PUT", "/v1/references?id=" + args.id, body);
3245
+ console.log(JSON.stringify(result, null, 2));
3246
+ }
3247
+ }),
3248
+ list: defineCommand({
3249
+ meta: { name: "list", description: "List references" },
3250
+ args: {
3251
+ id: { type: "string", description: "Reference ID (omit to list all)" },
3252
+ platform: { type: "string", description: "platform" }
3253
+ },
3254
+ async run({ args }) {
3255
+ let path = "/v1/references";
3256
+ const params = new URLSearchParams;
3257
+ if (args["id"])
3258
+ params.set("id", args["id"]);
3259
+ if (args["platform"])
3260
+ params.set("platform", args["platform"]);
3261
+ const qs = params.toString();
3262
+ if (qs)
3263
+ path += "?" + qs;
3264
+ const result = await apiRequest("GET", path);
3265
+ console.log(JSON.stringify(result, null, 2));
3266
+ }
3267
+ }),
3268
+ delete: defineCommand({
3269
+ meta: { name: "delete", description: "Delete a reference" },
3270
+ args: {
3271
+ id: { type: "positional", description: "Reference ID", required: true }
3272
+ },
3273
+ async run({ args }) {
3274
+ const result = await apiRequest("DELETE", "/v1/references?id=" + args.id);
3275
+ console.log(JSON.stringify(result, null, 2));
3276
+ }
3277
+ })
3278
+ }
3279
+ });
3280
+ });
3281
+
3282
+ // src/cli/commands/generated/usage.ts
3283
+ var exports_usage = {};
3284
+ __export(exports_usage, {
3285
+ default: () => usage_default
3286
+ });
3287
+ var usage_default;
3288
+ var init_usage = __esm(() => {
3289
+ init_dist2();
3290
+ init_client();
3291
+ usage_default = defineCommand({
3292
+ meta: { name: "usage", description: "Show daily usage and limits" },
3293
+ args: {},
3294
+ async run({ args }) {
3295
+ const result = await apiRequest("GET", "/v1/usage");
3296
+ console.log(JSON.stringify(result, null, 2));
3297
+ }
3298
+ });
3299
+ });
3300
+
3301
+ // src/cli/commands/generated/info.ts
3302
+ var exports_info = {};
3303
+ __export(exports_info, {
3304
+ default: () => info_default
3305
+ });
3306
+ var info_default;
3307
+ var init_info = __esm(() => {
3308
+ init_dist2();
3309
+ init_client();
3310
+ info_default = defineCommand({
3311
+ meta: { name: "info", description: "Show API info and discovery" },
3312
+ args: {},
3313
+ async run({ args }) {
3314
+ const result = await publicRequest("GET", "/v1/info");
3315
+ console.log(JSON.stringify(result, null, 2));
3316
+ }
3317
+ });
3318
+ });
3319
+
3320
+ // src/cli/index.ts
3321
+ init_dist2();
3322
+ var main = defineCommand({
3323
+ meta: {
3324
+ name: "vidjutsu",
3325
+ version: VERSION,
3326
+ description: "Video intelligence API — watch, extract, transcribe, check."
3327
+ },
3328
+ subCommands: {
3329
+ auth: () => Promise.resolve().then(() => (init_auth(), exports_auth)).then((m2) => m2.default),
3330
+ check: () => Promise.resolve().then(() => (init_check(), exports_check)).then((m2) => m2.default),
3331
+ upload: () => Promise.resolve().then(() => (init_upload(), exports_upload)).then((m2) => m2.default),
3332
+ subscribe: () => Promise.resolve().then(() => (init_subscribe(), exports_subscribe)).then((m2) => m2.default),
3333
+ status: () => Promise.resolve().then(() => (init_status(), exports_status)).then((m2) => m2.default),
3334
+ version: () => Promise.resolve().then(() => (init_version(), exports_version)).then((m2) => m2.default),
3335
+ update: () => Promise.resolve().then(() => (init_update(), exports_update)).then((m2) => m2.default),
3336
+ watch: () => Promise.resolve().then(() => (init_watch(), exports_watch)).then((m2) => m2.default),
3337
+ extract: () => Promise.resolve().then(() => (init_extract(), exports_extract)).then((m2) => m2.default),
3338
+ transcribe: () => Promise.resolve().then(() => (init_transcribe(), exports_transcribe)).then((m2) => m2.default),
3339
+ overlay: () => Promise.resolve().then(() => (init_overlay(), exports_overlay)).then((m2) => m2.default),
3340
+ account: () => Promise.resolve().then(() => (init_account(), exports_account)).then((m2) => m2.default),
3341
+ post: () => Promise.resolve().then(() => (init_post(), exports_post)).then((m2) => m2.default),
3342
+ asset: () => Promise.resolve().then(() => (init_asset(), exports_asset)).then((m2) => m2.default),
3343
+ reference: () => Promise.resolve().then(() => (init_reference(), exports_reference)).then((m2) => m2.default),
3344
+ usage: () => Promise.resolve().then(() => (init_usage(), exports_usage)).then((m2) => m2.default),
3345
+ info: () => Promise.resolve().then(() => (init_info(), exports_info)).then((m2) => m2.default)
3346
+ }
3347
+ });
3348
+ runMain(main);