pf 0.0.1 → 0.0.2

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 ADDED
@@ -0,0 +1,2316 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+
34
+ // node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
35
+ var require_picocolors = __commonJS({
36
+ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
37
+ var p = process || {};
38
+ var argv = p.argv || [];
39
+ var env = p.env || {};
40
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
41
+ var formatter = (open, close, replace = open) => (input) => {
42
+ let string = "" + input, index = string.indexOf(close, open.length);
43
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
44
+ };
45
+ var replaceClose = (string, close, replace, index) => {
46
+ let result = "", cursor = 0;
47
+ do {
48
+ result += string.substring(cursor, index) + replace;
49
+ cursor = index + close.length;
50
+ index = string.indexOf(close, cursor);
51
+ } while (~index);
52
+ return result + string.substring(cursor);
53
+ };
54
+ var createColors = (enabled = isColorSupported) => {
55
+ let f = enabled ? formatter : () => String;
56
+ return {
57
+ isColorSupported: enabled,
58
+ reset: f("\x1B[0m", "\x1B[0m"),
59
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
60
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
61
+ italic: f("\x1B[3m", "\x1B[23m"),
62
+ underline: f("\x1B[4m", "\x1B[24m"),
63
+ inverse: f("\x1B[7m", "\x1B[27m"),
64
+ hidden: f("\x1B[8m", "\x1B[28m"),
65
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
66
+ black: f("\x1B[30m", "\x1B[39m"),
67
+ red: f("\x1B[31m", "\x1B[39m"),
68
+ green: f("\x1B[32m", "\x1B[39m"),
69
+ yellow: f("\x1B[33m", "\x1B[39m"),
70
+ blue: f("\x1B[34m", "\x1B[39m"),
71
+ magenta: f("\x1B[35m", "\x1B[39m"),
72
+ cyan: f("\x1B[36m", "\x1B[39m"),
73
+ white: f("\x1B[37m", "\x1B[39m"),
74
+ gray: f("\x1B[90m", "\x1B[39m"),
75
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
76
+ bgRed: f("\x1B[41m", "\x1B[49m"),
77
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
78
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
79
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
80
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
81
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
82
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
83
+ blackBright: f("\x1B[90m", "\x1B[39m"),
84
+ redBright: f("\x1B[91m", "\x1B[39m"),
85
+ greenBright: f("\x1B[92m", "\x1B[39m"),
86
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
87
+ blueBright: f("\x1B[94m", "\x1B[39m"),
88
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
89
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
90
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
91
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
92
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
93
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
94
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
95
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
96
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
97
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
98
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
99
+ };
100
+ };
101
+ module.exports = createColors();
102
+ module.exports.createColors = createColors;
103
+ }
104
+ });
105
+
106
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js
107
+ var require_debug = __commonJS({
108
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/debug.js"(exports, module) {
109
+ var messages = [];
110
+ var level = 0;
111
+ var debug = (msg, min) => {
112
+ if (level >= min) {
113
+ messages.push(msg);
114
+ }
115
+ };
116
+ debug.WARN = 1;
117
+ debug.INFO = 2;
118
+ debug.DEBUG = 3;
119
+ debug.reset = () => {
120
+ messages = [];
121
+ };
122
+ debug.setDebugLevel = (v) => {
123
+ level = v;
124
+ };
125
+ debug.warn = (msg) => debug(msg, debug.WARN);
126
+ debug.info = (msg) => debug(msg, debug.INFO);
127
+ debug.debug = (msg) => debug(msg, debug.DEBUG);
128
+ debug.debugMessages = () => messages;
129
+ module.exports = debug;
130
+ }
131
+ });
132
+
133
+ // node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
134
+ var require_ansi_regex = __commonJS({
135
+ "node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
136
+ "use strict";
137
+ module.exports = ({ onlyFirst = false } = {}) => {
138
+ const pattern = [
139
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
140
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
141
+ ].join("|");
142
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
143
+ };
144
+ }
145
+ });
146
+
147
+ // node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
148
+ var require_strip_ansi = __commonJS({
149
+ "node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
150
+ "use strict";
151
+ var ansiRegex = require_ansi_regex();
152
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
153
+ }
154
+ });
155
+
156
+ // node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
157
+ var require_is_fullwidth_code_point = __commonJS({
158
+ "node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
159
+ "use strict";
160
+ var isFullwidthCodePoint = (codePoint) => {
161
+ if (Number.isNaN(codePoint)) {
162
+ return false;
163
+ }
164
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
165
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
166
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
167
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
168
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
169
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
170
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
171
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
172
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
173
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
174
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
175
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
176
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
177
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
178
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
179
+ 131072 <= codePoint && codePoint <= 262141)) {
180
+ return true;
181
+ }
182
+ return false;
183
+ };
184
+ module.exports = isFullwidthCodePoint;
185
+ module.exports.default = isFullwidthCodePoint;
186
+ }
187
+ });
188
+
189
+ // node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
190
+ var require_emoji_regex = __commonJS({
191
+ "node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
192
+ "use strict";
193
+ module.exports = function() {
194
+ 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;
195
+ };
196
+ }
197
+ });
198
+
199
+ // node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
200
+ var require_string_width = __commonJS({
201
+ "node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
202
+ "use strict";
203
+ var stripAnsi = require_strip_ansi();
204
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
205
+ var emojiRegex = require_emoji_regex();
206
+ var stringWidth = (string) => {
207
+ if (typeof string !== "string" || string.length === 0) {
208
+ return 0;
209
+ }
210
+ string = stripAnsi(string);
211
+ if (string.length === 0) {
212
+ return 0;
213
+ }
214
+ string = string.replace(emojiRegex(), " ");
215
+ let width = 0;
216
+ for (let i = 0; i < string.length; i++) {
217
+ const code = string.codePointAt(i);
218
+ if (code <= 31 || code >= 127 && code <= 159) {
219
+ continue;
220
+ }
221
+ if (code >= 768 && code <= 879) {
222
+ continue;
223
+ }
224
+ if (code > 65535) {
225
+ i++;
226
+ }
227
+ width += isFullwidthCodePoint(code) ? 2 : 1;
228
+ }
229
+ return width;
230
+ };
231
+ module.exports = stringWidth;
232
+ module.exports.default = stringWidth;
233
+ }
234
+ });
235
+
236
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js
237
+ var require_utils = __commonJS({
238
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js"(exports, module) {
239
+ var stringWidth = require_string_width();
240
+ function codeRegex(capture) {
241
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
242
+ }
243
+ function strlen(str) {
244
+ let code = codeRegex();
245
+ let stripped = ("" + str).replace(code, "");
246
+ let split = stripped.split("\n");
247
+ return split.reduce(function(memo, s) {
248
+ return stringWidth(s) > memo ? stringWidth(s) : memo;
249
+ }, 0);
250
+ }
251
+ function repeat(str, times) {
252
+ return Array(times + 1).join(str);
253
+ }
254
+ function pad(str, len, pad2, dir) {
255
+ let length = strlen(str);
256
+ if (len + 1 >= length) {
257
+ let padlen = len - length;
258
+ switch (dir) {
259
+ case "right": {
260
+ str = repeat(pad2, padlen) + str;
261
+ break;
262
+ }
263
+ case "center": {
264
+ let right = Math.ceil(padlen / 2);
265
+ let left = padlen - right;
266
+ str = repeat(pad2, left) + str + repeat(pad2, right);
267
+ break;
268
+ }
269
+ default: {
270
+ str = str + repeat(pad2, padlen);
271
+ break;
272
+ }
273
+ }
274
+ }
275
+ return str;
276
+ }
277
+ var codeCache = {};
278
+ function addToCodeCache(name, on, off) {
279
+ on = "\x1B[" + on + "m";
280
+ off = "\x1B[" + off + "m";
281
+ codeCache[on] = { set: name, to: true };
282
+ codeCache[off] = { set: name, to: false };
283
+ codeCache[name] = { on, off };
284
+ }
285
+ addToCodeCache("bold", 1, 22);
286
+ addToCodeCache("italics", 3, 23);
287
+ addToCodeCache("underline", 4, 24);
288
+ addToCodeCache("inverse", 7, 27);
289
+ addToCodeCache("strikethrough", 9, 29);
290
+ function updateState(state, controlChars) {
291
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
292
+ if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
293
+ state.lastForegroundAdded = controlChars[0];
294
+ return;
295
+ }
296
+ if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
297
+ state.lastBackgroundAdded = controlChars[0];
298
+ return;
299
+ }
300
+ if (controlCode === 0) {
301
+ for (let i in state) {
302
+ if (Object.prototype.hasOwnProperty.call(state, i)) {
303
+ delete state[i];
304
+ }
305
+ }
306
+ return;
307
+ }
308
+ let info = codeCache[controlChars[0]];
309
+ if (info) {
310
+ state[info.set] = info.to;
311
+ }
312
+ }
313
+ function readState(line) {
314
+ let code = codeRegex(true);
315
+ let controlChars = code.exec(line);
316
+ let state = {};
317
+ while (controlChars !== null) {
318
+ updateState(state, controlChars);
319
+ controlChars = code.exec(line);
320
+ }
321
+ return state;
322
+ }
323
+ function unwindState(state, ret) {
324
+ let lastBackgroundAdded = state.lastBackgroundAdded;
325
+ let lastForegroundAdded = state.lastForegroundAdded;
326
+ delete state.lastBackgroundAdded;
327
+ delete state.lastForegroundAdded;
328
+ Object.keys(state).forEach(function(key) {
329
+ if (state[key]) {
330
+ ret += codeCache[key].off;
331
+ }
332
+ });
333
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
334
+ ret += "\x1B[49m";
335
+ }
336
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
337
+ ret += "\x1B[39m";
338
+ }
339
+ return ret;
340
+ }
341
+ function rewindState(state, ret) {
342
+ let lastBackgroundAdded = state.lastBackgroundAdded;
343
+ let lastForegroundAdded = state.lastForegroundAdded;
344
+ delete state.lastBackgroundAdded;
345
+ delete state.lastForegroundAdded;
346
+ Object.keys(state).forEach(function(key) {
347
+ if (state[key]) {
348
+ ret = codeCache[key].on + ret;
349
+ }
350
+ });
351
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
352
+ ret = lastBackgroundAdded + ret;
353
+ }
354
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
355
+ ret = lastForegroundAdded + ret;
356
+ }
357
+ return ret;
358
+ }
359
+ function truncateWidth(str, desiredLength) {
360
+ if (str.length === strlen(str)) {
361
+ return str.substr(0, desiredLength);
362
+ }
363
+ while (strlen(str) > desiredLength) {
364
+ str = str.slice(0, -1);
365
+ }
366
+ return str;
367
+ }
368
+ function truncateWidthWithAnsi(str, desiredLength) {
369
+ let code = codeRegex(true);
370
+ let split = str.split(codeRegex());
371
+ let splitIndex = 0;
372
+ let retLen = 0;
373
+ let ret = "";
374
+ let myArray;
375
+ let state = {};
376
+ while (retLen < desiredLength) {
377
+ myArray = code.exec(str);
378
+ let toAdd = split[splitIndex];
379
+ splitIndex++;
380
+ if (retLen + strlen(toAdd) > desiredLength) {
381
+ toAdd = truncateWidth(toAdd, desiredLength - retLen);
382
+ }
383
+ ret += toAdd;
384
+ retLen += strlen(toAdd);
385
+ if (retLen < desiredLength) {
386
+ if (!myArray) {
387
+ break;
388
+ }
389
+ ret += myArray[0];
390
+ updateState(state, myArray);
391
+ }
392
+ }
393
+ return unwindState(state, ret);
394
+ }
395
+ function truncate(str, desiredLength, truncateChar) {
396
+ truncateChar = truncateChar || "\u2026";
397
+ let lengthOfStr = strlen(str);
398
+ if (lengthOfStr <= desiredLength) {
399
+ return str;
400
+ }
401
+ desiredLength -= strlen(truncateChar);
402
+ let ret = truncateWidthWithAnsi(str, desiredLength);
403
+ ret += truncateChar;
404
+ const hrefTag = "\x1B]8;;\x07";
405
+ if (str.includes(hrefTag) && !ret.includes(hrefTag)) {
406
+ ret += hrefTag;
407
+ }
408
+ return ret;
409
+ }
410
+ function defaultOptions() {
411
+ return {
412
+ chars: {
413
+ top: "\u2500",
414
+ "top-mid": "\u252C",
415
+ "top-left": "\u250C",
416
+ "top-right": "\u2510",
417
+ bottom: "\u2500",
418
+ "bottom-mid": "\u2534",
419
+ "bottom-left": "\u2514",
420
+ "bottom-right": "\u2518",
421
+ left: "\u2502",
422
+ "left-mid": "\u251C",
423
+ mid: "\u2500",
424
+ "mid-mid": "\u253C",
425
+ right: "\u2502",
426
+ "right-mid": "\u2524",
427
+ middle: "\u2502"
428
+ },
429
+ truncate: "\u2026",
430
+ colWidths: [],
431
+ rowHeights: [],
432
+ colAligns: [],
433
+ rowAligns: [],
434
+ style: {
435
+ "padding-left": 1,
436
+ "padding-right": 1,
437
+ head: ["red"],
438
+ border: ["grey"],
439
+ compact: false
440
+ },
441
+ head: []
442
+ };
443
+ }
444
+ function mergeOptions(options, defaults) {
445
+ options = options || {};
446
+ defaults = defaults || defaultOptions();
447
+ let ret = Object.assign({}, defaults, options);
448
+ ret.chars = Object.assign({}, defaults.chars, options.chars);
449
+ ret.style = Object.assign({}, defaults.style, options.style);
450
+ return ret;
451
+ }
452
+ function wordWrap(maxLength, input) {
453
+ let lines = [];
454
+ let split = input.split(/(\s+)/g);
455
+ let line = [];
456
+ let lineLength = 0;
457
+ let whitespace;
458
+ for (let i = 0; i < split.length; i += 2) {
459
+ let word = split[i];
460
+ let newLength = lineLength + strlen(word);
461
+ if (lineLength > 0 && whitespace) {
462
+ newLength += whitespace.length;
463
+ }
464
+ if (newLength > maxLength) {
465
+ if (lineLength !== 0) {
466
+ lines.push(line.join(""));
467
+ }
468
+ line = [word];
469
+ lineLength = strlen(word);
470
+ } else {
471
+ line.push(whitespace || "", word);
472
+ lineLength = newLength;
473
+ }
474
+ whitespace = split[i + 1];
475
+ }
476
+ if (lineLength) {
477
+ lines.push(line.join(""));
478
+ }
479
+ return lines;
480
+ }
481
+ function textWrap(maxLength, input) {
482
+ let lines = [];
483
+ let line = "";
484
+ function pushLine(str, ws) {
485
+ if (line.length && ws) line += ws;
486
+ line += str;
487
+ while (line.length > maxLength) {
488
+ lines.push(line.slice(0, maxLength));
489
+ line = line.slice(maxLength);
490
+ }
491
+ }
492
+ let split = input.split(/(\s+)/g);
493
+ for (let i = 0; i < split.length; i += 2) {
494
+ pushLine(split[i], i && split[i - 1]);
495
+ }
496
+ if (line.length) lines.push(line);
497
+ return lines;
498
+ }
499
+ function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
500
+ let output = [];
501
+ input = input.split("\n");
502
+ const handler = wrapOnWordBoundary ? wordWrap : textWrap;
503
+ for (let i = 0; i < input.length; i++) {
504
+ output.push.apply(output, handler(maxLength, input[i]));
505
+ }
506
+ return output;
507
+ }
508
+ function colorizeLines(input) {
509
+ let state = {};
510
+ let output = [];
511
+ for (let i = 0; i < input.length; i++) {
512
+ let line = rewindState(state, input[i]);
513
+ state = readState(line);
514
+ let temp = Object.assign({}, state);
515
+ output.push(unwindState(temp, line));
516
+ }
517
+ return output;
518
+ }
519
+ function hyperlink(url, text) {
520
+ const OSC = "\x1B]";
521
+ const BEL = "\x07";
522
+ const SEP = ";";
523
+ return [OSC, "8", SEP, SEP, url || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
524
+ }
525
+ module.exports = {
526
+ strlen,
527
+ repeat,
528
+ pad,
529
+ truncate,
530
+ mergeOptions,
531
+ wordWrap: multiLineWordWrap,
532
+ colorizeLines,
533
+ hyperlink
534
+ };
535
+ }
536
+ });
537
+
538
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js
539
+ var require_styles = __commonJS({
540
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
541
+ var styles = {};
542
+ module["exports"] = styles;
543
+ var codes = {
544
+ reset: [0, 0],
545
+ bold: [1, 22],
546
+ dim: [2, 22],
547
+ italic: [3, 23],
548
+ underline: [4, 24],
549
+ inverse: [7, 27],
550
+ hidden: [8, 28],
551
+ strikethrough: [9, 29],
552
+ black: [30, 39],
553
+ red: [31, 39],
554
+ green: [32, 39],
555
+ yellow: [33, 39],
556
+ blue: [34, 39],
557
+ magenta: [35, 39],
558
+ cyan: [36, 39],
559
+ white: [37, 39],
560
+ gray: [90, 39],
561
+ grey: [90, 39],
562
+ brightRed: [91, 39],
563
+ brightGreen: [92, 39],
564
+ brightYellow: [93, 39],
565
+ brightBlue: [94, 39],
566
+ brightMagenta: [95, 39],
567
+ brightCyan: [96, 39],
568
+ brightWhite: [97, 39],
569
+ bgBlack: [40, 49],
570
+ bgRed: [41, 49],
571
+ bgGreen: [42, 49],
572
+ bgYellow: [43, 49],
573
+ bgBlue: [44, 49],
574
+ bgMagenta: [45, 49],
575
+ bgCyan: [46, 49],
576
+ bgWhite: [47, 49],
577
+ bgGray: [100, 49],
578
+ bgGrey: [100, 49],
579
+ bgBrightRed: [101, 49],
580
+ bgBrightGreen: [102, 49],
581
+ bgBrightYellow: [103, 49],
582
+ bgBrightBlue: [104, 49],
583
+ bgBrightMagenta: [105, 49],
584
+ bgBrightCyan: [106, 49],
585
+ bgBrightWhite: [107, 49],
586
+ // legacy styles for colors pre v1.0.0
587
+ blackBG: [40, 49],
588
+ redBG: [41, 49],
589
+ greenBG: [42, 49],
590
+ yellowBG: [43, 49],
591
+ blueBG: [44, 49],
592
+ magentaBG: [45, 49],
593
+ cyanBG: [46, 49],
594
+ whiteBG: [47, 49]
595
+ };
596
+ Object.keys(codes).forEach(function(key) {
597
+ var val = codes[key];
598
+ var style = styles[key] = [];
599
+ style.open = "\x1B[" + val[0] + "m";
600
+ style.close = "\x1B[" + val[1] + "m";
601
+ });
602
+ }
603
+ });
604
+
605
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js
606
+ var require_has_flag = __commonJS({
607
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
608
+ "use strict";
609
+ module.exports = function(flag, argv) {
610
+ argv = argv || process.argv;
611
+ var terminatorPos = argv.indexOf("--");
612
+ var prefix = /^-{1,2}/.test(flag) ? "" : "--";
613
+ var pos = argv.indexOf(prefix + flag);
614
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
615
+ };
616
+ }
617
+ });
618
+
619
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js
620
+ var require_supports_colors = __commonJS({
621
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
622
+ "use strict";
623
+ var os = __require("os");
624
+ var hasFlag = require_has_flag();
625
+ var env = process.env;
626
+ var forceColor = void 0;
627
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
628
+ forceColor = false;
629
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
630
+ forceColor = true;
631
+ }
632
+ if ("FORCE_COLOR" in env) {
633
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
634
+ }
635
+ function translateLevel(level) {
636
+ if (level === 0) {
637
+ return false;
638
+ }
639
+ return {
640
+ level,
641
+ hasBasic: true,
642
+ has256: level >= 2,
643
+ has16m: level >= 3
644
+ };
645
+ }
646
+ function supportsColor(stream) {
647
+ if (forceColor === false) {
648
+ return 0;
649
+ }
650
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
651
+ return 3;
652
+ }
653
+ if (hasFlag("color=256")) {
654
+ return 2;
655
+ }
656
+ if (stream && !stream.isTTY && forceColor !== true) {
657
+ return 0;
658
+ }
659
+ var min = forceColor ? 1 : 0;
660
+ if (process.platform === "win32") {
661
+ var osRelease = os.release().split(".");
662
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
663
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
664
+ }
665
+ return 1;
666
+ }
667
+ if ("CI" in env) {
668
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
669
+ return sign in env;
670
+ }) || env.CI_NAME === "codeship") {
671
+ return 1;
672
+ }
673
+ return min;
674
+ }
675
+ if ("TEAMCITY_VERSION" in env) {
676
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
677
+ }
678
+ if ("TERM_PROGRAM" in env) {
679
+ var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
680
+ switch (env.TERM_PROGRAM) {
681
+ case "iTerm.app":
682
+ return version >= 3 ? 3 : 2;
683
+ case "Hyper":
684
+ return 3;
685
+ case "Apple_Terminal":
686
+ return 2;
687
+ }
688
+ }
689
+ if (/-256(color)?$/i.test(env.TERM)) {
690
+ return 2;
691
+ }
692
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
693
+ return 1;
694
+ }
695
+ if ("COLORTERM" in env) {
696
+ return 1;
697
+ }
698
+ if (env.TERM === "dumb") {
699
+ return min;
700
+ }
701
+ return min;
702
+ }
703
+ function getSupportLevel(stream) {
704
+ var level = supportsColor(stream);
705
+ return translateLevel(level);
706
+ }
707
+ module.exports = {
708
+ supportsColor: getSupportLevel,
709
+ stdout: getSupportLevel(process.stdout),
710
+ stderr: getSupportLevel(process.stderr)
711
+ };
712
+ }
713
+ });
714
+
715
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
716
+ var require_trap = __commonJS({
717
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
718
+ module["exports"] = function runTheTrap(text, options) {
719
+ var result = "";
720
+ text = text || "Run the trap, drop the bass";
721
+ text = text.split("");
722
+ var trap = {
723
+ a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
724
+ b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
725
+ c: ["\xA9", "\u023B", "\u03FE"],
726
+ d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
727
+ e: [
728
+ "\xCB",
729
+ "\u0115",
730
+ "\u018E",
731
+ "\u0258",
732
+ "\u03A3",
733
+ "\u03BE",
734
+ "\u04BC",
735
+ "\u0A6C"
736
+ ],
737
+ f: ["\u04FA"],
738
+ g: ["\u0262"],
739
+ h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
740
+ i: ["\u0F0F"],
741
+ j: ["\u0134"],
742
+ k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
743
+ l: ["\u0139"],
744
+ m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
745
+ n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
746
+ o: [
747
+ "\xD8",
748
+ "\xF5",
749
+ "\xF8",
750
+ "\u01FE",
751
+ "\u0298",
752
+ "\u047A",
753
+ "\u05DD",
754
+ "\u06DD",
755
+ "\u0E4F"
756
+ ],
757
+ p: ["\u01F7", "\u048E"],
758
+ q: ["\u09CD"],
759
+ r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
760
+ s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
761
+ t: ["\u0141", "\u0166", "\u0373"],
762
+ u: ["\u01B1", "\u054D"],
763
+ v: ["\u05D8"],
764
+ w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
765
+ x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
766
+ y: ["\xA5", "\u04B0", "\u04CB"],
767
+ z: ["\u01B5", "\u0240"]
768
+ };
769
+ text.forEach(function(c) {
770
+ c = c.toLowerCase();
771
+ var chars = trap[c] || [" "];
772
+ var rand = Math.floor(Math.random() * chars.length);
773
+ if (typeof trap[c] !== "undefined") {
774
+ result += trap[c][rand];
775
+ } else {
776
+ result += c;
777
+ }
778
+ });
779
+ return result;
780
+ };
781
+ }
782
+ });
783
+
784
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
785
+ var require_zalgo = __commonJS({
786
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
787
+ module["exports"] = function zalgo(text, options) {
788
+ text = text || " he is here ";
789
+ var soul = {
790
+ "up": [
791
+ "\u030D",
792
+ "\u030E",
793
+ "\u0304",
794
+ "\u0305",
795
+ "\u033F",
796
+ "\u0311",
797
+ "\u0306",
798
+ "\u0310",
799
+ "\u0352",
800
+ "\u0357",
801
+ "\u0351",
802
+ "\u0307",
803
+ "\u0308",
804
+ "\u030A",
805
+ "\u0342",
806
+ "\u0313",
807
+ "\u0308",
808
+ "\u034A",
809
+ "\u034B",
810
+ "\u034C",
811
+ "\u0303",
812
+ "\u0302",
813
+ "\u030C",
814
+ "\u0350",
815
+ "\u0300",
816
+ "\u0301",
817
+ "\u030B",
818
+ "\u030F",
819
+ "\u0312",
820
+ "\u0313",
821
+ "\u0314",
822
+ "\u033D",
823
+ "\u0309",
824
+ "\u0363",
825
+ "\u0364",
826
+ "\u0365",
827
+ "\u0366",
828
+ "\u0367",
829
+ "\u0368",
830
+ "\u0369",
831
+ "\u036A",
832
+ "\u036B",
833
+ "\u036C",
834
+ "\u036D",
835
+ "\u036E",
836
+ "\u036F",
837
+ "\u033E",
838
+ "\u035B",
839
+ "\u0346",
840
+ "\u031A"
841
+ ],
842
+ "down": [
843
+ "\u0316",
844
+ "\u0317",
845
+ "\u0318",
846
+ "\u0319",
847
+ "\u031C",
848
+ "\u031D",
849
+ "\u031E",
850
+ "\u031F",
851
+ "\u0320",
852
+ "\u0324",
853
+ "\u0325",
854
+ "\u0326",
855
+ "\u0329",
856
+ "\u032A",
857
+ "\u032B",
858
+ "\u032C",
859
+ "\u032D",
860
+ "\u032E",
861
+ "\u032F",
862
+ "\u0330",
863
+ "\u0331",
864
+ "\u0332",
865
+ "\u0333",
866
+ "\u0339",
867
+ "\u033A",
868
+ "\u033B",
869
+ "\u033C",
870
+ "\u0345",
871
+ "\u0347",
872
+ "\u0348",
873
+ "\u0349",
874
+ "\u034D",
875
+ "\u034E",
876
+ "\u0353",
877
+ "\u0354",
878
+ "\u0355",
879
+ "\u0356",
880
+ "\u0359",
881
+ "\u035A",
882
+ "\u0323"
883
+ ],
884
+ "mid": [
885
+ "\u0315",
886
+ "\u031B",
887
+ "\u0300",
888
+ "\u0301",
889
+ "\u0358",
890
+ "\u0321",
891
+ "\u0322",
892
+ "\u0327",
893
+ "\u0328",
894
+ "\u0334",
895
+ "\u0335",
896
+ "\u0336",
897
+ "\u035C",
898
+ "\u035D",
899
+ "\u035E",
900
+ "\u035F",
901
+ "\u0360",
902
+ "\u0362",
903
+ "\u0338",
904
+ "\u0337",
905
+ "\u0361",
906
+ " \u0489"
907
+ ]
908
+ };
909
+ var all = [].concat(soul.up, soul.down, soul.mid);
910
+ function randomNumber(range) {
911
+ var r = Math.floor(Math.random() * range);
912
+ return r;
913
+ }
914
+ function isChar(character) {
915
+ var bool = false;
916
+ all.filter(function(i) {
917
+ bool = i === character;
918
+ });
919
+ return bool;
920
+ }
921
+ function heComes(text2, options2) {
922
+ var result = "";
923
+ var counts;
924
+ var l;
925
+ options2 = options2 || {};
926
+ options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
927
+ options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
928
+ options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
929
+ options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
930
+ text2 = text2.split("");
931
+ for (l in text2) {
932
+ if (isChar(l)) {
933
+ continue;
934
+ }
935
+ result = result + text2[l];
936
+ counts = { "up": 0, "down": 0, "mid": 0 };
937
+ switch (options2.size) {
938
+ case "mini":
939
+ counts.up = randomNumber(8);
940
+ counts.mid = randomNumber(2);
941
+ counts.down = randomNumber(8);
942
+ break;
943
+ case "maxi":
944
+ counts.up = randomNumber(16) + 3;
945
+ counts.mid = randomNumber(4) + 1;
946
+ counts.down = randomNumber(64) + 3;
947
+ break;
948
+ default:
949
+ counts.up = randomNumber(8) + 1;
950
+ counts.mid = randomNumber(6) / 2;
951
+ counts.down = randomNumber(8) + 1;
952
+ break;
953
+ }
954
+ var arr = ["up", "mid", "down"];
955
+ for (var d in arr) {
956
+ var index = arr[d];
957
+ for (var i = 0; i <= counts[index]; i++) {
958
+ if (options2[index]) {
959
+ result = result + soul[index][randomNumber(soul[index].length)];
960
+ }
961
+ }
962
+ }
963
+ }
964
+ return result;
965
+ }
966
+ return heComes(text, options);
967
+ };
968
+ }
969
+ });
970
+
971
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js
972
+ var require_america = __commonJS({
973
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
974
+ module["exports"] = function(colors) {
975
+ return function(letter, i, exploded) {
976
+ if (letter === " ") return letter;
977
+ switch (i % 3) {
978
+ case 0:
979
+ return colors.red(letter);
980
+ case 1:
981
+ return colors.white(letter);
982
+ case 2:
983
+ return colors.blue(letter);
984
+ }
985
+ };
986
+ };
987
+ }
988
+ });
989
+
990
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js
991
+ var require_zebra = __commonJS({
992
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
993
+ module["exports"] = function(colors) {
994
+ return function(letter, i, exploded) {
995
+ return i % 2 === 0 ? letter : colors.inverse(letter);
996
+ };
997
+ };
998
+ }
999
+ });
1000
+
1001
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js
1002
+ var require_rainbow = __commonJS({
1003
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
1004
+ module["exports"] = function(colors) {
1005
+ var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
1006
+ return function(letter, i, exploded) {
1007
+ if (letter === " ") {
1008
+ return letter;
1009
+ } else {
1010
+ return colors[rainbowColors[i++ % rainbowColors.length]](letter);
1011
+ }
1012
+ };
1013
+ };
1014
+ }
1015
+ });
1016
+
1017
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js
1018
+ var require_random = __commonJS({
1019
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
1020
+ module["exports"] = function(colors) {
1021
+ var available = [
1022
+ "underline",
1023
+ "inverse",
1024
+ "grey",
1025
+ "yellow",
1026
+ "red",
1027
+ "green",
1028
+ "blue",
1029
+ "white",
1030
+ "cyan",
1031
+ "magenta",
1032
+ "brightYellow",
1033
+ "brightRed",
1034
+ "brightGreen",
1035
+ "brightBlue",
1036
+ "brightWhite",
1037
+ "brightCyan",
1038
+ "brightMagenta"
1039
+ ];
1040
+ return function(letter, i, exploded) {
1041
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
1042
+ };
1043
+ };
1044
+ }
1045
+ });
1046
+
1047
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js
1048
+ var require_colors = __commonJS({
1049
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports, module) {
1050
+ var colors = {};
1051
+ module["exports"] = colors;
1052
+ colors.themes = {};
1053
+ var util = __require("util");
1054
+ var ansiStyles = colors.styles = require_styles();
1055
+ var defineProps = Object.defineProperties;
1056
+ var newLineRegex = new RegExp(/[\r\n]+/g);
1057
+ colors.supportsColor = require_supports_colors().supportsColor;
1058
+ if (typeof colors.enabled === "undefined") {
1059
+ colors.enabled = colors.supportsColor() !== false;
1060
+ }
1061
+ colors.enable = function() {
1062
+ colors.enabled = true;
1063
+ };
1064
+ colors.disable = function() {
1065
+ colors.enabled = false;
1066
+ };
1067
+ colors.stripColors = colors.strip = function(str) {
1068
+ return ("" + str).replace(/\x1B\[\d+m/g, "");
1069
+ };
1070
+ var stylize = colors.stylize = function stylize2(str, style) {
1071
+ if (!colors.enabled) {
1072
+ return str + "";
1073
+ }
1074
+ var styleMap = ansiStyles[style];
1075
+ if (!styleMap && style in colors) {
1076
+ return colors[style](str);
1077
+ }
1078
+ return styleMap.open + str + styleMap.close;
1079
+ };
1080
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
1081
+ var escapeStringRegexp = function(str) {
1082
+ if (typeof str !== "string") {
1083
+ throw new TypeError("Expected a string");
1084
+ }
1085
+ return str.replace(matchOperatorsRe, "\\$&");
1086
+ };
1087
+ function build(_styles) {
1088
+ var builder = function builder2() {
1089
+ return applyStyle.apply(builder2, arguments);
1090
+ };
1091
+ builder._styles = _styles;
1092
+ builder.__proto__ = proto;
1093
+ return builder;
1094
+ }
1095
+ var styles = function() {
1096
+ var ret = {};
1097
+ ansiStyles.grey = ansiStyles.gray;
1098
+ Object.keys(ansiStyles).forEach(function(key) {
1099
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
1100
+ ret[key] = {
1101
+ get: function() {
1102
+ return build(this._styles.concat(key));
1103
+ }
1104
+ };
1105
+ });
1106
+ return ret;
1107
+ }();
1108
+ var proto = defineProps(function colors2() {
1109
+ }, styles);
1110
+ function applyStyle() {
1111
+ var args2 = Array.prototype.slice.call(arguments);
1112
+ var str = args2.map(function(arg) {
1113
+ if (arg != null && arg.constructor === String) {
1114
+ return arg;
1115
+ } else {
1116
+ return util.inspect(arg);
1117
+ }
1118
+ }).join(" ");
1119
+ if (!colors.enabled || !str) {
1120
+ return str;
1121
+ }
1122
+ var newLinesPresent = str.indexOf("\n") != -1;
1123
+ var nestedStyles = this._styles;
1124
+ var i = nestedStyles.length;
1125
+ while (i--) {
1126
+ var code = ansiStyles[nestedStyles[i]];
1127
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
1128
+ if (newLinesPresent) {
1129
+ str = str.replace(newLineRegex, function(match) {
1130
+ return code.close + match + code.open;
1131
+ });
1132
+ }
1133
+ }
1134
+ return str;
1135
+ }
1136
+ colors.setTheme = function(theme) {
1137
+ if (typeof theme === "string") {
1138
+ 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'));");
1139
+ return;
1140
+ }
1141
+ for (var style in theme) {
1142
+ (function(style2) {
1143
+ colors[style2] = function(str) {
1144
+ if (typeof theme[style2] === "object") {
1145
+ var out = str;
1146
+ for (var i in theme[style2]) {
1147
+ out = colors[theme[style2][i]](out);
1148
+ }
1149
+ return out;
1150
+ }
1151
+ return colors[theme[style2]](str);
1152
+ };
1153
+ })(style);
1154
+ }
1155
+ };
1156
+ function init() {
1157
+ var ret = {};
1158
+ Object.keys(styles).forEach(function(name) {
1159
+ ret[name] = {
1160
+ get: function() {
1161
+ return build([name]);
1162
+ }
1163
+ };
1164
+ });
1165
+ return ret;
1166
+ }
1167
+ var sequencer = function sequencer2(map2, str) {
1168
+ var exploded = str.split("");
1169
+ exploded = exploded.map(map2);
1170
+ return exploded.join("");
1171
+ };
1172
+ colors.trap = require_trap();
1173
+ colors.zalgo = require_zalgo();
1174
+ colors.maps = {};
1175
+ colors.maps.america = require_america()(colors);
1176
+ colors.maps.zebra = require_zebra()(colors);
1177
+ colors.maps.rainbow = require_rainbow()(colors);
1178
+ colors.maps.random = require_random()(colors);
1179
+ for (map in colors.maps) {
1180
+ (function(map2) {
1181
+ colors[map2] = function(str) {
1182
+ return sequencer(colors.maps[map2], str);
1183
+ };
1184
+ })(map);
1185
+ }
1186
+ var map;
1187
+ defineProps(colors, init());
1188
+ }
1189
+ });
1190
+
1191
+ // node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js
1192
+ var require_safe = __commonJS({
1193
+ "node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports, module) {
1194
+ var colors = require_colors();
1195
+ module["exports"] = colors;
1196
+ }
1197
+ });
1198
+
1199
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js
1200
+ var require_cell = __commonJS({
1201
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/cell.js"(exports, module) {
1202
+ var { info, debug } = require_debug();
1203
+ var utils = require_utils();
1204
+ var Cell = class _Cell {
1205
+ /**
1206
+ * A representation of a cell within the table.
1207
+ * Implementations must have `init` and `draw` methods,
1208
+ * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
1209
+ * @param options
1210
+ * @constructor
1211
+ */
1212
+ constructor(options) {
1213
+ this.setOptions(options);
1214
+ this.x = null;
1215
+ this.y = null;
1216
+ }
1217
+ setOptions(options) {
1218
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof options) !== -1) {
1219
+ options = { content: "" + options };
1220
+ }
1221
+ options = options || {};
1222
+ this.options = options;
1223
+ let content = options.content;
1224
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof content) !== -1) {
1225
+ this.content = String(content);
1226
+ } else if (!content) {
1227
+ this.content = this.options.href || "";
1228
+ } else {
1229
+ throw new Error("Content needs to be a primitive, got: " + typeof content);
1230
+ }
1231
+ this.colSpan = options.colSpan || 1;
1232
+ this.rowSpan = options.rowSpan || 1;
1233
+ if (this.options.href) {
1234
+ Object.defineProperty(this, "href", {
1235
+ get() {
1236
+ return this.options.href;
1237
+ }
1238
+ });
1239
+ }
1240
+ }
1241
+ mergeTableOptions(tableOptions, cells) {
1242
+ this.cells = cells;
1243
+ let optionsChars = this.options.chars || {};
1244
+ let tableChars = tableOptions.chars;
1245
+ let chars = this.chars = {};
1246
+ CHAR_NAMES.forEach(function(name) {
1247
+ setOption(optionsChars, tableChars, name, chars);
1248
+ });
1249
+ this.truncate = this.options.truncate || tableOptions.truncate;
1250
+ let style = this.options.style = this.options.style || {};
1251
+ let tableStyle = tableOptions.style;
1252
+ setOption(style, tableStyle, "padding-left", this);
1253
+ setOption(style, tableStyle, "padding-right", this);
1254
+ this.head = style.head || tableStyle.head;
1255
+ this.border = style.border || tableStyle.border;
1256
+ this.fixedWidth = tableOptions.colWidths[this.x];
1257
+ this.lines = this.computeLines(tableOptions);
1258
+ this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
1259
+ this.desiredHeight = this.lines.length;
1260
+ }
1261
+ computeLines(tableOptions) {
1262
+ const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
1263
+ const { wordWrap = tableWordWrap } = this.options;
1264
+ if (this.fixedWidth && wordWrap) {
1265
+ this.fixedWidth -= this.paddingLeft + this.paddingRight;
1266
+ if (this.colSpan) {
1267
+ let i = 1;
1268
+ while (i < this.colSpan) {
1269
+ this.fixedWidth += tableOptions.colWidths[this.x + i];
1270
+ i++;
1271
+ }
1272
+ }
1273
+ const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
1274
+ const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
1275
+ return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
1276
+ }
1277
+ return this.wrapLines(this.content.split("\n"));
1278
+ }
1279
+ wrapLines(computedLines) {
1280
+ const lines = utils.colorizeLines(computedLines);
1281
+ if (this.href) {
1282
+ return lines.map((line) => utils.hyperlink(this.href, line));
1283
+ }
1284
+ return lines;
1285
+ }
1286
+ /**
1287
+ * Initializes the Cells data structure.
1288
+ *
1289
+ * @param tableOptions - A fully populated set of tableOptions.
1290
+ * In addition to the standard default values, tableOptions must have fully populated the
1291
+ * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
1292
+ * of columns or rows (respectively) in this table, and each array item must be a Number.
1293
+ *
1294
+ */
1295
+ init(tableOptions) {
1296
+ let x = this.x;
1297
+ let y = this.y;
1298
+ this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
1299
+ this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
1300
+ this.width = this.widths.reduce(sumPlusOne, -1);
1301
+ this.height = this.heights.reduce(sumPlusOne, -1);
1302
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
1303
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
1304
+ this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
1305
+ }
1306
+ /**
1307
+ * Draws the given line of the cell.
1308
+ * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
1309
+ * @param lineNum - can be `top`, `bottom` or a numerical line number.
1310
+ * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
1311
+ * many rows below it's being called from. Otherwise it's undefined.
1312
+ * @returns {String} The representation of this line.
1313
+ */
1314
+ draw(lineNum, spanningCell) {
1315
+ if (lineNum == "top") return this.drawTop(this.drawRight);
1316
+ if (lineNum == "bottom") return this.drawBottom(this.drawRight);
1317
+ let content = utils.truncate(this.content, 10, this.truncate);
1318
+ if (!lineNum) {
1319
+ info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
1320
+ } else {
1321
+ }
1322
+ let padLen = Math.max(this.height - this.lines.length, 0);
1323
+ let padTop;
1324
+ switch (this.vAlign) {
1325
+ case "center":
1326
+ padTop = Math.ceil(padLen / 2);
1327
+ break;
1328
+ case "bottom":
1329
+ padTop = padLen;
1330
+ break;
1331
+ default:
1332
+ padTop = 0;
1333
+ }
1334
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
1335
+ return this.drawEmpty(this.drawRight, spanningCell);
1336
+ }
1337
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
1338
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
1339
+ }
1340
+ /**
1341
+ * Renders the top line of the cell.
1342
+ * @param drawRight - true if this method should render the right edge of the cell.
1343
+ * @returns {String}
1344
+ */
1345
+ drawTop(drawRight) {
1346
+ let content = [];
1347
+ if (this.cells) {
1348
+ this.widths.forEach(function(width, index) {
1349
+ content.push(this._topLeftChar(index));
1350
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
1351
+ }, this);
1352
+ } else {
1353
+ content.push(this._topLeftChar(0));
1354
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
1355
+ }
1356
+ if (drawRight) {
1357
+ content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
1358
+ }
1359
+ return this.wrapWithStyleColors("border", content.join(""));
1360
+ }
1361
+ _topLeftChar(offset) {
1362
+ let x = this.x + offset;
1363
+ let leftChar;
1364
+ if (this.y == 0) {
1365
+ leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
1366
+ } else {
1367
+ if (x == 0) {
1368
+ leftChar = "leftMid";
1369
+ } else {
1370
+ leftChar = offset == 0 ? "midMid" : "bottomMid";
1371
+ if (this.cells) {
1372
+ let spanAbove = this.cells[this.y - 1][x] instanceof _Cell.ColSpanCell;
1373
+ if (spanAbove) {
1374
+ leftChar = offset == 0 ? "topMid" : "mid";
1375
+ }
1376
+ if (offset == 0) {
1377
+ let i = 1;
1378
+ while (this.cells[this.y][x - i] instanceof _Cell.ColSpanCell) {
1379
+ i++;
1380
+ }
1381
+ if (this.cells[this.y][x - i] instanceof _Cell.RowSpanCell) {
1382
+ leftChar = "leftMid";
1383
+ }
1384
+ }
1385
+ }
1386
+ }
1387
+ }
1388
+ return this.chars[leftChar];
1389
+ }
1390
+ wrapWithStyleColors(styleProperty, content) {
1391
+ if (this[styleProperty] && this[styleProperty].length) {
1392
+ try {
1393
+ let colors = require_safe();
1394
+ for (let i = this[styleProperty].length - 1; i >= 0; i--) {
1395
+ colors = colors[this[styleProperty][i]];
1396
+ }
1397
+ return colors(content);
1398
+ } catch (e) {
1399
+ return content;
1400
+ }
1401
+ } else {
1402
+ return content;
1403
+ }
1404
+ }
1405
+ /**
1406
+ * Renders a line of text.
1407
+ * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
1408
+ * There may be top-padding above the first line of text.
1409
+ * @param drawRight - true if this method should render the right edge of the cell.
1410
+ * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
1411
+ * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
1412
+ * only include the truncation symbol if the text will not fit horizontally within the cell width.
1413
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1414
+ * @returns {String}
1415
+ */
1416
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
1417
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
1418
+ if (this.x && spanningCell && this.cells) {
1419
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1420
+ while (cellLeft instanceof ColSpanCell) {
1421
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1422
+ }
1423
+ if (!(cellLeft instanceof RowSpanCell)) {
1424
+ left = this.chars["rightMid"];
1425
+ }
1426
+ }
1427
+ let leftPadding = utils.repeat(" ", this.paddingLeft);
1428
+ let right = drawRight ? this.chars["right"] : "";
1429
+ let rightPadding = utils.repeat(" ", this.paddingRight);
1430
+ let line = this.lines[lineNum];
1431
+ let len = this.width - (this.paddingLeft + this.paddingRight);
1432
+ if (forceTruncationSymbol) line += this.truncate || "\u2026";
1433
+ let content = utils.truncate(line, len, this.truncate);
1434
+ content = utils.pad(content, len, " ", this.hAlign);
1435
+ content = leftPadding + content + rightPadding;
1436
+ return this.stylizeLine(left, content, right);
1437
+ }
1438
+ stylizeLine(left, content, right) {
1439
+ left = this.wrapWithStyleColors("border", left);
1440
+ right = this.wrapWithStyleColors("border", right);
1441
+ if (this.y === 0) {
1442
+ content = this.wrapWithStyleColors("head", content);
1443
+ }
1444
+ return left + content + right;
1445
+ }
1446
+ /**
1447
+ * Renders the bottom line of the cell.
1448
+ * @param drawRight - true if this method should render the right edge of the cell.
1449
+ * @returns {String}
1450
+ */
1451
+ drawBottom(drawRight) {
1452
+ let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
1453
+ let content = utils.repeat(this.chars.bottom, this.width);
1454
+ let right = drawRight ? this.chars["bottomRight"] : "";
1455
+ return this.wrapWithStyleColors("border", left + content + right);
1456
+ }
1457
+ /**
1458
+ * Renders a blank line of text within the cell. Used for top and/or bottom padding.
1459
+ * @param drawRight - true if this method should render the right edge of the cell.
1460
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
1461
+ * @returns {String}
1462
+ */
1463
+ drawEmpty(drawRight, spanningCell) {
1464
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
1465
+ if (this.x && spanningCell && this.cells) {
1466
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
1467
+ while (cellLeft instanceof ColSpanCell) {
1468
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
1469
+ }
1470
+ if (!(cellLeft instanceof RowSpanCell)) {
1471
+ left = this.chars["rightMid"];
1472
+ }
1473
+ }
1474
+ let right = drawRight ? this.chars["right"] : "";
1475
+ let content = utils.repeat(" ", this.width);
1476
+ return this.stylizeLine(left, content, right);
1477
+ }
1478
+ };
1479
+ var ColSpanCell = class {
1480
+ /**
1481
+ * A Cell that doesn't do anything. It just draws empty lines.
1482
+ * Used as a placeholder in column spanning.
1483
+ * @constructor
1484
+ */
1485
+ constructor() {
1486
+ }
1487
+ draw(lineNum) {
1488
+ if (typeof lineNum === "number") {
1489
+ debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
1490
+ }
1491
+ return "";
1492
+ }
1493
+ init() {
1494
+ }
1495
+ mergeTableOptions() {
1496
+ }
1497
+ };
1498
+ var RowSpanCell = class {
1499
+ /**
1500
+ * A placeholder Cell for a Cell that spans multiple rows.
1501
+ * It delegates rendering to the original cell, but adds the appropriate offset.
1502
+ * @param originalCell
1503
+ * @constructor
1504
+ */
1505
+ constructor(originalCell) {
1506
+ this.originalCell = originalCell;
1507
+ }
1508
+ init(tableOptions) {
1509
+ let y = this.y;
1510
+ let originalY = this.originalCell.y;
1511
+ this.cellOffset = y - originalY;
1512
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
1513
+ }
1514
+ draw(lineNum) {
1515
+ if (lineNum == "top") {
1516
+ return this.originalCell.draw(this.offset, this.cellOffset);
1517
+ }
1518
+ if (lineNum == "bottom") {
1519
+ return this.originalCell.draw("bottom");
1520
+ }
1521
+ debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
1522
+ return this.originalCell.draw(this.offset + 1 + lineNum);
1523
+ }
1524
+ mergeTableOptions() {
1525
+ }
1526
+ };
1527
+ function firstDefined(...args2) {
1528
+ return args2.filter((v) => v !== void 0 && v !== null).shift();
1529
+ }
1530
+ function setOption(objA, objB, nameB, targetObj) {
1531
+ let nameA = nameB.split("-");
1532
+ if (nameA.length > 1) {
1533
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
1534
+ nameA = nameA.join("");
1535
+ targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
1536
+ } else {
1537
+ targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
1538
+ }
1539
+ }
1540
+ function findDimension(dimensionTable, startingIndex, span) {
1541
+ let ret = dimensionTable[startingIndex];
1542
+ for (let i = 1; i < span; i++) {
1543
+ ret += 1 + dimensionTable[startingIndex + i];
1544
+ }
1545
+ return ret;
1546
+ }
1547
+ function sumPlusOne(a, b) {
1548
+ return a + b + 1;
1549
+ }
1550
+ var CHAR_NAMES = [
1551
+ "top",
1552
+ "top-mid",
1553
+ "top-left",
1554
+ "top-right",
1555
+ "bottom",
1556
+ "bottom-mid",
1557
+ "bottom-left",
1558
+ "bottom-right",
1559
+ "left",
1560
+ "left-mid",
1561
+ "mid",
1562
+ "mid-mid",
1563
+ "right",
1564
+ "right-mid",
1565
+ "middle"
1566
+ ];
1567
+ module.exports = Cell;
1568
+ module.exports.ColSpanCell = ColSpanCell;
1569
+ module.exports.RowSpanCell = RowSpanCell;
1570
+ }
1571
+ });
1572
+
1573
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js
1574
+ var require_layout_manager = __commonJS({
1575
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/layout-manager.js"(exports, module) {
1576
+ var { warn, debug } = require_debug();
1577
+ var Cell = require_cell();
1578
+ var { ColSpanCell, RowSpanCell } = Cell;
1579
+ (function() {
1580
+ function next(alloc, col) {
1581
+ if (alloc[col] > 0) {
1582
+ return next(alloc, col + 1);
1583
+ }
1584
+ return col;
1585
+ }
1586
+ function layoutTable(table) {
1587
+ let alloc = {};
1588
+ table.forEach(function(row, rowIndex) {
1589
+ let col = 0;
1590
+ row.forEach(function(cell) {
1591
+ cell.y = rowIndex;
1592
+ cell.x = rowIndex ? next(alloc, col) : col;
1593
+ const rowSpan = cell.rowSpan || 1;
1594
+ const colSpan = cell.colSpan || 1;
1595
+ if (rowSpan > 1) {
1596
+ for (let cs = 0; cs < colSpan; cs++) {
1597
+ alloc[cell.x + cs] = rowSpan;
1598
+ }
1599
+ }
1600
+ col = cell.x + colSpan;
1601
+ });
1602
+ Object.keys(alloc).forEach((idx) => {
1603
+ alloc[idx]--;
1604
+ if (alloc[idx] < 1) delete alloc[idx];
1605
+ });
1606
+ });
1607
+ }
1608
+ function maxWidth(table) {
1609
+ let mw = 0;
1610
+ table.forEach(function(row) {
1611
+ row.forEach(function(cell) {
1612
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
1613
+ });
1614
+ });
1615
+ return mw;
1616
+ }
1617
+ function maxHeight(table) {
1618
+ return table.length;
1619
+ }
1620
+ function cellsConflict(cell1, cell2) {
1621
+ let yMin1 = cell1.y;
1622
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
1623
+ let yMin2 = cell2.y;
1624
+ let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
1625
+ let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
1626
+ let xMin1 = cell1.x;
1627
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
1628
+ let xMin2 = cell2.x;
1629
+ let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
1630
+ let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
1631
+ return yConflict && xConflict;
1632
+ }
1633
+ function conflictExists(rows, x, y) {
1634
+ let i_max = Math.min(rows.length - 1, y);
1635
+ let cell = { x, y };
1636
+ for (let i = 0; i <= i_max; i++) {
1637
+ let row = rows[i];
1638
+ for (let j = 0; j < row.length; j++) {
1639
+ if (cellsConflict(cell, row[j])) {
1640
+ return true;
1641
+ }
1642
+ }
1643
+ }
1644
+ return false;
1645
+ }
1646
+ function allBlank(rows, y, xMin, xMax) {
1647
+ for (let x = xMin; x < xMax; x++) {
1648
+ if (conflictExists(rows, x, y)) {
1649
+ return false;
1650
+ }
1651
+ }
1652
+ return true;
1653
+ }
1654
+ function addRowSpanCells(table) {
1655
+ table.forEach(function(row, rowIndex) {
1656
+ row.forEach(function(cell) {
1657
+ for (let i = 1; i < cell.rowSpan; i++) {
1658
+ let rowSpanCell = new RowSpanCell(cell);
1659
+ rowSpanCell.x = cell.x;
1660
+ rowSpanCell.y = cell.y + i;
1661
+ rowSpanCell.colSpan = cell.colSpan;
1662
+ insertCell(rowSpanCell, table[rowIndex + i]);
1663
+ }
1664
+ });
1665
+ });
1666
+ }
1667
+ function addColSpanCells(cellRows) {
1668
+ for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
1669
+ let cellColumns = cellRows[rowIndex];
1670
+ for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
1671
+ let cell = cellColumns[columnIndex];
1672
+ for (let k = 1; k < cell.colSpan; k++) {
1673
+ let colSpanCell = new ColSpanCell();
1674
+ colSpanCell.x = cell.x + k;
1675
+ colSpanCell.y = cell.y;
1676
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ function insertCell(cell, row) {
1682
+ let x = 0;
1683
+ while (x < row.length && row[x].x < cell.x) {
1684
+ x++;
1685
+ }
1686
+ row.splice(x, 0, cell);
1687
+ }
1688
+ function fillInTable(table) {
1689
+ let h_max = maxHeight(table);
1690
+ let w_max = maxWidth(table);
1691
+ debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
1692
+ for (let y = 0; y < h_max; y++) {
1693
+ for (let x = 0; x < w_max; x++) {
1694
+ if (!conflictExists(table, x, y)) {
1695
+ let opts = { x, y, colSpan: 1, rowSpan: 1 };
1696
+ x++;
1697
+ while (x < w_max && !conflictExists(table, x, y)) {
1698
+ opts.colSpan++;
1699
+ x++;
1700
+ }
1701
+ let y2 = y + 1;
1702
+ while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
1703
+ opts.rowSpan++;
1704
+ y2++;
1705
+ }
1706
+ let cell = new Cell(opts);
1707
+ cell.x = opts.x;
1708
+ cell.y = opts.y;
1709
+ warn(`Missing cell at ${cell.y}-${cell.x}.`);
1710
+ insertCell(cell, table[y]);
1711
+ }
1712
+ }
1713
+ }
1714
+ }
1715
+ function generateCells(rows) {
1716
+ return rows.map(function(row) {
1717
+ if (!Array.isArray(row)) {
1718
+ let key = Object.keys(row)[0];
1719
+ row = row[key];
1720
+ if (Array.isArray(row)) {
1721
+ row = row.slice();
1722
+ row.unshift(key);
1723
+ } else {
1724
+ row = [key, row];
1725
+ }
1726
+ }
1727
+ return row.map(function(cell) {
1728
+ return new Cell(cell);
1729
+ });
1730
+ });
1731
+ }
1732
+ function makeTableLayout(rows) {
1733
+ let cellRows = generateCells(rows);
1734
+ layoutTable(cellRows);
1735
+ fillInTable(cellRows);
1736
+ addRowSpanCells(cellRows);
1737
+ addColSpanCells(cellRows);
1738
+ return cellRows;
1739
+ }
1740
+ module.exports = {
1741
+ makeTableLayout,
1742
+ layoutTable,
1743
+ addRowSpanCells,
1744
+ maxWidth,
1745
+ fillInTable,
1746
+ computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
1747
+ computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
1748
+ };
1749
+ })();
1750
+ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
1751
+ return function(vals, table) {
1752
+ let result = [];
1753
+ let spanners = [];
1754
+ let auto = {};
1755
+ table.forEach(function(row) {
1756
+ row.forEach(function(cell) {
1757
+ if ((cell[colSpan] || 1) > 1) {
1758
+ spanners.push(cell);
1759
+ } else {
1760
+ result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
1761
+ }
1762
+ });
1763
+ });
1764
+ vals.forEach(function(val, index) {
1765
+ if (typeof val === "number") {
1766
+ result[index] = val;
1767
+ }
1768
+ });
1769
+ for (let k = spanners.length - 1; k >= 0; k--) {
1770
+ let cell = spanners[k];
1771
+ let span = cell[colSpan];
1772
+ let col = cell[x];
1773
+ let existingWidth = result[col];
1774
+ let editableCols = typeof vals[col] === "number" ? 0 : 1;
1775
+ if (typeof existingWidth === "number") {
1776
+ for (let i = 1; i < span; i++) {
1777
+ existingWidth += 1 + result[col + i];
1778
+ if (typeof vals[col + i] !== "number") {
1779
+ editableCols++;
1780
+ }
1781
+ }
1782
+ } else {
1783
+ existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
1784
+ if (!auto[col] || auto[col] < existingWidth) {
1785
+ auto[col] = existingWidth;
1786
+ }
1787
+ }
1788
+ if (cell[desiredWidth] > existingWidth) {
1789
+ let i = 0;
1790
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
1791
+ if (typeof vals[col + i] !== "number") {
1792
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
1793
+ existingWidth += dif;
1794
+ result[col + i] += dif;
1795
+ editableCols--;
1796
+ }
1797
+ i++;
1798
+ }
1799
+ }
1800
+ }
1801
+ Object.assign(vals, result, auto);
1802
+ for (let j = 0; j < vals.length; j++) {
1803
+ vals[j] = Math.max(forcedMin, vals[j] || 0);
1804
+ }
1805
+ };
1806
+ }
1807
+ }
1808
+ });
1809
+
1810
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js
1811
+ var require_table = __commonJS({
1812
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/table.js"(exports, module) {
1813
+ var debug = require_debug();
1814
+ var utils = require_utils();
1815
+ var tableLayout = require_layout_manager();
1816
+ var Table2 = class extends Array {
1817
+ constructor(opts) {
1818
+ super();
1819
+ const options = utils.mergeOptions(opts);
1820
+ Object.defineProperty(this, "options", {
1821
+ value: options,
1822
+ enumerable: options.debug
1823
+ });
1824
+ if (options.debug) {
1825
+ switch (typeof options.debug) {
1826
+ case "boolean":
1827
+ debug.setDebugLevel(debug.WARN);
1828
+ break;
1829
+ case "number":
1830
+ debug.setDebugLevel(options.debug);
1831
+ break;
1832
+ case "string":
1833
+ debug.setDebugLevel(parseInt(options.debug, 10));
1834
+ break;
1835
+ default:
1836
+ debug.setDebugLevel(debug.WARN);
1837
+ debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
1838
+ }
1839
+ Object.defineProperty(this, "messages", {
1840
+ get() {
1841
+ return debug.debugMessages();
1842
+ }
1843
+ });
1844
+ }
1845
+ }
1846
+ toString() {
1847
+ let array = this;
1848
+ let headersPresent = this.options.head && this.options.head.length;
1849
+ if (headersPresent) {
1850
+ array = [this.options.head];
1851
+ if (this.length) {
1852
+ array.push.apply(array, this);
1853
+ }
1854
+ } else {
1855
+ this.options.style.head = [];
1856
+ }
1857
+ let cells = tableLayout.makeTableLayout(array);
1858
+ cells.forEach(function(row) {
1859
+ row.forEach(function(cell) {
1860
+ cell.mergeTableOptions(this.options, cells);
1861
+ }, this);
1862
+ }, this);
1863
+ tableLayout.computeWidths(this.options.colWidths, cells);
1864
+ tableLayout.computeHeights(this.options.rowHeights, cells);
1865
+ cells.forEach(function(row) {
1866
+ row.forEach(function(cell) {
1867
+ cell.init(this.options);
1868
+ }, this);
1869
+ }, this);
1870
+ let result = [];
1871
+ for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
1872
+ let row = cells[rowIndex];
1873
+ let heightOfRow = this.options.rowHeights[rowIndex];
1874
+ if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
1875
+ doDraw(row, "top", result);
1876
+ }
1877
+ for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
1878
+ doDraw(row, lineNum, result);
1879
+ }
1880
+ if (rowIndex + 1 == cells.length) {
1881
+ doDraw(row, "bottom", result);
1882
+ }
1883
+ }
1884
+ return result.join("\n");
1885
+ }
1886
+ get width() {
1887
+ let str = this.toString().split("\n");
1888
+ return str[0].length;
1889
+ }
1890
+ };
1891
+ Table2.reset = () => debug.reset();
1892
+ function doDraw(row, lineNum, result) {
1893
+ let line = [];
1894
+ row.forEach(function(cell) {
1895
+ line.push(cell.draw(lineNum));
1896
+ });
1897
+ let str = line.join("");
1898
+ if (str.length) result.push(str);
1899
+ }
1900
+ module.exports = Table2;
1901
+ }
1902
+ });
1903
+
1904
+ // node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js
1905
+ var require_cli_table3 = __commonJS({
1906
+ "node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/index.js"(exports, module) {
1907
+ module.exports = require_table();
1908
+ }
1909
+ });
1910
+
1911
+ // index.ts
1912
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
1913
+
1914
+ // commands/new.ts
1915
+ import { basename, dirname as dirname3, join as join2 } from "path";
1916
+ import { mkdirSync as mkdirSync2 } from "fs";
1917
+
1918
+ // store.ts
1919
+ import { execSync } from "child_process";
1920
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
1921
+ import { isAbsolute, join } from "path";
1922
+ var WORKTREES_FILE = "worktrees.json";
1923
+ function getGitRoot() {
1924
+ return execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
1925
+ }
1926
+ function getGitCommonDir() {
1927
+ let path = execSync("git rev-parse --git-common-dir", { encoding: "utf-8" }).trim();
1928
+ if (!isAbsolute(path)) {
1929
+ path = join(process.cwd(), path);
1930
+ }
1931
+ return path;
1932
+ }
1933
+ function getStorePath() {
1934
+ return join(getGitCommonDir(), "pf");
1935
+ }
1936
+ function loadStore() {
1937
+ const storePath = getStorePath();
1938
+ const filePath = join(storePath, WORKTREES_FILE);
1939
+ if (!existsSync(filePath)) {
1940
+ return { worktrees: [] };
1941
+ }
1942
+ const data = readFileSync(filePath, "utf-8");
1943
+ return JSON.parse(data);
1944
+ }
1945
+ function saveStore(store) {
1946
+ const storePath = getStorePath();
1947
+ mkdirSync(storePath, { recursive: true });
1948
+ const filePath = join(storePath, WORKTREES_FILE);
1949
+ writeFileSync(filePath, JSON.stringify(store, null, 2));
1950
+ }
1951
+ function addWorktree(store, name, path) {
1952
+ store.worktrees.push({
1953
+ name,
1954
+ path,
1955
+ created_at: (/* @__PURE__ */ new Date()).toISOString()
1956
+ });
1957
+ }
1958
+ function findWorktree(store, name) {
1959
+ return store.worktrees.find((w) => w.name === name);
1960
+ }
1961
+ function removeWorktree(store, name) {
1962
+ store.worktrees = store.worktrees.filter((w) => w.name !== name);
1963
+ }
1964
+
1965
+ // utils.ts
1966
+ var import_picocolors = __toESM(require_picocolors(), 1);
1967
+ import { execSync as execSync2, spawnSync } from "child_process";
1968
+ import { existsSync as existsSync2 } from "fs";
1969
+ import { dirname as dirname2 } from "path";
1970
+ function getCurrentBranch() {
1971
+ try {
1972
+ return execSync2("git branch --show-current", { encoding: "utf-8" }).trim() || "HEAD";
1973
+ } catch {
1974
+ return "HEAD";
1975
+ }
1976
+ }
1977
+ function getWorktreeBranch(path) {
1978
+ if (!existsSync2(path)) {
1979
+ return "[missing]";
1980
+ }
1981
+ try {
1982
+ const branch = execSync2(`git -C "${path}" branch --show-current`, { encoding: "utf-8" }).trim();
1983
+ return branch || "[detached]";
1984
+ } catch {
1985
+ return "[detached]";
1986
+ }
1987
+ }
1988
+ function getWorktreeStatus(path) {
1989
+ if (!existsSync2(path)) {
1990
+ return "";
1991
+ }
1992
+ try {
1993
+ const status = execSync2(`git -C "${path}" status --porcelain`, { encoding: "utf-8" }).trim();
1994
+ if (!status) {
1995
+ return "clean";
1996
+ }
1997
+ const lines = status.split("\n").length;
1998
+ return `${lines} changed`;
1999
+ } catch {
2000
+ return "[error]";
2001
+ }
2002
+ }
2003
+ function branchExists(name) {
2004
+ try {
2005
+ execSync2(`git show-ref --verify --quiet refs/heads/${name}`);
2006
+ return true;
2007
+ } catch {
2008
+ return false;
2009
+ }
2010
+ }
2011
+ function isInsideWorktree() {
2012
+ try {
2013
+ const gitRoot = getGitRoot();
2014
+ const gitDir = getGitCommonDir();
2015
+ return gitRoot !== dirname2(gitDir);
2016
+ } catch {
2017
+ return false;
2018
+ }
2019
+ }
2020
+ function hasUncommittedChanges() {
2021
+ try {
2022
+ const status = execSync2("git status --porcelain", { encoding: "utf-8" }).trim();
2023
+ return status.length > 0;
2024
+ } catch {
2025
+ return false;
2026
+ }
2027
+ }
2028
+ function createWorktree(name, path) {
2029
+ execSync2(`git worktree add -b "${name}" "${path}"`, { stdio: "ignore" });
2030
+ }
2031
+ function removeWorktree2(path) {
2032
+ execSync2(`git worktree remove "${path}"`, { stdio: "ignore" });
2033
+ }
2034
+ function pruneWorktrees() {
2035
+ try {
2036
+ execSync2("git worktree prune", { stdio: "ignore" });
2037
+ } catch {
2038
+ }
2039
+ }
2040
+ function deleteBranch(name) {
2041
+ execSync2(`git branch -D "${name}"`, { stdio: "ignore" });
2042
+ }
2043
+ function generateName() {
2044
+ const bytes = new Uint8Array(4);
2045
+ crypto.getRandomValues(bytes);
2046
+ const hex = Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
2047
+ return `pf-${hex}`;
2048
+ }
2049
+ function spawnShell(cwd) {
2050
+ const shell = process.env.SHELL || "/bin/sh";
2051
+ spawnSync(shell, { cwd, stdio: "inherit" });
2052
+ }
2053
+ var success = (text) => import_picocolors.default.green(import_picocolors.default.bold("\u2713")) + " " + text;
2054
+ var dim = (text) => import_picocolors.default.dim(text);
2055
+ var bold = (text) => import_picocolors.default.bold(text);
2056
+
2057
+ // commands/new.ts
2058
+ function newCommand(name) {
2059
+ const worktreeName = name ?? generateName();
2060
+ if (isInsideWorktree()) {
2061
+ console.error("Error: You are inside a pf worktree.");
2062
+ console.error("");
2063
+ console.error("Each time you run 'pf new' or 'pf open', pf starts a subshell in the");
2064
+ console.error("worktree directory. To keep subshells shallow and avoid nesting, pf");
2065
+ console.error("requires you to return to the main repo before opening another worktree.");
2066
+ console.error("");
2067
+ console.error("To exit the current worktree:");
2068
+ console.error(" exit");
2069
+ console.error("");
2070
+ console.error("Then re-run:");
2071
+ console.error(` pf new ${worktreeName}`);
2072
+ process.exit(1);
2073
+ }
2074
+ if (branchExists(worktreeName)) {
2075
+ console.error(`Error: branch '${worktreeName}' already exists`);
2076
+ process.exit(1);
2077
+ }
2078
+ const store = loadStore();
2079
+ if (findWorktree(store, worktreeName)) {
2080
+ console.error(`Error: worktree '${worktreeName}' already exists - use 'pf open ${worktreeName}'`);
2081
+ process.exit(1);
2082
+ }
2083
+ const baseBranch = getCurrentBranch();
2084
+ const gitRoot = getGitRoot();
2085
+ const gitDir = getGitCommonDir();
2086
+ const repoName = basename(gitRoot);
2087
+ const worktreePath = join2(gitDir, "pf", "worktrees", worktreeName, repoName);
2088
+ mkdirSync2(dirname3(worktreePath), { recursive: true });
2089
+ createWorktree(worktreeName, worktreePath);
2090
+ addWorktree(store, worktreeName, worktreePath);
2091
+ saveStore(store);
2092
+ console.log();
2093
+ console.log(success(bold(worktreeName)), dim(`(from ${baseBranch})`));
2094
+ console.log(dim(" Subshell started. Type 'exit' to return."));
2095
+ console.log();
2096
+ spawnShell(worktreePath);
2097
+ console.log();
2098
+ console.log(dim(" Back in main worktree"));
2099
+ console.log();
2100
+ }
2101
+
2102
+ // commands/open.ts
2103
+ import { existsSync as existsSync3 } from "fs";
2104
+ function openCommand(name) {
2105
+ if (isInsideWorktree()) {
2106
+ console.error("Error: You are inside a pf worktree.");
2107
+ console.error("");
2108
+ console.error("Each time you run 'pf new' or 'pf open', pf starts a subshell in the");
2109
+ console.error("worktree directory. To keep subshells shallow and avoid nesting, pf");
2110
+ console.error("requires you to return to the main repo before opening another worktree.");
2111
+ console.error("");
2112
+ console.error("To exit the current worktree:");
2113
+ console.error(" exit");
2114
+ console.error("");
2115
+ console.error("Then re-run:");
2116
+ console.error(` pf open ${name}`);
2117
+ process.exit(1);
2118
+ }
2119
+ if (hasUncommittedChanges()) {
2120
+ console.error("Error: uncommitted changes in current worktree - commit or stash first");
2121
+ process.exit(1);
2122
+ }
2123
+ const store = loadStore();
2124
+ const wt = findWorktree(store, name);
2125
+ if (!wt) {
2126
+ console.error(`Error: worktree '${name}' not found`);
2127
+ process.exit(1);
2128
+ }
2129
+ if (!existsSync3(wt.path)) {
2130
+ console.error(`Error: worktree directory does not exist: ${wt.path}`);
2131
+ process.exit(1);
2132
+ }
2133
+ const branch = getWorktreeBranch(wt.path);
2134
+ console.log();
2135
+ console.log(success(bold(name)), dim(`(${branch})`));
2136
+ console.log(dim(" Subshell started. Type 'exit' to return."));
2137
+ console.log();
2138
+ spawnShell(wt.path);
2139
+ console.log();
2140
+ console.log(dim(" Back in main worktree"));
2141
+ console.log();
2142
+ }
2143
+
2144
+ // commands/ls.ts
2145
+ var import_cli_table3 = __toESM(require_cli_table3(), 1);
2146
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
2147
+ import { resolve } from "path";
2148
+ function lsCommand(plain = false) {
2149
+ const store = loadStore();
2150
+ if (store.worktrees.length === 0) {
2151
+ console.log("No worktrees. Use 'pf new <name>' to create one.");
2152
+ return;
2153
+ }
2154
+ const cwd = process.cwd();
2155
+ let currentWorktree = "";
2156
+ for (const wt of store.worktrees) {
2157
+ const absPath = resolve(wt.path);
2158
+ if (cwd.startsWith(absPath)) {
2159
+ currentWorktree = wt.name;
2160
+ break;
2161
+ }
2162
+ }
2163
+ if (plain) {
2164
+ for (const wt of store.worktrees) {
2165
+ const branch = getWorktreeBranch(wt.path);
2166
+ const status = getWorktreeStatus(wt.path);
2167
+ console.log(`${wt.name} ${branch} ${status}`);
2168
+ }
2169
+ return;
2170
+ }
2171
+ const table = new import_cli_table3.default({
2172
+ head: ["name", "branch", "git status"],
2173
+ style: { head: [], border: [] },
2174
+ chars: { mid: "", "left-mid": "", "mid-mid": "", "right-mid": "" }
2175
+ });
2176
+ for (const wt of store.worktrees) {
2177
+ const branch = getWorktreeBranch(wt.path);
2178
+ const status = getWorktreeStatus(wt.path);
2179
+ const name = wt.name === currentWorktree ? `${import_picocolors2.default.green("*")}${wt.name}` : wt.name;
2180
+ table.push([name, branch, status]);
2181
+ }
2182
+ console.log(table.toString());
2183
+ }
2184
+
2185
+ // commands/rm.ts
2186
+ import { resolve as resolve2 } from "path";
2187
+ function rmCommand(name, deleteBranchFlag = false) {
2188
+ const store = loadStore();
2189
+ const wt = findWorktree(store, name);
2190
+ if (!wt) {
2191
+ console.error(`Error: worktree '${name}' not found`);
2192
+ process.exit(1);
2193
+ }
2194
+ const cwd = process.cwd();
2195
+ const absWtPath = resolve2(wt.path);
2196
+ const absCwd = resolve2(cwd);
2197
+ if (absCwd.startsWith(absWtPath)) {
2198
+ console.error("Error: cannot remove current worktree - exit first");
2199
+ process.exit(1);
2200
+ }
2201
+ const branch = getWorktreeBranch(wt.path);
2202
+ try {
2203
+ removeWorktree2(wt.path);
2204
+ } catch {
2205
+ }
2206
+ pruneWorktrees();
2207
+ if (deleteBranchFlag && branch !== "[missing]" && branch !== "[detached]") {
2208
+ try {
2209
+ deleteBranch(branch);
2210
+ } catch (err) {
2211
+ console.error(`Warning: failed to delete branch ${branch}`);
2212
+ }
2213
+ }
2214
+ removeWorktree(store, name);
2215
+ saveStore(store);
2216
+ if (deleteBranchFlag && branch !== "[missing]" && branch !== "[detached]") {
2217
+ console.log(success("Removed"), bold(name), dim("(branch deleted)"));
2218
+ } else {
2219
+ console.log(success("Removed"), bold(name));
2220
+ }
2221
+ }
2222
+
2223
+ // index.ts
2224
+ var VERSION = "0.0.2";
2225
+ function printHelp() {
2226
+ const dim2 = import_picocolors3.default.dim;
2227
+ const cyan = import_picocolors3.default.cyan;
2228
+ const green = import_picocolors3.default.green;
2229
+ console.log(`${import_picocolors3.default.bold("pf")} ${dim2(`v${VERSION}`)} - A humane utility for git worktrees
2230
+
2231
+ ${import_picocolors3.default.bold("Usage:")} ${cyan("pf")} ${dim2("<command>")} ${dim2("[options]")}
2232
+
2233
+ ${import_picocolors3.default.bold("Commands:")}
2234
+ ${green("new")} ${dim2("[name]")} Create a branch and worktree with the specified name ${dim2('(default: "pf-[hash]")')}
2235
+ ${green("open")} ${dim2("<name>")} Open a worktree in a subshell
2236
+ ${green("ls")} List all tracked worktrees
2237
+ ${green("rm")} ${dim2("<name>")} Remove a worktree
2238
+
2239
+ ${import_picocolors3.default.bold("Options:")}
2240
+ ${cyan("--help")}, ${cyan("-h")} Show help
2241
+ ${cyan("--version")}, ${cyan("-v")} Show version
2242
+
2243
+ ${dim2("\u2500".repeat(60))}
2244
+
2245
+ ${import_picocolors3.default.bold("Why pf?")}
2246
+
2247
+ In agentic development, you often want to spin up isolated workspaces for
2248
+ specific tasks\u2014without stashing or committing your current changes. pf makes
2249
+ this effortless.
2250
+
2251
+ Create a new worktree for a task:
2252
+
2253
+ ${dim2("$")} ${cyan("pf new add-login-button")}
2254
+
2255
+ This creates a branch and worktree, then drops you into a subshell. Open it
2256
+ in your editor or point an AI coding agent at it. Your changes are completely
2257
+ independent of any other work on your machine.
2258
+
2259
+ When you're done, push to GitHub and create a PR:
2260
+
2261
+ ${dim2("$")} ${cyan("git push -u origin add-login-button")}
2262
+
2263
+ Or merge directly back into main:
2264
+
2265
+ ${dim2("$")} ${cyan("git checkout main && git merge add-login-button")}
2266
+
2267
+ Then just ${cyan("exit")} to pop out of the worktree and back to your main repo.
2268
+ Clean up when you're done:
2269
+
2270
+ ${dim2("$")} ${cyan("pf rm add-login-button")}
2271
+
2272
+ Use ${cyan("pf ls")} to see your active worktrees, and ${cyan("pf open <name>")} to
2273
+ return to one later.`);
2274
+ }
2275
+ function printVersion() {
2276
+ console.log(`pf v${VERSION}`);
2277
+ }
2278
+ var args = process.argv.slice(2);
2279
+ var cmd = args[0];
2280
+ if (!cmd || cmd === "--help" || cmd === "-h") {
2281
+ printHelp();
2282
+ process.exit(0);
2283
+ }
2284
+ if (cmd === "--version" || cmd === "-v") {
2285
+ printVersion();
2286
+ process.exit(0);
2287
+ }
2288
+ switch (cmd) {
2289
+ case "new":
2290
+ newCommand(args[1]);
2291
+ break;
2292
+ case "open":
2293
+ if (!args[1]) {
2294
+ console.error("Usage: pf open <name>");
2295
+ process.exit(1);
2296
+ }
2297
+ openCommand(args[1]);
2298
+ break;
2299
+ case "ls":
2300
+ lsCommand(args.includes("--plain"));
2301
+ break;
2302
+ case "rm":
2303
+ if (!args[1]) {
2304
+ console.error("Usage: pf rm <name>");
2305
+ process.exit(1);
2306
+ }
2307
+ rmCommand(args[1], args.includes("--delete-branch"));
2308
+ break;
2309
+ // case "completion":
2310
+ // completionCommand(args[1]);
2311
+ // break;
2312
+ default:
2313
+ console.error(`Unknown command: ${cmd}`);
2314
+ console.error("Run 'pf --help' for usage.");
2315
+ process.exit(1);
2316
+ }