ccusage 0.8.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -6
- package/dist/calculate-cost.d.ts +2 -2
- package/dist/chunk-BLXvPPr8.js +30 -0
- package/dist/{data-loader-Bz6Vemxw.js → data-loader-CotJGlGF.js} +235 -294
- package/dist/{data-loader-amTZCtBR.d.ts → data-loader-OGaMjZTD.d.ts} +8 -80
- package/dist/data-loader.d.ts +3 -3
- package/dist/data-loader.js +5 -5
- package/dist/{debug-DQXeZIjf.js → debug-DH_5GWYh.js} +5 -4
- package/dist/debug.js +5 -5
- package/dist/{dist-DAarI-SJ.js → dist-BZzwBtZs.js} +1 -1
- package/dist/{effect-WSjEuzC9-ChJ5OQQf.js → effect-WSjEuzC9-DHMVzzyB.js} +1 -1
- package/dist/{esm-Dqsc1zmX.js → esm-BU3FhOe-.js} +1 -1
- package/dist/{index-CISmcbXk-x9eVmhGM.js → index-CISmcbXk-CW1Gj6Ab.js} +5 -5
- package/dist/index.js +199 -1760
- package/dist/{logger-DN-RT9jL.js → logger-BgKOQAEs.js} +3 -3
- package/dist/logger.js +1 -1
- package/dist/{mcp-DZXbfmbs.js → mcp-BUmEAQZm.js} +42 -50
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +7 -7
- package/dist/pricing-fetcher-1KHPTXC3.js +205 -0
- package/dist/{pricing-fetcher-Dq-OLBp4.d.ts → pricing-fetcher-BkSZh4lR.d.ts} +83 -3
- package/dist/pricing-fetcher.d.ts +2 -2
- package/dist/pricing-fetcher.js +3 -3
- package/dist/{sury-DmrZ3_Oj-l0qqtY-f.js → sury-DmrZ3_Oj-Cpjsc2Lm.js} +1 -1
- package/dist/utils.table-DRzF8vZJ.js +1838 -0
- package/dist/utils.table.d.ts +24 -0
- package/dist/utils.table.js +3 -0
- package/dist/valibot-CQk-M5rL-BcaCeUrF.js +10 -0
- package/dist/{zod-Db63SLXj-N1oN-yiY.js → zod-Db63SLXj-BIXn64AP.js} +3 -3
- package/package.json +2 -1
- package/dist/pricing-fetcher-DMNBE90M.js +0 -79
- package/dist/valibot-CQk-M5rL-BNHzwpA0.js +0 -10
- /package/dist/{arktype-C-GObzDh-Bx7Fdrqj.js → arktype-C-GObzDh-CNoBqQrr.js} +0 -0
- /package/dist/{core-B0ovMhJe.js → core-DHCbAXJf.js} +0 -0
- /package/dist/{dist-BEQ1tJCL.js → dist-DCvt9hEv.js} +0 -0
- /package/dist/{prompt-CUbwSrjo.js → prompt-DtZgx4wU.js} +0 -0
- /package/dist/{types-DS8M8QF_.js → types-BlyCnKwN.js} +0 -0
|
@@ -0,0 +1,1838 @@
|
|
|
1
|
+
import { __commonJS, __require, __toESM } from "./chunk-BLXvPPr8.js";
|
|
2
|
+
import process$1 from "node:process";
|
|
3
|
+
|
|
4
|
+
//#region node_modules/cli-table3/src/debug.js
|
|
5
|
+
var require_debug = __commonJS({ "node_modules/cli-table3/src/debug.js"(exports, module) {
|
|
6
|
+
let messages = [];
|
|
7
|
+
let level = 0;
|
|
8
|
+
const debug$3 = (msg, min) => {
|
|
9
|
+
if (level >= min) messages.push(msg);
|
|
10
|
+
};
|
|
11
|
+
debug$3.WARN = 1;
|
|
12
|
+
debug$3.INFO = 2;
|
|
13
|
+
debug$3.DEBUG = 3;
|
|
14
|
+
debug$3.reset = () => {
|
|
15
|
+
messages = [];
|
|
16
|
+
};
|
|
17
|
+
debug$3.setDebugLevel = (v) => {
|
|
18
|
+
level = v;
|
|
19
|
+
};
|
|
20
|
+
debug$3.warn = (msg) => debug$3(msg, debug$3.WARN);
|
|
21
|
+
debug$3.info = (msg) => debug$3(msg, debug$3.INFO);
|
|
22
|
+
debug$3.debug = (msg) => debug$3(msg, debug$3.DEBUG);
|
|
23
|
+
debug$3.debugMessages = () => messages;
|
|
24
|
+
module.exports = debug$3;
|
|
25
|
+
} });
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
29
|
+
var require_ansi_regex = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports, module) {
|
|
30
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
31
|
+
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("|");
|
|
32
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
33
|
+
};
|
|
34
|
+
} });
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/index.js
|
|
38
|
+
var require_strip_ansi = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
|
|
39
|
+
const ansiRegex$1 = require_ansi_regex();
|
|
40
|
+
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex$1(), "") : string;
|
|
41
|
+
} });
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region node_modules/is-fullwidth-code-point/index.js
|
|
45
|
+
var require_is_fullwidth_code_point = __commonJS({ "node_modules/is-fullwidth-code-point/index.js"(exports, module) {
|
|
46
|
+
const isFullwidthCodePoint$1 = (codePoint) => {
|
|
47
|
+
if (Number.isNaN(codePoint)) return false;
|
|
48
|
+
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;
|
|
49
|
+
return false;
|
|
50
|
+
};
|
|
51
|
+
module.exports = isFullwidthCodePoint$1;
|
|
52
|
+
module.exports.default = isFullwidthCodePoint$1;
|
|
53
|
+
} });
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region node_modules/cli-table3/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
57
|
+
var require_emoji_regex$1 = __commonJS({ "node_modules/cli-table3/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
|
|
58
|
+
module.exports = function() {
|
|
59
|
+
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;
|
|
60
|
+
};
|
|
61
|
+
} });
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region node_modules/cli-table3/node_modules/string-width/index.js
|
|
65
|
+
var require_string_width = __commonJS({ "node_modules/cli-table3/node_modules/string-width/index.js"(exports, module) {
|
|
66
|
+
const stripAnsi$1 = require_strip_ansi();
|
|
67
|
+
const isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
68
|
+
const emojiRegex$1 = require_emoji_regex$1();
|
|
69
|
+
const stringWidth$2 = (string) => {
|
|
70
|
+
if (typeof string !== "string" || string.length === 0) return 0;
|
|
71
|
+
string = stripAnsi$1(string);
|
|
72
|
+
if (string.length === 0) return 0;
|
|
73
|
+
string = string.replace(emojiRegex$1(), " ");
|
|
74
|
+
let width = 0;
|
|
75
|
+
for (let i = 0; i < string.length; i++) {
|
|
76
|
+
const code = string.codePointAt(i);
|
|
77
|
+
if (code <= 31 || code >= 127 && code <= 159) continue;
|
|
78
|
+
if (code >= 768 && code <= 879) continue;
|
|
79
|
+
if (code > 65535) i++;
|
|
80
|
+
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
81
|
+
}
|
|
82
|
+
return width;
|
|
83
|
+
};
|
|
84
|
+
module.exports = stringWidth$2;
|
|
85
|
+
module.exports.default = stringWidth$2;
|
|
86
|
+
} });
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region node_modules/cli-table3/src/utils.js
|
|
90
|
+
var require_utils = __commonJS({ "node_modules/cli-table3/src/utils.js"(exports, module) {
|
|
91
|
+
const stringWidth$1 = require_string_width();
|
|
92
|
+
function codeRegex(capture) {
|
|
93
|
+
return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
|
|
94
|
+
}
|
|
95
|
+
function strlen(str) {
|
|
96
|
+
let code = codeRegex();
|
|
97
|
+
let stripped = ("" + str).replace(code, "");
|
|
98
|
+
let split = stripped.split("\n");
|
|
99
|
+
return split.reduce(function(memo, s) {
|
|
100
|
+
return stringWidth$1(s) > memo ? stringWidth$1(s) : memo;
|
|
101
|
+
}, 0);
|
|
102
|
+
}
|
|
103
|
+
function repeat(str, times) {
|
|
104
|
+
return Array(times + 1).join(str);
|
|
105
|
+
}
|
|
106
|
+
function pad(str, len, pad$1, dir) {
|
|
107
|
+
let length = strlen(str);
|
|
108
|
+
if (len + 1 >= length) {
|
|
109
|
+
let padlen = len - length;
|
|
110
|
+
switch (dir) {
|
|
111
|
+
case "right": {
|
|
112
|
+
str = repeat(pad$1, padlen) + str;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case "center": {
|
|
116
|
+
let right = Math.ceil(padlen / 2);
|
|
117
|
+
let left = padlen - right;
|
|
118
|
+
str = repeat(pad$1, left) + str + repeat(pad$1, right);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
default: {
|
|
122
|
+
str = str + repeat(pad$1, padlen);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return str;
|
|
128
|
+
}
|
|
129
|
+
let codeCache = {};
|
|
130
|
+
function addToCodeCache(name, on, off) {
|
|
131
|
+
on = "\x1B[" + on + "m";
|
|
132
|
+
off = "\x1B[" + off + "m";
|
|
133
|
+
codeCache[on] = {
|
|
134
|
+
set: name,
|
|
135
|
+
to: true
|
|
136
|
+
};
|
|
137
|
+
codeCache[off] = {
|
|
138
|
+
set: name,
|
|
139
|
+
to: false
|
|
140
|
+
};
|
|
141
|
+
codeCache[name] = {
|
|
142
|
+
on,
|
|
143
|
+
off
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
addToCodeCache("bold", 1, 22);
|
|
147
|
+
addToCodeCache("italics", 3, 23);
|
|
148
|
+
addToCodeCache("underline", 4, 24);
|
|
149
|
+
addToCodeCache("inverse", 7, 27);
|
|
150
|
+
addToCodeCache("strikethrough", 9, 29);
|
|
151
|
+
function updateState(state, controlChars) {
|
|
152
|
+
let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
|
|
153
|
+
if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
|
|
154
|
+
state.lastForegroundAdded = controlChars[0];
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
|
|
158
|
+
state.lastBackgroundAdded = controlChars[0];
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (controlCode === 0) {
|
|
162
|
+
for (let i in state)
|
|
163
|
+
/* istanbul ignore else */
|
|
164
|
+
if (Object.prototype.hasOwnProperty.call(state, i)) delete state[i];
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
let info$1 = codeCache[controlChars[0]];
|
|
168
|
+
if (info$1) state[info$1.set] = info$1.to;
|
|
169
|
+
}
|
|
170
|
+
function readState(line) {
|
|
171
|
+
let code = codeRegex(true);
|
|
172
|
+
let controlChars = code.exec(line);
|
|
173
|
+
let state = {};
|
|
174
|
+
while (controlChars !== null) {
|
|
175
|
+
updateState(state, controlChars);
|
|
176
|
+
controlChars = code.exec(line);
|
|
177
|
+
}
|
|
178
|
+
return state;
|
|
179
|
+
}
|
|
180
|
+
function unwindState(state, ret) {
|
|
181
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
182
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
183
|
+
delete state.lastBackgroundAdded;
|
|
184
|
+
delete state.lastForegroundAdded;
|
|
185
|
+
Object.keys(state).forEach(function(key) {
|
|
186
|
+
if (state[key]) ret += codeCache[key].off;
|
|
187
|
+
});
|
|
188
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret += "\x1B[49m";
|
|
189
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret += "\x1B[39m";
|
|
190
|
+
return ret;
|
|
191
|
+
}
|
|
192
|
+
function rewindState(state, ret) {
|
|
193
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
194
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
195
|
+
delete state.lastBackgroundAdded;
|
|
196
|
+
delete state.lastForegroundAdded;
|
|
197
|
+
Object.keys(state).forEach(function(key) {
|
|
198
|
+
if (state[key]) ret = codeCache[key].on + ret;
|
|
199
|
+
});
|
|
200
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") ret = lastBackgroundAdded + ret;
|
|
201
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") ret = lastForegroundAdded + ret;
|
|
202
|
+
return ret;
|
|
203
|
+
}
|
|
204
|
+
function truncateWidth(str, desiredLength) {
|
|
205
|
+
if (str.length === strlen(str)) return str.substr(0, desiredLength);
|
|
206
|
+
while (strlen(str) > desiredLength) str = str.slice(0, -1);
|
|
207
|
+
return str;
|
|
208
|
+
}
|
|
209
|
+
function truncateWidthWithAnsi(str, desiredLength) {
|
|
210
|
+
let code = codeRegex(true);
|
|
211
|
+
let split = str.split(codeRegex());
|
|
212
|
+
let splitIndex = 0;
|
|
213
|
+
let retLen = 0;
|
|
214
|
+
let ret = "";
|
|
215
|
+
let myArray;
|
|
216
|
+
let state = {};
|
|
217
|
+
while (retLen < desiredLength) {
|
|
218
|
+
myArray = code.exec(str);
|
|
219
|
+
let toAdd = split[splitIndex];
|
|
220
|
+
splitIndex++;
|
|
221
|
+
if (retLen + strlen(toAdd) > desiredLength) toAdd = truncateWidth(toAdd, desiredLength - retLen);
|
|
222
|
+
ret += toAdd;
|
|
223
|
+
retLen += strlen(toAdd);
|
|
224
|
+
if (retLen < desiredLength) {
|
|
225
|
+
if (!myArray) break;
|
|
226
|
+
ret += myArray[0];
|
|
227
|
+
updateState(state, myArray);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return unwindState(state, ret);
|
|
231
|
+
}
|
|
232
|
+
function truncate(str, desiredLength, truncateChar) {
|
|
233
|
+
truncateChar = truncateChar || "…";
|
|
234
|
+
let lengthOfStr = strlen(str);
|
|
235
|
+
if (lengthOfStr <= desiredLength) return str;
|
|
236
|
+
desiredLength -= strlen(truncateChar);
|
|
237
|
+
let ret = truncateWidthWithAnsi(str, desiredLength);
|
|
238
|
+
ret += truncateChar;
|
|
239
|
+
const hrefTag = "\x1B]8;;\x07";
|
|
240
|
+
if (str.includes(hrefTag) && !ret.includes(hrefTag)) ret += hrefTag;
|
|
241
|
+
return ret;
|
|
242
|
+
}
|
|
243
|
+
function defaultOptions() {
|
|
244
|
+
return {
|
|
245
|
+
chars: {
|
|
246
|
+
top: "─",
|
|
247
|
+
"top-mid": "┬",
|
|
248
|
+
"top-left": "┌",
|
|
249
|
+
"top-right": "┐",
|
|
250
|
+
bottom: "─",
|
|
251
|
+
"bottom-mid": "┴",
|
|
252
|
+
"bottom-left": "└",
|
|
253
|
+
"bottom-right": "┘",
|
|
254
|
+
left: "│",
|
|
255
|
+
"left-mid": "├",
|
|
256
|
+
mid: "─",
|
|
257
|
+
"mid-mid": "┼",
|
|
258
|
+
right: "│",
|
|
259
|
+
"right-mid": "┤",
|
|
260
|
+
middle: "│"
|
|
261
|
+
},
|
|
262
|
+
truncate: "…",
|
|
263
|
+
colWidths: [],
|
|
264
|
+
rowHeights: [],
|
|
265
|
+
colAligns: [],
|
|
266
|
+
rowAligns: [],
|
|
267
|
+
style: {
|
|
268
|
+
"padding-left": 1,
|
|
269
|
+
"padding-right": 1,
|
|
270
|
+
head: ["red"],
|
|
271
|
+
border: ["grey"],
|
|
272
|
+
compact: false
|
|
273
|
+
},
|
|
274
|
+
head: []
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function mergeOptions(options, defaults) {
|
|
278
|
+
options = options || {};
|
|
279
|
+
defaults = defaults || defaultOptions();
|
|
280
|
+
let ret = Object.assign({}, defaults, options);
|
|
281
|
+
ret.chars = Object.assign({}, defaults.chars, options.chars);
|
|
282
|
+
ret.style = Object.assign({}, defaults.style, options.style);
|
|
283
|
+
return ret;
|
|
284
|
+
}
|
|
285
|
+
function wordWrap(maxLength, input) {
|
|
286
|
+
let lines = [];
|
|
287
|
+
let split = input.split(/(\s+)/g);
|
|
288
|
+
let line = [];
|
|
289
|
+
let lineLength = 0;
|
|
290
|
+
let whitespace;
|
|
291
|
+
for (let i = 0; i < split.length; i += 2) {
|
|
292
|
+
let word = split[i];
|
|
293
|
+
let newLength = lineLength + strlen(word);
|
|
294
|
+
if (lineLength > 0 && whitespace) newLength += whitespace.length;
|
|
295
|
+
if (newLength > maxLength) {
|
|
296
|
+
if (lineLength !== 0) lines.push(line.join(""));
|
|
297
|
+
line = [word];
|
|
298
|
+
lineLength = strlen(word);
|
|
299
|
+
} else {
|
|
300
|
+
line.push(whitespace || "", word);
|
|
301
|
+
lineLength = newLength;
|
|
302
|
+
}
|
|
303
|
+
whitespace = split[i + 1];
|
|
304
|
+
}
|
|
305
|
+
if (lineLength) lines.push(line.join(""));
|
|
306
|
+
return lines;
|
|
307
|
+
}
|
|
308
|
+
function textWrap(maxLength, input) {
|
|
309
|
+
let lines = [];
|
|
310
|
+
let line = "";
|
|
311
|
+
function pushLine(str, ws) {
|
|
312
|
+
if (line.length && ws) line += ws;
|
|
313
|
+
line += str;
|
|
314
|
+
while (line.length > maxLength) {
|
|
315
|
+
lines.push(line.slice(0, maxLength));
|
|
316
|
+
line = line.slice(maxLength);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
let split = input.split(/(\s+)/g);
|
|
320
|
+
for (let i = 0; i < split.length; i += 2) pushLine(split[i], i && split[i - 1]);
|
|
321
|
+
if (line.length) lines.push(line);
|
|
322
|
+
return lines;
|
|
323
|
+
}
|
|
324
|
+
function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
|
|
325
|
+
let output = [];
|
|
326
|
+
input = input.split("\n");
|
|
327
|
+
const handler = wrapOnWordBoundary ? wordWrap : textWrap;
|
|
328
|
+
for (let i = 0; i < input.length; i++) output.push.apply(output, handler(maxLength, input[i]));
|
|
329
|
+
return output;
|
|
330
|
+
}
|
|
331
|
+
function colorizeLines(input) {
|
|
332
|
+
let state = {};
|
|
333
|
+
let output = [];
|
|
334
|
+
for (let i = 0; i < input.length; i++) {
|
|
335
|
+
let line = rewindState(state, input[i]);
|
|
336
|
+
state = readState(line);
|
|
337
|
+
let temp = Object.assign({}, state);
|
|
338
|
+
output.push(unwindState(temp, line));
|
|
339
|
+
}
|
|
340
|
+
return output;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Credit: Matheus Sampaio https://github.com/matheussampaio
|
|
344
|
+
*/
|
|
345
|
+
function hyperlink(url, text) {
|
|
346
|
+
const OSC = "\x1B]";
|
|
347
|
+
const BEL = "\x07";
|
|
348
|
+
const SEP = ";";
|
|
349
|
+
return [
|
|
350
|
+
OSC,
|
|
351
|
+
"8",
|
|
352
|
+
SEP,
|
|
353
|
+
SEP,
|
|
354
|
+
url || text,
|
|
355
|
+
BEL,
|
|
356
|
+
text,
|
|
357
|
+
OSC,
|
|
358
|
+
"8",
|
|
359
|
+
SEP,
|
|
360
|
+
SEP,
|
|
361
|
+
BEL
|
|
362
|
+
].join("");
|
|
363
|
+
}
|
|
364
|
+
module.exports = {
|
|
365
|
+
strlen,
|
|
366
|
+
repeat,
|
|
367
|
+
pad,
|
|
368
|
+
truncate,
|
|
369
|
+
mergeOptions,
|
|
370
|
+
wordWrap: multiLineWordWrap,
|
|
371
|
+
colorizeLines,
|
|
372
|
+
hyperlink
|
|
373
|
+
};
|
|
374
|
+
} });
|
|
375
|
+
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region node_modules/@colors/colors/lib/styles.js
|
|
378
|
+
var require_styles = __commonJS({ "node_modules/@colors/colors/lib/styles.js"(exports, module) {
|
|
379
|
+
var styles$1 = {};
|
|
380
|
+
module["exports"] = styles$1;
|
|
381
|
+
var codes = {
|
|
382
|
+
reset: [0, 0],
|
|
383
|
+
bold: [1, 22],
|
|
384
|
+
dim: [2, 22],
|
|
385
|
+
italic: [3, 23],
|
|
386
|
+
underline: [4, 24],
|
|
387
|
+
inverse: [7, 27],
|
|
388
|
+
hidden: [8, 28],
|
|
389
|
+
strikethrough: [9, 29],
|
|
390
|
+
black: [30, 39],
|
|
391
|
+
red: [31, 39],
|
|
392
|
+
green: [32, 39],
|
|
393
|
+
yellow: [33, 39],
|
|
394
|
+
blue: [34, 39],
|
|
395
|
+
magenta: [35, 39],
|
|
396
|
+
cyan: [36, 39],
|
|
397
|
+
white: [37, 39],
|
|
398
|
+
gray: [90, 39],
|
|
399
|
+
grey: [90, 39],
|
|
400
|
+
brightRed: [91, 39],
|
|
401
|
+
brightGreen: [92, 39],
|
|
402
|
+
brightYellow: [93, 39],
|
|
403
|
+
brightBlue: [94, 39],
|
|
404
|
+
brightMagenta: [95, 39],
|
|
405
|
+
brightCyan: [96, 39],
|
|
406
|
+
brightWhite: [97, 39],
|
|
407
|
+
bgBlack: [40, 49],
|
|
408
|
+
bgRed: [41, 49],
|
|
409
|
+
bgGreen: [42, 49],
|
|
410
|
+
bgYellow: [43, 49],
|
|
411
|
+
bgBlue: [44, 49],
|
|
412
|
+
bgMagenta: [45, 49],
|
|
413
|
+
bgCyan: [46, 49],
|
|
414
|
+
bgWhite: [47, 49],
|
|
415
|
+
bgGray: [100, 49],
|
|
416
|
+
bgGrey: [100, 49],
|
|
417
|
+
bgBrightRed: [101, 49],
|
|
418
|
+
bgBrightGreen: [102, 49],
|
|
419
|
+
bgBrightYellow: [103, 49],
|
|
420
|
+
bgBrightBlue: [104, 49],
|
|
421
|
+
bgBrightMagenta: [105, 49],
|
|
422
|
+
bgBrightCyan: [106, 49],
|
|
423
|
+
bgBrightWhite: [107, 49],
|
|
424
|
+
blackBG: [40, 49],
|
|
425
|
+
redBG: [41, 49],
|
|
426
|
+
greenBG: [42, 49],
|
|
427
|
+
yellowBG: [43, 49],
|
|
428
|
+
blueBG: [44, 49],
|
|
429
|
+
magentaBG: [45, 49],
|
|
430
|
+
cyanBG: [46, 49],
|
|
431
|
+
whiteBG: [47, 49]
|
|
432
|
+
};
|
|
433
|
+
Object.keys(codes).forEach(function(key) {
|
|
434
|
+
var val = codes[key];
|
|
435
|
+
var style = styles$1[key] = [];
|
|
436
|
+
style.open = "\x1B[" + val[0] + "m";
|
|
437
|
+
style.close = "\x1B[" + val[1] + "m";
|
|
438
|
+
});
|
|
439
|
+
} });
|
|
440
|
+
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region node_modules/@colors/colors/lib/system/has-flag.js
|
|
443
|
+
var require_has_flag = __commonJS({ "node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
|
|
444
|
+
module.exports = function(flag, argv) {
|
|
445
|
+
argv = argv || process.argv;
|
|
446
|
+
var terminatorPos = argv.indexOf("--");
|
|
447
|
+
var prefix = /^-{1,2}/.test(flag) ? "" : "--";
|
|
448
|
+
var pos = argv.indexOf(prefix + flag);
|
|
449
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
450
|
+
};
|
|
451
|
+
} });
|
|
452
|
+
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region node_modules/@colors/colors/lib/system/supports-colors.js
|
|
455
|
+
var require_supports_colors = __commonJS({ "node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
456
|
+
var os = __require("os");
|
|
457
|
+
var hasFlag = require_has_flag();
|
|
458
|
+
var env = process.env;
|
|
459
|
+
var forceColor = void 0;
|
|
460
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) forceColor = false;
|
|
461
|
+
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = true;
|
|
462
|
+
if ("FORCE_COLOR" in env) forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
463
|
+
function translateLevel(level$1) {
|
|
464
|
+
if (level$1 === 0) return false;
|
|
465
|
+
return {
|
|
466
|
+
level: level$1,
|
|
467
|
+
hasBasic: true,
|
|
468
|
+
has256: level$1 >= 2,
|
|
469
|
+
has16m: level$1 >= 3
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
function supportsColor(stream) {
|
|
473
|
+
if (forceColor === false) return 0;
|
|
474
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
475
|
+
if (hasFlag("color=256")) return 2;
|
|
476
|
+
if (stream && !stream.isTTY && forceColor !== true) return 0;
|
|
477
|
+
var min = forceColor ? 1 : 0;
|
|
478
|
+
if (process.platform === "win32") {
|
|
479
|
+
var osRelease = os.release().split(".");
|
|
480
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
481
|
+
return 1;
|
|
482
|
+
}
|
|
483
|
+
if ("CI" in env) {
|
|
484
|
+
if ([
|
|
485
|
+
"TRAVIS",
|
|
486
|
+
"CIRCLECI",
|
|
487
|
+
"APPVEYOR",
|
|
488
|
+
"GITLAB_CI"
|
|
489
|
+
].some(function(sign) {
|
|
490
|
+
return sign in env;
|
|
491
|
+
}) || env.CI_NAME === "codeship") return 1;
|
|
492
|
+
return min;
|
|
493
|
+
}
|
|
494
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
495
|
+
if ("TERM_PROGRAM" in env) {
|
|
496
|
+
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
497
|
+
switch (env.TERM_PROGRAM) {
|
|
498
|
+
case "iTerm.app": return version >= 3 ? 3 : 2;
|
|
499
|
+
case "Hyper": return 3;
|
|
500
|
+
case "Apple_Terminal": return 2;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
504
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
505
|
+
if ("COLORTERM" in env) return 1;
|
|
506
|
+
if (env.TERM === "dumb") return min;
|
|
507
|
+
return min;
|
|
508
|
+
}
|
|
509
|
+
function getSupportLevel(stream) {
|
|
510
|
+
var level$1 = supportsColor(stream);
|
|
511
|
+
return translateLevel(level$1);
|
|
512
|
+
}
|
|
513
|
+
module.exports = {
|
|
514
|
+
supportsColor: getSupportLevel,
|
|
515
|
+
stdout: getSupportLevel(process.stdout),
|
|
516
|
+
stderr: getSupportLevel(process.stderr)
|
|
517
|
+
};
|
|
518
|
+
} });
|
|
519
|
+
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region node_modules/@colors/colors/lib/custom/trap.js
|
|
522
|
+
var require_trap = __commonJS({ "node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
|
|
523
|
+
module["exports"] = function runTheTrap(text, options) {
|
|
524
|
+
var result = "";
|
|
525
|
+
text = text || "Run the trap, drop the bass";
|
|
526
|
+
text = text.split("");
|
|
527
|
+
var trap = {
|
|
528
|
+
a: [
|
|
529
|
+
"@",
|
|
530
|
+
"Ą",
|
|
531
|
+
"Ⱥ",
|
|
532
|
+
"Ʌ",
|
|
533
|
+
"Δ",
|
|
534
|
+
"Λ",
|
|
535
|
+
"Д"
|
|
536
|
+
],
|
|
537
|
+
b: [
|
|
538
|
+
"ß",
|
|
539
|
+
"Ɓ",
|
|
540
|
+
"Ƀ",
|
|
541
|
+
"ɮ",
|
|
542
|
+
"β",
|
|
543
|
+
"฿"
|
|
544
|
+
],
|
|
545
|
+
c: [
|
|
546
|
+
"©",
|
|
547
|
+
"Ȼ",
|
|
548
|
+
"Ͼ"
|
|
549
|
+
],
|
|
550
|
+
d: [
|
|
551
|
+
"Ð",
|
|
552
|
+
"Ɗ",
|
|
553
|
+
"Ԁ",
|
|
554
|
+
"ԁ",
|
|
555
|
+
"Ԃ",
|
|
556
|
+
"ԃ"
|
|
557
|
+
],
|
|
558
|
+
e: [
|
|
559
|
+
"Ë",
|
|
560
|
+
"ĕ",
|
|
561
|
+
"Ǝ",
|
|
562
|
+
"ɘ",
|
|
563
|
+
"Σ",
|
|
564
|
+
"ξ",
|
|
565
|
+
"Ҽ",
|
|
566
|
+
"੬"
|
|
567
|
+
],
|
|
568
|
+
f: ["Ӻ"],
|
|
569
|
+
g: ["ɢ"],
|
|
570
|
+
h: [
|
|
571
|
+
"Ħ",
|
|
572
|
+
"ƕ",
|
|
573
|
+
"Ң",
|
|
574
|
+
"Һ",
|
|
575
|
+
"Ӈ",
|
|
576
|
+
"Ԋ"
|
|
577
|
+
],
|
|
578
|
+
i: ["༏"],
|
|
579
|
+
j: ["Ĵ"],
|
|
580
|
+
k: [
|
|
581
|
+
"ĸ",
|
|
582
|
+
"Ҡ",
|
|
583
|
+
"Ӄ",
|
|
584
|
+
"Ԟ"
|
|
585
|
+
],
|
|
586
|
+
l: ["Ĺ"],
|
|
587
|
+
m: [
|
|
588
|
+
"ʍ",
|
|
589
|
+
"Ӎ",
|
|
590
|
+
"ӎ",
|
|
591
|
+
"Ԡ",
|
|
592
|
+
"ԡ",
|
|
593
|
+
"൩"
|
|
594
|
+
],
|
|
595
|
+
n: [
|
|
596
|
+
"Ñ",
|
|
597
|
+
"ŋ",
|
|
598
|
+
"Ɲ",
|
|
599
|
+
"Ͷ",
|
|
600
|
+
"Π",
|
|
601
|
+
"Ҋ"
|
|
602
|
+
],
|
|
603
|
+
o: [
|
|
604
|
+
"Ø",
|
|
605
|
+
"õ",
|
|
606
|
+
"ø",
|
|
607
|
+
"Ǿ",
|
|
608
|
+
"ʘ",
|
|
609
|
+
"Ѻ",
|
|
610
|
+
"ם",
|
|
611
|
+
"",
|
|
612
|
+
"๏"
|
|
613
|
+
],
|
|
614
|
+
p: ["Ƿ", "Ҏ"],
|
|
615
|
+
q: ["্"],
|
|
616
|
+
r: [
|
|
617
|
+
"®",
|
|
618
|
+
"Ʀ",
|
|
619
|
+
"Ȑ",
|
|
620
|
+
"Ɍ",
|
|
621
|
+
"ʀ",
|
|
622
|
+
"Я"
|
|
623
|
+
],
|
|
624
|
+
s: [
|
|
625
|
+
"§",
|
|
626
|
+
"Ϟ",
|
|
627
|
+
"ϟ",
|
|
628
|
+
"Ϩ"
|
|
629
|
+
],
|
|
630
|
+
t: [
|
|
631
|
+
"Ł",
|
|
632
|
+
"Ŧ",
|
|
633
|
+
"ͳ"
|
|
634
|
+
],
|
|
635
|
+
u: ["Ʊ", "Ս"],
|
|
636
|
+
v: ["ט"],
|
|
637
|
+
w: [
|
|
638
|
+
"Ш",
|
|
639
|
+
"Ѡ",
|
|
640
|
+
"Ѽ",
|
|
641
|
+
"൰"
|
|
642
|
+
],
|
|
643
|
+
x: [
|
|
644
|
+
"Ҳ",
|
|
645
|
+
"Ӿ",
|
|
646
|
+
"Ӽ",
|
|
647
|
+
"ӽ"
|
|
648
|
+
],
|
|
649
|
+
y: [
|
|
650
|
+
"¥",
|
|
651
|
+
"Ұ",
|
|
652
|
+
"Ӌ"
|
|
653
|
+
],
|
|
654
|
+
z: ["Ƶ", "ɀ"]
|
|
655
|
+
};
|
|
656
|
+
text.forEach(function(c) {
|
|
657
|
+
c = c.toLowerCase();
|
|
658
|
+
var chars = trap[c] || [" "];
|
|
659
|
+
var rand = Math.floor(Math.random() * chars.length);
|
|
660
|
+
if (typeof trap[c] !== "undefined") result += trap[c][rand];
|
|
661
|
+
else result += c;
|
|
662
|
+
});
|
|
663
|
+
return result;
|
|
664
|
+
};
|
|
665
|
+
} });
|
|
666
|
+
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region node_modules/@colors/colors/lib/custom/zalgo.js
|
|
669
|
+
var require_zalgo = __commonJS({ "node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
|
|
670
|
+
module["exports"] = function zalgo(text, options) {
|
|
671
|
+
text = text || " he is here ";
|
|
672
|
+
var soul = {
|
|
673
|
+
"up": [
|
|
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
|
+
"̽",
|
|
706
|
+
"̉",
|
|
707
|
+
"ͣ",
|
|
708
|
+
"ͤ",
|
|
709
|
+
"ͥ",
|
|
710
|
+
"ͦ",
|
|
711
|
+
"ͧ",
|
|
712
|
+
"ͨ",
|
|
713
|
+
"ͩ",
|
|
714
|
+
"ͪ",
|
|
715
|
+
"ͫ",
|
|
716
|
+
"ͬ",
|
|
717
|
+
"ͭ",
|
|
718
|
+
"ͮ",
|
|
719
|
+
"ͯ",
|
|
720
|
+
"̾",
|
|
721
|
+
"͛",
|
|
722
|
+
"͆",
|
|
723
|
+
"̚"
|
|
724
|
+
],
|
|
725
|
+
"down": [
|
|
726
|
+
"̖",
|
|
727
|
+
"̗",
|
|
728
|
+
"̘",
|
|
729
|
+
"̙",
|
|
730
|
+
"̜",
|
|
731
|
+
"̝",
|
|
732
|
+
"̞",
|
|
733
|
+
"̟",
|
|
734
|
+
"̠",
|
|
735
|
+
"̤",
|
|
736
|
+
"̥",
|
|
737
|
+
"̦",
|
|
738
|
+
"̩",
|
|
739
|
+
"̪",
|
|
740
|
+
"̫",
|
|
741
|
+
"̬",
|
|
742
|
+
"̭",
|
|
743
|
+
"̮",
|
|
744
|
+
"̯",
|
|
745
|
+
"̰",
|
|
746
|
+
"̱",
|
|
747
|
+
"̲",
|
|
748
|
+
"̳",
|
|
749
|
+
"̹",
|
|
750
|
+
"̺",
|
|
751
|
+
"̻",
|
|
752
|
+
"̼",
|
|
753
|
+
"ͅ",
|
|
754
|
+
"͇",
|
|
755
|
+
"͈",
|
|
756
|
+
"͉",
|
|
757
|
+
"͍",
|
|
758
|
+
"͎",
|
|
759
|
+
"͓",
|
|
760
|
+
"͔",
|
|
761
|
+
"͕",
|
|
762
|
+
"͖",
|
|
763
|
+
"͙",
|
|
764
|
+
"͚",
|
|
765
|
+
"̣"
|
|
766
|
+
],
|
|
767
|
+
"mid": [
|
|
768
|
+
"̕",
|
|
769
|
+
"̛",
|
|
770
|
+
"̀",
|
|
771
|
+
"́",
|
|
772
|
+
"͘",
|
|
773
|
+
"̡",
|
|
774
|
+
"̢",
|
|
775
|
+
"̧",
|
|
776
|
+
"̨",
|
|
777
|
+
"̴",
|
|
778
|
+
"̵",
|
|
779
|
+
"̶",
|
|
780
|
+
"͜",
|
|
781
|
+
"͝",
|
|
782
|
+
"͞",
|
|
783
|
+
"͟",
|
|
784
|
+
"͠",
|
|
785
|
+
"͢",
|
|
786
|
+
"̸",
|
|
787
|
+
"̷",
|
|
788
|
+
"͡",
|
|
789
|
+
" ҉"
|
|
790
|
+
]
|
|
791
|
+
};
|
|
792
|
+
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
793
|
+
function randomNumber(range) {
|
|
794
|
+
var r = Math.floor(Math.random() * range);
|
|
795
|
+
return r;
|
|
796
|
+
}
|
|
797
|
+
function isChar(character) {
|
|
798
|
+
var bool = false;
|
|
799
|
+
all.filter(function(i) {
|
|
800
|
+
bool = i === character;
|
|
801
|
+
});
|
|
802
|
+
return bool;
|
|
803
|
+
}
|
|
804
|
+
function heComes(text$1, options$1) {
|
|
805
|
+
var result = "";
|
|
806
|
+
var counts;
|
|
807
|
+
var l;
|
|
808
|
+
options$1 = options$1 || {};
|
|
809
|
+
options$1["up"] = typeof options$1["up"] !== "undefined" ? options$1["up"] : true;
|
|
810
|
+
options$1["mid"] = typeof options$1["mid"] !== "undefined" ? options$1["mid"] : true;
|
|
811
|
+
options$1["down"] = typeof options$1["down"] !== "undefined" ? options$1["down"] : true;
|
|
812
|
+
options$1["size"] = typeof options$1["size"] !== "undefined" ? options$1["size"] : "maxi";
|
|
813
|
+
text$1 = text$1.split("");
|
|
814
|
+
for (l in text$1) {
|
|
815
|
+
if (isChar(l)) continue;
|
|
816
|
+
result = result + text$1[l];
|
|
817
|
+
counts = {
|
|
818
|
+
"up": 0,
|
|
819
|
+
"down": 0,
|
|
820
|
+
"mid": 0
|
|
821
|
+
};
|
|
822
|
+
switch (options$1.size) {
|
|
823
|
+
case "mini":
|
|
824
|
+
counts.up = randomNumber(8);
|
|
825
|
+
counts.mid = randomNumber(2);
|
|
826
|
+
counts.down = randomNumber(8);
|
|
827
|
+
break;
|
|
828
|
+
case "maxi":
|
|
829
|
+
counts.up = randomNumber(16) + 3;
|
|
830
|
+
counts.mid = randomNumber(4) + 1;
|
|
831
|
+
counts.down = randomNumber(64) + 3;
|
|
832
|
+
break;
|
|
833
|
+
default:
|
|
834
|
+
counts.up = randomNumber(8) + 1;
|
|
835
|
+
counts.mid = randomNumber(6) / 2;
|
|
836
|
+
counts.down = randomNumber(8) + 1;
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
var arr = [
|
|
840
|
+
"up",
|
|
841
|
+
"mid",
|
|
842
|
+
"down"
|
|
843
|
+
];
|
|
844
|
+
for (var d in arr) {
|
|
845
|
+
var index = arr[d];
|
|
846
|
+
for (var i = 0; i <= counts[index]; i++) if (options$1[index]) result = result + soul[index][randomNumber(soul[index].length)];
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
return result;
|
|
850
|
+
}
|
|
851
|
+
return heComes(text, options);
|
|
852
|
+
};
|
|
853
|
+
} });
|
|
854
|
+
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region node_modules/@colors/colors/lib/maps/america.js
|
|
857
|
+
var require_america = __commonJS({ "node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
|
|
858
|
+
module["exports"] = function(colors$2) {
|
|
859
|
+
return function(letter, i, exploded) {
|
|
860
|
+
if (letter === " ") return letter;
|
|
861
|
+
switch (i % 3) {
|
|
862
|
+
case 0: return colors$2.red(letter);
|
|
863
|
+
case 1: return colors$2.white(letter);
|
|
864
|
+
case 2: return colors$2.blue(letter);
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
} });
|
|
869
|
+
|
|
870
|
+
//#endregion
|
|
871
|
+
//#region node_modules/@colors/colors/lib/maps/zebra.js
|
|
872
|
+
var require_zebra = __commonJS({ "node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
|
|
873
|
+
module["exports"] = function(colors$2) {
|
|
874
|
+
return function(letter, i, exploded) {
|
|
875
|
+
return i % 2 === 0 ? letter : colors$2.inverse(letter);
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
} });
|
|
879
|
+
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region node_modules/@colors/colors/lib/maps/rainbow.js
|
|
882
|
+
var require_rainbow = __commonJS({ "node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
|
|
883
|
+
module["exports"] = function(colors$2) {
|
|
884
|
+
var rainbowColors = [
|
|
885
|
+
"red",
|
|
886
|
+
"yellow",
|
|
887
|
+
"green",
|
|
888
|
+
"blue",
|
|
889
|
+
"magenta"
|
|
890
|
+
];
|
|
891
|
+
return function(letter, i, exploded) {
|
|
892
|
+
if (letter === " ") return letter;
|
|
893
|
+
else return colors$2[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
} });
|
|
897
|
+
|
|
898
|
+
//#endregion
|
|
899
|
+
//#region node_modules/@colors/colors/lib/maps/random.js
|
|
900
|
+
var require_random = __commonJS({ "node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
|
|
901
|
+
module["exports"] = function(colors$2) {
|
|
902
|
+
var available = [
|
|
903
|
+
"underline",
|
|
904
|
+
"inverse",
|
|
905
|
+
"grey",
|
|
906
|
+
"yellow",
|
|
907
|
+
"red",
|
|
908
|
+
"green",
|
|
909
|
+
"blue",
|
|
910
|
+
"white",
|
|
911
|
+
"cyan",
|
|
912
|
+
"magenta",
|
|
913
|
+
"brightYellow",
|
|
914
|
+
"brightRed",
|
|
915
|
+
"brightGreen",
|
|
916
|
+
"brightBlue",
|
|
917
|
+
"brightWhite",
|
|
918
|
+
"brightCyan",
|
|
919
|
+
"brightMagenta"
|
|
920
|
+
];
|
|
921
|
+
return function(letter, i, exploded) {
|
|
922
|
+
return letter === " " ? letter : colors$2[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} });
|
|
926
|
+
|
|
927
|
+
//#endregion
|
|
928
|
+
//#region node_modules/@colors/colors/lib/colors.js
|
|
929
|
+
var require_colors = __commonJS({ "node_modules/@colors/colors/lib/colors.js"(exports, module) {
|
|
930
|
+
var colors$1 = {};
|
|
931
|
+
module["exports"] = colors$1;
|
|
932
|
+
colors$1.themes = {};
|
|
933
|
+
var util = __require("util");
|
|
934
|
+
var ansiStyles = colors$1.styles = require_styles();
|
|
935
|
+
var defineProps = Object.defineProperties;
|
|
936
|
+
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
937
|
+
colors$1.supportsColor = require_supports_colors().supportsColor;
|
|
938
|
+
if (typeof colors$1.enabled === "undefined") colors$1.enabled = colors$1.supportsColor() !== false;
|
|
939
|
+
colors$1.enable = function() {
|
|
940
|
+
colors$1.enabled = true;
|
|
941
|
+
};
|
|
942
|
+
colors$1.disable = function() {
|
|
943
|
+
colors$1.enabled = false;
|
|
944
|
+
};
|
|
945
|
+
colors$1.stripColors = colors$1.strip = function(str) {
|
|
946
|
+
return ("" + str).replace(/\x1B\[\d+m/g, "");
|
|
947
|
+
};
|
|
948
|
+
var stylize = colors$1.stylize = function stylize$1(str, style) {
|
|
949
|
+
if (!colors$1.enabled) return str + "";
|
|
950
|
+
var styleMap = ansiStyles[style];
|
|
951
|
+
if (!styleMap && style in colors$1) return colors$1[style](str);
|
|
952
|
+
return styleMap.open + str + styleMap.close;
|
|
953
|
+
};
|
|
954
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
955
|
+
var escapeStringRegexp = function(str) {
|
|
956
|
+
if (typeof str !== "string") throw new TypeError("Expected a string");
|
|
957
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
|
958
|
+
};
|
|
959
|
+
function build(_styles) {
|
|
960
|
+
var builder = function builder$1() {
|
|
961
|
+
return applyStyle.apply(builder$1, arguments);
|
|
962
|
+
};
|
|
963
|
+
builder._styles = _styles;
|
|
964
|
+
builder.__proto__ = proto;
|
|
965
|
+
return builder;
|
|
966
|
+
}
|
|
967
|
+
var styles = function() {
|
|
968
|
+
var ret = {};
|
|
969
|
+
ansiStyles.grey = ansiStyles.gray;
|
|
970
|
+
Object.keys(ansiStyles).forEach(function(key) {
|
|
971
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
972
|
+
ret[key] = { get: function() {
|
|
973
|
+
return build(this._styles.concat(key));
|
|
974
|
+
} };
|
|
975
|
+
});
|
|
976
|
+
return ret;
|
|
977
|
+
}();
|
|
978
|
+
var proto = defineProps(function colors$2() {}, styles);
|
|
979
|
+
function applyStyle() {
|
|
980
|
+
var args = Array.prototype.slice.call(arguments);
|
|
981
|
+
var str = args.map(function(arg) {
|
|
982
|
+
if (arg != null && arg.constructor === String) return arg;
|
|
983
|
+
else return util.inspect(arg);
|
|
984
|
+
}).join(" ");
|
|
985
|
+
if (!colors$1.enabled || !str) return str;
|
|
986
|
+
var newLinesPresent = str.indexOf("\n") != -1;
|
|
987
|
+
var nestedStyles = this._styles;
|
|
988
|
+
var i = nestedStyles.length;
|
|
989
|
+
while (i--) {
|
|
990
|
+
var code = ansiStyles[nestedStyles[i]];
|
|
991
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
992
|
+
if (newLinesPresent) str = str.replace(newLineRegex, function(match) {
|
|
993
|
+
return code.close + match + code.open;
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
return str;
|
|
997
|
+
}
|
|
998
|
+
colors$1.setTheme = function(theme) {
|
|
999
|
+
if (typeof theme === "string") {
|
|
1000
|
+
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'));");
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
for (var style in theme) (function(style$1) {
|
|
1004
|
+
colors$1[style$1] = function(str) {
|
|
1005
|
+
if (typeof theme[style$1] === "object") {
|
|
1006
|
+
var out = str;
|
|
1007
|
+
for (var i in theme[style$1]) out = colors$1[theme[style$1][i]](out);
|
|
1008
|
+
return out;
|
|
1009
|
+
}
|
|
1010
|
+
return colors$1[theme[style$1]](str);
|
|
1011
|
+
};
|
|
1012
|
+
})(style);
|
|
1013
|
+
};
|
|
1014
|
+
function init() {
|
|
1015
|
+
var ret = {};
|
|
1016
|
+
Object.keys(styles).forEach(function(name) {
|
|
1017
|
+
ret[name] = { get: function() {
|
|
1018
|
+
return build([name]);
|
|
1019
|
+
} };
|
|
1020
|
+
});
|
|
1021
|
+
return ret;
|
|
1022
|
+
}
|
|
1023
|
+
var sequencer = function sequencer$1(map$1, str) {
|
|
1024
|
+
var exploded = str.split("");
|
|
1025
|
+
exploded = exploded.map(map$1);
|
|
1026
|
+
return exploded.join("");
|
|
1027
|
+
};
|
|
1028
|
+
colors$1.trap = require_trap();
|
|
1029
|
+
colors$1.zalgo = require_zalgo();
|
|
1030
|
+
colors$1.maps = {};
|
|
1031
|
+
colors$1.maps.america = require_america()(colors$1);
|
|
1032
|
+
colors$1.maps.zebra = require_zebra()(colors$1);
|
|
1033
|
+
colors$1.maps.rainbow = require_rainbow()(colors$1);
|
|
1034
|
+
colors$1.maps.random = require_random()(colors$1);
|
|
1035
|
+
for (var map in colors$1.maps) (function(map$1) {
|
|
1036
|
+
colors$1[map$1] = function(str) {
|
|
1037
|
+
return sequencer(colors$1.maps[map$1], str);
|
|
1038
|
+
};
|
|
1039
|
+
})(map);
|
|
1040
|
+
defineProps(colors$1, init());
|
|
1041
|
+
} });
|
|
1042
|
+
|
|
1043
|
+
//#endregion
|
|
1044
|
+
//#region node_modules/@colors/colors/safe.js
|
|
1045
|
+
var require_safe = __commonJS({ "node_modules/@colors/colors/safe.js"(exports, module) {
|
|
1046
|
+
var colors = require_colors();
|
|
1047
|
+
module["exports"] = colors;
|
|
1048
|
+
} });
|
|
1049
|
+
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region node_modules/cli-table3/src/cell.js
|
|
1052
|
+
var require_cell = __commonJS({ "node_modules/cli-table3/src/cell.js"(exports, module) {
|
|
1053
|
+
const { info, debug: debug$2 } = require_debug();
|
|
1054
|
+
const utils$1 = require_utils();
|
|
1055
|
+
var Cell$1 = class Cell$1 {
|
|
1056
|
+
/**
|
|
1057
|
+
* A representation of a cell within the table.
|
|
1058
|
+
* Implementations must have `init` and `draw` methods,
|
|
1059
|
+
* as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
|
|
1060
|
+
* @param options
|
|
1061
|
+
* @constructor
|
|
1062
|
+
*/
|
|
1063
|
+
constructor(options) {
|
|
1064
|
+
this.setOptions(options);
|
|
1065
|
+
/**
|
|
1066
|
+
* Each cell will have it's `x` and `y` values set by the `layout-manager` prior to
|
|
1067
|
+
* `init` being called;
|
|
1068
|
+
* @type {Number}
|
|
1069
|
+
*/
|
|
1070
|
+
this.x = null;
|
|
1071
|
+
this.y = null;
|
|
1072
|
+
}
|
|
1073
|
+
setOptions(options) {
|
|
1074
|
+
if ([
|
|
1075
|
+
"boolean",
|
|
1076
|
+
"number",
|
|
1077
|
+
"bigint",
|
|
1078
|
+
"string"
|
|
1079
|
+
].indexOf(typeof options) !== -1) options = { content: "" + options };
|
|
1080
|
+
options = options || {};
|
|
1081
|
+
this.options = options;
|
|
1082
|
+
let content = options.content;
|
|
1083
|
+
if ([
|
|
1084
|
+
"boolean",
|
|
1085
|
+
"number",
|
|
1086
|
+
"bigint",
|
|
1087
|
+
"string"
|
|
1088
|
+
].indexOf(typeof content) !== -1) this.content = String(content);
|
|
1089
|
+
else if (!content) this.content = this.options.href || "";
|
|
1090
|
+
else throw new Error("Content needs to be a primitive, got: " + typeof content);
|
|
1091
|
+
this.colSpan = options.colSpan || 1;
|
|
1092
|
+
this.rowSpan = options.rowSpan || 1;
|
|
1093
|
+
if (this.options.href) Object.defineProperty(this, "href", { get() {
|
|
1094
|
+
return this.options.href;
|
|
1095
|
+
} });
|
|
1096
|
+
}
|
|
1097
|
+
mergeTableOptions(tableOptions, cells) {
|
|
1098
|
+
this.cells = cells;
|
|
1099
|
+
let optionsChars = this.options.chars || {};
|
|
1100
|
+
let tableChars = tableOptions.chars;
|
|
1101
|
+
let chars = this.chars = {};
|
|
1102
|
+
CHAR_NAMES.forEach(function(name) {
|
|
1103
|
+
setOption(optionsChars, tableChars, name, chars);
|
|
1104
|
+
});
|
|
1105
|
+
this.truncate = this.options.truncate || tableOptions.truncate;
|
|
1106
|
+
let style = this.options.style = this.options.style || {};
|
|
1107
|
+
let tableStyle = tableOptions.style;
|
|
1108
|
+
setOption(style, tableStyle, "padding-left", this);
|
|
1109
|
+
setOption(style, tableStyle, "padding-right", this);
|
|
1110
|
+
this.head = style.head || tableStyle.head;
|
|
1111
|
+
this.border = style.border || tableStyle.border;
|
|
1112
|
+
this.fixedWidth = tableOptions.colWidths[this.x];
|
|
1113
|
+
this.lines = this.computeLines(tableOptions);
|
|
1114
|
+
this.desiredWidth = utils$1.strlen(this.content) + this.paddingLeft + this.paddingRight;
|
|
1115
|
+
this.desiredHeight = this.lines.length;
|
|
1116
|
+
}
|
|
1117
|
+
computeLines(tableOptions) {
|
|
1118
|
+
const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
|
|
1119
|
+
const { wordWrap: wordWrap$1 = tableWordWrap } = this.options;
|
|
1120
|
+
if (this.fixedWidth && wordWrap$1) {
|
|
1121
|
+
this.fixedWidth -= this.paddingLeft + this.paddingRight;
|
|
1122
|
+
if (this.colSpan) {
|
|
1123
|
+
let i = 1;
|
|
1124
|
+
while (i < this.colSpan) {
|
|
1125
|
+
this.fixedWidth += tableOptions.colWidths[this.x + i];
|
|
1126
|
+
i++;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
|
|
1130
|
+
const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
|
|
1131
|
+
return this.wrapLines(utils$1.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
|
|
1132
|
+
}
|
|
1133
|
+
return this.wrapLines(this.content.split("\n"));
|
|
1134
|
+
}
|
|
1135
|
+
wrapLines(computedLines) {
|
|
1136
|
+
const lines = utils$1.colorizeLines(computedLines);
|
|
1137
|
+
if (this.href) return lines.map((line) => utils$1.hyperlink(this.href, line));
|
|
1138
|
+
return lines;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Initializes the Cells data structure.
|
|
1142
|
+
*
|
|
1143
|
+
* @param tableOptions - A fully populated set of tableOptions.
|
|
1144
|
+
* In addition to the standard default values, tableOptions must have fully populated the
|
|
1145
|
+
* `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
|
|
1146
|
+
* of columns or rows (respectively) in this table, and each array item must be a Number.
|
|
1147
|
+
*
|
|
1148
|
+
*/
|
|
1149
|
+
init(tableOptions) {
|
|
1150
|
+
let x = this.x;
|
|
1151
|
+
let y = this.y;
|
|
1152
|
+
this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
|
|
1153
|
+
this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
|
|
1154
|
+
this.width = this.widths.reduce(sumPlusOne, -1);
|
|
1155
|
+
this.height = this.heights.reduce(sumPlusOne, -1);
|
|
1156
|
+
this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
|
|
1157
|
+
this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
|
|
1158
|
+
this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Draws the given line of the cell.
|
|
1162
|
+
* This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
|
|
1163
|
+
* @param lineNum - can be `top`, `bottom` or a numerical line number.
|
|
1164
|
+
* @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
|
|
1165
|
+
* many rows below it's being called from. Otherwise it's undefined.
|
|
1166
|
+
* @returns {String} The representation of this line.
|
|
1167
|
+
*/
|
|
1168
|
+
draw(lineNum, spanningCell) {
|
|
1169
|
+
if (lineNum == "top") return this.drawTop(this.drawRight);
|
|
1170
|
+
if (lineNum == "bottom") return this.drawBottom(this.drawRight);
|
|
1171
|
+
let content = utils$1.truncate(this.content, 10, this.truncate);
|
|
1172
|
+
if (!lineNum) info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
|
|
1173
|
+
let padLen = Math.max(this.height - this.lines.length, 0);
|
|
1174
|
+
let padTop;
|
|
1175
|
+
switch (this.vAlign) {
|
|
1176
|
+
case "center":
|
|
1177
|
+
padTop = Math.ceil(padLen / 2);
|
|
1178
|
+
break;
|
|
1179
|
+
case "bottom":
|
|
1180
|
+
padTop = padLen;
|
|
1181
|
+
break;
|
|
1182
|
+
default: padTop = 0;
|
|
1183
|
+
}
|
|
1184
|
+
if (lineNum < padTop || lineNum >= padTop + this.lines.length) return this.drawEmpty(this.drawRight, spanningCell);
|
|
1185
|
+
let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
|
|
1186
|
+
return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* Renders the top line of the cell.
|
|
1190
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1191
|
+
* @returns {String}
|
|
1192
|
+
*/
|
|
1193
|
+
drawTop(drawRight) {
|
|
1194
|
+
let content = [];
|
|
1195
|
+
if (this.cells) this.widths.forEach(function(width, index) {
|
|
1196
|
+
content.push(this._topLeftChar(index));
|
|
1197
|
+
content.push(utils$1.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
|
|
1198
|
+
}, this);
|
|
1199
|
+
else {
|
|
1200
|
+
content.push(this._topLeftChar(0));
|
|
1201
|
+
content.push(utils$1.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
|
|
1202
|
+
}
|
|
1203
|
+
if (drawRight) content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
|
|
1204
|
+
return this.wrapWithStyleColors("border", content.join(""));
|
|
1205
|
+
}
|
|
1206
|
+
_topLeftChar(offset) {
|
|
1207
|
+
let x = this.x + offset;
|
|
1208
|
+
let leftChar;
|
|
1209
|
+
if (this.y == 0) leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
|
|
1210
|
+
else if (x == 0) leftChar = "leftMid";
|
|
1211
|
+
else {
|
|
1212
|
+
leftChar = offset == 0 ? "midMid" : "bottomMid";
|
|
1213
|
+
if (this.cells) {
|
|
1214
|
+
let spanAbove = this.cells[this.y - 1][x] instanceof Cell$1.ColSpanCell;
|
|
1215
|
+
if (spanAbove) leftChar = offset == 0 ? "topMid" : "mid";
|
|
1216
|
+
if (offset == 0) {
|
|
1217
|
+
let i = 1;
|
|
1218
|
+
while (this.cells[this.y][x - i] instanceof Cell$1.ColSpanCell) i++;
|
|
1219
|
+
if (this.cells[this.y][x - i] instanceof Cell$1.RowSpanCell) leftChar = "leftMid";
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
return this.chars[leftChar];
|
|
1224
|
+
}
|
|
1225
|
+
wrapWithStyleColors(styleProperty, content) {
|
|
1226
|
+
if (this[styleProperty] && this[styleProperty].length) try {
|
|
1227
|
+
let colors$2 = require_safe();
|
|
1228
|
+
for (let i = this[styleProperty].length - 1; i >= 0; i--) colors$2 = colors$2[this[styleProperty][i]];
|
|
1229
|
+
return colors$2(content);
|
|
1230
|
+
} catch (e) {
|
|
1231
|
+
return content;
|
|
1232
|
+
}
|
|
1233
|
+
else return content;
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Renders a line of text.
|
|
1237
|
+
* @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
|
|
1238
|
+
* There may be top-padding above the first line of text.
|
|
1239
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1240
|
+
* @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
|
|
1241
|
+
* if the text fits. This is used when the cell is vertically truncated. If `false` the text should
|
|
1242
|
+
* only include the truncation symbol if the text will not fit horizontally within the cell width.
|
|
1243
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1244
|
+
* @returns {String}
|
|
1245
|
+
*/
|
|
1246
|
+
drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
|
|
1247
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1248
|
+
if (this.x && spanningCell && this.cells) {
|
|
1249
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1250
|
+
while (cellLeft instanceof ColSpanCell$1) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1251
|
+
if (!(cellLeft instanceof RowSpanCell$1)) left = this.chars["rightMid"];
|
|
1252
|
+
}
|
|
1253
|
+
let leftPadding = utils$1.repeat(" ", this.paddingLeft);
|
|
1254
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1255
|
+
let rightPadding = utils$1.repeat(" ", this.paddingRight);
|
|
1256
|
+
let line = this.lines[lineNum];
|
|
1257
|
+
let len = this.width - (this.paddingLeft + this.paddingRight);
|
|
1258
|
+
if (forceTruncationSymbol) line += this.truncate || "…";
|
|
1259
|
+
let content = utils$1.truncate(line, len, this.truncate);
|
|
1260
|
+
content = utils$1.pad(content, len, " ", this.hAlign);
|
|
1261
|
+
content = leftPadding + content + rightPadding;
|
|
1262
|
+
return this.stylizeLine(left, content, right);
|
|
1263
|
+
}
|
|
1264
|
+
stylizeLine(left, content, right) {
|
|
1265
|
+
left = this.wrapWithStyleColors("border", left);
|
|
1266
|
+
right = this.wrapWithStyleColors("border", right);
|
|
1267
|
+
if (this.y === 0) content = this.wrapWithStyleColors("head", content);
|
|
1268
|
+
return left + content + right;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Renders the bottom line of the cell.
|
|
1272
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1273
|
+
* @returns {String}
|
|
1274
|
+
*/
|
|
1275
|
+
drawBottom(drawRight) {
|
|
1276
|
+
let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
|
|
1277
|
+
let content = utils$1.repeat(this.chars.bottom, this.width);
|
|
1278
|
+
let right = drawRight ? this.chars["bottomRight"] : "";
|
|
1279
|
+
return this.wrapWithStyleColors("border", left + content + right);
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Renders a blank line of text within the cell. Used for top and/or bottom padding.
|
|
1283
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1284
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1285
|
+
* @returns {String}
|
|
1286
|
+
*/
|
|
1287
|
+
drawEmpty(drawRight, spanningCell) {
|
|
1288
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1289
|
+
if (this.x && spanningCell && this.cells) {
|
|
1290
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1291
|
+
while (cellLeft instanceof ColSpanCell$1) cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1292
|
+
if (!(cellLeft instanceof RowSpanCell$1)) left = this.chars["rightMid"];
|
|
1293
|
+
}
|
|
1294
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1295
|
+
let content = utils$1.repeat(" ", this.width);
|
|
1296
|
+
return this.stylizeLine(left, content, right);
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
var ColSpanCell$1 = class {
|
|
1300
|
+
/**
|
|
1301
|
+
* A Cell that doesn't do anything. It just draws empty lines.
|
|
1302
|
+
* Used as a placeholder in column spanning.
|
|
1303
|
+
* @constructor
|
|
1304
|
+
*/
|
|
1305
|
+
constructor() {}
|
|
1306
|
+
draw(lineNum) {
|
|
1307
|
+
if (typeof lineNum === "number") debug$2(`${this.y}-${this.x}: 1x1 ColSpanCell`);
|
|
1308
|
+
return "";
|
|
1309
|
+
}
|
|
1310
|
+
init() {}
|
|
1311
|
+
mergeTableOptions() {}
|
|
1312
|
+
};
|
|
1313
|
+
var RowSpanCell$1 = class {
|
|
1314
|
+
/**
|
|
1315
|
+
* A placeholder Cell for a Cell that spans multiple rows.
|
|
1316
|
+
* It delegates rendering to the original cell, but adds the appropriate offset.
|
|
1317
|
+
* @param originalCell
|
|
1318
|
+
* @constructor
|
|
1319
|
+
*/
|
|
1320
|
+
constructor(originalCell) {
|
|
1321
|
+
this.originalCell = originalCell;
|
|
1322
|
+
}
|
|
1323
|
+
init(tableOptions) {
|
|
1324
|
+
let y = this.y;
|
|
1325
|
+
let originalY = this.originalCell.y;
|
|
1326
|
+
this.cellOffset = y - originalY;
|
|
1327
|
+
this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
|
|
1328
|
+
}
|
|
1329
|
+
draw(lineNum) {
|
|
1330
|
+
if (lineNum == "top") return this.originalCell.draw(this.offset, this.cellOffset);
|
|
1331
|
+
if (lineNum == "bottom") return this.originalCell.draw("bottom");
|
|
1332
|
+
debug$2(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
|
|
1333
|
+
return this.originalCell.draw(this.offset + 1 + lineNum);
|
|
1334
|
+
}
|
|
1335
|
+
mergeTableOptions() {}
|
|
1336
|
+
};
|
|
1337
|
+
function firstDefined(...args) {
|
|
1338
|
+
return args.filter((v) => v !== void 0 && v !== null).shift();
|
|
1339
|
+
}
|
|
1340
|
+
function setOption(objA, objB, nameB, targetObj) {
|
|
1341
|
+
let nameA = nameB.split("-");
|
|
1342
|
+
if (nameA.length > 1) {
|
|
1343
|
+
nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
|
|
1344
|
+
nameA = nameA.join("");
|
|
1345
|
+
targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
|
|
1346
|
+
} else targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
|
|
1347
|
+
}
|
|
1348
|
+
function findDimension(dimensionTable, startingIndex, span) {
|
|
1349
|
+
let ret = dimensionTable[startingIndex];
|
|
1350
|
+
for (let i = 1; i < span; i++) ret += 1 + dimensionTable[startingIndex + i];
|
|
1351
|
+
return ret;
|
|
1352
|
+
}
|
|
1353
|
+
function sumPlusOne(a, b) {
|
|
1354
|
+
return a + b + 1;
|
|
1355
|
+
}
|
|
1356
|
+
let CHAR_NAMES = [
|
|
1357
|
+
"top",
|
|
1358
|
+
"top-mid",
|
|
1359
|
+
"top-left",
|
|
1360
|
+
"top-right",
|
|
1361
|
+
"bottom",
|
|
1362
|
+
"bottom-mid",
|
|
1363
|
+
"bottom-left",
|
|
1364
|
+
"bottom-right",
|
|
1365
|
+
"left",
|
|
1366
|
+
"left-mid",
|
|
1367
|
+
"mid",
|
|
1368
|
+
"mid-mid",
|
|
1369
|
+
"right",
|
|
1370
|
+
"right-mid",
|
|
1371
|
+
"middle"
|
|
1372
|
+
];
|
|
1373
|
+
module.exports = Cell$1;
|
|
1374
|
+
module.exports.ColSpanCell = ColSpanCell$1;
|
|
1375
|
+
module.exports.RowSpanCell = RowSpanCell$1;
|
|
1376
|
+
} });
|
|
1377
|
+
|
|
1378
|
+
//#endregion
|
|
1379
|
+
//#region node_modules/cli-table3/src/layout-manager.js
|
|
1380
|
+
var require_layout_manager = __commonJS({ "node_modules/cli-table3/src/layout-manager.js"(exports, module) {
|
|
1381
|
+
const { warn, debug: debug$1 } = require_debug();
|
|
1382
|
+
const Cell = require_cell();
|
|
1383
|
+
const { ColSpanCell, RowSpanCell } = Cell;
|
|
1384
|
+
(function() {
|
|
1385
|
+
function next(alloc, col) {
|
|
1386
|
+
if (alloc[col] > 0) return next(alloc, col + 1);
|
|
1387
|
+
return col;
|
|
1388
|
+
}
|
|
1389
|
+
function layoutTable(table) {
|
|
1390
|
+
let alloc = {};
|
|
1391
|
+
table.forEach(function(row, rowIndex) {
|
|
1392
|
+
let col = 0;
|
|
1393
|
+
row.forEach(function(cell) {
|
|
1394
|
+
cell.y = rowIndex;
|
|
1395
|
+
cell.x = rowIndex ? next(alloc, col) : col;
|
|
1396
|
+
const rowSpan = cell.rowSpan || 1;
|
|
1397
|
+
const colSpan = cell.colSpan || 1;
|
|
1398
|
+
if (rowSpan > 1) for (let cs = 0; cs < colSpan; cs++) alloc[cell.x + cs] = rowSpan;
|
|
1399
|
+
col = cell.x + colSpan;
|
|
1400
|
+
});
|
|
1401
|
+
Object.keys(alloc).forEach((idx) => {
|
|
1402
|
+
alloc[idx]--;
|
|
1403
|
+
if (alloc[idx] < 1) delete alloc[idx];
|
|
1404
|
+
});
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
function maxWidth(table) {
|
|
1408
|
+
let mw = 0;
|
|
1409
|
+
table.forEach(function(row) {
|
|
1410
|
+
row.forEach(function(cell) {
|
|
1411
|
+
mw = Math.max(mw, cell.x + (cell.colSpan || 1));
|
|
1412
|
+
});
|
|
1413
|
+
});
|
|
1414
|
+
return mw;
|
|
1415
|
+
}
|
|
1416
|
+
function maxHeight(table) {
|
|
1417
|
+
return table.length;
|
|
1418
|
+
}
|
|
1419
|
+
function cellsConflict(cell1, cell2) {
|
|
1420
|
+
let yMin1 = cell1.y;
|
|
1421
|
+
let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
|
|
1422
|
+
let yMin2 = cell2.y;
|
|
1423
|
+
let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
|
|
1424
|
+
let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
|
|
1425
|
+
let xMin1 = cell1.x;
|
|
1426
|
+
let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
|
|
1427
|
+
let xMin2 = cell2.x;
|
|
1428
|
+
let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
|
|
1429
|
+
let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
|
|
1430
|
+
return yConflict && xConflict;
|
|
1431
|
+
}
|
|
1432
|
+
function conflictExists(rows, x, y) {
|
|
1433
|
+
let i_max = Math.min(rows.length - 1, y);
|
|
1434
|
+
let cell = {
|
|
1435
|
+
x,
|
|
1436
|
+
y
|
|
1437
|
+
};
|
|
1438
|
+
for (let i = 0; i <= i_max; i++) {
|
|
1439
|
+
let row = rows[i];
|
|
1440
|
+
for (let j = 0; j < row.length; j++) if (cellsConflict(cell, row[j])) return true;
|
|
1441
|
+
}
|
|
1442
|
+
return false;
|
|
1443
|
+
}
|
|
1444
|
+
function allBlank(rows, y, xMin, xMax) {
|
|
1445
|
+
for (let x = xMin; x < xMax; x++) if (conflictExists(rows, x, y)) return false;
|
|
1446
|
+
return true;
|
|
1447
|
+
}
|
|
1448
|
+
function addRowSpanCells(table) {
|
|
1449
|
+
table.forEach(function(row, rowIndex) {
|
|
1450
|
+
row.forEach(function(cell) {
|
|
1451
|
+
for (let i = 1; i < cell.rowSpan; i++) {
|
|
1452
|
+
let rowSpanCell = new RowSpanCell(cell);
|
|
1453
|
+
rowSpanCell.x = cell.x;
|
|
1454
|
+
rowSpanCell.y = cell.y + i;
|
|
1455
|
+
rowSpanCell.colSpan = cell.colSpan;
|
|
1456
|
+
insertCell(rowSpanCell, table[rowIndex + i]);
|
|
1457
|
+
}
|
|
1458
|
+
});
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
function addColSpanCells(cellRows) {
|
|
1462
|
+
for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
|
|
1463
|
+
let cellColumns = cellRows[rowIndex];
|
|
1464
|
+
for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
|
|
1465
|
+
let cell = cellColumns[columnIndex];
|
|
1466
|
+
for (let k = 1; k < cell.colSpan; k++) {
|
|
1467
|
+
let colSpanCell = new ColSpanCell();
|
|
1468
|
+
colSpanCell.x = cell.x + k;
|
|
1469
|
+
colSpanCell.y = cell.y;
|
|
1470
|
+
cellColumns.splice(columnIndex + 1, 0, colSpanCell);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
function insertCell(cell, row) {
|
|
1476
|
+
let x = 0;
|
|
1477
|
+
while (x < row.length && row[x].x < cell.x) x++;
|
|
1478
|
+
row.splice(x, 0, cell);
|
|
1479
|
+
}
|
|
1480
|
+
function fillInTable(table) {
|
|
1481
|
+
let h_max = maxHeight(table);
|
|
1482
|
+
let w_max = maxWidth(table);
|
|
1483
|
+
debug$1(`Max rows: ${h_max}; Max cols: ${w_max}`);
|
|
1484
|
+
for (let y = 0; y < h_max; y++) for (let x = 0; x < w_max; x++) if (!conflictExists(table, x, y)) {
|
|
1485
|
+
let opts = {
|
|
1486
|
+
x,
|
|
1487
|
+
y,
|
|
1488
|
+
colSpan: 1,
|
|
1489
|
+
rowSpan: 1
|
|
1490
|
+
};
|
|
1491
|
+
x++;
|
|
1492
|
+
while (x < w_max && !conflictExists(table, x, y)) {
|
|
1493
|
+
opts.colSpan++;
|
|
1494
|
+
x++;
|
|
1495
|
+
}
|
|
1496
|
+
let y2 = y + 1;
|
|
1497
|
+
while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
|
|
1498
|
+
opts.rowSpan++;
|
|
1499
|
+
y2++;
|
|
1500
|
+
}
|
|
1501
|
+
let cell = new Cell(opts);
|
|
1502
|
+
cell.x = opts.x;
|
|
1503
|
+
cell.y = opts.y;
|
|
1504
|
+
warn(`Missing cell at ${cell.y}-${cell.x}.`);
|
|
1505
|
+
insertCell(cell, table[y]);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
function generateCells(rows) {
|
|
1509
|
+
return rows.map(function(row) {
|
|
1510
|
+
if (!Array.isArray(row)) {
|
|
1511
|
+
let key = Object.keys(row)[0];
|
|
1512
|
+
row = row[key];
|
|
1513
|
+
if (Array.isArray(row)) {
|
|
1514
|
+
row = row.slice();
|
|
1515
|
+
row.unshift(key);
|
|
1516
|
+
} else row = [key, row];
|
|
1517
|
+
}
|
|
1518
|
+
return row.map(function(cell) {
|
|
1519
|
+
return new Cell(cell);
|
|
1520
|
+
});
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
function makeTableLayout(rows) {
|
|
1524
|
+
let cellRows = generateCells(rows);
|
|
1525
|
+
layoutTable(cellRows);
|
|
1526
|
+
fillInTable(cellRows);
|
|
1527
|
+
addRowSpanCells(cellRows);
|
|
1528
|
+
addColSpanCells(cellRows);
|
|
1529
|
+
return cellRows;
|
|
1530
|
+
}
|
|
1531
|
+
module.exports = {
|
|
1532
|
+
makeTableLayout,
|
|
1533
|
+
layoutTable,
|
|
1534
|
+
addRowSpanCells,
|
|
1535
|
+
maxWidth,
|
|
1536
|
+
fillInTable,
|
|
1537
|
+
computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
|
|
1538
|
+
computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
|
|
1539
|
+
};
|
|
1540
|
+
})();
|
|
1541
|
+
function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
|
|
1542
|
+
return function(vals, table) {
|
|
1543
|
+
let result = [];
|
|
1544
|
+
let spanners = [];
|
|
1545
|
+
let auto = {};
|
|
1546
|
+
table.forEach(function(row) {
|
|
1547
|
+
row.forEach(function(cell) {
|
|
1548
|
+
if ((cell[colSpan] || 1) > 1) spanners.push(cell);
|
|
1549
|
+
else result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
|
|
1550
|
+
});
|
|
1551
|
+
});
|
|
1552
|
+
vals.forEach(function(val, index) {
|
|
1553
|
+
if (typeof val === "number") result[index] = val;
|
|
1554
|
+
});
|
|
1555
|
+
for (let k = spanners.length - 1; k >= 0; k--) {
|
|
1556
|
+
let cell = spanners[k];
|
|
1557
|
+
let span = cell[colSpan];
|
|
1558
|
+
let col = cell[x];
|
|
1559
|
+
let existingWidth = result[col];
|
|
1560
|
+
let editableCols = typeof vals[col] === "number" ? 0 : 1;
|
|
1561
|
+
if (typeof existingWidth === "number") for (let i = 1; i < span; i++) {
|
|
1562
|
+
existingWidth += 1 + result[col + i];
|
|
1563
|
+
if (typeof vals[col + i] !== "number") editableCols++;
|
|
1564
|
+
}
|
|
1565
|
+
else {
|
|
1566
|
+
existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
|
|
1567
|
+
if (!auto[col] || auto[col] < existingWidth) auto[col] = existingWidth;
|
|
1568
|
+
}
|
|
1569
|
+
if (cell[desiredWidth] > existingWidth) {
|
|
1570
|
+
let i = 0;
|
|
1571
|
+
while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
|
|
1572
|
+
if (typeof vals[col + i] !== "number") {
|
|
1573
|
+
let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
|
|
1574
|
+
existingWidth += dif;
|
|
1575
|
+
result[col + i] += dif;
|
|
1576
|
+
editableCols--;
|
|
1577
|
+
}
|
|
1578
|
+
i++;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
Object.assign(vals, result, auto);
|
|
1583
|
+
for (let j = 0; j < vals.length; j++) vals[j] = Math.max(forcedMin, vals[j] || 0);
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
} });
|
|
1587
|
+
|
|
1588
|
+
//#endregion
|
|
1589
|
+
//#region node_modules/cli-table3/src/table.js
|
|
1590
|
+
var require_table = __commonJS({ "node_modules/cli-table3/src/table.js"(exports, module) {
|
|
1591
|
+
const debug = require_debug();
|
|
1592
|
+
const utils = require_utils();
|
|
1593
|
+
const tableLayout = require_layout_manager();
|
|
1594
|
+
var Table$1 = class extends Array {
|
|
1595
|
+
constructor(opts) {
|
|
1596
|
+
super();
|
|
1597
|
+
const options = utils.mergeOptions(opts);
|
|
1598
|
+
Object.defineProperty(this, "options", {
|
|
1599
|
+
value: options,
|
|
1600
|
+
enumerable: options.debug
|
|
1601
|
+
});
|
|
1602
|
+
if (options.debug) {
|
|
1603
|
+
switch (typeof options.debug) {
|
|
1604
|
+
case "boolean":
|
|
1605
|
+
debug.setDebugLevel(debug.WARN);
|
|
1606
|
+
break;
|
|
1607
|
+
case "number":
|
|
1608
|
+
debug.setDebugLevel(options.debug);
|
|
1609
|
+
break;
|
|
1610
|
+
case "string":
|
|
1611
|
+
debug.setDebugLevel(parseInt(options.debug, 10));
|
|
1612
|
+
break;
|
|
1613
|
+
default:
|
|
1614
|
+
debug.setDebugLevel(debug.WARN);
|
|
1615
|
+
debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
|
|
1616
|
+
}
|
|
1617
|
+
Object.defineProperty(this, "messages", { get() {
|
|
1618
|
+
return debug.debugMessages();
|
|
1619
|
+
} });
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
toString() {
|
|
1623
|
+
let array = this;
|
|
1624
|
+
let headersPresent = this.options.head && this.options.head.length;
|
|
1625
|
+
if (headersPresent) {
|
|
1626
|
+
array = [this.options.head];
|
|
1627
|
+
if (this.length) array.push.apply(array, this);
|
|
1628
|
+
} else this.options.style.head = [];
|
|
1629
|
+
let cells = tableLayout.makeTableLayout(array);
|
|
1630
|
+
cells.forEach(function(row) {
|
|
1631
|
+
row.forEach(function(cell) {
|
|
1632
|
+
cell.mergeTableOptions(this.options, cells);
|
|
1633
|
+
}, this);
|
|
1634
|
+
}, this);
|
|
1635
|
+
tableLayout.computeWidths(this.options.colWidths, cells);
|
|
1636
|
+
tableLayout.computeHeights(this.options.rowHeights, cells);
|
|
1637
|
+
cells.forEach(function(row) {
|
|
1638
|
+
row.forEach(function(cell) {
|
|
1639
|
+
cell.init(this.options);
|
|
1640
|
+
}, this);
|
|
1641
|
+
}, this);
|
|
1642
|
+
let result = [];
|
|
1643
|
+
for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
|
|
1644
|
+
let row = cells[rowIndex];
|
|
1645
|
+
let heightOfRow = this.options.rowHeights[rowIndex];
|
|
1646
|
+
if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) doDraw(row, "top", result);
|
|
1647
|
+
for (let lineNum = 0; lineNum < heightOfRow; lineNum++) doDraw(row, lineNum, result);
|
|
1648
|
+
if (rowIndex + 1 == cells.length) doDraw(row, "bottom", result);
|
|
1649
|
+
}
|
|
1650
|
+
return result.join("\n");
|
|
1651
|
+
}
|
|
1652
|
+
get width() {
|
|
1653
|
+
let str = this.toString().split("\n");
|
|
1654
|
+
return str[0].length;
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1657
|
+
Table$1.reset = () => debug.reset();
|
|
1658
|
+
function doDraw(row, lineNum, result) {
|
|
1659
|
+
let line = [];
|
|
1660
|
+
row.forEach(function(cell) {
|
|
1661
|
+
line.push(cell.draw(lineNum));
|
|
1662
|
+
});
|
|
1663
|
+
let str = line.join("");
|
|
1664
|
+
if (str.length) result.push(str);
|
|
1665
|
+
}
|
|
1666
|
+
module.exports = Table$1;
|
|
1667
|
+
} });
|
|
1668
|
+
|
|
1669
|
+
//#endregion
|
|
1670
|
+
//#region node_modules/cli-table3/index.js
|
|
1671
|
+
var require_cli_table3 = __commonJS({ "node_modules/cli-table3/index.js"(exports, module) {
|
|
1672
|
+
module.exports = require_table();
|
|
1673
|
+
} });
|
|
1674
|
+
|
|
1675
|
+
//#endregion
|
|
1676
|
+
//#region node_modules/ansi-regex/index.js
|
|
1677
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
1678
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
1679
|
+
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
1680
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
//#endregion
|
|
1684
|
+
//#region node_modules/strip-ansi/index.js
|
|
1685
|
+
const regex = ansiRegex();
|
|
1686
|
+
function stripAnsi(string) {
|
|
1687
|
+
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
1688
|
+
return string.replace(regex, "");
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
//#endregion
|
|
1692
|
+
//#region node_modules/get-east-asian-width/lookup.js
|
|
1693
|
+
function isAmbiguous(x) {
|
|
1694
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
1695
|
+
}
|
|
1696
|
+
function isFullWidth(x) {
|
|
1697
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
1698
|
+
}
|
|
1699
|
+
function isWide(x) {
|
|
1700
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region node_modules/get-east-asian-width/index.js
|
|
1705
|
+
function validate(codePoint) {
|
|
1706
|
+
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
1707
|
+
}
|
|
1708
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
1709
|
+
validate(codePoint);
|
|
1710
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
1711
|
+
return 1;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
//#endregion
|
|
1715
|
+
//#region node_modules/emoji-regex/index.js
|
|
1716
|
+
var require_emoji_regex = __commonJS({ "node_modules/emoji-regex/index.js"(exports, module) {
|
|
1717
|
+
module.exports = () => {
|
|
1718
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
1719
|
+
};
|
|
1720
|
+
} });
|
|
1721
|
+
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region node_modules/string-width/index.js
|
|
1724
|
+
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
1725
|
+
const segmenter = new Intl.Segmenter();
|
|
1726
|
+
const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
1727
|
+
function stringWidth(string, options = {}) {
|
|
1728
|
+
if (typeof string !== "string" || string.length === 0) return 0;
|
|
1729
|
+
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
1730
|
+
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
1731
|
+
if (string.length === 0) return 0;
|
|
1732
|
+
let width = 0;
|
|
1733
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
1734
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
1735
|
+
const codePoint = character.codePointAt(0);
|
|
1736
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
|
|
1737
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
|
|
1738
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
|
|
1739
|
+
if (codePoint >= 55296 && codePoint <= 57343) continue;
|
|
1740
|
+
if (codePoint >= 65024 && codePoint <= 65039) continue;
|
|
1741
|
+
if (defaultIgnorableCodePointRegex.test(character)) continue;
|
|
1742
|
+
if ((0, import_emoji_regex.default)().test(character)) {
|
|
1743
|
+
width += 2;
|
|
1744
|
+
continue;
|
|
1745
|
+
}
|
|
1746
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
1747
|
+
}
|
|
1748
|
+
return width;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
//#endregion
|
|
1752
|
+
//#region src/utils.table.ts
|
|
1753
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
1754
|
+
var ResponsiveTable = class {
|
|
1755
|
+
head;
|
|
1756
|
+
rows = [];
|
|
1757
|
+
colAligns;
|
|
1758
|
+
style;
|
|
1759
|
+
dateFormatter;
|
|
1760
|
+
constructor(options) {
|
|
1761
|
+
this.head = options.head;
|
|
1762
|
+
this.colAligns = options.colAligns ?? Array.from({ length: this.head.length }, () => "left");
|
|
1763
|
+
this.style = options.style;
|
|
1764
|
+
this.dateFormatter = options.dateFormatter;
|
|
1765
|
+
}
|
|
1766
|
+
push(row) {
|
|
1767
|
+
this.rows.push(row);
|
|
1768
|
+
}
|
|
1769
|
+
toString() {
|
|
1770
|
+
const terminalWidth = process$1.stdout.columns || 120;
|
|
1771
|
+
const dataRows = this.rows.filter((row) => !this.isSeparatorRow(row));
|
|
1772
|
+
const allRows = [this.head.map(String), ...dataRows.map((row) => row.map(String))];
|
|
1773
|
+
const contentWidths = this.head.map((_, colIndex) => {
|
|
1774
|
+
const maxLength = Math.max(...allRows.map((row) => stringWidth(String(row[colIndex] ?? ""))));
|
|
1775
|
+
return maxLength;
|
|
1776
|
+
});
|
|
1777
|
+
const numColumns = this.head.length;
|
|
1778
|
+
const tableOverhead = 3 * numColumns + 1;
|
|
1779
|
+
const availableWidth = terminalWidth - tableOverhead;
|
|
1780
|
+
const columnWidths = contentWidths.map((width, index) => {
|
|
1781
|
+
const align = this.colAligns[index];
|
|
1782
|
+
if (align === "right") return Math.max(width + 3, 11);
|
|
1783
|
+
else if (index === 1) return Math.max(width + 2, 15);
|
|
1784
|
+
return Math.max(width + 2, 10);
|
|
1785
|
+
});
|
|
1786
|
+
const totalRequiredWidth = columnWidths.reduce((sum, width) => sum + width, 0) + tableOverhead;
|
|
1787
|
+
if (totalRequiredWidth > terminalWidth) {
|
|
1788
|
+
const scaleFactor = availableWidth / columnWidths.reduce((sum, width) => sum + width, 0);
|
|
1789
|
+
const adjustedWidths = columnWidths.map((width, index) => {
|
|
1790
|
+
const align = this.colAligns[index];
|
|
1791
|
+
let adjustedWidth = Math.floor(width * scaleFactor);
|
|
1792
|
+
if (align === "right") adjustedWidth = Math.max(adjustedWidth, 10);
|
|
1793
|
+
else if (index === 0) adjustedWidth = Math.max(adjustedWidth, 10);
|
|
1794
|
+
else if (index === 1) adjustedWidth = Math.max(adjustedWidth, 12);
|
|
1795
|
+
else adjustedWidth = Math.max(adjustedWidth, 8);
|
|
1796
|
+
return adjustedWidth;
|
|
1797
|
+
});
|
|
1798
|
+
const table = new import_cli_table3.default({
|
|
1799
|
+
head: this.head,
|
|
1800
|
+
style: this.style,
|
|
1801
|
+
colAligns: this.colAligns,
|
|
1802
|
+
colWidths: adjustedWidths,
|
|
1803
|
+
wordWrap: true,
|
|
1804
|
+
wrapOnWordBoundary: true
|
|
1805
|
+
});
|
|
1806
|
+
for (const row of this.rows) if (this.isSeparatorRow(row)) continue;
|
|
1807
|
+
else {
|
|
1808
|
+
const processedRow = row.map((cell, index) => {
|
|
1809
|
+
if (index === 0 && this.dateFormatter != null && typeof cell === "string" && this.isDateString(cell)) return this.dateFormatter(cell);
|
|
1810
|
+
return cell;
|
|
1811
|
+
});
|
|
1812
|
+
table.push(processedRow);
|
|
1813
|
+
}
|
|
1814
|
+
return table.toString();
|
|
1815
|
+
} else {
|
|
1816
|
+
const table = new import_cli_table3.default({
|
|
1817
|
+
head: this.head,
|
|
1818
|
+
style: this.style,
|
|
1819
|
+
colAligns: this.colAligns,
|
|
1820
|
+
colWidths: columnWidths,
|
|
1821
|
+
wordWrap: true,
|
|
1822
|
+
wrapOnWordBoundary: true
|
|
1823
|
+
});
|
|
1824
|
+
for (const row of this.rows) if (this.isSeparatorRow(row)) continue;
|
|
1825
|
+
else table.push(row);
|
|
1826
|
+
return table.toString();
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
isSeparatorRow(row) {
|
|
1830
|
+
return row.every((cell) => typeof cell === "string" && (cell === "" || /^─+$/.test(cell)));
|
|
1831
|
+
}
|
|
1832
|
+
isDateString(text) {
|
|
1833
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(text);
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
//#endregion
|
|
1838
|
+
export { ResponsiveTable };
|