@hot-updater/supabase 0.21.7 → 0.21.8
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/iac/index.cjs +88 -1253
- package/dist/iac/index.d.cts +1 -1
- package/dist/iac/index.d.ts +1 -1
- package/dist/iac/index.js +126 -1291
- package/package.json +5 -6
package/dist/iac/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
12
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
|
|
13
13
|
key = keys[i$1];
|
|
14
14
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
-
get: ((k
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
16
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -24,22 +24,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
}) : target, mod));
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
let node_process = require("node:process");
|
|
30
|
-
node_process = __toESM(node_process);
|
|
31
|
-
let node_readline = require("node:readline");
|
|
32
|
-
node_readline = __toESM(node_readline);
|
|
33
|
-
let node_tty = require("node:tty");
|
|
34
|
-
node_tty = __toESM(node_tty);
|
|
35
|
-
let __hot_updater_plugin_core = require("@hot-updater/plugin-core");
|
|
36
|
-
__hot_updater_plugin_core = __toESM(__hot_updater_plugin_core);
|
|
27
|
+
let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
28
|
+
__hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
|
|
37
29
|
let node_url = require("node:url");
|
|
38
30
|
node_url = __toESM(node_url);
|
|
39
31
|
let node_child_process = require("node:child_process");
|
|
40
32
|
node_child_process = __toESM(node_child_process);
|
|
41
33
|
let node_string_decoder = require("node:string_decoder");
|
|
42
34
|
node_string_decoder = __toESM(node_string_decoder);
|
|
35
|
+
let node_util = require("node:util");
|
|
36
|
+
node_util = __toESM(node_util);
|
|
37
|
+
let node_process = require("node:process");
|
|
38
|
+
node_process = __toESM(node_process);
|
|
39
|
+
let node_tty = require("node:tty");
|
|
40
|
+
node_tty = __toESM(node_tty);
|
|
43
41
|
let node_path = require("node:path");
|
|
44
42
|
node_path = __toESM(node_path);
|
|
45
43
|
let path = require("path");
|
|
@@ -65,1169 +63,6 @@ fs_promises = __toESM(fs_promises);
|
|
|
65
63
|
let __supabase_supabase_js = require("@supabase/supabase-js");
|
|
66
64
|
__supabase_supabase_js = __toESM(__supabase_supabase_js);
|
|
67
65
|
|
|
68
|
-
//#region ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
69
|
-
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": ((exports, module) => {
|
|
70
|
-
const ESC = "\x1B";
|
|
71
|
-
const CSI = `${ESC}[`;
|
|
72
|
-
const beep = "\x07";
|
|
73
|
-
const cursor = {
|
|
74
|
-
to(x$1, y$1) {
|
|
75
|
-
if (!y$1) return `${CSI}${x$1 + 1}G`;
|
|
76
|
-
return `${CSI}${y$1 + 1};${x$1 + 1}H`;
|
|
77
|
-
},
|
|
78
|
-
move(x$1, y$1) {
|
|
79
|
-
let ret = "";
|
|
80
|
-
if (x$1 < 0) ret += `${CSI}${-x$1}D`;
|
|
81
|
-
else if (x$1 > 0) ret += `${CSI}${x$1}C`;
|
|
82
|
-
if (y$1 < 0) ret += `${CSI}${-y$1}A`;
|
|
83
|
-
else if (y$1 > 0) ret += `${CSI}${y$1}B`;
|
|
84
|
-
return ret;
|
|
85
|
-
},
|
|
86
|
-
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
87
|
-
down: (count$1 = 1) => `${CSI}${count$1}B`,
|
|
88
|
-
forward: (count$1 = 1) => `${CSI}${count$1}C`,
|
|
89
|
-
backward: (count$1 = 1) => `${CSI}${count$1}D`,
|
|
90
|
-
nextLine: (count$1 = 1) => `${CSI}E`.repeat(count$1),
|
|
91
|
-
prevLine: (count$1 = 1) => `${CSI}F`.repeat(count$1),
|
|
92
|
-
left: `${CSI}G`,
|
|
93
|
-
hide: `${CSI}?25l`,
|
|
94
|
-
show: `${CSI}?25h`,
|
|
95
|
-
save: `${ESC}7`,
|
|
96
|
-
restore: `${ESC}8`
|
|
97
|
-
};
|
|
98
|
-
const scroll = {
|
|
99
|
-
up: (count$1 = 1) => `${CSI}S`.repeat(count$1),
|
|
100
|
-
down: (count$1 = 1) => `${CSI}T`.repeat(count$1)
|
|
101
|
-
};
|
|
102
|
-
const erase = {
|
|
103
|
-
screen: `${CSI}2J`,
|
|
104
|
-
up: (count$1 = 1) => `${CSI}1J`.repeat(count$1),
|
|
105
|
-
down: (count$1 = 1) => `${CSI}J`.repeat(count$1),
|
|
106
|
-
line: `${CSI}2K`,
|
|
107
|
-
lineEnd: `${CSI}K`,
|
|
108
|
-
lineStart: `${CSI}1K`,
|
|
109
|
-
lines(count$1) {
|
|
110
|
-
let clear = "";
|
|
111
|
-
for (let i$1 = 0; i$1 < count$1; i$1++) clear += this.line + (i$1 < count$1 - 1 ? cursor.up() : "");
|
|
112
|
-
if (count$1) clear += cursor.left;
|
|
113
|
-
return clear;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
module.exports = {
|
|
117
|
-
cursor,
|
|
118
|
-
scroll,
|
|
119
|
-
erase,
|
|
120
|
-
beep
|
|
121
|
-
};
|
|
122
|
-
}) });
|
|
123
|
-
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
126
|
-
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
|
127
|
-
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
128
|
-
let 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);
|
|
129
|
-
let formatter = (open, close, replace = open) => (input) => {
|
|
130
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
131
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
132
|
-
};
|
|
133
|
-
let replaceClose = (string, close, replace, index) => {
|
|
134
|
-
let result = "", cursor$1 = 0;
|
|
135
|
-
do {
|
|
136
|
-
result += string.substring(cursor$1, index) + replace;
|
|
137
|
-
cursor$1 = index + close.length;
|
|
138
|
-
index = string.indexOf(close, cursor$1);
|
|
139
|
-
} while (~index);
|
|
140
|
-
return result + string.substring(cursor$1);
|
|
141
|
-
};
|
|
142
|
-
let createColors = (enabled = isColorSupported) => {
|
|
143
|
-
let f$1 = enabled ? formatter : () => String;
|
|
144
|
-
return {
|
|
145
|
-
isColorSupported: enabled,
|
|
146
|
-
reset: f$1("\x1B[0m", "\x1B[0m"),
|
|
147
|
-
bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
148
|
-
dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
149
|
-
italic: f$1("\x1B[3m", "\x1B[23m"),
|
|
150
|
-
underline: f$1("\x1B[4m", "\x1B[24m"),
|
|
151
|
-
inverse: f$1("\x1B[7m", "\x1B[27m"),
|
|
152
|
-
hidden: f$1("\x1B[8m", "\x1B[28m"),
|
|
153
|
-
strikethrough: f$1("\x1B[9m", "\x1B[29m"),
|
|
154
|
-
black: f$1("\x1B[30m", "\x1B[39m"),
|
|
155
|
-
red: f$1("\x1B[31m", "\x1B[39m"),
|
|
156
|
-
green: f$1("\x1B[32m", "\x1B[39m"),
|
|
157
|
-
yellow: f$1("\x1B[33m", "\x1B[39m"),
|
|
158
|
-
blue: f$1("\x1B[34m", "\x1B[39m"),
|
|
159
|
-
magenta: f$1("\x1B[35m", "\x1B[39m"),
|
|
160
|
-
cyan: f$1("\x1B[36m", "\x1B[39m"),
|
|
161
|
-
white: f$1("\x1B[37m", "\x1B[39m"),
|
|
162
|
-
gray: f$1("\x1B[90m", "\x1B[39m"),
|
|
163
|
-
bgBlack: f$1("\x1B[40m", "\x1B[49m"),
|
|
164
|
-
bgRed: f$1("\x1B[41m", "\x1B[49m"),
|
|
165
|
-
bgGreen: f$1("\x1B[42m", "\x1B[49m"),
|
|
166
|
-
bgYellow: f$1("\x1B[43m", "\x1B[49m"),
|
|
167
|
-
bgBlue: f$1("\x1B[44m", "\x1B[49m"),
|
|
168
|
-
bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
|
|
169
|
-
bgCyan: f$1("\x1B[46m", "\x1B[49m"),
|
|
170
|
-
bgWhite: f$1("\x1B[47m", "\x1B[49m"),
|
|
171
|
-
blackBright: f$1("\x1B[90m", "\x1B[39m"),
|
|
172
|
-
redBright: f$1("\x1B[91m", "\x1B[39m"),
|
|
173
|
-
greenBright: f$1("\x1B[92m", "\x1B[39m"),
|
|
174
|
-
yellowBright: f$1("\x1B[93m", "\x1B[39m"),
|
|
175
|
-
blueBright: f$1("\x1B[94m", "\x1B[39m"),
|
|
176
|
-
magentaBright: f$1("\x1B[95m", "\x1B[39m"),
|
|
177
|
-
cyanBright: f$1("\x1B[96m", "\x1B[39m"),
|
|
178
|
-
whiteBright: f$1("\x1B[97m", "\x1B[39m"),
|
|
179
|
-
bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
|
|
180
|
-
bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
|
|
181
|
-
bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
|
|
182
|
-
bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
|
|
183
|
-
bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
|
|
184
|
-
bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
|
|
185
|
-
bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
|
|
186
|
-
bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
module.exports = createColors();
|
|
190
|
-
module.exports.createColors = createColors;
|
|
191
|
-
}) });
|
|
192
|
-
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
|
|
195
|
-
var import_src$1 = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
196
|
-
var import_picocolors$1 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
197
|
-
function J$1({ onlyFirst: t = !1 } = {}) {
|
|
198
|
-
const F$1 = ["[\\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("|");
|
|
199
|
-
return new RegExp(F$1, t ? void 0 : "g");
|
|
200
|
-
}
|
|
201
|
-
const Q = J$1();
|
|
202
|
-
function T$1(t) {
|
|
203
|
-
if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
204
|
-
return t.replace(Q, "");
|
|
205
|
-
}
|
|
206
|
-
function O(t) {
|
|
207
|
-
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
208
|
-
}
|
|
209
|
-
var P$1 = { exports: {} };
|
|
210
|
-
(function(t) {
|
|
211
|
-
var u$2 = {};
|
|
212
|
-
t.exports = u$2, u$2.eastAsianWidth = function(e$1) {
|
|
213
|
-
var s = e$1.charCodeAt(0), i$1 = e$1.length == 2 ? e$1.charCodeAt(1) : 0, D$1 = s;
|
|
214
|
-
return 55296 <= s && s <= 56319 && 56320 <= i$1 && i$1 <= 57343 && (s &= 1023, i$1 &= 1023, D$1 = s << 10 | i$1, D$1 += 65536), D$1 == 12288 || 65281 <= D$1 && D$1 <= 65376 || 65504 <= D$1 && D$1 <= 65510 ? "F" : D$1 == 8361 || 65377 <= D$1 && D$1 <= 65470 || 65474 <= D$1 && D$1 <= 65479 || 65482 <= D$1 && D$1 <= 65487 || 65490 <= D$1 && D$1 <= 65495 || 65498 <= D$1 && D$1 <= 65500 || 65512 <= D$1 && D$1 <= 65518 ? "H" : 4352 <= D$1 && D$1 <= 4447 || 4515 <= D$1 && D$1 <= 4519 || 4602 <= D$1 && D$1 <= 4607 || 9001 <= D$1 && D$1 <= 9002 || 11904 <= D$1 && D$1 <= 11929 || 11931 <= D$1 && D$1 <= 12019 || 12032 <= D$1 && D$1 <= 12245 || 12272 <= D$1 && D$1 <= 12283 || 12289 <= D$1 && D$1 <= 12350 || 12353 <= D$1 && D$1 <= 12438 || 12441 <= D$1 && D$1 <= 12543 || 12549 <= D$1 && D$1 <= 12589 || 12593 <= D$1 && D$1 <= 12686 || 12688 <= D$1 && D$1 <= 12730 || 12736 <= D$1 && D$1 <= 12771 || 12784 <= D$1 && D$1 <= 12830 || 12832 <= D$1 && D$1 <= 12871 || 12880 <= D$1 && D$1 <= 13054 || 13056 <= D$1 && D$1 <= 19903 || 19968 <= D$1 && D$1 <= 42124 || 42128 <= D$1 && D$1 <= 42182 || 43360 <= D$1 && D$1 <= 43388 || 44032 <= D$1 && D$1 <= 55203 || 55216 <= D$1 && D$1 <= 55238 || 55243 <= D$1 && D$1 <= 55291 || 63744 <= D$1 && D$1 <= 64255 || 65040 <= D$1 && D$1 <= 65049 || 65072 <= D$1 && D$1 <= 65106 || 65108 <= D$1 && D$1 <= 65126 || 65128 <= D$1 && D$1 <= 65131 || 110592 <= D$1 && D$1 <= 110593 || 127488 <= D$1 && D$1 <= 127490 || 127504 <= D$1 && D$1 <= 127546 || 127552 <= D$1 && D$1 <= 127560 || 127568 <= D$1 && D$1 <= 127569 || 131072 <= D$1 && D$1 <= 194367 || 177984 <= D$1 && D$1 <= 196605 || 196608 <= D$1 && D$1 <= 262141 ? "W" : 32 <= D$1 && D$1 <= 126 || 162 <= D$1 && D$1 <= 163 || 165 <= D$1 && D$1 <= 166 || D$1 == 172 || D$1 == 175 || 10214 <= D$1 && D$1 <= 10221 || 10629 <= D$1 && D$1 <= 10630 ? "Na" : D$1 == 161 || D$1 == 164 || 167 <= D$1 && D$1 <= 168 || D$1 == 170 || 173 <= D$1 && D$1 <= 174 || 176 <= D$1 && D$1 <= 180 || 182 <= D$1 && D$1 <= 186 || 188 <= D$1 && D$1 <= 191 || D$1 == 198 || D$1 == 208 || 215 <= D$1 && D$1 <= 216 || 222 <= D$1 && D$1 <= 225 || D$1 == 230 || 232 <= D$1 && D$1 <= 234 || 236 <= D$1 && D$1 <= 237 || D$1 == 240 || 242 <= D$1 && D$1 <= 243 || 247 <= D$1 && D$1 <= 250 || D$1 == 252 || D$1 == 254 || D$1 == 257 || D$1 == 273 || D$1 == 275 || D$1 == 283 || 294 <= D$1 && D$1 <= 295 || D$1 == 299 || 305 <= D$1 && D$1 <= 307 || D$1 == 312 || 319 <= D$1 && D$1 <= 322 || D$1 == 324 || 328 <= D$1 && D$1 <= 331 || D$1 == 333 || 338 <= D$1 && D$1 <= 339 || 358 <= D$1 && D$1 <= 359 || D$1 == 363 || D$1 == 462 || D$1 == 464 || D$1 == 466 || D$1 == 468 || D$1 == 470 || D$1 == 472 || D$1 == 474 || D$1 == 476 || D$1 == 593 || D$1 == 609 || D$1 == 708 || D$1 == 711 || 713 <= D$1 && D$1 <= 715 || D$1 == 717 || D$1 == 720 || 728 <= D$1 && D$1 <= 731 || D$1 == 733 || D$1 == 735 || 768 <= D$1 && D$1 <= 879 || 913 <= D$1 && D$1 <= 929 || 931 <= D$1 && D$1 <= 937 || 945 <= D$1 && D$1 <= 961 || 963 <= D$1 && D$1 <= 969 || D$1 == 1025 || 1040 <= D$1 && D$1 <= 1103 || D$1 == 1105 || D$1 == 8208 || 8211 <= D$1 && D$1 <= 8214 || 8216 <= D$1 && D$1 <= 8217 || 8220 <= D$1 && D$1 <= 8221 || 8224 <= D$1 && D$1 <= 8226 || 8228 <= D$1 && D$1 <= 8231 || D$1 == 8240 || 8242 <= D$1 && D$1 <= 8243 || D$1 == 8245 || D$1 == 8251 || D$1 == 8254 || D$1 == 8308 || D$1 == 8319 || 8321 <= D$1 && D$1 <= 8324 || D$1 == 8364 || D$1 == 8451 || D$1 == 8453 || D$1 == 8457 || D$1 == 8467 || D$1 == 8470 || 8481 <= D$1 && D$1 <= 8482 || D$1 == 8486 || D$1 == 8491 || 8531 <= D$1 && D$1 <= 8532 || 8539 <= D$1 && D$1 <= 8542 || 8544 <= D$1 && D$1 <= 8555 || 8560 <= D$1 && D$1 <= 8569 || D$1 == 8585 || 8592 <= D$1 && D$1 <= 8601 || 8632 <= D$1 && D$1 <= 8633 || D$1 == 8658 || D$1 == 8660 || D$1 == 8679 || D$1 == 8704 || 8706 <= D$1 && D$1 <= 8707 || 8711 <= D$1 && D$1 <= 8712 || D$1 == 8715 || D$1 == 8719 || D$1 == 8721 || D$1 == 8725 || D$1 == 8730 || 8733 <= D$1 && D$1 <= 8736 || D$1 == 8739 || D$1 == 8741 || 8743 <= D$1 && D$1 <= 8748 || D$1 == 8750 || 8756 <= D$1 && D$1 <= 8759 || 8764 <= D$1 && D$1 <= 8765 || D$1 == 8776 || D$1 == 8780 || D$1 == 8786 || 8800 <= D$1 && D$1 <= 8801 || 8804 <= D$1 && D$1 <= 8807 || 8810 <= D$1 && D$1 <= 8811 || 8814 <= D$1 && D$1 <= 8815 || 8834 <= D$1 && D$1 <= 8835 || 8838 <= D$1 && D$1 <= 8839 || D$1 == 8853 || D$1 == 8857 || D$1 == 8869 || D$1 == 8895 || D$1 == 8978 || 9312 <= D$1 && D$1 <= 9449 || 9451 <= D$1 && D$1 <= 9547 || 9552 <= D$1 && D$1 <= 9587 || 9600 <= D$1 && D$1 <= 9615 || 9618 <= D$1 && D$1 <= 9621 || 9632 <= D$1 && D$1 <= 9633 || 9635 <= D$1 && D$1 <= 9641 || 9650 <= D$1 && D$1 <= 9651 || 9654 <= D$1 && D$1 <= 9655 || 9660 <= D$1 && D$1 <= 9661 || 9664 <= D$1 && D$1 <= 9665 || 9670 <= D$1 && D$1 <= 9672 || D$1 == 9675 || 9678 <= D$1 && D$1 <= 9681 || 9698 <= D$1 && D$1 <= 9701 || D$1 == 9711 || 9733 <= D$1 && D$1 <= 9734 || D$1 == 9737 || 9742 <= D$1 && D$1 <= 9743 || 9748 <= D$1 && D$1 <= 9749 || D$1 == 9756 || D$1 == 9758 || D$1 == 9792 || D$1 == 9794 || 9824 <= D$1 && D$1 <= 9825 || 9827 <= D$1 && D$1 <= 9829 || 9831 <= D$1 && D$1 <= 9834 || 9836 <= D$1 && D$1 <= 9837 || D$1 == 9839 || 9886 <= D$1 && D$1 <= 9887 || 9918 <= D$1 && D$1 <= 9919 || 9924 <= D$1 && D$1 <= 9933 || 9935 <= D$1 && D$1 <= 9953 || D$1 == 9955 || 9960 <= D$1 && D$1 <= 9983 || D$1 == 10045 || D$1 == 10071 || 10102 <= D$1 && D$1 <= 10111 || 11093 <= D$1 && D$1 <= 11097 || 12872 <= D$1 && D$1 <= 12879 || 57344 <= D$1 && D$1 <= 63743 || 65024 <= D$1 && D$1 <= 65039 || D$1 == 65533 || 127232 <= D$1 && D$1 <= 127242 || 127248 <= D$1 && D$1 <= 127277 || 127280 <= D$1 && D$1 <= 127337 || 127344 <= D$1 && D$1 <= 127386 || 917760 <= D$1 && D$1 <= 917999 || 983040 <= D$1 && D$1 <= 1048573 || 1048576 <= D$1 && D$1 <= 1114109 ? "A" : "N";
|
|
215
|
-
}, u$2.characterLength = function(e$1) {
|
|
216
|
-
var s = this.eastAsianWidth(e$1);
|
|
217
|
-
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
218
|
-
};
|
|
219
|
-
function F$1(e$1) {
|
|
220
|
-
return e$1.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
221
|
-
}
|
|
222
|
-
u$2.length = function(e$1) {
|
|
223
|
-
for (var s = F$1(e$1), i$1 = 0, D$1 = 0; D$1 < s.length; D$1++) i$1 = i$1 + this.characterLength(s[D$1]);
|
|
224
|
-
return i$1;
|
|
225
|
-
}, u$2.slice = function(e$1, s, i$1) {
|
|
226
|
-
textLen = u$2.length(e$1), s = s || 0, i$1 = i$1 || 1, s < 0 && (s = textLen + s), i$1 < 0 && (i$1 = textLen + i$1);
|
|
227
|
-
for (var D$1 = "", C$1 = 0, o$2 = F$1(e$1), E = 0; E < o$2.length; E++) {
|
|
228
|
-
var a$1 = o$2[E], n$1 = u$2.length(a$1);
|
|
229
|
-
if (C$1 >= s - (n$1 == 2 ? 1 : 0)) if (C$1 + n$1 <= i$1) D$1 += a$1;
|
|
230
|
-
else break;
|
|
231
|
-
C$1 += n$1;
|
|
232
|
-
}
|
|
233
|
-
return D$1;
|
|
234
|
-
};
|
|
235
|
-
})(P$1);
|
|
236
|
-
var X = P$1.exports;
|
|
237
|
-
const DD = O(X);
|
|
238
|
-
var uD = function() {
|
|
239
|
-
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;
|
|
240
|
-
};
|
|
241
|
-
const FD = O(uD);
|
|
242
|
-
function A$1(t, u$2 = {}) {
|
|
243
|
-
if (typeof t != "string" || t.length === 0 || (u$2 = {
|
|
244
|
-
ambiguousIsNarrow: !0,
|
|
245
|
-
...u$2
|
|
246
|
-
}, t = T$1(t), t.length === 0)) return 0;
|
|
247
|
-
t = t.replace(FD(), " ");
|
|
248
|
-
const F$1 = u$2.ambiguousIsNarrow ? 1 : 2;
|
|
249
|
-
let e$1 = 0;
|
|
250
|
-
for (const s of t) {
|
|
251
|
-
const i$1 = s.codePointAt(0);
|
|
252
|
-
if (i$1 <= 31 || i$1 >= 127 && i$1 <= 159 || i$1 >= 768 && i$1 <= 879) continue;
|
|
253
|
-
switch (DD.eastAsianWidth(s)) {
|
|
254
|
-
case "F":
|
|
255
|
-
case "W":
|
|
256
|
-
e$1 += 2;
|
|
257
|
-
break;
|
|
258
|
-
case "A":
|
|
259
|
-
e$1 += F$1;
|
|
260
|
-
break;
|
|
261
|
-
default: e$1 += 1;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
return e$1;
|
|
265
|
-
}
|
|
266
|
-
const m = 10, L$1 = (t = 0) => (u$2) => `\x1B[${u$2 + t}m`, N = (t = 0) => (u$2) => `\x1B[${38 + t};5;${u$2}m`, I = (t = 0) => (u$2, F$1, e$1) => `\x1B[${38 + t};2;${u$2};${F$1};${e$1}m`, r = {
|
|
267
|
-
modifier: {
|
|
268
|
-
reset: [0, 0],
|
|
269
|
-
bold: [1, 22],
|
|
270
|
-
dim: [2, 22],
|
|
271
|
-
italic: [3, 23],
|
|
272
|
-
underline: [4, 24],
|
|
273
|
-
overline: [53, 55],
|
|
274
|
-
inverse: [7, 27],
|
|
275
|
-
hidden: [8, 28],
|
|
276
|
-
strikethrough: [9, 29]
|
|
277
|
-
},
|
|
278
|
-
color: {
|
|
279
|
-
black: [30, 39],
|
|
280
|
-
red: [31, 39],
|
|
281
|
-
green: [32, 39],
|
|
282
|
-
yellow: [33, 39],
|
|
283
|
-
blue: [34, 39],
|
|
284
|
-
magenta: [35, 39],
|
|
285
|
-
cyan: [36, 39],
|
|
286
|
-
white: [37, 39],
|
|
287
|
-
blackBright: [90, 39],
|
|
288
|
-
gray: [90, 39],
|
|
289
|
-
grey: [90, 39],
|
|
290
|
-
redBright: [91, 39],
|
|
291
|
-
greenBright: [92, 39],
|
|
292
|
-
yellowBright: [93, 39],
|
|
293
|
-
blueBright: [94, 39],
|
|
294
|
-
magentaBright: [95, 39],
|
|
295
|
-
cyanBright: [96, 39],
|
|
296
|
-
whiteBright: [97, 39]
|
|
297
|
-
},
|
|
298
|
-
bgColor: {
|
|
299
|
-
bgBlack: [40, 49],
|
|
300
|
-
bgRed: [41, 49],
|
|
301
|
-
bgGreen: [42, 49],
|
|
302
|
-
bgYellow: [43, 49],
|
|
303
|
-
bgBlue: [44, 49],
|
|
304
|
-
bgMagenta: [45, 49],
|
|
305
|
-
bgCyan: [46, 49],
|
|
306
|
-
bgWhite: [47, 49],
|
|
307
|
-
bgBlackBright: [100, 49],
|
|
308
|
-
bgGray: [100, 49],
|
|
309
|
-
bgGrey: [100, 49],
|
|
310
|
-
bgRedBright: [101, 49],
|
|
311
|
-
bgGreenBright: [102, 49],
|
|
312
|
-
bgYellowBright: [103, 49],
|
|
313
|
-
bgBlueBright: [104, 49],
|
|
314
|
-
bgMagentaBright: [105, 49],
|
|
315
|
-
bgCyanBright: [106, 49],
|
|
316
|
-
bgWhiteBright: [107, 49]
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
Object.keys(r.modifier);
|
|
320
|
-
const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
|
|
321
|
-
[...tD, ...eD];
|
|
322
|
-
function sD() {
|
|
323
|
-
const t = /* @__PURE__ */ new Map();
|
|
324
|
-
for (const [u$2, F$1] of Object.entries(r)) {
|
|
325
|
-
for (const [e$1, s] of Object.entries(F$1)) r[e$1] = {
|
|
326
|
-
open: `\x1B[${s[0]}m`,
|
|
327
|
-
close: `\x1B[${s[1]}m`
|
|
328
|
-
}, F$1[e$1] = r[e$1], t.set(s[0], s[1]);
|
|
329
|
-
Object.defineProperty(r, u$2, {
|
|
330
|
-
value: F$1,
|
|
331
|
-
enumerable: !1
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
return Object.defineProperty(r, "codes", {
|
|
335
|
-
value: t,
|
|
336
|
-
enumerable: !1
|
|
337
|
-
}), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L$1(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L$1(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, {
|
|
338
|
-
rgbToAnsi256: {
|
|
339
|
-
value: (u$2, F$1, e$1) => u$2 === F$1 && F$1 === e$1 ? u$2 < 8 ? 16 : u$2 > 248 ? 231 : Math.round((u$2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u$2 / 255 * 5) + 6 * Math.round(F$1 / 255 * 5) + Math.round(e$1 / 255 * 5),
|
|
340
|
-
enumerable: !1
|
|
341
|
-
},
|
|
342
|
-
hexToRgb: {
|
|
343
|
-
value: (u$2) => {
|
|
344
|
-
const F$1 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u$2.toString(16));
|
|
345
|
-
if (!F$1) return [
|
|
346
|
-
0,
|
|
347
|
-
0,
|
|
348
|
-
0
|
|
349
|
-
];
|
|
350
|
-
let [e$1] = F$1;
|
|
351
|
-
e$1.length === 3 && (e$1 = [...e$1].map((i$1) => i$1 + i$1).join(""));
|
|
352
|
-
const s = Number.parseInt(e$1, 16);
|
|
353
|
-
return [
|
|
354
|
-
s >> 16 & 255,
|
|
355
|
-
s >> 8 & 255,
|
|
356
|
-
s & 255
|
|
357
|
-
];
|
|
358
|
-
},
|
|
359
|
-
enumerable: !1
|
|
360
|
-
},
|
|
361
|
-
hexToAnsi256: {
|
|
362
|
-
value: (u$2) => r.rgbToAnsi256(...r.hexToRgb(u$2)),
|
|
363
|
-
enumerable: !1
|
|
364
|
-
},
|
|
365
|
-
ansi256ToAnsi: {
|
|
366
|
-
value: (u$2) => {
|
|
367
|
-
if (u$2 < 8) return 30 + u$2;
|
|
368
|
-
if (u$2 < 16) return 90 + (u$2 - 8);
|
|
369
|
-
let F$1, e$1, s;
|
|
370
|
-
if (u$2 >= 232) F$1 = ((u$2 - 232) * 10 + 8) / 255, e$1 = F$1, s = F$1;
|
|
371
|
-
else {
|
|
372
|
-
u$2 -= 16;
|
|
373
|
-
const C$1 = u$2 % 36;
|
|
374
|
-
F$1 = Math.floor(u$2 / 36) / 5, e$1 = Math.floor(C$1 / 6) / 5, s = C$1 % 6 / 5;
|
|
375
|
-
}
|
|
376
|
-
const i$1 = Math.max(F$1, e$1, s) * 2;
|
|
377
|
-
if (i$1 === 0) return 30;
|
|
378
|
-
let D$1 = 30 + (Math.round(s) << 2 | Math.round(e$1) << 1 | Math.round(F$1));
|
|
379
|
-
return i$1 === 2 && (D$1 += 60), D$1;
|
|
380
|
-
},
|
|
381
|
-
enumerable: !1
|
|
382
|
-
},
|
|
383
|
-
rgbToAnsi: {
|
|
384
|
-
value: (u$2, F$1, e$1) => r.ansi256ToAnsi(r.rgbToAnsi256(u$2, F$1, e$1)),
|
|
385
|
-
enumerable: !1
|
|
386
|
-
},
|
|
387
|
-
hexToAnsi: {
|
|
388
|
-
value: (u$2) => r.ansi256ToAnsi(r.hexToAnsi256(u$2)),
|
|
389
|
-
enumerable: !1
|
|
390
|
-
}
|
|
391
|
-
}), r;
|
|
392
|
-
}
|
|
393
|
-
const iD = sD(), v = new Set(["\x1B", ""]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u$2) => A$1(u$2)), _$1 = (t, u$2, F$1) => {
|
|
394
|
-
const e$1 = [...u$2];
|
|
395
|
-
let s = !1, i$1 = !1, D$1 = A$1(T$1(t[t.length - 1]));
|
|
396
|
-
for (const [C$1, o$2] of e$1.entries()) {
|
|
397
|
-
const E = A$1(o$2);
|
|
398
|
-
if (D$1 + E <= F$1 ? t[t.length - 1] += o$2 : (t.push(o$2), D$1 = 0), v.has(o$2) && (s = !0, i$1 = e$1.slice(C$1 + 1).join("").startsWith(y)), s) {
|
|
399
|
-
i$1 ? o$2 === w$1 && (s = !1, i$1 = !1) : o$2 === R && (s = !1);
|
|
400
|
-
continue;
|
|
401
|
-
}
|
|
402
|
-
D$1 += E, D$1 === F$1 && C$1 < e$1.length - 1 && (t.push(""), D$1 = 0);
|
|
403
|
-
}
|
|
404
|
-
!D$1 && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
405
|
-
}, nD = (t) => {
|
|
406
|
-
const u$2 = t.split(" ");
|
|
407
|
-
let F$1 = u$2.length;
|
|
408
|
-
for (; F$1 > 0 && !(A$1(u$2[F$1 - 1]) > 0);) F$1--;
|
|
409
|
-
return F$1 === u$2.length ? t : u$2.slice(0, F$1).join(" ") + u$2.slice(F$1).join("");
|
|
410
|
-
}, oD = (t, u$2, F$1 = {}) => {
|
|
411
|
-
if (F$1.trim !== !1 && t.trim() === "") return "";
|
|
412
|
-
let e$1 = "", s, i$1;
|
|
413
|
-
const D$1 = ED(t);
|
|
414
|
-
let C$1 = [""];
|
|
415
|
-
for (const [E, a$1] of t.split(" ").entries()) {
|
|
416
|
-
F$1.trim !== !1 && (C$1[C$1.length - 1] = C$1[C$1.length - 1].trimStart());
|
|
417
|
-
let n$1 = A$1(C$1[C$1.length - 1]);
|
|
418
|
-
if (E !== 0 && (n$1 >= u$2 && (F$1.wordWrap === !1 || F$1.trim === !1) && (C$1.push(""), n$1 = 0), (n$1 > 0 || F$1.trim === !1) && (C$1[C$1.length - 1] += " ", n$1++)), F$1.hard && D$1[E] > u$2) {
|
|
419
|
-
const B$1 = u$2 - n$1, p$1 = 1 + Math.floor((D$1[E] - B$1 - 1) / u$2);
|
|
420
|
-
Math.floor((D$1[E] - 1) / u$2) < p$1 && C$1.push(""), _$1(C$1, a$1, u$2);
|
|
421
|
-
continue;
|
|
422
|
-
}
|
|
423
|
-
if (n$1 + D$1[E] > u$2 && n$1 > 0 && D$1[E] > 0) {
|
|
424
|
-
if (F$1.wordWrap === !1 && n$1 < u$2) {
|
|
425
|
-
_$1(C$1, a$1, u$2);
|
|
426
|
-
continue;
|
|
427
|
-
}
|
|
428
|
-
C$1.push("");
|
|
429
|
-
}
|
|
430
|
-
if (n$1 + D$1[E] > u$2 && F$1.wordWrap === !1) {
|
|
431
|
-
_$1(C$1, a$1, u$2);
|
|
432
|
-
continue;
|
|
433
|
-
}
|
|
434
|
-
C$1[C$1.length - 1] += a$1;
|
|
435
|
-
}
|
|
436
|
-
F$1.trim !== !1 && (C$1 = C$1.map((E) => nD(E)));
|
|
437
|
-
const o$2 = [...C$1.join(`
|
|
438
|
-
`)];
|
|
439
|
-
for (const [E, a$1] of o$2.entries()) {
|
|
440
|
-
if (e$1 += a$1, v.has(a$1)) {
|
|
441
|
-
const { groups: B$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${W$1}(?<code>\\d+)m|\\${y}(?<uri>.*)${w$1})`)).exec(o$2.slice(E).join("")) || { groups: {} };
|
|
442
|
-
if (B$1.code !== void 0) {
|
|
443
|
-
const p$1 = Number.parseFloat(B$1.code);
|
|
444
|
-
s = p$1 === CD ? void 0 : p$1;
|
|
445
|
-
} else B$1.uri !== void 0 && (i$1 = B$1.uri.length === 0 ? void 0 : B$1.uri);
|
|
446
|
-
}
|
|
447
|
-
const n$1 = iD.codes.get(Number(s));
|
|
448
|
-
o$2[E + 1] === `
|
|
449
|
-
` ? (i$1 && (e$1 += z("")), s && n$1 && (e$1 += V$1(n$1))) : a$1 === `
|
|
450
|
-
` && (s && n$1 && (e$1 += V$1(s)), i$1 && (e$1 += z(i$1)));
|
|
451
|
-
}
|
|
452
|
-
return e$1;
|
|
453
|
-
};
|
|
454
|
-
function G(t, u$2, F$1) {
|
|
455
|
-
return String(t).normalize().replace(/\r\n/g, `
|
|
456
|
-
`).split(`
|
|
457
|
-
`).map((e$1) => oD(e$1, u$2, F$1)).join(`
|
|
458
|
-
`);
|
|
459
|
-
}
|
|
460
|
-
const c$1 = {
|
|
461
|
-
actions: new Set([
|
|
462
|
-
"up",
|
|
463
|
-
"down",
|
|
464
|
-
"left",
|
|
465
|
-
"right",
|
|
466
|
-
"space",
|
|
467
|
-
"enter",
|
|
468
|
-
"cancel"
|
|
469
|
-
]),
|
|
470
|
-
aliases: new Map([
|
|
471
|
-
["k", "up"],
|
|
472
|
-
["j", "down"],
|
|
473
|
-
["h", "left"],
|
|
474
|
-
["l", "right"],
|
|
475
|
-
["", "cancel"],
|
|
476
|
-
["escape", "cancel"]
|
|
477
|
-
])
|
|
478
|
-
};
|
|
479
|
-
function k$1(t, u$2) {
|
|
480
|
-
if (typeof t == "string") return c$1.aliases.get(t) === u$2;
|
|
481
|
-
for (const F$1 of t) if (F$1 !== void 0 && k$1(F$1, u$2)) return !0;
|
|
482
|
-
return !1;
|
|
483
|
-
}
|
|
484
|
-
function lD(t, u$2) {
|
|
485
|
-
if (t === u$2) return;
|
|
486
|
-
const F$1 = t.split(`
|
|
487
|
-
`), e$1 = u$2.split(`
|
|
488
|
-
`), s = [];
|
|
489
|
-
for (let i$1 = 0; i$1 < Math.max(F$1.length, e$1.length); i$1++) F$1[i$1] !== e$1[i$1] && s.push(i$1);
|
|
490
|
-
return s;
|
|
491
|
-
}
|
|
492
|
-
const xD = globalThis.process.platform.startsWith("win"), S$1 = Symbol("clack:cancel");
|
|
493
|
-
function BD(t) {
|
|
494
|
-
return t === S$1;
|
|
495
|
-
}
|
|
496
|
-
function d$1(t, u$2) {
|
|
497
|
-
const F$1 = t;
|
|
498
|
-
F$1.isTTY && F$1.setRawMode(u$2);
|
|
499
|
-
}
|
|
500
|
-
function cD({ input: t = node_process.stdin, output: u$2 = node_process.stdout, overwrite: F$1 = !0, hideCursor: e$1 = !0 } = {}) {
|
|
501
|
-
const s = node_readline.createInterface({
|
|
502
|
-
input: t,
|
|
503
|
-
output: u$2,
|
|
504
|
-
prompt: "",
|
|
505
|
-
tabSize: 1
|
|
506
|
-
});
|
|
507
|
-
node_readline.emitKeypressEvents(t, s), t.isTTY && t.setRawMode(!0);
|
|
508
|
-
const i$1 = (D$1, { name: C$1, sequence: o$2 }) => {
|
|
509
|
-
if (k$1([
|
|
510
|
-
String(D$1),
|
|
511
|
-
C$1,
|
|
512
|
-
o$2
|
|
513
|
-
], "cancel")) {
|
|
514
|
-
e$1 && u$2.write(import_src$1.cursor.show), process.exit(0);
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
if (!F$1) return;
|
|
518
|
-
const a$1 = C$1 === "return" ? 0 : -1, n$1 = C$1 === "return" ? -1 : 0;
|
|
519
|
-
node_readline.moveCursor(u$2, a$1, n$1, () => {
|
|
520
|
-
node_readline.clearLine(u$2, 1, () => {
|
|
521
|
-
t.once("keypress", i$1);
|
|
522
|
-
});
|
|
523
|
-
});
|
|
524
|
-
};
|
|
525
|
-
return e$1 && u$2.write(import_src$1.cursor.hide), t.once("keypress", i$1), () => {
|
|
526
|
-
t.off("keypress", i$1), e$1 && u$2.write(import_src$1.cursor.show), t.isTTY && !xD && t.setRawMode(!1), s.terminal = !1, s.close();
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
var AD = Object.defineProperty, pD = (t, u$2, F$1) => u$2 in t ? AD(t, u$2, {
|
|
530
|
-
enumerable: !0,
|
|
531
|
-
configurable: !0,
|
|
532
|
-
writable: !0,
|
|
533
|
-
value: F$1
|
|
534
|
-
}) : t[u$2] = F$1, h$1 = (t, u$2, F$1) => (pD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
535
|
-
var x = class {
|
|
536
|
-
constructor(u$2, F$1 = !0) {
|
|
537
|
-
h$1(this, "input"), h$1(this, "output"), h$1(this, "_abortSignal"), h$1(this, "rl"), h$1(this, "opts"), h$1(this, "_render"), h$1(this, "_track", !1), h$1(this, "_prevFrame", ""), h$1(this, "_subscribers", /* @__PURE__ */ new Map()), h$1(this, "_cursor", 0), h$1(this, "state", "initial"), h$1(this, "error", ""), h$1(this, "value");
|
|
538
|
-
const { input: e$1 = node_process.stdin, output: s = node_process.stdout, render: i$1, signal: D$1,...C$1 } = u$2;
|
|
539
|
-
this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i$1.bind(this), this._track = F$1, this._abortSignal = D$1, this.input = e$1, this.output = s;
|
|
540
|
-
}
|
|
541
|
-
unsubscribe() {
|
|
542
|
-
this._subscribers.clear();
|
|
543
|
-
}
|
|
544
|
-
setSubscriber(u$2, F$1) {
|
|
545
|
-
const e$1 = this._subscribers.get(u$2) ?? [];
|
|
546
|
-
e$1.push(F$1), this._subscribers.set(u$2, e$1);
|
|
547
|
-
}
|
|
548
|
-
on(u$2, F$1) {
|
|
549
|
-
this.setSubscriber(u$2, { cb: F$1 });
|
|
550
|
-
}
|
|
551
|
-
once(u$2, F$1) {
|
|
552
|
-
this.setSubscriber(u$2, {
|
|
553
|
-
cb: F$1,
|
|
554
|
-
once: !0
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
emit(u$2, ...F$1) {
|
|
558
|
-
const e$1 = this._subscribers.get(u$2) ?? [], s = [];
|
|
559
|
-
for (const i$1 of e$1) i$1.cb(...F$1), i$1.once && s.push(() => e$1.splice(e$1.indexOf(i$1), 1));
|
|
560
|
-
for (const i$1 of s) i$1();
|
|
561
|
-
}
|
|
562
|
-
prompt() {
|
|
563
|
-
return new Promise((u$2, F$1) => {
|
|
564
|
-
if (this._abortSignal) {
|
|
565
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u$2(S$1);
|
|
566
|
-
this._abortSignal.addEventListener("abort", () => {
|
|
567
|
-
this.state = "cancel", this.close();
|
|
568
|
-
}, { once: !0 });
|
|
569
|
-
}
|
|
570
|
-
const e$1 = new node_tty.WriteStream(0);
|
|
571
|
-
e$1._write = (s, i$1, D$1) => {
|
|
572
|
-
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D$1();
|
|
573
|
-
}, this.input.pipe(e$1), this.rl = node_readline.default.createInterface({
|
|
574
|
-
input: this.input,
|
|
575
|
-
output: e$1,
|
|
576
|
-
tabSize: 2,
|
|
577
|
-
prompt: "",
|
|
578
|
-
escapeCodeTimeout: 50
|
|
579
|
-
}), node_readline.default.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), d$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
580
|
-
this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(this.value);
|
|
581
|
-
}), this.once("cancel", () => {
|
|
582
|
-
this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), d$1(this.input, !1), u$2(S$1);
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
onKeypress(u$2, F$1) {
|
|
587
|
-
if (this.state === "error" && (this.state = "active"), F$1?.name && (!this._track && c$1.aliases.has(F$1.name) && this.emit("cursor", c$1.aliases.get(F$1.name)), c$1.actions.has(F$1.name) && this.emit("cursor", F$1.name)), u$2 && (u$2.toLowerCase() === "y" || u$2.toLowerCase() === "n") && this.emit("confirm", u$2.toLowerCase() === "y"), u$2 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u$2 && this.emit("key", u$2.toLowerCase()), F$1?.name === "return") {
|
|
588
|
-
if (this.opts.validate) {
|
|
589
|
-
const e$1 = this.opts.validate(this.value);
|
|
590
|
-
e$1 && (this.error = e$1 instanceof Error ? e$1.message : e$1, this.state = "error", this.rl?.write(this.value));
|
|
591
|
-
}
|
|
592
|
-
this.state !== "error" && (this.state = "submit");
|
|
593
|
-
}
|
|
594
|
-
k$1([
|
|
595
|
-
u$2,
|
|
596
|
-
F$1?.name,
|
|
597
|
-
F$1?.sequence
|
|
598
|
-
], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
599
|
-
}
|
|
600
|
-
close() {
|
|
601
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
602
|
-
`), d$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
603
|
-
}
|
|
604
|
-
restoreCursor() {
|
|
605
|
-
const u$2 = G(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
|
|
606
|
-
`).length - 1;
|
|
607
|
-
this.output.write(import_src$1.cursor.move(-999, u$2 * -1));
|
|
608
|
-
}
|
|
609
|
-
render() {
|
|
610
|
-
const u$2 = G(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
|
|
611
|
-
if (u$2 !== this._prevFrame) {
|
|
612
|
-
if (this.state === "initial") this.output.write(import_src$1.cursor.hide);
|
|
613
|
-
else {
|
|
614
|
-
const F$1 = lD(this._prevFrame, u$2);
|
|
615
|
-
if (this.restoreCursor(), F$1 && F$1?.length === 1) {
|
|
616
|
-
const e$1 = F$1[0];
|
|
617
|
-
this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.lines(1));
|
|
618
|
-
const s = u$2.split(`
|
|
619
|
-
`);
|
|
620
|
-
this.output.write(s[e$1]), this._prevFrame = u$2, this.output.write(import_src$1.cursor.move(0, s.length - e$1 - 1));
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
if (F$1 && F$1?.length > 1) {
|
|
624
|
-
const e$1 = F$1[0];
|
|
625
|
-
this.output.write(import_src$1.cursor.move(0, e$1)), this.output.write(import_src$1.erase.down());
|
|
626
|
-
const s = u$2.split(`
|
|
627
|
-
`).slice(e$1);
|
|
628
|
-
this.output.write(s.join(`
|
|
629
|
-
`)), this._prevFrame = u$2;
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
this.output.write(import_src$1.erase.down());
|
|
633
|
-
}
|
|
634
|
-
this.output.write(u$2), this.state === "initial" && (this.state = "active"), this._prevFrame = u$2;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
var fD = class extends x {
|
|
639
|
-
get cursor() {
|
|
640
|
-
return this.value ? 0 : 1;
|
|
641
|
-
}
|
|
642
|
-
get _value() {
|
|
643
|
-
return this.cursor === 0;
|
|
644
|
-
}
|
|
645
|
-
constructor(u$2) {
|
|
646
|
-
super(u$2, !1), this.value = !!u$2.initialValue, this.on("value", () => {
|
|
647
|
-
this.value = this._value;
|
|
648
|
-
}), this.on("confirm", (F$1) => {
|
|
649
|
-
this.output.write(import_src$1.cursor.move(0, -1)), this.value = F$1, this.state = "submit", this.close();
|
|
650
|
-
}), this.on("cursor", () => {
|
|
651
|
-
this.value = !this.value;
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
var gD = Object.defineProperty, vD = (t, u$2, F$1) => u$2 in t ? gD(t, u$2, {
|
|
656
|
-
enumerable: !0,
|
|
657
|
-
configurable: !0,
|
|
658
|
-
writable: !0,
|
|
659
|
-
value: F$1
|
|
660
|
-
}) : t[u$2] = F$1, K$1 = (t, u$2, F$1) => (vD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
661
|
-
let dD = class extends x {
|
|
662
|
-
constructor(u$2) {
|
|
663
|
-
super(u$2, !1), K$1(this, "options"), K$1(this, "cursor", 0);
|
|
664
|
-
const { options: F$1 } = u$2;
|
|
665
|
-
this.options = Object.entries(F$1).flatMap(([e$1, s]) => [{
|
|
666
|
-
value: e$1,
|
|
667
|
-
group: !0,
|
|
668
|
-
label: e$1
|
|
669
|
-
}, ...s.map((i$1) => ({
|
|
670
|
-
...i$1,
|
|
671
|
-
group: e$1
|
|
672
|
-
}))]), this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e$1 }) => e$1 === u$2.cursorAt), 0), this.on("cursor", (e$1) => {
|
|
673
|
-
switch (e$1) {
|
|
674
|
-
case "left":
|
|
675
|
-
case "up":
|
|
676
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
677
|
-
break;
|
|
678
|
-
case "down":
|
|
679
|
-
case "right":
|
|
680
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
681
|
-
break;
|
|
682
|
-
case "space":
|
|
683
|
-
this.toggleValue();
|
|
684
|
-
break;
|
|
685
|
-
}
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
getGroupItems(u$2) {
|
|
689
|
-
return this.options.filter((F$1) => F$1.group === u$2);
|
|
690
|
-
}
|
|
691
|
-
isGroupSelected(u$2) {
|
|
692
|
-
return this.getGroupItems(u$2).every((F$1) => this.value.includes(F$1.value));
|
|
693
|
-
}
|
|
694
|
-
toggleValue() {
|
|
695
|
-
const u$2 = this.options[this.cursor];
|
|
696
|
-
if (u$2.group === !0) {
|
|
697
|
-
const F$1 = u$2.value, e$1 = this.getGroupItems(F$1);
|
|
698
|
-
this.isGroupSelected(F$1) ? this.value = this.value.filter((s) => e$1.findIndex((i$1) => i$1.value === s) === -1) : this.value = [...this.value, ...e$1.map((s) => s.value)], this.value = Array.from(new Set(this.value));
|
|
699
|
-
} else this.value = this.value.includes(u$2.value) ? this.value.filter((e$1) => e$1 !== u$2.value) : [...this.value, u$2.value];
|
|
700
|
-
}
|
|
701
|
-
};
|
|
702
|
-
var bD = Object.defineProperty, mD = (t, u$2, F$1) => u$2 in t ? bD(t, u$2, {
|
|
703
|
-
enumerable: !0,
|
|
704
|
-
configurable: !0,
|
|
705
|
-
writable: !0,
|
|
706
|
-
value: F$1
|
|
707
|
-
}) : t[u$2] = F$1, Y$1 = (t, u$2, F$1) => (mD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
708
|
-
let wD = class extends x {
|
|
709
|
-
constructor(u$2) {
|
|
710
|
-
super(u$2, !1), Y$1(this, "options"), Y$1(this, "cursor", 0), this.options = u$2.options, this.value = [...u$2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F$1 }) => F$1 === u$2.cursorAt), 0), this.on("key", (F$1) => {
|
|
711
|
-
F$1 === "a" && this.toggleAll();
|
|
712
|
-
}), this.on("cursor", (F$1) => {
|
|
713
|
-
switch (F$1) {
|
|
714
|
-
case "left":
|
|
715
|
-
case "up":
|
|
716
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
717
|
-
break;
|
|
718
|
-
case "down":
|
|
719
|
-
case "right":
|
|
720
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
721
|
-
break;
|
|
722
|
-
case "space":
|
|
723
|
-
this.toggleValue();
|
|
724
|
-
break;
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
get _value() {
|
|
729
|
-
return this.options[this.cursor].value;
|
|
730
|
-
}
|
|
731
|
-
toggleAll() {
|
|
732
|
-
this.value = this.value.length === this.options.length ? [] : this.options.map((F$1) => F$1.value);
|
|
733
|
-
}
|
|
734
|
-
toggleValue() {
|
|
735
|
-
this.value = this.value.includes(this._value) ? this.value.filter((F$1) => F$1 !== this._value) : [...this.value, this._value];
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
var yD = Object.defineProperty, _D = (t, u$2, F$1) => u$2 in t ? yD(t, u$2, {
|
|
739
|
-
enumerable: !0,
|
|
740
|
-
configurable: !0,
|
|
741
|
-
writable: !0,
|
|
742
|
-
value: F$1
|
|
743
|
-
}) : t[u$2] = F$1, Z = (t, u$2, F$1) => (_D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
744
|
-
var kD = class extends x {
|
|
745
|
-
constructor({ mask: u$2,...F$1 }) {
|
|
746
|
-
super(F$1), Z(this, "valueWithCursor", ""), Z(this, "_mask", "•"), this._mask = u$2 ?? "•", this.on("finalize", () => {
|
|
747
|
-
this.valueWithCursor = this.masked;
|
|
748
|
-
}), this.on("value", () => {
|
|
749
|
-
if (this.cursor >= this.value.length) this.valueWithCursor = `${this.masked}${import_picocolors$1.default.inverse(import_picocolors$1.default.hidden("_"))}`;
|
|
750
|
-
else {
|
|
751
|
-
const e$1 = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
|
|
752
|
-
this.valueWithCursor = `${e$1}${import_picocolors$1.default.inverse(s[0])}${s.slice(1)}`;
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
get cursor() {
|
|
757
|
-
return this._cursor;
|
|
758
|
-
}
|
|
759
|
-
get masked() {
|
|
760
|
-
return this.value.replaceAll(/./g, this._mask);
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
var SD = Object.defineProperty, $D = (t, u$2, F$1) => u$2 in t ? SD(t, u$2, {
|
|
764
|
-
enumerable: !0,
|
|
765
|
-
configurable: !0,
|
|
766
|
-
writable: !0,
|
|
767
|
-
value: F$1
|
|
768
|
-
}) : t[u$2] = F$1, q$1 = (t, u$2, F$1) => ($D(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
769
|
-
var jD = class extends x {
|
|
770
|
-
constructor(u$2) {
|
|
771
|
-
super(u$2, !1), q$1(this, "options"), q$1(this, "cursor", 0), this.options = u$2.options, this.cursor = this.options.findIndex(({ value: F$1 }) => F$1 === u$2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F$1) => {
|
|
772
|
-
switch (F$1) {
|
|
773
|
-
case "left":
|
|
774
|
-
case "up":
|
|
775
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
776
|
-
break;
|
|
777
|
-
case "down":
|
|
778
|
-
case "right":
|
|
779
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
780
|
-
break;
|
|
781
|
-
}
|
|
782
|
-
this.changeValue();
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
get _value() {
|
|
786
|
-
return this.options[this.cursor];
|
|
787
|
-
}
|
|
788
|
-
changeValue() {
|
|
789
|
-
this.value = this._value.value;
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
var MD = Object.defineProperty, TD = (t, u$2, F$1) => u$2 in t ? MD(t, u$2, {
|
|
793
|
-
enumerable: !0,
|
|
794
|
-
configurable: !0,
|
|
795
|
-
writable: !0,
|
|
796
|
-
value: F$1
|
|
797
|
-
}) : t[u$2] = F$1, H = (t, u$2, F$1) => (TD(t, typeof u$2 != "symbol" ? u$2 + "" : u$2, F$1), F$1);
|
|
798
|
-
var OD = class extends x {
|
|
799
|
-
constructor(u$2) {
|
|
800
|
-
super(u$2, !1), H(this, "options"), H(this, "cursor", 0), this.options = u$2.options;
|
|
801
|
-
const F$1 = this.options.map(({ value: [e$1] }) => e$1?.toLowerCase());
|
|
802
|
-
this.cursor = Math.max(F$1.indexOf(u$2.initialValue), 0), this.on("key", (e$1) => {
|
|
803
|
-
if (!F$1.includes(e$1)) return;
|
|
804
|
-
const s = this.options.find(({ value: [i$1] }) => i$1?.toLowerCase() === e$1);
|
|
805
|
-
s && (this.value = s.value, this.state = "submit", this.emit("submit"));
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
var PD = class extends x {
|
|
810
|
-
get valueWithCursor() {
|
|
811
|
-
if (this.state === "submit") return this.value;
|
|
812
|
-
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
813
|
-
const u$2 = this.value.slice(0, this.cursor), [F$1, ...e$1] = this.value.slice(this.cursor);
|
|
814
|
-
return `${u$2}${import_picocolors$1.default.inverse(F$1)}${e$1.join("")}`;
|
|
815
|
-
}
|
|
816
|
-
get cursor() {
|
|
817
|
-
return this._cursor;
|
|
818
|
-
}
|
|
819
|
-
constructor(u$2) {
|
|
820
|
-
super(u$2), this.on("finalize", () => {
|
|
821
|
-
this.value || (this.value = u$2.defaultValue);
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
|
|
826
|
-
//#endregion
|
|
827
|
-
//#region ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
|
|
828
|
-
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
829
|
-
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
830
|
-
function ce() {
|
|
831
|
-
return node_process.default.platform !== "win32" ? node_process.default.env.TERM !== "linux" : !!node_process.default.env.CI || !!node_process.default.env.WT_SESSION || !!node_process.default.env.TERMINUS_SUBLIME || node_process.default.env.ConEmuTask === "{cmd::Cmder}" || node_process.default.env.TERM_PROGRAM === "Terminus-Sublime" || node_process.default.env.TERM_PROGRAM === "vscode" || node_process.default.env.TERM === "xterm-256color" || node_process.default.env.TERM === "alacritty" || node_process.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
832
|
-
}
|
|
833
|
-
const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), w = (t) => {
|
|
834
|
-
switch (t) {
|
|
835
|
-
case "initial":
|
|
836
|
-
case "active": return import_picocolors.default.cyan(le);
|
|
837
|
-
case "cancel": return import_picocolors.default.red(L);
|
|
838
|
-
case "error": return import_picocolors.default.yellow(W);
|
|
839
|
-
case "submit": return import_picocolors.default.green(C);
|
|
840
|
-
}
|
|
841
|
-
}, B = (t) => {
|
|
842
|
-
const { cursor: n$1, options: s, style: r$1 } = t, i$1 = t.maxItems ?? Number.POSITIVE_INFINITY, a$1 = Math.max(process.stdout.rows - 4, 0), c$2 = Math.min(a$1, Math.max(i$1, 5));
|
|
843
|
-
let l$1 = 0;
|
|
844
|
-
n$1 >= l$1 + c$2 - 3 ? l$1 = Math.max(Math.min(n$1 - c$2 + 3, s.length - c$2), 0) : n$1 < l$1 + 2 && (l$1 = Math.max(n$1 - 2, 0));
|
|
845
|
-
const $$2 = c$2 < s.length && l$1 > 0, p$1 = c$2 < s.length && l$1 + c$2 < s.length;
|
|
846
|
-
return s.slice(l$1, l$1 + c$2).map((M$1, v$1, x$1) => {
|
|
847
|
-
const j$1 = v$1 === 0 && $$2, E = v$1 === x$1.length - 1 && p$1;
|
|
848
|
-
return j$1 || E ? import_picocolors.default.dim("...") : r$1(M$1, v$1 + l$1 === n$1);
|
|
849
|
-
});
|
|
850
|
-
}, he = (t) => new PD({
|
|
851
|
-
validate: t.validate,
|
|
852
|
-
placeholder: t.placeholder,
|
|
853
|
-
defaultValue: t.defaultValue,
|
|
854
|
-
initialValue: t.initialValue,
|
|
855
|
-
render() {
|
|
856
|
-
const n$1 = `${import_picocolors.default.gray(o$1)}
|
|
857
|
-
${w(this.state)} ${t.message}
|
|
858
|
-
`, s = t.placeholder ? import_picocolors.default.inverse(t.placeholder[0]) + import_picocolors.default.dim(t.placeholder.slice(1)) : import_picocolors.default.inverse(import_picocolors.default.hidden("_")), r$1 = this.value ? this.valueWithCursor : s;
|
|
859
|
-
switch (this.state) {
|
|
860
|
-
case "error": return `${n$1.trim()}
|
|
861
|
-
${import_picocolors.default.yellow(o$1)} ${r$1}
|
|
862
|
-
${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
|
|
863
|
-
`;
|
|
864
|
-
case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(this.value || t.placeholder)}`;
|
|
865
|
-
case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
866
|
-
${import_picocolors.default.gray(o$1)}` : ""}`;
|
|
867
|
-
default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${r$1}
|
|
868
|
-
${import_picocolors.default.cyan(d)}
|
|
869
|
-
`;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
}).prompt(), ge = (t) => new kD({
|
|
873
|
-
validate: t.validate,
|
|
874
|
-
mask: t.mask ?? $e,
|
|
875
|
-
render() {
|
|
876
|
-
const n$1 = `${import_picocolors.default.gray(o$1)}
|
|
877
|
-
${w(this.state)} ${t.message}
|
|
878
|
-
`, s = this.valueWithCursor, r$1 = this.masked;
|
|
879
|
-
switch (this.state) {
|
|
880
|
-
case "error": return `${n$1.trim()}
|
|
881
|
-
${import_picocolors.default.yellow(o$1)} ${r$1}
|
|
882
|
-
${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
|
|
883
|
-
`;
|
|
884
|
-
case "submit": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(r$1)}`;
|
|
885
|
-
case "cancel": return `${n$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(r$1 ?? ""))}${r$1 ? `
|
|
886
|
-
${import_picocolors.default.gray(o$1)}` : ""}`;
|
|
887
|
-
default: return `${n$1}${import_picocolors.default.cyan(o$1)} ${s}
|
|
888
|
-
${import_picocolors.default.cyan(d)}
|
|
889
|
-
`;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
}).prompt(), ye = (t) => {
|
|
893
|
-
const n$1 = t.active ?? "Yes", s = t.inactive ?? "No";
|
|
894
|
-
return new fD({
|
|
895
|
-
active: n$1,
|
|
896
|
-
inactive: s,
|
|
897
|
-
initialValue: t.initialValue ?? !0,
|
|
898
|
-
render() {
|
|
899
|
-
const r$1 = `${import_picocolors.default.gray(o$1)}
|
|
900
|
-
${w(this.state)} ${t.message}
|
|
901
|
-
`, i$1 = this.value ? n$1 : s;
|
|
902
|
-
switch (this.state) {
|
|
903
|
-
case "submit": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(i$1)}`;
|
|
904
|
-
case "cancel": return `${r$1}${import_picocolors.default.gray(o$1)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}
|
|
905
|
-
${import_picocolors.default.gray(o$1)}`;
|
|
906
|
-
default: return `${r$1}${import_picocolors.default.cyan(o$1)} ${this.value ? `${import_picocolors.default.green(k)} ${n$1}` : `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(n$1)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(s)}` : `${import_picocolors.default.green(k)} ${s}`}
|
|
907
|
-
${import_picocolors.default.cyan(d)}
|
|
908
|
-
`;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}).prompt();
|
|
912
|
-
}, ve = (t) => {
|
|
913
|
-
const n$1 = (s, r$1) => {
|
|
914
|
-
const i$1 = s.label ?? String(s.value);
|
|
915
|
-
switch (r$1) {
|
|
916
|
-
case "selected": return `${import_picocolors.default.dim(i$1)}`;
|
|
917
|
-
case "active": return `${import_picocolors.default.green(k)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
|
|
918
|
-
case "cancelled": return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}`;
|
|
919
|
-
default: return `${import_picocolors.default.dim(P)} ${import_picocolors.default.dim(i$1)}`;
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
|
-
return new jD({
|
|
923
|
-
options: t.options,
|
|
924
|
-
initialValue: t.initialValue,
|
|
925
|
-
render() {
|
|
926
|
-
const s = `${import_picocolors.default.gray(o$1)}
|
|
927
|
-
${w(this.state)} ${t.message}
|
|
928
|
-
`;
|
|
929
|
-
switch (this.state) {
|
|
930
|
-
case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "selected")}`;
|
|
931
|
-
case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[this.cursor], "cancelled")}
|
|
932
|
-
${import_picocolors.default.gray(o$1)}`;
|
|
933
|
-
default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
|
|
934
|
-
cursor: this.cursor,
|
|
935
|
-
options: this.options,
|
|
936
|
-
maxItems: t.maxItems,
|
|
937
|
-
style: (r$1, i$1) => n$1(r$1, i$1 ? "active" : "inactive")
|
|
938
|
-
}).join(`
|
|
939
|
-
${import_picocolors.default.cyan(o$1)} `)}
|
|
940
|
-
${import_picocolors.default.cyan(d)}
|
|
941
|
-
`;
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}).prompt();
|
|
945
|
-
}, we = (t) => {
|
|
946
|
-
const n$1 = (s, r$1 = "inactive") => {
|
|
947
|
-
const i$1 = s.label ?? String(s.value);
|
|
948
|
-
return r$1 === "selected" ? `${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active" ? `${import_picocolors.default.bgCyan(import_picocolors.default.gray(` ${s.value} `))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : `${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(` ${s.value} `)))} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}`;
|
|
949
|
-
};
|
|
950
|
-
return new OD({
|
|
951
|
-
options: t.options,
|
|
952
|
-
initialValue: t.initialValue,
|
|
953
|
-
render() {
|
|
954
|
-
const s = `${import_picocolors.default.gray(o$1)}
|
|
955
|
-
${w(this.state)} ${t.message}
|
|
956
|
-
`;
|
|
957
|
-
switch (this.state) {
|
|
958
|
-
case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options.find((r$1) => r$1.value === this.value) ?? t.options[0], "selected")}`;
|
|
959
|
-
case "cancel": return `${s}${import_picocolors.default.gray(o$1)} ${n$1(this.options[0], "cancelled")}
|
|
960
|
-
${import_picocolors.default.gray(o$1)}`;
|
|
961
|
-
default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1) => n$1(r$1, i$1 === this.cursor ? "active" : "inactive")).join(`
|
|
962
|
-
${import_picocolors.default.cyan(o$1)} `)}
|
|
963
|
-
${import_picocolors.default.cyan(d)}
|
|
964
|
-
`;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
}).prompt();
|
|
968
|
-
}, fe = (t) => {
|
|
969
|
-
const n$1 = (s, r$1) => {
|
|
970
|
-
const i$1 = s.label ?? String(s.value);
|
|
971
|
-
return r$1 === "active" ? `${import_picocolors.default.cyan(A)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "selected" ? `${import_picocolors.default.green(T)} ${import_picocolors.default.dim(i$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.green(T)} ${i$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(i$1)}` : `${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(i$1)}`;
|
|
972
|
-
};
|
|
973
|
-
return new wD({
|
|
974
|
-
options: t.options,
|
|
975
|
-
initialValues: t.initialValues,
|
|
976
|
-
required: t.required ?? !0,
|
|
977
|
-
cursorAt: t.cursorAt,
|
|
978
|
-
validate(s) {
|
|
979
|
-
if (this.required && s.length === 0) return `Please select at least one option.
|
|
980
|
-
${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
|
|
981
|
-
},
|
|
982
|
-
render() {
|
|
983
|
-
const s = `${import_picocolors.default.gray(o$1)}
|
|
984
|
-
${w(this.state)} ${t.message}
|
|
985
|
-
`, r$1 = (i$1, a$1) => {
|
|
986
|
-
const c$2 = this.value.includes(i$1.value);
|
|
987
|
-
return a$1 && c$2 ? n$1(i$1, "active-selected") : c$2 ? n$1(i$1, "selected") : n$1(i$1, a$1 ? "active" : "inactive");
|
|
988
|
-
};
|
|
989
|
-
switch (this.state) {
|
|
990
|
-
case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
|
|
991
|
-
case "cancel": {
|
|
992
|
-
const i$1 = this.options.filter(({ value: a$1 }) => this.value.includes(a$1)).map((a$1) => n$1(a$1, "cancelled")).join(import_picocolors.default.dim(", "));
|
|
993
|
-
return `${s}${import_picocolors.default.gray(o$1)} ${i$1.trim() ? `${i$1}
|
|
994
|
-
${import_picocolors.default.gray(o$1)}` : ""}`;
|
|
995
|
-
}
|
|
996
|
-
case "error": {
|
|
997
|
-
const i$1 = this.error.split(`
|
|
998
|
-
`).map((a$1, c$2) => c$2 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(a$1)}` : ` ${a$1}`).join(`
|
|
999
|
-
`);
|
|
1000
|
-
return `${s + import_picocolors.default.yellow(o$1)} ${B({
|
|
1001
|
-
options: this.options,
|
|
1002
|
-
cursor: this.cursor,
|
|
1003
|
-
maxItems: t.maxItems,
|
|
1004
|
-
style: r$1
|
|
1005
|
-
}).join(`
|
|
1006
|
-
${import_picocolors.default.yellow(o$1)} `)}
|
|
1007
|
-
${i$1}
|
|
1008
|
-
`;
|
|
1009
|
-
}
|
|
1010
|
-
default: return `${s}${import_picocolors.default.cyan(o$1)} ${B({
|
|
1011
|
-
options: this.options,
|
|
1012
|
-
cursor: this.cursor,
|
|
1013
|
-
maxItems: t.maxItems,
|
|
1014
|
-
style: r$1
|
|
1015
|
-
}).join(`
|
|
1016
|
-
${import_picocolors.default.cyan(o$1)} `)}
|
|
1017
|
-
${import_picocolors.default.cyan(d)}
|
|
1018
|
-
`;
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}).prompt();
|
|
1022
|
-
}, be = (t) => {
|
|
1023
|
-
const n$1 = (s, r$1, i$1 = []) => {
|
|
1024
|
-
const a$1 = s.label ?? String(s.value), c$2 = typeof s.group == "string", l$1 = c$2 && (i$1[i$1.indexOf(s) + 1] ?? { group: !0 }), $$2 = c$2 && l$1.group === !0, p$1 = c$2 ? `${$$2 ? d : o$1} ` : "";
|
|
1025
|
-
return r$1 === "active" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.cyan(A)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "group-active" ? `${p$1}${import_picocolors.default.cyan(A)} ${import_picocolors.default.dim(a$1)}` : r$1 === "group-active-selected" ? `${p$1}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${import_picocolors.default.dim(a$1)}` : r$1 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(a$1))}` : r$1 === "active-selected" ? `${import_picocolors.default.dim(p$1)}${import_picocolors.default.green(T)} ${a$1} ${s.hint ? import_picocolors.default.dim(`(${s.hint})`) : ""}` : r$1 === "submitted" ? `${import_picocolors.default.dim(a$1)}` : `${import_picocolors.default.dim(p$1)}${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(a$1)}`;
|
|
1026
|
-
};
|
|
1027
|
-
return new dD({
|
|
1028
|
-
options: t.options,
|
|
1029
|
-
initialValues: t.initialValues,
|
|
1030
|
-
required: t.required ?? !0,
|
|
1031
|
-
cursorAt: t.cursorAt,
|
|
1032
|
-
validate(s) {
|
|
1033
|
-
if (this.required && s.length === 0) return `Please select at least one option.
|
|
1034
|
-
${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
|
|
1035
|
-
},
|
|
1036
|
-
render() {
|
|
1037
|
-
const s = `${import_picocolors.default.gray(o$1)}
|
|
1038
|
-
${w(this.state)} ${t.message}
|
|
1039
|
-
`;
|
|
1040
|
-
switch (this.state) {
|
|
1041
|
-
case "submit": return `${s}${import_picocolors.default.gray(o$1)} ${this.options.filter(({ value: r$1 }) => this.value.includes(r$1)).map((r$1) => n$1(r$1, "submitted")).join(import_picocolors.default.dim(", "))}`;
|
|
1042
|
-
case "cancel": {
|
|
1043
|
-
const r$1 = this.options.filter(({ value: i$1 }) => this.value.includes(i$1)).map((i$1) => n$1(i$1, "cancelled")).join(import_picocolors.default.dim(", "));
|
|
1044
|
-
return `${s}${import_picocolors.default.gray(o$1)} ${r$1.trim() ? `${r$1}
|
|
1045
|
-
${import_picocolors.default.gray(o$1)}` : ""}`;
|
|
1046
|
-
}
|
|
1047
|
-
case "error": {
|
|
1048
|
-
const r$1 = this.error.split(`
|
|
1049
|
-
`).map((i$1, a$1) => a$1 === 0 ? `${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(i$1)}` : ` ${i$1}`).join(`
|
|
1050
|
-
`);
|
|
1051
|
-
return `${s}${import_picocolors.default.yellow(o$1)} ${this.options.map((i$1, a$1, c$2) => {
|
|
1052
|
-
const l$1 = this.value.includes(i$1.value) || i$1.group === !0 && this.isGroupSelected(`${i$1.value}`), $$2 = a$1 === this.cursor;
|
|
1053
|
-
return !$$2 && typeof i$1.group == "string" && this.options[this.cursor].value === i$1.group ? n$1(i$1, l$1 ? "group-active-selected" : "group-active", c$2) : $$2 && l$1 ? n$1(i$1, "active-selected", c$2) : l$1 ? n$1(i$1, "selected", c$2) : n$1(i$1, $$2 ? "active" : "inactive", c$2);
|
|
1054
|
-
}).join(`
|
|
1055
|
-
${import_picocolors.default.yellow(o$1)} `)}
|
|
1056
|
-
${r$1}
|
|
1057
|
-
`;
|
|
1058
|
-
}
|
|
1059
|
-
default: return `${s}${import_picocolors.default.cyan(o$1)} ${this.options.map((r$1, i$1, a$1) => {
|
|
1060
|
-
const c$2 = this.value.includes(r$1.value) || r$1.group === !0 && this.isGroupSelected(`${r$1.value}`), l$1 = i$1 === this.cursor;
|
|
1061
|
-
return !l$1 && typeof r$1.group == "string" && this.options[this.cursor].value === r$1.group ? n$1(r$1, c$2 ? "group-active-selected" : "group-active", a$1) : l$1 && c$2 ? n$1(r$1, "active-selected", a$1) : c$2 ? n$1(r$1, "selected", a$1) : n$1(r$1, l$1 ? "active" : "inactive", a$1);
|
|
1062
|
-
}).join(`
|
|
1063
|
-
${import_picocolors.default.cyan(o$1)} `)}
|
|
1064
|
-
${import_picocolors.default.cyan(d)}
|
|
1065
|
-
`;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}).prompt();
|
|
1069
|
-
}, Me = (t = "", n$1 = "") => {
|
|
1070
|
-
const s = `
|
|
1071
|
-
${t}
|
|
1072
|
-
`.split(`
|
|
1073
|
-
`), r$1 = (0, node_util.stripVTControlCharacters)(n$1).length, i$1 = Math.max(s.reduce((c$2, l$1) => {
|
|
1074
|
-
const $$2 = (0, node_util.stripVTControlCharacters)(l$1);
|
|
1075
|
-
return $$2.length > c$2 ? $$2.length : c$2;
|
|
1076
|
-
}, 0), r$1) + 2, a$1 = s.map((c$2) => `${import_picocolors.default.gray(o$1)} ${import_picocolors.default.dim(c$2)}${" ".repeat(i$1 - (0, node_util.stripVTControlCharacters)(c$2).length)}${import_picocolors.default.gray(o$1)}`).join(`
|
|
1077
|
-
`);
|
|
1078
|
-
process.stdout.write(`${import_picocolors.default.gray(o$1)}
|
|
1079
|
-
${import_picocolors.default.green(C)} ${import_picocolors.default.reset(n$1)} ${import_picocolors.default.gray(_.repeat(Math.max(i$1 - r$1 - 1, 1)) + me)}
|
|
1080
|
-
${a$1}
|
|
1081
|
-
${import_picocolors.default.gray(de + _.repeat(i$1 + 2) + pe)}
|
|
1082
|
-
`);
|
|
1083
|
-
}, xe = (t = "") => {
|
|
1084
|
-
process.stdout.write(`${import_picocolors.default.gray(d)} ${import_picocolors.default.red(t)}
|
|
1085
|
-
|
|
1086
|
-
`);
|
|
1087
|
-
}, Ie = (t = "") => {
|
|
1088
|
-
process.stdout.write(`${import_picocolors.default.gray(ue)} ${t}
|
|
1089
|
-
`);
|
|
1090
|
-
}, Se = (t = "") => {
|
|
1091
|
-
process.stdout.write(`${import_picocolors.default.gray(o$1)}
|
|
1092
|
-
${import_picocolors.default.gray(d)} ${t}
|
|
1093
|
-
|
|
1094
|
-
`);
|
|
1095
|
-
}, f = {
|
|
1096
|
-
message: (t = "", { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
|
|
1097
|
-
const s = [`${import_picocolors.default.gray(o$1)}`];
|
|
1098
|
-
if (t) {
|
|
1099
|
-
const [r$1, ...i$1] = t.split(`
|
|
1100
|
-
`);
|
|
1101
|
-
s.push(`${n$1} ${r$1}`, ...i$1.map((a$1) => `${import_picocolors.default.gray(o$1)} ${a$1}`));
|
|
1102
|
-
}
|
|
1103
|
-
process.stdout.write(`${s.join(`
|
|
1104
|
-
`)}
|
|
1105
|
-
`);
|
|
1106
|
-
},
|
|
1107
|
-
info: (t) => {
|
|
1108
|
-
f.message(t, { symbol: import_picocolors.default.blue(q) });
|
|
1109
|
-
},
|
|
1110
|
-
success: (t) => {
|
|
1111
|
-
f.message(t, { symbol: import_picocolors.default.green(D) });
|
|
1112
|
-
},
|
|
1113
|
-
step: (t) => {
|
|
1114
|
-
f.message(t, { symbol: import_picocolors.default.green(C) });
|
|
1115
|
-
},
|
|
1116
|
-
warn: (t) => {
|
|
1117
|
-
f.message(t, { symbol: import_picocolors.default.yellow(U) });
|
|
1118
|
-
},
|
|
1119
|
-
warning: (t) => {
|
|
1120
|
-
f.warn(t);
|
|
1121
|
-
},
|
|
1122
|
-
error: (t) => {
|
|
1123
|
-
f.message(t, { symbol: import_picocolors.default.red(K) });
|
|
1124
|
-
}
|
|
1125
|
-
}, J = `${import_picocolors.default.gray(o$1)} `, b = {
|
|
1126
|
-
message: async (t, { symbol: n$1 = import_picocolors.default.gray(o$1) } = {}) => {
|
|
1127
|
-
process.stdout.write(`${import_picocolors.default.gray(o$1)}
|
|
1128
|
-
${n$1} `);
|
|
1129
|
-
let s = 3;
|
|
1130
|
-
for await (let r$1 of t) {
|
|
1131
|
-
r$1 = r$1.replace(/\n/g, `
|
|
1132
|
-
${J}`), r$1.includes(`
|
|
1133
|
-
`) && (s = 3 + (0, node_util.stripVTControlCharacters)(r$1.slice(r$1.lastIndexOf(`
|
|
1134
|
-
`))).length);
|
|
1135
|
-
const i$1 = (0, node_util.stripVTControlCharacters)(r$1).length;
|
|
1136
|
-
s + i$1 < process.stdout.columns ? (s += i$1, process.stdout.write(r$1)) : (process.stdout.write(`
|
|
1137
|
-
${J}${r$1.trimStart()}`), s = 3 + (0, node_util.stripVTControlCharacters)(r$1.trimStart()).length);
|
|
1138
|
-
}
|
|
1139
|
-
process.stdout.write(`
|
|
1140
|
-
`);
|
|
1141
|
-
},
|
|
1142
|
-
info: (t) => b.message(t, { symbol: import_picocolors.default.blue(q) }),
|
|
1143
|
-
success: (t) => b.message(t, { symbol: import_picocolors.default.green(D) }),
|
|
1144
|
-
step: (t) => b.message(t, { symbol: import_picocolors.default.green(C) }),
|
|
1145
|
-
warn: (t) => b.message(t, { symbol: import_picocolors.default.yellow(U) }),
|
|
1146
|
-
warning: (t) => b.warn(t),
|
|
1147
|
-
error: (t) => b.message(t, { symbol: import_picocolors.default.red(K) })
|
|
1148
|
-
}, Y = ({ indicator: t = "dots" } = {}) => {
|
|
1149
|
-
const n$1 = V ? [
|
|
1150
|
-
"◒",
|
|
1151
|
-
"◐",
|
|
1152
|
-
"◓",
|
|
1153
|
-
"◑"
|
|
1154
|
-
] : [
|
|
1155
|
-
"•",
|
|
1156
|
-
"o",
|
|
1157
|
-
"O",
|
|
1158
|
-
"0"
|
|
1159
|
-
], s = V ? 80 : 120, r$1 = process.env.CI === "true";
|
|
1160
|
-
let i$1, a$1, c$2 = !1, l$1 = "", $$2, p$1 = performance.now();
|
|
1161
|
-
const M$1 = (m$1) => {
|
|
1162
|
-
c$2 && N$1(m$1 > 1 ? "Something went wrong" : "Canceled", m$1);
|
|
1163
|
-
}, v$1 = () => M$1(2), x$1 = () => M$1(1), j$1 = () => {
|
|
1164
|
-
process.on("uncaughtExceptionMonitor", v$1), process.on("unhandledRejection", v$1), process.on("SIGINT", x$1), process.on("SIGTERM", x$1), process.on("exit", M$1);
|
|
1165
|
-
}, E = () => {
|
|
1166
|
-
process.removeListener("uncaughtExceptionMonitor", v$1), process.removeListener("unhandledRejection", v$1), process.removeListener("SIGINT", x$1), process.removeListener("SIGTERM", x$1), process.removeListener("exit", M$1);
|
|
1167
|
-
}, O$1 = () => {
|
|
1168
|
-
if ($$2 === void 0) return;
|
|
1169
|
-
r$1 && process.stdout.write(`
|
|
1170
|
-
`);
|
|
1171
|
-
const m$1 = $$2.split(`
|
|
1172
|
-
`);
|
|
1173
|
-
process.stdout.write(import_src.cursor.move(-999, m$1.length - 1)), process.stdout.write(import_src.erase.down(m$1.length));
|
|
1174
|
-
}, R$1 = (m$1) => m$1.replace(/\.+$/, ""), G$1 = (m$1) => {
|
|
1175
|
-
const h$2 = (performance.now() - m$1) / 1e3, y$1 = Math.floor(h$2 / 60), I$1 = Math.floor(h$2 % 60);
|
|
1176
|
-
return y$1 > 0 ? `[${y$1}m ${I$1}s]` : `[${I$1}s]`;
|
|
1177
|
-
}, H$1 = (m$1 = "") => {
|
|
1178
|
-
c$2 = !0, i$1 = cD(), l$1 = R$1(m$1), p$1 = performance.now(), process.stdout.write(`${import_picocolors.default.gray(o$1)}
|
|
1179
|
-
`);
|
|
1180
|
-
let h$2 = 0, y$1 = 0;
|
|
1181
|
-
j$1(), a$1 = setInterval(() => {
|
|
1182
|
-
if (r$1 && l$1 === $$2) return;
|
|
1183
|
-
O$1(), $$2 = l$1;
|
|
1184
|
-
const I$1 = import_picocolors.default.magenta(n$1[h$2]);
|
|
1185
|
-
if (r$1) process.stdout.write(`${I$1} ${l$1}...`);
|
|
1186
|
-
else if (t === "timer") process.stdout.write(`${I$1} ${l$1} ${G$1(p$1)}`);
|
|
1187
|
-
else {
|
|
1188
|
-
const z$1 = ".".repeat(Math.floor(y$1)).slice(0, 3);
|
|
1189
|
-
process.stdout.write(`${I$1} ${l$1}${z$1}`);
|
|
1190
|
-
}
|
|
1191
|
-
h$2 = h$2 + 1 < n$1.length ? h$2 + 1 : 0, y$1 = y$1 < n$1.length ? y$1 + .125 : 0;
|
|
1192
|
-
}, s);
|
|
1193
|
-
}, N$1 = (m$1 = "", h$2 = 0) => {
|
|
1194
|
-
c$2 = !1, clearInterval(a$1), O$1();
|
|
1195
|
-
const y$1 = h$2 === 0 ? import_picocolors.default.green(C) : h$2 === 1 ? import_picocolors.default.red(L) : import_picocolors.default.red(W);
|
|
1196
|
-
l$1 = R$1(m$1 ?? l$1), t === "timer" ? process.stdout.write(`${y$1} ${l$1} ${G$1(p$1)}
|
|
1197
|
-
`) : process.stdout.write(`${y$1} ${l$1}
|
|
1198
|
-
`), E(), i$1();
|
|
1199
|
-
};
|
|
1200
|
-
return {
|
|
1201
|
-
start: H$1,
|
|
1202
|
-
stop: N$1,
|
|
1203
|
-
message: (m$1 = "") => {
|
|
1204
|
-
l$1 = R$1(m$1 ?? l$1);
|
|
1205
|
-
}
|
|
1206
|
-
};
|
|
1207
|
-
}, Ce = async (t, n$1) => {
|
|
1208
|
-
const s = {}, r$1 = Object.keys(t);
|
|
1209
|
-
for (const i$1 of r$1) {
|
|
1210
|
-
const a$1 = t[i$1], c$2 = await a$1({ results: s })?.catch((l$1) => {
|
|
1211
|
-
throw l$1;
|
|
1212
|
-
});
|
|
1213
|
-
if (typeof n$1?.onCancel == "function" && BD(c$2)) {
|
|
1214
|
-
s[i$1] = "canceled", n$1.onCancel({ results: s });
|
|
1215
|
-
continue;
|
|
1216
|
-
}
|
|
1217
|
-
s[i$1] = c$2;
|
|
1218
|
-
}
|
|
1219
|
-
return s;
|
|
1220
|
-
}, Te = async (t) => {
|
|
1221
|
-
for (const n$1 of t) {
|
|
1222
|
-
if (n$1.enabled === !1) continue;
|
|
1223
|
-
const s = Y();
|
|
1224
|
-
s.start(n$1.title);
|
|
1225
|
-
const r$1 = await n$1.task(s.message);
|
|
1226
|
-
s.stop(r$1 || n$1.title);
|
|
1227
|
-
}
|
|
1228
|
-
};
|
|
1229
|
-
|
|
1230
|
-
//#endregion
|
|
1231
66
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/error/AbortError.mjs
|
|
1232
67
|
var AbortError = class extends Error {
|
|
1233
68
|
constructor(message = "The operation was aborted") {
|
|
@@ -1553,10 +388,10 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
1553
388
|
//#endregion
|
|
1554
389
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
1555
390
|
function isUnicodeSupported() {
|
|
1556
|
-
const { env
|
|
1557
|
-
const { TERM, TERM_PROGRAM } = env
|
|
391
|
+
const { env } = node_process.default;
|
|
392
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
1558
393
|
if (node_process.default.platform !== "win32") return TERM !== "linux";
|
|
1559
|
-
return Boolean(env
|
|
394
|
+
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1560
395
|
}
|
|
1561
396
|
|
|
1562
397
|
//#endregion
|
|
@@ -2096,11 +931,11 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
2096
931
|
var gid = stat.gid;
|
|
2097
932
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
2098
933
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
2099
|
-
var u$
|
|
2100
|
-
var g
|
|
2101
|
-
var o$
|
|
2102
|
-
var ug = u$
|
|
2103
|
-
return mod & o$
|
|
934
|
+
var u$1 = parseInt("100", 8);
|
|
935
|
+
var g = parseInt("010", 8);
|
|
936
|
+
var o$1 = parseInt("001", 8);
|
|
937
|
+
var ug = u$1 | g;
|
|
938
|
+
return mod & o$1 || mod & g && gid === myGid || mod & u$1 && uid === myUid || mod & ug && myUid === 0;
|
|
2104
939
|
}
|
|
2105
940
|
}) });
|
|
2106
941
|
|
|
@@ -2204,8 +1039,8 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
2204
1039
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
2205
1040
|
const pCmd = path$9.join(pathPart, cmd);
|
|
2206
1041
|
const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
2207
|
-
for (let j
|
|
2208
|
-
const cur = p$1 + pathExt[j
|
|
1042
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
1043
|
+
const cur = p$1 + pathExt[j];
|
|
2209
1044
|
try {
|
|
2210
1045
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
2211
1046
|
else return cur;
|
|
@@ -2239,7 +1074,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
2239
1074
|
const which = require_which();
|
|
2240
1075
|
const getPathKey = require_path_key();
|
|
2241
1076
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
2242
|
-
const env
|
|
1077
|
+
const env = parsed.options.env || process.env;
|
|
2243
1078
|
const cwd = process.cwd();
|
|
2244
1079
|
const hasCustomCwd = parsed.options.cwd != null;
|
|
2245
1080
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
@@ -2249,10 +1084,10 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
2249
1084
|
let resolved;
|
|
2250
1085
|
try {
|
|
2251
1086
|
resolved = which.sync(parsed.command, {
|
|
2252
|
-
path: env
|
|
1087
|
+
path: env[getPathKey({ env })],
|
|
2253
1088
|
pathExt: withoutPathExt ? path$8.delimiter : void 0
|
|
2254
1089
|
});
|
|
2255
|
-
} catch (e
|
|
1090
|
+
} catch (e) {} finally {
|
|
2256
1091
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
2257
1092
|
}
|
|
2258
1093
|
if (resolved) resolved = path$8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
@@ -2318,7 +1153,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
2318
1153
|
fd = fs$1.openSync(command, "r");
|
|
2319
1154
|
fs$1.readSync(fd, buffer, 0, size, 0);
|
|
2320
1155
|
fs$1.closeSync(fd);
|
|
2321
|
-
} catch (e
|
|
1156
|
+
} catch (e) {}
|
|
2322
1157
|
return shebangCommand(buffer.toString());
|
|
2323
1158
|
}
|
|
2324
1159
|
module.exports = readShebang$1;
|
|
@@ -2455,9 +1290,9 @@ var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
2455
1290
|
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
2456
1291
|
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
2457
1292
|
function pathKey(options = {}) {
|
|
2458
|
-
const { env
|
|
1293
|
+
const { env = process.env, platform: platform$1 = process.platform } = options;
|
|
2459
1294
|
if (platform$1 !== "win32") return "PATH";
|
|
2460
|
-
return Object.keys(env
|
|
1295
|
+
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
2461
1296
|
}
|
|
2462
1297
|
|
|
2463
1298
|
//#endregion
|
|
@@ -2499,12 +1334,12 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
2499
1334
|
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath$1), "..");
|
|
2500
1335
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
2501
1336
|
};
|
|
2502
|
-
const npmRunPathEnv = ({ env
|
|
2503
|
-
env
|
|
2504
|
-
const pathName = pathKey({ env
|
|
2505
|
-
options.path = env
|
|
2506
|
-
env
|
|
2507
|
-
return env
|
|
1337
|
+
const npmRunPathEnv = ({ env = node_process.default.env,...options } = {}) => {
|
|
1338
|
+
env = { ...env };
|
|
1339
|
+
const pathName = pathKey({ env });
|
|
1340
|
+
options.path = env[pathName];
|
|
1341
|
+
env[pathName] = npmRunPath(options);
|
|
1342
|
+
return env;
|
|
2508
1343
|
};
|
|
2509
1344
|
|
|
2510
1345
|
//#endregion
|
|
@@ -3695,18 +2530,18 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
3695
2530
|
serialization
|
|
3696
2531
|
});
|
|
3697
2532
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
3698
|
-
const env
|
|
2533
|
+
const env = extendEnv ? {
|
|
3699
2534
|
...node_process.default.env,
|
|
3700
2535
|
...envOption
|
|
3701
2536
|
} : envOption;
|
|
3702
2537
|
if (preferLocal || node) return npmRunPathEnv({
|
|
3703
|
-
env
|
|
2538
|
+
env,
|
|
3704
2539
|
cwd: localDirectory,
|
|
3705
2540
|
execPath: nodePath,
|
|
3706
2541
|
preferLocal,
|
|
3707
2542
|
addExecPath: node
|
|
3708
2543
|
});
|
|
3709
|
-
return env
|
|
2544
|
+
return env;
|
|
3710
2545
|
};
|
|
3711
2546
|
|
|
3712
2547
|
//#endregion
|
|
@@ -3749,15 +2584,15 @@ var c = class {
|
|
|
3749
2584
|
#n;
|
|
3750
2585
|
#r = !1;
|
|
3751
2586
|
#e = void 0;
|
|
3752
|
-
constructor(e
|
|
3753
|
-
this.#t = e
|
|
2587
|
+
constructor(e, t) {
|
|
2588
|
+
this.#t = e, this.#n = t;
|
|
3754
2589
|
}
|
|
3755
2590
|
next() {
|
|
3756
|
-
const e
|
|
3757
|
-
return this.#e = this.#e ? this.#e.then(e
|
|
2591
|
+
const e = () => this.#s();
|
|
2592
|
+
return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
|
|
3758
2593
|
}
|
|
3759
|
-
return(e
|
|
3760
|
-
const t = () => this.#i(e
|
|
2594
|
+
return(e) {
|
|
2595
|
+
const t = () => this.#i(e);
|
|
3761
2596
|
return this.#e ? this.#e.then(t, t) : t();
|
|
3762
2597
|
}
|
|
3763
2598
|
async #s() {
|
|
@@ -3765,29 +2600,29 @@ var c = class {
|
|
|
3765
2600
|
done: !0,
|
|
3766
2601
|
value: void 0
|
|
3767
2602
|
};
|
|
3768
|
-
let e
|
|
2603
|
+
let e;
|
|
3769
2604
|
try {
|
|
3770
|
-
e
|
|
2605
|
+
e = await this.#t.read();
|
|
3771
2606
|
} catch (t) {
|
|
3772
2607
|
throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t;
|
|
3773
2608
|
}
|
|
3774
|
-
return e
|
|
2609
|
+
return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;
|
|
3775
2610
|
}
|
|
3776
|
-
async #i(e
|
|
2611
|
+
async #i(e) {
|
|
3777
2612
|
if (this.#r) return {
|
|
3778
2613
|
done: !0,
|
|
3779
|
-
value: e
|
|
2614
|
+
value: e
|
|
3780
2615
|
};
|
|
3781
2616
|
if (this.#r = !0, !this.#n) {
|
|
3782
|
-
const t = this.#t.cancel(e
|
|
2617
|
+
const t = this.#t.cancel(e);
|
|
3783
2618
|
return this.#t.releaseLock(), await t, {
|
|
3784
2619
|
done: !0,
|
|
3785
|
-
value: e
|
|
2620
|
+
value: e
|
|
3786
2621
|
};
|
|
3787
2622
|
}
|
|
3788
2623
|
return this.#t.releaseLock(), {
|
|
3789
2624
|
done: !0,
|
|
3790
|
-
value: e
|
|
2625
|
+
value: e
|
|
3791
2626
|
};
|
|
3792
2627
|
}
|
|
3793
2628
|
};
|
|
@@ -3796,8 +2631,8 @@ function i() {
|
|
|
3796
2631
|
return this[n].next();
|
|
3797
2632
|
}
|
|
3798
2633
|
Object.defineProperty(i, "name", { value: "next" });
|
|
3799
|
-
function o(r
|
|
3800
|
-
return this[n].return(r
|
|
2634
|
+
function o(r) {
|
|
2635
|
+
return this[n].return(r);
|
|
3801
2636
|
}
|
|
3802
2637
|
Object.defineProperty(o, "name", { value: "return" });
|
|
3803
2638
|
const u = Object.create(a, {
|
|
@@ -3814,8 +2649,8 @@ const u = Object.create(a, {
|
|
|
3814
2649
|
value: o
|
|
3815
2650
|
}
|
|
3816
2651
|
});
|
|
3817
|
-
function h({ preventCancel: r
|
|
3818
|
-
const t = new c(this.getReader(), r
|
|
2652
|
+
function h({ preventCancel: r = !1 } = {}) {
|
|
2653
|
+
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
3819
2654
|
return s[n] = t, s;
|
|
3820
2655
|
}
|
|
3821
2656
|
|
|
@@ -4714,7 +3549,7 @@ const getStdioArray = (stdio, options) => {
|
|
|
4714
3549
|
];
|
|
4715
3550
|
if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
4716
3551
|
const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
|
|
4717
|
-
return Array.from({ length }, (_
|
|
3552
|
+
return Array.from({ length }, (_, fdNumber) => stdio[fdNumber]);
|
|
4718
3553
|
};
|
|
4719
3554
|
const hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== void 0);
|
|
4720
3555
|
const addDefaultValue = (stdioOption, fdNumber) => {
|
|
@@ -6281,7 +5116,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6281
5116
|
for (const sig of signals) try {
|
|
6282
5117
|
const fn = this.#sigListeners[sig];
|
|
6283
5118
|
if (fn) this.#process.on(sig, fn);
|
|
6284
|
-
} catch (_
|
|
5119
|
+
} catch (_) {}
|
|
6285
5120
|
this.#process.emit = (ev, ...a$1) => {
|
|
6286
5121
|
return this.#processEmit(ev, ...a$1);
|
|
6287
5122
|
};
|
|
@@ -6299,7 +5134,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6299
5134
|
/* c8 ignore stop */
|
|
6300
5135
|
try {
|
|
6301
5136
|
this.#process.removeListener(sig, listener);
|
|
6302
|
-
} catch (_
|
|
5137
|
+
} catch (_) {}
|
|
6303
5138
|
/* c8 ignore stop */
|
|
6304
5139
|
});
|
|
6305
5140
|
this.#process.emit = this.#originalProcessEmit;
|
|
@@ -7593,7 +6428,7 @@ const supabaseApi = (supabaseUrl, supabaseAnonKey) => {
|
|
|
7593
6428
|
//#endregion
|
|
7594
6429
|
//#region iac/index.ts
|
|
7595
6430
|
const getConfigTemplate = (build) => {
|
|
7596
|
-
return new
|
|
6431
|
+
return new __hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage({
|
|
7597
6432
|
imports: [{
|
|
7598
6433
|
pkg: "@hot-updater/supabase",
|
|
7599
6434
|
named: ["supabaseStorage"]
|
|
@@ -7633,7 +6468,7 @@ project_id = "%%projectId%%"
|
|
|
7633
6468
|
enabled = false
|
|
7634
6469
|
`;
|
|
7635
6470
|
const selectProject = async () => {
|
|
7636
|
-
const spinner =
|
|
6471
|
+
const spinner = __hot_updater_cli_tools.p.spinner();
|
|
7637
6472
|
spinner.start("Fetching Supabase projects...");
|
|
7638
6473
|
let projectsProcess = [];
|
|
7639
6474
|
try {
|
|
@@ -7653,7 +6488,7 @@ const selectProject = async () => {
|
|
|
7653
6488
|
}
|
|
7654
6489
|
spinner.stop();
|
|
7655
6490
|
const createProjectOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
7656
|
-
const selectedProjectId = await
|
|
6491
|
+
const selectedProjectId = await __hot_updater_cli_tools.p.select({
|
|
7657
6492
|
message: "Select a Supabase project",
|
|
7658
6493
|
options: [...projectsProcess.map((project) => ({
|
|
7659
6494
|
label: `${project.name} (${project.region})`,
|
|
@@ -7663,7 +6498,7 @@ const selectProject = async () => {
|
|
|
7663
6498
|
value: createProjectOption
|
|
7664
6499
|
}]
|
|
7665
6500
|
});
|
|
7666
|
-
if (
|
|
6501
|
+
if (__hot_updater_cli_tools.p.isCancel(selectedProjectId)) process.exit(0);
|
|
7667
6502
|
if (selectedProjectId === createProjectOption) {
|
|
7668
6503
|
try {
|
|
7669
6504
|
await execa("npx", [
|
|
@@ -7689,7 +6524,7 @@ const selectProject = async () => {
|
|
|
7689
6524
|
const selectBucket = async (api) => {
|
|
7690
6525
|
let buckets = [];
|
|
7691
6526
|
let retryCount = 0;
|
|
7692
|
-
await
|
|
6527
|
+
await __hot_updater_cli_tools.p.tasks([{
|
|
7693
6528
|
title: "Fetching bucket list...",
|
|
7694
6529
|
task: async (message) => {
|
|
7695
6530
|
while (retryCount < 300) try {
|
|
@@ -7700,12 +6535,12 @@ const selectBucket = async (api) => {
|
|
|
7700
6535
|
retryCount++;
|
|
7701
6536
|
await delay(1e3);
|
|
7702
6537
|
}
|
|
7703
|
-
|
|
6538
|
+
__hot_updater_cli_tools.p.log.error("Failed to fetch bucket list");
|
|
7704
6539
|
process.exit(1);
|
|
7705
6540
|
}
|
|
7706
6541
|
}]);
|
|
7707
6542
|
const createBucketOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
7708
|
-
const selectedBucketId = await
|
|
6543
|
+
const selectedBucketId = await __hot_updater_cli_tools.p.select({
|
|
7709
6544
|
message: "Select a storage bucket",
|
|
7710
6545
|
options: [...buckets.map((bucket) => ({
|
|
7711
6546
|
label: bucket.name,
|
|
@@ -7718,13 +6553,13 @@ const selectBucket = async (api) => {
|
|
|
7718
6553
|
value: createBucketOption
|
|
7719
6554
|
}]
|
|
7720
6555
|
});
|
|
7721
|
-
if (
|
|
6556
|
+
if (__hot_updater_cli_tools.p.isCancel(selectedBucketId)) process.exit(0);
|
|
7722
6557
|
if (selectedBucketId === createBucketOption) {
|
|
7723
|
-
const bucketName = await
|
|
7724
|
-
if (
|
|
6558
|
+
const bucketName = await __hot_updater_cli_tools.p.text({ message: "Enter a name for the new bucket" });
|
|
6559
|
+
if (__hot_updater_cli_tools.p.isCancel(bucketName)) process.exit(0);
|
|
7725
6560
|
try {
|
|
7726
6561
|
await api.createBucket(bucketName, { public: false });
|
|
7727
|
-
|
|
6562
|
+
__hot_updater_cli_tools.p.log.success(`Bucket "${bucketName}" created successfully.`);
|
|
7728
6563
|
const newBucket = (await api.listBuckets()).find((bucket) => bucket.name === bucketName);
|
|
7729
6564
|
if (!newBucket) throw new Error("Failed to create and select new bucket");
|
|
7730
6565
|
return {
|
|
@@ -7732,16 +6567,16 @@ const selectBucket = async (api) => {
|
|
|
7732
6567
|
name: newBucket.name
|
|
7733
6568
|
};
|
|
7734
6569
|
} catch (err) {
|
|
7735
|
-
|
|
6570
|
+
__hot_updater_cli_tools.p.log.error(`Failed to create new bucket: ${err}`);
|
|
7736
6571
|
process.exit(1);
|
|
7737
6572
|
}
|
|
7738
6573
|
}
|
|
7739
6574
|
return JSON.parse(selectedBucketId);
|
|
7740
6575
|
};
|
|
7741
6576
|
const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
7742
|
-
const spinner =
|
|
6577
|
+
const spinner = __hot_updater_cli_tools.p.spinner();
|
|
7743
6578
|
try {
|
|
7744
|
-
await fs_promises.default.writeFile(path.default.join(workdir, "supabase", "config.toml"), (0,
|
|
6579
|
+
await fs_promises.default.writeFile(path.default.join(workdir, "supabase", "config.toml"), (0, __hot_updater_cli_tools.transformTemplate)(SUPABASE_CONFIG_TEMPLATE, { projectId }));
|
|
7745
6580
|
spinner.start("Linking Supabase...");
|
|
7746
6581
|
await execa("npx", [
|
|
7747
6582
|
"supabase",
|
|
@@ -7763,7 +6598,7 @@ const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
|
7763
6598
|
spinner.stop("Supabase linked ✔");
|
|
7764
6599
|
} catch (err) {
|
|
7765
6600
|
spinner.stop();
|
|
7766
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6601
|
+
if (err instanceof ExecaError && err.stderr) __hot_updater_cli_tools.p.log.error(err.stderr);
|
|
7767
6602
|
else console.error(err);
|
|
7768
6603
|
process.exit(1);
|
|
7769
6604
|
}
|
|
@@ -7781,28 +6616,28 @@ const pushDB = async (workdir, { dbPassword }) => {
|
|
|
7781
6616
|
stdio: "inherit",
|
|
7782
6617
|
shell: true
|
|
7783
6618
|
});
|
|
7784
|
-
|
|
6619
|
+
__hot_updater_cli_tools.p.log.success("DB pushed ✔");
|
|
7785
6620
|
return dbPush.stdout;
|
|
7786
6621
|
} catch (err) {
|
|
7787
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6622
|
+
if (err instanceof ExecaError && err.stderr) __hot_updater_cli_tools.p.log.error(err.stderr);
|
|
7788
6623
|
else console.error(err);
|
|
7789
6624
|
process.exit(1);
|
|
7790
6625
|
}
|
|
7791
6626
|
};
|
|
7792
6627
|
const deployEdgeFunction = async (workdir, projectId) => {
|
|
7793
|
-
const functionName = await
|
|
6628
|
+
const functionName = await __hot_updater_cli_tools.p.text({
|
|
7794
6629
|
message: "Enter a name for the edge function",
|
|
7795
6630
|
initialValue: "update-server",
|
|
7796
6631
|
placeholder: "update-server"
|
|
7797
6632
|
});
|
|
7798
|
-
if (
|
|
6633
|
+
if (__hot_updater_cli_tools.p.isCancel(functionName)) process.exit(0);
|
|
7799
6634
|
const edgeFunctionsLibPath = path.default.join(workdir, "supabase", "edge-functions");
|
|
7800
|
-
const edgeFunctionsCode = (0,
|
|
6635
|
+
const edgeFunctionsCode = (0, __hot_updater_cli_tools.transformEnv)(path.default.join(edgeFunctionsLibPath, "index.ts"), { FUNCTION_NAME: functionName });
|
|
7801
6636
|
const targetDir = path.default.join(workdir, "supabase", "functions", functionName);
|
|
7802
6637
|
await fs_promises.default.mkdir(targetDir, { recursive: true });
|
|
7803
6638
|
const targetPath = path.default.join(targetDir, "index.ts");
|
|
7804
6639
|
await fs_promises.default.writeFile(targetPath, edgeFunctionsCode);
|
|
7805
|
-
await
|
|
6640
|
+
await __hot_updater_cli_tools.p.tasks([{
|
|
7806
6641
|
title: "Supabase edge function deploy. This may take a few minutes.",
|
|
7807
6642
|
task: async () => {
|
|
7808
6643
|
try {
|
|
@@ -7818,7 +6653,7 @@ const deployEdgeFunction = async (workdir, projectId) => {
|
|
|
7818
6653
|
workdir
|
|
7819
6654
|
], { cwd: workdir })).stdout;
|
|
7820
6655
|
} catch (err) {
|
|
7821
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6656
|
+
if (err instanceof ExecaError && err.stderr) __hot_updater_cli_tools.p.log.error(err.stderr);
|
|
7822
6657
|
else console.error(err);
|
|
7823
6658
|
process.exit(1);
|
|
7824
6659
|
}
|
|
@@ -7827,7 +6662,7 @@ const deployEdgeFunction = async (workdir, projectId) => {
|
|
|
7827
6662
|
};
|
|
7828
6663
|
const runInit = async ({ build }) => {
|
|
7829
6664
|
const project = await selectProject();
|
|
7830
|
-
const spinner =
|
|
6665
|
+
const spinner = __hot_updater_cli_tools.p.spinner();
|
|
7831
6666
|
spinner.start(`Getting API keys for ${project.name}...`);
|
|
7832
6667
|
let apiKeys = [];
|
|
7833
6668
|
try {
|
|
@@ -7851,16 +6686,16 @@ const runInit = async ({ build }) => {
|
|
|
7851
6686
|
const serviceRoleKey = apiKeys.find((key) => key.name === "service_role");
|
|
7852
6687
|
if (!serviceRoleKey) throw new Error("Service role key not found, is your project paused?");
|
|
7853
6688
|
const bucket = await selectBucket(supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key));
|
|
7854
|
-
const { tmpDir, removeTmpDir } = await (0,
|
|
6689
|
+
const { tmpDir, removeTmpDir } = await (0, __hot_updater_cli_tools.copyDirToTmp)(path.default.dirname(path.default.resolve(require.resolve("@hot-updater/supabase/scaffold"))), "supabase");
|
|
7855
6690
|
const migrationPath = await path.default.join(tmpDir, "supabase", "migrations");
|
|
7856
6691
|
const migrationFiles = await fs_promises.default.readdir(migrationPath);
|
|
7857
6692
|
for (const file of migrationFiles) if (file.endsWith(".sql")) {
|
|
7858
6693
|
const filePath = path.default.join(migrationPath, file);
|
|
7859
6694
|
const content = await fs_promises.default.readFile(filePath, "utf-8");
|
|
7860
|
-
await fs_promises.default.writeFile(filePath, (0,
|
|
6695
|
+
await fs_promises.default.writeFile(filePath, (0, __hot_updater_cli_tools.transformTemplate)(content, { BUCKET_NAME: bucket.name }));
|
|
7861
6696
|
}
|
|
7862
|
-
const dbPassword = await
|
|
7863
|
-
if (
|
|
6697
|
+
const dbPassword = await __hot_updater_cli_tools.p.password({ message: "Enter your Supabase database password (press Enter to skip if none)" });
|
|
6698
|
+
if (__hot_updater_cli_tools.p.isCancel(dbPassword)) process.exit(0);
|
|
7864
6699
|
await linkSupabase(tmpDir, {
|
|
7865
6700
|
projectId: project.id,
|
|
7866
6701
|
dbPassword
|
|
@@ -7869,16 +6704,16 @@ const runInit = async ({ build }) => {
|
|
|
7869
6704
|
await deployEdgeFunction(tmpDir, project.id);
|
|
7870
6705
|
await removeTmpDir();
|
|
7871
6706
|
await fs_promises.default.writeFile("hot-updater.config.ts", getConfigTemplate(build));
|
|
7872
|
-
await (0,
|
|
6707
|
+
await (0, __hot_updater_cli_tools.makeEnv)({
|
|
7873
6708
|
HOT_UPDATER_SUPABASE_ANON_KEY: serviceRoleKey.api_key,
|
|
7874
6709
|
HOT_UPDATER_SUPABASE_BUCKET_NAME: bucket.name,
|
|
7875
6710
|
HOT_UPDATER_SUPABASE_URL: `https://${project.id}.supabase.co`
|
|
7876
6711
|
});
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
6712
|
+
__hot_updater_cli_tools.p.log.success("Generated '.env.hotupdater' file with Supabase settings.");
|
|
6713
|
+
__hot_updater_cli_tools.p.log.success("Generated 'hot-updater.config.ts' file with Supabase settings.");
|
|
6714
|
+
__hot_updater_cli_tools.p.note((0, __hot_updater_cli_tools.transformTemplate)(SOURCE_TEMPLATE, { source: `https://${project.id}.supabase.co/functions/v1/update-server` }));
|
|
6715
|
+
__hot_updater_cli_tools.p.log.message(`Next step: ${(0, __hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/supabase#step-4-add-hotupdater-to-your-project")}`);
|
|
6716
|
+
__hot_updater_cli_tools.p.log.success("Done! 🎉");
|
|
7882
6717
|
};
|
|
7883
6718
|
|
|
7884
6719
|
//#endregion
|