@manot40/genql-cli 1.0.0 → 1.0.1

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.
@@ -1,6 +1,7 @@
1
- import { type BatchOptions, createFetcher } from './fetcher';
2
1
  import type { ExecutionResult, LinkedType } from './types';
3
- import { generateGraphqlOperation, type GraphqlOperation } from './generateGraphqlOperation';
2
+
3
+ import { type BatchOptions, createFetcher } from './fetcher';
4
+ import { type GraphqlOperation, generateGraphqlOperation } from './generateGraphqlOperation';
4
5
 
5
6
  export type Headers = HeadersInit | (() => HeadersInit) | (() => Promise<HeadersInit>);
6
7
 
@@ -0,0 +1,282 @@
1
+ import { n as isFullWidth, r as isWide } from "./get-east-asian-width-BRiQxJA0.mjs";
2
+
3
+ //#region node_modules/slice-ansi/node_modules/ansi-styles/index.js
4
+ const ANSI_BACKGROUND_OFFSET = 10;
5
+ const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
6
+ const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
7
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
8
+ const styles = {
9
+ modifier: {
10
+ reset: [0, 0],
11
+ bold: [1, 22],
12
+ dim: [2, 22],
13
+ italic: [3, 23],
14
+ underline: [4, 24],
15
+ overline: [53, 55],
16
+ inverse: [7, 27],
17
+ hidden: [8, 28],
18
+ strikethrough: [9, 29]
19
+ },
20
+ color: {
21
+ black: [30, 39],
22
+ red: [31, 39],
23
+ green: [32, 39],
24
+ yellow: [33, 39],
25
+ blue: [34, 39],
26
+ magenta: [35, 39],
27
+ cyan: [36, 39],
28
+ white: [37, 39],
29
+ blackBright: [90, 39],
30
+ gray: [90, 39],
31
+ grey: [90, 39],
32
+ redBright: [91, 39],
33
+ greenBright: [92, 39],
34
+ yellowBright: [93, 39],
35
+ blueBright: [94, 39],
36
+ magentaBright: [95, 39],
37
+ cyanBright: [96, 39],
38
+ whiteBright: [97, 39]
39
+ },
40
+ bgColor: {
41
+ bgBlack: [40, 49],
42
+ bgRed: [41, 49],
43
+ bgGreen: [42, 49],
44
+ bgYellow: [43, 49],
45
+ bgBlue: [44, 49],
46
+ bgMagenta: [45, 49],
47
+ bgCyan: [46, 49],
48
+ bgWhite: [47, 49],
49
+ bgBlackBright: [100, 49],
50
+ bgGray: [100, 49],
51
+ bgGrey: [100, 49],
52
+ bgRedBright: [101, 49],
53
+ bgGreenBright: [102, 49],
54
+ bgYellowBright: [103, 49],
55
+ bgBlueBright: [104, 49],
56
+ bgMagentaBright: [105, 49],
57
+ bgCyanBright: [106, 49],
58
+ bgWhiteBright: [107, 49]
59
+ }
60
+ };
61
+ const modifierNames = Object.keys(styles.modifier);
62
+ const foregroundColorNames = Object.keys(styles.color);
63
+ const backgroundColorNames = Object.keys(styles.bgColor);
64
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
65
+ function assembleStyles() {
66
+ const codes = /* @__PURE__ */ new Map();
67
+ for (const [groupName, group] of Object.entries(styles)) {
68
+ for (const [styleName, style] of Object.entries(group)) {
69
+ styles[styleName] = {
70
+ open: `\u001B[${style[0]}m`,
71
+ close: `\u001B[${style[1]}m`
72
+ };
73
+ group[styleName] = styles[styleName];
74
+ codes.set(style[0], style[1]);
75
+ }
76
+ Object.defineProperty(styles, groupName, {
77
+ value: group,
78
+ enumerable: false
79
+ });
80
+ }
81
+ Object.defineProperty(styles, "codes", {
82
+ value: codes,
83
+ enumerable: false
84
+ });
85
+ styles.color.close = "\x1B[39m";
86
+ styles.bgColor.close = "\x1B[49m";
87
+ styles.color.ansi = wrapAnsi16();
88
+ styles.color.ansi256 = wrapAnsi256();
89
+ styles.color.ansi16m = wrapAnsi16m();
90
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
91
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
92
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
93
+ Object.defineProperties(styles, {
94
+ rgbToAnsi256: {
95
+ value(red, green, blue) {
96
+ if (red === green && green === blue) {
97
+ if (red < 8) return 16;
98
+ if (red > 248) return 231;
99
+ return Math.round((red - 8) / 247 * 24) + 232;
100
+ }
101
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
102
+ },
103
+ enumerable: false
104
+ },
105
+ hexToRgb: {
106
+ value(hex) {
107
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
108
+ if (!matches) return [
109
+ 0,
110
+ 0,
111
+ 0
112
+ ];
113
+ let [colorString] = matches;
114
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
115
+ const integer = Number.parseInt(colorString, 16);
116
+ return [
117
+ integer >> 16 & 255,
118
+ integer >> 8 & 255,
119
+ integer & 255
120
+ ];
121
+ },
122
+ enumerable: false
123
+ },
124
+ hexToAnsi256: {
125
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
126
+ enumerable: false
127
+ },
128
+ ansi256ToAnsi: {
129
+ value(code) {
130
+ if (code < 8) return 30 + code;
131
+ if (code < 16) return 90 + (code - 8);
132
+ let red;
133
+ let green;
134
+ let blue;
135
+ if (code >= 232) {
136
+ red = ((code - 232) * 10 + 8) / 255;
137
+ green = red;
138
+ blue = red;
139
+ } else {
140
+ code -= 16;
141
+ const remainder = code % 36;
142
+ red = Math.floor(code / 36) / 5;
143
+ green = Math.floor(remainder / 6) / 5;
144
+ blue = remainder % 6 / 5;
145
+ }
146
+ const value = Math.max(red, green, blue) * 2;
147
+ if (value === 0) return 30;
148
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
149
+ if (value === 2) result += 60;
150
+ return result;
151
+ },
152
+ enumerable: false
153
+ },
154
+ rgbToAnsi: {
155
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
156
+ enumerable: false
157
+ },
158
+ hexToAnsi: {
159
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
160
+ enumerable: false
161
+ }
162
+ });
163
+ return styles;
164
+ }
165
+ const ansiStyles = assembleStyles();
166
+ var ansi_styles_default = ansiStyles;
167
+
168
+ //#endregion
169
+ //#region node_modules/is-fullwidth-code-point/index.js
170
+ function isFullwidthCodePoint(codePoint) {
171
+ if (!Number.isInteger(codePoint)) return false;
172
+ return isFullWidth(codePoint) || isWide(codePoint);
173
+ }
174
+
175
+ //#endregion
176
+ //#region node_modules/slice-ansi/index.js
177
+ const ESCAPES = new Set([27, 155]);
178
+ const CODE_POINT_0 = "0".codePointAt(0);
179
+ const CODE_POINT_9 = "9".codePointAt(0);
180
+ const MAX_ANSI_SEQUENCE_LENGTH = 19;
181
+ const endCodesSet = /* @__PURE__ */ new Set();
182
+ const endCodesMap = /* @__PURE__ */ new Map();
183
+ for (const [start, end] of ansi_styles_default.codes) {
184
+ endCodesSet.add(ansi_styles_default.color.ansi(end));
185
+ endCodesMap.set(ansi_styles_default.color.ansi(start), ansi_styles_default.color.ansi(end));
186
+ }
187
+ function getEndCode(code) {
188
+ if (endCodesSet.has(code)) return code;
189
+ if (endCodesMap.has(code)) return endCodesMap.get(code);
190
+ code = code.slice(2);
191
+ if (code.includes(";")) code = code[0] + "0";
192
+ const returnValue = ansi_styles_default.codes.get(Number.parseInt(code, 10));
193
+ if (returnValue) return ansi_styles_default.color.ansi(returnValue);
194
+ return ansi_styles_default.reset.open;
195
+ }
196
+ function findNumberIndex(string) {
197
+ for (let index = 0; index < string.length; index++) {
198
+ const codePoint = string.codePointAt(index);
199
+ if (codePoint >= CODE_POINT_0 && codePoint <= CODE_POINT_9) return index;
200
+ }
201
+ return -1;
202
+ }
203
+ function parseAnsiCode(string, offset) {
204
+ string = string.slice(offset, offset + MAX_ANSI_SEQUENCE_LENGTH);
205
+ const startIndex = findNumberIndex(string);
206
+ if (startIndex !== -1) {
207
+ let endIndex = string.indexOf("m", startIndex);
208
+ if (endIndex === -1) endIndex = string.length;
209
+ return string.slice(0, endIndex + 1);
210
+ }
211
+ }
212
+ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
213
+ const returnValue = [];
214
+ let index = 0;
215
+ let visibleCount = 0;
216
+ while (index < string.length) {
217
+ const codePoint = string.codePointAt(index);
218
+ if (ESCAPES.has(codePoint)) {
219
+ const code = parseAnsiCode(string, index);
220
+ if (code) {
221
+ returnValue.push({
222
+ type: "ansi",
223
+ code,
224
+ endCode: getEndCode(code)
225
+ });
226
+ index += code.length;
227
+ continue;
228
+ }
229
+ }
230
+ const isFullWidth$1 = isFullwidthCodePoint(codePoint);
231
+ const character = String.fromCodePoint(codePoint);
232
+ returnValue.push({
233
+ type: "character",
234
+ value: character,
235
+ isFullWidth: isFullWidth$1
236
+ });
237
+ index += character.length;
238
+ visibleCount += isFullWidth$1 ? 2 : character.length;
239
+ if (visibleCount >= endCharacter) break;
240
+ }
241
+ return returnValue;
242
+ }
243
+ function reduceAnsiCodes(codes) {
244
+ let returnValue = [];
245
+ for (const code of codes) if (code.code === ansi_styles_default.reset.open) returnValue = [];
246
+ else if (endCodesSet.has(code.code)) returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.code);
247
+ else {
248
+ returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.endCode);
249
+ returnValue.push(code);
250
+ }
251
+ return returnValue;
252
+ }
253
+ function undoAnsiCodes(codes) {
254
+ return reduceAnsiCodes(codes).map(({ endCode }) => endCode).reverse().join("");
255
+ }
256
+ function sliceAnsi(string, start, end) {
257
+ const tokens = tokenize(string, end);
258
+ let activeCodes = [];
259
+ let position = 0;
260
+ let returnValue = "";
261
+ let include = false;
262
+ for (const token of tokens) {
263
+ if (end !== void 0 && position >= end) break;
264
+ if (token.type === "ansi") {
265
+ activeCodes.push(token);
266
+ if (include) returnValue += token.code;
267
+ } else {
268
+ if (!include && position >= start) {
269
+ include = true;
270
+ activeCodes = reduceAnsiCodes(activeCodes);
271
+ returnValue = activeCodes.map(({ code }) => code).join("");
272
+ }
273
+ if (include) returnValue += token.value;
274
+ position += token.isFullWidth ? 2 : token.value.length;
275
+ }
276
+ }
277
+ returnValue += undoAnsiCodes(activeCodes);
278
+ return returnValue;
279
+ }
280
+
281
+ //#endregion
282
+ export { sliceAnsi as t };
@@ -0,0 +1,3 @@
1
+ import { t as wrapAnsi } from "./wrap-ansi-CUNel7aF.mjs";
2
+
3
+ export { wrapAnsi as default };
@@ -0,0 +1,359 @@
1
+ import { n as __toESM, t as __commonJSMin } from "./chunk-CIPSg9SW.mjs";
2
+ import { t as eastAsianWidth } from "./get-east-asian-width-BRiQxJA0.mjs";
3
+
4
+ //#region node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
5
+ function ansiRegex$1({ onlyFirst = false } = {}) {
6
+ return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
7
+ }
8
+
9
+ //#endregion
10
+ //#region node_modules/string-width/node_modules/strip-ansi/index.js
11
+ const regex$1 = ansiRegex$1();
12
+ function stripAnsi$1(string) {
13
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
14
+ return string.replace(regex$1, "");
15
+ }
16
+
17
+ //#endregion
18
+ //#region node_modules/emoji-regex/index.js
19
+ var require_emoji_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20
+ module.exports = () => {
21
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u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2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
22
+ };
23
+ }));
24
+
25
+ //#endregion
26
+ //#region node_modules/string-width/index.js
27
+ var import_emoji_regex = /* @__PURE__ */ __toESM(require_emoji_regex(), 1);
28
+ const segmenter = new Intl.Segmenter();
29
+ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
30
+ function stringWidth(string, options = {}) {
31
+ if (typeof string !== "string" || string.length === 0) return 0;
32
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
33
+ if (!countAnsiEscapeCodes) string = stripAnsi$1(string);
34
+ if (string.length === 0) return 0;
35
+ let width = 0;
36
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
37
+ for (const { segment: character } of segmenter.segment(string)) {
38
+ const codePoint = character.codePointAt(0);
39
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
40
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
41
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
42
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
43
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
44
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
45
+ if ((0, import_emoji_regex.default)().test(character)) {
46
+ width += 2;
47
+ continue;
48
+ }
49
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
50
+ }
51
+ return width;
52
+ }
53
+
54
+ //#endregion
55
+ //#region node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js
56
+ function ansiRegex({ onlyFirst = false } = {}) {
57
+ return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
58
+ }
59
+
60
+ //#endregion
61
+ //#region node_modules/wrap-ansi/node_modules/strip-ansi/index.js
62
+ const regex = ansiRegex();
63
+ function stripAnsi(string) {
64
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
65
+ return string.replace(regex, "");
66
+ }
67
+
68
+ //#endregion
69
+ //#region node_modules/wrap-ansi/node_modules/ansi-styles/index.js
70
+ const ANSI_BACKGROUND_OFFSET = 10;
71
+ const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
72
+ const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
73
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
74
+ const styles = {
75
+ modifier: {
76
+ reset: [0, 0],
77
+ bold: [1, 22],
78
+ dim: [2, 22],
79
+ italic: [3, 23],
80
+ underline: [4, 24],
81
+ overline: [53, 55],
82
+ inverse: [7, 27],
83
+ hidden: [8, 28],
84
+ strikethrough: [9, 29]
85
+ },
86
+ color: {
87
+ black: [30, 39],
88
+ red: [31, 39],
89
+ green: [32, 39],
90
+ yellow: [33, 39],
91
+ blue: [34, 39],
92
+ magenta: [35, 39],
93
+ cyan: [36, 39],
94
+ white: [37, 39],
95
+ blackBright: [90, 39],
96
+ gray: [90, 39],
97
+ grey: [90, 39],
98
+ redBright: [91, 39],
99
+ greenBright: [92, 39],
100
+ yellowBright: [93, 39],
101
+ blueBright: [94, 39],
102
+ magentaBright: [95, 39],
103
+ cyanBright: [96, 39],
104
+ whiteBright: [97, 39]
105
+ },
106
+ bgColor: {
107
+ bgBlack: [40, 49],
108
+ bgRed: [41, 49],
109
+ bgGreen: [42, 49],
110
+ bgYellow: [43, 49],
111
+ bgBlue: [44, 49],
112
+ bgMagenta: [45, 49],
113
+ bgCyan: [46, 49],
114
+ bgWhite: [47, 49],
115
+ bgBlackBright: [100, 49],
116
+ bgGray: [100, 49],
117
+ bgGrey: [100, 49],
118
+ bgRedBright: [101, 49],
119
+ bgGreenBright: [102, 49],
120
+ bgYellowBright: [103, 49],
121
+ bgBlueBright: [104, 49],
122
+ bgMagentaBright: [105, 49],
123
+ bgCyanBright: [106, 49],
124
+ bgWhiteBright: [107, 49]
125
+ }
126
+ };
127
+ const modifierNames = Object.keys(styles.modifier);
128
+ const foregroundColorNames = Object.keys(styles.color);
129
+ const backgroundColorNames = Object.keys(styles.bgColor);
130
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
131
+ function assembleStyles() {
132
+ const codes = /* @__PURE__ */ new Map();
133
+ for (const [groupName, group] of Object.entries(styles)) {
134
+ for (const [styleName, style] of Object.entries(group)) {
135
+ styles[styleName] = {
136
+ open: `\u001B[${style[0]}m`,
137
+ close: `\u001B[${style[1]}m`
138
+ };
139
+ group[styleName] = styles[styleName];
140
+ codes.set(style[0], style[1]);
141
+ }
142
+ Object.defineProperty(styles, groupName, {
143
+ value: group,
144
+ enumerable: false
145
+ });
146
+ }
147
+ Object.defineProperty(styles, "codes", {
148
+ value: codes,
149
+ enumerable: false
150
+ });
151
+ styles.color.close = "\x1B[39m";
152
+ styles.bgColor.close = "\x1B[49m";
153
+ styles.color.ansi = wrapAnsi16();
154
+ styles.color.ansi256 = wrapAnsi256();
155
+ styles.color.ansi16m = wrapAnsi16m();
156
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
157
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
158
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
159
+ Object.defineProperties(styles, {
160
+ rgbToAnsi256: {
161
+ value(red, green, blue) {
162
+ if (red === green && green === blue) {
163
+ if (red < 8) return 16;
164
+ if (red > 248) return 231;
165
+ return Math.round((red - 8) / 247 * 24) + 232;
166
+ }
167
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
168
+ },
169
+ enumerable: false
170
+ },
171
+ hexToRgb: {
172
+ value(hex) {
173
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
174
+ if (!matches) return [
175
+ 0,
176
+ 0,
177
+ 0
178
+ ];
179
+ let [colorString] = matches;
180
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
181
+ const integer = Number.parseInt(colorString, 16);
182
+ return [
183
+ integer >> 16 & 255,
184
+ integer >> 8 & 255,
185
+ integer & 255
186
+ ];
187
+ },
188
+ enumerable: false
189
+ },
190
+ hexToAnsi256: {
191
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
192
+ enumerable: false
193
+ },
194
+ ansi256ToAnsi: {
195
+ value(code) {
196
+ if (code < 8) return 30 + code;
197
+ if (code < 16) return 90 + (code - 8);
198
+ let red;
199
+ let green;
200
+ let blue;
201
+ if (code >= 232) {
202
+ red = ((code - 232) * 10 + 8) / 255;
203
+ green = red;
204
+ blue = red;
205
+ } else {
206
+ code -= 16;
207
+ const remainder = code % 36;
208
+ red = Math.floor(code / 36) / 5;
209
+ green = Math.floor(remainder / 6) / 5;
210
+ blue = remainder % 6 / 5;
211
+ }
212
+ const value = Math.max(red, green, blue) * 2;
213
+ if (value === 0) return 30;
214
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
215
+ if (value === 2) result += 60;
216
+ return result;
217
+ },
218
+ enumerable: false
219
+ },
220
+ rgbToAnsi: {
221
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
222
+ enumerable: false
223
+ },
224
+ hexToAnsi: {
225
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
226
+ enumerable: false
227
+ }
228
+ });
229
+ return styles;
230
+ }
231
+ const ansiStyles = assembleStyles();
232
+ var ansi_styles_default = ansiStyles;
233
+
234
+ //#endregion
235
+ //#region node_modules/wrap-ansi/index.js
236
+ const ESCAPES = new Set(["\x1B", "›"]);
237
+ const END_CODE = 39;
238
+ const ANSI_ESCAPE_BELL = "\x07";
239
+ const ANSI_CSI = "[";
240
+ const ANSI_OSC = "]";
241
+ const ANSI_SGR_TERMINATOR = "m";
242
+ const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
243
+ const wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
244
+ const wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
245
+ const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
246
+ const wrapWord = (rows, word, columns) => {
247
+ const characters = [...word];
248
+ let isInsideEscape = false;
249
+ let isInsideLinkEscape = false;
250
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
251
+ for (const [index, character] of characters.entries()) {
252
+ const characterLength = stringWidth(character);
253
+ if (visible + characterLength <= columns) rows[rows.length - 1] += character;
254
+ else {
255
+ rows.push(character);
256
+ visible = 0;
257
+ }
258
+ if (ESCAPES.has(character)) {
259
+ isInsideEscape = true;
260
+ isInsideLinkEscape = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("") === ANSI_ESCAPE_LINK;
261
+ }
262
+ if (isInsideEscape) {
263
+ if (isInsideLinkEscape) {
264
+ if (character === ANSI_ESCAPE_BELL) {
265
+ isInsideEscape = false;
266
+ isInsideLinkEscape = false;
267
+ }
268
+ } else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
269
+ continue;
270
+ }
271
+ visible += characterLength;
272
+ if (visible === columns && index < characters.length - 1) {
273
+ rows.push("");
274
+ visible = 0;
275
+ }
276
+ }
277
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
278
+ };
279
+ const stringVisibleTrimSpacesRight = (string) => {
280
+ const words = string.split(" ");
281
+ let last = words.length;
282
+ while (last > 0) {
283
+ if (stringWidth(words[last - 1]) > 0) break;
284
+ last--;
285
+ }
286
+ if (last === words.length) return string;
287
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
288
+ };
289
+ const exec = (string, columns, options = {}) => {
290
+ if (options.trim !== false && string.trim() === "") return "";
291
+ let returnValue = "";
292
+ let escapeCode;
293
+ let escapeUrl;
294
+ const lengths = wordLengths(string);
295
+ let rows = [""];
296
+ for (const [index, word] of string.split(" ").entries()) {
297
+ if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
298
+ let rowLength = stringWidth(rows.at(-1));
299
+ if (index !== 0) {
300
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
301
+ rows.push("");
302
+ rowLength = 0;
303
+ }
304
+ if (rowLength > 0 || options.trim === false) {
305
+ rows[rows.length - 1] += " ";
306
+ rowLength++;
307
+ }
308
+ }
309
+ if (options.hard && lengths[index] > columns) {
310
+ const remainingColumns = columns - rowLength;
311
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
312
+ if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
313
+ wrapWord(rows, word, columns);
314
+ continue;
315
+ }
316
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
317
+ if (options.wordWrap === false && rowLength < columns) {
318
+ wrapWord(rows, word, columns);
319
+ continue;
320
+ }
321
+ rows.push("");
322
+ }
323
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
324
+ wrapWord(rows, word, columns);
325
+ continue;
326
+ }
327
+ rows[rows.length - 1] += word;
328
+ }
329
+ if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
330
+ const preString = rows.join("\n");
331
+ const pre = [...preString];
332
+ let preStringIndex = 0;
333
+ for (const [index, character] of pre.entries()) {
334
+ returnValue += character;
335
+ if (ESCAPES.has(character)) {
336
+ const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(preString.slice(preStringIndex)) || { groups: {} };
337
+ if (groups.code !== void 0) {
338
+ const code$1 = Number.parseFloat(groups.code);
339
+ escapeCode = code$1 === END_CODE ? void 0 : code$1;
340
+ } else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
341
+ }
342
+ const code = ansi_styles_default.codes.get(Number(escapeCode));
343
+ if (pre[index + 1] === "\n") {
344
+ if (escapeUrl) returnValue += wrapAnsiHyperlink("");
345
+ if (escapeCode && code) returnValue += wrapAnsiCode(code);
346
+ } else if (character === "\n") {
347
+ if (escapeCode && code) returnValue += wrapAnsiCode(escapeCode);
348
+ if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
349
+ }
350
+ preStringIndex += character.length;
351
+ }
352
+ return returnValue;
353
+ };
354
+ function wrapAnsi(string, columns, options) {
355
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
356
+ }
357
+
358
+ //#endregion
359
+ export { stringWidth as n, wrapAnsi as t };