ccusage 11.0.1 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/calculate-cost-D3IraeGW.js +1 -4
  2. package/dist/calculate-cost.d.ts +2 -2
  3. package/dist/calculate-cost.js +1 -2
  4. package/dist/data-loader-CBwn9vk0.d.ts +464 -0
  5. package/dist/{data-loader-BzOeJe6y.js → data-loader-rsgRy-no.js} +139 -261
  6. package/dist/data-loader.d.ts +2 -2
  7. package/dist/data-loader.js +4 -6
  8. package/dist/{debug-CjjJciy1.js → debug-BhnEVNbA.js} +6 -11
  9. package/dist/debug.js +5 -7
  10. package/dist/index.js +444 -203
  11. package/dist/{logger-E_Utl_fr.js → logger-CTFDCX5W.js} +3 -22
  12. package/dist/logger.js +2 -3
  13. package/dist/mcp-Cg5potQX.js +20889 -0
  14. package/dist/mcp.d.ts +30 -6
  15. package/dist/mcp.js +5 -9
  16. package/dist/{types-5-VF7WcO.js → pricing-fetcher-3m6_Ejp8.js} +341 -22
  17. package/dist/pricing-fetcher-BkOpRIdx.d.ts +188 -0
  18. package/dist/pricing-fetcher.d.ts +1 -1
  19. package/dist/pricing-fetcher.js +3 -5
  20. package/dist/{prompt-CUbwSrjo.js → prompt-E8j7mEMw.js} +1 -5
  21. package/package.json +1 -1
  22. package/dist/arktype-C-GObzDh-Bx7Fdrqj.js +0 -5
  23. package/dist/core-eFvU0K4V.js +0 -698
  24. package/dist/data-loader-dbZm5kOW.d.ts +0 -247
  25. package/dist/dist-Cb1UHXV5.js +0 -469
  26. package/dist/dist-DCvt9hEv.js +0 -383
  27. package/dist/effect-WSjEuzC9-CZCpOgOT.js +0 -10
  28. package/dist/esm-D74K9ESq.js +0 -1090
  29. package/dist/index-CISmcbXk-DpuCarFe.js +0 -23
  30. package/dist/mcp-SPAE-cNK.js +0 -37610
  31. package/dist/pricing-fetcher-BtW4MVG7.js +0 -360
  32. package/dist/pricing-fetcher-DHaTs-k2.d.ts +0 -1737
  33. package/dist/sury-DmrZ3_Oj-Lq7x0IZW.js +0 -10
  34. package/dist/valibot-CQk-M5rL-btpzU8Qa.js +0 -10
  35. package/dist/zod-Db63SLXj-BqWqpKnQ.js +0 -30
package/dist/index.js CHANGED
@@ -1,16 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { CostModes, SortOrders, __commonJS, __require, __toESM, dateSchema } from "./pricing-fetcher-BtW4MVG7.js";
2
+ import { CostModes, SortOrders, __commonJSMin, __require, __toESM, dateSchema } from "./pricing-fetcher-3m6_Ejp8.js";
3
3
  import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-D3IraeGW.js";
4
- import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage } from "./data-loader-BzOeJe6y.js";
5
- import { safeParse } from "./dist-DCvt9hEv.js";
6
- import { description, log, logger, name, version } from "./logger-E_Utl_fr.js";
7
- import { detectMismatches, printMismatchReport } from "./debug-CjjJciy1.js";
8
- import "./types-5-VF7WcO.js";
9
- import { createMcpServer } from "./mcp-SPAE-cNK.js";
10
- import "./index-CISmcbXk-DpuCarFe.js";
4
+ import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage } from "./data-loader-rsgRy-no.js";
5
+ import { description, log, logger, name, version } from "./logger-CTFDCX5W.js";
6
+ import { detectMismatches, printMismatchReport } from "./debug-BhnEVNbA.js";
7
+ import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-Cg5potQX.js";
11
8
  import process$1 from "node:process";
12
-
13
- //#region node_modules/gunshi/lib/utils-D41C8Abf.js
9
+ import { createServer } from "http";
10
+ import { Http2ServerRequest } from "http2";
11
+ import { Readable } from "stream";
12
+ import crypto from "crypto";
14
13
  /**
15
14
  * The default locale string, which format is BCP 47 language tag.
16
15
  */
@@ -107,9 +106,6 @@ function deepFreeze(obj) {
107
106
  }
108
107
  return Object.freeze(obj);
109
108
  }
110
-
111
- //#endregion
112
- //#region node_modules/gunshi/lib/context-D_EmfRNA.js
113
109
  var COMMAND = "COMMAND";
114
110
  var COMMANDS = "COMMANDS";
115
111
  var SUBCOMMAND = "SUBCOMMAND";
@@ -285,9 +281,6 @@ async function loadCommandResource(ctx, command) {
285
281
  } catch {}
286
282
  return resource;
287
283
  }
288
-
289
- //#endregion
290
- //#region node_modules/gunshi/lib/definition-wq1Kmbvq.js
291
284
  /**
292
285
  * Define a {@link Command | command} with type inference
293
286
  * @param definition A {@link Command | command} definition
@@ -296,9 +289,6 @@ async function loadCommandResource(ctx, command) {
296
289
  function define(definition) {
297
290
  return definition;
298
291
  }
299
-
300
- //#endregion
301
- //#region node_modules/args-tokens/lib/utils-N7UlhLbz.js
302
292
  /**
303
293
  * Entry point of utils.
304
294
  *
@@ -313,9 +303,6 @@ function define(definition) {
313
303
  function kebabnize(str) {
314
304
  return str.replace(/[A-Z]/g, (match, offset) => (offset > 0 ? "-" : "") + match.toLowerCase());
315
305
  }
316
-
317
- //#endregion
318
- //#region node_modules/gunshi/lib/renderer-BzRfaLdJ.js
319
306
  /**
320
307
  * Render the header.
321
308
  * @param ctx A {@link CommandContext | command context}
@@ -596,9 +583,6 @@ function renderValidationErrors(_ctx, error) {
596
583
  for (const err of error.errors) messages$1.push(err.message);
597
584
  return Promise.resolve(messages$1.join("\n"));
598
585
  }
599
-
600
- //#endregion
601
- //#region node_modules/args-tokens/lib/parser-Dr4iAGaX.js
602
586
  const HYPHEN_CHAR = "-";
603
587
  const HYPHEN_CODE = HYPHEN_CHAR.codePointAt(0);
604
588
  const EQUAL_CHAR = "=";
@@ -786,9 +770,6 @@ function hasLongOptionPrefix(arg) {
786
770
  function hasOptionValue(value) {
787
771
  return !(value == null) && value.codePointAt(0) !== HYPHEN_CODE;
788
772
  }
789
-
790
- //#endregion
791
- //#region node_modules/args-tokens/lib/resolver-Q4k2fgTW.js
792
773
  const SKIP_POSITIONAL_DEFAULT = -1;
793
774
  /**
794
775
  * Resolve command line arguments.
@@ -999,9 +980,6 @@ function isNumeric(str) {
999
980
  function createTypeError(option, schema) {
1000
981
  return new ArgResolveError(`Optional argument '--${option}' ${schema.short ? `or '-${schema.short}' ` : ""}should be '${schema.type}'`, option, "type", schema);
1001
982
  }
1002
-
1003
- //#endregion
1004
- //#region node_modules/gunshi/lib/cli-DVGNVw3h.js
1005
983
  /**
1006
984
  * Run the command.
1007
985
  * @param args Command line arguments
@@ -1140,10 +1118,7 @@ async function executeCommand(cmd, ctx, name$1) {
1140
1118
  if (resolved.run == null) throw new Error(`'run' not found on Command \`${name$1}\``);
1141
1119
  await resolved.run(ctx);
1142
1120
  }
1143
-
1144
- //#endregion
1145
- //#region node_modules/picocolors/picocolors.js
1146
- var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports, module) {
1121
+ var require_picocolors = __commonJSMin((exports, module) => {
1147
1122
  let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
1148
1123
  let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
1149
1124
  let formatter = (open, close, replace = open) => (input) => {
@@ -1208,10 +1183,7 @@ var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(ex
1208
1183
  };
1209
1184
  module.exports = createColors();
1210
1185
  module.exports.createColors = createColors;
1211
- } });
1212
-
1213
- //#endregion
1214
- //#region src/shared-args.internal.ts
1186
+ });
1215
1187
  /**
1216
1188
  * Parses and validates a date argument in YYYYMMDD format
1217
1189
  * @param value - Date string to parse
@@ -1219,9 +1191,9 @@ var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(ex
1219
1191
  * @throws TypeError if date format is invalid
1220
1192
  */
1221
1193
  function parseDateArg(value) {
1222
- const result = safeParse(dateSchema, value);
1223
- if (!result.success) throw new TypeError(result.issues[0].message);
1224
- return result.output;
1194
+ const result = dateSchema.safeParse(value);
1195
+ if (!result.success) throw new TypeError(result.error.issues[0]?.message ?? "Invalid date format");
1196
+ return result.data;
1225
1197
  }
1226
1198
  /**
1227
1199
  * Shared command line arguments used across multiple CLI commands
@@ -1291,10 +1263,7 @@ const sharedCommandConfig = {
1291
1263
  args: sharedArgs,
1292
1264
  toKebab: true
1293
1265
  };
1294
-
1295
- //#endregion
1296
- //#region node_modules/cli-table3/src/debug.js
1297
- var require_debug$1 = __commonJS({ "node_modules/cli-table3/src/debug.js"(exports, module) {
1266
+ var require_debug$1 = __commonJSMin((exports, module) => {
1298
1267
  let messages = [];
1299
1268
  let level = 0;
1300
1269
  const debug$3 = (msg, min) => {
@@ -1314,27 +1283,18 @@ var require_debug$1 = __commonJS({ "node_modules/cli-table3/src/debug.js"(export
1314
1283
  debug$3.debug = (msg) => debug$3(msg, debug$3.DEBUG);
1315
1284
  debug$3.debugMessages = () => messages;
1316
1285
  module.exports = debug$3;
1317
- } });
1318
-
1319
- //#endregion
1320
- //#region node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
1321
- var require_ansi_regex = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports, module) {
1286
+ });
1287
+ var require_ansi_regex = __commonJSMin((exports, module) => {
1322
1288
  module.exports = ({ onlyFirst = false } = {}) => {
1323
1289
  const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
1324
1290
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
1325
1291
  };
1326
- } });
1327
-
1328
- //#endregion
1329
- //#region node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/index.js
1330
- var require_strip_ansi = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
1292
+ });
1293
+ var require_strip_ansi = __commonJSMin((exports, module) => {
1331
1294
  const ansiRegex$1 = require_ansi_regex();
1332
1295
  module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex$1(), "") : string;
1333
- } });
1334
-
1335
- //#endregion
1336
- //#region node_modules/is-fullwidth-code-point/index.js
1337
- var require_is_fullwidth_code_point = __commonJS({ "node_modules/is-fullwidth-code-point/index.js"(exports, module) {
1296
+ });
1297
+ var require_is_fullwidth_code_point = __commonJSMin((exports, module) => {
1338
1298
  const isFullwidthCodePoint$1 = (codePoint) => {
1339
1299
  if (Number.isNaN(codePoint)) return false;
1340
1300
  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)) return true;
@@ -1342,19 +1302,13 @@ var require_is_fullwidth_code_point = __commonJS({ "node_modules/is-fullwidth-co
1342
1302
  };
1343
1303
  module.exports = isFullwidthCodePoint$1;
1344
1304
  module.exports.default = isFullwidthCodePoint$1;
1345
- } });
1346
-
1347
- //#endregion
1348
- //#region node_modules/cli-table3/node_modules/string-width/node_modules/emoji-regex/index.js
1349
- var require_emoji_regex$1 = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
1305
+ });
1306
+ var require_emoji_regex$1 = __commonJSMin((exports, module) => {
1350
1307
  module.exports = function() {
1351
1308
  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;
1352
1309
  };
1353
- } });
1354
-
1355
- //#endregion
1356
- //#region node_modules/cli-table3/node_modules/string-width/index.js
1357
- var require_string_width = __commonJS({ "node_modules/cli-table3/node_modules/string-width/index.js"(exports, module) {
1310
+ });
1311
+ var require_string_width = __commonJSMin((exports, module) => {
1358
1312
  const stripAnsi$1 = require_strip_ansi();
1359
1313
  const isFullwidthCodePoint = require_is_fullwidth_code_point();
1360
1314
  const emojiRegex$1 = require_emoji_regex$1();
@@ -1375,11 +1329,8 @@ var require_string_width = __commonJS({ "node_modules/cli-table3/node_modules/st
1375
1329
  };
1376
1330
  module.exports = stringWidth$2;
1377
1331
  module.exports.default = stringWidth$2;
1378
- } });
1379
-
1380
- //#endregion
1381
- //#region node_modules/cli-table3/src/utils.js
1382
- var require_utils = __commonJS({ "node_modules/cli-table3/src/utils.js"(exports, module) {
1332
+ });
1333
+ var require_utils = __commonJSMin((exports, module) => {
1383
1334
  const stringWidth$1 = require_string_width();
1384
1335
  function codeRegex(capture) {
1385
1336
  return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
@@ -1663,11 +1614,8 @@ var require_utils = __commonJS({ "node_modules/cli-table3/src/utils.js"(exports,
1663
1614
  colorizeLines,
1664
1615
  hyperlink
1665
1616
  };
1666
- } });
1667
-
1668
- //#endregion
1669
- //#region node_modules/@colors/colors/lib/styles.js
1670
- var require_styles = __commonJS({ "node_modules/@colors/colors/lib/styles.js"(exports, module) {
1617
+ });
1618
+ var require_styles = __commonJSMin((exports, module) => {
1671
1619
  var styles$1 = {};
1672
1620
  module["exports"] = styles$1;
1673
1621
  var codes = {
@@ -1728,11 +1676,8 @@ var require_styles = __commonJS({ "node_modules/@colors/colors/lib/styles.js"(ex
1728
1676
  style.open = "\x1B[" + val[0] + "m";
1729
1677
  style.close = "\x1B[" + val[1] + "m";
1730
1678
  });
1731
- } });
1732
-
1733
- //#endregion
1734
- //#region node_modules/@colors/colors/lib/system/has-flag.js
1735
- var require_has_flag = __commonJS({ "node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
1679
+ });
1680
+ var require_has_flag = __commonJSMin((exports, module) => {
1736
1681
  module.exports = function(flag, argv$1) {
1737
1682
  argv$1 = argv$1 || process.argv;
1738
1683
  var terminatorPos = argv$1.indexOf("--");
@@ -1740,11 +1685,8 @@ var require_has_flag = __commonJS({ "node_modules/@colors/colors/lib/system/has-
1740
1685
  var pos = argv$1.indexOf(prefix + flag);
1741
1686
  return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
1742
1687
  };
1743
- } });
1744
-
1745
- //#endregion
1746
- //#region node_modules/@colors/colors/lib/system/supports-colors.js
1747
- var require_supports_colors = __commonJS({ "node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
1688
+ });
1689
+ var require_supports_colors = __commonJSMin((exports, module) => {
1748
1690
  var os = __require("os");
1749
1691
  var hasFlag = require_has_flag();
1750
1692
  var env = process.env;
@@ -1807,11 +1749,8 @@ var require_supports_colors = __commonJS({ "node_modules/@colors/colors/lib/syst
1807
1749
  stdout: getSupportLevel(process.stdout),
1808
1750
  stderr: getSupportLevel(process.stderr)
1809
1751
  };
1810
- } });
1811
-
1812
- //#endregion
1813
- //#region node_modules/@colors/colors/lib/custom/trap.js
1814
- var require_trap = __commonJS({ "node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
1752
+ });
1753
+ var require_trap = __commonJSMin((exports, module) => {
1815
1754
  module["exports"] = function runTheTrap(text, options) {
1816
1755
  var result = "";
1817
1756
  text = text || "Run the trap, drop the bass";
@@ -1954,11 +1893,8 @@ var require_trap = __commonJS({ "node_modules/@colors/colors/lib/custom/trap.js"
1954
1893
  });
1955
1894
  return result;
1956
1895
  };
1957
- } });
1958
-
1959
- //#endregion
1960
- //#region node_modules/@colors/colors/lib/custom/zalgo.js
1961
- var require_zalgo = __commonJS({ "node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
1896
+ });
1897
+ var require_zalgo = __commonJSMin((exports, module) => {
1962
1898
  module["exports"] = function zalgo(text, options) {
1963
1899
  text = text || " he is here ";
1964
1900
  var soul = {
@@ -2142,11 +2078,8 @@ var require_zalgo = __commonJS({ "node_modules/@colors/colors/lib/custom/zalgo.j
2142
2078
  }
2143
2079
  return heComes(text, options);
2144
2080
  };
2145
- } });
2146
-
2147
- //#endregion
2148
- //#region node_modules/@colors/colors/lib/maps/america.js
2149
- var require_america = __commonJS({ "node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
2081
+ });
2082
+ var require_america = __commonJSMin((exports, module) => {
2150
2083
  module["exports"] = function(colors$2) {
2151
2084
  return function(letter, i, exploded) {
2152
2085
  if (letter === " ") return letter;
@@ -2157,21 +2090,15 @@ var require_america = __commonJS({ "node_modules/@colors/colors/lib/maps/america
2157
2090
  }
2158
2091
  };
2159
2092
  };
2160
- } });
2161
-
2162
- //#endregion
2163
- //#region node_modules/@colors/colors/lib/maps/zebra.js
2164
- var require_zebra = __commonJS({ "node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
2093
+ });
2094
+ var require_zebra = __commonJSMin((exports, module) => {
2165
2095
  module["exports"] = function(colors$2) {
2166
2096
  return function(letter, i, exploded) {
2167
2097
  return i % 2 === 0 ? letter : colors$2.inverse(letter);
2168
2098
  };
2169
2099
  };
2170
- } });
2171
-
2172
- //#endregion
2173
- //#region node_modules/@colors/colors/lib/maps/rainbow.js
2174
- var require_rainbow = __commonJS({ "node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
2100
+ });
2101
+ var require_rainbow = __commonJSMin((exports, module) => {
2175
2102
  module["exports"] = function(colors$2) {
2176
2103
  var rainbowColors = [
2177
2104
  "red",
@@ -2185,11 +2112,8 @@ var require_rainbow = __commonJS({ "node_modules/@colors/colors/lib/maps/rainbow
2185
2112
  else return colors$2[rainbowColors[i++ % rainbowColors.length]](letter);
2186
2113
  };
2187
2114
  };
2188
- } });
2189
-
2190
- //#endregion
2191
- //#region node_modules/@colors/colors/lib/maps/random.js
2192
- var require_random = __commonJS({ "node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
2115
+ });
2116
+ var require_random = __commonJSMin((exports, module) => {
2193
2117
  module["exports"] = function(colors$2) {
2194
2118
  var available = [
2195
2119
  "underline",
@@ -2214,11 +2138,8 @@ var require_random = __commonJS({ "node_modules/@colors/colors/lib/maps/random.j
2214
2138
  return letter === " " ? letter : colors$2[available[Math.round(Math.random() * (available.length - 2))]](letter);
2215
2139
  };
2216
2140
  };
2217
- } });
2218
-
2219
- //#endregion
2220
- //#region node_modules/@colors/colors/lib/colors.js
2221
- var require_colors = __commonJS({ "node_modules/@colors/colors/lib/colors.js"(exports, module) {
2141
+ });
2142
+ var require_colors = __commonJSMin((exports, module) => {
2222
2143
  var colors$1 = {};
2223
2144
  module["exports"] = colors$1;
2224
2145
  colors$1.themes = {};
@@ -2330,18 +2251,12 @@ var require_colors = __commonJS({ "node_modules/@colors/colors/lib/colors.js"(ex
2330
2251
  };
2331
2252
  })(map);
2332
2253
  defineProps(colors$1, init());
2333
- } });
2334
-
2335
- //#endregion
2336
- //#region node_modules/@colors/colors/safe.js
2337
- var require_safe = __commonJS({ "node_modules/@colors/colors/safe.js"(exports, module) {
2254
+ });
2255
+ var require_safe = __commonJSMin((exports, module) => {
2338
2256
  var colors = require_colors();
2339
2257
  module["exports"] = colors;
2340
- } });
2341
-
2342
- //#endregion
2343
- //#region node_modules/cli-table3/src/cell.js
2344
- var require_cell = __commonJS({ "node_modules/cli-table3/src/cell.js"(exports, module) {
2258
+ });
2259
+ var require_cell = __commonJSMin((exports, module) => {
2345
2260
  const { info, debug: debug$2 } = require_debug$1();
2346
2261
  const utils$1 = require_utils();
2347
2262
  var Cell$1 = class Cell$1 {
@@ -2665,11 +2580,8 @@ var require_cell = __commonJS({ "node_modules/cli-table3/src/cell.js"(exports, m
2665
2580
  module.exports = Cell$1;
2666
2581
  module.exports.ColSpanCell = ColSpanCell$1;
2667
2582
  module.exports.RowSpanCell = RowSpanCell$1;
2668
- } });
2669
-
2670
- //#endregion
2671
- //#region node_modules/cli-table3/src/layout-manager.js
2672
- var require_layout_manager = __commonJS({ "node_modules/cli-table3/src/layout-manager.js"(exports, module) {
2583
+ });
2584
+ var require_layout_manager = __commonJSMin((exports, module) => {
2673
2585
  const { warn, debug: debug$1 } = require_debug$1();
2674
2586
  const Cell = require_cell();
2675
2587
  const { ColSpanCell, RowSpanCell } = Cell;
@@ -2875,11 +2787,8 @@ var require_layout_manager = __commonJS({ "node_modules/cli-table3/src/layout-ma
2875
2787
  for (let j = 0; j < vals.length; j++) vals[j] = Math.max(forcedMin, vals[j] || 0);
2876
2788
  };
2877
2789
  }
2878
- } });
2879
-
2880
- //#endregion
2881
- //#region node_modules/cli-table3/src/table.js
2882
- var require_table = __commonJS({ "node_modules/cli-table3/src/table.js"(exports, module) {
2790
+ });
2791
+ var require_table = __commonJSMin((exports, module) => {
2883
2792
  const debug = require_debug$1();
2884
2793
  const utils = require_utils();
2885
2794
  const tableLayout = require_layout_manager();
@@ -2956,32 +2865,20 @@ var require_table = __commonJS({ "node_modules/cli-table3/src/table.js"(exports,
2956
2865
  if (str.length) result.push(str);
2957
2866
  }
2958
2867
  module.exports = Table$1;
2959
- } });
2960
-
2961
- //#endregion
2962
- //#region node_modules/cli-table3/index.js
2963
- var require_cli_table3 = __commonJS({ "node_modules/cli-table3/index.js"(exports, module) {
2868
+ });
2869
+ var require_cli_table3 = __commonJSMin((exports, module) => {
2964
2870
  module.exports = require_table();
2965
- } });
2966
-
2967
- //#endregion
2968
- //#region node_modules/ansi-regex/index.js
2871
+ });
2969
2872
  function ansiRegex({ onlyFirst = false } = {}) {
2970
2873
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
2971
2874
  const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
2972
2875
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
2973
2876
  }
2974
-
2975
- //#endregion
2976
- //#region node_modules/strip-ansi/index.js
2977
2877
  const regex = ansiRegex();
2978
2878
  function stripAnsi(string) {
2979
2879
  if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
2980
2880
  return string.replace(regex, "");
2981
2881
  }
2982
-
2983
- //#endregion
2984
- //#region node_modules/get-east-asian-width/lookup.js
2985
2882
  function isAmbiguous(x) {
2986
2883
  return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
2987
2884
  }
@@ -2991,9 +2888,6 @@ function isFullWidth(x) {
2991
2888
  function isWide(x) {
2992
2889
  return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
2993
2890
  }
2994
-
2995
- //#endregion
2996
- //#region node_modules/get-east-asian-width/index.js
2997
2891
  function validate(codePoint) {
2998
2892
  if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
2999
2893
  }
@@ -3002,17 +2896,11 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
3002
2896
  if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
3003
2897
  return 1;
3004
2898
  }
3005
-
3006
- //#endregion
3007
- //#region node_modules/emoji-regex/index.js
3008
- var require_emoji_regex = __commonJS({ "node_modules/emoji-regex/index.js"(exports, module) {
2899
+ var require_emoji_regex = __commonJSMin((exports, module) => {
3009
2900
  module.exports = () => {
3010
2901
  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;
3011
2902
  };
3012
- } });
3013
-
3014
- //#endregion
3015
- //#region node_modules/string-width/index.js
2903
+ });
3016
2904
  var import_emoji_regex = __toESM(require_emoji_regex(), 1);
3017
2905
  const segmenter = new Intl.Segmenter();
3018
2906
  const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
@@ -3039,9 +2927,6 @@ function stringWidth(string, options = {}) {
3039
2927
  }
3040
2928
  return width;
3041
2929
  }
3042
-
3043
- //#endregion
3044
- //#region src/utils.internal.ts
3045
2930
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
3046
2931
  var import_picocolors$4 = __toESM(require_picocolors(), 1);
3047
2932
  /**
@@ -3214,9 +3099,6 @@ function pushBreakdownRows(table, breakdowns, extraColumns = 1, trailingColumns
3214
3099
  table.push(row);
3215
3100
  }
3216
3101
  }
3217
-
3218
- //#endregion
3219
- //#region src/commands/blocks.ts
3220
3102
  var import_picocolors$3 = __toESM(require_picocolors(), 1);
3221
3103
  /**
3222
3104
  * Default number of recent days to show in blocks view
@@ -3372,7 +3254,7 @@ const blocksCommand = define({
3372
3254
  id: block.id,
3373
3255
  startTime: block.startTime.toISOString(),
3374
3256
  endTime: block.endTime.toISOString(),
3375
- actualEndTime: block.actualEndTime != null ? block.actualEndTime.toISOString() : null,
3257
+ actualEndTime: block.actualEndTime?.toISOString() ?? null,
3376
3258
  isActive: block.isActive,
3377
3259
  isGap: block.isGap ?? false,
3378
3260
  entries: block.entries.length,
@@ -3537,9 +3419,6 @@ const blocksCommand = define({
3537
3419
  }
3538
3420
  }
3539
3421
  });
3540
-
3541
- //#endregion
3542
- //#region src/commands/daily.ts
3543
3422
  var import_picocolors$2 = __toESM(require_picocolors(), 1);
3544
3423
  const dailyCommand = define({
3545
3424
  name: "daily",
@@ -3644,12 +3523,378 @@ const dailyCommand = define({
3644
3523
  }
3645
3524
  }
3646
3525
  });
3647
-
3648
- //#endregion
3649
- //#region src/commands/mcp.ts
3526
+ var RequestError = class extends Error {
3527
+ constructor(message, options) {
3528
+ super(message, options);
3529
+ this.name = "RequestError";
3530
+ }
3531
+ };
3532
+ var toRequestError = (e) => {
3533
+ if (e instanceof RequestError) return e;
3534
+ return new RequestError(e.message, { cause: e });
3535
+ };
3536
+ var GlobalRequest = global.Request;
3537
+ var Request = class extends GlobalRequest {
3538
+ constructor(input, options) {
3539
+ if (typeof input === "object" && getRequestCache in input) input = input[getRequestCache]();
3540
+ if (typeof options?.body?.getReader !== "undefined") options.duplex ??= "half";
3541
+ super(input, options);
3542
+ }
3543
+ };
3544
+ var newRequestFromIncoming = (method, url, incoming, abortController) => {
3545
+ const headerRecord = [];
3546
+ const rawHeaders = incoming.rawHeaders;
3547
+ for (let i = 0; i < rawHeaders.length; i += 2) {
3548
+ const { [i]: key, [i + 1]: value } = rawHeaders;
3549
+ if (key.charCodeAt(0) !== 58) headerRecord.push([key, value]);
3550
+ }
3551
+ const init$1 = {
3552
+ method,
3553
+ headers: headerRecord,
3554
+ signal: abortController.signal
3555
+ };
3556
+ if (method === "TRACE") {
3557
+ init$1.method = "GET";
3558
+ const req = new Request(url, init$1);
3559
+ Object.defineProperty(req, "method", { get() {
3560
+ return "TRACE";
3561
+ } });
3562
+ return req;
3563
+ }
3564
+ if (!(method === "GET" || method === "HEAD")) if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) init$1.body = new ReadableStream({ start(controller) {
3565
+ controller.enqueue(incoming.rawBody);
3566
+ controller.close();
3567
+ } });
3568
+ else init$1.body = Readable.toWeb(incoming);
3569
+ return new Request(url, init$1);
3570
+ };
3571
+ var getRequestCache = Symbol("getRequestCache");
3572
+ var requestCache = Symbol("requestCache");
3573
+ var incomingKey = Symbol("incomingKey");
3574
+ var urlKey = Symbol("urlKey");
3575
+ var abortControllerKey = Symbol("abortControllerKey");
3576
+ var getAbortController = Symbol("getAbortController");
3577
+ var requestPrototype = {
3578
+ get method() {
3579
+ return this[incomingKey].method || "GET";
3580
+ },
3581
+ get url() {
3582
+ return this[urlKey];
3583
+ },
3584
+ [getAbortController]() {
3585
+ this[getRequestCache]();
3586
+ return this[abortControllerKey];
3587
+ },
3588
+ [getRequestCache]() {
3589
+ this[abortControllerKey] ||= new AbortController();
3590
+ return this[requestCache] ||= newRequestFromIncoming(this.method, this[urlKey], this[incomingKey], this[abortControllerKey]);
3591
+ }
3592
+ };
3593
+ [
3594
+ "body",
3595
+ "bodyUsed",
3596
+ "cache",
3597
+ "credentials",
3598
+ "destination",
3599
+ "headers",
3600
+ "integrity",
3601
+ "mode",
3602
+ "redirect",
3603
+ "referrer",
3604
+ "referrerPolicy",
3605
+ "signal",
3606
+ "keepalive"
3607
+ ].forEach((k) => {
3608
+ Object.defineProperty(requestPrototype, k, { get() {
3609
+ return this[getRequestCache]()[k];
3610
+ } });
3611
+ });
3612
+ [
3613
+ "arrayBuffer",
3614
+ "blob",
3615
+ "clone",
3616
+ "formData",
3617
+ "json",
3618
+ "text"
3619
+ ].forEach((k) => {
3620
+ Object.defineProperty(requestPrototype, k, { value: function() {
3621
+ return this[getRequestCache]()[k]();
3622
+ } });
3623
+ });
3624
+ Object.setPrototypeOf(requestPrototype, Request.prototype);
3625
+ var newRequest = (incoming, defaultHostname) => {
3626
+ const req = Object.create(requestPrototype);
3627
+ req[incomingKey] = incoming;
3628
+ const incomingUrl = incoming.url || "";
3629
+ if (incomingUrl[0] !== "/" && (incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
3630
+ if (incoming instanceof Http2ServerRequest) throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
3631
+ try {
3632
+ const url2 = new URL(incomingUrl);
3633
+ req[urlKey] = url2.href;
3634
+ } catch (e) {
3635
+ throw new RequestError("Invalid absolute URL", { cause: e });
3636
+ }
3637
+ return req;
3638
+ }
3639
+ const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
3640
+ if (!host) throw new RequestError("Missing host header");
3641
+ let scheme;
3642
+ if (incoming instanceof Http2ServerRequest) {
3643
+ scheme = incoming.scheme;
3644
+ if (!(scheme === "http" || scheme === "https")) throw new RequestError("Unsupported scheme");
3645
+ } else scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
3646
+ const url = new URL(`${scheme}://${host}${incomingUrl}`);
3647
+ if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) throw new RequestError("Invalid host header");
3648
+ req[urlKey] = url.href;
3649
+ return req;
3650
+ };
3651
+ var responseCache = Symbol("responseCache");
3652
+ var getResponseCache = Symbol("getResponseCache");
3653
+ var cacheKey = Symbol("cache");
3654
+ var GlobalResponse = global.Response;
3655
+ var Response2 = class _Response {
3656
+ #body;
3657
+ #init;
3658
+ [getResponseCache]() {
3659
+ delete this[cacheKey];
3660
+ return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
3661
+ }
3662
+ constructor(body, init$1) {
3663
+ let headers;
3664
+ this.#body = body;
3665
+ if (init$1 instanceof _Response) {
3666
+ const cachedGlobalResponse = init$1[responseCache];
3667
+ if (cachedGlobalResponse) {
3668
+ this.#init = cachedGlobalResponse;
3669
+ this[getResponseCache]();
3670
+ return;
3671
+ } else {
3672
+ this.#init = init$1.#init;
3673
+ headers = new Headers(init$1.#init.headers);
3674
+ }
3675
+ } else this.#init = init$1;
3676
+ if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
3677
+ headers ||= init$1?.headers || { "content-type": "text/plain; charset=UTF-8" };
3678
+ this[cacheKey] = [
3679
+ init$1?.status || 200,
3680
+ body,
3681
+ headers
3682
+ ];
3683
+ }
3684
+ }
3685
+ get headers() {
3686
+ const cache = this[cacheKey];
3687
+ if (cache) {
3688
+ if (!(cache[2] instanceof Headers)) cache[2] = new Headers(cache[2]);
3689
+ return cache[2];
3690
+ }
3691
+ return this[getResponseCache]().headers;
3692
+ }
3693
+ get status() {
3694
+ return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
3695
+ }
3696
+ get ok() {
3697
+ const status = this.status;
3698
+ return status >= 200 && status < 300;
3699
+ }
3700
+ };
3701
+ [
3702
+ "body",
3703
+ "bodyUsed",
3704
+ "redirected",
3705
+ "statusText",
3706
+ "trailers",
3707
+ "type",
3708
+ "url"
3709
+ ].forEach((k) => {
3710
+ Object.defineProperty(Response2.prototype, k, { get() {
3711
+ return this[getResponseCache]()[k];
3712
+ } });
3713
+ });
3714
+ [
3715
+ "arrayBuffer",
3716
+ "blob",
3717
+ "clone",
3718
+ "formData",
3719
+ "json",
3720
+ "text"
3721
+ ].forEach((k) => {
3722
+ Object.defineProperty(Response2.prototype, k, { value: function() {
3723
+ return this[getResponseCache]()[k]();
3724
+ } });
3725
+ });
3726
+ Object.setPrototypeOf(Response2, GlobalResponse);
3727
+ Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
3728
+ function writeFromReadableStream(stream, writable) {
3729
+ if (stream.locked) throw new TypeError("ReadableStream is locked.");
3730
+ else if (writable.destroyed) {
3731
+ stream.cancel();
3732
+ return;
3733
+ }
3734
+ const reader = stream.getReader();
3735
+ writable.on("close", cancel);
3736
+ writable.on("error", cancel);
3737
+ reader.read().then(flow, cancel);
3738
+ return reader.closed.finally(() => {
3739
+ writable.off("close", cancel);
3740
+ writable.off("error", cancel);
3741
+ });
3742
+ function cancel(error) {
3743
+ reader.cancel(error).catch(() => {});
3744
+ if (error) writable.destroy(error);
3745
+ }
3746
+ function onDrain() {
3747
+ reader.read().then(flow, cancel);
3748
+ }
3749
+ function flow({ done, value }) {
3750
+ try {
3751
+ if (done) writable.end();
3752
+ else if (!writable.write(value)) writable.once("drain", onDrain);
3753
+ else return reader.read().then(flow, cancel);
3754
+ } catch (e) {
3755
+ cancel(e);
3756
+ }
3757
+ }
3758
+ }
3759
+ var buildOutgoingHttpHeaders = (headers) => {
3760
+ const res = {};
3761
+ if (!(headers instanceof Headers)) headers = new Headers(headers ?? void 0);
3762
+ const cookies = [];
3763
+ for (const [k, v] of headers) if (k === "set-cookie") cookies.push(v);
3764
+ else res[k] = v;
3765
+ if (cookies.length > 0) res["set-cookie"] = cookies;
3766
+ res["content-type"] ??= "text/plain; charset=UTF-8";
3767
+ return res;
3768
+ };
3769
+ var X_ALREADY_SENT = "x-hono-already-sent";
3770
+ var webFetch = global.fetch;
3771
+ if (typeof global.crypto === "undefined") global.crypto = crypto;
3772
+ global.fetch = (info$1, init$1) => {
3773
+ init$1 = {
3774
+ compress: false,
3775
+ ...init$1
3776
+ };
3777
+ return webFetch(info$1, init$1);
3778
+ };
3779
+ var regBuffer = /^no$/i;
3780
+ var regContentType = /^(application\/json\b|text\/(?!event-stream\b))/i;
3781
+ var handleRequestError = () => new Response(null, { status: 400 });
3782
+ var handleFetchError = (e) => new Response(null, { status: e instanceof Error && (e.name === "TimeoutError" || e.constructor.name === "TimeoutError") ? 504 : 500 });
3783
+ var handleResponseError = (e, outgoing) => {
3784
+ const err = e instanceof Error ? e : new Error("unknown error", { cause: e });
3785
+ if (err.code === "ERR_STREAM_PREMATURE_CLOSE") console.info("The user aborted a request.");
3786
+ else {
3787
+ console.error(e);
3788
+ if (!outgoing.headersSent) outgoing.writeHead(500, { "Content-Type": "text/plain" });
3789
+ outgoing.end(`Error: ${err.message}`);
3790
+ outgoing.destroy(err);
3791
+ }
3792
+ };
3793
+ var flushHeaders = (outgoing) => {
3794
+ if ("flushHeaders" in outgoing && outgoing.writable) outgoing.flushHeaders();
3795
+ };
3796
+ var responseViaCache = async (res, outgoing) => {
3797
+ let [status, body, header] = res[cacheKey];
3798
+ if (header instanceof Headers) header = buildOutgoingHttpHeaders(header);
3799
+ if (typeof body === "string") header["Content-Length"] = Buffer.byteLength(body);
3800
+ else if (body instanceof Uint8Array) header["Content-Length"] = body.byteLength;
3801
+ else if (body instanceof Blob) header["Content-Length"] = body.size;
3802
+ outgoing.writeHead(status, header);
3803
+ if (typeof body === "string" || body instanceof Uint8Array) outgoing.end(body);
3804
+ else if (body instanceof Blob) outgoing.end(new Uint8Array(await body.arrayBuffer()));
3805
+ else {
3806
+ flushHeaders(outgoing);
3807
+ return writeFromReadableStream(body, outgoing)?.catch((e) => handleResponseError(e, outgoing));
3808
+ }
3809
+ };
3810
+ var responseViaResponseObject = async (res, outgoing, options = {}) => {
3811
+ if (res instanceof Promise) if (options.errorHandler) try {
3812
+ res = await res;
3813
+ } catch (err) {
3814
+ const errRes = await options.errorHandler(err);
3815
+ if (!errRes) return;
3816
+ res = errRes;
3817
+ }
3818
+ else res = await res.catch(handleFetchError);
3819
+ if (cacheKey in res) return responseViaCache(res, outgoing);
3820
+ const resHeaderRecord = buildOutgoingHttpHeaders(res.headers);
3821
+ if (res.body) {
3822
+ const { "transfer-encoding": transferEncoding, "content-encoding": contentEncoding, "content-length": contentLength, "x-accel-buffering": accelBuffering, "content-type": contentType } = resHeaderRecord;
3823
+ if (transferEncoding || contentEncoding || contentLength || accelBuffering && regBuffer.test(accelBuffering) || !regContentType.test(contentType)) {
3824
+ outgoing.writeHead(res.status, resHeaderRecord);
3825
+ flushHeaders(outgoing);
3826
+ await writeFromReadableStream(res.body, outgoing);
3827
+ } else {
3828
+ const buffer = await res.arrayBuffer();
3829
+ resHeaderRecord["content-length"] = buffer.byteLength;
3830
+ outgoing.writeHead(res.status, resHeaderRecord);
3831
+ outgoing.end(new Uint8Array(buffer));
3832
+ }
3833
+ } else if (resHeaderRecord[X_ALREADY_SENT]) {} else {
3834
+ outgoing.writeHead(res.status, resHeaderRecord);
3835
+ outgoing.end();
3836
+ }
3837
+ };
3838
+ var getRequestListener = (fetchCallback, options = {}) => {
3839
+ if (options.overrideGlobalObjects !== false && global.Request !== Request) {
3840
+ Object.defineProperty(global, "Request", { value: Request });
3841
+ Object.defineProperty(global, "Response", { value: Response2 });
3842
+ }
3843
+ return async (incoming, outgoing) => {
3844
+ let res, req;
3845
+ try {
3846
+ req = newRequest(incoming, options.hostname);
3847
+ outgoing.on("close", () => {
3848
+ const abortController = req[abortControllerKey];
3849
+ if (!abortController) return;
3850
+ if (incoming.errored) req[abortControllerKey].abort(incoming.errored.toString());
3851
+ else if (!outgoing.writableFinished) req[abortControllerKey].abort("Client connection prematurely closed.");
3852
+ });
3853
+ res = fetchCallback(req, {
3854
+ incoming,
3855
+ outgoing
3856
+ });
3857
+ if (cacheKey in res) return responseViaCache(res, outgoing);
3858
+ } catch (e) {
3859
+ if (!res) if (options.errorHandler) {
3860
+ res = await options.errorHandler(req ? e : toRequestError(e));
3861
+ if (!res) return;
3862
+ } else if (!req) res = handleRequestError();
3863
+ else res = handleFetchError(e);
3864
+ else return handleResponseError(e, outgoing);
3865
+ }
3866
+ try {
3867
+ return await responseViaResponseObject(res, outgoing, options);
3868
+ } catch (e) {
3869
+ return handleResponseError(e, outgoing);
3870
+ }
3871
+ };
3872
+ };
3873
+ var createAdaptorServer = (options) => {
3874
+ const fetchCallback = options.fetch;
3875
+ const requestListener = getRequestListener(fetchCallback, {
3876
+ hostname: options.hostname,
3877
+ overrideGlobalObjects: options.overrideGlobalObjects
3878
+ });
3879
+ const createServer$1 = options.createServer || createServer;
3880
+ const server = createServer$1(options.serverOptions || {}, requestListener);
3881
+ return server;
3882
+ };
3883
+ var serve = (options, listeningListener) => {
3884
+ const server = createAdaptorServer(options);
3885
+ server.listen(options?.port ?? 3e3, options.hostname, () => {
3886
+ const serverInfo = server.address();
3887
+ listeningListener && listeningListener(serverInfo);
3888
+ });
3889
+ return server;
3890
+ };
3891
+ /**
3892
+ * MCP server command that supports both stdio and HTTP transports.
3893
+ * Allows starting an MCP server for external integrations with usage reporting tools.
3894
+ */
3650
3895
  const mcpCommand = define({
3651
3896
  name: "mcp",
3652
- description: "Show usage report for MCP",
3897
+ description: "Start MCP server with usage reporting tools",
3653
3898
  args: {
3654
3899
  mode: sharedArgs.mode,
3655
3900
  type: {
@@ -3668,19 +3913,23 @@ const mcpCommand = define({
3668
3913
  async run(ctx) {
3669
3914
  const { type, mode, port } = ctx.values;
3670
3915
  if (type === "stdio") logger.level = 0;
3671
- const server = createMcpServer({
3916
+ const options = {
3672
3917
  claudePath: getDefaultClaudePath(),
3673
3918
  mode
3674
- });
3675
- await server.start(ctx.values.type === "http" ? {
3676
- transportType: "httpStream",
3677
- httpStream: { port }
3678
- } : { transportType: "stdio" });
3919
+ };
3920
+ if (type === "stdio") {
3921
+ const server = createMcpServer(options);
3922
+ await startMcpServerStdio(server);
3923
+ } else {
3924
+ const app = createMcpHttpApp(options);
3925
+ serve({
3926
+ fetch: app.fetch,
3927
+ port
3928
+ });
3929
+ logger.info(`MCP server is running on http://localhost:${port}`);
3930
+ }
3679
3931
  }
3680
3932
  });
3681
-
3682
- //#endregion
3683
- //#region src/commands/monthly.ts
3684
3933
  var import_picocolors$1 = __toESM(require_picocolors(), 1);
3685
3934
  const monthlyCommand = define({
3686
3935
  name: "monthly",
@@ -3797,9 +4046,6 @@ const monthlyCommand = define({
3797
4046
  }
3798
4047
  }
3799
4048
  });
3800
-
3801
- //#endregion
3802
- //#region src/commands/session.ts
3803
4049
  var import_picocolors = __toESM(require_picocolors(), 1);
3804
4050
  const sessionCommand = define({
3805
4051
  name: "session",
@@ -3913,9 +4159,6 @@ const sessionCommand = define({
3913
4159
  }
3914
4160
  }
3915
4161
  });
3916
-
3917
- //#endregion
3918
- //#region src/commands/index.ts
3919
4162
  /**
3920
4163
  * Map of available CLI subcommands
3921
4164
  */
@@ -3936,5 +4179,3 @@ await cli(process$1.argv.slice(2), mainCommand, {
3936
4179
  subCommands,
3937
4180
  renderHeader: null
3938
4181
  });
3939
-
3940
- //#endregion