@rockcarver/frodo-cli 5.0.0-6 → 5.0.0-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4655 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
2
+ const require_ColorTheme = require("./ColorTheme-DEHDqYXV.cjs");
3
+ let node_util = require("node:util");
4
+ //#region node_modules/cli-table3/src/debug.js
5
+ var require_debug = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
6
+ let messages = [];
7
+ let level = 0;
8
+ const debug = (msg, min) => {
9
+ if (level >= min) messages.push(msg);
10
+ };
11
+ debug.WARN = 1;
12
+ debug.INFO = 2;
13
+ debug.DEBUG = 3;
14
+ debug.reset = () => {
15
+ messages = [];
16
+ };
17
+ debug.setDebugLevel = (v) => {
18
+ level = v;
19
+ };
20
+ debug.warn = (msg) => debug(msg, debug.WARN);
21
+ debug.info = (msg) => debug(msg, debug.INFO);
22
+ debug.debug = (msg) => debug(msg, debug.DEBUG);
23
+ debug.debugMessages = () => messages;
24
+ module.exports = debug;
25
+ }));
26
+ //#endregion
27
+ //#region node_modules/ansi-regex/index.js
28
+ var require_ansi_regex = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
29
+ module.exports = ({ onlyFirst = false } = {}) => {
30
+ 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("|");
31
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
32
+ };
33
+ }));
34
+ //#endregion
35
+ //#region node_modules/strip-ansi/index.js
36
+ var require_strip_ansi = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
37
+ const ansiRegex = require_ansi_regex();
38
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
39
+ }));
40
+ //#endregion
41
+ //#region node_modules/is-fullwidth-code-point/index.js
42
+ var require_is_fullwidth_code_point = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
43
+ const isFullwidthCodePoint = (codePoint) => {
44
+ if (Number.isNaN(codePoint)) return false;
45
+ 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;
46
+ return false;
47
+ };
48
+ module.exports = isFullwidthCodePoint;
49
+ module.exports.default = isFullwidthCodePoint;
50
+ }));
51
+ //#endregion
52
+ //#region node_modules/string-width/node_modules/emoji-regex/index.js
53
+ var require_emoji_regex = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
54
+ module.exports = function() {
55
+ 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;
56
+ };
57
+ }));
58
+ //#endregion
59
+ //#region node_modules/string-width/index.js
60
+ var require_string_width = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
61
+ const stripAnsi = require_strip_ansi();
62
+ const isFullwidthCodePoint = require_is_fullwidth_code_point();
63
+ const emojiRegex = require_emoji_regex();
64
+ const stringWidth = (string) => {
65
+ if (typeof string !== "string" || string.length === 0) return 0;
66
+ string = stripAnsi(string);
67
+ if (string.length === 0) return 0;
68
+ string = string.replace(emojiRegex(), " ");
69
+ let width = 0;
70
+ for (let i = 0; i < string.length; i++) {
71
+ const code = string.codePointAt(i);
72
+ if (code <= 31 || code >= 127 && code <= 159) continue;
73
+ if (code >= 768 && code <= 879) continue;
74
+ if (code > 65535) i++;
75
+ width += isFullwidthCodePoint(code) ? 2 : 1;
76
+ }
77
+ return width;
78
+ };
79
+ module.exports = stringWidth;
80
+ module.exports.default = stringWidth;
81
+ }));
82
+ //#endregion
83
+ //#region node_modules/cli-table3/src/utils.js
84
+ var require_utils = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
85
+ const stringWidth = require_string_width();
86
+ function codeRegex(capture) {
87
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
88
+ }
89
+ function strlen(str) {
90
+ let code = codeRegex();
91
+ return ("" + str).replace(code, "").split("\n").reduce(function(memo, s) {
92
+ return stringWidth(s) > memo ? stringWidth(s) : memo;
93
+ }, 0);
94
+ }
95
+ function repeat(str, times) {
96
+ return Array(times + 1).join(str);
97
+ }
98
+ function pad(str, len, pad, dir) {
99
+ let length = strlen(str);
100
+ if (len + 1 >= length) {
101
+ let padlen = len - length;
102
+ switch (dir) {
103
+ case "right":
104
+ str = repeat(pad, padlen) + str;
105
+ break;
106
+ case "center": {
107
+ let right = Math.ceil(padlen / 2);
108
+ str = repeat(pad, padlen - right) + str + repeat(pad, right);
109
+ break;
110
+ }
111
+ default: str = str + repeat(pad, padlen);
112
+ }
113
+ }
114
+ return str;
115
+ }
116
+ let codeCache = {};
117
+ function addToCodeCache(name, on, off) {
118
+ on = "\x1B[" + on + "m";
119
+ off = "\x1B[" + off + "m";
120
+ codeCache[on] = {
121
+ set: name,
122
+ to: true
123
+ };
124
+ codeCache[off] = {
125
+ set: name,
126
+ to: false
127
+ };
128
+ codeCache[name] = {
129
+ on,
130
+ off
131
+ };
132
+ }
133
+ addToCodeCache("bold", 1, 22);
134
+ addToCodeCache("italics", 3, 23);
135
+ addToCodeCache("underline", 4, 24);
136
+ addToCodeCache("inverse", 7, 27);
137
+ addToCodeCache("strikethrough", 9, 29);
138
+ function updateState(state, controlChars) {
139
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
140
+ if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
141
+ state.lastForegroundAdded = controlChars[0];
142
+ return;
143
+ }
144
+ if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
145
+ state.lastBackgroundAdded = controlChars[0];
146
+ return;
147
+ }
148
+ if (controlCode === 0) {
149
+ for (let i in state)
150
+ /* istanbul ignore else */
151
+ if (Object.prototype.hasOwnProperty.call(state, i)) delete state[i];
152
+ return;
153
+ }
154
+ let info = codeCache[controlChars[0]];
155
+ if (info) state[info.set] = info.to;
156
+ }
157
+ function readState(line) {
158
+ let code = codeRegex(true);
159
+ let controlChars = code.exec(line);
160
+ let state = {};
161
+ while (controlChars !== null) {
162
+ updateState(state, controlChars);
163
+ controlChars = code.exec(line);
164
+ }
165
+ return state;
166
+ }
167
+ function unwindState(state, ret) {
168
+ let lastBackgroundAdded = state.lastBackgroundAdded;
169
+ let lastForegroundAdded = state.lastForegroundAdded;
170
+ delete state.lastBackgroundAdded;
171
+ delete state.lastForegroundAdded;
172
+ Object.keys(state).forEach(function(key) {
173
+ if (state[key]) ret += codeCache[key].off;
174
+ });
175
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret += "\x1B[49m";
176
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret += "\x1B[39m";
177
+ return ret;
178
+ }
179
+ function rewindState(state, ret) {
180
+ let lastBackgroundAdded = state.lastBackgroundAdded;
181
+ let lastForegroundAdded = state.lastForegroundAdded;
182
+ delete state.lastBackgroundAdded;
183
+ delete state.lastForegroundAdded;
184
+ Object.keys(state).forEach(function(key) {
185
+ if (state[key]) ret = codeCache[key].on + ret;
186
+ });
187
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret = lastBackgroundAdded + ret;
188
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret = lastForegroundAdded + ret;
189
+ return ret;
190
+ }
191
+ function truncateWidth(str, desiredLength) {
192
+ if (str.length === strlen(str)) return str.substr(0, desiredLength);
193
+ while (strlen(str) > desiredLength) str = str.slice(0, -1);
194
+ return str;
195
+ }
196
+ function truncateWidthWithAnsi(str, desiredLength) {
197
+ let code = codeRegex(true);
198
+ let split = str.split(codeRegex());
199
+ let splitIndex = 0;
200
+ let retLen = 0;
201
+ let ret = "";
202
+ let myArray;
203
+ let state = {};
204
+ while (retLen < desiredLength) {
205
+ myArray = code.exec(str);
206
+ let toAdd = split[splitIndex];
207
+ splitIndex++;
208
+ if (retLen + strlen(toAdd) > desiredLength) toAdd = truncateWidth(toAdd, desiredLength - retLen);
209
+ ret += toAdd;
210
+ retLen += strlen(toAdd);
211
+ if (retLen < desiredLength) {
212
+ if (!myArray) break;
213
+ ret += myArray[0];
214
+ updateState(state, myArray);
215
+ }
216
+ }
217
+ return unwindState(state, ret);
218
+ }
219
+ function truncate(str, desiredLength, truncateChar) {
220
+ truncateChar = truncateChar || "…";
221
+ if (strlen(str) <= desiredLength) return str;
222
+ desiredLength -= strlen(truncateChar);
223
+ let ret = truncateWidthWithAnsi(str, desiredLength);
224
+ ret += truncateChar;
225
+ const hrefTag = "\x1B]8;;\x07";
226
+ if (str.includes(hrefTag) && !ret.includes(hrefTag)) ret += hrefTag;
227
+ return ret;
228
+ }
229
+ function defaultOptions() {
230
+ return {
231
+ chars: {
232
+ top: "─",
233
+ "top-mid": "┬",
234
+ "top-left": "┌",
235
+ "top-right": "┐",
236
+ bottom: "─",
237
+ "bottom-mid": "┴",
238
+ "bottom-left": "└",
239
+ "bottom-right": "┘",
240
+ left: "│",
241
+ "left-mid": "├",
242
+ mid: "─",
243
+ "mid-mid": "┼",
244
+ right: "│",
245
+ "right-mid": "┤",
246
+ middle: "│"
247
+ },
248
+ truncate: "…",
249
+ colWidths: [],
250
+ rowHeights: [],
251
+ colAligns: [],
252
+ rowAligns: [],
253
+ style: {
254
+ "padding-left": 1,
255
+ "padding-right": 1,
256
+ head: ["red"],
257
+ border: ["grey"],
258
+ compact: false
259
+ },
260
+ head: []
261
+ };
262
+ }
263
+ function mergeOptions(options, defaults) {
264
+ options = options || {};
265
+ defaults = defaults || defaultOptions();
266
+ let ret = Object.assign({}, defaults, options);
267
+ ret.chars = Object.assign({}, defaults.chars, options.chars);
268
+ ret.style = Object.assign({}, defaults.style, options.style);
269
+ return ret;
270
+ }
271
+ function wordWrap(maxLength, input) {
272
+ let lines = [];
273
+ let split = input.split(/(\s+)/g);
274
+ let line = [];
275
+ let lineLength = 0;
276
+ let whitespace;
277
+ for (let i = 0; i < split.length; i += 2) {
278
+ let word = split[i];
279
+ let newLength = lineLength + strlen(word);
280
+ if (lineLength > 0 && whitespace) newLength += whitespace.length;
281
+ if (newLength > maxLength) {
282
+ if (lineLength !== 0) lines.push(line.join(""));
283
+ line = [word];
284
+ lineLength = strlen(word);
285
+ } else {
286
+ line.push(whitespace || "", word);
287
+ lineLength = newLength;
288
+ }
289
+ whitespace = split[i + 1];
290
+ }
291
+ if (lineLength) lines.push(line.join(""));
292
+ return lines;
293
+ }
294
+ function textWrap(maxLength, input) {
295
+ let lines = [];
296
+ let line = "";
297
+ function pushLine(str, ws) {
298
+ if (line.length && ws) line += ws;
299
+ line += str;
300
+ while (line.length > maxLength) {
301
+ lines.push(line.slice(0, maxLength));
302
+ line = line.slice(maxLength);
303
+ }
304
+ }
305
+ let split = input.split(/(\s+)/g);
306
+ for (let i = 0; i < split.length; i += 2) pushLine(split[i], i && split[i - 1]);
307
+ if (line.length) lines.push(line);
308
+ return lines;
309
+ }
310
+ function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
311
+ let output = [];
312
+ input = input.split("\n");
313
+ const handler = wrapOnWordBoundary ? wordWrap : textWrap;
314
+ for (let i = 0; i < input.length; i++) output.push.apply(output, handler(maxLength, input[i]));
315
+ return output;
316
+ }
317
+ function colorizeLines(input) {
318
+ let state = {};
319
+ let output = [];
320
+ for (let i = 0; i < input.length; i++) {
321
+ let line = rewindState(state, input[i]);
322
+ state = readState(line);
323
+ let temp = Object.assign({}, state);
324
+ output.push(unwindState(temp, line));
325
+ }
326
+ return output;
327
+ }
328
+ /**
329
+ * Credit: Matheus Sampaio https://github.com/matheussampaio
330
+ */
331
+ function hyperlink(url, text) {
332
+ const OSC = "\x1B]";
333
+ const BEL = "\x07";
334
+ const SEP = ";";
335
+ return [
336
+ OSC,
337
+ "8",
338
+ SEP,
339
+ SEP,
340
+ url || text,
341
+ BEL,
342
+ text,
343
+ OSC,
344
+ "8",
345
+ SEP,
346
+ SEP,
347
+ BEL
348
+ ].join("");
349
+ }
350
+ module.exports = {
351
+ strlen,
352
+ repeat,
353
+ pad,
354
+ truncate,
355
+ mergeOptions,
356
+ wordWrap: multiLineWordWrap,
357
+ colorizeLines,
358
+ hyperlink
359
+ };
360
+ }));
361
+ //#endregion
362
+ //#region node_modules/@colors/colors/lib/styles.js
363
+ var require_styles = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
364
+ var styles = {};
365
+ module["exports"] = styles;
366
+ var codes = {
367
+ reset: [0, 0],
368
+ bold: [1, 22],
369
+ dim: [2, 22],
370
+ italic: [3, 23],
371
+ underline: [4, 24],
372
+ inverse: [7, 27],
373
+ hidden: [8, 28],
374
+ strikethrough: [9, 29],
375
+ black: [30, 39],
376
+ red: [31, 39],
377
+ green: [32, 39],
378
+ yellow: [33, 39],
379
+ blue: [34, 39],
380
+ magenta: [35, 39],
381
+ cyan: [36, 39],
382
+ white: [37, 39],
383
+ gray: [90, 39],
384
+ grey: [90, 39],
385
+ brightRed: [91, 39],
386
+ brightGreen: [92, 39],
387
+ brightYellow: [93, 39],
388
+ brightBlue: [94, 39],
389
+ brightMagenta: [95, 39],
390
+ brightCyan: [96, 39],
391
+ brightWhite: [97, 39],
392
+ bgBlack: [40, 49],
393
+ bgRed: [41, 49],
394
+ bgGreen: [42, 49],
395
+ bgYellow: [43, 49],
396
+ bgBlue: [44, 49],
397
+ bgMagenta: [45, 49],
398
+ bgCyan: [46, 49],
399
+ bgWhite: [47, 49],
400
+ bgGray: [100, 49],
401
+ bgGrey: [100, 49],
402
+ bgBrightRed: [101, 49],
403
+ bgBrightGreen: [102, 49],
404
+ bgBrightYellow: [103, 49],
405
+ bgBrightBlue: [104, 49],
406
+ bgBrightMagenta: [105, 49],
407
+ bgBrightCyan: [106, 49],
408
+ bgBrightWhite: [107, 49],
409
+ blackBG: [40, 49],
410
+ redBG: [41, 49],
411
+ greenBG: [42, 49],
412
+ yellowBG: [43, 49],
413
+ blueBG: [44, 49],
414
+ magentaBG: [45, 49],
415
+ cyanBG: [46, 49],
416
+ whiteBG: [47, 49]
417
+ };
418
+ Object.keys(codes).forEach(function(key) {
419
+ var val = codes[key];
420
+ var style = styles[key] = [];
421
+ style.open = "\x1B[" + val[0] + "m";
422
+ style.close = "\x1B[" + val[1] + "m";
423
+ });
424
+ }));
425
+ //#endregion
426
+ //#region node_modules/@colors/colors/lib/system/has-flag.js
427
+ var require_has_flag = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
428
+ module.exports = function(flag, argv) {
429
+ argv = argv || process.argv;
430
+ var terminatorPos = argv.indexOf("--");
431
+ var prefix = /^-{1,2}/.test(flag) ? "" : "--";
432
+ var pos = argv.indexOf(prefix + flag);
433
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
434
+ };
435
+ }));
436
+ //#endregion
437
+ //#region node_modules/@colors/colors/lib/system/supports-colors.js
438
+ var require_supports_colors = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
439
+ var os = require("os");
440
+ var hasFlag = require_has_flag();
441
+ var env = process.env;
442
+ var forceColor = void 0;
443
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) forceColor = false;
444
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = true;
445
+ if ("FORCE_COLOR" in env) forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
446
+ function translateLevel(level) {
447
+ if (level === 0) return false;
448
+ return {
449
+ level,
450
+ hasBasic: true,
451
+ has256: level >= 2,
452
+ has16m: level >= 3
453
+ };
454
+ }
455
+ function supportsColor(stream) {
456
+ if (forceColor === false) return 0;
457
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
458
+ if (hasFlag("color=256")) return 2;
459
+ if (stream && !stream.isTTY && forceColor !== true) return 0;
460
+ var min = forceColor ? 1 : 0;
461
+ if (process.platform === "win32") {
462
+ var osRelease = os.release().split(".");
463
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
464
+ return 1;
465
+ }
466
+ if ("CI" in env) {
467
+ if ([
468
+ "TRAVIS",
469
+ "CIRCLECI",
470
+ "APPVEYOR",
471
+ "GITLAB_CI"
472
+ ].some(function(sign) {
473
+ return sign in env;
474
+ }) || env.CI_NAME === "codeship") return 1;
475
+ return min;
476
+ }
477
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
478
+ if ("TERM_PROGRAM" in env) {
479
+ var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
480
+ switch (env.TERM_PROGRAM) {
481
+ case "iTerm.app": return version >= 3 ? 3 : 2;
482
+ case "Hyper": return 3;
483
+ case "Apple_Terminal": return 2;
484
+ }
485
+ }
486
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
487
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
488
+ if ("COLORTERM" in env) return 1;
489
+ if (env.TERM === "dumb") return min;
490
+ return min;
491
+ }
492
+ function getSupportLevel(stream) {
493
+ return translateLevel(supportsColor(stream));
494
+ }
495
+ module.exports = {
496
+ supportsColor: getSupportLevel,
497
+ stdout: getSupportLevel(process.stdout),
498
+ stderr: getSupportLevel(process.stderr)
499
+ };
500
+ }));
501
+ //#endregion
502
+ //#region node_modules/@colors/colors/lib/custom/trap.js
503
+ var require_trap = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
504
+ module["exports"] = function runTheTrap(text, options) {
505
+ var result = "";
506
+ text = text || "Run the trap, drop the bass";
507
+ text = text.split("");
508
+ var trap = {
509
+ a: [
510
+ "@",
511
+ "Ą",
512
+ "Ⱥ",
513
+ "Ʌ",
514
+ "Δ",
515
+ "Λ",
516
+ "Д"
517
+ ],
518
+ b: [
519
+ "ß",
520
+ "Ɓ",
521
+ "Ƀ",
522
+ "ɮ",
523
+ "β",
524
+ "฿"
525
+ ],
526
+ c: [
527
+ "©",
528
+ "Ȼ",
529
+ "Ͼ"
530
+ ],
531
+ d: [
532
+ "Ð",
533
+ "Ɗ",
534
+ "Ԁ",
535
+ "ԁ",
536
+ "Ԃ",
537
+ "ԃ"
538
+ ],
539
+ e: [
540
+ "Ë",
541
+ "ĕ",
542
+ "Ǝ",
543
+ "ɘ",
544
+ "Σ",
545
+ "ξ",
546
+ "Ҽ",
547
+ "੬"
548
+ ],
549
+ f: ["Ӻ"],
550
+ g: ["ɢ"],
551
+ h: [
552
+ "Ħ",
553
+ "ƕ",
554
+ "Ң",
555
+ "Һ",
556
+ "Ӈ",
557
+ "Ԋ"
558
+ ],
559
+ i: ["༏"],
560
+ j: ["Ĵ"],
561
+ k: [
562
+ "ĸ",
563
+ "Ҡ",
564
+ "Ӄ",
565
+ "Ԟ"
566
+ ],
567
+ l: ["Ĺ"],
568
+ m: [
569
+ "ʍ",
570
+ "Ӎ",
571
+ "ӎ",
572
+ "Ԡ",
573
+ "ԡ",
574
+ "൩"
575
+ ],
576
+ n: [
577
+ "Ñ",
578
+ "ŋ",
579
+ "Ɲ",
580
+ "Ͷ",
581
+ "Π",
582
+ "Ҋ"
583
+ ],
584
+ o: [
585
+ "Ø",
586
+ "õ",
587
+ "ø",
588
+ "Ǿ",
589
+ "ʘ",
590
+ "Ѻ",
591
+ "ם",
592
+ "۝",
593
+ "๏"
594
+ ],
595
+ p: ["Ƿ", "Ҏ"],
596
+ q: ["্"],
597
+ r: [
598
+ "®",
599
+ "Ʀ",
600
+ "Ȑ",
601
+ "Ɍ",
602
+ "ʀ",
603
+ "Я"
604
+ ],
605
+ s: [
606
+ "§",
607
+ "Ϟ",
608
+ "ϟ",
609
+ "Ϩ"
610
+ ],
611
+ t: [
612
+ "Ł",
613
+ "Ŧ",
614
+ "ͳ"
615
+ ],
616
+ u: ["Ʊ", "Ս"],
617
+ v: ["ט"],
618
+ w: [
619
+ "Ш",
620
+ "Ѡ",
621
+ "Ѽ",
622
+ "൰"
623
+ ],
624
+ x: [
625
+ "Ҳ",
626
+ "Ӿ",
627
+ "Ӽ",
628
+ "ӽ"
629
+ ],
630
+ y: [
631
+ "¥",
632
+ "Ұ",
633
+ "Ӌ"
634
+ ],
635
+ z: ["Ƶ", "ɀ"]
636
+ };
637
+ text.forEach(function(c) {
638
+ c = c.toLowerCase();
639
+ var chars = trap[c] || [" "];
640
+ var rand = Math.floor(Math.random() * chars.length);
641
+ if (typeof trap[c] !== "undefined") result += trap[c][rand];
642
+ else result += c;
643
+ });
644
+ return result;
645
+ };
646
+ }));
647
+ //#endregion
648
+ //#region node_modules/@colors/colors/lib/custom/zalgo.js
649
+ var require_zalgo = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
650
+ module["exports"] = function zalgo(text, options) {
651
+ text = text || " he is here ";
652
+ var soul = {
653
+ "up": [
654
+ "̍",
655
+ "̎",
656
+ "̄",
657
+ "̅",
658
+ "̿",
659
+ "̑",
660
+ "̆",
661
+ "̐",
662
+ "͒",
663
+ "͗",
664
+ "͑",
665
+ "̇",
666
+ "̈",
667
+ "̊",
668
+ "͂",
669
+ "̓",
670
+ "̈",
671
+ "͊",
672
+ "͋",
673
+ "͌",
674
+ "̃",
675
+ "̂",
676
+ "̌",
677
+ "͐",
678
+ "̀",
679
+ "́",
680
+ "̋",
681
+ "̏",
682
+ "̒",
683
+ "̓",
684
+ "̔",
685
+ "̽",
686
+ "̉",
687
+ "ͣ",
688
+ "ͤ",
689
+ "ͥ",
690
+ "ͦ",
691
+ "ͧ",
692
+ "ͨ",
693
+ "ͩ",
694
+ "ͪ",
695
+ "ͫ",
696
+ "ͬ",
697
+ "ͭ",
698
+ "ͮ",
699
+ "ͯ",
700
+ "̾",
701
+ "͛",
702
+ "͆",
703
+ "̚"
704
+ ],
705
+ "down": [
706
+ "̖",
707
+ "̗",
708
+ "̘",
709
+ "̙",
710
+ "̜",
711
+ "̝",
712
+ "̞",
713
+ "̟",
714
+ "̠",
715
+ "̤",
716
+ "̥",
717
+ "̦",
718
+ "̩",
719
+ "̪",
720
+ "̫",
721
+ "̬",
722
+ "̭",
723
+ "̮",
724
+ "̯",
725
+ "̰",
726
+ "̱",
727
+ "̲",
728
+ "̳",
729
+ "̹",
730
+ "̺",
731
+ "̻",
732
+ "̼",
733
+ "ͅ",
734
+ "͇",
735
+ "͈",
736
+ "͉",
737
+ "͍",
738
+ "͎",
739
+ "͓",
740
+ "͔",
741
+ "͕",
742
+ "͖",
743
+ "͙",
744
+ "͚",
745
+ "̣"
746
+ ],
747
+ "mid": [
748
+ "̕",
749
+ "̛",
750
+ "̀",
751
+ "́",
752
+ "͘",
753
+ "̡",
754
+ "̢",
755
+ "̧",
756
+ "̨",
757
+ "̴",
758
+ "̵",
759
+ "̶",
760
+ "͜",
761
+ "͝",
762
+ "͞",
763
+ "͟",
764
+ "͠",
765
+ "͢",
766
+ "̸",
767
+ "̷",
768
+ "͡",
769
+ " ҉"
770
+ ]
771
+ };
772
+ var all = [].concat(soul.up, soul.down, soul.mid);
773
+ function randomNumber(range) {
774
+ return Math.floor(Math.random() * range);
775
+ }
776
+ function isChar(character) {
777
+ var bool = false;
778
+ all.filter(function(i) {
779
+ bool = i === character;
780
+ });
781
+ return bool;
782
+ }
783
+ function heComes(text, options) {
784
+ var result = "";
785
+ var counts;
786
+ var l;
787
+ options = options || {};
788
+ options["up"] = typeof options["up"] !== "undefined" ? options["up"] : true;
789
+ options["mid"] = typeof options["mid"] !== "undefined" ? options["mid"] : true;
790
+ options["down"] = typeof options["down"] !== "undefined" ? options["down"] : true;
791
+ options["size"] = typeof options["size"] !== "undefined" ? options["size"] : "maxi";
792
+ text = text.split("");
793
+ for (l in text) {
794
+ if (isChar(l)) continue;
795
+ result = result + text[l];
796
+ counts = {
797
+ "up": 0,
798
+ "down": 0,
799
+ "mid": 0
800
+ };
801
+ switch (options.size) {
802
+ case "mini":
803
+ counts.up = randomNumber(8);
804
+ counts.mid = randomNumber(2);
805
+ counts.down = randomNumber(8);
806
+ break;
807
+ case "maxi":
808
+ counts.up = randomNumber(16) + 3;
809
+ counts.mid = randomNumber(4) + 1;
810
+ counts.down = randomNumber(64) + 3;
811
+ break;
812
+ default:
813
+ counts.up = randomNumber(8) + 1;
814
+ counts.mid = randomNumber(6) / 2;
815
+ counts.down = randomNumber(8) + 1;
816
+ }
817
+ var arr = [
818
+ "up",
819
+ "mid",
820
+ "down"
821
+ ];
822
+ for (var d in arr) {
823
+ var index = arr[d];
824
+ for (var i = 0; i <= counts[index]; i++) if (options[index]) result = result + soul[index][randomNumber(soul[index].length)];
825
+ }
826
+ }
827
+ return result;
828
+ }
829
+ return heComes(text, options);
830
+ };
831
+ }));
832
+ //#endregion
833
+ //#region node_modules/@colors/colors/lib/maps/america.js
834
+ var require_america = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
835
+ module["exports"] = function(colors) {
836
+ return function(letter, i, exploded) {
837
+ if (letter === " ") return letter;
838
+ switch (i % 3) {
839
+ case 0: return colors.red(letter);
840
+ case 1: return colors.white(letter);
841
+ case 2: return colors.blue(letter);
842
+ }
843
+ };
844
+ };
845
+ }));
846
+ //#endregion
847
+ //#region node_modules/@colors/colors/lib/maps/zebra.js
848
+ var require_zebra = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
849
+ module["exports"] = function(colors) {
850
+ return function(letter, i, exploded) {
851
+ return i % 2 === 0 ? letter : colors.inverse(letter);
852
+ };
853
+ };
854
+ }));
855
+ //#endregion
856
+ //#region node_modules/@colors/colors/lib/maps/rainbow.js
857
+ var require_rainbow = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
858
+ module["exports"] = function(colors) {
859
+ var rainbowColors = [
860
+ "red",
861
+ "yellow",
862
+ "green",
863
+ "blue",
864
+ "magenta"
865
+ ];
866
+ return function(letter, i, exploded) {
867
+ if (letter === " ") return letter;
868
+ else return colors[rainbowColors[i++ % rainbowColors.length]](letter);
869
+ };
870
+ };
871
+ }));
872
+ //#endregion
873
+ //#region node_modules/@colors/colors/lib/maps/random.js
874
+ var require_random = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
875
+ module["exports"] = function(colors) {
876
+ var available = [
877
+ "underline",
878
+ "inverse",
879
+ "grey",
880
+ "yellow",
881
+ "red",
882
+ "green",
883
+ "blue",
884
+ "white",
885
+ "cyan",
886
+ "magenta",
887
+ "brightYellow",
888
+ "brightRed",
889
+ "brightGreen",
890
+ "brightBlue",
891
+ "brightWhite",
892
+ "brightCyan",
893
+ "brightMagenta"
894
+ ];
895
+ return function(letter, i, exploded) {
896
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
897
+ };
898
+ };
899
+ }));
900
+ //#endregion
901
+ //#region node_modules/@colors/colors/lib/colors.js
902
+ var require_colors = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
903
+ var colors = {};
904
+ module["exports"] = colors;
905
+ colors.themes = {};
906
+ var util = require("util");
907
+ var ansiStyles = colors.styles = require_styles();
908
+ var defineProps = Object.defineProperties;
909
+ var newLineRegex = /* @__PURE__ */ new RegExp(/[\r\n]+/g);
910
+ colors.supportsColor = require_supports_colors().supportsColor;
911
+ if (typeof colors.enabled === "undefined") colors.enabled = colors.supportsColor() !== false;
912
+ colors.enable = function() {
913
+ colors.enabled = true;
914
+ };
915
+ colors.disable = function() {
916
+ colors.enabled = false;
917
+ };
918
+ colors.stripColors = colors.strip = function(str) {
919
+ return ("" + str).replace(/\x1B\[\d+m/g, "");
920
+ };
921
+ colors.stylize = function stylize(str, style) {
922
+ if (!colors.enabled) return str + "";
923
+ var styleMap = ansiStyles[style];
924
+ if (!styleMap && style in colors) return colors[style](str);
925
+ return styleMap.open + str + styleMap.close;
926
+ };
927
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
928
+ var escapeStringRegexp = function(str) {
929
+ if (typeof str !== "string") throw new TypeError("Expected a string");
930
+ return str.replace(matchOperatorsRe, "\\$&");
931
+ };
932
+ function build(_styles) {
933
+ var builder = function builder() {
934
+ return applyStyle.apply(builder, arguments);
935
+ };
936
+ builder._styles = _styles;
937
+ builder.__proto__ = proto;
938
+ return builder;
939
+ }
940
+ var styles = (function() {
941
+ var ret = {};
942
+ ansiStyles.grey = ansiStyles.gray;
943
+ Object.keys(ansiStyles).forEach(function(key) {
944
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
945
+ ret[key] = { get: function() {
946
+ return build(this._styles.concat(key));
947
+ } };
948
+ });
949
+ return ret;
950
+ })();
951
+ var proto = defineProps(function colors() {}, styles);
952
+ function applyStyle() {
953
+ var str = Array.prototype.slice.call(arguments).map(function(arg) {
954
+ if (arg != null && arg.constructor === String) return arg;
955
+ else return util.inspect(arg);
956
+ }).join(" ");
957
+ if (!colors.enabled || !str) return str;
958
+ var newLinesPresent = str.indexOf("\n") != -1;
959
+ var nestedStyles = this._styles;
960
+ var i = nestedStyles.length;
961
+ while (i--) {
962
+ var code = ansiStyles[nestedStyles[i]];
963
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
964
+ if (newLinesPresent) str = str.replace(newLineRegex, function(match) {
965
+ return code.close + match + code.open;
966
+ });
967
+ }
968
+ return str;
969
+ }
970
+ colors.setTheme = function(theme) {
971
+ if (typeof theme === "string") {
972
+ 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'));");
973
+ return;
974
+ }
975
+ for (var style in theme) (function(style) {
976
+ colors[style] = function(str) {
977
+ if (typeof theme[style] === "object") {
978
+ var out = str;
979
+ for (var i in theme[style]) out = colors[theme[style][i]](out);
980
+ return out;
981
+ }
982
+ return colors[theme[style]](str);
983
+ };
984
+ })(style);
985
+ };
986
+ function init() {
987
+ var ret = {};
988
+ Object.keys(styles).forEach(function(name) {
989
+ ret[name] = { get: function() {
990
+ return build([name]);
991
+ } };
992
+ });
993
+ return ret;
994
+ }
995
+ var sequencer = function sequencer(map, str) {
996
+ var exploded = str.split("");
997
+ exploded = exploded.map(map);
998
+ return exploded.join("");
999
+ };
1000
+ colors.trap = require_trap();
1001
+ colors.zalgo = require_zalgo();
1002
+ colors.maps = {};
1003
+ colors.maps.america = require_america()(colors);
1004
+ colors.maps.zebra = require_zebra()(colors);
1005
+ colors.maps.rainbow = require_rainbow()(colors);
1006
+ colors.maps.random = require_random()(colors);
1007
+ for (var map in colors.maps) (function(map) {
1008
+ colors[map] = function(str) {
1009
+ return sequencer(colors.maps[map], str);
1010
+ };
1011
+ })(map);
1012
+ defineProps(colors, init());
1013
+ }));
1014
+ //#endregion
1015
+ //#region node_modules/@colors/colors/safe.js
1016
+ var require_safe = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1017
+ module["exports"] = require_colors();
1018
+ }));
1019
+ //#endregion
1020
+ //#region node_modules/cli-table3/src/cell.js
1021
+ var require_cell = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1022
+ const { info, debug } = require_debug();
1023
+ const utils = require_utils();
1024
+ var Cell = class Cell {
1025
+ /**
1026
+ * A representation of a cell within the table.
1027
+ * Implementations must have `init` and `draw` methods,
1028
+ * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
1029
+ * @param options
1030
+ * @constructor
1031
+ */
1032
+ constructor(options) {
1033
+ this.setOptions(options);
1034
+ /**
1035
+ * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
1036
+ * `init` being called;
1037
+ * @type {Number}
1038
+ */
1039
+ this.x = null;
1040
+ this.y = null;
1041
+ }
1042
+ setOptions(options) {
1043
+ if ([
1044
+ "boolean",
1045
+ "number",
1046
+ "bigint",
1047
+ "string"
1048
+ ].indexOf(typeof options) !== -1) options = { content: "" + options };
1049
+ options = options || {};
1050
+ this.options = options;
1051
+ let content = options.content;
1052
+ if ([
1053
+ "boolean",
1054
+ "number",
1055
+ "bigint",
1056
+ "string"
1057
+ ].indexOf(typeof content) !== -1) this.content = String(content);
1058
+ else if (!content) this.content = this.options.href || "";
1059
+ else throw new Error("Content needs to be a primitive, got: " + typeof content);
1060
+ this.colSpan = options.colSpan || 1;
1061
+ this.rowSpan = options.rowSpan || 1;
1062
+ if (this.options.href) Object.defineProperty(this, "href", { get() {
1063
+ return this.options.href;
1064
+ } });
1065
+ }
1066
+ mergeTableOptions(tableOptions, cells) {
1067
+ this.cells = cells;
1068
+ let optionsChars = this.options.chars || {};
1069
+ let tableChars = tableOptions.chars;
1070
+ let chars = this.chars = {};
1071
+ CHAR_NAMES.forEach(function(name) {
1072
+ setOption(optionsChars, tableChars, name, chars);
1073
+ });
1074
+ this.truncate = this.options.truncate || tableOptions.truncate;
1075
+ let style = this.options.style = this.options.style || {};
1076
+ let tableStyle = tableOptions.style;
1077
+ setOption(style, tableStyle, "padding-left", this);
1078
+ setOption(style, tableStyle, "padding-right", this);
1079
+ this.head = style.head || tableStyle.head;
1080
+ this.border = style.border || tableStyle.border;
1081
+ this.fixedWidth = tableOptions.colWidths[this.x];
1082
+ this.lines = this.computeLines(tableOptions);
1083
+ this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
1084
+ this.desiredHeight = this.lines.length;
1085
+ }
1086
+ computeLines(tableOptions) {
1087
+ const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
1088
+ const { wordWrap = tableWordWrap } = this.options;
1089
+ if (this.fixedWidth && wordWrap) {
1090
+ this.fixedWidth -= this.paddingLeft + this.paddingRight;
1091
+ if (this.colSpan) {
1092
+ let i = 1;
1093
+ while (i < this.colSpan) {
1094
+ this.fixedWidth += tableOptions.colWidths[this.x + i];
1095
+ i++;
1096
+ }
1097
+ }
1098
+ const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
1099
+ const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
1100
+ return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
1101
+ }
1102
+ return this.wrapLines(this.content.split("\n"));
1103
+ }
1104
+ wrapLines(computedLines) {
1105
+ const lines = utils.colorizeLines(computedLines);
1106
+ if (this.href) return lines.map((line) => utils.hyperlink(this.href, line));
1107
+ return lines;
1108
+ }
1109
+ /**
1110
+ * Initializes the Cells data structure.
1111
+ *
1112
+ * @param tableOptions - A fully populated set of tableOptions.
1113
+ * In addition to the standard default values, tableOptions must have fully populated the
1114
+ * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
1115
+ * of columns or rows (respectively) in this table, and each array item must be a Number.
1116
+ *
1117
+ */
1118
+ init(tableOptions) {
1119
+ let x = this.x;
1120
+ let y = this.y;
1121
+ this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
1122
+ this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
1123
+ this.width = this.widths.reduce(sumPlusOne, -1);
1124
+ this.height = this.heights.reduce(sumPlusOne, -1);
1125
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
1126
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
1127
+ this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
1128
+ }
1129
+ /**
1130
+ * Draws the given line of the cell.
1131
+ * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
1132
+ * @param lineNum - can be `top`, `bottom` or a numerical line number.
1133
+ * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
1134
+ * many rows below it's being called from. Otherwise it's undefined.
1135
+ * @returns {String} The representation of this line.
1136
+ */
1137
+ draw(lineNum, spanningCell) {
1138
+ if (lineNum == "top") return this.drawTop(this.drawRight);
1139
+ if (lineNum == "bottom") return this.drawBottom(this.drawRight);
1140
+ let content = utils.truncate(this.content, 10, this.truncate);
1141
+ if (!lineNum) info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
1142
+ let padLen = Math.max(this.height - this.lines.length, 0);
1143
+ let padTop;
1144
+ switch (this.vAlign) {
1145
+ case "center":
1146
+ padTop = Math.ceil(padLen / 2);
1147
+ break;
1148
+ case "bottom":
1149
+ padTop = padLen;
1150
+ break;
1151
+ default: padTop = 0;
1152
+ }
1153
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) return this.drawEmpty(this.drawRight, spanningCell);
1154
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
1155
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
1156
+ }
1157
+ /**
1158
+ * Renders the top line of the cell.
1159
+ * @param drawRight - true if this method should render the right edge of the cell.
1160
+ * @returns {String}
1161
+ */
1162
+ drawTop(drawRight) {
1163
+ let content = [];
1164
+ if (this.cells) this.widths.forEach(function(width, index) {
1165
+ content.push(this._topLeftChar(index));
1166
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
1167
+ }, this);
1168
+ else {
1169
+ content.push(this._topLeftChar(0));
1170
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
1171
+ }
1172
+ if (drawRight) content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
1173
+ return this.wrapWithStyleColors("border", content.join(""));
1174
+ }
1175
+ _topLeftChar(offset) {
1176
+ let x = this.x + offset;
1177
+ let leftChar;
1178
+ if (this.y == 0) leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
1179
+ else if (x == 0) leftChar = "leftMid";
1180
+ else {
1181
+ leftChar = offset == 0 ? "midMid" : "bottomMid";
1182
+ if (this.cells) {
1183
+ if (this.cells[this.y - 1][x] instanceof Cell.ColSpanCell) leftChar = offset == 0 ? "topMid" : "mid";
1184
+ if (offset == 0) {
1185
+ let i = 1;
1186
+ while (this.cells[this.y][x - i] instanceof Cell.ColSpanCell) i++;
1187
+ if (this.cells[this.y][x - i] instanceof Cell.RowSpanCell) leftChar = "leftMid";
1188
+ }
1189
+ }
1190
+ }
1191
+ return this.chars[leftChar];
1192
+ }
1193
+ wrapWithStyleColors(styleProperty, content) {
1194
+ if (this[styleProperty] && this[styleProperty].length) try {
1195
+ let colors = require_safe();
1196
+ for (let i = this[styleProperty].length - 1; i >= 0; i--) colors = colors[this[styleProperty][i]];
1197
+ return colors(content);
1198
+ } catch (e) {
1199
+ return content;
1200
+ }
1201
+ else return content;
1202
+ }
1203
+ /**
1204
+ * Renders a line of text.
1205
+ * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
1206
+ * There may be top-padding above the first line of text.
1207
+ * @param drawRight - true if this method should render the right edge of the cell.
1208
+ * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
1209
+ * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
1210
+ * only include the truncation symbol if the text will not fit horizontally within the cell width.
1211
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1212
+ * @returns {String}
1213
+ */
1214
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
1215
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
1216
+ if (this.x && spanningCell && this.cells) {
1217
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1218
+ while (cellLeft instanceof ColSpanCell) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1219
+ if (!(cellLeft instanceof RowSpanCell)) left = this.chars["rightMid"];
1220
+ }
1221
+ let leftPadding = utils.repeat(" ", this.paddingLeft);
1222
+ let right = drawRight ? this.chars["right"] : "";
1223
+ let rightPadding = utils.repeat(" ", this.paddingRight);
1224
+ let line = this.lines[lineNum];
1225
+ let len = this.width - (this.paddingLeft + this.paddingRight);
1226
+ if (forceTruncationSymbol) line += this.truncate || "…";
1227
+ let content = utils.truncate(line, len, this.truncate);
1228
+ content = utils.pad(content, len, " ", this.hAlign);
1229
+ content = leftPadding + content + rightPadding;
1230
+ return this.stylizeLine(left, content, right);
1231
+ }
1232
+ stylizeLine(left, content, right) {
1233
+ left = this.wrapWithStyleColors("border", left);
1234
+ right = this.wrapWithStyleColors("border", right);
1235
+ if (this.y === 0) content = this.wrapWithStyleColors("head", content);
1236
+ return left + content + right;
1237
+ }
1238
+ /**
1239
+ * Renders the bottom line of the cell.
1240
+ * @param drawRight - true if this method should render the right edge of the cell.
1241
+ * @returns {String}
1242
+ */
1243
+ drawBottom(drawRight) {
1244
+ let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
1245
+ let content = utils.repeat(this.chars.bottom, this.width);
1246
+ let right = drawRight ? this.chars["bottomRight"] : "";
1247
+ return this.wrapWithStyleColors("border", left + content + right);
1248
+ }
1249
+ /**
1250
+ * Renders a blank line of text within the cell. Used for top and/or bottom padding.
1251
+ * @param drawRight - true if this method should render the right edge of the cell.
1252
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1253
+ * @returns {String}
1254
+ */
1255
+ drawEmpty(drawRight, spanningCell) {
1256
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
1257
+ if (this.x && spanningCell && this.cells) {
1258
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1259
+ while (cellLeft instanceof ColSpanCell) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1260
+ if (!(cellLeft instanceof RowSpanCell)) left = this.chars["rightMid"];
1261
+ }
1262
+ let right = drawRight ? this.chars["right"] : "";
1263
+ let content = utils.repeat(" ", this.width);
1264
+ return this.stylizeLine(left, content, right);
1265
+ }
1266
+ };
1267
+ var ColSpanCell = class {
1268
+ /**
1269
+ * A Cell that doesn't do anything. It just draws empty lines.
1270
+ * Used as a placeholder in column spanning.
1271
+ * @constructor
1272
+ */
1273
+ constructor() {}
1274
+ draw(lineNum) {
1275
+ if (typeof lineNum === "number") debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
1276
+ return "";
1277
+ }
1278
+ init() {}
1279
+ mergeTableOptions() {}
1280
+ };
1281
+ var RowSpanCell = class {
1282
+ /**
1283
+ * A placeholder Cell for a Cell that spans multiple rows.
1284
+ * It delegates rendering to the original cell, but adds the appropriate offset.
1285
+ * @param originalCell
1286
+ * @constructor
1287
+ */
1288
+ constructor(originalCell) {
1289
+ this.originalCell = originalCell;
1290
+ }
1291
+ init(tableOptions) {
1292
+ let y = this.y;
1293
+ let originalY = this.originalCell.y;
1294
+ this.cellOffset = y - originalY;
1295
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
1296
+ }
1297
+ draw(lineNum) {
1298
+ if (lineNum == "top") return this.originalCell.draw(this.offset, this.cellOffset);
1299
+ if (lineNum == "bottom") return this.originalCell.draw("bottom");
1300
+ debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
1301
+ return this.originalCell.draw(this.offset + 1 + lineNum);
1302
+ }
1303
+ mergeTableOptions() {}
1304
+ };
1305
+ function firstDefined(...args) {
1306
+ return args.filter((v) => v !== void 0 && v !== null).shift();
1307
+ }
1308
+ function setOption(objA, objB, nameB, targetObj) {
1309
+ let nameA = nameB.split("-");
1310
+ if (nameA.length > 1) {
1311
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
1312
+ nameA = nameA.join("");
1313
+ targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
1314
+ } else targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
1315
+ }
1316
+ function findDimension(dimensionTable, startingIndex, span) {
1317
+ let ret = dimensionTable[startingIndex];
1318
+ for (let i = 1; i < span; i++) ret += 1 + dimensionTable[startingIndex + i];
1319
+ return ret;
1320
+ }
1321
+ function sumPlusOne(a, b) {
1322
+ return a + b + 1;
1323
+ }
1324
+ let CHAR_NAMES = [
1325
+ "top",
1326
+ "top-mid",
1327
+ "top-left",
1328
+ "top-right",
1329
+ "bottom",
1330
+ "bottom-mid",
1331
+ "bottom-left",
1332
+ "bottom-right",
1333
+ "left",
1334
+ "left-mid",
1335
+ "mid",
1336
+ "mid-mid",
1337
+ "right",
1338
+ "right-mid",
1339
+ "middle"
1340
+ ];
1341
+ module.exports = Cell;
1342
+ module.exports.ColSpanCell = ColSpanCell;
1343
+ module.exports.RowSpanCell = RowSpanCell;
1344
+ }));
1345
+ //#endregion
1346
+ //#region node_modules/cli-table3/src/layout-manager.js
1347
+ var require_layout_manager = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1348
+ const { warn, debug } = require_debug();
1349
+ const Cell = require_cell();
1350
+ const { ColSpanCell, RowSpanCell } = Cell;
1351
+ (function() {
1352
+ function next(alloc, col) {
1353
+ if (alloc[col] > 0) return next(alloc, col + 1);
1354
+ return col;
1355
+ }
1356
+ function layoutTable(table) {
1357
+ let alloc = {};
1358
+ table.forEach(function(row, rowIndex) {
1359
+ let col = 0;
1360
+ row.forEach(function(cell) {
1361
+ cell.y = rowIndex;
1362
+ cell.x = rowIndex ? next(alloc, col) : col;
1363
+ const rowSpan = cell.rowSpan || 1;
1364
+ const colSpan = cell.colSpan || 1;
1365
+ if (rowSpan > 1) for (let cs = 0; cs < colSpan; cs++) alloc[cell.x + cs] = rowSpan;
1366
+ col = cell.x + colSpan;
1367
+ });
1368
+ Object.keys(alloc).forEach((idx) => {
1369
+ alloc[idx]--;
1370
+ if (alloc[idx] < 1) delete alloc[idx];
1371
+ });
1372
+ });
1373
+ }
1374
+ function maxWidth(table) {
1375
+ let mw = 0;
1376
+ table.forEach(function(row) {
1377
+ row.forEach(function(cell) {
1378
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
1379
+ });
1380
+ });
1381
+ return mw;
1382
+ }
1383
+ function maxHeight(table) {
1384
+ return table.length;
1385
+ }
1386
+ function cellsConflict(cell1, cell2) {
1387
+ let yMin1 = cell1.y;
1388
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
1389
+ let yMin2 = cell2.y;
1390
+ let yConflict = !(yMin1 > cell2.y - 1 + (cell2.rowSpan || 1) || yMin2 > yMax1);
1391
+ let xMin1 = cell1.x;
1392
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
1393
+ let xMin2 = cell2.x;
1394
+ let xConflict = !(xMin1 > cell2.x - 1 + (cell2.colSpan || 1) || xMin2 > xMax1);
1395
+ return yConflict && xConflict;
1396
+ }
1397
+ function conflictExists(rows, x, y) {
1398
+ let i_max = Math.min(rows.length - 1, y);
1399
+ let cell = {
1400
+ x,
1401
+ y
1402
+ };
1403
+ for (let i = 0; i <= i_max; i++) {
1404
+ let row = rows[i];
1405
+ for (let j = 0; j < row.length; j++) if (cellsConflict(cell, row[j])) return true;
1406
+ }
1407
+ return false;
1408
+ }
1409
+ function allBlank(rows, y, xMin, xMax) {
1410
+ for (let x = xMin; x < xMax; x++) if (conflictExists(rows, x, y)) return false;
1411
+ return true;
1412
+ }
1413
+ function addRowSpanCells(table) {
1414
+ table.forEach(function(row, rowIndex) {
1415
+ row.forEach(function(cell) {
1416
+ for (let i = 1; i < cell.rowSpan; i++) {
1417
+ let rowSpanCell = new RowSpanCell(cell);
1418
+ rowSpanCell.x = cell.x;
1419
+ rowSpanCell.y = cell.y + i;
1420
+ rowSpanCell.colSpan = cell.colSpan;
1421
+ insertCell(rowSpanCell, table[rowIndex + i]);
1422
+ }
1423
+ });
1424
+ });
1425
+ }
1426
+ function addColSpanCells(cellRows) {
1427
+ for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
1428
+ let cellColumns = cellRows[rowIndex];
1429
+ for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
1430
+ let cell = cellColumns[columnIndex];
1431
+ for (let k = 1; k < cell.colSpan; k++) {
1432
+ let colSpanCell = new ColSpanCell();
1433
+ colSpanCell.x = cell.x + k;
1434
+ colSpanCell.y = cell.y;
1435
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
1436
+ }
1437
+ }
1438
+ }
1439
+ }
1440
+ function insertCell(cell, row) {
1441
+ let x = 0;
1442
+ while (x < row.length && row[x].x < cell.x) x++;
1443
+ row.splice(x, 0, cell);
1444
+ }
1445
+ function fillInTable(table) {
1446
+ let h_max = maxHeight(table);
1447
+ let w_max = maxWidth(table);
1448
+ debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
1449
+ for (let y = 0; y < h_max; y++) for (let x = 0; x < w_max; x++) if (!conflictExists(table, x, y)) {
1450
+ let opts = {
1451
+ x,
1452
+ y,
1453
+ colSpan: 1,
1454
+ rowSpan: 1
1455
+ };
1456
+ x++;
1457
+ while (x < w_max && !conflictExists(table, x, y)) {
1458
+ opts.colSpan++;
1459
+ x++;
1460
+ }
1461
+ let y2 = y + 1;
1462
+ while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
1463
+ opts.rowSpan++;
1464
+ y2++;
1465
+ }
1466
+ let cell = new Cell(opts);
1467
+ cell.x = opts.x;
1468
+ cell.y = opts.y;
1469
+ warn(`Missing cell at ${cell.y}-${cell.x}.`);
1470
+ insertCell(cell, table[y]);
1471
+ }
1472
+ }
1473
+ function generateCells(rows) {
1474
+ return rows.map(function(row) {
1475
+ if (!Array.isArray(row)) {
1476
+ let key = Object.keys(row)[0];
1477
+ row = row[key];
1478
+ if (Array.isArray(row)) {
1479
+ row = row.slice();
1480
+ row.unshift(key);
1481
+ } else row = [key, row];
1482
+ }
1483
+ return row.map(function(cell) {
1484
+ return new Cell(cell);
1485
+ });
1486
+ });
1487
+ }
1488
+ function makeTableLayout(rows) {
1489
+ let cellRows = generateCells(rows);
1490
+ layoutTable(cellRows);
1491
+ fillInTable(cellRows);
1492
+ addRowSpanCells(cellRows);
1493
+ addColSpanCells(cellRows);
1494
+ return cellRows;
1495
+ }
1496
+ module.exports = {
1497
+ makeTableLayout,
1498
+ layoutTable,
1499
+ addRowSpanCells,
1500
+ maxWidth,
1501
+ fillInTable,
1502
+ computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
1503
+ computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
1504
+ };
1505
+ })();
1506
+ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
1507
+ return function(vals, table) {
1508
+ let result = [];
1509
+ let spanners = [];
1510
+ let auto = {};
1511
+ table.forEach(function(row) {
1512
+ row.forEach(function(cell) {
1513
+ if ((cell[colSpan] || 1) > 1) spanners.push(cell);
1514
+ else result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
1515
+ });
1516
+ });
1517
+ vals.forEach(function(val, index) {
1518
+ if (typeof val === "number") result[index] = val;
1519
+ });
1520
+ for (let k = spanners.length - 1; k >= 0; k--) {
1521
+ let cell = spanners[k];
1522
+ let span = cell[colSpan];
1523
+ let col = cell[x];
1524
+ let existingWidth = result[col];
1525
+ let editableCols = typeof vals[col] === "number" ? 0 : 1;
1526
+ if (typeof existingWidth === "number") for (let i = 1; i < span; i++) {
1527
+ existingWidth += 1 + result[col + i];
1528
+ if (typeof vals[col + i] !== "number") editableCols++;
1529
+ }
1530
+ else {
1531
+ existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
1532
+ if (!auto[col] || auto[col] < existingWidth) auto[col] = existingWidth;
1533
+ }
1534
+ if (cell[desiredWidth] > existingWidth) {
1535
+ let i = 0;
1536
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
1537
+ if (typeof vals[col + i] !== "number") {
1538
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
1539
+ existingWidth += dif;
1540
+ result[col + i] += dif;
1541
+ editableCols--;
1542
+ }
1543
+ i++;
1544
+ }
1545
+ }
1546
+ }
1547
+ Object.assign(vals, result, auto);
1548
+ for (let j = 0; j < vals.length; j++) vals[j] = Math.max(forcedMin, vals[j] || 0);
1549
+ };
1550
+ }
1551
+ }));
1552
+ //#endregion
1553
+ //#region node_modules/cli-table3/src/table.js
1554
+ var require_table = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1555
+ const debug = require_debug();
1556
+ const utils = require_utils();
1557
+ const tableLayout = require_layout_manager();
1558
+ var Table = class extends Array {
1559
+ constructor(opts) {
1560
+ super();
1561
+ const options = utils.mergeOptions(opts);
1562
+ Object.defineProperty(this, "options", {
1563
+ value: options,
1564
+ enumerable: options.debug
1565
+ });
1566
+ if (options.debug) {
1567
+ switch (typeof options.debug) {
1568
+ case "boolean":
1569
+ debug.setDebugLevel(debug.WARN);
1570
+ break;
1571
+ case "number":
1572
+ debug.setDebugLevel(options.debug);
1573
+ break;
1574
+ case "string":
1575
+ debug.setDebugLevel(parseInt(options.debug, 10));
1576
+ break;
1577
+ default:
1578
+ debug.setDebugLevel(debug.WARN);
1579
+ debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
1580
+ }
1581
+ Object.defineProperty(this, "messages", { get() {
1582
+ return debug.debugMessages();
1583
+ } });
1584
+ }
1585
+ }
1586
+ toString() {
1587
+ let array = this;
1588
+ let headersPresent = this.options.head && this.options.head.length;
1589
+ if (headersPresent) {
1590
+ array = [this.options.head];
1591
+ if (this.length) array.push.apply(array, this);
1592
+ } else this.options.style.head = [];
1593
+ let cells = tableLayout.makeTableLayout(array);
1594
+ cells.forEach(function(row) {
1595
+ row.forEach(function(cell) {
1596
+ cell.mergeTableOptions(this.options, cells);
1597
+ }, this);
1598
+ }, this);
1599
+ tableLayout.computeWidths(this.options.colWidths, cells);
1600
+ tableLayout.computeHeights(this.options.rowHeights, cells);
1601
+ cells.forEach(function(row) {
1602
+ row.forEach(function(cell) {
1603
+ cell.init(this.options);
1604
+ }, this);
1605
+ }, this);
1606
+ let result = [];
1607
+ for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
1608
+ let row = cells[rowIndex];
1609
+ let heightOfRow = this.options.rowHeights[rowIndex];
1610
+ if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) doDraw(row, "top", result);
1611
+ for (let lineNum = 0; lineNum < heightOfRow; lineNum++) doDraw(row, lineNum, result);
1612
+ if (rowIndex + 1 == cells.length) doDraw(row, "bottom", result);
1613
+ }
1614
+ return result.join("\n");
1615
+ }
1616
+ get width() {
1617
+ return this.toString().split("\n")[0].length;
1618
+ }
1619
+ };
1620
+ Table.reset = () => debug.reset();
1621
+ function doDraw(row, lineNum, result) {
1622
+ let line = [];
1623
+ row.forEach(function(cell) {
1624
+ line.push(cell.draw(lineNum));
1625
+ });
1626
+ let str = line.join("");
1627
+ if (str.length) result.push(str);
1628
+ }
1629
+ module.exports = Table;
1630
+ }));
1631
+ //#endregion
1632
+ //#region node_modules/cli-table3/index.js
1633
+ var require_cli_table3 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1634
+ module.exports = require_table();
1635
+ }));
1636
+ //#endregion
1637
+ //#region node_modules/ansi-escapes/index.js
1638
+ var require_ansi_escapes = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1639
+ const ansiEscapes = module.exports;
1640
+ module.exports.default = ansiEscapes;
1641
+ const ESC = "\x1B[";
1642
+ const OSC = "\x1B]";
1643
+ const BEL = "\x07";
1644
+ const SEP = ";";
1645
+ const isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
1646
+ ansiEscapes.cursorTo = (x, y) => {
1647
+ if (typeof x !== "number") throw new TypeError("The `x` argument is required");
1648
+ if (typeof y !== "number") return ESC + (x + 1) + "G";
1649
+ return ESC + (y + 1) + ";" + (x + 1) + "H";
1650
+ };
1651
+ ansiEscapes.cursorMove = (x, y) => {
1652
+ if (typeof x !== "number") throw new TypeError("The `x` argument is required");
1653
+ let ret = "";
1654
+ if (x < 0) ret += ESC + -x + "D";
1655
+ else if (x > 0) ret += ESC + x + "C";
1656
+ if (y < 0) ret += ESC + -y + "A";
1657
+ else if (y > 0) ret += ESC + y + "B";
1658
+ return ret;
1659
+ };
1660
+ ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
1661
+ ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
1662
+ ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
1663
+ ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
1664
+ ansiEscapes.cursorLeft = "\x1B[G";
1665
+ ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : "\x1B[s";
1666
+ ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : "\x1B[u";
1667
+ ansiEscapes.cursorGetPosition = "\x1B[6n";
1668
+ ansiEscapes.cursorNextLine = "\x1B[E";
1669
+ ansiEscapes.cursorPrevLine = "\x1B[F";
1670
+ ansiEscapes.cursorHide = "\x1B[?25l";
1671
+ ansiEscapes.cursorShow = "\x1B[?25h";
1672
+ ansiEscapes.eraseLines = (count) => {
1673
+ let clear = "";
1674
+ for (let i = 0; i < count; i++) clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
1675
+ if (count) clear += ansiEscapes.cursorLeft;
1676
+ return clear;
1677
+ };
1678
+ ansiEscapes.eraseEndLine = "\x1B[K";
1679
+ ansiEscapes.eraseStartLine = "\x1B[1K";
1680
+ ansiEscapes.eraseLine = "\x1B[2K";
1681
+ ansiEscapes.eraseDown = "\x1B[J";
1682
+ ansiEscapes.eraseUp = "\x1B[1J";
1683
+ ansiEscapes.eraseScreen = "\x1B[2J";
1684
+ ansiEscapes.scrollUp = "\x1B[S";
1685
+ ansiEscapes.scrollDown = "\x1B[T";
1686
+ ansiEscapes.clearScreen = "\x1Bc";
1687
+ ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
1688
+ ansiEscapes.beep = BEL;
1689
+ ansiEscapes.link = (text, url) => {
1690
+ return [
1691
+ OSC,
1692
+ "8",
1693
+ SEP,
1694
+ SEP,
1695
+ url,
1696
+ BEL,
1697
+ text,
1698
+ OSC,
1699
+ "8",
1700
+ SEP,
1701
+ SEP,
1702
+ BEL
1703
+ ].join("");
1704
+ };
1705
+ ansiEscapes.image = (buffer, options = {}) => {
1706
+ let ret = `${OSC}1337;File=inline=1`;
1707
+ if (options.width) ret += `;width=${options.width}`;
1708
+ if (options.height) ret += `;height=${options.height}`;
1709
+ if (options.preserveAspectRatio === false) ret += ";preserveAspectRatio=0";
1710
+ return ret + ":" + buffer.toString("base64") + BEL;
1711
+ };
1712
+ ansiEscapes.iTerm = {
1713
+ setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
1714
+ annotation: (message, options = {}) => {
1715
+ let ret = `${OSC}1337;`;
1716
+ const hasX = typeof options.x !== "undefined";
1717
+ const hasY = typeof options.y !== "undefined";
1718
+ if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
1719
+ message = message.replace(/\|/g, "");
1720
+ ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
1721
+ if (options.length > 0) ret += (hasX ? [
1722
+ message,
1723
+ options.length,
1724
+ options.x,
1725
+ options.y
1726
+ ] : [options.length, message]).join("|");
1727
+ else ret += message;
1728
+ return ret + BEL;
1729
+ }
1730
+ };
1731
+ }));
1732
+ //#endregion
1733
+ //#region node_modules/mimic-fn/index.js
1734
+ var require_mimic_fn = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1735
+ const mimicFn = (to, from) => {
1736
+ for (const prop of Reflect.ownKeys(from)) Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
1737
+ return to;
1738
+ };
1739
+ module.exports = mimicFn;
1740
+ module.exports.default = mimicFn;
1741
+ }));
1742
+ //#endregion
1743
+ //#region node_modules/onetime/index.js
1744
+ var require_onetime = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1745
+ const mimicFn = require_mimic_fn();
1746
+ const calledFunctions = /* @__PURE__ */ new WeakMap();
1747
+ const onetime = (function_, options = {}) => {
1748
+ if (typeof function_ !== "function") throw new TypeError("Expected a function");
1749
+ let returnValue;
1750
+ let callCount = 0;
1751
+ const functionName = function_.displayName || function_.name || "<anonymous>";
1752
+ const onetime = function(...arguments_) {
1753
+ calledFunctions.set(onetime, ++callCount);
1754
+ if (callCount === 1) {
1755
+ returnValue = function_.apply(this, arguments_);
1756
+ function_ = null;
1757
+ } else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
1758
+ return returnValue;
1759
+ };
1760
+ mimicFn(onetime, function_);
1761
+ calledFunctions.set(onetime, callCount);
1762
+ return onetime;
1763
+ };
1764
+ module.exports = onetime;
1765
+ module.exports.default = onetime;
1766
+ module.exports.callCount = (function_) => {
1767
+ if (!calledFunctions.has(function_)) throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
1768
+ return calledFunctions.get(function_);
1769
+ };
1770
+ }));
1771
+ //#endregion
1772
+ //#region node_modules/signal-exit/signals.js
1773
+ var require_signals = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1774
+ module.exports = [
1775
+ "SIGABRT",
1776
+ "SIGALRM",
1777
+ "SIGHUP",
1778
+ "SIGINT",
1779
+ "SIGTERM"
1780
+ ];
1781
+ if (process.platform !== "win32") module.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
1782
+ if (process.platform === "linux") module.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
1783
+ }));
1784
+ //#endregion
1785
+ //#region node_modules/signal-exit/index.js
1786
+ var require_signal_exit = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1787
+ var process = global.process;
1788
+ const processOk = function(process) {
1789
+ return process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function";
1790
+ };
1791
+ /* istanbul ignore if */
1792
+ if (!processOk(process)) module.exports = function() {
1793
+ return function() {};
1794
+ };
1795
+ else {
1796
+ var assert = require("assert");
1797
+ var signals = require_signals();
1798
+ var isWin = /^win/i.test(process.platform);
1799
+ var EE = require("events");
1800
+ /* istanbul ignore if */
1801
+ if (typeof EE !== "function") EE = EE.EventEmitter;
1802
+ var emitter;
1803
+ if (process.__signal_exit_emitter__) emitter = process.__signal_exit_emitter__;
1804
+ else {
1805
+ emitter = process.__signal_exit_emitter__ = new EE();
1806
+ emitter.count = 0;
1807
+ emitter.emitted = {};
1808
+ }
1809
+ if (!emitter.infinite) {
1810
+ emitter.setMaxListeners(Infinity);
1811
+ emitter.infinite = true;
1812
+ }
1813
+ module.exports = function(cb, opts) {
1814
+ /* istanbul ignore if */
1815
+ if (!processOk(global.process)) return function() {};
1816
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
1817
+ if (loaded === false) load();
1818
+ var ev = "exit";
1819
+ if (opts && opts.alwaysLast) ev = "afterexit";
1820
+ var remove = function() {
1821
+ emitter.removeListener(ev, cb);
1822
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) unload();
1823
+ };
1824
+ emitter.on(ev, cb);
1825
+ return remove;
1826
+ };
1827
+ var unload = function unload() {
1828
+ if (!loaded || !processOk(global.process)) return;
1829
+ loaded = false;
1830
+ signals.forEach(function(sig) {
1831
+ try {
1832
+ process.removeListener(sig, sigListeners[sig]);
1833
+ } catch (er) {}
1834
+ });
1835
+ process.emit = originalProcessEmit;
1836
+ process.reallyExit = originalProcessReallyExit;
1837
+ emitter.count -= 1;
1838
+ };
1839
+ module.exports.unload = unload;
1840
+ var emit = function emit(event, code, signal) {
1841
+ /* istanbul ignore if */
1842
+ if (emitter.emitted[event]) return;
1843
+ emitter.emitted[event] = true;
1844
+ emitter.emit(event, code, signal);
1845
+ };
1846
+ var sigListeners = {};
1847
+ signals.forEach(function(sig) {
1848
+ sigListeners[sig] = function listener() {
1849
+ /* istanbul ignore if */
1850
+ if (!processOk(global.process)) return;
1851
+ if (process.listeners(sig).length === emitter.count) {
1852
+ unload();
1853
+ emit("exit", null, sig);
1854
+ /* istanbul ignore next */
1855
+ emit("afterexit", null, sig);
1856
+ /* istanbul ignore next */
1857
+ if (isWin && sig === "SIGHUP") sig = "SIGINT";
1858
+ /* istanbul ignore next */
1859
+ process.kill(process.pid, sig);
1860
+ }
1861
+ };
1862
+ });
1863
+ module.exports.signals = function() {
1864
+ return signals;
1865
+ };
1866
+ var loaded = false;
1867
+ var load = function load() {
1868
+ if (loaded || !processOk(global.process)) return;
1869
+ loaded = true;
1870
+ emitter.count += 1;
1871
+ signals = signals.filter(function(sig) {
1872
+ try {
1873
+ process.on(sig, sigListeners[sig]);
1874
+ return true;
1875
+ } catch (er) {
1876
+ return false;
1877
+ }
1878
+ });
1879
+ process.emit = processEmit;
1880
+ process.reallyExit = processReallyExit;
1881
+ };
1882
+ module.exports.load = load;
1883
+ var originalProcessReallyExit = process.reallyExit;
1884
+ var processReallyExit = function processReallyExit(code) {
1885
+ /* istanbul ignore if */
1886
+ if (!processOk(global.process)) return;
1887
+ process.exitCode = code || /* istanbul ignore next */ 0;
1888
+ emit("exit", process.exitCode, null);
1889
+ /* istanbul ignore next */
1890
+ emit("afterexit", process.exitCode, null);
1891
+ /* istanbul ignore next */
1892
+ originalProcessReallyExit.call(process, process.exitCode);
1893
+ };
1894
+ var originalProcessEmit = process.emit;
1895
+ var processEmit = function processEmit(ev, arg) {
1896
+ if (ev === "exit" && processOk(global.process)) {
1897
+ /* istanbul ignore else */
1898
+ if (arg !== void 0) process.exitCode = arg;
1899
+ var ret = originalProcessEmit.apply(this, arguments);
1900
+ /* istanbul ignore next */
1901
+ emit("exit", process.exitCode, null);
1902
+ /* istanbul ignore next */
1903
+ emit("afterexit", process.exitCode, null);
1904
+ /* istanbul ignore next */
1905
+ return ret;
1906
+ } else return originalProcessEmit.apply(this, arguments);
1907
+ };
1908
+ }
1909
+ }));
1910
+ //#endregion
1911
+ //#region node_modules/restore-cursor/index.js
1912
+ var require_restore_cursor = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1913
+ const onetime = require_onetime();
1914
+ const signalExit = require_signal_exit();
1915
+ module.exports = onetime(() => {
1916
+ signalExit(() => {
1917
+ process.stderr.write("\x1B[?25h");
1918
+ }, { alwaysLast: true });
1919
+ });
1920
+ }));
1921
+ //#endregion
1922
+ //#region node_modules/cli-cursor/index.js
1923
+ var require_cli_cursor = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
1924
+ const restoreCursor = require_restore_cursor();
1925
+ let isHidden = false;
1926
+ exports.show = (writableStream = process.stderr) => {
1927
+ if (!writableStream.isTTY) return;
1928
+ isHidden = false;
1929
+ writableStream.write("\x1B[?25h");
1930
+ };
1931
+ exports.hide = (writableStream = process.stderr) => {
1932
+ if (!writableStream.isTTY) return;
1933
+ restoreCursor();
1934
+ isHidden = true;
1935
+ writableStream.write("\x1B[?25l");
1936
+ };
1937
+ exports.toggle = (force, writableStream) => {
1938
+ if (force !== void 0) isHidden = force;
1939
+ if (isHidden) exports.show(writableStream);
1940
+ else exports.hide(writableStream);
1941
+ };
1942
+ }));
1943
+ //#endregion
1944
+ //#region node_modules/color-name/index.js
1945
+ var require_color_name = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1946
+ module.exports = {
1947
+ "aliceblue": [
1948
+ 240,
1949
+ 248,
1950
+ 255
1951
+ ],
1952
+ "antiquewhite": [
1953
+ 250,
1954
+ 235,
1955
+ 215
1956
+ ],
1957
+ "aqua": [
1958
+ 0,
1959
+ 255,
1960
+ 255
1961
+ ],
1962
+ "aquamarine": [
1963
+ 127,
1964
+ 255,
1965
+ 212
1966
+ ],
1967
+ "azure": [
1968
+ 240,
1969
+ 255,
1970
+ 255
1971
+ ],
1972
+ "beige": [
1973
+ 245,
1974
+ 245,
1975
+ 220
1976
+ ],
1977
+ "bisque": [
1978
+ 255,
1979
+ 228,
1980
+ 196
1981
+ ],
1982
+ "black": [
1983
+ 0,
1984
+ 0,
1985
+ 0
1986
+ ],
1987
+ "blanchedalmond": [
1988
+ 255,
1989
+ 235,
1990
+ 205
1991
+ ],
1992
+ "blue": [
1993
+ 0,
1994
+ 0,
1995
+ 255
1996
+ ],
1997
+ "blueviolet": [
1998
+ 138,
1999
+ 43,
2000
+ 226
2001
+ ],
2002
+ "brown": [
2003
+ 165,
2004
+ 42,
2005
+ 42
2006
+ ],
2007
+ "burlywood": [
2008
+ 222,
2009
+ 184,
2010
+ 135
2011
+ ],
2012
+ "cadetblue": [
2013
+ 95,
2014
+ 158,
2015
+ 160
2016
+ ],
2017
+ "chartreuse": [
2018
+ 127,
2019
+ 255,
2020
+ 0
2021
+ ],
2022
+ "chocolate": [
2023
+ 210,
2024
+ 105,
2025
+ 30
2026
+ ],
2027
+ "coral": [
2028
+ 255,
2029
+ 127,
2030
+ 80
2031
+ ],
2032
+ "cornflowerblue": [
2033
+ 100,
2034
+ 149,
2035
+ 237
2036
+ ],
2037
+ "cornsilk": [
2038
+ 255,
2039
+ 248,
2040
+ 220
2041
+ ],
2042
+ "crimson": [
2043
+ 220,
2044
+ 20,
2045
+ 60
2046
+ ],
2047
+ "cyan": [
2048
+ 0,
2049
+ 255,
2050
+ 255
2051
+ ],
2052
+ "darkblue": [
2053
+ 0,
2054
+ 0,
2055
+ 139
2056
+ ],
2057
+ "darkcyan": [
2058
+ 0,
2059
+ 139,
2060
+ 139
2061
+ ],
2062
+ "darkgoldenrod": [
2063
+ 184,
2064
+ 134,
2065
+ 11
2066
+ ],
2067
+ "darkgray": [
2068
+ 169,
2069
+ 169,
2070
+ 169
2071
+ ],
2072
+ "darkgreen": [
2073
+ 0,
2074
+ 100,
2075
+ 0
2076
+ ],
2077
+ "darkgrey": [
2078
+ 169,
2079
+ 169,
2080
+ 169
2081
+ ],
2082
+ "darkkhaki": [
2083
+ 189,
2084
+ 183,
2085
+ 107
2086
+ ],
2087
+ "darkmagenta": [
2088
+ 139,
2089
+ 0,
2090
+ 139
2091
+ ],
2092
+ "darkolivegreen": [
2093
+ 85,
2094
+ 107,
2095
+ 47
2096
+ ],
2097
+ "darkorange": [
2098
+ 255,
2099
+ 140,
2100
+ 0
2101
+ ],
2102
+ "darkorchid": [
2103
+ 153,
2104
+ 50,
2105
+ 204
2106
+ ],
2107
+ "darkred": [
2108
+ 139,
2109
+ 0,
2110
+ 0
2111
+ ],
2112
+ "darksalmon": [
2113
+ 233,
2114
+ 150,
2115
+ 122
2116
+ ],
2117
+ "darkseagreen": [
2118
+ 143,
2119
+ 188,
2120
+ 143
2121
+ ],
2122
+ "darkslateblue": [
2123
+ 72,
2124
+ 61,
2125
+ 139
2126
+ ],
2127
+ "darkslategray": [
2128
+ 47,
2129
+ 79,
2130
+ 79
2131
+ ],
2132
+ "darkslategrey": [
2133
+ 47,
2134
+ 79,
2135
+ 79
2136
+ ],
2137
+ "darkturquoise": [
2138
+ 0,
2139
+ 206,
2140
+ 209
2141
+ ],
2142
+ "darkviolet": [
2143
+ 148,
2144
+ 0,
2145
+ 211
2146
+ ],
2147
+ "deeppink": [
2148
+ 255,
2149
+ 20,
2150
+ 147
2151
+ ],
2152
+ "deepskyblue": [
2153
+ 0,
2154
+ 191,
2155
+ 255
2156
+ ],
2157
+ "dimgray": [
2158
+ 105,
2159
+ 105,
2160
+ 105
2161
+ ],
2162
+ "dimgrey": [
2163
+ 105,
2164
+ 105,
2165
+ 105
2166
+ ],
2167
+ "dodgerblue": [
2168
+ 30,
2169
+ 144,
2170
+ 255
2171
+ ],
2172
+ "firebrick": [
2173
+ 178,
2174
+ 34,
2175
+ 34
2176
+ ],
2177
+ "floralwhite": [
2178
+ 255,
2179
+ 250,
2180
+ 240
2181
+ ],
2182
+ "forestgreen": [
2183
+ 34,
2184
+ 139,
2185
+ 34
2186
+ ],
2187
+ "fuchsia": [
2188
+ 255,
2189
+ 0,
2190
+ 255
2191
+ ],
2192
+ "gainsboro": [
2193
+ 220,
2194
+ 220,
2195
+ 220
2196
+ ],
2197
+ "ghostwhite": [
2198
+ 248,
2199
+ 248,
2200
+ 255
2201
+ ],
2202
+ "gold": [
2203
+ 255,
2204
+ 215,
2205
+ 0
2206
+ ],
2207
+ "goldenrod": [
2208
+ 218,
2209
+ 165,
2210
+ 32
2211
+ ],
2212
+ "gray": [
2213
+ 128,
2214
+ 128,
2215
+ 128
2216
+ ],
2217
+ "green": [
2218
+ 0,
2219
+ 128,
2220
+ 0
2221
+ ],
2222
+ "greenyellow": [
2223
+ 173,
2224
+ 255,
2225
+ 47
2226
+ ],
2227
+ "grey": [
2228
+ 128,
2229
+ 128,
2230
+ 128
2231
+ ],
2232
+ "honeydew": [
2233
+ 240,
2234
+ 255,
2235
+ 240
2236
+ ],
2237
+ "hotpink": [
2238
+ 255,
2239
+ 105,
2240
+ 180
2241
+ ],
2242
+ "indianred": [
2243
+ 205,
2244
+ 92,
2245
+ 92
2246
+ ],
2247
+ "indigo": [
2248
+ 75,
2249
+ 0,
2250
+ 130
2251
+ ],
2252
+ "ivory": [
2253
+ 255,
2254
+ 255,
2255
+ 240
2256
+ ],
2257
+ "khaki": [
2258
+ 240,
2259
+ 230,
2260
+ 140
2261
+ ],
2262
+ "lavender": [
2263
+ 230,
2264
+ 230,
2265
+ 250
2266
+ ],
2267
+ "lavenderblush": [
2268
+ 255,
2269
+ 240,
2270
+ 245
2271
+ ],
2272
+ "lawngreen": [
2273
+ 124,
2274
+ 252,
2275
+ 0
2276
+ ],
2277
+ "lemonchiffon": [
2278
+ 255,
2279
+ 250,
2280
+ 205
2281
+ ],
2282
+ "lightblue": [
2283
+ 173,
2284
+ 216,
2285
+ 230
2286
+ ],
2287
+ "lightcoral": [
2288
+ 240,
2289
+ 128,
2290
+ 128
2291
+ ],
2292
+ "lightcyan": [
2293
+ 224,
2294
+ 255,
2295
+ 255
2296
+ ],
2297
+ "lightgoldenrodyellow": [
2298
+ 250,
2299
+ 250,
2300
+ 210
2301
+ ],
2302
+ "lightgray": [
2303
+ 211,
2304
+ 211,
2305
+ 211
2306
+ ],
2307
+ "lightgreen": [
2308
+ 144,
2309
+ 238,
2310
+ 144
2311
+ ],
2312
+ "lightgrey": [
2313
+ 211,
2314
+ 211,
2315
+ 211
2316
+ ],
2317
+ "lightpink": [
2318
+ 255,
2319
+ 182,
2320
+ 193
2321
+ ],
2322
+ "lightsalmon": [
2323
+ 255,
2324
+ 160,
2325
+ 122
2326
+ ],
2327
+ "lightseagreen": [
2328
+ 32,
2329
+ 178,
2330
+ 170
2331
+ ],
2332
+ "lightskyblue": [
2333
+ 135,
2334
+ 206,
2335
+ 250
2336
+ ],
2337
+ "lightslategray": [
2338
+ 119,
2339
+ 136,
2340
+ 153
2341
+ ],
2342
+ "lightslategrey": [
2343
+ 119,
2344
+ 136,
2345
+ 153
2346
+ ],
2347
+ "lightsteelblue": [
2348
+ 176,
2349
+ 196,
2350
+ 222
2351
+ ],
2352
+ "lightyellow": [
2353
+ 255,
2354
+ 255,
2355
+ 224
2356
+ ],
2357
+ "lime": [
2358
+ 0,
2359
+ 255,
2360
+ 0
2361
+ ],
2362
+ "limegreen": [
2363
+ 50,
2364
+ 205,
2365
+ 50
2366
+ ],
2367
+ "linen": [
2368
+ 250,
2369
+ 240,
2370
+ 230
2371
+ ],
2372
+ "magenta": [
2373
+ 255,
2374
+ 0,
2375
+ 255
2376
+ ],
2377
+ "maroon": [
2378
+ 128,
2379
+ 0,
2380
+ 0
2381
+ ],
2382
+ "mediumaquamarine": [
2383
+ 102,
2384
+ 205,
2385
+ 170
2386
+ ],
2387
+ "mediumblue": [
2388
+ 0,
2389
+ 0,
2390
+ 205
2391
+ ],
2392
+ "mediumorchid": [
2393
+ 186,
2394
+ 85,
2395
+ 211
2396
+ ],
2397
+ "mediumpurple": [
2398
+ 147,
2399
+ 112,
2400
+ 219
2401
+ ],
2402
+ "mediumseagreen": [
2403
+ 60,
2404
+ 179,
2405
+ 113
2406
+ ],
2407
+ "mediumslateblue": [
2408
+ 123,
2409
+ 104,
2410
+ 238
2411
+ ],
2412
+ "mediumspringgreen": [
2413
+ 0,
2414
+ 250,
2415
+ 154
2416
+ ],
2417
+ "mediumturquoise": [
2418
+ 72,
2419
+ 209,
2420
+ 204
2421
+ ],
2422
+ "mediumvioletred": [
2423
+ 199,
2424
+ 21,
2425
+ 133
2426
+ ],
2427
+ "midnightblue": [
2428
+ 25,
2429
+ 25,
2430
+ 112
2431
+ ],
2432
+ "mintcream": [
2433
+ 245,
2434
+ 255,
2435
+ 250
2436
+ ],
2437
+ "mistyrose": [
2438
+ 255,
2439
+ 228,
2440
+ 225
2441
+ ],
2442
+ "moccasin": [
2443
+ 255,
2444
+ 228,
2445
+ 181
2446
+ ],
2447
+ "navajowhite": [
2448
+ 255,
2449
+ 222,
2450
+ 173
2451
+ ],
2452
+ "navy": [
2453
+ 0,
2454
+ 0,
2455
+ 128
2456
+ ],
2457
+ "oldlace": [
2458
+ 253,
2459
+ 245,
2460
+ 230
2461
+ ],
2462
+ "olive": [
2463
+ 128,
2464
+ 128,
2465
+ 0
2466
+ ],
2467
+ "olivedrab": [
2468
+ 107,
2469
+ 142,
2470
+ 35
2471
+ ],
2472
+ "orange": [
2473
+ 255,
2474
+ 165,
2475
+ 0
2476
+ ],
2477
+ "orangered": [
2478
+ 255,
2479
+ 69,
2480
+ 0
2481
+ ],
2482
+ "orchid": [
2483
+ 218,
2484
+ 112,
2485
+ 214
2486
+ ],
2487
+ "palegoldenrod": [
2488
+ 238,
2489
+ 232,
2490
+ 170
2491
+ ],
2492
+ "palegreen": [
2493
+ 152,
2494
+ 251,
2495
+ 152
2496
+ ],
2497
+ "paleturquoise": [
2498
+ 175,
2499
+ 238,
2500
+ 238
2501
+ ],
2502
+ "palevioletred": [
2503
+ 219,
2504
+ 112,
2505
+ 147
2506
+ ],
2507
+ "papayawhip": [
2508
+ 255,
2509
+ 239,
2510
+ 213
2511
+ ],
2512
+ "peachpuff": [
2513
+ 255,
2514
+ 218,
2515
+ 185
2516
+ ],
2517
+ "peru": [
2518
+ 205,
2519
+ 133,
2520
+ 63
2521
+ ],
2522
+ "pink": [
2523
+ 255,
2524
+ 192,
2525
+ 203
2526
+ ],
2527
+ "plum": [
2528
+ 221,
2529
+ 160,
2530
+ 221
2531
+ ],
2532
+ "powderblue": [
2533
+ 176,
2534
+ 224,
2535
+ 230
2536
+ ],
2537
+ "purple": [
2538
+ 128,
2539
+ 0,
2540
+ 128
2541
+ ],
2542
+ "rebeccapurple": [
2543
+ 102,
2544
+ 51,
2545
+ 153
2546
+ ],
2547
+ "red": [
2548
+ 255,
2549
+ 0,
2550
+ 0
2551
+ ],
2552
+ "rosybrown": [
2553
+ 188,
2554
+ 143,
2555
+ 143
2556
+ ],
2557
+ "royalblue": [
2558
+ 65,
2559
+ 105,
2560
+ 225
2561
+ ],
2562
+ "saddlebrown": [
2563
+ 139,
2564
+ 69,
2565
+ 19
2566
+ ],
2567
+ "salmon": [
2568
+ 250,
2569
+ 128,
2570
+ 114
2571
+ ],
2572
+ "sandybrown": [
2573
+ 244,
2574
+ 164,
2575
+ 96
2576
+ ],
2577
+ "seagreen": [
2578
+ 46,
2579
+ 139,
2580
+ 87
2581
+ ],
2582
+ "seashell": [
2583
+ 255,
2584
+ 245,
2585
+ 238
2586
+ ],
2587
+ "sienna": [
2588
+ 160,
2589
+ 82,
2590
+ 45
2591
+ ],
2592
+ "silver": [
2593
+ 192,
2594
+ 192,
2595
+ 192
2596
+ ],
2597
+ "skyblue": [
2598
+ 135,
2599
+ 206,
2600
+ 235
2601
+ ],
2602
+ "slateblue": [
2603
+ 106,
2604
+ 90,
2605
+ 205
2606
+ ],
2607
+ "slategray": [
2608
+ 112,
2609
+ 128,
2610
+ 144
2611
+ ],
2612
+ "slategrey": [
2613
+ 112,
2614
+ 128,
2615
+ 144
2616
+ ],
2617
+ "snow": [
2618
+ 255,
2619
+ 250,
2620
+ 250
2621
+ ],
2622
+ "springgreen": [
2623
+ 0,
2624
+ 255,
2625
+ 127
2626
+ ],
2627
+ "steelblue": [
2628
+ 70,
2629
+ 130,
2630
+ 180
2631
+ ],
2632
+ "tan": [
2633
+ 210,
2634
+ 180,
2635
+ 140
2636
+ ],
2637
+ "teal": [
2638
+ 0,
2639
+ 128,
2640
+ 128
2641
+ ],
2642
+ "thistle": [
2643
+ 216,
2644
+ 191,
2645
+ 216
2646
+ ],
2647
+ "tomato": [
2648
+ 255,
2649
+ 99,
2650
+ 71
2651
+ ],
2652
+ "turquoise": [
2653
+ 64,
2654
+ 224,
2655
+ 208
2656
+ ],
2657
+ "violet": [
2658
+ 238,
2659
+ 130,
2660
+ 238
2661
+ ],
2662
+ "wheat": [
2663
+ 245,
2664
+ 222,
2665
+ 179
2666
+ ],
2667
+ "white": [
2668
+ 255,
2669
+ 255,
2670
+ 255
2671
+ ],
2672
+ "whitesmoke": [
2673
+ 245,
2674
+ 245,
2675
+ 245
2676
+ ],
2677
+ "yellow": [
2678
+ 255,
2679
+ 255,
2680
+ 0
2681
+ ],
2682
+ "yellowgreen": [
2683
+ 154,
2684
+ 205,
2685
+ 50
2686
+ ]
2687
+ };
2688
+ }));
2689
+ //#endregion
2690
+ //#region node_modules/color-convert/conversions.js
2691
+ var require_conversions = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
2692
+ const cssKeywords = require_color_name();
2693
+ const reverseKeywords = {};
2694
+ for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
2695
+ const convert = {
2696
+ rgb: {
2697
+ channels: 3,
2698
+ labels: "rgb"
2699
+ },
2700
+ hsl: {
2701
+ channels: 3,
2702
+ labels: "hsl"
2703
+ },
2704
+ hsv: {
2705
+ channels: 3,
2706
+ labels: "hsv"
2707
+ },
2708
+ hwb: {
2709
+ channels: 3,
2710
+ labels: "hwb"
2711
+ },
2712
+ cmyk: {
2713
+ channels: 4,
2714
+ labels: "cmyk"
2715
+ },
2716
+ xyz: {
2717
+ channels: 3,
2718
+ labels: "xyz"
2719
+ },
2720
+ lab: {
2721
+ channels: 3,
2722
+ labels: "lab"
2723
+ },
2724
+ lch: {
2725
+ channels: 3,
2726
+ labels: "lch"
2727
+ },
2728
+ hex: {
2729
+ channels: 1,
2730
+ labels: ["hex"]
2731
+ },
2732
+ keyword: {
2733
+ channels: 1,
2734
+ labels: ["keyword"]
2735
+ },
2736
+ ansi16: {
2737
+ channels: 1,
2738
+ labels: ["ansi16"]
2739
+ },
2740
+ ansi256: {
2741
+ channels: 1,
2742
+ labels: ["ansi256"]
2743
+ },
2744
+ hcg: {
2745
+ channels: 3,
2746
+ labels: [
2747
+ "h",
2748
+ "c",
2749
+ "g"
2750
+ ]
2751
+ },
2752
+ apple: {
2753
+ channels: 3,
2754
+ labels: [
2755
+ "r16",
2756
+ "g16",
2757
+ "b16"
2758
+ ]
2759
+ },
2760
+ gray: {
2761
+ channels: 1,
2762
+ labels: ["gray"]
2763
+ }
2764
+ };
2765
+ module.exports = convert;
2766
+ for (const model of Object.keys(convert)) {
2767
+ if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
2768
+ if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
2769
+ if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
2770
+ const { channels, labels } = convert[model];
2771
+ delete convert[model].channels;
2772
+ delete convert[model].labels;
2773
+ Object.defineProperty(convert[model], "channels", { value: channels });
2774
+ Object.defineProperty(convert[model], "labels", { value: labels });
2775
+ }
2776
+ convert.rgb.hsl = function(rgb) {
2777
+ const r = rgb[0] / 255;
2778
+ const g = rgb[1] / 255;
2779
+ const b = rgb[2] / 255;
2780
+ const min = Math.min(r, g, b);
2781
+ const max = Math.max(r, g, b);
2782
+ const delta = max - min;
2783
+ let h;
2784
+ let s;
2785
+ if (max === min) h = 0;
2786
+ else if (r === max) h = (g - b) / delta;
2787
+ else if (g === max) h = 2 + (b - r) / delta;
2788
+ else if (b === max) h = 4 + (r - g) / delta;
2789
+ h = Math.min(h * 60, 360);
2790
+ if (h < 0) h += 360;
2791
+ const l = (min + max) / 2;
2792
+ if (max === min) s = 0;
2793
+ else if (l <= .5) s = delta / (max + min);
2794
+ else s = delta / (2 - max - min);
2795
+ return [
2796
+ h,
2797
+ s * 100,
2798
+ l * 100
2799
+ ];
2800
+ };
2801
+ convert.rgb.hsv = function(rgb) {
2802
+ let rdif;
2803
+ let gdif;
2804
+ let bdif;
2805
+ let h;
2806
+ let s;
2807
+ const r = rgb[0] / 255;
2808
+ const g = rgb[1] / 255;
2809
+ const b = rgb[2] / 255;
2810
+ const v = Math.max(r, g, b);
2811
+ const diff = v - Math.min(r, g, b);
2812
+ const diffc = function(c) {
2813
+ return (v - c) / 6 / diff + 1 / 2;
2814
+ };
2815
+ if (diff === 0) {
2816
+ h = 0;
2817
+ s = 0;
2818
+ } else {
2819
+ s = diff / v;
2820
+ rdif = diffc(r);
2821
+ gdif = diffc(g);
2822
+ bdif = diffc(b);
2823
+ if (r === v) h = bdif - gdif;
2824
+ else if (g === v) h = 1 / 3 + rdif - bdif;
2825
+ else if (b === v) h = 2 / 3 + gdif - rdif;
2826
+ if (h < 0) h += 1;
2827
+ else if (h > 1) h -= 1;
2828
+ }
2829
+ return [
2830
+ h * 360,
2831
+ s * 100,
2832
+ v * 100
2833
+ ];
2834
+ };
2835
+ convert.rgb.hwb = function(rgb) {
2836
+ const r = rgb[0];
2837
+ const g = rgb[1];
2838
+ let b = rgb[2];
2839
+ const h = convert.rgb.hsl(rgb)[0];
2840
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
2841
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
2842
+ return [
2843
+ h,
2844
+ w * 100,
2845
+ b * 100
2846
+ ];
2847
+ };
2848
+ convert.rgb.cmyk = function(rgb) {
2849
+ const r = rgb[0] / 255;
2850
+ const g = rgb[1] / 255;
2851
+ const b = rgb[2] / 255;
2852
+ const k = Math.min(1 - r, 1 - g, 1 - b);
2853
+ const c = (1 - r - k) / (1 - k) || 0;
2854
+ const m = (1 - g - k) / (1 - k) || 0;
2855
+ const y = (1 - b - k) / (1 - k) || 0;
2856
+ return [
2857
+ c * 100,
2858
+ m * 100,
2859
+ y * 100,
2860
+ k * 100
2861
+ ];
2862
+ };
2863
+ function comparativeDistance(x, y) {
2864
+ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
2865
+ }
2866
+ convert.rgb.keyword = function(rgb) {
2867
+ const reversed = reverseKeywords[rgb];
2868
+ if (reversed) return reversed;
2869
+ let currentClosestDistance = Infinity;
2870
+ let currentClosestKeyword;
2871
+ for (const keyword of Object.keys(cssKeywords)) {
2872
+ const value = cssKeywords[keyword];
2873
+ const distance = comparativeDistance(rgb, value);
2874
+ if (distance < currentClosestDistance) {
2875
+ currentClosestDistance = distance;
2876
+ currentClosestKeyword = keyword;
2877
+ }
2878
+ }
2879
+ return currentClosestKeyword;
2880
+ };
2881
+ convert.keyword.rgb = function(keyword) {
2882
+ return cssKeywords[keyword];
2883
+ };
2884
+ convert.rgb.xyz = function(rgb) {
2885
+ let r = rgb[0] / 255;
2886
+ let g = rgb[1] / 255;
2887
+ let b = rgb[2] / 255;
2888
+ r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
2889
+ g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
2890
+ b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
2891
+ const x = r * .4124 + g * .3576 + b * .1805;
2892
+ const y = r * .2126 + g * .7152 + b * .0722;
2893
+ const z = r * .0193 + g * .1192 + b * .9505;
2894
+ return [
2895
+ x * 100,
2896
+ y * 100,
2897
+ z * 100
2898
+ ];
2899
+ };
2900
+ convert.rgb.lab = function(rgb) {
2901
+ const xyz = convert.rgb.xyz(rgb);
2902
+ let x = xyz[0];
2903
+ let y = xyz[1];
2904
+ let z = xyz[2];
2905
+ x /= 95.047;
2906
+ y /= 100;
2907
+ z /= 108.883;
2908
+ x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
2909
+ y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
2910
+ z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
2911
+ return [
2912
+ 116 * y - 16,
2913
+ 500 * (x - y),
2914
+ 200 * (y - z)
2915
+ ];
2916
+ };
2917
+ convert.hsl.rgb = function(hsl) {
2918
+ const h = hsl[0] / 360;
2919
+ const s = hsl[1] / 100;
2920
+ const l = hsl[2] / 100;
2921
+ let t2;
2922
+ let t3;
2923
+ let val;
2924
+ if (s === 0) {
2925
+ val = l * 255;
2926
+ return [
2927
+ val,
2928
+ val,
2929
+ val
2930
+ ];
2931
+ }
2932
+ if (l < .5) t2 = l * (1 + s);
2933
+ else t2 = l + s - l * s;
2934
+ const t1 = 2 * l - t2;
2935
+ const rgb = [
2936
+ 0,
2937
+ 0,
2938
+ 0
2939
+ ];
2940
+ for (let i = 0; i < 3; i++) {
2941
+ t3 = h + 1 / 3 * -(i - 1);
2942
+ if (t3 < 0) t3++;
2943
+ if (t3 > 1) t3--;
2944
+ if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
2945
+ else if (2 * t3 < 1) val = t2;
2946
+ else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
2947
+ else val = t1;
2948
+ rgb[i] = val * 255;
2949
+ }
2950
+ return rgb;
2951
+ };
2952
+ convert.hsl.hsv = function(hsl) {
2953
+ const h = hsl[0];
2954
+ let s = hsl[1] / 100;
2955
+ let l = hsl[2] / 100;
2956
+ let smin = s;
2957
+ const lmin = Math.max(l, .01);
2958
+ l *= 2;
2959
+ s *= l <= 1 ? l : 2 - l;
2960
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
2961
+ const v = (l + s) / 2;
2962
+ return [
2963
+ h,
2964
+ (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
2965
+ v * 100
2966
+ ];
2967
+ };
2968
+ convert.hsv.rgb = function(hsv) {
2969
+ const h = hsv[0] / 60;
2970
+ const s = hsv[1] / 100;
2971
+ let v = hsv[2] / 100;
2972
+ const hi = Math.floor(h) % 6;
2973
+ const f = h - Math.floor(h);
2974
+ const p = 255 * v * (1 - s);
2975
+ const q = 255 * v * (1 - s * f);
2976
+ const t = 255 * v * (1 - s * (1 - f));
2977
+ v *= 255;
2978
+ switch (hi) {
2979
+ case 0: return [
2980
+ v,
2981
+ t,
2982
+ p
2983
+ ];
2984
+ case 1: return [
2985
+ q,
2986
+ v,
2987
+ p
2988
+ ];
2989
+ case 2: return [
2990
+ p,
2991
+ v,
2992
+ t
2993
+ ];
2994
+ case 3: return [
2995
+ p,
2996
+ q,
2997
+ v
2998
+ ];
2999
+ case 4: return [
3000
+ t,
3001
+ p,
3002
+ v
3003
+ ];
3004
+ case 5: return [
3005
+ v,
3006
+ p,
3007
+ q
3008
+ ];
3009
+ }
3010
+ };
3011
+ convert.hsv.hsl = function(hsv) {
3012
+ const h = hsv[0];
3013
+ const s = hsv[1] / 100;
3014
+ const v = hsv[2] / 100;
3015
+ const vmin = Math.max(v, .01);
3016
+ let sl;
3017
+ let l;
3018
+ l = (2 - s) * v;
3019
+ const lmin = (2 - s) * vmin;
3020
+ sl = s * vmin;
3021
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
3022
+ sl = sl || 0;
3023
+ l /= 2;
3024
+ return [
3025
+ h,
3026
+ sl * 100,
3027
+ l * 100
3028
+ ];
3029
+ };
3030
+ convert.hwb.rgb = function(hwb) {
3031
+ const h = hwb[0] / 360;
3032
+ let wh = hwb[1] / 100;
3033
+ let bl = hwb[2] / 100;
3034
+ const ratio = wh + bl;
3035
+ let f;
3036
+ if (ratio > 1) {
3037
+ wh /= ratio;
3038
+ bl /= ratio;
3039
+ }
3040
+ const i = Math.floor(6 * h);
3041
+ const v = 1 - bl;
3042
+ f = 6 * h - i;
3043
+ if ((i & 1) !== 0) f = 1 - f;
3044
+ const n = wh + f * (v - wh);
3045
+ let r;
3046
+ let g;
3047
+ let b;
3048
+ switch (i) {
3049
+ default:
3050
+ case 6:
3051
+ case 0:
3052
+ r = v;
3053
+ g = n;
3054
+ b = wh;
3055
+ break;
3056
+ case 1:
3057
+ r = n;
3058
+ g = v;
3059
+ b = wh;
3060
+ break;
3061
+ case 2:
3062
+ r = wh;
3063
+ g = v;
3064
+ b = n;
3065
+ break;
3066
+ case 3:
3067
+ r = wh;
3068
+ g = n;
3069
+ b = v;
3070
+ break;
3071
+ case 4:
3072
+ r = n;
3073
+ g = wh;
3074
+ b = v;
3075
+ break;
3076
+ case 5:
3077
+ r = v;
3078
+ g = wh;
3079
+ b = n;
3080
+ }
3081
+ return [
3082
+ r * 255,
3083
+ g * 255,
3084
+ b * 255
3085
+ ];
3086
+ };
3087
+ convert.cmyk.rgb = function(cmyk) {
3088
+ const c = cmyk[0] / 100;
3089
+ const m = cmyk[1] / 100;
3090
+ const y = cmyk[2] / 100;
3091
+ const k = cmyk[3] / 100;
3092
+ const r = 1 - Math.min(1, c * (1 - k) + k);
3093
+ const g = 1 - Math.min(1, m * (1 - k) + k);
3094
+ const b = 1 - Math.min(1, y * (1 - k) + k);
3095
+ return [
3096
+ r * 255,
3097
+ g * 255,
3098
+ b * 255
3099
+ ];
3100
+ };
3101
+ convert.xyz.rgb = function(xyz) {
3102
+ const x = xyz[0] / 100;
3103
+ const y = xyz[1] / 100;
3104
+ const z = xyz[2] / 100;
3105
+ let r;
3106
+ let g;
3107
+ let b;
3108
+ r = x * 3.2406 + y * -1.5372 + z * -.4986;
3109
+ g = x * -.9689 + y * 1.8758 + z * .0415;
3110
+ b = x * .0557 + y * -.204 + z * 1.057;
3111
+ r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
3112
+ g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
3113
+ b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
3114
+ r = Math.min(Math.max(0, r), 1);
3115
+ g = Math.min(Math.max(0, g), 1);
3116
+ b = Math.min(Math.max(0, b), 1);
3117
+ return [
3118
+ r * 255,
3119
+ g * 255,
3120
+ b * 255
3121
+ ];
3122
+ };
3123
+ convert.xyz.lab = function(xyz) {
3124
+ let x = xyz[0];
3125
+ let y = xyz[1];
3126
+ let z = xyz[2];
3127
+ x /= 95.047;
3128
+ y /= 100;
3129
+ z /= 108.883;
3130
+ x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
3131
+ y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
3132
+ z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
3133
+ return [
3134
+ 116 * y - 16,
3135
+ 500 * (x - y),
3136
+ 200 * (y - z)
3137
+ ];
3138
+ };
3139
+ convert.lab.xyz = function(lab) {
3140
+ const l = lab[0];
3141
+ const a = lab[1];
3142
+ const b = lab[2];
3143
+ let x;
3144
+ let y;
3145
+ let z;
3146
+ y = (l + 16) / 116;
3147
+ x = a / 500 + y;
3148
+ z = y - b / 200;
3149
+ const y2 = y ** 3;
3150
+ const x2 = x ** 3;
3151
+ const z2 = z ** 3;
3152
+ y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
3153
+ x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
3154
+ z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
3155
+ x *= 95.047;
3156
+ y *= 100;
3157
+ z *= 108.883;
3158
+ return [
3159
+ x,
3160
+ y,
3161
+ z
3162
+ ];
3163
+ };
3164
+ convert.lab.lch = function(lab) {
3165
+ const l = lab[0];
3166
+ const a = lab[1];
3167
+ const b = lab[2];
3168
+ let h;
3169
+ h = Math.atan2(b, a) * 360 / 2 / Math.PI;
3170
+ if (h < 0) h += 360;
3171
+ return [
3172
+ l,
3173
+ Math.sqrt(a * a + b * b),
3174
+ h
3175
+ ];
3176
+ };
3177
+ convert.lch.lab = function(lch) {
3178
+ const l = lch[0];
3179
+ const c = lch[1];
3180
+ const hr = lch[2] / 360 * 2 * Math.PI;
3181
+ return [
3182
+ l,
3183
+ c * Math.cos(hr),
3184
+ c * Math.sin(hr)
3185
+ ];
3186
+ };
3187
+ convert.rgb.ansi16 = function(args, saturation = null) {
3188
+ const [r, g, b] = args;
3189
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
3190
+ value = Math.round(value / 50);
3191
+ if (value === 0) return 30;
3192
+ let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
3193
+ if (value === 2) ansi += 60;
3194
+ return ansi;
3195
+ };
3196
+ convert.hsv.ansi16 = function(args) {
3197
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
3198
+ };
3199
+ convert.rgb.ansi256 = function(args) {
3200
+ const r = args[0];
3201
+ const g = args[1];
3202
+ const b = args[2];
3203
+ if (r === g && g === b) {
3204
+ if (r < 8) return 16;
3205
+ if (r > 248) return 231;
3206
+ return Math.round((r - 8) / 247 * 24) + 232;
3207
+ }
3208
+ return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
3209
+ };
3210
+ convert.ansi16.rgb = function(args) {
3211
+ let color = args % 10;
3212
+ if (color === 0 || color === 7) {
3213
+ if (args > 50) color += 3.5;
3214
+ color = color / 10.5 * 255;
3215
+ return [
3216
+ color,
3217
+ color,
3218
+ color
3219
+ ];
3220
+ }
3221
+ const mult = (~~(args > 50) + 1) * .5;
3222
+ return [
3223
+ (color & 1) * mult * 255,
3224
+ (color >> 1 & 1) * mult * 255,
3225
+ (color >> 2 & 1) * mult * 255
3226
+ ];
3227
+ };
3228
+ convert.ansi256.rgb = function(args) {
3229
+ if (args >= 232) {
3230
+ const c = (args - 232) * 10 + 8;
3231
+ return [
3232
+ c,
3233
+ c,
3234
+ c
3235
+ ];
3236
+ }
3237
+ args -= 16;
3238
+ let rem;
3239
+ return [
3240
+ Math.floor(args / 36) / 5 * 255,
3241
+ Math.floor((rem = args % 36) / 6) / 5 * 255,
3242
+ rem % 6 / 5 * 255
3243
+ ];
3244
+ };
3245
+ convert.rgb.hex = function(args) {
3246
+ const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
3247
+ return "000000".substring(string.length) + string;
3248
+ };
3249
+ convert.hex.rgb = function(args) {
3250
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
3251
+ if (!match) return [
3252
+ 0,
3253
+ 0,
3254
+ 0
3255
+ ];
3256
+ let colorString = match[0];
3257
+ if (match[0].length === 3) colorString = colorString.split("").map((char) => {
3258
+ return char + char;
3259
+ }).join("");
3260
+ const integer = parseInt(colorString, 16);
3261
+ return [
3262
+ integer >> 16 & 255,
3263
+ integer >> 8 & 255,
3264
+ integer & 255
3265
+ ];
3266
+ };
3267
+ convert.rgb.hcg = function(rgb) {
3268
+ const r = rgb[0] / 255;
3269
+ const g = rgb[1] / 255;
3270
+ const b = rgb[2] / 255;
3271
+ const max = Math.max(Math.max(r, g), b);
3272
+ const min = Math.min(Math.min(r, g), b);
3273
+ const chroma = max - min;
3274
+ let grayscale;
3275
+ let hue;
3276
+ if (chroma < 1) grayscale = min / (1 - chroma);
3277
+ else grayscale = 0;
3278
+ if (chroma <= 0) hue = 0;
3279
+ else if (max === r) hue = (g - b) / chroma % 6;
3280
+ else if (max === g) hue = 2 + (b - r) / chroma;
3281
+ else hue = 4 + (r - g) / chroma;
3282
+ hue /= 6;
3283
+ hue %= 1;
3284
+ return [
3285
+ hue * 360,
3286
+ chroma * 100,
3287
+ grayscale * 100
3288
+ ];
3289
+ };
3290
+ convert.hsl.hcg = function(hsl) {
3291
+ const s = hsl[1] / 100;
3292
+ const l = hsl[2] / 100;
3293
+ const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
3294
+ let f = 0;
3295
+ if (c < 1) f = (l - .5 * c) / (1 - c);
3296
+ return [
3297
+ hsl[0],
3298
+ c * 100,
3299
+ f * 100
3300
+ ];
3301
+ };
3302
+ convert.hsv.hcg = function(hsv) {
3303
+ const s = hsv[1] / 100;
3304
+ const v = hsv[2] / 100;
3305
+ const c = s * v;
3306
+ let f = 0;
3307
+ if (c < 1) f = (v - c) / (1 - c);
3308
+ return [
3309
+ hsv[0],
3310
+ c * 100,
3311
+ f * 100
3312
+ ];
3313
+ };
3314
+ convert.hcg.rgb = function(hcg) {
3315
+ const h = hcg[0] / 360;
3316
+ const c = hcg[1] / 100;
3317
+ const g = hcg[2] / 100;
3318
+ if (c === 0) return [
3319
+ g * 255,
3320
+ g * 255,
3321
+ g * 255
3322
+ ];
3323
+ const pure = [
3324
+ 0,
3325
+ 0,
3326
+ 0
3327
+ ];
3328
+ const hi = h % 1 * 6;
3329
+ const v = hi % 1;
3330
+ const w = 1 - v;
3331
+ let mg = 0;
3332
+ switch (Math.floor(hi)) {
3333
+ case 0:
3334
+ pure[0] = 1;
3335
+ pure[1] = v;
3336
+ pure[2] = 0;
3337
+ break;
3338
+ case 1:
3339
+ pure[0] = w;
3340
+ pure[1] = 1;
3341
+ pure[2] = 0;
3342
+ break;
3343
+ case 2:
3344
+ pure[0] = 0;
3345
+ pure[1] = 1;
3346
+ pure[2] = v;
3347
+ break;
3348
+ case 3:
3349
+ pure[0] = 0;
3350
+ pure[1] = w;
3351
+ pure[2] = 1;
3352
+ break;
3353
+ case 4:
3354
+ pure[0] = v;
3355
+ pure[1] = 0;
3356
+ pure[2] = 1;
3357
+ break;
3358
+ default:
3359
+ pure[0] = 1;
3360
+ pure[1] = 0;
3361
+ pure[2] = w;
3362
+ }
3363
+ mg = (1 - c) * g;
3364
+ return [
3365
+ (c * pure[0] + mg) * 255,
3366
+ (c * pure[1] + mg) * 255,
3367
+ (c * pure[2] + mg) * 255
3368
+ ];
3369
+ };
3370
+ convert.hcg.hsv = function(hcg) {
3371
+ const c = hcg[1] / 100;
3372
+ const v = c + hcg[2] / 100 * (1 - c);
3373
+ let f = 0;
3374
+ if (v > 0) f = c / v;
3375
+ return [
3376
+ hcg[0],
3377
+ f * 100,
3378
+ v * 100
3379
+ ];
3380
+ };
3381
+ convert.hcg.hsl = function(hcg) {
3382
+ const c = hcg[1] / 100;
3383
+ const l = hcg[2] / 100 * (1 - c) + .5 * c;
3384
+ let s = 0;
3385
+ if (l > 0 && l < .5) s = c / (2 * l);
3386
+ else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
3387
+ return [
3388
+ hcg[0],
3389
+ s * 100,
3390
+ l * 100
3391
+ ];
3392
+ };
3393
+ convert.hcg.hwb = function(hcg) {
3394
+ const c = hcg[1] / 100;
3395
+ const v = c + hcg[2] / 100 * (1 - c);
3396
+ return [
3397
+ hcg[0],
3398
+ (v - c) * 100,
3399
+ (1 - v) * 100
3400
+ ];
3401
+ };
3402
+ convert.hwb.hcg = function(hwb) {
3403
+ const w = hwb[1] / 100;
3404
+ const v = 1 - hwb[2] / 100;
3405
+ const c = v - w;
3406
+ let g = 0;
3407
+ if (c < 1) g = (v - c) / (1 - c);
3408
+ return [
3409
+ hwb[0],
3410
+ c * 100,
3411
+ g * 100
3412
+ ];
3413
+ };
3414
+ convert.apple.rgb = function(apple) {
3415
+ return [
3416
+ apple[0] / 65535 * 255,
3417
+ apple[1] / 65535 * 255,
3418
+ apple[2] / 65535 * 255
3419
+ ];
3420
+ };
3421
+ convert.rgb.apple = function(rgb) {
3422
+ return [
3423
+ rgb[0] / 255 * 65535,
3424
+ rgb[1] / 255 * 65535,
3425
+ rgb[2] / 255 * 65535
3426
+ ];
3427
+ };
3428
+ convert.gray.rgb = function(args) {
3429
+ return [
3430
+ args[0] / 100 * 255,
3431
+ args[0] / 100 * 255,
3432
+ args[0] / 100 * 255
3433
+ ];
3434
+ };
3435
+ convert.gray.hsl = function(args) {
3436
+ return [
3437
+ 0,
3438
+ 0,
3439
+ args[0]
3440
+ ];
3441
+ };
3442
+ convert.gray.hsv = convert.gray.hsl;
3443
+ convert.gray.hwb = function(gray) {
3444
+ return [
3445
+ 0,
3446
+ 100,
3447
+ gray[0]
3448
+ ];
3449
+ };
3450
+ convert.gray.cmyk = function(gray) {
3451
+ return [
3452
+ 0,
3453
+ 0,
3454
+ 0,
3455
+ gray[0]
3456
+ ];
3457
+ };
3458
+ convert.gray.lab = function(gray) {
3459
+ return [
3460
+ gray[0],
3461
+ 0,
3462
+ 0
3463
+ ];
3464
+ };
3465
+ convert.gray.hex = function(gray) {
3466
+ const val = Math.round(gray[0] / 100 * 255) & 255;
3467
+ const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
3468
+ return "000000".substring(string.length) + string;
3469
+ };
3470
+ convert.rgb.gray = function(rgb) {
3471
+ return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
3472
+ };
3473
+ }));
3474
+ //#endregion
3475
+ //#region node_modules/color-convert/route.js
3476
+ var require_route = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3477
+ const conversions = require_conversions();
3478
+ function buildGraph() {
3479
+ const graph = {};
3480
+ const models = Object.keys(conversions);
3481
+ for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
3482
+ distance: -1,
3483
+ parent: null
3484
+ };
3485
+ return graph;
3486
+ }
3487
+ function deriveBFS(fromModel) {
3488
+ const graph = buildGraph();
3489
+ const queue = [fromModel];
3490
+ graph[fromModel].distance = 0;
3491
+ while (queue.length) {
3492
+ const current = queue.pop();
3493
+ const adjacents = Object.keys(conversions[current]);
3494
+ for (let len = adjacents.length, i = 0; i < len; i++) {
3495
+ const adjacent = adjacents[i];
3496
+ const node = graph[adjacent];
3497
+ if (node.distance === -1) {
3498
+ node.distance = graph[current].distance + 1;
3499
+ node.parent = current;
3500
+ queue.unshift(adjacent);
3501
+ }
3502
+ }
3503
+ }
3504
+ return graph;
3505
+ }
3506
+ function link(from, to) {
3507
+ return function(args) {
3508
+ return to(from(args));
3509
+ };
3510
+ }
3511
+ function wrapConversion(toModel, graph) {
3512
+ const path = [graph[toModel].parent, toModel];
3513
+ let fn = conversions[graph[toModel].parent][toModel];
3514
+ let cur = graph[toModel].parent;
3515
+ while (graph[cur].parent) {
3516
+ path.unshift(graph[cur].parent);
3517
+ fn = link(conversions[graph[cur].parent][cur], fn);
3518
+ cur = graph[cur].parent;
3519
+ }
3520
+ fn.conversion = path;
3521
+ return fn;
3522
+ }
3523
+ module.exports = function(fromModel) {
3524
+ const graph = deriveBFS(fromModel);
3525
+ const conversion = {};
3526
+ const models = Object.keys(graph);
3527
+ for (let len = models.length, i = 0; i < len; i++) {
3528
+ const toModel = models[i];
3529
+ if (graph[toModel].parent === null) continue;
3530
+ conversion[toModel] = wrapConversion(toModel, graph);
3531
+ }
3532
+ return conversion;
3533
+ };
3534
+ }));
3535
+ //#endregion
3536
+ //#region node_modules/color-convert/index.js
3537
+ var require_color_convert = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3538
+ const conversions = require_conversions();
3539
+ const route = require_route();
3540
+ const convert = {};
3541
+ const models = Object.keys(conversions);
3542
+ function wrapRaw(fn) {
3543
+ const wrappedFn = function(...args) {
3544
+ const arg0 = args[0];
3545
+ if (arg0 === void 0 || arg0 === null) return arg0;
3546
+ if (arg0.length > 1) args = arg0;
3547
+ return fn(args);
3548
+ };
3549
+ if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
3550
+ return wrappedFn;
3551
+ }
3552
+ function wrapRounded(fn) {
3553
+ const wrappedFn = function(...args) {
3554
+ const arg0 = args[0];
3555
+ if (arg0 === void 0 || arg0 === null) return arg0;
3556
+ if (arg0.length > 1) args = arg0;
3557
+ const result = fn(args);
3558
+ if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
3559
+ return result;
3560
+ };
3561
+ if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
3562
+ return wrappedFn;
3563
+ }
3564
+ models.forEach((fromModel) => {
3565
+ convert[fromModel] = {};
3566
+ Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
3567
+ Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
3568
+ const routes = route(fromModel);
3569
+ Object.keys(routes).forEach((toModel) => {
3570
+ const fn = routes[toModel];
3571
+ convert[fromModel][toModel] = wrapRounded(fn);
3572
+ convert[fromModel][toModel].raw = wrapRaw(fn);
3573
+ });
3574
+ });
3575
+ module.exports = convert;
3576
+ }));
3577
+ //#endregion
3578
+ //#region node_modules/ansi-styles/index.js
3579
+ var require_ansi_styles = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3580
+ const wrapAnsi16 = (fn, offset) => (...args) => {
3581
+ return `\u001B[${fn(...args) + offset}m`;
3582
+ };
3583
+ const wrapAnsi256 = (fn, offset) => (...args) => {
3584
+ const code = fn(...args);
3585
+ return `\u001B[${38 + offset};5;${code}m`;
3586
+ };
3587
+ const wrapAnsi16m = (fn, offset) => (...args) => {
3588
+ const rgb = fn(...args);
3589
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
3590
+ };
3591
+ const ansi2ansi = (n) => n;
3592
+ const rgb2rgb = (r, g, b) => [
3593
+ r,
3594
+ g,
3595
+ b
3596
+ ];
3597
+ const setLazyProperty = (object, property, get) => {
3598
+ Object.defineProperty(object, property, {
3599
+ get: () => {
3600
+ const value = get();
3601
+ Object.defineProperty(object, property, {
3602
+ value,
3603
+ enumerable: true,
3604
+ configurable: true
3605
+ });
3606
+ return value;
3607
+ },
3608
+ enumerable: true,
3609
+ configurable: true
3610
+ });
3611
+ };
3612
+ /** @type {typeof import('color-convert')} */
3613
+ let colorConvert;
3614
+ const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
3615
+ if (colorConvert === void 0) colorConvert = require_color_convert();
3616
+ const offset = isBackground ? 10 : 0;
3617
+ const styles = {};
3618
+ for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
3619
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
3620
+ if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
3621
+ else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
3622
+ }
3623
+ return styles;
3624
+ };
3625
+ function assembleStyles() {
3626
+ const codes = /* @__PURE__ */ new Map();
3627
+ const styles = {
3628
+ modifier: {
3629
+ reset: [0, 0],
3630
+ bold: [1, 22],
3631
+ dim: [2, 22],
3632
+ italic: [3, 23],
3633
+ underline: [4, 24],
3634
+ inverse: [7, 27],
3635
+ hidden: [8, 28],
3636
+ strikethrough: [9, 29]
3637
+ },
3638
+ color: {
3639
+ black: [30, 39],
3640
+ red: [31, 39],
3641
+ green: [32, 39],
3642
+ yellow: [33, 39],
3643
+ blue: [34, 39],
3644
+ magenta: [35, 39],
3645
+ cyan: [36, 39],
3646
+ white: [37, 39],
3647
+ blackBright: [90, 39],
3648
+ redBright: [91, 39],
3649
+ greenBright: [92, 39],
3650
+ yellowBright: [93, 39],
3651
+ blueBright: [94, 39],
3652
+ magentaBright: [95, 39],
3653
+ cyanBright: [96, 39],
3654
+ whiteBright: [97, 39]
3655
+ },
3656
+ bgColor: {
3657
+ bgBlack: [40, 49],
3658
+ bgRed: [41, 49],
3659
+ bgGreen: [42, 49],
3660
+ bgYellow: [43, 49],
3661
+ bgBlue: [44, 49],
3662
+ bgMagenta: [45, 49],
3663
+ bgCyan: [46, 49],
3664
+ bgWhite: [47, 49],
3665
+ bgBlackBright: [100, 49],
3666
+ bgRedBright: [101, 49],
3667
+ bgGreenBright: [102, 49],
3668
+ bgYellowBright: [103, 49],
3669
+ bgBlueBright: [104, 49],
3670
+ bgMagentaBright: [105, 49],
3671
+ bgCyanBright: [106, 49],
3672
+ bgWhiteBright: [107, 49]
3673
+ }
3674
+ };
3675
+ styles.color.gray = styles.color.blackBright;
3676
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
3677
+ styles.color.grey = styles.color.blackBright;
3678
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
3679
+ for (const [groupName, group] of Object.entries(styles)) {
3680
+ for (const [styleName, style] of Object.entries(group)) {
3681
+ styles[styleName] = {
3682
+ open: `\u001B[${style[0]}m`,
3683
+ close: `\u001B[${style[1]}m`
3684
+ };
3685
+ group[styleName] = styles[styleName];
3686
+ codes.set(style[0], style[1]);
3687
+ }
3688
+ Object.defineProperty(styles, groupName, {
3689
+ value: group,
3690
+ enumerable: false
3691
+ });
3692
+ }
3693
+ Object.defineProperty(styles, "codes", {
3694
+ value: codes,
3695
+ enumerable: false
3696
+ });
3697
+ styles.color.close = "\x1B[39m";
3698
+ styles.bgColor.close = "\x1B[49m";
3699
+ setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
3700
+ setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
3701
+ setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
3702
+ setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
3703
+ setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
3704
+ setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
3705
+ return styles;
3706
+ }
3707
+ Object.defineProperty(module, "exports", {
3708
+ enumerable: true,
3709
+ get: assembleStyles
3710
+ });
3711
+ }));
3712
+ //#endregion
3713
+ //#region node_modules/wrap-ansi/index.js
3714
+ var require_wrap_ansi = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3715
+ const stringWidth = require_string_width();
3716
+ const stripAnsi = require_strip_ansi();
3717
+ const ansiStyles = require_ansi_styles();
3718
+ const ESCAPES = /* @__PURE__ */ new Set(["\x1B", "›"]);
3719
+ const END_CODE = 39;
3720
+ const wrapAnsi = (code) => `${ESCAPES.values().next().value}[${code}m`;
3721
+ const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
3722
+ const wrapWord = (rows, word, columns) => {
3723
+ const characters = [...word];
3724
+ let isInsideEscape = false;
3725
+ let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
3726
+ for (const [index, character] of characters.entries()) {
3727
+ const characterLength = stringWidth(character);
3728
+ if (visible + characterLength <= columns) rows[rows.length - 1] += character;
3729
+ else {
3730
+ rows.push(character);
3731
+ visible = 0;
3732
+ }
3733
+ if (ESCAPES.has(character)) isInsideEscape = true;
3734
+ else if (isInsideEscape && character === "m") {
3735
+ isInsideEscape = false;
3736
+ continue;
3737
+ }
3738
+ if (isInsideEscape) continue;
3739
+ visible += characterLength;
3740
+ if (visible === columns && index < characters.length - 1) {
3741
+ rows.push("");
3742
+ visible = 0;
3743
+ }
3744
+ }
3745
+ if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
3746
+ };
3747
+ const stringVisibleTrimSpacesRight = (str) => {
3748
+ const words = str.split(" ");
3749
+ let last = words.length;
3750
+ while (last > 0) {
3751
+ if (stringWidth(words[last - 1]) > 0) break;
3752
+ last--;
3753
+ }
3754
+ if (last === words.length) return str;
3755
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
3756
+ };
3757
+ const exec = (string, columns, options = {}) => {
3758
+ if (options.trim !== false && string.trim() === "") return "";
3759
+ let pre = "";
3760
+ let ret = "";
3761
+ let escapeCode;
3762
+ const lengths = wordLengths(string);
3763
+ let rows = [""];
3764
+ for (const [index, word] of string.split(" ").entries()) {
3765
+ if (options.trim !== false) rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
3766
+ let rowLength = stringWidth(rows[rows.length - 1]);
3767
+ if (index !== 0) {
3768
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
3769
+ rows.push("");
3770
+ rowLength = 0;
3771
+ }
3772
+ if (rowLength > 0 || options.trim === false) {
3773
+ rows[rows.length - 1] += " ";
3774
+ rowLength++;
3775
+ }
3776
+ }
3777
+ if (options.hard && lengths[index] > columns) {
3778
+ const remainingColumns = columns - rowLength;
3779
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
3780
+ if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
3781
+ wrapWord(rows, word, columns);
3782
+ continue;
3783
+ }
3784
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
3785
+ if (options.wordWrap === false && rowLength < columns) {
3786
+ wrapWord(rows, word, columns);
3787
+ continue;
3788
+ }
3789
+ rows.push("");
3790
+ }
3791
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
3792
+ wrapWord(rows, word, columns);
3793
+ continue;
3794
+ }
3795
+ rows[rows.length - 1] += word;
3796
+ }
3797
+ if (options.trim !== false) rows = rows.map(stringVisibleTrimSpacesRight);
3798
+ pre = rows.join("\n");
3799
+ for (const [index, character] of [...pre].entries()) {
3800
+ ret += character;
3801
+ if (ESCAPES.has(character)) {
3802
+ const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
3803
+ escapeCode = code === END_CODE ? null : code;
3804
+ }
3805
+ const code = ansiStyles.codes.get(Number(escapeCode));
3806
+ if (escapeCode && code) {
3807
+ if (pre[index + 1] === "\n") ret += wrapAnsi(code);
3808
+ else if (character === "\n") ret += wrapAnsi(escapeCode);
3809
+ }
3810
+ }
3811
+ return ret;
3812
+ };
3813
+ module.exports = (string, columns, options) => {
3814
+ return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
3815
+ };
3816
+ }));
3817
+ //#endregion
3818
+ //#region node_modules/astral-regex/index.js
3819
+ var require_astral_regex = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3820
+ const regex = "[\ud800-\udbff][\udc00-\udfff]";
3821
+ const astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g");
3822
+ module.exports = astralRegex;
3823
+ }));
3824
+ //#endregion
3825
+ //#region node_modules/slice-ansi/index.js
3826
+ var require_slice_ansi = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3827
+ const isFullwidthCodePoint = require_is_fullwidth_code_point();
3828
+ const astralRegex = require_astral_regex();
3829
+ const ansiStyles = require_ansi_styles();
3830
+ const ESCAPES = ["\x1B", "›"];
3831
+ const wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`;
3832
+ const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
3833
+ let output = [];
3834
+ ansiCodes = [...ansiCodes];
3835
+ for (let ansiCode of ansiCodes) {
3836
+ const ansiCodeOrigin = ansiCode;
3837
+ if (ansiCode.includes(";")) ansiCode = ansiCode.split(";")[0][0] + "0";
3838
+ const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
3839
+ if (item) {
3840
+ const indexEscape = ansiCodes.indexOf(item.toString());
3841
+ if (indexEscape === -1) output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
3842
+ else ansiCodes.splice(indexEscape, 1);
3843
+ } else if (isEscapes) {
3844
+ output.push(wrapAnsi(0));
3845
+ break;
3846
+ } else output.push(wrapAnsi(ansiCodeOrigin));
3847
+ }
3848
+ if (isEscapes) {
3849
+ output = output.filter((element, index) => output.indexOf(element) === index);
3850
+ if (endAnsiCode !== void 0) {
3851
+ const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
3852
+ output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
3853
+ }
3854
+ }
3855
+ return output.join("");
3856
+ };
3857
+ module.exports = (string, begin, end) => {
3858
+ const characters = [...string];
3859
+ const ansiCodes = [];
3860
+ let stringEnd = typeof end === "number" ? end : characters.length;
3861
+ let isInsideEscape = false;
3862
+ let ansiCode;
3863
+ let visible = 0;
3864
+ let output = "";
3865
+ for (const [index, character] of characters.entries()) {
3866
+ let leftEscape = false;
3867
+ if (ESCAPES.includes(character)) {
3868
+ const code = /\d[^m]*/.exec(string.slice(index, index + 18));
3869
+ ansiCode = code && code.length > 0 ? code[0] : void 0;
3870
+ if (visible < stringEnd) {
3871
+ isInsideEscape = true;
3872
+ if (ansiCode !== void 0) ansiCodes.push(ansiCode);
3873
+ }
3874
+ } else if (isInsideEscape && character === "m") {
3875
+ isInsideEscape = false;
3876
+ leftEscape = true;
3877
+ }
3878
+ if (!isInsideEscape && !leftEscape) visible++;
3879
+ if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) {
3880
+ visible++;
3881
+ if (typeof end !== "number") stringEnd++;
3882
+ }
3883
+ if (visible > begin && visible <= stringEnd) output += character;
3884
+ else if (visible === begin && !isInsideEscape && ansiCode !== void 0) output = checkAnsi(ansiCodes);
3885
+ else if (visible >= stringEnd) {
3886
+ output += checkAnsi(ansiCodes, true, ansiCode);
3887
+ break;
3888
+ }
3889
+ }
3890
+ return output;
3891
+ };
3892
+ }));
3893
+ //#endregion
3894
+ //#region node_modules/log-update/index.js
3895
+ var require_log_update = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
3896
+ const ansiEscapes = require_ansi_escapes();
3897
+ const cliCursor = require_cli_cursor();
3898
+ const wrapAnsi = require_wrap_ansi();
3899
+ const sliceAnsi = require_slice_ansi();
3900
+ const defaultTerminalHeight = 24;
3901
+ const getWidth = (stream) => {
3902
+ const { columns } = stream;
3903
+ if (!columns) return 80;
3904
+ return columns;
3905
+ };
3906
+ const fitToTerminalHeight = (stream, text) => {
3907
+ const terminalHeight = stream.rows || defaultTerminalHeight;
3908
+ const lines = text.split("\n");
3909
+ const toRemove = lines.length - terminalHeight;
3910
+ if (toRemove <= 0) return text;
3911
+ return sliceAnsi(text, lines.slice(0, toRemove).join("\n").length + 1, text.length);
3912
+ };
3913
+ const main = (stream, { showCursor = false } = {}) => {
3914
+ let previousLineCount = 0;
3915
+ let previousWidth = getWidth(stream);
3916
+ let previousOutput = "";
3917
+ const render = (...args) => {
3918
+ if (!showCursor) cliCursor.hide();
3919
+ let output = args.join(" ") + "\n";
3920
+ output = fitToTerminalHeight(stream, output);
3921
+ const width = getWidth(stream);
3922
+ if (output === previousOutput && previousWidth === width) return;
3923
+ previousOutput = output;
3924
+ previousWidth = width;
3925
+ output = wrapAnsi(output, width, {
3926
+ trim: false,
3927
+ hard: true,
3928
+ wordWrap: false
3929
+ });
3930
+ stream.write(ansiEscapes.eraseLines(previousLineCount) + output);
3931
+ previousLineCount = output.split("\n").length;
3932
+ };
3933
+ render.clear = () => {
3934
+ stream.write(ansiEscapes.eraseLines(previousLineCount));
3935
+ previousOutput = "";
3936
+ previousWidth = getWidth(stream);
3937
+ previousLineCount = 0;
3938
+ };
3939
+ render.done = () => {
3940
+ previousOutput = "";
3941
+ previousWidth = getWidth(stream);
3942
+ previousLineCount = 0;
3943
+ if (!showCursor) cliCursor.show();
3944
+ };
3945
+ return render;
3946
+ };
3947
+ module.exports = main(process.stdout);
3948
+ module.exports.stderr = main(process.stderr);
3949
+ module.exports.create = main;
3950
+ }));
3951
+ //#endregion
3952
+ //#region node_modules/uuid/dist-node/stringify.js
3953
+ const byteToHex = [];
3954
+ for (let i = 0; i < 256; ++i) byteToHex.push((i + 256).toString(16).slice(1));
3955
+ function unsafeStringify(arr, offset = 0) {
3956
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3957
+ }
3958
+ //#endregion
3959
+ //#region node_modules/uuid/dist-node/rng.js
3960
+ const rnds8 = /* @__PURE__ */ new Uint8Array(16);
3961
+ function rng() {
3962
+ return crypto.getRandomValues(rnds8);
3963
+ }
3964
+ //#endregion
3965
+ //#region node_modules/uuid/dist-node/v4.js
3966
+ function v4(options, buf, offset) {
3967
+ if (!buf && !options && crypto.randomUUID) return crypto.randomUUID();
3968
+ return _v4(options, buf, offset);
3969
+ }
3970
+ function _v4(options, buf, offset) {
3971
+ options = options || {};
3972
+ const rnds = options.random ?? options.rng?.() ?? rng();
3973
+ if (rnds.length < 16) throw new Error("Random bytes length must be >= 16");
3974
+ rnds[6] = rnds[6] & 15 | 64;
3975
+ rnds[8] = rnds[8] & 63 | 128;
3976
+ if (buf) {
3977
+ offset = offset || 0;
3978
+ if (offset < 0 || offset + 16 > buf.length) throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
3979
+ for (let i = 0; i < 16; ++i) buf[offset + i] = rnds[i];
3980
+ return buf;
3981
+ }
3982
+ return unsafeStringify(rnds);
3983
+ }
3984
+ //#endregion
3985
+ //#region src/utils/Console.ts
3986
+ var import_cli_table3 = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_cli_table3(), 1);
3987
+ var import_log_update = require_log_update();
3988
+ const arcSpinner = { frames: [
3989
+ "◜",
3990
+ "◠",
3991
+ "◝",
3992
+ "◞",
3993
+ "◡",
3994
+ "◟"
3995
+ ] };
3996
+ const { appendTextToFile } = require_ColorTheme.frodo.utils;
3997
+ const indicators = /* @__PURE__ */ new Map();
3998
+ let renderInterval = null;
3999
+ function writeObjectToStderr(message, depth, color = (value) => value) {
4000
+ console.error(color((0, node_util.inspect)(message, {
4001
+ depth,
4002
+ colors: false
4003
+ })));
4004
+ }
4005
+ /**
4006
+ * Output a message in default color to stdout or append to `state.getOutputFile()`
4007
+ * @param {string | object} message the message
4008
+ */
4009
+ function data(message, newline = true) {
4010
+ if (message === null || message === void 0 || message === "") return;
4011
+ if (require_ColorTheme.state.getOutputFile()) {
4012
+ if (typeof message === "object") message = JSON.stringify(message, null, 2);
4013
+ if (newline) message += "\n";
4014
+ appendTextToFile(message, require_ColorTheme.state.getOutputFile());
4015
+ } else if (typeof message === "object") console.dir(message, {
4016
+ depth: 10,
4017
+ maxArrayLength: null,
4018
+ colors: process.env.NO_COLOR === void 0
4019
+ });
4020
+ else if (newline) console.log(message);
4021
+ else process.stdout.write(message);
4022
+ }
4023
+ /**
4024
+ * Output a default color message to stderr
4025
+ * @param {Object} message the message
4026
+ */
4027
+ function text(message, newline = true) {
4028
+ if (!message) return;
4029
+ if (typeof message === "object") writeObjectToStderr(message, 3);
4030
+ else if (newline) console.error(message);
4031
+ else process.stderr.write(message);
4032
+ }
4033
+ /**
4034
+ * Output a message in the "positive" color to stderr
4035
+ * @param {Object} message the message
4036
+ */
4037
+ function success(message, newline = true) {
4038
+ if (!message) return;
4039
+ if (typeof message === "object") writeObjectToStderr(message, 3, require_ColorTheme.theme.positive);
4040
+ else if (newline) console.error(require_ColorTheme.theme.positive(message));
4041
+ else process.stderr.write(require_ColorTheme.theme.positive(message));
4042
+ }
4043
+ /**
4044
+ * Output a message in cyan to stderr
4045
+ * @param {Object} message the message
4046
+ */
4047
+ function info(message, newline = true) {
4048
+ if (!message) return;
4049
+ if (typeof message === "object") writeObjectToStderr(message, 3, require_ColorTheme.theme.command);
4050
+ else if (newline) console.error(require_ColorTheme.theme.command(message));
4051
+ else process.stderr.write(require_ColorTheme.theme.command(message));
4052
+ }
4053
+ /**
4054
+ * Output a message in yellow to stderr
4055
+ * @param {Object} message the message
4056
+ */
4057
+ function warn(message, newline = true) {
4058
+ if (!message) return;
4059
+ if (typeof message === "object") writeObjectToStderr(message, 3, require_ColorTheme.theme.warning);
4060
+ else if (newline) console.error(require_ColorTheme.theme.warning(message));
4061
+ else process.stderr.write(require_ColorTheme.theme.warning(message));
4062
+ }
4063
+ /**
4064
+ * Output a message in red to stderr
4065
+ * @param {Object} message the message
4066
+ */
4067
+ function error(message, newline = true) {
4068
+ if (!message) return;
4069
+ if (typeof message === "object") writeObjectToStderr(message, 3, require_ColorTheme.theme.error);
4070
+ else if (newline) console.error(require_ColorTheme.theme.error(message));
4071
+ else process.stderr.write(require_ColorTheme.theme.error(message));
4072
+ }
4073
+ /**
4074
+ * Output a debug message
4075
+ * @param {string | object} message the message
4076
+ */
4077
+ function debug(message, newline = true) {
4078
+ if (!message) return;
4079
+ if (typeof message === "object") writeObjectToStderr(message, 6, require_ColorTheme.theme.debug);
4080
+ else if (newline) console.error(require_ColorTheme.theme.debug(message));
4081
+ else process.stderr.write(require_ColorTheme.theme.debug(message));
4082
+ }
4083
+ /**
4084
+ * Output a curlirize message
4085
+ * @param {string} message the message
4086
+ */
4087
+ function curlirize(message) {
4088
+ if (!message) return;
4089
+ printMessage(require_ColorTheme.theme.command(message));
4090
+ }
4091
+ /**
4092
+ * Output a message in default color to stderr
4093
+ * @param {Object} message the message
4094
+ */
4095
+ function verboseMessage(message) {
4096
+ if (!message) return;
4097
+ if (require_ColorTheme.state.getVerbose()) text(message);
4098
+ }
4099
+ /**
4100
+ * Output a debug message
4101
+ * @param {Object} message the message
4102
+ */
4103
+ function debugMessage(message) {
4104
+ if (!message) return;
4105
+ if (require_ColorTheme.state.getDebug()) debug(message);
4106
+ }
4107
+ /**
4108
+ * Output a curlirize message
4109
+ * @param {Object} message the message
4110
+ */
4111
+ function curlirizeMessage(message) {
4112
+ if (!message) return;
4113
+ if (require_ColorTheme.state.getCurlirize()) curlirize(message);
4114
+ }
4115
+ function printMessage(message, type = "text", newline = true) {
4116
+ if (indicators.size > 0) import_log_update.stderr.clear();
4117
+ switch (type) {
4118
+ case "data":
4119
+ data(message, newline);
4120
+ break;
4121
+ case "text":
4122
+ text(message, newline);
4123
+ break;
4124
+ case "info":
4125
+ info(message, newline);
4126
+ break;
4127
+ case "warn":
4128
+ warn(message, newline);
4129
+ break;
4130
+ case "error":
4131
+ error(message, newline);
4132
+ break;
4133
+ case "success":
4134
+ success(message, newline);
4135
+ break;
4136
+ default: text(message, newline);
4137
+ }
4138
+ if (indicators.size > 0) renderProgressIndicators();
4139
+ }
4140
+ /**
4141
+ * Prints a message with the "info" type. Thin, canonical wrapper around
4142
+ * `printMessage(message, 'info')`, mirroring `verboseMessage`/`debugMessage`.
4143
+ */
4144
+ function infoMessage(message, newline = true) {
4145
+ printMessage(message, "info", newline);
4146
+ }
4147
+ /**
4148
+ * Prints a message with the "warn" type. Thin, canonical wrapper around
4149
+ * `printMessage(message, 'warn')`, mirroring `verboseMessage`/`debugMessage`.
4150
+ */
4151
+ function warnMessage(message, newline = true) {
4152
+ printMessage(message, "warn", newline);
4153
+ }
4154
+ /**
4155
+ * Prints a message with the "error" type. Thin, canonical wrapper around
4156
+ * `printMessage(message, 'error')`, mirroring `verboseMessage`/`debugMessage`.
4157
+ * Distinct from `printError(error, message?)` below, which understands and
4158
+ * formats an actual `Error`/`FrodoError` object -- this is for an arbitrary
4159
+ * error-styled string with no underlying Error object.
4160
+ */
4161
+ function errorMessage(message, newline = true) {
4162
+ printMessage(message, "error", newline);
4163
+ }
4164
+ /**
4165
+ * Prints a message with the "success" type. Thin, canonical wrapper around
4166
+ * `printMessage(message, 'success')`, mirroring `verboseMessage`/`debugMessage`.
4167
+ */
4168
+ function successMessage(message, newline = true) {
4169
+ printMessage(message, "success", newline);
4170
+ }
4171
+ /**
4172
+ * Prints an error message from an error object and an optional custom message
4173
+ *
4174
+ * @param error error object
4175
+ */
4176
+ function printError(error, message) {
4177
+ if (message) printMessage("" + message, "error");
4178
+ switch (error.name) {
4179
+ case "FrodoError":
4180
+ printMessage("" + error.getCombinedMessage(), "error");
4181
+ break;
4182
+ case "AxiosError": {
4183
+ const code = error["code"];
4184
+ const status = error["response"] ? error["response"].status : null;
4185
+ const message = error["response"] ? error["response"].data ? error["response"].data.message : null : null;
4186
+ const detail = error["response"] ? error["response"].data ? error["response"].data.detail : null : null;
4187
+ let errorMessage = "HTTP client error";
4188
+ errorMessage += code ? `\n Code: ${code}` : "";
4189
+ errorMessage += status ? `\n Status: ${status}` : "";
4190
+ errorMessage += message ? `\n Message: ${message}` : "";
4191
+ errorMessage += detail ? `\n Detail: ${typeof detail === "object" ? JSON.stringify(detail) : detail}` : "";
4192
+ printMessage(errorMessage, "error");
4193
+ break;
4194
+ }
4195
+ default: printMessage(error.message, "error");
4196
+ }
4197
+ }
4198
+ /**
4199
+ * Render progress indicators
4200
+ */
4201
+ function renderProgressIndicators() {
4202
+ if (process.env.FRODO_TEST === "1") return;
4203
+ const lines = [];
4204
+ for (const ind of indicators.values()) if (ind.type === "determinate") {
4205
+ const percent = ind.total > 0 ? Math.floor(ind.current / ind.total * 100) : 0;
4206
+ const barWidth = 40;
4207
+ const filledWidth = Math.floor(percent / 100 * barWidth);
4208
+ const emptyWidth = barWidth - filledWidth;
4209
+ const filledBar = "█".repeat(filledWidth);
4210
+ const emptyBar = "░".repeat(emptyWidth);
4211
+ const bar = require_ColorTheme.theme.command(`[${filledBar}${emptyBar}]`);
4212
+ const stats = require_ColorTheme.theme.muted(`${percent}% | ${ind.current}/${ind.total}`);
4213
+ const msg = ind.message ? ` ${ind.message}` : "";
4214
+ lines.push(`${bar} ${stats}${msg}`);
4215
+ } else {
4216
+ const frame = ind.spinner.frames[ind.frame % ind.spinner.frames.length];
4217
+ const spinnerIcon = require_ColorTheme.theme.command(frame);
4218
+ const msg = ind.message ? ` ${ind.message}` : "";
4219
+ lines.push(`${spinnerIcon}${msg}`);
4220
+ }
4221
+ (0, import_log_update.stderr)(lines.join("\n"));
4222
+ }
4223
+ /**
4224
+ * Start the render loop for spinners
4225
+ */
4226
+ function startRenderLoop() {
4227
+ if (renderInterval) return;
4228
+ renderInterval = setInterval(() => {
4229
+ for (const ind of indicators.values()) if (ind.type === "indeterminate") ind.frame++;
4230
+ renderProgressIndicators();
4231
+ }, 80);
4232
+ }
4233
+ /**
4234
+ * Stop the render loop
4235
+ */
4236
+ function stopRenderLoop() {
4237
+ if (renderInterval) {
4238
+ clearInterval(renderInterval);
4239
+ renderInterval = null;
4240
+ }
4241
+ }
4242
+ function showSpinner(message) {
4243
+ return createProgressIndicator("indeterminate", 0, message);
4244
+ }
4245
+ function succeedSpinner(message) {
4246
+ stopProgressIndicator(createProgressIndicator("indeterminate", 0, message), message, "success");
4247
+ }
4248
+ function warnSpinner(message) {
4249
+ stopProgressIndicator(createProgressIndicator("indeterminate", 0, message), message, "warn");
4250
+ }
4251
+ function failSpinner(message) {
4252
+ stopProgressIndicator(createProgressIndicator("indeterminate", 0, message), message, "fail");
4253
+ }
4254
+ /**
4255
+ * Creates a progress indicator
4256
+ * @param {ProgressIndicatorType} type type of progress indicator (determinate or indeterminate)
4257
+ * @param {number} [total] total amount of work for determinate indicators
4258
+ * @param {string} [message] message to display alongside the indicator
4259
+ * @returns {string} unique ID associated with the created progress indicator
4260
+ */
4261
+ function createProgressIndicator(type, total = 0, message = "") {
4262
+ const id = v4();
4263
+ debugMessage(`createProgressIndicator: start [${id}]`);
4264
+ indicators.set(id, {
4265
+ id,
4266
+ type,
4267
+ message,
4268
+ spinner: arcSpinner,
4269
+ frame: 0,
4270
+ total,
4271
+ current: 0
4272
+ });
4273
+ startRenderLoop();
4274
+ renderProgressIndicators();
4275
+ debugMessage(`createProgressIndicator: end [${id}]`);
4276
+ return id;
4277
+ }
4278
+ /**
4279
+ * Updates the progress indicator
4280
+ * @param {string} id unique ID associated with the progress indicator
4281
+ * @param {string} [message] message to display alongside the indicator
4282
+ * @param {number} [current] current progress value for determinate indicators
4283
+ * @param {number} [total] total amount of work for determinate indicators
4284
+ */
4285
+ function updateProgressIndicator(id, message, current, total) {
4286
+ const ind = indicators.get(id);
4287
+ if (!ind) {
4288
+ warn(`Progress indicator ${id} not found.`);
4289
+ return;
4290
+ }
4291
+ if (message !== void 0) ind.message = message;
4292
+ if (total !== void 0) ind.total = total;
4293
+ if (ind.type === "determinate") {
4294
+ if (current !== void 0) ind.current = current;
4295
+ else ind.current = Math.min(ind.current + 1, ind.total);
4296
+ }
4297
+ renderProgressIndicators();
4298
+ }
4299
+ /**
4300
+ * Stop and remove the progress indicator
4301
+ * @param {string} id unique ID associated with the progress indicator
4302
+ * @param {string} [message] message to display alongside the indicator
4303
+ * @param {ProgressIndicatorStatusType} [status='none'] status type for indeterminate indicators
4304
+ */
4305
+ function stopProgressIndicator(id, message, status = "none") {
4306
+ debugMessage(`stopProgressIndicator: start [${id}]`);
4307
+ const ind = indicators.get(id);
4308
+ if (!ind) {
4309
+ warn(`Progress indicator ${id} not found.`);
4310
+ return;
4311
+ }
4312
+ if (message || status !== "none") {
4313
+ import_log_update.stderr.clear();
4314
+ let statusIcon;
4315
+ let colorFn = (s) => s;
4316
+ switch (status) {
4317
+ case "success":
4318
+ statusIcon = "✔";
4319
+ colorFn = require_ColorTheme.theme.positive;
4320
+ break;
4321
+ case "warn":
4322
+ statusIcon = "⚠";
4323
+ colorFn = require_ColorTheme.theme.warning;
4324
+ break;
4325
+ case "fail":
4326
+ statusIcon = "✖";
4327
+ colorFn = require_ColorTheme.theme.error;
4328
+ break;
4329
+ default: statusIcon = "•";
4330
+ }
4331
+ const finalMsg = message || ind.message;
4332
+ if (finalMsg) console.error(colorFn(`${statusIcon} ${finalMsg}`));
4333
+ }
4334
+ indicators.delete(id);
4335
+ if (indicators.size === 0) {
4336
+ stopRenderLoop();
4337
+ import_log_update.stderr.clear();
4338
+ import_log_update.stderr.done();
4339
+ } else renderProgressIndicators();
4340
+ debugMessage(`stopProgressIndicator end [${id}]`);
4341
+ }
4342
+ /**
4343
+ * Clean up all progress indicators
4344
+ */
4345
+ function cleanupProgressIndicators() {
4346
+ debugMessage(`cleanupProgressIndicators: start`);
4347
+ stopRenderLoop();
4348
+ indicators.clear();
4349
+ import_log_update.stderr.clear();
4350
+ import_log_update.stderr.done();
4351
+ debugMessage(`cleanupProgressIndicators end`);
4352
+ }
4353
+ /**
4354
+ * Create an empty table
4355
+ * @param {string[]} head header row as an array of strings
4356
+ * @returns {any} an empty table
4357
+ */
4358
+ function createTable(head) {
4359
+ return new import_cli_table3.default({
4360
+ head: head.map((h) => typeof h === "string" ? require_ColorTheme.theme.heading(h) : h),
4361
+ chars: {
4362
+ top: "",
4363
+ "top-mid": "",
4364
+ "top-left": "",
4365
+ "top-right": "",
4366
+ bottom: "",
4367
+ "bottom-mid": "",
4368
+ "bottom-left": "",
4369
+ "bottom-right": "",
4370
+ left: "",
4371
+ "left-mid": "",
4372
+ mid: "",
4373
+ "mid-mid": "",
4374
+ right: "",
4375
+ "right-mid": "",
4376
+ middle: require_ColorTheme.theme.muted("│")
4377
+ },
4378
+ style: {
4379
+ "padding-left": 0,
4380
+ "padding-right": 0,
4381
+ head: [],
4382
+ border: []
4383
+ }
4384
+ });
4385
+ }
4386
+ /**
4387
+ * Create a new key/value table
4388
+ * @returns {any} an empty key/value table
4389
+ */
4390
+ function createKeyValueTable() {
4391
+ return new import_cli_table3.default({
4392
+ chars: {
4393
+ top: "",
4394
+ "top-mid": "",
4395
+ "top-left": "",
4396
+ "top-right": "",
4397
+ bottom: "",
4398
+ "bottom-mid": "",
4399
+ "bottom-left": "",
4400
+ "bottom-right": "",
4401
+ left: "",
4402
+ "left-mid": "",
4403
+ mid: "",
4404
+ "mid-mid": "",
4405
+ right: "",
4406
+ "right-mid": "",
4407
+ middle: require_ColorTheme.theme.muted("│")
4408
+ },
4409
+ style: {
4410
+ "padding-left": 0,
4411
+ "padding-right": 0,
4412
+ head: [],
4413
+ border: []
4414
+ },
4415
+ wordWrap: true
4416
+ });
4417
+ }
4418
+ /**
4419
+ * Helper function to determine the total depth of an object
4420
+ * @param {Object} object input object
4421
+ * @returns {Number} total depth of the input object
4422
+ */
4423
+ function getObjectDepth(object) {
4424
+ return Object(object) === object ? 1 + Math.max(-1, ...Object.values(object).map(getObjectDepth)) : 0;
4425
+ }
4426
+ /**
4427
+ * Helper function to determine if an object has values
4428
+ * @param {Object} object input object
4429
+ * @returns {boolean} true of the object or any of its sub-objects contain values, false otherwise
4430
+ */
4431
+ function hasValues(object) {
4432
+ let has = false;
4433
+ const keys = Object.keys(object);
4434
+ for (const key of keys) {
4435
+ if (Object(object[key]) !== object[key]) return true;
4436
+ has = has || hasValues(object[key]);
4437
+ }
4438
+ return has;
4439
+ }
4440
+ /**
4441
+ * Helper function (recursive) to add rows to an object table
4442
+ * @param {object} object object to render
4443
+ * @param {number} depth total depth of initial object
4444
+ * @param {number} level current level
4445
+ * @param {any} table the object table to add the rows to
4446
+ * @param {Object} keyMap optional JSON map to map raw config names to human readable names {'raw': 'readable'}
4447
+ * @returns the updated object table
4448
+ */
4449
+ function addRows(object, depth, level, table, keyMap) {
4450
+ const space = " ";
4451
+ const keys = Object.keys(object);
4452
+ for (const key of keys) if (Object(object[key]) !== object[key]) {
4453
+ if (level === 1) table.push([keyMap[key] ? require_ColorTheme.theme.heading(keyMap[key]) : require_ColorTheme.theme.heading(key), object[key]]);
4454
+ else table.push([{
4455
+ hAlign: "right",
4456
+ content: keyMap[key] ? require_ColorTheme.theme.heading(keyMap[key]) : require_ColorTheme.theme.heading(key)
4457
+ }, object[key]]);
4458
+ }
4459
+ for (const key of keys) if (Object(object[key]) === object[key]) {
4460
+ if (hasValues(object[key])) {
4461
+ let indention = new Array(level).fill(space).join("");
4462
+ if (level < 3) indention = `\n${indention}`;
4463
+ table.push([indention.concat(keyMap[key] ? require_ColorTheme.theme.heading(keyMap[key]) : require_ColorTheme.theme.heading(key)), ""]);
4464
+ }
4465
+ table = addRows(object[key], depth, level + 1, table, keyMap);
4466
+ }
4467
+ return table;
4468
+ }
4469
+ /**
4470
+ * Create and populate an object table from any JSON object. Use for describe commands.
4471
+ * @param {Object} object JSON object to create
4472
+ * @param {Object} keyMap optional JSON map to map raw config names to human readable names {'raw': 'readable'}
4473
+ * @returns {any} a table that can be printed to the console
4474
+ */
4475
+ function createObjectTable(object, keyMap = {}) {
4476
+ const depth = getObjectDepth(object);
4477
+ const table = new import_cli_table3.default({
4478
+ chars: {
4479
+ top: "",
4480
+ "top-mid": "",
4481
+ "top-left": "",
4482
+ "top-right": "",
4483
+ bottom: "",
4484
+ "bottom-mid": "",
4485
+ "bottom-left": "",
4486
+ "bottom-right": "",
4487
+ left: "",
4488
+ "left-mid": "",
4489
+ mid: "",
4490
+ "mid-mid": "",
4491
+ right: "",
4492
+ "right-mid": "",
4493
+ middle: require_ColorTheme.theme.muted("│")
4494
+ },
4495
+ style: {
4496
+ "padding-left": 0,
4497
+ "padding-right": 0,
4498
+ head: [],
4499
+ border: []
4500
+ }
4501
+ });
4502
+ addRows(object, depth, 1, table, keyMap);
4503
+ return table;
4504
+ }
4505
+ /**
4506
+ * Helper that gets multiple rows for a table for array data
4507
+ * @param table The table to push the rows to
4508
+ * @param rowName The name of the first row
4509
+ * @param array The array of data
4510
+ */
4511
+ function getTableRowsFromArray(table, rowName, array) {
4512
+ table.push([require_ColorTheme.theme.heading(rowName), array.length > 0 ? array[0] : ""]);
4513
+ for (let i = 1; i < array.length; ++i) table.push(["", array[i]]);
4514
+ }
4515
+ //#endregion
4516
+ Object.defineProperty(exports, "cleanupProgressIndicators", {
4517
+ enumerable: true,
4518
+ get: function() {
4519
+ return cleanupProgressIndicators;
4520
+ }
4521
+ });
4522
+ Object.defineProperty(exports, "createKeyValueTable", {
4523
+ enumerable: true,
4524
+ get: function() {
4525
+ return createKeyValueTable;
4526
+ }
4527
+ });
4528
+ Object.defineProperty(exports, "createObjectTable", {
4529
+ enumerable: true,
4530
+ get: function() {
4531
+ return createObjectTable;
4532
+ }
4533
+ });
4534
+ Object.defineProperty(exports, "createProgressIndicator", {
4535
+ enumerable: true,
4536
+ get: function() {
4537
+ return createProgressIndicator;
4538
+ }
4539
+ });
4540
+ Object.defineProperty(exports, "createTable", {
4541
+ enumerable: true,
4542
+ get: function() {
4543
+ return createTable;
4544
+ }
4545
+ });
4546
+ Object.defineProperty(exports, "curlirizeMessage", {
4547
+ enumerable: true,
4548
+ get: function() {
4549
+ return curlirizeMessage;
4550
+ }
4551
+ });
4552
+ Object.defineProperty(exports, "debugMessage", {
4553
+ enumerable: true,
4554
+ get: function() {
4555
+ return debugMessage;
4556
+ }
4557
+ });
4558
+ Object.defineProperty(exports, "errorMessage", {
4559
+ enumerable: true,
4560
+ get: function() {
4561
+ return errorMessage;
4562
+ }
4563
+ });
4564
+ Object.defineProperty(exports, "failSpinner", {
4565
+ enumerable: true,
4566
+ get: function() {
4567
+ return failSpinner;
4568
+ }
4569
+ });
4570
+ Object.defineProperty(exports, "getTableRowsFromArray", {
4571
+ enumerable: true,
4572
+ get: function() {
4573
+ return getTableRowsFromArray;
4574
+ }
4575
+ });
4576
+ Object.defineProperty(exports, "infoMessage", {
4577
+ enumerable: true,
4578
+ get: function() {
4579
+ return infoMessage;
4580
+ }
4581
+ });
4582
+ Object.defineProperty(exports, "printError", {
4583
+ enumerable: true,
4584
+ get: function() {
4585
+ return printError;
4586
+ }
4587
+ });
4588
+ Object.defineProperty(exports, "printMessage", {
4589
+ enumerable: true,
4590
+ get: function() {
4591
+ return printMessage;
4592
+ }
4593
+ });
4594
+ Object.defineProperty(exports, "require_cli_table3", {
4595
+ enumerable: true,
4596
+ get: function() {
4597
+ return require_cli_table3;
4598
+ }
4599
+ });
4600
+ Object.defineProperty(exports, "showSpinner", {
4601
+ enumerable: true,
4602
+ get: function() {
4603
+ return showSpinner;
4604
+ }
4605
+ });
4606
+ Object.defineProperty(exports, "stopProgressIndicator", {
4607
+ enumerable: true,
4608
+ get: function() {
4609
+ return stopProgressIndicator;
4610
+ }
4611
+ });
4612
+ Object.defineProperty(exports, "succeedSpinner", {
4613
+ enumerable: true,
4614
+ get: function() {
4615
+ return succeedSpinner;
4616
+ }
4617
+ });
4618
+ Object.defineProperty(exports, "successMessage", {
4619
+ enumerable: true,
4620
+ get: function() {
4621
+ return successMessage;
4622
+ }
4623
+ });
4624
+ Object.defineProperty(exports, "updateProgressIndicator", {
4625
+ enumerable: true,
4626
+ get: function() {
4627
+ return updateProgressIndicator;
4628
+ }
4629
+ });
4630
+ Object.defineProperty(exports, "v4", {
4631
+ enumerable: true,
4632
+ get: function() {
4633
+ return v4;
4634
+ }
4635
+ });
4636
+ Object.defineProperty(exports, "verboseMessage", {
4637
+ enumerable: true,
4638
+ get: function() {
4639
+ return verboseMessage;
4640
+ }
4641
+ });
4642
+ Object.defineProperty(exports, "warnMessage", {
4643
+ enumerable: true,
4644
+ get: function() {
4645
+ return warnMessage;
4646
+ }
4647
+ });
4648
+ Object.defineProperty(exports, "warnSpinner", {
4649
+ enumerable: true,
4650
+ get: function() {
4651
+ return warnSpinner;
4652
+ }
4653
+ });
4654
+
4655
+ //# sourceMappingURL=Console--leD9RdR.cjs.map