@settlemint/sdk-cli 2.6.4-main95b78dcb → 2.6.4-maina0bed535
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/cli.js +651 -1588
- package/dist/cli.js.map +15 -19
- package/package.json +11 -11
package/dist/cli.js
CHANGED
|
@@ -2139,80 +2139,6 @@ var require_extra_typings = __commonJS((exports, module) => {
|
|
|
2139
2139
|
exports.createArgument = (name, description) => new commander.Argument(name, description);
|
|
2140
2140
|
});
|
|
2141
2141
|
|
|
2142
|
-
// ../../node_modules/.bun/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
|
|
2143
|
-
var require_yoctocolors_cjs = __commonJS((exports, module) => {
|
|
2144
|
-
var tty = __require("node:tty");
|
|
2145
|
-
var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
2146
|
-
var format = (open, close) => {
|
|
2147
|
-
if (!hasColors) {
|
|
2148
|
-
return (input) => input;
|
|
2149
|
-
}
|
|
2150
|
-
const openCode = `\x1B[${open}m`;
|
|
2151
|
-
const closeCode = `\x1B[${close}m`;
|
|
2152
|
-
return (input) => {
|
|
2153
|
-
const string = input + "";
|
|
2154
|
-
let index = string.indexOf(closeCode);
|
|
2155
|
-
if (index === -1) {
|
|
2156
|
-
return openCode + string + closeCode;
|
|
2157
|
-
}
|
|
2158
|
-
let result = openCode;
|
|
2159
|
-
let lastIndex = 0;
|
|
2160
|
-
const reopenOnNestedClose = close === 22;
|
|
2161
|
-
const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
|
|
2162
|
-
while (index !== -1) {
|
|
2163
|
-
result += string.slice(lastIndex, index) + replaceCode;
|
|
2164
|
-
lastIndex = index + closeCode.length;
|
|
2165
|
-
index = string.indexOf(closeCode, lastIndex);
|
|
2166
|
-
}
|
|
2167
|
-
result += string.slice(lastIndex) + closeCode;
|
|
2168
|
-
return result;
|
|
2169
|
-
};
|
|
2170
|
-
};
|
|
2171
|
-
var colors = {};
|
|
2172
|
-
colors.reset = format(0, 0);
|
|
2173
|
-
colors.bold = format(1, 22);
|
|
2174
|
-
colors.dim = format(2, 22);
|
|
2175
|
-
colors.italic = format(3, 23);
|
|
2176
|
-
colors.underline = format(4, 24);
|
|
2177
|
-
colors.overline = format(53, 55);
|
|
2178
|
-
colors.inverse = format(7, 27);
|
|
2179
|
-
colors.hidden = format(8, 28);
|
|
2180
|
-
colors.strikethrough = format(9, 29);
|
|
2181
|
-
colors.black = format(30, 39);
|
|
2182
|
-
colors.red = format(31, 39);
|
|
2183
|
-
colors.green = format(32, 39);
|
|
2184
|
-
colors.yellow = format(33, 39);
|
|
2185
|
-
colors.blue = format(34, 39);
|
|
2186
|
-
colors.magenta = format(35, 39);
|
|
2187
|
-
colors.cyan = format(36, 39);
|
|
2188
|
-
colors.white = format(37, 39);
|
|
2189
|
-
colors.gray = format(90, 39);
|
|
2190
|
-
colors.bgBlack = format(40, 49);
|
|
2191
|
-
colors.bgRed = format(41, 49);
|
|
2192
|
-
colors.bgGreen = format(42, 49);
|
|
2193
|
-
colors.bgYellow = format(43, 49);
|
|
2194
|
-
colors.bgBlue = format(44, 49);
|
|
2195
|
-
colors.bgMagenta = format(45, 49);
|
|
2196
|
-
colors.bgCyan = format(46, 49);
|
|
2197
|
-
colors.bgWhite = format(47, 49);
|
|
2198
|
-
colors.bgGray = format(100, 49);
|
|
2199
|
-
colors.redBright = format(91, 39);
|
|
2200
|
-
colors.greenBright = format(92, 39);
|
|
2201
|
-
colors.yellowBright = format(93, 39);
|
|
2202
|
-
colors.blueBright = format(94, 39);
|
|
2203
|
-
colors.magentaBright = format(95, 39);
|
|
2204
|
-
colors.cyanBright = format(96, 39);
|
|
2205
|
-
colors.whiteBright = format(97, 39);
|
|
2206
|
-
colors.bgRedBright = format(101, 49);
|
|
2207
|
-
colors.bgGreenBright = format(102, 49);
|
|
2208
|
-
colors.bgYellowBright = format(103, 49);
|
|
2209
|
-
colors.bgBlueBright = format(104, 49);
|
|
2210
|
-
colors.bgMagentaBright = format(105, 49);
|
|
2211
|
-
colors.bgCyanBright = format(106, 49);
|
|
2212
|
-
colors.bgWhiteBright = format(107, 49);
|
|
2213
|
-
module.exports = colors;
|
|
2214
|
-
});
|
|
2215
|
-
|
|
2216
2142
|
// ../../node_modules/.bun/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
2217
2143
|
var require_cli_width = __commonJS((exports, module) => {
|
|
2218
2144
|
module.exports = cliWidth;
|
|
@@ -2253,1300 +2179,14 @@ var require_cli_width = __commonJS((exports, module) => {
|
|
|
2253
2179
|
}
|
|
2254
2180
|
});
|
|
2255
2181
|
|
|
2256
|
-
// ../../node_modules/.bun/
|
|
2257
|
-
var require_ansi_regex = __commonJS((exports, module) => {
|
|
2258
|
-
module.exports = ({ onlyFirst = false } = {}) => {
|
|
2259
|
-
const pattern = [
|
|
2260
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
2261
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
2262
|
-
].join("|");
|
|
2263
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
2264
|
-
};
|
|
2265
|
-
});
|
|
2266
|
-
|
|
2267
|
-
// ../../node_modules/.bun/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
2268
|
-
var require_strip_ansi = __commonJS((exports, module) => {
|
|
2269
|
-
var ansiRegex = require_ansi_regex();
|
|
2270
|
-
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
2271
|
-
});
|
|
2272
|
-
|
|
2273
|
-
// ../../node_modules/.bun/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
2274
|
-
var require_is_fullwidth_code_point = __commonJS((exports, module) => {
|
|
2275
|
-
var isFullwidthCodePoint = (codePoint) => {
|
|
2276
|
-
if (Number.isNaN(codePoint)) {
|
|
2277
|
-
return false;
|
|
2278
|
-
}
|
|
2279
|
-
if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
|
|
2280
|
-
return true;
|
|
2281
|
-
}
|
|
2282
|
-
return false;
|
|
2283
|
-
};
|
|
2284
|
-
module.exports = isFullwidthCodePoint;
|
|
2285
|
-
module.exports.default = isFullwidthCodePoint;
|
|
2286
|
-
});
|
|
2287
|
-
|
|
2288
|
-
// ../../node_modules/.bun/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
2182
|
+
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.js
|
|
2289
2183
|
var require_emoji_regex = __commonJS((exports, module) => {
|
|
2290
|
-
module.exports =
|
|
2291
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
2292
|
-
};
|
|
2293
|
-
});
|
|
2294
|
-
|
|
2295
|
-
// ../../node_modules/.bun/string-width@4.2.3/node_modules/string-width/index.js
|
|
2296
|
-
var require_string_width = __commonJS((exports, module) => {
|
|
2297
|
-
var stripAnsi = require_strip_ansi();
|
|
2298
|
-
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
2299
|
-
var emojiRegex = require_emoji_regex();
|
|
2300
|
-
var stringWidth = (string) => {
|
|
2301
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
2302
|
-
return 0;
|
|
2303
|
-
}
|
|
2304
|
-
string = stripAnsi(string);
|
|
2305
|
-
if (string.length === 0) {
|
|
2306
|
-
return 0;
|
|
2307
|
-
}
|
|
2308
|
-
string = string.replace(emojiRegex(), " ");
|
|
2309
|
-
let width = 0;
|
|
2310
|
-
for (let i = 0;i < string.length; i++) {
|
|
2311
|
-
const code = string.codePointAt(i);
|
|
2312
|
-
if (code <= 31 || code >= 127 && code <= 159) {
|
|
2313
|
-
continue;
|
|
2314
|
-
}
|
|
2315
|
-
if (code >= 768 && code <= 879) {
|
|
2316
|
-
continue;
|
|
2317
|
-
}
|
|
2318
|
-
if (code > 65535) {
|
|
2319
|
-
i++;
|
|
2320
|
-
}
|
|
2321
|
-
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
2322
|
-
}
|
|
2323
|
-
return width;
|
|
2324
|
-
};
|
|
2325
|
-
module.exports = stringWidth;
|
|
2326
|
-
module.exports.default = stringWidth;
|
|
2327
|
-
});
|
|
2328
|
-
|
|
2329
|
-
// ../../node_modules/.bun/color-name@1.1.4/node_modules/color-name/index.js
|
|
2330
|
-
var require_color_name = __commonJS((exports, module) => {
|
|
2331
|
-
module.exports = {
|
|
2332
|
-
aliceblue: [240, 248, 255],
|
|
2333
|
-
antiquewhite: [250, 235, 215],
|
|
2334
|
-
aqua: [0, 255, 255],
|
|
2335
|
-
aquamarine: [127, 255, 212],
|
|
2336
|
-
azure: [240, 255, 255],
|
|
2337
|
-
beige: [245, 245, 220],
|
|
2338
|
-
bisque: [255, 228, 196],
|
|
2339
|
-
black: [0, 0, 0],
|
|
2340
|
-
blanchedalmond: [255, 235, 205],
|
|
2341
|
-
blue: [0, 0, 255],
|
|
2342
|
-
blueviolet: [138, 43, 226],
|
|
2343
|
-
brown: [165, 42, 42],
|
|
2344
|
-
burlywood: [222, 184, 135],
|
|
2345
|
-
cadetblue: [95, 158, 160],
|
|
2346
|
-
chartreuse: [127, 255, 0],
|
|
2347
|
-
chocolate: [210, 105, 30],
|
|
2348
|
-
coral: [255, 127, 80],
|
|
2349
|
-
cornflowerblue: [100, 149, 237],
|
|
2350
|
-
cornsilk: [255, 248, 220],
|
|
2351
|
-
crimson: [220, 20, 60],
|
|
2352
|
-
cyan: [0, 255, 255],
|
|
2353
|
-
darkblue: [0, 0, 139],
|
|
2354
|
-
darkcyan: [0, 139, 139],
|
|
2355
|
-
darkgoldenrod: [184, 134, 11],
|
|
2356
|
-
darkgray: [169, 169, 169],
|
|
2357
|
-
darkgreen: [0, 100, 0],
|
|
2358
|
-
darkgrey: [169, 169, 169],
|
|
2359
|
-
darkkhaki: [189, 183, 107],
|
|
2360
|
-
darkmagenta: [139, 0, 139],
|
|
2361
|
-
darkolivegreen: [85, 107, 47],
|
|
2362
|
-
darkorange: [255, 140, 0],
|
|
2363
|
-
darkorchid: [153, 50, 204],
|
|
2364
|
-
darkred: [139, 0, 0],
|
|
2365
|
-
darksalmon: [233, 150, 122],
|
|
2366
|
-
darkseagreen: [143, 188, 143],
|
|
2367
|
-
darkslateblue: [72, 61, 139],
|
|
2368
|
-
darkslategray: [47, 79, 79],
|
|
2369
|
-
darkslategrey: [47, 79, 79],
|
|
2370
|
-
darkturquoise: [0, 206, 209],
|
|
2371
|
-
darkviolet: [148, 0, 211],
|
|
2372
|
-
deeppink: [255, 20, 147],
|
|
2373
|
-
deepskyblue: [0, 191, 255],
|
|
2374
|
-
dimgray: [105, 105, 105],
|
|
2375
|
-
dimgrey: [105, 105, 105],
|
|
2376
|
-
dodgerblue: [30, 144, 255],
|
|
2377
|
-
firebrick: [178, 34, 34],
|
|
2378
|
-
floralwhite: [255, 250, 240],
|
|
2379
|
-
forestgreen: [34, 139, 34],
|
|
2380
|
-
fuchsia: [255, 0, 255],
|
|
2381
|
-
gainsboro: [220, 220, 220],
|
|
2382
|
-
ghostwhite: [248, 248, 255],
|
|
2383
|
-
gold: [255, 215, 0],
|
|
2384
|
-
goldenrod: [218, 165, 32],
|
|
2385
|
-
gray: [128, 128, 128],
|
|
2386
|
-
green: [0, 128, 0],
|
|
2387
|
-
greenyellow: [173, 255, 47],
|
|
2388
|
-
grey: [128, 128, 128],
|
|
2389
|
-
honeydew: [240, 255, 240],
|
|
2390
|
-
hotpink: [255, 105, 180],
|
|
2391
|
-
indianred: [205, 92, 92],
|
|
2392
|
-
indigo: [75, 0, 130],
|
|
2393
|
-
ivory: [255, 255, 240],
|
|
2394
|
-
khaki: [240, 230, 140],
|
|
2395
|
-
lavender: [230, 230, 250],
|
|
2396
|
-
lavenderblush: [255, 240, 245],
|
|
2397
|
-
lawngreen: [124, 252, 0],
|
|
2398
|
-
lemonchiffon: [255, 250, 205],
|
|
2399
|
-
lightblue: [173, 216, 230],
|
|
2400
|
-
lightcoral: [240, 128, 128],
|
|
2401
|
-
lightcyan: [224, 255, 255],
|
|
2402
|
-
lightgoldenrodyellow: [250, 250, 210],
|
|
2403
|
-
lightgray: [211, 211, 211],
|
|
2404
|
-
lightgreen: [144, 238, 144],
|
|
2405
|
-
lightgrey: [211, 211, 211],
|
|
2406
|
-
lightpink: [255, 182, 193],
|
|
2407
|
-
lightsalmon: [255, 160, 122],
|
|
2408
|
-
lightseagreen: [32, 178, 170],
|
|
2409
|
-
lightskyblue: [135, 206, 250],
|
|
2410
|
-
lightslategray: [119, 136, 153],
|
|
2411
|
-
lightslategrey: [119, 136, 153],
|
|
2412
|
-
lightsteelblue: [176, 196, 222],
|
|
2413
|
-
lightyellow: [255, 255, 224],
|
|
2414
|
-
lime: [0, 255, 0],
|
|
2415
|
-
limegreen: [50, 205, 50],
|
|
2416
|
-
linen: [250, 240, 230],
|
|
2417
|
-
magenta: [255, 0, 255],
|
|
2418
|
-
maroon: [128, 0, 0],
|
|
2419
|
-
mediumaquamarine: [102, 205, 170],
|
|
2420
|
-
mediumblue: [0, 0, 205],
|
|
2421
|
-
mediumorchid: [186, 85, 211],
|
|
2422
|
-
mediumpurple: [147, 112, 219],
|
|
2423
|
-
mediumseagreen: [60, 179, 113],
|
|
2424
|
-
mediumslateblue: [123, 104, 238],
|
|
2425
|
-
mediumspringgreen: [0, 250, 154],
|
|
2426
|
-
mediumturquoise: [72, 209, 204],
|
|
2427
|
-
mediumvioletred: [199, 21, 133],
|
|
2428
|
-
midnightblue: [25, 25, 112],
|
|
2429
|
-
mintcream: [245, 255, 250],
|
|
2430
|
-
mistyrose: [255, 228, 225],
|
|
2431
|
-
moccasin: [255, 228, 181],
|
|
2432
|
-
navajowhite: [255, 222, 173],
|
|
2433
|
-
navy: [0, 0, 128],
|
|
2434
|
-
oldlace: [253, 245, 230],
|
|
2435
|
-
olive: [128, 128, 0],
|
|
2436
|
-
olivedrab: [107, 142, 35],
|
|
2437
|
-
orange: [255, 165, 0],
|
|
2438
|
-
orangered: [255, 69, 0],
|
|
2439
|
-
orchid: [218, 112, 214],
|
|
2440
|
-
palegoldenrod: [238, 232, 170],
|
|
2441
|
-
palegreen: [152, 251, 152],
|
|
2442
|
-
paleturquoise: [175, 238, 238],
|
|
2443
|
-
palevioletred: [219, 112, 147],
|
|
2444
|
-
papayawhip: [255, 239, 213],
|
|
2445
|
-
peachpuff: [255, 218, 185],
|
|
2446
|
-
peru: [205, 133, 63],
|
|
2447
|
-
pink: [255, 192, 203],
|
|
2448
|
-
plum: [221, 160, 221],
|
|
2449
|
-
powderblue: [176, 224, 230],
|
|
2450
|
-
purple: [128, 0, 128],
|
|
2451
|
-
rebeccapurple: [102, 51, 153],
|
|
2452
|
-
red: [255, 0, 0],
|
|
2453
|
-
rosybrown: [188, 143, 143],
|
|
2454
|
-
royalblue: [65, 105, 225],
|
|
2455
|
-
saddlebrown: [139, 69, 19],
|
|
2456
|
-
salmon: [250, 128, 114],
|
|
2457
|
-
sandybrown: [244, 164, 96],
|
|
2458
|
-
seagreen: [46, 139, 87],
|
|
2459
|
-
seashell: [255, 245, 238],
|
|
2460
|
-
sienna: [160, 82, 45],
|
|
2461
|
-
silver: [192, 192, 192],
|
|
2462
|
-
skyblue: [135, 206, 235],
|
|
2463
|
-
slateblue: [106, 90, 205],
|
|
2464
|
-
slategray: [112, 128, 144],
|
|
2465
|
-
slategrey: [112, 128, 144],
|
|
2466
|
-
snow: [255, 250, 250],
|
|
2467
|
-
springgreen: [0, 255, 127],
|
|
2468
|
-
steelblue: [70, 130, 180],
|
|
2469
|
-
tan: [210, 180, 140],
|
|
2470
|
-
teal: [0, 128, 128],
|
|
2471
|
-
thistle: [216, 191, 216],
|
|
2472
|
-
tomato: [255, 99, 71],
|
|
2473
|
-
turquoise: [64, 224, 208],
|
|
2474
|
-
violet: [238, 130, 238],
|
|
2475
|
-
wheat: [245, 222, 179],
|
|
2476
|
-
white: [255, 255, 255],
|
|
2477
|
-
whitesmoke: [245, 245, 245],
|
|
2478
|
-
yellow: [255, 255, 0],
|
|
2479
|
-
yellowgreen: [154, 205, 50]
|
|
2480
|
-
};
|
|
2481
|
-
});
|
|
2482
|
-
|
|
2483
|
-
// ../../node_modules/.bun/color-convert@2.0.1/node_modules/color-convert/conversions.js
|
|
2484
|
-
var require_conversions = __commonJS((exports, module) => {
|
|
2485
|
-
var cssKeywords = require_color_name();
|
|
2486
|
-
var reverseKeywords = {};
|
|
2487
|
-
for (const key of Object.keys(cssKeywords)) {
|
|
2488
|
-
reverseKeywords[cssKeywords[key]] = key;
|
|
2489
|
-
}
|
|
2490
|
-
var convert = {
|
|
2491
|
-
rgb: { channels: 3, labels: "rgb" },
|
|
2492
|
-
hsl: { channels: 3, labels: "hsl" },
|
|
2493
|
-
hsv: { channels: 3, labels: "hsv" },
|
|
2494
|
-
hwb: { channels: 3, labels: "hwb" },
|
|
2495
|
-
cmyk: { channels: 4, labels: "cmyk" },
|
|
2496
|
-
xyz: { channels: 3, labels: "xyz" },
|
|
2497
|
-
lab: { channels: 3, labels: "lab" },
|
|
2498
|
-
lch: { channels: 3, labels: "lch" },
|
|
2499
|
-
hex: { channels: 1, labels: ["hex"] },
|
|
2500
|
-
keyword: { channels: 1, labels: ["keyword"] },
|
|
2501
|
-
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
2502
|
-
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
2503
|
-
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
2504
|
-
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
2505
|
-
gray: { channels: 1, labels: ["gray"] }
|
|
2506
|
-
};
|
|
2507
|
-
module.exports = convert;
|
|
2508
|
-
for (const model of Object.keys(convert)) {
|
|
2509
|
-
if (!("channels" in convert[model])) {
|
|
2510
|
-
throw new Error("missing channels property: " + model);
|
|
2511
|
-
}
|
|
2512
|
-
if (!("labels" in convert[model])) {
|
|
2513
|
-
throw new Error("missing channel labels property: " + model);
|
|
2514
|
-
}
|
|
2515
|
-
if (convert[model].labels.length !== convert[model].channels) {
|
|
2516
|
-
throw new Error("channel and label counts mismatch: " + model);
|
|
2517
|
-
}
|
|
2518
|
-
const { channels, labels } = convert[model];
|
|
2519
|
-
delete convert[model].channels;
|
|
2520
|
-
delete convert[model].labels;
|
|
2521
|
-
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
2522
|
-
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
2523
|
-
}
|
|
2524
|
-
convert.rgb.hsl = function(rgb) {
|
|
2525
|
-
const r = rgb[0] / 255;
|
|
2526
|
-
const g = rgb[1] / 255;
|
|
2527
|
-
const b = rgb[2] / 255;
|
|
2528
|
-
const min = Math.min(r, g, b);
|
|
2529
|
-
const max = Math.max(r, g, b);
|
|
2530
|
-
const delta = max - min;
|
|
2531
|
-
let h;
|
|
2532
|
-
let s;
|
|
2533
|
-
if (max === min) {
|
|
2534
|
-
h = 0;
|
|
2535
|
-
} else if (r === max) {
|
|
2536
|
-
h = (g - b) / delta;
|
|
2537
|
-
} else if (g === max) {
|
|
2538
|
-
h = 2 + (b - r) / delta;
|
|
2539
|
-
} else if (b === max) {
|
|
2540
|
-
h = 4 + (r - g) / delta;
|
|
2541
|
-
}
|
|
2542
|
-
h = Math.min(h * 60, 360);
|
|
2543
|
-
if (h < 0) {
|
|
2544
|
-
h += 360;
|
|
2545
|
-
}
|
|
2546
|
-
const l = (min + max) / 2;
|
|
2547
|
-
if (max === min) {
|
|
2548
|
-
s = 0;
|
|
2549
|
-
} else if (l <= 0.5) {
|
|
2550
|
-
s = delta / (max + min);
|
|
2551
|
-
} else {
|
|
2552
|
-
s = delta / (2 - max - min);
|
|
2553
|
-
}
|
|
2554
|
-
return [h, s * 100, l * 100];
|
|
2555
|
-
};
|
|
2556
|
-
convert.rgb.hsv = function(rgb) {
|
|
2557
|
-
let rdif;
|
|
2558
|
-
let gdif;
|
|
2559
|
-
let bdif;
|
|
2560
|
-
let h;
|
|
2561
|
-
let s;
|
|
2562
|
-
const r = rgb[0] / 255;
|
|
2563
|
-
const g = rgb[1] / 255;
|
|
2564
|
-
const b = rgb[2] / 255;
|
|
2565
|
-
const v = Math.max(r, g, b);
|
|
2566
|
-
const diff = v - Math.min(r, g, b);
|
|
2567
|
-
const diffc = function(c) {
|
|
2568
|
-
return (v - c) / 6 / diff + 1 / 2;
|
|
2569
|
-
};
|
|
2570
|
-
if (diff === 0) {
|
|
2571
|
-
h = 0;
|
|
2572
|
-
s = 0;
|
|
2573
|
-
} else {
|
|
2574
|
-
s = diff / v;
|
|
2575
|
-
rdif = diffc(r);
|
|
2576
|
-
gdif = diffc(g);
|
|
2577
|
-
bdif = diffc(b);
|
|
2578
|
-
if (r === v) {
|
|
2579
|
-
h = bdif - gdif;
|
|
2580
|
-
} else if (g === v) {
|
|
2581
|
-
h = 1 / 3 + rdif - bdif;
|
|
2582
|
-
} else if (b === v) {
|
|
2583
|
-
h = 2 / 3 + gdif - rdif;
|
|
2584
|
-
}
|
|
2585
|
-
if (h < 0) {
|
|
2586
|
-
h += 1;
|
|
2587
|
-
} else if (h > 1) {
|
|
2588
|
-
h -= 1;
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
return [
|
|
2592
|
-
h * 360,
|
|
2593
|
-
s * 100,
|
|
2594
|
-
v * 100
|
|
2595
|
-
];
|
|
2596
|
-
};
|
|
2597
|
-
convert.rgb.hwb = function(rgb) {
|
|
2598
|
-
const r = rgb[0];
|
|
2599
|
-
const g = rgb[1];
|
|
2600
|
-
let b = rgb[2];
|
|
2601
|
-
const h = convert.rgb.hsl(rgb)[0];
|
|
2602
|
-
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
2603
|
-
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
2604
|
-
return [h, w * 100, b * 100];
|
|
2605
|
-
};
|
|
2606
|
-
convert.rgb.cmyk = function(rgb) {
|
|
2607
|
-
const r = rgb[0] / 255;
|
|
2608
|
-
const g = rgb[1] / 255;
|
|
2609
|
-
const b = rgb[2] / 255;
|
|
2610
|
-
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
2611
|
-
const c = (1 - r - k) / (1 - k) || 0;
|
|
2612
|
-
const m = (1 - g - k) / (1 - k) || 0;
|
|
2613
|
-
const y = (1 - b - k) / (1 - k) || 0;
|
|
2614
|
-
return [c * 100, m * 100, y * 100, k * 100];
|
|
2615
|
-
};
|
|
2616
|
-
function comparativeDistance(x, y) {
|
|
2617
|
-
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
2618
|
-
}
|
|
2619
|
-
convert.rgb.keyword = function(rgb) {
|
|
2620
|
-
const reversed = reverseKeywords[rgb];
|
|
2621
|
-
if (reversed) {
|
|
2622
|
-
return reversed;
|
|
2623
|
-
}
|
|
2624
|
-
let currentClosestDistance = Infinity;
|
|
2625
|
-
let currentClosestKeyword;
|
|
2626
|
-
for (const keyword of Object.keys(cssKeywords)) {
|
|
2627
|
-
const value = cssKeywords[keyword];
|
|
2628
|
-
const distance = comparativeDistance(rgb, value);
|
|
2629
|
-
if (distance < currentClosestDistance) {
|
|
2630
|
-
currentClosestDistance = distance;
|
|
2631
|
-
currentClosestKeyword = keyword;
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
return currentClosestKeyword;
|
|
2635
|
-
};
|
|
2636
|
-
convert.keyword.rgb = function(keyword) {
|
|
2637
|
-
return cssKeywords[keyword];
|
|
2638
|
-
};
|
|
2639
|
-
convert.rgb.xyz = function(rgb) {
|
|
2640
|
-
let r = rgb[0] / 255;
|
|
2641
|
-
let g = rgb[1] / 255;
|
|
2642
|
-
let b = rgb[2] / 255;
|
|
2643
|
-
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
2644
|
-
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
2645
|
-
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
2646
|
-
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
2647
|
-
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
2648
|
-
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
2649
|
-
return [x * 100, y * 100, z * 100];
|
|
2650
|
-
};
|
|
2651
|
-
convert.rgb.lab = function(rgb) {
|
|
2652
|
-
const xyz = convert.rgb.xyz(rgb);
|
|
2653
|
-
let x = xyz[0];
|
|
2654
|
-
let y = xyz[1];
|
|
2655
|
-
let z = xyz[2];
|
|
2656
|
-
x /= 95.047;
|
|
2657
|
-
y /= 100;
|
|
2658
|
-
z /= 108.883;
|
|
2659
|
-
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
2660
|
-
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
2661
|
-
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
2662
|
-
const l = 116 * y - 16;
|
|
2663
|
-
const a = 500 * (x - y);
|
|
2664
|
-
const b = 200 * (y - z);
|
|
2665
|
-
return [l, a, b];
|
|
2666
|
-
};
|
|
2667
|
-
convert.hsl.rgb = function(hsl) {
|
|
2668
|
-
const h = hsl[0] / 360;
|
|
2669
|
-
const s = hsl[1] / 100;
|
|
2670
|
-
const l = hsl[2] / 100;
|
|
2671
|
-
let t2;
|
|
2672
|
-
let t3;
|
|
2673
|
-
let val;
|
|
2674
|
-
if (s === 0) {
|
|
2675
|
-
val = l * 255;
|
|
2676
|
-
return [val, val, val];
|
|
2677
|
-
}
|
|
2678
|
-
if (l < 0.5) {
|
|
2679
|
-
t2 = l * (1 + s);
|
|
2680
|
-
} else {
|
|
2681
|
-
t2 = l + s - l * s;
|
|
2682
|
-
}
|
|
2683
|
-
const t1 = 2 * l - t2;
|
|
2684
|
-
const rgb = [0, 0, 0];
|
|
2685
|
-
for (let i = 0;i < 3; i++) {
|
|
2686
|
-
t3 = h + 1 / 3 * -(i - 1);
|
|
2687
|
-
if (t3 < 0) {
|
|
2688
|
-
t3++;
|
|
2689
|
-
}
|
|
2690
|
-
if (t3 > 1) {
|
|
2691
|
-
t3--;
|
|
2692
|
-
}
|
|
2693
|
-
if (6 * t3 < 1) {
|
|
2694
|
-
val = t1 + (t2 - t1) * 6 * t3;
|
|
2695
|
-
} else if (2 * t3 < 1) {
|
|
2696
|
-
val = t2;
|
|
2697
|
-
} else if (3 * t3 < 2) {
|
|
2698
|
-
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
2699
|
-
} else {
|
|
2700
|
-
val = t1;
|
|
2701
|
-
}
|
|
2702
|
-
rgb[i] = val * 255;
|
|
2703
|
-
}
|
|
2704
|
-
return rgb;
|
|
2705
|
-
};
|
|
2706
|
-
convert.hsl.hsv = function(hsl) {
|
|
2707
|
-
const h = hsl[0];
|
|
2708
|
-
let s = hsl[1] / 100;
|
|
2709
|
-
let l = hsl[2] / 100;
|
|
2710
|
-
let smin = s;
|
|
2711
|
-
const lmin = Math.max(l, 0.01);
|
|
2712
|
-
l *= 2;
|
|
2713
|
-
s *= l <= 1 ? l : 2 - l;
|
|
2714
|
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
2715
|
-
const v = (l + s) / 2;
|
|
2716
|
-
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
2717
|
-
return [h, sv * 100, v * 100];
|
|
2718
|
-
};
|
|
2719
|
-
convert.hsv.rgb = function(hsv) {
|
|
2720
|
-
const h = hsv[0] / 60;
|
|
2721
|
-
const s = hsv[1] / 100;
|
|
2722
|
-
let v = hsv[2] / 100;
|
|
2723
|
-
const hi = Math.floor(h) % 6;
|
|
2724
|
-
const f = h - Math.floor(h);
|
|
2725
|
-
const p = 255 * v * (1 - s);
|
|
2726
|
-
const q = 255 * v * (1 - s * f);
|
|
2727
|
-
const t = 255 * v * (1 - s * (1 - f));
|
|
2728
|
-
v *= 255;
|
|
2729
|
-
switch (hi) {
|
|
2730
|
-
case 0:
|
|
2731
|
-
return [v, t, p];
|
|
2732
|
-
case 1:
|
|
2733
|
-
return [q, v, p];
|
|
2734
|
-
case 2:
|
|
2735
|
-
return [p, v, t];
|
|
2736
|
-
case 3:
|
|
2737
|
-
return [p, q, v];
|
|
2738
|
-
case 4:
|
|
2739
|
-
return [t, p, v];
|
|
2740
|
-
case 5:
|
|
2741
|
-
return [v, p, q];
|
|
2742
|
-
}
|
|
2743
|
-
};
|
|
2744
|
-
convert.hsv.hsl = function(hsv) {
|
|
2745
|
-
const h = hsv[0];
|
|
2746
|
-
const s = hsv[1] / 100;
|
|
2747
|
-
const v = hsv[2] / 100;
|
|
2748
|
-
const vmin = Math.max(v, 0.01);
|
|
2749
|
-
let sl;
|
|
2750
|
-
let l;
|
|
2751
|
-
l = (2 - s) * v;
|
|
2752
|
-
const lmin = (2 - s) * vmin;
|
|
2753
|
-
sl = s * vmin;
|
|
2754
|
-
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
2755
|
-
sl = sl || 0;
|
|
2756
|
-
l /= 2;
|
|
2757
|
-
return [h, sl * 100, l * 100];
|
|
2758
|
-
};
|
|
2759
|
-
convert.hwb.rgb = function(hwb) {
|
|
2760
|
-
const h = hwb[0] / 360;
|
|
2761
|
-
let wh = hwb[1] / 100;
|
|
2762
|
-
let bl = hwb[2] / 100;
|
|
2763
|
-
const ratio = wh + bl;
|
|
2764
|
-
let f;
|
|
2765
|
-
if (ratio > 1) {
|
|
2766
|
-
wh /= ratio;
|
|
2767
|
-
bl /= ratio;
|
|
2768
|
-
}
|
|
2769
|
-
const i = Math.floor(6 * h);
|
|
2770
|
-
const v = 1 - bl;
|
|
2771
|
-
f = 6 * h - i;
|
|
2772
|
-
if ((i & 1) !== 0) {
|
|
2773
|
-
f = 1 - f;
|
|
2774
|
-
}
|
|
2775
|
-
const n = wh + f * (v - wh);
|
|
2776
|
-
let r;
|
|
2777
|
-
let g;
|
|
2778
|
-
let b;
|
|
2779
|
-
switch (i) {
|
|
2780
|
-
default:
|
|
2781
|
-
case 6:
|
|
2782
|
-
case 0:
|
|
2783
|
-
r = v;
|
|
2784
|
-
g = n;
|
|
2785
|
-
b = wh;
|
|
2786
|
-
break;
|
|
2787
|
-
case 1:
|
|
2788
|
-
r = n;
|
|
2789
|
-
g = v;
|
|
2790
|
-
b = wh;
|
|
2791
|
-
break;
|
|
2792
|
-
case 2:
|
|
2793
|
-
r = wh;
|
|
2794
|
-
g = v;
|
|
2795
|
-
b = n;
|
|
2796
|
-
break;
|
|
2797
|
-
case 3:
|
|
2798
|
-
r = wh;
|
|
2799
|
-
g = n;
|
|
2800
|
-
b = v;
|
|
2801
|
-
break;
|
|
2802
|
-
case 4:
|
|
2803
|
-
r = n;
|
|
2804
|
-
g = wh;
|
|
2805
|
-
b = v;
|
|
2806
|
-
break;
|
|
2807
|
-
case 5:
|
|
2808
|
-
r = v;
|
|
2809
|
-
g = wh;
|
|
2810
|
-
b = n;
|
|
2811
|
-
break;
|
|
2812
|
-
}
|
|
2813
|
-
return [r * 255, g * 255, b * 255];
|
|
2814
|
-
};
|
|
2815
|
-
convert.cmyk.rgb = function(cmyk) {
|
|
2816
|
-
const c = cmyk[0] / 100;
|
|
2817
|
-
const m = cmyk[1] / 100;
|
|
2818
|
-
const y = cmyk[2] / 100;
|
|
2819
|
-
const k = cmyk[3] / 100;
|
|
2820
|
-
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
2821
|
-
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
2822
|
-
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
2823
|
-
return [r * 255, g * 255, b * 255];
|
|
2824
|
-
};
|
|
2825
|
-
convert.xyz.rgb = function(xyz) {
|
|
2826
|
-
const x = xyz[0] / 100;
|
|
2827
|
-
const y = xyz[1] / 100;
|
|
2828
|
-
const z = xyz[2] / 100;
|
|
2829
|
-
let r;
|
|
2830
|
-
let g;
|
|
2831
|
-
let b;
|
|
2832
|
-
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
2833
|
-
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
2834
|
-
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
2835
|
-
r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
2836
|
-
g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
2837
|
-
b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
2838
|
-
r = Math.min(Math.max(0, r), 1);
|
|
2839
|
-
g = Math.min(Math.max(0, g), 1);
|
|
2840
|
-
b = Math.min(Math.max(0, b), 1);
|
|
2841
|
-
return [r * 255, g * 255, b * 255];
|
|
2842
|
-
};
|
|
2843
|
-
convert.xyz.lab = function(xyz) {
|
|
2844
|
-
let x = xyz[0];
|
|
2845
|
-
let y = xyz[1];
|
|
2846
|
-
let z = xyz[2];
|
|
2847
|
-
x /= 95.047;
|
|
2848
|
-
y /= 100;
|
|
2849
|
-
z /= 108.883;
|
|
2850
|
-
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
2851
|
-
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
2852
|
-
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
2853
|
-
const l = 116 * y - 16;
|
|
2854
|
-
const a = 500 * (x - y);
|
|
2855
|
-
const b = 200 * (y - z);
|
|
2856
|
-
return [l, a, b];
|
|
2857
|
-
};
|
|
2858
|
-
convert.lab.xyz = function(lab) {
|
|
2859
|
-
const l = lab[0];
|
|
2860
|
-
const a = lab[1];
|
|
2861
|
-
const b = lab[2];
|
|
2862
|
-
let x;
|
|
2863
|
-
let y;
|
|
2864
|
-
let z;
|
|
2865
|
-
y = (l + 16) / 116;
|
|
2866
|
-
x = a / 500 + y;
|
|
2867
|
-
z = y - b / 200;
|
|
2868
|
-
const y2 = y ** 3;
|
|
2869
|
-
const x2 = x ** 3;
|
|
2870
|
-
const z2 = z ** 3;
|
|
2871
|
-
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
|
|
2872
|
-
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
|
|
2873
|
-
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
|
|
2874
|
-
x *= 95.047;
|
|
2875
|
-
y *= 100;
|
|
2876
|
-
z *= 108.883;
|
|
2877
|
-
return [x, y, z];
|
|
2878
|
-
};
|
|
2879
|
-
convert.lab.lch = function(lab) {
|
|
2880
|
-
const l = lab[0];
|
|
2881
|
-
const a = lab[1];
|
|
2882
|
-
const b = lab[2];
|
|
2883
|
-
let h;
|
|
2884
|
-
const hr = Math.atan2(b, a);
|
|
2885
|
-
h = hr * 360 / 2 / Math.PI;
|
|
2886
|
-
if (h < 0) {
|
|
2887
|
-
h += 360;
|
|
2888
|
-
}
|
|
2889
|
-
const c = Math.sqrt(a * a + b * b);
|
|
2890
|
-
return [l, c, h];
|
|
2891
|
-
};
|
|
2892
|
-
convert.lch.lab = function(lch) {
|
|
2893
|
-
const l = lch[0];
|
|
2894
|
-
const c = lch[1];
|
|
2895
|
-
const h = lch[2];
|
|
2896
|
-
const hr = h / 360 * 2 * Math.PI;
|
|
2897
|
-
const a = c * Math.cos(hr);
|
|
2898
|
-
const b = c * Math.sin(hr);
|
|
2899
|
-
return [l, a, b];
|
|
2900
|
-
};
|
|
2901
|
-
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
2902
|
-
const [r, g, b] = args;
|
|
2903
|
-
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
2904
|
-
value = Math.round(value / 50);
|
|
2905
|
-
if (value === 0) {
|
|
2906
|
-
return 30;
|
|
2907
|
-
}
|
|
2908
|
-
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
2909
|
-
if (value === 2) {
|
|
2910
|
-
ansi += 60;
|
|
2911
|
-
}
|
|
2912
|
-
return ansi;
|
|
2913
|
-
};
|
|
2914
|
-
convert.hsv.ansi16 = function(args) {
|
|
2915
|
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
2916
|
-
};
|
|
2917
|
-
convert.rgb.ansi256 = function(args) {
|
|
2918
|
-
const r = args[0];
|
|
2919
|
-
const g = args[1];
|
|
2920
|
-
const b = args[2];
|
|
2921
|
-
if (r === g && g === b) {
|
|
2922
|
-
if (r < 8) {
|
|
2923
|
-
return 16;
|
|
2924
|
-
}
|
|
2925
|
-
if (r > 248) {
|
|
2926
|
-
return 231;
|
|
2927
|
-
}
|
|
2928
|
-
return Math.round((r - 8) / 247 * 24) + 232;
|
|
2929
|
-
}
|
|
2930
|
-
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
2931
|
-
return ansi;
|
|
2932
|
-
};
|
|
2933
|
-
convert.ansi16.rgb = function(args) {
|
|
2934
|
-
let color = args % 10;
|
|
2935
|
-
if (color === 0 || color === 7) {
|
|
2936
|
-
if (args > 50) {
|
|
2937
|
-
color += 3.5;
|
|
2938
|
-
}
|
|
2939
|
-
color = color / 10.5 * 255;
|
|
2940
|
-
return [color, color, color];
|
|
2941
|
-
}
|
|
2942
|
-
const mult = (~~(args > 50) + 1) * 0.5;
|
|
2943
|
-
const r = (color & 1) * mult * 255;
|
|
2944
|
-
const g = (color >> 1 & 1) * mult * 255;
|
|
2945
|
-
const b = (color >> 2 & 1) * mult * 255;
|
|
2946
|
-
return [r, g, b];
|
|
2947
|
-
};
|
|
2948
|
-
convert.ansi256.rgb = function(args) {
|
|
2949
|
-
if (args >= 232) {
|
|
2950
|
-
const c = (args - 232) * 10 + 8;
|
|
2951
|
-
return [c, c, c];
|
|
2952
|
-
}
|
|
2953
|
-
args -= 16;
|
|
2954
|
-
let rem;
|
|
2955
|
-
const r = Math.floor(args / 36) / 5 * 255;
|
|
2956
|
-
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
2957
|
-
const b = rem % 6 / 5 * 255;
|
|
2958
|
-
return [r, g, b];
|
|
2959
|
-
};
|
|
2960
|
-
convert.rgb.hex = function(args) {
|
|
2961
|
-
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
2962
|
-
const string = integer.toString(16).toUpperCase();
|
|
2963
|
-
return "000000".substring(string.length) + string;
|
|
2964
|
-
};
|
|
2965
|
-
convert.hex.rgb = function(args) {
|
|
2966
|
-
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
2967
|
-
if (!match) {
|
|
2968
|
-
return [0, 0, 0];
|
|
2969
|
-
}
|
|
2970
|
-
let colorString = match[0];
|
|
2971
|
-
if (match[0].length === 3) {
|
|
2972
|
-
colorString = colorString.split("").map((char) => {
|
|
2973
|
-
return char + char;
|
|
2974
|
-
}).join("");
|
|
2975
|
-
}
|
|
2976
|
-
const integer = parseInt(colorString, 16);
|
|
2977
|
-
const r = integer >> 16 & 255;
|
|
2978
|
-
const g = integer >> 8 & 255;
|
|
2979
|
-
const b = integer & 255;
|
|
2980
|
-
return [r, g, b];
|
|
2981
|
-
};
|
|
2982
|
-
convert.rgb.hcg = function(rgb) {
|
|
2983
|
-
const r = rgb[0] / 255;
|
|
2984
|
-
const g = rgb[1] / 255;
|
|
2985
|
-
const b = rgb[2] / 255;
|
|
2986
|
-
const max = Math.max(Math.max(r, g), b);
|
|
2987
|
-
const min = Math.min(Math.min(r, g), b);
|
|
2988
|
-
const chroma = max - min;
|
|
2989
|
-
let grayscale;
|
|
2990
|
-
let hue;
|
|
2991
|
-
if (chroma < 1) {
|
|
2992
|
-
grayscale = min / (1 - chroma);
|
|
2993
|
-
} else {
|
|
2994
|
-
grayscale = 0;
|
|
2995
|
-
}
|
|
2996
|
-
if (chroma <= 0) {
|
|
2997
|
-
hue = 0;
|
|
2998
|
-
} else if (max === r) {
|
|
2999
|
-
hue = (g - b) / chroma % 6;
|
|
3000
|
-
} else if (max === g) {
|
|
3001
|
-
hue = 2 + (b - r) / chroma;
|
|
3002
|
-
} else {
|
|
3003
|
-
hue = 4 + (r - g) / chroma;
|
|
3004
|
-
}
|
|
3005
|
-
hue /= 6;
|
|
3006
|
-
hue %= 1;
|
|
3007
|
-
return [hue * 360, chroma * 100, grayscale * 100];
|
|
3008
|
-
};
|
|
3009
|
-
convert.hsl.hcg = function(hsl) {
|
|
3010
|
-
const s = hsl[1] / 100;
|
|
3011
|
-
const l = hsl[2] / 100;
|
|
3012
|
-
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
3013
|
-
let f = 0;
|
|
3014
|
-
if (c < 1) {
|
|
3015
|
-
f = (l - 0.5 * c) / (1 - c);
|
|
3016
|
-
}
|
|
3017
|
-
return [hsl[0], c * 100, f * 100];
|
|
3018
|
-
};
|
|
3019
|
-
convert.hsv.hcg = function(hsv) {
|
|
3020
|
-
const s = hsv[1] / 100;
|
|
3021
|
-
const v = hsv[2] / 100;
|
|
3022
|
-
const c = s * v;
|
|
3023
|
-
let f = 0;
|
|
3024
|
-
if (c < 1) {
|
|
3025
|
-
f = (v - c) / (1 - c);
|
|
3026
|
-
}
|
|
3027
|
-
return [hsv[0], c * 100, f * 100];
|
|
3028
|
-
};
|
|
3029
|
-
convert.hcg.rgb = function(hcg) {
|
|
3030
|
-
const h = hcg[0] / 360;
|
|
3031
|
-
const c = hcg[1] / 100;
|
|
3032
|
-
const g = hcg[2] / 100;
|
|
3033
|
-
if (c === 0) {
|
|
3034
|
-
return [g * 255, g * 255, g * 255];
|
|
3035
|
-
}
|
|
3036
|
-
const pure = [0, 0, 0];
|
|
3037
|
-
const hi = h % 1 * 6;
|
|
3038
|
-
const v = hi % 1;
|
|
3039
|
-
const w = 1 - v;
|
|
3040
|
-
let mg = 0;
|
|
3041
|
-
switch (Math.floor(hi)) {
|
|
3042
|
-
case 0:
|
|
3043
|
-
pure[0] = 1;
|
|
3044
|
-
pure[1] = v;
|
|
3045
|
-
pure[2] = 0;
|
|
3046
|
-
break;
|
|
3047
|
-
case 1:
|
|
3048
|
-
pure[0] = w;
|
|
3049
|
-
pure[1] = 1;
|
|
3050
|
-
pure[2] = 0;
|
|
3051
|
-
break;
|
|
3052
|
-
case 2:
|
|
3053
|
-
pure[0] = 0;
|
|
3054
|
-
pure[1] = 1;
|
|
3055
|
-
pure[2] = v;
|
|
3056
|
-
break;
|
|
3057
|
-
case 3:
|
|
3058
|
-
pure[0] = 0;
|
|
3059
|
-
pure[1] = w;
|
|
3060
|
-
pure[2] = 1;
|
|
3061
|
-
break;
|
|
3062
|
-
case 4:
|
|
3063
|
-
pure[0] = v;
|
|
3064
|
-
pure[1] = 0;
|
|
3065
|
-
pure[2] = 1;
|
|
3066
|
-
break;
|
|
3067
|
-
default:
|
|
3068
|
-
pure[0] = 1;
|
|
3069
|
-
pure[1] = 0;
|
|
3070
|
-
pure[2] = w;
|
|
3071
|
-
}
|
|
3072
|
-
mg = (1 - c) * g;
|
|
3073
|
-
return [
|
|
3074
|
-
(c * pure[0] + mg) * 255,
|
|
3075
|
-
(c * pure[1] + mg) * 255,
|
|
3076
|
-
(c * pure[2] + mg) * 255
|
|
3077
|
-
];
|
|
2184
|
+
module.exports = () => {
|
|
2185
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
3078
2186
|
};
|
|
3079
|
-
convert.hcg.hsv = function(hcg) {
|
|
3080
|
-
const c = hcg[1] / 100;
|
|
3081
|
-
const g = hcg[2] / 100;
|
|
3082
|
-
const v = c + g * (1 - c);
|
|
3083
|
-
let f = 0;
|
|
3084
|
-
if (v > 0) {
|
|
3085
|
-
f = c / v;
|
|
3086
|
-
}
|
|
3087
|
-
return [hcg[0], f * 100, v * 100];
|
|
3088
|
-
};
|
|
3089
|
-
convert.hcg.hsl = function(hcg) {
|
|
3090
|
-
const c = hcg[1] / 100;
|
|
3091
|
-
const g = hcg[2] / 100;
|
|
3092
|
-
const l = g * (1 - c) + 0.5 * c;
|
|
3093
|
-
let s = 0;
|
|
3094
|
-
if (l > 0 && l < 0.5) {
|
|
3095
|
-
s = c / (2 * l);
|
|
3096
|
-
} else if (l >= 0.5 && l < 1) {
|
|
3097
|
-
s = c / (2 * (1 - l));
|
|
3098
|
-
}
|
|
3099
|
-
return [hcg[0], s * 100, l * 100];
|
|
3100
|
-
};
|
|
3101
|
-
convert.hcg.hwb = function(hcg) {
|
|
3102
|
-
const c = hcg[1] / 100;
|
|
3103
|
-
const g = hcg[2] / 100;
|
|
3104
|
-
const v = c + g * (1 - c);
|
|
3105
|
-
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
3106
|
-
};
|
|
3107
|
-
convert.hwb.hcg = function(hwb) {
|
|
3108
|
-
const w = hwb[1] / 100;
|
|
3109
|
-
const b = hwb[2] / 100;
|
|
3110
|
-
const v = 1 - b;
|
|
3111
|
-
const c = v - w;
|
|
3112
|
-
let g = 0;
|
|
3113
|
-
if (c < 1) {
|
|
3114
|
-
g = (v - c) / (1 - c);
|
|
3115
|
-
}
|
|
3116
|
-
return [hwb[0], c * 100, g * 100];
|
|
3117
|
-
};
|
|
3118
|
-
convert.apple.rgb = function(apple) {
|
|
3119
|
-
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
3120
|
-
};
|
|
3121
|
-
convert.rgb.apple = function(rgb) {
|
|
3122
|
-
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
3123
|
-
};
|
|
3124
|
-
convert.gray.rgb = function(args) {
|
|
3125
|
-
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
3126
|
-
};
|
|
3127
|
-
convert.gray.hsl = function(args) {
|
|
3128
|
-
return [0, 0, args[0]];
|
|
3129
|
-
};
|
|
3130
|
-
convert.gray.hsv = convert.gray.hsl;
|
|
3131
|
-
convert.gray.hwb = function(gray) {
|
|
3132
|
-
return [0, 100, gray[0]];
|
|
3133
|
-
};
|
|
3134
|
-
convert.gray.cmyk = function(gray) {
|
|
3135
|
-
return [0, 0, 0, gray[0]];
|
|
3136
|
-
};
|
|
3137
|
-
convert.gray.lab = function(gray) {
|
|
3138
|
-
return [gray[0], 0, 0];
|
|
3139
|
-
};
|
|
3140
|
-
convert.gray.hex = function(gray) {
|
|
3141
|
-
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
3142
|
-
const integer = (val << 16) + (val << 8) + val;
|
|
3143
|
-
const string = integer.toString(16).toUpperCase();
|
|
3144
|
-
return "000000".substring(string.length) + string;
|
|
3145
|
-
};
|
|
3146
|
-
convert.rgb.gray = function(rgb) {
|
|
3147
|
-
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
3148
|
-
return [val / 255 * 100];
|
|
3149
|
-
};
|
|
3150
|
-
});
|
|
3151
|
-
|
|
3152
|
-
// ../../node_modules/.bun/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
3153
|
-
var require_route = __commonJS((exports, module) => {
|
|
3154
|
-
var conversions = require_conversions();
|
|
3155
|
-
function buildGraph() {
|
|
3156
|
-
const graph = {};
|
|
3157
|
-
const models = Object.keys(conversions);
|
|
3158
|
-
for (let len = models.length, i = 0;i < len; i++) {
|
|
3159
|
-
graph[models[i]] = {
|
|
3160
|
-
distance: -1,
|
|
3161
|
-
parent: null
|
|
3162
|
-
};
|
|
3163
|
-
}
|
|
3164
|
-
return graph;
|
|
3165
|
-
}
|
|
3166
|
-
function deriveBFS(fromModel) {
|
|
3167
|
-
const graph = buildGraph();
|
|
3168
|
-
const queue = [fromModel];
|
|
3169
|
-
graph[fromModel].distance = 0;
|
|
3170
|
-
while (queue.length) {
|
|
3171
|
-
const current = queue.pop();
|
|
3172
|
-
const adjacents = Object.keys(conversions[current]);
|
|
3173
|
-
for (let len = adjacents.length, i = 0;i < len; i++) {
|
|
3174
|
-
const adjacent = adjacents[i];
|
|
3175
|
-
const node = graph[adjacent];
|
|
3176
|
-
if (node.distance === -1) {
|
|
3177
|
-
node.distance = graph[current].distance + 1;
|
|
3178
|
-
node.parent = current;
|
|
3179
|
-
queue.unshift(adjacent);
|
|
3180
|
-
}
|
|
3181
|
-
}
|
|
3182
|
-
}
|
|
3183
|
-
return graph;
|
|
3184
|
-
}
|
|
3185
|
-
function link(from, to) {
|
|
3186
|
-
return function(args) {
|
|
3187
|
-
return to(from(args));
|
|
3188
|
-
};
|
|
3189
|
-
}
|
|
3190
|
-
function wrapConversion(toModel, graph) {
|
|
3191
|
-
const path = [graph[toModel].parent, toModel];
|
|
3192
|
-
let fn = conversions[graph[toModel].parent][toModel];
|
|
3193
|
-
let cur = graph[toModel].parent;
|
|
3194
|
-
while (graph[cur].parent) {
|
|
3195
|
-
path.unshift(graph[cur].parent);
|
|
3196
|
-
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
3197
|
-
cur = graph[cur].parent;
|
|
3198
|
-
}
|
|
3199
|
-
fn.conversion = path;
|
|
3200
|
-
return fn;
|
|
3201
|
-
}
|
|
3202
|
-
module.exports = function(fromModel) {
|
|
3203
|
-
const graph = deriveBFS(fromModel);
|
|
3204
|
-
const conversion = {};
|
|
3205
|
-
const models = Object.keys(graph);
|
|
3206
|
-
for (let len = models.length, i = 0;i < len; i++) {
|
|
3207
|
-
const toModel = models[i];
|
|
3208
|
-
const node = graph[toModel];
|
|
3209
|
-
if (node.parent === null) {
|
|
3210
|
-
continue;
|
|
3211
|
-
}
|
|
3212
|
-
conversion[toModel] = wrapConversion(toModel, graph);
|
|
3213
|
-
}
|
|
3214
|
-
return conversion;
|
|
3215
|
-
};
|
|
3216
|
-
});
|
|
3217
|
-
|
|
3218
|
-
// ../../node_modules/.bun/color-convert@2.0.1/node_modules/color-convert/index.js
|
|
3219
|
-
var require_color_convert = __commonJS((exports, module) => {
|
|
3220
|
-
var conversions = require_conversions();
|
|
3221
|
-
var route = require_route();
|
|
3222
|
-
var convert = {};
|
|
3223
|
-
var models = Object.keys(conversions);
|
|
3224
|
-
function wrapRaw(fn) {
|
|
3225
|
-
const wrappedFn = function(...args) {
|
|
3226
|
-
const arg0 = args[0];
|
|
3227
|
-
if (arg0 === undefined || arg0 === null) {
|
|
3228
|
-
return arg0;
|
|
3229
|
-
}
|
|
3230
|
-
if (arg0.length > 1) {
|
|
3231
|
-
args = arg0;
|
|
3232
|
-
}
|
|
3233
|
-
return fn(args);
|
|
3234
|
-
};
|
|
3235
|
-
if ("conversion" in fn) {
|
|
3236
|
-
wrappedFn.conversion = fn.conversion;
|
|
3237
|
-
}
|
|
3238
|
-
return wrappedFn;
|
|
3239
|
-
}
|
|
3240
|
-
function wrapRounded(fn) {
|
|
3241
|
-
const wrappedFn = function(...args) {
|
|
3242
|
-
const arg0 = args[0];
|
|
3243
|
-
if (arg0 === undefined || arg0 === null) {
|
|
3244
|
-
return arg0;
|
|
3245
|
-
}
|
|
3246
|
-
if (arg0.length > 1) {
|
|
3247
|
-
args = arg0;
|
|
3248
|
-
}
|
|
3249
|
-
const result = fn(args);
|
|
3250
|
-
if (typeof result === "object") {
|
|
3251
|
-
for (let len = result.length, i = 0;i < len; i++) {
|
|
3252
|
-
result[i] = Math.round(result[i]);
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
return result;
|
|
3256
|
-
};
|
|
3257
|
-
if ("conversion" in fn) {
|
|
3258
|
-
wrappedFn.conversion = fn.conversion;
|
|
3259
|
-
}
|
|
3260
|
-
return wrappedFn;
|
|
3261
|
-
}
|
|
3262
|
-
models.forEach((fromModel) => {
|
|
3263
|
-
convert[fromModel] = {};
|
|
3264
|
-
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
3265
|
-
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
3266
|
-
const routes = route(fromModel);
|
|
3267
|
-
const routeModels = Object.keys(routes);
|
|
3268
|
-
routeModels.forEach((toModel) => {
|
|
3269
|
-
const fn = routes[toModel];
|
|
3270
|
-
convert[fromModel][toModel] = wrapRounded(fn);
|
|
3271
|
-
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
3272
|
-
});
|
|
3273
|
-
});
|
|
3274
|
-
module.exports = convert;
|
|
3275
2187
|
});
|
|
3276
2188
|
|
|
3277
|
-
// ../../node_modules/.bun/
|
|
3278
|
-
var require_ansi_styles = __commonJS((exports, module) => {
|
|
3279
|
-
var wrapAnsi16 = (fn, offset) => (...args) => {
|
|
3280
|
-
const code = fn(...args);
|
|
3281
|
-
return `\x1B[${code + offset}m`;
|
|
3282
|
-
};
|
|
3283
|
-
var wrapAnsi256 = (fn, offset) => (...args) => {
|
|
3284
|
-
const code = fn(...args);
|
|
3285
|
-
return `\x1B[${38 + offset};5;${code}m`;
|
|
3286
|
-
};
|
|
3287
|
-
var wrapAnsi16m = (fn, offset) => (...args) => {
|
|
3288
|
-
const rgb = fn(...args);
|
|
3289
|
-
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
3290
|
-
};
|
|
3291
|
-
var ansi2ansi = (n) => n;
|
|
3292
|
-
var rgb2rgb = (r, g, b) => [r, g, b];
|
|
3293
|
-
var setLazyProperty = (object, property, get) => {
|
|
3294
|
-
Object.defineProperty(object, property, {
|
|
3295
|
-
get: () => {
|
|
3296
|
-
const value = get();
|
|
3297
|
-
Object.defineProperty(object, property, {
|
|
3298
|
-
value,
|
|
3299
|
-
enumerable: true,
|
|
3300
|
-
configurable: true
|
|
3301
|
-
});
|
|
3302
|
-
return value;
|
|
3303
|
-
},
|
|
3304
|
-
enumerable: true,
|
|
3305
|
-
configurable: true
|
|
3306
|
-
});
|
|
3307
|
-
};
|
|
3308
|
-
var colorConvert;
|
|
3309
|
-
var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
3310
|
-
if (colorConvert === undefined) {
|
|
3311
|
-
colorConvert = require_color_convert();
|
|
3312
|
-
}
|
|
3313
|
-
const offset = isBackground ? 10 : 0;
|
|
3314
|
-
const styles = {};
|
|
3315
|
-
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
3316
|
-
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
3317
|
-
if (sourceSpace === targetSpace) {
|
|
3318
|
-
styles[name] = wrap(identity, offset);
|
|
3319
|
-
} else if (typeof suite === "object") {
|
|
3320
|
-
styles[name] = wrap(suite[targetSpace], offset);
|
|
3321
|
-
}
|
|
3322
|
-
}
|
|
3323
|
-
return styles;
|
|
3324
|
-
};
|
|
3325
|
-
function assembleStyles() {
|
|
3326
|
-
const codes = new Map;
|
|
3327
|
-
const styles = {
|
|
3328
|
-
modifier: {
|
|
3329
|
-
reset: [0, 0],
|
|
3330
|
-
bold: [1, 22],
|
|
3331
|
-
dim: [2, 22],
|
|
3332
|
-
italic: [3, 23],
|
|
3333
|
-
underline: [4, 24],
|
|
3334
|
-
inverse: [7, 27],
|
|
3335
|
-
hidden: [8, 28],
|
|
3336
|
-
strikethrough: [9, 29]
|
|
3337
|
-
},
|
|
3338
|
-
color: {
|
|
3339
|
-
black: [30, 39],
|
|
3340
|
-
red: [31, 39],
|
|
3341
|
-
green: [32, 39],
|
|
3342
|
-
yellow: [33, 39],
|
|
3343
|
-
blue: [34, 39],
|
|
3344
|
-
magenta: [35, 39],
|
|
3345
|
-
cyan: [36, 39],
|
|
3346
|
-
white: [37, 39],
|
|
3347
|
-
blackBright: [90, 39],
|
|
3348
|
-
redBright: [91, 39],
|
|
3349
|
-
greenBright: [92, 39],
|
|
3350
|
-
yellowBright: [93, 39],
|
|
3351
|
-
blueBright: [94, 39],
|
|
3352
|
-
magentaBright: [95, 39],
|
|
3353
|
-
cyanBright: [96, 39],
|
|
3354
|
-
whiteBright: [97, 39]
|
|
3355
|
-
},
|
|
3356
|
-
bgColor: {
|
|
3357
|
-
bgBlack: [40, 49],
|
|
3358
|
-
bgRed: [41, 49],
|
|
3359
|
-
bgGreen: [42, 49],
|
|
3360
|
-
bgYellow: [43, 49],
|
|
3361
|
-
bgBlue: [44, 49],
|
|
3362
|
-
bgMagenta: [45, 49],
|
|
3363
|
-
bgCyan: [46, 49],
|
|
3364
|
-
bgWhite: [47, 49],
|
|
3365
|
-
bgBlackBright: [100, 49],
|
|
3366
|
-
bgRedBright: [101, 49],
|
|
3367
|
-
bgGreenBright: [102, 49],
|
|
3368
|
-
bgYellowBright: [103, 49],
|
|
3369
|
-
bgBlueBright: [104, 49],
|
|
3370
|
-
bgMagentaBright: [105, 49],
|
|
3371
|
-
bgCyanBright: [106, 49],
|
|
3372
|
-
bgWhiteBright: [107, 49]
|
|
3373
|
-
}
|
|
3374
|
-
};
|
|
3375
|
-
styles.color.gray = styles.color.blackBright;
|
|
3376
|
-
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
3377
|
-
styles.color.grey = styles.color.blackBright;
|
|
3378
|
-
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
3379
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
3380
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
3381
|
-
styles[styleName] = {
|
|
3382
|
-
open: `\x1B[${style[0]}m`,
|
|
3383
|
-
close: `\x1B[${style[1]}m`
|
|
3384
|
-
};
|
|
3385
|
-
group[styleName] = styles[styleName];
|
|
3386
|
-
codes.set(style[0], style[1]);
|
|
3387
|
-
}
|
|
3388
|
-
Object.defineProperty(styles, groupName, {
|
|
3389
|
-
value: group,
|
|
3390
|
-
enumerable: false
|
|
3391
|
-
});
|
|
3392
|
-
}
|
|
3393
|
-
Object.defineProperty(styles, "codes", {
|
|
3394
|
-
value: codes,
|
|
3395
|
-
enumerable: false
|
|
3396
|
-
});
|
|
3397
|
-
styles.color.close = "\x1B[39m";
|
|
3398
|
-
styles.bgColor.close = "\x1B[49m";
|
|
3399
|
-
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
3400
|
-
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
3401
|
-
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
3402
|
-
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
3403
|
-
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
3404
|
-
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
3405
|
-
return styles;
|
|
3406
|
-
}
|
|
3407
|
-
Object.defineProperty(module, "exports", {
|
|
3408
|
-
enumerable: true,
|
|
3409
|
-
get: assembleStyles
|
|
3410
|
-
});
|
|
3411
|
-
});
|
|
3412
|
-
|
|
3413
|
-
// ../../node_modules/.bun/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js
|
|
3414
|
-
var require_wrap_ansi = __commonJS((exports, module) => {
|
|
3415
|
-
var stringWidth = require_string_width();
|
|
3416
|
-
var stripAnsi = require_strip_ansi();
|
|
3417
|
-
var ansiStyles = require_ansi_styles();
|
|
3418
|
-
var ESCAPES = new Set([
|
|
3419
|
-
"\x1B",
|
|
3420
|
-
""
|
|
3421
|
-
]);
|
|
3422
|
-
var END_CODE = 39;
|
|
3423
|
-
var wrapAnsi = (code) => `${ESCAPES.values().next().value}[${code}m`;
|
|
3424
|
-
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
3425
|
-
var wrapWord = (rows, word, columns) => {
|
|
3426
|
-
const characters = [...word];
|
|
3427
|
-
let isInsideEscape = false;
|
|
3428
|
-
let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
|
|
3429
|
-
for (const [index, character] of characters.entries()) {
|
|
3430
|
-
const characterLength = stringWidth(character);
|
|
3431
|
-
if (visible + characterLength <= columns) {
|
|
3432
|
-
rows[rows.length - 1] += character;
|
|
3433
|
-
} else {
|
|
3434
|
-
rows.push(character);
|
|
3435
|
-
visible = 0;
|
|
3436
|
-
}
|
|
3437
|
-
if (ESCAPES.has(character)) {
|
|
3438
|
-
isInsideEscape = true;
|
|
3439
|
-
} else if (isInsideEscape && character === "m") {
|
|
3440
|
-
isInsideEscape = false;
|
|
3441
|
-
continue;
|
|
3442
|
-
}
|
|
3443
|
-
if (isInsideEscape) {
|
|
3444
|
-
continue;
|
|
3445
|
-
}
|
|
3446
|
-
visible += characterLength;
|
|
3447
|
-
if (visible === columns && index < characters.length - 1) {
|
|
3448
|
-
rows.push("");
|
|
3449
|
-
visible = 0;
|
|
3450
|
-
}
|
|
3451
|
-
}
|
|
3452
|
-
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
|
3453
|
-
rows[rows.length - 2] += rows.pop();
|
|
3454
|
-
}
|
|
3455
|
-
};
|
|
3456
|
-
var stringVisibleTrimSpacesRight = (str) => {
|
|
3457
|
-
const words = str.split(" ");
|
|
3458
|
-
let last = words.length;
|
|
3459
|
-
while (last > 0) {
|
|
3460
|
-
if (stringWidth(words[last - 1]) > 0) {
|
|
3461
|
-
break;
|
|
3462
|
-
}
|
|
3463
|
-
last--;
|
|
3464
|
-
}
|
|
3465
|
-
if (last === words.length) {
|
|
3466
|
-
return str;
|
|
3467
|
-
}
|
|
3468
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
3469
|
-
};
|
|
3470
|
-
var exec = (string, columns, options = {}) => {
|
|
3471
|
-
if (options.trim !== false && string.trim() === "") {
|
|
3472
|
-
return "";
|
|
3473
|
-
}
|
|
3474
|
-
let pre = "";
|
|
3475
|
-
let ret = "";
|
|
3476
|
-
let escapeCode;
|
|
3477
|
-
const lengths = wordLengths(string);
|
|
3478
|
-
let rows = [""];
|
|
3479
|
-
for (const [index, word] of string.split(" ").entries()) {
|
|
3480
|
-
if (options.trim !== false) {
|
|
3481
|
-
rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
|
|
3482
|
-
}
|
|
3483
|
-
let rowLength = stringWidth(rows[rows.length - 1]);
|
|
3484
|
-
if (index !== 0) {
|
|
3485
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
3486
|
-
rows.push("");
|
|
3487
|
-
rowLength = 0;
|
|
3488
|
-
}
|
|
3489
|
-
if (rowLength > 0 || options.trim === false) {
|
|
3490
|
-
rows[rows.length - 1] += " ";
|
|
3491
|
-
rowLength++;
|
|
3492
|
-
}
|
|
3493
|
-
}
|
|
3494
|
-
if (options.hard && lengths[index] > columns) {
|
|
3495
|
-
const remainingColumns = columns - rowLength;
|
|
3496
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
3497
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
3498
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
3499
|
-
rows.push("");
|
|
3500
|
-
}
|
|
3501
|
-
wrapWord(rows, word, columns);
|
|
3502
|
-
continue;
|
|
3503
|
-
}
|
|
3504
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
3505
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
3506
|
-
wrapWord(rows, word, columns);
|
|
3507
|
-
continue;
|
|
3508
|
-
}
|
|
3509
|
-
rows.push("");
|
|
3510
|
-
}
|
|
3511
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
3512
|
-
wrapWord(rows, word, columns);
|
|
3513
|
-
continue;
|
|
3514
|
-
}
|
|
3515
|
-
rows[rows.length - 1] += word;
|
|
3516
|
-
}
|
|
3517
|
-
if (options.trim !== false) {
|
|
3518
|
-
rows = rows.map(stringVisibleTrimSpacesRight);
|
|
3519
|
-
}
|
|
3520
|
-
pre = rows.join(`
|
|
3521
|
-
`);
|
|
3522
|
-
for (const [index, character] of [...pre].entries()) {
|
|
3523
|
-
ret += character;
|
|
3524
|
-
if (ESCAPES.has(character)) {
|
|
3525
|
-
const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
|
|
3526
|
-
escapeCode = code2 === END_CODE ? null : code2;
|
|
3527
|
-
}
|
|
3528
|
-
const code = ansiStyles.codes.get(Number(escapeCode));
|
|
3529
|
-
if (escapeCode && code) {
|
|
3530
|
-
if (pre[index + 1] === `
|
|
3531
|
-
`) {
|
|
3532
|
-
ret += wrapAnsi(code);
|
|
3533
|
-
} else if (character === `
|
|
3534
|
-
`) {
|
|
3535
|
-
ret += wrapAnsi(escapeCode);
|
|
3536
|
-
}
|
|
3537
|
-
}
|
|
3538
|
-
}
|
|
3539
|
-
return ret;
|
|
3540
|
-
};
|
|
3541
|
-
module.exports = (string, columns, options) => {
|
|
3542
|
-
return String(string).normalize().replace(/\r\n/g, `
|
|
3543
|
-
`).split(`
|
|
3544
|
-
`).map((line) => exec(line, columns, options)).join(`
|
|
3545
|
-
`);
|
|
3546
|
-
};
|
|
3547
|
-
});
|
|
3548
|
-
|
|
3549
|
-
// ../../node_modules/.bun/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
|
|
2189
|
+
// ../../node_modules/.bun/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
|
|
3550
2190
|
var require_lib = __commonJS((exports, module) => {
|
|
3551
2191
|
var Stream = __require("stream");
|
|
3552
2192
|
|
|
@@ -3987,15 +2627,15 @@ var require_console_utils = __commonJS((exports) => {
|
|
|
3987
2627
|
exports.findWidthInConsole = exports.stripAnsi = undefined;
|
|
3988
2628
|
var simple_wcswidth_1 = require_dist();
|
|
3989
2629
|
var colorRegex = /\x1b\[\d{1,3}(;\d{1,3})*m/g;
|
|
3990
|
-
var
|
|
3991
|
-
exports.stripAnsi =
|
|
2630
|
+
var stripAnsi2 = (str) => str.replace(colorRegex, "");
|
|
2631
|
+
exports.stripAnsi = stripAnsi2;
|
|
3992
2632
|
var findWidthInConsole = (str, charLength) => {
|
|
3993
2633
|
let strLen = 0;
|
|
3994
2634
|
str = (0, exports.stripAnsi)(str);
|
|
3995
2635
|
if (charLength) {
|
|
3996
2636
|
Object.entries(charLength).forEach(([key, value]) => {
|
|
3997
|
-
const
|
|
3998
|
-
strLen += (str.match(
|
|
2637
|
+
const regex2 = new RegExp(key, "g");
|
|
2638
|
+
strLen += (str.match(regex2) || []).length * value;
|
|
3999
2639
|
str = str.replace(key, "");
|
|
4000
2640
|
});
|
|
4001
2641
|
}
|
|
@@ -6070,17 +4710,17 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
6070
4710
|
}
|
|
6071
4711
|
const opts = options || {};
|
|
6072
4712
|
const posix = opts.windows;
|
|
6073
|
-
const
|
|
6074
|
-
const state =
|
|
6075
|
-
delete
|
|
4713
|
+
const regex2 = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
4714
|
+
const state = regex2.state;
|
|
4715
|
+
delete regex2.state;
|
|
6076
4716
|
let isIgnored = () => false;
|
|
6077
4717
|
if (opts.ignore) {
|
|
6078
4718
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
6079
4719
|
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
6080
4720
|
}
|
|
6081
4721
|
const matcher = (input, returnObject = false) => {
|
|
6082
|
-
const { isMatch, match, output } = picomatch.test(input,
|
|
6083
|
-
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
4722
|
+
const { isMatch, match, output } = picomatch.test(input, regex2, options, { glob, posix });
|
|
4723
|
+
const result = { glob, state, regex: regex2, posix, input, output, match, isMatch };
|
|
6084
4724
|
if (typeof opts.onResult === "function") {
|
|
6085
4725
|
opts.onResult(result);
|
|
6086
4726
|
}
|
|
@@ -6105,7 +4745,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
6105
4745
|
}
|
|
6106
4746
|
return matcher;
|
|
6107
4747
|
};
|
|
6108
|
-
picomatch.test = (input,
|
|
4748
|
+
picomatch.test = (input, regex2, options, { glob, posix } = {}) => {
|
|
6109
4749
|
if (typeof input !== "string") {
|
|
6110
4750
|
throw new TypeError("Expected input to be a string");
|
|
6111
4751
|
}
|
|
@@ -6122,16 +4762,16 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
6122
4762
|
}
|
|
6123
4763
|
if (match === false || opts.capture === true) {
|
|
6124
4764
|
if (opts.matchBase === true || opts.basename === true) {
|
|
6125
|
-
match = picomatch.matchBase(input,
|
|
4765
|
+
match = picomatch.matchBase(input, regex2, options, posix);
|
|
6126
4766
|
} else {
|
|
6127
|
-
match =
|
|
4767
|
+
match = regex2.exec(output);
|
|
6128
4768
|
}
|
|
6129
4769
|
}
|
|
6130
4770
|
return { isMatch: Boolean(match), match, output };
|
|
6131
4771
|
};
|
|
6132
4772
|
picomatch.matchBase = (input, glob, options) => {
|
|
6133
|
-
const
|
|
6134
|
-
return
|
|
4773
|
+
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
4774
|
+
return regex2.test(utils.basename(input));
|
|
6135
4775
|
};
|
|
6136
4776
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
6137
4777
|
picomatch.parse = (pattern, options) => {
|
|
@@ -6151,11 +4791,11 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
6151
4791
|
if (state && state.negated === true) {
|
|
6152
4792
|
source = `^(?!${source}).*$`;
|
|
6153
4793
|
}
|
|
6154
|
-
const
|
|
4794
|
+
const regex2 = picomatch.toRegex(source, options);
|
|
6155
4795
|
if (returnState === true) {
|
|
6156
|
-
|
|
4796
|
+
regex2.state = state;
|
|
6157
4797
|
}
|
|
6158
|
-
return
|
|
4798
|
+
return regex2;
|
|
6159
4799
|
};
|
|
6160
4800
|
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
6161
4801
|
if (!input || typeof input !== "string") {
|
|
@@ -13240,10 +11880,10 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
13240
11880
|
if (this.overload) {
|
|
13241
11881
|
env2 = { ...this.processEnv, ...this.runningParsed };
|
|
13242
11882
|
}
|
|
13243
|
-
const
|
|
11883
|
+
const regex2 = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
13244
11884
|
let result = value;
|
|
13245
11885
|
let match;
|
|
13246
|
-
while ((match =
|
|
11886
|
+
while ((match = regex2.exec(result)) !== null) {
|
|
13247
11887
|
const [template, bracedExpression, unbracedExpression] = match;
|
|
13248
11888
|
const expression = bracedExpression || unbracedExpression;
|
|
13249
11889
|
const opRegex = /(:\+|\+|:-|-)/;
|
|
@@ -13271,7 +11911,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
13271
11911
|
if (this.literals[key] && /\$\{[^}]+\}|\$[A-Za-z_][A-Za-z0-9_]*/.test(this.literals[key])) {
|
|
13272
11912
|
break;
|
|
13273
11913
|
}
|
|
13274
|
-
|
|
11914
|
+
regex2.lastIndex = 0;
|
|
13275
11915
|
}
|
|
13276
11916
|
return result;
|
|
13277
11917
|
}
|
|
@@ -14702,11 +13342,11 @@ var require_ignore = __commonJS((exports, module) => {
|
|
|
14702
13342
|
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
|
|
14703
13343
|
|
|
14704
13344
|
class IgnoreRule {
|
|
14705
|
-
constructor(origin, pattern, negative,
|
|
13345
|
+
constructor(origin, pattern, negative, regex2) {
|
|
14706
13346
|
this.origin = origin;
|
|
14707
13347
|
this.pattern = pattern;
|
|
14708
13348
|
this.negative = negative;
|
|
14709
|
-
this.regex =
|
|
13349
|
+
this.regex = regex2;
|
|
14710
13350
|
}
|
|
14711
13351
|
}
|
|
14712
13352
|
var createRule = (pattern, ignoreCase) => {
|
|
@@ -14717,8 +13357,8 @@ var require_ignore = __commonJS((exports, module) => {
|
|
|
14717
13357
|
pattern = pattern.substr(1);
|
|
14718
13358
|
}
|
|
14719
13359
|
pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
14720
|
-
const
|
|
14721
|
-
return new IgnoreRule(origin, pattern, negative,
|
|
13360
|
+
const regex2 = makeRegex(pattern, ignoreCase);
|
|
13361
|
+
return new IgnoreRule(origin, pattern, negative, regex2);
|
|
14722
13362
|
};
|
|
14723
13363
|
var throwError = (message, Ctor) => {
|
|
14724
13364
|
throw new Ctor(message);
|
|
@@ -23854,7 +22494,7 @@ var require_validate2 = __commonJS((exports) => {
|
|
|
23854
22494
|
});
|
|
23855
22495
|
exports.assertValidSDL = assertValidSDL;
|
|
23856
22496
|
exports.assertValidSDLExtension = assertValidSDLExtension;
|
|
23857
|
-
exports.validate =
|
|
22497
|
+
exports.validate = validate4;
|
|
23858
22498
|
exports.validateSDL = validateSDL;
|
|
23859
22499
|
var _devAssert = require_devAssert();
|
|
23860
22500
|
var _GraphQLError = require_GraphQLError();
|
|
@@ -23863,7 +22503,7 @@ var require_validate2 = __commonJS((exports) => {
|
|
|
23863
22503
|
var _TypeInfo = require_TypeInfo();
|
|
23864
22504
|
var _specifiedRules = require_specifiedRules();
|
|
23865
22505
|
var _ValidationContext = require_ValidationContext();
|
|
23866
|
-
function
|
|
22506
|
+
function validate4(schema, documentAST, rules = _specifiedRules.specifiedRules, options, typeInfo = new _TypeInfo.TypeInfo(schema)) {
|
|
23867
22507
|
var _options$maxErrors;
|
|
23868
22508
|
const maxErrors = (_options$maxErrors = options === null || options === undefined ? undefined : options.maxErrors) !== null && _options$maxErrors !== undefined ? _options$maxErrors : 100;
|
|
23869
22509
|
documentAST || (0, _devAssert.devAssert)(false, "Must provide document.");
|
|
@@ -41285,7 +39925,7 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
41285
39925
|
"node_modules",
|
|
41286
39926
|
"favicon.ico"
|
|
41287
39927
|
];
|
|
41288
|
-
function
|
|
39928
|
+
function validate4(name2) {
|
|
41289
39929
|
var warnings = [];
|
|
41290
39930
|
var errors4 = [];
|
|
41291
39931
|
if (name2 === null) {
|
|
@@ -41360,7 +40000,7 @@ var require_lib7 = __commonJS((exports, module) => {
|
|
|
41360
40000
|
}
|
|
41361
40001
|
return result;
|
|
41362
40002
|
};
|
|
41363
|
-
module.exports =
|
|
40003
|
+
module.exports = validate4;
|
|
41364
40004
|
});
|
|
41365
40005
|
|
|
41366
40006
|
// ../../node_modules/.bun/npm-package-arg@13.0.2/node_modules/npm-package-arg/lib/npa.js
|
|
@@ -161182,7 +159822,7 @@ ${lanes.join(`
|
|
|
161182
159822
|
function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
161183
159823
|
var _a;
|
|
161184
159824
|
const text = [];
|
|
161185
|
-
const
|
|
159825
|
+
const colors = createColors(sys2);
|
|
161186
159826
|
const name2 = getDisplayNameTextOfOption(option);
|
|
161187
159827
|
const valueCandidates = getValueCandidate(option);
|
|
161188
159828
|
const defaultValueDescription = typeof option.defaultValueDescription === "object" ? getDiagnosticText(option.defaultValueDescription) : formatDefaultValue(option.defaultValueDescription, option.type === "list" || option.type === "listOrElement" ? option.element.type : option.type);
|
|
@@ -161203,7 +159843,7 @@ ${lanes.join(`
|
|
|
161203
159843
|
}
|
|
161204
159844
|
text.push(sys2.newLine);
|
|
161205
159845
|
} else {
|
|
161206
|
-
text.push(
|
|
159846
|
+
text.push(colors.blue(name2), sys2.newLine);
|
|
161207
159847
|
if (option.description) {
|
|
161208
159848
|
const description3 = getDiagnosticText(option.description);
|
|
161209
159849
|
text.push(description3);
|
|
@@ -161248,7 +159888,7 @@ ${lanes.join(`
|
|
|
161248
159888
|
if (isFirstLine) {
|
|
161249
159889
|
curLeft = left.padStart(rightAlignOfLeft2);
|
|
161250
159890
|
curLeft = curLeft.padEnd(leftAlignOfRight2);
|
|
161251
|
-
curLeft = colorLeft ?
|
|
159891
|
+
curLeft = colorLeft ? colors.blue(curLeft) : curLeft;
|
|
161252
159892
|
} else {
|
|
161253
159893
|
curLeft = "".padStart(leftAlignOfRight2);
|
|
161254
159894
|
}
|
|
@@ -161360,9 +160000,9 @@ ${lanes.join(`
|
|
|
161360
160000
|
return res;
|
|
161361
160001
|
}
|
|
161362
160002
|
function printEasyHelp(sys2, simpleOptions) {
|
|
161363
|
-
const
|
|
160003
|
+
const colors = createColors(sys2);
|
|
161364
160004
|
let output = [...getHeader(sys2, `${getDiagnosticText(Diagnostics.tsc_Colon_The_TypeScript_Compiler)} - ${getDiagnosticText(Diagnostics.Version_0, version2)}`)];
|
|
161365
|
-
output.push(
|
|
160005
|
+
output.push(colors.bold(getDiagnosticText(Diagnostics.COMMON_COMMANDS)) + sys2.newLine + sys2.newLine);
|
|
161366
160006
|
example("tsc", Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
161367
160007
|
example("tsc app.ts util.ts", Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
161368
160008
|
example("tsc -b", Diagnostics.Build_a_composite_project_in_the_working_directory);
|
|
@@ -161383,7 +160023,7 @@ ${lanes.join(`
|
|
|
161383
160023
|
function example(ex, desc) {
|
|
161384
160024
|
const examples = typeof ex === "string" ? [ex] : ex;
|
|
161385
160025
|
for (const example2 of examples) {
|
|
161386
|
-
output.push(" " +
|
|
160026
|
+
output.push(" " + colors.blue(example2) + sys2.newLine);
|
|
161387
160027
|
}
|
|
161388
160028
|
output.push(" " + getDiagnosticText(desc) + sys2.newLine + sys2.newLine);
|
|
161389
160029
|
}
|
|
@@ -161406,12 +160046,12 @@ ${lanes.join(`
|
|
|
161406
160046
|
}
|
|
161407
160047
|
function getHeader(sys2, message) {
|
|
161408
160048
|
var _a;
|
|
161409
|
-
const
|
|
160049
|
+
const colors = createColors(sys2);
|
|
161410
160050
|
const header = [];
|
|
161411
160051
|
const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? undefined : _a.call(sys2)) ?? 0;
|
|
161412
160052
|
const tsIconLength = 5;
|
|
161413
|
-
const tsIconFirstLine =
|
|
161414
|
-
const tsIconSecondLine =
|
|
160053
|
+
const tsIconFirstLine = colors.blueBackground("".padStart(tsIconLength));
|
|
160054
|
+
const tsIconSecondLine = colors.blueBackground(colors.brightWhite("TS ".padStart(tsIconLength)));
|
|
161415
160055
|
if (terminalWidth >= message.length + tsIconLength) {
|
|
161416
160056
|
const rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
|
|
161417
160057
|
const leftAlign = rightAlign - tsIconLength;
|
|
@@ -194214,8 +192854,8 @@ ${newComment.split(`
|
|
|
194214
192854
|
if (!(ranges == null ? undefined : ranges.length)) {
|
|
194215
192855
|
return false;
|
|
194216
192856
|
}
|
|
194217
|
-
const
|
|
194218
|
-
return some(ranges, (range2) =>
|
|
192857
|
+
const regex2 = leadingParameterNameCommentRegexFactory(name2);
|
|
192858
|
+
return some(ranges, (range2) => regex2.test(sourceFileText.substring(range2.pos, range2.end)));
|
|
194219
192859
|
}
|
|
194220
192860
|
function isHintableLiteral(node) {
|
|
194221
192861
|
switch (node.kind) {
|
|
@@ -198402,10 +197042,10 @@ ${options.prefix}` : `
|
|
|
198402
197042
|
}
|
|
198403
197043
|
});
|
|
198404
197044
|
}
|
|
198405
|
-
getChanges(
|
|
197045
|
+
getChanges(validate4) {
|
|
198406
197046
|
this.finishDeleteDeclarations();
|
|
198407
197047
|
this.finishClassesWithNodesInsertedAtStart();
|
|
198408
|
-
const changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext,
|
|
197048
|
+
const changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate4);
|
|
198409
197049
|
if (this.newFileChanges) {
|
|
198410
197050
|
this.newFileChanges.forEach((insertions, fileName) => {
|
|
198411
197051
|
changes.push(changesToText.newFileChanges(fileName, insertions, this.newLineCharacter, this.formatContext));
|
|
@@ -198474,7 +197114,7 @@ ${options.prefix}` : `
|
|
|
198474
197114
|
}
|
|
198475
197115
|
var changesToText;
|
|
198476
197116
|
((changesToText2) => {
|
|
198477
|
-
function getTextChangesFromChanges(changes, newLineCharacter, formatContext,
|
|
197117
|
+
function getTextChangesFromChanges(changes, newLineCharacter, formatContext, validate4) {
|
|
198478
197118
|
return mapDefined(group(changes, (c2) => c2.sourceFile.path), (changesInFile) => {
|
|
198479
197119
|
const sourceFile = changesInFile[0].sourceFile;
|
|
198480
197120
|
const normalized = toSorted(changesInFile, (a4, b2) => a4.range.pos - b2.range.pos || a4.range.end - b2.range.end);
|
|
@@ -198484,7 +197124,7 @@ ${options.prefix}` : `
|
|
|
198484
197124
|
const textChanges2 = mapDefined(normalized, (c2) => {
|
|
198485
197125
|
const span = createTextSpanFromRange(c2.range);
|
|
198486
197126
|
const targetSourceFile = c2.kind === 1 ? getSourceFileOfNode(getOriginalNode(c2.node)) ?? c2.sourceFile : c2.kind === 2 ? getSourceFileOfNode(getOriginalNode(c2.nodes[0])) ?? c2.sourceFile : c2.sourceFile;
|
|
198487
|
-
const newText = computeNewText(c2, targetSourceFile, sourceFile, newLineCharacter, formatContext,
|
|
197127
|
+
const newText = computeNewText(c2, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate4);
|
|
198488
197128
|
if (span.length === newText.length && stringContainsAt(targetSourceFile.text, newText, span.start)) {
|
|
198489
197129
|
return;
|
|
198490
197130
|
}
|
|
@@ -198506,7 +197146,7 @@ ${options.prefix}` : `
|
|
|
198506
197146
|
return applyChanges(nonFormattedText, changes) + newLineCharacter;
|
|
198507
197147
|
}
|
|
198508
197148
|
changesToText2.newFileChangesWorker = newFileChangesWorker;
|
|
198509
|
-
function computeNewText(change, targetSourceFile, sourceFile, newLineCharacter, formatContext,
|
|
197149
|
+
function computeNewText(change, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate4) {
|
|
198510
197150
|
var _a;
|
|
198511
197151
|
if (change.kind === 0) {
|
|
198512
197152
|
return "";
|
|
@@ -198515,15 +197155,15 @@ ${options.prefix}` : `
|
|
|
198515
197155
|
return change.text;
|
|
198516
197156
|
}
|
|
198517
197157
|
const { options = {}, range: { pos } } = change;
|
|
198518
|
-
const format2 = (n3) => getFormattedTextOfNode(n3, targetSourceFile, sourceFile, pos, options, newLineCharacter, formatContext,
|
|
197158
|
+
const format2 = (n3) => getFormattedTextOfNode(n3, targetSourceFile, sourceFile, pos, options, newLineCharacter, formatContext, validate4);
|
|
198519
197159
|
const text = change.kind === 2 ? change.nodes.map((n3) => removeSuffix(format2(n3), newLineCharacter)).join(((_a = change.options) == null ? undefined : _a.joiner) || newLineCharacter) : format2(change.node);
|
|
198520
197160
|
const noIndent = options.indentation !== undefined || getLineStartPositionForPosition(pos, targetSourceFile) === pos ? text : text.replace(/^\s+/, "");
|
|
198521
197161
|
return (options.prefix || "") + noIndent + (!options.suffix || endsWith(noIndent, options.suffix) ? "" : options.suffix);
|
|
198522
197162
|
}
|
|
198523
|
-
function getFormattedTextOfNode(nodeIn, targetSourceFile, sourceFile, pos, { indentation, prefix, delta }, newLineCharacter, formatContext,
|
|
197163
|
+
function getFormattedTextOfNode(nodeIn, targetSourceFile, sourceFile, pos, { indentation, prefix, delta }, newLineCharacter, formatContext, validate4) {
|
|
198524
197164
|
const { node, text } = getNonformattedText(nodeIn, targetSourceFile, newLineCharacter);
|
|
198525
|
-
if (
|
|
198526
|
-
|
|
197165
|
+
if (validate4)
|
|
197166
|
+
validate4(node, text);
|
|
198527
197167
|
const formatOptions = getFormatCodeSettingsForWriting(formatContext, targetSourceFile);
|
|
198528
197168
|
const initialIndentation = indentation !== undefined ? indentation : ts_formatting_exports.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, prefix === newLineCharacter || getLineStartPositionForPosition(pos, targetSourceFile) === pos);
|
|
198529
197169
|
if (delta === undefined) {
|
|
@@ -224362,7 +223002,7 @@ function compose(e11) {
|
|
|
224362
223002
|
}
|
|
224363
223003
|
if (t10) {
|
|
224364
223004
|
return cmd(Se.PrevLine, t10) + cmd(Se.DeleteLines, t10 + 1);
|
|
224365
|
-
} else if (
|
|
223005
|
+
} else if (stripAnsi2(e14)) {
|
|
224366
223006
|
return cmd(Se.EraseLine, be.Backward) + cmd(Se.ToColumn, 1);
|
|
224367
223007
|
} else {
|
|
224368
223008
|
return "";
|
|
@@ -226320,7 +224960,7 @@ var import_graphql10, import_typescript5, __dirname = "/home/runner/work/sdk/sdk
|
|
|
226320
224960
|
t9 = e11[r8](t9);
|
|
226321
224961
|
}
|
|
226322
224962
|
return t9;
|
|
226323
|
-
}, we = false, Se, be, Be, xe, $e, Ae = "\x1B[", Oe,
|
|
224963
|
+
}, we = false, Se, be, Be, xe, $e, Ae = "\x1B[", Oe, stripAnsi2 = (e11) => e11.replace(Oe, ""), CLIError, ke, Te, Ie, Ne, Pe, Me, toCommandValue = (e11) => typeof e11 == "string" || e11 == null ? e11 ? "" + e11 : "" : JSON.stringify(e11), escapeData = (e11) => toCommandValue(e11).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"), escapeProperty = (e11) => toCommandValue(e11).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"), directoryExists = async (e11) => {
|
|
226324
224964
|
try {
|
|
226325
224965
|
var t9 = await d5.stat(e11);
|
|
226326
224966
|
if (t9.isDirectory()) {
|
|
@@ -228886,7 +227526,7 @@ ${whileRunning(e11)}`;
|
|
|
228886
227526
|
Oe = /([\x1B\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><])/g;
|
|
228887
227527
|
CLIError = class CLIError extends Error {
|
|
228888
227528
|
constructor(e11, t9) {
|
|
228889
|
-
super(
|
|
227529
|
+
super(stripAnsi2(e11));
|
|
228890
227530
|
this.output = e11;
|
|
228891
227531
|
this.exit = t9 != null ? t9 : 1;
|
|
228892
227532
|
}
|
|
@@ -230865,8 +229505,8 @@ var init_errors = __esm(() => {
|
|
|
230865
229505
|
});
|
|
230866
229506
|
|
|
230867
229507
|
// ../../node_modules/.bun/abitype@1.1.0+0c447f3ab58cb56e/node_modules/abitype/dist/esm/regex.js
|
|
230868
|
-
function execTyped(
|
|
230869
|
-
const match2 =
|
|
229508
|
+
function execTyped(regex2, string4) {
|
|
229509
|
+
const match2 = regex2.exec(string4);
|
|
230870
229510
|
return match2?.groups;
|
|
230871
229511
|
}
|
|
230872
229512
|
var bytesRegex, integerRegex, isTupleRegex;
|
|
@@ -238211,7 +236851,7 @@ function trimLeft(value4) {
|
|
|
238211
236851
|
function trimRight(value4) {
|
|
238212
236852
|
return trim2(value4, { dir: "right" });
|
|
238213
236853
|
}
|
|
238214
|
-
function
|
|
236854
|
+
function validate4(value4) {
|
|
238215
236855
|
try {
|
|
238216
236856
|
assert2(value4);
|
|
238217
236857
|
return true;
|
|
@@ -238405,7 +237045,7 @@ function toNumber(hex3, options = {}) {
|
|
|
238405
237045
|
return Number(hex3);
|
|
238406
237046
|
return Number(toBigInt(hex3, options));
|
|
238407
237047
|
}
|
|
238408
|
-
function
|
|
237048
|
+
function validate5(value4, options = {}) {
|
|
238409
237049
|
const { strict = false } = options;
|
|
238410
237050
|
try {
|
|
238411
237051
|
assert3(value4, { strict });
|
|
@@ -238999,7 +237639,7 @@ function withResolvers() {
|
|
|
238999
237639
|
|
|
239000
237640
|
// ../../node_modules/.bun/viem@2.39.3+0c447f3ab58cb56e/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
|
|
239001
237641
|
function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
239002
|
-
const
|
|
237642
|
+
const exec2 = async () => {
|
|
239003
237643
|
const scheduler = getScheduler();
|
|
239004
237644
|
flush();
|
|
239005
237645
|
const args = scheduler.map(({ args: args2 }) => args2);
|
|
@@ -239029,14 +237669,14 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
|
239029
237669
|
const { promise: promise2, resolve: resolve7, reject } = withResolvers();
|
|
239030
237670
|
const split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);
|
|
239031
237671
|
if (split3)
|
|
239032
|
-
|
|
237672
|
+
exec2();
|
|
239033
237673
|
const hasActiveScheduler = getScheduler().length > 0;
|
|
239034
237674
|
if (hasActiveScheduler) {
|
|
239035
237675
|
setScheduler({ args, resolve: resolve7, reject });
|
|
239036
237676
|
return promise2;
|
|
239037
237677
|
}
|
|
239038
237678
|
setScheduler({ args, resolve: resolve7, reject });
|
|
239039
|
-
setTimeout(
|
|
237679
|
+
setTimeout(exec2, wait);
|
|
239040
237680
|
return promise2;
|
|
239041
237681
|
}
|
|
239042
237682
|
};
|
|
@@ -246484,14 +245124,14 @@ var {
|
|
|
246484
245124
|
Help
|
|
246485
245125
|
} = import__.default;
|
|
246486
245126
|
|
|
246487
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245127
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/key.js
|
|
246488
245128
|
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
246489
245129
|
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
246490
245130
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
246491
245131
|
var isTabKey = (key) => key.name === "tab";
|
|
246492
245132
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
246493
245133
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
246494
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245134
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/errors.js
|
|
246495
245135
|
class AbortPromptError extends Error {
|
|
246496
245136
|
name = "AbortPromptError";
|
|
246497
245137
|
message = "Prompt was aborted";
|
|
@@ -246517,10 +245157,10 @@ class HookError extends Error {
|
|
|
246517
245157
|
class ValidationError extends Error {
|
|
246518
245158
|
name = "ValidationError";
|
|
246519
245159
|
}
|
|
246520
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245160
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
246521
245161
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
246522
245162
|
|
|
246523
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245163
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
246524
245164
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
246525
245165
|
var hookStorage = new AsyncLocalStorage;
|
|
246526
245166
|
function createStore(rl) {
|
|
@@ -246625,7 +245265,7 @@ var effectScheduler = {
|
|
|
246625
245265
|
}
|
|
246626
245266
|
};
|
|
246627
245267
|
|
|
246628
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245268
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
246629
245269
|
function useState(defaultValue) {
|
|
246630
245270
|
return withPointer((pointer) => {
|
|
246631
245271
|
const setState = AsyncResource2.bind(function setState(newValue) {
|
|
@@ -246643,7 +245283,7 @@ function useState(defaultValue) {
|
|
|
246643
245283
|
});
|
|
246644
245284
|
}
|
|
246645
245285
|
|
|
246646
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245286
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
246647
245287
|
function useEffect(cb, depArray) {
|
|
246648
245288
|
withPointer((pointer) => {
|
|
246649
245289
|
const oldDeps = pointer.get();
|
|
@@ -246655,10 +245295,10 @@ function useEffect(cb, depArray) {
|
|
|
246655
245295
|
});
|
|
246656
245296
|
}
|
|
246657
245297
|
|
|
246658
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246659
|
-
|
|
245298
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/theme.js
|
|
245299
|
+
import { styleText } from "node:util";
|
|
246660
245300
|
|
|
246661
|
-
// ../../node_modules/.bun/@inquirer+figures@
|
|
245301
|
+
// ../../node_modules/.bun/@inquirer+figures@2.0.1/node_modules/@inquirer/figures/dist/index.js
|
|
246662
245302
|
import process2 from "node:process";
|
|
246663
245303
|
function isUnicodeSupported() {
|
|
246664
245304
|
if (process2.platform !== "win32") {
|
|
@@ -246944,31 +245584,31 @@ var fallbackSymbols = {
|
|
|
246944
245584
|
};
|
|
246945
245585
|
var shouldUseMain = isUnicodeSupported();
|
|
246946
245586
|
var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
246947
|
-
var
|
|
245587
|
+
var dist_default = figures;
|
|
246948
245588
|
var replacements = Object.entries(specialMainSymbols);
|
|
246949
245589
|
|
|
246950
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245590
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/theme.js
|
|
246951
245591
|
var defaultTheme = {
|
|
246952
245592
|
prefix: {
|
|
246953
|
-
idle:
|
|
246954
|
-
done:
|
|
245593
|
+
idle: styleText("blue", "?"),
|
|
245594
|
+
done: styleText("green", dist_default.tick)
|
|
246955
245595
|
},
|
|
246956
245596
|
spinner: {
|
|
246957
245597
|
interval: 80,
|
|
246958
|
-
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) =>
|
|
245598
|
+
frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"].map((frame) => styleText("yellow", frame))
|
|
246959
245599
|
},
|
|
246960
245600
|
style: {
|
|
246961
|
-
answer:
|
|
246962
|
-
message:
|
|
246963
|
-
error: (text) =>
|
|
246964
|
-
defaultAnswer: (text) =>
|
|
246965
|
-
help:
|
|
246966
|
-
highlight:
|
|
246967
|
-
key: (text) =>
|
|
245601
|
+
answer: (text) => styleText("cyan", text),
|
|
245602
|
+
message: (text) => styleText("bold", text),
|
|
245603
|
+
error: (text) => styleText("red", `> ${text}`),
|
|
245604
|
+
defaultAnswer: (text) => styleText("dim", `(${text})`),
|
|
245605
|
+
help: (text) => styleText("dim", text),
|
|
245606
|
+
highlight: (text) => styleText("cyan", text),
|
|
245607
|
+
key: (text) => styleText("cyan", styleText("bold", `<${text}>`))
|
|
246968
245608
|
}
|
|
246969
245609
|
};
|
|
246970
245610
|
|
|
246971
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245611
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
246972
245612
|
function isPlainObject(value) {
|
|
246973
245613
|
if (typeof value !== "object" || value === null)
|
|
246974
245614
|
return false;
|
|
@@ -246996,7 +245636,7 @@ function makeTheme(...themes) {
|
|
|
246996
245636
|
return deepMerge(...themesToMerge);
|
|
246997
245637
|
}
|
|
246998
245638
|
|
|
246999
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245639
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
247000
245640
|
function usePrefix({ status = "idle", theme }) {
|
|
247001
245641
|
const [showLoader, setShowLoader] = useState(false);
|
|
247002
245642
|
const [tick, setTick] = useState(0);
|
|
@@ -247026,7 +245666,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
247026
245666
|
const iconName = status === "loading" ? "idle" : status;
|
|
247027
245667
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
247028
245668
|
}
|
|
247029
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245669
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
247030
245670
|
function useMemo(fn, dependencies) {
|
|
247031
245671
|
return withPointer((pointer) => {
|
|
247032
245672
|
const prev = pointer.get();
|
|
@@ -247038,11 +245678,11 @@ function useMemo(fn, dependencies) {
|
|
|
247038
245678
|
return prev.value;
|
|
247039
245679
|
});
|
|
247040
245680
|
}
|
|
247041
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245681
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
247042
245682
|
function useRef(val) {
|
|
247043
245683
|
return useState({ current: val })[0];
|
|
247044
245684
|
}
|
|
247045
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245685
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
247046
245686
|
function useKeypress(userHandler) {
|
|
247047
245687
|
const signal = useRef(userHandler);
|
|
247048
245688
|
signal.current = userHandler;
|
|
@@ -247060,12 +245700,444 @@ function useKeypress(userHandler) {
|
|
|
247060
245700
|
};
|
|
247061
245701
|
}, []);
|
|
247062
245702
|
}
|
|
247063
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
245703
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/utils.js
|
|
247064
245704
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
247065
|
-
|
|
245705
|
+
|
|
245706
|
+
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
245707
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
245708
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
245709
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
245710
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
245711
|
+
const pattern = `${osc}|${csi}`;
|
|
245712
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
245713
|
+
}
|
|
245714
|
+
|
|
245715
|
+
// ../../node_modules/.bun/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
245716
|
+
var regex = ansiRegex();
|
|
245717
|
+
function stripAnsi(string) {
|
|
245718
|
+
if (typeof string !== "string") {
|
|
245719
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
245720
|
+
}
|
|
245721
|
+
return string.replace(regex, "");
|
|
245722
|
+
}
|
|
245723
|
+
|
|
245724
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
245725
|
+
function isAmbiguous(x) {
|
|
245726
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
245727
|
+
}
|
|
245728
|
+
function isFullWidth(x) {
|
|
245729
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
245730
|
+
}
|
|
245731
|
+
function isWide(x) {
|
|
245732
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
245733
|
+
}
|
|
245734
|
+
|
|
245735
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
245736
|
+
function validate(codePoint) {
|
|
245737
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
245738
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
245739
|
+
}
|
|
245740
|
+
}
|
|
245741
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
245742
|
+
validate(codePoint);
|
|
245743
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
245744
|
+
return 2;
|
|
245745
|
+
}
|
|
245746
|
+
return 1;
|
|
245747
|
+
}
|
|
245748
|
+
|
|
245749
|
+
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
245750
|
+
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
245751
|
+
var segmenter = new Intl.Segmenter;
|
|
245752
|
+
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
245753
|
+
function stringWidth(string, options = {}) {
|
|
245754
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
245755
|
+
return 0;
|
|
245756
|
+
}
|
|
245757
|
+
const {
|
|
245758
|
+
ambiguousIsNarrow = true,
|
|
245759
|
+
countAnsiEscapeCodes = false
|
|
245760
|
+
} = options;
|
|
245761
|
+
if (!countAnsiEscapeCodes) {
|
|
245762
|
+
string = stripAnsi(string);
|
|
245763
|
+
}
|
|
245764
|
+
if (string.length === 0) {
|
|
245765
|
+
return 0;
|
|
245766
|
+
}
|
|
245767
|
+
let width = 0;
|
|
245768
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
245769
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
245770
|
+
const codePoint = character.codePointAt(0);
|
|
245771
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
245772
|
+
continue;
|
|
245773
|
+
}
|
|
245774
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
245775
|
+
continue;
|
|
245776
|
+
}
|
|
245777
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
245778
|
+
continue;
|
|
245779
|
+
}
|
|
245780
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
245781
|
+
continue;
|
|
245782
|
+
}
|
|
245783
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
245784
|
+
continue;
|
|
245785
|
+
}
|
|
245786
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
245787
|
+
continue;
|
|
245788
|
+
}
|
|
245789
|
+
if (import_emoji_regex.default().test(character)) {
|
|
245790
|
+
width += 2;
|
|
245791
|
+
continue;
|
|
245792
|
+
}
|
|
245793
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
245794
|
+
}
|
|
245795
|
+
return width;
|
|
245796
|
+
}
|
|
245797
|
+
|
|
245798
|
+
// ../../node_modules/.bun/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
245799
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
245800
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
245801
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
245802
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
245803
|
+
var styles = {
|
|
245804
|
+
modifier: {
|
|
245805
|
+
reset: [0, 0],
|
|
245806
|
+
bold: [1, 22],
|
|
245807
|
+
dim: [2, 22],
|
|
245808
|
+
italic: [3, 23],
|
|
245809
|
+
underline: [4, 24],
|
|
245810
|
+
overline: [53, 55],
|
|
245811
|
+
inverse: [7, 27],
|
|
245812
|
+
hidden: [8, 28],
|
|
245813
|
+
strikethrough: [9, 29]
|
|
245814
|
+
},
|
|
245815
|
+
color: {
|
|
245816
|
+
black: [30, 39],
|
|
245817
|
+
red: [31, 39],
|
|
245818
|
+
green: [32, 39],
|
|
245819
|
+
yellow: [33, 39],
|
|
245820
|
+
blue: [34, 39],
|
|
245821
|
+
magenta: [35, 39],
|
|
245822
|
+
cyan: [36, 39],
|
|
245823
|
+
white: [37, 39],
|
|
245824
|
+
blackBright: [90, 39],
|
|
245825
|
+
gray: [90, 39],
|
|
245826
|
+
grey: [90, 39],
|
|
245827
|
+
redBright: [91, 39],
|
|
245828
|
+
greenBright: [92, 39],
|
|
245829
|
+
yellowBright: [93, 39],
|
|
245830
|
+
blueBright: [94, 39],
|
|
245831
|
+
magentaBright: [95, 39],
|
|
245832
|
+
cyanBright: [96, 39],
|
|
245833
|
+
whiteBright: [97, 39]
|
|
245834
|
+
},
|
|
245835
|
+
bgColor: {
|
|
245836
|
+
bgBlack: [40, 49],
|
|
245837
|
+
bgRed: [41, 49],
|
|
245838
|
+
bgGreen: [42, 49],
|
|
245839
|
+
bgYellow: [43, 49],
|
|
245840
|
+
bgBlue: [44, 49],
|
|
245841
|
+
bgMagenta: [45, 49],
|
|
245842
|
+
bgCyan: [46, 49],
|
|
245843
|
+
bgWhite: [47, 49],
|
|
245844
|
+
bgBlackBright: [100, 49],
|
|
245845
|
+
bgGray: [100, 49],
|
|
245846
|
+
bgGrey: [100, 49],
|
|
245847
|
+
bgRedBright: [101, 49],
|
|
245848
|
+
bgGreenBright: [102, 49],
|
|
245849
|
+
bgYellowBright: [103, 49],
|
|
245850
|
+
bgBlueBright: [104, 49],
|
|
245851
|
+
bgMagentaBright: [105, 49],
|
|
245852
|
+
bgCyanBright: [106, 49],
|
|
245853
|
+
bgWhiteBright: [107, 49]
|
|
245854
|
+
}
|
|
245855
|
+
};
|
|
245856
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
245857
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
245858
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
245859
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
245860
|
+
function assembleStyles() {
|
|
245861
|
+
const codes = new Map;
|
|
245862
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
245863
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
245864
|
+
styles[styleName] = {
|
|
245865
|
+
open: `\x1B[${style[0]}m`,
|
|
245866
|
+
close: `\x1B[${style[1]}m`
|
|
245867
|
+
};
|
|
245868
|
+
group[styleName] = styles[styleName];
|
|
245869
|
+
codes.set(style[0], style[1]);
|
|
245870
|
+
}
|
|
245871
|
+
Object.defineProperty(styles, groupName, {
|
|
245872
|
+
value: group,
|
|
245873
|
+
enumerable: false
|
|
245874
|
+
});
|
|
245875
|
+
}
|
|
245876
|
+
Object.defineProperty(styles, "codes", {
|
|
245877
|
+
value: codes,
|
|
245878
|
+
enumerable: false
|
|
245879
|
+
});
|
|
245880
|
+
styles.color.close = "\x1B[39m";
|
|
245881
|
+
styles.bgColor.close = "\x1B[49m";
|
|
245882
|
+
styles.color.ansi = wrapAnsi16();
|
|
245883
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
245884
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
245885
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
245886
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
245887
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
245888
|
+
Object.defineProperties(styles, {
|
|
245889
|
+
rgbToAnsi256: {
|
|
245890
|
+
value(red, green, blue) {
|
|
245891
|
+
if (red === green && green === blue) {
|
|
245892
|
+
if (red < 8) {
|
|
245893
|
+
return 16;
|
|
245894
|
+
}
|
|
245895
|
+
if (red > 248) {
|
|
245896
|
+
return 231;
|
|
245897
|
+
}
|
|
245898
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
245899
|
+
}
|
|
245900
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
245901
|
+
},
|
|
245902
|
+
enumerable: false
|
|
245903
|
+
},
|
|
245904
|
+
hexToRgb: {
|
|
245905
|
+
value(hex) {
|
|
245906
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
245907
|
+
if (!matches) {
|
|
245908
|
+
return [0, 0, 0];
|
|
245909
|
+
}
|
|
245910
|
+
let [colorString] = matches;
|
|
245911
|
+
if (colorString.length === 3) {
|
|
245912
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
245913
|
+
}
|
|
245914
|
+
const integer = Number.parseInt(colorString, 16);
|
|
245915
|
+
return [
|
|
245916
|
+
integer >> 16 & 255,
|
|
245917
|
+
integer >> 8 & 255,
|
|
245918
|
+
integer & 255
|
|
245919
|
+
];
|
|
245920
|
+
},
|
|
245921
|
+
enumerable: false
|
|
245922
|
+
},
|
|
245923
|
+
hexToAnsi256: {
|
|
245924
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
245925
|
+
enumerable: false
|
|
245926
|
+
},
|
|
245927
|
+
ansi256ToAnsi: {
|
|
245928
|
+
value(code) {
|
|
245929
|
+
if (code < 8) {
|
|
245930
|
+
return 30 + code;
|
|
245931
|
+
}
|
|
245932
|
+
if (code < 16) {
|
|
245933
|
+
return 90 + (code - 8);
|
|
245934
|
+
}
|
|
245935
|
+
let red;
|
|
245936
|
+
let green;
|
|
245937
|
+
let blue;
|
|
245938
|
+
if (code >= 232) {
|
|
245939
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
245940
|
+
green = red;
|
|
245941
|
+
blue = red;
|
|
245942
|
+
} else {
|
|
245943
|
+
code -= 16;
|
|
245944
|
+
const remainder = code % 36;
|
|
245945
|
+
red = Math.floor(code / 36) / 5;
|
|
245946
|
+
green = Math.floor(remainder / 6) / 5;
|
|
245947
|
+
blue = remainder % 6 / 5;
|
|
245948
|
+
}
|
|
245949
|
+
const value = Math.max(red, green, blue) * 2;
|
|
245950
|
+
if (value === 0) {
|
|
245951
|
+
return 30;
|
|
245952
|
+
}
|
|
245953
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
245954
|
+
if (value === 2) {
|
|
245955
|
+
result += 60;
|
|
245956
|
+
}
|
|
245957
|
+
return result;
|
|
245958
|
+
},
|
|
245959
|
+
enumerable: false
|
|
245960
|
+
},
|
|
245961
|
+
rgbToAnsi: {
|
|
245962
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
245963
|
+
enumerable: false
|
|
245964
|
+
},
|
|
245965
|
+
hexToAnsi: {
|
|
245966
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
245967
|
+
enumerable: false
|
|
245968
|
+
}
|
|
245969
|
+
});
|
|
245970
|
+
return styles;
|
|
245971
|
+
}
|
|
245972
|
+
var ansiStyles = assembleStyles();
|
|
245973
|
+
var ansi_styles_default = ansiStyles;
|
|
245974
|
+
|
|
245975
|
+
// ../../node_modules/.bun/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
245976
|
+
var ESCAPES = new Set([
|
|
245977
|
+
"\x1B",
|
|
245978
|
+
""
|
|
245979
|
+
]);
|
|
245980
|
+
var END_CODE = 39;
|
|
245981
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
245982
|
+
var ANSI_CSI = "[";
|
|
245983
|
+
var ANSI_OSC = "]";
|
|
245984
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
245985
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
245986
|
+
var wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
245987
|
+
var wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
245988
|
+
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
245989
|
+
var wrapWord = (rows, word, columns) => {
|
|
245990
|
+
const characters = [...word];
|
|
245991
|
+
let isInsideEscape = false;
|
|
245992
|
+
let isInsideLinkEscape = false;
|
|
245993
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
245994
|
+
for (const [index, character] of characters.entries()) {
|
|
245995
|
+
const characterLength = stringWidth(character);
|
|
245996
|
+
if (visible + characterLength <= columns) {
|
|
245997
|
+
rows[rows.length - 1] += character;
|
|
245998
|
+
} else {
|
|
245999
|
+
rows.push(character);
|
|
246000
|
+
visible = 0;
|
|
246001
|
+
}
|
|
246002
|
+
if (ESCAPES.has(character)) {
|
|
246003
|
+
isInsideEscape = true;
|
|
246004
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
246005
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
246006
|
+
}
|
|
246007
|
+
if (isInsideEscape) {
|
|
246008
|
+
if (isInsideLinkEscape) {
|
|
246009
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
246010
|
+
isInsideEscape = false;
|
|
246011
|
+
isInsideLinkEscape = false;
|
|
246012
|
+
}
|
|
246013
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
246014
|
+
isInsideEscape = false;
|
|
246015
|
+
}
|
|
246016
|
+
continue;
|
|
246017
|
+
}
|
|
246018
|
+
visible += characterLength;
|
|
246019
|
+
if (visible === columns && index < characters.length - 1) {
|
|
246020
|
+
rows.push("");
|
|
246021
|
+
visible = 0;
|
|
246022
|
+
}
|
|
246023
|
+
}
|
|
246024
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
246025
|
+
rows[rows.length - 2] += rows.pop();
|
|
246026
|
+
}
|
|
246027
|
+
};
|
|
246028
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
246029
|
+
const words = string.split(" ");
|
|
246030
|
+
let last = words.length;
|
|
246031
|
+
while (last > 0) {
|
|
246032
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
246033
|
+
break;
|
|
246034
|
+
}
|
|
246035
|
+
last--;
|
|
246036
|
+
}
|
|
246037
|
+
if (last === words.length) {
|
|
246038
|
+
return string;
|
|
246039
|
+
}
|
|
246040
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
246041
|
+
};
|
|
246042
|
+
var exec = (string, columns, options = {}) => {
|
|
246043
|
+
if (options.trim !== false && string.trim() === "") {
|
|
246044
|
+
return "";
|
|
246045
|
+
}
|
|
246046
|
+
let returnValue = "";
|
|
246047
|
+
let escapeCode;
|
|
246048
|
+
let escapeUrl;
|
|
246049
|
+
const lengths = wordLengths(string);
|
|
246050
|
+
let rows = [""];
|
|
246051
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
246052
|
+
if (options.trim !== false) {
|
|
246053
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
246054
|
+
}
|
|
246055
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
246056
|
+
if (index !== 0) {
|
|
246057
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
246058
|
+
rows.push("");
|
|
246059
|
+
rowLength = 0;
|
|
246060
|
+
}
|
|
246061
|
+
if (rowLength > 0 || options.trim === false) {
|
|
246062
|
+
rows[rows.length - 1] += " ";
|
|
246063
|
+
rowLength++;
|
|
246064
|
+
}
|
|
246065
|
+
}
|
|
246066
|
+
if (options.hard && lengths[index] > columns) {
|
|
246067
|
+
const remainingColumns = columns - rowLength;
|
|
246068
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
246069
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
246070
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
246071
|
+
rows.push("");
|
|
246072
|
+
}
|
|
246073
|
+
wrapWord(rows, word, columns);
|
|
246074
|
+
continue;
|
|
246075
|
+
}
|
|
246076
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
246077
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
246078
|
+
wrapWord(rows, word, columns);
|
|
246079
|
+
continue;
|
|
246080
|
+
}
|
|
246081
|
+
rows.push("");
|
|
246082
|
+
}
|
|
246083
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
246084
|
+
wrapWord(rows, word, columns);
|
|
246085
|
+
continue;
|
|
246086
|
+
}
|
|
246087
|
+
rows[rows.length - 1] += word;
|
|
246088
|
+
}
|
|
246089
|
+
if (options.trim !== false) {
|
|
246090
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
246091
|
+
}
|
|
246092
|
+
const preString = rows.join(`
|
|
246093
|
+
`);
|
|
246094
|
+
const pre = [...preString];
|
|
246095
|
+
let preStringIndex = 0;
|
|
246096
|
+
for (const [index, character] of pre.entries()) {
|
|
246097
|
+
returnValue += character;
|
|
246098
|
+
if (ESCAPES.has(character)) {
|
|
246099
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
246100
|
+
if (groups.code !== undefined) {
|
|
246101
|
+
const code2 = Number.parseFloat(groups.code);
|
|
246102
|
+
escapeCode = code2 === END_CODE ? undefined : code2;
|
|
246103
|
+
} else if (groups.uri !== undefined) {
|
|
246104
|
+
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
246105
|
+
}
|
|
246106
|
+
}
|
|
246107
|
+
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
246108
|
+
if (pre[index + 1] === `
|
|
246109
|
+
`) {
|
|
246110
|
+
if (escapeUrl) {
|
|
246111
|
+
returnValue += wrapAnsiHyperlink("");
|
|
246112
|
+
}
|
|
246113
|
+
if (escapeCode && code) {
|
|
246114
|
+
returnValue += wrapAnsiCode(code);
|
|
246115
|
+
}
|
|
246116
|
+
} else if (character === `
|
|
246117
|
+
`) {
|
|
246118
|
+
if (escapeCode && code) {
|
|
246119
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
246120
|
+
}
|
|
246121
|
+
if (escapeUrl) {
|
|
246122
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
246123
|
+
}
|
|
246124
|
+
}
|
|
246125
|
+
preStringIndex += character.length;
|
|
246126
|
+
}
|
|
246127
|
+
return returnValue;
|
|
246128
|
+
};
|
|
246129
|
+
function wrapAnsi(string, columns, options) {
|
|
246130
|
+
return String(string).normalize().replaceAll(`\r
|
|
246131
|
+
`, `
|
|
246132
|
+
`).split(`
|
|
246133
|
+
`).map((line) => exec(line, columns, options)).join(`
|
|
246134
|
+
`);
|
|
246135
|
+
}
|
|
246136
|
+
|
|
246137
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/utils.js
|
|
247066
246138
|
function breakLines(content, width) {
|
|
247067
246139
|
return content.split(`
|
|
247068
|
-
`).flatMap((line) =>
|
|
246140
|
+
`).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
|
|
247069
246141
|
`).map((str) => str.trimEnd())).join(`
|
|
247070
246142
|
`);
|
|
247071
246143
|
}
|
|
@@ -247073,7 +246145,7 @@ function readlineWidth() {
|
|
|
247073
246145
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
247074
246146
|
}
|
|
247075
246147
|
|
|
247076
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246148
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
247077
246149
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
247078
246150
|
const state = useRef({
|
|
247079
246151
|
lastPointer: active,
|
|
@@ -247139,7 +246211,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
247139
246211
|
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
247140
246212
|
`);
|
|
247141
246213
|
}
|
|
247142
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246214
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
247143
246215
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
247144
246216
|
import * as readline2 from "node:readline";
|
|
247145
246217
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -247352,10 +246424,10 @@ var {
|
|
|
247352
246424
|
unload
|
|
247353
246425
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
247354
246426
|
|
|
247355
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246427
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
247356
246428
|
import { stripVTControlCharacters } from "node:util";
|
|
247357
246429
|
|
|
247358
|
-
// ../../node_modules/.bun/@inquirer+ansi@
|
|
246430
|
+
// ../../node_modules/.bun/@inquirer+ansi@2.0.1/node_modules/@inquirer/ansi/dist/index.js
|
|
247359
246431
|
var ESC = "\x1B[";
|
|
247360
246432
|
var cursorLeft = ESC + "G";
|
|
247361
246433
|
var cursorHide = ESC + "?25l";
|
|
@@ -247371,7 +246443,7 @@ var cursorTo = (x, y) => {
|
|
|
247371
246443
|
var eraseLine = ESC + "2K";
|
|
247372
246444
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
247373
246445
|
|
|
247374
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246446
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
247375
246447
|
var height = (content) => content.split(`
|
|
247376
246448
|
`).length;
|
|
247377
246449
|
var lastLine = (content) => content.split(`
|
|
@@ -247436,7 +246508,7 @@ class ScreenManager {
|
|
|
247436
246508
|
}
|
|
247437
246509
|
}
|
|
247438
246510
|
|
|
247439
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246511
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
247440
246512
|
class PromisePolyfill extends Promise {
|
|
247441
246513
|
static withResolver() {
|
|
247442
246514
|
let resolve;
|
|
@@ -247449,7 +246521,7 @@ class PromisePolyfill extends Promise {
|
|
|
247449
246521
|
}
|
|
247450
246522
|
}
|
|
247451
246523
|
|
|
247452
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
246524
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
247453
246525
|
function getCallSites() {
|
|
247454
246526
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
247455
246527
|
let result = [];
|
|
@@ -247535,10 +246607,10 @@ function createPrompt(view) {
|
|
|
247535
246607
|
};
|
|
247536
246608
|
return prompt;
|
|
247537
246609
|
}
|
|
247538
|
-
// ../../node_modules/.bun/@inquirer+core@
|
|
247539
|
-
|
|
246610
|
+
// ../../node_modules/.bun/@inquirer+core@11.0.1+4cbbb20073436eb8/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
246611
|
+
import { styleText as styleText2 } from "node:util";
|
|
247540
246612
|
class Separator {
|
|
247541
|
-
separator =
|
|
246613
|
+
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
247542
246614
|
type = "separator";
|
|
247543
246615
|
constructor(separator) {
|
|
247544
246616
|
if (separator) {
|
|
@@ -249624,8 +248696,8 @@ var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][
|
|
|
249624
248696
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
249625
248697
|
function timeSource(args) {
|
|
249626
248698
|
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
249627
|
-
const
|
|
249628
|
-
return
|
|
248699
|
+
const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
248700
|
+
return regex2;
|
|
249629
248701
|
}
|
|
249630
248702
|
function time(args) {
|
|
249631
248703
|
return new RegExp(`^${timeSource(args)}$`);
|
|
@@ -249641,8 +248713,8 @@ function datetime(args) {
|
|
|
249641
248713
|
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
249642
248714
|
}
|
|
249643
248715
|
var string = (params) => {
|
|
249644
|
-
const
|
|
249645
|
-
return new RegExp(`^${
|
|
248716
|
+
const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
248717
|
+
return new RegExp(`^${regex2}$`);
|
|
249646
248718
|
};
|
|
249647
248719
|
var bigint = /^-?\d+n?$/;
|
|
249648
248720
|
var integer = /^-?\d+$/;
|
|
@@ -258708,9 +257780,9 @@ class JSONSchemaGenerator {
|
|
|
258708
257780
|
json.pattern = regexes[0].source;
|
|
258709
257781
|
else if (regexes.length > 1) {
|
|
258710
257782
|
result.schema.allOf = [
|
|
258711
|
-
...regexes.map((
|
|
257783
|
+
...regexes.map((regex2) => ({
|
|
258712
257784
|
...this.target === "draft-7" || this.target === "draft-4" || this.target === "openapi-3.0" ? { type: "string" } : {},
|
|
258713
|
-
pattern:
|
|
257785
|
+
pattern: regex2.source
|
|
258714
257786
|
}))
|
|
258715
257787
|
];
|
|
258716
257788
|
}
|
|
@@ -259831,10 +258903,10 @@ function hex2(_params) {
|
|
|
259831
258903
|
function hash(alg, params) {
|
|
259832
258904
|
const enc = params?.enc ?? "hex";
|
|
259833
258905
|
const format2 = `${alg}_${enc}`;
|
|
259834
|
-
const
|
|
259835
|
-
if (!
|
|
258906
|
+
const regex2 = exports_regexes[format2];
|
|
258907
|
+
if (!regex2)
|
|
259836
258908
|
throw new Error(`Unrecognized hash format: ${format2}`);
|
|
259837
|
-
return _stringFormat(ZodCustomStringFormat, format2,
|
|
258909
|
+
return _stringFormat(ZodCustomStringFormat, format2, regex2, params);
|
|
259838
258910
|
}
|
|
259839
258911
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
259840
258912
|
$ZodNumber.init(inst, def);
|
|
@@ -262230,7 +261302,7 @@ minimatch.Minimatch = Minimatch;
|
|
|
262230
261302
|
minimatch.escape = escape2;
|
|
262231
261303
|
minimatch.unescape = unescape2;
|
|
262232
261304
|
|
|
262233
|
-
// ../../node_modules/.bun/glob@
|
|
261305
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/glob.js
|
|
262234
261306
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
262235
261307
|
|
|
262236
261308
|
// ../../node_modules/.bun/lru-cache@11.2.2/node_modules/lru-cache/dist/esm/index.js
|
|
@@ -265335,7 +264407,7 @@ class PathScurryDarwin extends PathScurryPosix {
|
|
|
265335
264407
|
var Path = process.platform === "win32" ? PathWin32 : PathPosix;
|
|
265336
264408
|
var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
|
|
265337
264409
|
|
|
265338
|
-
// ../../node_modules/.bun/glob@
|
|
264410
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/pattern.js
|
|
265339
264411
|
var isPatternList = (pl) => pl.length >= 1;
|
|
265340
264412
|
var isGlobList = (gl) => gl.length >= 1;
|
|
265341
264413
|
|
|
@@ -265453,7 +264525,7 @@ class Pattern {
|
|
|
265453
264525
|
}
|
|
265454
264526
|
}
|
|
265455
264527
|
|
|
265456
|
-
// ../../node_modules/.bun/glob@
|
|
264528
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/ignore.js
|
|
265457
264529
|
var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
265458
264530
|
|
|
265459
264531
|
class Ignore {
|
|
@@ -265541,7 +264613,7 @@ class Ignore {
|
|
|
265541
264613
|
}
|
|
265542
264614
|
}
|
|
265543
264615
|
|
|
265544
|
-
// ../../node_modules/.bun/glob@
|
|
264616
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/processor.js
|
|
265545
264617
|
class HasWalkedCache {
|
|
265546
264618
|
store;
|
|
265547
264619
|
constructor(store = new Map) {
|
|
@@ -265759,7 +264831,7 @@ class Processor {
|
|
|
265759
264831
|
}
|
|
265760
264832
|
}
|
|
265761
264833
|
|
|
265762
|
-
// ../../node_modules/.bun/glob@
|
|
264834
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/walker.js
|
|
265763
264835
|
var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
|
|
265764
264836
|
|
|
265765
264837
|
class GlobUtil {
|
|
@@ -266086,7 +265158,7 @@ class GlobStream extends GlobUtil {
|
|
|
266086
265158
|
}
|
|
266087
265159
|
}
|
|
266088
265160
|
|
|
266089
|
-
// ../../node_modules/.bun/glob@
|
|
265161
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/glob.js
|
|
266090
265162
|
var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
266091
265163
|
|
|
266092
265164
|
class Glob {
|
|
@@ -266260,7 +265332,7 @@ class Glob {
|
|
|
266260
265332
|
}
|
|
266261
265333
|
}
|
|
266262
265334
|
|
|
266263
|
-
// ../../node_modules/.bun/glob@
|
|
265335
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/has-magic.js
|
|
266264
265336
|
var hasMagic = (pattern, options = {}) => {
|
|
266265
265337
|
if (!Array.isArray(pattern)) {
|
|
266266
265338
|
pattern = [pattern];
|
|
@@ -266272,7 +265344,7 @@ var hasMagic = (pattern, options = {}) => {
|
|
|
266272
265344
|
return false;
|
|
266273
265345
|
};
|
|
266274
265346
|
|
|
266275
|
-
// ../../node_modules/.bun/glob@
|
|
265347
|
+
// ../../node_modules/.bun/glob@12.0.0/node_modules/glob/dist/esm/index.js
|
|
266276
265348
|
function globStreamSync(pattern, options = {}) {
|
|
266277
265349
|
return new Glob(pattern, options).streamSync();
|
|
266278
265350
|
}
|
|
@@ -266577,7 +265649,7 @@ var cancel2 = (msg) => {
|
|
|
266577
265649
|
console.log("");
|
|
266578
265650
|
throw new CancelError2(msg);
|
|
266579
265651
|
};
|
|
266580
|
-
function
|
|
265652
|
+
function validate2(schema, value) {
|
|
266581
265653
|
try {
|
|
266582
265654
|
return schema.parse(value);
|
|
266583
265655
|
} catch (error46) {
|
|
@@ -266683,7 +265755,7 @@ async function loadEnvironmentEnv(validateEnv, prod, path4 = process.cwd()) {
|
|
|
266683
265755
|
}
|
|
266684
265756
|
const defaultEnv = Object.fromEntries(Object.entries(process.env).filter(([_, value]) => typeof value === "string" && value !== ""));
|
|
266685
265757
|
try {
|
|
266686
|
-
return
|
|
265758
|
+
return validate2(validateEnv ? DotEnvSchema : DotEnvSchemaPartial, {
|
|
266687
265759
|
...parsed,
|
|
266688
265760
|
...defaultEnv
|
|
266689
265761
|
});
|
|
@@ -266823,7 +265895,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
|
266823
265895
|
var package_default = {
|
|
266824
265896
|
name: "@settlemint/sdk-cli",
|
|
266825
265897
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
266826
|
-
version: "2.6.4-
|
|
265898
|
+
version: "2.6.4-maina0bed535",
|
|
266827
265899
|
type: "module",
|
|
266828
265900
|
private: false,
|
|
266829
265901
|
license: "FSL-1.1-MIT",
|
|
@@ -266866,21 +265938,21 @@ var package_default = {
|
|
|
266866
265938
|
},
|
|
266867
265939
|
dependencies: {
|
|
266868
265940
|
"@gql.tada/cli-utils": "1.7.2",
|
|
266869
|
-
"@inquirer/core": "
|
|
265941
|
+
"@inquirer/core": "11.0.1",
|
|
266870
265942
|
"node-fetch-native": "1.6.7",
|
|
266871
265943
|
zod: "^4"
|
|
266872
265944
|
},
|
|
266873
265945
|
devDependencies: {
|
|
266874
265946
|
"@commander-js/extra-typings": "14.0.0",
|
|
266875
265947
|
commander: "14.0.2",
|
|
266876
|
-
"@inquirer/confirm": "
|
|
266877
|
-
"@inquirer/input": "
|
|
266878
|
-
"@inquirer/password": "
|
|
266879
|
-
"@inquirer/select": "
|
|
266880
|
-
"@settlemint/sdk-hasura": "2.6.4-
|
|
266881
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
266882
|
-
"@settlemint/sdk-utils": "2.6.4-
|
|
266883
|
-
"@settlemint/sdk-viem": "2.6.4-
|
|
265948
|
+
"@inquirer/confirm": "6.0.1",
|
|
265949
|
+
"@inquirer/input": "5.0.1",
|
|
265950
|
+
"@inquirer/password": "5.0.1",
|
|
265951
|
+
"@inquirer/select": "5.0.1",
|
|
265952
|
+
"@settlemint/sdk-hasura": "2.6.4-maina0bed535",
|
|
265953
|
+
"@settlemint/sdk-js": "2.6.4-maina0bed535",
|
|
265954
|
+
"@settlemint/sdk-utils": "2.6.4-maina0bed535",
|
|
265955
|
+
"@settlemint/sdk-viem": "2.6.4-maina0bed535",
|
|
266884
265956
|
"@types/node": "24.10.1",
|
|
266885
265957
|
"@types/semver": "7.7.1",
|
|
266886
265958
|
"@types/which": "3.0.4",
|
|
@@ -266897,7 +265969,7 @@ var package_default = {
|
|
|
266897
265969
|
},
|
|
266898
265970
|
peerDependencies: {
|
|
266899
265971
|
hardhat: "<= 4",
|
|
266900
|
-
"@settlemint/sdk-js": "2.6.4-
|
|
265972
|
+
"@settlemint/sdk-js": "2.6.4-maina0bed535"
|
|
266901
265973
|
},
|
|
266902
265974
|
peerDependenciesMeta: {
|
|
266903
265975
|
hardhat: {
|
|
@@ -267102,7 +266174,7 @@ function ensureServer() {
|
|
|
267102
266174
|
}
|
|
267103
266175
|
|
|
267104
266176
|
// ../utils/dist/validation.js
|
|
267105
|
-
function
|
|
266177
|
+
function validate3(schema, value) {
|
|
267106
266178
|
try {
|
|
267107
266179
|
return schema.parse(value);
|
|
267108
266180
|
} catch (error46) {
|
|
@@ -267896,7 +266968,7 @@ var workspaceDelete = (gqlClient) => {
|
|
|
267896
266968
|
};
|
|
267897
266969
|
var workspaceAddCredits = (gqlClient) => {
|
|
267898
266970
|
return async (workspaceId, amount) => {
|
|
267899
|
-
const id =
|
|
266971
|
+
const id = validate3(IdSchema2, workspaceId);
|
|
267900
266972
|
if (amount <= 0) {
|
|
267901
266973
|
throw new Error("Credit amount must be a positive number");
|
|
267902
266974
|
}
|
|
@@ -269446,10 +268518,10 @@ function createSettleMintClient(options) {
|
|
|
269446
268518
|
throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
|
|
269447
268519
|
}
|
|
269448
268520
|
}
|
|
269449
|
-
const validatedOptions = options.anonymous ?
|
|
268521
|
+
const validatedOptions = options.anonymous ? validate3(exports_external.object({
|
|
269450
268522
|
...ClientOptionsSchema.shape,
|
|
269451
268523
|
accessToken: exports_external.literal("")
|
|
269452
|
-
}), options) :
|
|
268524
|
+
}), options) : validate3(ClientOptionsSchema, options);
|
|
269453
268525
|
const baseUrl = new URL(validatedOptions.instance).toString().replace(/\/$/, "");
|
|
269454
268526
|
const gqlClient = new GraphQLClient(`${baseUrl}/api/graphql`, {
|
|
269455
268527
|
headers: { "x-auth-token": validatedOptions.accessToken ?? "" },
|
|
@@ -270900,7 +269972,7 @@ function sanitizeAndValidateInstanceUrl(url2) {
|
|
|
270900
269972
|
if (sanitizedUrl === STANDALONE_INSTANCE2 || sanitizedUrl === LOCAL_INSTANCE2) {
|
|
270901
269973
|
return sanitizedUrl;
|
|
270902
269974
|
}
|
|
270903
|
-
|
|
269975
|
+
validate3(UrlSchema2, sanitizedUrl);
|
|
270904
269976
|
return sanitizedUrl;
|
|
270905
269977
|
}
|
|
270906
269978
|
|
|
@@ -272452,11 +271524,11 @@ function sanitizeName(value4, length = 35) {
|
|
|
272452
271524
|
}).slice(0, length).replaceAll(/(^\d*)/g, "").replaceAll(/(-$)/g, "").replaceAll(/(^-)/g, "");
|
|
272453
271525
|
}
|
|
272454
271526
|
|
|
272455
|
-
// ../../node_modules/.bun/@inquirer+input@
|
|
271527
|
+
// ../../node_modules/.bun/@inquirer+input@5.0.1+4cbbb20073436eb8/node_modules/@inquirer/input/dist/index.js
|
|
272456
271528
|
var inputTheme = {
|
|
272457
271529
|
validationFailureMode: "keep"
|
|
272458
271530
|
};
|
|
272459
|
-
var
|
|
271531
|
+
var dist_default2 = createPrompt((config3, done) => {
|
|
272460
271532
|
const { prefill = "tab" } = config3;
|
|
272461
271533
|
const theme = makeTheme(inputTheme, config3.theme);
|
|
272462
271534
|
const [status, setStatus] = useState("idle");
|
|
@@ -272464,7 +271536,7 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
|
272464
271536
|
const [errorMsg, setError] = useState();
|
|
272465
271537
|
const [value4, setValue] = useState("");
|
|
272466
271538
|
const prefix = usePrefix({ status, theme });
|
|
272467
|
-
async function
|
|
271539
|
+
async function validate4(value5) {
|
|
272468
271540
|
const { required: required2, pattern, patternError = "Invalid input" } = config3;
|
|
272469
271541
|
if (required2 && !value5) {
|
|
272470
271542
|
return "You must provide a value";
|
|
@@ -272484,7 +271556,7 @@ var esm_default2 = createPrompt((config3, done) => {
|
|
|
272484
271556
|
if (isEnterKey(key)) {
|
|
272485
271557
|
const answer = value4 || defaultValue;
|
|
272486
271558
|
setStatus("loading");
|
|
272487
|
-
const isValid = await
|
|
271559
|
+
const isValid = await validate4(answer);
|
|
272488
271560
|
if (isValid === true) {
|
|
272489
271561
|
setValue(answer);
|
|
272490
271562
|
setStatus("done");
|
|
@@ -272547,7 +271619,7 @@ async function subgraphNamePrompt({
|
|
|
272547
271619
|
if (accept) {
|
|
272548
271620
|
return defaultSubgraphName ?? env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH;
|
|
272549
271621
|
}
|
|
272550
|
-
const subgraphName = await
|
|
271622
|
+
const subgraphName = await dist_default2({
|
|
272551
271623
|
message: "What is the name of your subgraph?",
|
|
272552
271624
|
default: defaultSubgraphName,
|
|
272553
271625
|
required: true
|
|
@@ -272555,16 +271627,15 @@ async function subgraphNamePrompt({
|
|
|
272555
271627
|
return sanitizeName(subgraphName);
|
|
272556
271628
|
}
|
|
272557
271629
|
|
|
272558
|
-
// ../../node_modules/.bun/@inquirer+select@
|
|
272559
|
-
|
|
271630
|
+
// ../../node_modules/.bun/@inquirer+select@5.0.1+4cbbb20073436eb8/node_modules/@inquirer/select/dist/index.js
|
|
271631
|
+
import { styleText as styleText3 } from "node:util";
|
|
272560
271632
|
var selectTheme = {
|
|
272561
|
-
icon: { cursor:
|
|
271633
|
+
icon: { cursor: dist_default.pointer },
|
|
272562
271634
|
style: {
|
|
272563
|
-
disabled: (text2) =>
|
|
272564
|
-
description: (text2) =>
|
|
272565
|
-
keysHelpTip: (keys) => keys.map(([key, action]) => `${
|
|
271635
|
+
disabled: (text2) => styleText3("dim", `- ${text2}`),
|
|
271636
|
+
description: (text2) => styleText3("cyan", text2),
|
|
271637
|
+
keysHelpTip: (keys) => keys.map(([key, action]) => `${styleText3("bold", key)} ${styleText3("dim", action)}`).join(styleText3("dim", " • "))
|
|
272566
271638
|
},
|
|
272567
|
-
helpMode: "always",
|
|
272568
271639
|
indexMode: "hidden",
|
|
272569
271640
|
keybindings: []
|
|
272570
271641
|
};
|
|
@@ -272596,7 +271667,7 @@ function normalizeChoices(choices) {
|
|
|
272596
271667
|
return normalizedChoice;
|
|
272597
271668
|
});
|
|
272598
271669
|
}
|
|
272599
|
-
var
|
|
271670
|
+
var dist_default3 = createPrompt((config3, done) => {
|
|
272600
271671
|
const { loop = true, pageSize = 7 } = config3;
|
|
272601
271672
|
const theme = makeTheme(selectTheme, config3.theme);
|
|
272602
271673
|
const { keybindings } = theme;
|
|
@@ -272672,18 +271743,10 @@ var esm_default3 = createPrompt((config3, done) => {
|
|
|
272672
271743
|
clearTimeout(searchTimeoutRef.current);
|
|
272673
271744
|
}, []);
|
|
272674
271745
|
const message = theme.style.message(config3.message, status);
|
|
272675
|
-
|
|
272676
|
-
|
|
272677
|
-
|
|
272678
|
-
|
|
272679
|
-
helpLine = theme.style.help(items.length > pageSize ? pager : navigation);
|
|
272680
|
-
} else {
|
|
272681
|
-
helpLine = theme.style.keysHelpTip([
|
|
272682
|
-
["↑↓", "navigate"],
|
|
272683
|
-
["⏎", "select"]
|
|
272684
|
-
]);
|
|
272685
|
-
}
|
|
272686
|
-
}
|
|
271746
|
+
const helpLine = theme.style.keysHelpTip([
|
|
271747
|
+
["↑↓", "navigate"],
|
|
271748
|
+
["⏎", "select"]
|
|
271749
|
+
]);
|
|
272687
271750
|
let separatorCount = 0;
|
|
272688
271751
|
const page = usePagination({
|
|
272689
271752
|
items,
|
|
@@ -272771,7 +271834,7 @@ async function subgraphPrompt({
|
|
|
272771
271834
|
} else {
|
|
272772
271835
|
defaultChoice = env2.SETTLEMINT_THEGRAPH_DEFAULT_SUBGRAPH ?? subgraphNames[0];
|
|
272773
271836
|
}
|
|
272774
|
-
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await
|
|
271837
|
+
const subgraphName = choices.length === 1 && choices[0] === NEW ? NEW : await dist_default3({
|
|
272775
271838
|
message,
|
|
272776
271839
|
choices: choices.map((name3) => ({
|
|
272777
271840
|
name: name3,
|
|
@@ -276672,7 +275735,7 @@ function encodeField({ types: types2, name: name3, type: type4, value: value4 })
|
|
|
276672
275735
|
var exports_SignatureErc8010 = {};
|
|
276673
275736
|
__export(exports_SignatureErc8010, {
|
|
276674
275737
|
wrap: () => wrap,
|
|
276675
|
-
validate: () =>
|
|
275738
|
+
validate: () => validate7,
|
|
276676
275739
|
unwrap: () => unwrap,
|
|
276677
275740
|
suffixParameters: () => suffixParameters,
|
|
276678
275741
|
magicBytes: () => magicBytes,
|
|
@@ -276766,9 +275829,9 @@ function assert4(publicKey, options = {}) {
|
|
|
276766
275829
|
}
|
|
276767
275830
|
function from3(value4) {
|
|
276768
275831
|
const publicKey = (() => {
|
|
276769
|
-
if (
|
|
275832
|
+
if (validate5(value4))
|
|
276770
275833
|
return fromHex2(value4);
|
|
276771
|
-
if (
|
|
275834
|
+
if (validate4(value4))
|
|
276772
275835
|
return fromBytes2(value4);
|
|
276773
275836
|
const { prefix, x: x6, y: y5 } = value4;
|
|
276774
275837
|
if (typeof x6 === "bigint" && typeof y5 === "bigint")
|
|
@@ -276939,7 +276002,7 @@ function fromPublicKey(publicKey, options = {}) {
|
|
|
276939
276002
|
const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);
|
|
276940
276003
|
return from4(`0x${address}`, options);
|
|
276941
276004
|
}
|
|
276942
|
-
function
|
|
276005
|
+
function validate6(address, options = {}) {
|
|
276943
276006
|
const { strict = true } = options ?? {};
|
|
276944
276007
|
try {
|
|
276945
276008
|
assert5(address, { strict });
|
|
@@ -278300,7 +277363,7 @@ function wrap(value4) {
|
|
|
278300
277363
|
const suffixLength = fromNumber(size3(suffix), { size: 32 });
|
|
278301
277364
|
return concat3(signature, suffix, suffixLength, magicBytes);
|
|
278302
277365
|
}
|
|
278303
|
-
function
|
|
277366
|
+
function validate7(value4) {
|
|
278304
277367
|
try {
|
|
278305
277368
|
assert7(value4);
|
|
278306
277369
|
return true;
|
|
@@ -278707,7 +277770,7 @@ function isArgOfType2(arg, abiParameter) {
|
|
|
278707
277770
|
const abiParameterType = abiParameter.type;
|
|
278708
277771
|
switch (abiParameterType) {
|
|
278709
277772
|
case "address":
|
|
278710
|
-
return
|
|
277773
|
+
return validate6(arg, { strict: false });
|
|
278711
277774
|
case "bool":
|
|
278712
277775
|
return argType === "boolean";
|
|
278713
277776
|
case "function":
|
|
@@ -278744,11 +277807,11 @@ function getAmbiguousTypes2(sourceParameters, targetParameters, args) {
|
|
|
278744
277807
|
if (types2.includes("address") && types2.includes("bytes20"))
|
|
278745
277808
|
return true;
|
|
278746
277809
|
if (types2.includes("address") && types2.includes("string"))
|
|
278747
|
-
return
|
|
277810
|
+
return validate6(args[parameterIndex], {
|
|
278748
277811
|
strict: false
|
|
278749
277812
|
});
|
|
278750
277813
|
if (types2.includes("address") && types2.includes("bytes"))
|
|
278751
|
-
return
|
|
277814
|
+
return validate6(args[parameterIndex], {
|
|
278752
277815
|
strict: false
|
|
278753
277816
|
});
|
|
278754
277817
|
return false;
|
|
@@ -278776,7 +277839,7 @@ function from10(abiItem, options = {}) {
|
|
|
278776
277839
|
}
|
|
278777
277840
|
function fromAbi(abi2, name3, options) {
|
|
278778
277841
|
const { args = [], prepare = true } = options ?? {};
|
|
278779
|
-
const isSelector =
|
|
277842
|
+
const isSelector = validate5(name3, { strict: false });
|
|
278780
277843
|
const abiItems = abi2.filter((abiItem2) => {
|
|
278781
277844
|
if (isSelector) {
|
|
278782
277845
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
@@ -279177,7 +278240,7 @@ async function simulateCalls(client, parameters) {
|
|
|
279177
278240
|
var exports_SignatureErc6492 = {};
|
|
279178
278241
|
__export(exports_SignatureErc6492, {
|
|
279179
278242
|
wrap: () => wrap2,
|
|
279180
|
-
validate: () =>
|
|
278243
|
+
validate: () => validate8,
|
|
279181
278244
|
unwrap: () => unwrap2,
|
|
279182
278245
|
universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,
|
|
279183
278246
|
universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,
|
|
@@ -279256,7 +278319,7 @@ function wrap2(value4) {
|
|
|
279256
278319
|
signature
|
|
279257
278320
|
]), magicBytes2);
|
|
279258
278321
|
}
|
|
279259
|
-
function
|
|
278322
|
+
function validate8(wrapped) {
|
|
279260
278323
|
try {
|
|
279261
278324
|
assert8(wrapped);
|
|
279262
278325
|
return true;
|
|
@@ -298162,7 +297225,7 @@ var GetChainIdOptionsSchema = exports_external.object({
|
|
|
298162
297225
|
});
|
|
298163
297226
|
async function getChainId2(options) {
|
|
298164
297227
|
ensureServer();
|
|
298165
|
-
const validatedOptions =
|
|
297228
|
+
const validatedOptions = validate3(GetChainIdOptionsSchema, options);
|
|
298166
297229
|
const headers = buildHeaders(validatedOptions?.httpTransportConfig?.fetchOptions?.headers, { "x-auth-token": validatedOptions.accessToken });
|
|
298167
297230
|
const client = createPublicClient({ transport: http(validatedOptions.rpcUrl, {
|
|
298168
297231
|
...validatedOptions.httpTransportConfig,
|
|
@@ -298451,7 +297514,7 @@ function extractInfoFromBody(body) {
|
|
|
298451
297514
|
}
|
|
298452
297515
|
}
|
|
298453
297516
|
|
|
298454
|
-
// ../../node_modules/.bun/@inquirer+confirm@
|
|
297517
|
+
// ../../node_modules/.bun/@inquirer+confirm@6.0.1+4cbbb20073436eb8/node_modules/@inquirer/confirm/dist/index.js
|
|
298455
297518
|
function getBooleanValue(value4, defaultValue) {
|
|
298456
297519
|
let answer = defaultValue !== false;
|
|
298457
297520
|
if (/^(y|yes)/i.test(value4))
|
|
@@ -298463,7 +297526,7 @@ function getBooleanValue(value4, defaultValue) {
|
|
|
298463
297526
|
function boolToString(value4) {
|
|
298464
297527
|
return value4 ? "Yes" : "No";
|
|
298465
297528
|
}
|
|
298466
|
-
var
|
|
297529
|
+
var dist_default4 = createPrompt((config3, done) => {
|
|
298467
297530
|
const { transformer = boolToString } = config3;
|
|
298468
297531
|
const [status, setStatus] = useState("idle");
|
|
298469
297532
|
const [value4, setValue] = useState("");
|
|
@@ -298497,9 +297560,9 @@ var esm_default4 = createPrompt((config3, done) => {
|
|
|
298497
297560
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
298498
297561
|
});
|
|
298499
297562
|
|
|
298500
|
-
// ../../node_modules/.bun/@inquirer+password@
|
|
298501
|
-
var
|
|
298502
|
-
const { validate:
|
|
297563
|
+
// ../../node_modules/.bun/@inquirer+password@5.0.1+4cbbb20073436eb8/node_modules/@inquirer/password/dist/index.js
|
|
297564
|
+
var dist_default5 = createPrompt((config3, done) => {
|
|
297565
|
+
const { validate: validate9 = () => true } = config3;
|
|
298503
297566
|
const theme = makeTheme(config3.theme);
|
|
298504
297567
|
const [status, setStatus] = useState("idle");
|
|
298505
297568
|
const [errorMsg, setError] = useState();
|
|
@@ -298512,7 +297575,7 @@ var esm_default5 = createPrompt((config3, done) => {
|
|
|
298512
297575
|
if (isEnterKey(key)) {
|
|
298513
297576
|
const answer = value4;
|
|
298514
297577
|
setStatus("loading");
|
|
298515
|
-
const isValid = await
|
|
297578
|
+
const isValid = await validate9(answer);
|
|
298516
297579
|
if (isValid === true) {
|
|
298517
297580
|
setValue(answer);
|
|
298518
297581
|
setStatus("done");
|
|
@@ -298556,7 +297619,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
298556
297619
|
return defaultAccessToken;
|
|
298557
297620
|
}
|
|
298558
297621
|
if (defaultAccessToken) {
|
|
298559
|
-
const keep = await
|
|
297622
|
+
const keep = await dist_default4({
|
|
298560
297623
|
message: "Do you want to use the existing application access token?",
|
|
298561
297624
|
default: true
|
|
298562
297625
|
});
|
|
@@ -298564,18 +297627,18 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
298564
297627
|
return defaultAccessToken;
|
|
298565
297628
|
}
|
|
298566
297629
|
}
|
|
298567
|
-
const create3 = await
|
|
297630
|
+
const create3 = await dist_default4({
|
|
298568
297631
|
message: "Do you want to create a new application access token?",
|
|
298569
297632
|
default: false
|
|
298570
297633
|
});
|
|
298571
297634
|
if (create3) {
|
|
298572
|
-
const name3 = await
|
|
297635
|
+
const name3 = await dist_default2({
|
|
298573
297636
|
message: "How would you like to name this application access token?",
|
|
298574
297637
|
default: `SettleMint CLI (${Date.now()}${process.env.USER ? ` ${process.env.USER}` : ""})`,
|
|
298575
297638
|
required: true,
|
|
298576
297639
|
validate(value4) {
|
|
298577
297640
|
try {
|
|
298578
|
-
|
|
297641
|
+
validate3(exports_external.string(), value4);
|
|
298579
297642
|
return true;
|
|
298580
297643
|
} catch (_error) {
|
|
298581
297644
|
return "Invalid token name";
|
|
@@ -298628,15 +297691,15 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
298628
297691
|
validityPeriod: "NONE"
|
|
298629
297692
|
});
|
|
298630
297693
|
try {
|
|
298631
|
-
|
|
297694
|
+
validate3(ApplicationAccessTokenSchema2, aat);
|
|
298632
297695
|
return aat;
|
|
298633
297696
|
} catch (_error) {}
|
|
298634
297697
|
}
|
|
298635
|
-
return
|
|
297698
|
+
return dist_default5({
|
|
298636
297699
|
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
|
298637
297700
|
validate(value4) {
|
|
298638
297701
|
try {
|
|
298639
|
-
|
|
297702
|
+
validate3(ApplicationAccessTokenSchema2, value4);
|
|
298640
297703
|
return true;
|
|
298641
297704
|
} catch (_error) {
|
|
298642
297705
|
return "Invalid application access token, it should start with sm_aat_...";
|
|
@@ -298664,7 +297727,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
|
298664
297727
|
if (is_in_ci_default) {
|
|
298665
297728
|
nothingSelectedError("application");
|
|
298666
297729
|
}
|
|
298667
|
-
const application = await
|
|
297730
|
+
const application = await dist_default3({
|
|
298668
297731
|
message: "Which application do you want to connect to?",
|
|
298669
297732
|
choices: applications.map((applications2) => ({
|
|
298670
297733
|
name: `${applications2.name} (${applications2.uniqueName})`,
|
|
@@ -298777,7 +297840,7 @@ async function blockchainNodePrompt({
|
|
|
298777
297840
|
}
|
|
298778
297841
|
return item;
|
|
298779
297842
|
}) : choices;
|
|
298780
|
-
return
|
|
297843
|
+
return dist_default3({
|
|
298781
297844
|
message: promptMessage ?? "Which blockchain node do you want to connect to?",
|
|
298782
297845
|
choices: filteredChoices,
|
|
298783
297846
|
default: defaultNode
|
|
@@ -298807,7 +297870,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
|
298807
297870
|
isRequired,
|
|
298808
297871
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
|
298809
297872
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => isRunning(node)) : choices;
|
|
298810
|
-
return
|
|
297873
|
+
return dist_default3({
|
|
298811
297874
|
message: promptMessage ?? "Which blockchain node or load balancer do you want to connect to?",
|
|
298812
297875
|
choices: filteredChoices,
|
|
298813
297876
|
default: defaultNode
|
|
@@ -298832,7 +297895,7 @@ async function blockscoutPrompt({
|
|
|
298832
297895
|
envKey: "SETTLEMINT_BLOCKSCOUT",
|
|
298833
297896
|
isRequired,
|
|
298834
297897
|
defaultHandler: async ({ defaultService: defaultBlockscout, choices }) => {
|
|
298835
|
-
return
|
|
297898
|
+
return dist_default3({
|
|
298836
297899
|
message: "Which blockscout instance do you want to connect to?",
|
|
298837
297900
|
choices,
|
|
298838
297901
|
default: defaultBlockscout
|
|
@@ -298855,7 +297918,7 @@ async function customDeploymentPrompt({
|
|
|
298855
297918
|
envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
|
|
298856
297919
|
isRequired,
|
|
298857
297920
|
defaultHandler: async ({ defaultService: defaultCustomDeployment, choices }) => {
|
|
298858
|
-
return
|
|
297921
|
+
return dist_default3({
|
|
298859
297922
|
message: "Which Custom Deployment do you want to connect to?",
|
|
298860
297923
|
choices,
|
|
298861
297924
|
default: defaultCustomDeployment
|
|
@@ -298882,7 +297945,7 @@ async function hasuraPrompt({
|
|
|
298882
297945
|
envKey: "SETTLEMINT_HASURA",
|
|
298883
297946
|
isRequired,
|
|
298884
297947
|
defaultHandler: async ({ defaultService: defaultHasura, choices }) => {
|
|
298885
|
-
return
|
|
297948
|
+
return dist_default3({
|
|
298886
297949
|
message: "Which Hasura instance do you want to connect to?",
|
|
298887
297950
|
choices,
|
|
298888
297951
|
default: defaultHasura
|
|
@@ -298906,7 +297969,7 @@ async function hdPrivateKeyPrompt({
|
|
|
298906
297969
|
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
298907
297970
|
isRequired,
|
|
298908
297971
|
defaultHandler: async ({ defaultService: defaultPrivateKey, choices }) => {
|
|
298909
|
-
return
|
|
297972
|
+
return dist_default3({
|
|
298910
297973
|
message: "Which HD Private Key do you want to use?",
|
|
298911
297974
|
choices,
|
|
298912
297975
|
default: defaultPrivateKey
|
|
@@ -298930,7 +297993,7 @@ async function ipfsPrompt({
|
|
|
298930
297993
|
envKey: "SETTLEMINT_IPFS",
|
|
298931
297994
|
isRequired,
|
|
298932
297995
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
298933
|
-
return
|
|
297996
|
+
return dist_default3({
|
|
298934
297997
|
message: "Which IPFS instance do you want to connect to?",
|
|
298935
297998
|
choices,
|
|
298936
297999
|
default: defaultStorage
|
|
@@ -298954,7 +298017,7 @@ async function minioPrompt({
|
|
|
298954
298017
|
envKey: "SETTLEMINT_MINIO",
|
|
298955
298018
|
isRequired,
|
|
298956
298019
|
defaultHandler: async ({ defaultService: defaultStorage, choices }) => {
|
|
298957
|
-
return
|
|
298020
|
+
return dist_default3({
|
|
298958
298021
|
message: "Which MinIO instance do you want to connect to?",
|
|
298959
298022
|
choices,
|
|
298960
298023
|
default: defaultStorage
|
|
@@ -298978,7 +298041,7 @@ async function portalPrompt({
|
|
|
298978
298041
|
envKey: "SETTLEMINT_PORTAL",
|
|
298979
298042
|
isRequired,
|
|
298980
298043
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
298981
|
-
return
|
|
298044
|
+
return dist_default3({
|
|
298982
298045
|
message: "Which Smart Contract Portal instance do you want to connect to?",
|
|
298983
298046
|
choices,
|
|
298984
298047
|
default: defaultMiddleware
|
|
@@ -299007,7 +298070,7 @@ async function theGraphPrompt({
|
|
|
299007
298070
|
isRequired,
|
|
299008
298071
|
defaultHandler: async ({ defaultService: defaultMiddleware, choices }) => {
|
|
299009
298072
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: middleware }) => isRunning(middleware)) : choices;
|
|
299010
|
-
return
|
|
298073
|
+
return dist_default3({
|
|
299011
298074
|
message: "Which The Graph instance do you want to connect to?",
|
|
299012
298075
|
choices: filteredChoices,
|
|
299013
298076
|
default: defaultMiddleware
|
|
@@ -299035,13 +298098,13 @@ async function instancePrompt({
|
|
|
299035
298098
|
return sanitizeInstanceUrl(defaultPromptInstance);
|
|
299036
298099
|
}
|
|
299037
298100
|
if (freeTextInput) {
|
|
299038
|
-
const instance = await
|
|
298101
|
+
const instance = await dist_default2({
|
|
299039
298102
|
message: "What is the URL of your SettleMint instance?",
|
|
299040
298103
|
default: defaultPromptInstance,
|
|
299041
298104
|
required: true,
|
|
299042
298105
|
validate(value4) {
|
|
299043
298106
|
try {
|
|
299044
|
-
|
|
298107
|
+
validate3(UrlSchema2, value4);
|
|
299045
298108
|
return true;
|
|
299046
298109
|
} catch (_error) {
|
|
299047
298110
|
return "Invalid URL";
|
|
@@ -299054,7 +298117,7 @@ async function instancePrompt({
|
|
|
299054
298117
|
if (knownInstances.length === 0) {
|
|
299055
298118
|
note("No instances found. Run `settlemint login` to configure an instance.", "warn");
|
|
299056
298119
|
}
|
|
299057
|
-
return
|
|
298120
|
+
return dist_default3({
|
|
299058
298121
|
message: "What instance do you want to connect to?",
|
|
299059
298122
|
choices: [
|
|
299060
298123
|
...knownInstances.map((instance) => ({
|
|
@@ -299090,7 +298153,7 @@ async function serviceSecretPrompt({
|
|
|
299090
298153
|
return defaultSecret;
|
|
299091
298154
|
}
|
|
299092
298155
|
if (defaultSecret) {
|
|
299093
|
-
const keep = await
|
|
298156
|
+
const keep = await dist_default4({
|
|
299094
298157
|
message: `Do you want to use the existing ${name3} secret?`,
|
|
299095
298158
|
default: true
|
|
299096
298159
|
});
|
|
@@ -299098,7 +298161,7 @@ async function serviceSecretPrompt({
|
|
|
299098
298161
|
return defaultSecret;
|
|
299099
298162
|
}
|
|
299100
298163
|
}
|
|
299101
|
-
const serviceSecret = await
|
|
298164
|
+
const serviceSecret = await dist_default5({
|
|
299102
298165
|
message
|
|
299103
298166
|
});
|
|
299104
298167
|
return serviceSecret || undefined;
|
|
@@ -299119,13 +298182,13 @@ async function serviceUrlPrompt({
|
|
|
299119
298182
|
if (isCi) {
|
|
299120
298183
|
return defaultUrl ? new URL(defaultUrl).toString() : undefined;
|
|
299121
298184
|
}
|
|
299122
|
-
const serviceUrl = await
|
|
298185
|
+
const serviceUrl = await dist_default2({
|
|
299123
298186
|
message: example ? `${message} (eg ${example})` : message,
|
|
299124
298187
|
default: defaultUrl,
|
|
299125
298188
|
required: true,
|
|
299126
298189
|
validate(value4) {
|
|
299127
298190
|
try {
|
|
299128
|
-
|
|
298191
|
+
validate3(UrlSchema2, value4);
|
|
299129
298192
|
return true;
|
|
299130
298193
|
} catch (_error) {
|
|
299131
298194
|
return "Invalid URL";
|
|
@@ -299150,7 +298213,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
299150
298213
|
if (is_in_ci_default) {
|
|
299151
298214
|
nothingSelectedError("workspace");
|
|
299152
298215
|
}
|
|
299153
|
-
const workspace = await
|
|
298216
|
+
const workspace = await dist_default3({
|
|
299154
298217
|
message: "Which workspace do you want to connect to?",
|
|
299155
298218
|
choices: workspaces.map((workspace2) => ({
|
|
299156
298219
|
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
|
@@ -299554,7 +298617,7 @@ async function serviceValuePrompt({
|
|
|
299554
298617
|
if (isCi) {
|
|
299555
298618
|
return defaultValue;
|
|
299556
298619
|
}
|
|
299557
|
-
const serviceSecret = await
|
|
298620
|
+
const serviceSecret = await dist_default2({
|
|
299558
298621
|
message: example ? `${message} (eg ${example})` : message,
|
|
299559
298622
|
default: defaultValue
|
|
299560
298623
|
});
|
|
@@ -299992,7 +299055,7 @@ async function templatePrompt(platformConfig, argument) {
|
|
|
299992
299055
|
}
|
|
299993
299056
|
return template2;
|
|
299994
299057
|
}
|
|
299995
|
-
const template = await
|
|
299058
|
+
const template = await dist_default3({
|
|
299996
299059
|
message: "Which template do you want to use?",
|
|
299997
299060
|
choices: [
|
|
299998
299061
|
...kits.map((template2) => ({
|
|
@@ -300010,13 +299073,13 @@ async function projectNamePrompt(env2, argument) {
|
|
|
300010
299073
|
if (defaultInstance) {
|
|
300011
299074
|
return defaultInstance;
|
|
300012
299075
|
}
|
|
300013
|
-
return
|
|
299076
|
+
return dist_default2({
|
|
300014
299077
|
message: "What is the name of your new SettleMint project?",
|
|
300015
299078
|
default: defaultInstance,
|
|
300016
299079
|
required: true,
|
|
300017
299080
|
validate(value4) {
|
|
300018
299081
|
try {
|
|
300019
|
-
|
|
299082
|
+
validate3(exports_external.string(), value4);
|
|
300020
299083
|
return true;
|
|
300021
299084
|
} catch (_error) {
|
|
300022
299085
|
return "Invalid projectname";
|
|
@@ -303277,7 +302340,7 @@ function createCommand2() {
|
|
|
303277
302340
|
await mkdir6(projectDir, { recursive: true });
|
|
303278
302341
|
}
|
|
303279
302342
|
if (!await isEmpty(projectDir)) {
|
|
303280
|
-
const confirmEmpty = await
|
|
302343
|
+
const confirmEmpty = await dist_default4({
|
|
303281
302344
|
message: `The folder ${projectDir} already exists. Do you want to empty it?`,
|
|
303282
302345
|
default: false
|
|
303283
302346
|
});
|
|
@@ -303371,7 +302434,7 @@ var ClientOptionsSchema3 = exports_external.object({
|
|
|
303371
302434
|
});
|
|
303372
302435
|
function createHasuraMetadataClient(options, logger5) {
|
|
303373
302436
|
ensureServer();
|
|
303374
|
-
const validatedOptions =
|
|
302437
|
+
const validatedOptions = validate3(ClientOptionsSchema3, options);
|
|
303375
302438
|
const baseUrl = extractBaseUrlBeforeSegment(options.instance, "/v1/graphql");
|
|
303376
302439
|
const queryEndpoint = new URL(`${baseUrl}/v1/metadata`).toString();
|
|
303377
302440
|
const fetchInstance = logger5 ? requestLogger(logger5, "hasura", fetch) : fetch;
|
|
@@ -303530,7 +302593,7 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
303530
302593
|
return defaultPersonalAccessToken;
|
|
303531
302594
|
}
|
|
303532
302595
|
if (existingConfig && defaultPersonalAccessToken) {
|
|
303533
|
-
const useExisting = await
|
|
302596
|
+
const useExisting = await dist_default4({
|
|
303534
302597
|
message: `Do you want to use your existing personal access token for ${instance}?`,
|
|
303535
302598
|
default: true
|
|
303536
302599
|
});
|
|
@@ -303538,11 +302601,11 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
303538
302601
|
return defaultPersonalAccessToken;
|
|
303539
302602
|
}
|
|
303540
302603
|
}
|
|
303541
|
-
return
|
|
302604
|
+
return dist_default5({
|
|
303542
302605
|
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
|
303543
302606
|
validate(value4) {
|
|
303544
302607
|
try {
|
|
303545
|
-
|
|
302608
|
+
validate3(PersonalAccessTokenSchema2, value4);
|
|
303546
302609
|
return true;
|
|
303547
302610
|
} catch (_error) {
|
|
303548
302611
|
return "Invalid personal access token, it should start with sm_pat_...";
|
|
@@ -303612,7 +302675,7 @@ function loginCommand() {
|
|
|
303612
302675
|
}
|
|
303613
302676
|
})();
|
|
303614
302677
|
try {
|
|
303615
|
-
|
|
302678
|
+
validate3(PersonalAccessTokenSchema2, personalAccessToken);
|
|
303616
302679
|
} catch {
|
|
303617
302680
|
cancel("Invalid personal access token");
|
|
303618
302681
|
}
|
|
@@ -303664,7 +302727,7 @@ function logoutCommand() {
|
|
|
303664
302727
|
}
|
|
303665
302728
|
const env2 = await loadEnv(false, false);
|
|
303666
302729
|
const defaultInstance = env2.SETTLEMINT_INSTANCE;
|
|
303667
|
-
const instance = await
|
|
302730
|
+
const instance = await dist_default3({
|
|
303668
302731
|
message: "Select the instance to logout from:",
|
|
303669
302732
|
choices: instances.map((instance2) => ({
|
|
303670
302733
|
value: instance2,
|
|
@@ -303685,7 +302748,7 @@ async function pincodeVerificationPrompt(verificationChallenges) {
|
|
|
303685
302748
|
if (verificationChallenges.length === 1) {
|
|
303686
302749
|
return verificationChallenges[0];
|
|
303687
302750
|
}
|
|
303688
|
-
const verificationChallenge = await
|
|
302751
|
+
const verificationChallenge = await dist_default3({
|
|
303689
302752
|
message: "Which pincode verification do you want to use?",
|
|
303690
302753
|
choices: verificationChallenges.map((verificationChallenge2) => ({
|
|
303691
302754
|
name: verificationChallenge2.name,
|
|
@@ -303749,7 +302812,7 @@ function pincodeVerificationResponseCommand() {
|
|
|
303749
302812
|
nodeId: selectedBlockchainNode.id
|
|
303750
302813
|
});
|
|
303751
302814
|
const verificationChallenge = await pincodeVerificationPrompt(pincodeVerificationChallenges);
|
|
303752
|
-
const pincode = await
|
|
302815
|
+
const pincode = await dist_default5({
|
|
303753
302816
|
message: "Enter your pincode",
|
|
303754
302817
|
validate(value4) {
|
|
303755
302818
|
if (!value4.trim()) {
|
|
@@ -303902,7 +302965,7 @@ async function providerPrompt(platformConfig, argument) {
|
|
|
303902
302965
|
if (possibleProviders.length === 1) {
|
|
303903
302966
|
return possibleProviders[0];
|
|
303904
302967
|
}
|
|
303905
|
-
const provider = await
|
|
302968
|
+
const provider = await dist_default3({
|
|
303906
302969
|
message: "Which provider do you want to use?",
|
|
303907
302970
|
choices: platformConfig.deploymentEngineTargets.map((target) => ({
|
|
303908
302971
|
name: target.name,
|
|
@@ -303933,7 +302996,7 @@ async function regionPrompt(provider, argument) {
|
|
|
303933
302996
|
if (possibleRegions.length === 1) {
|
|
303934
302997
|
return possibleRegions[0];
|
|
303935
302998
|
}
|
|
303936
|
-
const region = await
|
|
302999
|
+
const region = await dist_default3({
|
|
303937
303000
|
message: "Which region do you want to use?",
|
|
303938
303001
|
choices: provider.clusters.map((cluster) => ({
|
|
303939
303002
|
name: cluster.name,
|
|
@@ -304463,7 +303526,7 @@ async function blockchainNetworkPrompt({
|
|
|
304463
303526
|
envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
|
|
304464
303527
|
isRequired,
|
|
304465
303528
|
defaultHandler: async ({ defaultService: defaultNetwork, choices }) => {
|
|
304466
|
-
return
|
|
303529
|
+
return dist_default3({
|
|
304467
303530
|
message: "Which blockchain network do you want to connect to?",
|
|
304468
303531
|
choices,
|
|
304469
303532
|
default: defaultNetwork
|
|
@@ -305368,7 +304431,7 @@ function createCommand3() {
|
|
|
305368
304431
|
|
|
305369
304432
|
// src/prompts/delete-confirmation.prompt.ts
|
|
305370
304433
|
async function deleteConfirmationPrompt(itemDescription) {
|
|
305371
|
-
const confirmation = await
|
|
304434
|
+
const confirmation = await dist_default2({
|
|
305372
304435
|
message: `Are you sure you want to delete ${itemDescription}? (yes/no)`,
|
|
305373
304436
|
required: true,
|
|
305374
304437
|
validate(value4) {
|
|
@@ -306765,7 +305828,7 @@ async function useCasePrompt(platformConfig, argument) {
|
|
|
306765
305828
|
if (selectableUseCases.length === 1) {
|
|
306766
305829
|
return selectableUseCases[0];
|
|
306767
305830
|
}
|
|
306768
|
-
const useCase = await
|
|
305831
|
+
const useCase = await dist_default3({
|
|
306769
305832
|
message: "Which use case do you want to use?",
|
|
306770
305833
|
choices: selectableUseCases.map((useCase2) => ({
|
|
306771
305834
|
name: formatUseCaseName(useCase2.name),
|
|
@@ -306823,7 +305886,7 @@ function createCommand4() {
|
|
|
306823
305886
|
const targetDir = formatTargetDir(name3);
|
|
306824
305887
|
const projectDir = join10(process.cwd(), targetDir);
|
|
306825
305888
|
if (await exists3(projectDir) && !await isEmpty(projectDir)) {
|
|
306826
|
-
const confirmEmpty = await
|
|
305889
|
+
const confirmEmpty = await dist_default4({
|
|
306827
305890
|
message: `The folder ${projectDir} already exists. Do you want to delete it?`,
|
|
306828
305891
|
default: false
|
|
306829
305892
|
});
|
|
@@ -307136,7 +306199,7 @@ async function addressPrompt({
|
|
|
307136
306199
|
hardhatConfig
|
|
307137
306200
|
}) {
|
|
307138
306201
|
if (!node) {
|
|
307139
|
-
return
|
|
306202
|
+
return dist_default2({
|
|
307140
306203
|
message: "Which private key address do you want to deploy from?",
|
|
307141
306204
|
validate: (value4) => {
|
|
307142
306205
|
if (!isAddress(value4)) {
|
|
@@ -307156,7 +306219,7 @@ async function addressPrompt({
|
|
|
307156
306219
|
note(`Private key with address '${defaultAddress}' is not activated on the node '${node.uniqueName}'.
|
|
307157
306220
|
Please select another key or activate this key on the node and try again.`, "warn");
|
|
307158
306221
|
}
|
|
307159
|
-
const address = await
|
|
306222
|
+
const address = await dist_default3({
|
|
307160
306223
|
message: "Which private key do you want to deploy from?",
|
|
307161
306224
|
choices: possiblePrivateKeys.map(({ address: address2, name: name3 }) => ({
|
|
307162
306225
|
name: name3,
|
|
@@ -308107,4 +307170,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
|
308107
307170
|
// src/cli.ts
|
|
308108
307171
|
sdkCliCommand();
|
|
308109
307172
|
|
|
308110
|
-
//# debugId=
|
|
307173
|
+
//# debugId=108A958BA85D32D964756E2164756E21
|