mobbin-cli 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +62 -4154
- package/dist/index.js.map +1 -1
- package/package.json +40 -36
- package/dist/chunk-ZWE3DS7E.js +0 -39
- package/dist/chunk-ZWE3DS7E.js.map +0 -1
- package/dist/prompt-XYKYOJRA.js +0 -756
- package/dist/prompt-XYKYOJRA.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,3671 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
__commonJS,
|
|
4
|
-
__require,
|
|
5
|
-
__toESM
|
|
6
|
-
} from "./chunk-ZWE3DS7E.js";
|
|
7
2
|
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js"(exports, module) {
|
|
11
|
-
"use strict";
|
|
12
|
-
var messages = [];
|
|
13
|
-
var level = 0;
|
|
14
|
-
var debug = (msg, min) => {
|
|
15
|
-
if (level >= min) {
|
|
16
|
-
messages.push(msg);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
debug.WARN = 1;
|
|
20
|
-
debug.INFO = 2;
|
|
21
|
-
debug.DEBUG = 3;
|
|
22
|
-
debug.reset = () => {
|
|
23
|
-
messages = [];
|
|
24
|
-
};
|
|
25
|
-
debug.setDebugLevel = (v2) => {
|
|
26
|
-
level = v2;
|
|
27
|
-
};
|
|
28
|
-
debug.warn = (msg) => debug(msg, debug.WARN);
|
|
29
|
-
debug.info = (msg) => debug(msg, debug.INFO);
|
|
30
|
-
debug.debug = (msg) => debug(msg, debug.DEBUG);
|
|
31
|
-
debug.debugMessages = () => messages;
|
|
32
|
-
module.exports = debug;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
37
|
-
var require_ansi_regex = __commonJS({
|
|
38
|
-
"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
|
|
39
|
-
"use strict";
|
|
40
|
-
module.exports = ({ onlyFirst = false } = {}) => {
|
|
41
|
-
const pattern = [
|
|
42
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
43
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
44
|
-
].join("|");
|
|
45
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
51
|
-
var require_strip_ansi = __commonJS({
|
|
52
|
-
"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
|
|
53
|
-
"use strict";
|
|
54
|
-
var ansiRegex3 = require_ansi_regex();
|
|
55
|
-
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex3(), "") : string;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
60
|
-
var require_is_fullwidth_code_point = __commonJS({
|
|
61
|
-
"../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
|
|
62
|
-
"use strict";
|
|
63
|
-
var isFullwidthCodePoint = (codePoint) => {
|
|
64
|
-
if (Number.isNaN(codePoint)) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
68
|
-
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
69
|
-
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
70
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
71
|
-
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
72
|
-
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
73
|
-
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
74
|
-
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
75
|
-
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
76
|
-
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
77
|
-
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
78
|
-
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
79
|
-
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
80
|
-
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
81
|
-
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
82
|
-
131072 <= codePoint && codePoint <= 262141)) {
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
return false;
|
|
86
|
-
};
|
|
87
|
-
module.exports = isFullwidthCodePoint;
|
|
88
|
-
module.exports.default = isFullwidthCodePoint;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
93
|
-
var require_emoji_regex = __commonJS({
|
|
94
|
-
"../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
|
|
95
|
-
"use strict";
|
|
96
|
-
module.exports = function() {
|
|
97
|
-
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;
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
103
|
-
var require_string_width = __commonJS({
|
|
104
|
-
"../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
|
|
105
|
-
"use strict";
|
|
106
|
-
var stripAnsi3 = require_strip_ansi();
|
|
107
|
-
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
108
|
-
var emojiRegex2 = require_emoji_regex();
|
|
109
|
-
var stringWidth2 = (string) => {
|
|
110
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
111
|
-
return 0;
|
|
112
|
-
}
|
|
113
|
-
string = stripAnsi3(string);
|
|
114
|
-
if (string.length === 0) {
|
|
115
|
-
return 0;
|
|
116
|
-
}
|
|
117
|
-
string = string.replace(emojiRegex2(), " ");
|
|
118
|
-
let width = 0;
|
|
119
|
-
for (let i2 = 0; i2 < string.length; i2++) {
|
|
120
|
-
const code = string.codePointAt(i2);
|
|
121
|
-
if (code <= 31 || code >= 127 && code <= 159) {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (code >= 768 && code <= 879) {
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
if (code > 65535) {
|
|
128
|
-
i2++;
|
|
129
|
-
}
|
|
130
|
-
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
131
|
-
}
|
|
132
|
-
return width;
|
|
133
|
-
};
|
|
134
|
-
module.exports = stringWidth2;
|
|
135
|
-
module.exports.default = stringWidth2;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js
|
|
140
|
-
var require_utils = __commonJS({
|
|
141
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js"(exports, module) {
|
|
142
|
-
"use strict";
|
|
143
|
-
var stringWidth2 = require_string_width();
|
|
144
|
-
function codeRegex(capture) {
|
|
145
|
-
return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
|
|
146
|
-
}
|
|
147
|
-
function strlen(str) {
|
|
148
|
-
let code = codeRegex();
|
|
149
|
-
let stripped = ("" + str).replace(code, "");
|
|
150
|
-
let split = stripped.split("\n");
|
|
151
|
-
return split.reduce(function(memo, s2) {
|
|
152
|
-
return stringWidth2(s2) > memo ? stringWidth2(s2) : memo;
|
|
153
|
-
}, 0);
|
|
154
|
-
}
|
|
155
|
-
function repeat(str, times) {
|
|
156
|
-
return Array(times + 1).join(str);
|
|
157
|
-
}
|
|
158
|
-
function pad(str, len, pad2, dir) {
|
|
159
|
-
let length = strlen(str);
|
|
160
|
-
if (len + 1 >= length) {
|
|
161
|
-
let padlen = len - length;
|
|
162
|
-
switch (dir) {
|
|
163
|
-
case "right": {
|
|
164
|
-
str = repeat(pad2, padlen) + str;
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
case "center": {
|
|
168
|
-
let right = Math.ceil(padlen / 2);
|
|
169
|
-
let left = padlen - right;
|
|
170
|
-
str = repeat(pad2, left) + str + repeat(pad2, right);
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
default: {
|
|
174
|
-
str = str + repeat(pad2, padlen);
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return str;
|
|
180
|
-
}
|
|
181
|
-
var codeCache = {};
|
|
182
|
-
function addToCodeCache(name, on, off) {
|
|
183
|
-
on = "\x1B[" + on + "m";
|
|
184
|
-
off = "\x1B[" + off + "m";
|
|
185
|
-
codeCache[on] = { set: name, to: true };
|
|
186
|
-
codeCache[off] = { set: name, to: false };
|
|
187
|
-
codeCache[name] = { on, off };
|
|
188
|
-
}
|
|
189
|
-
addToCodeCache("bold", 1, 22);
|
|
190
|
-
addToCodeCache("italics", 3, 23);
|
|
191
|
-
addToCodeCache("underline", 4, 24);
|
|
192
|
-
addToCodeCache("inverse", 7, 27);
|
|
193
|
-
addToCodeCache("strikethrough", 9, 29);
|
|
194
|
-
function updateState(state, controlChars) {
|
|
195
|
-
let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
|
|
196
|
-
if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
|
|
197
|
-
state.lastForegroundAdded = controlChars[0];
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
|
|
201
|
-
state.lastBackgroundAdded = controlChars[0];
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
if (controlCode === 0) {
|
|
205
|
-
for (let i2 in state) {
|
|
206
|
-
if (Object.prototype.hasOwnProperty.call(state, i2)) {
|
|
207
|
-
delete state[i2];
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
let info = codeCache[controlChars[0]];
|
|
213
|
-
if (info) {
|
|
214
|
-
state[info.set] = info.to;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
function readState(line) {
|
|
218
|
-
let code = codeRegex(true);
|
|
219
|
-
let controlChars = code.exec(line);
|
|
220
|
-
let state = {};
|
|
221
|
-
while (controlChars !== null) {
|
|
222
|
-
updateState(state, controlChars);
|
|
223
|
-
controlChars = code.exec(line);
|
|
224
|
-
}
|
|
225
|
-
return state;
|
|
226
|
-
}
|
|
227
|
-
function unwindState(state, ret) {
|
|
228
|
-
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
229
|
-
let lastForegroundAdded = state.lastForegroundAdded;
|
|
230
|
-
delete state.lastBackgroundAdded;
|
|
231
|
-
delete state.lastForegroundAdded;
|
|
232
|
-
Object.keys(state).forEach(function(key) {
|
|
233
|
-
if (state[key]) {
|
|
234
|
-
ret += codeCache[key].off;
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
238
|
-
ret += "\x1B[49m";
|
|
239
|
-
}
|
|
240
|
-
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
241
|
-
ret += "\x1B[39m";
|
|
242
|
-
}
|
|
243
|
-
return ret;
|
|
244
|
-
}
|
|
245
|
-
function rewindState(state, ret) {
|
|
246
|
-
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
247
|
-
let lastForegroundAdded = state.lastForegroundAdded;
|
|
248
|
-
delete state.lastBackgroundAdded;
|
|
249
|
-
delete state.lastForegroundAdded;
|
|
250
|
-
Object.keys(state).forEach(function(key) {
|
|
251
|
-
if (state[key]) {
|
|
252
|
-
ret = codeCache[key].on + ret;
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
256
|
-
ret = lastBackgroundAdded + ret;
|
|
257
|
-
}
|
|
258
|
-
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
259
|
-
ret = lastForegroundAdded + ret;
|
|
260
|
-
}
|
|
261
|
-
return ret;
|
|
262
|
-
}
|
|
263
|
-
function truncateWidth(str, desiredLength) {
|
|
264
|
-
if (str.length === strlen(str)) {
|
|
265
|
-
return str.substr(0, desiredLength);
|
|
266
|
-
}
|
|
267
|
-
while (strlen(str) > desiredLength) {
|
|
268
|
-
str = str.slice(0, -1);
|
|
269
|
-
}
|
|
270
|
-
return str;
|
|
271
|
-
}
|
|
272
|
-
function truncateWidthWithAnsi(str, desiredLength) {
|
|
273
|
-
let code = codeRegex(true);
|
|
274
|
-
let split = str.split(codeRegex());
|
|
275
|
-
let splitIndex = 0;
|
|
276
|
-
let retLen = 0;
|
|
277
|
-
let ret = "";
|
|
278
|
-
let myArray;
|
|
279
|
-
let state = {};
|
|
280
|
-
while (retLen < desiredLength) {
|
|
281
|
-
myArray = code.exec(str);
|
|
282
|
-
let toAdd = split[splitIndex];
|
|
283
|
-
splitIndex++;
|
|
284
|
-
if (retLen + strlen(toAdd) > desiredLength) {
|
|
285
|
-
toAdd = truncateWidth(toAdd, desiredLength - retLen);
|
|
286
|
-
}
|
|
287
|
-
ret += toAdd;
|
|
288
|
-
retLen += strlen(toAdd);
|
|
289
|
-
if (retLen < desiredLength) {
|
|
290
|
-
if (!myArray) {
|
|
291
|
-
break;
|
|
292
|
-
}
|
|
293
|
-
ret += myArray[0];
|
|
294
|
-
updateState(state, myArray);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return unwindState(state, ret);
|
|
298
|
-
}
|
|
299
|
-
function truncate(str, desiredLength, truncateChar) {
|
|
300
|
-
truncateChar = truncateChar || "\u2026";
|
|
301
|
-
let lengthOfStr = strlen(str);
|
|
302
|
-
if (lengthOfStr <= desiredLength) {
|
|
303
|
-
return str;
|
|
304
|
-
}
|
|
305
|
-
desiredLength -= strlen(truncateChar);
|
|
306
|
-
let ret = truncateWidthWithAnsi(str, desiredLength);
|
|
307
|
-
ret += truncateChar;
|
|
308
|
-
const hrefTag = "\x1B]8;;\x07";
|
|
309
|
-
if (str.includes(hrefTag) && !ret.includes(hrefTag)) {
|
|
310
|
-
ret += hrefTag;
|
|
311
|
-
}
|
|
312
|
-
return ret;
|
|
313
|
-
}
|
|
314
|
-
function defaultOptions() {
|
|
315
|
-
return {
|
|
316
|
-
chars: {
|
|
317
|
-
top: "\u2500",
|
|
318
|
-
"top-mid": "\u252C",
|
|
319
|
-
"top-left": "\u250C",
|
|
320
|
-
"top-right": "\u2510",
|
|
321
|
-
bottom: "\u2500",
|
|
322
|
-
"bottom-mid": "\u2534",
|
|
323
|
-
"bottom-left": "\u2514",
|
|
324
|
-
"bottom-right": "\u2518",
|
|
325
|
-
left: "\u2502",
|
|
326
|
-
"left-mid": "\u251C",
|
|
327
|
-
mid: "\u2500",
|
|
328
|
-
"mid-mid": "\u253C",
|
|
329
|
-
right: "\u2502",
|
|
330
|
-
"right-mid": "\u2524",
|
|
331
|
-
middle: "\u2502"
|
|
332
|
-
},
|
|
333
|
-
truncate: "\u2026",
|
|
334
|
-
colWidths: [],
|
|
335
|
-
rowHeights: [],
|
|
336
|
-
colAligns: [],
|
|
337
|
-
rowAligns: [],
|
|
338
|
-
style: {
|
|
339
|
-
"padding-left": 1,
|
|
340
|
-
"padding-right": 1,
|
|
341
|
-
head: ["red"],
|
|
342
|
-
border: ["grey"],
|
|
343
|
-
compact: false
|
|
344
|
-
},
|
|
345
|
-
head: []
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
function mergeOptions(options, defaults) {
|
|
349
|
-
options = options || {};
|
|
350
|
-
defaults = defaults || defaultOptions();
|
|
351
|
-
let ret = Object.assign({}, defaults, options);
|
|
352
|
-
ret.chars = Object.assign({}, defaults.chars, options.chars);
|
|
353
|
-
ret.style = Object.assign({}, defaults.style, options.style);
|
|
354
|
-
return ret;
|
|
355
|
-
}
|
|
356
|
-
function wordWrap(maxLength, input) {
|
|
357
|
-
let lines = [];
|
|
358
|
-
let split = input.split(/(\s+)/g);
|
|
359
|
-
let line = [];
|
|
360
|
-
let lineLength = 0;
|
|
361
|
-
let whitespace;
|
|
362
|
-
for (let i2 = 0; i2 < split.length; i2 += 2) {
|
|
363
|
-
let word = split[i2];
|
|
364
|
-
let newLength = lineLength + strlen(word);
|
|
365
|
-
if (lineLength > 0 && whitespace) {
|
|
366
|
-
newLength += whitespace.length;
|
|
367
|
-
}
|
|
368
|
-
if (newLength > maxLength) {
|
|
369
|
-
if (lineLength !== 0) {
|
|
370
|
-
lines.push(line.join(""));
|
|
371
|
-
}
|
|
372
|
-
line = [word];
|
|
373
|
-
lineLength = strlen(word);
|
|
374
|
-
} else {
|
|
375
|
-
line.push(whitespace || "", word);
|
|
376
|
-
lineLength = newLength;
|
|
377
|
-
}
|
|
378
|
-
whitespace = split[i2 + 1];
|
|
379
|
-
}
|
|
380
|
-
if (lineLength) {
|
|
381
|
-
lines.push(line.join(""));
|
|
382
|
-
}
|
|
383
|
-
return lines;
|
|
384
|
-
}
|
|
385
|
-
function textWrap(maxLength, input) {
|
|
386
|
-
let lines = [];
|
|
387
|
-
let line = "";
|
|
388
|
-
function pushLine(str, ws) {
|
|
389
|
-
if (line.length && ws) line += ws;
|
|
390
|
-
line += str;
|
|
391
|
-
while (line.length > maxLength) {
|
|
392
|
-
lines.push(line.slice(0, maxLength));
|
|
393
|
-
line = line.slice(maxLength);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
let split = input.split(/(\s+)/g);
|
|
397
|
-
for (let i2 = 0; i2 < split.length; i2 += 2) {
|
|
398
|
-
pushLine(split[i2], i2 && split[i2 - 1]);
|
|
399
|
-
}
|
|
400
|
-
if (line.length) lines.push(line);
|
|
401
|
-
return lines;
|
|
402
|
-
}
|
|
403
|
-
function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
|
|
404
|
-
let output = [];
|
|
405
|
-
input = input.split("\n");
|
|
406
|
-
const handler = wrapOnWordBoundary ? wordWrap : textWrap;
|
|
407
|
-
for (let i2 = 0; i2 < input.length; i2++) {
|
|
408
|
-
output.push.apply(output, handler(maxLength, input[i2]));
|
|
409
|
-
}
|
|
410
|
-
return output;
|
|
411
|
-
}
|
|
412
|
-
function colorizeLines(input) {
|
|
413
|
-
let state = {};
|
|
414
|
-
let output = [];
|
|
415
|
-
for (let i2 = 0; i2 < input.length; i2++) {
|
|
416
|
-
let line = rewindState(state, input[i2]);
|
|
417
|
-
state = readState(line);
|
|
418
|
-
let temp = Object.assign({}, state);
|
|
419
|
-
output.push(unwindState(temp, line));
|
|
420
|
-
}
|
|
421
|
-
return output;
|
|
422
|
-
}
|
|
423
|
-
function hyperlink(url, text) {
|
|
424
|
-
const OSC = "\x1B]";
|
|
425
|
-
const BEL = "\x07";
|
|
426
|
-
const SEP = ";";
|
|
427
|
-
return [OSC, "8", SEP, SEP, url || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
|
|
428
|
-
}
|
|
429
|
-
module.exports = {
|
|
430
|
-
strlen,
|
|
431
|
-
repeat,
|
|
432
|
-
pad,
|
|
433
|
-
truncate,
|
|
434
|
-
mergeOptions,
|
|
435
|
-
wordWrap: multiLineWordWrap,
|
|
436
|
-
colorizeLines,
|
|
437
|
-
hyperlink
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js
|
|
443
|
-
var require_styles = __commonJS({
|
|
444
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
|
|
445
|
-
"use strict";
|
|
446
|
-
var styles = {};
|
|
447
|
-
module["exports"] = styles;
|
|
448
|
-
var codes = {
|
|
449
|
-
reset: [0, 0],
|
|
450
|
-
bold: [1, 22],
|
|
451
|
-
dim: [2, 22],
|
|
452
|
-
italic: [3, 23],
|
|
453
|
-
underline: [4, 24],
|
|
454
|
-
inverse: [7, 27],
|
|
455
|
-
hidden: [8, 28],
|
|
456
|
-
strikethrough: [9, 29],
|
|
457
|
-
black: [30, 39],
|
|
458
|
-
red: [31, 39],
|
|
459
|
-
green: [32, 39],
|
|
460
|
-
yellow: [33, 39],
|
|
461
|
-
blue: [34, 39],
|
|
462
|
-
magenta: [35, 39],
|
|
463
|
-
cyan: [36, 39],
|
|
464
|
-
white: [37, 39],
|
|
465
|
-
gray: [90, 39],
|
|
466
|
-
grey: [90, 39],
|
|
467
|
-
brightRed: [91, 39],
|
|
468
|
-
brightGreen: [92, 39],
|
|
469
|
-
brightYellow: [93, 39],
|
|
470
|
-
brightBlue: [94, 39],
|
|
471
|
-
brightMagenta: [95, 39],
|
|
472
|
-
brightCyan: [96, 39],
|
|
473
|
-
brightWhite: [97, 39],
|
|
474
|
-
bgBlack: [40, 49],
|
|
475
|
-
bgRed: [41, 49],
|
|
476
|
-
bgGreen: [42, 49],
|
|
477
|
-
bgYellow: [43, 49],
|
|
478
|
-
bgBlue: [44, 49],
|
|
479
|
-
bgMagenta: [45, 49],
|
|
480
|
-
bgCyan: [46, 49],
|
|
481
|
-
bgWhite: [47, 49],
|
|
482
|
-
bgGray: [100, 49],
|
|
483
|
-
bgGrey: [100, 49],
|
|
484
|
-
bgBrightRed: [101, 49],
|
|
485
|
-
bgBrightGreen: [102, 49],
|
|
486
|
-
bgBrightYellow: [103, 49],
|
|
487
|
-
bgBrightBlue: [104, 49],
|
|
488
|
-
bgBrightMagenta: [105, 49],
|
|
489
|
-
bgBrightCyan: [106, 49],
|
|
490
|
-
bgBrightWhite: [107, 49],
|
|
491
|
-
// legacy styles for colors pre v1.0.0
|
|
492
|
-
blackBG: [40, 49],
|
|
493
|
-
redBG: [41, 49],
|
|
494
|
-
greenBG: [42, 49],
|
|
495
|
-
yellowBG: [43, 49],
|
|
496
|
-
blueBG: [44, 49],
|
|
497
|
-
magentaBG: [45, 49],
|
|
498
|
-
cyanBG: [46, 49],
|
|
499
|
-
whiteBG: [47, 49]
|
|
500
|
-
};
|
|
501
|
-
Object.keys(codes).forEach(function(key) {
|
|
502
|
-
var val = codes[key];
|
|
503
|
-
var style = styles[key] = [];
|
|
504
|
-
style.open = "\x1B[" + val[0] + "m";
|
|
505
|
-
style.close = "\x1B[" + val[1] + "m";
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
|
|
510
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js
|
|
511
|
-
var require_has_flag = __commonJS({
|
|
512
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
|
|
513
|
-
"use strict";
|
|
514
|
-
module.exports = function(flag, argv2) {
|
|
515
|
-
argv2 = argv2 || process.argv;
|
|
516
|
-
var terminatorPos = argv2.indexOf("--");
|
|
517
|
-
var prefix = /^-{1,2}/.test(flag) ? "" : "--";
|
|
518
|
-
var pos = argv2.indexOf(prefix + flag);
|
|
519
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
|
|
524
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js
|
|
525
|
-
var require_supports_colors = __commonJS({
|
|
526
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
527
|
-
"use strict";
|
|
528
|
-
var os = __require("os");
|
|
529
|
-
var hasFlag = require_has_flag();
|
|
530
|
-
var env2 = process.env;
|
|
531
|
-
var forceColor = void 0;
|
|
532
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
533
|
-
forceColor = false;
|
|
534
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
535
|
-
forceColor = true;
|
|
536
|
-
}
|
|
537
|
-
if ("FORCE_COLOR" in env2) {
|
|
538
|
-
forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
|
|
539
|
-
}
|
|
540
|
-
function translateLevel(level) {
|
|
541
|
-
if (level === 0) {
|
|
542
|
-
return false;
|
|
543
|
-
}
|
|
544
|
-
return {
|
|
545
|
-
level,
|
|
546
|
-
hasBasic: true,
|
|
547
|
-
has256: level >= 2,
|
|
548
|
-
has16m: level >= 3
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
function supportsColor(stream) {
|
|
552
|
-
if (forceColor === false) {
|
|
553
|
-
return 0;
|
|
554
|
-
}
|
|
555
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
556
|
-
return 3;
|
|
557
|
-
}
|
|
558
|
-
if (hasFlag("color=256")) {
|
|
559
|
-
return 2;
|
|
560
|
-
}
|
|
561
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
562
|
-
return 0;
|
|
563
|
-
}
|
|
564
|
-
var min = forceColor ? 1 : 0;
|
|
565
|
-
if (process.platform === "win32") {
|
|
566
|
-
var osRelease = os.release().split(".");
|
|
567
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
568
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
569
|
-
}
|
|
570
|
-
return 1;
|
|
571
|
-
}
|
|
572
|
-
if ("CI" in env2) {
|
|
573
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
|
|
574
|
-
return sign in env2;
|
|
575
|
-
}) || env2.CI_NAME === "codeship") {
|
|
576
|
-
return 1;
|
|
577
|
-
}
|
|
578
|
-
return min;
|
|
579
|
-
}
|
|
580
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
581
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
582
|
-
}
|
|
583
|
-
if ("TERM_PROGRAM" in env2) {
|
|
584
|
-
var version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
585
|
-
switch (env2.TERM_PROGRAM) {
|
|
586
|
-
case "iTerm.app":
|
|
587
|
-
return version >= 3 ? 3 : 2;
|
|
588
|
-
case "Hyper":
|
|
589
|
-
return 3;
|
|
590
|
-
case "Apple_Terminal":
|
|
591
|
-
return 2;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
595
|
-
return 2;
|
|
596
|
-
}
|
|
597
|
-
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
598
|
-
return 1;
|
|
599
|
-
}
|
|
600
|
-
if ("COLORTERM" in env2) {
|
|
601
|
-
return 1;
|
|
602
|
-
}
|
|
603
|
-
if (env2.TERM === "dumb") {
|
|
604
|
-
return min;
|
|
605
|
-
}
|
|
606
|
-
return min;
|
|
607
|
-
}
|
|
608
|
-
function getSupportLevel(stream) {
|
|
609
|
-
var level = supportsColor(stream);
|
|
610
|
-
return translateLevel(level);
|
|
611
|
-
}
|
|
612
|
-
module.exports = {
|
|
613
|
-
supportsColor: getSupportLevel,
|
|
614
|
-
stdout: getSupportLevel(process.stdout),
|
|
615
|
-
stderr: getSupportLevel(process.stderr)
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
|
|
620
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
|
|
621
|
-
var require_trap = __commonJS({
|
|
622
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
|
|
623
|
-
"use strict";
|
|
624
|
-
module["exports"] = function runTheTrap(text, options) {
|
|
625
|
-
var result = "";
|
|
626
|
-
text = text || "Run the trap, drop the bass";
|
|
627
|
-
text = text.split("");
|
|
628
|
-
var trap = {
|
|
629
|
-
a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
|
|
630
|
-
b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
|
|
631
|
-
c: ["\xA9", "\u023B", "\u03FE"],
|
|
632
|
-
d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
|
|
633
|
-
e: [
|
|
634
|
-
"\xCB",
|
|
635
|
-
"\u0115",
|
|
636
|
-
"\u018E",
|
|
637
|
-
"\u0258",
|
|
638
|
-
"\u03A3",
|
|
639
|
-
"\u03BE",
|
|
640
|
-
"\u04BC",
|
|
641
|
-
"\u0A6C"
|
|
642
|
-
],
|
|
643
|
-
f: ["\u04FA"],
|
|
644
|
-
g: ["\u0262"],
|
|
645
|
-
h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
|
|
646
|
-
i: ["\u0F0F"],
|
|
647
|
-
j: ["\u0134"],
|
|
648
|
-
k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
|
|
649
|
-
l: ["\u0139"],
|
|
650
|
-
m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
|
|
651
|
-
n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
|
|
652
|
-
o: [
|
|
653
|
-
"\xD8",
|
|
654
|
-
"\xF5",
|
|
655
|
-
"\xF8",
|
|
656
|
-
"\u01FE",
|
|
657
|
-
"\u0298",
|
|
658
|
-
"\u047A",
|
|
659
|
-
"\u05DD",
|
|
660
|
-
"\u06DD",
|
|
661
|
-
"\u0E4F"
|
|
662
|
-
],
|
|
663
|
-
p: ["\u01F7", "\u048E"],
|
|
664
|
-
q: ["\u09CD"],
|
|
665
|
-
r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
|
|
666
|
-
s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
|
|
667
|
-
t: ["\u0141", "\u0166", "\u0373"],
|
|
668
|
-
u: ["\u01B1", "\u054D"],
|
|
669
|
-
v: ["\u05D8"],
|
|
670
|
-
w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
|
|
671
|
-
x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
|
|
672
|
-
y: ["\xA5", "\u04B0", "\u04CB"],
|
|
673
|
-
z: ["\u01B5", "\u0240"]
|
|
674
|
-
};
|
|
675
|
-
text.forEach(function(c3) {
|
|
676
|
-
c3 = c3.toLowerCase();
|
|
677
|
-
var chars = trap[c3] || [" "];
|
|
678
|
-
var rand = Math.floor(Math.random() * chars.length);
|
|
679
|
-
if (typeof trap[c3] !== "undefined") {
|
|
680
|
-
result += trap[c3][rand];
|
|
681
|
-
} else {
|
|
682
|
-
result += c3;
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
return result;
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
|
|
690
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
|
|
691
|
-
var require_zalgo = __commonJS({
|
|
692
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
|
|
693
|
-
"use strict";
|
|
694
|
-
module["exports"] = function zalgo(text, options) {
|
|
695
|
-
text = text || " he is here ";
|
|
696
|
-
var soul = {
|
|
697
|
-
"up": [
|
|
698
|
-
"\u030D",
|
|
699
|
-
"\u030E",
|
|
700
|
-
"\u0304",
|
|
701
|
-
"\u0305",
|
|
702
|
-
"\u033F",
|
|
703
|
-
"\u0311",
|
|
704
|
-
"\u0306",
|
|
705
|
-
"\u0310",
|
|
706
|
-
"\u0352",
|
|
707
|
-
"\u0357",
|
|
708
|
-
"\u0351",
|
|
709
|
-
"\u0307",
|
|
710
|
-
"\u0308",
|
|
711
|
-
"\u030A",
|
|
712
|
-
"\u0342",
|
|
713
|
-
"\u0313",
|
|
714
|
-
"\u0308",
|
|
715
|
-
"\u034A",
|
|
716
|
-
"\u034B",
|
|
717
|
-
"\u034C",
|
|
718
|
-
"\u0303",
|
|
719
|
-
"\u0302",
|
|
720
|
-
"\u030C",
|
|
721
|
-
"\u0350",
|
|
722
|
-
"\u0300",
|
|
723
|
-
"\u0301",
|
|
724
|
-
"\u030B",
|
|
725
|
-
"\u030F",
|
|
726
|
-
"\u0312",
|
|
727
|
-
"\u0313",
|
|
728
|
-
"\u0314",
|
|
729
|
-
"\u033D",
|
|
730
|
-
"\u0309",
|
|
731
|
-
"\u0363",
|
|
732
|
-
"\u0364",
|
|
733
|
-
"\u0365",
|
|
734
|
-
"\u0366",
|
|
735
|
-
"\u0367",
|
|
736
|
-
"\u0368",
|
|
737
|
-
"\u0369",
|
|
738
|
-
"\u036A",
|
|
739
|
-
"\u036B",
|
|
740
|
-
"\u036C",
|
|
741
|
-
"\u036D",
|
|
742
|
-
"\u036E",
|
|
743
|
-
"\u036F",
|
|
744
|
-
"\u033E",
|
|
745
|
-
"\u035B",
|
|
746
|
-
"\u0346",
|
|
747
|
-
"\u031A"
|
|
748
|
-
],
|
|
749
|
-
"down": [
|
|
750
|
-
"\u0316",
|
|
751
|
-
"\u0317",
|
|
752
|
-
"\u0318",
|
|
753
|
-
"\u0319",
|
|
754
|
-
"\u031C",
|
|
755
|
-
"\u031D",
|
|
756
|
-
"\u031E",
|
|
757
|
-
"\u031F",
|
|
758
|
-
"\u0320",
|
|
759
|
-
"\u0324",
|
|
760
|
-
"\u0325",
|
|
761
|
-
"\u0326",
|
|
762
|
-
"\u0329",
|
|
763
|
-
"\u032A",
|
|
764
|
-
"\u032B",
|
|
765
|
-
"\u032C",
|
|
766
|
-
"\u032D",
|
|
767
|
-
"\u032E",
|
|
768
|
-
"\u032F",
|
|
769
|
-
"\u0330",
|
|
770
|
-
"\u0331",
|
|
771
|
-
"\u0332",
|
|
772
|
-
"\u0333",
|
|
773
|
-
"\u0339",
|
|
774
|
-
"\u033A",
|
|
775
|
-
"\u033B",
|
|
776
|
-
"\u033C",
|
|
777
|
-
"\u0345",
|
|
778
|
-
"\u0347",
|
|
779
|
-
"\u0348",
|
|
780
|
-
"\u0349",
|
|
781
|
-
"\u034D",
|
|
782
|
-
"\u034E",
|
|
783
|
-
"\u0353",
|
|
784
|
-
"\u0354",
|
|
785
|
-
"\u0355",
|
|
786
|
-
"\u0356",
|
|
787
|
-
"\u0359",
|
|
788
|
-
"\u035A",
|
|
789
|
-
"\u0323"
|
|
790
|
-
],
|
|
791
|
-
"mid": [
|
|
792
|
-
"\u0315",
|
|
793
|
-
"\u031B",
|
|
794
|
-
"\u0300",
|
|
795
|
-
"\u0301",
|
|
796
|
-
"\u0358",
|
|
797
|
-
"\u0321",
|
|
798
|
-
"\u0322",
|
|
799
|
-
"\u0327",
|
|
800
|
-
"\u0328",
|
|
801
|
-
"\u0334",
|
|
802
|
-
"\u0335",
|
|
803
|
-
"\u0336",
|
|
804
|
-
"\u035C",
|
|
805
|
-
"\u035D",
|
|
806
|
-
"\u035E",
|
|
807
|
-
"\u035F",
|
|
808
|
-
"\u0360",
|
|
809
|
-
"\u0362",
|
|
810
|
-
"\u0338",
|
|
811
|
-
"\u0337",
|
|
812
|
-
"\u0361",
|
|
813
|
-
" \u0489"
|
|
814
|
-
]
|
|
815
|
-
};
|
|
816
|
-
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
817
|
-
function randomNumber(range) {
|
|
818
|
-
var r4 = Math.floor(Math.random() * range);
|
|
819
|
-
return r4;
|
|
820
|
-
}
|
|
821
|
-
function isChar(character) {
|
|
822
|
-
var bool = false;
|
|
823
|
-
all.filter(function(i2) {
|
|
824
|
-
bool = i2 === character;
|
|
825
|
-
});
|
|
826
|
-
return bool;
|
|
827
|
-
}
|
|
828
|
-
function heComes(text2, options2) {
|
|
829
|
-
var result = "";
|
|
830
|
-
var counts;
|
|
831
|
-
var l3;
|
|
832
|
-
options2 = options2 || {};
|
|
833
|
-
options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
|
|
834
|
-
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
|
835
|
-
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
|
836
|
-
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
|
837
|
-
text2 = text2.split("");
|
|
838
|
-
for (l3 in text2) {
|
|
839
|
-
if (isChar(l3)) {
|
|
840
|
-
continue;
|
|
841
|
-
}
|
|
842
|
-
result = result + text2[l3];
|
|
843
|
-
counts = { "up": 0, "down": 0, "mid": 0 };
|
|
844
|
-
switch (options2.size) {
|
|
845
|
-
case "mini":
|
|
846
|
-
counts.up = randomNumber(8);
|
|
847
|
-
counts.mid = randomNumber(2);
|
|
848
|
-
counts.down = randomNumber(8);
|
|
849
|
-
break;
|
|
850
|
-
case "maxi":
|
|
851
|
-
counts.up = randomNumber(16) + 3;
|
|
852
|
-
counts.mid = randomNumber(4) + 1;
|
|
853
|
-
counts.down = randomNumber(64) + 3;
|
|
854
|
-
break;
|
|
855
|
-
default:
|
|
856
|
-
counts.up = randomNumber(8) + 1;
|
|
857
|
-
counts.mid = randomNumber(6) / 2;
|
|
858
|
-
counts.down = randomNumber(8) + 1;
|
|
859
|
-
break;
|
|
860
|
-
}
|
|
861
|
-
var arr = ["up", "mid", "down"];
|
|
862
|
-
for (var d3 in arr) {
|
|
863
|
-
var index = arr[d3];
|
|
864
|
-
for (var i2 = 0; i2 <= counts[index]; i2++) {
|
|
865
|
-
if (options2[index]) {
|
|
866
|
-
result = result + soul[index][randomNumber(soul[index].length)];
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
return result;
|
|
872
|
-
}
|
|
873
|
-
return heComes(text, options);
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
|
|
878
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js
|
|
879
|
-
var require_america = __commonJS({
|
|
880
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
|
|
881
|
-
"use strict";
|
|
882
|
-
module["exports"] = function(colors2) {
|
|
883
|
-
return function(letter, i2, exploded) {
|
|
884
|
-
if (letter === " ") return letter;
|
|
885
|
-
switch (i2 % 3) {
|
|
886
|
-
case 0:
|
|
887
|
-
return colors2.red(letter);
|
|
888
|
-
case 1:
|
|
889
|
-
return colors2.white(letter);
|
|
890
|
-
case 2:
|
|
891
|
-
return colors2.blue(letter);
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
});
|
|
897
|
-
|
|
898
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js
|
|
899
|
-
var require_zebra = __commonJS({
|
|
900
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
|
|
901
|
-
"use strict";
|
|
902
|
-
module["exports"] = function(colors2) {
|
|
903
|
-
return function(letter, i2, exploded) {
|
|
904
|
-
return i2 % 2 === 0 ? letter : colors2.inverse(letter);
|
|
905
|
-
};
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
|
|
910
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js
|
|
911
|
-
var require_rainbow = __commonJS({
|
|
912
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
|
|
913
|
-
"use strict";
|
|
914
|
-
module["exports"] = function(colors2) {
|
|
915
|
-
var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
|
|
916
|
-
return function(letter, i2, exploded) {
|
|
917
|
-
if (letter === " ") {
|
|
918
|
-
return letter;
|
|
919
|
-
} else {
|
|
920
|
-
return colors2[rainbowColors[i2++ % rainbowColors.length]](letter);
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
});
|
|
926
|
-
|
|
927
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js
|
|
928
|
-
var require_random = __commonJS({
|
|
929
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
|
|
930
|
-
"use strict";
|
|
931
|
-
module["exports"] = function(colors2) {
|
|
932
|
-
var available = [
|
|
933
|
-
"underline",
|
|
934
|
-
"inverse",
|
|
935
|
-
"grey",
|
|
936
|
-
"yellow",
|
|
937
|
-
"red",
|
|
938
|
-
"green",
|
|
939
|
-
"blue",
|
|
940
|
-
"white",
|
|
941
|
-
"cyan",
|
|
942
|
-
"magenta",
|
|
943
|
-
"brightYellow",
|
|
944
|
-
"brightRed",
|
|
945
|
-
"brightGreen",
|
|
946
|
-
"brightBlue",
|
|
947
|
-
"brightWhite",
|
|
948
|
-
"brightCyan",
|
|
949
|
-
"brightMagenta"
|
|
950
|
-
];
|
|
951
|
-
return function(letter, i2, exploded) {
|
|
952
|
-
return letter === " " ? letter : colors2[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
953
|
-
};
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
});
|
|
957
|
-
|
|
958
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js
|
|
959
|
-
var require_colors = __commonJS({
|
|
960
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports, module) {
|
|
961
|
-
"use strict";
|
|
962
|
-
var colors2 = {};
|
|
963
|
-
module["exports"] = colors2;
|
|
964
|
-
colors2.themes = {};
|
|
965
|
-
var util = __require("util");
|
|
966
|
-
var ansiStyles = colors2.styles = require_styles();
|
|
967
|
-
var defineProps = Object.defineProperties;
|
|
968
|
-
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
969
|
-
colors2.supportsColor = require_supports_colors().supportsColor;
|
|
970
|
-
if (typeof colors2.enabled === "undefined") {
|
|
971
|
-
colors2.enabled = colors2.supportsColor() !== false;
|
|
972
|
-
}
|
|
973
|
-
colors2.enable = function() {
|
|
974
|
-
colors2.enabled = true;
|
|
975
|
-
};
|
|
976
|
-
colors2.disable = function() {
|
|
977
|
-
colors2.enabled = false;
|
|
978
|
-
};
|
|
979
|
-
colors2.stripColors = colors2.strip = function(str) {
|
|
980
|
-
return ("" + str).replace(/\x1B\[\d+m/g, "");
|
|
981
|
-
};
|
|
982
|
-
var stylize = colors2.stylize = function stylize2(str, style) {
|
|
983
|
-
if (!colors2.enabled) {
|
|
984
|
-
return str + "";
|
|
985
|
-
}
|
|
986
|
-
var styleMap = ansiStyles[style];
|
|
987
|
-
if (!styleMap && style in colors2) {
|
|
988
|
-
return colors2[style](str);
|
|
989
|
-
}
|
|
990
|
-
return styleMap.open + str + styleMap.close;
|
|
991
|
-
};
|
|
992
|
-
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
993
|
-
var escapeStringRegexp = function(str) {
|
|
994
|
-
if (typeof str !== "string") {
|
|
995
|
-
throw new TypeError("Expected a string");
|
|
996
|
-
}
|
|
997
|
-
return str.replace(matchOperatorsRe, "\\$&");
|
|
998
|
-
};
|
|
999
|
-
function build(_styles) {
|
|
1000
|
-
var builder = function builder2() {
|
|
1001
|
-
return applyStyle.apply(builder2, arguments);
|
|
1002
|
-
};
|
|
1003
|
-
builder._styles = _styles;
|
|
1004
|
-
builder.__proto__ = proto;
|
|
1005
|
-
return builder;
|
|
1006
|
-
}
|
|
1007
|
-
var styles = (function() {
|
|
1008
|
-
var ret = {};
|
|
1009
|
-
ansiStyles.grey = ansiStyles.gray;
|
|
1010
|
-
Object.keys(ansiStyles).forEach(function(key) {
|
|
1011
|
-
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
1012
|
-
ret[key] = {
|
|
1013
|
-
get: function() {
|
|
1014
|
-
return build(this._styles.concat(key));
|
|
1015
|
-
}
|
|
1016
|
-
};
|
|
1017
|
-
});
|
|
1018
|
-
return ret;
|
|
1019
|
-
})();
|
|
1020
|
-
var proto = defineProps(function colors3() {
|
|
1021
|
-
}, styles);
|
|
1022
|
-
function applyStyle() {
|
|
1023
|
-
var args = Array.prototype.slice.call(arguments);
|
|
1024
|
-
var str = args.map(function(arg) {
|
|
1025
|
-
if (arg != null && arg.constructor === String) {
|
|
1026
|
-
return arg;
|
|
1027
|
-
} else {
|
|
1028
|
-
return util.inspect(arg);
|
|
1029
|
-
}
|
|
1030
|
-
}).join(" ");
|
|
1031
|
-
if (!colors2.enabled || !str) {
|
|
1032
|
-
return str;
|
|
1033
|
-
}
|
|
1034
|
-
var newLinesPresent = str.indexOf("\n") != -1;
|
|
1035
|
-
var nestedStyles = this._styles;
|
|
1036
|
-
var i2 = nestedStyles.length;
|
|
1037
|
-
while (i2--) {
|
|
1038
|
-
var code = ansiStyles[nestedStyles[i2]];
|
|
1039
|
-
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
1040
|
-
if (newLinesPresent) {
|
|
1041
|
-
str = str.replace(newLineRegex, function(match) {
|
|
1042
|
-
return code.close + match + code.open;
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
return str;
|
|
1047
|
-
}
|
|
1048
|
-
colors2.setTheme = function(theme) {
|
|
1049
|
-
if (typeof theme === "string") {
|
|
1050
|
-
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'));");
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
for (var style in theme) {
|
|
1054
|
-
(function(style2) {
|
|
1055
|
-
colors2[style2] = function(str) {
|
|
1056
|
-
if (typeof theme[style2] === "object") {
|
|
1057
|
-
var out = str;
|
|
1058
|
-
for (var i2 in theme[style2]) {
|
|
1059
|
-
out = colors2[theme[style2][i2]](out);
|
|
1060
|
-
}
|
|
1061
|
-
return out;
|
|
1062
|
-
}
|
|
1063
|
-
return colors2[theme[style2]](str);
|
|
1064
|
-
};
|
|
1065
|
-
})(style);
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
function init2() {
|
|
1069
|
-
var ret = {};
|
|
1070
|
-
Object.keys(styles).forEach(function(name) {
|
|
1071
|
-
ret[name] = {
|
|
1072
|
-
get: function() {
|
|
1073
|
-
return build([name]);
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
1076
|
-
});
|
|
1077
|
-
return ret;
|
|
1078
|
-
}
|
|
1079
|
-
var sequencer = function sequencer2(map2, str) {
|
|
1080
|
-
var exploded = str.split("");
|
|
1081
|
-
exploded = exploded.map(map2);
|
|
1082
|
-
return exploded.join("");
|
|
1083
|
-
};
|
|
1084
|
-
colors2.trap = require_trap();
|
|
1085
|
-
colors2.zalgo = require_zalgo();
|
|
1086
|
-
colors2.maps = {};
|
|
1087
|
-
colors2.maps.america = require_america()(colors2);
|
|
1088
|
-
colors2.maps.zebra = require_zebra()(colors2);
|
|
1089
|
-
colors2.maps.rainbow = require_rainbow()(colors2);
|
|
1090
|
-
colors2.maps.random = require_random()(colors2);
|
|
1091
|
-
for (map in colors2.maps) {
|
|
1092
|
-
(function(map2) {
|
|
1093
|
-
colors2[map2] = function(str) {
|
|
1094
|
-
return sequencer(colors2.maps[map2], str);
|
|
1095
|
-
};
|
|
1096
|
-
})(map);
|
|
1097
|
-
}
|
|
1098
|
-
var map;
|
|
1099
|
-
defineProps(colors2, init2());
|
|
1100
|
-
}
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js
|
|
1104
|
-
var require_safe = __commonJS({
|
|
1105
|
-
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports, module) {
|
|
1106
|
-
"use strict";
|
|
1107
|
-
var colors2 = require_colors();
|
|
1108
|
-
module["exports"] = colors2;
|
|
1109
|
-
}
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
// ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js
|
|
1113
|
-
var require_cell = __commonJS({
|
|
1114
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js"(exports, module) {
|
|
1115
|
-
"use strict";
|
|
1116
|
-
var { info, debug } = require_debug();
|
|
1117
|
-
var utils = require_utils();
|
|
1118
|
-
var Cell = class _Cell {
|
|
1119
|
-
/**
|
|
1120
|
-
* A representation of a cell within the table.
|
|
1121
|
-
* Implementations must have `init` and `draw` methods,
|
|
1122
|
-
* as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
|
|
1123
|
-
* @param options
|
|
1124
|
-
* @constructor
|
|
1125
|
-
*/
|
|
1126
|
-
constructor(options) {
|
|
1127
|
-
this.setOptions(options);
|
|
1128
|
-
this.x = null;
|
|
1129
|
-
this.y = null;
|
|
1130
|
-
}
|
|
1131
|
-
setOptions(options) {
|
|
1132
|
-
if (["boolean", "number", "bigint", "string"].indexOf(typeof options) !== -1) {
|
|
1133
|
-
options = { content: "" + options };
|
|
1134
|
-
}
|
|
1135
|
-
options = options || {};
|
|
1136
|
-
this.options = options;
|
|
1137
|
-
let content = options.content;
|
|
1138
|
-
if (["boolean", "number", "bigint", "string"].indexOf(typeof content) !== -1) {
|
|
1139
|
-
this.content = String(content);
|
|
1140
|
-
} else if (!content) {
|
|
1141
|
-
this.content = this.options.href || "";
|
|
1142
|
-
} else {
|
|
1143
|
-
throw new Error("Content needs to be a primitive, got: " + typeof content);
|
|
1144
|
-
}
|
|
1145
|
-
this.colSpan = options.colSpan || 1;
|
|
1146
|
-
this.rowSpan = options.rowSpan || 1;
|
|
1147
|
-
if (this.options.href) {
|
|
1148
|
-
Object.defineProperty(this, "href", {
|
|
1149
|
-
get() {
|
|
1150
|
-
return this.options.href;
|
|
1151
|
-
}
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
mergeTableOptions(tableOptions, cells) {
|
|
1156
|
-
this.cells = cells;
|
|
1157
|
-
let optionsChars = this.options.chars || {};
|
|
1158
|
-
let tableChars = tableOptions.chars;
|
|
1159
|
-
let chars = this.chars = {};
|
|
1160
|
-
CHAR_NAMES.forEach(function(name) {
|
|
1161
|
-
setOption(optionsChars, tableChars, name, chars);
|
|
1162
|
-
});
|
|
1163
|
-
this.truncate = this.options.truncate || tableOptions.truncate;
|
|
1164
|
-
let style = this.options.style = this.options.style || {};
|
|
1165
|
-
let tableStyle = tableOptions.style;
|
|
1166
|
-
setOption(style, tableStyle, "padding-left", this);
|
|
1167
|
-
setOption(style, tableStyle, "padding-right", this);
|
|
1168
|
-
this.head = style.head || tableStyle.head;
|
|
1169
|
-
this.border = style.border || tableStyle.border;
|
|
1170
|
-
this.fixedWidth = tableOptions.colWidths[this.x];
|
|
1171
|
-
this.lines = this.computeLines(tableOptions);
|
|
1172
|
-
this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
|
|
1173
|
-
this.desiredHeight = this.lines.length;
|
|
1174
|
-
}
|
|
1175
|
-
computeLines(tableOptions) {
|
|
1176
|
-
const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
|
|
1177
|
-
const { wordWrap = tableWordWrap } = this.options;
|
|
1178
|
-
if (this.fixedWidth && wordWrap) {
|
|
1179
|
-
this.fixedWidth -= this.paddingLeft + this.paddingRight;
|
|
1180
|
-
if (this.colSpan) {
|
|
1181
|
-
let i2 = 1;
|
|
1182
|
-
while (i2 < this.colSpan) {
|
|
1183
|
-
this.fixedWidth += tableOptions.colWidths[this.x + i2];
|
|
1184
|
-
i2++;
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
|
|
1188
|
-
const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
|
|
1189
|
-
return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
|
|
1190
|
-
}
|
|
1191
|
-
return this.wrapLines(this.content.split("\n"));
|
|
1192
|
-
}
|
|
1193
|
-
wrapLines(computedLines) {
|
|
1194
|
-
const lines = utils.colorizeLines(computedLines);
|
|
1195
|
-
if (this.href) {
|
|
1196
|
-
return lines.map((line) => utils.hyperlink(this.href, line));
|
|
1197
|
-
}
|
|
1198
|
-
return lines;
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* Initializes the Cells data structure.
|
|
1202
|
-
*
|
|
1203
|
-
* @param tableOptions - A fully populated set of tableOptions.
|
|
1204
|
-
* In addition to the standard default values, tableOptions must have fully populated the
|
|
1205
|
-
* `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
|
|
1206
|
-
* of columns or rows (respectively) in this table, and each array item must be a Number.
|
|
1207
|
-
*
|
|
1208
|
-
*/
|
|
1209
|
-
init(tableOptions) {
|
|
1210
|
-
let x2 = this.x;
|
|
1211
|
-
let y5 = this.y;
|
|
1212
|
-
this.widths = tableOptions.colWidths.slice(x2, x2 + this.colSpan);
|
|
1213
|
-
this.heights = tableOptions.rowHeights.slice(y5, y5 + this.rowSpan);
|
|
1214
|
-
this.width = this.widths.reduce(sumPlusOne, -1);
|
|
1215
|
-
this.height = this.heights.reduce(sumPlusOne, -1);
|
|
1216
|
-
this.hAlign = this.options.hAlign || tableOptions.colAligns[x2];
|
|
1217
|
-
this.vAlign = this.options.vAlign || tableOptions.rowAligns[y5];
|
|
1218
|
-
this.drawRight = x2 + this.colSpan == tableOptions.colWidths.length;
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* Draws the given line of the cell.
|
|
1222
|
-
* This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
|
|
1223
|
-
* @param lineNum - can be `top`, `bottom` or a numerical line number.
|
|
1224
|
-
* @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
|
|
1225
|
-
* many rows below it's being called from. Otherwise it's undefined.
|
|
1226
|
-
* @returns {String} The representation of this line.
|
|
1227
|
-
*/
|
|
1228
|
-
draw(lineNum, spanningCell) {
|
|
1229
|
-
if (lineNum == "top") return this.drawTop(this.drawRight);
|
|
1230
|
-
if (lineNum == "bottom") return this.drawBottom(this.drawRight);
|
|
1231
|
-
let content = utils.truncate(this.content, 10, this.truncate);
|
|
1232
|
-
if (!lineNum) {
|
|
1233
|
-
info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
|
|
1234
|
-
} else {
|
|
1235
|
-
}
|
|
1236
|
-
let padLen = Math.max(this.height - this.lines.length, 0);
|
|
1237
|
-
let padTop;
|
|
1238
|
-
switch (this.vAlign) {
|
|
1239
|
-
case "center":
|
|
1240
|
-
padTop = Math.ceil(padLen / 2);
|
|
1241
|
-
break;
|
|
1242
|
-
case "bottom":
|
|
1243
|
-
padTop = padLen;
|
|
1244
|
-
break;
|
|
1245
|
-
default:
|
|
1246
|
-
padTop = 0;
|
|
1247
|
-
}
|
|
1248
|
-
if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
|
|
1249
|
-
return this.drawEmpty(this.drawRight, spanningCell);
|
|
1250
|
-
}
|
|
1251
|
-
let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
|
|
1252
|
-
return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
|
|
1253
|
-
}
|
|
1254
|
-
/**
|
|
1255
|
-
* Renders the top line of the cell.
|
|
1256
|
-
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1257
|
-
* @returns {String}
|
|
1258
|
-
*/
|
|
1259
|
-
drawTop(drawRight) {
|
|
1260
|
-
let content = [];
|
|
1261
|
-
if (this.cells) {
|
|
1262
|
-
this.widths.forEach(function(width, index) {
|
|
1263
|
-
content.push(this._topLeftChar(index));
|
|
1264
|
-
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
|
|
1265
|
-
}, this);
|
|
1266
|
-
} else {
|
|
1267
|
-
content.push(this._topLeftChar(0));
|
|
1268
|
-
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
|
|
1269
|
-
}
|
|
1270
|
-
if (drawRight) {
|
|
1271
|
-
content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
|
|
1272
|
-
}
|
|
1273
|
-
return this.wrapWithStyleColors("border", content.join(""));
|
|
1274
|
-
}
|
|
1275
|
-
_topLeftChar(offset) {
|
|
1276
|
-
let x2 = this.x + offset;
|
|
1277
|
-
let leftChar;
|
|
1278
|
-
if (this.y == 0) {
|
|
1279
|
-
leftChar = x2 == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
|
|
1280
|
-
} else {
|
|
1281
|
-
if (x2 == 0) {
|
|
1282
|
-
leftChar = "leftMid";
|
|
1283
|
-
} else {
|
|
1284
|
-
leftChar = offset == 0 ? "midMid" : "bottomMid";
|
|
1285
|
-
if (this.cells) {
|
|
1286
|
-
let spanAbove = this.cells[this.y - 1][x2] instanceof _Cell.ColSpanCell;
|
|
1287
|
-
if (spanAbove) {
|
|
1288
|
-
leftChar = offset == 0 ? "topMid" : "mid";
|
|
1289
|
-
}
|
|
1290
|
-
if (offset == 0) {
|
|
1291
|
-
let i2 = 1;
|
|
1292
|
-
while (this.cells[this.y][x2 - i2] instanceof _Cell.ColSpanCell) {
|
|
1293
|
-
i2++;
|
|
1294
|
-
}
|
|
1295
|
-
if (this.cells[this.y][x2 - i2] instanceof _Cell.RowSpanCell) {
|
|
1296
|
-
leftChar = "leftMid";
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
return this.chars[leftChar];
|
|
1303
|
-
}
|
|
1304
|
-
wrapWithStyleColors(styleProperty, content) {
|
|
1305
|
-
if (this[styleProperty] && this[styleProperty].length) {
|
|
1306
|
-
try {
|
|
1307
|
-
let colors2 = require_safe();
|
|
1308
|
-
for (let i2 = this[styleProperty].length - 1; i2 >= 0; i2--) {
|
|
1309
|
-
colors2 = colors2[this[styleProperty][i2]];
|
|
1310
|
-
}
|
|
1311
|
-
return colors2(content);
|
|
1312
|
-
} catch (e2) {
|
|
1313
|
-
return content;
|
|
1314
|
-
}
|
|
1315
|
-
} else {
|
|
1316
|
-
return content;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
/**
|
|
1320
|
-
* Renders a line of text.
|
|
1321
|
-
* @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
|
|
1322
|
-
* There may be top-padding above the first line of text.
|
|
1323
|
-
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1324
|
-
* @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
|
|
1325
|
-
* if the text fits. This is used when the cell is vertically truncated. If `false` the text should
|
|
1326
|
-
* only include the truncation symbol if the text will not fit horizontally within the cell width.
|
|
1327
|
-
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1328
|
-
* @returns {String}
|
|
1329
|
-
*/
|
|
1330
|
-
drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
|
|
1331
|
-
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1332
|
-
if (this.x && spanningCell && this.cells) {
|
|
1333
|
-
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1334
|
-
while (cellLeft instanceof ColSpanCell) {
|
|
1335
|
-
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1336
|
-
}
|
|
1337
|
-
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1338
|
-
left = this.chars["rightMid"];
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
let leftPadding = utils.repeat(" ", this.paddingLeft);
|
|
1342
|
-
let right = drawRight ? this.chars["right"] : "";
|
|
1343
|
-
let rightPadding = utils.repeat(" ", this.paddingRight);
|
|
1344
|
-
let line = this.lines[lineNum];
|
|
1345
|
-
let len = this.width - (this.paddingLeft + this.paddingRight);
|
|
1346
|
-
if (forceTruncationSymbol) line += this.truncate || "\u2026";
|
|
1347
|
-
let content = utils.truncate(line, len, this.truncate);
|
|
1348
|
-
content = utils.pad(content, len, " ", this.hAlign);
|
|
1349
|
-
content = leftPadding + content + rightPadding;
|
|
1350
|
-
return this.stylizeLine(left, content, right);
|
|
1351
|
-
}
|
|
1352
|
-
stylizeLine(left, content, right) {
|
|
1353
|
-
left = this.wrapWithStyleColors("border", left);
|
|
1354
|
-
right = this.wrapWithStyleColors("border", right);
|
|
1355
|
-
if (this.y === 0) {
|
|
1356
|
-
content = this.wrapWithStyleColors("head", content);
|
|
1357
|
-
}
|
|
1358
|
-
return left + content + right;
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Renders the bottom line of the cell.
|
|
1362
|
-
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1363
|
-
* @returns {String}
|
|
1364
|
-
*/
|
|
1365
|
-
drawBottom(drawRight) {
|
|
1366
|
-
let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
|
|
1367
|
-
let content = utils.repeat(this.chars.bottom, this.width);
|
|
1368
|
-
let right = drawRight ? this.chars["bottomRight"] : "";
|
|
1369
|
-
return this.wrapWithStyleColors("border", left + content + right);
|
|
1370
|
-
}
|
|
1371
|
-
/**
|
|
1372
|
-
* Renders a blank line of text within the cell. Used for top and/or bottom padding.
|
|
1373
|
-
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1374
|
-
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1375
|
-
* @returns {String}
|
|
1376
|
-
*/
|
|
1377
|
-
drawEmpty(drawRight, spanningCell) {
|
|
1378
|
-
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1379
|
-
if (this.x && spanningCell && this.cells) {
|
|
1380
|
-
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1381
|
-
while (cellLeft instanceof ColSpanCell) {
|
|
1382
|
-
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1383
|
-
}
|
|
1384
|
-
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1385
|
-
left = this.chars["rightMid"];
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
let right = drawRight ? this.chars["right"] : "";
|
|
1389
|
-
let content = utils.repeat(" ", this.width);
|
|
1390
|
-
return this.stylizeLine(left, content, right);
|
|
1391
|
-
}
|
|
1392
|
-
};
|
|
1393
|
-
var ColSpanCell = class {
|
|
1394
|
-
/**
|
|
1395
|
-
* A Cell that doesn't do anything. It just draws empty lines.
|
|
1396
|
-
* Used as a placeholder in column spanning.
|
|
1397
|
-
* @constructor
|
|
1398
|
-
*/
|
|
1399
|
-
constructor() {
|
|
1400
|
-
}
|
|
1401
|
-
draw(lineNum) {
|
|
1402
|
-
if (typeof lineNum === "number") {
|
|
1403
|
-
debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
|
|
1404
|
-
}
|
|
1405
|
-
return "";
|
|
1406
|
-
}
|
|
1407
|
-
init() {
|
|
1408
|
-
}
|
|
1409
|
-
mergeTableOptions() {
|
|
1410
|
-
}
|
|
1411
|
-
};
|
|
1412
|
-
var RowSpanCell = class {
|
|
1413
|
-
/**
|
|
1414
|
-
* A placeholder Cell for a Cell that spans multiple rows.
|
|
1415
|
-
* It delegates rendering to the original cell, but adds the appropriate offset.
|
|
1416
|
-
* @param originalCell
|
|
1417
|
-
* @constructor
|
|
1418
|
-
*/
|
|
1419
|
-
constructor(originalCell) {
|
|
1420
|
-
this.originalCell = originalCell;
|
|
1421
|
-
}
|
|
1422
|
-
init(tableOptions) {
|
|
1423
|
-
let y5 = this.y;
|
|
1424
|
-
let originalY = this.originalCell.y;
|
|
1425
|
-
this.cellOffset = y5 - originalY;
|
|
1426
|
-
this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
|
|
1427
|
-
}
|
|
1428
|
-
draw(lineNum) {
|
|
1429
|
-
if (lineNum == "top") {
|
|
1430
|
-
return this.originalCell.draw(this.offset, this.cellOffset);
|
|
1431
|
-
}
|
|
1432
|
-
if (lineNum == "bottom") {
|
|
1433
|
-
return this.originalCell.draw("bottom");
|
|
1434
|
-
}
|
|
1435
|
-
debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
|
|
1436
|
-
return this.originalCell.draw(this.offset + 1 + lineNum);
|
|
1437
|
-
}
|
|
1438
|
-
mergeTableOptions() {
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
function firstDefined(...args) {
|
|
1442
|
-
return args.filter((v2) => v2 !== void 0 && v2 !== null).shift();
|
|
1443
|
-
}
|
|
1444
|
-
function setOption(objA, objB, nameB, targetObj) {
|
|
1445
|
-
let nameA = nameB.split("-");
|
|
1446
|
-
if (nameA.length > 1) {
|
|
1447
|
-
nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
|
|
1448
|
-
nameA = nameA.join("");
|
|
1449
|
-
targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
|
|
1450
|
-
} else {
|
|
1451
|
-
targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
function findDimension(dimensionTable, startingIndex, span) {
|
|
1455
|
-
let ret = dimensionTable[startingIndex];
|
|
1456
|
-
for (let i2 = 1; i2 < span; i2++) {
|
|
1457
|
-
ret += 1 + dimensionTable[startingIndex + i2];
|
|
1458
|
-
}
|
|
1459
|
-
return ret;
|
|
1460
|
-
}
|
|
1461
|
-
function sumPlusOne(a3, b4) {
|
|
1462
|
-
return a3 + b4 + 1;
|
|
1463
|
-
}
|
|
1464
|
-
var CHAR_NAMES = [
|
|
1465
|
-
"top",
|
|
1466
|
-
"top-mid",
|
|
1467
|
-
"top-left",
|
|
1468
|
-
"top-right",
|
|
1469
|
-
"bottom",
|
|
1470
|
-
"bottom-mid",
|
|
1471
|
-
"bottom-left",
|
|
1472
|
-
"bottom-right",
|
|
1473
|
-
"left",
|
|
1474
|
-
"left-mid",
|
|
1475
|
-
"mid",
|
|
1476
|
-
"mid-mid",
|
|
1477
|
-
"right",
|
|
1478
|
-
"right-mid",
|
|
1479
|
-
"middle"
|
|
1480
|
-
];
|
|
1481
|
-
module.exports = Cell;
|
|
1482
|
-
module.exports.ColSpanCell = ColSpanCell;
|
|
1483
|
-
module.exports.RowSpanCell = RowSpanCell;
|
|
1484
|
-
}
|
|
1485
|
-
});
|
|
1486
|
-
|
|
1487
|
-
// ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js
|
|
1488
|
-
var require_layout_manager = __commonJS({
|
|
1489
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js"(exports, module) {
|
|
1490
|
-
"use strict";
|
|
1491
|
-
var { warn, debug } = require_debug();
|
|
1492
|
-
var Cell = require_cell();
|
|
1493
|
-
var { ColSpanCell, RowSpanCell } = Cell;
|
|
1494
|
-
(function() {
|
|
1495
|
-
function next(alloc, col) {
|
|
1496
|
-
if (alloc[col] > 0) {
|
|
1497
|
-
return next(alloc, col + 1);
|
|
1498
|
-
}
|
|
1499
|
-
return col;
|
|
1500
|
-
}
|
|
1501
|
-
function layoutTable(table) {
|
|
1502
|
-
let alloc = {};
|
|
1503
|
-
table.forEach(function(row, rowIndex) {
|
|
1504
|
-
let col = 0;
|
|
1505
|
-
row.forEach(function(cell) {
|
|
1506
|
-
cell.y = rowIndex;
|
|
1507
|
-
cell.x = rowIndex ? next(alloc, col) : col;
|
|
1508
|
-
const rowSpan = cell.rowSpan || 1;
|
|
1509
|
-
const colSpan = cell.colSpan || 1;
|
|
1510
|
-
if (rowSpan > 1) {
|
|
1511
|
-
for (let cs = 0; cs < colSpan; cs++) {
|
|
1512
|
-
alloc[cell.x + cs] = rowSpan;
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
col = cell.x + colSpan;
|
|
1516
|
-
});
|
|
1517
|
-
Object.keys(alloc).forEach((idx) => {
|
|
1518
|
-
alloc[idx]--;
|
|
1519
|
-
if (alloc[idx] < 1) delete alloc[idx];
|
|
1520
|
-
});
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
|
-
function maxWidth(table) {
|
|
1524
|
-
let mw = 0;
|
|
1525
|
-
table.forEach(function(row) {
|
|
1526
|
-
row.forEach(function(cell) {
|
|
1527
|
-
mw = Math.max(mw, cell.x + (cell.colSpan || 1));
|
|
1528
|
-
});
|
|
1529
|
-
});
|
|
1530
|
-
return mw;
|
|
1531
|
-
}
|
|
1532
|
-
function maxHeight(table) {
|
|
1533
|
-
return table.length;
|
|
1534
|
-
}
|
|
1535
|
-
function cellsConflict(cell1, cell2) {
|
|
1536
|
-
let yMin1 = cell1.y;
|
|
1537
|
-
let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
|
|
1538
|
-
let yMin2 = cell2.y;
|
|
1539
|
-
let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
|
|
1540
|
-
let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
|
|
1541
|
-
let xMin1 = cell1.x;
|
|
1542
|
-
let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
|
|
1543
|
-
let xMin2 = cell2.x;
|
|
1544
|
-
let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
|
|
1545
|
-
let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
|
|
1546
|
-
return yConflict && xConflict;
|
|
1547
|
-
}
|
|
1548
|
-
function conflictExists(rows, x2, y5) {
|
|
1549
|
-
let i_max = Math.min(rows.length - 1, y5);
|
|
1550
|
-
let cell = { x: x2, y: y5 };
|
|
1551
|
-
for (let i2 = 0; i2 <= i_max; i2++) {
|
|
1552
|
-
let row = rows[i2];
|
|
1553
|
-
for (let j3 = 0; j3 < row.length; j3++) {
|
|
1554
|
-
if (cellsConflict(cell, row[j3])) {
|
|
1555
|
-
return true;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
return false;
|
|
1560
|
-
}
|
|
1561
|
-
function allBlank(rows, y5, xMin, xMax) {
|
|
1562
|
-
for (let x2 = xMin; x2 < xMax; x2++) {
|
|
1563
|
-
if (conflictExists(rows, x2, y5)) {
|
|
1564
|
-
return false;
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
return true;
|
|
1568
|
-
}
|
|
1569
|
-
function addRowSpanCells(table) {
|
|
1570
|
-
table.forEach(function(row, rowIndex) {
|
|
1571
|
-
row.forEach(function(cell) {
|
|
1572
|
-
for (let i2 = 1; i2 < cell.rowSpan; i2++) {
|
|
1573
|
-
let rowSpanCell = new RowSpanCell(cell);
|
|
1574
|
-
rowSpanCell.x = cell.x;
|
|
1575
|
-
rowSpanCell.y = cell.y + i2;
|
|
1576
|
-
rowSpanCell.colSpan = cell.colSpan;
|
|
1577
|
-
insertCell(rowSpanCell, table[rowIndex + i2]);
|
|
1578
|
-
}
|
|
1579
|
-
});
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
function addColSpanCells(cellRows) {
|
|
1583
|
-
for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
|
|
1584
|
-
let cellColumns = cellRows[rowIndex];
|
|
1585
|
-
for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
|
|
1586
|
-
let cell = cellColumns[columnIndex];
|
|
1587
|
-
for (let k3 = 1; k3 < cell.colSpan; k3++) {
|
|
1588
|
-
let colSpanCell = new ColSpanCell();
|
|
1589
|
-
colSpanCell.x = cell.x + k3;
|
|
1590
|
-
colSpanCell.y = cell.y;
|
|
1591
|
-
cellColumns.splice(columnIndex + 1, 0, colSpanCell);
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
function insertCell(cell, row) {
|
|
1597
|
-
let x2 = 0;
|
|
1598
|
-
while (x2 < row.length && row[x2].x < cell.x) {
|
|
1599
|
-
x2++;
|
|
1600
|
-
}
|
|
1601
|
-
row.splice(x2, 0, cell);
|
|
1602
|
-
}
|
|
1603
|
-
function fillInTable(table) {
|
|
1604
|
-
let h_max = maxHeight(table);
|
|
1605
|
-
let w_max = maxWidth(table);
|
|
1606
|
-
debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
|
|
1607
|
-
for (let y5 = 0; y5 < h_max; y5++) {
|
|
1608
|
-
for (let x2 = 0; x2 < w_max; x2++) {
|
|
1609
|
-
if (!conflictExists(table, x2, y5)) {
|
|
1610
|
-
let opts = { x: x2, y: y5, colSpan: 1, rowSpan: 1 };
|
|
1611
|
-
x2++;
|
|
1612
|
-
while (x2 < w_max && !conflictExists(table, x2, y5)) {
|
|
1613
|
-
opts.colSpan++;
|
|
1614
|
-
x2++;
|
|
1615
|
-
}
|
|
1616
|
-
let y22 = y5 + 1;
|
|
1617
|
-
while (y22 < h_max && allBlank(table, y22, opts.x, opts.x + opts.colSpan)) {
|
|
1618
|
-
opts.rowSpan++;
|
|
1619
|
-
y22++;
|
|
1620
|
-
}
|
|
1621
|
-
let cell = new Cell(opts);
|
|
1622
|
-
cell.x = opts.x;
|
|
1623
|
-
cell.y = opts.y;
|
|
1624
|
-
warn(`Missing cell at ${cell.y}-${cell.x}.`);
|
|
1625
|
-
insertCell(cell, table[y5]);
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
function generateCells(rows) {
|
|
1631
|
-
return rows.map(function(row) {
|
|
1632
|
-
if (!Array.isArray(row)) {
|
|
1633
|
-
let key = Object.keys(row)[0];
|
|
1634
|
-
row = row[key];
|
|
1635
|
-
if (Array.isArray(row)) {
|
|
1636
|
-
row = row.slice();
|
|
1637
|
-
row.unshift(key);
|
|
1638
|
-
} else {
|
|
1639
|
-
row = [key, row];
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
return row.map(function(cell) {
|
|
1643
|
-
return new Cell(cell);
|
|
1644
|
-
});
|
|
1645
|
-
});
|
|
1646
|
-
}
|
|
1647
|
-
function makeTableLayout(rows) {
|
|
1648
|
-
let cellRows = generateCells(rows);
|
|
1649
|
-
layoutTable(cellRows);
|
|
1650
|
-
fillInTable(cellRows);
|
|
1651
|
-
addRowSpanCells(cellRows);
|
|
1652
|
-
addColSpanCells(cellRows);
|
|
1653
|
-
return cellRows;
|
|
1654
|
-
}
|
|
1655
|
-
module.exports = {
|
|
1656
|
-
makeTableLayout,
|
|
1657
|
-
layoutTable,
|
|
1658
|
-
addRowSpanCells,
|
|
1659
|
-
maxWidth,
|
|
1660
|
-
fillInTable,
|
|
1661
|
-
computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
|
|
1662
|
-
computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
|
|
1663
|
-
};
|
|
1664
|
-
})();
|
|
1665
|
-
function makeComputeWidths(colSpan, desiredWidth, x2, forcedMin) {
|
|
1666
|
-
return function(vals, table) {
|
|
1667
|
-
let result = [];
|
|
1668
|
-
let spanners = [];
|
|
1669
|
-
let auto = {};
|
|
1670
|
-
table.forEach(function(row) {
|
|
1671
|
-
row.forEach(function(cell) {
|
|
1672
|
-
if ((cell[colSpan] || 1) > 1) {
|
|
1673
|
-
spanners.push(cell);
|
|
1674
|
-
} else {
|
|
1675
|
-
result[cell[x2]] = Math.max(result[cell[x2]] || 0, cell[desiredWidth] || 0, forcedMin);
|
|
1676
|
-
}
|
|
1677
|
-
});
|
|
1678
|
-
});
|
|
1679
|
-
vals.forEach(function(val, index) {
|
|
1680
|
-
if (typeof val === "number") {
|
|
1681
|
-
result[index] = val;
|
|
1682
|
-
}
|
|
1683
|
-
});
|
|
1684
|
-
for (let k3 = spanners.length - 1; k3 >= 0; k3--) {
|
|
1685
|
-
let cell = spanners[k3];
|
|
1686
|
-
let span = cell[colSpan];
|
|
1687
|
-
let col = cell[x2];
|
|
1688
|
-
let existingWidth = result[col];
|
|
1689
|
-
let editableCols = typeof vals[col] === "number" ? 0 : 1;
|
|
1690
|
-
if (typeof existingWidth === "number") {
|
|
1691
|
-
for (let i2 = 1; i2 < span; i2++) {
|
|
1692
|
-
existingWidth += 1 + result[col + i2];
|
|
1693
|
-
if (typeof vals[col + i2] !== "number") {
|
|
1694
|
-
editableCols++;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
} else {
|
|
1698
|
-
existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
|
|
1699
|
-
if (!auto[col] || auto[col] < existingWidth) {
|
|
1700
|
-
auto[col] = existingWidth;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
if (cell[desiredWidth] > existingWidth) {
|
|
1704
|
-
let i2 = 0;
|
|
1705
|
-
while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
|
|
1706
|
-
if (typeof vals[col + i2] !== "number") {
|
|
1707
|
-
let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
|
|
1708
|
-
existingWidth += dif;
|
|
1709
|
-
result[col + i2] += dif;
|
|
1710
|
-
editableCols--;
|
|
1711
|
-
}
|
|
1712
|
-
i2++;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
Object.assign(vals, result, auto);
|
|
1717
|
-
for (let j3 = 0; j3 < vals.length; j3++) {
|
|
1718
|
-
vals[j3] = Math.max(forcedMin, vals[j3] || 0);
|
|
1719
|
-
}
|
|
1720
|
-
};
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
});
|
|
1724
|
-
|
|
1725
|
-
// ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js
|
|
1726
|
-
var require_table = __commonJS({
|
|
1727
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js"(exports, module) {
|
|
1728
|
-
"use strict";
|
|
1729
|
-
var debug = require_debug();
|
|
1730
|
-
var utils = require_utils();
|
|
1731
|
-
var tableLayout = require_layout_manager();
|
|
1732
|
-
var Table2 = class extends Array {
|
|
1733
|
-
constructor(opts) {
|
|
1734
|
-
super();
|
|
1735
|
-
const options = utils.mergeOptions(opts);
|
|
1736
|
-
Object.defineProperty(this, "options", {
|
|
1737
|
-
value: options,
|
|
1738
|
-
enumerable: options.debug
|
|
1739
|
-
});
|
|
1740
|
-
if (options.debug) {
|
|
1741
|
-
switch (typeof options.debug) {
|
|
1742
|
-
case "boolean":
|
|
1743
|
-
debug.setDebugLevel(debug.WARN);
|
|
1744
|
-
break;
|
|
1745
|
-
case "number":
|
|
1746
|
-
debug.setDebugLevel(options.debug);
|
|
1747
|
-
break;
|
|
1748
|
-
case "string":
|
|
1749
|
-
debug.setDebugLevel(parseInt(options.debug, 10));
|
|
1750
|
-
break;
|
|
1751
|
-
default:
|
|
1752
|
-
debug.setDebugLevel(debug.WARN);
|
|
1753
|
-
debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
|
|
1754
|
-
}
|
|
1755
|
-
Object.defineProperty(this, "messages", {
|
|
1756
|
-
get() {
|
|
1757
|
-
return debug.debugMessages();
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
toString() {
|
|
1763
|
-
let array = this;
|
|
1764
|
-
let headersPresent = this.options.head && this.options.head.length;
|
|
1765
|
-
if (headersPresent) {
|
|
1766
|
-
array = [this.options.head];
|
|
1767
|
-
if (this.length) {
|
|
1768
|
-
array.push.apply(array, this);
|
|
1769
|
-
}
|
|
1770
|
-
} else {
|
|
1771
|
-
this.options.style.head = [];
|
|
1772
|
-
}
|
|
1773
|
-
let cells = tableLayout.makeTableLayout(array);
|
|
1774
|
-
cells.forEach(function(row) {
|
|
1775
|
-
row.forEach(function(cell) {
|
|
1776
|
-
cell.mergeTableOptions(this.options, cells);
|
|
1777
|
-
}, this);
|
|
1778
|
-
}, this);
|
|
1779
|
-
tableLayout.computeWidths(this.options.colWidths, cells);
|
|
1780
|
-
tableLayout.computeHeights(this.options.rowHeights, cells);
|
|
1781
|
-
cells.forEach(function(row) {
|
|
1782
|
-
row.forEach(function(cell) {
|
|
1783
|
-
cell.init(this.options);
|
|
1784
|
-
}, this);
|
|
1785
|
-
}, this);
|
|
1786
|
-
let result = [];
|
|
1787
|
-
for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
|
|
1788
|
-
let row = cells[rowIndex];
|
|
1789
|
-
let heightOfRow = this.options.rowHeights[rowIndex];
|
|
1790
|
-
if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
|
|
1791
|
-
doDraw(row, "top", result);
|
|
1792
|
-
}
|
|
1793
|
-
for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
|
|
1794
|
-
doDraw(row, lineNum, result);
|
|
1795
|
-
}
|
|
1796
|
-
if (rowIndex + 1 == cells.length) {
|
|
1797
|
-
doDraw(row, "bottom", result);
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
return result.join("\n");
|
|
1801
|
-
}
|
|
1802
|
-
get width() {
|
|
1803
|
-
let str = this.toString().split("\n");
|
|
1804
|
-
return str[0].length;
|
|
1805
|
-
}
|
|
1806
|
-
};
|
|
1807
|
-
Table2.reset = () => debug.reset();
|
|
1808
|
-
function doDraw(row, lineNum, result) {
|
|
1809
|
-
let line = [];
|
|
1810
|
-
row.forEach(function(cell) {
|
|
1811
|
-
line.push(cell.draw(lineNum));
|
|
1812
|
-
});
|
|
1813
|
-
let str = line.join("");
|
|
1814
|
-
if (str.length) result.push(str);
|
|
1815
|
-
}
|
|
1816
|
-
module.exports = Table2;
|
|
1817
|
-
}
|
|
1818
|
-
});
|
|
1819
|
-
|
|
1820
|
-
// ../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js
|
|
1821
|
-
var require_cli_table3 = __commonJS({
|
|
1822
|
-
"../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js"(exports, module) {
|
|
1823
|
-
"use strict";
|
|
1824
|
-
module.exports = require_table();
|
|
1825
|
-
}
|
|
1826
|
-
});
|
|
1827
|
-
|
|
1828
|
-
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
1829
|
-
var require_src = __commonJS({
|
|
1830
|
-
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
1831
|
-
"use strict";
|
|
1832
|
-
var ESC = "\x1B";
|
|
1833
|
-
var CSI = `${ESC}[`;
|
|
1834
|
-
var beep = "\x07";
|
|
1835
|
-
var cursor = {
|
|
1836
|
-
to(x2, y5) {
|
|
1837
|
-
if (!y5) return `${CSI}${x2 + 1}G`;
|
|
1838
|
-
return `${CSI}${y5 + 1};${x2 + 1}H`;
|
|
1839
|
-
},
|
|
1840
|
-
move(x2, y5) {
|
|
1841
|
-
let ret = "";
|
|
1842
|
-
if (x2 < 0) ret += `${CSI}${-x2}D`;
|
|
1843
|
-
else if (x2 > 0) ret += `${CSI}${x2}C`;
|
|
1844
|
-
if (y5 < 0) ret += `${CSI}${-y5}A`;
|
|
1845
|
-
else if (y5 > 0) ret += `${CSI}${y5}B`;
|
|
1846
|
-
return ret;
|
|
1847
|
-
},
|
|
1848
|
-
up: (count = 1) => `${CSI}${count}A`,
|
|
1849
|
-
down: (count = 1) => `${CSI}${count}B`,
|
|
1850
|
-
forward: (count = 1) => `${CSI}${count}C`,
|
|
1851
|
-
backward: (count = 1) => `${CSI}${count}D`,
|
|
1852
|
-
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
1853
|
-
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
1854
|
-
left: `${CSI}G`,
|
|
1855
|
-
hide: `${CSI}?25l`,
|
|
1856
|
-
show: `${CSI}?25h`,
|
|
1857
|
-
save: `${ESC}7`,
|
|
1858
|
-
restore: `${ESC}8`
|
|
1859
|
-
};
|
|
1860
|
-
var scroll = {
|
|
1861
|
-
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
1862
|
-
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
1863
|
-
};
|
|
1864
|
-
var erase = {
|
|
1865
|
-
screen: `${CSI}2J`,
|
|
1866
|
-
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
1867
|
-
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
1868
|
-
line: `${CSI}2K`,
|
|
1869
|
-
lineEnd: `${CSI}K`,
|
|
1870
|
-
lineStart: `${CSI}1K`,
|
|
1871
|
-
lines(count) {
|
|
1872
|
-
let clear = "";
|
|
1873
|
-
for (let i2 = 0; i2 < count; i2++)
|
|
1874
|
-
clear += this.line + (i2 < count - 1 ? cursor.up() : "");
|
|
1875
|
-
if (count)
|
|
1876
|
-
clear += cursor.left;
|
|
1877
|
-
return clear;
|
|
1878
|
-
}
|
|
1879
|
-
};
|
|
1880
|
-
module.exports = { cursor, scroll, erase, beep };
|
|
1881
|
-
}
|
|
1882
|
-
});
|
|
1883
|
-
|
|
1884
|
-
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
1885
|
-
var require_picocolors = __commonJS({
|
|
1886
|
-
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
1887
|
-
"use strict";
|
|
1888
|
-
var p3 = process || {};
|
|
1889
|
-
var argv2 = p3.argv || [];
|
|
1890
|
-
var env2 = p3.env || {};
|
|
1891
|
-
var isColorSupported2 = !(!!env2.NO_COLOR || argv2.includes("--no-color")) && (!!env2.FORCE_COLOR || argv2.includes("--color") || p3.platform === "win32" || (p3.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
|
|
1892
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
1893
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
1894
|
-
return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
|
|
1895
|
-
};
|
|
1896
|
-
var replaceClose2 = (string, close, replace, index) => {
|
|
1897
|
-
let result = "", cursor = 0;
|
|
1898
|
-
do {
|
|
1899
|
-
result += string.substring(cursor, index) + replace;
|
|
1900
|
-
cursor = index + close.length;
|
|
1901
|
-
index = string.indexOf(close, cursor);
|
|
1902
|
-
} while (~index);
|
|
1903
|
-
return result + string.substring(cursor);
|
|
1904
|
-
};
|
|
1905
|
-
var createColors2 = (enabled = isColorSupported2) => {
|
|
1906
|
-
let f4 = enabled ? formatter : () => String;
|
|
1907
|
-
return {
|
|
1908
|
-
isColorSupported: enabled,
|
|
1909
|
-
reset: f4("\x1B[0m", "\x1B[0m"),
|
|
1910
|
-
bold: f4("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
1911
|
-
dim: f4("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
1912
|
-
italic: f4("\x1B[3m", "\x1B[23m"),
|
|
1913
|
-
underline: f4("\x1B[4m", "\x1B[24m"),
|
|
1914
|
-
inverse: f4("\x1B[7m", "\x1B[27m"),
|
|
1915
|
-
hidden: f4("\x1B[8m", "\x1B[28m"),
|
|
1916
|
-
strikethrough: f4("\x1B[9m", "\x1B[29m"),
|
|
1917
|
-
black: f4("\x1B[30m", "\x1B[39m"),
|
|
1918
|
-
red: f4("\x1B[31m", "\x1B[39m"),
|
|
1919
|
-
green: f4("\x1B[32m", "\x1B[39m"),
|
|
1920
|
-
yellow: f4("\x1B[33m", "\x1B[39m"),
|
|
1921
|
-
blue: f4("\x1B[34m", "\x1B[39m"),
|
|
1922
|
-
magenta: f4("\x1B[35m", "\x1B[39m"),
|
|
1923
|
-
cyan: f4("\x1B[36m", "\x1B[39m"),
|
|
1924
|
-
white: f4("\x1B[37m", "\x1B[39m"),
|
|
1925
|
-
gray: f4("\x1B[90m", "\x1B[39m"),
|
|
1926
|
-
bgBlack: f4("\x1B[40m", "\x1B[49m"),
|
|
1927
|
-
bgRed: f4("\x1B[41m", "\x1B[49m"),
|
|
1928
|
-
bgGreen: f4("\x1B[42m", "\x1B[49m"),
|
|
1929
|
-
bgYellow: f4("\x1B[43m", "\x1B[49m"),
|
|
1930
|
-
bgBlue: f4("\x1B[44m", "\x1B[49m"),
|
|
1931
|
-
bgMagenta: f4("\x1B[45m", "\x1B[49m"),
|
|
1932
|
-
bgCyan: f4("\x1B[46m", "\x1B[49m"),
|
|
1933
|
-
bgWhite: f4("\x1B[47m", "\x1B[49m"),
|
|
1934
|
-
blackBright: f4("\x1B[90m", "\x1B[39m"),
|
|
1935
|
-
redBright: f4("\x1B[91m", "\x1B[39m"),
|
|
1936
|
-
greenBright: f4("\x1B[92m", "\x1B[39m"),
|
|
1937
|
-
yellowBright: f4("\x1B[93m", "\x1B[39m"),
|
|
1938
|
-
blueBright: f4("\x1B[94m", "\x1B[39m"),
|
|
1939
|
-
magentaBright: f4("\x1B[95m", "\x1B[39m"),
|
|
1940
|
-
cyanBright: f4("\x1B[96m", "\x1B[39m"),
|
|
1941
|
-
whiteBright: f4("\x1B[97m", "\x1B[39m"),
|
|
1942
|
-
bgBlackBright: f4("\x1B[100m", "\x1B[49m"),
|
|
1943
|
-
bgRedBright: f4("\x1B[101m", "\x1B[49m"),
|
|
1944
|
-
bgGreenBright: f4("\x1B[102m", "\x1B[49m"),
|
|
1945
|
-
bgYellowBright: f4("\x1B[103m", "\x1B[49m"),
|
|
1946
|
-
bgBlueBright: f4("\x1B[104m", "\x1B[49m"),
|
|
1947
|
-
bgMagentaBright: f4("\x1B[105m", "\x1B[49m"),
|
|
1948
|
-
bgCyanBright: f4("\x1B[106m", "\x1B[49m"),
|
|
1949
|
-
bgWhiteBright: f4("\x1B[107m", "\x1B[49m")
|
|
1950
|
-
};
|
|
1951
|
-
};
|
|
1952
|
-
module.exports = createColors2();
|
|
1953
|
-
module.exports.createColors = createColors2;
|
|
1954
|
-
}
|
|
1955
|
-
});
|
|
1956
|
-
|
|
1957
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
1958
|
-
var LogLevels = {
|
|
1959
|
-
silent: Number.NEGATIVE_INFINITY,
|
|
1960
|
-
fatal: 0,
|
|
1961
|
-
error: 0,
|
|
1962
|
-
warn: 1,
|
|
1963
|
-
log: 2,
|
|
1964
|
-
info: 3,
|
|
1965
|
-
success: 3,
|
|
1966
|
-
fail: 3,
|
|
1967
|
-
ready: 3,
|
|
1968
|
-
start: 3,
|
|
1969
|
-
box: 3,
|
|
1970
|
-
debug: 4,
|
|
1971
|
-
trace: 5,
|
|
1972
|
-
verbose: Number.POSITIVE_INFINITY
|
|
1973
|
-
};
|
|
1974
|
-
var LogTypes = {
|
|
1975
|
-
// Silent
|
|
1976
|
-
silent: {
|
|
1977
|
-
level: -1
|
|
1978
|
-
},
|
|
1979
|
-
// Level 0
|
|
1980
|
-
fatal: {
|
|
1981
|
-
level: LogLevels.fatal
|
|
1982
|
-
},
|
|
1983
|
-
error: {
|
|
1984
|
-
level: LogLevels.error
|
|
1985
|
-
},
|
|
1986
|
-
// Level 1
|
|
1987
|
-
warn: {
|
|
1988
|
-
level: LogLevels.warn
|
|
1989
|
-
},
|
|
1990
|
-
// Level 2
|
|
1991
|
-
log: {
|
|
1992
|
-
level: LogLevels.log
|
|
1993
|
-
},
|
|
1994
|
-
// Level 3
|
|
1995
|
-
info: {
|
|
1996
|
-
level: LogLevels.info
|
|
1997
|
-
},
|
|
1998
|
-
success: {
|
|
1999
|
-
level: LogLevels.success
|
|
2000
|
-
},
|
|
2001
|
-
fail: {
|
|
2002
|
-
level: LogLevels.fail
|
|
2003
|
-
},
|
|
2004
|
-
ready: {
|
|
2005
|
-
level: LogLevels.info
|
|
2006
|
-
},
|
|
2007
|
-
start: {
|
|
2008
|
-
level: LogLevels.info
|
|
2009
|
-
},
|
|
2010
|
-
box: {
|
|
2011
|
-
level: LogLevels.info
|
|
2012
|
-
},
|
|
2013
|
-
// Level 4
|
|
2014
|
-
debug: {
|
|
2015
|
-
level: LogLevels.debug
|
|
2016
|
-
},
|
|
2017
|
-
// Level 5
|
|
2018
|
-
trace: {
|
|
2019
|
-
level: LogLevels.trace
|
|
2020
|
-
},
|
|
2021
|
-
// Verbose
|
|
2022
|
-
verbose: {
|
|
2023
|
-
level: LogLevels.verbose
|
|
2024
|
-
}
|
|
2025
|
-
};
|
|
2026
|
-
function isPlainObject$1(value) {
|
|
2027
|
-
if (value === null || typeof value !== "object") {
|
|
2028
|
-
return false;
|
|
2029
|
-
}
|
|
2030
|
-
const prototype = Object.getPrototypeOf(value);
|
|
2031
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
2032
|
-
return false;
|
|
2033
|
-
}
|
|
2034
|
-
if (Symbol.iterator in value) {
|
|
2035
|
-
return false;
|
|
2036
|
-
}
|
|
2037
|
-
if (Symbol.toStringTag in value) {
|
|
2038
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
2039
|
-
}
|
|
2040
|
-
return true;
|
|
2041
|
-
}
|
|
2042
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
2043
|
-
if (!isPlainObject$1(defaults)) {
|
|
2044
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
2045
|
-
}
|
|
2046
|
-
const object = Object.assign({}, defaults);
|
|
2047
|
-
for (const key in baseObject) {
|
|
2048
|
-
if (key === "__proto__" || key === "constructor") {
|
|
2049
|
-
continue;
|
|
2050
|
-
}
|
|
2051
|
-
const value = baseObject[key];
|
|
2052
|
-
if (value === null || value === void 0) {
|
|
2053
|
-
continue;
|
|
2054
|
-
}
|
|
2055
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
2056
|
-
continue;
|
|
2057
|
-
}
|
|
2058
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
2059
|
-
object[key] = [...value, ...object[key]];
|
|
2060
|
-
} else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {
|
|
2061
|
-
object[key] = _defu(
|
|
2062
|
-
value,
|
|
2063
|
-
object[key],
|
|
2064
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
2065
|
-
merger
|
|
2066
|
-
);
|
|
2067
|
-
} else {
|
|
2068
|
-
object[key] = value;
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
return object;
|
|
2072
|
-
}
|
|
2073
|
-
function createDefu(merger) {
|
|
2074
|
-
return (...arguments_) => (
|
|
2075
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
2076
|
-
arguments_.reduce((p3, c3) => _defu(p3, c3, "", merger), {})
|
|
2077
|
-
);
|
|
2078
|
-
}
|
|
2079
|
-
var defu = createDefu();
|
|
2080
|
-
function isPlainObject(obj) {
|
|
2081
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2082
|
-
}
|
|
2083
|
-
function isLogObj(arg) {
|
|
2084
|
-
if (!isPlainObject(arg)) {
|
|
2085
|
-
return false;
|
|
2086
|
-
}
|
|
2087
|
-
if (!arg.message && !arg.args) {
|
|
2088
|
-
return false;
|
|
2089
|
-
}
|
|
2090
|
-
if (arg.stack) {
|
|
2091
|
-
return false;
|
|
2092
|
-
}
|
|
2093
|
-
return true;
|
|
2094
|
-
}
|
|
2095
|
-
var paused = false;
|
|
2096
|
-
var queue = [];
|
|
2097
|
-
var Consola = class _Consola {
|
|
2098
|
-
options;
|
|
2099
|
-
_lastLog;
|
|
2100
|
-
_mockFn;
|
|
2101
|
-
/**
|
|
2102
|
-
* Creates an instance of Consola with specified options or defaults.
|
|
2103
|
-
*
|
|
2104
|
-
* @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
|
|
2105
|
-
*/
|
|
2106
|
-
constructor(options = {}) {
|
|
2107
|
-
const types = options.types || LogTypes;
|
|
2108
|
-
this.options = defu(
|
|
2109
|
-
{
|
|
2110
|
-
...options,
|
|
2111
|
-
defaults: { ...options.defaults },
|
|
2112
|
-
level: _normalizeLogLevel(options.level, types),
|
|
2113
|
-
reporters: [...options.reporters || []]
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
types: LogTypes,
|
|
2117
|
-
throttle: 1e3,
|
|
2118
|
-
throttleMin: 5,
|
|
2119
|
-
formatOptions: {
|
|
2120
|
-
date: true,
|
|
2121
|
-
colors: false,
|
|
2122
|
-
compact: true
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
);
|
|
2126
|
-
for (const type in types) {
|
|
2127
|
-
const defaults = {
|
|
2128
|
-
type,
|
|
2129
|
-
...this.options.defaults,
|
|
2130
|
-
...types[type]
|
|
2131
|
-
};
|
|
2132
|
-
this[type] = this._wrapLogFn(defaults);
|
|
2133
|
-
this[type].raw = this._wrapLogFn(
|
|
2134
|
-
defaults,
|
|
2135
|
-
true
|
|
2136
|
-
);
|
|
2137
|
-
}
|
|
2138
|
-
if (this.options.mockFn) {
|
|
2139
|
-
this.mockTypes();
|
|
2140
|
-
}
|
|
2141
|
-
this._lastLog = {};
|
|
2142
|
-
}
|
|
2143
|
-
/**
|
|
2144
|
-
* Gets the current log level of the Consola instance.
|
|
2145
|
-
*
|
|
2146
|
-
* @returns {number} The current log level.
|
|
2147
|
-
*/
|
|
2148
|
-
get level() {
|
|
2149
|
-
return this.options.level;
|
|
2150
|
-
}
|
|
2151
|
-
/**
|
|
2152
|
-
* Sets the minimum log level that will be output by the instance.
|
|
2153
|
-
*
|
|
2154
|
-
* @param {number} level - The new log level to set.
|
|
2155
|
-
*/
|
|
2156
|
-
set level(level) {
|
|
2157
|
-
this.options.level = _normalizeLogLevel(
|
|
2158
|
-
level,
|
|
2159
|
-
this.options.types,
|
|
2160
|
-
this.options.level
|
|
2161
|
-
);
|
|
2162
|
-
}
|
|
2163
|
-
/**
|
|
2164
|
-
* Displays a prompt to the user and returns the response.
|
|
2165
|
-
* Throw an error if `prompt` is not supported by the current configuration.
|
|
2166
|
-
*
|
|
2167
|
-
* @template T
|
|
2168
|
-
* @param {string} message - The message to display in the prompt.
|
|
2169
|
-
* @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
|
|
2170
|
-
* @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
|
|
2171
|
-
*/
|
|
2172
|
-
prompt(message, opts) {
|
|
2173
|
-
if (!this.options.prompt) {
|
|
2174
|
-
throw new Error("prompt is not supported!");
|
|
2175
|
-
}
|
|
2176
|
-
return this.options.prompt(message, opts);
|
|
2177
|
-
}
|
|
2178
|
-
/**
|
|
2179
|
-
* Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
|
|
2180
|
-
*
|
|
2181
|
-
* @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
|
|
2182
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2183
|
-
*/
|
|
2184
|
-
create(options) {
|
|
2185
|
-
const instance = new _Consola({
|
|
2186
|
-
...this.options,
|
|
2187
|
-
...options
|
|
2188
|
-
});
|
|
2189
|
-
if (this._mockFn) {
|
|
2190
|
-
instance.mockTypes(this._mockFn);
|
|
2191
|
-
}
|
|
2192
|
-
return instance;
|
|
2193
|
-
}
|
|
2194
|
-
/**
|
|
2195
|
-
* Creates a new Consola instance with the specified default log object properties.
|
|
2196
|
-
*
|
|
2197
|
-
* @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
|
|
2198
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2199
|
-
*/
|
|
2200
|
-
withDefaults(defaults) {
|
|
2201
|
-
return this.create({
|
|
2202
|
-
...this.options,
|
|
2203
|
-
defaults: {
|
|
2204
|
-
...this.options.defaults,
|
|
2205
|
-
...defaults
|
|
2206
|
-
}
|
|
2207
|
-
});
|
|
2208
|
-
}
|
|
2209
|
-
/**
|
|
2210
|
-
* Creates a new Consola instance with a specified tag, which will be included in every log.
|
|
2211
|
-
*
|
|
2212
|
-
* @param {string} tag - The tag to include in each log of the new instance.
|
|
2213
|
-
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2214
|
-
*/
|
|
2215
|
-
withTag(tag) {
|
|
2216
|
-
return this.withDefaults({
|
|
2217
|
-
tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
|
|
2218
|
-
});
|
|
2219
|
-
}
|
|
2220
|
-
/**
|
|
2221
|
-
* Adds a custom reporter to the Consola instance.
|
|
2222
|
-
* Reporters will be called for each log message, depending on their implementation and log level.
|
|
2223
|
-
*
|
|
2224
|
-
* @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
|
|
2225
|
-
* @returns {Consola} The current Consola instance.
|
|
2226
|
-
*/
|
|
2227
|
-
addReporter(reporter) {
|
|
2228
|
-
this.options.reporters.push(reporter);
|
|
2229
|
-
return this;
|
|
2230
|
-
}
|
|
2231
|
-
/**
|
|
2232
|
-
* Removes a custom reporter from the Consola instance.
|
|
2233
|
-
* If no reporter is specified, all reporters will be removed.
|
|
2234
|
-
*
|
|
2235
|
-
* @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
|
|
2236
|
-
* @returns {Consola} The current Consola instance.
|
|
2237
|
-
*/
|
|
2238
|
-
removeReporter(reporter) {
|
|
2239
|
-
if (reporter) {
|
|
2240
|
-
const i2 = this.options.reporters.indexOf(reporter);
|
|
2241
|
-
if (i2 !== -1) {
|
|
2242
|
-
return this.options.reporters.splice(i2, 1);
|
|
2243
|
-
}
|
|
2244
|
-
} else {
|
|
2245
|
-
this.options.reporters.splice(0);
|
|
2246
|
-
}
|
|
2247
|
-
return this;
|
|
2248
|
-
}
|
|
2249
|
-
/**
|
|
2250
|
-
* Replaces all reporters of the Consola instance with the specified array of reporters.
|
|
2251
|
-
*
|
|
2252
|
-
* @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
|
|
2253
|
-
* @returns {Consola} The current Consola instance.
|
|
2254
|
-
*/
|
|
2255
|
-
setReporters(reporters) {
|
|
2256
|
-
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
2257
|
-
return this;
|
|
2258
|
-
}
|
|
2259
|
-
wrapAll() {
|
|
2260
|
-
this.wrapConsole();
|
|
2261
|
-
this.wrapStd();
|
|
2262
|
-
}
|
|
2263
|
-
restoreAll() {
|
|
2264
|
-
this.restoreConsole();
|
|
2265
|
-
this.restoreStd();
|
|
2266
|
-
}
|
|
2267
|
-
/**
|
|
2268
|
-
* Overrides console methods with Consola logging methods for consistent logging.
|
|
2269
|
-
*/
|
|
2270
|
-
wrapConsole() {
|
|
2271
|
-
for (const type in this.options.types) {
|
|
2272
|
-
if (!console["__" + type]) {
|
|
2273
|
-
console["__" + type] = console[type];
|
|
2274
|
-
}
|
|
2275
|
-
console[type] = this[type].raw;
|
|
2276
|
-
}
|
|
2277
|
-
}
|
|
2278
|
-
/**
|
|
2279
|
-
* Restores the original console methods, removing Consola overrides.
|
|
2280
|
-
*/
|
|
2281
|
-
restoreConsole() {
|
|
2282
|
-
for (const type in this.options.types) {
|
|
2283
|
-
if (console["__" + type]) {
|
|
2284
|
-
console[type] = console["__" + type];
|
|
2285
|
-
delete console["__" + type];
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
/**
|
|
2290
|
-
* Overrides standard output and error streams to redirect them through Consola.
|
|
2291
|
-
*/
|
|
2292
|
-
wrapStd() {
|
|
2293
|
-
this._wrapStream(this.options.stdout, "log");
|
|
2294
|
-
this._wrapStream(this.options.stderr, "log");
|
|
2295
|
-
}
|
|
2296
|
-
_wrapStream(stream, type) {
|
|
2297
|
-
if (!stream) {
|
|
2298
|
-
return;
|
|
2299
|
-
}
|
|
2300
|
-
if (!stream.__write) {
|
|
2301
|
-
stream.__write = stream.write;
|
|
2302
|
-
}
|
|
2303
|
-
stream.write = (data) => {
|
|
2304
|
-
this[type].raw(String(data).trim());
|
|
2305
|
-
};
|
|
2306
|
-
}
|
|
2307
|
-
/**
|
|
2308
|
-
* Restores the original standard output and error streams, removing the Consola redirection.
|
|
2309
|
-
*/
|
|
2310
|
-
restoreStd() {
|
|
2311
|
-
this._restoreStream(this.options.stdout);
|
|
2312
|
-
this._restoreStream(this.options.stderr);
|
|
2313
|
-
}
|
|
2314
|
-
_restoreStream(stream) {
|
|
2315
|
-
if (!stream) {
|
|
2316
|
-
return;
|
|
2317
|
-
}
|
|
2318
|
-
if (stream.__write) {
|
|
2319
|
-
stream.write = stream.__write;
|
|
2320
|
-
delete stream.__write;
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
/**
|
|
2324
|
-
* Pauses logging, queues incoming logs until resumed.
|
|
2325
|
-
*/
|
|
2326
|
-
pauseLogs() {
|
|
2327
|
-
paused = true;
|
|
2328
|
-
}
|
|
2329
|
-
/**
|
|
2330
|
-
* Resumes logging, processing any queued logs.
|
|
2331
|
-
*/
|
|
2332
|
-
resumeLogs() {
|
|
2333
|
-
paused = false;
|
|
2334
|
-
const _queue = queue.splice(0);
|
|
2335
|
-
for (const item of _queue) {
|
|
2336
|
-
item[0]._logFn(item[1], item[2]);
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
/**
|
|
2340
|
-
* Replaces logging methods with mocks if a mock function is provided.
|
|
2341
|
-
*
|
|
2342
|
-
* @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
|
|
2343
|
-
*/
|
|
2344
|
-
mockTypes(mockFn) {
|
|
2345
|
-
const _mockFn = mockFn || this.options.mockFn;
|
|
2346
|
-
this._mockFn = _mockFn;
|
|
2347
|
-
if (typeof _mockFn !== "function") {
|
|
2348
|
-
return;
|
|
2349
|
-
}
|
|
2350
|
-
for (const type in this.options.types) {
|
|
2351
|
-
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
2352
|
-
this[type].raw = this[type];
|
|
2353
|
-
}
|
|
2354
|
-
}
|
|
2355
|
-
_wrapLogFn(defaults, isRaw) {
|
|
2356
|
-
return (...args) => {
|
|
2357
|
-
if (paused) {
|
|
2358
|
-
queue.push([this, defaults, args, isRaw]);
|
|
2359
|
-
return;
|
|
2360
|
-
}
|
|
2361
|
-
return this._logFn(defaults, args, isRaw);
|
|
2362
|
-
};
|
|
2363
|
-
}
|
|
2364
|
-
_logFn(defaults, args, isRaw) {
|
|
2365
|
-
if ((defaults.level || 0) > this.level) {
|
|
2366
|
-
return false;
|
|
2367
|
-
}
|
|
2368
|
-
const logObj = {
|
|
2369
|
-
date: /* @__PURE__ */ new Date(),
|
|
2370
|
-
args: [],
|
|
2371
|
-
...defaults,
|
|
2372
|
-
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
2373
|
-
};
|
|
2374
|
-
if (!isRaw && args.length === 1 && isLogObj(args[0])) {
|
|
2375
|
-
Object.assign(logObj, args[0]);
|
|
2376
|
-
} else {
|
|
2377
|
-
logObj.args = [...args];
|
|
2378
|
-
}
|
|
2379
|
-
if (logObj.message) {
|
|
2380
|
-
logObj.args.unshift(logObj.message);
|
|
2381
|
-
delete logObj.message;
|
|
2382
|
-
}
|
|
2383
|
-
if (logObj.additional) {
|
|
2384
|
-
if (!Array.isArray(logObj.additional)) {
|
|
2385
|
-
logObj.additional = logObj.additional.split("\n");
|
|
2386
|
-
}
|
|
2387
|
-
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
2388
|
-
delete logObj.additional;
|
|
2389
|
-
}
|
|
2390
|
-
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
2391
|
-
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
2392
|
-
const resolveLog = (newLog = false) => {
|
|
2393
|
-
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
2394
|
-
if (this._lastLog.object && repeated > 0) {
|
|
2395
|
-
const args2 = [...this._lastLog.object.args];
|
|
2396
|
-
if (repeated > 1) {
|
|
2397
|
-
args2.push(`(repeated ${repeated} times)`);
|
|
2398
|
-
}
|
|
2399
|
-
this._log({ ...this._lastLog.object, args: args2 });
|
|
2400
|
-
this._lastLog.count = 1;
|
|
2401
|
-
}
|
|
2402
|
-
if (newLog) {
|
|
2403
|
-
this._lastLog.object = logObj;
|
|
2404
|
-
this._log(logObj);
|
|
2405
|
-
}
|
|
2406
|
-
};
|
|
2407
|
-
clearTimeout(this._lastLog.timeout);
|
|
2408
|
-
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
2409
|
-
this._lastLog.time = logObj.date;
|
|
2410
|
-
if (diffTime < this.options.throttle) {
|
|
2411
|
-
try {
|
|
2412
|
-
const serializedLog = JSON.stringify([
|
|
2413
|
-
logObj.type,
|
|
2414
|
-
logObj.tag,
|
|
2415
|
-
logObj.args
|
|
2416
|
-
]);
|
|
2417
|
-
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
2418
|
-
this._lastLog.serialized = serializedLog;
|
|
2419
|
-
if (isSameLog) {
|
|
2420
|
-
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
2421
|
-
if (this._lastLog.count > this.options.throttleMin) {
|
|
2422
|
-
this._lastLog.timeout = setTimeout(
|
|
2423
|
-
resolveLog,
|
|
2424
|
-
this.options.throttle
|
|
2425
|
-
);
|
|
2426
|
-
return;
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
2429
|
-
} catch {
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
resolveLog(true);
|
|
2433
|
-
}
|
|
2434
|
-
_log(logObj) {
|
|
2435
|
-
for (const reporter of this.options.reporters) {
|
|
2436
|
-
reporter.log(logObj, {
|
|
2437
|
-
options: this.options
|
|
2438
|
-
});
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
};
|
|
2442
|
-
function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
|
|
2443
|
-
if (input === void 0) {
|
|
2444
|
-
return defaultLevel;
|
|
2445
|
-
}
|
|
2446
|
-
if (typeof input === "number") {
|
|
2447
|
-
return input;
|
|
2448
|
-
}
|
|
2449
|
-
if (types[input] && types[input].level !== void 0) {
|
|
2450
|
-
return types[input].level;
|
|
2451
|
-
}
|
|
2452
|
-
return defaultLevel;
|
|
2453
|
-
}
|
|
2454
|
-
Consola.prototype.add = Consola.prototype.addReporter;
|
|
2455
|
-
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
2456
|
-
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
2457
|
-
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
2458
|
-
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
2459
|
-
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
2460
|
-
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
2461
|
-
function createConsola(options = {}) {
|
|
2462
|
-
return new Consola(options);
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
2466
|
-
import { formatWithOptions } from "util";
|
|
2467
|
-
import { sep } from "path";
|
|
2468
|
-
function parseStack(stack, message) {
|
|
2469
|
-
const cwd = process.cwd() + sep;
|
|
2470
|
-
const lines = stack.split("\n").splice(message.split("\n").length).map((l3) => l3.trim().replace("file://", "").replace(cwd, ""));
|
|
2471
|
-
return lines;
|
|
2472
|
-
}
|
|
2473
|
-
function writeStream(data, stream) {
|
|
2474
|
-
const write = stream.__write || stream.write;
|
|
2475
|
-
return write.call(stream, data);
|
|
2476
|
-
}
|
|
2477
|
-
var bracket = (x2) => x2 ? `[${x2}]` : "";
|
|
2478
|
-
var BasicReporter = class {
|
|
2479
|
-
formatStack(stack, message, opts) {
|
|
2480
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2481
|
-
return indent + parseStack(stack, message).join(`
|
|
2482
|
-
${indent}`);
|
|
2483
|
-
}
|
|
2484
|
-
formatError(err, opts) {
|
|
2485
|
-
const message = err.message ?? formatWithOptions(opts, err);
|
|
2486
|
-
const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
|
|
2487
|
-
const level = opts?.errorLevel || 0;
|
|
2488
|
-
const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
|
|
2489
|
-
const causedError = err.cause ? "\n\n" + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
|
|
2490
|
-
return causedPrefix + message + "\n" + stack + causedError;
|
|
2491
|
-
}
|
|
2492
|
-
formatArgs(args, opts) {
|
|
2493
|
-
const _args = args.map((arg) => {
|
|
2494
|
-
if (arg && typeof arg.stack === "string") {
|
|
2495
|
-
return this.formatError(arg, opts);
|
|
2496
|
-
}
|
|
2497
|
-
return arg;
|
|
2498
|
-
});
|
|
2499
|
-
return formatWithOptions(opts, ..._args);
|
|
2500
|
-
}
|
|
2501
|
-
formatDate(date, opts) {
|
|
2502
|
-
return opts.date ? date.toLocaleTimeString() : "";
|
|
2503
|
-
}
|
|
2504
|
-
filterAndJoin(arr) {
|
|
2505
|
-
return arr.filter(Boolean).join(" ");
|
|
2506
|
-
}
|
|
2507
|
-
formatLogObj(logObj, opts) {
|
|
2508
|
-
const message = this.formatArgs(logObj.args, opts);
|
|
2509
|
-
if (logObj.type === "box") {
|
|
2510
|
-
return "\n" + [
|
|
2511
|
-
bracket(logObj.tag),
|
|
2512
|
-
logObj.title && logObj.title,
|
|
2513
|
-
...message.split("\n")
|
|
2514
|
-
].filter(Boolean).map((l3) => " > " + l3).join("\n") + "\n";
|
|
2515
|
-
}
|
|
2516
|
-
return this.filterAndJoin([
|
|
2517
|
-
bracket(logObj.type),
|
|
2518
|
-
bracket(logObj.tag),
|
|
2519
|
-
message
|
|
2520
|
-
]);
|
|
2521
|
-
}
|
|
2522
|
-
log(logObj, ctx) {
|
|
2523
|
-
const line = this.formatLogObj(logObj, {
|
|
2524
|
-
columns: ctx.options.stdout.columns || 0,
|
|
2525
|
-
...ctx.options.formatOptions
|
|
2526
|
-
});
|
|
2527
|
-
return writeStream(
|
|
2528
|
-
line + "\n",
|
|
2529
|
-
logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
|
|
2530
|
-
);
|
|
2531
|
-
}
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
2535
|
-
import g$1 from "process";
|
|
2536
|
-
|
|
2537
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
2538
|
-
import * as tty from "tty";
|
|
2539
|
-
var {
|
|
2540
|
-
env = {},
|
|
2541
|
-
argv = [],
|
|
2542
|
-
platform = ""
|
|
2543
|
-
} = typeof process === "undefined" ? {} : process;
|
|
2544
|
-
var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
2545
|
-
var isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
2546
|
-
var isWindows = platform === "win32";
|
|
2547
|
-
var isDumbTerminal = env.TERM === "dumb";
|
|
2548
|
-
var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
2549
|
-
var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
2550
|
-
var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
2551
|
-
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
2552
|
-
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
2553
|
-
}
|
|
2554
|
-
function clearBleed(index, string, open, close, replace) {
|
|
2555
|
-
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
2556
|
-
}
|
|
2557
|
-
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
2558
|
-
return (string) => string || !(string === "" || string === void 0) ? clearBleed(
|
|
2559
|
-
("" + string).indexOf(close, at),
|
|
2560
|
-
string,
|
|
2561
|
-
open,
|
|
2562
|
-
close,
|
|
2563
|
-
replace
|
|
2564
|
-
) : "";
|
|
2565
|
-
}
|
|
2566
|
-
function init(open, close, replace) {
|
|
2567
|
-
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
2568
|
-
}
|
|
2569
|
-
var colorDefs = {
|
|
2570
|
-
reset: init(0, 0),
|
|
2571
|
-
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
2572
|
-
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
2573
|
-
italic: init(3, 23),
|
|
2574
|
-
underline: init(4, 24),
|
|
2575
|
-
inverse: init(7, 27),
|
|
2576
|
-
hidden: init(8, 28),
|
|
2577
|
-
strikethrough: init(9, 29),
|
|
2578
|
-
black: init(30, 39),
|
|
2579
|
-
red: init(31, 39),
|
|
2580
|
-
green: init(32, 39),
|
|
2581
|
-
yellow: init(33, 39),
|
|
2582
|
-
blue: init(34, 39),
|
|
2583
|
-
magenta: init(35, 39),
|
|
2584
|
-
cyan: init(36, 39),
|
|
2585
|
-
white: init(37, 39),
|
|
2586
|
-
gray: init(90, 39),
|
|
2587
|
-
bgBlack: init(40, 49),
|
|
2588
|
-
bgRed: init(41, 49),
|
|
2589
|
-
bgGreen: init(42, 49),
|
|
2590
|
-
bgYellow: init(43, 49),
|
|
2591
|
-
bgBlue: init(44, 49),
|
|
2592
|
-
bgMagenta: init(45, 49),
|
|
2593
|
-
bgCyan: init(46, 49),
|
|
2594
|
-
bgWhite: init(47, 49),
|
|
2595
|
-
blackBright: init(90, 39),
|
|
2596
|
-
redBright: init(91, 39),
|
|
2597
|
-
greenBright: init(92, 39),
|
|
2598
|
-
yellowBright: init(93, 39),
|
|
2599
|
-
blueBright: init(94, 39),
|
|
2600
|
-
magentaBright: init(95, 39),
|
|
2601
|
-
cyanBright: init(96, 39),
|
|
2602
|
-
whiteBright: init(97, 39),
|
|
2603
|
-
bgBlackBright: init(100, 49),
|
|
2604
|
-
bgRedBright: init(101, 49),
|
|
2605
|
-
bgGreenBright: init(102, 49),
|
|
2606
|
-
bgYellowBright: init(103, 49),
|
|
2607
|
-
bgBlueBright: init(104, 49),
|
|
2608
|
-
bgMagentaBright: init(105, 49),
|
|
2609
|
-
bgCyanBright: init(106, 49),
|
|
2610
|
-
bgWhiteBright: init(107, 49)
|
|
2611
|
-
};
|
|
2612
|
-
function createColors(useColor = isColorSupported) {
|
|
2613
|
-
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
2614
|
-
}
|
|
2615
|
-
var colors = createColors();
|
|
2616
|
-
function getColor(color, fallback = "reset") {
|
|
2617
|
-
return colors[color] || colors[fallback];
|
|
2618
|
-
}
|
|
2619
|
-
var ansiRegex = [
|
|
2620
|
-
String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,
|
|
2621
|
-
String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`
|
|
2622
|
-
].join("|");
|
|
2623
|
-
function stripAnsi(text) {
|
|
2624
|
-
return text.replace(new RegExp(ansiRegex, "g"), "");
|
|
2625
|
-
}
|
|
2626
|
-
var boxStylePresets = {
|
|
2627
|
-
solid: {
|
|
2628
|
-
tl: "\u250C",
|
|
2629
|
-
tr: "\u2510",
|
|
2630
|
-
bl: "\u2514",
|
|
2631
|
-
br: "\u2518",
|
|
2632
|
-
h: "\u2500",
|
|
2633
|
-
v: "\u2502"
|
|
2634
|
-
},
|
|
2635
|
-
double: {
|
|
2636
|
-
tl: "\u2554",
|
|
2637
|
-
tr: "\u2557",
|
|
2638
|
-
bl: "\u255A",
|
|
2639
|
-
br: "\u255D",
|
|
2640
|
-
h: "\u2550",
|
|
2641
|
-
v: "\u2551"
|
|
2642
|
-
},
|
|
2643
|
-
doubleSingle: {
|
|
2644
|
-
tl: "\u2553",
|
|
2645
|
-
tr: "\u2556",
|
|
2646
|
-
bl: "\u2559",
|
|
2647
|
-
br: "\u255C",
|
|
2648
|
-
h: "\u2500",
|
|
2649
|
-
v: "\u2551"
|
|
2650
|
-
},
|
|
2651
|
-
doubleSingleRounded: {
|
|
2652
|
-
tl: "\u256D",
|
|
2653
|
-
tr: "\u256E",
|
|
2654
|
-
bl: "\u2570",
|
|
2655
|
-
br: "\u256F",
|
|
2656
|
-
h: "\u2500",
|
|
2657
|
-
v: "\u2551"
|
|
2658
|
-
},
|
|
2659
|
-
singleThick: {
|
|
2660
|
-
tl: "\u250F",
|
|
2661
|
-
tr: "\u2513",
|
|
2662
|
-
bl: "\u2517",
|
|
2663
|
-
br: "\u251B",
|
|
2664
|
-
h: "\u2501",
|
|
2665
|
-
v: "\u2503"
|
|
2666
|
-
},
|
|
2667
|
-
singleDouble: {
|
|
2668
|
-
tl: "\u2552",
|
|
2669
|
-
tr: "\u2555",
|
|
2670
|
-
bl: "\u2558",
|
|
2671
|
-
br: "\u255B",
|
|
2672
|
-
h: "\u2550",
|
|
2673
|
-
v: "\u2502"
|
|
2674
|
-
},
|
|
2675
|
-
singleDoubleRounded: {
|
|
2676
|
-
tl: "\u256D",
|
|
2677
|
-
tr: "\u256E",
|
|
2678
|
-
bl: "\u2570",
|
|
2679
|
-
br: "\u256F",
|
|
2680
|
-
h: "\u2550",
|
|
2681
|
-
v: "\u2502"
|
|
2682
|
-
},
|
|
2683
|
-
rounded: {
|
|
2684
|
-
tl: "\u256D",
|
|
2685
|
-
tr: "\u256E",
|
|
2686
|
-
bl: "\u2570",
|
|
2687
|
-
br: "\u256F",
|
|
2688
|
-
h: "\u2500",
|
|
2689
|
-
v: "\u2502"
|
|
2690
|
-
}
|
|
2691
|
-
};
|
|
2692
|
-
var defaultStyle = {
|
|
2693
|
-
borderColor: "white",
|
|
2694
|
-
borderStyle: "rounded",
|
|
2695
|
-
valign: "center",
|
|
2696
|
-
padding: 2,
|
|
2697
|
-
marginLeft: 1,
|
|
2698
|
-
marginTop: 1,
|
|
2699
|
-
marginBottom: 1
|
|
2700
|
-
};
|
|
2701
|
-
function box(text, _opts = {}) {
|
|
2702
|
-
const opts = {
|
|
2703
|
-
..._opts,
|
|
2704
|
-
style: {
|
|
2705
|
-
...defaultStyle,
|
|
2706
|
-
..._opts.style
|
|
2707
|
-
}
|
|
2708
|
-
};
|
|
2709
|
-
const textLines = text.split("\n");
|
|
2710
|
-
const boxLines = [];
|
|
2711
|
-
const _color = getColor(opts.style.borderColor);
|
|
2712
|
-
const borderStyle = {
|
|
2713
|
-
...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
|
|
2714
|
-
};
|
|
2715
|
-
if (_color) {
|
|
2716
|
-
for (const key in borderStyle) {
|
|
2717
|
-
borderStyle[key] = _color(
|
|
2718
|
-
borderStyle[key]
|
|
2719
|
-
);
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
2723
|
-
const height = textLines.length + paddingOffset;
|
|
2724
|
-
const width = Math.max(
|
|
2725
|
-
...textLines.map((line) => stripAnsi(line).length),
|
|
2726
|
-
opts.title ? stripAnsi(opts.title).length : 0
|
|
2727
|
-
) + paddingOffset;
|
|
2728
|
-
const widthOffset = width + paddingOffset;
|
|
2729
|
-
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
2730
|
-
if (opts.style.marginTop > 0) {
|
|
2731
|
-
boxLines.push("".repeat(opts.style.marginTop));
|
|
2732
|
-
}
|
|
2733
|
-
if (opts.title) {
|
|
2734
|
-
const title = _color ? _color(opts.title) : opts.title;
|
|
2735
|
-
const left = borderStyle.h.repeat(
|
|
2736
|
-
Math.floor((width - stripAnsi(opts.title).length) / 2)
|
|
2737
|
-
);
|
|
2738
|
-
const right = borderStyle.h.repeat(
|
|
2739
|
-
width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
|
|
2740
|
-
);
|
|
2741
|
-
boxLines.push(
|
|
2742
|
-
`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`
|
|
2743
|
-
);
|
|
2744
|
-
} else {
|
|
2745
|
-
boxLines.push(
|
|
2746
|
-
`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
|
|
2747
|
-
);
|
|
2748
|
-
}
|
|
2749
|
-
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
2750
|
-
for (let i2 = 0; i2 < height; i2++) {
|
|
2751
|
-
if (i2 < valignOffset || i2 >= valignOffset + textLines.length) {
|
|
2752
|
-
boxLines.push(
|
|
2753
|
-
`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
|
|
2754
|
-
);
|
|
2755
|
-
} else {
|
|
2756
|
-
const line = textLines[i2 - valignOffset];
|
|
2757
|
-
const left = " ".repeat(paddingOffset);
|
|
2758
|
-
const right = " ".repeat(width - stripAnsi(line).length);
|
|
2759
|
-
boxLines.push(
|
|
2760
|
-
`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
|
|
2761
|
-
);
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
boxLines.push(
|
|
2765
|
-
`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
|
|
2766
|
-
);
|
|
2767
|
-
if (opts.style.marginBottom > 0) {
|
|
2768
|
-
boxLines.push("".repeat(opts.style.marginBottom));
|
|
2769
|
-
}
|
|
2770
|
-
return boxLines.join("\n");
|
|
2771
|
-
}
|
|
2772
|
-
|
|
2773
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
2774
|
-
import "util";
|
|
2775
|
-
import "path";
|
|
2776
|
-
import "tty";
|
|
2777
|
-
var r = /* @__PURE__ */ Object.create(null);
|
|
2778
|
-
var i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r : globalThis);
|
|
2779
|
-
var o = new Proxy(r, { get(e2, s2) {
|
|
2780
|
-
return i()[s2] ?? r[s2];
|
|
2781
|
-
}, has(e2, s2) {
|
|
2782
|
-
const E2 = i();
|
|
2783
|
-
return s2 in E2 || s2 in r;
|
|
2784
|
-
}, set(e2, s2, E2) {
|
|
2785
|
-
const B2 = i(true);
|
|
2786
|
-
return B2[s2] = E2, true;
|
|
2787
|
-
}, deleteProperty(e2, s2) {
|
|
2788
|
-
if (!s2) return false;
|
|
2789
|
-
const E2 = i(true);
|
|
2790
|
-
return delete E2[s2], true;
|
|
2791
|
-
}, ownKeys() {
|
|
2792
|
-
const e2 = i(true);
|
|
2793
|
-
return Object.keys(e2);
|
|
2794
|
-
} });
|
|
2795
|
-
var t = typeof process < "u" && process.env && process.env.NODE_ENV || "";
|
|
2796
|
-
var f = [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }]];
|
|
2797
|
-
function b() {
|
|
2798
|
-
if (globalThis.process?.env) for (const e2 of f) {
|
|
2799
|
-
const s2 = e2[1] || e2[0];
|
|
2800
|
-
if (globalThis.process?.env[s2]) return { name: e2[0].toLowerCase(), ...e2[2] };
|
|
2801
|
-
}
|
|
2802
|
-
return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
|
|
2803
|
-
}
|
|
2804
|
-
var l = b();
|
|
2805
|
-
l.name;
|
|
2806
|
-
function n(e2) {
|
|
2807
|
-
return e2 ? e2 !== "false" : false;
|
|
2808
|
-
}
|
|
2809
|
-
var I = globalThis.process?.platform || "";
|
|
2810
|
-
var T = n(o.CI) || l.ci !== false;
|
|
2811
|
-
var a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);
|
|
2812
|
-
var g = n(o.DEBUG);
|
|
2813
|
-
var R = t === "test" || n(o.TEST);
|
|
2814
|
-
n(o.MINIMAL) || T || R || !a;
|
|
2815
|
-
var A = /^win/i.test(I);
|
|
2816
|
-
!n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM !== "dumb" || T);
|
|
2817
|
-
var C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
|
|
2818
|
-
Number(C?.split(".")[0]) || null;
|
|
2819
|
-
var y = globalThis.process || /* @__PURE__ */ Object.create(null);
|
|
2820
|
-
var _ = { versions: {} };
|
|
2821
|
-
new Proxy(y, { get(e2, s2) {
|
|
2822
|
-
if (s2 === "env") return o;
|
|
2823
|
-
if (s2 in e2) return e2[s2];
|
|
2824
|
-
if (s2 in _) return _[s2];
|
|
2825
|
-
} });
|
|
2826
|
-
var c = globalThis.process?.release?.name === "node";
|
|
2827
|
-
var O = !!globalThis.Bun || !!globalThis.process?.versions?.bun;
|
|
2828
|
-
var D = !!globalThis.Deno;
|
|
2829
|
-
var L = !!globalThis.fastly;
|
|
2830
|
-
var S = !!globalThis.Netlify;
|
|
2831
|
-
var u = !!globalThis.EdgeRuntime;
|
|
2832
|
-
var N = globalThis.navigator?.userAgent === "Cloudflare-Workers";
|
|
2833
|
-
var F = [[S, "netlify"], [u, "edge-light"], [N, "workerd"], [L, "fastly"], [D, "deno"], [O, "bun"], [c, "node"]];
|
|
2834
|
-
function G() {
|
|
2835
|
-
const e2 = F.find((s2) => s2[0]);
|
|
2836
|
-
if (e2) return { name: e2[1] };
|
|
2837
|
-
}
|
|
2838
|
-
var P = G();
|
|
2839
|
-
P?.name || "";
|
|
2840
|
-
function ansiRegex2({ onlyFirst = false } = {}) {
|
|
2841
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
2842
|
-
const pattern = [
|
|
2843
|
-
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
2844
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
2845
|
-
].join("|");
|
|
2846
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
2847
|
-
}
|
|
2848
|
-
var regex = ansiRegex2();
|
|
2849
|
-
function stripAnsi2(string) {
|
|
2850
|
-
if (typeof string !== "string") {
|
|
2851
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
2852
|
-
}
|
|
2853
|
-
return string.replace(regex, "");
|
|
2854
|
-
}
|
|
2855
|
-
function isAmbiguous(x2) {
|
|
2856
|
-
return x2 === 161 || x2 === 164 || x2 === 167 || x2 === 168 || x2 === 170 || x2 === 173 || x2 === 174 || x2 >= 176 && x2 <= 180 || x2 >= 182 && x2 <= 186 || x2 >= 188 && x2 <= 191 || x2 === 198 || x2 === 208 || x2 === 215 || x2 === 216 || x2 >= 222 && x2 <= 225 || x2 === 230 || x2 >= 232 && x2 <= 234 || x2 === 236 || x2 === 237 || x2 === 240 || x2 === 242 || x2 === 243 || x2 >= 247 && x2 <= 250 || x2 === 252 || x2 === 254 || x2 === 257 || x2 === 273 || x2 === 275 || x2 === 283 || x2 === 294 || x2 === 295 || x2 === 299 || x2 >= 305 && x2 <= 307 || x2 === 312 || x2 >= 319 && x2 <= 322 || x2 === 324 || x2 >= 328 && x2 <= 331 || x2 === 333 || x2 === 338 || x2 === 339 || x2 === 358 || x2 === 359 || x2 === 363 || x2 === 462 || x2 === 464 || x2 === 466 || x2 === 468 || x2 === 470 || x2 === 472 || x2 === 474 || x2 === 476 || x2 === 593 || x2 === 609 || x2 === 708 || x2 === 711 || x2 >= 713 && x2 <= 715 || x2 === 717 || x2 === 720 || x2 >= 728 && x2 <= 731 || x2 === 733 || x2 === 735 || x2 >= 768 && x2 <= 879 || x2 >= 913 && x2 <= 929 || x2 >= 931 && x2 <= 937 || x2 >= 945 && x2 <= 961 || x2 >= 963 && x2 <= 969 || x2 === 1025 || x2 >= 1040 && x2 <= 1103 || x2 === 1105 || x2 === 8208 || x2 >= 8211 && x2 <= 8214 || x2 === 8216 || x2 === 8217 || x2 === 8220 || x2 === 8221 || x2 >= 8224 && x2 <= 8226 || x2 >= 8228 && x2 <= 8231 || x2 === 8240 || x2 === 8242 || x2 === 8243 || x2 === 8245 || x2 === 8251 || x2 === 8254 || x2 === 8308 || x2 === 8319 || x2 >= 8321 && x2 <= 8324 || x2 === 8364 || x2 === 8451 || x2 === 8453 || x2 === 8457 || x2 === 8467 || x2 === 8470 || x2 === 8481 || x2 === 8482 || x2 === 8486 || x2 === 8491 || x2 === 8531 || x2 === 8532 || x2 >= 8539 && x2 <= 8542 || x2 >= 8544 && x2 <= 8555 || x2 >= 8560 && x2 <= 8569 || x2 === 8585 || x2 >= 8592 && x2 <= 8601 || x2 === 8632 || x2 === 8633 || x2 === 8658 || x2 === 8660 || x2 === 8679 || x2 === 8704 || x2 === 8706 || x2 === 8707 || x2 === 8711 || x2 === 8712 || x2 === 8715 || x2 === 8719 || x2 === 8721 || x2 === 8725 || x2 === 8730 || x2 >= 8733 && x2 <= 8736 || x2 === 8739 || x2 === 8741 || x2 >= 8743 && x2 <= 8748 || x2 === 8750 || x2 >= 8756 && x2 <= 8759 || x2 === 8764 || x2 === 8765 || x2 === 8776 || x2 === 8780 || x2 === 8786 || x2 === 8800 || x2 === 8801 || x2 >= 8804 && x2 <= 8807 || x2 === 8810 || x2 === 8811 || x2 === 8814 || x2 === 8815 || x2 === 8834 || x2 === 8835 || x2 === 8838 || x2 === 8839 || x2 === 8853 || x2 === 8857 || x2 === 8869 || x2 === 8895 || x2 === 8978 || x2 >= 9312 && x2 <= 9449 || x2 >= 9451 && x2 <= 9547 || x2 >= 9552 && x2 <= 9587 || x2 >= 9600 && x2 <= 9615 || x2 >= 9618 && x2 <= 9621 || x2 === 9632 || x2 === 9633 || x2 >= 9635 && x2 <= 9641 || x2 === 9650 || x2 === 9651 || x2 === 9654 || x2 === 9655 || x2 === 9660 || x2 === 9661 || x2 === 9664 || x2 === 9665 || x2 >= 9670 && x2 <= 9672 || x2 === 9675 || x2 >= 9678 && x2 <= 9681 || x2 >= 9698 && x2 <= 9701 || x2 === 9711 || x2 === 9733 || x2 === 9734 || x2 === 9737 || x2 === 9742 || x2 === 9743 || x2 === 9756 || x2 === 9758 || x2 === 9792 || x2 === 9794 || x2 === 9824 || x2 === 9825 || x2 >= 9827 && x2 <= 9829 || x2 >= 9831 && x2 <= 9834 || x2 === 9836 || x2 === 9837 || x2 === 9839 || x2 === 9886 || x2 === 9887 || x2 === 9919 || x2 >= 9926 && x2 <= 9933 || x2 >= 9935 && x2 <= 9939 || x2 >= 9941 && x2 <= 9953 || x2 === 9955 || x2 === 9960 || x2 === 9961 || x2 >= 9963 && x2 <= 9969 || x2 === 9972 || x2 >= 9974 && x2 <= 9977 || x2 === 9979 || x2 === 9980 || x2 === 9982 || x2 === 9983 || x2 === 10045 || x2 >= 10102 && x2 <= 10111 || x2 >= 11094 && x2 <= 11097 || x2 >= 12872 && x2 <= 12879 || x2 >= 57344 && x2 <= 63743 || x2 >= 65024 && x2 <= 65039 || x2 === 65533 || x2 >= 127232 && x2 <= 127242 || x2 >= 127248 && x2 <= 127277 || x2 >= 127280 && x2 <= 127337 || x2 >= 127344 && x2 <= 127373 || x2 === 127375 || x2 === 127376 || x2 >= 127387 && x2 <= 127404 || x2 >= 917760 && x2 <= 917999 || x2 >= 983040 && x2 <= 1048573 || x2 >= 1048576 && x2 <= 1114109;
|
|
2857
|
-
}
|
|
2858
|
-
function isFullWidth(x2) {
|
|
2859
|
-
return x2 === 12288 || x2 >= 65281 && x2 <= 65376 || x2 >= 65504 && x2 <= 65510;
|
|
2860
|
-
}
|
|
2861
|
-
function isWide(x2) {
|
|
2862
|
-
return x2 >= 4352 && x2 <= 4447 || x2 === 8986 || x2 === 8987 || x2 === 9001 || x2 === 9002 || x2 >= 9193 && x2 <= 9196 || x2 === 9200 || x2 === 9203 || x2 === 9725 || x2 === 9726 || x2 === 9748 || x2 === 9749 || x2 >= 9776 && x2 <= 9783 || x2 >= 9800 && x2 <= 9811 || x2 === 9855 || x2 >= 9866 && x2 <= 9871 || x2 === 9875 || x2 === 9889 || x2 === 9898 || x2 === 9899 || x2 === 9917 || x2 === 9918 || x2 === 9924 || x2 === 9925 || x2 === 9934 || x2 === 9940 || x2 === 9962 || x2 === 9970 || x2 === 9971 || x2 === 9973 || x2 === 9978 || x2 === 9981 || x2 === 9989 || x2 === 9994 || x2 === 9995 || x2 === 10024 || x2 === 10060 || x2 === 10062 || x2 >= 10067 && x2 <= 10069 || x2 === 10071 || x2 >= 10133 && x2 <= 10135 || x2 === 10160 || x2 === 10175 || x2 === 11035 || x2 === 11036 || x2 === 11088 || x2 === 11093 || x2 >= 11904 && x2 <= 11929 || x2 >= 11931 && x2 <= 12019 || x2 >= 12032 && x2 <= 12245 || x2 >= 12272 && x2 <= 12287 || x2 >= 12289 && x2 <= 12350 || x2 >= 12353 && x2 <= 12438 || x2 >= 12441 && x2 <= 12543 || x2 >= 12549 && x2 <= 12591 || x2 >= 12593 && x2 <= 12686 || x2 >= 12688 && x2 <= 12773 || x2 >= 12783 && x2 <= 12830 || x2 >= 12832 && x2 <= 12871 || x2 >= 12880 && x2 <= 42124 || x2 >= 42128 && x2 <= 42182 || x2 >= 43360 && x2 <= 43388 || x2 >= 44032 && x2 <= 55203 || x2 >= 63744 && x2 <= 64255 || x2 >= 65040 && x2 <= 65049 || x2 >= 65072 && x2 <= 65106 || x2 >= 65108 && x2 <= 65126 || x2 >= 65128 && x2 <= 65131 || x2 >= 94176 && x2 <= 94180 || x2 === 94192 || x2 === 94193 || x2 >= 94208 && x2 <= 100343 || x2 >= 100352 && x2 <= 101589 || x2 >= 101631 && x2 <= 101640 || x2 >= 110576 && x2 <= 110579 || x2 >= 110581 && x2 <= 110587 || x2 === 110589 || x2 === 110590 || x2 >= 110592 && x2 <= 110882 || x2 === 110898 || x2 >= 110928 && x2 <= 110930 || x2 === 110933 || x2 >= 110948 && x2 <= 110951 || x2 >= 110960 && x2 <= 111355 || x2 >= 119552 && x2 <= 119638 || x2 >= 119648 && x2 <= 119670 || x2 === 126980 || x2 === 127183 || x2 === 127374 || x2 >= 127377 && x2 <= 127386 || x2 >= 127488 && x2 <= 127490 || x2 >= 127504 && x2 <= 127547 || x2 >= 127552 && x2 <= 127560 || x2 === 127568 || x2 === 127569 || x2 >= 127584 && x2 <= 127589 || x2 >= 127744 && x2 <= 127776 || x2 >= 127789 && x2 <= 127797 || x2 >= 127799 && x2 <= 127868 || x2 >= 127870 && x2 <= 127891 || x2 >= 127904 && x2 <= 127946 || x2 >= 127951 && x2 <= 127955 || x2 >= 127968 && x2 <= 127984 || x2 === 127988 || x2 >= 127992 && x2 <= 128062 || x2 === 128064 || x2 >= 128066 && x2 <= 128252 || x2 >= 128255 && x2 <= 128317 || x2 >= 128331 && x2 <= 128334 || x2 >= 128336 && x2 <= 128359 || x2 === 128378 || x2 === 128405 || x2 === 128406 || x2 === 128420 || x2 >= 128507 && x2 <= 128591 || x2 >= 128640 && x2 <= 128709 || x2 === 128716 || x2 >= 128720 && x2 <= 128722 || x2 >= 128725 && x2 <= 128727 || x2 >= 128732 && x2 <= 128735 || x2 === 128747 || x2 === 128748 || x2 >= 128756 && x2 <= 128764 || x2 >= 128992 && x2 <= 129003 || x2 === 129008 || x2 >= 129292 && x2 <= 129338 || x2 >= 129340 && x2 <= 129349 || x2 >= 129351 && x2 <= 129535 || x2 >= 129648 && x2 <= 129660 || x2 >= 129664 && x2 <= 129673 || x2 >= 129679 && x2 <= 129734 || x2 >= 129742 && x2 <= 129756 || x2 >= 129759 && x2 <= 129769 || x2 >= 129776 && x2 <= 129784 || x2 >= 131072 && x2 <= 196605 || x2 >= 196608 && x2 <= 262141;
|
|
2863
|
-
}
|
|
2864
|
-
function validate(codePoint) {
|
|
2865
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
2866
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
2870
|
-
validate(codePoint);
|
|
2871
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
2872
|
-
return 2;
|
|
2873
|
-
}
|
|
2874
|
-
return 1;
|
|
2875
|
-
}
|
|
2876
|
-
var emojiRegex = () => {
|
|
2877
|
-
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;
|
|
2878
|
-
};
|
|
2879
|
-
var segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split("") };
|
|
2880
|
-
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
2881
|
-
function stringWidth$1(string, options = {}) {
|
|
2882
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
2883
|
-
return 0;
|
|
2884
|
-
}
|
|
2885
|
-
const {
|
|
2886
|
-
ambiguousIsNarrow = true,
|
|
2887
|
-
countAnsiEscapeCodes = false
|
|
2888
|
-
} = options;
|
|
2889
|
-
if (!countAnsiEscapeCodes) {
|
|
2890
|
-
string = stripAnsi2(string);
|
|
2891
|
-
}
|
|
2892
|
-
if (string.length === 0) {
|
|
2893
|
-
return 0;
|
|
2894
|
-
}
|
|
2895
|
-
let width = 0;
|
|
2896
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
2897
|
-
for (const { segment: character } of segmenter.segment(string)) {
|
|
2898
|
-
const codePoint = character.codePointAt(0);
|
|
2899
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
2900
|
-
continue;
|
|
2901
|
-
}
|
|
2902
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
2903
|
-
continue;
|
|
2904
|
-
}
|
|
2905
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
2906
|
-
continue;
|
|
2907
|
-
}
|
|
2908
|
-
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
2909
|
-
continue;
|
|
2910
|
-
}
|
|
2911
|
-
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
2912
|
-
continue;
|
|
2913
|
-
}
|
|
2914
|
-
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
2915
|
-
continue;
|
|
2916
|
-
}
|
|
2917
|
-
if (emojiRegex().test(character)) {
|
|
2918
|
-
width += 2;
|
|
2919
|
-
continue;
|
|
2920
|
-
}
|
|
2921
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
2922
|
-
}
|
|
2923
|
-
return width;
|
|
2924
|
-
}
|
|
2925
|
-
function isUnicodeSupported() {
|
|
2926
|
-
const { env: env2 } = g$1;
|
|
2927
|
-
const { TERM, TERM_PROGRAM } = env2;
|
|
2928
|
-
if (g$1.platform !== "win32") {
|
|
2929
|
-
return TERM !== "linux";
|
|
2930
|
-
}
|
|
2931
|
-
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2932
|
-
}
|
|
2933
|
-
var TYPE_COLOR_MAP = {
|
|
2934
|
-
info: "cyan",
|
|
2935
|
-
fail: "red",
|
|
2936
|
-
success: "green",
|
|
2937
|
-
ready: "green",
|
|
2938
|
-
start: "magenta"
|
|
2939
|
-
};
|
|
2940
|
-
var LEVEL_COLOR_MAP = {
|
|
2941
|
-
0: "red",
|
|
2942
|
-
1: "yellow"
|
|
2943
|
-
};
|
|
2944
|
-
var unicode = isUnicodeSupported();
|
|
2945
|
-
var s = (c3, fallback) => unicode ? c3 : fallback;
|
|
2946
|
-
var TYPE_ICONS = {
|
|
2947
|
-
error: s("\u2716", "\xD7"),
|
|
2948
|
-
fatal: s("\u2716", "\xD7"),
|
|
2949
|
-
ready: s("\u2714", "\u221A"),
|
|
2950
|
-
warn: s("\u26A0", "\u203C"),
|
|
2951
|
-
info: s("\u2139", "i"),
|
|
2952
|
-
success: s("\u2714", "\u221A"),
|
|
2953
|
-
debug: s("\u2699", "D"),
|
|
2954
|
-
trace: s("\u2192", "\u2192"),
|
|
2955
|
-
fail: s("\u2716", "\xD7"),
|
|
2956
|
-
start: s("\u25D0", "o"),
|
|
2957
|
-
log: ""
|
|
2958
|
-
};
|
|
2959
|
-
function stringWidth(str) {
|
|
2960
|
-
const hasICU = typeof Intl === "object";
|
|
2961
|
-
if (!hasICU || !Intl.Segmenter) {
|
|
2962
|
-
return stripAnsi(str).length;
|
|
2963
|
-
}
|
|
2964
|
-
return stringWidth$1(str);
|
|
2965
|
-
}
|
|
2966
|
-
var FancyReporter = class extends BasicReporter {
|
|
2967
|
-
formatStack(stack, message, opts) {
|
|
2968
|
-
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2969
|
-
return `
|
|
2970
|
-
${indent}` + parseStack(stack, message).map(
|
|
2971
|
-
(line) => " " + line.replace(/^at +/, (m4) => colors.gray(m4)).replace(/\((.+)\)/, (_4, m4) => `(${colors.cyan(m4)})`)
|
|
2972
|
-
).join(`
|
|
2973
|
-
${indent}`);
|
|
2974
|
-
}
|
|
2975
|
-
formatType(logObj, isBadge, opts) {
|
|
2976
|
-
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
2977
|
-
if (isBadge) {
|
|
2978
|
-
return getBgColor(typeColor)(
|
|
2979
|
-
colors.black(` ${logObj.type.toUpperCase()} `)
|
|
2980
|
-
);
|
|
2981
|
-
}
|
|
2982
|
-
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
2983
|
-
return _type ? getColor2(typeColor)(_type) : "";
|
|
2984
|
-
}
|
|
2985
|
-
formatLogObj(logObj, opts) {
|
|
2986
|
-
const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
|
|
2987
|
-
"\n"
|
|
2988
|
-
);
|
|
2989
|
-
if (logObj.type === "box") {
|
|
2990
|
-
return box(
|
|
2991
|
-
characterFormat(
|
|
2992
|
-
message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
|
|
2993
|
-
),
|
|
2994
|
-
{
|
|
2995
|
-
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
2996
|
-
style: logObj.style
|
|
2997
|
-
}
|
|
2998
|
-
);
|
|
2999
|
-
}
|
|
3000
|
-
const date = this.formatDate(logObj.date, opts);
|
|
3001
|
-
const coloredDate = date && colors.gray(date);
|
|
3002
|
-
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
3003
|
-
const type = this.formatType(logObj, isBadge, opts);
|
|
3004
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
3005
|
-
let line;
|
|
3006
|
-
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
3007
|
-
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
3008
|
-
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
3009
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
3010
|
-
line += characterFormat(
|
|
3011
|
-
additional.length > 0 ? "\n" + additional.join("\n") : ""
|
|
3012
|
-
);
|
|
3013
|
-
if (logObj.type === "trace") {
|
|
3014
|
-
const _err = new Error("Trace: " + logObj.message);
|
|
3015
|
-
line += this.formatStack(_err.stack || "", _err.message);
|
|
3016
|
-
}
|
|
3017
|
-
return isBadge ? "\n" + line + "\n" : line;
|
|
3018
|
-
}
|
|
3019
|
-
};
|
|
3020
|
-
function characterFormat(str) {
|
|
3021
|
-
return str.replace(/`([^`]+)`/gm, (_4, m4) => colors.cyan(m4)).replace(/\s+_([^_]+)_\s+/gm, (_4, m4) => ` ${colors.underline(m4)} `);
|
|
3022
|
-
}
|
|
3023
|
-
function getColor2(color = "white") {
|
|
3024
|
-
return colors[color] || colors.white;
|
|
3025
|
-
}
|
|
3026
|
-
function getBgColor(color = "bgWhite") {
|
|
3027
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
3028
|
-
}
|
|
3029
|
-
function createConsola2(options = {}) {
|
|
3030
|
-
let level = _getDefaultLogLevel();
|
|
3031
|
-
if (process.env.CONSOLA_LEVEL) {
|
|
3032
|
-
level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
3033
|
-
}
|
|
3034
|
-
const consola2 = createConsola({
|
|
3035
|
-
level,
|
|
3036
|
-
defaults: { level },
|
|
3037
|
-
stdout: process.stdout,
|
|
3038
|
-
stderr: process.stderr,
|
|
3039
|
-
prompt: (...args) => import("./prompt-XYKYOJRA.js").then((m4) => m4.prompt(...args)),
|
|
3040
|
-
reporters: options.reporters || [
|
|
3041
|
-
options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()
|
|
3042
|
-
],
|
|
3043
|
-
...options
|
|
3044
|
-
});
|
|
3045
|
-
return consola2;
|
|
3046
|
-
}
|
|
3047
|
-
function _getDefaultLogLevel() {
|
|
3048
|
-
if (g) {
|
|
3049
|
-
return LogLevels.debug;
|
|
3050
|
-
}
|
|
3051
|
-
if (R) {
|
|
3052
|
-
return LogLevels.warn;
|
|
3053
|
-
}
|
|
3054
|
-
return LogLevels.info;
|
|
3055
|
-
}
|
|
3056
|
-
var consola = createConsola2();
|
|
3057
|
-
|
|
3058
|
-
// ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/utils.mjs
|
|
3059
|
-
import "tty";
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { defineCommand as defineCommand7, runMain } from "citty";
|
|
3060
5
|
|
|
3061
|
-
//
|
|
3062
|
-
|
|
3063
|
-
if (Array.isArray(val)) {
|
|
3064
|
-
return val;
|
|
3065
|
-
}
|
|
3066
|
-
return val === void 0 ? [] : [val];
|
|
3067
|
-
}
|
|
3068
|
-
function formatLineColumns(lines, linePrefix = "") {
|
|
3069
|
-
const maxLengh = [];
|
|
3070
|
-
for (const line of lines) {
|
|
3071
|
-
for (const [i2, element] of line.entries()) {
|
|
3072
|
-
maxLengh[i2] = Math.max(maxLengh[i2] || 0, element.length);
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
return lines.map(
|
|
3076
|
-
(l3) => l3.map(
|
|
3077
|
-
(c3, i2) => linePrefix + c3[i2 === 0 ? "padStart" : "padEnd"](maxLengh[i2])
|
|
3078
|
-
).join(" ")
|
|
3079
|
-
).join("\n");
|
|
3080
|
-
}
|
|
3081
|
-
function resolveValue(input) {
|
|
3082
|
-
return typeof input === "function" ? input() : input;
|
|
3083
|
-
}
|
|
3084
|
-
var CLIError = class extends Error {
|
|
3085
|
-
constructor(message, code) {
|
|
3086
|
-
super(message);
|
|
3087
|
-
this.code = code;
|
|
3088
|
-
this.name = "CLIError";
|
|
3089
|
-
}
|
|
3090
|
-
};
|
|
3091
|
-
var NUMBER_CHAR_RE = /\d/;
|
|
3092
|
-
var STR_SPLITTERS = ["-", "_", "/", "."];
|
|
3093
|
-
function isUppercase(char = "") {
|
|
3094
|
-
if (NUMBER_CHAR_RE.test(char)) {
|
|
3095
|
-
return void 0;
|
|
3096
|
-
}
|
|
3097
|
-
return char !== char.toLowerCase();
|
|
3098
|
-
}
|
|
3099
|
-
function splitByCase(str, separators) {
|
|
3100
|
-
const splitters = separators ?? STR_SPLITTERS;
|
|
3101
|
-
const parts = [];
|
|
3102
|
-
if (!str || typeof str !== "string") {
|
|
3103
|
-
return parts;
|
|
3104
|
-
}
|
|
3105
|
-
let buff = "";
|
|
3106
|
-
let previousUpper;
|
|
3107
|
-
let previousSplitter;
|
|
3108
|
-
for (const char of str) {
|
|
3109
|
-
const isSplitter = splitters.includes(char);
|
|
3110
|
-
if (isSplitter === true) {
|
|
3111
|
-
parts.push(buff);
|
|
3112
|
-
buff = "";
|
|
3113
|
-
previousUpper = void 0;
|
|
3114
|
-
continue;
|
|
3115
|
-
}
|
|
3116
|
-
const isUpper = isUppercase(char);
|
|
3117
|
-
if (previousSplitter === false) {
|
|
3118
|
-
if (previousUpper === false && isUpper === true) {
|
|
3119
|
-
parts.push(buff);
|
|
3120
|
-
buff = char;
|
|
3121
|
-
previousUpper = isUpper;
|
|
3122
|
-
continue;
|
|
3123
|
-
}
|
|
3124
|
-
if (previousUpper === true && isUpper === false && buff.length > 1) {
|
|
3125
|
-
const lastChar = buff.at(-1);
|
|
3126
|
-
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
|
|
3127
|
-
buff = lastChar + char;
|
|
3128
|
-
previousUpper = isUpper;
|
|
3129
|
-
continue;
|
|
3130
|
-
}
|
|
3131
|
-
}
|
|
3132
|
-
buff += char;
|
|
3133
|
-
previousUpper = isUpper;
|
|
3134
|
-
previousSplitter = isSplitter;
|
|
3135
|
-
}
|
|
3136
|
-
parts.push(buff);
|
|
3137
|
-
return parts;
|
|
3138
|
-
}
|
|
3139
|
-
function upperFirst(str) {
|
|
3140
|
-
return str ? str[0].toUpperCase() + str.slice(1) : "";
|
|
3141
|
-
}
|
|
3142
|
-
function lowerFirst(str) {
|
|
3143
|
-
return str ? str[0].toLowerCase() + str.slice(1) : "";
|
|
3144
|
-
}
|
|
3145
|
-
function pascalCase(str, opts) {
|
|
3146
|
-
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p3) => upperFirst(opts?.normalize ? p3.toLowerCase() : p3)).join("") : "";
|
|
3147
|
-
}
|
|
3148
|
-
function camelCase(str, opts) {
|
|
3149
|
-
return lowerFirst(pascalCase(str || "", opts));
|
|
3150
|
-
}
|
|
3151
|
-
function kebabCase(str, joiner) {
|
|
3152
|
-
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p3) => p3.toLowerCase()).join(joiner ?? "-") : "";
|
|
3153
|
-
}
|
|
3154
|
-
function toArr(any) {
|
|
3155
|
-
return any == void 0 ? [] : Array.isArray(any) ? any : [any];
|
|
3156
|
-
}
|
|
3157
|
-
function toVal(out, key, val, opts) {
|
|
3158
|
-
let x2;
|
|
3159
|
-
const old = out[key];
|
|
3160
|
-
const nxt = ~opts.string.indexOf(key) ? val == void 0 || val === true ? "" : String(val) : typeof val === "boolean" ? val : ~opts.boolean.indexOf(key) ? val === "false" ? false : val === "true" || (out._.push((x2 = +val, x2 * 0 === 0) ? x2 : val), !!val) : (x2 = +val, x2 * 0 === 0) ? x2 : val;
|
|
3161
|
-
out[key] = old == void 0 ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];
|
|
3162
|
-
}
|
|
3163
|
-
function parseRawArgs(args = [], opts = {}) {
|
|
3164
|
-
let k3;
|
|
3165
|
-
let arr;
|
|
3166
|
-
let arg;
|
|
3167
|
-
let name;
|
|
3168
|
-
let val;
|
|
3169
|
-
const out = { _: [] };
|
|
3170
|
-
let i2 = 0;
|
|
3171
|
-
let j3 = 0;
|
|
3172
|
-
let idx = 0;
|
|
3173
|
-
const len = args.length;
|
|
3174
|
-
const alibi = opts.alias !== void 0;
|
|
3175
|
-
const strict = opts.unknown !== void 0;
|
|
3176
|
-
const defaults = opts.default !== void 0;
|
|
3177
|
-
opts.alias = opts.alias || {};
|
|
3178
|
-
opts.string = toArr(opts.string);
|
|
3179
|
-
opts.boolean = toArr(opts.boolean);
|
|
3180
|
-
if (alibi) {
|
|
3181
|
-
for (k3 in opts.alias) {
|
|
3182
|
-
arr = opts.alias[k3] = toArr(opts.alias[k3]);
|
|
3183
|
-
for (i2 = 0; i2 < arr.length; i2++) {
|
|
3184
|
-
(opts.alias[arr[i2]] = arr.concat(k3)).splice(i2, 1);
|
|
3185
|
-
}
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
for (i2 = opts.boolean.length; i2-- > 0; ) {
|
|
3189
|
-
arr = opts.alias[opts.boolean[i2]] || [];
|
|
3190
|
-
for (j3 = arr.length; j3-- > 0; ) {
|
|
3191
|
-
opts.boolean.push(arr[j3]);
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
for (i2 = opts.string.length; i2-- > 0; ) {
|
|
3195
|
-
arr = opts.alias[opts.string[i2]] || [];
|
|
3196
|
-
for (j3 = arr.length; j3-- > 0; ) {
|
|
3197
|
-
opts.string.push(arr[j3]);
|
|
3198
|
-
}
|
|
3199
|
-
}
|
|
3200
|
-
if (defaults) {
|
|
3201
|
-
for (k3 in opts.default) {
|
|
3202
|
-
name = typeof opts.default[k3];
|
|
3203
|
-
arr = opts.alias[k3] = opts.alias[k3] || [];
|
|
3204
|
-
if (opts[name] !== void 0) {
|
|
3205
|
-
opts[name].push(k3);
|
|
3206
|
-
for (i2 = 0; i2 < arr.length; i2++) {
|
|
3207
|
-
opts[name].push(arr[i2]);
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
}
|
|
3212
|
-
const keys = strict ? Object.keys(opts.alias) : [];
|
|
3213
|
-
for (i2 = 0; i2 < len; i2++) {
|
|
3214
|
-
arg = args[i2];
|
|
3215
|
-
if (arg === "--") {
|
|
3216
|
-
out._ = out._.concat(args.slice(++i2));
|
|
3217
|
-
break;
|
|
3218
|
-
}
|
|
3219
|
-
for (j3 = 0; j3 < arg.length; j3++) {
|
|
3220
|
-
if (arg.charCodeAt(j3) !== 45) {
|
|
3221
|
-
break;
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
if (j3 === 0) {
|
|
3225
|
-
out._.push(arg);
|
|
3226
|
-
} else if (arg.substring(j3, j3 + 3) === "no-") {
|
|
3227
|
-
name = arg.slice(Math.max(0, j3 + 3));
|
|
3228
|
-
if (strict && !~keys.indexOf(name)) {
|
|
3229
|
-
return opts.unknown(arg);
|
|
3230
|
-
}
|
|
3231
|
-
out[name] = false;
|
|
3232
|
-
} else {
|
|
3233
|
-
for (idx = j3 + 1; idx < arg.length; idx++) {
|
|
3234
|
-
if (arg.charCodeAt(idx) === 61) {
|
|
3235
|
-
break;
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
name = arg.substring(j3, idx);
|
|
3239
|
-
val = arg.slice(Math.max(0, ++idx)) || i2 + 1 === len || ("" + args[i2 + 1]).charCodeAt(0) === 45 || args[++i2];
|
|
3240
|
-
arr = j3 === 2 ? [name] : name;
|
|
3241
|
-
for (idx = 0; idx < arr.length; idx++) {
|
|
3242
|
-
name = arr[idx];
|
|
3243
|
-
if (strict && !~keys.indexOf(name)) {
|
|
3244
|
-
return opts.unknown("-".repeat(j3) + name);
|
|
3245
|
-
}
|
|
3246
|
-
toVal(out, name, idx + 1 < arr.length || val, opts);
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
}
|
|
3250
|
-
if (defaults) {
|
|
3251
|
-
for (k3 in opts.default) {
|
|
3252
|
-
if (out[k3] === void 0) {
|
|
3253
|
-
out[k3] = opts.default[k3];
|
|
3254
|
-
}
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
if (alibi) {
|
|
3258
|
-
for (k3 in out) {
|
|
3259
|
-
arr = opts.alias[k3] || [];
|
|
3260
|
-
while (arr.length > 0) {
|
|
3261
|
-
out[arr.shift()] = out[k3];
|
|
3262
|
-
}
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
return out;
|
|
3266
|
-
}
|
|
3267
|
-
function parseArgs(rawArgs, argsDef) {
|
|
3268
|
-
const parseOptions = {
|
|
3269
|
-
boolean: [],
|
|
3270
|
-
string: [],
|
|
3271
|
-
mixed: [],
|
|
3272
|
-
alias: {},
|
|
3273
|
-
default: {}
|
|
3274
|
-
};
|
|
3275
|
-
const args = resolveArgs(argsDef);
|
|
3276
|
-
for (const arg of args) {
|
|
3277
|
-
if (arg.type === "positional") {
|
|
3278
|
-
continue;
|
|
3279
|
-
}
|
|
3280
|
-
if (arg.type === "string") {
|
|
3281
|
-
parseOptions.string.push(arg.name);
|
|
3282
|
-
} else if (arg.type === "boolean") {
|
|
3283
|
-
parseOptions.boolean.push(arg.name);
|
|
3284
|
-
}
|
|
3285
|
-
if (arg.default !== void 0) {
|
|
3286
|
-
parseOptions.default[arg.name] = arg.default;
|
|
3287
|
-
}
|
|
3288
|
-
if (arg.alias) {
|
|
3289
|
-
parseOptions.alias[arg.name] = arg.alias;
|
|
3290
|
-
}
|
|
3291
|
-
}
|
|
3292
|
-
const parsed = parseRawArgs(rawArgs, parseOptions);
|
|
3293
|
-
const [...positionalArguments] = parsed._;
|
|
3294
|
-
const parsedArgsProxy = new Proxy(parsed, {
|
|
3295
|
-
get(target, prop) {
|
|
3296
|
-
return target[prop] ?? target[camelCase(prop)] ?? target[kebabCase(prop)];
|
|
3297
|
-
}
|
|
3298
|
-
});
|
|
3299
|
-
for (const [, arg] of args.entries()) {
|
|
3300
|
-
if (arg.type === "positional") {
|
|
3301
|
-
const nextPositionalArgument = positionalArguments.shift();
|
|
3302
|
-
if (nextPositionalArgument !== void 0) {
|
|
3303
|
-
parsedArgsProxy[arg.name] = nextPositionalArgument;
|
|
3304
|
-
} else if (arg.default === void 0 && arg.required !== false) {
|
|
3305
|
-
throw new CLIError(
|
|
3306
|
-
`Missing required positional argument: ${arg.name.toUpperCase()}`,
|
|
3307
|
-
"EARG"
|
|
3308
|
-
);
|
|
3309
|
-
} else {
|
|
3310
|
-
parsedArgsProxy[arg.name] = arg.default;
|
|
3311
|
-
}
|
|
3312
|
-
} else if (arg.required && parsedArgsProxy[arg.name] === void 0) {
|
|
3313
|
-
throw new CLIError(`Missing required argument: --${arg.name}`, "EARG");
|
|
3314
|
-
}
|
|
3315
|
-
}
|
|
3316
|
-
return parsedArgsProxy;
|
|
3317
|
-
}
|
|
3318
|
-
function resolveArgs(argsDef) {
|
|
3319
|
-
const args = [];
|
|
3320
|
-
for (const [name, argDef] of Object.entries(argsDef || {})) {
|
|
3321
|
-
args.push({
|
|
3322
|
-
...argDef,
|
|
3323
|
-
name,
|
|
3324
|
-
alias: toArray(argDef.alias)
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
3327
|
-
return args;
|
|
3328
|
-
}
|
|
3329
|
-
function defineCommand(def) {
|
|
3330
|
-
return def;
|
|
3331
|
-
}
|
|
3332
|
-
async function runCommand(cmd, opts) {
|
|
3333
|
-
const cmdArgs = await resolveValue(cmd.args || {});
|
|
3334
|
-
const parsedArgs = parseArgs(opts.rawArgs, cmdArgs);
|
|
3335
|
-
const context = {
|
|
3336
|
-
rawArgs: opts.rawArgs,
|
|
3337
|
-
args: parsedArgs,
|
|
3338
|
-
data: opts.data,
|
|
3339
|
-
cmd
|
|
3340
|
-
};
|
|
3341
|
-
if (typeof cmd.setup === "function") {
|
|
3342
|
-
await cmd.setup(context);
|
|
3343
|
-
}
|
|
3344
|
-
let result;
|
|
3345
|
-
try {
|
|
3346
|
-
const subCommands = await resolveValue(cmd.subCommands);
|
|
3347
|
-
if (subCommands && Object.keys(subCommands).length > 0) {
|
|
3348
|
-
const subCommandArgIndex = opts.rawArgs.findIndex(
|
|
3349
|
-
(arg) => !arg.startsWith("-")
|
|
3350
|
-
);
|
|
3351
|
-
const subCommandName = opts.rawArgs[subCommandArgIndex];
|
|
3352
|
-
if (subCommandName) {
|
|
3353
|
-
if (!subCommands[subCommandName]) {
|
|
3354
|
-
throw new CLIError(
|
|
3355
|
-
`Unknown command \`${subCommandName}\``,
|
|
3356
|
-
"E_UNKNOWN_COMMAND"
|
|
3357
|
-
);
|
|
3358
|
-
}
|
|
3359
|
-
const subCommand = await resolveValue(subCommands[subCommandName]);
|
|
3360
|
-
if (subCommand) {
|
|
3361
|
-
await runCommand(subCommand, {
|
|
3362
|
-
rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1)
|
|
3363
|
-
});
|
|
3364
|
-
}
|
|
3365
|
-
} else if (!cmd.run) {
|
|
3366
|
-
throw new CLIError(`No command specified.`, "E_NO_COMMAND");
|
|
3367
|
-
}
|
|
3368
|
-
}
|
|
3369
|
-
if (typeof cmd.run === "function") {
|
|
3370
|
-
result = await cmd.run(context);
|
|
3371
|
-
}
|
|
3372
|
-
} finally {
|
|
3373
|
-
if (typeof cmd.cleanup === "function") {
|
|
3374
|
-
await cmd.cleanup(context);
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
return { result };
|
|
3378
|
-
}
|
|
3379
|
-
async function resolveSubCommand(cmd, rawArgs, parent) {
|
|
3380
|
-
const subCommands = await resolveValue(cmd.subCommands);
|
|
3381
|
-
if (subCommands && Object.keys(subCommands).length > 0) {
|
|
3382
|
-
const subCommandArgIndex = rawArgs.findIndex((arg) => !arg.startsWith("-"));
|
|
3383
|
-
const subCommandName = rawArgs[subCommandArgIndex];
|
|
3384
|
-
const subCommand = await resolveValue(subCommands[subCommandName]);
|
|
3385
|
-
if (subCommand) {
|
|
3386
|
-
return resolveSubCommand(
|
|
3387
|
-
subCommand,
|
|
3388
|
-
rawArgs.slice(subCommandArgIndex + 1),
|
|
3389
|
-
cmd
|
|
3390
|
-
);
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
return [cmd, parent];
|
|
3394
|
-
}
|
|
3395
|
-
async function showUsage(cmd, parent) {
|
|
3396
|
-
try {
|
|
3397
|
-
consola.log(await renderUsage(cmd, parent) + "\n");
|
|
3398
|
-
} catch (error) {
|
|
3399
|
-
consola.error(error);
|
|
3400
|
-
}
|
|
3401
|
-
}
|
|
3402
|
-
async function renderUsage(cmd, parent) {
|
|
3403
|
-
const cmdMeta = await resolveValue(cmd.meta || {});
|
|
3404
|
-
const cmdArgs = resolveArgs(await resolveValue(cmd.args || {}));
|
|
3405
|
-
const parentMeta = await resolveValue(parent?.meta || {});
|
|
3406
|
-
const commandName = `${parentMeta.name ? `${parentMeta.name} ` : ""}` + (cmdMeta.name || process.argv[1]);
|
|
3407
|
-
const argLines = [];
|
|
3408
|
-
const posLines = [];
|
|
3409
|
-
const commandsLines = [];
|
|
3410
|
-
const usageLine = [];
|
|
3411
|
-
for (const arg of cmdArgs) {
|
|
3412
|
-
if (arg.type === "positional") {
|
|
3413
|
-
const name = arg.name.toUpperCase();
|
|
3414
|
-
const isRequired = arg.required !== false && arg.default === void 0;
|
|
3415
|
-
const defaultHint = arg.default ? `="${arg.default}"` : "";
|
|
3416
|
-
posLines.push([
|
|
3417
|
-
"`" + name + defaultHint + "`",
|
|
3418
|
-
arg.description || "",
|
|
3419
|
-
arg.valueHint ? `<${arg.valueHint}>` : ""
|
|
3420
|
-
]);
|
|
3421
|
-
usageLine.push(isRequired ? `<${name}>` : `[${name}]`);
|
|
3422
|
-
} else {
|
|
3423
|
-
const isRequired = arg.required === true && arg.default === void 0;
|
|
3424
|
-
const argStr = (arg.type === "boolean" && arg.default === true ? [
|
|
3425
|
-
...(arg.alias || []).map((a3) => `--no-${a3}`),
|
|
3426
|
-
`--no-${arg.name}`
|
|
3427
|
-
].join(", ") : [...(arg.alias || []).map((a3) => `-${a3}`), `--${arg.name}`].join(
|
|
3428
|
-
", "
|
|
3429
|
-
)) + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : "");
|
|
3430
|
-
argLines.push([
|
|
3431
|
-
"`" + argStr + (isRequired ? " (required)" : "") + "`",
|
|
3432
|
-
arg.description || ""
|
|
3433
|
-
]);
|
|
3434
|
-
if (isRequired) {
|
|
3435
|
-
usageLine.push(argStr);
|
|
3436
|
-
}
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
if (cmd.subCommands) {
|
|
3440
|
-
const commandNames = [];
|
|
3441
|
-
const subCommands = await resolveValue(cmd.subCommands);
|
|
3442
|
-
for (const [name, sub] of Object.entries(subCommands)) {
|
|
3443
|
-
const subCmd = await resolveValue(sub);
|
|
3444
|
-
const meta = await resolveValue(subCmd?.meta);
|
|
3445
|
-
commandsLines.push([`\`${name}\``, meta?.description || ""]);
|
|
3446
|
-
commandNames.push(name);
|
|
3447
|
-
}
|
|
3448
|
-
usageLine.push(commandNames.join("|"));
|
|
3449
|
-
}
|
|
3450
|
-
const usageLines = [];
|
|
3451
|
-
const version = cmdMeta.version || parentMeta.version;
|
|
3452
|
-
usageLines.push(
|
|
3453
|
-
colors.gray(
|
|
3454
|
-
`${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})`
|
|
3455
|
-
),
|
|
3456
|
-
""
|
|
3457
|
-
);
|
|
3458
|
-
const hasOptions = argLines.length > 0 || posLines.length > 0;
|
|
3459
|
-
usageLines.push(
|
|
3460
|
-
`${colors.underline(colors.bold("USAGE"))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(" ")}\``,
|
|
3461
|
-
""
|
|
3462
|
-
);
|
|
3463
|
-
if (posLines.length > 0) {
|
|
3464
|
-
usageLines.push(colors.underline(colors.bold("ARGUMENTS")), "");
|
|
3465
|
-
usageLines.push(formatLineColumns(posLines, " "));
|
|
3466
|
-
usageLines.push("");
|
|
3467
|
-
}
|
|
3468
|
-
if (argLines.length > 0) {
|
|
3469
|
-
usageLines.push(colors.underline(colors.bold("OPTIONS")), "");
|
|
3470
|
-
usageLines.push(formatLineColumns(argLines, " "));
|
|
3471
|
-
usageLines.push("");
|
|
3472
|
-
}
|
|
3473
|
-
if (commandsLines.length > 0) {
|
|
3474
|
-
usageLines.push(colors.underline(colors.bold("COMMANDS")), "");
|
|
3475
|
-
usageLines.push(formatLineColumns(commandsLines, " "));
|
|
3476
|
-
usageLines.push(
|
|
3477
|
-
"",
|
|
3478
|
-
`Use \`${commandName} <command> --help\` for more information about a command.`
|
|
3479
|
-
);
|
|
3480
|
-
}
|
|
3481
|
-
return usageLines.filter((l3) => typeof l3 === "string").join("\n");
|
|
3482
|
-
}
|
|
3483
|
-
async function runMain(cmd, opts = {}) {
|
|
3484
|
-
const rawArgs = opts.rawArgs || process.argv.slice(2);
|
|
3485
|
-
const showUsage$1 = opts.showUsage || showUsage;
|
|
3486
|
-
try {
|
|
3487
|
-
if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
|
|
3488
|
-
await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
|
|
3489
|
-
process.exit(0);
|
|
3490
|
-
} else if (rawArgs.length === 1 && rawArgs[0] === "--version") {
|
|
3491
|
-
const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta;
|
|
3492
|
-
if (!meta?.version) {
|
|
3493
|
-
throw new CLIError("No version specified", "E_NO_VERSION");
|
|
3494
|
-
}
|
|
3495
|
-
consola.log(meta.version);
|
|
3496
|
-
} else {
|
|
3497
|
-
await runCommand(cmd, { rawArgs });
|
|
3498
|
-
}
|
|
3499
|
-
} catch (error) {
|
|
3500
|
-
const isCLIError = error instanceof CLIError;
|
|
3501
|
-
if (!isCLIError) {
|
|
3502
|
-
consola.error(error, "\n");
|
|
3503
|
-
}
|
|
3504
|
-
if (isCLIError) {
|
|
3505
|
-
await showUsage$1(...await resolveSubCommand(cmd, rawArgs));
|
|
3506
|
-
}
|
|
3507
|
-
consola.error(error.message);
|
|
3508
|
-
process.exit(1);
|
|
3509
|
-
}
|
|
3510
|
-
}
|
|
6
|
+
// src/commands/apps.ts
|
|
7
|
+
import { defineCommand } from "citty";
|
|
3511
8
|
|
|
3512
|
-
//
|
|
3513
|
-
|
|
3514
|
-
var p = "https://ujasntkfphywizsdaapi.supabase.co";
|
|
3515
|
-
var u2 = "sb_publishable_LbI2-4spKrYx1xHKrI4YyQ_rC-csyUz";
|
|
3516
|
-
var P2 = "sb-ujasntkfphywizsdaapi-auth-token";
|
|
3517
|
-
var k = (n2) => {
|
|
3518
|
-
let e2 = encodeURIComponent(JSON.stringify(n2)).replaceAll("%2F", "/"), s2 = [];
|
|
3519
|
-
for (let t2 = 0; t2 < e2.length; t2 += 3180) s2.push(e2.slice(t2, t2 + 3180));
|
|
3520
|
-
return s2.map((t2, o2) => `${P2}.${o2}=${t2}`).join("; ");
|
|
3521
|
-
};
|
|
3522
|
-
var w = (n2) => ({ request: async (s2, t2) => {
|
|
3523
|
-
let o2 = t2?.baseUrl ?? T2, c3 = s2.startsWith("http") ? s2 : `${o2}${s2}`, a3 = new Headers(t2?.headers);
|
|
3524
|
-
!a3.has("Content-Type") && t2?.method !== "GET" && a3.set("Content-Type", "application/json");
|
|
3525
|
-
let h2 = n2.getAccessToken();
|
|
3526
|
-
if (h2) if (o2 === p) a3.set("Authorization", `Bearer ${h2}`), a3.set("apikey", u2), a3.set("x-client-info", "supabase-ssr/0.0.10");
|
|
3527
|
-
else {
|
|
3528
|
-
let l3 = n2.getSession();
|
|
3529
|
-
l3 && a3.set("Cookie", k(l3));
|
|
3530
|
-
}
|
|
3531
|
-
let i2 = await fetch(c3, { ...t2, headers: a3 });
|
|
3532
|
-
if (!i2.ok) {
|
|
3533
|
-
let l3 = await i2.text().catch(() => "");
|
|
3534
|
-
throw new _2(i2.status, i2.statusText, l3, c3);
|
|
3535
|
-
}
|
|
3536
|
-
return i2.json();
|
|
3537
|
-
} });
|
|
3538
|
-
var _2 = class extends Error {
|
|
3539
|
-
constructor(s2, t2, o2, c3) {
|
|
3540
|
-
super(`Mobbin API error ${s2} ${t2}: ${o2} (${c3})`);
|
|
3541
|
-
this.status = s2;
|
|
3542
|
-
this.statusText = t2;
|
|
3543
|
-
this.body = o2;
|
|
3544
|
-
this.url = c3;
|
|
3545
|
-
this.name = "MobbinApiError";
|
|
3546
|
-
}
|
|
3547
|
-
};
|
|
3548
|
-
var r2 = class {
|
|
3549
|
-
constructor(e2) {
|
|
3550
|
-
this.fetch = e2;
|
|
3551
|
-
}
|
|
3552
|
-
};
|
|
3553
|
-
var f2 = class extends r2 {
|
|
3554
|
-
search = async (e2, s2 = {}) => {
|
|
3555
|
-
let t2 = await this.list(e2.platform), o2 = t2;
|
|
3556
|
-
if (e2.appCategories?.length) {
|
|
3557
|
-
let a3 = await this.popular(e2.platform), h2 = new Set(a3.filter((i2) => e2.appCategories?.includes(i2.app_category)).map((i2) => i2.app_id));
|
|
3558
|
-
o2 = t2.filter((i2) => h2.has(i2.id));
|
|
3559
|
-
}
|
|
3560
|
-
let c3 = s2.pageSize ?? 20;
|
|
3561
|
-
return { data: o2.slice(0, c3) };
|
|
3562
|
-
};
|
|
3563
|
-
popular = async (e2 = "ios", s2 = 10) => (await this.fetch.request("/api/popular-apps/fetch-popular-apps-with-preview-screens", { method: "POST", body: JSON.stringify({ platform: e2, limitPerCategory: s2 }) })).value;
|
|
3564
|
-
list = async (e2 = "ios") => this.fetch.request(`/api/searchable-apps/${e2}`, { method: "GET" });
|
|
3565
|
-
};
|
|
3566
|
-
var d = class extends r2 {
|
|
3567
|
-
checkEmail = async (e2) => (await this.fetch.request("/api/auth/login-by-email-only", { method: "POST", body: JSON.stringify({ email: e2, redirectTo: "/", isForgotPassword: false }) })).value.type;
|
|
3568
|
-
login = async (e2, s2) => {
|
|
3569
|
-
let t2 = await fetch(`${p}/auth/v1/token?grant_type=password`, { method: "POST", headers: { "Content-Type": "application/json", apikey: u2 }, body: JSON.stringify({ email: e2, password: s2 }) });
|
|
3570
|
-
if (!t2.ok) {
|
|
3571
|
-
let o2 = await t2.text().catch(() => "");
|
|
3572
|
-
throw new Error(`Login failed (${t2.status}): ${o2}`);
|
|
3573
|
-
}
|
|
3574
|
-
return t2.json();
|
|
3575
|
-
};
|
|
3576
|
-
refresh = async (e2) => {
|
|
3577
|
-
let s2 = await fetch(`${p}/auth/v1/token?grant_type=refresh_token`, { method: "POST", headers: { "Content-Type": "application/json", apikey: u2 }, body: JSON.stringify({ refresh_token: e2 }) });
|
|
3578
|
-
if (!s2.ok) {
|
|
3579
|
-
let t2 = await s2.text().catch(() => "");
|
|
3580
|
-
throw new Error(`Token refresh failed (${s2.status}): ${t2}`);
|
|
3581
|
-
}
|
|
3582
|
-
return s2.json();
|
|
3583
|
-
};
|
|
3584
|
-
getUser = async () => this.fetch.request(`${p}/auth/v1/user`, { method: "GET", baseUrl: p });
|
|
3585
|
-
};
|
|
3586
|
-
var m = class extends r2 {
|
|
3587
|
-
list = async () => (await this.fetch.request("/api/collection/fetch-collections", { method: "POST" })).value;
|
|
3588
|
-
savedContents = async (e2, s2) => (await this.fetch.request("/api/saved/fetch-saved-contents", { method: "POST", body: JSON.stringify({ contentType: e2, contentIds: s2 }) })).value;
|
|
3589
|
-
};
|
|
3590
|
-
var y2 = class extends r2 {
|
|
3591
|
-
list = async () => (await this.fetch.request("/api/filter-tags/fetch-dictionary-definitions", { method: "POST" })).value;
|
|
3592
|
-
};
|
|
3593
|
-
var g2 = class extends r2 {
|
|
3594
|
-
search = async (e2, s2 = {}) => {
|
|
3595
|
-
let t2 = { pageSize: s2.pageSize ?? 24, sortBy: s2.sortBy ?? "trending", ...s2 };
|
|
3596
|
-
return (await this.fetch.request("/api/content/fetch-screens", { method: "POST", body: JSON.stringify({ searchRequestId: "", filterOptions: { platform: e2.platform, screenPatterns: e2.screenPatterns ?? null, screenElements: e2.screenElements ?? null, screenKeywords: e2.screenKeywords ?? null, appCategories: e2.appCategories ?? null, hasAnimation: e2.hasAnimation ?? null }, paginationOptions: t2 }) })).value;
|
|
3597
|
-
};
|
|
3598
|
-
download = async (e2) => {
|
|
3599
|
-
let s2 = await fetch(e2);
|
|
3600
|
-
if (!s2.ok) throw new Error(`Failed to download screen: ${s2.status} ${s2.statusText}`);
|
|
3601
|
-
return s2.arrayBuffer();
|
|
3602
|
-
};
|
|
3603
|
-
};
|
|
3604
|
-
var S2 = class extends r2 {
|
|
3605
|
-
trendingApps = async (e2 = "ios") => (await this.fetch.request("/api/search-bar/fetch-trending-apps", { method: "POST", body: JSON.stringify({ platform: e2 }) })).value;
|
|
3606
|
-
trendingFilterTags = async (e2 = "ios", s2 = "apps") => (await this.fetch.request("/api/search-bar/fetch-trending-filter-tags", { method: "POST", body: JSON.stringify({ experience: s2, platform: e2 }) })).value;
|
|
3607
|
-
trendingKeywords = async (e2 = "ios") => (await this.fetch.request("/api/search-bar/fetch-trending-text-in-screenshot-keywords", { method: "POST", body: JSON.stringify({ platform: e2 }) })).value;
|
|
3608
|
-
searchableSites = async () => (await this.fetch.request("/api/search-bar/fetch-searchable-sites", { method: "POST" })).value;
|
|
3609
|
-
recentSearches = async () => this.fetch.request("/api/recent-searches", { method: "GET" });
|
|
3610
|
-
};
|
|
3611
|
-
var b2 = class {
|
|
3612
|
-
constructor(e2 = {}) {
|
|
3613
|
-
this.options = e2;
|
|
3614
|
-
this._accessToken = e2.accessToken, this._session = e2.session, this._fetch = w({ getAccessToken: () => this._accessToken, getSession: () => this._session });
|
|
3615
|
-
}
|
|
3616
|
-
_accessToken;
|
|
3617
|
-
_session;
|
|
3618
|
-
_fetch;
|
|
3619
|
-
_auth;
|
|
3620
|
-
_screens;
|
|
3621
|
-
_apps;
|
|
3622
|
-
_search;
|
|
3623
|
-
_filters;
|
|
3624
|
-
_collections;
|
|
3625
|
-
async init() {
|
|
3626
|
-
if (!this._accessToken) {
|
|
3627
|
-
if (this._session) {
|
|
3628
|
-
this._accessToken = this._session.access_token;
|
|
3629
|
-
return;
|
|
3630
|
-
}
|
|
3631
|
-
if (this.options.credentials) {
|
|
3632
|
-
let e2 = await this.auth.login(this.options.credentials.email, this.options.credentials.password);
|
|
3633
|
-
this._session = e2, this._accessToken = e2.access_token;
|
|
3634
|
-
return;
|
|
3635
|
-
}
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
get session() {
|
|
3639
|
-
return this._session;
|
|
3640
|
-
}
|
|
3641
|
-
set session(e2) {
|
|
3642
|
-
this._session = e2, this._accessToken = e2.access_token;
|
|
3643
|
-
}
|
|
3644
|
-
get accessToken() {
|
|
3645
|
-
return this._accessToken;
|
|
3646
|
-
}
|
|
3647
|
-
set accessToken(e2) {
|
|
3648
|
-
this._accessToken = e2;
|
|
3649
|
-
}
|
|
3650
|
-
get auth() {
|
|
3651
|
-
return this._auth || (this._auth = new d(this._fetch)), this._auth;
|
|
3652
|
-
}
|
|
3653
|
-
get screens() {
|
|
3654
|
-
return this._screens || (this._screens = new g2(this._fetch)), this._screens;
|
|
3655
|
-
}
|
|
3656
|
-
get apps() {
|
|
3657
|
-
return this._apps || (this._apps = new f2(this._fetch)), this._apps;
|
|
3658
|
-
}
|
|
3659
|
-
get search() {
|
|
3660
|
-
return this._search || (this._search = new S2(this._fetch)), this._search;
|
|
3661
|
-
}
|
|
3662
|
-
get filters() {
|
|
3663
|
-
return this._filters || (this._filters = new y2(this._fetch)), this._filters;
|
|
3664
|
-
}
|
|
3665
|
-
get collections() {
|
|
3666
|
-
return this._collections || (this._collections = new m(this._fetch)), this._collections;
|
|
3667
|
-
}
|
|
3668
|
-
};
|
|
9
|
+
// src/client.ts
|
|
10
|
+
import { MobbinClient } from "mobbin-sdk";
|
|
3669
11
|
|
|
3670
12
|
// src/config.ts
|
|
3671
13
|
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "fs";
|
|
@@ -3707,7 +49,7 @@ var getClient = async () => {
|
|
|
3707
49
|
console.error("Not logged in. Run `mobbin auth login` first.");
|
|
3708
50
|
process.exit(1);
|
|
3709
51
|
}
|
|
3710
|
-
const client = new
|
|
52
|
+
const client = new MobbinClient({ session });
|
|
3711
53
|
if (isSessionExpired(session)) {
|
|
3712
54
|
try {
|
|
3713
55
|
const newSession = await client.auth.refresh(session.refresh_token);
|
|
@@ -3724,9 +66,9 @@ var getClient = async () => {
|
|
|
3724
66
|
};
|
|
3725
67
|
|
|
3726
68
|
// src/output.ts
|
|
3727
|
-
|
|
69
|
+
import Table from "cli-table3";
|
|
3728
70
|
var outputTable = (headers, rows) => {
|
|
3729
|
-
const table = new
|
|
71
|
+
const table = new Table({
|
|
3730
72
|
head: headers,
|
|
3731
73
|
style: { head: ["cyan"] }
|
|
3732
74
|
});
|
|
@@ -3787,7 +129,7 @@ var searchCommand = defineCommand({
|
|
|
3787
129
|
if (args.table) {
|
|
3788
130
|
outputTable(
|
|
3789
131
|
["Name", "Platform", "Tagline"],
|
|
3790
|
-
result.data.map((
|
|
132
|
+
result.data.map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? ""])
|
|
3791
133
|
);
|
|
3792
134
|
return;
|
|
3793
135
|
}
|
|
@@ -3818,7 +160,7 @@ var listCommand = defineCommand({
|
|
|
3818
160
|
if (args.table) {
|
|
3819
161
|
outputTable(
|
|
3820
162
|
["Name", "Platform", "Tagline"],
|
|
3821
|
-
apps.slice(0, 50).map((
|
|
163
|
+
apps.slice(0, 50).map((a) => [a.appName, a.platform, a.appTagline?.slice(0, 50) ?? ""])
|
|
3822
164
|
);
|
|
3823
165
|
return;
|
|
3824
166
|
}
|
|
@@ -3858,7 +200,7 @@ var popularCommand = defineCommand({
|
|
|
3858
200
|
if (args.table) {
|
|
3859
201
|
outputTable(
|
|
3860
202
|
["Name", "Category", "Popularity"],
|
|
3861
|
-
apps.map((
|
|
203
|
+
apps.map((a) => [a.app_name, a.app_category, String(a.popularity_metric)])
|
|
3862
204
|
);
|
|
3863
205
|
return;
|
|
3864
206
|
}
|
|
@@ -3877,449 +219,11 @@ var appsCommand = defineCommand({
|
|
|
3877
219
|
}
|
|
3878
220
|
});
|
|
3879
221
|
|
|
3880
|
-
// ../../node_modules/.pnpm/@clack+prompts@0.9.1/node_modules/@clack/prompts/dist/index.mjs
|
|
3881
|
-
import { stripVTControlCharacters as T4 } from "util";
|
|
3882
|
-
|
|
3883
|
-
// ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
|
|
3884
|
-
var import_sisteransi = __toESM(require_src(), 1);
|
|
3885
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
3886
|
-
import { stdin as $, stdout as j } from "process";
|
|
3887
|
-
import * as f3 from "readline";
|
|
3888
|
-
import M from "readline";
|
|
3889
|
-
import { WriteStream as U } from "tty";
|
|
3890
|
-
function J({ onlyFirst: t2 = false } = {}) {
|
|
3891
|
-
const F2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
3892
|
-
return new RegExp(F2, t2 ? void 0 : "g");
|
|
3893
|
-
}
|
|
3894
|
-
var Q = J();
|
|
3895
|
-
function T3(t2) {
|
|
3896
|
-
if (typeof t2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t2}\``);
|
|
3897
|
-
return t2.replace(Q, "");
|
|
3898
|
-
}
|
|
3899
|
-
function O2(t2) {
|
|
3900
|
-
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
3901
|
-
}
|
|
3902
|
-
var P3 = { exports: {} };
|
|
3903
|
-
(function(t2) {
|
|
3904
|
-
var u4 = {};
|
|
3905
|
-
t2.exports = u4, u4.eastAsianWidth = function(e2) {
|
|
3906
|
-
var s2 = e2.charCodeAt(0), i2 = e2.length == 2 ? e2.charCodeAt(1) : 0, D2 = s2;
|
|
3907
|
-
return 55296 <= s2 && s2 <= 56319 && 56320 <= i2 && i2 <= 57343 && (s2 &= 1023, i2 &= 1023, D2 = s2 << 10 | i2, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
|
|
3908
|
-
}, u4.characterLength = function(e2) {
|
|
3909
|
-
var s2 = this.eastAsianWidth(e2);
|
|
3910
|
-
return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
|
|
3911
|
-
};
|
|
3912
|
-
function F2(e2) {
|
|
3913
|
-
return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
3914
|
-
}
|
|
3915
|
-
u4.length = function(e2) {
|
|
3916
|
-
for (var s2 = F2(e2), i2 = 0, D2 = 0; D2 < s2.length; D2++) i2 = i2 + this.characterLength(s2[D2]);
|
|
3917
|
-
return i2;
|
|
3918
|
-
}, u4.slice = function(e2, s2, i2) {
|
|
3919
|
-
textLen = u4.length(e2), s2 = s2 || 0, i2 = i2 || 1, s2 < 0 && (s2 = textLen + s2), i2 < 0 && (i2 = textLen + i2);
|
|
3920
|
-
for (var D2 = "", C2 = 0, o2 = F2(e2), E2 = 0; E2 < o2.length; E2++) {
|
|
3921
|
-
var a3 = o2[E2], n2 = u4.length(a3);
|
|
3922
|
-
if (C2 >= s2 - (n2 == 2 ? 1 : 0)) if (C2 + n2 <= i2) D2 += a3;
|
|
3923
|
-
else break;
|
|
3924
|
-
C2 += n2;
|
|
3925
|
-
}
|
|
3926
|
-
return D2;
|
|
3927
|
-
};
|
|
3928
|
-
})(P3);
|
|
3929
|
-
var X = P3.exports;
|
|
3930
|
-
var DD = O2(X);
|
|
3931
|
-
var uD = function() {
|
|
3932
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
3933
|
-
};
|
|
3934
|
-
var FD = O2(uD);
|
|
3935
|
-
function A2(t2, u4 = {}) {
|
|
3936
|
-
if (typeof t2 != "string" || t2.length === 0 || (u4 = { ambiguousIsNarrow: true, ...u4 }, t2 = T3(t2), t2.length === 0)) return 0;
|
|
3937
|
-
t2 = t2.replace(FD(), " ");
|
|
3938
|
-
const F2 = u4.ambiguousIsNarrow ? 1 : 2;
|
|
3939
|
-
let e2 = 0;
|
|
3940
|
-
for (const s2 of t2) {
|
|
3941
|
-
const i2 = s2.codePointAt(0);
|
|
3942
|
-
if (i2 <= 31 || i2 >= 127 && i2 <= 159 || i2 >= 768 && i2 <= 879) continue;
|
|
3943
|
-
switch (DD.eastAsianWidth(s2)) {
|
|
3944
|
-
case "F":
|
|
3945
|
-
case "W":
|
|
3946
|
-
e2 += 2;
|
|
3947
|
-
break;
|
|
3948
|
-
case "A":
|
|
3949
|
-
e2 += F2;
|
|
3950
|
-
break;
|
|
3951
|
-
default:
|
|
3952
|
-
e2 += 1;
|
|
3953
|
-
}
|
|
3954
|
-
}
|
|
3955
|
-
return e2;
|
|
3956
|
-
}
|
|
3957
|
-
var m2 = 10;
|
|
3958
|
-
var L2 = (t2 = 0) => (u4) => `\x1B[${u4 + t2}m`;
|
|
3959
|
-
var N2 = (t2 = 0) => (u4) => `\x1B[${38 + t2};5;${u4}m`;
|
|
3960
|
-
var I2 = (t2 = 0) => (u4, F2, e2) => `\x1B[${38 + t2};2;${u4};${F2};${e2}m`;
|
|
3961
|
-
var r3 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
3962
|
-
Object.keys(r3.modifier);
|
|
3963
|
-
var tD = Object.keys(r3.color);
|
|
3964
|
-
var eD = Object.keys(r3.bgColor);
|
|
3965
|
-
[...tD, ...eD];
|
|
3966
|
-
function sD() {
|
|
3967
|
-
const t2 = /* @__PURE__ */ new Map();
|
|
3968
|
-
for (const [u4, F2] of Object.entries(r3)) {
|
|
3969
|
-
for (const [e2, s2] of Object.entries(F2)) r3[e2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F2[e2] = r3[e2], t2.set(s2[0], s2[1]);
|
|
3970
|
-
Object.defineProperty(r3, u4, { value: F2, enumerable: false });
|
|
3971
|
-
}
|
|
3972
|
-
return Object.defineProperty(r3, "codes", { value: t2, enumerable: false }), r3.color.close = "\x1B[39m", r3.bgColor.close = "\x1B[49m", r3.color.ansi = L2(), r3.color.ansi256 = N2(), r3.color.ansi16m = I2(), r3.bgColor.ansi = L2(m2), r3.bgColor.ansi256 = N2(m2), r3.bgColor.ansi16m = I2(m2), Object.defineProperties(r3, { rgbToAnsi256: { value: (u4, F2, e2) => u4 === F2 && F2 === e2 ? u4 < 8 ? 16 : u4 > 248 ? 231 : Math.round((u4 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u4 / 255 * 5) + 6 * Math.round(F2 / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u4) => {
|
|
3973
|
-
const F2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u4.toString(16));
|
|
3974
|
-
if (!F2) return [0, 0, 0];
|
|
3975
|
-
let [e2] = F2;
|
|
3976
|
-
e2.length === 3 && (e2 = [...e2].map((i2) => i2 + i2).join(""));
|
|
3977
|
-
const s2 = Number.parseInt(e2, 16);
|
|
3978
|
-
return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
|
|
3979
|
-
}, enumerable: false }, hexToAnsi256: { value: (u4) => r3.rgbToAnsi256(...r3.hexToRgb(u4)), enumerable: false }, ansi256ToAnsi: { value: (u4) => {
|
|
3980
|
-
if (u4 < 8) return 30 + u4;
|
|
3981
|
-
if (u4 < 16) return 90 + (u4 - 8);
|
|
3982
|
-
let F2, e2, s2;
|
|
3983
|
-
if (u4 >= 232) F2 = ((u4 - 232) * 10 + 8) / 255, e2 = F2, s2 = F2;
|
|
3984
|
-
else {
|
|
3985
|
-
u4 -= 16;
|
|
3986
|
-
const C2 = u4 % 36;
|
|
3987
|
-
F2 = Math.floor(u4 / 36) / 5, e2 = Math.floor(C2 / 6) / 5, s2 = C2 % 6 / 5;
|
|
3988
|
-
}
|
|
3989
|
-
const i2 = Math.max(F2, e2, s2) * 2;
|
|
3990
|
-
if (i2 === 0) return 30;
|
|
3991
|
-
let D2 = 30 + (Math.round(s2) << 2 | Math.round(e2) << 1 | Math.round(F2));
|
|
3992
|
-
return i2 === 2 && (D2 += 60), D2;
|
|
3993
|
-
}, enumerable: false }, rgbToAnsi: { value: (u4, F2, e2) => r3.ansi256ToAnsi(r3.rgbToAnsi256(u4, F2, e2)), enumerable: false }, hexToAnsi: { value: (u4) => r3.ansi256ToAnsi(r3.hexToAnsi256(u4)), enumerable: false } }), r3;
|
|
3994
|
-
}
|
|
3995
|
-
var iD = sD();
|
|
3996
|
-
var v = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
3997
|
-
var CD = 39;
|
|
3998
|
-
var w2 = "\x07";
|
|
3999
|
-
var W = "[";
|
|
4000
|
-
var rD = "]";
|
|
4001
|
-
var R2 = "m";
|
|
4002
|
-
var y3 = `${rD}8;;`;
|
|
4003
|
-
var V = (t2) => `${v.values().next().value}${W}${t2}${R2}`;
|
|
4004
|
-
var z = (t2) => `${v.values().next().value}${y3}${t2}${w2}`;
|
|
4005
|
-
var ED = (t2) => t2.split(" ").map((u4) => A2(u4));
|
|
4006
|
-
var _3 = (t2, u4, F2) => {
|
|
4007
|
-
const e2 = [...u4];
|
|
4008
|
-
let s2 = false, i2 = false, D2 = A2(T3(t2[t2.length - 1]));
|
|
4009
|
-
for (const [C2, o2] of e2.entries()) {
|
|
4010
|
-
const E2 = A2(o2);
|
|
4011
|
-
if (D2 + E2 <= F2 ? t2[t2.length - 1] += o2 : (t2.push(o2), D2 = 0), v.has(o2) && (s2 = true, i2 = e2.slice(C2 + 1).join("").startsWith(y3)), s2) {
|
|
4012
|
-
i2 ? o2 === w2 && (s2 = false, i2 = false) : o2 === R2 && (s2 = false);
|
|
4013
|
-
continue;
|
|
4014
|
-
}
|
|
4015
|
-
D2 += E2, D2 === F2 && C2 < e2.length - 1 && (t2.push(""), D2 = 0);
|
|
4016
|
-
}
|
|
4017
|
-
!D2 && t2[t2.length - 1].length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
|
|
4018
|
-
};
|
|
4019
|
-
var nD = (t2) => {
|
|
4020
|
-
const u4 = t2.split(" ");
|
|
4021
|
-
let F2 = u4.length;
|
|
4022
|
-
for (; F2 > 0 && !(A2(u4[F2 - 1]) > 0); ) F2--;
|
|
4023
|
-
return F2 === u4.length ? t2 : u4.slice(0, F2).join(" ") + u4.slice(F2).join("");
|
|
4024
|
-
};
|
|
4025
|
-
var oD = (t2, u4, F2 = {}) => {
|
|
4026
|
-
if (F2.trim !== false && t2.trim() === "") return "";
|
|
4027
|
-
let e2 = "", s2, i2;
|
|
4028
|
-
const D2 = ED(t2);
|
|
4029
|
-
let C2 = [""];
|
|
4030
|
-
for (const [E2, a3] of t2.split(" ").entries()) {
|
|
4031
|
-
F2.trim !== false && (C2[C2.length - 1] = C2[C2.length - 1].trimStart());
|
|
4032
|
-
let n2 = A2(C2[C2.length - 1]);
|
|
4033
|
-
if (E2 !== 0 && (n2 >= u4 && (F2.wordWrap === false || F2.trim === false) && (C2.push(""), n2 = 0), (n2 > 0 || F2.trim === false) && (C2[C2.length - 1] += " ", n2++)), F2.hard && D2[E2] > u4) {
|
|
4034
|
-
const B2 = u4 - n2, p3 = 1 + Math.floor((D2[E2] - B2 - 1) / u4);
|
|
4035
|
-
Math.floor((D2[E2] - 1) / u4) < p3 && C2.push(""), _3(C2, a3, u4);
|
|
4036
|
-
continue;
|
|
4037
|
-
}
|
|
4038
|
-
if (n2 + D2[E2] > u4 && n2 > 0 && D2[E2] > 0) {
|
|
4039
|
-
if (F2.wordWrap === false && n2 < u4) {
|
|
4040
|
-
_3(C2, a3, u4);
|
|
4041
|
-
continue;
|
|
4042
|
-
}
|
|
4043
|
-
C2.push("");
|
|
4044
|
-
}
|
|
4045
|
-
if (n2 + D2[E2] > u4 && F2.wordWrap === false) {
|
|
4046
|
-
_3(C2, a3, u4);
|
|
4047
|
-
continue;
|
|
4048
|
-
}
|
|
4049
|
-
C2[C2.length - 1] += a3;
|
|
4050
|
-
}
|
|
4051
|
-
F2.trim !== false && (C2 = C2.map((E2) => nD(E2)));
|
|
4052
|
-
const o2 = [...C2.join(`
|
|
4053
|
-
`)];
|
|
4054
|
-
for (const [E2, a3] of o2.entries()) {
|
|
4055
|
-
if (e2 += a3, v.has(a3)) {
|
|
4056
|
-
const { groups: B2 } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y3}(?<uri>.*)${w2})`).exec(o2.slice(E2).join("")) || { groups: {} };
|
|
4057
|
-
if (B2.code !== void 0) {
|
|
4058
|
-
const p3 = Number.parseFloat(B2.code);
|
|
4059
|
-
s2 = p3 === CD ? void 0 : p3;
|
|
4060
|
-
} else B2.uri !== void 0 && (i2 = B2.uri.length === 0 ? void 0 : B2.uri);
|
|
4061
|
-
}
|
|
4062
|
-
const n2 = iD.codes.get(Number(s2));
|
|
4063
|
-
o2[E2 + 1] === `
|
|
4064
|
-
` ? (i2 && (e2 += z("")), s2 && n2 && (e2 += V(n2))) : a3 === `
|
|
4065
|
-
` && (s2 && n2 && (e2 += V(s2)), i2 && (e2 += z(i2)));
|
|
4066
|
-
}
|
|
4067
|
-
return e2;
|
|
4068
|
-
};
|
|
4069
|
-
function G2(t2, u4, F2) {
|
|
4070
|
-
return String(t2).normalize().replace(/\r\n/g, `
|
|
4071
|
-
`).split(`
|
|
4072
|
-
`).map((e2) => oD(e2, u4, F2)).join(`
|
|
4073
|
-
`);
|
|
4074
|
-
}
|
|
4075
|
-
var aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
4076
|
-
var c2 = { actions: new Set(aD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
|
|
4077
|
-
function k2(t2, u4) {
|
|
4078
|
-
if (typeof t2 == "string") return c2.aliases.get(t2) === u4;
|
|
4079
|
-
for (const F2 of t2) if (F2 !== void 0 && k2(F2, u4)) return true;
|
|
4080
|
-
return false;
|
|
4081
|
-
}
|
|
4082
|
-
function lD(t2, u4) {
|
|
4083
|
-
if (t2 === u4) return;
|
|
4084
|
-
const F2 = t2.split(`
|
|
4085
|
-
`), e2 = u4.split(`
|
|
4086
|
-
`), s2 = [];
|
|
4087
|
-
for (let i2 = 0; i2 < Math.max(F2.length, e2.length); i2++) F2[i2] !== e2[i2] && s2.push(i2);
|
|
4088
|
-
return s2;
|
|
4089
|
-
}
|
|
4090
|
-
var xD = globalThis.process.platform.startsWith("win");
|
|
4091
|
-
var S3 = /* @__PURE__ */ Symbol("clack:cancel");
|
|
4092
|
-
function BD(t2) {
|
|
4093
|
-
return t2 === S3;
|
|
4094
|
-
}
|
|
4095
|
-
function d2(t2, u4) {
|
|
4096
|
-
const F2 = t2;
|
|
4097
|
-
F2.isTTY && F2.setRawMode(u4);
|
|
4098
|
-
}
|
|
4099
|
-
var AD = Object.defineProperty;
|
|
4100
|
-
var pD = (t2, u4, F2) => u4 in t2 ? AD(t2, u4, { enumerable: true, configurable: true, writable: true, value: F2 }) : t2[u4] = F2;
|
|
4101
|
-
var h = (t2, u4, F2) => (pD(t2, typeof u4 != "symbol" ? u4 + "" : u4, F2), F2);
|
|
4102
|
-
var x = class {
|
|
4103
|
-
constructor(u4, F2 = true) {
|
|
4104
|
-
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
4105
|
-
const { input: e2 = $, output: s2 = j, render: i2, signal: D2, ...C2 } = u4;
|
|
4106
|
-
this.opts = C2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i2.bind(this), this._track = F2, this._abortSignal = D2, this.input = e2, this.output = s2;
|
|
4107
|
-
}
|
|
4108
|
-
unsubscribe() {
|
|
4109
|
-
this._subscribers.clear();
|
|
4110
|
-
}
|
|
4111
|
-
setSubscriber(u4, F2) {
|
|
4112
|
-
const e2 = this._subscribers.get(u4) ?? [];
|
|
4113
|
-
e2.push(F2), this._subscribers.set(u4, e2);
|
|
4114
|
-
}
|
|
4115
|
-
on(u4, F2) {
|
|
4116
|
-
this.setSubscriber(u4, { cb: F2 });
|
|
4117
|
-
}
|
|
4118
|
-
once(u4, F2) {
|
|
4119
|
-
this.setSubscriber(u4, { cb: F2, once: true });
|
|
4120
|
-
}
|
|
4121
|
-
emit(u4, ...F2) {
|
|
4122
|
-
const e2 = this._subscribers.get(u4) ?? [], s2 = [];
|
|
4123
|
-
for (const i2 of e2) i2.cb(...F2), i2.once && s2.push(() => e2.splice(e2.indexOf(i2), 1));
|
|
4124
|
-
for (const i2 of s2) i2();
|
|
4125
|
-
}
|
|
4126
|
-
prompt() {
|
|
4127
|
-
return new Promise((u4, F2) => {
|
|
4128
|
-
if (this._abortSignal) {
|
|
4129
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u4(S3);
|
|
4130
|
-
this._abortSignal.addEventListener("abort", () => {
|
|
4131
|
-
this.state = "cancel", this.close();
|
|
4132
|
-
}, { once: true });
|
|
4133
|
-
}
|
|
4134
|
-
const e2 = new U(0);
|
|
4135
|
-
e2._write = (s2, i2, D2) => {
|
|
4136
|
-
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
|
|
4137
|
-
}, this.input.pipe(e2), this.rl = M.createInterface({ input: this.input, output: e2, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), M.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), d2(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
4138
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d2(this.input, false), u4(this.value);
|
|
4139
|
-
}), this.once("cancel", () => {
|
|
4140
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d2(this.input, false), u4(S3);
|
|
4141
|
-
});
|
|
4142
|
-
});
|
|
4143
|
-
}
|
|
4144
|
-
onKeypress(u4, F2) {
|
|
4145
|
-
if (this.state === "error" && (this.state = "active"), F2?.name && (!this._track && c2.aliases.has(F2.name) && this.emit("cursor", c2.aliases.get(F2.name)), c2.actions.has(F2.name) && this.emit("cursor", F2.name)), u4 && (u4.toLowerCase() === "y" || u4.toLowerCase() === "n") && this.emit("confirm", u4.toLowerCase() === "y"), u4 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u4 && this.emit("key", u4.toLowerCase()), F2?.name === "return") {
|
|
4146
|
-
if (this.opts.validate) {
|
|
4147
|
-
const e2 = this.opts.validate(this.value);
|
|
4148
|
-
e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.value));
|
|
4149
|
-
}
|
|
4150
|
-
this.state !== "error" && (this.state = "submit");
|
|
4151
|
-
}
|
|
4152
|
-
k2([u4, F2?.name, F2?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
4153
|
-
}
|
|
4154
|
-
close() {
|
|
4155
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
4156
|
-
`), d2(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
4157
|
-
}
|
|
4158
|
-
restoreCursor() {
|
|
4159
|
-
const u4 = G2(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
4160
|
-
`).length - 1;
|
|
4161
|
-
this.output.write(import_sisteransi.cursor.move(-999, u4 * -1));
|
|
4162
|
-
}
|
|
4163
|
-
render() {
|
|
4164
|
-
const u4 = G2(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
4165
|
-
if (u4 !== this._prevFrame) {
|
|
4166
|
-
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
4167
|
-
else {
|
|
4168
|
-
const F2 = lD(this._prevFrame, u4);
|
|
4169
|
-
if (this.restoreCursor(), F2 && F2?.length === 1) {
|
|
4170
|
-
const e2 = F2[0];
|
|
4171
|
-
this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
4172
|
-
const s2 = u4.split(`
|
|
4173
|
-
`);
|
|
4174
|
-
this.output.write(s2[e2]), this._prevFrame = u4, this.output.write(import_sisteransi.cursor.move(0, s2.length - e2 - 1));
|
|
4175
|
-
return;
|
|
4176
|
-
}
|
|
4177
|
-
if (F2 && F2?.length > 1) {
|
|
4178
|
-
const e2 = F2[0];
|
|
4179
|
-
this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.down());
|
|
4180
|
-
const s2 = u4.split(`
|
|
4181
|
-
`).slice(e2);
|
|
4182
|
-
this.output.write(s2.join(`
|
|
4183
|
-
`)), this._prevFrame = u4;
|
|
4184
|
-
return;
|
|
4185
|
-
}
|
|
4186
|
-
this.output.write(import_sisteransi.erase.down());
|
|
4187
|
-
}
|
|
4188
|
-
this.output.write(u4), this.state === "initial" && (this.state = "active"), this._prevFrame = u4;
|
|
4189
|
-
}
|
|
4190
|
-
}
|
|
4191
|
-
};
|
|
4192
|
-
var yD = Object.defineProperty;
|
|
4193
|
-
var _D = (t2, u4, F2) => u4 in t2 ? yD(t2, u4, { enumerable: true, configurable: true, writable: true, value: F2 }) : t2[u4] = F2;
|
|
4194
|
-
var Z = (t2, u4, F2) => (_D(t2, typeof u4 != "symbol" ? u4 + "" : u4, F2), F2);
|
|
4195
|
-
var kD = class extends x {
|
|
4196
|
-
constructor({ mask: u4, ...F2 }) {
|
|
4197
|
-
super(F2), Z(this, "valueWithCursor", ""), Z(this, "_mask", "\u2022"), this._mask = u4 ?? "\u2022", this.on("finalize", () => {
|
|
4198
|
-
this.valueWithCursor = this.masked;
|
|
4199
|
-
}), this.on("value", () => {
|
|
4200
|
-
if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
|
|
4201
|
-
else {
|
|
4202
|
-
const e2 = this.masked.slice(0, this.cursor), s2 = this.masked.slice(this.cursor);
|
|
4203
|
-
this.valueWithCursor = `${e2}${import_picocolors.default.inverse(s2[0])}${s2.slice(1)}`;
|
|
4204
|
-
}
|
|
4205
|
-
});
|
|
4206
|
-
}
|
|
4207
|
-
get cursor() {
|
|
4208
|
-
return this._cursor;
|
|
4209
|
-
}
|
|
4210
|
-
get masked() {
|
|
4211
|
-
return this.value.replaceAll(/./g, this._mask);
|
|
4212
|
-
}
|
|
4213
|
-
};
|
|
4214
|
-
var PD = class extends x {
|
|
4215
|
-
get valueWithCursor() {
|
|
4216
|
-
if (this.state === "submit") return this.value;
|
|
4217
|
-
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
4218
|
-
const u4 = this.value.slice(0, this.cursor), [F2, ...e2] = this.value.slice(this.cursor);
|
|
4219
|
-
return `${u4}${import_picocolors.default.inverse(F2)}${e2.join("")}`;
|
|
4220
|
-
}
|
|
4221
|
-
get cursor() {
|
|
4222
|
-
return this._cursor;
|
|
4223
|
-
}
|
|
4224
|
-
constructor(u4) {
|
|
4225
|
-
super(u4), this.on("finalize", () => {
|
|
4226
|
-
this.value || (this.value = u4.defaultValue);
|
|
4227
|
-
});
|
|
4228
|
-
}
|
|
4229
|
-
};
|
|
4230
|
-
|
|
4231
|
-
// ../../node_modules/.pnpm/@clack+prompts@0.9.1/node_modules/@clack/prompts/dist/index.mjs
|
|
4232
|
-
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
4233
|
-
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
4234
|
-
import p2 from "process";
|
|
4235
|
-
function X2() {
|
|
4236
|
-
return p2.platform !== "win32" ? p2.env.TERM !== "linux" : !!p2.env.CI || !!p2.env.WT_SESSION || !!p2.env.TERMINUS_SUBLIME || p2.env.ConEmuTask === "{cmd::Cmder}" || p2.env.TERM_PROGRAM === "Terminus-Sublime" || p2.env.TERM_PROGRAM === "vscode" || p2.env.TERM === "xterm-256color" || p2.env.TERM === "alacritty" || p2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
4237
|
-
}
|
|
4238
|
-
var E = X2();
|
|
4239
|
-
var u3 = (s2, n2) => E ? s2 : n2;
|
|
4240
|
-
var ee = u3("\u25C6", "*");
|
|
4241
|
-
var A3 = u3("\u25A0", "x");
|
|
4242
|
-
var B = u3("\u25B2", "x");
|
|
4243
|
-
var S4 = u3("\u25C7", "o");
|
|
4244
|
-
var te = u3("\u250C", "T");
|
|
4245
|
-
var a2 = u3("\u2502", "|");
|
|
4246
|
-
var m3 = u3("\u2514", "\u2014");
|
|
4247
|
-
var j2 = u3("\u25CF", ">");
|
|
4248
|
-
var R3 = u3("\u25CB", " ");
|
|
4249
|
-
var V2 = u3("\u25FB", "[\u2022]");
|
|
4250
|
-
var M2 = u3("\u25FC", "[+]");
|
|
4251
|
-
var G3 = u3("\u25FB", "[ ]");
|
|
4252
|
-
var se = u3("\u25AA", "\u2022");
|
|
4253
|
-
var N3 = u3("\u2500", "-");
|
|
4254
|
-
var re = u3("\u256E", "+");
|
|
4255
|
-
var ie = u3("\u251C", "+");
|
|
4256
|
-
var ne = u3("\u256F", "+");
|
|
4257
|
-
var ae = u3("\u25CF", "\u2022");
|
|
4258
|
-
var oe = u3("\u25C6", "*");
|
|
4259
|
-
var ce = u3("\u25B2", "!");
|
|
4260
|
-
var le = u3("\u25A0", "x");
|
|
4261
|
-
var y4 = (s2) => {
|
|
4262
|
-
switch (s2) {
|
|
4263
|
-
case "initial":
|
|
4264
|
-
case "active":
|
|
4265
|
-
return import_picocolors2.default.cyan(ee);
|
|
4266
|
-
case "cancel":
|
|
4267
|
-
return import_picocolors2.default.red(A3);
|
|
4268
|
-
case "error":
|
|
4269
|
-
return import_picocolors2.default.yellow(B);
|
|
4270
|
-
case "submit":
|
|
4271
|
-
return import_picocolors2.default.green(S4);
|
|
4272
|
-
}
|
|
4273
|
-
};
|
|
4274
|
-
var ue = (s2) => new PD({ validate: s2.validate, placeholder: s2.placeholder, defaultValue: s2.defaultValue, initialValue: s2.initialValue, render() {
|
|
4275
|
-
const n2 = `${import_picocolors2.default.gray(a2)}
|
|
4276
|
-
${y4(this.state)} ${s2.message}
|
|
4277
|
-
`, t2 = s2.placeholder ? import_picocolors2.default.inverse(s2.placeholder[0]) + import_picocolors2.default.dim(s2.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i2 = this.value ? this.valueWithCursor : t2;
|
|
4278
|
-
switch (this.state) {
|
|
4279
|
-
case "error":
|
|
4280
|
-
return `${n2.trim()}
|
|
4281
|
-
${import_picocolors2.default.yellow(a2)} ${i2}
|
|
4282
|
-
${import_picocolors2.default.yellow(m3)} ${import_picocolors2.default.yellow(this.error)}
|
|
4283
|
-
`;
|
|
4284
|
-
case "submit":
|
|
4285
|
-
return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(this.value || s2.placeholder)}`;
|
|
4286
|
-
case "cancel":
|
|
4287
|
-
return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
4288
|
-
${import_picocolors2.default.gray(a2)}` : ""}`;
|
|
4289
|
-
default:
|
|
4290
|
-
return `${n2}${import_picocolors2.default.cyan(a2)} ${i2}
|
|
4291
|
-
${import_picocolors2.default.cyan(m3)}
|
|
4292
|
-
`;
|
|
4293
|
-
}
|
|
4294
|
-
} }).prompt();
|
|
4295
|
-
var $e = (s2) => new kD({ validate: s2.validate, mask: s2.mask ?? se, render() {
|
|
4296
|
-
const n2 = `${import_picocolors2.default.gray(a2)}
|
|
4297
|
-
${y4(this.state)} ${s2.message}
|
|
4298
|
-
`, t2 = this.valueWithCursor, i2 = this.masked;
|
|
4299
|
-
switch (this.state) {
|
|
4300
|
-
case "error":
|
|
4301
|
-
return `${n2.trim()}
|
|
4302
|
-
${import_picocolors2.default.yellow(a2)} ${i2}
|
|
4303
|
-
${import_picocolors2.default.yellow(m3)} ${import_picocolors2.default.yellow(this.error)}
|
|
4304
|
-
`;
|
|
4305
|
-
case "submit":
|
|
4306
|
-
return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(i2)}`;
|
|
4307
|
-
case "cancel":
|
|
4308
|
-
return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i2 ?? ""))}${i2 ? `
|
|
4309
|
-
${import_picocolors2.default.gray(a2)}` : ""}`;
|
|
4310
|
-
default:
|
|
4311
|
-
return `${n2}${import_picocolors2.default.cyan(a2)} ${t2}
|
|
4312
|
-
${import_picocolors2.default.cyan(m3)}
|
|
4313
|
-
`;
|
|
4314
|
-
}
|
|
4315
|
-
} }).prompt();
|
|
4316
|
-
var we = (s2 = "") => {
|
|
4317
|
-
process.stdout.write(`${import_picocolors2.default.gray(te)} ${s2}
|
|
4318
|
-
`);
|
|
4319
|
-
};
|
|
4320
|
-
|
|
4321
222
|
// src/commands/auth.ts
|
|
4322
|
-
|
|
223
|
+
import * as p from "@clack/prompts";
|
|
224
|
+
import { defineCommand as defineCommand2 } from "citty";
|
|
225
|
+
import { MobbinClient as MobbinClient2 } from "mobbin-sdk";
|
|
226
|
+
var loginCommand = defineCommand2({
|
|
4323
227
|
meta: {
|
|
4324
228
|
name: "login",
|
|
4325
229
|
description: "Login to Mobbin"
|
|
@@ -4338,26 +242,26 @@ var loginCommand = defineCommand({
|
|
|
4338
242
|
},
|
|
4339
243
|
run: async ({ args }) => {
|
|
4340
244
|
let email = args.email || process.env.MOBBIN_EMAIL;
|
|
4341
|
-
let
|
|
4342
|
-
if (!email || !
|
|
4343
|
-
|
|
245
|
+
let password2 = args.password || process.env.MOBBIN_PASSWORD;
|
|
246
|
+
if (!email || !password2) {
|
|
247
|
+
p.intro("Mobbin Login");
|
|
4344
248
|
if (!email) {
|
|
4345
|
-
const result = await
|
|
249
|
+
const result = await p.text({
|
|
4346
250
|
message: "Email:",
|
|
4347
|
-
validate: (
|
|
251
|
+
validate: (v) => v.includes("@") ? void 0 : "Invalid email"
|
|
4348
252
|
});
|
|
4349
|
-
if (
|
|
253
|
+
if (p.isCancel(result)) process.exit(0);
|
|
4350
254
|
email = result;
|
|
4351
255
|
}
|
|
4352
|
-
if (!
|
|
4353
|
-
const result = await
|
|
256
|
+
if (!password2) {
|
|
257
|
+
const result = await p.password({
|
|
4354
258
|
message: "Password:"
|
|
4355
259
|
});
|
|
4356
|
-
if (
|
|
4357
|
-
|
|
260
|
+
if (p.isCancel(result)) process.exit(0);
|
|
261
|
+
password2 = result;
|
|
4358
262
|
}
|
|
4359
263
|
}
|
|
4360
|
-
const client = new
|
|
264
|
+
const client = new MobbinClient2();
|
|
4361
265
|
const authType = await client.auth.checkEmail(email);
|
|
4362
266
|
if (authType !== "password") {
|
|
4363
267
|
console.error(
|
|
@@ -4365,7 +269,7 @@ var loginCommand = defineCommand({
|
|
|
4365
269
|
);
|
|
4366
270
|
process.exit(1);
|
|
4367
271
|
}
|
|
4368
|
-
const session = await client.auth.login(email,
|
|
272
|
+
const session = await client.auth.login(email, password2);
|
|
4369
273
|
saveSession(session);
|
|
4370
274
|
console.log(
|
|
4371
275
|
JSON.stringify({
|
|
@@ -4376,7 +280,7 @@ var loginCommand = defineCommand({
|
|
|
4376
280
|
);
|
|
4377
281
|
}
|
|
4378
282
|
});
|
|
4379
|
-
var logoutCommand =
|
|
283
|
+
var logoutCommand = defineCommand2({
|
|
4380
284
|
meta: {
|
|
4381
285
|
name: "logout",
|
|
4382
286
|
description: "Logout from Mobbin"
|
|
@@ -4386,7 +290,7 @@ var logoutCommand = defineCommand({
|
|
|
4386
290
|
console.log(JSON.stringify({ status: "ok", message: "Logged out" }));
|
|
4387
291
|
}
|
|
4388
292
|
});
|
|
4389
|
-
var statusCommand =
|
|
293
|
+
var statusCommand = defineCommand2({
|
|
4390
294
|
meta: {
|
|
4391
295
|
name: "status",
|
|
4392
296
|
description: "Show current auth status"
|
|
@@ -4409,7 +313,7 @@ var statusCommand = defineCommand({
|
|
|
4409
313
|
);
|
|
4410
314
|
}
|
|
4411
315
|
});
|
|
4412
|
-
var authCommand =
|
|
316
|
+
var authCommand = defineCommand2({
|
|
4413
317
|
meta: {
|
|
4414
318
|
name: "auth",
|
|
4415
319
|
description: "Authentication management"
|
|
@@ -4422,7 +326,8 @@ var authCommand = defineCommand({
|
|
|
4422
326
|
});
|
|
4423
327
|
|
|
4424
328
|
// src/commands/collections.ts
|
|
4425
|
-
|
|
329
|
+
import { defineCommand as defineCommand3 } from "citty";
|
|
330
|
+
var listCommand2 = defineCommand3({
|
|
4426
331
|
meta: {
|
|
4427
332
|
name: "list",
|
|
4428
333
|
description: "List your collections"
|
|
@@ -4433,7 +338,7 @@ var listCommand2 = defineCommand({
|
|
|
4433
338
|
console.log(JSON.stringify(collections, null, 2));
|
|
4434
339
|
}
|
|
4435
340
|
});
|
|
4436
|
-
var collectionsCommand =
|
|
341
|
+
var collectionsCommand = defineCommand3({
|
|
4437
342
|
meta: {
|
|
4438
343
|
name: "collections",
|
|
4439
344
|
description: "Manage your collections"
|
|
@@ -4444,7 +349,8 @@ var collectionsCommand = defineCommand({
|
|
|
4444
349
|
});
|
|
4445
350
|
|
|
4446
351
|
// src/commands/filters.ts
|
|
4447
|
-
|
|
352
|
+
import { defineCommand as defineCommand4 } from "citty";
|
|
353
|
+
var listCommand3 = defineCommand4({
|
|
4448
354
|
meta: {
|
|
4449
355
|
name: "list",
|
|
4450
356
|
description: "List all available filter categories and values"
|
|
@@ -4465,10 +371,10 @@ var listCommand3 = defineCommand({
|
|
|
4465
371
|
const client = await getClient();
|
|
4466
372
|
const categories = await client.filters.list();
|
|
4467
373
|
if (args.category) {
|
|
4468
|
-
const cat = categories.find((
|
|
374
|
+
const cat = categories.find((c) => c.slug === args.category);
|
|
4469
375
|
if (!cat) {
|
|
4470
376
|
console.error(
|
|
4471
|
-
`Category "${args.category}" not found. Available: ${categories.map((
|
|
377
|
+
`Category "${args.category}" not found. Available: ${categories.map((c) => c.slug).join(", ")}`
|
|
4472
378
|
);
|
|
4473
379
|
process.exit(1);
|
|
4474
380
|
}
|
|
@@ -4488,11 +394,11 @@ var listCommand3 = defineCommand({
|
|
|
4488
394
|
if (args.table) {
|
|
4489
395
|
outputTable(
|
|
4490
396
|
["Slug", "Display Name", "Experience", "Entries"],
|
|
4491
|
-
categories.map((
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
String(
|
|
397
|
+
categories.map((c) => [
|
|
398
|
+
c.slug,
|
|
399
|
+
c.displayName,
|
|
400
|
+
c.experience,
|
|
401
|
+
String(c.subCategories.reduce((acc, s) => acc + s.entries.length, 0))
|
|
4496
402
|
])
|
|
4497
403
|
);
|
|
4498
404
|
return;
|
|
@@ -4500,7 +406,7 @@ var listCommand3 = defineCommand({
|
|
|
4500
406
|
console.log(JSON.stringify(categories, null, 2));
|
|
4501
407
|
}
|
|
4502
408
|
});
|
|
4503
|
-
var filtersCommand =
|
|
409
|
+
var filtersCommand = defineCommand4({
|
|
4504
410
|
meta: {
|
|
4505
411
|
name: "filters",
|
|
4506
412
|
description: "Browse available filter categories"
|
|
@@ -4515,9 +421,10 @@ import { execSync } from "child_process";
|
|
|
4515
421
|
import { writeFile } from "fs/promises";
|
|
4516
422
|
import { tmpdir } from "os";
|
|
4517
423
|
import { join as join2 } from "path";
|
|
4518
|
-
import { platform
|
|
424
|
+
import { platform } from "process";
|
|
425
|
+
import { defineCommand as defineCommand5 } from "citty";
|
|
4519
426
|
var copyImageToClipboard = (filePath) => {
|
|
4520
|
-
switch (
|
|
427
|
+
switch (platform) {
|
|
4521
428
|
case "darwin": {
|
|
4522
429
|
const pngPath = `${filePath}.png`;
|
|
4523
430
|
execSync(`sips -s format png "${filePath}" --out "${pngPath}" > /dev/null 2>&1`);
|
|
@@ -4546,10 +453,10 @@ var copyImageToClipboard = (filePath) => {
|
|
|
4546
453
|
);
|
|
4547
454
|
break;
|
|
4548
455
|
default:
|
|
4549
|
-
throw new Error(`Clipboard not supported on ${
|
|
456
|
+
throw new Error(`Clipboard not supported on ${platform}`);
|
|
4550
457
|
}
|
|
4551
458
|
};
|
|
4552
|
-
var searchCommand2 =
|
|
459
|
+
var searchCommand2 = defineCommand5({
|
|
4553
460
|
meta: {
|
|
4554
461
|
name: "search",
|
|
4555
462
|
description: "Search screens by patterns, elements, keywords"
|
|
@@ -4620,11 +527,11 @@ var searchCommand2 = defineCommand({
|
|
|
4620
527
|
if (args.table) {
|
|
4621
528
|
outputTable(
|
|
4622
529
|
["App", "Pattern", "Elements", "URL"],
|
|
4623
|
-
result.data.map((
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
530
|
+
result.data.map((s) => [
|
|
531
|
+
s.appName,
|
|
532
|
+
s.screenPatterns.join(", "),
|
|
533
|
+
s.screenElements.slice(0, 3).join(", "),
|
|
534
|
+
s.screenCdnImgSources?.src ?? s.screenUrl
|
|
4628
535
|
])
|
|
4629
536
|
);
|
|
4630
537
|
return;
|
|
@@ -4632,7 +539,7 @@ var searchCommand2 = defineCommand({
|
|
|
4632
539
|
console.log(JSON.stringify(result, null, 2));
|
|
4633
540
|
}
|
|
4634
541
|
});
|
|
4635
|
-
var downloadCommand =
|
|
542
|
+
var downloadCommand = defineCommand5({
|
|
4636
543
|
meta: {
|
|
4637
544
|
name: "download",
|
|
4638
545
|
description: "Download screen images"
|
|
@@ -4714,7 +621,7 @@ var downloadCommand = defineCommand({
|
|
|
4714
621
|
console.log(JSON.stringify({ downloaded }, null, 2));
|
|
4715
622
|
}
|
|
4716
623
|
});
|
|
4717
|
-
var copyCommand =
|
|
624
|
+
var copyCommand = defineCommand5({
|
|
4718
625
|
meta: {
|
|
4719
626
|
name: "copy",
|
|
4720
627
|
description: "Copy a screen image to clipboard"
|
|
@@ -4798,7 +705,7 @@ var copyCommand = defineCommand({
|
|
|
4798
705
|
);
|
|
4799
706
|
}
|
|
4800
707
|
});
|
|
4801
|
-
var screensCommand =
|
|
708
|
+
var screensCommand = defineCommand5({
|
|
4802
709
|
meta: {
|
|
4803
710
|
name: "screens",
|
|
4804
711
|
description: "Search and download screen designs"
|
|
@@ -4811,21 +718,22 @@ var screensCommand = defineCommand({
|
|
|
4811
718
|
});
|
|
4812
719
|
|
|
4813
720
|
// src/commands/version.ts
|
|
4814
|
-
|
|
721
|
+
import { defineCommand as defineCommand6 } from "citty";
|
|
722
|
+
var versionCommand = defineCommand6({
|
|
4815
723
|
meta: {
|
|
4816
724
|
name: "version",
|
|
4817
725
|
description: "Show CLI version"
|
|
4818
726
|
},
|
|
4819
727
|
run: () => {
|
|
4820
|
-
console.log(true ? "
|
|
728
|
+
console.log(true ? "1.0.0" : "0.0.0");
|
|
4821
729
|
}
|
|
4822
730
|
});
|
|
4823
731
|
|
|
4824
732
|
// src/index.ts
|
|
4825
|
-
var main =
|
|
733
|
+
var main = defineCommand7({
|
|
4826
734
|
meta: {
|
|
4827
735
|
name: "mobbin",
|
|
4828
|
-
version: true ? "
|
|
736
|
+
version: true ? "1.0.0" : "0.0.0",
|
|
4829
737
|
description: "CLI for Mobbin - browse and download design references"
|
|
4830
738
|
},
|
|
4831
739
|
subCommands: {
|