UNPKG

@syncify/ansi

Version:

ANSI Colors, Symbols and TUI related terminal enchancements for Syncify.

1,145 lines (1,119 loc) 136 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // ../../node_modules/.pnpm/ansis@3.17.0/node_modules/ansis/index.js var require_ansis = __commonJS({ "../../node_modules/.pnpm/ansis@3.17.0/node_modules/ansis/index.js"(exports, module) { var { defineProperty: e, setPrototypeOf: t, create: r, keys: n } = Object; var l = ""; var { round: s, max: i } = Math; var o = (e2) => { let [, t2] = /([a-f\d]{3,6})/i.exec(e2) || [], r2 = t2 ? t2.length : 0; if (3 === r2) t2 = t2[0] + t2[0] + t2[1] + t2[1] + t2[2] + t2[2]; else if (6 ^ r2) return [0, 0, 0]; let n2 = parseInt(t2, 16); return [n2 >> 16 & 255, n2 >> 8 & 255, 255 & n2]; }; var a2 = (e2, t2, r2) => e2 === t2 && t2 === r2 ? e2 < 8 ? 16 : e2 > 248 ? 231 : s((e2 - 8) / 247 * 24) + 232 : 16 + 36 * s(e2 / 51) + 6 * s(t2 / 51) + s(r2 / 51); var c = (e2) => { let t2, r2, n2, l2, o2; return e2 < 8 ? 30 + e2 : e2 < 16 ? e2 - 8 + 90 : (e2 >= 232 ? t2 = r2 = n2 = (10 * (e2 - 232) + 8) / 255 : (o2 = (e2 -= 16) % 36, t2 = (e2 / 36 | 0) / 5, r2 = (o2 / 6 | 0) / 5, n2 = o2 % 6 / 5), l2 = 2 * i(t2, r2, n2), l2 ? 30 + (s(n2) << 2 | s(r2) << 1 | s(t2)) + (2 ^ l2 ? 0 : 60) : 30); }; var u = (() => { let e2 = (e3) => i2.some((t3) => e3.test(t3)), t2 = globalThis, r2 = t2.Deno, l2 = !!r2, s2 = t2.process || r2 || {}, i2 = s2.argv || s2.args || [], o2 = s2.env || {}, a3 = -1; if (l2) try { o2 = o2.toObject(); } catch (e3) { a3 = 0; } let c2 = !!o2.PM2_HOME && !!o2.pm_id || o2.NEXT_RUNTIME?.includes("edge") || (l2 ? r2.isatty(1) : !!s2.stdout?.isTTY), u2 = "FORCE_COLOR", p2 = o2[u2], g2 = parseInt(p2), d2 = isNaN(g2) ? "false" === p2 ? 0 : -1 : g2, f2 = u2 in o2 && d2 || e2(/^-{1,2}color=?(true|always)?$/); return f2 && (a3 = d2), a3 < 0 && (a3 = ((e3, t3, r3) => { let l3 = e3.TERM, s3 = "," + n(e3).join(","); return { "24bit": 3, truecolor: 3, ansi256: 2, ansi: 1 }[e3.COLORTERM] || (e3.TF_BUILD ? 1 : /,TEAMCI/.test(s3) ? 2 : e3.CI ? /,GIT(HUB|EA)/.test(s3) ? 3 : 1 : !t3 || /-mono|dumb/i.test(l3) ? 0 : r3 || /term-(kit|dir)/.test(l3) ? 3 : /-256/.test(l3) ? 2 : /scr|xterm|tty|ansi|color|[nm]ux|vt|cyg/.test(l3) ? 1 : 3); })(o2, c2, "win32" === (l2 ? r2.build.os : s2.platform))), !d2 || o2.NO_COLOR || e2(/^-{1,2}(no-color|color=(false|never))$/) ? 0 : f2 && !a3 || t2.window?.chrome ? 3 : a3; })(); var p = u > 0; var g = { open: l, close: l }; var d = p ? (e2, t2) => ({ open: `\x1B[${e2}m`, close: `\x1B[${t2}m` }) : () => g; var f = 39; var b = 49; var _ = (e2, t2) => (r2, n2, l2) => d(((e3, t3, r3) => c(a2(e3, t3, r3)))(r2, n2, l2) + e2, t2); var m = (e2) => (t2, r2, n2) => e2(a2(t2, r2, n2)); var y = (e2) => (t2) => e2(...o(t2)); var h = (e2, t2, r2) => d(`38;2;${e2};${t2};${r2}`, f); var O = (e2, t2, r2) => d(`48;2;${e2};${t2};${r2}`, b); var $ = (e2) => d(`38;5;${e2}`, f); var x = (e2) => d(`48;5;${e2}`, b); 2 === u ? (h = m($), O = m(x)) : 1 === u && (h = _(0, f), O = _(10, b), $ = (e2) => d(c(e2), f), x = (e2) => d(c(e2) + 10, b)); var T; var w = { ansi256: $, bgAnsi256: x, fg: $, bg: x, rgb: h, bgRgb: O, hex: y(h), bgHex: y(O), visible: g, reset: d(0, 0), bold: d(1, 22), dim: d(2, 22), italic: d(3, 23), underline: d(4, 24), inverse: d(7, 27), hidden: d(8, 28) }; var R = "Bright"; var E = 30; "black,red,green,yellow,blue,magenta,cyan,white".split(",").map((e2) => { T = "bg" + e2[0].toUpperCase() + e2.slice(1), w[e2] = d(E, f), w[e2 + R] = d(60 + E, f), w[T] = d(E + 10, b), w[T + R] = d(70 + E++, b); }), w.grey = w.gray = d(90, f), w.bgGrey = w.bgGray = d(100, b), w.strikethrough = w.strike = d(9, 29); var v; var C = {}; var I = ({ _p: e2 }, { open: r2, close: n2 }) => { let s2 = (e3, ...t2) => { if (!e3) { if (r2 && r2 === n2) return r2; if (null == e3 || l === e3) return l; } let i3 = e3.raw ? String.raw(e3, ...t2).replace(/\\n/g, "\n") : l + e3, o3 = s2._p, { _a: a3, _b: c2 } = o3; if (i3.includes("\x1B")) for (; o3; ) { let e4, t3 = o3.close, r3 = o3.open, n3 = t3.length, s3 = l, a4 = 0; if (n3) { for (; ~(e4 = i3.indexOf(t3, a4)); a4 = e4 + n3) s3 += i3.slice(a4, e4) + r3; i3 = s3 + i3.slice(a4); } o3 = o3._p; } return i3.includes("\n") && (i3 = i3.replace(/(\r?\n)/g, c2 + "$1" + a3)), a3 + i3 + c2; }, i2 = r2, o2 = n2; return e2 && (i2 = e2._a + r2, o2 = n2 + e2._b), t(s2, v), s2._p = { open: r2, close: n2, _a: i2, _b: o2, _p: e2 }, s2.open = i2, s2.close = o2, s2; }; var M = function() { let n2 = { Ansis: M, isSupported: () => p, strip: (e2) => e2.replace(/[›][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, l), extend(l2) { for (let t2 in l2) { let r2 = l2[t2], n3 = (typeof r2)[0], s2 = "s" === n3 ? h(...o(r2)) : r2; C[t2] = "f" === n3 ? { get() { return (...e2) => I(this, r2(...e2)); } } : { get() { let r3 = I(this, s2); return e(this, t2, { value: r3 }), r3; } }; } return v = r({}, C), t(n2, v), n2; } }; return n2.extend(w); }; var k = new M(); module.exports = k, k.default = k; } }); // ../../node_modules/.pnpm/ansis@3.17.0/node_modules/ansis/index.mjs var import_index = __toESM(require_ansis(), 1); var ansis_default = import_index.default; var { Ansis, ansi256, fg, bgAnsi256, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, strike, black, red, green, yellow, blue, magenta, cyan, white, grey, gray, blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGrey, bgGray, bgBlackBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_index.default; // src/colors.ts var clear = "\x1B[H\x1B[2J"; var purge = "\x1B[2J\x1B[3J\x1B[H\x1Bc"; ansis_default.extend( { brown: "#c19a6b", pink: "#ff75d1", teal: "#91EBC2", lightGray: "#2a2a2e", midGray: "#2a2929", orange: "#FFAB40", lavender: "#BECAFF", neonTeal: "#03E4DC", neonGreen: "#56ef83", neonCyan: "#69d5fd", neonRouge: "#FF8095", neonMagenta: "#7b68ee" } ); var { // STANDARD cyan: cyan2, red: red2, green: green2, yellow: yellow2, magenta: magenta2, blue: blue2, white: white2, gray: gray2, dim: dim2, // BRIGHT cyanBright: cyanBright2, redBright: redBright2, greenBright: greenBright2, yellowBright: yellowBright2, magentaBright: magentaBright2, blueBright: blueBright2, whiteBright: whiteBright2, // OTHER strip, // STYLES underline: underline2, bold: bold2, reset: reset2, strikethrough: strikethrough2, // CUSTOM lightGray, midGray, pink, brown, teal, orange, lavender, neonGreen, neonCyan, neonRouge, neonMagenta, neonTeal } = ansis_default; // src/symbols.ts var WRN = `${bold.open + yellow2.open}!${yellow2.close + bold.close}`; var VER = `${gray2.open}\u1D20${gray2.close}`; var PIP = `${gray2.open}|${gray2.close}`; var HSH = `${gray2.open}#${gray2.close}`; var PLS = `${gray2.open}+${gray2.close}`; var MIC = `${gray2.open}\xB5${gray2.close}`; var MIN = `${gray2.open}-${gray2.close}`; var COM = `${gray2.open},${gray2.close}`; var CHK = `${neonGreen.open}\u2713${neonGreen.close}`; var BAD = `${redBright2.open}\u2715${redBright2.close}`; var COL = `${gray2.open}:${gray2.close}`; var ARR = `${gray2.open}\u2794${gray2.close}`; var NXT = `${gray2.open}\xBB${gray2.close}`; var CHV = `${gray2.open}\u27A4${gray2.close}`; var ARL = `${gray2.open}\u2942${gray2.close}`; var TLD = `${gray2.open}~${gray2.close}`; var DSH = `${gray2.open}\u2014${gray2.close}`; var LPR = `${gray2.open}(${gray2.close}`; var RPR = `${gray2.open})${gray2.close}`; var LCB = `${gray2.open}{${gray2.close}`; var RCB = `${gray2.open}}${gray2.close}`; var LSB = `${gray2.open}[${gray2.close}`; var RSB = `${gray2.open}]${gray2.close}`; var LAN = `${gray2.open}<${gray2.close}`; var RAN = `${gray2.open}>${gray2.close}`; // src/helpers.ts function sanitize(message) { if (Buffer.isBuffer(message)) return message.toString(); if (Array.isArray(message) || typeof message === "object") return JSON.stringify(message); if (typeof message === "boolean" || typeof message === "number") return `${message}`; return typeof message === "string" ? message : String(message); } function eq(array, prop = null) { let size = 0; if (Array.isArray(array)) { for (const item of array) { if (prop) { if (item[prop].length > size) { size = item[prop].length; } } else { if (item.length > size) { size = item.length; } } } } else { for (const item in array) { if (item.length > size) size = item.length; } } size = size + 1; return function curried(string) { const n = typeof string === "string" ? size - string.length : size - string; return n < 1 ? " " : " ".repeat(n); }; } function getTime() { const now = /* @__PURE__ */ new Date(); const hur = now.getHours(); const min = now.getMinutes(); const sec = now.getSeconds(); return (hur < 10 ? `0${hur}` : hur) + COL + (min < 10 ? `0${min}` : min) + COL + (sec < 10 ? `0${sec}` : sec); } function detect(string, { onlyFirst = false } = {}) { const regexp = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" ]; const ansi = string.match(new RegExp(regexp.join("|"), onlyFirst ? void 0 : "g")); return ansi !== null ? ansi : false; } // src/characters.ts var WSP = " "; var WSR = " "; var NWL = "\n"; var NLR = "\n\n"; var NIL = ""; // src/tsize.ts import { execFileSync } from "node:child_process"; import { dirname, join } from "node:path"; import { env, platform, stderr, stdout } from "node:process"; import { fileURLToPath } from "node:url"; function exec(command, args, shell) { return execFileSync(command, args, { encoding: "utf8", shell, stdio: [ "ignore", "pipe", "ignore" ] }).trim(); } function execNative(command, shell) { const __dirname = dirname(fileURLToPath(import.meta.url)); return exec(join(__dirname, command), [], shell).split(/\r?\n/); } function create(columns, rows) { const cols = Number.parseInt(columns, 10); return { wrap: cols > 85 ? 85 : cols, cols: Number.parseInt(columns, 10), rows: Number.parseInt(rows, 10) }; } function tsize() { if (stdout && stdout.columns && stdout.rows) return create(stdout.columns, stdout.rows); if (stderr && stderr.columns && stderr.rows) return create(stderr.columns, stderr.rows); if (env.COLUMNS && env.LINES) return create(env.COLUMNS, env.LINES); if (platform === "win32") { try { const size = execNative("vendor/windows/term-size.exe", false); if (size.length === 2) return create(size[0], size[1]); } catch { } } else { if (platform === "darwin") { try { const size = execNative("vendor/macos/term-size", true); if (size.length === 2) return create(size[0], size[1]); } catch { } } try { const size = exec("resize", ["-u"]).match(/\d+/g); if (size.length === 2) return create(size[0], size[1]); } catch { } if (env.TERM) { try { const cols = exec("tput", ["cols"]); const rows = exec("tput", ["lines"]); if (cols && rows) return create(cols, rows); } catch { } } } return create(80, 24); } // src/tree.ts var Tree = { /** * Tree Line Top * * ```js * '┌─ ' // appended with 1 spaces * ``` */ open: `${lightGray.open}\u250C\u2500${lightGray.close} `, /** * Tree Line Stub * * ```js * '├ ' // appended with 2 spaces * ``` */ stub: `${lightGray.open}\u251C${lightGray.close} `, /** * Tree Line Dash * * ```js * '├─ ' // appended with 1 space * ``` */ dash: `${lightGray.open}\u251C\u2500${lightGray.close} `, /** * Tree Line (without suffixed whitespace) * * ```js * '│' // appended with no space * ``` */ trim: `${lightGray.open}\u2502${lightGray.close}`, /** * Tree Line * * ```js * '│ ' // appended with 2 spaces * ``` */ line: `${lightGray.open}\u2502${lightGray.close} `, /** * Tree Line Next - (`\n` will prepend) * * ```js * '\n│' // appended with no space * ``` */ next: ` ${lightGray.open}\u2502${lightGray.close}`, /** * Tree Line Next - (`\n` will prepend) * * ```js * '│\n' * '│ ' // appended with 2 spaces * ``` */ newline: ` ${lightGray.open}\u2502${lightGray.close} ${lightGray.open}\u2502${lightGray.close} `, /** * Tree Line After - (`\n` will append) * * ```js * '│\n' // appended with no space * ``` */ after: `${lightGray.open}\u2502${lightGray.close} `, /** * Tree Line Wrap * * Newlines and line (i.e: `\n` will prepend and append) * * ```js * '\n│\n' // appended with no space * ``` */ wrap: ` ${lightGray.open}\u2502${lightGray.close} `, /** * Tree Line Base * * ```js * '└─' // appended with 1 space * ``` */ base: `${lightGray.open}\u2514\u2500${lightGray.close} `, /** * Tree Line Red (Red Dim) * * ```js * '│ ' // appended with 2 spaces * ``` */ red: `${red2.dim.open}\u2502${red2.dim.close} `, /** * Tree Line Red (Red Dim) * * ```js * '│' // appended with no space * ``` */ redTrim: `${red2.dim.open}\u2502${red2.dim.close}`, /** * Tree Yello Line Dash * * ```js * '├─ ' // appended with 1 space * ``` */ redDash: `${red2.dim.open}\u251C\u2500${red2.dim.close} `, /** * Tree Red Line stub * * ```js * '├ ' // appended with 1 space * ``` */ redStub: `${red2.dim.open}\u251C${red2.dim.close} `, /** * Tree Line Warning (Yellow Dim) * * ```js * '│ ' // appended with 2 spaces * ``` */ yellow: `${yellow2.dim.open}\u2502${yellow2.dim.close} `, /** * Tree Line Warning (Yellow Dim) * * ```js * '│' // appended with no space * ``` */ yellowTrim: `${yellow2.dim.open}\u2502${yellow2.dim.close}`, /** * Tree Yello Line Dash * * ```js * '├─ ' // appended with 1 space * ``` */ yellowDash: `${yellow2.dim.open}\u251C\u2500${yellow2.dim.close} `, /** * Tree Red Line stub * * ```js * '├ ' // appended with 1 space * ``` */ yellowStub: `${yellow2.dim.open}\u251C${yellow2.dim.close} `, /** * Tree Line Indentation * * Symbols used for next level lines */ indent: { /** * Tree Indent Line Top * * ```js * '├──┬─ ' // appended with 1 space * ``` */ edge: `${lightGray.open}\u251C\u2500\u2500\u252C\u2500${lightGray.close} `, /** * Tree Indent Line Fall * * ```js * '├──┐ ' // appended with 1 space * ``` */ fall: `${lightGray.open}\u251C\u2500\u2500\u2510${lightGray.close} `, /** * Tree Indent Line * * ```js * '│ │ ' // appended with 1 space * ``` */ line: `${lightGray.open}\u2502 \u2502${lightGray.close} `, /** * Tree Indent Line Stub * * ```js * '│ ├ ' // appended with 1 space * ``` */ stub: `${lightGray.open}\u2502 \u251C${lightGray.close} `, /** * Tree Indent Line Dash * * ```js * '│ ├─' // appended with 1 space * ``` */ dash: `${lightGray.open}\u2502 \u251C\u2500${lightGray.close} `, /** * Tree Indent Line Base * * ```js * '│ └─' // appended with 1 space * ``` */ base: `${lightGray.open}\u2502 \u2514\u2500${lightGray.close} ` } }; // src/tui.ts import { Console } from "node:console"; import process7 from "node:process"; // ../../node_modules/.pnpm/log-update@6.1.0/node_modules/log-update/index.js import process6 from "node:process"; // ../../node_modules/.pnpm/ansi-escapes@7.0.0/node_modules/ansi-escapes/base.js var base_exports = {}; __export(base_exports, { beep: () => beep, clearScreen: () => clearScreen, clearTerminal: () => clearTerminal, cursorBackward: () => cursorBackward, cursorDown: () => cursorDown, cursorForward: () => cursorForward, cursorGetPosition: () => cursorGetPosition, cursorHide: () => cursorHide, cursorLeft: () => cursorLeft, cursorMove: () => cursorMove, cursorNextLine: () => cursorNextLine, cursorPrevLine: () => cursorPrevLine, cursorRestorePosition: () => cursorRestorePosition, cursorSavePosition: () => cursorSavePosition, cursorShow: () => cursorShow, cursorTo: () => cursorTo, cursorUp: () => cursorUp, enterAlternativeScreen: () => enterAlternativeScreen, eraseDown: () => eraseDown, eraseEndLine: () => eraseEndLine, eraseLine: () => eraseLine, eraseLines: () => eraseLines, eraseScreen: () => eraseScreen, eraseStartLine: () => eraseStartLine, eraseUp: () => eraseUp, exitAlternativeScreen: () => exitAlternativeScreen, iTerm: () => iTerm, image: () => image, link: () => link, scrollDown: () => scrollDown, scrollUp: () => scrollUp }); import process2 from "node:process"; // ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js var isBrowser = globalThis.window?.document !== void 0; var isNode = globalThis.process?.versions?.node !== void 0; var isBun = globalThis.process?.versions?.bun !== void 0; var isDeno = globalThis.Deno?.version?.deno !== void 0; var isElectron = globalThis.process?.versions?.electron !== void 0; var isJsDom = globalThis.navigator?.userAgent?.includes("jsdom") === true; var isWebWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; var isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== "undefined" && globalThis instanceof DedicatedWorkerGlobalScope; var isSharedWorker = typeof SharedWorkerGlobalScope !== "undefined" && globalThis instanceof SharedWorkerGlobalScope; var isServiceWorker = typeof ServiceWorkerGlobalScope !== "undefined" && globalThis instanceof ServiceWorkerGlobalScope; var platform2 = globalThis.navigator?.userAgentData?.platform; var isMacOs = platform2 === "macOS" || globalThis.navigator?.platform === "MacIntel" || globalThis.navigator?.userAgent?.includes(" Mac ") === true || globalThis.process?.platform === "darwin"; var isWindows = platform2 === "Windows" || globalThis.navigator?.platform === "Win32" || globalThis.process?.platform === "win32"; var isLinux = platform2 === "Linux" || globalThis.navigator?.platform?.startsWith("Linux") === true || globalThis.navigator?.userAgent?.includes(" Linux ") === true || globalThis.process?.platform === "linux"; var isIos = platform2 === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform); var isAndroid = platform2 === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android"; // ../../node_modules/.pnpm/ansi-escapes@7.0.0/node_modules/ansi-escapes/base.js var ESC = "\x1B["; var OSC = "\x1B]"; var BEL = "\x07"; var SEP = ";"; var isTerminalApp = !isBrowser && process2.env.TERM_PROGRAM === "Apple_Terminal"; var isWindows2 = !isBrowser && process2.platform === "win32"; var cwdFunction = isBrowser ? () => { throw new Error("`process.cwd()` only works in Node.js, not the browser."); } : process2.cwd; var cursorTo = (x, y) => { if (typeof x !== "number") { throw new TypeError("The `x` argument is required"); } if (typeof y !== "number") { return ESC + (x + 1) + "G"; } return ESC + (y + 1) + SEP + (x + 1) + "H"; }; var cursorMove = (x, y) => { if (typeof x !== "number") { throw new TypeError("The `x` argument is required"); } let returnValue = ""; if (x < 0) { returnValue += ESC + -x + "D"; } else if (x > 0) { returnValue += ESC + x + "C"; } if (y < 0) { returnValue += ESC + -y + "A"; } else if (y > 0) { returnValue += ESC + y + "B"; } return returnValue; }; var cursorUp = (count = 1) => ESC + count + "A"; var cursorDown = (count = 1) => ESC + count + "B"; var cursorForward = (count = 1) => ESC + count + "C"; var cursorBackward = (count = 1) => ESC + count + "D"; var cursorLeft = ESC + "G"; var cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s"; var cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u"; var cursorGetPosition = ESC + "6n"; var cursorNextLine = ESC + "E"; var cursorPrevLine = ESC + "F"; var cursorHide = ESC + "?25l"; var cursorShow = ESC + "?25h"; var eraseLines = (count) => { let clear2 = ""; for (let i = 0; i < count; i++) { clear2 += eraseLine + (i < count - 1 ? cursorUp() : ""); } if (count) { clear2 += cursorLeft; } return clear2; }; var eraseEndLine = ESC + "K"; var eraseStartLine = ESC + "1K"; var eraseLine = ESC + "2K"; var eraseDown = ESC + "J"; var eraseUp = ESC + "1J"; var eraseScreen = ESC + "2J"; var scrollUp = ESC + "S"; var scrollDown = ESC + "T"; var clearScreen = "\x1Bc"; var clearTerminal = isWindows2 ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`; var enterAlternativeScreen = ESC + "?1049h"; var exitAlternativeScreen = ESC + "?1049l"; var beep = BEL; var link = (text, url) => [ OSC, "8", SEP, SEP, url, BEL, text, OSC, "8", SEP, SEP, BEL ].join(""); var image = (data, options = {}) => { let returnValue = `${OSC}1337;File=inline=1`; if (options.width) { returnValue += `;width=${options.width}`; } if (options.height) { returnValue += `;height=${options.height}`; } if (options.preserveAspectRatio === false) { returnValue += ";preserveAspectRatio=0"; } return returnValue + ":" + Buffer.from(data).toString("base64") + BEL; }; var iTerm = { setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`, annotation(message, options = {}) { let returnValue = `${OSC}1337;`; const hasX = options.x !== void 0; const hasY = options.y !== void 0; if ((hasX || hasY) && !(hasX && hasY && options.length !== void 0)) { throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined"); } message = message.replaceAll("|", ""); returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation="; if (options.length > 0) { returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|"); } else { returnValue += message; } return returnValue + BEL; } }; // ../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js import process5 from "node:process"; // ../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js import process4 from "node:process"; // ../../node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js var copyProperty = (to, from, property, ignoreNonConfigurable) => { if (property === "length" || property === "prototype") { return; } if (property === "arguments" || property === "caller") { return; } const toDescriptor = Object.getOwnPropertyDescriptor(to, property); const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { return; } Object.defineProperty(to, property, fromDescriptor); }; var canCopyProperty = function(toDescriptor, fromDescriptor) { return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); }; var changePrototype = (to, from) => { const fromPrototype = Object.getPrototypeOf(from); if (fromPrototype === Object.getPrototypeOf(to)) { return; } Object.setPrototypeOf(to, fromPrototype); }; var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ ${fromBody}`; var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); var changeToString = (to, from, name) => { const withName = name === "" ? "" : `with ${name.trim()}() `; const newToString = wrappedToString.bind(null, withName, from.toString()); Object.defineProperty(newToString, "name", toStringName); const { writable, enumerable, configurable } = toStringDescriptor; Object.defineProperty(to, "toString", { value: newToString, writable, enumerable, configurable }); }; function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { const { name } = to; for (const property of Reflect.ownKeys(from)) { copyProperty(to, from, property, ignoreNonConfigurable); } changePrototype(to, from); changeToString(to, from, name); return to; } // ../../node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js var calledFunctions = /* @__PURE__ */ new WeakMap(); var onetime = (function_, options = {}) => { if (typeof function_ !== "function") { throw new TypeError("Expected a function"); } let returnValue; let callCount = 0; const functionName = function_.displayName || function_.name || "<anonymous>"; const onetime2 = function(...arguments_) { calledFunctions.set(onetime2, ++callCount); if (callCount === 1) { returnValue = function_.apply(this, arguments_); function_ = void 0; } else if (options.throw === true) { throw new Error(`Function \`${functionName}\` can only be called once`); } return returnValue; }; mimicFunction(onetime2, function_); calledFunctions.set(onetime2, callCount); return onetime2; }; onetime.callCount = (function_) => { if (!calledFunctions.has(function_)) { throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); } return calledFunctions.get(function_); }; var onetime_default = onetime; // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js var signals = []; signals.push("SIGHUP", "SIGINT", "SIGTERM"); if (process.platform !== "win32") { signals.push( "SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT" // should detect profiler and enable/disable accordingly. // see #21 // 'SIGPROF' ); } if (process.platform === "linux") { signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); } // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js var processOk = (process8) => !!process8 && typeof process8 === "object" && typeof process8.removeListener === "function" && typeof process8.emit === "function" && typeof process8.reallyExit === "function" && typeof process8.listeners === "function" && typeof process8.kill === "function" && typeof process8.pid === "number" && typeof process8.on === "function"; var kExitEmitter = Symbol.for("signal-exit emitter"); var global = globalThis; var ObjectDefineProperty = Object.defineProperty.bind(Object); var Emitter = class { emitted = { afterExit: false, exit: false }; listeners = { afterExit: [], exit: [] }; count = 0; id = Math.random(); constructor() { if (global[kExitEmitter]) { return global[kExitEmitter]; } ObjectDefineProperty(global, kExitEmitter, { value: this, writable: false, enumerable: false, configurable: false }); } on(ev, fn) { this.listeners[ev].push(fn); } removeListener(ev, fn) { const list = this.listeners[ev]; const i = list.indexOf(fn); if (i === -1) { return; } if (i === 0 && list.length === 1) { list.length = 0; } else { list.splice(i, 1); } } emit(ev, code, signal) { if (this.emitted[ev]) { return false; } this.emitted[ev] = true; let ret = false; for (const fn of this.listeners[ev]) { ret = fn(code, signal) === true || ret; } if (ev === "exit") { ret = this.emit("afterExit", code, signal) || ret; } return ret; } }; var SignalExitBase = class { }; var signalExitWrap = (handler) => { return { onExit(cb, opts) { return handler.onExit(cb, opts); }, load() { return handler.load(); }, unload() { return handler.unload(); } }; }; var SignalExitFallback = class extends SignalExitBase { onExit() { return () => { }; } load() { } unload() { } }; var SignalExit = class extends SignalExitBase { // "SIGHUP" throws an `ENOSYS` error on Windows, // so use a supported signal instead /* c8 ignore start */ #hupSig = process3.platform === "win32" ? "SIGINT" : "SIGHUP"; /* c8 ignore stop */ #emitter = new Emitter(); #process; #originalProcessEmit; #originalProcessReallyExit; #sigListeners = {}; #loaded = false; constructor(process8) { super(); this.#process = process8; this.#sigListeners = {}; for (const sig of signals) { this.#sigListeners[sig] = () => { const listeners = this.#process.listeners(sig); let { count } = this.#emitter; const p = process8; if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") { count += p.__signal_exit_emitter__.count; } if (listeners.length === count) { this.unload(); const ret = this.#emitter.emit("exit", null, sig); const s = sig === "SIGHUP" ? this.#hupSig : sig; if (!ret) process8.kill(process8.pid, s); } }; } this.#originalProcessReallyExit = process8.reallyExit; this.#originalProcessEmit = process8.emit; } onExit(cb, opts) { if (!processOk(this.#process)) { return () => { }; } if (this.#loaded === false) { this.load(); } const ev = opts?.alwaysLast ? "afterExit" : "exit"; this.#emitter.on(ev, cb); return () => { this.#emitter.removeListener(ev, cb); if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) { this.unload(); } }; } load() { if (this.#loaded) { return; } this.#loaded = true; this.#emitter.count += 1; for (const sig of signals) { try { const fn = this.#sigListeners[sig]; if (fn) this.#process.on(sig, fn); } catch (_) { } } this.#process.emit = (ev, ...a2) => { return this.#processEmit(ev, ...a2); }; this.#process.reallyExit = (code) => { return this.#processReallyExit(code); }; } unload() { if (!this.#loaded) { return; } this.#loaded = false; signals.forEach((sig) => { const listener = this.#sigListeners[sig]; if (!listener) { throw new Error("Listener not defined for signal: " + sig); } try { this.#process.removeListener(sig, listener); } catch (_) { } }); this.#process.emit = this.#originalProcessEmit; this.#process.reallyExit = this.#originalProcessReallyExit; this.#emitter.count -= 1; } #processReallyExit(code) { if (!processOk(this.#process)) { return 0; } this.#process.exitCode = code || 0; this.#emitter.emit("exit", this.#process.exitCode, null); return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); } #processEmit(ev, ...args) { const og = this.#originalProcessEmit; if (ev === "exit" && processOk(this.#process)) { if (typeof args[0] === "number") { this.#process.exitCode = args[0]; } const ret = og.call(this.#process, ev, ...args); this.#emitter.emit("exit", this.#process.exitCode, null); return ret; } else { return og.call(this.#process, ev, ...args); } } }; var process3 = globalThis.process; var { /** * Called when the process is exiting, whether via signal, explicit * exit, or running out of stuff to do. * * If the global process object is not suitable for instrumentation, * then this will be a no-op. * * Returns a function that may be used to unload signal-exit. */ onExit, /** * Load the listeners. Likely you never need to call this, unless * doing a rather deep integration with signal-exit functionality. * Mostly exposed for the benefit of testing. * * @internal */ load, /** * Unload the listeners. Likely you never need to call this, unless * doing a rather deep integration with signal-exit functionality. * Mostly exposed for the benefit of testing. * * @internal */ unload } = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback()); // ../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js var terminal = process4.stderr.isTTY ? process4.stderr : process4.stdout.isTTY ? process4.stdout : void 0; var restoreCursor = terminal ? onetime_default(() => { onExit(() => { terminal.write("\x1B[?25h"); }, { alwaysLast: true }); }) : () => { }; var restore_cursor_default = restoreCursor; // ../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js var isHidden = false; var cliCursor = {}; cliCursor.show = (writableStream = process5.stderr) => { if (!writableStream.isTTY) { return; } isHidden = false; writableStream.write("\x1B[?25h"); }; cliCursor.hide = (writableStream = process5.stderr) => { if (!writableStream.isTTY) { return; } restore_cursor_default(); isHidden = true; writableStream.write("\x1B[?25l"); }; cliCursor.toggle = (force, writableStream) => { if (force !== void 0) { isHidden = force; } if (isHidden) { cliCursor.show(writableStream); } else { cliCursor.hide(writableStream); } }; var cli_cursor_default = cliCursor; // ../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js function ansiRegex({ onlyFirst = false } = {}) { const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)"; const pattern = [ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" ].join("|"); return new RegExp(pattern, onlyFirst ? void 0 : "g"); } // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js var regex = ansiRegex(); function stripAnsi(string) { if (typeof string !== "string") { throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); } return string.replace(regex, ""); } // ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js function isAmbiguous(x) { 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; } function isFullWidth(x) { return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510; } function isWide(x) { 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 === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || 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 <= 128727 || 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 <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141; } // ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js function validate(codePoint) { if (!Number.isSafeInteger(codePoint)) { throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`); } } function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) { validate(codePoint); if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) { return 2; } return 1; } // ../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.mjs var emoji_regex_default = () => { 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\uDC70\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83