@opentui/core 0.2.6 → 0.2.7
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/Renderable.d.ts +1 -0
- package/audio.d.ts +89 -0
- package/{index-64dvh5m8.js → index-bm8v8yjf.js} +3 -3
- package/{index-1jjj58r2.js → index-m1f5yxwf.js} +2 -2
- package/{index-s460mpf9.js → index-t4yn324k.js} +623 -282
- package/{index-s460mpf9.js.map → index-t4yn324k.js.map} +23 -22
- package/{index-3hyr3wkd.js → index-tx8a4862.js} +551 -27
- package/{index-3hyr3wkd.js.map → index-tx8a4862.js.map} +6 -5
- package/index.d.ts +1 -0
- package/index.js +7 -3
- package/index.js.map +1 -1
- package/lib/terminal-capability-detection.d.ts +2 -0
- package/lib/tree-sitter/client.d.ts +2 -0
- package/lib/tree-sitter/default-parsers.d.ts +1 -1
- package/lib/tree-sitter-styled-text.d.ts +6 -4
- package/package.json +7 -7
- package/parser.worker.js +145 -11
- package/parser.worker.js.map +12 -5
- package/platform/runtime.d.ts +6 -0
- package/renderables/Code.d.ts +4 -0
- package/renderables/Markdown.d.ts +19 -0
- package/renderables/TextTable.d.ts +8 -1
- package/renderer.d.ts +3 -2
- package/runtime-plugin-support-configure.js +4 -4
- package/runtime-plugin-support.js +4 -4
- package/runtime-plugin.js +3 -3
- package/testing/terminal-capabilities.d.ts +7 -0
- package/testing.d.ts +1 -0
- package/testing.js +39 -2
- package/testing.js.map +4 -3
- package/types.d.ts +28 -1
- package/zig-structs.d.ts +82 -1
- package/zig.d.ts +42 -4
- /package/{index-64dvh5m8.js.map → index-bm8v8yjf.js.map} +0 -0
- /package/{index-1jjj58r2.js.map → index-m1f5yxwf.js.map} +0 -0
|
@@ -8372,6 +8372,7 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
|
|
|
8372
8372
|
const chunks = [];
|
|
8373
8373
|
const defaultStyle = syntaxStyle.getStyle("default");
|
|
8374
8374
|
const concealEnabled = options?.enabled ?? true;
|
|
8375
|
+
const baseStyle = options?.baseHighlight ? syntaxStyle.getStyle(options.baseHighlight) : undefined;
|
|
8375
8376
|
const injectionContainerRanges = [];
|
|
8376
8377
|
const boundaries = [];
|
|
8377
8378
|
for (let i = 0;i < highlights.length; i++) {
|
|
@@ -8441,7 +8442,7 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
|
|
|
8441
8442
|
return aSpec - bSpec;
|
|
8442
8443
|
return a.index - b.index;
|
|
8443
8444
|
});
|
|
8444
|
-
const mergedStyle = {};
|
|
8445
|
+
const mergedStyle = baseStyle ? { ...baseStyle } : {};
|
|
8445
8446
|
for (const { group } of sortedGroups) {
|
|
8446
8447
|
let styleForGroup = syntaxStyle.getStyle(group);
|
|
8447
8448
|
if (!styleForGroup && group.includes(".")) {
|
|
@@ -8490,16 +8491,17 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
|
|
|
8490
8491
|
}
|
|
8491
8492
|
} else if (currentOffset < boundary.offset) {
|
|
8492
8493
|
const text = content.slice(currentOffset, boundary.offset);
|
|
8494
|
+
const style = baseStyle ?? defaultStyle;
|
|
8493
8495
|
chunks.push({
|
|
8494
8496
|
__isChunk: true,
|
|
8495
8497
|
text,
|
|
8496
|
-
fg:
|
|
8497
|
-
bg:
|
|
8498
|
-
attributes:
|
|
8499
|
-
bold:
|
|
8500
|
-
italic:
|
|
8501
|
-
underline:
|
|
8502
|
-
dim:
|
|
8498
|
+
fg: style?.fg,
|
|
8499
|
+
bg: style?.bg,
|
|
8500
|
+
attributes: style ? createTextAttributes({
|
|
8501
|
+
bold: style.bold,
|
|
8502
|
+
italic: style.italic,
|
|
8503
|
+
underline: style.underline,
|
|
8504
|
+
dim: style.dim
|
|
8503
8505
|
}) : 0
|
|
8504
8506
|
});
|
|
8505
8507
|
}
|
|
@@ -8535,16 +8537,17 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
|
|
|
8535
8537
|
}
|
|
8536
8538
|
if (currentOffset < content.length) {
|
|
8537
8539
|
const text = content.slice(currentOffset);
|
|
8540
|
+
const style = baseStyle ?? defaultStyle;
|
|
8538
8541
|
chunks.push({
|
|
8539
8542
|
__isChunk: true,
|
|
8540
8543
|
text,
|
|
8541
|
-
fg:
|
|
8542
|
-
bg:
|
|
8543
|
-
attributes:
|
|
8544
|
-
bold:
|
|
8545
|
-
italic:
|
|
8546
|
-
underline:
|
|
8547
|
-
dim:
|
|
8544
|
+
fg: style?.fg,
|
|
8545
|
+
bg: style?.bg,
|
|
8546
|
+
attributes: style ? createTextAttributes({
|
|
8547
|
+
bold: style.bold,
|
|
8548
|
+
italic: style.italic,
|
|
8549
|
+
underline: style.underline,
|
|
8550
|
+
dim: style.dim
|
|
8548
8551
|
}) : 0
|
|
8549
8552
|
});
|
|
8550
8553
|
}
|
|
@@ -8552,8 +8555,11 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
|
|
|
8552
8555
|
}
|
|
8553
8556
|
async function treeSitterToStyledText(content, filetype, syntaxStyle, client, options) {
|
|
8554
8557
|
const result = await client.highlightOnce(content, filetype);
|
|
8555
|
-
if (result.highlights && result.highlights.length > 0) {
|
|
8556
|
-
const chunks = treeSitterToTextChunks(content, result.highlights, syntaxStyle,
|
|
8558
|
+
if (result.highlights && result.highlights.length > 0 || options?.baseHighlight) {
|
|
8559
|
+
const chunks = treeSitterToTextChunks(content, result.highlights ?? [], syntaxStyle, {
|
|
8560
|
+
enabled: options?.conceal?.enabled ?? true,
|
|
8561
|
+
baseHighlight: options?.baseHighlight
|
|
8562
|
+
});
|
|
8557
8563
|
return new StyledText(chunks);
|
|
8558
8564
|
} else {
|
|
8559
8565
|
const defaultStyle = syntaxStyle.mergeStyles("default");
|
|
@@ -8677,87 +8683,224 @@ class ProcessQueue {
|
|
|
8677
8683
|
}
|
|
8678
8684
|
}
|
|
8679
8685
|
|
|
8680
|
-
// src/
|
|
8681
|
-
import {
|
|
8686
|
+
// src/platform/runtime.ts
|
|
8687
|
+
import { mkdir, writeFile as writeFileNode } from "fs/promises";
|
|
8688
|
+
import { dirname, isAbsolute, resolve } from "path";
|
|
8682
8689
|
import { fileURLToPath } from "url";
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8690
|
+
|
|
8691
|
+
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
8692
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
8693
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
8694
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
8695
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
8696
|
+
const pattern = `${osc}|${csi}`;
|
|
8697
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
8698
|
+
}
|
|
8699
|
+
|
|
8700
|
+
// ../../node_modules/.bun/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
8701
|
+
var regex = ansiRegex();
|
|
8702
|
+
function stripAnsi(string) {
|
|
8703
|
+
if (typeof string !== "string") {
|
|
8704
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
8705
|
+
}
|
|
8706
|
+
return string.replace(regex, "");
|
|
8707
|
+
}
|
|
8708
|
+
|
|
8709
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
8710
|
+
function isAmbiguous(x) {
|
|
8711
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
8712
|
+
}
|
|
8713
|
+
function isFullWidth(x) {
|
|
8714
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
8715
|
+
}
|
|
8716
|
+
function isWide(x) {
|
|
8717
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8720
|
+
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
8721
|
+
function validate(codePoint) {
|
|
8722
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
8723
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
8724
|
+
}
|
|
8725
|
+
}
|
|
8726
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
8727
|
+
validate(codePoint);
|
|
8728
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
8729
|
+
return 2;
|
|
8730
|
+
}
|
|
8731
|
+
return 1;
|
|
8732
|
+
}
|
|
8733
|
+
|
|
8734
|
+
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
8735
|
+
var emoji_regex_default = () => {
|
|
8736
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
8737
|
+
};
|
|
8738
|
+
|
|
8739
|
+
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
8740
|
+
var segmenter = new Intl.Segmenter;
|
|
8741
|
+
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
8742
|
+
function stringWidth(string, options = {}) {
|
|
8743
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
8744
|
+
return 0;
|
|
8745
|
+
}
|
|
8746
|
+
const {
|
|
8747
|
+
ambiguousIsNarrow = true,
|
|
8748
|
+
countAnsiEscapeCodes = false
|
|
8749
|
+
} = options;
|
|
8750
|
+
if (!countAnsiEscapeCodes) {
|
|
8751
|
+
string = stripAnsi(string);
|
|
8752
|
+
}
|
|
8753
|
+
if (string.length === 0) {
|
|
8754
|
+
return 0;
|
|
8755
|
+
}
|
|
8756
|
+
let width = 0;
|
|
8757
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
8758
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
8759
|
+
const codePoint = character.codePointAt(0);
|
|
8760
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
8761
|
+
continue;
|
|
8762
|
+
}
|
|
8763
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
8764
|
+
continue;
|
|
8765
|
+
}
|
|
8766
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
8767
|
+
continue;
|
|
8768
|
+
}
|
|
8769
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
8770
|
+
continue;
|
|
8771
|
+
}
|
|
8772
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
8773
|
+
continue;
|
|
8774
|
+
}
|
|
8775
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
8776
|
+
continue;
|
|
8777
|
+
}
|
|
8778
|
+
if (emoji_regex_default().test(character)) {
|
|
8779
|
+
width += 2;
|
|
8780
|
+
continue;
|
|
8781
|
+
}
|
|
8782
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
8783
|
+
}
|
|
8784
|
+
return width;
|
|
8785
|
+
}
|
|
8786
|
+
|
|
8787
|
+
// src/platform/runtime.ts
|
|
8788
|
+
var TEXT_ENCODER = new TextEncoder;
|
|
8789
|
+
var bun = globalThis.Bun;
|
|
8790
|
+
var sleep = bun?.sleep ?? standardSleep;
|
|
8791
|
+
var stringWidth2 = bun?.stringWidth ?? stringWidth;
|
|
8792
|
+
var stripANSI = bun?.stripANSI ?? stripAnsi;
|
|
8793
|
+
var writeFile = bun?.write ?? writeFilePortable;
|
|
8794
|
+
async function resolveBundledFilePath(loadBundledFile, fallbackPath, metaUrl) {
|
|
8795
|
+
if (!bun) {
|
|
8796
|
+
const path = typeof fallbackPath === "function" ? fallbackPath() : fallbackPath;
|
|
8797
|
+
return fileURLToPath(path instanceof URL ? path : new URL(path, metaUrl));
|
|
8798
|
+
}
|
|
8799
|
+
const loadedPath = (await loadBundledFile()).default;
|
|
8800
|
+
if (loadedPath.startsWith("file:")) {
|
|
8801
|
+
return fileURLToPath(loadedPath);
|
|
8802
|
+
}
|
|
8803
|
+
if (isAbsolute(loadedPath)) {
|
|
8804
|
+
return loadedPath;
|
|
8805
|
+
}
|
|
8806
|
+
return resolve(dirname(fileURLToPath(metaUrl)), loadedPath);
|
|
8807
|
+
}
|
|
8808
|
+
function standardSleep(msOrDate) {
|
|
8809
|
+
const ms = msOrDate instanceof Date ? msOrDate.getTime() - Date.now() : msOrDate;
|
|
8810
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
8811
|
+
}
|
|
8812
|
+
async function writeFilePortable(destination, data, options) {
|
|
8813
|
+
const destinationPath = destination instanceof URL ? fileURLToPath(destination) : destination;
|
|
8814
|
+
if (options?.createPath) {
|
|
8815
|
+
await mkdir(dirname(destinationPath), { recursive: true });
|
|
8816
|
+
}
|
|
8817
|
+
const bytes = typeof data === "string" ? TEXT_ENCODER.encode(data) : new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
8818
|
+
await writeFileNode(destinationPath, bytes, { mode: options?.mode });
|
|
8819
|
+
return bytes.byteLength;
|
|
8820
|
+
}
|
|
8821
|
+
|
|
8822
|
+
// src/lib/tree-sitter/default-parsers.ts
|
|
8694
8823
|
var _cachedParsers;
|
|
8695
8824
|
function getParsers() {
|
|
8696
8825
|
if (!_cachedParsers) {
|
|
8697
|
-
_cachedParsers =
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8826
|
+
_cachedParsers = loadParsers();
|
|
8827
|
+
}
|
|
8828
|
+
return _cachedParsers;
|
|
8829
|
+
}
|
|
8830
|
+
async function loadParsers() {
|
|
8831
|
+
const javascript_highlights = await resolveBundledFilePath(() => import("./assets/javascript/highlights.scm", { with: { type: "file" } }), "./assets/javascript/highlights.scm", import.meta.url);
|
|
8832
|
+
const javascript_language = await resolveBundledFilePath(() => import("./assets/javascript/tree-sitter-javascript.wasm", { with: { type: "file" } }), "./assets/javascript/tree-sitter-javascript.wasm", import.meta.url);
|
|
8833
|
+
const typescript_highlights = await resolveBundledFilePath(() => import("./assets/typescript/highlights.scm", { with: { type: "file" } }), "./assets/typescript/highlights.scm", import.meta.url);
|
|
8834
|
+
const typescript_language = await resolveBundledFilePath(() => import("./assets/typescript/tree-sitter-typescript.wasm", { with: { type: "file" } }), "./assets/typescript/tree-sitter-typescript.wasm", import.meta.url);
|
|
8835
|
+
const markdown_highlights = await resolveBundledFilePath(() => import("./assets/markdown/highlights.scm", { with: { type: "file" } }), "./assets/markdown/highlights.scm", import.meta.url);
|
|
8836
|
+
const markdown_language = await resolveBundledFilePath(() => import("./assets/markdown/tree-sitter-markdown.wasm", { with: { type: "file" } }), "./assets/markdown/tree-sitter-markdown.wasm", import.meta.url);
|
|
8837
|
+
const markdown_injections = await resolveBundledFilePath(() => import("./assets/markdown/injections.scm", { with: { type: "file" } }), "./assets/markdown/injections.scm", import.meta.url);
|
|
8838
|
+
const markdown_inline_highlights = await resolveBundledFilePath(() => import("./assets/markdown_inline/highlights.scm", { with: { type: "file" } }), "./assets/markdown_inline/highlights.scm", import.meta.url);
|
|
8839
|
+
const markdown_inline_language = await resolveBundledFilePath(() => import("./assets/markdown_inline/tree-sitter-markdown_inline.wasm", { with: { type: "file" } }), "./assets/markdown_inline/tree-sitter-markdown_inline.wasm", import.meta.url);
|
|
8840
|
+
const zig_highlights = await resolveBundledFilePath(() => import("./assets/zig/highlights.scm", { with: { type: "file" } }), "./assets/zig/highlights.scm", import.meta.url);
|
|
8841
|
+
const zig_language = await resolveBundledFilePath(() => import("./assets/zig/tree-sitter-zig.wasm", { with: { type: "file" } }), "./assets/zig/tree-sitter-zig.wasm", import.meta.url);
|
|
8842
|
+
return [
|
|
8843
|
+
{
|
|
8844
|
+
filetype: "javascript",
|
|
8845
|
+
aliases: ["javascriptreact"],
|
|
8846
|
+
queries: {
|
|
8847
|
+
highlights: [javascript_highlights]
|
|
8705
8848
|
},
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8849
|
+
wasm: javascript_language
|
|
8850
|
+
},
|
|
8851
|
+
{
|
|
8852
|
+
filetype: "typescript",
|
|
8853
|
+
aliases: ["typescriptreact"],
|
|
8854
|
+
queries: {
|
|
8855
|
+
highlights: [typescript_highlights]
|
|
8713
8856
|
},
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8857
|
+
wasm: typescript_language
|
|
8858
|
+
},
|
|
8859
|
+
{
|
|
8860
|
+
filetype: "markdown",
|
|
8861
|
+
queries: {
|
|
8862
|
+
highlights: [markdown_highlights],
|
|
8863
|
+
injections: [markdown_injections]
|
|
8864
|
+
},
|
|
8865
|
+
wasm: markdown_language,
|
|
8866
|
+
injectionMapping: {
|
|
8867
|
+
nodeTypes: {
|
|
8868
|
+
inline: "markdown_inline",
|
|
8869
|
+
pipe_table_cell: "markdown_inline"
|
|
8719
8870
|
},
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
typescript: "typescript",
|
|
8732
|
-
ts: "typescript",
|
|
8733
|
-
tsx: "typescriptreact",
|
|
8734
|
-
typescriptreact: "typescriptreact",
|
|
8735
|
-
markdown: "markdown",
|
|
8736
|
-
md: "markdown"
|
|
8737
|
-
}
|
|
8871
|
+
infoStringMap: {
|
|
8872
|
+
javascript: "javascript",
|
|
8873
|
+
js: "javascript",
|
|
8874
|
+
jsx: "javascriptreact",
|
|
8875
|
+
javascriptreact: "javascriptreact",
|
|
8876
|
+
typescript: "typescript",
|
|
8877
|
+
ts: "typescript",
|
|
8878
|
+
tsx: "typescriptreact",
|
|
8879
|
+
typescriptreact: "typescriptreact",
|
|
8880
|
+
markdown: "markdown",
|
|
8881
|
+
md: "markdown"
|
|
8738
8882
|
}
|
|
8883
|
+
}
|
|
8884
|
+
},
|
|
8885
|
+
{
|
|
8886
|
+
filetype: "markdown_inline",
|
|
8887
|
+
queries: {
|
|
8888
|
+
highlights: [markdown_inline_highlights]
|
|
8739
8889
|
},
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8890
|
+
wasm: markdown_inline_language
|
|
8891
|
+
},
|
|
8892
|
+
{
|
|
8893
|
+
filetype: "zig",
|
|
8894
|
+
queries: {
|
|
8895
|
+
highlights: [zig_highlights]
|
|
8746
8896
|
},
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
highlights: [resolve(dirname(fileURLToPath(import.meta.url)), zig_highlights)]
|
|
8751
|
-
},
|
|
8752
|
-
wasm: resolve(dirname(fileURLToPath(import.meta.url)), zig_language)
|
|
8753
|
-
}
|
|
8754
|
-
];
|
|
8755
|
-
}
|
|
8756
|
-
return _cachedParsers;
|
|
8897
|
+
wasm: zig_language
|
|
8898
|
+
}
|
|
8899
|
+
];
|
|
8757
8900
|
}
|
|
8758
8901
|
|
|
8759
8902
|
// src/lib/tree-sitter/client.ts
|
|
8760
|
-
import { resolve as resolve2, isAbsolute, parse } from "path";
|
|
8903
|
+
import { resolve as resolve2, isAbsolute as isAbsolute2, parse } from "path";
|
|
8761
8904
|
import { existsSync } from "fs";
|
|
8762
8905
|
|
|
8763
8906
|
// src/lib/bunfs.ts
|
|
@@ -8772,18 +8915,28 @@ function normalizeBunfsPath(fileName) {
|
|
|
8772
8915
|
return join(getBunfsRootPath(), basename(fileName));
|
|
8773
8916
|
}
|
|
8774
8917
|
|
|
8918
|
+
// src/platform/worker.ts
|
|
8919
|
+
var WORKER_UNAVAILABLE = "OpenTUI tree-sitter workers are not available for this runtime yet.";
|
|
8920
|
+
|
|
8921
|
+
class UnsupportedWorker {
|
|
8922
|
+
constructor() {
|
|
8923
|
+
throw new Error(WORKER_UNAVAILABLE);
|
|
8924
|
+
}
|
|
8925
|
+
}
|
|
8926
|
+
var Worker = globalThis.Worker ?? UnsupportedWorker;
|
|
8927
|
+
|
|
8775
8928
|
// src/lib/tree-sitter/client.ts
|
|
8776
8929
|
registerEnvVar({
|
|
8777
8930
|
name: "OTUI_TREE_SITTER_WORKER_PATH",
|
|
8778
|
-
description: "Path to the TreeSitter worker",
|
|
8931
|
+
description: "Path to the TreeSitter worker entry script",
|
|
8779
8932
|
type: "string",
|
|
8780
8933
|
default: ""
|
|
8781
8934
|
});
|
|
8782
|
-
var
|
|
8935
|
+
var DEFAULT_PARSER_OVERRIDES = [];
|
|
8783
8936
|
function addDefaultParsers(parsers) {
|
|
8784
8937
|
for (const parser of parsers) {
|
|
8785
|
-
|
|
8786
|
-
...
|
|
8938
|
+
DEFAULT_PARSER_OVERRIDES = [
|
|
8939
|
+
...DEFAULT_PARSER_OVERRIDES.filter((existingParser) => existingParser.filetype !== parser.filetype),
|
|
8787
8940
|
parser
|
|
8788
8941
|
];
|
|
8789
8942
|
}
|
|
@@ -8821,20 +8974,8 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8821
8974
|
if (this.worker) {
|
|
8822
8975
|
return;
|
|
8823
8976
|
}
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
worker_path = env.OTUI_TREE_SITTER_WORKER_PATH;
|
|
8827
|
-
} else if (typeof OTUI_TREE_SITTER_WORKER_PATH !== "undefined") {
|
|
8828
|
-
worker_path = OTUI_TREE_SITTER_WORKER_PATH;
|
|
8829
|
-
} else if (this.options.workerPath) {
|
|
8830
|
-
worker_path = this.options.workerPath;
|
|
8831
|
-
} else {
|
|
8832
|
-
worker_path = new URL("./parser.worker.js", import.meta.url).href;
|
|
8833
|
-
if (!existsSync(resolve2(import.meta.dirname, "parser.worker.js"))) {
|
|
8834
|
-
worker_path = new URL("./parser.worker.ts", import.meta.url).href;
|
|
8835
|
-
}
|
|
8836
|
-
}
|
|
8837
|
-
this.worker = new Worker(worker_path);
|
|
8977
|
+
const workerPath = this.resolveWorkerPath();
|
|
8978
|
+
this.worker = new Worker(workerPath);
|
|
8838
8979
|
this.worker.onmessage = this.handleWorkerMessage.bind(this);
|
|
8839
8980
|
this.worker.onerror = (error) => {
|
|
8840
8981
|
console.error("TreeSitter worker error:", error.message);
|
|
@@ -8846,6 +8987,22 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8846
8987
|
this.emitError(`Worker error: ${error.message}`);
|
|
8847
8988
|
};
|
|
8848
8989
|
}
|
|
8990
|
+
resolveWorkerPath() {
|
|
8991
|
+
if (env.OTUI_TREE_SITTER_WORKER_PATH) {
|
|
8992
|
+
return env.OTUI_TREE_SITTER_WORKER_PATH;
|
|
8993
|
+
}
|
|
8994
|
+
if (typeof OTUI_TREE_SITTER_WORKER_PATH !== "undefined") {
|
|
8995
|
+
return OTUI_TREE_SITTER_WORKER_PATH;
|
|
8996
|
+
}
|
|
8997
|
+
if (this.options.workerPath) {
|
|
8998
|
+
return this.options.workerPath;
|
|
8999
|
+
}
|
|
9000
|
+
let workerPath = new URL("./parser.worker.js", import.meta.url).href;
|
|
9001
|
+
if (!existsSync(resolve2(import.meta.dirname, "parser.worker.js"))) {
|
|
9002
|
+
workerPath = new URL("./parser.worker.ts", import.meta.url).href;
|
|
9003
|
+
}
|
|
9004
|
+
return workerPath;
|
|
9005
|
+
}
|
|
8849
9006
|
stopWorker() {
|
|
8850
9007
|
if (!this.worker) {
|
|
8851
9008
|
return;
|
|
@@ -8857,6 +9014,7 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8857
9014
|
this.buffers.clear();
|
|
8858
9015
|
this.stopWorker();
|
|
8859
9016
|
this.startWorker();
|
|
9017
|
+
this.initialized = false;
|
|
8860
9018
|
this.initializePromise = undefined;
|
|
8861
9019
|
this.initializeResolvers = undefined;
|
|
8862
9020
|
return this.initialize();
|
|
@@ -8865,7 +9023,11 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8865
9023
|
if (this.initializePromise) {
|
|
8866
9024
|
return this.initializePromise;
|
|
8867
9025
|
}
|
|
8868
|
-
this.initializePromise =
|
|
9026
|
+
this.initializePromise = this.initializeClient();
|
|
9027
|
+
return this.initializePromise;
|
|
9028
|
+
}
|
|
9029
|
+
async initializeClient() {
|
|
9030
|
+
await new Promise((resolve3, reject) => {
|
|
8869
9031
|
const timeoutMs = this.options.initTimeout ?? 1e4;
|
|
8870
9032
|
const timeoutId = setTimeout(() => {
|
|
8871
9033
|
const error = new Error("Worker initialization timed out");
|
|
@@ -8879,12 +9041,16 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8879
9041
|
dataPath: this.options.dataPath
|
|
8880
9042
|
});
|
|
8881
9043
|
});
|
|
8882
|
-
await this.initializePromise;
|
|
8883
9044
|
await this.registerDefaultParsers();
|
|
8884
|
-
|
|
9045
|
+
this.initialized = true;
|
|
8885
9046
|
}
|
|
8886
9047
|
async registerDefaultParsers() {
|
|
8887
|
-
|
|
9048
|
+
const defaultParsers = await getParsers();
|
|
9049
|
+
const overriddenFiletypes = new Set(DEFAULT_PARSER_OVERRIDES.map((parser) => parser.filetype));
|
|
9050
|
+
for (const parser of [
|
|
9051
|
+
...defaultParsers.filter((parser2) => !overriddenFiletypes.has(parser2.filetype)),
|
|
9052
|
+
...DEFAULT_PARSER_OVERRIDES
|
|
9053
|
+
]) {
|
|
8888
9054
|
this.addFiletypeParser(parser);
|
|
8889
9055
|
}
|
|
8890
9056
|
}
|
|
@@ -8895,7 +9061,7 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8895
9061
|
if (isBunfsPath(path)) {
|
|
8896
9062
|
return normalizeBunfsPath(parse(path).base);
|
|
8897
9063
|
}
|
|
8898
|
-
if (!
|
|
9064
|
+
if (!isAbsolute2(path)) {
|
|
8899
9065
|
return resolve2(path);
|
|
8900
9066
|
}
|
|
8901
9067
|
return path;
|
|
@@ -8957,7 +9123,6 @@ class TreeSitterClient extends EventEmitter2 {
|
|
|
8957
9123
|
console.error("TreeSitter client initialization failed:", error);
|
|
8958
9124
|
this.initializeResolvers.reject(new Error(error));
|
|
8959
9125
|
} else {
|
|
8960
|
-
this.initialized = true;
|
|
8961
9126
|
this.initializeResolvers.resolve();
|
|
8962
9127
|
}
|
|
8963
9128
|
this.initializeResolvers = undefined;
|
|
@@ -9547,11 +9712,11 @@ function infoStringToFiletype(infoString) {
|
|
|
9547
9712
|
}
|
|
9548
9713
|
|
|
9549
9714
|
// src/lib/tree-sitter/assets/update.ts
|
|
9550
|
-
import { readFile as readFile2, writeFile as
|
|
9715
|
+
import { readFile as readFile2, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
|
|
9551
9716
|
import * as path4 from "path";
|
|
9552
9717
|
|
|
9553
9718
|
// src/lib/tree-sitter/download-utils.ts
|
|
9554
|
-
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
9719
|
+
import { mkdir as mkdir2, readFile, writeFile as writeFile2 } from "fs/promises";
|
|
9555
9720
|
import * as path3 from "path";
|
|
9556
9721
|
|
|
9557
9722
|
class DownloadUtils {
|
|
@@ -9575,7 +9740,7 @@ class DownloadUtils {
|
|
|
9575
9740
|
cacheFileName = path3.basename(source);
|
|
9576
9741
|
}
|
|
9577
9742
|
const cacheFile = path3.join(cacheDir, cacheSubdir, cacheFileName);
|
|
9578
|
-
await
|
|
9743
|
+
await mkdir2(path3.dirname(cacheFile), { recursive: true });
|
|
9579
9744
|
try {
|
|
9580
9745
|
const cachedContent = await readFile(cacheFile);
|
|
9581
9746
|
if (cachedContent.byteLength > 0) {
|
|
@@ -9591,7 +9756,7 @@ class DownloadUtils {
|
|
|
9591
9756
|
}
|
|
9592
9757
|
const content = Buffer.from(await response.arrayBuffer());
|
|
9593
9758
|
try {
|
|
9594
|
-
await
|
|
9759
|
+
await writeFile2(cacheFile, Buffer.from(content));
|
|
9595
9760
|
console.log(`Cached: ${source}`);
|
|
9596
9761
|
} catch (cacheError) {
|
|
9597
9762
|
console.warn(`Failed to cache: ${cacheError}`);
|
|
@@ -9612,7 +9777,7 @@ class DownloadUtils {
|
|
|
9612
9777
|
}
|
|
9613
9778
|
static async downloadToPath(source, targetPath) {
|
|
9614
9779
|
const isUrl2 = source.startsWith("http://") || source.startsWith("https://");
|
|
9615
|
-
await
|
|
9780
|
+
await mkdir2(path3.dirname(targetPath), { recursive: true });
|
|
9616
9781
|
if (isUrl2) {
|
|
9617
9782
|
try {
|
|
9618
9783
|
console.log(`Downloading from URL: ${source}`);
|
|
@@ -9621,7 +9786,7 @@ class DownloadUtils {
|
|
|
9621
9786
|
return { error: `Failed to fetch from ${source}: ${response.statusText}` };
|
|
9622
9787
|
}
|
|
9623
9788
|
const content = Buffer.from(await response.arrayBuffer());
|
|
9624
|
-
await
|
|
9789
|
+
await writeFile2(targetPath, Buffer.from(content));
|
|
9625
9790
|
console.log(`Downloaded: ${source} -> ${targetPath}`);
|
|
9626
9791
|
return { content, filePath: targetPath };
|
|
9627
9792
|
} catch (error) {
|
|
@@ -9631,7 +9796,7 @@ class DownloadUtils {
|
|
|
9631
9796
|
try {
|
|
9632
9797
|
console.log(`Copying from local path: ${source}`);
|
|
9633
9798
|
const content = await readFile(source);
|
|
9634
|
-
await
|
|
9799
|
+
await writeFile2(targetPath, Buffer.from(content));
|
|
9635
9800
|
return { content, filePath: targetPath };
|
|
9636
9801
|
} catch (error) {
|
|
9637
9802
|
return { error: `Error copying from local path ${source}: ${error}` };
|
|
@@ -9743,19 +9908,27 @@ ${content}`);
|
|
|
9743
9908
|
const combinedContent = queryContents.join(`
|
|
9744
9909
|
|
|
9745
9910
|
`);
|
|
9746
|
-
await
|
|
9911
|
+
await writeFile3(queryPath, combinedContent, "utf-8");
|
|
9747
9912
|
console.log(` Combined ${queryContents.length} queries into ${queryPath}`);
|
|
9748
9913
|
return "./" + path4.relative(path4.dirname(outputPath), queryPath);
|
|
9749
9914
|
}
|
|
9750
9915
|
async function generateDefaultParsersFile(parsers, outputPath) {
|
|
9751
|
-
const
|
|
9916
|
+
const assetPaths = parsers.map((parser) => {
|
|
9752
9917
|
const safeFiletype = parser.filetype.replace(/[^a-zA-Z0-9]/g, "_");
|
|
9753
9918
|
const lines = [
|
|
9754
|
-
`
|
|
9755
|
-
`
|
|
9919
|
+
`const ${safeFiletype}_highlights = await resolveBundledFilePath(`,
|
|
9920
|
+
` () => import("${parser.highlightsPath}" as string, { with: { type: "file" } }),`,
|
|
9921
|
+
` "${parser.highlightsPath}",`,
|
|
9922
|
+
` import.meta.url,`,
|
|
9923
|
+
`)`,
|
|
9924
|
+
`const ${safeFiletype}_language = await resolveBundledFilePath(`,
|
|
9925
|
+
` () => import("${parser.languagePath}" as string, { with: { type: "file" } }),`,
|
|
9926
|
+
` "${parser.languagePath}",`,
|
|
9927
|
+
` import.meta.url,`,
|
|
9928
|
+
`)`
|
|
9756
9929
|
];
|
|
9757
9930
|
if (parser.injectionsPath) {
|
|
9758
|
-
lines.push(`
|
|
9931
|
+
lines.push(`const ${safeFiletype}_injections = await resolveBundledFilePath(`, ` () => import("${parser.injectionsPath}" as string, { with: { type: "file" } }),`, ` "${parser.injectionsPath}",`, ` import.meta.url,`, `)`);
|
|
9759
9932
|
}
|
|
9760
9933
|
return lines.join(`
|
|
9761
9934
|
`);
|
|
@@ -9763,11 +9936,9 @@ async function generateDefaultParsersFile(parsers, outputPath) {
|
|
|
9763
9936
|
`);
|
|
9764
9937
|
const parserDefinitions = parsers.map((parser) => {
|
|
9765
9938
|
const safeFiletype = parser.filetype.replace(/[^a-zA-Z0-9]/g, "_");
|
|
9766
|
-
const queriesLines = [
|
|
9767
|
-
` highlights: [resolve(dirname(fileURLToPath(import.meta.url)), ${safeFiletype}_highlights)],`
|
|
9768
|
-
];
|
|
9939
|
+
const queriesLines = [` highlights: [${safeFiletype}_highlights],`];
|
|
9769
9940
|
if (parser.injectionsPath) {
|
|
9770
|
-
queriesLines.push(` injections: [
|
|
9941
|
+
queriesLines.push(` injections: [${safeFiletype}_injections],`);
|
|
9771
9942
|
}
|
|
9772
9943
|
const injectionMappingLine = parser.injectionMapping ? ` injectionMapping: ${JSON.stringify(parser.injectionMapping, null, 10)},` : "";
|
|
9773
9944
|
const aliasesLine = parser.aliases?.length ? ` aliases: ${JSON.stringify(parser.aliases)},` : "";
|
|
@@ -9778,7 +9949,7 @@ ${aliasesLine ? aliasesLine + `
|
|
|
9778
9949
|
${queriesLines.join(`
|
|
9779
9950
|
`)}
|
|
9780
9951
|
},
|
|
9781
|
-
wasm:
|
|
9952
|
+
wasm: ${safeFiletype}_language,${injectionMappingLine ? `
|
|
9782
9953
|
` + injectionMappingLine : ""}
|
|
9783
9954
|
}`;
|
|
9784
9955
|
}).join(`,
|
|
@@ -9787,26 +9958,29 @@ ${queriesLines.join(`
|
|
|
9787
9958
|
// Run 'bun assets/update.ts' to regenerate this file
|
|
9788
9959
|
// Last generated: ${new Date().toISOString()}
|
|
9789
9960
|
|
|
9790
|
-
import type { FiletypeParserOptions } from "./types"
|
|
9791
|
-
import {
|
|
9792
|
-
import { fileURLToPath } from "url"
|
|
9793
|
-
|
|
9794
|
-
${imports}
|
|
9961
|
+
import type { FiletypeParserOptions } from "./types.js"
|
|
9962
|
+
import { resolveBundledFilePath } from "../../platform/runtime.js"
|
|
9795
9963
|
|
|
9796
9964
|
// Cached parsers to avoid re-resolving paths on every call
|
|
9797
|
-
let _cachedParsers: FiletypeParserOptions[] | undefined
|
|
9965
|
+
let _cachedParsers: Promise<FiletypeParserOptions[]> | undefined
|
|
9798
9966
|
|
|
9799
|
-
export function getParsers(): FiletypeParserOptions[] {
|
|
9967
|
+
export function getParsers(): Promise<FiletypeParserOptions[]> {
|
|
9800
9968
|
if (!_cachedParsers) {
|
|
9801
|
-
_cachedParsers =
|
|
9802
|
-
${parserDefinitions},
|
|
9803
|
-
]
|
|
9969
|
+
_cachedParsers = loadParsers()
|
|
9804
9970
|
}
|
|
9805
9971
|
return _cachedParsers
|
|
9806
9972
|
}
|
|
9973
|
+
|
|
9974
|
+
async function loadParsers(): Promise<FiletypeParserOptions[]> {
|
|
9975
|
+
${assetPaths}
|
|
9976
|
+
|
|
9977
|
+
return [
|
|
9978
|
+
${parserDefinitions},
|
|
9979
|
+
]
|
|
9980
|
+
}
|
|
9807
9981
|
`;
|
|
9808
|
-
await
|
|
9809
|
-
await
|
|
9982
|
+
await mkdir3(path4.dirname(outputPath), { recursive: true });
|
|
9983
|
+
await writeFile3(outputPath, fileContent, "utf-8");
|
|
9810
9984
|
console.log(`Generated ${path4.basename(outputPath)} with ${parsers.length} parsers`);
|
|
9811
9985
|
}
|
|
9812
9986
|
async function main(options) {
|
|
@@ -9865,128 +10039,6 @@ function getTreeSitterClient() {
|
|
|
9865
10039
|
});
|
|
9866
10040
|
}
|
|
9867
10041
|
|
|
9868
|
-
// src/platform/runtime.ts
|
|
9869
|
-
import { mkdir as mkdir3, writeFile as writeFileNode } from "fs/promises";
|
|
9870
|
-
import { dirname as dirname4 } from "path";
|
|
9871
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
9872
|
-
|
|
9873
|
-
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
9874
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
9875
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
9876
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
9877
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
9878
|
-
const pattern = `${osc}|${csi}`;
|
|
9879
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
9880
|
-
}
|
|
9881
|
-
|
|
9882
|
-
// ../../node_modules/.bun/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
|
|
9883
|
-
var regex = ansiRegex();
|
|
9884
|
-
function stripAnsi(string) {
|
|
9885
|
-
if (typeof string !== "string") {
|
|
9886
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
9887
|
-
}
|
|
9888
|
-
return string.replace(regex, "");
|
|
9889
|
-
}
|
|
9890
|
-
|
|
9891
|
-
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
9892
|
-
function isAmbiguous(x) {
|
|
9893
|
-
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
9894
|
-
}
|
|
9895
|
-
function isFullWidth(x) {
|
|
9896
|
-
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
9897
|
-
}
|
|
9898
|
-
function isWide(x) {
|
|
9899
|
-
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
9900
|
-
}
|
|
9901
|
-
|
|
9902
|
-
// ../../node_modules/.bun/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
9903
|
-
function validate(codePoint) {
|
|
9904
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
9905
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
9906
|
-
}
|
|
9907
|
-
}
|
|
9908
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
9909
|
-
validate(codePoint);
|
|
9910
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
9911
|
-
return 2;
|
|
9912
|
-
}
|
|
9913
|
-
return 1;
|
|
9914
|
-
}
|
|
9915
|
-
|
|
9916
|
-
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
9917
|
-
var emoji_regex_default = () => {
|
|
9918
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
9919
|
-
};
|
|
9920
|
-
|
|
9921
|
-
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
9922
|
-
var segmenter = new Intl.Segmenter;
|
|
9923
|
-
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
9924
|
-
function stringWidth(string, options = {}) {
|
|
9925
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
9926
|
-
return 0;
|
|
9927
|
-
}
|
|
9928
|
-
const {
|
|
9929
|
-
ambiguousIsNarrow = true,
|
|
9930
|
-
countAnsiEscapeCodes = false
|
|
9931
|
-
} = options;
|
|
9932
|
-
if (!countAnsiEscapeCodes) {
|
|
9933
|
-
string = stripAnsi(string);
|
|
9934
|
-
}
|
|
9935
|
-
if (string.length === 0) {
|
|
9936
|
-
return 0;
|
|
9937
|
-
}
|
|
9938
|
-
let width = 0;
|
|
9939
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
9940
|
-
for (const { segment: character } of segmenter.segment(string)) {
|
|
9941
|
-
const codePoint = character.codePointAt(0);
|
|
9942
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
9943
|
-
continue;
|
|
9944
|
-
}
|
|
9945
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
9946
|
-
continue;
|
|
9947
|
-
}
|
|
9948
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
9949
|
-
continue;
|
|
9950
|
-
}
|
|
9951
|
-
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
9952
|
-
continue;
|
|
9953
|
-
}
|
|
9954
|
-
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
9955
|
-
continue;
|
|
9956
|
-
}
|
|
9957
|
-
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
9958
|
-
continue;
|
|
9959
|
-
}
|
|
9960
|
-
if (emoji_regex_default().test(character)) {
|
|
9961
|
-
width += 2;
|
|
9962
|
-
continue;
|
|
9963
|
-
}
|
|
9964
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
9965
|
-
}
|
|
9966
|
-
return width;
|
|
9967
|
-
}
|
|
9968
|
-
|
|
9969
|
-
// src/platform/runtime.ts
|
|
9970
|
-
var TEXT_ENCODER = new TextEncoder;
|
|
9971
|
-
var bun = globalThis.Bun;
|
|
9972
|
-
var sleep = bun?.sleep ?? standardSleep;
|
|
9973
|
-
var stringWidth2 = bun?.stringWidth ?? stringWidth;
|
|
9974
|
-
var stripANSI = bun?.stripANSI ?? stripAnsi;
|
|
9975
|
-
var writeFile3 = bun?.write ?? writeFilePortable;
|
|
9976
|
-
function standardSleep(msOrDate) {
|
|
9977
|
-
const ms = msOrDate instanceof Date ? msOrDate.getTime() - Date.now() : msOrDate;
|
|
9978
|
-
return new Promise((resolve4) => setTimeout(resolve4, ms));
|
|
9979
|
-
}
|
|
9980
|
-
async function writeFilePortable(destination, data, options) {
|
|
9981
|
-
const destinationPath = destination instanceof URL ? fileURLToPath2(destination) : destination;
|
|
9982
|
-
if (options?.createPath) {
|
|
9983
|
-
await mkdir3(dirname4(destinationPath), { recursive: true });
|
|
9984
|
-
}
|
|
9985
|
-
const bytes = typeof data === "string" ? TEXT_ENCODER.encode(data) : new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
9986
|
-
await writeFileNode(destinationPath, bytes, { mode: options?.mode });
|
|
9987
|
-
return bytes.byteLength;
|
|
9988
|
-
}
|
|
9989
|
-
|
|
9990
10042
|
// src/lib/extmarks-history.ts
|
|
9991
10043
|
class ExtmarksHistory {
|
|
9992
10044
|
undoStack = [];
|
|
@@ -11064,7 +11116,8 @@ function detectLinks(chunks, context) {
|
|
|
11064
11116
|
return chunks;
|
|
11065
11117
|
}
|
|
11066
11118
|
// src/platform/ffi.ts
|
|
11067
|
-
import {
|
|
11119
|
+
import { createRequire } from "module";
|
|
11120
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
11068
11121
|
var FFIType = {
|
|
11069
11122
|
char: "char",
|
|
11070
11123
|
int8_t: "int8_t",
|
|
@@ -11129,16 +11182,14 @@ function createUnsupportedBackend(cause) {
|
|
|
11129
11182
|
};
|
|
11130
11183
|
}
|
|
11131
11184
|
var isBun = typeof process !== "undefined" && typeof process.versions === "object" && process.versions !== null && typeof process.versions.bun === "string";
|
|
11132
|
-
var
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
}
|
|
11136
|
-
async function loadBackend() {
|
|
11185
|
+
var requireModule = createRequire(import.meta.url);
|
|
11186
|
+
var backend = loadBackend();
|
|
11187
|
+
function loadBackend() {
|
|
11137
11188
|
if (isBun) {
|
|
11138
|
-
return createBunBackend(
|
|
11189
|
+
return createBunBackend(requireModule("bun:ffi"));
|
|
11139
11190
|
}
|
|
11140
11191
|
try {
|
|
11141
|
-
const nodeFfi =
|
|
11192
|
+
const nodeFfi = requireModule("node:ffi");
|
|
11142
11193
|
return createNodeBackend(nodeFfi.default ?? nodeFfi);
|
|
11143
11194
|
} catch (error) {
|
|
11144
11195
|
return createUnsupportedBackend(error);
|
|
@@ -11317,7 +11368,7 @@ function createNodeBackend(nodeFfi) {
|
|
|
11317
11368
|
};
|
|
11318
11369
|
}
|
|
11319
11370
|
function toNodeLibraryPath(path5) {
|
|
11320
|
-
return path5 instanceof URL ?
|
|
11371
|
+
return path5 instanceof URL ? fileURLToPath2(path5) : path5;
|
|
11321
11372
|
}
|
|
11322
11373
|
function normalizeNodeDefinitions(definitions) {
|
|
11323
11374
|
return Object.fromEntries(Object.entries(definitions).map(([name, definition]) => [name, normalizeNodeDefinition(definition)]));
|
|
@@ -11396,7 +11447,13 @@ function unsupportedNodeFFIType(type) {
|
|
|
11396
11447
|
throw new Error(`Unsupported FFIType for node:ffi: ${String(type)}`);
|
|
11397
11448
|
}
|
|
11398
11449
|
function toBigIntPointer(pointer) {
|
|
11399
|
-
|
|
11450
|
+
if (typeof pointer === "bigint") {
|
|
11451
|
+
if (pointer < 0n) {
|
|
11452
|
+
throw new Error(POINTER_NEGATIVE);
|
|
11453
|
+
}
|
|
11454
|
+
return pointer;
|
|
11455
|
+
}
|
|
11456
|
+
return toSafeBigIntPointer(pointer);
|
|
11400
11457
|
}
|
|
11401
11458
|
var dlopen = backend.dlopen;
|
|
11402
11459
|
var ptr = backend.ptr;
|
|
@@ -11728,17 +11785,17 @@ var FFI_LOAD_ERROR = "bun-ffi-structs requires Bun or Node.js with node:ffi enab
|
|
|
11728
11785
|
var backend2 = await loadBackend2();
|
|
11729
11786
|
async function loadBackend2() {
|
|
11730
11787
|
if (typeof process !== "undefined" && "bun" in process.versions) {
|
|
11731
|
-
return createBunBackend2(await
|
|
11788
|
+
return createBunBackend2(await importModule("bun:ffi"));
|
|
11732
11789
|
}
|
|
11733
11790
|
try {
|
|
11734
|
-
return createNodeBackend2(await
|
|
11791
|
+
return createNodeBackend2(await importModule("node:ffi"));
|
|
11735
11792
|
} catch (error) {
|
|
11736
11793
|
throw new Error(FFI_LOAD_ERROR, {
|
|
11737
11794
|
cause: error instanceof Error ? error : undefined
|
|
11738
11795
|
});
|
|
11739
11796
|
}
|
|
11740
11797
|
}
|
|
11741
|
-
function
|
|
11798
|
+
function importModule(specifier) {
|
|
11742
11799
|
return import(specifier).then((module) => module.default ?? module);
|
|
11743
11800
|
}
|
|
11744
11801
|
function createBunBackend2(bun2) {
|
|
@@ -12514,6 +12571,7 @@ var TerminalCapabilitiesStruct = defineStruct([
|
|
|
12514
12571
|
["bracketed_paste", "bool_u8"],
|
|
12515
12572
|
["hyperlinks", "bool_u8"],
|
|
12516
12573
|
["osc52", "bool_u8"],
|
|
12574
|
+
["notifications", "bool_u8"],
|
|
12517
12575
|
["explicit_cursor_positioning", "bool_u8"],
|
|
12518
12576
|
["in_tmux", "bool_u8"],
|
|
12519
12577
|
["term_name", "char*"],
|
|
@@ -12620,10 +12678,45 @@ var ReserveInfoStruct = defineStruct([
|
|
|
12620
12678
|
len: value.len
|
|
12621
12679
|
})
|
|
12622
12680
|
});
|
|
12681
|
+
var AudioCreateOptionsStruct = defineStruct([
|
|
12682
|
+
["sampleRate", "u32", { default: 48000 }],
|
|
12683
|
+
["playbackChannels", "u32", { default: 2 }]
|
|
12684
|
+
]);
|
|
12685
|
+
var AudioStartOptionsStruct = defineStruct([
|
|
12686
|
+
["periodSizeInFrames", "u32", { default: 0 }],
|
|
12687
|
+
["periodSizeInMilliseconds", "u32", { default: 0 }],
|
|
12688
|
+
["periods", "u32", { default: 0 }],
|
|
12689
|
+
["performanceProfile", "u8", { default: 0 }],
|
|
12690
|
+
["shareMode", "u8", { default: 0 }],
|
|
12691
|
+
["noPreSilencedOutputBuffer", "bool_u8", { default: false }],
|
|
12692
|
+
["noClip", "bool_u8", { default: false }],
|
|
12693
|
+
["noDisableDenormals", "bool_u8", { default: false }],
|
|
12694
|
+
["noFixedSizedCallback", "bool_u8", { default: false }],
|
|
12695
|
+
["wasapiNoAutoConvertSrc", "bool_u8", { default: false }],
|
|
12696
|
+
["wasapiNoDefaultQualitySrc", "bool_u8", { default: false }],
|
|
12697
|
+
["alsaNoMMap", "bool_u8", { default: false }],
|
|
12698
|
+
["alsaNoAutoFormat", "bool_u8", { default: false }],
|
|
12699
|
+
["alsaNoAutoChannels", "bool_u8", { default: false }],
|
|
12700
|
+
["alsaNoAutoResample", "bool_u8", { default: false }]
|
|
12701
|
+
]);
|
|
12702
|
+
var AudioVoiceOptionsStruct = defineStruct([
|
|
12703
|
+
["volume", "f32", { default: 1 }],
|
|
12704
|
+
["pan", "f32", { default: 0 }],
|
|
12705
|
+
["loop", "bool_u8", { default: false }],
|
|
12706
|
+
["groupId", "u32", { default: 0 }]
|
|
12707
|
+
]);
|
|
12708
|
+
var AudioStatsStruct = defineStruct([
|
|
12709
|
+
["soundsLoaded", "u32"],
|
|
12710
|
+
["voicesActive", "u32"],
|
|
12711
|
+
["framesMixed", "u64"],
|
|
12712
|
+
["lockMisses", "u32"],
|
|
12713
|
+
["lastPeak", "f32"],
|
|
12714
|
+
["lastRms", "f32"]
|
|
12715
|
+
]);
|
|
12623
12716
|
|
|
12624
12717
|
// src/zig.ts
|
|
12625
|
-
var
|
|
12626
|
-
var targetLibPath =
|
|
12718
|
+
var nativePackage = await import(`@opentui/core-${process.platform}-${process.arch}`);
|
|
12719
|
+
var targetLibPath = nativePackage.default;
|
|
12627
12720
|
if (isBunfsPath(targetLibPath)) {
|
|
12628
12721
|
targetLibPath = targetLibPath.replace("../", "");
|
|
12629
12722
|
}
|
|
@@ -12924,6 +13017,10 @@ function getOpenTUILib(libPath) {
|
|
|
12924
13017
|
args: ["ptr", "u8"],
|
|
12925
13018
|
returns: "bool"
|
|
12926
13019
|
},
|
|
13020
|
+
triggerNotification: {
|
|
13021
|
+
args: ["ptr", "ptr", "usize", "ptr", "usize"],
|
|
13022
|
+
returns: "bool"
|
|
13023
|
+
},
|
|
12927
13024
|
bufferDrawSuperSampleBuffer: {
|
|
12928
13025
|
args: ["ptr", "u32", "u32", "ptr", "usize", "u8", "u32"],
|
|
12929
13026
|
returns: "void"
|
|
@@ -13648,6 +13745,98 @@ function getOpenTUILib(libPath) {
|
|
|
13648
13745
|
args: ["ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
|
|
13649
13746
|
returns: "void"
|
|
13650
13747
|
},
|
|
13748
|
+
createAudioEngine: {
|
|
13749
|
+
args: ["ptr"],
|
|
13750
|
+
returns: "ptr"
|
|
13751
|
+
},
|
|
13752
|
+
destroyAudioEngine: {
|
|
13753
|
+
args: ["ptr"],
|
|
13754
|
+
returns: "void"
|
|
13755
|
+
},
|
|
13756
|
+
audioRefreshPlaybackDevices: {
|
|
13757
|
+
args: ["ptr"],
|
|
13758
|
+
returns: "i32"
|
|
13759
|
+
},
|
|
13760
|
+
audioGetPlaybackDeviceCount: {
|
|
13761
|
+
args: ["ptr"],
|
|
13762
|
+
returns: "u32"
|
|
13763
|
+
},
|
|
13764
|
+
audioGetPlaybackDeviceName: {
|
|
13765
|
+
args: ["ptr", "u32", "ptr", "usize"],
|
|
13766
|
+
returns: "usize"
|
|
13767
|
+
},
|
|
13768
|
+
audioIsPlaybackDeviceDefault: {
|
|
13769
|
+
args: ["ptr", "u32"],
|
|
13770
|
+
returns: "bool"
|
|
13771
|
+
},
|
|
13772
|
+
audioSelectPlaybackDevice: {
|
|
13773
|
+
args: ["ptr", "u32"],
|
|
13774
|
+
returns: "i32"
|
|
13775
|
+
},
|
|
13776
|
+
audioClearPlaybackDeviceSelection: {
|
|
13777
|
+
args: ["ptr"],
|
|
13778
|
+
returns: "void"
|
|
13779
|
+
},
|
|
13780
|
+
audioStart: {
|
|
13781
|
+
args: ["ptr", "ptr"],
|
|
13782
|
+
returns: "i32"
|
|
13783
|
+
},
|
|
13784
|
+
audioStartMixer: {
|
|
13785
|
+
args: ["ptr"],
|
|
13786
|
+
returns: "i32"
|
|
13787
|
+
},
|
|
13788
|
+
audioStop: {
|
|
13789
|
+
args: ["ptr"],
|
|
13790
|
+
returns: "i32"
|
|
13791
|
+
},
|
|
13792
|
+
audioLoad: {
|
|
13793
|
+
args: ["ptr", "ptr", "u64", "ptr"],
|
|
13794
|
+
returns: "i32"
|
|
13795
|
+
},
|
|
13796
|
+
audioUnload: {
|
|
13797
|
+
args: ["ptr", "u32"],
|
|
13798
|
+
returns: "i32"
|
|
13799
|
+
},
|
|
13800
|
+
audioPlay: {
|
|
13801
|
+
args: ["ptr", "u32", "ptr", "ptr"],
|
|
13802
|
+
returns: "i32"
|
|
13803
|
+
},
|
|
13804
|
+
audioStopVoice: {
|
|
13805
|
+
args: ["ptr", "u32"],
|
|
13806
|
+
returns: "i32"
|
|
13807
|
+
},
|
|
13808
|
+
audioSetVoiceGroup: {
|
|
13809
|
+
args: ["ptr", "u32", "u32"],
|
|
13810
|
+
returns: "i32"
|
|
13811
|
+
},
|
|
13812
|
+
audioCreateGroup: {
|
|
13813
|
+
args: ["ptr", "ptr", "u64", "ptr"],
|
|
13814
|
+
returns: "i32"
|
|
13815
|
+
},
|
|
13816
|
+
audioSetGroupVolume: {
|
|
13817
|
+
args: ["ptr", "u32", "f32"],
|
|
13818
|
+
returns: "i32"
|
|
13819
|
+
},
|
|
13820
|
+
audioSetMasterVolume: {
|
|
13821
|
+
args: ["ptr", "f32"],
|
|
13822
|
+
returns: "i32"
|
|
13823
|
+
},
|
|
13824
|
+
audioMixToBuffer: {
|
|
13825
|
+
args: ["ptr", "ptr", "u32", "u8"],
|
|
13826
|
+
returns: "i32"
|
|
13827
|
+
},
|
|
13828
|
+
audioEnableTap: {
|
|
13829
|
+
args: ["ptr", "bool", "u32"],
|
|
13830
|
+
returns: "i32"
|
|
13831
|
+
},
|
|
13832
|
+
audioReadTap: {
|
|
13833
|
+
args: ["ptr", "ptr", "u32", "u8", "ptr"],
|
|
13834
|
+
returns: "i32"
|
|
13835
|
+
},
|
|
13836
|
+
audioGetStats: {
|
|
13837
|
+
args: ["ptr", "ptr"],
|
|
13838
|
+
returns: "i32"
|
|
13839
|
+
},
|
|
13651
13840
|
createNativeSpanFeed: {
|
|
13652
13841
|
args: ["ptr"],
|
|
13653
13842
|
returns: "ptr"
|
|
@@ -13828,7 +14017,7 @@ function convertToDebugSymbols(symbols) {
|
|
|
13828
14017
|
const now = new Date;
|
|
13829
14018
|
const timestamp = now.toISOString().replace(/[:.]/g, "-").replace(/T/, "_").split("Z")[0];
|
|
13830
14019
|
const traceFilePath = `ffi_otui_trace_${timestamp}.log`;
|
|
13831
|
-
|
|
14020
|
+
writeFile(traceFilePath, output).catch((error) => {
|
|
13832
14021
|
console.error("Failed to write FFI trace file:", error);
|
|
13833
14022
|
});
|
|
13834
14023
|
} catch (e) {
|
|
@@ -14249,6 +14438,11 @@ class FFIRenderLib {
|
|
|
14249
14438
|
clearClipboardOSC52(renderer, target) {
|
|
14250
14439
|
return this.opentui.symbols.clearClipboardOSC52(renderer, target);
|
|
14251
14440
|
}
|
|
14441
|
+
triggerNotification(renderer, message, title) {
|
|
14442
|
+
const messageBytes = this.encoder.encode(message);
|
|
14443
|
+
const titleBytes = title === undefined ? null : this.encoder.encode(title);
|
|
14444
|
+
return this.opentui.symbols.triggerNotification(renderer, messageBytes, messageBytes.length, titleBytes, titleBytes?.length ?? 0);
|
|
14445
|
+
}
|
|
14252
14446
|
addToHitGrid(renderer, x, y, width, height, id) {
|
|
14253
14447
|
this.opentui.symbols.addToHitGrid(renderer, x, y, width, height, id);
|
|
14254
14448
|
}
|
|
@@ -15036,6 +15230,7 @@ class FFIRenderLib {
|
|
|
15036
15230
|
bracketed_paste: caps.bracketed_paste,
|
|
15037
15231
|
hyperlinks: caps.hyperlinks,
|
|
15038
15232
|
osc52: caps.osc52,
|
|
15233
|
+
notifications: caps.notifications,
|
|
15039
15234
|
explicit_cursor_positioning: caps.explicit_cursor_positioning,
|
|
15040
15235
|
in_tmux: caps.in_tmux,
|
|
15041
15236
|
terminal: {
|
|
@@ -15060,7 +15255,7 @@ class FFIRenderLib {
|
|
|
15060
15255
|
}
|
|
15061
15256
|
const outPtrView = new BigUint64Array(outPtrBuffer);
|
|
15062
15257
|
const outLenView = new BigUint64Array(outLenBuffer);
|
|
15063
|
-
const resultPtr =
|
|
15258
|
+
const resultPtr = toPointer(outPtrView[0]);
|
|
15064
15259
|
const resultLen = Number(outLenView[0]);
|
|
15065
15260
|
if (resultLen === 0) {
|
|
15066
15261
|
return { ptr: resultPtr, data: [] };
|
|
@@ -15076,6 +15271,120 @@ class FFIRenderLib {
|
|
|
15076
15271
|
bufferDrawChar(buffer, char, x, y, fg2, bg2, attributes = 0) {
|
|
15077
15272
|
this.opentui.symbols.bufferDrawChar(buffer, char, x, y, rgbaPtr(fg2), rgbaPtr(bg2), attributes);
|
|
15078
15273
|
}
|
|
15274
|
+
createAudioEngine(options) {
|
|
15275
|
+
const optionsBuffer = options == null ? null : AudioCreateOptionsStruct.pack(options);
|
|
15276
|
+
const enginePtr = this.opentui.symbols.createAudioEngine(optionsBuffer ? ptr(optionsBuffer) : null);
|
|
15277
|
+
return enginePtr ? toPointer(enginePtr) : null;
|
|
15278
|
+
}
|
|
15279
|
+
destroyAudioEngine(engine) {
|
|
15280
|
+
this.opentui.symbols.destroyAudioEngine(engine);
|
|
15281
|
+
}
|
|
15282
|
+
audioRefreshPlaybackDevices(engine) {
|
|
15283
|
+
return this.opentui.symbols.audioRefreshPlaybackDevices(engine);
|
|
15284
|
+
}
|
|
15285
|
+
audioGetPlaybackDeviceCount(engine) {
|
|
15286
|
+
return this.opentui.symbols.audioGetPlaybackDeviceCount(engine);
|
|
15287
|
+
}
|
|
15288
|
+
audioGetPlaybackDeviceName(engine, index) {
|
|
15289
|
+
const outBuffer = new Uint8Array(512);
|
|
15290
|
+
const bytesWritten = toNumber(this.opentui.symbols.audioGetPlaybackDeviceName(engine, index, ptr(outBuffer), outBuffer.length));
|
|
15291
|
+
const safeBytesWritten = Math.max(0, Math.min(outBuffer.length, bytesWritten));
|
|
15292
|
+
return this.decoder.decode(outBuffer.subarray(0, safeBytesWritten));
|
|
15293
|
+
}
|
|
15294
|
+
audioIsPlaybackDeviceDefault(engine, index) {
|
|
15295
|
+
return this.opentui.symbols.audioIsPlaybackDeviceDefault(engine, index);
|
|
15296
|
+
}
|
|
15297
|
+
audioSelectPlaybackDevice(engine, index) {
|
|
15298
|
+
return this.opentui.symbols.audioSelectPlaybackDevice(engine, index);
|
|
15299
|
+
}
|
|
15300
|
+
audioClearPlaybackDeviceSelection(engine) {
|
|
15301
|
+
this.opentui.symbols.audioClearPlaybackDeviceSelection(engine);
|
|
15302
|
+
}
|
|
15303
|
+
audioStart(engine, options) {
|
|
15304
|
+
const optionsBuffer = options == null ? null : AudioStartOptionsStruct.pack(options);
|
|
15305
|
+
return this.opentui.symbols.audioStart(engine, optionsBuffer ? ptr(optionsBuffer) : null);
|
|
15306
|
+
}
|
|
15307
|
+
audioStartMixer(engine) {
|
|
15308
|
+
return this.opentui.symbols.audioStartMixer(engine);
|
|
15309
|
+
}
|
|
15310
|
+
audioStop(engine) {
|
|
15311
|
+
return this.opentui.symbols.audioStop(engine);
|
|
15312
|
+
}
|
|
15313
|
+
audioLoad(engine, data) {
|
|
15314
|
+
const outBuffer = new ArrayBuffer(4);
|
|
15315
|
+
const status = this.opentui.symbols.audioLoad(engine, ptr(data), data.length, ptr(outBuffer));
|
|
15316
|
+
if (status !== 0) {
|
|
15317
|
+
return { status, soundId: null };
|
|
15318
|
+
}
|
|
15319
|
+
const view = new Uint32Array(outBuffer);
|
|
15320
|
+
return { status, soundId: view[0] };
|
|
15321
|
+
}
|
|
15322
|
+
audioUnload(engine, soundId) {
|
|
15323
|
+
return this.opentui.symbols.audioUnload(engine, soundId);
|
|
15324
|
+
}
|
|
15325
|
+
audioPlay(engine, soundId, options) {
|
|
15326
|
+
const outBuffer = new ArrayBuffer(4);
|
|
15327
|
+
const optionsBuffer = options ? AudioVoiceOptionsStruct.pack(options) : null;
|
|
15328
|
+
const status = this.opentui.symbols.audioPlay(engine, soundId, optionsBuffer ? ptr(optionsBuffer) : null, ptr(outBuffer));
|
|
15329
|
+
if (status !== 0) {
|
|
15330
|
+
return { status, voiceId: null };
|
|
15331
|
+
}
|
|
15332
|
+
const view = new Uint32Array(outBuffer);
|
|
15333
|
+
return { status, voiceId: view[0] };
|
|
15334
|
+
}
|
|
15335
|
+
audioStopVoice(engine, voiceId) {
|
|
15336
|
+
return this.opentui.symbols.audioStopVoice(engine, voiceId);
|
|
15337
|
+
}
|
|
15338
|
+
audioSetVoiceGroup(engine, voiceId, groupId) {
|
|
15339
|
+
return this.opentui.symbols.audioSetVoiceGroup(engine, voiceId, groupId);
|
|
15340
|
+
}
|
|
15341
|
+
audioCreateGroup(engine, name) {
|
|
15342
|
+
const outBuffer = new ArrayBuffer(4);
|
|
15343
|
+
const nameBytes = this.encoder.encode(name);
|
|
15344
|
+
const status = this.opentui.symbols.audioCreateGroup(engine, ptr(nameBytes), nameBytes.length, ptr(outBuffer));
|
|
15345
|
+
if (status !== 0) {
|
|
15346
|
+
return { status, groupId: null };
|
|
15347
|
+
}
|
|
15348
|
+
const view = new Uint32Array(outBuffer);
|
|
15349
|
+
return { status, groupId: view[0] };
|
|
15350
|
+
}
|
|
15351
|
+
audioSetGroupVolume(engine, groupId, volume) {
|
|
15352
|
+
return this.opentui.symbols.audioSetGroupVolume(engine, groupId, volume);
|
|
15353
|
+
}
|
|
15354
|
+
audioSetMasterVolume(engine, volume) {
|
|
15355
|
+
return this.opentui.symbols.audioSetMasterVolume(engine, volume);
|
|
15356
|
+
}
|
|
15357
|
+
audioMixToBuffer(engine, outBuffer, frameCount, channels) {
|
|
15358
|
+
return this.opentui.symbols.audioMixToBuffer(engine, ptr(outBuffer), frameCount, channels);
|
|
15359
|
+
}
|
|
15360
|
+
audioEnableTap(engine, enabled, capacityFrames) {
|
|
15361
|
+
return this.opentui.symbols.audioEnableTap(engine, enabled, capacityFrames);
|
|
15362
|
+
}
|
|
15363
|
+
audioReadTap(engine, outBuffer, frameCount, channels) {
|
|
15364
|
+
const outFramesReadBuffer = new ArrayBuffer(4);
|
|
15365
|
+
const status = this.opentui.symbols.audioReadTap(engine, ptr(outBuffer), frameCount, channels, ptr(outFramesReadBuffer));
|
|
15366
|
+
if (status !== 0) {
|
|
15367
|
+
return { status, framesRead: 0 };
|
|
15368
|
+
}
|
|
15369
|
+
const view = new Uint32Array(outFramesReadBuffer);
|
|
15370
|
+
return { status, framesRead: view[0] ?? 0 };
|
|
15371
|
+
}
|
|
15372
|
+
audioGetStats(engine) {
|
|
15373
|
+
const statsBuffer = new ArrayBuffer(AudioStatsStruct.size);
|
|
15374
|
+
const status = this.opentui.symbols.audioGetStats(engine, ptr(statsBuffer));
|
|
15375
|
+
if (status !== 0) {
|
|
15376
|
+
return null;
|
|
15377
|
+
}
|
|
15378
|
+
const stats = AudioStatsStruct.unpack(statsBuffer);
|
|
15379
|
+
return {
|
|
15380
|
+
soundsLoaded: stats.soundsLoaded,
|
|
15381
|
+
voicesActive: stats.voicesActive,
|
|
15382
|
+
framesMixed: typeof stats.framesMixed === "bigint" ? stats.framesMixed : BigInt(stats.framesMixed),
|
|
15383
|
+
lockMisses: stats.lockMisses,
|
|
15384
|
+
lastPeak: stats.lastPeak,
|
|
15385
|
+
lastRms: stats.lastRms
|
|
15386
|
+
};
|
|
15387
|
+
}
|
|
15079
15388
|
registerNativeSpanFeedStream(stream, handler) {
|
|
15080
15389
|
const callback = this.ensureNativeSpanFeedCallback();
|
|
15081
15390
|
this.nativeSpanFeedHandlers.set(stream, handler);
|
|
@@ -16186,6 +16495,14 @@ class Renderable extends BaseRenderable {
|
|
|
16186
16495
|
this.requestRender();
|
|
16187
16496
|
}
|
|
16188
16497
|
}
|
|
16498
|
+
get marginTop() {
|
|
16499
|
+
const margin = this.yogaNode.getMargin(Edge.Top);
|
|
16500
|
+
if (typeof margin === "number")
|
|
16501
|
+
return margin;
|
|
16502
|
+
if (typeof margin === "object" && margin && "value" in margin && typeof margin.value === "number")
|
|
16503
|
+
return margin.value;
|
|
16504
|
+
return 0;
|
|
16505
|
+
}
|
|
16189
16506
|
set marginRight(margin) {
|
|
16190
16507
|
if (isMarginType(margin)) {
|
|
16191
16508
|
this.yogaNode.setMargin(Edge.Right, margin);
|
|
@@ -18425,6 +18742,7 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
18425
18742
|
_streaming;
|
|
18426
18743
|
_hadInitialContent = false;
|
|
18427
18744
|
_lastHighlights = [];
|
|
18745
|
+
_baseHighlight;
|
|
18428
18746
|
_onHighlight;
|
|
18429
18747
|
_onChunks;
|
|
18430
18748
|
_highlightingPromise = Promise.resolve();
|
|
@@ -18443,6 +18761,7 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
18443
18761
|
this._conceal = options.conceal ?? this._contentDefaultOptions.conceal;
|
|
18444
18762
|
this._drawUnstyledText = options.drawUnstyledText ?? this._contentDefaultOptions.drawUnstyledText;
|
|
18445
18763
|
this._streaming = options.streaming ?? this._contentDefaultOptions.streaming;
|
|
18764
|
+
this._baseHighlight = options.baseHighlight;
|
|
18446
18765
|
this._onHighlight = options.onHighlight;
|
|
18447
18766
|
this._onChunks = options.onChunks;
|
|
18448
18767
|
if (this._content.length > 0) {
|
|
@@ -18527,6 +18846,15 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
18527
18846
|
get onHighlight() {
|
|
18528
18847
|
return this._onHighlight;
|
|
18529
18848
|
}
|
|
18849
|
+
get baseHighlight() {
|
|
18850
|
+
return this._baseHighlight;
|
|
18851
|
+
}
|
|
18852
|
+
set baseHighlight(value) {
|
|
18853
|
+
if (this._baseHighlight !== value) {
|
|
18854
|
+
this._baseHighlight = value;
|
|
18855
|
+
this._highlightsDirty = true;
|
|
18856
|
+
}
|
|
18857
|
+
}
|
|
18530
18858
|
set onHighlight(value) {
|
|
18531
18859
|
if (this._onHighlight !== value) {
|
|
18532
18860
|
this._onHighlight = value;
|
|
@@ -18615,7 +18943,7 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
18615
18943
|
this._lastHighlights = highlights;
|
|
18616
18944
|
}
|
|
18617
18945
|
}
|
|
18618
|
-
if (highlights.length > 0 || this._onChunks) {
|
|
18946
|
+
if (highlights.length > 0 || this._onChunks || this._baseHighlight) {
|
|
18619
18947
|
const context = {
|
|
18620
18948
|
content,
|
|
18621
18949
|
filetype,
|
|
@@ -18623,7 +18951,8 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
18623
18951
|
highlights
|
|
18624
18952
|
};
|
|
18625
18953
|
let chunks = treeSitterToTextChunks(content, highlights, this._syntaxStyle, {
|
|
18626
|
-
enabled: this._conceal
|
|
18954
|
+
enabled: this._conceal,
|
|
18955
|
+
baseHighlight: this._baseHighlight
|
|
18627
18956
|
});
|
|
18628
18957
|
chunks = await this.transformChunks(chunks, context);
|
|
18629
18958
|
if (snapshotId !== this._highlightSnapshotId) {
|
|
@@ -21254,6 +21583,12 @@ function isCapabilityResponse(sequence) {
|
|
|
21254
21583
|
if (/\x1b\[\?[0-9;]*c/.test(sequence)) {
|
|
21255
21584
|
return true;
|
|
21256
21585
|
}
|
|
21586
|
+
if (/\x1b\]99;[^\x07\x1b]*i=opentui-notifications[^\x07\x1b]*p=\?[\s\S]*?(?:\x07|\x1b\\)/.test(sequence)) {
|
|
21587
|
+
return true;
|
|
21588
|
+
}
|
|
21589
|
+
if (/\x1b\]1337;Capabilities=[\s\S]*?(?:\x07|\x1b\\)/.test(sequence)) {
|
|
21590
|
+
return true;
|
|
21591
|
+
}
|
|
21257
21592
|
return false;
|
|
21258
21593
|
}
|
|
21259
21594
|
function isPixelResolutionResponse(sequence) {
|
|
@@ -21595,6 +21930,7 @@ var DEFAULT_FORWARDED_ENV_KEYS = [
|
|
|
21595
21930
|
"OPENTUI_GRAPHICS",
|
|
21596
21931
|
"TERM_PROGRAM",
|
|
21597
21932
|
"TERM_PROGRAM_VERSION",
|
|
21933
|
+
"TERM_FEATURES",
|
|
21598
21934
|
"ALACRITTY_SOCKET",
|
|
21599
21935
|
"ALACRITTY_LOG",
|
|
21600
21936
|
"COLORTERM",
|
|
@@ -22449,6 +22785,11 @@ Captured external output:
|
|
|
22449
22785
|
get capabilities() {
|
|
22450
22786
|
return this._capabilities;
|
|
22451
22787
|
}
|
|
22788
|
+
triggerNotification(message, title) {
|
|
22789
|
+
if (this._isDestroyed)
|
|
22790
|
+
return false;
|
|
22791
|
+
return this.lib.triggerNotification(this.rendererPtr, message, title);
|
|
22792
|
+
}
|
|
22452
22793
|
get themeMode() {
|
|
22453
22794
|
return this.themeModeState.themeMode;
|
|
22454
22795
|
}
|
|
@@ -24554,7 +24895,7 @@ Captured external output:
|
|
|
24554
24895
|
}
|
|
24555
24896
|
}
|
|
24556
24897
|
|
|
24557
|
-
export { __export, __require, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, DEFAULT_FOREGROUND_RGB, DEFAULT_BACKGROUND_RGB, normalizeIndexedColorIndex, ansi256IndexToRgb, RGBA, normalizeColorValue, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, TargetChannel, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, SystemClock, nonAlphanumericKeys, terminalNamedSingleStrokeKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, main, getTreeSitterClient,
|
|
24898
|
+
export { __export, __require, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, DEFAULT_FOREGROUND_RGB, DEFAULT_BACKGROUND_RGB, normalizeIndexedColorIndex, ansi256IndexToRgb, RGBA, normalizeColorValue, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, TargetChannel, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, SystemClock, nonAlphanumericKeys, terminalNamedSingleStrokeKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, stringWidth2 as stringWidth, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, main, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, normalizeTerminalPalette, buildTerminalPaletteSignature, decodePasteBytes, stripAnsiSequences, detectLinks, toArrayBuffer, TextBuffer, SpanInfoStruct, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, TextBufferView, EditBuffer, EditorView, convertThemeToStyles, SyntaxStyle, ANSI, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, TextRenderable, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, EditBufferRenderableEvents, isEditBufferRenderable, EditBufferRenderable, calculateRenderGeometry, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
|
|
24558
24899
|
|
|
24559
|
-
//# debugId=
|
|
24560
|
-
//# sourceMappingURL=index-
|
|
24900
|
+
//# debugId=B3C020C649A34C1A64756E2164756E21
|
|
24901
|
+
//# sourceMappingURL=index-t4yn324k.js.map
|