@kenkaiiii/gg-boss 4.8.3 → 4.8.4
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/{chunk-VN6GZWBW.js → chunk-XGMCVE2F.js} +1177 -987
- package/dist/{chunk-VN6GZWBW.js.map → chunk-XGMCVE2F.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/{devtools-XF5S3NSL.js → devtools-I2VAXNW4.js} +5 -5
- package/dist/{devtools-XF5S3NSL.js.map → devtools-I2VAXNW4.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
|
@@ -6835,12 +6835,12 @@ var require_dist = __commonJS({
|
|
|
6835
6835
|
throw new Error(`Unknown format "${name}"`);
|
|
6836
6836
|
return f;
|
|
6837
6837
|
};
|
|
6838
|
-
function addFormats(ajv, list,
|
|
6838
|
+
function addFormats(ajv, list, fs37, exportName) {
|
|
6839
6839
|
var _a6;
|
|
6840
6840
|
var _b;
|
|
6841
6841
|
(_a6 = (_b = ajv.opts.code).formats) !== null && _a6 !== void 0 ? _a6 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
6842
6842
|
for (const f of list)
|
|
6843
|
-
ajv.addFormat(f,
|
|
6843
|
+
ajv.addFormat(f, fs37[f]);
|
|
6844
6844
|
}
|
|
6845
6845
|
module.exports = exports = formatsPlugin;
|
|
6846
6846
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6855,7 +6855,7 @@ var require_windows = __commonJS({
|
|
|
6855
6855
|
init_esm_shims();
|
|
6856
6856
|
module.exports = isexe;
|
|
6857
6857
|
isexe.sync = sync;
|
|
6858
|
-
var
|
|
6858
|
+
var fs37 = __require("fs");
|
|
6859
6859
|
function checkPathExt(path43, options) {
|
|
6860
6860
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
6861
6861
|
if (!pathext) {
|
|
@@ -6880,12 +6880,12 @@ var require_windows = __commonJS({
|
|
|
6880
6880
|
return checkPathExt(path43, options);
|
|
6881
6881
|
}
|
|
6882
6882
|
function isexe(path43, options, cb) {
|
|
6883
|
-
|
|
6883
|
+
fs37.stat(path43, function(er, stat) {
|
|
6884
6884
|
cb(er, er ? false : checkStat(stat, path43, options));
|
|
6885
6885
|
});
|
|
6886
6886
|
}
|
|
6887
6887
|
function sync(path43, options) {
|
|
6888
|
-
return checkStat(
|
|
6888
|
+
return checkStat(fs37.statSync(path43), path43, options);
|
|
6889
6889
|
}
|
|
6890
6890
|
}
|
|
6891
6891
|
});
|
|
@@ -6897,14 +6897,14 @@ var require_mode = __commonJS({
|
|
|
6897
6897
|
init_esm_shims();
|
|
6898
6898
|
module.exports = isexe;
|
|
6899
6899
|
isexe.sync = sync;
|
|
6900
|
-
var
|
|
6900
|
+
var fs37 = __require("fs");
|
|
6901
6901
|
function isexe(path43, options, cb) {
|
|
6902
|
-
|
|
6902
|
+
fs37.stat(path43, function(er, stat) {
|
|
6903
6903
|
cb(er, er ? false : checkStat(stat, options));
|
|
6904
6904
|
});
|
|
6905
6905
|
}
|
|
6906
6906
|
function sync(path43, options) {
|
|
6907
|
-
return checkStat(
|
|
6907
|
+
return checkStat(fs37.statSync(path43), options);
|
|
6908
6908
|
}
|
|
6909
6909
|
function checkStat(stat, options) {
|
|
6910
6910
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -6930,7 +6930,7 @@ var require_isexe = __commonJS({
|
|
|
6930
6930
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
6931
6931
|
"use strict";
|
|
6932
6932
|
init_esm_shims();
|
|
6933
|
-
var
|
|
6933
|
+
var fs37 = __require("fs");
|
|
6934
6934
|
var core;
|
|
6935
6935
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
6936
6936
|
core = require_windows();
|
|
@@ -7202,16 +7202,16 @@ var require_readShebang = __commonJS({
|
|
|
7202
7202
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
7203
7203
|
"use strict";
|
|
7204
7204
|
init_esm_shims();
|
|
7205
|
-
var
|
|
7205
|
+
var fs37 = __require("fs");
|
|
7206
7206
|
var shebangCommand = require_shebang_command();
|
|
7207
7207
|
function readShebang(command) {
|
|
7208
7208
|
const size = 150;
|
|
7209
7209
|
const buffer = Buffer.alloc(size);
|
|
7210
7210
|
let fd2;
|
|
7211
7211
|
try {
|
|
7212
|
-
fd2 =
|
|
7213
|
-
|
|
7214
|
-
|
|
7212
|
+
fd2 = fs37.openSync(command, "r");
|
|
7213
|
+
fs37.readSync(fd2, buffer, 0, size, 0);
|
|
7214
|
+
fs37.closeSync(fd2);
|
|
7215
7215
|
} catch (e) {
|
|
7216
7216
|
}
|
|
7217
7217
|
return shebangCommand(buffer.toString());
|
|
@@ -34336,12 +34336,12 @@ function redactSensitive(body) {
|
|
|
34336
34336
|
async function checkCredentialsFileSafety(path43, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
|
|
34337
34337
|
if (typeof process === "undefined" || process.platform === "win32")
|
|
34338
34338
|
return;
|
|
34339
|
-
const
|
|
34339
|
+
const fs37 = await import("fs");
|
|
34340
34340
|
let resolved = path43;
|
|
34341
34341
|
let st;
|
|
34342
34342
|
try {
|
|
34343
|
-
resolved = await
|
|
34344
|
-
st = await
|
|
34343
|
+
resolved = await fs37.promises.realpath(path43);
|
|
34344
|
+
st = await fs37.promises.stat(resolved);
|
|
34345
34345
|
} catch {
|
|
34346
34346
|
return;
|
|
34347
34347
|
}
|
|
@@ -34357,27 +34357,27 @@ async function checkCredentialsFileSafety(path43, onWarn = (m) => console.warn(`
|
|
|
34357
34357
|
}
|
|
34358
34358
|
}
|
|
34359
34359
|
async function writeCredentialsFileAtomic(targetPath, data) {
|
|
34360
|
-
const
|
|
34360
|
+
const fs37 = await import("fs");
|
|
34361
34361
|
const path43 = await import("path");
|
|
34362
34362
|
const dir = path43.dirname(targetPath);
|
|
34363
|
-
await
|
|
34363
|
+
await fs37.promises.mkdir(dir, { recursive: true, mode: 448 });
|
|
34364
34364
|
const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
34365
34365
|
try {
|
|
34366
|
-
const fh = await
|
|
34366
|
+
const fh = await fs37.promises.open(tmpPath, "w", 384);
|
|
34367
34367
|
try {
|
|
34368
34368
|
await fh.writeFile(JSON.stringify(data, null, 2));
|
|
34369
34369
|
await fh.sync();
|
|
34370
34370
|
} finally {
|
|
34371
34371
|
await fh.close();
|
|
34372
34372
|
}
|
|
34373
|
-
await
|
|
34373
|
+
await fs37.promises.rename(tmpPath, targetPath);
|
|
34374
34374
|
} catch (err) {
|
|
34375
|
-
await
|
|
34375
|
+
await fs37.promises.unlink(tmpPath).catch(() => {
|
|
34376
34376
|
});
|
|
34377
34377
|
throw err;
|
|
34378
34378
|
}
|
|
34379
34379
|
try {
|
|
34380
|
-
const dirFh = await
|
|
34380
|
+
const dirFh = await fs37.promises.open(dir, "r");
|
|
34381
34381
|
try {
|
|
34382
34382
|
await dirFh.sync();
|
|
34383
34383
|
} finally {
|
|
@@ -34679,12 +34679,12 @@ var loadConfigWithSource = async (profile) => {
|
|
|
34679
34679
|
return null;
|
|
34680
34680
|
}
|
|
34681
34681
|
validateProfileName(profileName);
|
|
34682
|
-
const
|
|
34682
|
+
const fs37 = await import("fs");
|
|
34683
34683
|
const path43 = await import("path");
|
|
34684
34684
|
const configPath = path43.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
34685
34685
|
let configRaw;
|
|
34686
34686
|
try {
|
|
34687
|
-
configRaw = await
|
|
34687
|
+
configRaw = await fs37.promises.readFile(configPath, "utf-8");
|
|
34688
34688
|
} catch (err) {
|
|
34689
34689
|
if (err?.code !== "ENOENT") {
|
|
34690
34690
|
throw new Error(`failed to read config file ${configPath}: ${err}`);
|
|
@@ -34812,11 +34812,11 @@ var getActiveProfileName = async () => {
|
|
|
34812
34812
|
if (profileName) {
|
|
34813
34813
|
return profileName;
|
|
34814
34814
|
}
|
|
34815
|
-
const
|
|
34815
|
+
const fs37 = await import("fs");
|
|
34816
34816
|
const path43 = await import("path");
|
|
34817
34817
|
const filePath = path43.join(rootConfigPath, "active_config");
|
|
34818
34818
|
try {
|
|
34819
|
-
return (await
|
|
34819
|
+
return (await fs37.promises.readFile(filePath, "utf-8")).trim() || "default";
|
|
34820
34820
|
} catch (err) {
|
|
34821
34821
|
if (err?.code !== "ENOENT") {
|
|
34822
34822
|
throw new Error(`failed to read ${filePath}: ${err}`);
|
|
@@ -34832,10 +34832,10 @@ function identityTokenFromFile(path43) {
|
|
|
34832
34832
|
throw new AnthropicError("Identity token file path is empty");
|
|
34833
34833
|
}
|
|
34834
34834
|
return async () => {
|
|
34835
|
-
const
|
|
34835
|
+
const fs37 = await import("fs");
|
|
34836
34836
|
let content;
|
|
34837
34837
|
try {
|
|
34838
|
-
content = await
|
|
34838
|
+
content = await fs37.promises.readFile(path43, "utf-8");
|
|
34839
34839
|
} catch (err) {
|
|
34840
34840
|
throw new AnthropicError(`Failed to read identity token file at ${path43}: ${err}`);
|
|
34841
34841
|
}
|
|
@@ -34916,11 +34916,11 @@ function oidcFederationProvider(config2) {
|
|
|
34916
34916
|
init_esm_shims();
|
|
34917
34917
|
function userOAuthProvider(config2) {
|
|
34918
34918
|
return async (opts) => {
|
|
34919
|
-
const
|
|
34919
|
+
const fs37 = await import("fs");
|
|
34920
34920
|
await checkCredentialsFileSafety(config2.credentialsPath, config2.onSafetyWarning);
|
|
34921
34921
|
let raw;
|
|
34922
34922
|
try {
|
|
34923
|
-
raw = await
|
|
34923
|
+
raw = await fs37.promises.readFile(config2.credentialsPath, "utf-8");
|
|
34924
34924
|
} catch (err) {
|
|
34925
34925
|
throw new WorkloadIdentityError(`Credentials file not found at ${config2.credentialsPath}: ${err}`);
|
|
34926
34926
|
}
|
|
@@ -35084,11 +35084,11 @@ function resolveIdentityTokenProvider(auth2) {
|
|
|
35084
35084
|
}
|
|
35085
35085
|
function cachedExchangeProvider(exchange, credentialsPath, onCacheWriteError, onSafetyWarning) {
|
|
35086
35086
|
return async (opts) => {
|
|
35087
|
-
const
|
|
35087
|
+
const fs37 = await import("fs");
|
|
35088
35088
|
await checkCredentialsFileSafety(credentialsPath, onSafetyWarning);
|
|
35089
35089
|
let existing;
|
|
35090
35090
|
try {
|
|
35091
|
-
const raw = await
|
|
35091
|
+
const raw = await fs37.promises.readFile(credentialsPath, "utf-8");
|
|
35092
35092
|
existing = JSON.parse(raw);
|
|
35093
35093
|
const token = existing?.["access_token"];
|
|
35094
35094
|
if (token && !opts?.forceRefresh) {
|
|
@@ -64703,11 +64703,11 @@ async function* runStream2(options) {
|
|
|
64703
64703
|
}
|
|
64704
64704
|
}
|
|
64705
64705
|
if (getEnvironment()?.GGAI_DUMP_REQUEST) {
|
|
64706
|
-
const
|
|
64706
|
+
const fs37 = await import("fs");
|
|
64707
64707
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
64708
64708
|
const dumpPath = `/tmp/ggai-request-${ts}.json`;
|
|
64709
|
-
|
|
64710
|
-
|
|
64709
|
+
fs37.writeFileSync(dumpPath, JSON.stringify(params, null, 2));
|
|
64710
|
+
fs37.appendFileSync(
|
|
64711
64711
|
"/tmp/ggai-requests.log",
|
|
64712
64712
|
`[${ts}] ${dumpPath} messages=${params.messages.length}
|
|
64713
64713
|
`
|
|
@@ -83263,18 +83263,752 @@ import readline2 from "readline";
|
|
|
83263
83263
|
init_esm_shims();
|
|
83264
83264
|
var import_react96 = __toESM(require_react(), 1);
|
|
83265
83265
|
|
|
83266
|
-
// ../../node_modules/.pnpm/
|
|
83266
|
+
// ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
|
|
83267
|
+
init_esm_shims();
|
|
83268
|
+
|
|
83269
|
+
// ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
|
|
83270
|
+
init_esm_shims();
|
|
83271
|
+
|
|
83272
|
+
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
83267
83273
|
init_esm_shims();
|
|
83268
83274
|
|
|
83269
|
-
// ../../node_modules/.pnpm/
|
|
83275
|
+
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
83276
|
+
init_esm_shims();
|
|
83277
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
83278
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
83279
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
83280
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
83281
|
+
const pattern = `${osc}|${csi}`;
|
|
83282
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
83283
|
+
}
|
|
83284
|
+
|
|
83285
|
+
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
83286
|
+
var regex = ansiRegex();
|
|
83287
|
+
function stripAnsi(string4) {
|
|
83288
|
+
if (typeof string4 !== "string") {
|
|
83289
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
83290
|
+
}
|
|
83291
|
+
if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
|
|
83292
|
+
return string4;
|
|
83293
|
+
}
|
|
83294
|
+
return string4.replace(regex, "");
|
|
83295
|
+
}
|
|
83296
|
+
|
|
83297
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
83298
|
+
init_esm_shims();
|
|
83299
|
+
|
|
83300
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
83301
|
+
init_esm_shims();
|
|
83302
|
+
|
|
83303
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
83304
|
+
init_esm_shims();
|
|
83305
|
+
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
83306
|
+
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
83307
|
+
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
83308
|
+
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
83309
|
+
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
83310
|
+
|
|
83311
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
83312
|
+
init_esm_shims();
|
|
83313
|
+
var isInRange = (ranges, codePoint) => {
|
|
83314
|
+
let low = 0;
|
|
83315
|
+
let high = Math.floor(ranges.length / 2) - 1;
|
|
83316
|
+
while (low <= high) {
|
|
83317
|
+
const mid = Math.floor((low + high) / 2);
|
|
83318
|
+
const i = mid * 2;
|
|
83319
|
+
if (codePoint < ranges[i]) {
|
|
83320
|
+
high = mid - 1;
|
|
83321
|
+
} else if (codePoint > ranges[i + 1]) {
|
|
83322
|
+
low = mid + 1;
|
|
83323
|
+
} else {
|
|
83324
|
+
return true;
|
|
83325
|
+
}
|
|
83326
|
+
}
|
|
83327
|
+
return false;
|
|
83328
|
+
};
|
|
83329
|
+
|
|
83330
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
83331
|
+
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
83332
|
+
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
83333
|
+
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
83334
|
+
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
83335
|
+
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
83336
|
+
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
83337
|
+
var minimumNarrowCodePoint = narrowRanges[0];
|
|
83338
|
+
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
83339
|
+
var minimumWideCodePoint = wideRanges[0];
|
|
83340
|
+
var maximumWideCodePoint = wideRanges.at(-1);
|
|
83341
|
+
var commonCjkCodePoint = 19968;
|
|
83342
|
+
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
83343
|
+
function findWideFastPathRange(ranges) {
|
|
83344
|
+
let fastPathStart = ranges[0];
|
|
83345
|
+
let fastPathEnd = ranges[1];
|
|
83346
|
+
for (let index = 0; index < ranges.length; index += 2) {
|
|
83347
|
+
const start = ranges[index];
|
|
83348
|
+
const end = ranges[index + 1];
|
|
83349
|
+
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
83350
|
+
return [start, end];
|
|
83351
|
+
}
|
|
83352
|
+
if (end - start > fastPathEnd - fastPathStart) {
|
|
83353
|
+
fastPathStart = start;
|
|
83354
|
+
fastPathEnd = end;
|
|
83355
|
+
}
|
|
83356
|
+
}
|
|
83357
|
+
return [fastPathStart, fastPathEnd];
|
|
83358
|
+
}
|
|
83359
|
+
var isAmbiguous = (codePoint) => {
|
|
83360
|
+
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
83361
|
+
return false;
|
|
83362
|
+
}
|
|
83363
|
+
return isInRange(ambiguousRanges, codePoint);
|
|
83364
|
+
};
|
|
83365
|
+
var isFullWidth = (codePoint) => {
|
|
83366
|
+
if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
|
|
83367
|
+
return false;
|
|
83368
|
+
}
|
|
83369
|
+
return isInRange(fullwidthRanges, codePoint);
|
|
83370
|
+
};
|
|
83371
|
+
var isWide = (codePoint) => {
|
|
83372
|
+
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
83373
|
+
return true;
|
|
83374
|
+
}
|
|
83375
|
+
if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
|
|
83376
|
+
return false;
|
|
83377
|
+
}
|
|
83378
|
+
return isInRange(wideRanges, codePoint);
|
|
83379
|
+
};
|
|
83380
|
+
|
|
83381
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
83382
|
+
function validate(codePoint) {
|
|
83383
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
83384
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
83385
|
+
}
|
|
83386
|
+
}
|
|
83387
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
83388
|
+
validate(codePoint);
|
|
83389
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
83390
|
+
return 2;
|
|
83391
|
+
}
|
|
83392
|
+
return 1;
|
|
83393
|
+
}
|
|
83394
|
+
|
|
83395
|
+
// ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
|
|
83396
|
+
var segmenter = new Intl.Segmenter();
|
|
83397
|
+
var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
83398
|
+
var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
83399
|
+
var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
83400
|
+
var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
|
|
83401
|
+
var extendedPictographicRegex = new RegExp("\\p{Extended_Pictographic}", "gu");
|
|
83402
|
+
function isDoubleWidthNonRgiEmojiSequence(segment) {
|
|
83403
|
+
if (segment.length > 50) {
|
|
83404
|
+
return false;
|
|
83405
|
+
}
|
|
83406
|
+
if (unqualifiedKeycapRegex.test(segment)) {
|
|
83407
|
+
return true;
|
|
83408
|
+
}
|
|
83409
|
+
if (segment.includes("\u200D")) {
|
|
83410
|
+
const pictographics = segment.match(extendedPictographicRegex);
|
|
83411
|
+
return pictographics !== null && pictographics.length >= 2;
|
|
83412
|
+
}
|
|
83413
|
+
return false;
|
|
83414
|
+
}
|
|
83415
|
+
function baseVisible(segment) {
|
|
83416
|
+
return segment.replace(leadingNonPrintingRegex, "");
|
|
83417
|
+
}
|
|
83418
|
+
function isZeroWidthCluster(segment) {
|
|
83419
|
+
return zeroWidthClusterRegex.test(segment);
|
|
83420
|
+
}
|
|
83421
|
+
function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
|
|
83422
|
+
let extra = 0;
|
|
83423
|
+
if (segment.length > 1) {
|
|
83424
|
+
for (const char of segment.slice(1)) {
|
|
83425
|
+
if (char >= "\uFF00" && char <= "\uFFEF") {
|
|
83426
|
+
extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
|
|
83427
|
+
}
|
|
83428
|
+
}
|
|
83429
|
+
}
|
|
83430
|
+
return extra;
|
|
83431
|
+
}
|
|
83432
|
+
function stringWidth(input, options = {}) {
|
|
83433
|
+
if (typeof input !== "string" || input.length === 0) {
|
|
83434
|
+
return 0;
|
|
83435
|
+
}
|
|
83436
|
+
const {
|
|
83437
|
+
ambiguousIsNarrow = true,
|
|
83438
|
+
countAnsiEscapeCodes = false
|
|
83439
|
+
} = options;
|
|
83440
|
+
let string4 = input;
|
|
83441
|
+
if (!countAnsiEscapeCodes && (string4.includes("\x1B") || string4.includes("\x9B"))) {
|
|
83442
|
+
string4 = stripAnsi(string4);
|
|
83443
|
+
}
|
|
83444
|
+
if (string4.length === 0) {
|
|
83445
|
+
return 0;
|
|
83446
|
+
}
|
|
83447
|
+
if (/^[\u0020-\u007E]*$/.test(string4)) {
|
|
83448
|
+
return string4.length;
|
|
83449
|
+
}
|
|
83450
|
+
let width = 0;
|
|
83451
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
83452
|
+
for (const { segment } of segmenter.segment(string4)) {
|
|
83453
|
+
if (isZeroWidthCluster(segment)) {
|
|
83454
|
+
continue;
|
|
83455
|
+
}
|
|
83456
|
+
if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
|
|
83457
|
+
width += 2;
|
|
83458
|
+
continue;
|
|
83459
|
+
}
|
|
83460
|
+
const codePoint = baseVisible(segment).codePointAt(0);
|
|
83461
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
83462
|
+
width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
|
|
83463
|
+
}
|
|
83464
|
+
return width;
|
|
83465
|
+
}
|
|
83466
|
+
|
|
83467
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
83468
|
+
init_esm_shims();
|
|
83469
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
83470
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
83471
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
83472
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
83473
|
+
var styles = {
|
|
83474
|
+
modifier: {
|
|
83475
|
+
reset: [0, 0],
|
|
83476
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
83477
|
+
bold: [1, 22],
|
|
83478
|
+
dim: [2, 22],
|
|
83479
|
+
italic: [3, 23],
|
|
83480
|
+
underline: [4, 24],
|
|
83481
|
+
overline: [53, 55],
|
|
83482
|
+
inverse: [7, 27],
|
|
83483
|
+
hidden: [8, 28],
|
|
83484
|
+
strikethrough: [9, 29]
|
|
83485
|
+
},
|
|
83486
|
+
color: {
|
|
83487
|
+
black: [30, 39],
|
|
83488
|
+
red: [31, 39],
|
|
83489
|
+
green: [32, 39],
|
|
83490
|
+
yellow: [33, 39],
|
|
83491
|
+
blue: [34, 39],
|
|
83492
|
+
magenta: [35, 39],
|
|
83493
|
+
cyan: [36, 39],
|
|
83494
|
+
white: [37, 39],
|
|
83495
|
+
// Bright color
|
|
83496
|
+
blackBright: [90, 39],
|
|
83497
|
+
gray: [90, 39],
|
|
83498
|
+
// Alias of `blackBright`
|
|
83499
|
+
grey: [90, 39],
|
|
83500
|
+
// Alias of `blackBright`
|
|
83501
|
+
redBright: [91, 39],
|
|
83502
|
+
greenBright: [92, 39],
|
|
83503
|
+
yellowBright: [93, 39],
|
|
83504
|
+
blueBright: [94, 39],
|
|
83505
|
+
magentaBright: [95, 39],
|
|
83506
|
+
cyanBright: [96, 39],
|
|
83507
|
+
whiteBright: [97, 39]
|
|
83508
|
+
},
|
|
83509
|
+
bgColor: {
|
|
83510
|
+
bgBlack: [40, 49],
|
|
83511
|
+
bgRed: [41, 49],
|
|
83512
|
+
bgGreen: [42, 49],
|
|
83513
|
+
bgYellow: [43, 49],
|
|
83514
|
+
bgBlue: [44, 49],
|
|
83515
|
+
bgMagenta: [45, 49],
|
|
83516
|
+
bgCyan: [46, 49],
|
|
83517
|
+
bgWhite: [47, 49],
|
|
83518
|
+
// Bright color
|
|
83519
|
+
bgBlackBright: [100, 49],
|
|
83520
|
+
bgGray: [100, 49],
|
|
83521
|
+
// Alias of `bgBlackBright`
|
|
83522
|
+
bgGrey: [100, 49],
|
|
83523
|
+
// Alias of `bgBlackBright`
|
|
83524
|
+
bgRedBright: [101, 49],
|
|
83525
|
+
bgGreenBright: [102, 49],
|
|
83526
|
+
bgYellowBright: [103, 49],
|
|
83527
|
+
bgBlueBright: [104, 49],
|
|
83528
|
+
bgMagentaBright: [105, 49],
|
|
83529
|
+
bgCyanBright: [106, 49],
|
|
83530
|
+
bgWhiteBright: [107, 49]
|
|
83531
|
+
}
|
|
83532
|
+
};
|
|
83533
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
83534
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
83535
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
83536
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
83537
|
+
function assembleStyles() {
|
|
83538
|
+
const codes = /* @__PURE__ */ new Map();
|
|
83539
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
83540
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
83541
|
+
styles[styleName] = {
|
|
83542
|
+
open: `\x1B[${style[0]}m`,
|
|
83543
|
+
close: `\x1B[${style[1]}m`
|
|
83544
|
+
};
|
|
83545
|
+
group[styleName] = styles[styleName];
|
|
83546
|
+
codes.set(style[0], style[1]);
|
|
83547
|
+
}
|
|
83548
|
+
Object.defineProperty(styles, groupName, {
|
|
83549
|
+
value: group,
|
|
83550
|
+
enumerable: false
|
|
83551
|
+
});
|
|
83552
|
+
}
|
|
83553
|
+
Object.defineProperty(styles, "codes", {
|
|
83554
|
+
value: codes,
|
|
83555
|
+
enumerable: false
|
|
83556
|
+
});
|
|
83557
|
+
styles.color.close = "\x1B[39m";
|
|
83558
|
+
styles.bgColor.close = "\x1B[49m";
|
|
83559
|
+
styles.color.ansi = wrapAnsi16();
|
|
83560
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
83561
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
83562
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
83563
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
83564
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
83565
|
+
Object.defineProperties(styles, {
|
|
83566
|
+
rgbToAnsi256: {
|
|
83567
|
+
value(red, green, blue) {
|
|
83568
|
+
if (red === green && green === blue) {
|
|
83569
|
+
if (red < 8) {
|
|
83570
|
+
return 16;
|
|
83571
|
+
}
|
|
83572
|
+
if (red > 248) {
|
|
83573
|
+
return 231;
|
|
83574
|
+
}
|
|
83575
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
83576
|
+
}
|
|
83577
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
83578
|
+
},
|
|
83579
|
+
enumerable: false
|
|
83580
|
+
},
|
|
83581
|
+
hexToRgb: {
|
|
83582
|
+
value(hex3) {
|
|
83583
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
|
|
83584
|
+
if (!matches) {
|
|
83585
|
+
return [0, 0, 0];
|
|
83586
|
+
}
|
|
83587
|
+
let [colorString] = matches;
|
|
83588
|
+
if (colorString.length === 3) {
|
|
83589
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
83590
|
+
}
|
|
83591
|
+
const integer2 = Number.parseInt(colorString, 16);
|
|
83592
|
+
return [
|
|
83593
|
+
/* eslint-disable no-bitwise */
|
|
83594
|
+
integer2 >> 16 & 255,
|
|
83595
|
+
integer2 >> 8 & 255,
|
|
83596
|
+
integer2 & 255
|
|
83597
|
+
/* eslint-enable no-bitwise */
|
|
83598
|
+
];
|
|
83599
|
+
},
|
|
83600
|
+
enumerable: false
|
|
83601
|
+
},
|
|
83602
|
+
hexToAnsi256: {
|
|
83603
|
+
value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
|
|
83604
|
+
enumerable: false
|
|
83605
|
+
},
|
|
83606
|
+
ansi256ToAnsi: {
|
|
83607
|
+
value(code) {
|
|
83608
|
+
if (code < 8) {
|
|
83609
|
+
return 30 + code;
|
|
83610
|
+
}
|
|
83611
|
+
if (code < 16) {
|
|
83612
|
+
return 90 + (code - 8);
|
|
83613
|
+
}
|
|
83614
|
+
let red;
|
|
83615
|
+
let green;
|
|
83616
|
+
let blue;
|
|
83617
|
+
if (code >= 232) {
|
|
83618
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
83619
|
+
green = red;
|
|
83620
|
+
blue = red;
|
|
83621
|
+
} else {
|
|
83622
|
+
code -= 16;
|
|
83623
|
+
const remainder = code % 36;
|
|
83624
|
+
red = Math.floor(code / 36) / 5;
|
|
83625
|
+
green = Math.floor(remainder / 6) / 5;
|
|
83626
|
+
blue = remainder % 6 / 5;
|
|
83627
|
+
}
|
|
83628
|
+
const value = Math.max(red, green, blue) * 2;
|
|
83629
|
+
if (value === 0) {
|
|
83630
|
+
return 30;
|
|
83631
|
+
}
|
|
83632
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
83633
|
+
if (value === 2) {
|
|
83634
|
+
result += 60;
|
|
83635
|
+
}
|
|
83636
|
+
return result;
|
|
83637
|
+
},
|
|
83638
|
+
enumerable: false
|
|
83639
|
+
},
|
|
83640
|
+
rgbToAnsi: {
|
|
83641
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
83642
|
+
enumerable: false
|
|
83643
|
+
},
|
|
83644
|
+
hexToAnsi: {
|
|
83645
|
+
value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
|
|
83646
|
+
enumerable: false
|
|
83647
|
+
}
|
|
83648
|
+
});
|
|
83649
|
+
return styles;
|
|
83650
|
+
}
|
|
83651
|
+
var ansiStyles = assembleStyles();
|
|
83652
|
+
var ansi_styles_default = ansiStyles;
|
|
83653
|
+
|
|
83654
|
+
// ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
|
|
83655
|
+
var ANSI_ESCAPE = "\x1B";
|
|
83656
|
+
var ANSI_ESCAPE_CSI = "\x9B";
|
|
83657
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
83658
|
+
ANSI_ESCAPE,
|
|
83659
|
+
ANSI_ESCAPE_CSI
|
|
83660
|
+
]);
|
|
83661
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
83662
|
+
var ANSI_CSI = "[";
|
|
83663
|
+
var ANSI_OSC = "]";
|
|
83664
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
83665
|
+
var ANSI_SGR_RESET = 0;
|
|
83666
|
+
var ANSI_SGR_RESET_FOREGROUND = 39;
|
|
83667
|
+
var ANSI_SGR_RESET_BACKGROUND = 49;
|
|
83668
|
+
var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
|
|
83669
|
+
var ANSI_SGR_FOREGROUND_EXTENDED = 38;
|
|
83670
|
+
var ANSI_SGR_BACKGROUND_EXTENDED = 48;
|
|
83671
|
+
var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
|
|
83672
|
+
var ANSI_SGR_COLOR_MODE_256 = 5;
|
|
83673
|
+
var ANSI_SGR_COLOR_MODE_RGB = 2;
|
|
83674
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
83675
|
+
var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}|${ANSI_ESCAPE_LINK}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
|
|
83676
|
+
var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}`);
|
|
83677
|
+
var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
|
|
83678
|
+
ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
|
|
83679
|
+
var segmenter2 = new Intl.Segmenter();
|
|
83680
|
+
var getGraphemes = (string4) => Array.from(segmenter2.segment(string4), ({ segment }) => segment);
|
|
83681
|
+
var TAB_SIZE = 8;
|
|
83682
|
+
var wrapAnsiCode = (code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
83683
|
+
var wrapAnsiHyperlink = (url2) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${url2}${ANSI_ESCAPE_BELL}`;
|
|
83684
|
+
var getSgrTokens = (sgrParameters) => {
|
|
83685
|
+
const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
|
|
83686
|
+
const sgrTokens = [];
|
|
83687
|
+
for (let index = 0; index < codes.length; index++) {
|
|
83688
|
+
const code = codes[index];
|
|
83689
|
+
if (!Number.isFinite(code)) {
|
|
83690
|
+
continue;
|
|
83691
|
+
}
|
|
83692
|
+
if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
|
|
83693
|
+
if (index + 1 >= codes.length) {
|
|
83694
|
+
break;
|
|
83695
|
+
}
|
|
83696
|
+
const mode = codes[index + 1];
|
|
83697
|
+
if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
|
|
83698
|
+
sgrTokens.push([code, mode, codes[index + 2]]);
|
|
83699
|
+
index += 2;
|
|
83700
|
+
continue;
|
|
83701
|
+
}
|
|
83702
|
+
const red = codes[index + 2];
|
|
83703
|
+
const green = codes[index + 3];
|
|
83704
|
+
const blue = codes[index + 4];
|
|
83705
|
+
if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
|
|
83706
|
+
sgrTokens.push([code, mode, red, green, blue]);
|
|
83707
|
+
index += 4;
|
|
83708
|
+
continue;
|
|
83709
|
+
}
|
|
83710
|
+
break;
|
|
83711
|
+
}
|
|
83712
|
+
sgrTokens.push([code]);
|
|
83713
|
+
}
|
|
83714
|
+
return sgrTokens;
|
|
83715
|
+
};
|
|
83716
|
+
var removeActiveStyle = (activeStyles, family) => {
|
|
83717
|
+
const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
|
|
83718
|
+
if (activeStyleIndex !== -1) {
|
|
83719
|
+
activeStyles.splice(activeStyleIndex, 1);
|
|
83720
|
+
}
|
|
83721
|
+
};
|
|
83722
|
+
var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
|
|
83723
|
+
removeActiveStyle(activeStyles, nextActiveStyle.family);
|
|
83724
|
+
activeStyles.push(nextActiveStyle);
|
|
83725
|
+
};
|
|
83726
|
+
var removeModifierStylesByClose = (activeStyles, closeCode) => {
|
|
83727
|
+
for (let index = activeStyles.length - 1; index >= 0; index--) {
|
|
83728
|
+
const activeStyle = activeStyles[index];
|
|
83729
|
+
if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
|
|
83730
|
+
activeStyles.splice(index, 1);
|
|
83731
|
+
}
|
|
83732
|
+
}
|
|
83733
|
+
};
|
|
83734
|
+
var getColorStyle = (code, sgrToken) => {
|
|
83735
|
+
if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
|
|
83736
|
+
return {
|
|
83737
|
+
family: "foreground",
|
|
83738
|
+
open: sgrToken.join(";"),
|
|
83739
|
+
close: ANSI_SGR_RESET_FOREGROUND
|
|
83740
|
+
};
|
|
83741
|
+
}
|
|
83742
|
+
if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
|
|
83743
|
+
return {
|
|
83744
|
+
family: "background",
|
|
83745
|
+
open: sgrToken.join(";"),
|
|
83746
|
+
close: ANSI_SGR_RESET_BACKGROUND
|
|
83747
|
+
};
|
|
83748
|
+
}
|
|
83749
|
+
if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
|
|
83750
|
+
return {
|
|
83751
|
+
family: "underlineColor",
|
|
83752
|
+
open: sgrToken.join(";"),
|
|
83753
|
+
close: ANSI_SGR_RESET_UNDERLINE_COLOR
|
|
83754
|
+
};
|
|
83755
|
+
}
|
|
83756
|
+
};
|
|
83757
|
+
var applySgrResetCode = (code, activeStyles) => {
|
|
83758
|
+
if (code === ANSI_SGR_RESET) {
|
|
83759
|
+
activeStyles.length = 0;
|
|
83760
|
+
return true;
|
|
83761
|
+
}
|
|
83762
|
+
if (code === ANSI_SGR_RESET_FOREGROUND) {
|
|
83763
|
+
removeActiveStyle(activeStyles, "foreground");
|
|
83764
|
+
return true;
|
|
83765
|
+
}
|
|
83766
|
+
if (code === ANSI_SGR_RESET_BACKGROUND) {
|
|
83767
|
+
removeActiveStyle(activeStyles, "background");
|
|
83768
|
+
return true;
|
|
83769
|
+
}
|
|
83770
|
+
if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
|
|
83771
|
+
removeActiveStyle(activeStyles, "underlineColor");
|
|
83772
|
+
return true;
|
|
83773
|
+
}
|
|
83774
|
+
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
|
|
83775
|
+
removeModifierStylesByClose(activeStyles, code);
|
|
83776
|
+
return true;
|
|
83777
|
+
}
|
|
83778
|
+
return false;
|
|
83779
|
+
};
|
|
83780
|
+
var applySgrToken = (sgrToken, activeStyles) => {
|
|
83781
|
+
const [code] = sgrToken;
|
|
83782
|
+
if (applySgrResetCode(code, activeStyles)) {
|
|
83783
|
+
return;
|
|
83784
|
+
}
|
|
83785
|
+
const colorStyle = getColorStyle(code, sgrToken);
|
|
83786
|
+
if (colorStyle) {
|
|
83787
|
+
upsertActiveStyle(activeStyles, colorStyle);
|
|
83788
|
+
return;
|
|
83789
|
+
}
|
|
83790
|
+
const close = ansi_styles_default.codes.get(code);
|
|
83791
|
+
if (close !== void 0 && close !== ANSI_SGR_RESET) {
|
|
83792
|
+
upsertActiveStyle(activeStyles, {
|
|
83793
|
+
family: `modifier-${code}`,
|
|
83794
|
+
open: sgrToken.join(";"),
|
|
83795
|
+
close
|
|
83796
|
+
});
|
|
83797
|
+
}
|
|
83798
|
+
};
|
|
83799
|
+
var applySgrParameters = (sgrParameters, activeStyles) => {
|
|
83800
|
+
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
83801
|
+
applySgrToken(sgrToken, activeStyles);
|
|
83802
|
+
}
|
|
83803
|
+
};
|
|
83804
|
+
var applySgrResets = (sgrParameters, activeStyles) => {
|
|
83805
|
+
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
83806
|
+
const [code] = sgrToken;
|
|
83807
|
+
applySgrResetCode(code, activeStyles);
|
|
83808
|
+
}
|
|
83809
|
+
};
|
|
83810
|
+
var applyLeadingSgrResets = (string4, activeStyles) => {
|
|
83811
|
+
let remainder = string4;
|
|
83812
|
+
while (remainder.length > 0) {
|
|
83813
|
+
if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
|
|
83814
|
+
const match = ANSI_ESCAPE_REGEX.exec(remainder);
|
|
83815
|
+
if (!match) {
|
|
83816
|
+
break;
|
|
83817
|
+
}
|
|
83818
|
+
if (match.groups.sgr !== void 0) {
|
|
83819
|
+
applySgrResets(match.groups.sgr, activeStyles);
|
|
83820
|
+
}
|
|
83821
|
+
remainder = remainder.slice(match[0].length);
|
|
83822
|
+
continue;
|
|
83823
|
+
}
|
|
83824
|
+
if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
|
|
83825
|
+
const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
|
|
83826
|
+
if (!match || match.groups.sgr === void 0) {
|
|
83827
|
+
break;
|
|
83828
|
+
}
|
|
83829
|
+
applySgrResets(match.groups.sgr, activeStyles);
|
|
83830
|
+
remainder = remainder.slice(match[0].length);
|
|
83831
|
+
continue;
|
|
83832
|
+
}
|
|
83833
|
+
break;
|
|
83834
|
+
}
|
|
83835
|
+
};
|
|
83836
|
+
var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join("");
|
|
83837
|
+
var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join("");
|
|
83838
|
+
var wordLengths = (string4) => string4.split(" ").map((word) => stringWidth(word));
|
|
83839
|
+
var wrapWord = (rows, word, columns) => {
|
|
83840
|
+
const characters = getGraphemes(word);
|
|
83841
|
+
let isInsideEscape = false;
|
|
83842
|
+
let isInsideLinkEscape = false;
|
|
83843
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
83844
|
+
for (const [index, character] of characters.entries()) {
|
|
83845
|
+
const characterLength = stringWidth(character);
|
|
83846
|
+
if (visible + characterLength <= columns) {
|
|
83847
|
+
rows[rows.length - 1] += character;
|
|
83848
|
+
} else {
|
|
83849
|
+
rows.push(character);
|
|
83850
|
+
visible = 0;
|
|
83851
|
+
}
|
|
83852
|
+
if (ESCAPES.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
|
|
83853
|
+
isInsideEscape = true;
|
|
83854
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
83855
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
83856
|
+
}
|
|
83857
|
+
if (isInsideEscape) {
|
|
83858
|
+
if (isInsideLinkEscape) {
|
|
83859
|
+
if (character === ANSI_ESCAPE_BELL || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
|
|
83860
|
+
isInsideEscape = false;
|
|
83861
|
+
isInsideLinkEscape = false;
|
|
83862
|
+
}
|
|
83863
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
83864
|
+
isInsideEscape = false;
|
|
83865
|
+
}
|
|
83866
|
+
continue;
|
|
83867
|
+
}
|
|
83868
|
+
visible += characterLength;
|
|
83869
|
+
if (visible === columns && index < characters.length - 1) {
|
|
83870
|
+
rows.push("");
|
|
83871
|
+
visible = 0;
|
|
83872
|
+
}
|
|
83873
|
+
}
|
|
83874
|
+
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
83875
|
+
rows[rows.length - 2] += rows.pop();
|
|
83876
|
+
}
|
|
83877
|
+
};
|
|
83878
|
+
var stringVisibleTrimSpacesRight = (string4) => {
|
|
83879
|
+
const words = string4.split(" ");
|
|
83880
|
+
let last = words.length;
|
|
83881
|
+
while (last > 0) {
|
|
83882
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
83883
|
+
break;
|
|
83884
|
+
}
|
|
83885
|
+
last--;
|
|
83886
|
+
}
|
|
83887
|
+
if (last === words.length) {
|
|
83888
|
+
return string4;
|
|
83889
|
+
}
|
|
83890
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
83891
|
+
};
|
|
83892
|
+
var expandTabs = (line) => {
|
|
83893
|
+
if (!line.includes(" ")) {
|
|
83894
|
+
return line;
|
|
83895
|
+
}
|
|
83896
|
+
const segments = line.split(" ");
|
|
83897
|
+
let visible = 0;
|
|
83898
|
+
let expandedLine = "";
|
|
83899
|
+
for (const [index, segment] of segments.entries()) {
|
|
83900
|
+
expandedLine += segment;
|
|
83901
|
+
visible += stringWidth(segment);
|
|
83902
|
+
if (index < segments.length - 1) {
|
|
83903
|
+
const spaces = TAB_SIZE - visible % TAB_SIZE;
|
|
83904
|
+
expandedLine += " ".repeat(spaces);
|
|
83905
|
+
visible += spaces;
|
|
83906
|
+
}
|
|
83907
|
+
}
|
|
83908
|
+
return expandedLine;
|
|
83909
|
+
};
|
|
83910
|
+
var exec = (string4, columns, options = {}) => {
|
|
83911
|
+
if (options.trim !== false && string4.trim() === "") {
|
|
83912
|
+
return "";
|
|
83913
|
+
}
|
|
83914
|
+
let returnValue = "";
|
|
83915
|
+
let escapeUrl;
|
|
83916
|
+
const activeStyles = [];
|
|
83917
|
+
const lengths = wordLengths(string4);
|
|
83918
|
+
let rows = [""];
|
|
83919
|
+
for (const [index, word] of string4.split(" ").entries()) {
|
|
83920
|
+
if (options.trim !== false) {
|
|
83921
|
+
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
83922
|
+
}
|
|
83923
|
+
let rowLength = stringWidth(rows.at(-1));
|
|
83924
|
+
if (index !== 0) {
|
|
83925
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
83926
|
+
rows.push("");
|
|
83927
|
+
rowLength = 0;
|
|
83928
|
+
}
|
|
83929
|
+
if (rowLength > 0 || options.trim === false) {
|
|
83930
|
+
rows[rows.length - 1] += " ";
|
|
83931
|
+
rowLength++;
|
|
83932
|
+
}
|
|
83933
|
+
}
|
|
83934
|
+
if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
|
|
83935
|
+
const remainingColumns = columns - rowLength;
|
|
83936
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
83937
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
83938
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
83939
|
+
rows.push("");
|
|
83940
|
+
}
|
|
83941
|
+
wrapWord(rows, word, columns);
|
|
83942
|
+
continue;
|
|
83943
|
+
}
|
|
83944
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
83945
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
83946
|
+
wrapWord(rows, word, columns);
|
|
83947
|
+
continue;
|
|
83948
|
+
}
|
|
83949
|
+
rows.push("");
|
|
83950
|
+
}
|
|
83951
|
+
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
83952
|
+
wrapWord(rows, word, columns);
|
|
83953
|
+
continue;
|
|
83954
|
+
}
|
|
83955
|
+
rows[rows.length - 1] += word;
|
|
83956
|
+
}
|
|
83957
|
+
if (options.trim !== false) {
|
|
83958
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
83959
|
+
}
|
|
83960
|
+
const preString = rows.join("\n");
|
|
83961
|
+
const pre = getGraphemes(preString);
|
|
83962
|
+
let preStringIndex = 0;
|
|
83963
|
+
for (const [index, character] of pre.entries()) {
|
|
83964
|
+
returnValue += character;
|
|
83965
|
+
if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
|
|
83966
|
+
const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
83967
|
+
if (groups.sgr !== void 0) {
|
|
83968
|
+
applySgrParameters(groups.sgr, activeStyles);
|
|
83969
|
+
} else if (groups.uri !== void 0) {
|
|
83970
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
83971
|
+
}
|
|
83972
|
+
} else if (character === ANSI_ESCAPE_CSI) {
|
|
83973
|
+
const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
83974
|
+
if (groups.sgr !== void 0) {
|
|
83975
|
+
applySgrParameters(groups.sgr, activeStyles);
|
|
83976
|
+
}
|
|
83977
|
+
}
|
|
83978
|
+
if (pre[index + 1] === "\n") {
|
|
83979
|
+
if (escapeUrl) {
|
|
83980
|
+
returnValue += wrapAnsiHyperlink("");
|
|
83981
|
+
}
|
|
83982
|
+
returnValue += getClosingSgrSequence(activeStyles);
|
|
83983
|
+
} else if (character === "\n") {
|
|
83984
|
+
const openingStyles = [...activeStyles];
|
|
83985
|
+
applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
|
|
83986
|
+
returnValue += getOpeningSgrSequence(openingStyles);
|
|
83987
|
+
if (escapeUrl) {
|
|
83988
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
83989
|
+
}
|
|
83990
|
+
}
|
|
83991
|
+
preStringIndex += character.length;
|
|
83992
|
+
}
|
|
83993
|
+
return returnValue;
|
|
83994
|
+
};
|
|
83995
|
+
function wrapAnsi(string4, columns, options) {
|
|
83996
|
+
return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
|
|
83997
|
+
}
|
|
83998
|
+
|
|
83999
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/index.js
|
|
84000
|
+
init_esm_shims();
|
|
84001
|
+
|
|
84002
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
|
|
83270
84003
|
init_esm_shims();
|
|
83271
84004
|
import { Stream as Stream3 } from "stream";
|
|
83272
84005
|
import process14 from "process";
|
|
83273
84006
|
|
|
83274
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
84007
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
|
|
83275
84008
|
init_esm_shims();
|
|
83276
84009
|
var import_react15 = __toESM(require_react(), 1);
|
|
83277
84010
|
import process13 from "process";
|
|
84011
|
+
import fs31 from "fs";
|
|
83278
84012
|
|
|
83279
84013
|
// ../../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/index.mjs
|
|
83280
84014
|
init_esm_shims();
|
|
@@ -83648,7 +84382,7 @@ function autoBind(self, { include, exclude } = {}) {
|
|
|
83648
84382
|
return self;
|
|
83649
84383
|
}
|
|
83650
84384
|
|
|
83651
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
84385
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
|
|
83652
84386
|
var import_signal_exit2 = __toESM(require_signal_exit(), 1);
|
|
83653
84387
|
|
|
83654
84388
|
// ../../node_modules/.pnpm/patch-console@2.0.0/node_modules/patch-console/dist/index.js
|
|
@@ -83698,7 +84432,7 @@ var patchConsole = (callback) => {
|
|
|
83698
84432
|
};
|
|
83699
84433
|
var dist_default = patchConsole;
|
|
83700
84434
|
|
|
83701
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
84435
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
|
|
83702
84436
|
var import_constants4 = __toESM(require_constants(), 1);
|
|
83703
84437
|
|
|
83704
84438
|
// ../../node_modules/.pnpm/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/index.js
|
|
@@ -85254,129 +85988,6 @@ init_esm_shims();
|
|
|
85254
85988
|
// ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
85255
85989
|
init_esm_shims();
|
|
85256
85990
|
|
|
85257
|
-
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
85258
|
-
init_esm_shims();
|
|
85259
|
-
|
|
85260
|
-
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
85261
|
-
init_esm_shims();
|
|
85262
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
85263
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
85264
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
85265
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
85266
|
-
const pattern = `${osc}|${csi}`;
|
|
85267
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
85268
|
-
}
|
|
85269
|
-
|
|
85270
|
-
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
85271
|
-
var regex = ansiRegex();
|
|
85272
|
-
function stripAnsi(string4) {
|
|
85273
|
-
if (typeof string4 !== "string") {
|
|
85274
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
85275
|
-
}
|
|
85276
|
-
if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
|
|
85277
|
-
return string4;
|
|
85278
|
-
}
|
|
85279
|
-
return string4.replace(regex, "");
|
|
85280
|
-
}
|
|
85281
|
-
|
|
85282
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
85283
|
-
init_esm_shims();
|
|
85284
|
-
|
|
85285
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
85286
|
-
init_esm_shims();
|
|
85287
|
-
|
|
85288
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
85289
|
-
init_esm_shims();
|
|
85290
|
-
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
85291
|
-
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
85292
|
-
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
85293
|
-
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
85294
|
-
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
85295
|
-
|
|
85296
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
85297
|
-
init_esm_shims();
|
|
85298
|
-
var isInRange = (ranges, codePoint) => {
|
|
85299
|
-
let low = 0;
|
|
85300
|
-
let high = Math.floor(ranges.length / 2) - 1;
|
|
85301
|
-
while (low <= high) {
|
|
85302
|
-
const mid = Math.floor((low + high) / 2);
|
|
85303
|
-
const i = mid * 2;
|
|
85304
|
-
if (codePoint < ranges[i]) {
|
|
85305
|
-
high = mid - 1;
|
|
85306
|
-
} else if (codePoint > ranges[i + 1]) {
|
|
85307
|
-
low = mid + 1;
|
|
85308
|
-
} else {
|
|
85309
|
-
return true;
|
|
85310
|
-
}
|
|
85311
|
-
}
|
|
85312
|
-
return false;
|
|
85313
|
-
};
|
|
85314
|
-
|
|
85315
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
85316
|
-
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
85317
|
-
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
85318
|
-
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
85319
|
-
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
85320
|
-
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
85321
|
-
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
85322
|
-
var minimumNarrowCodePoint = narrowRanges[0];
|
|
85323
|
-
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
85324
|
-
var minimumWideCodePoint = wideRanges[0];
|
|
85325
|
-
var maximumWideCodePoint = wideRanges.at(-1);
|
|
85326
|
-
var commonCjkCodePoint = 19968;
|
|
85327
|
-
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
85328
|
-
function findWideFastPathRange(ranges) {
|
|
85329
|
-
let fastPathStart = ranges[0];
|
|
85330
|
-
let fastPathEnd = ranges[1];
|
|
85331
|
-
for (let index = 0; index < ranges.length; index += 2) {
|
|
85332
|
-
const start = ranges[index];
|
|
85333
|
-
const end = ranges[index + 1];
|
|
85334
|
-
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
85335
|
-
return [start, end];
|
|
85336
|
-
}
|
|
85337
|
-
if (end - start > fastPathEnd - fastPathStart) {
|
|
85338
|
-
fastPathStart = start;
|
|
85339
|
-
fastPathEnd = end;
|
|
85340
|
-
}
|
|
85341
|
-
}
|
|
85342
|
-
return [fastPathStart, fastPathEnd];
|
|
85343
|
-
}
|
|
85344
|
-
var isAmbiguous = (codePoint) => {
|
|
85345
|
-
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
85346
|
-
return false;
|
|
85347
|
-
}
|
|
85348
|
-
return isInRange(ambiguousRanges, codePoint);
|
|
85349
|
-
};
|
|
85350
|
-
var isFullWidth = (codePoint) => {
|
|
85351
|
-
if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
|
|
85352
|
-
return false;
|
|
85353
|
-
}
|
|
85354
|
-
return isInRange(fullwidthRanges, codePoint);
|
|
85355
|
-
};
|
|
85356
|
-
var isWide = (codePoint) => {
|
|
85357
|
-
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
85358
|
-
return true;
|
|
85359
|
-
}
|
|
85360
|
-
if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
|
|
85361
|
-
return false;
|
|
85362
|
-
}
|
|
85363
|
-
return isInRange(wideRanges, codePoint);
|
|
85364
|
-
};
|
|
85365
|
-
|
|
85366
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
85367
|
-
function validate(codePoint) {
|
|
85368
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
85369
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
85370
|
-
}
|
|
85371
|
-
}
|
|
85372
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
85373
|
-
validate(codePoint);
|
|
85374
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
85375
|
-
return 2;
|
|
85376
|
-
}
|
|
85377
|
-
return 1;
|
|
85378
|
-
}
|
|
85379
|
-
|
|
85380
85991
|
// ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
85381
85992
|
init_esm_shims();
|
|
85382
85993
|
var emoji_regex_default = () => {
|
|
@@ -85384,9 +85995,9 @@ var emoji_regex_default = () => {
|
|
|
85384
85995
|
};
|
|
85385
85996
|
|
|
85386
85997
|
// ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
85387
|
-
var
|
|
85998
|
+
var segmenter3 = new Intl.Segmenter();
|
|
85388
85999
|
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
85389
|
-
function
|
|
86000
|
+
function stringWidth2(string4, options = {}) {
|
|
85390
86001
|
if (typeof string4 !== "string" || string4.length === 0) {
|
|
85391
86002
|
return 0;
|
|
85392
86003
|
}
|
|
@@ -85402,7 +86013,7 @@ function stringWidth(string4, options = {}) {
|
|
|
85402
86013
|
}
|
|
85403
86014
|
let width = 0;
|
|
85404
86015
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
85405
|
-
for (const { segment: character } of
|
|
86016
|
+
for (const { segment: character } of segmenter3.segment(string4)) {
|
|
85406
86017
|
const codePoint = character.codePointAt(0);
|
|
85407
86018
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
85408
86019
|
continue;
|
|
@@ -85431,232 +86042,45 @@ function stringWidth(string4, options = {}) {
|
|
|
85431
86042
|
return width;
|
|
85432
86043
|
}
|
|
85433
86044
|
|
|
85434
|
-
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
85435
|
-
init_esm_shims();
|
|
85436
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
85437
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
85438
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
85439
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
85440
|
-
var styles = {
|
|
85441
|
-
modifier: {
|
|
85442
|
-
reset: [0, 0],
|
|
85443
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
85444
|
-
bold: [1, 22],
|
|
85445
|
-
dim: [2, 22],
|
|
85446
|
-
italic: [3, 23],
|
|
85447
|
-
underline: [4, 24],
|
|
85448
|
-
overline: [53, 55],
|
|
85449
|
-
inverse: [7, 27],
|
|
85450
|
-
hidden: [8, 28],
|
|
85451
|
-
strikethrough: [9, 29]
|
|
85452
|
-
},
|
|
85453
|
-
color: {
|
|
85454
|
-
black: [30, 39],
|
|
85455
|
-
red: [31, 39],
|
|
85456
|
-
green: [32, 39],
|
|
85457
|
-
yellow: [33, 39],
|
|
85458
|
-
blue: [34, 39],
|
|
85459
|
-
magenta: [35, 39],
|
|
85460
|
-
cyan: [36, 39],
|
|
85461
|
-
white: [37, 39],
|
|
85462
|
-
// Bright color
|
|
85463
|
-
blackBright: [90, 39],
|
|
85464
|
-
gray: [90, 39],
|
|
85465
|
-
// Alias of `blackBright`
|
|
85466
|
-
grey: [90, 39],
|
|
85467
|
-
// Alias of `blackBright`
|
|
85468
|
-
redBright: [91, 39],
|
|
85469
|
-
greenBright: [92, 39],
|
|
85470
|
-
yellowBright: [93, 39],
|
|
85471
|
-
blueBright: [94, 39],
|
|
85472
|
-
magentaBright: [95, 39],
|
|
85473
|
-
cyanBright: [96, 39],
|
|
85474
|
-
whiteBright: [97, 39]
|
|
85475
|
-
},
|
|
85476
|
-
bgColor: {
|
|
85477
|
-
bgBlack: [40, 49],
|
|
85478
|
-
bgRed: [41, 49],
|
|
85479
|
-
bgGreen: [42, 49],
|
|
85480
|
-
bgYellow: [43, 49],
|
|
85481
|
-
bgBlue: [44, 49],
|
|
85482
|
-
bgMagenta: [45, 49],
|
|
85483
|
-
bgCyan: [46, 49],
|
|
85484
|
-
bgWhite: [47, 49],
|
|
85485
|
-
// Bright color
|
|
85486
|
-
bgBlackBright: [100, 49],
|
|
85487
|
-
bgGray: [100, 49],
|
|
85488
|
-
// Alias of `bgBlackBright`
|
|
85489
|
-
bgGrey: [100, 49],
|
|
85490
|
-
// Alias of `bgBlackBright`
|
|
85491
|
-
bgRedBright: [101, 49],
|
|
85492
|
-
bgGreenBright: [102, 49],
|
|
85493
|
-
bgYellowBright: [103, 49],
|
|
85494
|
-
bgBlueBright: [104, 49],
|
|
85495
|
-
bgMagentaBright: [105, 49],
|
|
85496
|
-
bgCyanBright: [106, 49],
|
|
85497
|
-
bgWhiteBright: [107, 49]
|
|
85498
|
-
}
|
|
85499
|
-
};
|
|
85500
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
85501
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
85502
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
85503
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
85504
|
-
function assembleStyles() {
|
|
85505
|
-
const codes = /* @__PURE__ */ new Map();
|
|
85506
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
85507
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
85508
|
-
styles[styleName] = {
|
|
85509
|
-
open: `\x1B[${style[0]}m`,
|
|
85510
|
-
close: `\x1B[${style[1]}m`
|
|
85511
|
-
};
|
|
85512
|
-
group[styleName] = styles[styleName];
|
|
85513
|
-
codes.set(style[0], style[1]);
|
|
85514
|
-
}
|
|
85515
|
-
Object.defineProperty(styles, groupName, {
|
|
85516
|
-
value: group,
|
|
85517
|
-
enumerable: false
|
|
85518
|
-
});
|
|
85519
|
-
}
|
|
85520
|
-
Object.defineProperty(styles, "codes", {
|
|
85521
|
-
value: codes,
|
|
85522
|
-
enumerable: false
|
|
85523
|
-
});
|
|
85524
|
-
styles.color.close = "\x1B[39m";
|
|
85525
|
-
styles.bgColor.close = "\x1B[49m";
|
|
85526
|
-
styles.color.ansi = wrapAnsi16();
|
|
85527
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
85528
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
85529
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
85530
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
85531
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
85532
|
-
Object.defineProperties(styles, {
|
|
85533
|
-
rgbToAnsi256: {
|
|
85534
|
-
value(red, green, blue) {
|
|
85535
|
-
if (red === green && green === blue) {
|
|
85536
|
-
if (red < 8) {
|
|
85537
|
-
return 16;
|
|
85538
|
-
}
|
|
85539
|
-
if (red > 248) {
|
|
85540
|
-
return 231;
|
|
85541
|
-
}
|
|
85542
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
85543
|
-
}
|
|
85544
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
85545
|
-
},
|
|
85546
|
-
enumerable: false
|
|
85547
|
-
},
|
|
85548
|
-
hexToRgb: {
|
|
85549
|
-
value(hex3) {
|
|
85550
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
|
|
85551
|
-
if (!matches) {
|
|
85552
|
-
return [0, 0, 0];
|
|
85553
|
-
}
|
|
85554
|
-
let [colorString] = matches;
|
|
85555
|
-
if (colorString.length === 3) {
|
|
85556
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
85557
|
-
}
|
|
85558
|
-
const integer2 = Number.parseInt(colorString, 16);
|
|
85559
|
-
return [
|
|
85560
|
-
/* eslint-disable no-bitwise */
|
|
85561
|
-
integer2 >> 16 & 255,
|
|
85562
|
-
integer2 >> 8 & 255,
|
|
85563
|
-
integer2 & 255
|
|
85564
|
-
/* eslint-enable no-bitwise */
|
|
85565
|
-
];
|
|
85566
|
-
},
|
|
85567
|
-
enumerable: false
|
|
85568
|
-
},
|
|
85569
|
-
hexToAnsi256: {
|
|
85570
|
-
value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
|
|
85571
|
-
enumerable: false
|
|
85572
|
-
},
|
|
85573
|
-
ansi256ToAnsi: {
|
|
85574
|
-
value(code) {
|
|
85575
|
-
if (code < 8) {
|
|
85576
|
-
return 30 + code;
|
|
85577
|
-
}
|
|
85578
|
-
if (code < 16) {
|
|
85579
|
-
return 90 + (code - 8);
|
|
85580
|
-
}
|
|
85581
|
-
let red;
|
|
85582
|
-
let green;
|
|
85583
|
-
let blue;
|
|
85584
|
-
if (code >= 232) {
|
|
85585
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
85586
|
-
green = red;
|
|
85587
|
-
blue = red;
|
|
85588
|
-
} else {
|
|
85589
|
-
code -= 16;
|
|
85590
|
-
const remainder = code % 36;
|
|
85591
|
-
red = Math.floor(code / 36) / 5;
|
|
85592
|
-
green = Math.floor(remainder / 6) / 5;
|
|
85593
|
-
blue = remainder % 6 / 5;
|
|
85594
|
-
}
|
|
85595
|
-
const value = Math.max(red, green, blue) * 2;
|
|
85596
|
-
if (value === 0) {
|
|
85597
|
-
return 30;
|
|
85598
|
-
}
|
|
85599
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
85600
|
-
if (value === 2) {
|
|
85601
|
-
result += 60;
|
|
85602
|
-
}
|
|
85603
|
-
return result;
|
|
85604
|
-
},
|
|
85605
|
-
enumerable: false
|
|
85606
|
-
},
|
|
85607
|
-
rgbToAnsi: {
|
|
85608
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
85609
|
-
enumerable: false
|
|
85610
|
-
},
|
|
85611
|
-
hexToAnsi: {
|
|
85612
|
-
value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
|
|
85613
|
-
enumerable: false
|
|
85614
|
-
}
|
|
85615
|
-
});
|
|
85616
|
-
return styles;
|
|
85617
|
-
}
|
|
85618
|
-
var ansiStyles = assembleStyles();
|
|
85619
|
-
var ansi_styles_default = ansiStyles;
|
|
85620
|
-
|
|
85621
86045
|
// ../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
|
|
85622
|
-
var
|
|
86046
|
+
var ESCAPES2 = /* @__PURE__ */ new Set([
|
|
85623
86047
|
"\x1B",
|
|
85624
86048
|
"\x9B"
|
|
85625
86049
|
]);
|
|
85626
86050
|
var END_CODE = 39;
|
|
85627
|
-
var
|
|
85628
|
-
var
|
|
85629
|
-
var
|
|
85630
|
-
var
|
|
85631
|
-
var
|
|
85632
|
-
var
|
|
85633
|
-
var
|
|
85634
|
-
var
|
|
85635
|
-
var
|
|
86051
|
+
var ANSI_ESCAPE_BELL2 = "\x07";
|
|
86052
|
+
var ANSI_CSI2 = "[";
|
|
86053
|
+
var ANSI_OSC2 = "]";
|
|
86054
|
+
var ANSI_SGR_TERMINATOR2 = "m";
|
|
86055
|
+
var ANSI_ESCAPE_LINK2 = `${ANSI_OSC2}8;;`;
|
|
86056
|
+
var wrapAnsiCode2 = (code) => `${ESCAPES2.values().next().value}${ANSI_CSI2}${code}${ANSI_SGR_TERMINATOR2}`;
|
|
86057
|
+
var wrapAnsiHyperlink2 = (url2) => `${ESCAPES2.values().next().value}${ANSI_ESCAPE_LINK2}${url2}${ANSI_ESCAPE_BELL2}`;
|
|
86058
|
+
var wordLengths2 = (string4) => string4.split(" ").map((character) => stringWidth2(character));
|
|
86059
|
+
var wrapWord2 = (rows, word, columns) => {
|
|
85636
86060
|
const characters = [...word];
|
|
85637
86061
|
let isInsideEscape = false;
|
|
85638
86062
|
let isInsideLinkEscape = false;
|
|
85639
|
-
let visible =
|
|
86063
|
+
let visible = stringWidth2(stripAnsi(rows.at(-1)));
|
|
85640
86064
|
for (const [index, character] of characters.entries()) {
|
|
85641
|
-
const characterLength =
|
|
86065
|
+
const characterLength = stringWidth2(character);
|
|
85642
86066
|
if (visible + characterLength <= columns) {
|
|
85643
86067
|
rows[rows.length - 1] += character;
|
|
85644
86068
|
} else {
|
|
85645
86069
|
rows.push(character);
|
|
85646
86070
|
visible = 0;
|
|
85647
86071
|
}
|
|
85648
|
-
if (
|
|
86072
|
+
if (ESCAPES2.has(character)) {
|
|
85649
86073
|
isInsideEscape = true;
|
|
85650
|
-
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 +
|
|
85651
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate ===
|
|
86074
|
+
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK2.length).join("");
|
|
86075
|
+
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK2;
|
|
85652
86076
|
}
|
|
85653
86077
|
if (isInsideEscape) {
|
|
85654
86078
|
if (isInsideLinkEscape) {
|
|
85655
|
-
if (character ===
|
|
86079
|
+
if (character === ANSI_ESCAPE_BELL2) {
|
|
85656
86080
|
isInsideEscape = false;
|
|
85657
86081
|
isInsideLinkEscape = false;
|
|
85658
86082
|
}
|
|
85659
|
-
} else if (character ===
|
|
86083
|
+
} else if (character === ANSI_SGR_TERMINATOR2) {
|
|
85660
86084
|
isInsideEscape = false;
|
|
85661
86085
|
}
|
|
85662
86086
|
continue;
|
|
@@ -85671,11 +86095,11 @@ var wrapWord = (rows, word, columns) => {
|
|
|
85671
86095
|
rows[rows.length - 2] += rows.pop();
|
|
85672
86096
|
}
|
|
85673
86097
|
};
|
|
85674
|
-
var
|
|
86098
|
+
var stringVisibleTrimSpacesRight2 = (string4) => {
|
|
85675
86099
|
const words = string4.split(" ");
|
|
85676
86100
|
let last = words.length;
|
|
85677
86101
|
while (last > 0) {
|
|
85678
|
-
if (
|
|
86102
|
+
if (stringWidth2(words[last - 1]) > 0) {
|
|
85679
86103
|
break;
|
|
85680
86104
|
}
|
|
85681
86105
|
last--;
|
|
@@ -85685,20 +86109,20 @@ var stringVisibleTrimSpacesRight = (string4) => {
|
|
|
85685
86109
|
}
|
|
85686
86110
|
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
85687
86111
|
};
|
|
85688
|
-
var
|
|
86112
|
+
var exec2 = (string4, columns, options = {}) => {
|
|
85689
86113
|
if (options.trim !== false && string4.trim() === "") {
|
|
85690
86114
|
return "";
|
|
85691
86115
|
}
|
|
85692
86116
|
let returnValue = "";
|
|
85693
86117
|
let escapeCode;
|
|
85694
86118
|
let escapeUrl;
|
|
85695
|
-
const lengths =
|
|
86119
|
+
const lengths = wordLengths2(string4);
|
|
85696
86120
|
let rows = [""];
|
|
85697
86121
|
for (const [index, word] of string4.split(" ").entries()) {
|
|
85698
86122
|
if (options.trim !== false) {
|
|
85699
86123
|
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
85700
86124
|
}
|
|
85701
|
-
let rowLength =
|
|
86125
|
+
let rowLength = stringWidth2(rows.at(-1));
|
|
85702
86126
|
if (index !== 0) {
|
|
85703
86127
|
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
85704
86128
|
rows.push("");
|
|
@@ -85716,32 +86140,32 @@ var exec = (string4, columns, options = {}) => {
|
|
|
85716
86140
|
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
85717
86141
|
rows.push("");
|
|
85718
86142
|
}
|
|
85719
|
-
|
|
86143
|
+
wrapWord2(rows, word, columns);
|
|
85720
86144
|
continue;
|
|
85721
86145
|
}
|
|
85722
86146
|
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
85723
86147
|
if (options.wordWrap === false && rowLength < columns) {
|
|
85724
|
-
|
|
86148
|
+
wrapWord2(rows, word, columns);
|
|
85725
86149
|
continue;
|
|
85726
86150
|
}
|
|
85727
86151
|
rows.push("");
|
|
85728
86152
|
}
|
|
85729
86153
|
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
85730
|
-
|
|
86154
|
+
wrapWord2(rows, word, columns);
|
|
85731
86155
|
continue;
|
|
85732
86156
|
}
|
|
85733
86157
|
rows[rows.length - 1] += word;
|
|
85734
86158
|
}
|
|
85735
86159
|
if (options.trim !== false) {
|
|
85736
|
-
rows = rows.map((row) =>
|
|
86160
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight2(row));
|
|
85737
86161
|
}
|
|
85738
86162
|
const preString = rows.join("\n");
|
|
85739
86163
|
const pre = [...preString];
|
|
85740
86164
|
let preStringIndex = 0;
|
|
85741
86165
|
for (const [index, character] of pre.entries()) {
|
|
85742
86166
|
returnValue += character;
|
|
85743
|
-
if (
|
|
85744
|
-
const { groups } = new RegExp(`(?:\\${
|
|
86167
|
+
if (ESCAPES2.has(character)) {
|
|
86168
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI2}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK2}(?<uri>.*)${ANSI_ESCAPE_BELL2})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
85745
86169
|
if (groups.code !== void 0) {
|
|
85746
86170
|
const code2 = Number.parseFloat(groups.code);
|
|
85747
86171
|
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
@@ -85752,25 +86176,25 @@ var exec = (string4, columns, options = {}) => {
|
|
|
85752
86176
|
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
85753
86177
|
if (pre[index + 1] === "\n") {
|
|
85754
86178
|
if (escapeUrl) {
|
|
85755
|
-
returnValue +=
|
|
86179
|
+
returnValue += wrapAnsiHyperlink2("");
|
|
85756
86180
|
}
|
|
85757
86181
|
if (escapeCode && code) {
|
|
85758
|
-
returnValue +=
|
|
86182
|
+
returnValue += wrapAnsiCode2(code);
|
|
85759
86183
|
}
|
|
85760
86184
|
} else if (character === "\n") {
|
|
85761
86185
|
if (escapeCode && code) {
|
|
85762
|
-
returnValue +=
|
|
86186
|
+
returnValue += wrapAnsiCode2(escapeCode);
|
|
85763
86187
|
}
|
|
85764
86188
|
if (escapeUrl) {
|
|
85765
|
-
returnValue +=
|
|
86189
|
+
returnValue += wrapAnsiHyperlink2(escapeUrl);
|
|
85766
86190
|
}
|
|
85767
86191
|
}
|
|
85768
86192
|
preStringIndex += character.length;
|
|
85769
86193
|
}
|
|
85770
86194
|
return returnValue;
|
|
85771
86195
|
};
|
|
85772
|
-
function
|
|
85773
|
-
return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) =>
|
|
86196
|
+
function wrapAnsi2(string4, columns, options) {
|
|
86197
|
+
return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec2(line, columns, options)).join("\n");
|
|
85774
86198
|
}
|
|
85775
86199
|
|
|
85776
86200
|
// ../../node_modules/.pnpm/terminal-size@4.0.1/node_modules/terminal-size/index.js
|
|
@@ -85781,7 +86205,7 @@ import fs29 from "fs";
|
|
|
85781
86205
|
import tty from "tty";
|
|
85782
86206
|
var defaultColumns = 80;
|
|
85783
86207
|
var defaultRows = 24;
|
|
85784
|
-
var
|
|
86208
|
+
var exec3 = (command, arguments_, { shell: shell2, env: env2 } = {}) => execFileSync2(command, arguments_, {
|
|
85785
86209
|
encoding: "utf8",
|
|
85786
86210
|
stdio: ["ignore", "pipe", "ignore"],
|
|
85787
86211
|
timeout: 500,
|
|
@@ -85859,8 +86283,8 @@ var devTty = () => {
|
|
|
85859
86283
|
};
|
|
85860
86284
|
var tput = () => {
|
|
85861
86285
|
try {
|
|
85862
|
-
const columns =
|
|
85863
|
-
const rows =
|
|
86286
|
+
const columns = exec3("tput", ["cols"], { env: { TERM: "dumb", ...process5.env } });
|
|
86287
|
+
const rows = exec3("tput", ["lines"], { env: { TERM: "dumb", ...process5.env } });
|
|
85864
86288
|
if (columns && rows) {
|
|
85865
86289
|
return createIfNotDefault(columns, rows);
|
|
85866
86290
|
}
|
|
@@ -85872,7 +86296,7 @@ var resize = () => {
|
|
|
85872
86296
|
if (!isForegroundProcess()) {
|
|
85873
86297
|
return;
|
|
85874
86298
|
}
|
|
85875
|
-
const size =
|
|
86299
|
+
const size = exec3("resize", ["-u"]).match(/\d+/g);
|
|
85876
86300
|
if (size.length === 2) {
|
|
85877
86301
|
return createIfNotDefault(size[0], size[1]);
|
|
85878
86302
|
}
|
|
@@ -85880,22 +86304,22 @@ var resize = () => {
|
|
|
85880
86304
|
}
|
|
85881
86305
|
};
|
|
85882
86306
|
|
|
85883
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86307
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/utils.js
|
|
85884
86308
|
init_esm_shims();
|
|
85885
86309
|
import process6 from "process";
|
|
85886
86310
|
var isDev = () => process6.env["DEV"] === "true";
|
|
85887
86311
|
|
|
85888
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86312
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
|
|
85889
86313
|
init_esm_shims();
|
|
85890
86314
|
var import_react_reconciler = __toESM(require_react_reconciler(), 1);
|
|
85891
86315
|
var import_constants3 = __toESM(require_constants(), 1);
|
|
85892
86316
|
var Scheduler = __toESM(require_scheduler(), 1);
|
|
85893
86317
|
var import_react = __toESM(require_react(), 1);
|
|
85894
86318
|
|
|
85895
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86319
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
|
|
85896
86320
|
init_esm_shims();
|
|
85897
86321
|
|
|
85898
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86322
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
|
|
85899
86323
|
init_esm_shims();
|
|
85900
86324
|
|
|
85901
86325
|
// ../../node_modules/.pnpm/widest-line@6.0.0/node_modules/widest-line/index.js
|
|
@@ -85903,30 +86327,30 @@ init_esm_shims();
|
|
|
85903
86327
|
|
|
85904
86328
|
// ../../node_modules/.pnpm/string-width@8.2.1/node_modules/string-width/index.js
|
|
85905
86329
|
init_esm_shims();
|
|
85906
|
-
var
|
|
85907
|
-
var
|
|
85908
|
-
var
|
|
85909
|
-
var
|
|
85910
|
-
var
|
|
85911
|
-
var
|
|
85912
|
-
function
|
|
86330
|
+
var segmenter4 = new Intl.Segmenter();
|
|
86331
|
+
var zeroWidthClusterRegex2 = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
86332
|
+
var leadingNonPrintingRegex2 = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
86333
|
+
var rgiEmojiRegex2 = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
86334
|
+
var unqualifiedKeycapRegex2 = /^[\d#*]\u20E3$/;
|
|
86335
|
+
var extendedPictographicRegex2 = new RegExp("\\p{Extended_Pictographic}", "gu");
|
|
86336
|
+
function isDoubleWidthNonRgiEmojiSequence2(segment) {
|
|
85913
86337
|
if (segment.length > 50) {
|
|
85914
86338
|
return false;
|
|
85915
86339
|
}
|
|
85916
|
-
if (
|
|
86340
|
+
if (unqualifiedKeycapRegex2.test(segment)) {
|
|
85917
86341
|
return true;
|
|
85918
86342
|
}
|
|
85919
86343
|
if (segment.includes("\u200D")) {
|
|
85920
|
-
const pictographics = segment.match(
|
|
86344
|
+
const pictographics = segment.match(extendedPictographicRegex2);
|
|
85921
86345
|
return pictographics !== null && pictographics.length >= 2;
|
|
85922
86346
|
}
|
|
85923
86347
|
return false;
|
|
85924
86348
|
}
|
|
85925
|
-
function
|
|
85926
|
-
return segment.replace(
|
|
86349
|
+
function baseVisible2(segment) {
|
|
86350
|
+
return segment.replace(leadingNonPrintingRegex2, "");
|
|
85927
86351
|
}
|
|
85928
|
-
function
|
|
85929
|
-
return
|
|
86352
|
+
function isZeroWidthCluster2(segment) {
|
|
86353
|
+
return zeroWidthClusterRegex2.test(segment);
|
|
85930
86354
|
}
|
|
85931
86355
|
function isHangulLeadingJamo(codePoint) {
|
|
85932
86356
|
return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
|
|
@@ -85943,7 +86367,7 @@ function isHangulJamo(codePoint) {
|
|
|
85943
86367
|
function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
|
|
85944
86368
|
const codePoints = [];
|
|
85945
86369
|
for (const character of visibleSegment) {
|
|
85946
|
-
if (
|
|
86370
|
+
if (zeroWidthClusterRegex2.test(character)) {
|
|
85947
86371
|
continue;
|
|
85948
86372
|
}
|
|
85949
86373
|
codePoints.push(character.codePointAt(0));
|
|
@@ -85972,7 +86396,7 @@ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
|
|
|
85972
86396
|
}
|
|
85973
86397
|
return width;
|
|
85974
86398
|
}
|
|
85975
|
-
function
|
|
86399
|
+
function trailingHalfwidthWidth2(visibleSegment, eastAsianWidthOptions) {
|
|
85976
86400
|
let extra = 0;
|
|
85977
86401
|
let first = true;
|
|
85978
86402
|
for (const character of visibleSegment) {
|
|
@@ -85986,7 +86410,7 @@ function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
|
|
|
85986
86410
|
}
|
|
85987
86411
|
return extra;
|
|
85988
86412
|
}
|
|
85989
|
-
function
|
|
86413
|
+
function stringWidth3(input, options = {}) {
|
|
85990
86414
|
if (typeof input !== "string" || input.length === 0) {
|
|
85991
86415
|
return 0;
|
|
85992
86416
|
}
|
|
@@ -86006,15 +86430,15 @@ function stringWidth2(input, options = {}) {
|
|
|
86006
86430
|
}
|
|
86007
86431
|
let width = 0;
|
|
86008
86432
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
86009
|
-
for (const { segment } of
|
|
86010
|
-
if (
|
|
86433
|
+
for (const { segment } of segmenter4.segment(string4)) {
|
|
86434
|
+
if (isZeroWidthCluster2(segment)) {
|
|
86011
86435
|
continue;
|
|
86012
86436
|
}
|
|
86013
|
-
if (
|
|
86437
|
+
if (rgiEmojiRegex2.test(segment) || isDoubleWidthNonRgiEmojiSequence2(segment)) {
|
|
86014
86438
|
width += 2;
|
|
86015
86439
|
continue;
|
|
86016
86440
|
}
|
|
86017
|
-
const visibleSegment =
|
|
86441
|
+
const visibleSegment = baseVisible2(segment);
|
|
86018
86442
|
const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
|
|
86019
86443
|
if (hangulWidth !== void 0) {
|
|
86020
86444
|
width += hangulWidth;
|
|
@@ -86022,7 +86446,7 @@ function stringWidth2(input, options = {}) {
|
|
|
86022
86446
|
}
|
|
86023
86447
|
const codePoint = visibleSegment.codePointAt(0);
|
|
86024
86448
|
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
86025
|
-
width +=
|
|
86449
|
+
width += trailingHalfwidthWidth2(visibleSegment, eastAsianWidthOptions);
|
|
86026
86450
|
}
|
|
86027
86451
|
return width;
|
|
86028
86452
|
}
|
|
@@ -86031,12 +86455,12 @@ function stringWidth2(input, options = {}) {
|
|
|
86031
86455
|
function widestLine(string4) {
|
|
86032
86456
|
let lineWidth = 0;
|
|
86033
86457
|
for (const line of string4.split("\n")) {
|
|
86034
|
-
lineWidth = Math.max(lineWidth,
|
|
86458
|
+
lineWidth = Math.max(lineWidth, stringWidth3(line));
|
|
86035
86459
|
}
|
|
86036
86460
|
return lineWidth;
|
|
86037
86461
|
}
|
|
86038
86462
|
|
|
86039
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86463
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-text.js
|
|
86040
86464
|
var cache = /* @__PURE__ */ new Map();
|
|
86041
86465
|
var measureText = (text) => {
|
|
86042
86466
|
if (text.length === 0) {
|
|
@@ -86057,7 +86481,7 @@ var measureText = (text) => {
|
|
|
86057
86481
|
};
|
|
86058
86482
|
var measure_text_default = measureText;
|
|
86059
86483
|
|
|
86060
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
86484
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
|
|
86061
86485
|
init_esm_shims();
|
|
86062
86486
|
|
|
86063
86487
|
// ../../node_modules/.pnpm/cli-truncate@5.2.0/node_modules/cli-truncate/index.js
|
|
@@ -86087,7 +86511,7 @@ var C1_ST_CODE_POINT = 156;
|
|
|
86087
86511
|
var C1_OSC_CODE_POINT = 157;
|
|
86088
86512
|
var C1_PM_CODE_POINT = 158;
|
|
86089
86513
|
var C1_APC_CODE_POINT = 159;
|
|
86090
|
-
var
|
|
86514
|
+
var ESCAPES3 = /* @__PURE__ */ new Set([
|
|
86091
86515
|
ESCAPE_CODE_POINT,
|
|
86092
86516
|
C1_DCS_CODE_POINT,
|
|
86093
86517
|
C1_SOS_CODE_POINT,
|
|
@@ -86099,18 +86523,18 @@ var ESCAPES2 = /* @__PURE__ */ new Set([
|
|
|
86099
86523
|
]);
|
|
86100
86524
|
var ESCAPE = "\x1B";
|
|
86101
86525
|
var ANSI_BELL = "\x07";
|
|
86102
|
-
var
|
|
86103
|
-
var
|
|
86526
|
+
var ANSI_CSI3 = "[";
|
|
86527
|
+
var ANSI_OSC3 = "]";
|
|
86104
86528
|
var ANSI_DCS = "P";
|
|
86105
86529
|
var ANSI_SOS = "X";
|
|
86106
86530
|
var ANSI_PM = "^";
|
|
86107
86531
|
var ANSI_APC = "_";
|
|
86108
|
-
var
|
|
86532
|
+
var ANSI_SGR_TERMINATOR3 = "m";
|
|
86109
86533
|
var ANSI_OSC_TERMINATOR = "\\";
|
|
86110
86534
|
var ANSI_STRING_TERMINATOR = `${ESCAPE}${ANSI_OSC_TERMINATOR}`;
|
|
86111
86535
|
var C1_OSC = "\x9D";
|
|
86112
86536
|
var C1_STRING_TERMINATOR = "\x9C";
|
|
86113
|
-
var ANSI_HYPERLINK_ESC_PREFIX = `${ESCAPE}${
|
|
86537
|
+
var ANSI_HYPERLINK_ESC_PREFIX = `${ESCAPE}${ANSI_OSC3}8;`;
|
|
86114
86538
|
var ANSI_HYPERLINK_C1_PREFIX = `${C1_OSC}8;`;
|
|
86115
86539
|
var ANSI_HYPERLINK_ESC_CLOSE = `${ANSI_HYPERLINK_ESC_PREFIX};`;
|
|
86116
86540
|
var ANSI_HYPERLINK_C1_CLOSE = `${ANSI_HYPERLINK_C1_PREFIX};`;
|
|
@@ -86204,16 +86628,16 @@ function getSgrPrefix(code) {
|
|
|
86204
86628
|
if (code.startsWith("\x9B")) {
|
|
86205
86629
|
return "\x9B";
|
|
86206
86630
|
}
|
|
86207
|
-
return `${ESCAPE}${
|
|
86631
|
+
return `${ESCAPE}${ANSI_CSI3}`;
|
|
86208
86632
|
}
|
|
86209
86633
|
function createSgrCode(prefix, values) {
|
|
86210
|
-
return `${prefix}${values.join(";")}${
|
|
86634
|
+
return `${prefix}${values.join(";")}${ANSI_SGR_TERMINATOR3}`;
|
|
86211
86635
|
}
|
|
86212
86636
|
function getSgrFragments(code) {
|
|
86213
86637
|
const fragments = [];
|
|
86214
86638
|
const sgrPrefix = getSgrPrefix(code);
|
|
86215
86639
|
let parameterString;
|
|
86216
|
-
if (code.startsWith(`${ESCAPE}${
|
|
86640
|
+
if (code.startsWith(`${ESCAPE}${ANSI_CSI3}`)) {
|
|
86217
86641
|
parameterString = code.slice(2, -1);
|
|
86218
86642
|
} else if (code.startsWith("\x9B")) {
|
|
86219
86643
|
parameterString = code.slice(1, -1);
|
|
@@ -86300,7 +86724,7 @@ function parseCsiCode(string4, index) {
|
|
|
86300
86724
|
const escapeCodePoint = string4.codePointAt(index);
|
|
86301
86725
|
let sequenceStartIndex;
|
|
86302
86726
|
if (escapeCodePoint === ESCAPE_CODE_POINT) {
|
|
86303
|
-
if (string4[index + 1] !==
|
|
86727
|
+
if (string4[index + 1] !== ANSI_CSI3) {
|
|
86304
86728
|
return;
|
|
86305
86729
|
}
|
|
86306
86730
|
sequenceStartIndex = index + 2;
|
|
@@ -86314,7 +86738,7 @@ function parseCsiCode(string4, index) {
|
|
|
86314
86738
|
const codePoint = string4.codePointAt(sequenceIndex);
|
|
86315
86739
|
if (isCsiFinalCharacter(codePoint)) {
|
|
86316
86740
|
const code = string4.slice(index, sequenceIndex + 1);
|
|
86317
|
-
if (string4[sequenceIndex] !==
|
|
86741
|
+
if (string4[sequenceIndex] !== ANSI_SGR_TERMINATOR3 || !hasCanonicalSgrParameters) {
|
|
86318
86742
|
return createControlParseResult(code, sequenceIndex + 1);
|
|
86319
86743
|
}
|
|
86320
86744
|
return {
|
|
@@ -86413,7 +86837,7 @@ function parseControlStringCode(string4, index) {
|
|
|
86413
86837
|
case ESCAPE_CODE_POINT: {
|
|
86414
86838
|
const command = string4[index + 1];
|
|
86415
86839
|
switch (command) {
|
|
86416
|
-
case
|
|
86840
|
+
case ANSI_OSC3: {
|
|
86417
86841
|
sequenceStartIndex = index + 2;
|
|
86418
86842
|
supportsBellTerminator = true;
|
|
86419
86843
|
break;
|
|
@@ -86483,7 +86907,7 @@ function parseAnsiCode(string4, index) {
|
|
|
86483
86907
|
function appendTrailingAnsiTokens(string4, index, tokens2) {
|
|
86484
86908
|
while (index < string4.length) {
|
|
86485
86909
|
const nextCodePoint = string4.codePointAt(index);
|
|
86486
|
-
if (!
|
|
86910
|
+
if (!ESCAPES3.has(nextCodePoint)) {
|
|
86487
86911
|
break;
|
|
86488
86912
|
}
|
|
86489
86913
|
const escapeCode = parseAnsiCode(string4, index);
|
|
@@ -86516,7 +86940,7 @@ function collectVisibleCharacters(string4) {
|
|
|
86516
86940
|
let index = 0;
|
|
86517
86941
|
while (index < string4.length) {
|
|
86518
86942
|
const codePoint = string4.codePointAt(index);
|
|
86519
|
-
if (
|
|
86943
|
+
if (ESCAPES3.has(codePoint)) {
|
|
86520
86944
|
const code = parseAnsiCode(string4, index);
|
|
86521
86945
|
if (code) {
|
|
86522
86946
|
index = code.endIndex;
|
|
@@ -86569,7 +86993,7 @@ function tokenizeAnsiWithVisibleSegmentation(string4, { endCharacter = Number.PO
|
|
|
86569
86993
|
let visibleCount = 0;
|
|
86570
86994
|
while (index < string4.length) {
|
|
86571
86995
|
const codePoint = string4.codePointAt(index);
|
|
86572
|
-
if (
|
|
86996
|
+
if (ESCAPES3.has(codePoint)) {
|
|
86573
86997
|
const code = parseAnsiCode(string4, index);
|
|
86574
86998
|
if (code) {
|
|
86575
86999
|
tokens2.push(code.token);
|
|
@@ -86624,7 +87048,7 @@ function hasAnsiSplitContinuationAhead(string4, startIndex, previousVisibleValue
|
|
|
86624
87048
|
let hasAnsiCode = false;
|
|
86625
87049
|
while (index < string4.length) {
|
|
86626
87050
|
const codePoint = string4.codePointAt(index);
|
|
86627
|
-
if (
|
|
87051
|
+
if (ESCAPES3.has(codePoint)) {
|
|
86628
87052
|
const code = parseAnsiCode(string4, index);
|
|
86629
87053
|
if (code) {
|
|
86630
87054
|
hasAnsiCode = true;
|
|
@@ -86652,7 +87076,7 @@ function tokenizeAnsi(string4, { endCharacter = Number.POSITIVE_INFINITY } = {})
|
|
|
86652
87076
|
let hasAnsiSinceLastVisible = false;
|
|
86653
87077
|
while (index < string4.length) {
|
|
86654
87078
|
const codePoint = string4.codePointAt(index);
|
|
86655
|
-
if (
|
|
87079
|
+
if (ESCAPES3.has(codePoint)) {
|
|
86656
87080
|
const code = parseAnsiCode(string4, index);
|
|
86657
87081
|
if (code) {
|
|
86658
87082
|
tokens2.push(code.token);
|
|
@@ -86732,7 +87156,7 @@ function shouldIncludeSgrAfterEnd(token, activeStyles) {
|
|
|
86732
87156
|
}
|
|
86733
87157
|
return hasClosingEffect && !hasStartFragment;
|
|
86734
87158
|
}
|
|
86735
|
-
function
|
|
87159
|
+
function applySgrToken2({ token, isPastEnd, activeStyles, returnValue, include, activeHyperlink, position }) {
|
|
86736
87160
|
if (isPastEnd && !shouldIncludeSgrAfterEnd(token, activeStyles)) {
|
|
86737
87161
|
return {
|
|
86738
87162
|
activeStyles,
|
|
@@ -86813,7 +87237,7 @@ function applyCharacterToken({ token, start, activeStyles, activeHyperlink, posi
|
|
|
86813
87237
|
};
|
|
86814
87238
|
}
|
|
86815
87239
|
var tokenHandlers = {
|
|
86816
|
-
sgr:
|
|
87240
|
+
sgr: applySgrToken2,
|
|
86817
87241
|
hyperlink: applyHyperlinkToken,
|
|
86818
87242
|
control: applyControlToken,
|
|
86819
87243
|
character: applyCharacterToken
|
|
@@ -86917,7 +87341,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
86917
87341
|
if (columns < 1) {
|
|
86918
87342
|
return "";
|
|
86919
87343
|
}
|
|
86920
|
-
const length =
|
|
87344
|
+
const length = stringWidth3(text);
|
|
86921
87345
|
if (length <= columns) {
|
|
86922
87346
|
return text;
|
|
86923
87347
|
}
|
|
@@ -86983,7 +87407,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
86983
87407
|
if (space) {
|
|
86984
87408
|
truncationCharacter += " ";
|
|
86985
87409
|
}
|
|
86986
|
-
const right = sliceAnsi(text, length - columns +
|
|
87410
|
+
const right = sliceAnsi(text, length - columns + stringWidth3(truncationCharacter), length);
|
|
86987
87411
|
return prependWithInheritedStyleFromStart(truncationCharacter, right);
|
|
86988
87412
|
}
|
|
86989
87413
|
if (position === "middle") {
|
|
@@ -86996,7 +87420,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
86996
87420
|
const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
|
|
86997
87421
|
return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
|
|
86998
87422
|
}
|
|
86999
|
-
return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) +
|
|
87423
|
+
return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth3(truncationCharacter), length);
|
|
87000
87424
|
}
|
|
87001
87425
|
if (position === "end") {
|
|
87002
87426
|
if (preferTruncationOnSpace) {
|
|
@@ -87007,13 +87431,13 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
87007
87431
|
if (space) {
|
|
87008
87432
|
truncationCharacter = ` ${truncationCharacter}`;
|
|
87009
87433
|
}
|
|
87010
|
-
const left = sliceAnsi(text, 0, columns -
|
|
87434
|
+
const left = sliceAnsi(text, 0, columns - stringWidth3(truncationCharacter));
|
|
87011
87435
|
return appendWithInheritedStyleFromEnd(left, truncationCharacter);
|
|
87012
87436
|
}
|
|
87013
87437
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
87014
87438
|
}
|
|
87015
87439
|
|
|
87016
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87440
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/wrap-text.js
|
|
87017
87441
|
var cache2 = {};
|
|
87018
87442
|
var wrapText = (text, maxWidth, wrapType) => {
|
|
87019
87443
|
const cacheKey = text + String(maxWidth) + String(wrapType);
|
|
@@ -87023,7 +87447,7 @@ var wrapText = (text, maxWidth, wrapType) => {
|
|
|
87023
87447
|
}
|
|
87024
87448
|
let wrappedText = text;
|
|
87025
87449
|
if (wrapType === "wrap") {
|
|
87026
|
-
wrappedText =
|
|
87450
|
+
wrappedText = wrapAnsi2(text, maxWidth, {
|
|
87027
87451
|
trim: false,
|
|
87028
87452
|
hard: true
|
|
87029
87453
|
});
|
|
@@ -87043,13 +87467,13 @@ var wrapText = (text, maxWidth, wrapType) => {
|
|
|
87043
87467
|
};
|
|
87044
87468
|
var wrap_text_default = wrapText;
|
|
87045
87469
|
|
|
87046
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87470
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
|
|
87047
87471
|
init_esm_shims();
|
|
87048
87472
|
|
|
87049
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87473
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
|
|
87050
87474
|
init_esm_shims();
|
|
87051
87475
|
|
|
87052
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87476
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ansi-tokenizer.js
|
|
87053
87477
|
init_esm_shims();
|
|
87054
87478
|
var bellCharacter = "\x07";
|
|
87055
87479
|
var escapeCharacter = "\x1B";
|
|
@@ -87357,7 +87781,7 @@ var tokenizeAnsi2 = (text) => {
|
|
|
87357
87781
|
return tokens2;
|
|
87358
87782
|
};
|
|
87359
87783
|
|
|
87360
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87784
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/sanitize-ansi.js
|
|
87361
87785
|
var sgrParametersRegex = /^[\d:;]*$/;
|
|
87362
87786
|
var sanitizeAnsi = (text) => {
|
|
87363
87787
|
if (!hasAnsiControlCharacters(text)) {
|
|
@@ -87377,7 +87801,7 @@ var sanitizeAnsi = (text) => {
|
|
|
87377
87801
|
};
|
|
87378
87802
|
var sanitize_ansi_default = sanitizeAnsi;
|
|
87379
87803
|
|
|
87380
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87804
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/squash-text-nodes.js
|
|
87381
87805
|
var squashTextNodes = (node) => {
|
|
87382
87806
|
let text = "";
|
|
87383
87807
|
for (let index = 0; index < node.childNodes.length; index++) {
|
|
@@ -87402,7 +87826,7 @@ var squashTextNodes = (node) => {
|
|
|
87402
87826
|
};
|
|
87403
87827
|
var squash_text_nodes_default = squashTextNodes;
|
|
87404
87828
|
|
|
87405
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87829
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/dom.js
|
|
87406
87830
|
var createNode = (nodeName) => {
|
|
87407
87831
|
const node = {
|
|
87408
87832
|
nodeName,
|
|
@@ -87518,7 +87942,7 @@ var setTextNodeValue = (node, text) => {
|
|
|
87518
87942
|
markNodeAsDirty(node);
|
|
87519
87943
|
};
|
|
87520
87944
|
|
|
87521
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
87945
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/styles.js
|
|
87522
87946
|
init_esm_shims();
|
|
87523
87947
|
var applyPositionStyles = (node, style) => {
|
|
87524
87948
|
if ("position" in style) {
|
|
@@ -87740,10 +88164,10 @@ var styles2 = (node, style = {}) => {
|
|
|
87740
88164
|
};
|
|
87741
88165
|
var styles_default = styles2;
|
|
87742
88166
|
|
|
87743
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88167
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/reconciler.js
|
|
87744
88168
|
if (isDev()) {
|
|
87745
88169
|
try {
|
|
87746
|
-
await import("./devtools-
|
|
88170
|
+
await import("./devtools-I2VAXNW4.js");
|
|
87747
88171
|
} catch (error51) {
|
|
87748
88172
|
if (error51.code === "ERR_MODULE_NOT_FOUND") {
|
|
87749
88173
|
console.warn(`
|
|
@@ -87792,8 +88216,8 @@ var cleanupYogaNode = (node) => {
|
|
|
87792
88216
|
var currentUpdatePriority = import_constants3.NoEventPriority;
|
|
87793
88217
|
var currentRootNode;
|
|
87794
88218
|
async function loadPackageJson() {
|
|
87795
|
-
const
|
|
87796
|
-
const content =
|
|
88219
|
+
const fs37 = await import("fs");
|
|
88220
|
+
const content = fs37.readFileSync(new URL("../package.json", import.meta.url), "utf8");
|
|
87797
88221
|
return JSON.parse(content);
|
|
87798
88222
|
}
|
|
87799
88223
|
var packageJson = isDev() ? await loadPackageJson() : { name: void 0, version: void 0 };
|
|
@@ -88001,10 +88425,10 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
88001
88425
|
rendererVersion: packageJson.version
|
|
88002
88426
|
});
|
|
88003
88427
|
|
|
88004
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88428
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
|
|
88005
88429
|
init_esm_shims();
|
|
88006
88430
|
|
|
88007
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88431
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
|
|
88008
88432
|
init_esm_shims();
|
|
88009
88433
|
|
|
88010
88434
|
// ../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js
|
|
@@ -88041,18 +88465,18 @@ function indentString(string4, count = 1, options = {}) {
|
|
|
88041
88465
|
return string4.replace(regex2, indent2.repeat(count));
|
|
88042
88466
|
}
|
|
88043
88467
|
|
|
88044
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88468
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/get-max-width.js
|
|
88045
88469
|
init_esm_shims();
|
|
88046
88470
|
var getMaxWidth = (yogaNode) => {
|
|
88047
88471
|
return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
|
|
88048
88472
|
};
|
|
88049
88473
|
var get_max_width_default = getMaxWidth;
|
|
88050
88474
|
|
|
88051
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88475
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
|
|
88052
88476
|
init_esm_shims();
|
|
88053
88477
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
88054
88478
|
|
|
88055
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88479
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/colorize.js
|
|
88056
88480
|
init_esm_shims();
|
|
88057
88481
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
88058
88482
|
var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
@@ -88095,7 +88519,7 @@ var colorize = (str2, color2, type2) => {
|
|
|
88095
88519
|
};
|
|
88096
88520
|
var colorize_default = colorize;
|
|
88097
88521
|
|
|
88098
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88522
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-border.js
|
|
88099
88523
|
var renderBorder = (x, y, node, output) => {
|
|
88100
88524
|
if (node.style.borderStyle) {
|
|
88101
88525
|
const width = node.yogaNode.getComputedWidth();
|
|
@@ -88156,7 +88580,7 @@ var renderBorder = (x, y, node, output) => {
|
|
|
88156
88580
|
};
|
|
88157
88581
|
var render_border_default = renderBorder;
|
|
88158
88582
|
|
|
88159
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88583
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-background.js
|
|
88160
88584
|
init_esm_shims();
|
|
88161
88585
|
var renderBackground = (x, y, node, output) => {
|
|
88162
88586
|
if (!node.style.backgroundColor) {
|
|
@@ -88180,7 +88604,7 @@ var renderBackground = (x, y, node, output) => {
|
|
|
88180
88604
|
};
|
|
88181
88605
|
var render_background_default = renderBackground;
|
|
88182
88606
|
|
|
88183
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88607
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-node-to-output.js
|
|
88184
88608
|
var applyPaddingToText = (node, text) => {
|
|
88185
88609
|
const yogaNode = node.childNodes[0]?.yogaNode;
|
|
88186
88610
|
if (yogaNode) {
|
|
@@ -88288,7 +88712,7 @@ var renderNodeToOutput = (node, output, options) => {
|
|
|
88288
88712
|
};
|
|
88289
88713
|
var render_node_to_output_default = renderNodeToOutput;
|
|
88290
88714
|
|
|
88291
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88715
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
|
|
88292
88716
|
init_esm_shims();
|
|
88293
88717
|
|
|
88294
88718
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/index.js
|
|
@@ -88296,7 +88720,7 @@ init_esm_shims();
|
|
|
88296
88720
|
|
|
88297
88721
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
|
|
88298
88722
|
init_esm_shims();
|
|
88299
|
-
var
|
|
88723
|
+
var ESCAPES4 = /* @__PURE__ */ new Set([27, 155]);
|
|
88300
88724
|
var CSI = "[".codePointAt(0);
|
|
88301
88725
|
var OSC2 = "]".codePointAt(0);
|
|
88302
88726
|
var endCodesSet = /* @__PURE__ */ new Set();
|
|
@@ -88433,7 +88857,7 @@ function styledCharsToString(chars2) {
|
|
|
88433
88857
|
|
|
88434
88858
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.2.5/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js
|
|
88435
88859
|
init_esm_shims();
|
|
88436
|
-
var
|
|
88860
|
+
var segmenter5 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
88437
88861
|
function isFullwidthGrapheme(grapheme, baseCodePoint) {
|
|
88438
88862
|
if (isFullwidthCodePoint(baseCodePoint))
|
|
88439
88863
|
return true;
|
|
@@ -88509,11 +88933,11 @@ function tokenize4(str2, endChar = Number.POSITIVE_INFINITY) {
|
|
|
88509
88933
|
const ret = [];
|
|
88510
88934
|
let visible = 0;
|
|
88511
88935
|
let codeEndIndex = 0;
|
|
88512
|
-
for (const { segment, index } of
|
|
88936
|
+
for (const { segment, index } of segmenter5.segment(str2)) {
|
|
88513
88937
|
if (index < codeEndIndex)
|
|
88514
88938
|
continue;
|
|
88515
88939
|
const codePoint = segment.codePointAt(0);
|
|
88516
|
-
if (
|
|
88940
|
+
if (ESCAPES4.has(codePoint)) {
|
|
88517
88941
|
let code;
|
|
88518
88942
|
const nextCodePoint = str2.codePointAt(index + 1);
|
|
88519
88943
|
if (nextCodePoint === OSC2) {
|
|
@@ -88557,7 +88981,7 @@ function tokenize4(str2, endChar = Number.POSITIVE_INFINITY) {
|
|
|
88557
88981
|
return ret;
|
|
88558
88982
|
}
|
|
88559
88983
|
|
|
88560
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
88984
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/output.js
|
|
88561
88985
|
var OutputCaches = class {
|
|
88562
88986
|
widths = /* @__PURE__ */ new Map();
|
|
88563
88987
|
blockWidths = /* @__PURE__ */ new Map();
|
|
@@ -88573,7 +88997,7 @@ var OutputCaches = class {
|
|
|
88573
88997
|
getStringWidth(text) {
|
|
88574
88998
|
let cached4 = this.widths.get(text);
|
|
88575
88999
|
if (cached4 === void 0) {
|
|
88576
|
-
cached4 =
|
|
89000
|
+
cached4 = stringWidth3(text);
|
|
88577
89001
|
this.widths.set(text, cached4);
|
|
88578
89002
|
}
|
|
88579
89003
|
return cached4;
|
|
@@ -88729,7 +89153,7 @@ var Output = class {
|
|
|
88729
89153
|
}
|
|
88730
89154
|
};
|
|
88731
89155
|
|
|
88732
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89156
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/renderer.js
|
|
88733
89157
|
var renderer = (node, isScreenReaderEnabled) => {
|
|
88734
89158
|
if (node.yogaNode) {
|
|
88735
89159
|
if (isScreenReaderEnabled) {
|
|
@@ -88785,7 +89209,7 @@ var renderer = (node, isScreenReaderEnabled) => {
|
|
|
88785
89209
|
};
|
|
88786
89210
|
var renderer_default = renderer;
|
|
88787
89211
|
|
|
88788
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89212
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
|
|
88789
89213
|
init_esm_shims();
|
|
88790
89214
|
|
|
88791
89215
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
@@ -88834,7 +89258,7 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
88834
89258
|
};
|
|
88835
89259
|
var cli_cursor_default = cliCursor;
|
|
88836
89260
|
|
|
88837
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89261
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/cursor-helpers.js
|
|
88838
89262
|
init_esm_shims();
|
|
88839
89263
|
var showCursorEscape = "\x1B[?25h";
|
|
88840
89264
|
var hideCursorEscape = "\x1B[?25l";
|
|
@@ -88866,7 +89290,7 @@ var buildReturnToBottomPrefix = (cursorWasShown, previousLineCount, previousCurs
|
|
|
88866
89290
|
return hideCursorEscape + buildReturnToBottom(previousLineCount, previousCursorPosition);
|
|
88867
89291
|
};
|
|
88868
89292
|
|
|
88869
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89293
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/log-update.js
|
|
88870
89294
|
var visibleLineCount = (lines, str2) => str2.endsWith("\n") ? lines.length - 1 : lines.length;
|
|
88871
89295
|
var createStandard = (stream2, { showCursor = false } = {}) => {
|
|
88872
89296
|
let previousLineCount = 0;
|
|
@@ -89084,7 +89508,7 @@ var create2 = (stream2, { showCursor = false, incremental = false } = {}) => {
|
|
|
89084
89508
|
var logUpdate = { create: create2 };
|
|
89085
89509
|
var log_update_default = logUpdate;
|
|
89086
89510
|
|
|
89087
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89511
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/write-synchronized.js
|
|
89088
89512
|
init_esm_shims();
|
|
89089
89513
|
var bsu = "\x1B[?2026h";
|
|
89090
89514
|
var esu = "\x1B[?2026l";
|
|
@@ -89092,18 +89516,18 @@ function shouldSynchronize(stream2) {
|
|
|
89092
89516
|
return "isTTY" in stream2 && stream2.isTTY === true && !is_in_ci_default;
|
|
89093
89517
|
}
|
|
89094
89518
|
|
|
89095
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89519
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/instances.js
|
|
89096
89520
|
init_esm_shims();
|
|
89097
89521
|
var instances = /* @__PURE__ */ new WeakMap();
|
|
89098
89522
|
var instances_default = instances;
|
|
89099
89523
|
|
|
89100
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89524
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
|
|
89101
89525
|
init_esm_shims();
|
|
89102
89526
|
var import_react14 = __toESM(require_react(), 1);
|
|
89103
89527
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
89104
89528
|
import process12 from "process";
|
|
89105
89529
|
|
|
89106
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89530
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/input-parser.js
|
|
89107
89531
|
init_esm_shims();
|
|
89108
89532
|
var escape2 = "\x1B";
|
|
89109
89533
|
var isCsiParameterByte = (byte) => {
|
|
@@ -89258,7 +89682,7 @@ var createInputParser = () => {
|
|
|
89258
89682
|
};
|
|
89259
89683
|
};
|
|
89260
89684
|
|
|
89261
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89685
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AppContext.js
|
|
89262
89686
|
init_esm_shims();
|
|
89263
89687
|
var import_react2 = __toESM(require_react(), 1);
|
|
89264
89688
|
var AppContext = (0, import_react2.createContext)({
|
|
@@ -89268,7 +89692,7 @@ var AppContext = (0, import_react2.createContext)({
|
|
|
89268
89692
|
AppContext.displayName = "InternalAppContext";
|
|
89269
89693
|
var AppContext_default = AppContext;
|
|
89270
89694
|
|
|
89271
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89695
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdinContext.js
|
|
89272
89696
|
init_esm_shims();
|
|
89273
89697
|
var import_react3 = __toESM(require_react(), 1);
|
|
89274
89698
|
import { EventEmitter } from "events";
|
|
@@ -89286,7 +89710,7 @@ var StdinContext = (0, import_react3.createContext)({
|
|
|
89286
89710
|
StdinContext.displayName = "InternalStdinContext";
|
|
89287
89711
|
var StdinContext_default = StdinContext;
|
|
89288
89712
|
|
|
89289
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89713
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StdoutContext.js
|
|
89290
89714
|
init_esm_shims();
|
|
89291
89715
|
var import_react4 = __toESM(require_react(), 1);
|
|
89292
89716
|
import process10 from "process";
|
|
@@ -89298,7 +89722,7 @@ var StdoutContext = (0, import_react4.createContext)({
|
|
|
89298
89722
|
StdoutContext.displayName = "InternalStdoutContext";
|
|
89299
89723
|
var StdoutContext_default = StdoutContext;
|
|
89300
89724
|
|
|
89301
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89725
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/StderrContext.js
|
|
89302
89726
|
init_esm_shims();
|
|
89303
89727
|
var import_react5 = __toESM(require_react(), 1);
|
|
89304
89728
|
import process11 from "process";
|
|
@@ -89310,7 +89734,7 @@ var StderrContext = (0, import_react5.createContext)({
|
|
|
89310
89734
|
StderrContext.displayName = "InternalStderrContext";
|
|
89311
89735
|
var StderrContext_default = StderrContext;
|
|
89312
89736
|
|
|
89313
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89737
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/FocusContext.js
|
|
89314
89738
|
init_esm_shims();
|
|
89315
89739
|
var import_react6 = __toESM(require_react(), 1);
|
|
89316
89740
|
var FocusContext = (0, import_react6.createContext)({
|
|
@@ -89337,7 +89761,7 @@ var FocusContext = (0, import_react6.createContext)({
|
|
|
89337
89761
|
FocusContext.displayName = "InternalFocusContext";
|
|
89338
89762
|
var FocusContext_default = FocusContext;
|
|
89339
89763
|
|
|
89340
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89764
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/CursorContext.js
|
|
89341
89765
|
init_esm_shims();
|
|
89342
89766
|
var import_react7 = __toESM(require_react(), 1);
|
|
89343
89767
|
var CursorContext = (0, import_react7.createContext)({
|
|
@@ -89347,11 +89771,11 @@ var CursorContext = (0, import_react7.createContext)({
|
|
|
89347
89771
|
CursorContext.displayName = "InternalCursorContext";
|
|
89348
89772
|
var CursorContext_default = CursorContext;
|
|
89349
89773
|
|
|
89350
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89774
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
|
|
89351
89775
|
init_esm_shims();
|
|
89352
89776
|
var import_react13 = __toESM(require_react(), 1);
|
|
89353
89777
|
|
|
89354
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89778
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
|
|
89355
89779
|
init_esm_shims();
|
|
89356
89780
|
var import_react12 = __toESM(require_react(), 1);
|
|
89357
89781
|
var import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
@@ -89394,23 +89818,23 @@ var codeExcerpt = (source2, line, options = {}) => {
|
|
|
89394
89818
|
};
|
|
89395
89819
|
var dist_default3 = codeExcerpt;
|
|
89396
89820
|
|
|
89397
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89821
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
|
|
89398
89822
|
init_esm_shims();
|
|
89399
89823
|
var import_react10 = __toESM(require_react(), 1);
|
|
89400
89824
|
|
|
89401
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89825
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/AccessibilityContext.js
|
|
89402
89826
|
init_esm_shims();
|
|
89403
89827
|
var import_react8 = __toESM(require_react(), 1);
|
|
89404
89828
|
var accessibilityContext = (0, import_react8.createContext)({
|
|
89405
89829
|
isScreenReaderEnabled: false
|
|
89406
89830
|
});
|
|
89407
89831
|
|
|
89408
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89832
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/BackgroundContext.js
|
|
89409
89833
|
init_esm_shims();
|
|
89410
89834
|
var import_react9 = __toESM(require_react(), 1);
|
|
89411
89835
|
var backgroundContext = (0, import_react9.createContext)(void 0);
|
|
89412
89836
|
|
|
89413
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89837
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Box.js
|
|
89414
89838
|
var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
|
|
89415
89839
|
const { isScreenReaderEnabled } = (0, import_react10.useContext)(accessibilityContext);
|
|
89416
89840
|
const label = ariaLabel ? import_react10.default.createElement("ink-text", null, ariaLabel) : void 0;
|
|
@@ -89438,7 +89862,7 @@ var Box = (0, import_react10.forwardRef)(({ children, backgroundColor, "aria-lab
|
|
|
89438
89862
|
Box.displayName = "Box";
|
|
89439
89863
|
var Box_default = Box;
|
|
89440
89864
|
|
|
89441
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89865
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Text.js
|
|
89442
89866
|
init_esm_shims();
|
|
89443
89867
|
var import_react11 = __toESM(require_react(), 1);
|
|
89444
89868
|
function Text({ color: color2, backgroundColor, dimColor = false, bold = false, italic = false, underline = false, strikethrough = false, inverse = false, wrap = "wrap", children, "aria-label": ariaLabel, "aria-hidden": ariaHidden = false }) {
|
|
@@ -89482,7 +89906,7 @@ function Text({ color: color2, backgroundColor, dimColor = false, bold = false,
|
|
|
89482
89906
|
return import_react11.default.createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap }, internal_transform: transform2 }, isScreenReaderEnabled && ariaLabel ? ariaLabel : children);
|
|
89483
89907
|
}
|
|
89484
89908
|
|
|
89485
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
89909
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
|
|
89486
89910
|
var cleanupPath = (path43) => {
|
|
89487
89911
|
return path43?.replace(`file://${cwd()}/`, "");
|
|
89488
89912
|
};
|
|
@@ -89591,7 +90015,7 @@ function ErrorOverview({ error: error51 }) {
|
|
|
89591
90015
|
);
|
|
89592
90016
|
}
|
|
89593
90017
|
|
|
89594
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
90018
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorBoundary.js
|
|
89595
90019
|
var ErrorBoundary = class extends import_react13.PureComponent {
|
|
89596
90020
|
static displayName = "InternalErrorBoundary";
|
|
89597
90021
|
static getDerivedStateFromError(error51) {
|
|
@@ -89611,7 +90035,7 @@ var ErrorBoundary = class extends import_react13.PureComponent {
|
|
|
89611
90035
|
}
|
|
89612
90036
|
};
|
|
89613
90037
|
|
|
89614
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
90038
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/App.js
|
|
89615
90039
|
var tab = " ";
|
|
89616
90040
|
var shiftTab = "\x1B[Z";
|
|
89617
90041
|
var escape3 = "\x1B";
|
|
@@ -89945,7 +90369,7 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
89945
90369
|
App.displayName = "InternalApp";
|
|
89946
90370
|
var App_default = App;
|
|
89947
90371
|
|
|
89948
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
90372
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/kitty-keyboard.js
|
|
89949
90373
|
init_esm_shims();
|
|
89950
90374
|
var kittyFlags = {
|
|
89951
90375
|
disambiguateEscapeCodes: 1,
|
|
@@ -89972,7 +90396,7 @@ var kittyModifiers = {
|
|
|
89972
90396
|
numLock: 128
|
|
89973
90397
|
};
|
|
89974
90398
|
|
|
89975
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
90399
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/ink.js
|
|
89976
90400
|
var noop4 = () => {
|
|
89977
90401
|
};
|
|
89978
90402
|
var kittyQueryEscapeByte = 27;
|
|
@@ -90053,6 +90477,27 @@ var Ink = class {
|
|
|
90053
90477
|
// This variable is used only in debug mode to store full static output
|
|
90054
90478
|
// so that it's rerendered every time, not just new static parts, like in non-debug mode
|
|
90055
90479
|
fullStaticOutput;
|
|
90480
|
+
// [gg patch] Raw bytes queued via insertBeforeFrame(), folded atomically into the
|
|
90481
|
+
// next frame write. Invariant: every write that shrinks the live frame must carry
|
|
90482
|
+
// compensating scrollback bytes, otherwise the frame bottom (footer) jumps up.
|
|
90483
|
+
pendingFrameInsert;
|
|
90484
|
+
// [gg patch] Blank pad rows currently sitting directly above the frame
|
|
90485
|
+
// (written by anchorFrameToBottom on net shrink). Consumed by the next
|
|
90486
|
+
// net-growth write, which overwrites them instead of scrolling.
|
|
90487
|
+
framePadDebt = 0;
|
|
90488
|
+
// [gg patch] Runtime gate for pad CREATION (consumption always runs).
|
|
90489
|
+
// The app toggles this via setFrameAnchorActive(): on while the agent
|
|
90490
|
+
// runs (footer must not jump), off at idle so symmetric UI shrink
|
|
90491
|
+
// (slash menu close, etc.) lets the footer return up naturally.
|
|
90492
|
+
frameAnchorActive = true;
|
|
90493
|
+
// [gg patch] Content rows currently visible ABOVE the live frame on the
|
|
90494
|
+
// screen (excludes scrollback). Lets idle shrink know whether the frame
|
|
90495
|
+
// bottom is pinned at the screen bottom (shrink would strand dead rows).
|
|
90496
|
+
linesAboveFrame = 0;
|
|
90497
|
+
// [gg patch] App-provided callback: given a row count, return that many
|
|
90498
|
+
// hard-wrapped transcript-tail rows (newline-joined) to backfill vacated
|
|
90499
|
+
// rows on a bottom-pinned idle shrink. Undefined → footer rises (default).
|
|
90500
|
+
frameShrinkBackfill = void 0;
|
|
90056
90501
|
exitPromise;
|
|
90057
90502
|
exitResult;
|
|
90058
90503
|
beforeExitHandler;
|
|
@@ -90112,6 +90557,7 @@ var Ink = class {
|
|
|
90112
90557
|
this.lastOutputHeight = 0;
|
|
90113
90558
|
this.lastTerminalWidth = this.getTerminalWidth();
|
|
90114
90559
|
this.fullStaticOutput = "";
|
|
90560
|
+
this.pendingFrameInsert = "";
|
|
90115
90561
|
const rootTag = options.concurrent ? import_constants4.ConcurrentRoot : import_constants4.LegacyRoot;
|
|
90116
90562
|
this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {
|
|
90117
90563
|
}, () => {
|
|
@@ -90187,17 +90633,30 @@ var Ink = class {
|
|
|
90187
90633
|
return;
|
|
90188
90634
|
}
|
|
90189
90635
|
const startTime = performance.now();
|
|
90190
|
-
|
|
90636
|
+
let { output, outputHeight, staticOutput } = renderer_default(this.rootNode, this.isScreenReaderEnabled);
|
|
90191
90637
|
this.options.onRender?.({ renderTime: performance.now() - startTime });
|
|
90638
|
+
if (this.options.clipFrameToTerminalHeight && this.options.stdout.isTTY && !this.isScreenReaderEnabled && !this.options.debug && !is_in_ci_default) {
|
|
90639
|
+
const maxRows = Math.max(1, this.options.stdout.rows - 2);
|
|
90640
|
+
if (outputHeight > maxRows) {
|
|
90641
|
+
output = output.split("\n").slice(-maxRows).join("\n");
|
|
90642
|
+
outputHeight = maxRows;
|
|
90643
|
+
}
|
|
90644
|
+
}
|
|
90192
90645
|
const hasStaticOutput = staticOutput && staticOutput !== "\n";
|
|
90646
|
+
const frameInsert = this.pendingFrameInsert;
|
|
90647
|
+
this.pendingFrameInsert = "";
|
|
90648
|
+
const hasFrameInsert = frameInsert !== "";
|
|
90193
90649
|
if (this.options.debug) {
|
|
90194
90650
|
if (hasStaticOutput) {
|
|
90195
90651
|
this.fullStaticOutput += staticOutput;
|
|
90196
90652
|
}
|
|
90197
|
-
this.options.stdout.write(this.fullStaticOutput + output);
|
|
90653
|
+
this.options.stdout.write(frameInsert + this.fullStaticOutput + output);
|
|
90198
90654
|
return;
|
|
90199
90655
|
}
|
|
90200
90656
|
if (is_in_ci_default) {
|
|
90657
|
+
if (hasFrameInsert) {
|
|
90658
|
+
this.options.stdout.write(frameInsert);
|
|
90659
|
+
}
|
|
90201
90660
|
if (hasStaticOutput) {
|
|
90202
90661
|
this.options.stdout.write(staticOutput);
|
|
90203
90662
|
}
|
|
@@ -90211,23 +90670,23 @@ var Ink = class {
|
|
|
90211
90670
|
if (sync) {
|
|
90212
90671
|
this.options.stdout.write(bsu);
|
|
90213
90672
|
}
|
|
90214
|
-
if (hasStaticOutput) {
|
|
90673
|
+
if (hasStaticOutput || hasFrameInsert) {
|
|
90215
90674
|
const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
|
|
90216
|
-
this.options.stdout.write(erase + staticOutput);
|
|
90675
|
+
this.options.stdout.write(erase + frameInsert + (hasStaticOutput ? staticOutput : ""));
|
|
90217
90676
|
this.lastOutputHeight = 0;
|
|
90218
90677
|
}
|
|
90219
|
-
if (output === this.lastOutput && !hasStaticOutput) {
|
|
90678
|
+
if (output === this.lastOutput && !hasStaticOutput && !hasFrameInsert) {
|
|
90220
90679
|
if (sync) {
|
|
90221
90680
|
this.options.stdout.write(esu);
|
|
90222
90681
|
}
|
|
90223
90682
|
return;
|
|
90224
90683
|
}
|
|
90225
90684
|
const terminalWidth = this.getTerminalWidth();
|
|
90226
|
-
const wrappedOutput =
|
|
90685
|
+
const wrappedOutput = wrapAnsi2(output, terminalWidth, {
|
|
90227
90686
|
trim: false,
|
|
90228
90687
|
hard: true
|
|
90229
90688
|
});
|
|
90230
|
-
if (hasStaticOutput) {
|
|
90689
|
+
if (hasStaticOutput || hasFrameInsert) {
|
|
90231
90690
|
this.options.stdout.write(wrappedOutput);
|
|
90232
90691
|
} else {
|
|
90233
90692
|
const erase = this.lastOutputHeight > 0 ? base_exports.eraseLines(this.lastOutputHeight) : "";
|
|
@@ -90246,12 +90705,83 @@ var Ink = class {
|
|
|
90246
90705
|
}
|
|
90247
90706
|
const isFullscreen = this.options.stdout.isTTY && outputHeight >= this.options.stdout.rows;
|
|
90248
90707
|
const outputToRender = isFullscreen ? output : output + "\n";
|
|
90708
|
+
let framePad = "";
|
|
90709
|
+
let padConsumeRows = 0;
|
|
90710
|
+
let backfillText = "";
|
|
90711
|
+
let backfillRows = 0;
|
|
90712
|
+
let doBackfillRepaint = false;
|
|
90713
|
+
if (this.options.anchorFrameToBottom && this.options.stdout.isTTY && !isFullscreen && this.lastOutputHeight > 0) {
|
|
90714
|
+
const insertLineCount = hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0;
|
|
90715
|
+
const staticLineCount = hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0;
|
|
90716
|
+
const delta = insertLineCount + staticLineCount + outputHeight - this.lastOutputHeight;
|
|
90717
|
+
const prevDebt = Math.min(this.framePadDebt, Math.max(0, this.options.stdout.rows - 2));
|
|
90718
|
+
const bottomPinned = this.linesAboveFrame + Math.max(this.lastOutputHeight, outputHeight) + 1 >= this.options.stdout.rows;
|
|
90719
|
+
if (!this.frameAnchorActive && delta !== 0 && bottomPinned && typeof this.frameShrinkBackfill === "function") {
|
|
90720
|
+
const needRows = Math.max(0, this.options.stdout.rows - outputHeight - 1);
|
|
90721
|
+
let fill;
|
|
90722
|
+
try {
|
|
90723
|
+
fill = needRows > 0 ? this.frameShrinkBackfill(needRows) : "";
|
|
90724
|
+
} catch {
|
|
90725
|
+
fill = void 0;
|
|
90726
|
+
}
|
|
90727
|
+
if (typeof fill === "string") {
|
|
90728
|
+
backfillText = fill === "" || fill.endsWith("\n") ? fill : fill + "\n";
|
|
90729
|
+
backfillRows = (backfillText.match(/\n/g) ?? []).length;
|
|
90730
|
+
doBackfillRepaint = true;
|
|
90731
|
+
padConsumeRows = 0;
|
|
90732
|
+
this.framePadDebt = 0;
|
|
90733
|
+
}
|
|
90734
|
+
}
|
|
90735
|
+
if (!doBackfillRepaint && (delta !== 0 && (this.frameAnchorActive || prevDebt > 0) || (hasFrameInsert || hasStaticOutput) && prevDebt > 0)) {
|
|
90736
|
+
const newDebt = this.frameAnchorActive ? Math.max(0, prevDebt - delta) : Math.min(prevDebt, Math.max(0, prevDebt - delta));
|
|
90737
|
+
padConsumeRows = prevDebt;
|
|
90738
|
+
framePad = newDebt > 0 ? "\n".repeat(newDebt) : "";
|
|
90739
|
+
this.framePadDebt = newDebt;
|
|
90740
|
+
}
|
|
90741
|
+
if (process13.env["GG_INK_DEBUG"] === "1" && (delta !== 0 || this.framePadDebt > 0)) {
|
|
90742
|
+
try {
|
|
90743
|
+
fs31.appendFileSync("/tmp/gg-ink-debug.log", JSON.stringify({
|
|
90744
|
+
t: Date.now() % 1e5,
|
|
90745
|
+
delta,
|
|
90746
|
+
ins: insertLineCount,
|
|
90747
|
+
out: outputHeight,
|
|
90748
|
+
last: this.lastOutputHeight,
|
|
90749
|
+
pad: framePad.length,
|
|
90750
|
+
consume: padConsumeRows,
|
|
90751
|
+
debt: this.framePadDebt,
|
|
90752
|
+
insHead: hasFrameInsert ? JSON.stringify(frameInsert.slice(0, 60)) : ""
|
|
90753
|
+
}) + "\n");
|
|
90754
|
+
} catch {
|
|
90755
|
+
}
|
|
90756
|
+
}
|
|
90757
|
+
}
|
|
90758
|
+
const hasFramePad = framePad !== "";
|
|
90759
|
+
const hasBackfill = doBackfillRepaint;
|
|
90760
|
+
const hasPadConsume = padConsumeRows > 0;
|
|
90761
|
+
if (hasBackfill) {
|
|
90762
|
+
const sync = shouldSynchronize(this.options.stdout);
|
|
90763
|
+
if (sync) {
|
|
90764
|
+
this.options.stdout.write(bsu);
|
|
90765
|
+
}
|
|
90766
|
+
this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + backfillText + outputToRender);
|
|
90767
|
+
this.lastOutput = output;
|
|
90768
|
+
this.lastOutputToRender = outputToRender;
|
|
90769
|
+
this.lastOutputHeight = outputHeight;
|
|
90770
|
+
this.log.sync(outputToRender);
|
|
90771
|
+
if (sync) {
|
|
90772
|
+
this.options.stdout.write(esu);
|
|
90773
|
+
}
|
|
90774
|
+
this.linesAboveFrame = backfillRows;
|
|
90775
|
+
return;
|
|
90776
|
+
}
|
|
90777
|
+
const rowsAddedAboveFrame = (hasFrameInsert ? (frameInsert.match(/\n/g) ?? []).length : 0) + (hasStaticOutput ? (staticOutput.match(/\n/g) ?? []).length : 0) + (hasFramePad ? framePad.length : 0) - padConsumeRows;
|
|
90249
90778
|
if (isFullscreen && this.lastOutputHeight >= this.options.stdout.rows) {
|
|
90250
90779
|
const sync = shouldSynchronize(this.options.stdout);
|
|
90251
90780
|
if (sync) {
|
|
90252
90781
|
this.options.stdout.write(bsu);
|
|
90253
90782
|
}
|
|
90254
|
-
this.
|
|
90783
|
+
this.framePadDebt = 0;
|
|
90784
|
+
this.options.stdout.write(frameInsert + base_exports.cursorTo(0, 0) + base_exports.eraseDown + this.fullStaticOutput + output);
|
|
90255
90785
|
this.lastOutput = output;
|
|
90256
90786
|
this.lastOutputToRender = outputToRender;
|
|
90257
90787
|
this.lastOutputHeight = outputHeight;
|
|
@@ -90261,13 +90791,16 @@ var Ink = class {
|
|
|
90261
90791
|
}
|
|
90262
90792
|
return;
|
|
90263
90793
|
}
|
|
90264
|
-
if (hasStaticOutput) {
|
|
90794
|
+
if (hasStaticOutput || hasFrameInsert || hasFramePad || hasPadConsume) {
|
|
90265
90795
|
const sync = shouldSynchronize(this.options.stdout);
|
|
90266
90796
|
if (sync) {
|
|
90267
90797
|
this.options.stdout.write(bsu);
|
|
90268
90798
|
}
|
|
90269
90799
|
this.log.clear();
|
|
90270
|
-
|
|
90800
|
+
if (hasPadConsume) {
|
|
90801
|
+
this.options.stdout.write(base_exports.cursorUp(padConsumeRows));
|
|
90802
|
+
}
|
|
90803
|
+
this.options.stdout.write(frameInsert + (hasStaticOutput ? staticOutput : "") + framePad);
|
|
90271
90804
|
this.log(outputToRender);
|
|
90272
90805
|
if (sync) {
|
|
90273
90806
|
this.options.stdout.write(esu);
|
|
@@ -90275,6 +90808,11 @@ var Ink = class {
|
|
|
90275
90808
|
} else if (output !== this.lastOutput || this.log.isCursorDirty()) {
|
|
90276
90809
|
this.throttledLog(outputToRender);
|
|
90277
90810
|
}
|
|
90811
|
+
this.linesAboveFrame = Math.max(0, this.linesAboveFrame + rowsAddedAboveFrame);
|
|
90812
|
+
const maxAbove = Math.max(0, this.options.stdout.rows - outputHeight);
|
|
90813
|
+
if (this.linesAboveFrame + outputHeight > this.options.stdout.rows) {
|
|
90814
|
+
this.linesAboveFrame = maxAbove;
|
|
90815
|
+
}
|
|
90278
90816
|
this.lastOutput = output;
|
|
90279
90817
|
this.lastOutputToRender = outputToRender;
|
|
90280
90818
|
this.lastOutputHeight = outputHeight;
|
|
@@ -90292,6 +90830,32 @@ var Ink = class {
|
|
|
90292
90830
|
reconciler_default.flushSyncWork();
|
|
90293
90831
|
}
|
|
90294
90832
|
}
|
|
90833
|
+
// [gg patch] Toggle pad creation at runtime. See frameAnchorActive.
|
|
90834
|
+
setFrameAnchorActive(active) {
|
|
90835
|
+
this.frameAnchorActive = active;
|
|
90836
|
+
}
|
|
90837
|
+
// [gg patch] Install the transcript-tail provider. See frameShrinkBackfill.
|
|
90838
|
+
setFrameShrinkBackfill(fn) {
|
|
90839
|
+
this.frameShrinkBackfill = fn;
|
|
90840
|
+
}
|
|
90841
|
+
// [gg patch] Queue raw bytes to be written into scrollback atomically with the
|
|
90842
|
+
// next frame paint (mirrors Ink's <Static> output handling). Used by the app's
|
|
90843
|
+
// transcript flush so the frame shrink and the scrollback insert land in one write.
|
|
90844
|
+
insertBeforeFrame(data) {
|
|
90845
|
+
if (this.isUnmounted) {
|
|
90846
|
+
return;
|
|
90847
|
+
}
|
|
90848
|
+
if (this.options.debug || is_in_ci_default || !this.options.stdout.isTTY) {
|
|
90849
|
+
this.options.stdout.write(data);
|
|
90850
|
+
return;
|
|
90851
|
+
}
|
|
90852
|
+
this.pendingFrameInsert += data;
|
|
90853
|
+
setTimeout(() => {
|
|
90854
|
+
if (this.pendingFrameInsert && !this.isUnmounted) {
|
|
90855
|
+
this.onRender();
|
|
90856
|
+
}
|
|
90857
|
+
}, 100);
|
|
90858
|
+
}
|
|
90295
90859
|
writeToStdout(data) {
|
|
90296
90860
|
if (this.isUnmounted) {
|
|
90297
90861
|
return;
|
|
@@ -90314,6 +90878,10 @@ var Ink = class {
|
|
|
90314
90878
|
if (sync) {
|
|
90315
90879
|
this.options.stdout.write(esu);
|
|
90316
90880
|
}
|
|
90881
|
+
if (data.includes("\n")) {
|
|
90882
|
+
this.framePadDebt = 0;
|
|
90883
|
+
this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
|
|
90884
|
+
}
|
|
90317
90885
|
}
|
|
90318
90886
|
writeToStderr(data) {
|
|
90319
90887
|
if (this.isUnmounted) {
|
|
@@ -90338,6 +90906,10 @@ var Ink = class {
|
|
|
90338
90906
|
if (sync) {
|
|
90339
90907
|
this.options.stdout.write(esu);
|
|
90340
90908
|
}
|
|
90909
|
+
if (data.includes("\n")) {
|
|
90910
|
+
this.framePadDebt = 0;
|
|
90911
|
+
this.linesAboveFrame = Math.min(this.linesAboveFrame + (data.match(/\n/g) ?? []).length, Math.max(0, this.options.stdout.rows - this.lastOutputHeight));
|
|
90912
|
+
}
|
|
90341
90913
|
}
|
|
90342
90914
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
90343
90915
|
unmount(error51) {
|
|
@@ -90369,6 +90941,13 @@ var Ink = class {
|
|
|
90369
90941
|
this.onRender();
|
|
90370
90942
|
}
|
|
90371
90943
|
}
|
|
90944
|
+
if (this.pendingFrameInsert) {
|
|
90945
|
+
const pendingInsert = this.pendingFrameInsert;
|
|
90946
|
+
this.pendingFrameInsert = "";
|
|
90947
|
+
if (canWriteToStdout) {
|
|
90948
|
+
this.options.stdout.write(pendingInsert);
|
|
90949
|
+
}
|
|
90950
|
+
}
|
|
90372
90951
|
this.isUnmounted = true;
|
|
90373
90952
|
this.unsubscribeExit();
|
|
90374
90953
|
if (typeof this.restoreConsole === "function") {
|
|
@@ -90438,6 +91017,7 @@ var Ink = class {
|
|
|
90438
91017
|
if (!is_in_ci_default && !this.options.debug) {
|
|
90439
91018
|
this.log.clear();
|
|
90440
91019
|
this.log.sync(this.lastOutputToRender || this.lastOutput + "\n");
|
|
91020
|
+
this.framePadDebt = 0;
|
|
90441
91021
|
}
|
|
90442
91022
|
}
|
|
90443
91023
|
patchConsole() {
|
|
@@ -90513,7 +91093,7 @@ var Ink = class {
|
|
|
90513
91093
|
}
|
|
90514
91094
|
};
|
|
90515
91095
|
|
|
90516
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91096
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render.js
|
|
90517
91097
|
var render = (node, options) => {
|
|
90518
91098
|
const inkOptions = {
|
|
90519
91099
|
stdout: process14.stdout,
|
|
@@ -90536,7 +91116,15 @@ var render = (node, options) => {
|
|
|
90536
91116
|
},
|
|
90537
91117
|
waitUntilExit: instance.waitUntilExit,
|
|
90538
91118
|
cleanup: () => instances_default.delete(inkOptions.stdout),
|
|
90539
|
-
clear: instance.clear
|
|
91119
|
+
clear: instance.clear,
|
|
91120
|
+
// [gg patch] Queue raw bytes to be written into scrollback atomically with
|
|
91121
|
+
// the next frame paint. See Ink#insertBeforeFrame in build/ink.js.
|
|
91122
|
+
insertBeforeFrame: instance.insertBeforeFrame,
|
|
91123
|
+
// [gg patch] Toggle bottom-anchor pad creation (on while agent runs).
|
|
91124
|
+
setFrameAnchorActive: instance.setFrameAnchorActive,
|
|
91125
|
+
// [gg patch] Install the transcript-tail backfill provider for
|
|
91126
|
+
// bottom-pinned idle shrink (slash menu close).
|
|
91127
|
+
setFrameShrinkBackfill: instance.setFrameShrinkBackfill
|
|
90540
91128
|
};
|
|
90541
91129
|
};
|
|
90542
91130
|
var render_default = render;
|
|
@@ -90560,31 +91148,31 @@ var getInstance = (stdout, createInstance, concurrent) => {
|
|
|
90560
91148
|
return instance;
|
|
90561
91149
|
};
|
|
90562
91150
|
|
|
90563
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91151
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/render-to-string.js
|
|
90564
91152
|
init_esm_shims();
|
|
90565
91153
|
var import_constants5 = __toESM(require_constants(), 1);
|
|
90566
91154
|
|
|
90567
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91155
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Static.js
|
|
90568
91156
|
init_esm_shims();
|
|
90569
91157
|
var import_react16 = __toESM(require_react(), 1);
|
|
90570
91158
|
|
|
90571
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91159
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Transform.js
|
|
90572
91160
|
init_esm_shims();
|
|
90573
91161
|
var import_react17 = __toESM(require_react(), 1);
|
|
90574
91162
|
|
|
90575
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91163
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Newline.js
|
|
90576
91164
|
init_esm_shims();
|
|
90577
91165
|
var import_react18 = __toESM(require_react(), 1);
|
|
90578
91166
|
|
|
90579
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91167
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/Spacer.js
|
|
90580
91168
|
init_esm_shims();
|
|
90581
91169
|
var import_react19 = __toESM(require_react(), 1);
|
|
90582
91170
|
|
|
90583
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91171
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
|
|
90584
91172
|
init_esm_shims();
|
|
90585
91173
|
var import_react21 = __toESM(require_react(), 1);
|
|
90586
91174
|
|
|
90587
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91175
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/parse-keypress.js
|
|
90588
91176
|
init_esm_shims();
|
|
90589
91177
|
import { Buffer as Buffer2 } from "buffer";
|
|
90590
91178
|
var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
|
|
@@ -91014,13 +91602,13 @@ var parseKeypress = (s = "") => {
|
|
|
91014
91602
|
};
|
|
91015
91603
|
var parse_keypress_default = parseKeypress;
|
|
91016
91604
|
|
|
91017
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91605
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdin.js
|
|
91018
91606
|
init_esm_shims();
|
|
91019
91607
|
var import_react20 = __toESM(require_react(), 1);
|
|
91020
91608
|
var useStdin = () => (0, import_react20.useContext)(StdinContext_default);
|
|
91021
91609
|
var use_stdin_default = useStdin;
|
|
91022
91610
|
|
|
91023
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91611
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-input.js
|
|
91024
91612
|
var useInput = (inputHandler, options = {}) => {
|
|
91025
91613
|
const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
|
|
91026
91614
|
(0, import_react21.useEffect)(() => {
|
|
@@ -91103,31 +91691,31 @@ var useInput = (inputHandler, options = {}) => {
|
|
|
91103
91691
|
};
|
|
91104
91692
|
var use_input_default = useInput;
|
|
91105
91693
|
|
|
91106
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91694
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-app.js
|
|
91107
91695
|
init_esm_shims();
|
|
91108
91696
|
var import_react22 = __toESM(require_react(), 1);
|
|
91109
91697
|
var useApp = () => (0, import_react22.useContext)(AppContext_default);
|
|
91110
91698
|
var use_app_default = useApp;
|
|
91111
91699
|
|
|
91112
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91700
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stdout.js
|
|
91113
91701
|
init_esm_shims();
|
|
91114
91702
|
var import_react23 = __toESM(require_react(), 1);
|
|
91115
91703
|
var useStdout = () => (0, import_react23.useContext)(StdoutContext_default);
|
|
91116
91704
|
var use_stdout_default = useStdout;
|
|
91117
91705
|
|
|
91118
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91706
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-stderr.js
|
|
91119
91707
|
init_esm_shims();
|
|
91120
91708
|
var import_react24 = __toESM(require_react(), 1);
|
|
91121
91709
|
|
|
91122
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91710
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus.js
|
|
91123
91711
|
init_esm_shims();
|
|
91124
91712
|
var import_react25 = __toESM(require_react(), 1);
|
|
91125
91713
|
|
|
91126
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91714
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-focus-manager.js
|
|
91127
91715
|
init_esm_shims();
|
|
91128
91716
|
var import_react26 = __toESM(require_react(), 1);
|
|
91129
91717
|
|
|
91130
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91718
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js
|
|
91131
91719
|
init_esm_shims();
|
|
91132
91720
|
var import_react27 = __toESM(require_react(), 1);
|
|
91133
91721
|
var useIsScreenReaderEnabled = () => {
|
|
@@ -91136,11 +91724,11 @@ var useIsScreenReaderEnabled = () => {
|
|
|
91136
91724
|
};
|
|
91137
91725
|
var use_is_screen_reader_enabled_default = useIsScreenReaderEnabled;
|
|
91138
91726
|
|
|
91139
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91727
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/hooks/use-cursor.js
|
|
91140
91728
|
init_esm_shims();
|
|
91141
91729
|
var import_react28 = __toESM(require_react(), 1);
|
|
91142
91730
|
|
|
91143
|
-
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=
|
|
91731
|
+
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=2cc234db3e6221cf3cae705a141f22cfde2bf2e9acbe46e210b343f8c3d9ef61_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/measure-element.js
|
|
91144
91732
|
init_esm_shims();
|
|
91145
91733
|
var measureElement = (node) => ({
|
|
91146
91734
|
width: node.yogaNode?.getComputedWidth() ?? 0,
|
|
@@ -92311,427 +92899,6 @@ function toolAccentColor(theme, name) {
|
|
|
92311
92899
|
|
|
92312
92900
|
// ../ggcoder/dist/ui/terminal-history-format.js
|
|
92313
92901
|
init_esm_shims();
|
|
92314
|
-
|
|
92315
|
-
// ../../node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js
|
|
92316
|
-
init_esm_shims();
|
|
92317
|
-
var segmenter4 = new Intl.Segmenter();
|
|
92318
|
-
var zeroWidthClusterRegex2 = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
|
|
92319
|
-
var leadingNonPrintingRegex2 = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
|
|
92320
|
-
var rgiEmojiRegex2 = new RegExp("^\\p{RGI_Emoji}$", "v");
|
|
92321
|
-
var unqualifiedKeycapRegex2 = /^[\d#*]\u20E3$/;
|
|
92322
|
-
var extendedPictographicRegex2 = new RegExp("\\p{Extended_Pictographic}", "gu");
|
|
92323
|
-
function isDoubleWidthNonRgiEmojiSequence2(segment) {
|
|
92324
|
-
if (segment.length > 50) {
|
|
92325
|
-
return false;
|
|
92326
|
-
}
|
|
92327
|
-
if (unqualifiedKeycapRegex2.test(segment)) {
|
|
92328
|
-
return true;
|
|
92329
|
-
}
|
|
92330
|
-
if (segment.includes("\u200D")) {
|
|
92331
|
-
const pictographics = segment.match(extendedPictographicRegex2);
|
|
92332
|
-
return pictographics !== null && pictographics.length >= 2;
|
|
92333
|
-
}
|
|
92334
|
-
return false;
|
|
92335
|
-
}
|
|
92336
|
-
function baseVisible2(segment) {
|
|
92337
|
-
return segment.replace(leadingNonPrintingRegex2, "");
|
|
92338
|
-
}
|
|
92339
|
-
function isZeroWidthCluster2(segment) {
|
|
92340
|
-
return zeroWidthClusterRegex2.test(segment);
|
|
92341
|
-
}
|
|
92342
|
-
function trailingHalfwidthWidth2(segment, eastAsianWidthOptions) {
|
|
92343
|
-
let extra = 0;
|
|
92344
|
-
if (segment.length > 1) {
|
|
92345
|
-
for (const char of segment.slice(1)) {
|
|
92346
|
-
if (char >= "\uFF00" && char <= "\uFFEF") {
|
|
92347
|
-
extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
|
|
92348
|
-
}
|
|
92349
|
-
}
|
|
92350
|
-
}
|
|
92351
|
-
return extra;
|
|
92352
|
-
}
|
|
92353
|
-
function stringWidth3(input, options = {}) {
|
|
92354
|
-
if (typeof input !== "string" || input.length === 0) {
|
|
92355
|
-
return 0;
|
|
92356
|
-
}
|
|
92357
|
-
const {
|
|
92358
|
-
ambiguousIsNarrow = true,
|
|
92359
|
-
countAnsiEscapeCodes = false
|
|
92360
|
-
} = options;
|
|
92361
|
-
let string4 = input;
|
|
92362
|
-
if (!countAnsiEscapeCodes && (string4.includes("\x1B") || string4.includes("\x9B"))) {
|
|
92363
|
-
string4 = stripAnsi(string4);
|
|
92364
|
-
}
|
|
92365
|
-
if (string4.length === 0) {
|
|
92366
|
-
return 0;
|
|
92367
|
-
}
|
|
92368
|
-
if (/^[\u0020-\u007E]*$/.test(string4)) {
|
|
92369
|
-
return string4.length;
|
|
92370
|
-
}
|
|
92371
|
-
let width = 0;
|
|
92372
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
92373
|
-
for (const { segment } of segmenter4.segment(string4)) {
|
|
92374
|
-
if (isZeroWidthCluster2(segment)) {
|
|
92375
|
-
continue;
|
|
92376
|
-
}
|
|
92377
|
-
if (rgiEmojiRegex2.test(segment) || isDoubleWidthNonRgiEmojiSequence2(segment)) {
|
|
92378
|
-
width += 2;
|
|
92379
|
-
continue;
|
|
92380
|
-
}
|
|
92381
|
-
const codePoint = baseVisible2(segment).codePointAt(0);
|
|
92382
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
92383
|
-
width += trailingHalfwidthWidth2(segment, eastAsianWidthOptions);
|
|
92384
|
-
}
|
|
92385
|
-
return width;
|
|
92386
|
-
}
|
|
92387
|
-
|
|
92388
|
-
// ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
|
|
92389
|
-
init_esm_shims();
|
|
92390
|
-
var ANSI_ESCAPE = "\x1B";
|
|
92391
|
-
var ANSI_ESCAPE_CSI = "\x9B";
|
|
92392
|
-
var ESCAPES4 = /* @__PURE__ */ new Set([
|
|
92393
|
-
ANSI_ESCAPE,
|
|
92394
|
-
ANSI_ESCAPE_CSI
|
|
92395
|
-
]);
|
|
92396
|
-
var ANSI_ESCAPE_BELL2 = "\x07";
|
|
92397
|
-
var ANSI_CSI3 = "[";
|
|
92398
|
-
var ANSI_OSC3 = "]";
|
|
92399
|
-
var ANSI_SGR_TERMINATOR3 = "m";
|
|
92400
|
-
var ANSI_SGR_RESET = 0;
|
|
92401
|
-
var ANSI_SGR_RESET_FOREGROUND = 39;
|
|
92402
|
-
var ANSI_SGR_RESET_BACKGROUND = 49;
|
|
92403
|
-
var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
|
|
92404
|
-
var ANSI_SGR_FOREGROUND_EXTENDED = 38;
|
|
92405
|
-
var ANSI_SGR_BACKGROUND_EXTENDED = 48;
|
|
92406
|
-
var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
|
|
92407
|
-
var ANSI_SGR_COLOR_MODE_256 = 5;
|
|
92408
|
-
var ANSI_SGR_COLOR_MODE_RGB = 2;
|
|
92409
|
-
var ANSI_ESCAPE_LINK2 = `${ANSI_OSC3}8;;`;
|
|
92410
|
-
var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI3}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR3}|${ANSI_ESCAPE_LINK2}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
|
|
92411
|
-
var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR3}`);
|
|
92412
|
-
var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
|
|
92413
|
-
ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
|
|
92414
|
-
var segmenter5 = new Intl.Segmenter();
|
|
92415
|
-
var getGraphemes = (string4) => Array.from(segmenter5.segment(string4), ({ segment }) => segment);
|
|
92416
|
-
var TAB_SIZE = 8;
|
|
92417
|
-
var wrapAnsiCode2 = (code) => `${ANSI_ESCAPE}${ANSI_CSI3}${code}${ANSI_SGR_TERMINATOR3}`;
|
|
92418
|
-
var wrapAnsiHyperlink2 = (url2) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK2}${url2}${ANSI_ESCAPE_BELL2}`;
|
|
92419
|
-
var getSgrTokens = (sgrParameters) => {
|
|
92420
|
-
const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
|
|
92421
|
-
const sgrTokens = [];
|
|
92422
|
-
for (let index = 0; index < codes.length; index++) {
|
|
92423
|
-
const code = codes[index];
|
|
92424
|
-
if (!Number.isFinite(code)) {
|
|
92425
|
-
continue;
|
|
92426
|
-
}
|
|
92427
|
-
if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
|
|
92428
|
-
if (index + 1 >= codes.length) {
|
|
92429
|
-
break;
|
|
92430
|
-
}
|
|
92431
|
-
const mode = codes[index + 1];
|
|
92432
|
-
if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
|
|
92433
|
-
sgrTokens.push([code, mode, codes[index + 2]]);
|
|
92434
|
-
index += 2;
|
|
92435
|
-
continue;
|
|
92436
|
-
}
|
|
92437
|
-
const red = codes[index + 2];
|
|
92438
|
-
const green = codes[index + 3];
|
|
92439
|
-
const blue = codes[index + 4];
|
|
92440
|
-
if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
|
|
92441
|
-
sgrTokens.push([code, mode, red, green, blue]);
|
|
92442
|
-
index += 4;
|
|
92443
|
-
continue;
|
|
92444
|
-
}
|
|
92445
|
-
break;
|
|
92446
|
-
}
|
|
92447
|
-
sgrTokens.push([code]);
|
|
92448
|
-
}
|
|
92449
|
-
return sgrTokens;
|
|
92450
|
-
};
|
|
92451
|
-
var removeActiveStyle = (activeStyles, family) => {
|
|
92452
|
-
const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
|
|
92453
|
-
if (activeStyleIndex !== -1) {
|
|
92454
|
-
activeStyles.splice(activeStyleIndex, 1);
|
|
92455
|
-
}
|
|
92456
|
-
};
|
|
92457
|
-
var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
|
|
92458
|
-
removeActiveStyle(activeStyles, nextActiveStyle.family);
|
|
92459
|
-
activeStyles.push(nextActiveStyle);
|
|
92460
|
-
};
|
|
92461
|
-
var removeModifierStylesByClose = (activeStyles, closeCode) => {
|
|
92462
|
-
for (let index = activeStyles.length - 1; index >= 0; index--) {
|
|
92463
|
-
const activeStyle = activeStyles[index];
|
|
92464
|
-
if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
|
|
92465
|
-
activeStyles.splice(index, 1);
|
|
92466
|
-
}
|
|
92467
|
-
}
|
|
92468
|
-
};
|
|
92469
|
-
var getColorStyle = (code, sgrToken) => {
|
|
92470
|
-
if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
|
|
92471
|
-
return {
|
|
92472
|
-
family: "foreground",
|
|
92473
|
-
open: sgrToken.join(";"),
|
|
92474
|
-
close: ANSI_SGR_RESET_FOREGROUND
|
|
92475
|
-
};
|
|
92476
|
-
}
|
|
92477
|
-
if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
|
|
92478
|
-
return {
|
|
92479
|
-
family: "background",
|
|
92480
|
-
open: sgrToken.join(";"),
|
|
92481
|
-
close: ANSI_SGR_RESET_BACKGROUND
|
|
92482
|
-
};
|
|
92483
|
-
}
|
|
92484
|
-
if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
|
|
92485
|
-
return {
|
|
92486
|
-
family: "underlineColor",
|
|
92487
|
-
open: sgrToken.join(";"),
|
|
92488
|
-
close: ANSI_SGR_RESET_UNDERLINE_COLOR
|
|
92489
|
-
};
|
|
92490
|
-
}
|
|
92491
|
-
};
|
|
92492
|
-
var applySgrResetCode = (code, activeStyles) => {
|
|
92493
|
-
if (code === ANSI_SGR_RESET) {
|
|
92494
|
-
activeStyles.length = 0;
|
|
92495
|
-
return true;
|
|
92496
|
-
}
|
|
92497
|
-
if (code === ANSI_SGR_RESET_FOREGROUND) {
|
|
92498
|
-
removeActiveStyle(activeStyles, "foreground");
|
|
92499
|
-
return true;
|
|
92500
|
-
}
|
|
92501
|
-
if (code === ANSI_SGR_RESET_BACKGROUND) {
|
|
92502
|
-
removeActiveStyle(activeStyles, "background");
|
|
92503
|
-
return true;
|
|
92504
|
-
}
|
|
92505
|
-
if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
|
|
92506
|
-
removeActiveStyle(activeStyles, "underlineColor");
|
|
92507
|
-
return true;
|
|
92508
|
-
}
|
|
92509
|
-
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
|
|
92510
|
-
removeModifierStylesByClose(activeStyles, code);
|
|
92511
|
-
return true;
|
|
92512
|
-
}
|
|
92513
|
-
return false;
|
|
92514
|
-
};
|
|
92515
|
-
var applySgrToken2 = (sgrToken, activeStyles) => {
|
|
92516
|
-
const [code] = sgrToken;
|
|
92517
|
-
if (applySgrResetCode(code, activeStyles)) {
|
|
92518
|
-
return;
|
|
92519
|
-
}
|
|
92520
|
-
const colorStyle = getColorStyle(code, sgrToken);
|
|
92521
|
-
if (colorStyle) {
|
|
92522
|
-
upsertActiveStyle(activeStyles, colorStyle);
|
|
92523
|
-
return;
|
|
92524
|
-
}
|
|
92525
|
-
const close = ansi_styles_default.codes.get(code);
|
|
92526
|
-
if (close !== void 0 && close !== ANSI_SGR_RESET) {
|
|
92527
|
-
upsertActiveStyle(activeStyles, {
|
|
92528
|
-
family: `modifier-${code}`,
|
|
92529
|
-
open: sgrToken.join(";"),
|
|
92530
|
-
close
|
|
92531
|
-
});
|
|
92532
|
-
}
|
|
92533
|
-
};
|
|
92534
|
-
var applySgrParameters = (sgrParameters, activeStyles) => {
|
|
92535
|
-
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
92536
|
-
applySgrToken2(sgrToken, activeStyles);
|
|
92537
|
-
}
|
|
92538
|
-
};
|
|
92539
|
-
var applySgrResets = (sgrParameters, activeStyles) => {
|
|
92540
|
-
for (const sgrToken of getSgrTokens(sgrParameters)) {
|
|
92541
|
-
const [code] = sgrToken;
|
|
92542
|
-
applySgrResetCode(code, activeStyles);
|
|
92543
|
-
}
|
|
92544
|
-
};
|
|
92545
|
-
var applyLeadingSgrResets = (string4, activeStyles) => {
|
|
92546
|
-
let remainder = string4;
|
|
92547
|
-
while (remainder.length > 0) {
|
|
92548
|
-
if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
|
|
92549
|
-
const match = ANSI_ESCAPE_REGEX.exec(remainder);
|
|
92550
|
-
if (!match) {
|
|
92551
|
-
break;
|
|
92552
|
-
}
|
|
92553
|
-
if (match.groups.sgr !== void 0) {
|
|
92554
|
-
applySgrResets(match.groups.sgr, activeStyles);
|
|
92555
|
-
}
|
|
92556
|
-
remainder = remainder.slice(match[0].length);
|
|
92557
|
-
continue;
|
|
92558
|
-
}
|
|
92559
|
-
if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
|
|
92560
|
-
const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
|
|
92561
|
-
if (!match || match.groups.sgr === void 0) {
|
|
92562
|
-
break;
|
|
92563
|
-
}
|
|
92564
|
-
applySgrResets(match.groups.sgr, activeStyles);
|
|
92565
|
-
remainder = remainder.slice(match[0].length);
|
|
92566
|
-
continue;
|
|
92567
|
-
}
|
|
92568
|
-
break;
|
|
92569
|
-
}
|
|
92570
|
-
};
|
|
92571
|
-
var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode2(activeStyle.close)).join("");
|
|
92572
|
-
var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode2(activeStyle.open)).join("");
|
|
92573
|
-
var wordLengths2 = (string4) => string4.split(" ").map((word) => stringWidth3(word));
|
|
92574
|
-
var wrapWord2 = (rows, word, columns) => {
|
|
92575
|
-
const characters = getGraphemes(word);
|
|
92576
|
-
let isInsideEscape = false;
|
|
92577
|
-
let isInsideLinkEscape = false;
|
|
92578
|
-
let visible = stringWidth3(stripAnsi(rows.at(-1)));
|
|
92579
|
-
for (const [index, character] of characters.entries()) {
|
|
92580
|
-
const characterLength = stringWidth3(character);
|
|
92581
|
-
if (visible + characterLength <= columns) {
|
|
92582
|
-
rows[rows.length - 1] += character;
|
|
92583
|
-
} else {
|
|
92584
|
-
rows.push(character);
|
|
92585
|
-
visible = 0;
|
|
92586
|
-
}
|
|
92587
|
-
if (ESCAPES4.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
|
|
92588
|
-
isInsideEscape = true;
|
|
92589
|
-
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK2.length).join("");
|
|
92590
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK2;
|
|
92591
|
-
}
|
|
92592
|
-
if (isInsideEscape) {
|
|
92593
|
-
if (isInsideLinkEscape) {
|
|
92594
|
-
if (character === ANSI_ESCAPE_BELL2 || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
|
|
92595
|
-
isInsideEscape = false;
|
|
92596
|
-
isInsideLinkEscape = false;
|
|
92597
|
-
}
|
|
92598
|
-
} else if (character === ANSI_SGR_TERMINATOR3) {
|
|
92599
|
-
isInsideEscape = false;
|
|
92600
|
-
}
|
|
92601
|
-
continue;
|
|
92602
|
-
}
|
|
92603
|
-
visible += characterLength;
|
|
92604
|
-
if (visible === columns && index < characters.length - 1) {
|
|
92605
|
-
rows.push("");
|
|
92606
|
-
visible = 0;
|
|
92607
|
-
}
|
|
92608
|
-
}
|
|
92609
|
-
if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
|
|
92610
|
-
rows[rows.length - 2] += rows.pop();
|
|
92611
|
-
}
|
|
92612
|
-
};
|
|
92613
|
-
var stringVisibleTrimSpacesRight2 = (string4) => {
|
|
92614
|
-
const words = string4.split(" ");
|
|
92615
|
-
let last = words.length;
|
|
92616
|
-
while (last > 0) {
|
|
92617
|
-
if (stringWidth3(words[last - 1]) > 0) {
|
|
92618
|
-
break;
|
|
92619
|
-
}
|
|
92620
|
-
last--;
|
|
92621
|
-
}
|
|
92622
|
-
if (last === words.length) {
|
|
92623
|
-
return string4;
|
|
92624
|
-
}
|
|
92625
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
92626
|
-
};
|
|
92627
|
-
var expandTabs = (line) => {
|
|
92628
|
-
if (!line.includes(" ")) {
|
|
92629
|
-
return line;
|
|
92630
|
-
}
|
|
92631
|
-
const segments = line.split(" ");
|
|
92632
|
-
let visible = 0;
|
|
92633
|
-
let expandedLine = "";
|
|
92634
|
-
for (const [index, segment] of segments.entries()) {
|
|
92635
|
-
expandedLine += segment;
|
|
92636
|
-
visible += stringWidth3(segment);
|
|
92637
|
-
if (index < segments.length - 1) {
|
|
92638
|
-
const spaces = TAB_SIZE - visible % TAB_SIZE;
|
|
92639
|
-
expandedLine += " ".repeat(spaces);
|
|
92640
|
-
visible += spaces;
|
|
92641
|
-
}
|
|
92642
|
-
}
|
|
92643
|
-
return expandedLine;
|
|
92644
|
-
};
|
|
92645
|
-
var exec3 = (string4, columns, options = {}) => {
|
|
92646
|
-
if (options.trim !== false && string4.trim() === "") {
|
|
92647
|
-
return "";
|
|
92648
|
-
}
|
|
92649
|
-
let returnValue = "";
|
|
92650
|
-
let escapeUrl;
|
|
92651
|
-
const activeStyles = [];
|
|
92652
|
-
const lengths = wordLengths2(string4);
|
|
92653
|
-
let rows = [""];
|
|
92654
|
-
for (const [index, word] of string4.split(" ").entries()) {
|
|
92655
|
-
if (options.trim !== false) {
|
|
92656
|
-
rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
92657
|
-
}
|
|
92658
|
-
let rowLength = stringWidth3(rows.at(-1));
|
|
92659
|
-
if (index !== 0) {
|
|
92660
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
92661
|
-
rows.push("");
|
|
92662
|
-
rowLength = 0;
|
|
92663
|
-
}
|
|
92664
|
-
if (rowLength > 0 || options.trim === false) {
|
|
92665
|
-
rows[rows.length - 1] += " ";
|
|
92666
|
-
rowLength++;
|
|
92667
|
-
}
|
|
92668
|
-
}
|
|
92669
|
-
if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
|
|
92670
|
-
const remainingColumns = columns - rowLength;
|
|
92671
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
92672
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
92673
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
92674
|
-
rows.push("");
|
|
92675
|
-
}
|
|
92676
|
-
wrapWord2(rows, word, columns);
|
|
92677
|
-
continue;
|
|
92678
|
-
}
|
|
92679
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
92680
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
92681
|
-
wrapWord2(rows, word, columns);
|
|
92682
|
-
continue;
|
|
92683
|
-
}
|
|
92684
|
-
rows.push("");
|
|
92685
|
-
}
|
|
92686
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
92687
|
-
wrapWord2(rows, word, columns);
|
|
92688
|
-
continue;
|
|
92689
|
-
}
|
|
92690
|
-
rows[rows.length - 1] += word;
|
|
92691
|
-
}
|
|
92692
|
-
if (options.trim !== false) {
|
|
92693
|
-
rows = rows.map((row) => stringVisibleTrimSpacesRight2(row));
|
|
92694
|
-
}
|
|
92695
|
-
const preString = rows.join("\n");
|
|
92696
|
-
const pre = getGraphemes(preString);
|
|
92697
|
-
let preStringIndex = 0;
|
|
92698
|
-
for (const [index, character] of pre.entries()) {
|
|
92699
|
-
returnValue += character;
|
|
92700
|
-
if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
|
|
92701
|
-
const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
92702
|
-
if (groups.sgr !== void 0) {
|
|
92703
|
-
applySgrParameters(groups.sgr, activeStyles);
|
|
92704
|
-
} else if (groups.uri !== void 0) {
|
|
92705
|
-
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
92706
|
-
}
|
|
92707
|
-
} else if (character === ANSI_ESCAPE_CSI) {
|
|
92708
|
-
const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
92709
|
-
if (groups.sgr !== void 0) {
|
|
92710
|
-
applySgrParameters(groups.sgr, activeStyles);
|
|
92711
|
-
}
|
|
92712
|
-
}
|
|
92713
|
-
if (pre[index + 1] === "\n") {
|
|
92714
|
-
if (escapeUrl) {
|
|
92715
|
-
returnValue += wrapAnsiHyperlink2("");
|
|
92716
|
-
}
|
|
92717
|
-
returnValue += getClosingSgrSequence(activeStyles);
|
|
92718
|
-
} else if (character === "\n") {
|
|
92719
|
-
const openingStyles = [...activeStyles];
|
|
92720
|
-
applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
|
|
92721
|
-
returnValue += getOpeningSgrSequence(openingStyles);
|
|
92722
|
-
if (escapeUrl) {
|
|
92723
|
-
returnValue += wrapAnsiHyperlink2(escapeUrl);
|
|
92724
|
-
}
|
|
92725
|
-
}
|
|
92726
|
-
preStringIndex += character.length;
|
|
92727
|
-
}
|
|
92728
|
-
return returnValue;
|
|
92729
|
-
};
|
|
92730
|
-
function wrapAnsi2(string4, columns, options) {
|
|
92731
|
-
return String(string4).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec3(expandTabs(line), columns, options)).join("\n");
|
|
92732
|
-
}
|
|
92733
|
-
|
|
92734
|
-
// ../ggcoder/dist/ui/terminal-history-format.js
|
|
92735
92902
|
var RESPONSE_LEFT_PADDING = " ";
|
|
92736
92903
|
var MAX_OUTPUT_LINES = 4;
|
|
92737
92904
|
var USER_MESSAGE_BACKGROUND = "#374151";
|
|
@@ -92760,8 +92927,8 @@ function formatHistoryWrite(output, options) {
|
|
|
92760
92927
|
return `${leading}${trimmed}${trailing}`;
|
|
92761
92928
|
}
|
|
92762
92929
|
function renderRoundBorderBox(lines, context, borderColor) {
|
|
92763
|
-
const longestLineWidth = Math.max(0, ...lines.map((lineText) =>
|
|
92764
|
-
const maxFrameWidth = Math.max(4, context.columns -
|
|
92930
|
+
const longestLineWidth = Math.max(0, ...lines.map((lineText) => stringWidth(stripAnsi2(lineText))));
|
|
92931
|
+
const maxFrameWidth = Math.max(4, context.columns - stringWidth(RESPONSE_LEFT_PADDING));
|
|
92765
92932
|
const frameWidth = Math.max(4, Math.min(maxFrameWidth, longestLineWidth + 4));
|
|
92766
92933
|
const contentWidth = Math.max(1, frameWidth - 4);
|
|
92767
92934
|
const horizontal = color(borderColor, ROUND_BORDER.horizontal.repeat(frameWidth - 2));
|
|
@@ -92769,7 +92936,7 @@ function renderRoundBorderBox(lines, context, borderColor) {
|
|
|
92769
92936
|
const bottom = `${color(borderColor, ROUND_BORDER.bottomLeft)}${horizontal}${color(borderColor, ROUND_BORDER.bottomRight)}`;
|
|
92770
92937
|
const rows = lines.flatMap((lineText) => wrapBoxLine(lineText, contentWidth));
|
|
92771
92938
|
const body = rows.map((lineText) => {
|
|
92772
|
-
const fillWidth = Math.max(0, contentWidth -
|
|
92939
|
+
const fillWidth = Math.max(0, contentWidth - stringWidth(stripAnsi2(lineText)));
|
|
92773
92940
|
return `${color(borderColor, ROUND_BORDER.vertical)} ${lineText}${" ".repeat(fillWidth)} ${color(borderColor, ROUND_BORDER.vertical)}`;
|
|
92774
92941
|
});
|
|
92775
92942
|
return indent([top, ...body, bottom].join("\n"), RESPONSE_LEFT_PADDING);
|
|
@@ -92785,23 +92952,23 @@ function block(lines) {
|
|
|
92785
92952
|
return lines.filter((lineText) => lineText.length > 0).join("\n");
|
|
92786
92953
|
}
|
|
92787
92954
|
function wrapPlain(text, width) {
|
|
92788
|
-
return
|
|
92955
|
+
return wrapAnsi(text, Math.max(10, width), { hard: true, wordWrap: true });
|
|
92789
92956
|
}
|
|
92790
92957
|
function wrapBoxLine(text, width) {
|
|
92791
92958
|
if (text.length === 0)
|
|
92792
92959
|
return [""];
|
|
92793
|
-
return
|
|
92960
|
+
return wrapAnsi(text, Math.max(1, width), { hard: true, wordWrap: true, trim: false }).split("\n");
|
|
92794
92961
|
}
|
|
92795
92962
|
function indent(text, prefix) {
|
|
92796
92963
|
return text.split("\n").map((lineText) => `${prefix}${lineText}`).join("\n");
|
|
92797
92964
|
}
|
|
92798
92965
|
function truncatePlain(text, width) {
|
|
92799
92966
|
const max = Math.max(1, width);
|
|
92800
|
-
if (
|
|
92967
|
+
if (stringWidth(text) <= max)
|
|
92801
92968
|
return text;
|
|
92802
92969
|
let result = "";
|
|
92803
92970
|
for (const char of text) {
|
|
92804
|
-
if (
|
|
92971
|
+
if (stringWidth(`${result}${char}\u2026`) > max)
|
|
92805
92972
|
break;
|
|
92806
92973
|
result += char;
|
|
92807
92974
|
}
|
|
@@ -93378,7 +93545,7 @@ function bodyWidth(columns) {
|
|
|
93378
93545
|
}
|
|
93379
93546
|
function estimateWrappedRows(text, columns) {
|
|
93380
93547
|
const width = bodyWidth(columns);
|
|
93381
|
-
return text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(
|
|
93548
|
+
return text.split("\n").reduce((rows, line) => rows + Math.max(1, Math.ceil(stringWidth(line) / width)), 0);
|
|
93382
93549
|
}
|
|
93383
93550
|
var THINKING_HEADER_ROWS = 2;
|
|
93384
93551
|
var BLOCK_OVERHEAD_ROWS = 1;
|
|
@@ -107416,10 +107583,10 @@ function colorize2(text, color2) {
|
|
|
107416
107583
|
return color2 ? source_default.hex(color2)(text) : text;
|
|
107417
107584
|
}
|
|
107418
107585
|
function visualWidth(text) {
|
|
107419
|
-
return
|
|
107586
|
+
return stringWidth(stripAnsi(text));
|
|
107420
107587
|
}
|
|
107421
107588
|
function wrapAnsiLines(text, width) {
|
|
107422
|
-
return
|
|
107589
|
+
return wrapAnsi(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
|
|
107423
107590
|
}
|
|
107424
107591
|
function padRightAnsi(text, width) {
|
|
107425
107592
|
return text + " ".repeat(Math.max(0, width - visualWidth(text)));
|
|
@@ -107433,7 +107600,7 @@ function renderAnsiTable({ headers, rows, terminalWidth, theme }) {
|
|
|
107433
107600
|
const constraints = Array.from({ length: numColumns }, (_, colIndex) => {
|
|
107434
107601
|
const values = Array.from({ length: allRows.length }, (_2, rowIndex) => normalizedCell(allRows, rowIndex, colIndex));
|
|
107435
107602
|
const maxContentWidth = Math.max(...values.map(visualWidth), MIN_COLUMN_WIDTH);
|
|
107436
|
-
const maxWordWidth = Math.max(...values.flatMap((value) => stripAnsi(value).split(/\s+/u).filter(Boolean).map((word) =>
|
|
107603
|
+
const maxWordWidth = Math.max(...values.flatMap((value) => stripAnsi(value).split(/\s+/u).filter(Boolean).map((word) => stringWidth(word))), MIN_COLUMN_WIDTH);
|
|
107437
107604
|
return { minWidth: maxWordWidth, maxWidth: Math.max(maxWordWidth, maxContentWidth) };
|
|
107438
107605
|
});
|
|
107439
107606
|
const fixedOverhead = numColumns + 1 + numColumns * COLUMN_PADDING;
|
|
@@ -107573,7 +107740,7 @@ function renderInlineMarkdownToAnsi(rawText, theme, defaultColor) {
|
|
|
107573
107740
|
return result;
|
|
107574
107741
|
}
|
|
107575
107742
|
function wrapAnsiMarkdownLine(text, width) {
|
|
107576
|
-
return
|
|
107743
|
+
return wrapAnsi(text || " ", Math.max(1, width), { hard: true, wordWrap: true }).split("\n");
|
|
107577
107744
|
}
|
|
107578
107745
|
function renderHastToAnsi(node, theme, inheritedColor) {
|
|
107579
107746
|
if (node.type === "text")
|
|
@@ -108324,7 +108491,7 @@ function renderBanner(context) {
|
|
|
108324
108491
|
}
|
|
108325
108492
|
const infoLines = [
|
|
108326
108493
|
`${color(context.theme.primary, "GG Coder", true)}${dim(context, ` v${context.version} \xB7 By `)}${color(context.theme.text, "Ken Kai", true)}`,
|
|
108327
|
-
`${color(context.theme.secondary, modelName)} ${dim(context, truncatePlain(displayPath, Math.max(10, context.columns - LOGO_WIDTH - GAP.length -
|
|
108494
|
+
`${color(context.theme.secondary, modelName)} ${dim(context, truncatePlain(displayPath, Math.max(10, context.columns - LOGO_WIDTH - GAP.length - stringWidth(modelName) - 2)))}`,
|
|
108328
108495
|
shortcuts
|
|
108329
108496
|
];
|
|
108330
108497
|
const rows = logo.map((logoLine, i) => {
|
|
@@ -108346,7 +108513,7 @@ function renderUser(text, imageCount, videoCount, pasteInfo, context) {
|
|
|
108346
108513
|
].filter((part) => part.length > 0).join(separator);
|
|
108347
108514
|
const messageWidth = Math.max(10, context.columns);
|
|
108348
108515
|
const contentWidth = Math.max(1, messageWidth - USER_MESSAGE_HORIZONTAL_PADDING - USER_MESSAGE_PREFIX.length);
|
|
108349
|
-
const wrapped =
|
|
108516
|
+
const wrapped = wrapAnsi(content || userChipSegment("(empty)", userMessageText2), contentWidth, {
|
|
108350
108517
|
hard: true,
|
|
108351
108518
|
wordWrap: true
|
|
108352
108519
|
});
|
|
@@ -108355,7 +108522,7 @@ function renderUser(text, imageCount, videoCount, pasteInfo, context) {
|
|
|
108355
108522
|
const rows = wrapped.split("\n").map((lineText, index) => {
|
|
108356
108523
|
const prefix = index === 0 ? userChipSegment(USER_MESSAGE_PREFIX, userMessageText2, true) : userChipSegment(" ".repeat(USER_MESSAGE_PREFIX.length), userMessageText2);
|
|
108357
108524
|
const line = `${userChipSegment(" ", userMessageText2)}${prefix}${lineText}`;
|
|
108358
|
-
const fillWidth = Math.max(0, messageWidth -
|
|
108525
|
+
const fillWidth = Math.max(0, messageWidth - stringWidth(stripAnsi2(line)));
|
|
108359
108526
|
return `${line}${userChipSegment(" ".repeat(fillWidth), userMessageText2)}`;
|
|
108360
108527
|
});
|
|
108361
108528
|
return [top, ...rows, bottom].join("\n");
|
|
@@ -110277,7 +110444,7 @@ var import_react68 = __toESM(require_react(), 1);
|
|
|
110277
110444
|
// ../ggcoder/dist/ui/utils/table-text.js
|
|
110278
110445
|
init_esm_shims();
|
|
110279
110446
|
function visualWidth2(str2) {
|
|
110280
|
-
return
|
|
110447
|
+
return stringWidth(str2);
|
|
110281
110448
|
}
|
|
110282
110449
|
|
|
110283
110450
|
// ../ggcoder/dist/ui/components/PlanOverlay.js
|
|
@@ -110334,7 +110501,7 @@ init_esm_shims();
|
|
|
110334
110501
|
|
|
110335
110502
|
// ../ggcoder/dist/core/setup-history.js
|
|
110336
110503
|
init_esm_shims();
|
|
110337
|
-
import
|
|
110504
|
+
import fs32 from "fs";
|
|
110338
110505
|
import path36 from "path";
|
|
110339
110506
|
import os11 from "os";
|
|
110340
110507
|
var HISTORY_PATH = path36.join(os11.homedir(), ".gg", "setup-history.json");
|
|
@@ -111420,6 +111587,22 @@ var oscResponsePattern = new RegExp(ESC3 + "\\]11;rgb:([0-9a-fA-F]+)/([0-9a-fA-F
|
|
|
111420
111587
|
|
|
111421
111588
|
// ../ggcoder/dist/ui/render.js
|
|
111422
111589
|
var INK_OPTIONS = {
|
|
111590
|
+
// [gg ink patch] Scrollback-mode safety net: clip frames to terminal height
|
|
111591
|
+
// (rows - 2) so a single mis-estimated live-area clamp can never produce a
|
|
111592
|
+
// frame that reaches the screen height. Once a frame hits `rows`, Ink's
|
|
111593
|
+
// eraseLines clamps at the screen top on the next shrink and rewrites the
|
|
111594
|
+
// frame top-anchored — stranding the footer mid-screen with blank rows
|
|
111595
|
+
// below. The clip drops the oldest (top) rows, mirroring the app's own
|
|
111596
|
+
// bottom-anchored clamp. The fullscreen alt-screen path must NOT set this —
|
|
111597
|
+
// it intentionally owns the whole screen.
|
|
111598
|
+
clipFrameToTerminalHeight: true,
|
|
111599
|
+
// [gg ink patch] Bottom anchoring: the frame bottom (footer) must never move
|
|
111600
|
+
// UP. Any rewrite that nets fewer rows than the previous frame (shrink not
|
|
111601
|
+
// fully compensated by enqueued scrollback bytes — tool panel hiding, status
|
|
111602
|
+
// row swaps, turn finalization after mid-stream flushes) is padded with
|
|
111603
|
+
// blank scrollback lines between the transcript and the frame, keeping the
|
|
111604
|
+
// footer row fixed. Exact line counts inside Ink — no estimates, no lag.
|
|
111605
|
+
anchorFrameToBottom: true,
|
|
111423
111606
|
// Enable kitty keyboard protocol so terminals that support it can
|
|
111424
111607
|
// distinguish Shift+Enter from Enter (needed for multiline input).
|
|
111425
111608
|
// Terminals without support gracefully ignore this.
|
|
@@ -111433,7 +111616,14 @@ var INK_OPTIONS = {
|
|
|
111433
111616
|
// exitOnCtrlC is true. Disable it so our InputArea handles Ctrl+C.
|
|
111434
111617
|
exitOnCtrlC: false
|
|
111435
111618
|
};
|
|
111436
|
-
var FULLSCREEN_INK_OPTIONS = {
|
|
111619
|
+
var FULLSCREEN_INK_OPTIONS = {
|
|
111620
|
+
...INK_OPTIONS,
|
|
111621
|
+
// Fullscreen frames legitimately fill the terminal — never clip or pad them.
|
|
111622
|
+
clipFrameToTerminalHeight: false,
|
|
111623
|
+
anchorFrameToBottom: false,
|
|
111624
|
+
maxFps: 120,
|
|
111625
|
+
incrementalRendering: true
|
|
111626
|
+
};
|
|
111437
111627
|
var DISABLE_MODIFY_OTHER_KEYS = "\x1B[>4;0m";
|
|
111438
111628
|
var SCREEN_CLEAR = DISABLE_MODIFY_OTHER_KEYS + "\x1B[2J\x1B[3J\x1B[H";
|
|
111439
111629
|
var VIEWPORT_CLEAR = DISABLE_MODIFY_OTHER_KEYS + "\x1B[2J\x1B[H";
|
|
@@ -112702,17 +112892,17 @@ var EventQueue = class {
|
|
|
112702
112892
|
|
|
112703
112893
|
// src/settings.ts
|
|
112704
112894
|
init_esm_shims();
|
|
112705
|
-
import
|
|
112895
|
+
import fs33 from "fs/promises";
|
|
112706
112896
|
import path38 from "path";
|
|
112707
112897
|
function settingsPath() {
|
|
112708
112898
|
return path38.join(getAppPaths().agentDir, "boss", "settings.json");
|
|
112709
112899
|
}
|
|
112710
112900
|
async function ensureDir() {
|
|
112711
|
-
await
|
|
112901
|
+
await fs33.mkdir(path38.dirname(settingsPath()), { recursive: true, mode: 448 });
|
|
112712
112902
|
}
|
|
112713
112903
|
async function loadSettings() {
|
|
112714
112904
|
try {
|
|
112715
|
-
const content = await
|
|
112905
|
+
const content = await fs33.readFile(settingsPath(), "utf-8");
|
|
112716
112906
|
const parsed = JSON.parse(content);
|
|
112717
112907
|
if (!parsed || typeof parsed !== "object") return {};
|
|
112718
112908
|
return parsed;
|
|
@@ -112727,8 +112917,8 @@ async function saveSettings(patch) {
|
|
|
112727
112917
|
const merged = { ...current, ...patch };
|
|
112728
112918
|
await ensureDir();
|
|
112729
112919
|
const tmp = `${settingsPath()}.${process.pid}.tmp`;
|
|
112730
|
-
await
|
|
112731
|
-
await
|
|
112920
|
+
await fs33.writeFile(tmp, JSON.stringify(merged, null, 2) + "\n", "utf-8");
|
|
112921
|
+
await fs33.rename(tmp, settingsPath());
|
|
112732
112922
|
});
|
|
112733
112923
|
writeChain = next.catch(() => void 0);
|
|
112734
112924
|
await next;
|
|
@@ -113120,18 +113310,18 @@ init_esm_shims();
|
|
|
113120
113310
|
// src/tasks-store.ts
|
|
113121
113311
|
init_esm_shims();
|
|
113122
113312
|
var import_react98 = __toESM(require_react(), 1);
|
|
113123
|
-
import
|
|
113313
|
+
import fs34 from "fs/promises";
|
|
113124
113314
|
import path39 from "path";
|
|
113125
113315
|
import crypto10 from "crypto";
|
|
113126
113316
|
function getPlanPath() {
|
|
113127
113317
|
return path39.join(getAppPaths().agentDir, "boss", "plan.json");
|
|
113128
113318
|
}
|
|
113129
113319
|
async function ensureDir2() {
|
|
113130
|
-
await
|
|
113320
|
+
await fs34.mkdir(path39.dirname(getPlanPath()), { recursive: true, mode: 448 });
|
|
113131
113321
|
}
|
|
113132
113322
|
async function loadPlan() {
|
|
113133
113323
|
try {
|
|
113134
|
-
const content = await
|
|
113324
|
+
const content = await fs34.readFile(getPlanPath(), "utf-8");
|
|
113135
113325
|
const parsed = JSON.parse(content);
|
|
113136
113326
|
return Array.isArray(parsed.tasks) ? parsed.tasks : [];
|
|
113137
113327
|
} catch {
|
|
@@ -113145,8 +113335,8 @@ async function persist(tasks) {
|
|
|
113145
113335
|
await ensureDir2();
|
|
113146
113336
|
const finalPath = getPlanPath();
|
|
113147
113337
|
const tmpPath = `${finalPath}.${process.pid}.tmp`;
|
|
113148
|
-
await
|
|
113149
|
-
await
|
|
113338
|
+
await fs34.writeFile(tmpPath, snapshot, "utf-8");
|
|
113339
|
+
await fs34.rename(tmpPath, finalPath);
|
|
113150
113340
|
});
|
|
113151
113341
|
persistChain = next.catch(() => void 0);
|
|
113152
113342
|
await next;
|
|
@@ -113417,10 +113607,10 @@ init_esm_shims();
|
|
|
113417
113607
|
import { spawn as spawn7, execFileSync as execFileSync4 } from "child_process";
|
|
113418
113608
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
113419
113609
|
import path40 from "path";
|
|
113420
|
-
import
|
|
113610
|
+
import fs35 from "fs";
|
|
113421
113611
|
function readMp3DurationMs(file2) {
|
|
113422
113612
|
try {
|
|
113423
|
-
const buf =
|
|
113613
|
+
const buf = fs35.readFileSync(file2);
|
|
113424
113614
|
let i = 0;
|
|
113425
113615
|
if (buf.length >= 10 && buf[0] === 73 && buf[1] === 68 && buf[2] === 51) {
|
|
113426
113616
|
const tagSize = (buf[6] & 127) << 21 | (buf[7] & 127) << 14 | (buf[8] & 127) << 7 | buf[9] & 127;
|
|
@@ -113479,7 +113669,7 @@ function getSplashAudioDurationMs() {
|
|
|
113479
113669
|
function assetPath(name) {
|
|
113480
113670
|
const here = path40.dirname(fileURLToPath4(import.meta.url));
|
|
113481
113671
|
const dist = path40.join(here, name);
|
|
113482
|
-
if (
|
|
113672
|
+
if (fs35.existsSync(dist)) return dist;
|
|
113483
113673
|
return path40.join(here, "..", "assets", name);
|
|
113484
113674
|
}
|
|
113485
113675
|
function splashAssetPath() {
|
|
@@ -113520,7 +113710,7 @@ function trySpawn(cmd, args) {
|
|
|
113520
113710
|
}
|
|
113521
113711
|
function isWsl() {
|
|
113522
113712
|
if (process.platform !== "linux") return false;
|
|
113523
|
-
return !!process.env.WSL_DISTRO_NAME ||
|
|
113713
|
+
return !!process.env.WSL_DISTRO_NAME || fs35.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop");
|
|
113524
113714
|
}
|
|
113525
113715
|
async function tryPlayOnWindowsHost(file2) {
|
|
113526
113716
|
try {
|
|
@@ -113592,7 +113782,7 @@ async function tryPlayOnWindowsHost(file2) {
|
|
|
113592
113782
|
}
|
|
113593
113783
|
}
|
|
113594
113784
|
async function playFile(file2) {
|
|
113595
|
-
if (!
|
|
113785
|
+
if (!fs35.existsSync(file2)) return;
|
|
113596
113786
|
const platform2 = process.platform;
|
|
113597
113787
|
if (platform2 === "darwin") {
|
|
113598
113788
|
await trySpawn("afplay", [file2]);
|
|
@@ -113690,7 +113880,7 @@ function truncateOversizedToolResults2(messages, opts = {}) {
|
|
|
113690
113880
|
|
|
113691
113881
|
// src/sessions.ts
|
|
113692
113882
|
init_esm_shims();
|
|
113693
|
-
import
|
|
113883
|
+
import fs36 from "fs/promises";
|
|
113694
113884
|
import path41 from "path";
|
|
113695
113885
|
import crypto11 from "crypto";
|
|
113696
113886
|
var BOSS_SUBDIR = "boss";
|
|
@@ -113703,24 +113893,24 @@ function getSessionsDir() {
|
|
|
113703
113893
|
}
|
|
113704
113894
|
async function ensureSessionsDir() {
|
|
113705
113895
|
const dir = getSessionsDir();
|
|
113706
|
-
await
|
|
113896
|
+
await fs36.mkdir(dir, { recursive: true, mode: 448 });
|
|
113707
113897
|
return dir;
|
|
113708
113898
|
}
|
|
113709
113899
|
async function createSession2() {
|
|
113710
113900
|
await ensureSessionsDir();
|
|
113711
113901
|
const id2 = `${Date.now()}-${crypto11.randomBytes(4).toString("hex")}`;
|
|
113712
113902
|
const filePath = path41.join(getSessionsDir(), `${id2}.jsonl`);
|
|
113713
|
-
await
|
|
113903
|
+
await fs36.writeFile(filePath, "", "utf-8");
|
|
113714
113904
|
return { id: id2, filePath };
|
|
113715
113905
|
}
|
|
113716
113906
|
async function appendMessages(filePath, msgs) {
|
|
113717
113907
|
if (msgs.length === 0) return;
|
|
113718
113908
|
const lines = msgs.map((m) => JSON.stringify(m)).join("\n") + "\n";
|
|
113719
|
-
await
|
|
113909
|
+
await fs36.appendFile(filePath, lines, "utf-8");
|
|
113720
113910
|
}
|
|
113721
113911
|
async function loadSession2(filePath) {
|
|
113722
113912
|
try {
|
|
113723
|
-
const content = await
|
|
113913
|
+
const content = await fs36.readFile(filePath, "utf-8");
|
|
113724
113914
|
const lines = content.split("\n").filter((l) => l.length > 0);
|
|
113725
113915
|
const messages = [];
|
|
113726
113916
|
for (const line of lines) {
|
|
@@ -113736,8 +113926,8 @@ async function loadSession2(filePath) {
|
|
|
113736
113926
|
}
|
|
113737
113927
|
async function inspectSession(filePath, id2) {
|
|
113738
113928
|
try {
|
|
113739
|
-
const stat = await
|
|
113740
|
-
const content = await
|
|
113929
|
+
const stat = await fs36.stat(filePath);
|
|
113930
|
+
const content = await fs36.readFile(filePath, "utf-8");
|
|
113741
113931
|
const lines = content.split("\n").filter((l) => l.length > 0);
|
|
113742
113932
|
let firstUserMessage;
|
|
113743
113933
|
for (const line of lines) {
|
|
@@ -113770,7 +113960,7 @@ async function listSessions2() {
|
|
|
113770
113960
|
await ensureSessionsDir();
|
|
113771
113961
|
let entries;
|
|
113772
113962
|
try {
|
|
113773
|
-
entries = await
|
|
113963
|
+
entries = await fs36.readdir(getSessionsDir());
|
|
113774
113964
|
} catch {
|
|
113775
113965
|
return [];
|
|
113776
113966
|
}
|
|
@@ -114743,4 +114933,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
114743
114933
|
* LICENSE file in the root directory of this source tree.
|
|
114744
114934
|
*)
|
|
114745
114935
|
*/
|
|
114746
|
-
//# sourceMappingURL=chunk-
|
|
114936
|
+
//# sourceMappingURL=chunk-XGMCVE2F.js.map
|