blamewise 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +42 -0
  2. package/dist/blamewise.js +4656 -0
  3. package/package.json +33 -0
@@ -0,0 +1,4656 @@
1
+ #!/usr/bin/env node
2
+ // @bun
3
+ import { createRequire } from "node:module";
4
+ var __create = Object.create;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __toESM = (mod, isNodeMode, target) => {
10
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
11
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
12
+ for (let key of __getOwnPropNames(mod))
13
+ if (!__hasOwnProp.call(to, key))
14
+ __defProp(to, key, {
15
+ get: () => mod[key],
16
+ enumerable: true
17
+ });
18
+ return to;
19
+ };
20
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, {
24
+ get: all[name],
25
+ enumerable: true,
26
+ configurable: true,
27
+ set: (newValue) => all[name] = () => newValue
28
+ });
29
+ };
30
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
31
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
32
+
33
+ // node_modules/consola/dist/chunks/prompt.mjs
34
+ var exports_prompt = {};
35
+ __export(exports_prompt, {
36
+ prompt: () => prompt,
37
+ kCancel: () => kCancel
38
+ });
39
+ import g, { stdin, stdout } from "node:process";
40
+ import f from "node:readline";
41
+ import { WriteStream } from "node:tty";
42
+ function getDefaultExportFromCjs(x) {
43
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
44
+ }
45
+ function requireSrc() {
46
+ if (hasRequiredSrc)
47
+ return src;
48
+ hasRequiredSrc = 1;
49
+ const ESC = "\x1B";
50
+ const CSI = `${ESC}[`;
51
+ const beep = "\x07";
52
+ const cursor = {
53
+ to(x, y) {
54
+ if (!y)
55
+ return `${CSI}${x + 1}G`;
56
+ return `${CSI}${y + 1};${x + 1}H`;
57
+ },
58
+ move(x, y) {
59
+ let ret = "";
60
+ if (x < 0)
61
+ ret += `${CSI}${-x}D`;
62
+ else if (x > 0)
63
+ ret += `${CSI}${x}C`;
64
+ if (y < 0)
65
+ ret += `${CSI}${-y}A`;
66
+ else if (y > 0)
67
+ ret += `${CSI}${y}B`;
68
+ return ret;
69
+ },
70
+ up: (count = 1) => `${CSI}${count}A`,
71
+ down: (count = 1) => `${CSI}${count}B`,
72
+ forward: (count = 1) => `${CSI}${count}C`,
73
+ backward: (count = 1) => `${CSI}${count}D`,
74
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
75
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
76
+ left: `${CSI}G`,
77
+ hide: `${CSI}?25l`,
78
+ show: `${CSI}?25h`,
79
+ save: `${ESC}7`,
80
+ restore: `${ESC}8`
81
+ };
82
+ const scroll = {
83
+ up: (count = 1) => `${CSI}S`.repeat(count),
84
+ down: (count = 1) => `${CSI}T`.repeat(count)
85
+ };
86
+ const erase = {
87
+ screen: `${CSI}2J`,
88
+ up: (count = 1) => `${CSI}1J`.repeat(count),
89
+ down: (count = 1) => `${CSI}J`.repeat(count),
90
+ line: `${CSI}2K`,
91
+ lineEnd: `${CSI}K`,
92
+ lineStart: `${CSI}1K`,
93
+ lines(count) {
94
+ let clear = "";
95
+ for (let i = 0;i < count; i++)
96
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
97
+ if (count)
98
+ clear += cursor.left;
99
+ return clear;
100
+ }
101
+ };
102
+ src = { cursor, scroll, erase, beep };
103
+ return src;
104
+ }
105
+ function requirePicocolors() {
106
+ if (hasRequiredPicocolors)
107
+ return picocolors.exports;
108
+ hasRequiredPicocolors = 1;
109
+ let p = process || {}, argv2 = p.argv || [], env2 = p.env || {};
110
+ 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);
111
+ let formatter = (open, close, replace = open) => (input) => {
112
+ let string = "" + input, index = string.indexOf(close, open.length);
113
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
114
+ };
115
+ let replaceClose2 = (string, close, replace, index) => {
116
+ let result = "", cursor = 0;
117
+ do {
118
+ result += string.substring(cursor, index) + replace;
119
+ cursor = index + close.length;
120
+ index = string.indexOf(close, cursor);
121
+ } while (~index);
122
+ return result + string.substring(cursor);
123
+ };
124
+ let createColors2 = (enabled = isColorSupported2) => {
125
+ let f2 = enabled ? formatter : () => String;
126
+ return {
127
+ isColorSupported: enabled,
128
+ reset: f2("\x1B[0m", "\x1B[0m"),
129
+ bold: f2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
130
+ dim: f2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
131
+ italic: f2("\x1B[3m", "\x1B[23m"),
132
+ underline: f2("\x1B[4m", "\x1B[24m"),
133
+ inverse: f2("\x1B[7m", "\x1B[27m"),
134
+ hidden: f2("\x1B[8m", "\x1B[28m"),
135
+ strikethrough: f2("\x1B[9m", "\x1B[29m"),
136
+ black: f2("\x1B[30m", "\x1B[39m"),
137
+ red: f2("\x1B[31m", "\x1B[39m"),
138
+ green: f2("\x1B[32m", "\x1B[39m"),
139
+ yellow: f2("\x1B[33m", "\x1B[39m"),
140
+ blue: f2("\x1B[34m", "\x1B[39m"),
141
+ magenta: f2("\x1B[35m", "\x1B[39m"),
142
+ cyan: f2("\x1B[36m", "\x1B[39m"),
143
+ white: f2("\x1B[37m", "\x1B[39m"),
144
+ gray: f2("\x1B[90m", "\x1B[39m"),
145
+ bgBlack: f2("\x1B[40m", "\x1B[49m"),
146
+ bgRed: f2("\x1B[41m", "\x1B[49m"),
147
+ bgGreen: f2("\x1B[42m", "\x1B[49m"),
148
+ bgYellow: f2("\x1B[43m", "\x1B[49m"),
149
+ bgBlue: f2("\x1B[44m", "\x1B[49m"),
150
+ bgMagenta: f2("\x1B[45m", "\x1B[49m"),
151
+ bgCyan: f2("\x1B[46m", "\x1B[49m"),
152
+ bgWhite: f2("\x1B[47m", "\x1B[49m"),
153
+ blackBright: f2("\x1B[90m", "\x1B[39m"),
154
+ redBright: f2("\x1B[91m", "\x1B[39m"),
155
+ greenBright: f2("\x1B[92m", "\x1B[39m"),
156
+ yellowBright: f2("\x1B[93m", "\x1B[39m"),
157
+ blueBright: f2("\x1B[94m", "\x1B[39m"),
158
+ magentaBright: f2("\x1B[95m", "\x1B[39m"),
159
+ cyanBright: f2("\x1B[96m", "\x1B[39m"),
160
+ whiteBright: f2("\x1B[97m", "\x1B[39m"),
161
+ bgBlackBright: f2("\x1B[100m", "\x1B[49m"),
162
+ bgRedBright: f2("\x1B[101m", "\x1B[49m"),
163
+ bgGreenBright: f2("\x1B[102m", "\x1B[49m"),
164
+ bgYellowBright: f2("\x1B[103m", "\x1B[49m"),
165
+ bgBlueBright: f2("\x1B[104m", "\x1B[49m"),
166
+ bgMagentaBright: f2("\x1B[105m", "\x1B[49m"),
167
+ bgCyanBright: f2("\x1B[106m", "\x1B[49m"),
168
+ bgWhiteBright: f2("\x1B[107m", "\x1B[49m")
169
+ };
170
+ };
171
+ picocolors.exports = createColors2();
172
+ picocolors.exports.createColors = createColors2;
173
+ return picocolors.exports;
174
+ }
175
+ function J({ onlyFirst: t = false } = {}) {
176
+ 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("|");
177
+ return new RegExp(F, t ? undefined : "g");
178
+ }
179
+ function T$1(t) {
180
+ if (typeof t != "string")
181
+ throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
182
+ return t.replace(Q, "");
183
+ }
184
+ function O(t) {
185
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
186
+ }
187
+ function A$1(t, u = {}) {
188
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = T$1(t), t.length === 0))
189
+ return 0;
190
+ t = t.replace(FD(), " ");
191
+ const F = u.ambiguousIsNarrow ? 1 : 2;
192
+ let e2 = 0;
193
+ for (const s of t) {
194
+ const i = s.codePointAt(0);
195
+ if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879)
196
+ continue;
197
+ switch (DD.eastAsianWidth(s)) {
198
+ case "F":
199
+ case "W":
200
+ e2 += 2;
201
+ break;
202
+ case "A":
203
+ e2 += F;
204
+ break;
205
+ default:
206
+ e2 += 1;
207
+ }
208
+ }
209
+ return e2;
210
+ }
211
+ function sD() {
212
+ const t = new Map;
213
+ for (const [u, F] of Object.entries(r)) {
214
+ for (const [e2, s] of Object.entries(F))
215
+ r[e2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F[e2] = r[e2], t.set(s[0], s[1]);
216
+ Object.defineProperty(r, u, { value: F, enumerable: false });
217
+ }
218
+ 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) => {
219
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
220
+ if (!F)
221
+ return [0, 0, 0];
222
+ let [e2] = F;
223
+ e2.length === 3 && (e2 = [...e2].map((i) => i + i).join(""));
224
+ const s = Number.parseInt(e2, 16);
225
+ return [s >> 16 & 255, s >> 8 & 255, s & 255];
226
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
227
+ if (u < 8)
228
+ return 30 + u;
229
+ if (u < 16)
230
+ return 90 + (u - 8);
231
+ let F, e2, s;
232
+ if (u >= 232)
233
+ F = ((u - 232) * 10 + 8) / 255, e2 = F, s = F;
234
+ else {
235
+ u -= 16;
236
+ const C = u % 36;
237
+ F = Math.floor(u / 36) / 5, e2 = Math.floor(C / 6) / 5, s = C % 6 / 5;
238
+ }
239
+ const i = Math.max(F, e2, s) * 2;
240
+ if (i === 0)
241
+ return 30;
242
+ let D = 30 + (Math.round(s) << 2 | Math.round(e2) << 1 | Math.round(F));
243
+ return i === 2 && (D += 60), D;
244
+ }, 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;
245
+ }
246
+ function G(t, u, F) {
247
+ return String(t).normalize().replace(/\r\n/g, `
248
+ `).split(`
249
+ `).map((e2) => oD(e2, u, F)).join(`
250
+ `);
251
+ }
252
+ function k$1(t, u) {
253
+ if (typeof t == "string")
254
+ return c.aliases.get(t) === u;
255
+ for (const F of t)
256
+ if (F !== undefined && k$1(F, u))
257
+ return true;
258
+ return false;
259
+ }
260
+ function lD(t, u) {
261
+ if (t === u)
262
+ return;
263
+ const F = t.split(`
264
+ `), e2 = u.split(`
265
+ `), s = [];
266
+ for (let i = 0;i < Math.max(F.length, e2.length); i++)
267
+ F[i] !== e2[i] && s.push(i);
268
+ return s;
269
+ }
270
+ function d$1(t, u) {
271
+ const F = t;
272
+ F.isTTY && F.setRawMode(u);
273
+ }
274
+
275
+ class x {
276
+ constructor(u, F = true) {
277
+ 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");
278
+ const { input: e2 = stdin, output: s = stdout, render: i, signal: D, ...C } = u;
279
+ 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;
280
+ }
281
+ unsubscribe() {
282
+ this._subscribers.clear();
283
+ }
284
+ setSubscriber(u, F) {
285
+ const e2 = this._subscribers.get(u) ?? [];
286
+ e2.push(F), this._subscribers.set(u, e2);
287
+ }
288
+ on(u, F) {
289
+ this.setSubscriber(u, { cb: F });
290
+ }
291
+ once(u, F) {
292
+ this.setSubscriber(u, { cb: F, once: true });
293
+ }
294
+ emit(u, ...F) {
295
+ const e2 = this._subscribers.get(u) ?? [], s = [];
296
+ for (const i of e2)
297
+ i.cb(...F), i.once && s.push(() => e2.splice(e2.indexOf(i), 1));
298
+ for (const i of s)
299
+ i();
300
+ }
301
+ prompt() {
302
+ return new Promise((u, F) => {
303
+ if (this._abortSignal) {
304
+ if (this._abortSignal.aborted)
305
+ return this.state = "cancel", this.close(), u(S);
306
+ this._abortSignal.addEventListener("abort", () => {
307
+ this.state = "cancel", this.close();
308
+ }, { once: true });
309
+ }
310
+ const e2 = new WriteStream(0);
311
+ e2._write = (s, i, D) => {
312
+ this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
313
+ }, 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", () => {
314
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(this.value);
315
+ }), this.once("cancel", () => {
316
+ this.output.write(srcExports.cursor.show), this.output.off("resize", this.render), d$1(this.input, false), u(S);
317
+ });
318
+ });
319
+ }
320
+ onKeypress(u, F) {
321
+ 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") {
322
+ if (this.opts.validate) {
323
+ const e2 = this.opts.validate(this.value);
324
+ e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.value));
325
+ }
326
+ this.state !== "error" && (this.state = "submit");
327
+ }
328
+ 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();
329
+ }
330
+ close() {
331
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
332
+ `), d$1(this.input, false), this.rl?.close(), this.rl = undefined, this.emit(`${this.state}`, this.value), this.unsubscribe();
333
+ }
334
+ restoreCursor() {
335
+ const u = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
336
+ `).length - 1;
337
+ this.output.write(srcExports.cursor.move(-999, u * -1));
338
+ }
339
+ render() {
340
+ const u = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
341
+ if (u !== this._prevFrame) {
342
+ if (this.state === "initial")
343
+ this.output.write(srcExports.cursor.hide);
344
+ else {
345
+ const F = lD(this._prevFrame, u);
346
+ if (this.restoreCursor(), F && F?.length === 1) {
347
+ const e2 = F[0];
348
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.lines(1));
349
+ const s = u.split(`
350
+ `);
351
+ this.output.write(s[e2]), this._prevFrame = u, this.output.write(srcExports.cursor.move(0, s.length - e2 - 1));
352
+ return;
353
+ }
354
+ if (F && F?.length > 1) {
355
+ const e2 = F[0];
356
+ this.output.write(srcExports.cursor.move(0, e2)), this.output.write(srcExports.erase.down());
357
+ const s = u.split(`
358
+ `).slice(e2);
359
+ this.output.write(s.join(`
360
+ `)), this._prevFrame = u;
361
+ return;
362
+ }
363
+ this.output.write(srcExports.erase.down());
364
+ }
365
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
366
+ }
367
+ }
368
+ }
369
+ function ce() {
370
+ 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";
371
+ }
372
+ async function prompt(message, opts = {}) {
373
+ const handleCancel = (value) => {
374
+ if (typeof value !== "symbol" || value.toString() !== "Symbol(clack:cancel)") {
375
+ return value;
376
+ }
377
+ switch (opts.cancel) {
378
+ case "reject": {
379
+ const error = new Error("Prompt cancelled.");
380
+ error.name = "ConsolaPromptCancelledError";
381
+ if (Error.captureStackTrace) {
382
+ Error.captureStackTrace(error, prompt);
383
+ }
384
+ throw error;
385
+ }
386
+ case "undefined": {
387
+ return;
388
+ }
389
+ case "null": {
390
+ return null;
391
+ }
392
+ case "symbol": {
393
+ return kCancel;
394
+ }
395
+ default:
396
+ case "default": {
397
+ return opts.default ?? opts.initial;
398
+ }
399
+ }
400
+ };
401
+ if (!opts.type || opts.type === "text") {
402
+ return await he({
403
+ message,
404
+ defaultValue: opts.default,
405
+ placeholder: opts.placeholder,
406
+ initialValue: opts.initial
407
+ }).then(handleCancel);
408
+ }
409
+ if (opts.type === "confirm") {
410
+ return await ye({
411
+ message,
412
+ initialValue: opts.initial
413
+ }).then(handleCancel);
414
+ }
415
+ if (opts.type === "select") {
416
+ return await ve({
417
+ message,
418
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
419
+ initialValue: opts.initial
420
+ }).then(handleCancel);
421
+ }
422
+ if (opts.type === "multiselect") {
423
+ return await fe({
424
+ message,
425
+ options: opts.options.map((o2) => typeof o2 === "string" ? { value: o2, label: o2 } : o2),
426
+ required: opts.required,
427
+ initialValues: opts.initial
428
+ }).then(handleCancel);
429
+ }
430
+ throw new Error(`Unknown prompt type: ${opts.type}`);
431
+ }
432
+ var src, hasRequiredSrc, srcExports, picocolors, hasRequiredPicocolors, picocolorsExports, e, Q, P$1, X, DD, uD = function() {
433
+ 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;
434
+ }, 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) => {
435
+ const e2 = [...u];
436
+ let s = false, i = false, D = A$1(T$1(t[t.length - 1]));
437
+ for (const [C, o] of e2.entries()) {
438
+ const E = A$1(o);
439
+ 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) {
440
+ i ? o === w$1 && (s = false, i = false) : o === R && (s = false);
441
+ continue;
442
+ }
443
+ D += E, D === F && C < e2.length - 1 && (t.push(""), D = 0);
444
+ }
445
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
446
+ }, nD = (t) => {
447
+ const u = t.split(" ");
448
+ let F = u.length;
449
+ for (;F > 0 && !(A$1(u[F - 1]) > 0); )
450
+ F--;
451
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
452
+ }, oD = (t, u, F = {}) => {
453
+ if (F.trim !== false && t.trim() === "")
454
+ return "";
455
+ let e2 = "", s, i;
456
+ const D = ED(t);
457
+ let C = [""];
458
+ for (const [E, a] of t.split(" ").entries()) {
459
+ F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
460
+ let n = A$1(C[C.length - 1]);
461
+ 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) {
462
+ const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
463
+ Math.floor((D[E] - 1) / u) < p && C.push(""), _(C, a, u);
464
+ continue;
465
+ }
466
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
467
+ if (F.wordWrap === false && n < u) {
468
+ _(C, a, u);
469
+ continue;
470
+ }
471
+ C.push("");
472
+ }
473
+ if (n + D[E] > u && F.wordWrap === false) {
474
+ _(C, a, u);
475
+ continue;
476
+ }
477
+ C[C.length - 1] += a;
478
+ }
479
+ F.trim !== false && (C = C.map((E) => nD(E)));
480
+ const o = [...C.join(`
481
+ `)];
482
+ for (const [E, a] of o.entries()) {
483
+ if (e2 += a, v.has(a)) {
484
+ const { groups: B } = new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`).exec(o.slice(E).join("")) || { groups: {} };
485
+ if (B.code !== undefined) {
486
+ const p = Number.parseFloat(B.code);
487
+ s = p === CD ? undefined : p;
488
+ } else
489
+ B.uri !== undefined && (i = B.uri.length === 0 ? undefined : B.uri);
490
+ }
491
+ const n = iD.codes.get(Number(s));
492
+ o[E + 1] === `
493
+ ` ? (i && (e2 += z("")), s && n && (e2 += V$1(n))) : a === `
494
+ ` && (s && n && (e2 += V$1(s)), i && (e2 += z(i)));
495
+ }
496
+ return e2;
497
+ }, 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) => {
498
+ switch (t) {
499
+ case "initial":
500
+ case "active":
501
+ return e.cyan(le);
502
+ case "cancel":
503
+ return e.red(L);
504
+ case "error":
505
+ return e.yellow(W);
506
+ case "submit":
507
+ return e.green(C);
508
+ }
509
+ }, B = (t) => {
510
+ 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));
511
+ let l = 0;
512
+ 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));
513
+ const $ = c2 < s.length && l > 0, p = c2 < s.length && l + c2 < s.length;
514
+ return s.slice(l, l + c2).map((M, v2, x2) => {
515
+ const j = v2 === 0 && $, E = v2 === x2.length - 1 && p;
516
+ return j || E ? e.dim("...") : r2(M, v2 + l === n);
517
+ });
518
+ }, he = (t) => new PD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
519
+ const n = `${e.gray(o)}
520
+ ${w(this.state)} ${t.message}
521
+ `, s = t.placeholder ? e.inverse(t.placeholder[0]) + e.dim(t.placeholder.slice(1)) : e.inverse(e.hidden("_")), r2 = this.value ? this.valueWithCursor : s;
522
+ switch (this.state) {
523
+ case "error":
524
+ return `${n.trim()}
525
+ ${e.yellow(o)} ${r2}
526
+ ${e.yellow(d)} ${e.yellow(this.error)}
527
+ `;
528
+ case "submit":
529
+ return `${n}${e.gray(o)} ${e.dim(this.value || t.placeholder)}`;
530
+ case "cancel":
531
+ return `${n}${e.gray(o)} ${e.strikethrough(e.dim(this.value ?? ""))}${this.value?.trim() ? `
532
+ ${e.gray(o)}` : ""}`;
533
+ default:
534
+ return `${n}${e.cyan(o)} ${r2}
535
+ ${e.cyan(d)}
536
+ `;
537
+ }
538
+ } }).prompt(), ye = (t) => {
539
+ const n = t.active ?? "Yes", s = t.inactive ?? "No";
540
+ return new fD({ active: n, inactive: s, initialValue: t.initialValue ?? true, render() {
541
+ const r2 = `${e.gray(o)}
542
+ ${w(this.state)} ${t.message}
543
+ `, i = this.value ? n : s;
544
+ switch (this.state) {
545
+ case "submit":
546
+ return `${r2}${e.gray(o)} ${e.dim(i)}`;
547
+ case "cancel":
548
+ return `${r2}${e.gray(o)} ${e.strikethrough(e.dim(i))}
549
+ ${e.gray(o)}`;
550
+ default:
551
+ 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}`}
552
+ ${e.cyan(d)}
553
+ `;
554
+ }
555
+ } }).prompt();
556
+ }, ve = (t) => {
557
+ const n = (s, r2) => {
558
+ const i = s.label ?? String(s.value);
559
+ switch (r2) {
560
+ case "selected":
561
+ return `${e.dim(i)}`;
562
+ case "active":
563
+ return `${e.green(k)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}`;
564
+ case "cancelled":
565
+ return `${e.strikethrough(e.dim(i))}`;
566
+ default:
567
+ return `${e.dim(P)} ${e.dim(i)}`;
568
+ }
569
+ };
570
+ return new jD({ options: t.options, initialValue: t.initialValue, render() {
571
+ const s = `${e.gray(o)}
572
+ ${w(this.state)} ${t.message}
573
+ `;
574
+ switch (this.state) {
575
+ case "submit":
576
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "selected")}`;
577
+ case "cancel":
578
+ return `${s}${e.gray(o)} ${n(this.options[this.cursor], "cancelled")}
579
+ ${e.gray(o)}`;
580
+ default:
581
+ return `${s}${e.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (r2, i) => n(r2, i ? "active" : "inactive") }).join(`
582
+ ${e.cyan(o)} `)}
583
+ ${e.cyan(d)}
584
+ `;
585
+ }
586
+ } }).prompt();
587
+ }, fe = (t) => {
588
+ const n = (s, r2) => {
589
+ const i = s.label ?? String(s.value);
590
+ 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)}`;
591
+ };
592
+ return new wD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(s) {
593
+ if (this.required && s.length === 0)
594
+ return `Please select at least one option.
595
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`;
596
+ }, render() {
597
+ const s = `${e.gray(o)}
598
+ ${w(this.state)} ${t.message}
599
+ `, r2 = (i, a) => {
600
+ const c2 = this.value.includes(i.value);
601
+ return a && c2 ? n(i, "active-selected") : c2 ? n(i, "selected") : n(i, a ? "active" : "inactive");
602
+ };
603
+ switch (this.state) {
604
+ case "submit":
605
+ 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")}`;
606
+ case "cancel": {
607
+ const i = this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => n(a, "cancelled")).join(e.dim(", "));
608
+ return `${s}${e.gray(o)} ${i.trim() ? `${i}
609
+ ${e.gray(o)}` : ""}`;
610
+ }
611
+ case "error": {
612
+ const i = this.error.split(`
613
+ `).map((a, c2) => c2 === 0 ? `${e.yellow(d)} ${e.yellow(a)}` : ` ${a}`).join(`
614
+ `);
615
+ return `${s + e.yellow(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
616
+ ${e.yellow(o)} `)}
617
+ ${i}
618
+ `;
619
+ }
620
+ default:
621
+ return `${s}${e.cyan(o)} ${B({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: r2 }).join(`
622
+ ${e.cyan(o)} `)}
623
+ ${e.cyan(d)}
624
+ `;
625
+ }
626
+ } }).prompt();
627
+ }, kCancel;
628
+ var init_prompt = __esm(() => {
629
+ srcExports = requireSrc();
630
+ picocolors = { exports: {} };
631
+ picocolorsExports = /* @__PURE__ */ requirePicocolors();
632
+ e = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
633
+ Q = J();
634
+ P$1 = { exports: {} };
635
+ (function(t) {
636
+ var u = {};
637
+ t.exports = u, u.eastAsianWidth = function(e2) {
638
+ var s = e2.charCodeAt(0), i = e2.length == 2 ? e2.charCodeAt(1) : 0, D = s;
639
+ 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";
640
+ }, u.characterLength = function(e2) {
641
+ var s = this.eastAsianWidth(e2);
642
+ return s == "F" || s == "W" || s == "A" ? 2 : 1;
643
+ };
644
+ function F(e2) {
645
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
646
+ }
647
+ u.length = function(e2) {
648
+ for (var s = F(e2), i = 0, D = 0;D < s.length; D++)
649
+ i = i + this.characterLength(s[D]);
650
+ return i;
651
+ }, u.slice = function(e2, s, i) {
652
+ textLen = u.length(e2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
653
+ for (var D = "", C = 0, o = F(e2), E = 0;E < o.length; E++) {
654
+ var a = o[E], n = u.length(a);
655
+ if (C >= s - (n == 2 ? 1 : 0))
656
+ if (C + n <= i)
657
+ D += a;
658
+ else
659
+ break;
660
+ C += n;
661
+ }
662
+ return D;
663
+ };
664
+ })(P$1);
665
+ X = P$1.exports;
666
+ DD = O(X);
667
+ FD = O(uD);
668
+ 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] } };
669
+ Object.keys(r.modifier);
670
+ tD = Object.keys(r.color);
671
+ eD = Object.keys(r.bgColor);
672
+ [...tD, ...eD];
673
+ iD = sD();
674
+ v = new Set(["\x1B", "›"]);
675
+ y = `${rD}8;;`;
676
+ aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
677
+ c = { actions: new Set(aD), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]) };
678
+ globalThis.process.platform.startsWith("win");
679
+ S = Symbol("clack:cancel");
680
+ AD = Object.defineProperty;
681
+ fD = class fD extends x {
682
+ get cursor() {
683
+ return this.value ? 0 : 1;
684
+ }
685
+ get _value() {
686
+ return this.cursor === 0;
687
+ }
688
+ constructor(u) {
689
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
690
+ this.value = this._value;
691
+ }), this.on("confirm", (F) => {
692
+ this.output.write(srcExports.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
693
+ }), this.on("cursor", () => {
694
+ this.value = !this.value;
695
+ });
696
+ }
697
+ };
698
+ bD = Object.defineProperty;
699
+ wD = class extends x {
700
+ constructor(u) {
701
+ 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) => {
702
+ F === "a" && this.toggleAll();
703
+ }), this.on("cursor", (F) => {
704
+ switch (F) {
705
+ case "left":
706
+ case "up":
707
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
708
+ break;
709
+ case "down":
710
+ case "right":
711
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
712
+ break;
713
+ case "space":
714
+ this.toggleValue();
715
+ break;
716
+ }
717
+ });
718
+ }
719
+ get _value() {
720
+ return this.options[this.cursor].value;
721
+ }
722
+ toggleAll() {
723
+ const u = this.value.length === this.options.length;
724
+ this.value = u ? [] : this.options.map((F) => F.value);
725
+ }
726
+ toggleValue() {
727
+ const u = this.value.includes(this._value);
728
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
729
+ }
730
+ };
731
+ SD = Object.defineProperty;
732
+ jD = class jD extends x {
733
+ constructor(u) {
734
+ 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) => {
735
+ switch (F) {
736
+ case "left":
737
+ case "up":
738
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
739
+ break;
740
+ case "down":
741
+ case "right":
742
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
743
+ break;
744
+ }
745
+ this.changeValue();
746
+ });
747
+ }
748
+ get _value() {
749
+ return this.options[this.cursor];
750
+ }
751
+ changeValue() {
752
+ this.value = this._value.value;
753
+ }
754
+ };
755
+ PD = class PD extends x {
756
+ get valueWithCursor() {
757
+ if (this.state === "submit")
758
+ return this.value;
759
+ if (this.cursor >= this.value.length)
760
+ return `${this.value}█`;
761
+ const u = this.value.slice(0, this.cursor), [F, ...e$1] = this.value.slice(this.cursor);
762
+ return `${u}${e.inverse(F)}${e$1.join("")}`;
763
+ }
764
+ get cursor() {
765
+ return this._cursor;
766
+ }
767
+ constructor(u) {
768
+ super(u), this.on("finalize", () => {
769
+ this.value || (this.value = u.defaultValue);
770
+ });
771
+ }
772
+ };
773
+ V = ce();
774
+ le = u("❯", ">");
775
+ L = u("■", "x");
776
+ W = u("▲", "x");
777
+ C = u("✔", "√");
778
+ o = u("");
779
+ d = u("");
780
+ k = u("●", ">");
781
+ P = u("○", " ");
782
+ A = u("◻", "[•]");
783
+ T = u("◼", "[+]");
784
+ F = u("◻", "[ ]");
785
+ `${e.gray(o)} `;
786
+ kCancel = Symbol.for("cancel");
787
+ });
788
+
789
+ // node_modules/cli-table3/src/debug.js
790
+ var require_debug = __commonJS((exports, module) => {
791
+ var messages = [];
792
+ var level = 0;
793
+ var debug = (msg, min) => {
794
+ if (level >= min) {
795
+ messages.push(msg);
796
+ }
797
+ };
798
+ debug.WARN = 1;
799
+ debug.INFO = 2;
800
+ debug.DEBUG = 3;
801
+ debug.reset = () => {
802
+ messages = [];
803
+ };
804
+ debug.setDebugLevel = (v2) => {
805
+ level = v2;
806
+ };
807
+ debug.warn = (msg) => debug(msg, debug.WARN);
808
+ debug.info = (msg) => debug(msg, debug.INFO);
809
+ debug.debug = (msg) => debug(msg, debug.DEBUG);
810
+ debug.debugMessages = () => messages;
811
+ module.exports = debug;
812
+ });
813
+
814
+ // node_modules/ansi-regex/index.js
815
+ var require_ansi_regex = __commonJS((exports, module) => {
816
+ module.exports = ({ onlyFirst = false } = {}) => {
817
+ const pattern = [
818
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
819
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
820
+ ].join("|");
821
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
822
+ };
823
+ });
824
+
825
+ // node_modules/strip-ansi/index.js
826
+ var require_strip_ansi = __commonJS((exports, module) => {
827
+ var ansiRegex4 = require_ansi_regex();
828
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex4(), "") : string;
829
+ });
830
+
831
+ // node_modules/is-fullwidth-code-point/index.js
832
+ var require_is_fullwidth_code_point = __commonJS((exports, module) => {
833
+ var isFullwidthCodePoint = (codePoint) => {
834
+ if (Number.isNaN(codePoint)) {
835
+ return false;
836
+ }
837
+ if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
838
+ return true;
839
+ }
840
+ return false;
841
+ };
842
+ module.exports = isFullwidthCodePoint;
843
+ module.exports.default = isFullwidthCodePoint;
844
+ });
845
+
846
+ // node_modules/emoji-regex/index.js
847
+ var require_emoji_regex = __commonJS((exports, module) => {
848
+ module.exports = function() {
849
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
850
+ };
851
+ });
852
+
853
+ // node_modules/string-width/index.js
854
+ var require_string_width = __commonJS((exports, module) => {
855
+ var stripAnsi4 = require_strip_ansi();
856
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
857
+ var emojiRegex3 = require_emoji_regex();
858
+ var stringWidth3 = (string) => {
859
+ if (typeof string !== "string" || string.length === 0) {
860
+ return 0;
861
+ }
862
+ string = stripAnsi4(string);
863
+ if (string.length === 0) {
864
+ return 0;
865
+ }
866
+ string = string.replace(emojiRegex3(), " ");
867
+ let width = 0;
868
+ for (let i3 = 0;i3 < string.length; i3++) {
869
+ const code = string.codePointAt(i3);
870
+ if (code <= 31 || code >= 127 && code <= 159) {
871
+ continue;
872
+ }
873
+ if (code >= 768 && code <= 879) {
874
+ continue;
875
+ }
876
+ if (code > 65535) {
877
+ i3++;
878
+ }
879
+ width += isFullwidthCodePoint(code) ? 2 : 1;
880
+ }
881
+ return width;
882
+ };
883
+ module.exports = stringWidth3;
884
+ module.exports.default = stringWidth3;
885
+ });
886
+
887
+ // node_modules/cli-table3/src/utils.js
888
+ var require_utils = __commonJS((exports, module) => {
889
+ var stringWidth3 = require_string_width();
890
+ function codeRegex(capture) {
891
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
892
+ }
893
+ function strlen(str) {
894
+ let code = codeRegex();
895
+ let stripped = ("" + str).replace(code, "");
896
+ let split = stripped.split(`
897
+ `);
898
+ return split.reduce(function(memo, s3) {
899
+ return stringWidth3(s3) > memo ? stringWidth3(s3) : memo;
900
+ }, 0);
901
+ }
902
+ function repeat(str, times) {
903
+ return Array(times + 1).join(str);
904
+ }
905
+ function pad(str, len, pad2, dir) {
906
+ let length = strlen(str);
907
+ if (len + 1 >= length) {
908
+ let padlen = len - length;
909
+ switch (dir) {
910
+ case "right": {
911
+ str = repeat(pad2, padlen) + str;
912
+ break;
913
+ }
914
+ case "center": {
915
+ let right = Math.ceil(padlen / 2);
916
+ let left = padlen - right;
917
+ str = repeat(pad2, left) + str + repeat(pad2, right);
918
+ break;
919
+ }
920
+ default: {
921
+ str = str + repeat(pad2, padlen);
922
+ break;
923
+ }
924
+ }
925
+ }
926
+ return str;
927
+ }
928
+ var codeCache = {};
929
+ function addToCodeCache(name, on, off) {
930
+ on = "\x1B[" + on + "m";
931
+ off = "\x1B[" + off + "m";
932
+ codeCache[on] = { set: name, to: true };
933
+ codeCache[off] = { set: name, to: false };
934
+ codeCache[name] = { on, off };
935
+ }
936
+ addToCodeCache("bold", 1, 22);
937
+ addToCodeCache("italics", 3, 23);
938
+ addToCodeCache("underline", 4, 24);
939
+ addToCodeCache("inverse", 7, 27);
940
+ addToCodeCache("strikethrough", 9, 29);
941
+ function updateState(state, controlChars) {
942
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
943
+ if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
944
+ state.lastForegroundAdded = controlChars[0];
945
+ return;
946
+ }
947
+ if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
948
+ state.lastBackgroundAdded = controlChars[0];
949
+ return;
950
+ }
951
+ if (controlCode === 0) {
952
+ for (let i3 in state) {
953
+ if (Object.prototype.hasOwnProperty.call(state, i3)) {
954
+ delete state[i3];
955
+ }
956
+ }
957
+ return;
958
+ }
959
+ let info = codeCache[controlChars[0]];
960
+ if (info) {
961
+ state[info.set] = info.to;
962
+ }
963
+ }
964
+ function readState(line) {
965
+ let code = codeRegex(true);
966
+ let controlChars = code.exec(line);
967
+ let state = {};
968
+ while (controlChars !== null) {
969
+ updateState(state, controlChars);
970
+ controlChars = code.exec(line);
971
+ }
972
+ return state;
973
+ }
974
+ function unwindState(state, ret) {
975
+ let lastBackgroundAdded = state.lastBackgroundAdded;
976
+ let lastForegroundAdded = state.lastForegroundAdded;
977
+ delete state.lastBackgroundAdded;
978
+ delete state.lastForegroundAdded;
979
+ Object.keys(state).forEach(function(key) {
980
+ if (state[key]) {
981
+ ret += codeCache[key].off;
982
+ }
983
+ });
984
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
985
+ ret += "\x1B[49m";
986
+ }
987
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
988
+ ret += "\x1B[39m";
989
+ }
990
+ return ret;
991
+ }
992
+ function rewindState(state, ret) {
993
+ let lastBackgroundAdded = state.lastBackgroundAdded;
994
+ let lastForegroundAdded = state.lastForegroundAdded;
995
+ delete state.lastBackgroundAdded;
996
+ delete state.lastForegroundAdded;
997
+ Object.keys(state).forEach(function(key) {
998
+ if (state[key]) {
999
+ ret = codeCache[key].on + ret;
1000
+ }
1001
+ });
1002
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
1003
+ ret = lastBackgroundAdded + ret;
1004
+ }
1005
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
1006
+ ret = lastForegroundAdded + ret;
1007
+ }
1008
+ return ret;
1009
+ }
1010
+ function truncateWidth(str, desiredLength) {
1011
+ if (str.length === strlen(str)) {
1012
+ return str.substr(0, desiredLength);
1013
+ }
1014
+ while (strlen(str) > desiredLength) {
1015
+ str = str.slice(0, -1);
1016
+ }
1017
+ return str;
1018
+ }
1019
+ function truncateWidthWithAnsi(str, desiredLength) {
1020
+ let code = codeRegex(true);
1021
+ let split = str.split(codeRegex());
1022
+ let splitIndex = 0;
1023
+ let retLen = 0;
1024
+ let ret = "";
1025
+ let myArray;
1026
+ let state = {};
1027
+ while (retLen < desiredLength) {
1028
+ myArray = code.exec(str);
1029
+ let toAdd = split[splitIndex];
1030
+ splitIndex++;
1031
+ if (retLen + strlen(toAdd) > desiredLength) {
1032
+ toAdd = truncateWidth(toAdd, desiredLength - retLen);
1033
+ }
1034
+ ret += toAdd;
1035
+ retLen += strlen(toAdd);
1036
+ if (retLen < desiredLength) {
1037
+ if (!myArray) {
1038
+ break;
1039
+ }
1040
+ ret += myArray[0];
1041
+ updateState(state, myArray);
1042
+ }
1043
+ }
1044
+ return unwindState(state, ret);
1045
+ }
1046
+ function truncate(str, desiredLength, truncateChar) {
1047
+ truncateChar = truncateChar || "…";
1048
+ let lengthOfStr = strlen(str);
1049
+ if (lengthOfStr <= desiredLength) {
1050
+ return str;
1051
+ }
1052
+ desiredLength -= strlen(truncateChar);
1053
+ let ret = truncateWidthWithAnsi(str, desiredLength);
1054
+ ret += truncateChar;
1055
+ const hrefTag = "\x1B]8;;\x07";
1056
+ if (str.includes(hrefTag) && !ret.includes(hrefTag)) {
1057
+ ret += hrefTag;
1058
+ }
1059
+ return ret;
1060
+ }
1061
+ function defaultOptions() {
1062
+ return {
1063
+ chars: {
1064
+ top: "─",
1065
+ "top-mid": "┬",
1066
+ "top-left": "┌",
1067
+ "top-right": "┐",
1068
+ bottom: "─",
1069
+ "bottom-mid": "┴",
1070
+ "bottom-left": "└",
1071
+ "bottom-right": "┘",
1072
+ left: "│",
1073
+ "left-mid": "├",
1074
+ mid: "─",
1075
+ "mid-mid": "┼",
1076
+ right: "│",
1077
+ "right-mid": "┤",
1078
+ middle: "│"
1079
+ },
1080
+ truncate: "…",
1081
+ colWidths: [],
1082
+ rowHeights: [],
1083
+ colAligns: [],
1084
+ rowAligns: [],
1085
+ style: {
1086
+ "padding-left": 1,
1087
+ "padding-right": 1,
1088
+ head: ["red"],
1089
+ border: ["grey"],
1090
+ compact: false
1091
+ },
1092
+ head: []
1093
+ };
1094
+ }
1095
+ function mergeOptions(options, defaults) {
1096
+ options = options || {};
1097
+ defaults = defaults || defaultOptions();
1098
+ let ret = Object.assign({}, defaults, options);
1099
+ ret.chars = Object.assign({}, defaults.chars, options.chars);
1100
+ ret.style = Object.assign({}, defaults.style, options.style);
1101
+ return ret;
1102
+ }
1103
+ function wordWrap(maxLength, input) {
1104
+ let lines = [];
1105
+ let split = input.split(/(\s+)/g);
1106
+ let line = [];
1107
+ let lineLength = 0;
1108
+ let whitespace;
1109
+ for (let i3 = 0;i3 < split.length; i3 += 2) {
1110
+ let word = split[i3];
1111
+ let newLength = lineLength + strlen(word);
1112
+ if (lineLength > 0 && whitespace) {
1113
+ newLength += whitespace.length;
1114
+ }
1115
+ if (newLength > maxLength) {
1116
+ if (lineLength !== 0) {
1117
+ lines.push(line.join(""));
1118
+ }
1119
+ line = [word];
1120
+ lineLength = strlen(word);
1121
+ } else {
1122
+ line.push(whitespace || "", word);
1123
+ lineLength = newLength;
1124
+ }
1125
+ whitespace = split[i3 + 1];
1126
+ }
1127
+ if (lineLength) {
1128
+ lines.push(line.join(""));
1129
+ }
1130
+ return lines;
1131
+ }
1132
+ function textWrap(maxLength, input) {
1133
+ let lines = [];
1134
+ let line = "";
1135
+ function pushLine(str, ws) {
1136
+ if (line.length && ws)
1137
+ line += ws;
1138
+ line += str;
1139
+ while (line.length > maxLength) {
1140
+ lines.push(line.slice(0, maxLength));
1141
+ line = line.slice(maxLength);
1142
+ }
1143
+ }
1144
+ let split = input.split(/(\s+)/g);
1145
+ for (let i3 = 0;i3 < split.length; i3 += 2) {
1146
+ pushLine(split[i3], i3 && split[i3 - 1]);
1147
+ }
1148
+ if (line.length)
1149
+ lines.push(line);
1150
+ return lines;
1151
+ }
1152
+ function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
1153
+ let output = [];
1154
+ input = input.split(`
1155
+ `);
1156
+ const handler = wrapOnWordBoundary ? wordWrap : textWrap;
1157
+ for (let i3 = 0;i3 < input.length; i3++) {
1158
+ output.push.apply(output, handler(maxLength, input[i3]));
1159
+ }
1160
+ return output;
1161
+ }
1162
+ function colorizeLines(input) {
1163
+ let state = {};
1164
+ let output = [];
1165
+ for (let i3 = 0;i3 < input.length; i3++) {
1166
+ let line = rewindState(state, input[i3]);
1167
+ state = readState(line);
1168
+ let temp = Object.assign({}, state);
1169
+ output.push(unwindState(temp, line));
1170
+ }
1171
+ return output;
1172
+ }
1173
+ function hyperlink(url, text) {
1174
+ const OSC = "\x1B]";
1175
+ const BEL = "\x07";
1176
+ const SEP = ";";
1177
+ return [OSC, "8", SEP, SEP, url || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
1178
+ }
1179
+ module.exports = {
1180
+ strlen,
1181
+ repeat,
1182
+ pad,
1183
+ truncate,
1184
+ mergeOptions,
1185
+ wordWrap: multiLineWordWrap,
1186
+ colorizeLines,
1187
+ hyperlink
1188
+ };
1189
+ });
1190
+
1191
+ // node_modules/@colors/colors/lib/styles.js
1192
+ var require_styles = __commonJS((exports, module) => {
1193
+ var styles = {};
1194
+ module["exports"] = styles;
1195
+ var codes = {
1196
+ reset: [0, 0],
1197
+ bold: [1, 22],
1198
+ dim: [2, 22],
1199
+ italic: [3, 23],
1200
+ underline: [4, 24],
1201
+ inverse: [7, 27],
1202
+ hidden: [8, 28],
1203
+ strikethrough: [9, 29],
1204
+ black: [30, 39],
1205
+ red: [31, 39],
1206
+ green: [32, 39],
1207
+ yellow: [33, 39],
1208
+ blue: [34, 39],
1209
+ magenta: [35, 39],
1210
+ cyan: [36, 39],
1211
+ white: [37, 39],
1212
+ gray: [90, 39],
1213
+ grey: [90, 39],
1214
+ brightRed: [91, 39],
1215
+ brightGreen: [92, 39],
1216
+ brightYellow: [93, 39],
1217
+ brightBlue: [94, 39],
1218
+ brightMagenta: [95, 39],
1219
+ brightCyan: [96, 39],
1220
+ brightWhite: [97, 39],
1221
+ bgBlack: [40, 49],
1222
+ bgRed: [41, 49],
1223
+ bgGreen: [42, 49],
1224
+ bgYellow: [43, 49],
1225
+ bgBlue: [44, 49],
1226
+ bgMagenta: [45, 49],
1227
+ bgCyan: [46, 49],
1228
+ bgWhite: [47, 49],
1229
+ bgGray: [100, 49],
1230
+ bgGrey: [100, 49],
1231
+ bgBrightRed: [101, 49],
1232
+ bgBrightGreen: [102, 49],
1233
+ bgBrightYellow: [103, 49],
1234
+ bgBrightBlue: [104, 49],
1235
+ bgBrightMagenta: [105, 49],
1236
+ bgBrightCyan: [106, 49],
1237
+ bgBrightWhite: [107, 49],
1238
+ blackBG: [40, 49],
1239
+ redBG: [41, 49],
1240
+ greenBG: [42, 49],
1241
+ yellowBG: [43, 49],
1242
+ blueBG: [44, 49],
1243
+ magentaBG: [45, 49],
1244
+ cyanBG: [46, 49],
1245
+ whiteBG: [47, 49]
1246
+ };
1247
+ Object.keys(codes).forEach(function(key) {
1248
+ var val = codes[key];
1249
+ var style = styles[key] = [];
1250
+ style.open = "\x1B[" + val[0] + "m";
1251
+ style.close = "\x1B[" + val[1] + "m";
1252
+ });
1253
+ });
1254
+
1255
+ // node_modules/@colors/colors/lib/system/has-flag.js
1256
+ var require_has_flag = __commonJS((exports, module) => {
1257
+ module.exports = function(flag, argv2) {
1258
+ argv2 = argv2 || process.argv;
1259
+ var terminatorPos = argv2.indexOf("--");
1260
+ var prefix = /^-{1,2}/.test(flag) ? "" : "--";
1261
+ var pos = argv2.indexOf(prefix + flag);
1262
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
1263
+ };
1264
+ });
1265
+
1266
+ // node_modules/@colors/colors/lib/system/supports-colors.js
1267
+ var require_supports_colors = __commonJS((exports, module) => {
1268
+ var os = __require("os");
1269
+ var hasFlag = require_has_flag();
1270
+ var env2 = process.env;
1271
+ var forceColor = undefined;
1272
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
1273
+ forceColor = false;
1274
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1275
+ forceColor = true;
1276
+ }
1277
+ if ("FORCE_COLOR" in env2) {
1278
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
1279
+ }
1280
+ function translateLevel(level) {
1281
+ if (level === 0) {
1282
+ return false;
1283
+ }
1284
+ return {
1285
+ level,
1286
+ hasBasic: true,
1287
+ has256: level >= 2,
1288
+ has16m: level >= 3
1289
+ };
1290
+ }
1291
+ function supportsColor(stream) {
1292
+ if (forceColor === false) {
1293
+ return 0;
1294
+ }
1295
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1296
+ return 3;
1297
+ }
1298
+ if (hasFlag("color=256")) {
1299
+ return 2;
1300
+ }
1301
+ if (stream && !stream.isTTY && forceColor !== true) {
1302
+ return 0;
1303
+ }
1304
+ var min = forceColor ? 1 : 0;
1305
+ if (process.platform === "win32") {
1306
+ var osRelease = os.release().split(".");
1307
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1308
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1309
+ }
1310
+ return 1;
1311
+ }
1312
+ if ("CI" in env2) {
1313
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
1314
+ return sign in env2;
1315
+ }) || env2.CI_NAME === "codeship") {
1316
+ return 1;
1317
+ }
1318
+ return min;
1319
+ }
1320
+ if ("TEAMCITY_VERSION" in env2) {
1321
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
1322
+ }
1323
+ if ("TERM_PROGRAM" in env2) {
1324
+ var version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1325
+ switch (env2.TERM_PROGRAM) {
1326
+ case "iTerm.app":
1327
+ return version >= 3 ? 3 : 2;
1328
+ case "Hyper":
1329
+ return 3;
1330
+ case "Apple_Terminal":
1331
+ return 2;
1332
+ }
1333
+ }
1334
+ if (/-256(color)?$/i.test(env2.TERM)) {
1335
+ return 2;
1336
+ }
1337
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
1338
+ return 1;
1339
+ }
1340
+ if ("COLORTERM" in env2) {
1341
+ return 1;
1342
+ }
1343
+ if (env2.TERM === "dumb") {
1344
+ return min;
1345
+ }
1346
+ return min;
1347
+ }
1348
+ function getSupportLevel(stream) {
1349
+ var level = supportsColor(stream);
1350
+ return translateLevel(level);
1351
+ }
1352
+ module.exports = {
1353
+ supportsColor: getSupportLevel,
1354
+ stdout: getSupportLevel(process.stdout),
1355
+ stderr: getSupportLevel(process.stderr)
1356
+ };
1357
+ });
1358
+
1359
+ // node_modules/@colors/colors/lib/custom/trap.js
1360
+ var require_trap = __commonJS((exports, module) => {
1361
+ module["exports"] = function runTheTrap(text, options) {
1362
+ var result = "";
1363
+ text = text || "Run the trap, drop the bass";
1364
+ text = text.split("");
1365
+ var trap = {
1366
+ a: ["@", "Ą", "Ⱥ", "Ʌ", "Δ", "Λ", "Д"],
1367
+ b: ["ß", "Ɓ", "Ƀ", "ɮ", "β", "฿"],
1368
+ c: ["©", "Ȼ", "Ͼ"],
1369
+ d: ["Ð", "Ɗ", "Ԁ", "ԁ", "Ԃ", "ԃ"],
1370
+ e: [
1371
+ "Ë",
1372
+ "ĕ",
1373
+ "Ǝ",
1374
+ "ɘ",
1375
+ "Σ",
1376
+ "ξ",
1377
+ "Ҽ",
1378
+ "੬"
1379
+ ],
1380
+ f: ["Ӻ"],
1381
+ g: ["ɢ"],
1382
+ h: ["Ħ", "ƕ", "Ң", "Һ", "Ӈ", "Ԋ"],
1383
+ i: ["༏"],
1384
+ j: ["Ĵ"],
1385
+ k: ["ĸ", "Ҡ", "Ӄ", "Ԟ"],
1386
+ l: ["Ĺ"],
1387
+ m: ["ʍ", "Ӎ", "ӎ", "Ԡ", "ԡ", "൩"],
1388
+ n: ["Ñ", "ŋ", "Ɲ", "Ͷ", "Π", "Ҋ"],
1389
+ o: [
1390
+ "Ø",
1391
+ "õ",
1392
+ "ø",
1393
+ "Ǿ",
1394
+ "ʘ",
1395
+ "Ѻ",
1396
+ "ם",
1397
+ "۝",
1398
+ "๏"
1399
+ ],
1400
+ p: ["Ƿ", "Ҏ"],
1401
+ q: ["্"],
1402
+ r: ["®", "Ʀ", "Ȑ", "Ɍ", "ʀ", "Я"],
1403
+ s: ["§", "Ϟ", "ϟ", "Ϩ"],
1404
+ t: ["Ł", "Ŧ", "ͳ"],
1405
+ u: ["Ʊ", "Ս"],
1406
+ v: ["ט"],
1407
+ w: ["Ш", "Ѡ", "Ѽ", "൰"],
1408
+ x: ["Ҳ", "Ӿ", "Ӽ", "ӽ"],
1409
+ y: ["¥", "Ұ", "Ӌ"],
1410
+ z: ["Ƶ", "ɀ"]
1411
+ };
1412
+ text.forEach(function(c4) {
1413
+ c4 = c4.toLowerCase();
1414
+ var chars = trap[c4] || [" "];
1415
+ var rand = Math.floor(Math.random() * chars.length);
1416
+ if (typeof trap[c4] !== "undefined") {
1417
+ result += trap[c4][rand];
1418
+ } else {
1419
+ result += c4;
1420
+ }
1421
+ });
1422
+ return result;
1423
+ };
1424
+ });
1425
+
1426
+ // node_modules/@colors/colors/lib/custom/zalgo.js
1427
+ var require_zalgo = __commonJS((exports, module) => {
1428
+ module["exports"] = function zalgo(text, options) {
1429
+ text = text || " he is here ";
1430
+ var soul = {
1431
+ up: [
1432
+ "̍",
1433
+ "̎",
1434
+ "̄",
1435
+ "̅",
1436
+ "̿",
1437
+ "̑",
1438
+ "̆",
1439
+ "̐",
1440
+ "͒",
1441
+ "͗",
1442
+ "͑",
1443
+ "̇",
1444
+ "̈",
1445
+ "̊",
1446
+ "͂",
1447
+ "̓",
1448
+ "̈",
1449
+ "͊",
1450
+ "͋",
1451
+ "͌",
1452
+ "̃",
1453
+ "̂",
1454
+ "̌",
1455
+ "͐",
1456
+ "̀",
1457
+ "́",
1458
+ "̋",
1459
+ "̏",
1460
+ "̒",
1461
+ "̓",
1462
+ "̔",
1463
+ "̽",
1464
+ "̉",
1465
+ "ͣ",
1466
+ "ͤ",
1467
+ "ͥ",
1468
+ "ͦ",
1469
+ "ͧ",
1470
+ "ͨ",
1471
+ "ͩ",
1472
+ "ͪ",
1473
+ "ͫ",
1474
+ "ͬ",
1475
+ "ͭ",
1476
+ "ͮ",
1477
+ "ͯ",
1478
+ "̾",
1479
+ "͛",
1480
+ "͆",
1481
+ "̚"
1482
+ ],
1483
+ down: [
1484
+ "̖",
1485
+ "̗",
1486
+ "̘",
1487
+ "̙",
1488
+ "̜",
1489
+ "̝",
1490
+ "̞",
1491
+ "̟",
1492
+ "̠",
1493
+ "̤",
1494
+ "̥",
1495
+ "̦",
1496
+ "̩",
1497
+ "̪",
1498
+ "̫",
1499
+ "̬",
1500
+ "̭",
1501
+ "̮",
1502
+ "̯",
1503
+ "̰",
1504
+ "̱",
1505
+ "̲",
1506
+ "̳",
1507
+ "̹",
1508
+ "̺",
1509
+ "̻",
1510
+ "̼",
1511
+ "ͅ",
1512
+ "͇",
1513
+ "͈",
1514
+ "͉",
1515
+ "͍",
1516
+ "͎",
1517
+ "͓",
1518
+ "͔",
1519
+ "͕",
1520
+ "͖",
1521
+ "͙",
1522
+ "͚",
1523
+ "̣"
1524
+ ],
1525
+ mid: [
1526
+ "̕",
1527
+ "̛",
1528
+ "̀",
1529
+ "́",
1530
+ "͘",
1531
+ "̡",
1532
+ "̢",
1533
+ "̧",
1534
+ "̨",
1535
+ "̴",
1536
+ "̵",
1537
+ "̶",
1538
+ "͜",
1539
+ "͝",
1540
+ "͞",
1541
+ "͟",
1542
+ "͠",
1543
+ "͢",
1544
+ "̸",
1545
+ "̷",
1546
+ "͡",
1547
+ " ҉"
1548
+ ]
1549
+ };
1550
+ var all = [].concat(soul.up, soul.down, soul.mid);
1551
+ function randomNumber(range) {
1552
+ var r4 = Math.floor(Math.random() * range);
1553
+ return r4;
1554
+ }
1555
+ function isChar(character) {
1556
+ var bool = false;
1557
+ all.filter(function(i3) {
1558
+ bool = i3 === character;
1559
+ });
1560
+ return bool;
1561
+ }
1562
+ function heComes(text2, options2) {
1563
+ var result = "";
1564
+ var counts;
1565
+ var l3;
1566
+ options2 = options2 || {};
1567
+ options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
1568
+ options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
1569
+ options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
1570
+ options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
1571
+ text2 = text2.split("");
1572
+ for (l3 in text2) {
1573
+ if (isChar(l3)) {
1574
+ continue;
1575
+ }
1576
+ result = result + text2[l3];
1577
+ counts = { up: 0, down: 0, mid: 0 };
1578
+ switch (options2.size) {
1579
+ case "mini":
1580
+ counts.up = randomNumber(8);
1581
+ counts.mid = randomNumber(2);
1582
+ counts.down = randomNumber(8);
1583
+ break;
1584
+ case "maxi":
1585
+ counts.up = randomNumber(16) + 3;
1586
+ counts.mid = randomNumber(4) + 1;
1587
+ counts.down = randomNumber(64) + 3;
1588
+ break;
1589
+ default:
1590
+ counts.up = randomNumber(8) + 1;
1591
+ counts.mid = randomNumber(6) / 2;
1592
+ counts.down = randomNumber(8) + 1;
1593
+ break;
1594
+ }
1595
+ var arr = ["up", "mid", "down"];
1596
+ for (var d2 in arr) {
1597
+ var index = arr[d2];
1598
+ for (var i3 = 0;i3 <= counts[index]; i3++) {
1599
+ if (options2[index]) {
1600
+ result = result + soul[index][randomNumber(soul[index].length)];
1601
+ }
1602
+ }
1603
+ }
1604
+ }
1605
+ return result;
1606
+ }
1607
+ return heComes(text, options);
1608
+ };
1609
+ });
1610
+
1611
+ // node_modules/@colors/colors/lib/maps/america.js
1612
+ var require_america = __commonJS((exports, module) => {
1613
+ module["exports"] = function(colors2) {
1614
+ return function(letter, i3, exploded) {
1615
+ if (letter === " ")
1616
+ return letter;
1617
+ switch (i3 % 3) {
1618
+ case 0:
1619
+ return colors2.red(letter);
1620
+ case 1:
1621
+ return colors2.white(letter);
1622
+ case 2:
1623
+ return colors2.blue(letter);
1624
+ }
1625
+ };
1626
+ };
1627
+ });
1628
+
1629
+ // node_modules/@colors/colors/lib/maps/zebra.js
1630
+ var require_zebra = __commonJS((exports, module) => {
1631
+ module["exports"] = function(colors2) {
1632
+ return function(letter, i3, exploded) {
1633
+ return i3 % 2 === 0 ? letter : colors2.inverse(letter);
1634
+ };
1635
+ };
1636
+ });
1637
+
1638
+ // node_modules/@colors/colors/lib/maps/rainbow.js
1639
+ var require_rainbow = __commonJS((exports, module) => {
1640
+ module["exports"] = function(colors2) {
1641
+ var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
1642
+ return function(letter, i3, exploded) {
1643
+ if (letter === " ") {
1644
+ return letter;
1645
+ } else {
1646
+ return colors2[rainbowColors[i3++ % rainbowColors.length]](letter);
1647
+ }
1648
+ };
1649
+ };
1650
+ });
1651
+
1652
+ // node_modules/@colors/colors/lib/maps/random.js
1653
+ var require_random = __commonJS((exports, module) => {
1654
+ module["exports"] = function(colors2) {
1655
+ var available = [
1656
+ "underline",
1657
+ "inverse",
1658
+ "grey",
1659
+ "yellow",
1660
+ "red",
1661
+ "green",
1662
+ "blue",
1663
+ "white",
1664
+ "cyan",
1665
+ "magenta",
1666
+ "brightYellow",
1667
+ "brightRed",
1668
+ "brightGreen",
1669
+ "brightBlue",
1670
+ "brightWhite",
1671
+ "brightCyan",
1672
+ "brightMagenta"
1673
+ ];
1674
+ return function(letter, i3, exploded) {
1675
+ return letter === " " ? letter : colors2[available[Math.round(Math.random() * (available.length - 2))]](letter);
1676
+ };
1677
+ };
1678
+ });
1679
+
1680
+ // node_modules/@colors/colors/lib/colors.js
1681
+ var require_colors = __commonJS((exports, module) => {
1682
+ var colors2 = {};
1683
+ module["exports"] = colors2;
1684
+ colors2.themes = {};
1685
+ var util = __require("util");
1686
+ var ansiStyles = colors2.styles = require_styles();
1687
+ var defineProps = Object.defineProperties;
1688
+ var newLineRegex = new RegExp(/[\r\n]+/g);
1689
+ colors2.supportsColor = require_supports_colors().supportsColor;
1690
+ if (typeof colors2.enabled === "undefined") {
1691
+ colors2.enabled = colors2.supportsColor() !== false;
1692
+ }
1693
+ colors2.enable = function() {
1694
+ colors2.enabled = true;
1695
+ };
1696
+ colors2.disable = function() {
1697
+ colors2.enabled = false;
1698
+ };
1699
+ colors2.stripColors = colors2.strip = function(str) {
1700
+ return ("" + str).replace(/\x1B\[\d+m/g, "");
1701
+ };
1702
+ var stylize = colors2.stylize = function stylize2(str, style) {
1703
+ if (!colors2.enabled) {
1704
+ return str + "";
1705
+ }
1706
+ var styleMap = ansiStyles[style];
1707
+ if (!styleMap && style in colors2) {
1708
+ return colors2[style](str);
1709
+ }
1710
+ return styleMap.open + str + styleMap.close;
1711
+ };
1712
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
1713
+ var escapeStringRegexp = function(str) {
1714
+ if (typeof str !== "string") {
1715
+ throw new TypeError("Expected a string");
1716
+ }
1717
+ return str.replace(matchOperatorsRe, "\\$&");
1718
+ };
1719
+ function build(_styles) {
1720
+ var builder = function builder2() {
1721
+ return applyStyle.apply(builder2, arguments);
1722
+ };
1723
+ builder._styles = _styles;
1724
+ builder.__proto__ = proto;
1725
+ return builder;
1726
+ }
1727
+ var styles = function() {
1728
+ var ret = {};
1729
+ ansiStyles.grey = ansiStyles.gray;
1730
+ Object.keys(ansiStyles).forEach(function(key) {
1731
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
1732
+ ret[key] = {
1733
+ get: function() {
1734
+ return build(this._styles.concat(key));
1735
+ }
1736
+ };
1737
+ });
1738
+ return ret;
1739
+ }();
1740
+ var proto = defineProps(function colors3() {}, styles);
1741
+ function applyStyle() {
1742
+ var args = Array.prototype.slice.call(arguments);
1743
+ var str = args.map(function(arg) {
1744
+ if (arg != null && arg.constructor === String) {
1745
+ return arg;
1746
+ } else {
1747
+ return util.inspect(arg);
1748
+ }
1749
+ }).join(" ");
1750
+ if (!colors2.enabled || !str) {
1751
+ return str;
1752
+ }
1753
+ var newLinesPresent = str.indexOf(`
1754
+ `) != -1;
1755
+ var nestedStyles = this._styles;
1756
+ var i3 = nestedStyles.length;
1757
+ while (i3--) {
1758
+ var code = ansiStyles[nestedStyles[i3]];
1759
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
1760
+ if (newLinesPresent) {
1761
+ str = str.replace(newLineRegex, function(match) {
1762
+ return code.close + match + code.open;
1763
+ });
1764
+ }
1765
+ }
1766
+ return str;
1767
+ }
1768
+ colors2.setTheme = function(theme) {
1769
+ if (typeof theme === "string") {
1770
+ console.log("colors.setTheme now only accepts an object, not a string. " + "If you are trying to set a theme from a file, it is now your (the " + "caller's) responsibility to require the file. The old syntax " + "looked like colors.setTheme(__dirname + " + "'/../themes/generic-logging.js'); The new syntax looks like " + "colors.setTheme(require(__dirname + " + "'/../themes/generic-logging.js'));");
1771
+ return;
1772
+ }
1773
+ for (var style in theme) {
1774
+ (function(style2) {
1775
+ colors2[style2] = function(str) {
1776
+ if (typeof theme[style2] === "object") {
1777
+ var out = str;
1778
+ for (var i3 in theme[style2]) {
1779
+ out = colors2[theme[style2][i3]](out);
1780
+ }
1781
+ return out;
1782
+ }
1783
+ return colors2[theme[style2]](str);
1784
+ };
1785
+ })(style);
1786
+ }
1787
+ };
1788
+ function init2() {
1789
+ var ret = {};
1790
+ Object.keys(styles).forEach(function(name) {
1791
+ ret[name] = {
1792
+ get: function() {
1793
+ return build([name]);
1794
+ }
1795
+ };
1796
+ });
1797
+ return ret;
1798
+ }
1799
+ var sequencer = function sequencer2(map2, str) {
1800
+ var exploded = str.split("");
1801
+ exploded = exploded.map(map2);
1802
+ return exploded.join("");
1803
+ };
1804
+ colors2.trap = require_trap();
1805
+ colors2.zalgo = require_zalgo();
1806
+ colors2.maps = {};
1807
+ colors2.maps.america = require_america()(colors2);
1808
+ colors2.maps.zebra = require_zebra()(colors2);
1809
+ colors2.maps.rainbow = require_rainbow()(colors2);
1810
+ colors2.maps.random = require_random()(colors2);
1811
+ for (map in colors2.maps) {
1812
+ (function(map2) {
1813
+ colors2[map2] = function(str) {
1814
+ return sequencer(colors2.maps[map2], str);
1815
+ };
1816
+ })(map);
1817
+ }
1818
+ var map;
1819
+ defineProps(colors2, init2());
1820
+ });
1821
+
1822
+ // node_modules/@colors/colors/safe.js
1823
+ var require_safe = __commonJS((exports, module) => {
1824
+ var colors2 = require_colors();
1825
+ module["exports"] = colors2;
1826
+ });
1827
+
1828
+ // node_modules/cli-table3/src/cell.js
1829
+ var require_cell = __commonJS((exports, module) => {
1830
+ var { info, debug } = require_debug();
1831
+ var utils = require_utils();
1832
+
1833
+ class Cell {
1834
+ constructor(options) {
1835
+ this.setOptions(options);
1836
+ this.x = null;
1837
+ this.y = null;
1838
+ }
1839
+ setOptions(options) {
1840
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof options) !== -1) {
1841
+ options = { content: "" + options };
1842
+ }
1843
+ options = options || {};
1844
+ this.options = options;
1845
+ let content = options.content;
1846
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof content) !== -1) {
1847
+ this.content = String(content);
1848
+ } else if (!content) {
1849
+ this.content = this.options.href || "";
1850
+ } else {
1851
+ throw new Error("Content needs to be a primitive, got: " + typeof content);
1852
+ }
1853
+ this.colSpan = options.colSpan || 1;
1854
+ this.rowSpan = options.rowSpan || 1;
1855
+ if (this.options.href) {
1856
+ Object.defineProperty(this, "href", {
1857
+ get() {
1858
+ return this.options.href;
1859
+ }
1860
+ });
1861
+ }
1862
+ }
1863
+ mergeTableOptions(tableOptions, cells) {
1864
+ this.cells = cells;
1865
+ let optionsChars = this.options.chars || {};
1866
+ let tableChars = tableOptions.chars;
1867
+ let chars = this.chars = {};
1868
+ CHAR_NAMES.forEach(function(name) {
1869
+ setOption(optionsChars, tableChars, name, chars);
1870
+ });
1871
+ this.truncate = this.options.truncate || tableOptions.truncate;
1872
+ let style = this.options.style = this.options.style || {};
1873
+ let tableStyle = tableOptions.style;
1874
+ setOption(style, tableStyle, "padding-left", this);
1875
+ setOption(style, tableStyle, "padding-right", this);
1876
+ this.head = style.head || tableStyle.head;
1877
+ this.border = style.border || tableStyle.border;
1878
+ this.fixedWidth = tableOptions.colWidths[this.x];
1879
+ this.lines = this.computeLines(tableOptions);
1880
+ this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
1881
+ this.desiredHeight = this.lines.length;
1882
+ }
1883
+ computeLines(tableOptions) {
1884
+ const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
1885
+ const { wordWrap = tableWordWrap } = this.options;
1886
+ if (this.fixedWidth && wordWrap) {
1887
+ this.fixedWidth -= this.paddingLeft + this.paddingRight;
1888
+ if (this.colSpan) {
1889
+ let i3 = 1;
1890
+ while (i3 < this.colSpan) {
1891
+ this.fixedWidth += tableOptions.colWidths[this.x + i3];
1892
+ i3++;
1893
+ }
1894
+ }
1895
+ const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
1896
+ const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
1897
+ return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
1898
+ }
1899
+ return this.wrapLines(this.content.split(`
1900
+ `));
1901
+ }
1902
+ wrapLines(computedLines) {
1903
+ const lines = utils.colorizeLines(computedLines);
1904
+ if (this.href) {
1905
+ return lines.map((line) => utils.hyperlink(this.href, line));
1906
+ }
1907
+ return lines;
1908
+ }
1909
+ init(tableOptions) {
1910
+ let x2 = this.x;
1911
+ let y4 = this.y;
1912
+ this.widths = tableOptions.colWidths.slice(x2, x2 + this.colSpan);
1913
+ this.heights = tableOptions.rowHeights.slice(y4, y4 + this.rowSpan);
1914
+ this.width = this.widths.reduce(sumPlusOne, -1);
1915
+ this.height = this.heights.reduce(sumPlusOne, -1);
1916
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x2];
1917
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y4];
1918
+ this.drawRight = x2 + this.colSpan == tableOptions.colWidths.length;
1919
+ }
1920
+ draw(lineNum, spanningCell) {
1921
+ if (lineNum == "top")
1922
+ return this.drawTop(this.drawRight);
1923
+ if (lineNum == "bottom")
1924
+ return this.drawBottom(this.drawRight);
1925
+ let content = utils.truncate(this.content, 10, this.truncate);
1926
+ if (!lineNum) {
1927
+ info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
1928
+ } else {}
1929
+ let padLen = Math.max(this.height - this.lines.length, 0);
1930
+ let padTop;
1931
+ switch (this.vAlign) {
1932
+ case "center":
1933
+ padTop = Math.ceil(padLen / 2);
1934
+ break;
1935
+ case "bottom":
1936
+ padTop = padLen;
1937
+ break;
1938
+ default:
1939
+ padTop = 0;
1940
+ }
1941
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
1942
+ return this.drawEmpty(this.drawRight, spanningCell);
1943
+ }
1944
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
1945
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
1946
+ }
1947
+ drawTop(drawRight) {
1948
+ let content = [];
1949
+ if (this.cells) {
1950
+ this.widths.forEach(function(width, index) {
1951
+ content.push(this._topLeftChar(index));
1952
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
1953
+ }, this);
1954
+ } else {
1955
+ content.push(this._topLeftChar(0));
1956
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
1957
+ }
1958
+ if (drawRight) {
1959
+ content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
1960
+ }
1961
+ return this.wrapWithStyleColors("border", content.join(""));
1962
+ }
1963
+ _topLeftChar(offset) {
1964
+ let x2 = this.x + offset;
1965
+ let leftChar;
1966
+ if (this.y == 0) {
1967
+ leftChar = x2 == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
1968
+ } else {
1969
+ if (x2 == 0) {
1970
+ leftChar = "leftMid";
1971
+ } else {
1972
+ leftChar = offset == 0 ? "midMid" : "bottomMid";
1973
+ if (this.cells) {
1974
+ let spanAbove = this.cells[this.y - 1][x2] instanceof Cell.ColSpanCell;
1975
+ if (spanAbove) {
1976
+ leftChar = offset == 0 ? "topMid" : "mid";
1977
+ }
1978
+ if (offset == 0) {
1979
+ let i3 = 1;
1980
+ while (this.cells[this.y][x2 - i3] instanceof Cell.ColSpanCell) {
1981
+ i3++;
1982
+ }
1983
+ if (this.cells[this.y][x2 - i3] instanceof Cell.RowSpanCell) {
1984
+ leftChar = "leftMid";
1985
+ }
1986
+ }
1987
+ }
1988
+ }
1989
+ }
1990
+ return this.chars[leftChar];
1991
+ }
1992
+ wrapWithStyleColors(styleProperty, content) {
1993
+ if (this[styleProperty] && this[styleProperty].length) {
1994
+ try {
1995
+ let colors2 = require_safe();
1996
+ for (let i3 = this[styleProperty].length - 1;i3 >= 0; i3--) {
1997
+ colors2 = colors2[this[styleProperty][i3]];
1998
+ }
1999
+ return colors2(content);
2000
+ } catch (e2) {
2001
+ return content;
2002
+ }
2003
+ } else {
2004
+ return content;
2005
+ }
2006
+ }
2007
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
2008
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
2009
+ if (this.x && spanningCell && this.cells) {
2010
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
2011
+ while (cellLeft instanceof ColSpanCell) {
2012
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
2013
+ }
2014
+ if (!(cellLeft instanceof RowSpanCell)) {
2015
+ left = this.chars["rightMid"];
2016
+ }
2017
+ }
2018
+ let leftPadding = utils.repeat(" ", this.paddingLeft);
2019
+ let right = drawRight ? this.chars["right"] : "";
2020
+ let rightPadding = utils.repeat(" ", this.paddingRight);
2021
+ let line = this.lines[lineNum];
2022
+ let len = this.width - (this.paddingLeft + this.paddingRight);
2023
+ if (forceTruncationSymbol)
2024
+ line += this.truncate || "…";
2025
+ let content = utils.truncate(line, len, this.truncate);
2026
+ content = utils.pad(content, len, " ", this.hAlign);
2027
+ content = leftPadding + content + rightPadding;
2028
+ return this.stylizeLine(left, content, right);
2029
+ }
2030
+ stylizeLine(left, content, right) {
2031
+ left = this.wrapWithStyleColors("border", left);
2032
+ right = this.wrapWithStyleColors("border", right);
2033
+ if (this.y === 0) {
2034
+ content = this.wrapWithStyleColors("head", content);
2035
+ }
2036
+ return left + content + right;
2037
+ }
2038
+ drawBottom(drawRight) {
2039
+ let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
2040
+ let content = utils.repeat(this.chars.bottom, this.width);
2041
+ let right = drawRight ? this.chars["bottomRight"] : "";
2042
+ return this.wrapWithStyleColors("border", left + content + right);
2043
+ }
2044
+ drawEmpty(drawRight, spanningCell) {
2045
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
2046
+ if (this.x && spanningCell && this.cells) {
2047
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
2048
+ while (cellLeft instanceof ColSpanCell) {
2049
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
2050
+ }
2051
+ if (!(cellLeft instanceof RowSpanCell)) {
2052
+ left = this.chars["rightMid"];
2053
+ }
2054
+ }
2055
+ let right = drawRight ? this.chars["right"] : "";
2056
+ let content = utils.repeat(" ", this.width);
2057
+ return this.stylizeLine(left, content, right);
2058
+ }
2059
+ }
2060
+
2061
+ class ColSpanCell {
2062
+ constructor() {}
2063
+ draw(lineNum) {
2064
+ if (typeof lineNum === "number") {
2065
+ debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
2066
+ }
2067
+ return "";
2068
+ }
2069
+ init() {}
2070
+ mergeTableOptions() {}
2071
+ }
2072
+
2073
+ class RowSpanCell {
2074
+ constructor(originalCell) {
2075
+ this.originalCell = originalCell;
2076
+ }
2077
+ init(tableOptions) {
2078
+ let y4 = this.y;
2079
+ let originalY = this.originalCell.y;
2080
+ this.cellOffset = y4 - originalY;
2081
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
2082
+ }
2083
+ draw(lineNum) {
2084
+ if (lineNum == "top") {
2085
+ return this.originalCell.draw(this.offset, this.cellOffset);
2086
+ }
2087
+ if (lineNum == "bottom") {
2088
+ return this.originalCell.draw("bottom");
2089
+ }
2090
+ debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
2091
+ return this.originalCell.draw(this.offset + 1 + lineNum);
2092
+ }
2093
+ mergeTableOptions() {}
2094
+ }
2095
+ function firstDefined(...args) {
2096
+ return args.filter((v2) => v2 !== undefined && v2 !== null).shift();
2097
+ }
2098
+ function setOption(objA, objB, nameB, targetObj) {
2099
+ let nameA = nameB.split("-");
2100
+ if (nameA.length > 1) {
2101
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
2102
+ nameA = nameA.join("");
2103
+ targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
2104
+ } else {
2105
+ targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
2106
+ }
2107
+ }
2108
+ function findDimension(dimensionTable, startingIndex, span) {
2109
+ let ret = dimensionTable[startingIndex];
2110
+ for (let i3 = 1;i3 < span; i3++) {
2111
+ ret += 1 + dimensionTable[startingIndex + i3];
2112
+ }
2113
+ return ret;
2114
+ }
2115
+ function sumPlusOne(a3, b3) {
2116
+ return a3 + b3 + 1;
2117
+ }
2118
+ var CHAR_NAMES = [
2119
+ "top",
2120
+ "top-mid",
2121
+ "top-left",
2122
+ "top-right",
2123
+ "bottom",
2124
+ "bottom-mid",
2125
+ "bottom-left",
2126
+ "bottom-right",
2127
+ "left",
2128
+ "left-mid",
2129
+ "mid",
2130
+ "mid-mid",
2131
+ "right",
2132
+ "right-mid",
2133
+ "middle"
2134
+ ];
2135
+ module.exports = Cell;
2136
+ module.exports.ColSpanCell = ColSpanCell;
2137
+ module.exports.RowSpanCell = RowSpanCell;
2138
+ });
2139
+
2140
+ // node_modules/cli-table3/src/layout-manager.js
2141
+ var require_layout_manager = __commonJS((exports, module) => {
2142
+ var { warn, debug } = require_debug();
2143
+ var Cell = require_cell();
2144
+ var { ColSpanCell, RowSpanCell } = Cell;
2145
+ (function() {
2146
+ function next(alloc, col) {
2147
+ if (alloc[col] > 0) {
2148
+ return next(alloc, col + 1);
2149
+ }
2150
+ return col;
2151
+ }
2152
+ function layoutTable(table) {
2153
+ let alloc = {};
2154
+ table.forEach(function(row, rowIndex) {
2155
+ let col = 0;
2156
+ row.forEach(function(cell) {
2157
+ cell.y = rowIndex;
2158
+ cell.x = rowIndex ? next(alloc, col) : col;
2159
+ const rowSpan = cell.rowSpan || 1;
2160
+ const colSpan = cell.colSpan || 1;
2161
+ if (rowSpan > 1) {
2162
+ for (let cs = 0;cs < colSpan; cs++) {
2163
+ alloc[cell.x + cs] = rowSpan;
2164
+ }
2165
+ }
2166
+ col = cell.x + colSpan;
2167
+ });
2168
+ Object.keys(alloc).forEach((idx) => {
2169
+ alloc[idx]--;
2170
+ if (alloc[idx] < 1)
2171
+ delete alloc[idx];
2172
+ });
2173
+ });
2174
+ }
2175
+ function maxWidth(table) {
2176
+ let mw = 0;
2177
+ table.forEach(function(row) {
2178
+ row.forEach(function(cell) {
2179
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
2180
+ });
2181
+ });
2182
+ return mw;
2183
+ }
2184
+ function maxHeight(table) {
2185
+ return table.length;
2186
+ }
2187
+ function cellsConflict(cell1, cell2) {
2188
+ let yMin1 = cell1.y;
2189
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
2190
+ let yMin2 = cell2.y;
2191
+ let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
2192
+ let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
2193
+ let xMin1 = cell1.x;
2194
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
2195
+ let xMin2 = cell2.x;
2196
+ let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
2197
+ let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
2198
+ return yConflict && xConflict;
2199
+ }
2200
+ function conflictExists(rows, x2, y4) {
2201
+ let i_max = Math.min(rows.length - 1, y4);
2202
+ let cell = { x: x2, y: y4 };
2203
+ for (let i3 = 0;i3 <= i_max; i3++) {
2204
+ let row = rows[i3];
2205
+ for (let j = 0;j < row.length; j++) {
2206
+ if (cellsConflict(cell, row[j])) {
2207
+ return true;
2208
+ }
2209
+ }
2210
+ }
2211
+ return false;
2212
+ }
2213
+ function allBlank(rows, y4, xMin, xMax) {
2214
+ for (let x2 = xMin;x2 < xMax; x2++) {
2215
+ if (conflictExists(rows, x2, y4)) {
2216
+ return false;
2217
+ }
2218
+ }
2219
+ return true;
2220
+ }
2221
+ function addRowSpanCells(table) {
2222
+ table.forEach(function(row, rowIndex) {
2223
+ row.forEach(function(cell) {
2224
+ for (let i3 = 1;i3 < cell.rowSpan; i3++) {
2225
+ let rowSpanCell = new RowSpanCell(cell);
2226
+ rowSpanCell.x = cell.x;
2227
+ rowSpanCell.y = cell.y + i3;
2228
+ rowSpanCell.colSpan = cell.colSpan;
2229
+ insertCell(rowSpanCell, table[rowIndex + i3]);
2230
+ }
2231
+ });
2232
+ });
2233
+ }
2234
+ function addColSpanCells(cellRows) {
2235
+ for (let rowIndex = cellRows.length - 1;rowIndex >= 0; rowIndex--) {
2236
+ let cellColumns = cellRows[rowIndex];
2237
+ for (let columnIndex = 0;columnIndex < cellColumns.length; columnIndex++) {
2238
+ let cell = cellColumns[columnIndex];
2239
+ for (let k2 = 1;k2 < cell.colSpan; k2++) {
2240
+ let colSpanCell = new ColSpanCell;
2241
+ colSpanCell.x = cell.x + k2;
2242
+ colSpanCell.y = cell.y;
2243
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
2244
+ }
2245
+ }
2246
+ }
2247
+ }
2248
+ function insertCell(cell, row) {
2249
+ let x2 = 0;
2250
+ while (x2 < row.length && row[x2].x < cell.x) {
2251
+ x2++;
2252
+ }
2253
+ row.splice(x2, 0, cell);
2254
+ }
2255
+ function fillInTable(table) {
2256
+ let h_max = maxHeight(table);
2257
+ let w_max = maxWidth(table);
2258
+ debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
2259
+ for (let y4 = 0;y4 < h_max; y4++) {
2260
+ for (let x2 = 0;x2 < w_max; x2++) {
2261
+ if (!conflictExists(table, x2, y4)) {
2262
+ let opts = { x: x2, y: y4, colSpan: 1, rowSpan: 1 };
2263
+ x2++;
2264
+ while (x2 < w_max && !conflictExists(table, x2, y4)) {
2265
+ opts.colSpan++;
2266
+ x2++;
2267
+ }
2268
+ let y22 = y4 + 1;
2269
+ while (y22 < h_max && allBlank(table, y22, opts.x, opts.x + opts.colSpan)) {
2270
+ opts.rowSpan++;
2271
+ y22++;
2272
+ }
2273
+ let cell = new Cell(opts);
2274
+ cell.x = opts.x;
2275
+ cell.y = opts.y;
2276
+ warn(`Missing cell at ${cell.y}-${cell.x}.`);
2277
+ insertCell(cell, table[y4]);
2278
+ }
2279
+ }
2280
+ }
2281
+ }
2282
+ function generateCells(rows) {
2283
+ return rows.map(function(row) {
2284
+ if (!Array.isArray(row)) {
2285
+ let key = Object.keys(row)[0];
2286
+ row = row[key];
2287
+ if (Array.isArray(row)) {
2288
+ row = row.slice();
2289
+ row.unshift(key);
2290
+ } else {
2291
+ row = [key, row];
2292
+ }
2293
+ }
2294
+ return row.map(function(cell) {
2295
+ return new Cell(cell);
2296
+ });
2297
+ });
2298
+ }
2299
+ function makeTableLayout(rows) {
2300
+ let cellRows = generateCells(rows);
2301
+ layoutTable(cellRows);
2302
+ fillInTable(cellRows);
2303
+ addRowSpanCells(cellRows);
2304
+ addColSpanCells(cellRows);
2305
+ return cellRows;
2306
+ }
2307
+ module.exports = {
2308
+ makeTableLayout,
2309
+ layoutTable,
2310
+ addRowSpanCells,
2311
+ maxWidth,
2312
+ fillInTable,
2313
+ computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
2314
+ computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
2315
+ };
2316
+ })();
2317
+ function makeComputeWidths(colSpan, desiredWidth, x2, forcedMin) {
2318
+ return function(vals, table) {
2319
+ let result = [];
2320
+ let spanners = [];
2321
+ let auto = {};
2322
+ table.forEach(function(row) {
2323
+ row.forEach(function(cell) {
2324
+ if ((cell[colSpan] || 1) > 1) {
2325
+ spanners.push(cell);
2326
+ } else {
2327
+ result[cell[x2]] = Math.max(result[cell[x2]] || 0, cell[desiredWidth] || 0, forcedMin);
2328
+ }
2329
+ });
2330
+ });
2331
+ vals.forEach(function(val, index) {
2332
+ if (typeof val === "number") {
2333
+ result[index] = val;
2334
+ }
2335
+ });
2336
+ for (let k2 = spanners.length - 1;k2 >= 0; k2--) {
2337
+ let cell = spanners[k2];
2338
+ let span = cell[colSpan];
2339
+ let col = cell[x2];
2340
+ let existingWidth = result[col];
2341
+ let editableCols = typeof vals[col] === "number" ? 0 : 1;
2342
+ if (typeof existingWidth === "number") {
2343
+ for (let i3 = 1;i3 < span; i3++) {
2344
+ existingWidth += 1 + result[col + i3];
2345
+ if (typeof vals[col + i3] !== "number") {
2346
+ editableCols++;
2347
+ }
2348
+ }
2349
+ } else {
2350
+ existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
2351
+ if (!auto[col] || auto[col] < existingWidth) {
2352
+ auto[col] = existingWidth;
2353
+ }
2354
+ }
2355
+ if (cell[desiredWidth] > existingWidth) {
2356
+ let i3 = 0;
2357
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
2358
+ if (typeof vals[col + i3] !== "number") {
2359
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
2360
+ existingWidth += dif;
2361
+ result[col + i3] += dif;
2362
+ editableCols--;
2363
+ }
2364
+ i3++;
2365
+ }
2366
+ }
2367
+ }
2368
+ Object.assign(vals, result, auto);
2369
+ for (let j = 0;j < vals.length; j++) {
2370
+ vals[j] = Math.max(forcedMin, vals[j] || 0);
2371
+ }
2372
+ };
2373
+ }
2374
+ });
2375
+
2376
+ // node_modules/cli-table3/src/table.js
2377
+ var require_table = __commonJS((exports, module) => {
2378
+ var debug = require_debug();
2379
+ var utils = require_utils();
2380
+ var tableLayout = require_layout_manager();
2381
+
2382
+ class Table extends Array {
2383
+ constructor(opts) {
2384
+ super();
2385
+ const options = utils.mergeOptions(opts);
2386
+ Object.defineProperty(this, "options", {
2387
+ value: options,
2388
+ enumerable: options.debug
2389
+ });
2390
+ if (options.debug) {
2391
+ switch (typeof options.debug) {
2392
+ case "boolean":
2393
+ debug.setDebugLevel(debug.WARN);
2394
+ break;
2395
+ case "number":
2396
+ debug.setDebugLevel(options.debug);
2397
+ break;
2398
+ case "string":
2399
+ debug.setDebugLevel(parseInt(options.debug, 10));
2400
+ break;
2401
+ default:
2402
+ debug.setDebugLevel(debug.WARN);
2403
+ debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
2404
+ }
2405
+ Object.defineProperty(this, "messages", {
2406
+ get() {
2407
+ return debug.debugMessages();
2408
+ }
2409
+ });
2410
+ }
2411
+ }
2412
+ toString() {
2413
+ let array = this;
2414
+ let headersPresent = this.options.head && this.options.head.length;
2415
+ if (headersPresent) {
2416
+ array = [this.options.head];
2417
+ if (this.length) {
2418
+ array.push.apply(array, this);
2419
+ }
2420
+ } else {
2421
+ this.options.style.head = [];
2422
+ }
2423
+ let cells = tableLayout.makeTableLayout(array);
2424
+ cells.forEach(function(row) {
2425
+ row.forEach(function(cell) {
2426
+ cell.mergeTableOptions(this.options, cells);
2427
+ }, this);
2428
+ }, this);
2429
+ tableLayout.computeWidths(this.options.colWidths, cells);
2430
+ tableLayout.computeHeights(this.options.rowHeights, cells);
2431
+ cells.forEach(function(row) {
2432
+ row.forEach(function(cell) {
2433
+ cell.init(this.options);
2434
+ }, this);
2435
+ }, this);
2436
+ let result = [];
2437
+ for (let rowIndex = 0;rowIndex < cells.length; rowIndex++) {
2438
+ let row = cells[rowIndex];
2439
+ let heightOfRow = this.options.rowHeights[rowIndex];
2440
+ if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
2441
+ doDraw(row, "top", result);
2442
+ }
2443
+ for (let lineNum = 0;lineNum < heightOfRow; lineNum++) {
2444
+ doDraw(row, lineNum, result);
2445
+ }
2446
+ if (rowIndex + 1 == cells.length) {
2447
+ doDraw(row, "bottom", result);
2448
+ }
2449
+ }
2450
+ return result.join(`
2451
+ `);
2452
+ }
2453
+ get width() {
2454
+ let str = this.toString().split(`
2455
+ `);
2456
+ return str[0].length;
2457
+ }
2458
+ }
2459
+ Table.reset = () => debug.reset();
2460
+ function doDraw(row, lineNum, result) {
2461
+ let line = [];
2462
+ row.forEach(function(cell) {
2463
+ line.push(cell.draw(lineNum));
2464
+ });
2465
+ let str = line.join("");
2466
+ if (str.length)
2467
+ result.push(str);
2468
+ }
2469
+ module.exports = Table;
2470
+ });
2471
+
2472
+ // node_modules/picocolors/picocolors.js
2473
+ var require_picocolors = __commonJS((exports, module) => {
2474
+ var p = process || {};
2475
+ var argv2 = p.argv || [];
2476
+ var env2 = p.env || {};
2477
+ var 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);
2478
+ var formatter = (open, close, replace = open) => (input) => {
2479
+ let string = "" + input, index = string.indexOf(close, open.length);
2480
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
2481
+ };
2482
+ var replaceClose2 = (string, close, replace, index) => {
2483
+ let result = "", cursor = 0;
2484
+ do {
2485
+ result += string.substring(cursor, index) + replace;
2486
+ cursor = index + close.length;
2487
+ index = string.indexOf(close, cursor);
2488
+ } while (~index);
2489
+ return result + string.substring(cursor);
2490
+ };
2491
+ var createColors2 = (enabled = isColorSupported2) => {
2492
+ let f4 = enabled ? formatter : () => String;
2493
+ return {
2494
+ isColorSupported: enabled,
2495
+ reset: f4("\x1B[0m", "\x1B[0m"),
2496
+ bold: f4("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
2497
+ dim: f4("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
2498
+ italic: f4("\x1B[3m", "\x1B[23m"),
2499
+ underline: f4("\x1B[4m", "\x1B[24m"),
2500
+ inverse: f4("\x1B[7m", "\x1B[27m"),
2501
+ hidden: f4("\x1B[8m", "\x1B[28m"),
2502
+ strikethrough: f4("\x1B[9m", "\x1B[29m"),
2503
+ black: f4("\x1B[30m", "\x1B[39m"),
2504
+ red: f4("\x1B[31m", "\x1B[39m"),
2505
+ green: f4("\x1B[32m", "\x1B[39m"),
2506
+ yellow: f4("\x1B[33m", "\x1B[39m"),
2507
+ blue: f4("\x1B[34m", "\x1B[39m"),
2508
+ magenta: f4("\x1B[35m", "\x1B[39m"),
2509
+ cyan: f4("\x1B[36m", "\x1B[39m"),
2510
+ white: f4("\x1B[37m", "\x1B[39m"),
2511
+ gray: f4("\x1B[90m", "\x1B[39m"),
2512
+ bgBlack: f4("\x1B[40m", "\x1B[49m"),
2513
+ bgRed: f4("\x1B[41m", "\x1B[49m"),
2514
+ bgGreen: f4("\x1B[42m", "\x1B[49m"),
2515
+ bgYellow: f4("\x1B[43m", "\x1B[49m"),
2516
+ bgBlue: f4("\x1B[44m", "\x1B[49m"),
2517
+ bgMagenta: f4("\x1B[45m", "\x1B[49m"),
2518
+ bgCyan: f4("\x1B[46m", "\x1B[49m"),
2519
+ bgWhite: f4("\x1B[47m", "\x1B[49m"),
2520
+ blackBright: f4("\x1B[90m", "\x1B[39m"),
2521
+ redBright: f4("\x1B[91m", "\x1B[39m"),
2522
+ greenBright: f4("\x1B[92m", "\x1B[39m"),
2523
+ yellowBright: f4("\x1B[93m", "\x1B[39m"),
2524
+ blueBright: f4("\x1B[94m", "\x1B[39m"),
2525
+ magentaBright: f4("\x1B[95m", "\x1B[39m"),
2526
+ cyanBright: f4("\x1B[96m", "\x1B[39m"),
2527
+ whiteBright: f4("\x1B[97m", "\x1B[39m"),
2528
+ bgBlackBright: f4("\x1B[100m", "\x1B[49m"),
2529
+ bgRedBright: f4("\x1B[101m", "\x1B[49m"),
2530
+ bgGreenBright: f4("\x1B[102m", "\x1B[49m"),
2531
+ bgYellowBright: f4("\x1B[103m", "\x1B[49m"),
2532
+ bgBlueBright: f4("\x1B[104m", "\x1B[49m"),
2533
+ bgMagentaBright: f4("\x1B[105m", "\x1B[49m"),
2534
+ bgCyanBright: f4("\x1B[106m", "\x1B[49m"),
2535
+ bgWhiteBright: f4("\x1B[107m", "\x1B[49m")
2536
+ };
2537
+ };
2538
+ module.exports = createColors2();
2539
+ module.exports.createColors = createColors2;
2540
+ });
2541
+
2542
+ // node_modules/cac/dist/index.js
2543
+ function toArr(any) {
2544
+ return any == null ? [] : Array.isArray(any) ? any : [any];
2545
+ }
2546
+ function toVal(out, key, val, opts) {
2547
+ var x, old = out[key], nxt = ~opts.string.indexOf(key) ? val == null || val === true ? "" : String(val) : typeof val === "boolean" ? val : ~opts.boolean.indexOf(key) ? val === "false" ? false : val === "true" || (out._.push((x = +val, x * 0 === 0) ? x : val), !!val) : (x = +val, x * 0 === 0) ? x : val;
2548
+ out[key] = old == null ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];
2549
+ }
2550
+ function lib_default(args, opts) {
2551
+ args = args || [];
2552
+ opts = opts || {};
2553
+ var k, arr, arg, name, val, out = { _: [] };
2554
+ var i = 0, j = 0, idx = 0, len = args.length;
2555
+ const alibi = opts.alias !== undefined;
2556
+ const strict = opts.unknown !== undefined;
2557
+ const defaults = opts.default !== undefined;
2558
+ opts.alias = opts.alias || {};
2559
+ opts.string = toArr(opts.string);
2560
+ opts.boolean = toArr(opts.boolean);
2561
+ if (alibi)
2562
+ for (k in opts.alias) {
2563
+ arr = opts.alias[k] = toArr(opts.alias[k]);
2564
+ for (i = 0;i < arr.length; i++)
2565
+ (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);
2566
+ }
2567
+ for (i = opts.boolean.length;i-- > 0; ) {
2568
+ arr = opts.alias[opts.boolean[i]] || [];
2569
+ for (j = arr.length;j-- > 0; )
2570
+ opts.boolean.push(arr[j]);
2571
+ }
2572
+ for (i = opts.string.length;i-- > 0; ) {
2573
+ arr = opts.alias[opts.string[i]] || [];
2574
+ for (j = arr.length;j-- > 0; )
2575
+ opts.string.push(arr[j]);
2576
+ }
2577
+ if (defaults)
2578
+ for (k in opts.default) {
2579
+ name = typeof opts.default[k];
2580
+ arr = opts.alias[k] = opts.alias[k] || [];
2581
+ if (opts[name] !== undefined) {
2582
+ opts[name].push(k);
2583
+ for (i = 0;i < arr.length; i++)
2584
+ opts[name].push(arr[i]);
2585
+ }
2586
+ }
2587
+ const keys = strict ? Object.keys(opts.alias) : [];
2588
+ for (i = 0;i < len; i++) {
2589
+ arg = args[i];
2590
+ if (arg === "--") {
2591
+ out._ = out._.concat(args.slice(++i));
2592
+ break;
2593
+ }
2594
+ for (j = 0;j < arg.length; j++)
2595
+ if (arg.charCodeAt(j) !== 45)
2596
+ break;
2597
+ if (j === 0)
2598
+ out._.push(arg);
2599
+ else if (arg.substring(j, j + 3) === "no-") {
2600
+ name = arg.substring(j + 3);
2601
+ if (strict && !~keys.indexOf(name))
2602
+ return opts.unknown(arg);
2603
+ out[name] = false;
2604
+ } else {
2605
+ for (idx = j + 1;idx < arg.length; idx++)
2606
+ if (arg.charCodeAt(idx) === 61)
2607
+ break;
2608
+ name = arg.substring(j, idx);
2609
+ val = arg.substring(++idx) || i + 1 === len || ("" + args[i + 1]).charCodeAt(0) === 45 || args[++i];
2610
+ arr = j === 2 ? [name] : name;
2611
+ for (idx = 0;idx < arr.length; idx++) {
2612
+ name = arr[idx];
2613
+ if (strict && !~keys.indexOf(name))
2614
+ return opts.unknown("-".repeat(j) + name);
2615
+ toVal(out, name, idx + 1 < arr.length || val, opts);
2616
+ }
2617
+ }
2618
+ }
2619
+ if (defaults) {
2620
+ for (k in opts.default)
2621
+ if (out[k] === undefined)
2622
+ out[k] = opts.default[k];
2623
+ }
2624
+ if (alibi)
2625
+ for (k in out) {
2626
+ arr = opts.alias[k] || [];
2627
+ while (arr.length > 0)
2628
+ out[arr.shift()] = out[k];
2629
+ }
2630
+ return out;
2631
+ }
2632
+ function removeBrackets(v) {
2633
+ return v.replace(/[<[].+/, "").trim();
2634
+ }
2635
+ function findAllBrackets(v) {
2636
+ const ANGLED_BRACKET_RE_GLOBAL = /<([^>]+)>/g;
2637
+ const SQUARE_BRACKET_RE_GLOBAL = /\[([^\]]+)\]/g;
2638
+ const res = [];
2639
+ const parse = (match) => {
2640
+ let variadic = false;
2641
+ let value = match[1];
2642
+ if (value.startsWith("...")) {
2643
+ value = value.slice(3);
2644
+ variadic = true;
2645
+ }
2646
+ return {
2647
+ required: match[0].startsWith("<"),
2648
+ value,
2649
+ variadic
2650
+ };
2651
+ };
2652
+ let angledMatch;
2653
+ while (angledMatch = ANGLED_BRACKET_RE_GLOBAL.exec(v))
2654
+ res.push(parse(angledMatch));
2655
+ let squareMatch;
2656
+ while (squareMatch = SQUARE_BRACKET_RE_GLOBAL.exec(v))
2657
+ res.push(parse(squareMatch));
2658
+ return res;
2659
+ }
2660
+ function getMriOptions(options) {
2661
+ const result = {
2662
+ alias: {},
2663
+ boolean: []
2664
+ };
2665
+ for (const [index, option] of options.entries()) {
2666
+ if (option.names.length > 1)
2667
+ result.alias[option.names[0]] = option.names.slice(1);
2668
+ if (option.isBoolean)
2669
+ if (option.negated) {
2670
+ if (!options.some((o, i) => {
2671
+ return i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === "boolean";
2672
+ }))
2673
+ result.boolean.push(option.names[0]);
2674
+ } else
2675
+ result.boolean.push(option.names[0]);
2676
+ }
2677
+ return result;
2678
+ }
2679
+ function findLongest(arr) {
2680
+ return arr.sort((a, b) => {
2681
+ return a.length > b.length ? -1 : 1;
2682
+ })[0];
2683
+ }
2684
+ function padRight(str, length) {
2685
+ return str.length >= length ? str : `${str}${" ".repeat(length - str.length)}`;
2686
+ }
2687
+ function camelcase(input) {
2688
+ return input.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2) => {
2689
+ return p1 + p2.toUpperCase();
2690
+ });
2691
+ }
2692
+ function setDotProp(obj, keys, val) {
2693
+ let current = obj;
2694
+ for (let i = 0;i < keys.length; i++) {
2695
+ const key = keys[i];
2696
+ if (i === keys.length - 1) {
2697
+ current[key] = val;
2698
+ return;
2699
+ }
2700
+ if (current[key] == null) {
2701
+ const nextKeyIsArrayIndex = +keys[i + 1] > -1;
2702
+ current[key] = nextKeyIsArrayIndex ? [] : {};
2703
+ }
2704
+ current = current[key];
2705
+ }
2706
+ }
2707
+ function setByType(obj, transforms) {
2708
+ for (const key of Object.keys(transforms)) {
2709
+ const transform = transforms[key];
2710
+ if (transform.shouldTransform) {
2711
+ obj[key] = [obj[key]].flat();
2712
+ if (typeof transform.transformFunction === "function")
2713
+ obj[key] = obj[key].map(transform.transformFunction);
2714
+ }
2715
+ }
2716
+ }
2717
+ function getFileName(input) {
2718
+ const m = /([^\\/]+)$/.exec(input);
2719
+ return m ? m[1] : "";
2720
+ }
2721
+ function camelcaseOptionName(name) {
2722
+ return name.split(".").map((v, i) => {
2723
+ return i === 0 ? camelcase(v) : v;
2724
+ }).join(".");
2725
+ }
2726
+ var CACError = class extends Error {
2727
+ constructor(message) {
2728
+ super(message);
2729
+ this.name = "CACError";
2730
+ if (typeof Error.captureStackTrace !== "function")
2731
+ this.stack = new Error(message).stack;
2732
+ }
2733
+ };
2734
+ var Option = class {
2735
+ rawName;
2736
+ description;
2737
+ name;
2738
+ names;
2739
+ isBoolean;
2740
+ required;
2741
+ config;
2742
+ negated;
2743
+ constructor(rawName, description, config) {
2744
+ this.rawName = rawName;
2745
+ this.description = description;
2746
+ this.config = Object.assign({}, config);
2747
+ rawName = rawName.replaceAll(".*", "");
2748
+ this.negated = false;
2749
+ this.names = removeBrackets(rawName).split(",").map((v) => {
2750
+ let name = v.trim().replace(/^-{1,2}/, "");
2751
+ if (name.startsWith("no-")) {
2752
+ this.negated = true;
2753
+ name = name.replace(/^no-/, "");
2754
+ }
2755
+ return camelcaseOptionName(name);
2756
+ }).sort((a, b) => a.length > b.length ? 1 : -1);
2757
+ this.name = this.names.at(-1);
2758
+ if (this.negated && this.config.default == null)
2759
+ this.config.default = true;
2760
+ if (rawName.includes("<"))
2761
+ this.required = true;
2762
+ else if (rawName.includes("["))
2763
+ this.required = false;
2764
+ else
2765
+ this.isBoolean = true;
2766
+ }
2767
+ };
2768
+ var runtimeProcessArgs;
2769
+ var runtimeInfo;
2770
+ if (typeof process !== "undefined") {
2771
+ let runtimeName;
2772
+ if (typeof Deno !== "undefined" && typeof Deno.version?.deno === "string")
2773
+ runtimeName = "deno";
2774
+ else if (typeof Bun !== "undefined" && typeof Bun.version === "string")
2775
+ runtimeName = "bun";
2776
+ else
2777
+ runtimeName = "node";
2778
+ runtimeInfo = `${process.platform}-${process.arch} ${runtimeName}-${process.version}`;
2779
+ runtimeProcessArgs = process.argv;
2780
+ } else if (typeof navigator === "undefined")
2781
+ runtimeInfo = `unknown`;
2782
+ else
2783
+ runtimeInfo = `${navigator.platform} ${navigator.userAgent}`;
2784
+ var Command = class {
2785
+ rawName;
2786
+ description;
2787
+ config;
2788
+ cli;
2789
+ options;
2790
+ aliasNames;
2791
+ name;
2792
+ args;
2793
+ commandAction;
2794
+ usageText;
2795
+ versionNumber;
2796
+ examples;
2797
+ helpCallback;
2798
+ globalCommand;
2799
+ constructor(rawName, description, config = {}, cli) {
2800
+ this.rawName = rawName;
2801
+ this.description = description;
2802
+ this.config = config;
2803
+ this.cli = cli;
2804
+ this.options = [];
2805
+ this.aliasNames = [];
2806
+ this.name = removeBrackets(rawName);
2807
+ this.args = findAllBrackets(rawName);
2808
+ this.examples = [];
2809
+ }
2810
+ usage(text) {
2811
+ this.usageText = text;
2812
+ return this;
2813
+ }
2814
+ allowUnknownOptions() {
2815
+ this.config.allowUnknownOptions = true;
2816
+ return this;
2817
+ }
2818
+ ignoreOptionDefaultValue() {
2819
+ this.config.ignoreOptionDefaultValue = true;
2820
+ return this;
2821
+ }
2822
+ version(version, customFlags = "-v, --version") {
2823
+ this.versionNumber = version;
2824
+ this.option(customFlags, "Display version number");
2825
+ return this;
2826
+ }
2827
+ example(example) {
2828
+ this.examples.push(example);
2829
+ return this;
2830
+ }
2831
+ option(rawName, description, config) {
2832
+ const option = new Option(rawName, description, config);
2833
+ this.options.push(option);
2834
+ return this;
2835
+ }
2836
+ alias(name) {
2837
+ this.aliasNames.push(name);
2838
+ return this;
2839
+ }
2840
+ action(callback) {
2841
+ this.commandAction = callback;
2842
+ return this;
2843
+ }
2844
+ isMatched(name) {
2845
+ return this.name === name || this.aliasNames.includes(name);
2846
+ }
2847
+ get isDefaultCommand() {
2848
+ return this.name === "" || this.aliasNames.includes("!");
2849
+ }
2850
+ get isGlobalCommand() {
2851
+ return this instanceof GlobalCommand;
2852
+ }
2853
+ hasOption(name) {
2854
+ name = name.split(".")[0];
2855
+ return this.options.find((option) => {
2856
+ return option.names.includes(name);
2857
+ });
2858
+ }
2859
+ outputHelp() {
2860
+ const { name, commands } = this.cli;
2861
+ const { versionNumber, options: globalOptions, helpCallback } = this.cli.globalCommand;
2862
+ let sections = [{ body: `${name}${versionNumber ? `/${versionNumber}` : ""}` }];
2863
+ sections.push({
2864
+ title: "Usage",
2865
+ body: ` $ ${name} ${this.usageText || this.rawName}`
2866
+ });
2867
+ if ((this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0) {
2868
+ const longestCommandName = findLongest(commands.map((command) => command.rawName));
2869
+ sections.push({
2870
+ title: "Commands",
2871
+ body: commands.map((command) => {
2872
+ return ` ${padRight(command.rawName, longestCommandName.length)} ${command.description}`;
2873
+ }).join(`
2874
+ `)
2875
+ }, {
2876
+ title: `For more info, run any command with the \`--help\` flag`,
2877
+ body: commands.map((command) => ` $ ${name}${command.name === "" ? "" : ` ${command.name}`} --help`).join(`
2878
+ `)
2879
+ });
2880
+ }
2881
+ let options = this.isGlobalCommand ? globalOptions : [...this.options, ...globalOptions || []];
2882
+ if (!this.isGlobalCommand && !this.isDefaultCommand)
2883
+ options = options.filter((option) => option.name !== "version");
2884
+ if (options.length > 0) {
2885
+ const longestOptionName = findLongest(options.map((option) => option.rawName));
2886
+ sections.push({
2887
+ title: "Options",
2888
+ body: options.map((option) => {
2889
+ return ` ${padRight(option.rawName, longestOptionName.length)} ${option.description} ${option.config.default === undefined ? "" : `(default: ${option.config.default})`}`;
2890
+ }).join(`
2891
+ `)
2892
+ });
2893
+ }
2894
+ if (this.examples.length > 0)
2895
+ sections.push({
2896
+ title: "Examples",
2897
+ body: this.examples.map((example) => {
2898
+ if (typeof example === "function")
2899
+ return example(name);
2900
+ return example;
2901
+ }).join(`
2902
+ `)
2903
+ });
2904
+ if (helpCallback)
2905
+ sections = helpCallback(sections) || sections;
2906
+ console.info(sections.map((section) => {
2907
+ return section.title ? `${section.title}:
2908
+ ${section.body}` : section.body;
2909
+ }).join(`
2910
+
2911
+ `));
2912
+ }
2913
+ outputVersion() {
2914
+ const { name } = this.cli;
2915
+ const { versionNumber } = this.cli.globalCommand;
2916
+ if (versionNumber)
2917
+ console.info(`${name}/${versionNumber} ${runtimeInfo}`);
2918
+ }
2919
+ checkRequiredArgs() {
2920
+ const minimalArgsCount = this.args.filter((arg) => arg.required).length;
2921
+ if (this.cli.args.length < minimalArgsCount)
2922
+ throw new CACError(`missing required args for command \`${this.rawName}\``);
2923
+ }
2924
+ checkUnknownOptions() {
2925
+ const { options, globalCommand } = this.cli;
2926
+ if (!this.config.allowUnknownOptions) {
2927
+ for (const name of Object.keys(options))
2928
+ if (name !== "--" && !this.hasOption(name) && !globalCommand.hasOption(name))
2929
+ throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
2930
+ }
2931
+ }
2932
+ checkOptionValue() {
2933
+ const { options: parsedOptions, globalCommand } = this.cli;
2934
+ const options = [...globalCommand.options, ...this.options];
2935
+ for (const option of options) {
2936
+ const value = parsedOptions[option.name.split(".")[0]];
2937
+ if (option.required) {
2938
+ const hasNegated = options.some((o) => o.negated && o.names.includes(option.name));
2939
+ if (value === true || value === false && !hasNegated)
2940
+ throw new CACError(`option \`${option.rawName}\` value is missing`);
2941
+ }
2942
+ }
2943
+ }
2944
+ checkUnusedArgs() {
2945
+ const maximumArgsCount = this.args.some((arg) => arg.variadic) ? Infinity : this.args.length;
2946
+ if (maximumArgsCount < this.cli.args.length)
2947
+ throw new CACError(`Unused args: ${this.cli.args.slice(maximumArgsCount).map((arg) => `\`${arg}\``).join(", ")}`);
2948
+ }
2949
+ };
2950
+ var GlobalCommand = class extends Command {
2951
+ constructor(cli) {
2952
+ super("@@global@@", "", {}, cli);
2953
+ }
2954
+ };
2955
+ var CAC = class extends EventTarget {
2956
+ name;
2957
+ commands;
2958
+ globalCommand;
2959
+ matchedCommand;
2960
+ matchedCommandName;
2961
+ rawArgs;
2962
+ args;
2963
+ options;
2964
+ showHelpOnExit;
2965
+ showVersionOnExit;
2966
+ constructor(name = "") {
2967
+ super();
2968
+ this.name = name;
2969
+ this.commands = [];
2970
+ this.rawArgs = [];
2971
+ this.args = [];
2972
+ this.options = {};
2973
+ this.globalCommand = new GlobalCommand(this);
2974
+ this.globalCommand.usage("<command> [options]");
2975
+ }
2976
+ usage(text) {
2977
+ this.globalCommand.usage(text);
2978
+ return this;
2979
+ }
2980
+ command(rawName, description, config) {
2981
+ const command = new Command(rawName, description || "", config, this);
2982
+ command.globalCommand = this.globalCommand;
2983
+ this.commands.push(command);
2984
+ return command;
2985
+ }
2986
+ option(rawName, description, config) {
2987
+ this.globalCommand.option(rawName, description, config);
2988
+ return this;
2989
+ }
2990
+ help(callback) {
2991
+ this.globalCommand.option("-h, --help", "Display this message");
2992
+ this.globalCommand.helpCallback = callback;
2993
+ this.showHelpOnExit = true;
2994
+ return this;
2995
+ }
2996
+ version(version, customFlags = "-v, --version") {
2997
+ this.globalCommand.version(version, customFlags);
2998
+ this.showVersionOnExit = true;
2999
+ return this;
3000
+ }
3001
+ example(example) {
3002
+ this.globalCommand.example(example);
3003
+ return this;
3004
+ }
3005
+ outputHelp() {
3006
+ if (this.matchedCommand)
3007
+ this.matchedCommand.outputHelp();
3008
+ else
3009
+ this.globalCommand.outputHelp();
3010
+ }
3011
+ outputVersion() {
3012
+ this.globalCommand.outputVersion();
3013
+ }
3014
+ setParsedInfo({ args, options }, matchedCommand, matchedCommandName) {
3015
+ this.args = args;
3016
+ this.options = options;
3017
+ if (matchedCommand)
3018
+ this.matchedCommand = matchedCommand;
3019
+ if (matchedCommandName)
3020
+ this.matchedCommandName = matchedCommandName;
3021
+ return this;
3022
+ }
3023
+ unsetMatchedCommand() {
3024
+ this.matchedCommand = undefined;
3025
+ this.matchedCommandName = undefined;
3026
+ }
3027
+ parse(argv, { run = true } = {}) {
3028
+ if (!argv) {
3029
+ if (!runtimeProcessArgs)
3030
+ throw new Error("No argv provided and runtime process argv is not available.");
3031
+ argv = runtimeProcessArgs;
3032
+ }
3033
+ this.rawArgs = argv;
3034
+ if (!this.name)
3035
+ this.name = argv[1] ? getFileName(argv[1]) : "cli";
3036
+ let shouldParse = true;
3037
+ for (const command of this.commands) {
3038
+ const parsed = this.mri(argv.slice(2), command);
3039
+ const commandName = parsed.args[0];
3040
+ if (command.isMatched(commandName)) {
3041
+ shouldParse = false;
3042
+ const parsedInfo = {
3043
+ ...parsed,
3044
+ args: parsed.args.slice(1)
3045
+ };
3046
+ this.setParsedInfo(parsedInfo, command, commandName);
3047
+ this.dispatchEvent(new CustomEvent(`command:${commandName}`, { detail: command }));
3048
+ }
3049
+ }
3050
+ if (shouldParse) {
3051
+ for (const command of this.commands)
3052
+ if (command.isDefaultCommand) {
3053
+ shouldParse = false;
3054
+ const parsed = this.mri(argv.slice(2), command);
3055
+ this.setParsedInfo(parsed, command);
3056
+ this.dispatchEvent(new CustomEvent("command:!", { detail: command }));
3057
+ }
3058
+ }
3059
+ if (shouldParse) {
3060
+ const parsed = this.mri(argv.slice(2));
3061
+ this.setParsedInfo(parsed);
3062
+ }
3063
+ if (this.options.help && this.showHelpOnExit) {
3064
+ this.outputHelp();
3065
+ run = false;
3066
+ this.unsetMatchedCommand();
3067
+ }
3068
+ if (this.options.version && this.showVersionOnExit && this.matchedCommandName == null) {
3069
+ this.outputVersion();
3070
+ run = false;
3071
+ this.unsetMatchedCommand();
3072
+ }
3073
+ const parsedArgv = {
3074
+ args: this.args,
3075
+ options: this.options
3076
+ };
3077
+ if (run)
3078
+ this.runMatchedCommand();
3079
+ if (!this.matchedCommand && this.args[0])
3080
+ this.dispatchEvent(new CustomEvent("command:*", { detail: this.args[0] }));
3081
+ return parsedArgv;
3082
+ }
3083
+ mri(argv, command) {
3084
+ const cliOptions = [...this.globalCommand.options, ...command ? command.options : []];
3085
+ const mriOptions = getMriOptions(cliOptions);
3086
+ let argsAfterDoubleDashes = [];
3087
+ const doubleDashesIndex = argv.indexOf("--");
3088
+ if (doubleDashesIndex !== -1) {
3089
+ argsAfterDoubleDashes = argv.slice(doubleDashesIndex + 1);
3090
+ argv = argv.slice(0, doubleDashesIndex);
3091
+ }
3092
+ let parsed = lib_default(argv, mriOptions);
3093
+ parsed = Object.keys(parsed).reduce((res, name) => {
3094
+ return {
3095
+ ...res,
3096
+ [camelcaseOptionName(name)]: parsed[name]
3097
+ };
3098
+ }, { _: [] });
3099
+ const args = parsed._;
3100
+ const options = { "--": argsAfterDoubleDashes };
3101
+ const ignoreDefault = command && command.config.ignoreOptionDefaultValue ? command.config.ignoreOptionDefaultValue : this.globalCommand.config.ignoreOptionDefaultValue;
3102
+ const transforms = Object.create(null);
3103
+ for (const cliOption of cliOptions) {
3104
+ if (!ignoreDefault && cliOption.config.default !== undefined)
3105
+ for (const name of cliOption.names)
3106
+ options[name] = cliOption.config.default;
3107
+ if (Array.isArray(cliOption.config.type) && transforms[cliOption.name] === undefined) {
3108
+ transforms[cliOption.name] = Object.create(null);
3109
+ transforms[cliOption.name].shouldTransform = true;
3110
+ transforms[cliOption.name].transformFunction = cliOption.config.type[0];
3111
+ }
3112
+ }
3113
+ for (const key of Object.keys(parsed))
3114
+ if (key !== "_") {
3115
+ setDotProp(options, key.split("."), parsed[key]);
3116
+ setByType(options, transforms);
3117
+ }
3118
+ return {
3119
+ args,
3120
+ options
3121
+ };
3122
+ }
3123
+ runMatchedCommand() {
3124
+ const { args, options, matchedCommand: command } = this;
3125
+ if (!command || !command.commandAction)
3126
+ return;
3127
+ command.checkUnknownOptions();
3128
+ command.checkOptionValue();
3129
+ command.checkRequiredArgs();
3130
+ command.checkUnusedArgs();
3131
+ const actionArgs = [];
3132
+ command.args.forEach((arg, index) => {
3133
+ if (arg.variadic)
3134
+ actionArgs.push(args.slice(index));
3135
+ else
3136
+ actionArgs.push(args[index]);
3137
+ });
3138
+ actionArgs.push(options);
3139
+ return command.commandAction.apply(this, actionArgs);
3140
+ }
3141
+ };
3142
+ var cac = (name = "") => new CAC(name);
3143
+
3144
+ // node_modules/consola/dist/core.mjs
3145
+ var LogLevels = {
3146
+ silent: Number.NEGATIVE_INFINITY,
3147
+ fatal: 0,
3148
+ error: 0,
3149
+ warn: 1,
3150
+ log: 2,
3151
+ info: 3,
3152
+ success: 3,
3153
+ fail: 3,
3154
+ ready: 3,
3155
+ start: 3,
3156
+ box: 3,
3157
+ debug: 4,
3158
+ trace: 5,
3159
+ verbose: Number.POSITIVE_INFINITY
3160
+ };
3161
+ var LogTypes = {
3162
+ silent: {
3163
+ level: -1
3164
+ },
3165
+ fatal: {
3166
+ level: LogLevels.fatal
3167
+ },
3168
+ error: {
3169
+ level: LogLevels.error
3170
+ },
3171
+ warn: {
3172
+ level: LogLevels.warn
3173
+ },
3174
+ log: {
3175
+ level: LogLevels.log
3176
+ },
3177
+ info: {
3178
+ level: LogLevels.info
3179
+ },
3180
+ success: {
3181
+ level: LogLevels.success
3182
+ },
3183
+ fail: {
3184
+ level: LogLevels.fail
3185
+ },
3186
+ ready: {
3187
+ level: LogLevels.info
3188
+ },
3189
+ start: {
3190
+ level: LogLevels.info
3191
+ },
3192
+ box: {
3193
+ level: LogLevels.info
3194
+ },
3195
+ debug: {
3196
+ level: LogLevels.debug
3197
+ },
3198
+ trace: {
3199
+ level: LogLevels.trace
3200
+ },
3201
+ verbose: {
3202
+ level: LogLevels.verbose
3203
+ }
3204
+ };
3205
+ function isPlainObject$1(value) {
3206
+ if (value === null || typeof value !== "object") {
3207
+ return false;
3208
+ }
3209
+ const prototype = Object.getPrototypeOf(value);
3210
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
3211
+ return false;
3212
+ }
3213
+ if (Symbol.iterator in value) {
3214
+ return false;
3215
+ }
3216
+ if (Symbol.toStringTag in value) {
3217
+ return Object.prototype.toString.call(value) === "[object Module]";
3218
+ }
3219
+ return true;
3220
+ }
3221
+ function _defu(baseObject, defaults, namespace = ".", merger) {
3222
+ if (!isPlainObject$1(defaults)) {
3223
+ return _defu(baseObject, {}, namespace, merger);
3224
+ }
3225
+ const object = Object.assign({}, defaults);
3226
+ for (const key in baseObject) {
3227
+ if (key === "__proto__" || key === "constructor") {
3228
+ continue;
3229
+ }
3230
+ const value = baseObject[key];
3231
+ if (value === null || value === undefined) {
3232
+ continue;
3233
+ }
3234
+ if (merger && merger(object, key, value, namespace)) {
3235
+ continue;
3236
+ }
3237
+ if (Array.isArray(value) && Array.isArray(object[key])) {
3238
+ object[key] = [...value, ...object[key]];
3239
+ } else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
3240
+ object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
3241
+ } else {
3242
+ object[key] = value;
3243
+ }
3244
+ }
3245
+ return object;
3246
+ }
3247
+ function createDefu(merger) {
3248
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
3249
+ }
3250
+ var defu = createDefu();
3251
+ function isPlainObject(obj) {
3252
+ return Object.prototype.toString.call(obj) === "[object Object]";
3253
+ }
3254
+ function isLogObj(arg) {
3255
+ if (!isPlainObject(arg)) {
3256
+ return false;
3257
+ }
3258
+ if (!arg.message && !arg.args) {
3259
+ return false;
3260
+ }
3261
+ if (arg.stack) {
3262
+ return false;
3263
+ }
3264
+ return true;
3265
+ }
3266
+ var paused = false;
3267
+ var queue = [];
3268
+
3269
+ class Consola {
3270
+ options;
3271
+ _lastLog;
3272
+ _mockFn;
3273
+ constructor(options = {}) {
3274
+ const types = options.types || LogTypes;
3275
+ this.options = defu({
3276
+ ...options,
3277
+ defaults: { ...options.defaults },
3278
+ level: _normalizeLogLevel(options.level, types),
3279
+ reporters: [...options.reporters || []]
3280
+ }, {
3281
+ types: LogTypes,
3282
+ throttle: 1000,
3283
+ throttleMin: 5,
3284
+ formatOptions: {
3285
+ date: true,
3286
+ colors: false,
3287
+ compact: true
3288
+ }
3289
+ });
3290
+ for (const type in types) {
3291
+ const defaults = {
3292
+ type,
3293
+ ...this.options.defaults,
3294
+ ...types[type]
3295
+ };
3296
+ this[type] = this._wrapLogFn(defaults);
3297
+ this[type].raw = this._wrapLogFn(defaults, true);
3298
+ }
3299
+ if (this.options.mockFn) {
3300
+ this.mockTypes();
3301
+ }
3302
+ this._lastLog = {};
3303
+ }
3304
+ get level() {
3305
+ return this.options.level;
3306
+ }
3307
+ set level(level) {
3308
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
3309
+ }
3310
+ prompt(message, opts) {
3311
+ if (!this.options.prompt) {
3312
+ throw new Error("prompt is not supported!");
3313
+ }
3314
+ return this.options.prompt(message, opts);
3315
+ }
3316
+ create(options) {
3317
+ const instance = new Consola({
3318
+ ...this.options,
3319
+ ...options
3320
+ });
3321
+ if (this._mockFn) {
3322
+ instance.mockTypes(this._mockFn);
3323
+ }
3324
+ return instance;
3325
+ }
3326
+ withDefaults(defaults) {
3327
+ return this.create({
3328
+ ...this.options,
3329
+ defaults: {
3330
+ ...this.options.defaults,
3331
+ ...defaults
3332
+ }
3333
+ });
3334
+ }
3335
+ withTag(tag) {
3336
+ return this.withDefaults({
3337
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
3338
+ });
3339
+ }
3340
+ addReporter(reporter) {
3341
+ this.options.reporters.push(reporter);
3342
+ return this;
3343
+ }
3344
+ removeReporter(reporter) {
3345
+ if (reporter) {
3346
+ const i = this.options.reporters.indexOf(reporter);
3347
+ if (i !== -1) {
3348
+ return this.options.reporters.splice(i, 1);
3349
+ }
3350
+ } else {
3351
+ this.options.reporters.splice(0);
3352
+ }
3353
+ return this;
3354
+ }
3355
+ setReporters(reporters) {
3356
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
3357
+ return this;
3358
+ }
3359
+ wrapAll() {
3360
+ this.wrapConsole();
3361
+ this.wrapStd();
3362
+ }
3363
+ restoreAll() {
3364
+ this.restoreConsole();
3365
+ this.restoreStd();
3366
+ }
3367
+ wrapConsole() {
3368
+ for (const type in this.options.types) {
3369
+ if (!console["__" + type]) {
3370
+ console["__" + type] = console[type];
3371
+ }
3372
+ console[type] = this[type].raw;
3373
+ }
3374
+ }
3375
+ restoreConsole() {
3376
+ for (const type in this.options.types) {
3377
+ if (console["__" + type]) {
3378
+ console[type] = console["__" + type];
3379
+ delete console["__" + type];
3380
+ }
3381
+ }
3382
+ }
3383
+ wrapStd() {
3384
+ this._wrapStream(this.options.stdout, "log");
3385
+ this._wrapStream(this.options.stderr, "log");
3386
+ }
3387
+ _wrapStream(stream, type) {
3388
+ if (!stream) {
3389
+ return;
3390
+ }
3391
+ if (!stream.__write) {
3392
+ stream.__write = stream.write;
3393
+ }
3394
+ stream.write = (data) => {
3395
+ this[type].raw(String(data).trim());
3396
+ };
3397
+ }
3398
+ restoreStd() {
3399
+ this._restoreStream(this.options.stdout);
3400
+ this._restoreStream(this.options.stderr);
3401
+ }
3402
+ _restoreStream(stream) {
3403
+ if (!stream) {
3404
+ return;
3405
+ }
3406
+ if (stream.__write) {
3407
+ stream.write = stream.__write;
3408
+ delete stream.__write;
3409
+ }
3410
+ }
3411
+ pauseLogs() {
3412
+ paused = true;
3413
+ }
3414
+ resumeLogs() {
3415
+ paused = false;
3416
+ const _queue = queue.splice(0);
3417
+ for (const item of _queue) {
3418
+ item[0]._logFn(item[1], item[2]);
3419
+ }
3420
+ }
3421
+ mockTypes(mockFn) {
3422
+ const _mockFn = mockFn || this.options.mockFn;
3423
+ this._mockFn = _mockFn;
3424
+ if (typeof _mockFn !== "function") {
3425
+ return;
3426
+ }
3427
+ for (const type in this.options.types) {
3428
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
3429
+ this[type].raw = this[type];
3430
+ }
3431
+ }
3432
+ _wrapLogFn(defaults, isRaw) {
3433
+ return (...args) => {
3434
+ if (paused) {
3435
+ queue.push([this, defaults, args, isRaw]);
3436
+ return;
3437
+ }
3438
+ return this._logFn(defaults, args, isRaw);
3439
+ };
3440
+ }
3441
+ _logFn(defaults, args, isRaw) {
3442
+ if ((defaults.level || 0) > this.level) {
3443
+ return false;
3444
+ }
3445
+ const logObj = {
3446
+ date: /* @__PURE__ */ new Date,
3447
+ args: [],
3448
+ ...defaults,
3449
+ level: _normalizeLogLevel(defaults.level, this.options.types)
3450
+ };
3451
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
3452
+ Object.assign(logObj, args[0]);
3453
+ } else {
3454
+ logObj.args = [...args];
3455
+ }
3456
+ if (logObj.message) {
3457
+ logObj.args.unshift(logObj.message);
3458
+ delete logObj.message;
3459
+ }
3460
+ if (logObj.additional) {
3461
+ if (!Array.isArray(logObj.additional)) {
3462
+ logObj.additional = logObj.additional.split(`
3463
+ `);
3464
+ }
3465
+ logObj.args.push(`
3466
+ ` + logObj.additional.join(`
3467
+ `));
3468
+ delete logObj.additional;
3469
+ }
3470
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
3471
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
3472
+ const resolveLog = (newLog = false) => {
3473
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
3474
+ if (this._lastLog.object && repeated > 0) {
3475
+ const args2 = [...this._lastLog.object.args];
3476
+ if (repeated > 1) {
3477
+ args2.push(`(repeated ${repeated} times)`);
3478
+ }
3479
+ this._log({ ...this._lastLog.object, args: args2 });
3480
+ this._lastLog.count = 1;
3481
+ }
3482
+ if (newLog) {
3483
+ this._lastLog.object = logObj;
3484
+ this._log(logObj);
3485
+ }
3486
+ };
3487
+ clearTimeout(this._lastLog.timeout);
3488
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
3489
+ this._lastLog.time = logObj.date;
3490
+ if (diffTime < this.options.throttle) {
3491
+ try {
3492
+ const serializedLog = JSON.stringify([
3493
+ logObj.type,
3494
+ logObj.tag,
3495
+ logObj.args
3496
+ ]);
3497
+ const isSameLog = this._lastLog.serialized === serializedLog;
3498
+ this._lastLog.serialized = serializedLog;
3499
+ if (isSameLog) {
3500
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
3501
+ if (this._lastLog.count > this.options.throttleMin) {
3502
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
3503
+ return;
3504
+ }
3505
+ }
3506
+ } catch {}
3507
+ }
3508
+ resolveLog(true);
3509
+ }
3510
+ _log(logObj) {
3511
+ for (const reporter of this.options.reporters) {
3512
+ reporter.log(logObj, {
3513
+ options: this.options
3514
+ });
3515
+ }
3516
+ }
3517
+ }
3518
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
3519
+ if (input === undefined) {
3520
+ return defaultLevel;
3521
+ }
3522
+ if (typeof input === "number") {
3523
+ return input;
3524
+ }
3525
+ if (types[input] && types[input].level !== undefined) {
3526
+ return types[input].level;
3527
+ }
3528
+ return defaultLevel;
3529
+ }
3530
+ Consola.prototype.add = Consola.prototype.addReporter;
3531
+ Consola.prototype.remove = Consola.prototype.removeReporter;
3532
+ Consola.prototype.clear = Consola.prototype.removeReporter;
3533
+ Consola.prototype.withScope = Consola.prototype.withTag;
3534
+ Consola.prototype.mock = Consola.prototype.mockTypes;
3535
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
3536
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
3537
+ function createConsola(options = {}) {
3538
+ return new Consola(options);
3539
+ }
3540
+ // node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
3541
+ import { formatWithOptions } from "node:util";
3542
+ import { sep } from "node:path";
3543
+ function parseStack(stack, message) {
3544
+ const cwd = process.cwd() + sep;
3545
+ const lines = stack.split(`
3546
+ `).splice(message.split(`
3547
+ `).length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
3548
+ return lines;
3549
+ }
3550
+ function writeStream(data, stream) {
3551
+ const write = stream.__write || stream.write;
3552
+ return write.call(stream, data);
3553
+ }
3554
+ var bracket = (x) => x ? `[${x}]` : "";
3555
+
3556
+ class BasicReporter {
3557
+ formatStack(stack, message, opts) {
3558
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
3559
+ return indent + parseStack(stack, message).join(`
3560
+ ${indent}`);
3561
+ }
3562
+ formatError(err, opts) {
3563
+ const message = err.message ?? formatWithOptions(opts, err);
3564
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
3565
+ const level = opts?.errorLevel || 0;
3566
+ const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
3567
+ const causedError = err.cause ? `
3568
+
3569
+ ` + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
3570
+ return causedPrefix + message + `
3571
+ ` + stack + causedError;
3572
+ }
3573
+ formatArgs(args, opts) {
3574
+ const _args = args.map((arg) => {
3575
+ if (arg && typeof arg.stack === "string") {
3576
+ return this.formatError(arg, opts);
3577
+ }
3578
+ return arg;
3579
+ });
3580
+ return formatWithOptions(opts, ..._args);
3581
+ }
3582
+ formatDate(date, opts) {
3583
+ return opts.date ? date.toLocaleTimeString() : "";
3584
+ }
3585
+ filterAndJoin(arr) {
3586
+ return arr.filter(Boolean).join(" ");
3587
+ }
3588
+ formatLogObj(logObj, opts) {
3589
+ const message = this.formatArgs(logObj.args, opts);
3590
+ if (logObj.type === "box") {
3591
+ return `
3592
+ ` + [
3593
+ bracket(logObj.tag),
3594
+ logObj.title && logObj.title,
3595
+ ...message.split(`
3596
+ `)
3597
+ ].filter(Boolean).map((l) => " > " + l).join(`
3598
+ `) + `
3599
+ `;
3600
+ }
3601
+ return this.filterAndJoin([
3602
+ bracket(logObj.type),
3603
+ bracket(logObj.tag),
3604
+ message
3605
+ ]);
3606
+ }
3607
+ log(logObj, ctx) {
3608
+ const line = this.formatLogObj(logObj, {
3609
+ columns: ctx.options.stdout.columns || 0,
3610
+ ...ctx.options.formatOptions
3611
+ });
3612
+ return writeStream(line + `
3613
+ `, logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
3614
+ }
3615
+ }
3616
+
3617
+ // node_modules/consola/dist/index.mjs
3618
+ import g$1 from "node:process";
3619
+
3620
+ // node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
3621
+ import * as tty from "node:tty";
3622
+ var {
3623
+ env = {},
3624
+ argv = [],
3625
+ platform = ""
3626
+ } = typeof process === "undefined" ? {} : process;
3627
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
3628
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
3629
+ var isWindows = platform === "win32";
3630
+ var isDumbTerminal = env.TERM === "dumb";
3631
+ var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
3632
+ var isCI = "CI" in env && (("GITHUB_ACTIONS" in env) || ("GITLAB_CI" in env) || ("CIRCLECI" in env));
3633
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
3634
+ 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)) {
3635
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
3636
+ }
3637
+ function clearBleed(index, string, open, close, replace) {
3638
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
3639
+ }
3640
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
3641
+ return (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
3642
+ }
3643
+ function init(open, close, replace) {
3644
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
3645
+ }
3646
+ var colorDefs = {
3647
+ reset: init(0, 0),
3648
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
3649
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
3650
+ italic: init(3, 23),
3651
+ underline: init(4, 24),
3652
+ inverse: init(7, 27),
3653
+ hidden: init(8, 28),
3654
+ strikethrough: init(9, 29),
3655
+ black: init(30, 39),
3656
+ red: init(31, 39),
3657
+ green: init(32, 39),
3658
+ yellow: init(33, 39),
3659
+ blue: init(34, 39),
3660
+ magenta: init(35, 39),
3661
+ cyan: init(36, 39),
3662
+ white: init(37, 39),
3663
+ gray: init(90, 39),
3664
+ bgBlack: init(40, 49),
3665
+ bgRed: init(41, 49),
3666
+ bgGreen: init(42, 49),
3667
+ bgYellow: init(43, 49),
3668
+ bgBlue: init(44, 49),
3669
+ bgMagenta: init(45, 49),
3670
+ bgCyan: init(46, 49),
3671
+ bgWhite: init(47, 49),
3672
+ blackBright: init(90, 39),
3673
+ redBright: init(91, 39),
3674
+ greenBright: init(92, 39),
3675
+ yellowBright: init(93, 39),
3676
+ blueBright: init(94, 39),
3677
+ magentaBright: init(95, 39),
3678
+ cyanBright: init(96, 39),
3679
+ whiteBright: init(97, 39),
3680
+ bgBlackBright: init(100, 49),
3681
+ bgRedBright: init(101, 49),
3682
+ bgGreenBright: init(102, 49),
3683
+ bgYellowBright: init(103, 49),
3684
+ bgBlueBright: init(104, 49),
3685
+ bgMagentaBright: init(105, 49),
3686
+ bgCyanBright: init(106, 49),
3687
+ bgWhiteBright: init(107, 49)
3688
+ };
3689
+ function createColors(useColor = isColorSupported) {
3690
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
3691
+ }
3692
+ var colors = createColors();
3693
+ function getColor(color, fallback = "reset") {
3694
+ return colors[color] || colors[fallback];
3695
+ }
3696
+ var ansiRegex = [
3697
+ String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
3698
+ String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
3699
+ ].join("|");
3700
+ function stripAnsi(text) {
3701
+ return text.replace(new RegExp(ansiRegex, "g"), "");
3702
+ }
3703
+ var boxStylePresets = {
3704
+ solid: {
3705
+ tl: "┌",
3706
+ tr: "┐",
3707
+ bl: "└",
3708
+ br: "┘",
3709
+ h: "─",
3710
+ v: "│"
3711
+ },
3712
+ double: {
3713
+ tl: "╔",
3714
+ tr: "╗",
3715
+ bl: "╚",
3716
+ br: "╝",
3717
+ h: "═",
3718
+ v: "║"
3719
+ },
3720
+ doubleSingle: {
3721
+ tl: "╓",
3722
+ tr: "╖",
3723
+ bl: "╙",
3724
+ br: "╜",
3725
+ h: "─",
3726
+ v: "║"
3727
+ },
3728
+ doubleSingleRounded: {
3729
+ tl: "╭",
3730
+ tr: "╮",
3731
+ bl: "╰",
3732
+ br: "╯",
3733
+ h: "─",
3734
+ v: "║"
3735
+ },
3736
+ singleThick: {
3737
+ tl: "┏",
3738
+ tr: "┓",
3739
+ bl: "┗",
3740
+ br: "┛",
3741
+ h: "━",
3742
+ v: "┃"
3743
+ },
3744
+ singleDouble: {
3745
+ tl: "╒",
3746
+ tr: "╕",
3747
+ bl: "╘",
3748
+ br: "╛",
3749
+ h: "═",
3750
+ v: "│"
3751
+ },
3752
+ singleDoubleRounded: {
3753
+ tl: "╭",
3754
+ tr: "╮",
3755
+ bl: "╰",
3756
+ br: "╯",
3757
+ h: "═",
3758
+ v: "│"
3759
+ },
3760
+ rounded: {
3761
+ tl: "╭",
3762
+ tr: "╮",
3763
+ bl: "╰",
3764
+ br: "╯",
3765
+ h: "─",
3766
+ v: "│"
3767
+ }
3768
+ };
3769
+ var defaultStyle = {
3770
+ borderColor: "white",
3771
+ borderStyle: "rounded",
3772
+ valign: "center",
3773
+ padding: 2,
3774
+ marginLeft: 1,
3775
+ marginTop: 1,
3776
+ marginBottom: 1
3777
+ };
3778
+ function box(text, _opts = {}) {
3779
+ const opts = {
3780
+ ..._opts,
3781
+ style: {
3782
+ ...defaultStyle,
3783
+ ..._opts.style
3784
+ }
3785
+ };
3786
+ const textLines = text.split(`
3787
+ `);
3788
+ const boxLines = [];
3789
+ const _color = getColor(opts.style.borderColor);
3790
+ const borderStyle = {
3791
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
3792
+ };
3793
+ if (_color) {
3794
+ for (const key in borderStyle) {
3795
+ borderStyle[key] = _color(borderStyle[key]);
3796
+ }
3797
+ }
3798
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
3799
+ const height = textLines.length + paddingOffset;
3800
+ const width = Math.max(...textLines.map((line) => stripAnsi(line).length), opts.title ? stripAnsi(opts.title).length : 0) + paddingOffset;
3801
+ const widthOffset = width + paddingOffset;
3802
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
3803
+ if (opts.style.marginTop > 0) {
3804
+ boxLines.push("".repeat(opts.style.marginTop));
3805
+ }
3806
+ if (opts.title) {
3807
+ const title = _color ? _color(opts.title) : opts.title;
3808
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
3809
+ const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
3810
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
3811
+ } else {
3812
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
3813
+ }
3814
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
3815
+ for (let i = 0;i < height; i++) {
3816
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
3817
+ boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
3818
+ } else {
3819
+ const line = textLines[i - valignOffset];
3820
+ const left = " ".repeat(paddingOffset);
3821
+ const right = " ".repeat(width - stripAnsi(line).length);
3822
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
3823
+ }
3824
+ }
3825
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
3826
+ if (opts.style.marginBottom > 0) {
3827
+ boxLines.push("".repeat(opts.style.marginBottom));
3828
+ }
3829
+ return boxLines.join(`
3830
+ `);
3831
+ }
3832
+
3833
+ // node_modules/consola/dist/index.mjs
3834
+ var r2 = Object.create(null);
3835
+ var i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r2 : globalThis);
3836
+ var o2 = new Proxy(r2, { get(e2, s) {
3837
+ return i()[s] ?? r2[s];
3838
+ }, has(e2, s) {
3839
+ const E = i();
3840
+ return s in E || s in r2;
3841
+ }, set(e2, s, E) {
3842
+ const B2 = i(true);
3843
+ return B2[s] = E, true;
3844
+ }, deleteProperty(e2, s) {
3845
+ if (!s)
3846
+ return false;
3847
+ const E = i(true);
3848
+ return delete E[s], true;
3849
+ }, ownKeys() {
3850
+ const e2 = i(true);
3851
+ return Object.keys(e2);
3852
+ } });
3853
+ var t = typeof process < "u" && process.env && "development" || "";
3854
+ var 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 }]];
3855
+ function b() {
3856
+ if (globalThis.process?.env)
3857
+ for (const e2 of f2) {
3858
+ const s = e2[1] || e2[0];
3859
+ if (globalThis.process?.env[s])
3860
+ return { name: e2[0].toLowerCase(), ...e2[2] };
3861
+ }
3862
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
3863
+ }
3864
+ var l = b();
3865
+ l.name;
3866
+ function n(e2) {
3867
+ return e2 ? e2 !== "false" : false;
3868
+ }
3869
+ var I2 = globalThis.process?.platform || "";
3870
+ var T2 = n(o2.CI) || l.ci !== false;
3871
+ var a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
3872
+ var g2 = n(o2.DEBUG);
3873
+ var R2 = t === "test" || n(o2.TEST);
3874
+ n(o2.MINIMAL);
3875
+ var A2 = /^win/i.test(I2);
3876
+ !n(o2.NO_COLOR) && (n(o2.FORCE_COLOR) || (a || A2) && o2.TERM);
3877
+ var C2 = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
3878
+ Number(C2?.split(".")[0]);
3879
+ var y2 = globalThis.process || Object.create(null);
3880
+ var _2 = { versions: {} };
3881
+ new Proxy(y2, { get(e2, s) {
3882
+ if (s === "env")
3883
+ return o2;
3884
+ if (s in e2)
3885
+ return e2[s];
3886
+ if (s in _2)
3887
+ return _2[s];
3888
+ } });
3889
+ var c2 = globalThis.process?.release?.name === "node";
3890
+ var O2 = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
3891
+ var D = !!globalThis.Deno;
3892
+ var L2 = !!globalThis.fastly;
3893
+ var S2 = !!globalThis.Netlify;
3894
+ var u2 = !!globalThis.EdgeRuntime;
3895
+ var N2 = globalThis.navigator?.userAgent === "Cloudflare-Workers";
3896
+ var F2 = [[S2, "netlify"], [u2, "edge-light"], [N2, "workerd"], [L2, "fastly"], [D, "deno"], [O2, "bun"], [c2, "node"]];
3897
+ function G2() {
3898
+ const e2 = F2.find((s) => s[0]);
3899
+ if (e2)
3900
+ return { name: e2[1] };
3901
+ }
3902
+ var P2 = G2();
3903
+ P2?.name;
3904
+ function ansiRegex2({ onlyFirst = false } = {}) {
3905
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
3906
+ const pattern = [
3907
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
3908
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
3909
+ ].join("|");
3910
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
3911
+ }
3912
+ var regex = ansiRegex2();
3913
+ function stripAnsi2(string) {
3914
+ if (typeof string !== "string") {
3915
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
3916
+ }
3917
+ return string.replace(regex, "");
3918
+ }
3919
+ function isAmbiguous(x2) {
3920
+ 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;
3921
+ }
3922
+ function isFullWidth(x2) {
3923
+ return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
3924
+ }
3925
+ function isWide(x2) {
3926
+ 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;
3927
+ }
3928
+ function validate(codePoint) {
3929
+ if (!Number.isSafeInteger(codePoint)) {
3930
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
3931
+ }
3932
+ }
3933
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
3934
+ validate(codePoint);
3935
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
3936
+ return 2;
3937
+ }
3938
+ return 1;
3939
+ }
3940
+ var emojiRegex = () => {
3941
+ 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;
3942
+ };
3943
+ var segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter : { segment: (str) => str.split("") };
3944
+ var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
3945
+ function stringWidth$1(string, options = {}) {
3946
+ if (typeof string !== "string" || string.length === 0) {
3947
+ return 0;
3948
+ }
3949
+ const {
3950
+ ambiguousIsNarrow = true,
3951
+ countAnsiEscapeCodes = false
3952
+ } = options;
3953
+ if (!countAnsiEscapeCodes) {
3954
+ string = stripAnsi2(string);
3955
+ }
3956
+ if (string.length === 0) {
3957
+ return 0;
3958
+ }
3959
+ let width = 0;
3960
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
3961
+ for (const { segment: character } of segmenter.segment(string)) {
3962
+ const codePoint = character.codePointAt(0);
3963
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
3964
+ continue;
3965
+ }
3966
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
3967
+ continue;
3968
+ }
3969
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
3970
+ continue;
3971
+ }
3972
+ if (codePoint >= 55296 && codePoint <= 57343) {
3973
+ continue;
3974
+ }
3975
+ if (codePoint >= 65024 && codePoint <= 65039) {
3976
+ continue;
3977
+ }
3978
+ if (defaultIgnorableCodePointRegex.test(character)) {
3979
+ continue;
3980
+ }
3981
+ if (emojiRegex().test(character)) {
3982
+ width += 2;
3983
+ continue;
3984
+ }
3985
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
3986
+ }
3987
+ return width;
3988
+ }
3989
+ function isUnicodeSupported() {
3990
+ const { env: env2 } = g$1;
3991
+ const { TERM, TERM_PROGRAM } = env2;
3992
+ if (g$1.platform !== "win32") {
3993
+ return TERM !== "linux";
3994
+ }
3995
+ 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";
3996
+ }
3997
+ var TYPE_COLOR_MAP = {
3998
+ info: "cyan",
3999
+ fail: "red",
4000
+ success: "green",
4001
+ ready: "green",
4002
+ start: "magenta"
4003
+ };
4004
+ var LEVEL_COLOR_MAP = {
4005
+ 0: "red",
4006
+ 1: "yellow"
4007
+ };
4008
+ var unicode = isUnicodeSupported();
4009
+ var s = (c3, fallback) => unicode ? c3 : fallback;
4010
+ var TYPE_ICONS = {
4011
+ error: s("✖", "×"),
4012
+ fatal: s("✖", "×"),
4013
+ ready: s("✔", "√"),
4014
+ warn: s("⚠", "‼"),
4015
+ info: s("ℹ", "i"),
4016
+ success: s("✔", "√"),
4017
+ debug: s("⚙", "D"),
4018
+ trace: s("→", "→"),
4019
+ fail: s("✖", "×"),
4020
+ start: s("◐", "o"),
4021
+ log: ""
4022
+ };
4023
+ function stringWidth(str) {
4024
+ const hasICU = typeof Intl === "object";
4025
+ if (!hasICU || !Intl.Segmenter) {
4026
+ return stripAnsi(str).length;
4027
+ }
4028
+ return stringWidth$1(str);
4029
+ }
4030
+
4031
+ class FancyReporter extends BasicReporter {
4032
+ formatStack(stack, message, opts) {
4033
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
4034
+ return `
4035
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_3, m2) => `(${colors.cyan(m2)})`)).join(`
4036
+ ${indent}`);
4037
+ }
4038
+ formatType(logObj, isBadge, opts) {
4039
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
4040
+ if (isBadge) {
4041
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
4042
+ }
4043
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
4044
+ return _type ? getColor2(typeColor)(_type) : "";
4045
+ }
4046
+ formatLogObj(logObj, opts) {
4047
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(`
4048
+ `);
4049
+ if (logObj.type === "box") {
4050
+ return box(characterFormat(message + (additional.length > 0 ? `
4051
+ ` + additional.join(`
4052
+ `) : "")), {
4053
+ title: logObj.title ? characterFormat(logObj.title) : undefined,
4054
+ style: logObj.style
4055
+ });
4056
+ }
4057
+ const date = this.formatDate(logObj.date, opts);
4058
+ const coloredDate = date && colors.gray(date);
4059
+ const isBadge = logObj.badge ?? logObj.level < 2;
4060
+ const type = this.formatType(logObj, isBadge, opts);
4061
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
4062
+ let line;
4063
+ const left = this.filterAndJoin([type, characterFormat(message)]);
4064
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
4065
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
4066
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
4067
+ line += characterFormat(additional.length > 0 ? `
4068
+ ` + additional.join(`
4069
+ `) : "");
4070
+ if (logObj.type === "trace") {
4071
+ const _err = new Error("Trace: " + logObj.message);
4072
+ line += this.formatStack(_err.stack || "", _err.message);
4073
+ }
4074
+ return isBadge ? `
4075
+ ` + line + `
4076
+ ` : line;
4077
+ }
4078
+ }
4079
+ function characterFormat(str) {
4080
+ return str.replace(/`([^`]+)`/gm, (_3, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_3, m2) => ` ${colors.underline(m2)} `);
4081
+ }
4082
+ function getColor2(color = "white") {
4083
+ return colors[color] || colors.white;
4084
+ }
4085
+ function getBgColor(color = "bgWhite") {
4086
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
4087
+ }
4088
+ function createConsola2(options = {}) {
4089
+ let level = _getDefaultLogLevel();
4090
+ if (process.env.CONSOLA_LEVEL) {
4091
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
4092
+ }
4093
+ const consola2 = createConsola({
4094
+ level,
4095
+ defaults: { level },
4096
+ stdout: process.stdout,
4097
+ stderr: process.stderr,
4098
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
4099
+ reporters: options.reporters || [
4100
+ options.fancy ?? !(T2 || R2) ? new FancyReporter : new BasicReporter
4101
+ ],
4102
+ ...options
4103
+ });
4104
+ return consola2;
4105
+ }
4106
+ function _getDefaultLogLevel() {
4107
+ if (g2) {
4108
+ return LogLevels.debug;
4109
+ }
4110
+ if (R2) {
4111
+ return LogLevels.warn;
4112
+ }
4113
+ return LogLevels.info;
4114
+ }
4115
+ var consola = createConsola2();
4116
+ // node_modules/consola/dist/index.mjs
4117
+ import g$12 from "node:process";
4118
+ var r3 = Object.create(null);
4119
+ var i2 = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r3 : globalThis);
4120
+ var o3 = new Proxy(r3, { get(e2, s2) {
4121
+ return i2()[s2] ?? r3[s2];
4122
+ }, has(e2, s2) {
4123
+ const E = i2();
4124
+ return s2 in E || s2 in r3;
4125
+ }, set(e2, s2, E) {
4126
+ const B2 = i2(true);
4127
+ return B2[s2] = E, true;
4128
+ }, deleteProperty(e2, s2) {
4129
+ if (!s2)
4130
+ return false;
4131
+ const E = i2(true);
4132
+ return delete E[s2], true;
4133
+ }, ownKeys() {
4134
+ const e2 = i2(true);
4135
+ return Object.keys(e2);
4136
+ } });
4137
+ var t2 = typeof process < "u" && process.env && "development" || "";
4138
+ var f3 = [["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 }]];
4139
+ function b2() {
4140
+ if (globalThis.process?.env)
4141
+ for (const e2 of f3) {
4142
+ const s2 = e2[1] || e2[0];
4143
+ if (globalThis.process?.env[s2])
4144
+ return { name: e2[0].toLowerCase(), ...e2[2] };
4145
+ }
4146
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
4147
+ }
4148
+ var l2 = b2();
4149
+ l2.name;
4150
+ function n2(e2) {
4151
+ return e2 ? e2 !== "false" : false;
4152
+ }
4153
+ var I3 = globalThis.process?.platform || "";
4154
+ var T3 = n2(o3.CI) || l2.ci !== false;
4155
+ var a2 = n2(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
4156
+ var g3 = n2(o3.DEBUG);
4157
+ var R3 = t2 === "test" || n2(o3.TEST);
4158
+ n2(o3.MINIMAL);
4159
+ var A3 = /^win/i.test(I3);
4160
+ !n2(o3.NO_COLOR) && (n2(o3.FORCE_COLOR) || (a2 || A3) && o3.TERM);
4161
+ var C3 = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
4162
+ Number(C3?.split(".")[0]);
4163
+ var y3 = globalThis.process || Object.create(null);
4164
+ var _3 = { versions: {} };
4165
+ new Proxy(y3, { get(e2, s2) {
4166
+ if (s2 === "env")
4167
+ return o3;
4168
+ if (s2 in e2)
4169
+ return e2[s2];
4170
+ if (s2 in _3)
4171
+ return _3[s2];
4172
+ } });
4173
+ var c3 = globalThis.process?.release?.name === "node";
4174
+ var O3 = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
4175
+ var D2 = !!globalThis.Deno;
4176
+ var L3 = !!globalThis.fastly;
4177
+ var S3 = !!globalThis.Netlify;
4178
+ var u3 = !!globalThis.EdgeRuntime;
4179
+ var N3 = globalThis.navigator?.userAgent === "Cloudflare-Workers";
4180
+ var F3 = [[S3, "netlify"], [u3, "edge-light"], [N3, "workerd"], [L3, "fastly"], [D2, "deno"], [O3, "bun"], [c3, "node"]];
4181
+ function G3() {
4182
+ const e2 = F3.find((s2) => s2[0]);
4183
+ if (e2)
4184
+ return { name: e2[1] };
4185
+ }
4186
+ var P3 = G3();
4187
+ P3?.name;
4188
+ function ansiRegex3({ onlyFirst = false } = {}) {
4189
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
4190
+ const pattern = [
4191
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
4192
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
4193
+ ].join("|");
4194
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
4195
+ }
4196
+ var regex2 = ansiRegex3();
4197
+ function stripAnsi3(string) {
4198
+ if (typeof string !== "string") {
4199
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
4200
+ }
4201
+ return string.replace(regex2, "");
4202
+ }
4203
+ function isAmbiguous2(x2) {
4204
+ 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;
4205
+ }
4206
+ function isFullWidth2(x2) {
4207
+ return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
4208
+ }
4209
+ function isWide2(x2) {
4210
+ 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;
4211
+ }
4212
+ function validate2(codePoint) {
4213
+ if (!Number.isSafeInteger(codePoint)) {
4214
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
4215
+ }
4216
+ }
4217
+ function eastAsianWidth2(codePoint, { ambiguousAsWide = false } = {}) {
4218
+ validate2(codePoint);
4219
+ if (isFullWidth2(codePoint) || isWide2(codePoint) || ambiguousAsWide && isAmbiguous2(codePoint)) {
4220
+ return 2;
4221
+ }
4222
+ return 1;
4223
+ }
4224
+ var emojiRegex2 = () => {
4225
+ 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;
4226
+ };
4227
+ var segmenter2 = globalThis.Intl?.Segmenter ? new Intl.Segmenter : { segment: (str) => str.split("") };
4228
+ var defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
4229
+ function stringWidth$12(string, options = {}) {
4230
+ if (typeof string !== "string" || string.length === 0) {
4231
+ return 0;
4232
+ }
4233
+ const {
4234
+ ambiguousIsNarrow = true,
4235
+ countAnsiEscapeCodes = false
4236
+ } = options;
4237
+ if (!countAnsiEscapeCodes) {
4238
+ string = stripAnsi3(string);
4239
+ }
4240
+ if (string.length === 0) {
4241
+ return 0;
4242
+ }
4243
+ let width = 0;
4244
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
4245
+ for (const { segment: character } of segmenter2.segment(string)) {
4246
+ const codePoint = character.codePointAt(0);
4247
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
4248
+ continue;
4249
+ }
4250
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
4251
+ continue;
4252
+ }
4253
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
4254
+ continue;
4255
+ }
4256
+ if (codePoint >= 55296 && codePoint <= 57343) {
4257
+ continue;
4258
+ }
4259
+ if (codePoint >= 65024 && codePoint <= 65039) {
4260
+ continue;
4261
+ }
4262
+ if (defaultIgnorableCodePointRegex2.test(character)) {
4263
+ continue;
4264
+ }
4265
+ if (emojiRegex2().test(character)) {
4266
+ width += 2;
4267
+ continue;
4268
+ }
4269
+ width += eastAsianWidth2(codePoint, eastAsianWidthOptions);
4270
+ }
4271
+ return width;
4272
+ }
4273
+ function isUnicodeSupported2() {
4274
+ const { env: env2 } = g$12;
4275
+ const { TERM, TERM_PROGRAM } = env2;
4276
+ if (g$12.platform !== "win32") {
4277
+ return TERM !== "linux";
4278
+ }
4279
+ 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";
4280
+ }
4281
+ var TYPE_COLOR_MAP2 = {
4282
+ info: "cyan",
4283
+ fail: "red",
4284
+ success: "green",
4285
+ ready: "green",
4286
+ start: "magenta"
4287
+ };
4288
+ var LEVEL_COLOR_MAP2 = {
4289
+ 0: "red",
4290
+ 1: "yellow"
4291
+ };
4292
+ var unicode2 = isUnicodeSupported2();
4293
+ var s2 = (c4, fallback) => unicode2 ? c4 : fallback;
4294
+ var TYPE_ICONS2 = {
4295
+ error: s2("✖", "×"),
4296
+ fatal: s2("✖", "×"),
4297
+ ready: s2("✔", "√"),
4298
+ warn: s2("⚠", "‼"),
4299
+ info: s2("ℹ", "i"),
4300
+ success: s2("✔", "√"),
4301
+ debug: s2("⚙", "D"),
4302
+ trace: s2("→", "→"),
4303
+ fail: s2("✖", "×"),
4304
+ start: s2("◐", "o"),
4305
+ log: ""
4306
+ };
4307
+ function stringWidth2(str) {
4308
+ const hasICU = typeof Intl === "object";
4309
+ if (!hasICU || !Intl.Segmenter) {
4310
+ return stripAnsi(str).length;
4311
+ }
4312
+ return stringWidth$12(str);
4313
+ }
4314
+
4315
+ class FancyReporter2 extends BasicReporter {
4316
+ formatStack(stack, message, opts) {
4317
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
4318
+ return `
4319
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_4, m2) => `(${colors.cyan(m2)})`)).join(`
4320
+ ${indent}`);
4321
+ }
4322
+ formatType(logObj, isBadge, opts) {
4323
+ const typeColor = TYPE_COLOR_MAP2[logObj.type] || LEVEL_COLOR_MAP2[logObj.level] || "gray";
4324
+ if (isBadge) {
4325
+ return getBgColor2(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
4326
+ }
4327
+ const _type = typeof TYPE_ICONS2[logObj.type] === "string" ? TYPE_ICONS2[logObj.type] : logObj.icon || logObj.type;
4328
+ return _type ? getColor3(typeColor)(_type) : "";
4329
+ }
4330
+ formatLogObj(logObj, opts) {
4331
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(`
4332
+ `);
4333
+ if (logObj.type === "box") {
4334
+ return box(characterFormat2(message + (additional.length > 0 ? `
4335
+ ` + additional.join(`
4336
+ `) : "")), {
4337
+ title: logObj.title ? characterFormat2(logObj.title) : undefined,
4338
+ style: logObj.style
4339
+ });
4340
+ }
4341
+ const date = this.formatDate(logObj.date, opts);
4342
+ const coloredDate = date && colors.gray(date);
4343
+ const isBadge = logObj.badge ?? logObj.level < 2;
4344
+ const type = this.formatType(logObj, isBadge, opts);
4345
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
4346
+ let line;
4347
+ const left = this.filterAndJoin([type, characterFormat2(message)]);
4348
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
4349
+ const space = (opts.columns || 0) - stringWidth2(left) - stringWidth2(right) - 2;
4350
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
4351
+ line += characterFormat2(additional.length > 0 ? `
4352
+ ` + additional.join(`
4353
+ `) : "");
4354
+ if (logObj.type === "trace") {
4355
+ const _err = new Error("Trace: " + logObj.message);
4356
+ line += this.formatStack(_err.stack || "", _err.message);
4357
+ }
4358
+ return isBadge ? `
4359
+ ` + line + `
4360
+ ` : line;
4361
+ }
4362
+ }
4363
+ function characterFormat2(str) {
4364
+ return str.replace(/`([^`]+)`/gm, (_4, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_4, m2) => ` ${colors.underline(m2)} `);
4365
+ }
4366
+ function getColor3(color = "white") {
4367
+ return colors[color] || colors.white;
4368
+ }
4369
+ function getBgColor2(color = "bgWhite") {
4370
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
4371
+ }
4372
+ function createConsola3(options = {}) {
4373
+ let level = _getDefaultLogLevel2();
4374
+ if (process.env.CONSOLA_LEVEL) {
4375
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
4376
+ }
4377
+ const consola2 = createConsola({
4378
+ level,
4379
+ defaults: { level },
4380
+ stdout: process.stdout,
4381
+ stderr: process.stderr,
4382
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), exports_prompt)).then((m2) => m2.prompt(...args)),
4383
+ reporters: options.reporters || [
4384
+ options.fancy ?? !(T3 || R3) ? new FancyReporter2 : new BasicReporter
4385
+ ],
4386
+ ...options
4387
+ });
4388
+ return consola2;
4389
+ }
4390
+ function _getDefaultLogLevel2() {
4391
+ if (g3) {
4392
+ return LogLevels.debug;
4393
+ }
4394
+ if (R3) {
4395
+ return LogLevels.warn;
4396
+ }
4397
+ return LogLevels.info;
4398
+ }
4399
+ var consola2 = createConsola3();
4400
+
4401
+ // src/git/blame.ts
4402
+ var SHA_RE = /^[0-9a-f]{40}/;
4403
+ function parseBlamePorcelain(raw) {
4404
+ const commits = new Map;
4405
+ const lines = [];
4406
+ let currentSha = "";
4407
+ let collecting = false;
4408
+ let partial = {};
4409
+ const commitLines = raw.split(`
4410
+ `);
4411
+ for (const line of commitLines) {
4412
+ if (line.startsWith("\t")) {
4413
+ if (collecting && currentSha && !commits.has(currentSha)) {
4414
+ commits.set(currentSha, partial);
4415
+ }
4416
+ collecting = false;
4417
+ partial = {};
4418
+ continue;
4419
+ }
4420
+ if (SHA_RE.test(line)) {
4421
+ const parts = line.split(" ");
4422
+ currentSha = parts[0];
4423
+ const finalLine = Number.parseInt(parts[2], 10);
4424
+ lines.push({ sha: currentSha, finalLine });
4425
+ if (!commits.has(currentSha)) {
4426
+ collecting = true;
4427
+ partial = { sha: currentSha };
4428
+ }
4429
+ continue;
4430
+ }
4431
+ if (!collecting)
4432
+ continue;
4433
+ if (line.startsWith("author-mail ")) {
4434
+ partial.authorMail = line.slice("author-mail ".length).replace(/[<>]/g, "");
4435
+ } else if (line.startsWith("author ")) {
4436
+ partial.author = line.slice("author ".length);
4437
+ } else if (line.startsWith("author-time ")) {
4438
+ partial.authorTime = Number.parseInt(line.slice("author-time ".length), 10);
4439
+ } else if (line.startsWith("summary ")) {
4440
+ partial.summary = line.slice("summary ".length);
4441
+ }
4442
+ }
4443
+ return { commits, lines };
4444
+ }
4445
+
4446
+ // src/git/run.ts
4447
+ async function git(...args) {
4448
+ const result = await Bun.$`git ${args}`.quiet();
4449
+ return result.text();
4450
+ }
4451
+
4452
+ // src/render.ts
4453
+ var import_cli_table3 = __toESM(require_table(), 1);
4454
+ var import_picocolors = __toESM(require_picocolors(), 1);
4455
+
4456
+ // src/format.ts
4457
+ function formatRelative(unixSeconds) {
4458
+ if (unixSeconds === 0)
4459
+ return "unknown";
4460
+ const now = Math.floor(Date.now() / 1000);
4461
+ const diff = now - unixSeconds;
4462
+ if (diff < 60)
4463
+ return "just now";
4464
+ if (diff < 3600)
4465
+ return `${Math.floor(diff / 60)} min ago`;
4466
+ if (diff < 86400)
4467
+ return `${Math.floor(diff / 3600)} hours ago`;
4468
+ if (diff < 172800)
4469
+ return "yesterday";
4470
+ if (diff < 604800)
4471
+ return `${Math.floor(diff / 86400)} days ago`;
4472
+ if (diff < 2592000)
4473
+ return `${Math.floor(diff / 604800)} weeks ago`;
4474
+ if (diff < 31536000)
4475
+ return `${Math.floor(diff / 2592000)} months ago`;
4476
+ return `${Math.floor(diff / 31536000)} years ago`;
4477
+ }
4478
+
4479
+ // src/render.ts
4480
+ function renderWhoKnows(filePath, totalLines, stats) {
4481
+ const out = [];
4482
+ out.push("");
4483
+ out.push(import_picocolors.default.bold(` Top experts for ${import_picocolors.default.cyan(filePath)}`) + import_picocolors.default.dim(` (${totalLines} lines, ${stats.length} author${stats.length !== 1 ? "s" : ""})`));
4484
+ out.push("");
4485
+ const table = new import_cli_table3.default({
4486
+ head: ["Rank", "Author", "Lines", "Commits", "Last Active", "Score"].map((h2) => import_picocolors.default.dim(h2)),
4487
+ colAligns: ["right", "left", "right", "right", "left", "right"],
4488
+ style: { "padding-left": 1, "padding-right": 1, head: [], border: [] },
4489
+ chars: {
4490
+ top: "",
4491
+ "top-mid": "",
4492
+ "top-left": "",
4493
+ "top-right": "",
4494
+ bottom: "",
4495
+ "bottom-mid": "",
4496
+ "bottom-left": "",
4497
+ "bottom-right": "",
4498
+ mid: "",
4499
+ "left-mid": "",
4500
+ "mid-mid": "",
4501
+ "right-mid": "",
4502
+ left: " ",
4503
+ right: " ",
4504
+ middle: " "
4505
+ }
4506
+ });
4507
+ for (const [i3, s3] of stats.entries()) {
4508
+ const rank = import_picocolors.default.bold(` ${i3 + 1}.`);
4509
+ const author = import_picocolors.default.cyan(s3.name);
4510
+ const lines = import_picocolors.default.green(String(s3.lines));
4511
+ const commits = String(s3.commits);
4512
+ const lastActive = import_picocolors.default.dim(formatRelative(s3.lastActive));
4513
+ const scoreVal = s3.score >= 0.7 ? import_picocolors.default.green(String(s3.score)) : s3.score >= 0.4 ? import_picocolors.default.yellow(String(s3.score)) : import_picocolors.default.dim(String(s3.score));
4514
+ table.push([rank, author, lines, commits, lastActive, scoreVal]);
4515
+ }
4516
+ out.push(table.toString());
4517
+ out.push("");
4518
+ return out.join(`
4519
+ `);
4520
+ }
4521
+ function renderWhy(filePath, entries) {
4522
+ const out = [];
4523
+ out.push("");
4524
+ out.push(import_picocolors.default.bold(` Recent changes to ${import_picocolors.default.cyan(filePath)}`));
4525
+ out.push("");
4526
+ for (const [i3, e2] of entries.entries()) {
4527
+ const short = e2.sha.slice(0, 7);
4528
+ const dateObj = new Date(e2.date);
4529
+ const rel = formatRelative(Math.floor(dateObj.getTime() / 1000));
4530
+ out.push(` ${import_picocolors.default.dim(`[${i3 + 1}]`)} ${import_picocolors.default.bold(e2.subject)}`);
4531
+ out.push(` ${import_picocolors.default.dim("Author:")} ${import_picocolors.default.cyan(e2.author)} ${import_picocolors.default.dim(`<${e2.authorMail}>`)}`);
4532
+ out.push(` ${import_picocolors.default.dim("Date:")} ${e2.date.slice(0, 10)} ${import_picocolors.default.dim(`(${rel})`)}`);
4533
+ out.push(` ${import_picocolors.default.dim("SHA:")} ${import_picocolors.default.dim(short)}`);
4534
+ out.push("");
4535
+ }
4536
+ return out.join(`
4537
+ `);
4538
+ }
4539
+
4540
+ // src/scoring.ts
4541
+ function computeScores(blameByAuthor, commitCountByAuthor) {
4542
+ const emails = new Set([...blameByAuthor.keys(), ...commitCountByAuthor.keys()]);
4543
+ const results = [];
4544
+ const rawScores = [];
4545
+ for (const email of emails) {
4546
+ const blame = blameByAuthor.get(email) ?? { name: email, lines: 0, lastActive: 0 };
4547
+ const commits = commitCountByAuthor.get(email) ?? 0;
4548
+ rawScores.push({ email, name: blame.name, lines: blame.lines, commits, lastActive: blame.lastActive });
4549
+ }
4550
+ const maxLines = Math.max(...rawScores.map((r4) => r4.lines), 1);
4551
+ const maxCommits = Math.max(...rawScores.map((r4) => r4.commits), 1);
4552
+ const maxRecency = Math.max(...rawScores.map((r4) => r4.lastActive), 1);
4553
+ for (const raw of rawScores) {
4554
+ const normLines = raw.lines / maxLines;
4555
+ const normCommits = raw.commits / maxCommits;
4556
+ const normRecency = maxRecency > 0 ? raw.lastActive / maxRecency : 0;
4557
+ const score = 0.5 * normLines + 0.3 * normCommits + 0.2 * normRecency;
4558
+ results.push({
4559
+ name: raw.name,
4560
+ email: raw.email,
4561
+ lines: raw.lines,
4562
+ commits: raw.commits,
4563
+ lastActive: raw.lastActive,
4564
+ score: Math.round(score * 100) / 100
4565
+ });
4566
+ }
4567
+ return results.sort((a3, b3) => b3.score - a3.score);
4568
+ }
4569
+
4570
+ // src/commands/who-knows.ts
4571
+ async function whoKnows(filePath, options) {
4572
+ const num = options?.num ?? 10;
4573
+ const raw = await git("blame", "--porcelain", "--", filePath);
4574
+ const { commits, lines } = parseBlamePorcelain(raw);
4575
+ const byAuthor = new Map;
4576
+ for (const line of lines) {
4577
+ const commit = commits.get(line.sha);
4578
+ if (!commit)
4579
+ continue;
4580
+ const existing = byAuthor.get(commit.authorMail);
4581
+ if (existing) {
4582
+ existing.lines++;
4583
+ if (commit.authorTime > existing.lastActive) {
4584
+ existing.lastActive = commit.authorTime;
4585
+ }
4586
+ } else {
4587
+ byAuthor.set(commit.authorMail, {
4588
+ name: commit.author,
4589
+ lines: 1,
4590
+ lastActive: commit.authorTime
4591
+ });
4592
+ }
4593
+ }
4594
+ const commitCounts = new Map;
4595
+ try {
4596
+ const logRaw = await git("log", "--format=%ae", "--no-merges", "--", filePath);
4597
+ for (const email of logRaw.split(`
4598
+ `).filter(Boolean)) {
4599
+ commitCounts.set(email, (commitCounts.get(email) ?? 0) + 1);
4600
+ }
4601
+ } catch {}
4602
+ const stats = computeScores(byAuthor, commitCounts).slice(0, num);
4603
+ consola2.log(renderWhoKnows(filePath, lines.length, stats));
4604
+ }
4605
+
4606
+ // src/git/log.ts
4607
+ function parseGitLog(raw) {
4608
+ return raw.split(`
4609
+ `).filter(Boolean).map((line) => {
4610
+ const parts = line.split("|");
4611
+ return {
4612
+ sha: parts[0],
4613
+ author: parts[1],
4614
+ authorMail: parts[2],
4615
+ date: parts[3],
4616
+ subject: parts.slice(4).join("|")
4617
+ };
4618
+ });
4619
+ }
4620
+
4621
+ // src/commands/why.ts
4622
+ async function why(filePath, options) {
4623
+ const num = options?.num ?? 5;
4624
+ const raw = await git("log", `--format=%H|%an|%ae|%aI|%s`, "--no-merges", `-${num}`, "--", filePath);
4625
+ if (!raw.trim()) {
4626
+ consola2.log(`No commits found for ${filePath}`);
4627
+ return;
4628
+ }
4629
+ const entries = parseGitLog(raw);
4630
+ consola2.log(renderWhy(filePath, entries));
4631
+ }
4632
+
4633
+ // src/cli.ts
4634
+ var cli = cac("blamewise");
4635
+ cli.command("who-knows <path>", "Rank authors by expertise on a file").option("-n, --num <number>", "Number of authors to show", { default: 10 }).action(async (path, options) => {
4636
+ try {
4637
+ await whoKnows(path, { num: Number.parseInt(String(options.num ?? "10"), 10) });
4638
+ } catch (e2) {
4639
+ consola.error(e2);
4640
+ process.exit(1);
4641
+ }
4642
+ });
4643
+ cli.command("why <path>", "Show recent commits with reasons for changes").option("-n, --num <number>", "Number of commits to show", { default: 5 }).action(async (path, options) => {
4644
+ try {
4645
+ await why(path, { num: Number.parseInt(String(options.num ?? "5"), 10) });
4646
+ } catch (e2) {
4647
+ consola.error(e2);
4648
+ process.exit(1);
4649
+ }
4650
+ });
4651
+ cli.help();
4652
+ cli.version("0.1.0");
4653
+ cli.parse();
4654
+ if (!cli.args.length && !cli.matchedCommand) {
4655
+ cli.outputHelp();
4656
+ }