{ "version": 3, "sources": ["../../src/ansi-regex/index.ts", "../../src/strip-ansi/index.ts", "../../src/eastasianwidth/index.ts", "../../src/emoji-regex/index.ts", "../../src/string-width/index.ts", "../../src/ansi-styles/index.ts", "../../src/wrap-ansi/index.ts", "../../src/index.ts"], "sourcesContent": ["// TODO! cut this down? do we need the onlyFirst option?\n\nexport const ansiRegex = ({ onlyFirst = false } = {}) => {\n // Valid string terminator sequences are BEL, ESC\\, and 0x9c\n const ST = \"(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)\";\n\n // OSC sequences only: ESC ] ... ST (non-greedy until the first ST)\n const osc = `(?:\\\\u001B\\\\][\\\\s\\\\S]*?${ST})`;\n\n // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte\n const csi =\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:\\\\d{1,4}(?:[;:]\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]\";\n\n const pattern = `${osc}|${csi}`;\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n", "import { ansiRegex } from \"../ansi-regex/index.js\";\nconst regex = ansiRegex();\nexport const stripAnsi = (str: string) => str.replace(regex, \"\");\n", "export const eastAsianWidth = (character: string) => {\n var x = character.charCodeAt(0);\n var y = character.length == 2 ? character.charCodeAt(1) : 0;\n var codePoint = x;\n if (0xd800 <= x && x <= 0xdbff && 0xdc00 <= y && y <= 0xdfff) {\n x &= 0x3ff;\n y &= 0x3ff;\n codePoint = (x << 10) | y;\n codePoint += 0x10000;\n }\n\n if (\n 0x3000 == codePoint ||\n (0xff01 <= codePoint && codePoint <= 0xff60) ||\n (0xffe0 <= codePoint && codePoint <= 0xffe6)\n ) {\n return \"F\";\n }\n if (\n 0x20a9 == codePoint ||\n (0xff61 <= codePoint && codePoint <= 0xffbe) ||\n (0xffc2 <= codePoint && codePoint <= 0xffc7) ||\n (0xffca <= codePoint && codePoint <= 0xffcf) ||\n (0xffd2 <= codePoint && codePoint <= 0xffd7) ||\n (0xffda <= codePoint && codePoint <= 0xffdc) ||\n (0xffe8 <= codePoint && codePoint <= 0xffee)\n ) {\n return \"H\";\n }\n if (\n (0x1100 <= codePoint && codePoint <= 0x115f) ||\n (0x11a3 <= codePoint && codePoint <= 0x11a7) ||\n (0x11fa <= codePoint && codePoint <= 0x11ff) ||\n (0x2329 <= codePoint && codePoint <= 0x232a) ||\n (0x2e80 <= codePoint && codePoint <= 0x2e99) ||\n (0x2e9b <= codePoint && codePoint <= 0x2ef3) ||\n (0x2f00 <= codePoint && codePoint <= 0x2fd5) ||\n (0x2ff0 <= codePoint && codePoint <= 0x2ffb) ||\n (0x3001 <= codePoint && codePoint <= 0x303e) ||\n (0x3041 <= codePoint && codePoint <= 0x3096) ||\n (0x3099 <= codePoint && codePoint <= 0x30ff) ||\n (0x3105 <= codePoint && codePoint <= 0x312d) ||\n (0x3131 <= codePoint && codePoint <= 0x318e) ||\n (0x3190 <= codePoint && codePoint <= 0x31ba) ||\n (0x31c0 <= codePoint && codePoint <= 0x31e3) ||\n (0x31f0 <= codePoint && codePoint <= 0x321e) ||\n (0x3220 <= codePoint && codePoint <= 0x3247) ||\n (0x3250 <= codePoint && codePoint <= 0x32fe) ||\n (0x3300 <= codePoint && codePoint <= 0x4dbf) ||\n (0x4e00 <= codePoint && codePoint <= 0xa48c) ||\n (0xa490 <= codePoint && codePoint <= 0xa4c6) ||\n (0xa960 <= codePoint && codePoint <= 0xa97c) ||\n (0xac00 <= codePoint && codePoint <= 0xd7a3) ||\n (0xd7b0 <= codePoint && codePoint <= 0xd7c6) ||\n (0xd7cb <= codePoint && codePoint <= 0xd7fb) ||\n (0xf900 <= codePoint && codePoint <= 0xfaff) ||\n (0xfe10 <= codePoint && codePoint <= 0xfe19) ||\n (0xfe30 <= codePoint && codePoint <= 0xfe52) ||\n (0xfe54 <= codePoint && codePoint <= 0xfe66) ||\n (0xfe68 <= codePoint && codePoint <= 0xfe6b) ||\n (0x1b000 <= codePoint && codePoint <= 0x1b001) ||\n (0x1f200 <= codePoint && codePoint <= 0x1f202) ||\n (0x1f210 <= codePoint && codePoint <= 0x1f23a) ||\n (0x1f240 <= codePoint && codePoint <= 0x1f248) ||\n (0x1f250 <= codePoint && codePoint <= 0x1f251) ||\n (0x20000 <= codePoint && codePoint <= 0x2f73f) ||\n (0x2b740 <= codePoint && codePoint <= 0x2fffd) ||\n (0x30000 <= codePoint && codePoint <= 0x3fffd)\n ) {\n return \"W\";\n }\n if (\n (0x0020 <= codePoint && codePoint <= 0x007e) ||\n (0x00a2 <= codePoint && codePoint <= 0x00a3) ||\n (0x00a5 <= codePoint && codePoint <= 0x00a6) ||\n 0x00ac == codePoint ||\n 0x00af == codePoint ||\n (0x27e6 <= codePoint && codePoint <= 0x27ed) ||\n (0x2985 <= codePoint && codePoint <= 0x2986)\n ) {\n return \"Na\";\n }\n if (\n 0x00a1 == codePoint ||\n 0x00a4 == codePoint ||\n (0x00a7 <= codePoint && codePoint <= 0x00a8) ||\n 0x00aa == codePoint ||\n (0x00ad <= codePoint && codePoint <= 0x00ae) ||\n (0x00b0 <= codePoint && codePoint <= 0x00b4) ||\n (0x00b6 <= codePoint && codePoint <= 0x00ba) ||\n (0x00bc <= codePoint && codePoint <= 0x00bf) ||\n 0x00c6 == codePoint ||\n 0x00d0 == codePoint ||\n (0x00d7 <= codePoint && codePoint <= 0x00d8) ||\n (0x00de <= codePoint && codePoint <= 0x00e1) ||\n 0x00e6 == codePoint ||\n (0x00e8 <= codePoint && codePoint <= 0x00ea) ||\n (0x00ec <= codePoint && codePoint <= 0x00ed) ||\n 0x00f0 == codePoint ||\n (0x00f2 <= codePoint && codePoint <= 0x00f3) ||\n (0x00f7 <= codePoint && codePoint <= 0x00fa) ||\n 0x00fc == codePoint ||\n 0x00fe == codePoint ||\n 0x0101 == codePoint ||\n 0x0111 == codePoint ||\n 0x0113 == codePoint ||\n 0x011b == codePoint ||\n (0x0126 <= codePoint && codePoint <= 0x0127) ||\n 0x012b == codePoint ||\n (0x0131 <= codePoint && codePoint <= 0x0133) ||\n 0x0138 == codePoint ||\n (0x013f <= codePoint && codePoint <= 0x0142) ||\n 0x0144 == codePoint ||\n (0x0148 <= codePoint && codePoint <= 0x014b) ||\n 0x014d == codePoint ||\n (0x0152 <= codePoint && codePoint <= 0x0153) ||\n (0x0166 <= codePoint && codePoint <= 0x0167) ||\n 0x016b == codePoint ||\n 0x01ce == codePoint ||\n 0x01d0 == codePoint ||\n 0x01d2 == codePoint ||\n 0x01d4 == codePoint ||\n 0x01d6 == codePoint ||\n 0x01d8 == codePoint ||\n 0x01da == codePoint ||\n 0x01dc == codePoint ||\n 0x0251 == codePoint ||\n 0x0261 == codePoint ||\n 0x02c4 == codePoint ||\n 0x02c7 == codePoint ||\n (0x02c9 <= codePoint && codePoint <= 0x02cb) ||\n 0x02cd == codePoint ||\n 0x02d0 == codePoint ||\n (0x02d8 <= codePoint && codePoint <= 0x02db) ||\n 0x02dd == codePoint ||\n 0x02df == codePoint ||\n (0x0300 <= codePoint && codePoint <= 0x036f) ||\n (0x0391 <= codePoint && codePoint <= 0x03a1) ||\n (0x03a3 <= codePoint && codePoint <= 0x03a9) ||\n (0x03b1 <= codePoint && codePoint <= 0x03c1) ||\n (0x03c3 <= codePoint && codePoint <= 0x03c9) ||\n 0x0401 == codePoint ||\n (0x0410 <= codePoint && codePoint <= 0x044f) ||\n 0x0451 == codePoint ||\n 0x2010 == codePoint ||\n (0x2013 <= codePoint && codePoint <= 0x2016) ||\n (0x2018 <= codePoint && codePoint <= 0x2019) ||\n (0x201c <= codePoint && codePoint <= 0x201d) ||\n (0x2020 <= codePoint && codePoint <= 0x2022) ||\n (0x2024 <= codePoint && codePoint <= 0x2027) ||\n 0x2030 == codePoint ||\n (0x2032 <= codePoint && codePoint <= 0x2033) ||\n 0x2035 == codePoint ||\n 0x203b == codePoint ||\n 0x203e == codePoint ||\n 0x2074 == codePoint ||\n 0x207f == codePoint ||\n (0x2081 <= codePoint && codePoint <= 0x2084) ||\n 0x20ac == codePoint ||\n 0x2103 == codePoint ||\n 0x2105 == codePoint ||\n 0x2109 == codePoint ||\n 0x2113 == codePoint ||\n 0x2116 == codePoint ||\n (0x2121 <= codePoint && codePoint <= 0x2122) ||\n 0x2126 == codePoint ||\n 0x212b == codePoint ||\n (0x2153 <= codePoint && codePoint <= 0x2154) ||\n (0x215b <= codePoint && codePoint <= 0x215e) ||\n (0x2160 <= codePoint && codePoint <= 0x216b) ||\n (0x2170 <= codePoint && codePoint <= 0x2179) ||\n 0x2189 == codePoint ||\n (0x2190 <= codePoint && codePoint <= 0x2199) ||\n (0x21b8 <= codePoint && codePoint <= 0x21b9) ||\n 0x21d2 == codePoint ||\n 0x21d4 == codePoint ||\n 0x21e7 == codePoint ||\n 0x2200 == codePoint ||\n (0x2202 <= codePoint && codePoint <= 0x2203) ||\n (0x2207 <= codePoint && codePoint <= 0x2208) ||\n 0x220b == codePoint ||\n 0x220f == codePoint ||\n 0x2211 == codePoint ||\n 0x2215 == codePoint ||\n 0x221a == codePoint ||\n (0x221d <= codePoint && codePoint <= 0x2220) ||\n 0x2223 == codePoint ||\n 0x2225 == codePoint ||\n (0x2227 <= codePoint && codePoint <= 0x222c) ||\n 0x222e == codePoint ||\n (0x2234 <= codePoint && codePoint <= 0x2237) ||\n (0x223c <= codePoint && codePoint <= 0x223d) ||\n 0x2248 == codePoint ||\n 0x224c == codePoint ||\n 0x2252 == codePoint ||\n (0x2260 <= codePoint && codePoint <= 0x2261) ||\n (0x2264 <= codePoint && codePoint <= 0x2267) ||\n (0x226a <= codePoint && codePoint <= 0x226b) ||\n (0x226e <= codePoint && codePoint <= 0x226f) ||\n (0x2282 <= codePoint && codePoint <= 0x2283) ||\n (0x2286 <= codePoint && codePoint <= 0x2287) ||\n 0x2295 == codePoint ||\n 0x2299 == codePoint ||\n 0x22a5 == codePoint ||\n 0x22bf == codePoint ||\n 0x2312 == codePoint ||\n (0x2460 <= codePoint && codePoint <= 0x24e9) ||\n (0x24eb <= codePoint && codePoint <= 0x254b) ||\n (0x2550 <= codePoint && codePoint <= 0x2573) ||\n (0x2580 <= codePoint && codePoint <= 0x258f) ||\n (0x2592 <= codePoint && codePoint <= 0x2595) ||\n (0x25a0 <= codePoint && codePoint <= 0x25a1) ||\n (0x25a3 <= codePoint && codePoint <= 0x25a9) ||\n (0x25b2 <= codePoint && codePoint <= 0x25b3) ||\n (0x25b6 <= codePoint && codePoint <= 0x25b7) ||\n (0x25bc <= codePoint && codePoint <= 0x25bd) ||\n (0x25c0 <= codePoint && codePoint <= 0x25c1) ||\n (0x25c6 <= codePoint && codePoint <= 0x25c8) ||\n 0x25cb == codePoint ||\n (0x25ce <= codePoint && codePoint <= 0x25d1) ||\n (0x25e2 <= codePoint && codePoint <= 0x25e5) ||\n 0x25ef == codePoint ||\n (0x2605 <= codePoint && codePoint <= 0x2606) ||\n 0x2609 == codePoint ||\n (0x260e <= codePoint && codePoint <= 0x260f) ||\n (0x2614 <= codePoint && codePoint <= 0x2615) ||\n 0x261c == codePoint ||\n 0x261e == codePoint ||\n 0x2640 == codePoint ||\n 0x2642 == codePoint ||\n (0x2660 <= codePoint && codePoint <= 0x2661) ||\n (0x2663 <= codePoint && codePoint <= 0x2665) ||\n (0x2667 <= codePoint && codePoint <= 0x266a) ||\n (0x266c <= codePoint && codePoint <= 0x266d) ||\n 0x266f == codePoint ||\n (0x269e <= codePoint && codePoint <= 0x269f) ||\n (0x26be <= codePoint && codePoint <= 0x26bf) ||\n (0x26c4 <= codePoint && codePoint <= 0x26cd) ||\n (0x26cf <= codePoint && codePoint <= 0x26e1) ||\n 0x26e3 == codePoint ||\n (0x26e8 <= codePoint && codePoint <= 0x26ff) ||\n 0x273d == codePoint ||\n 0x2757 == codePoint ||\n (0x2776 <= codePoint && codePoint <= 0x277f) ||\n (0x2b55 <= codePoint && codePoint <= 0x2b59) ||\n (0x3248 <= codePoint && codePoint <= 0x324f) ||\n (0xe000 <= codePoint && codePoint <= 0xf8ff) ||\n (0xfe00 <= codePoint && codePoint <= 0xfe0f) ||\n 0xfffd == codePoint ||\n (0x1f100 <= codePoint && codePoint <= 0x1f10a) ||\n (0x1f110 <= codePoint && codePoint <= 0x1f12d) ||\n (0x1f130 <= codePoint && codePoint <= 0x1f169) ||\n (0x1f170 <= codePoint && codePoint <= 0x1f19a) ||\n (0xe0100 <= codePoint && codePoint <= 0xe01ef) ||\n (0xf0000 <= codePoint && codePoint <= 0xffffd) ||\n (0x100000 <= codePoint && codePoint <= 0x10fffd)\n ) {\n return \"A\";\n }\n\n return \"N\";\n};\n\nexport const characterLength = (character: string) => {\n var code = eastAsianWidth(character);\n if (code == \"F\" || code == \"W\" || code == \"A\") {\n return 2;\n } else {\n return 1;\n }\n};\n\n// Split a string considering surrogate-pairs.\nexport const stringToArray = (str: string) => {\n return str.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\uD800-\\uDFFF]/g) || [];\n};\n\nexport const length = (str: string) => {\n var characters = stringToArray(str);\n var len = 0;\n for (const char of characters) {\n len = len + characterLength(char);\n }\n return len;\n};\n\nexport const slice = (text: string, start: number, end: number) => {\n const textLen = length(text);\n start = start ? start : 0;\n end = end ? end : 1;\n if (start < 0) {\n start = textLen + start;\n }\n if (end < 0) {\n end = textLen + end;\n }\n var result = \"\";\n var eawLen = 0;\n var chars = stringToArray(text);\n for (const char of chars) {\n var charLen = length(char);\n if (eawLen >= start - (charLen == 2 ? 1 : 0)) {\n if (eawLen + charLen <= end) {\n result += char;\n } else {\n break;\n }\n }\n eawLen += charLen;\n }\n return result;\n};\n", "// https://mths.be/emoji\nexport const emojiRegex = () =>\n /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67)\\uDB40\\uDC7F|(?:\\uD83E\\uDDD1\\uD83C\\uDFFF\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C\\uDFFB(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))?|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\u200D(?:(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFFF|\\uD83C\\uDFFE|\\uD83C\\uDFFD|\\uD83C\\uDFFC)?|(?:\\uD83D\\uDC69(?:\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69]))|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC69(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE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DFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDE36\\u200D\\uD83C\\uDF2B|\\uD83C\\uDFF3\\uFE0F\\u200D\\u26A7|\\uD83D\\uDC3B\\u200D\\u2744|(?:(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\uD83C\\uDFF4\\u200D\\u2620|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])\\u200D[\\u2640\\u2642]|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u2600-\\u2604\\u260E\\u2611\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26B0\\u26B1\\u26C8\\u26CF\\u26D1\\u26D3\\u26E9\\u26F0\\u26F1\\u26F4\\u26F7\\u26F8\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]|\\uD83D[\\uDC3F\\uDCFD\\uDD49\\uDD4A\\uDD6F\\uDD70\\uDD73\\uDD76-\\uDD79\\uDD87\\uDD8A-\\uDD8D\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA\\uDECB\\uDECD-\\uDECF\\uDEE0-\\uDEE5\\uDEE9\\uDEF0\\uDEF3])\\uFE0F|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC69\\u200D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[\\uDD74\\uDD90])(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])|[\\u270A\\u270B]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC08\\uDC15\\uDC3B\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDC8F\\uDC91\\uDCAA\\uDD7A\\uDD95\\uDD96\\uDE2E\\uDE35\\uDE36\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5]|\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD]|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF]|[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDE01\\uDE1A\\u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\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5-\\uDED7\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5-\\uDED7\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDD77\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n", "import { stripAnsi } from \"../strip-ansi/index.js\";\nimport { eastAsianWidth } from \"../eastasianwidth/index.js\";\nimport { emojiRegex } from \"../emoji-regex/index.js\";\n\nexport type Options = {\n ambiguousIsNarrow?: boolean;\n};\n\nexport function stringWidth(str: string, options: Options = {}) {\n if (typeof str !== \"string\" || str.length === 0) {\n return 0;\n }\n\n options = {\n ambiguousIsNarrow: true,\n ...options,\n };\n\n str = stripAnsi(str);\n\n if (str.length === 0) {\n return 0;\n }\n\n str = str.replace(emojiRegex(), \" \");\n\n const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;\n let width = 0;\n\n for (const character of str) {\n const codePoint = character.codePointAt(0);\n\n // Ignore control characters\n if (\n !codePoint ||\n codePoint <= 0x1f ||\n (codePoint >= 0x7f && codePoint <= 0x9f)\n ) {\n continue;\n }\n\n // Ignore combining characters\n if (codePoint >= 0x300 && codePoint <= 0x36f) {\n continue;\n }\n\n const code = eastAsianWidth(character);\n switch (code) {\n case \"F\":\n case \"W\":\n width += 2;\n break;\n case \"A\":\n width += ambiguousCharacterWidth;\n break;\n default:\n width += 1;\n }\n }\n\n return width;\n}\n", "const styles = {\n modifier: {\n reset: [0, 0],\n // 21 isn't widely supported and 22 does the same thing\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n overline: [53, 55],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n },\n color: {\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n\n // Bright color\n blackBright: [90, 39],\n gray: [90, 39], // Alias of `blackBright`\n grey: [90, 39], // Alias of `blackBright`\n redBright: [91, 39],\n greenBright: [92, 39],\n yellowBright: [93, 39],\n blueBright: [94, 39],\n magentaBright: [95, 39],\n cyanBright: [96, 39],\n whiteBright: [97, 39],\n },\n bgColor: {\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n\n // Bright color\n bgBlackBright: [100, 49],\n bgGray: [100, 49], // Alias of `bgBlackBright`\n bgGrey: [100, 49], // Alias of `bgBlackBright`\n bgRedBright: [101, 49],\n bgGreenBright: [102, 49],\n bgYellowBright: [103, 49],\n bgBlueBright: [104, 49],\n bgMagentaBright: [105, 49],\n bgCyanBright: [106, 49],\n bgWhiteBright: [107, 49],\n },\n} as const;\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\ninterface AnsiStyles extends Record {}\nclass AnsiStyles {}\n\nexport const codes = new Map();\nconst ingest = (set: Record) =>\n Object.fromEntries(\n Object.entries(set).map(([key, [open, close]]) => {\n codes.set(open, close);\n return [\n key,\n (AnsiStyles.prototype[key] = {\n open: `\\u001B[${open}m`,\n close: `\\u001B[${close}m`,\n }),\n ];\n }),\n );\n\nexport const ansiStyles = new (class extends AnsiStyles {\n codes = codes;\n\n modifier = ingest(styles.modifier);\n\n color = {\n ...ingest(styles.color),\n close: \"\\x1B[39m\",\n ansi: (code: number) => `\\u001B[${code}m`,\n ansi256: (code: number) => `\\u001B[${38};5;${code}m`,\n ansi16m: (red: number, green: number, blue: number) =>\n `\\u001B[${38};2;${red};${green};${blue}m`,\n };\n\n bgColor = {\n ...ingest(styles.bgColor),\n close: \"\\u001B[49m\",\n ansi: (code: number) => `\\u001B[${code + 10}m`,\n ansi256: (code: number) => `\\u001B[${48};5;${code}m`,\n ansi16m: (red: number, green: number, blue: number) =>\n `\\u001B[${48};2;${red};${green};${blue}m`,\n };\n\n rgbToAnsi256(red: number, green: number, blue: number) {\n // We use the extended greyscale palette here, with the exception of\n // black and white. normal palette only has 4 greyscale shades.\n if (red === green && green === blue) {\n if (red < 8) return 16;\n if (red > 248) return 231;\n return Math.round(((red - 8) / 247) * 24) + 232;\n }\n\n return (\n 16 +\n 36 * Math.round((red / 255) * 5) +\n 6 * Math.round((green / 255) * 5) +\n Math.round((blue / 255) * 5)\n );\n }\n\n hexToRgb(hex: number): [number, number, number] {\n const matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n if (!matches) {\n return [0, 0, 0];\n }\n\n let [colorString] = matches;\n\n if (colorString.length === 3) {\n colorString = [...colorString]\n .map((character) => character + character)\n .join(\"\");\n }\n\n const integer = Number.parseInt(colorString, 16);\n\n return [\n (integer >> 16) & 0xff,\n (integer >> 8) & 0xff,\n integer & 0xff,\n ];\n }\n\n hexToAnsi256(hex: number) {\n return this.rgbToAnsi256(...this.hexToRgb(hex));\n }\n ansi256ToAnsi(code: number) {\n if (code < 8) {\n return 30 + code;\n }\n\n if (code < 16) {\n return 90 + (code - 8);\n }\n\n let red;\n let green;\n let blue;\n\n if (code >= 232) {\n red = ((code - 232) * 10 + 8) / 255;\n green = red;\n blue = red;\n } else {\n code -= 16;\n\n const remainder = code % 36;\n\n red = Math.floor(code / 36) / 5;\n green = Math.floor(remainder / 6) / 5;\n blue = (remainder % 6) / 5;\n }\n\n const value = Math.max(red, green, blue) * 2;\n\n if (value === 0) {\n return 30;\n }\n\n let result =\n 30 +\n ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n if (value === 2) {\n result += 60;\n }\n\n return result;\n }\n rgbToAnsi(red: number, green: number, blue: number) {\n return this.ansi256ToAnsi(this.rgbToAnsi256(red, green, blue));\n }\n hexToAnsi(hex: number) {\n return this.ansi256ToAnsi(this.hexToAnsi256(hex));\n }\n})();\n", "import { stringWidth } from \"../string-width/index.js\";\nimport { stripAnsi } from \"../strip-ansi/index.js\";\nimport { ansiStyles } from \"../ansi-styles/index.js\";\n\nconst ESCAPES = new Set([\"\\u001B\", \"\\u009B\"]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = \"\\u0007\";\nconst ANSI_CSI = \"[\";\nconst ANSI_OSC = \"]\";\nconst ANSI_SGR_TERMINATOR = \"m\";\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = (code: number) =>\n `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = (uri: string) =>\n `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = (str: string) =>\n str.split(\" \").map((character) => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows: string[], word: string, columns: number) => {\n const characters = [...word];\n\n let isInsideEscape = false;\n let isInsideLinkEscape = false;\n let visible = stringWidth(stripAnsi(String(rows[rows.length - 1])));\n\n for (const [index, character] of characters.entries()) {\n const characterLength = stringWidth(character);\n\n if (visible + characterLength <= columns) {\n rows[rows.length - 1] += character;\n } else {\n rows.push(character);\n visible = 0;\n }\n\n if (ESCAPES.has(character)) {\n isInsideEscape = true;\n isInsideLinkEscape = characters\n .slice(index + 1)\n .join(\"\")\n .startsWith(ANSI_ESCAPE_LINK);\n }\n\n if (isInsideEscape) {\n if (isInsideLinkEscape) {\n if (character === ANSI_ESCAPE_BELL) {\n isInsideEscape = false;\n isInsideLinkEscape = false;\n }\n } else if (character === ANSI_SGR_TERMINATOR) {\n isInsideEscape = false;\n }\n\n continue;\n }\n\n visible += characterLength;\n\n if (visible === columns && index < characters.length - 1) {\n rows.push(\"\");\n visible = 0;\n }\n }\n\n // It's possible that the last row we copy over is only\n // ansi escape characters, handle this edge-case\n if (!visible && String(rows[rows.length - 1]).length > 0 && rows.length > 1) {\n rows[rows.length - 2] = String(rows[rows.length - 1]) + rows.pop();\n }\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = (str: string) => {\n const words = str.split(\" \");\n let last = words.length;\n\n while (last > 0) {\n if (stringWidth(String(words[last - 1])) > 0) {\n break;\n }\n\n last--;\n }\n\n if (last === words.length) {\n return str;\n }\n\n return words.slice(0, last).join(\" \") + words.slice(last).join(\"\");\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode\n//\n// 'hard' will never allow a string to take up more than columns characters\n//\n// 'soft' allows long words to expand past the column length\nexport type Options = { trim?: boolean; wordWrap?: boolean; hard?: boolean };\nconst exec = (str: string, columns: number, options: Options = {}) => {\n if (options.trim !== false && str.trim() === \"\") {\n return \"\";\n }\n\n let returnValue = \"\";\n let escapeCode;\n let escapeUrl;\n\n const lengths = wordLengths(str);\n let rows = [\"\"];\n\n for (const [index, word] of str.split(\" \").entries()) {\n if (options.trim !== false) {\n rows[rows.length - 1] = String(rows[rows.length - 1]).trimStart();\n }\n\n let rowLength = stringWidth(String(rows[rows.length - 1]));\n\n if (index !== 0) {\n if (\n rowLength >= columns &&\n (options.wordWrap === false || options.trim === false)\n ) {\n // If we start with a new word but the current row length equals the length of the columns, add a new row\n rows.push(\"\");\n rowLength = 0;\n }\n\n if (rowLength > 0 || options.trim === false) {\n rows[rows.length - 1] += \" \";\n rowLength++;\n }\n }\n\n // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n const len = Number(lengths[index]);\n if (options.hard && len > columns) {\n const remainingColumns = columns - rowLength;\n const breaksStartingThisLine =\n 1 + Math.floor((len - remainingColumns - 1) / columns);\n const breaksStartingNextLine = Math.floor((len - 1) / columns);\n if (breaksStartingNextLine < breaksStartingThisLine) {\n rows.push(\"\");\n }\n\n wrapWord(rows, word, columns);\n continue;\n }\n\n if (rowLength + len > columns && rowLength > 0 && len > 0) {\n if (options.wordWrap === false && rowLength < columns) {\n wrapWord(rows, word, columns);\n continue;\n }\n\n rows.push(\"\");\n }\n\n if (rowLength + len > columns && options.wordWrap === false) {\n wrapWord(rows, word, columns);\n continue;\n }\n\n rows[rows.length - 1] += word;\n }\n\n if (options.trim !== false) {\n rows = rows.map((row) => stringVisibleTrimSpacesRight(row));\n }\n\n const pre = [...rows.join(\"\\n\")];\n\n for (const [index, character] of pre.entries()) {\n returnValue += character;\n\n if (ESCAPES.has(character)) {\n const { groups } = (new RegExp(\n `(?:\\\\${ANSI_CSI}(?\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`,\n ).exec(pre.slice(index).join(\"\")) || { groups: {} }) as {\n groups: {\n code?: string;\n uri?: string;\n };\n };\n if (groups.code !== undefined) {\n const code = Number.parseFloat(groups.code);\n escapeCode = code === END_CODE ? undefined : code;\n } else if (groups.uri !== undefined) {\n escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n }\n }\n\n const code = ansiStyles.codes.get(Number(escapeCode));\n\n if (pre[index + 1] === \"\\n\") {\n if (escapeUrl) {\n returnValue += wrapAnsiHyperlink(\"\");\n }\n\n if (escapeCode && code) {\n returnValue += wrapAnsiCode(code);\n }\n } else if (character === \"\\n\") {\n if (escapeCode && code) {\n returnValue += wrapAnsiCode(escapeCode);\n }\n\n if (escapeUrl) {\n returnValue += wrapAnsiHyperlink(escapeUrl);\n }\n }\n }\n\n return returnValue;\n};\n\n// For each newline, invoke the method separately\nexport const wrap = (str: string, columns: number, options: Options) =>\n String(str)\n .normalize()\n .replace(/\\r\\n/g, \"\\n\")\n .split(\"\\n\")\n .map((line) => exec(line, columns, options))\n .join(\"\\n\");\n", "import { stringWidth } from './string-width/index.js'\nimport { stripAnsi } from './strip-ansi/index.js'\nimport { wrap } from './wrap-ansi/index.js'\n\nconst align = {\n right: (str: string, width: number): string =>\n `${' '.repeat(Math.max(0, width - stringWidth(str)))}${str}`,\n center: (str: string, width: number): string =>\n `${' '.repeat(Math.max(0, width - stringWidth(str)) >> 1)}${str}`,\n}\n\nconst top = 0\nconst right = 1\nconst bottom = 2\nconst left = 3\n\nexport type UIOptions = {\n width: number\n wrap?: boolean\n rows?: string[]\n}\n\nexport type Column = {\n text: string\n width?: number\n align?: 'right' | 'left' | 'center'\n padding?: number[]\n border?: boolean\n}\n\nexport type ColumnArray = Column[] & {\n span?: boolean\n}\n\nexport type Line = {\n hidden?: boolean\n text: string\n span?: boolean\n}\n\nexport class UI {\n width: number\n wrap: boolean\n rows: ColumnArray[]\n\n constructor(opts: UIOptions) {\n this.width = opts.width\n /* c8 ignore start */\n this.wrap = opts.wrap ?? true\n /* c8 ignore stop */\n this.rows = []\n }\n\n span(...args: ColumnArray) {\n const cols = this.div(...args)\n cols.span = true\n }\n\n resetOutput() {\n this.rows = []\n }\n\n div(...args: (Column | string)[]): ColumnArray {\n if (args.length === 0) {\n this.div('')\n }\n\n if (\n this.wrap &&\n this.shouldApplyLayoutDSL(...args) &&\n typeof args[0] === 'string'\n ) {\n return this.applyLayoutDSL(args[0])\n }\n\n const cols: ColumnArray = Object.assign(\n args.map(arg => {\n if (typeof arg === 'string') {\n return this.colFromString(arg)\n }\n return arg\n }),\n { span: false },\n )\n\n this.rows.push(cols)\n return cols\n }\n\n shouldApplyLayoutDSL(...args: (Column | string)[]): boolean {\n return (\n args.length === 1 &&\n typeof args[0] === 'string' &&\n /[\\t\\n]/.test(args[0])\n )\n }\n\n applyLayoutDSL(str: string): ColumnArray {\n const rows = str.split('\\n').map(row => row.split('\\t'))\n let leftColumnWidth = 0\n\n // simple heuristic for layout, make sure the\n // second column lines up along the left-hand.\n // don't allow the first column to take up more\n // than 50% of the screen.\n rows.forEach(columns => {\n if (\n columns.length > 1 &&\n stringWidth(String(columns[0])) > leftColumnWidth\n ) {\n leftColumnWidth = Math.min(\n Math.floor(this.width * 0.5),\n stringWidth(String(columns[0])),\n )\n }\n })\n\n // generate a table:\n // replacing ' ' with padding calculations.\n // using the algorithmically generated width.\n rows.forEach(columns => {\n this.div(\n ...columns.map((r, i) => {\n return {\n text: r.trim(),\n padding: this.measurePadding(r),\n width:\n i === 0 && columns.length > 1 ? leftColumnWidth : undefined,\n } as Column\n }),\n )\n })\n\n const row = this.rows[this.rows.length - 1]\n /* c8 ignore start */\n if (!row) {\n throw new Error('no rows found')\n }\n /* c8 ignore stop */\n return row\n }\n\n colFromString(text: string): Column {\n return {\n text,\n padding: this.measurePadding(text),\n }\n }\n\n measurePadding(str: string): number[] {\n // measure padding without ansi escape codes\n const noAnsi = stripAnsi(str)\n const [right = '', left = ''] = [\n noAnsi.match(/\\s*$/)?.[0],\n noAnsi.match(/^\\s*/)?.[0],\n ]\n return [0, right.length, 0, left.length]\n }\n\n toString(): string {\n const lines: Line[] = []\n\n this.rows.forEach(row => {\n this.rowToString(row, lines)\n })\n\n // don't display any lines with the\n // hidden flag set.\n return lines\n .filter(line => !line.hidden)\n .map(line => line.text)\n .join('\\n')\n }\n\n rowToString(row: ColumnArray, lines: Line[]) {\n this.rasterize(row).forEach((rrow, r) => {\n let str = ''\n rrow.forEach((col: string, c: number) => {\n const column = row[c] as Column\n const { width } = column as Column // the width with padding.\n const wrapWidth = this.negatePadding(column) // the width without padding.\n\n let ts = col // temporary string used during alignment/padding.\n\n if (wrapWidth > stringWidth(col)) {\n ts += ' '.repeat(wrapWidth - stringWidth(col))\n }\n\n // align the string within its column.\n if (column.align && column.align !== 'left' && this.wrap) {\n const fn = align[column.align as 'right' | 'center']\n ts = fn(ts.trim(), wrapWidth)\n if (stringWidth(ts) < wrapWidth) {\n /* c8 ignore start */\n const w = width || 0\n /* c8 ignore stop */\n ts += ' '.repeat(w - stringWidth(ts) - 1)\n }\n }\n\n // apply border and padding to string.\n const padding = column.padding || [0, 0, 0, 0]\n if (padding[left]) {\n str += ' '.repeat(padding[left])\n }\n\n str += addBorder(column, ts, '| ')\n str += ts\n str += addBorder(column, ts, ' |')\n if (padding[right]) {\n str += ' '.repeat(padding[right])\n }\n\n // if prior row is span, try to render the\n // current row on the prior line.\n if (r === 0 && lines.length > 0) {\n const lastLine = lines[lines.length - 1]\n /* c8 ignore start */\n if (!lastLine) {\n throw new Error('last line not found')\n }\n /* c8 ignore stop */\n str = this.renderInline(str, lastLine)\n }\n })\n\n // remove trailing whitespace.\n lines.push({\n text: str.replace(/ +$/, ''),\n span: row.span,\n })\n })\n\n return lines\n }\n\n // if the full 'source' can render in\n // the target line, do so.\n renderInline(source: string, previousLine: Line) {\n const match = source.match(/^ */)\n /* c8 ignore start */\n const leadingWhitespace = match ? match[0].length : 0\n /* c8 ignore stop */\n const target = previousLine.text\n const targetTextWidth = stringWidth(target.trimEnd())\n\n if (!previousLine.span) {\n return source\n }\n\n // if we're not applying wrapping logic,\n // just always append to the span.\n if (!this.wrap) {\n previousLine.hidden = true\n return target + source\n }\n\n if (leadingWhitespace < targetTextWidth) {\n return source\n }\n\n previousLine.hidden = true\n\n return (\n target.trimEnd() +\n ' '.repeat(leadingWhitespace - targetTextWidth) +\n source.trimStart()\n )\n }\n\n rasterize(row: ColumnArray) {\n const rrows: string[][] = []\n const widths = this.columnWidths(row)\n let wrapped: string[]\n\n // word wrap all columns, and create\n // a data-structure that is easy to rasterize.\n row.forEach((col, c) => {\n // leave room for left and right padding.\n col.width = widths[c]\n if (this.wrap) {\n wrapped = wrap(col.text, this.negatePadding(col), {\n hard: true,\n }).split('\\n')\n } else {\n wrapped = col.text.split('\\n')\n }\n\n if (col.border) {\n wrapped.unshift(\n '.' + '-'.repeat(this.negatePadding(col) + 2) + '.',\n )\n wrapped.push(\"'\" + '-'.repeat(this.negatePadding(col) + 2) + \"'\")\n }\n\n // add top and bottom padding.\n if (col.padding) {\n wrapped.unshift(...new Array(col.padding[top] || 0).fill(''))\n wrapped.push(...new Array(col.padding[bottom] || 0).fill(''))\n }\n\n wrapped.forEach((str: string, r: number) => {\n if (!rrows[r]) {\n rrows.push([])\n }\n\n /* c8 ignore start */\n const rrow = rrows[r] ?? []\n /* c8 ignore stop */\n\n for (let i = 0; i < c; i++) {\n if (rrow[i] === undefined) {\n rrow.push('')\n }\n }\n\n rrow.push(str)\n })\n })\n\n return rrows\n }\n\n negatePadding(col: Column) {\n /* c8 ignore start */\n let wrapWidth = col.width || 0\n /* c8 ignore stop */\n if (col.padding) {\n wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0)\n }\n\n if (col.border) {\n wrapWidth -= 4\n }\n\n return wrapWidth\n }\n\n columnWidths(row: ColumnArray) {\n if (!this.wrap) {\n return row.map(col => {\n return col.width || stringWidth(col.text)\n })\n }\n\n let unset = row.length\n let remainingWidth = this.width\n\n // column widths can be set in config.\n const widths = row.map(col => {\n if (col.width) {\n unset--\n remainingWidth -= col.width\n return col.width\n }\n\n return undefined\n })\n\n // any unset widths should be calculated.\n /* c8 ignore start */\n const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0\n /* c8 ignore stop */\n\n return widths.map((w, i) => {\n if (w === undefined) {\n /* c8 ignore start */\n const col = row[i] ?? { text: '', padding: [] }\n /* c8 ignore stop */\n return Math.max(unsetWidth, _minWidth(col))\n }\n\n return w\n })\n }\n}\n\nconst addBorder = (col: Column, ts: string, style: string) => {\n if (col.border) {\n if (/[.']-+[.']/.test(ts)) {\n return ''\n }\n\n if (ts.trim().length !== 0) {\n return style\n }\n\n return ' '\n }\n\n return ''\n}\n\n// calculates the minimum width of\n// a column, based on padding preferences.\nconst _minWidth = (col: Column) => {\n const padding = col.padding || []\n const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0)\n if (col.border) {\n return minWidth + 4\n }\n\n return minWidth\n}\n\nconst getWindowWidth = (): number => {\n /* c8 ignore start */\n if (\n typeof process === 'object' &&\n process.stdout &&\n process.stdout.columns\n ) {\n return process.stdout.columns\n }\n return 80\n}\n/* c8 ignore stop */\n\nexport const cliui = (opts: Partial = {}) =>\n new UI({\n /* c8 ignore start */\n width: opts?.width || getWindowWidth(),\n wrap: opts?.wrap,\n /* c8 ignore stop */\n })\n"], "mappings": "AAEO,IAAMA,EAAY,CAAC,CAAE,UAAAC,EAAY,EAAK,EAAK,CAAA,IAAM,CAWtD,IAAMC,EAAU,gJAEhB,OAAO,IAAI,OAAOA,EAASD,EAAY,OAAY,GAAG,CACxD,ECfA,IAAME,EAAQC,EAAS,EACVC,EAAaC,GAAgBA,EAAI,QAAQH,EAAO,EAAE,ECFxD,IAAMI,EAAkBC,GAAqB,CAClD,IAAIC,EAAID,EAAU,WAAW,CAAC,EAC1BE,EAAIF,EAAU,QAAU,EAAIA,EAAU,WAAW,CAAC,EAAI,EACtDG,EAAYF,EAQhB,MAPI,QAAUA,GAAKA,GAAK,OAAU,OAAUC,GAAKA,GAAK,QACpDD,GAAK,KACLC,GAAK,KACLC,EAAaF,GAAK,GAAMC,EACxBC,GAAa,OAIHA,GAAV,OACC,OAAUA,GAAaA,GAAa,OACpC,OAAUA,GAAaA,GAAa,MAE9B,IAGGA,GAAV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th", "character", "x", "y", "codePoint", "emojiRegex", "stringWidth", "str", "options", "stripAnsi", "emojiRegex", "ambiguousCharacterWidth", "width", "character", "codePoint", "eastAsianWidth", "styles", "modifierNames", "foregroundColorNames", "backgroundColorNames", "colorNames", "AnsiStyles", "codes", "ingest", "set", "key", "open", "close", "ansiStyles", "code", "red", "green", "blue", "hex", "matches", "colorString", "character", "integer", "remainder", "value", "result", "ESCAPES", "END_CODE", "ANSI_ESCAPE_BELL", "ANSI_CSI", "ANSI_OSC", "ANSI_SGR_TERMINATOR", "ANSI_ESCAPE_LINK", "wrapAnsiCode", "code", "wrapAnsiHyperlink", "uri", "wordLengths", "str", "character", "stringWidth", "wrapWord", "rows", "word", "columns", "characters", "isInsideEscape", "isInsideLinkEscape", "visible", "stripAnsi", "index", "characterLength", "stringVisibleTrimSpacesRight", "words", "last", "exec", "options", "returnValue", "escapeCode", "escapeUrl", "lengths", "rowLength", "len", "remainingColumns", "breaksStartingThisLine", "row", "pre", "groups", "ansiStyles", "wrap", "line", "align", "str", "width", "stringWidth", "top", "right", "bottom", "left", "UI", "opts", "args", "cols", "arg", "rows", "row", "leftColumnWidth", "columns", "r", "i", "text", "noAnsi", "stripAnsi", "lines", "line", "rrow", "col", "c", "column", "wrapWidth", "ts", "fn", "w", "padding", "addBorder", "lastLine", "source", "previousLine", "match", "leadingWhitespace", "target", "targetTextWidth", "rrows", "widths", "wrapped", "wrap", "unset", "remainingWidth", "unsetWidth", "_minWidth", "style", "minWidth", "getWindowWidth", "cliui"] }