UNPKG

sv

Version:

A CLI for creating and updating SvelteKit projects

806 lines (801 loc) 978 kB
import { createRequire } from "module"; import fs, { existsSync, lstatSync, readdirSync } from "node:fs"; import path, { dirname, isAbsolute, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import process$1, { stdin, stdout } from "node:process"; import * as _ from "node:readline"; import Eu from "node:readline"; import { ReadStream, WriteStream } from "node:tty"; import { stripVTControlCharacters } from "node:util"; import { createRequire as createRequire$1 } from "node:module"; import { spawn } from "child_process"; import { delimiter, dirname as dirname$1, normalize, resolve as resolve$1 } from "path"; import { cwd } from "process"; import { PassThrough } from "stream"; import me from "readline"; //#region rolldown:runtime var __create$1 = Object.create; var __defProp$1 = Object.defineProperty; var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; var __getOwnPropNames$1 = Object.getOwnPropertyNames; var __getProtoOf$1 = Object.getPrototypeOf; var __hasOwnProp$1 = Object.prototype.hasOwnProperty; var __commonJS$1 = (cb, mod) => function() { return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps$1 = (to, from$1, except, desc) => { if (from$1 && typeof from$1 === "object" || typeof from$1 === "function") for (var keys = __getOwnPropNames$1(from$1), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) { key = keys[i$1]; if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, { get: ((k$2) => from$1[k$2]).bind(null, key), enumerable: !(desc = __getOwnPropDesc$1(from$1, key)) || desc.enumerable }); } return to; }; var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", { value: mod, enumerable: true }) : target, mod)); var __require$1 = /* @__PURE__ */ createRequire(import.meta.url); //#endregion //#region packages/create/dist/index.js function mkdirp(dir) { try { fs.mkdirSync(dir, { recursive: true }); } catch (err) { const e$1 = err; if (e$1.code === "EEXIST") return; throw e$1; } } function identity(x$3) { return x$3; } function copy(from$1, to, rename = identity) { if (!fs.existsSync(from$1)) return; const stats = fs.statSync(from$1); if (stats.isDirectory()) fs.readdirSync(from$1).forEach((file) => { copy(path.join(from$1, file), path.join(to, rename(file))); }); else { mkdirp(path.dirname(to)); fs.copyFileSync(from$1, to); } } function dist(path$1$1) { const insideDistFolder = import.meta.url.includes("dist"); return fileURLToPath(new URL(`./${!insideDistFolder ? "dist/" : ""}${path$1$1}`, import.meta.url).href); } const templateTypes = [ "minimal", "demo", "library" ]; const languageTypes = [ "typescript", "checkjs", "none" ]; function create(cwd$1, options) { mkdirp(cwd$1); write_template_files(options.template, options.types, options.name, cwd$1); write_common_files(cwd$1, options, options.name); } const templates = templateTypes.map((dir) => { const meta_file = dist(`templates/${dir}/meta.json`); const { title, description } = JSON.parse(fs.readFileSync(meta_file, "utf8")); return { name: dir, title, description }; }); function write_template_files(template, types$2, name, cwd$1) { const dir = dist(`templates/${template}`); copy(`${dir}/assets`, cwd$1, (name$1) => name$1.replace("DOT-", ".")); copy(`${dir}/package.json`, `${cwd$1}/package.json`); const manifest = `${dir}/files.types=${types$2}.json`; const files = JSON.parse(fs.readFileSync(manifest, "utf-8")); files.forEach((file) => { const dest = path.join(cwd$1, file.name); mkdirp(path.dirname(dest)); fs.writeFileSync(dest, file.contents.replace(/~TODO~/g, name)); }); } function write_common_files(cwd$1, options, name) { const shared$1 = dist("shared.json"); const { files } = JSON.parse(fs.readFileSync(shared$1, "utf-8")); const pkg_file = path.join(cwd$1, "package.json"); const pkg = JSON.parse(fs.readFileSync(pkg_file, "utf-8")); sort_files(files).forEach((file) => { const include = file.include.every((condition) => matches_condition(condition, options)); const exclude = file.exclude.some((condition) => matches_condition(condition, options)); if (exclude || !include) return; if (file.name === "package.json") { const new_pkg = JSON.parse(file.contents); merge(pkg, new_pkg); } else { const dest = path.join(cwd$1, file.name); mkdirp(path.dirname(dest)); fs.writeFileSync(dest, file.contents); } }); pkg.dependencies = sort_keys(pkg.dependencies); pkg.devDependencies = sort_keys(pkg.devDependencies); pkg.name = to_valid_package_name(name); fs.writeFileSync(pkg_file, JSON.stringify(pkg, null, " ") + "\n"); } function matches_condition(condition, options) { if (templateTypes.includes(condition)) return options.template === condition; if (languageTypes.includes(condition)) return options.types === condition; return Boolean(options[condition]); } function merge(target, source) { for (const key in source) if (key in target) { const target_value = target[key]; const source_value = source[key]; if (typeof source_value !== typeof target_value || Array.isArray(source_value) !== Array.isArray(target_value)) throw new Error("Mismatched values"); if (typeof source_value === "object") merge(target_value, source_value); else target[key] = source_value; } else target[key] = source[key]; } function sort_keys(obj) { if (!obj) return; const sorted = {}; Object.keys(obj).sort().forEach((key) => { sorted[key] = obj[key]; }); return sorted; } /** * Sort files so that those which apply more generically come first so they * can be overwritten by files for more precise cases later. */ function sort_files(files) { return files.sort((f1, f2) => { const f1_more_generic = f1.include.every((include) => f2.include.includes(include)) && f1.exclude.every((exclude) => f2.exclude.includes(exclude)); const f2_more_generic = f2.include.every((include) => f1.include.includes(include)) && f2.exclude.every((exclude) => f1.exclude.includes(exclude)); const same = f1_more_generic && f2_more_generic; const different = !f1_more_generic && !f2_more_generic; return same || different ? 0 : f1_more_generic ? -1 : 1; }); } function to_valid_package_name(name) { return name.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]/, "").replace(/[^a-z0-9~.-]+/g, "-"); } //#endregion //#region node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js var require_picocolors$1 = __commonJS$1({ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) { let p$1 = process || {}, argv = p$1.argv || [], env$1 = p$1.env || {}; let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p$1.platform === "win32" || (p$1.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI); let formatter = (open, close, replace = open) => (input) => { let string = "" + input, index = string.indexOf(close, open.length); return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; }; let replaceClose = (string, close, replace, index) => { let result = "", cursor$1 = 0; do { result += string.substring(cursor$1, index) + replace; cursor$1 = index + close.length; index = string.indexOf(close, cursor$1); } while (~index); return result + string.substring(cursor$1); }; let createColors = (enabled = isColorSupported) => { let f$2 = enabled ? formatter : () => String; return { isColorSupported: enabled, reset: f$2("\x1B[0m", "\x1B[0m"), bold: f$2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), dim: f$2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), italic: f$2("\x1B[3m", "\x1B[23m"), underline: f$2("\x1B[4m", "\x1B[24m"), inverse: f$2("\x1B[7m", "\x1B[27m"), hidden: f$2("\x1B[8m", "\x1B[28m"), strikethrough: f$2("\x1B[9m", "\x1B[29m"), black: f$2("\x1B[30m", "\x1B[39m"), red: f$2("\x1B[31m", "\x1B[39m"), green: f$2("\x1B[32m", "\x1B[39m"), yellow: f$2("\x1B[33m", "\x1B[39m"), blue: f$2("\x1B[34m", "\x1B[39m"), magenta: f$2("\x1B[35m", "\x1B[39m"), cyan: f$2("\x1B[36m", "\x1B[39m"), white: f$2("\x1B[37m", "\x1B[39m"), gray: f$2("\x1B[90m", "\x1B[39m"), bgBlack: f$2("\x1B[40m", "\x1B[49m"), bgRed: f$2("\x1B[41m", "\x1B[49m"), bgGreen: f$2("\x1B[42m", "\x1B[49m"), bgYellow: f$2("\x1B[43m", "\x1B[49m"), bgBlue: f$2("\x1B[44m", "\x1B[49m"), bgMagenta: f$2("\x1B[45m", "\x1B[49m"), bgCyan: f$2("\x1B[46m", "\x1B[49m"), bgWhite: f$2("\x1B[47m", "\x1B[49m"), blackBright: f$2("\x1B[90m", "\x1B[39m"), redBright: f$2("\x1B[91m", "\x1B[39m"), greenBright: f$2("\x1B[92m", "\x1B[39m"), yellowBright: f$2("\x1B[93m", "\x1B[39m"), blueBright: f$2("\x1B[94m", "\x1B[39m"), magentaBright: f$2("\x1B[95m", "\x1B[39m"), cyanBright: f$2("\x1B[96m", "\x1B[39m"), whiteBright: f$2("\x1B[97m", "\x1B[39m"), bgBlackBright: f$2("\x1B[100m", "\x1B[49m"), bgRedBright: f$2("\x1B[101m", "\x1B[49m"), bgGreenBright: f$2("\x1B[102m", "\x1B[49m"), bgYellowBright: f$2("\x1B[103m", "\x1B[49m"), bgBlueBright: f$2("\x1B[104m", "\x1B[49m"), bgMagentaBright: f$2("\x1B[105m", "\x1B[49m"), bgCyanBright: f$2("\x1B[106m", "\x1B[49m"), bgWhiteBright: f$2("\x1B[107m", "\x1B[49m") }; }; module.exports = createColors(); module.exports.createColors = createColors; } }); //#endregion //#region node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js var require_src = __commonJS$1({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) { const ESC = "\x1B"; const CSI = `${ESC}[`; const beep = "\x07"; const cursor = { to(x$3, y) { if (!y) return `${CSI}${x$3 + 1}G`; return `${CSI}${y + 1};${x$3 + 1}H`; }, move(x$3, y) { let ret = ""; if (x$3 < 0) ret += `${CSI}${-x$3}D`; else if (x$3 > 0) ret += `${CSI}${x$3}C`; if (y < 0) ret += `${CSI}${-y}A`; else if (y > 0) ret += `${CSI}${y}B`; return ret; }, up: (count = 1) => `${CSI}${count}A`, down: (count = 1) => `${CSI}${count}B`, forward: (count = 1) => `${CSI}${count}C`, backward: (count = 1) => `${CSI}${count}D`, nextLine: (count = 1) => `${CSI}E`.repeat(count), prevLine: (count = 1) => `${CSI}F`.repeat(count), left: `${CSI}G`, hide: `${CSI}?25l`, show: `${CSI}?25h`, save: `${ESC}7`, restore: `${ESC}8` }; const scroll = { up: (count = 1) => `${CSI}S`.repeat(count), down: (count = 1) => `${CSI}T`.repeat(count) }; const erase = { screen: `${CSI}2J`, up: (count = 1) => `${CSI}1J`.repeat(count), down: (count = 1) => `${CSI}J`.repeat(count), line: `${CSI}2K`, lineEnd: `${CSI}K`, lineStart: `${CSI}1K`, lines(count) { let clear = ""; for (let i$1 = 0; i$1 < count; i$1++) clear += this.line + (i$1 < count - 1 ? cursor.up() : ""); if (count) clear += cursor.left; return clear; } }; module.exports = { cursor, scroll, erase, beep }; } }); //#endregion //#region node_modules/.pnpm/@clack+core@1.0.0-alpha.1/node_modules/@clack/core/dist/index.mjs var import_src$1 = __toESM$1(require_src(), 1); var import_picocolors$2 = __toESM$1(require_picocolors$1(), 1); function hu({ onlyFirst: e$1 = !1 } = {}) { const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"); return new RegExp(t, e$1 ? void 0 : "g"); } const cu = hu(); function Y(e$1) { if (typeof e$1 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e$1}\``); return e$1.replace(cu, ""); } function Z(e$1) { return e$1 && e$1.__esModule && Object.prototype.hasOwnProperty.call(e$1, "default") ? e$1.default : e$1; } var q$2 = { exports: {} }; (function(e$1) { var D$1 = {}; e$1.exports = D$1, D$1.eastAsianWidth = function(s) { var i$1 = s.charCodeAt(0), F$1 = s.length == 2 ? s.charCodeAt(1) : 0, u = i$1; return 55296 <= i$1 && i$1 <= 56319 && 56320 <= F$1 && F$1 <= 57343 && (i$1 &= 1023, F$1 &= 1023, u = i$1 << 10 | F$1, u += 65536), u == 12288 || 65281 <= u && u <= 65376 || 65504 <= u && u <= 65510 ? "F" : u == 8361 || 65377 <= u && u <= 65470 || 65474 <= u && u <= 65479 || 65482 <= u && u <= 65487 || 65490 <= u && u <= 65495 || 65498 <= u && u <= 65500 || 65512 <= u && u <= 65518 ? "H" : 4352 <= u && u <= 4447 || 4515 <= u && u <= 4519 || 4602 <= u && u <= 4607 || 9001 <= u && u <= 9002 || 11904 <= u && u <= 11929 || 11931 <= u && u <= 12019 || 12032 <= u && u <= 12245 || 12272 <= u && u <= 12283 || 12289 <= u && u <= 12350 || 12353 <= u && u <= 12438 || 12441 <= u && u <= 12543 || 12549 <= u && u <= 12589 || 12593 <= u && u <= 12686 || 12688 <= u && u <= 12730 || 12736 <= u && u <= 12771 || 12784 <= u && u <= 12830 || 12832 <= u && u <= 12871 || 12880 <= u && u <= 13054 || 13056 <= u && u <= 19903 || 19968 <= u && u <= 42124 || 42128 <= u && u <= 42182 || 43360 <= u && u <= 43388 || 44032 <= u && u <= 55203 || 55216 <= u && u <= 55238 || 55243 <= u && u <= 55291 || 63744 <= u && u <= 64255 || 65040 <= u && u <= 65049 || 65072 <= u && u <= 65106 || 65108 <= u && u <= 65126 || 65128 <= u && u <= 65131 || 110592 <= u && u <= 110593 || 127488 <= u && u <= 127490 || 127504 <= u && u <= 127546 || 127552 <= u && u <= 127560 || 127568 <= u && u <= 127569 || 131072 <= u && u <= 194367 || 177984 <= u && u <= 196605 || 196608 <= u && u <= 262141 ? "W" : 32 <= u && u <= 126 || 162 <= u && u <= 163 || 165 <= u && u <= 166 || u == 172 || u == 175 || 10214 <= u && u <= 10221 || 10629 <= u && u <= 10630 ? "Na" : u == 161 || u == 164 || 167 <= u && u <= 168 || u == 170 || 173 <= u && u <= 174 || 176 <= u && u <= 180 || 182 <= u && u <= 186 || 188 <= u && u <= 191 || u == 198 || u == 208 || 215 <= u && u <= 216 || 222 <= u && u <= 225 || u == 230 || 232 <= u && u <= 234 || 236 <= u && u <= 237 || u == 240 || 242 <= u && u <= 243 || 247 <= u && u <= 250 || u == 252 || u == 254 || u == 257 || u == 273 || u == 275 || u == 283 || 294 <= u && u <= 295 || u == 299 || 305 <= u && u <= 307 || u == 312 || 319 <= u && u <= 322 || u == 324 || 328 <= u && u <= 331 || u == 333 || 338 <= u && u <= 339 || 358 <= u && u <= 359 || u == 363 || u == 462 || u == 464 || u == 466 || u == 468 || u == 470 || u == 472 || u == 474 || u == 476 || u == 593 || u == 609 || u == 708 || u == 711 || 713 <= u && u <= 715 || u == 717 || u == 720 || 728 <= u && u <= 731 || u == 733 || u == 735 || 768 <= u && u <= 879 || 913 <= u && u <= 929 || 931 <= u && u <= 937 || 945 <= u && u <= 961 || 963 <= u && u <= 969 || u == 1025 || 1040 <= u && u <= 1103 || u == 1105 || u == 8208 || 8211 <= u && u <= 8214 || 8216 <= u && u <= 8217 || 8220 <= u && u <= 8221 || 8224 <= u && u <= 8226 || 8228 <= u && u <= 8231 || u == 8240 || 8242 <= u && u <= 8243 || u == 8245 || u == 8251 || u == 8254 || u == 8308 || u == 8319 || 8321 <= u && u <= 8324 || u == 8364 || u == 8451 || u == 8453 || u == 8457 || u == 8467 || u == 8470 || 8481 <= u && u <= 8482 || u == 8486 || u == 8491 || 8531 <= u && u <= 8532 || 8539 <= u && u <= 8542 || 8544 <= u && u <= 8555 || 8560 <= u && u <= 8569 || u == 8585 || 8592 <= u && u <= 8601 || 8632 <= u && u <= 8633 || u == 8658 || u == 8660 || u == 8679 || u == 8704 || 8706 <= u && u <= 8707 || 8711 <= u && u <= 8712 || u == 8715 || u == 8719 || u == 8721 || u == 8725 || u == 8730 || 8733 <= u && u <= 8736 || u == 8739 || u == 8741 || 8743 <= u && u <= 8748 || u == 8750 || 8756 <= u && u <= 8759 || 8764 <= u && u <= 8765 || u == 8776 || u == 8780 || u == 8786 || 8800 <= u && u <= 8801 || 8804 <= u && u <= 8807 || 8810 <= u && u <= 8811 || 8814 <= u && u <= 8815 || 8834 <= u && u <= 8835 || 8838 <= u && u <= 8839 || u == 8853 || u == 8857 || u == 8869 || u == 8895 || u == 8978 || 9312 <= u && u <= 9449 || 9451 <= u && u <= 9547 || 9552 <= u && u <= 9587 || 9600 <= u && u <= 9615 || 9618 <= u && u <= 9621 || 9632 <= u && u <= 9633 || 9635 <= u && u <= 9641 || 9650 <= u && u <= 9651 || 9654 <= u && u <= 9655 || 9660 <= u && u <= 9661 || 9664 <= u && u <= 9665 || 9670 <= u && u <= 9672 || u == 9675 || 9678 <= u && u <= 9681 || 9698 <= u && u <= 9701 || u == 9711 || 9733 <= u && u <= 9734 || u == 9737 || 9742 <= u && u <= 9743 || 9748 <= u && u <= 9749 || u == 9756 || u == 9758 || u == 9792 || u == 9794 || 9824 <= u && u <= 9825 || 9827 <= u && u <= 9829 || 9831 <= u && u <= 9834 || 9836 <= u && u <= 9837 || u == 9839 || 9886 <= u && u <= 9887 || 9918 <= u && u <= 9919 || 9924 <= u && u <= 9933 || 9935 <= u && u <= 9953 || u == 9955 || 9960 <= u && u <= 9983 || u == 10045 || u == 10071 || 10102 <= u && u <= 10111 || 11093 <= u && u <= 11097 || 12872 <= u && u <= 12879 || 57344 <= u && u <= 63743 || 65024 <= u && u <= 65039 || u == 65533 || 127232 <= u && u <= 127242 || 127248 <= u && u <= 127277 || 127280 <= u && u <= 127337 || 127344 <= u && u <= 127386 || 917760 <= u && u <= 917999 || 983040 <= u && u <= 1048573 || 1048576 <= u && u <= 1114109 ? "A" : "N"; }, D$1.characterLength = function(s) { var i$1 = this.eastAsianWidth(s); return i$1 == "F" || i$1 == "W" || i$1 == "A" ? 2 : 1; }; function t(s) { return s.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; } D$1.length = function(s) { for (var i$1 = t(s), F$1 = 0, u = 0; u < i$1.length; u++) F$1 = F$1 + this.characterLength(i$1[u]); return F$1; }, D$1.slice = function(s, i$1, F$1) { textLen = D$1.length(s), i$1 = i$1 || 0, F$1 = F$1 || 1, i$1 < 0 && (i$1 = textLen + i$1), F$1 < 0 && (F$1 = textLen + F$1); for (var u = "", r = 0, a = t(s), n$1 = 0; n$1 < a.length; n$1++) { var l$2 = a[n$1], o$1 = D$1.length(l$2); if (r >= i$1 - (o$1 == 2 ? 1 : 0)) if (r + o$1 <= F$1) u += l$2; else break; r += o$1; } return u; }; })(q$2); var xu = q$2.exports; const Bu = Z(xu); var pu = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; const Au = Z(pu); function b(e$1, D$1 = {}) { if (typeof e$1 != "string" || e$1.length === 0 || (D$1 = { ambiguousIsNarrow: !0, ...D$1 }, e$1 = Y(e$1), e$1.length === 0)) return 0; e$1 = e$1.replace(Au(), " "); const t = D$1.ambiguousIsNarrow ? 1 : 2; let s = 0; for (const i$1 of e$1) { const F$1 = i$1.codePointAt(0); if (F$1 <= 31 || F$1 >= 127 && F$1 <= 159 || F$1 >= 768 && F$1 <= 879) continue; switch (Bu.eastAsianWidth(i$1)) { case "F": case "W": s += 2; break; case "A": s += t; break; default: s += 1; } } return s; } const M = 10, H$1 = (e$1 = 0) => (D$1) => `\x1B[${D$1 + e$1}m`, J$1 = (e$1 = 0) => (D$1) => `\x1B[${38 + e$1};5;${D$1}m`, Q = (e$1 = 0) => (D$1, t, s) => `\x1B[${38 + e$1};2;${D$1};${t};${s}m`, C = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; Object.keys(C.modifier); const fu = Object.keys(C.color), du = Object.keys(C.bgColor); [...fu, ...du]; function gu() { const e$1 = new Map(); for (const [D$1, t] of Object.entries(C)) { for (const [s, i$1] of Object.entries(t)) C[s] = { open: `\x1B[${i$1[0]}m`, close: `\x1B[${i$1[1]}m` }, t[s] = C[s], e$1.set(i$1[0], i$1[1]); Object.defineProperty(C, D$1, { value: t, enumerable: !1 }); } return Object.defineProperty(C, "codes", { value: e$1, enumerable: !1 }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = H$1(), C.color.ansi256 = J$1(), C.color.ansi16m = Q(), C.bgColor.ansi = H$1(M), C.bgColor.ansi256 = J$1(M), C.bgColor.ansi16m = Q(M), Object.defineProperties(C, { rgbToAnsi256: { value: (D$1, t, s) => D$1 === t && t === s ? D$1 < 8 ? 16 : D$1 > 248 ? 231 : Math.round((D$1 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(D$1 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(s / 255 * 5), enumerable: !1 }, hexToRgb: { value: (D$1) => { const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(D$1.toString(16)); if (!t) return [ 0, 0, 0 ]; let [s] = t; s.length === 3 && (s = [...s].map((F$1) => F$1 + F$1).join("")); const i$1 = Number.parseInt(s, 16); return [ i$1 >> 16 & 255, i$1 >> 8 & 255, i$1 & 255 ]; }, enumerable: !1 }, hexToAnsi256: { value: (D$1) => C.rgbToAnsi256(...C.hexToRgb(D$1)), enumerable: !1 }, ansi256ToAnsi: { value: (D$1) => { if (D$1 < 8) return 30 + D$1; if (D$1 < 16) return 90 + (D$1 - 8); let t, s, i$1; if (D$1 >= 232) t = ((D$1 - 232) * 10 + 8) / 255, s = t, i$1 = t; else { D$1 -= 16; const r = D$1 % 36; t = Math.floor(D$1 / 36) / 5, s = Math.floor(r / 6) / 5, i$1 = r % 6 / 5; } const F$1 = Math.max(t, s, i$1) * 2; if (F$1 === 0) return 30; let u = 30 + (Math.round(i$1) << 2 | Math.round(s) << 1 | Math.round(t)); return F$1 === 2 && (u += 60), u; }, enumerable: !1 }, rgbToAnsi: { value: (D$1, t, s) => C.ansi256ToAnsi(C.rgbToAnsi256(D$1, t, s)), enumerable: !1 }, hexToAnsi: { value: (D$1) => C.ansi256ToAnsi(C.hexToAnsi256(D$1)), enumerable: !1 } }), C; } const mu = gu(), $$1 = new Set(["\x1B", "›"]), vu = 39, O$1 = "\x07", X$2 = "[", bu = "]", uu = "m", T$1 = `${bu}8;;`, Du = (e$1) => `${$$1.values().next().value}${X$2}${e$1}${uu}`, tu = (e$1) => `${$$1.values().next().value}${T$1}${e$1}${O$1}`, wu = (e$1) => e$1.split(" ").map((D$1) => b(D$1)), j$1 = (e$1, D$1, t) => { const s = [...D$1]; let i$1 = !1, F$1 = !1, u = b(Y(e$1[e$1.length - 1])); for (const [r, a] of s.entries()) { const n$1 = b(a); if (u + n$1 <= t ? e$1[e$1.length - 1] += a : (e$1.push(a), u = 0), $$1.has(a) && (i$1 = !0, F$1 = s.slice(r + 1).join("").startsWith(T$1)), i$1) { F$1 ? a === O$1 && (i$1 = !1, F$1 = !1) : a === uu && (i$1 = !1); continue; } u += n$1, u === t && r < s.length - 1 && (e$1.push(""), u = 0); } !u && e$1[e$1.length - 1].length > 0 && e$1.length > 1 && (e$1[e$1.length - 2] += e$1.pop()); }, yu = (e$1) => { const D$1 = e$1.split(" "); let t = D$1.length; for (; t > 0 && !(b(D$1[t - 1]) > 0);) t--; return t === D$1.length ? e$1 : D$1.slice(0, t).join(" ") + D$1.slice(t).join(""); }, _u = (e$1, D$1, t = {}) => { if (t.trim !== !1 && e$1.trim() === "") return ""; let s = "", i$1, F$1; const u = wu(e$1); let r = [""]; for (const [n$1, l$2] of e$1.split(" ").entries()) { t.trim !== !1 && (r[r.length - 1] = r[r.length - 1].trimStart()); let o$1 = b(r[r.length - 1]); if (n$1 !== 0 && (o$1 >= D$1 && (t.wordWrap === !1 || t.trim === !1) && (r.push(""), o$1 = 0), (o$1 > 0 || t.trim === !1) && (r[r.length - 1] += " ", o$1++)), t.hard && u[n$1] > D$1) { const A = D$1 - o$1, y = 1 + Math.floor((u[n$1] - A - 1) / D$1); Math.floor((u[n$1] - 1) / D$1) < y && r.push(""), j$1(r, l$2, D$1); continue; } if (o$1 + u[n$1] > D$1 && o$1 > 0 && u[n$1] > 0) { if (t.wordWrap === !1 && o$1 < D$1) { j$1(r, l$2, D$1); continue; } r.push(""); } if (o$1 + u[n$1] > D$1 && t.wordWrap === !1) { j$1(r, l$2, D$1); continue; } r[r.length - 1] += l$2; } t.trim !== !1 && (r = r.map((n$1) => yu(n$1))); const a = [...r.join(` `)]; for (const [n$1, l$2] of a.entries()) { if (s += l$2, $$1.has(l$2)) { const { groups: A } = new RegExp(`(?:\\${X$2}(?<code>\\d+)m|\\${T$1}(?<uri>.*)${O$1})`).exec(a.slice(n$1).join("")) || { groups: {} }; if (A.code !== void 0) { const y = Number.parseFloat(A.code); i$1 = y === vu ? void 0 : y; } else A.uri !== void 0 && (F$1 = A.uri.length === 0 ? void 0 : A.uri); } const o$1 = mu.codes.get(Number(i$1)); a[n$1 + 1] === ` ` ? (F$1 && (s += tu("")), i$1 && o$1 && (s += Du(o$1))) : l$2 === ` ` && (i$1 && o$1 && (s += Du(i$1)), F$1 && (s += tu(F$1))); } return s; }; function eu(e$1, D$1, t) { return String(e$1).normalize().replace(/\r\n/g, ` `).split(` `).map((s) => _u(s, D$1, t)).join(` `); } const $u = [ "up", "down", "left", "right", "space", "enter", "cancel" ], c$1 = { actions: new Set($u), aliases: new Map([ ["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"] ]), messages: { cancel: "Canceled", error: "Something went wrong" } }; function W$1(e$1, D$1) { if (typeof e$1 == "string") return c$1.aliases.get(e$1) === D$1; for (const t of e$1) if (t !== void 0 && W$1(t, D$1)) return !0; return !1; } function ku(e$1, D$1) { if (e$1 === D$1) return; const t = e$1.split(` `), s = D$1.split(` `), i$1 = []; for (let F$1 = 0; F$1 < Math.max(t.length, s.length); F$1++) t[F$1] !== s[F$1] && i$1.push(F$1); return i$1; } const Iu = globalThis.process.platform.startsWith("win"), L$2 = Symbol("clack:cancel"); function Vu(e$1) { return e$1 === L$2; } function S(e$1, D$1) { const t = e$1; t.isTTY && t.setRawMode(D$1); } function Mu({ input: e$1 = stdin, output: D$1 = stdout, overwrite: t = !0, hideCursor: s = !0 } = {}) { const i$1 = _.createInterface({ input: e$1, output: D$1, prompt: "", tabSize: 1 }); _.emitKeypressEvents(e$1, i$1), e$1 instanceof ReadStream && e$1.isTTY && e$1.setRawMode(!0); const F$1 = (u, { name: r, sequence: a }) => { const n$1 = String(u); if (W$1([ n$1, r, a ], "cancel")) { s && D$1.write(import_src$1.cursor.show), process.exit(0); return; } if (!t) return; const l$2 = r === "return" ? 0 : -1, o$1 = r === "return" ? -1 : 0; _.moveCursor(D$1, l$2, o$1, () => { _.clearLine(D$1, 1, () => { e$1.once("keypress", F$1); }); }); }; return s && D$1.write(import_src$1.cursor.hide), e$1.once("keypress", F$1), () => { e$1.off("keypress", F$1), s && D$1.write(import_src$1.cursor.show), e$1 instanceof ReadStream && e$1.isTTY && !Iu && e$1.setRawMode(!1), i$1.terminal = !1, i$1.close(); }; } const Ou = (e$1) => e$1 instanceof WriteStream && e$1.columns ? e$1.columns : 80; var Tu = Object.defineProperty, ju = (e$1, D$1, t) => D$1 in e$1 ? Tu(e$1, D$1, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e$1[D$1] = t, E$1 = (e$1, D$1, t) => (ju(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t); let p = class { constructor(D$1, t = !0) { E$1(this, "input"), E$1(this, "output"), E$1(this, "_abortSignal"), E$1(this, "rl"), E$1(this, "opts"), E$1(this, "_render"), E$1(this, "_track", !1), E$1(this, "_prevFrame", ""), E$1(this, "_subscribers", new Map()), E$1(this, "_cursor", 0), E$1(this, "state", "initial"), E$1(this, "error", ""), E$1(this, "value"), E$1(this, "userInput", ""); const { input: s = stdin, output: i$1 = stdout, render: F$1, signal: u,...r } = D$1; this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = F$1.bind(this), this._track = t, this._abortSignal = u, this.input = s, this.output = i$1; } unsubscribe() { this._subscribers.clear(); } setSubscriber(D$1, t) { const s = this._subscribers.get(D$1) ?? []; s.push(t), this._subscribers.set(D$1, s); } on(D$1, t) { this.setSubscriber(D$1, { cb: t }); } once(D$1, t) { this.setSubscriber(D$1, { cb: t, once: !0 }); } emit(D$1, ...t) { const s = this._subscribers.get(D$1) ?? [], i$1 = []; for (const F$1 of s) F$1.cb(...t), F$1.once && i$1.push(() => s.splice(s.indexOf(F$1), 1)); for (const F$1 of i$1) F$1(); } prompt() { return new Promise((D$1) => { if (this._abortSignal) { if (this._abortSignal.aborted) return this.state = "cancel", this.close(), D$1(L$2); this._abortSignal.addEventListener("abort", () => { this.state = "cancel", this.close(); }, { once: !0 }); } this.rl = Eu.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: !0 }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), S(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => { this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), S(this.input, !1), D$1(this.value); }), this.once("cancel", () => { this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), S(this.input, !1), D$1(L$2); }); }); } _isActionKey(D$1, t) { return D$1 === " "; } _setValue(D$1) { this.value = D$1, this.emit("value", this.value); } _setUserInput(D$1, t) { this.userInput = D$1 ?? "", this.emit("userInput", this.userInput), t && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor); } onKeypress(D$1, t) { if (this._track && t.name !== "return" && (t.name && this._isActionKey(D$1, t) && this.rl?.write(null, { ctrl: !0, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), t?.name && (!this._track && c$1.aliases.has(t.name) && this.emit("cursor", c$1.aliases.get(t.name)), c$1.actions.has(t.name) && this.emit("cursor", t.name)), D$1 && (D$1.toLowerCase() === "y" || D$1.toLowerCase() === "n") && this.emit("confirm", D$1.toLowerCase() === "y"), this.emit("key", D$1?.toLowerCase(), t), t?.name === "return") { if (this.opts.validate) { const s = this.opts.validate(this.value); s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput)); } this.state !== "error" && (this.state = "submit"); } W$1([ D$1, t?.name, t?.sequence ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close(); } close() { this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(` `), S(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe(); } restoreCursor() { const D$1 = eu(this._prevFrame, process.stdout.columns, { hard: !0 }).split(` `).length - 1; this.output.write(import_src$1.cursor.move(-999, D$1 * -1)); } render() { const D$1 = eu(this._render(this) ?? "", process.stdout.columns, { hard: !0 }); if (D$1 !== this._prevFrame) { if (this.state === "initial") this.output.write(import_src$1.cursor.hide); else { const t = ku(this._prevFrame, D$1); if (this.restoreCursor(), t && t?.length === 1) { const s = t[0]; this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.lines(1)); const i$1 = D$1.split(` `); this.output.write(i$1[s]), this._prevFrame = D$1, this.output.write(import_src$1.cursor.move(0, i$1.length - s - 1)); return; } if (t && t?.length > 1) { const s = t[0]; this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.down()); const i$1 = D$1.split(` `).slice(s); this.output.write(i$1.join(` `)), this._prevFrame = D$1; return; } this.output.write(import_src$1.erase.down()); } this.output.write(D$1), this.state === "initial" && (this.state = "active"), this._prevFrame = D$1; } } }, Wu = class extends p { get cursor() { return this.value ? 0 : 1; } get _value() { return this.cursor === 0; } constructor(D$1) { super(D$1, !1), this.value = !!D$1.initialValue, this.on("userInput", () => { this.value = this._value; }), this.on("confirm", (t) => { this.output.write(import_src$1.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close(); }), this.on("cursor", () => { this.value = !this.value; }); } }; var Lu = Object.defineProperty, Nu = (e$1, D$1, t) => D$1 in e$1 ? Lu(e$1, D$1, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e$1[D$1] = t, su = (e$1, D$1, t) => (Nu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t), iu = (e$1, D$1, t) => { if (!D$1.has(e$1)) throw TypeError("Cannot " + t); }, N$1 = (e$1, D$1, t) => (iu(e$1, D$1, "read from private field"), t ? t.call(e$1) : D$1.get(e$1)), Pu = (e$1, D$1, t) => { if (D$1.has(e$1)) throw TypeError("Cannot add the same private member more than once"); D$1 instanceof WeakSet ? D$1.add(e$1) : D$1.set(e$1, t); }, Ru = (e$1, D$1, t, s) => (iu(e$1, D$1, "write to private field"), s ? s.call(e$1, t) : D$1.set(e$1, t), t), d; let Ku = class extends p { constructor(D$1) { super(D$1, !1), su(this, "options"), su(this, "cursor", 0), Pu(this, d, void 0); const { options: t } = D$1; Ru(this, d, D$1.selectableGroups !== !1), this.options = Object.entries(t).flatMap(([s, i$1]) => [{ value: s, group: !0, label: s }, ...i$1.map((F$1) => ({ ...F$1, group: s }))]), this.value = [...D$1.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: s }) => s === D$1.cursorAt), N$1(this, d) ? 0 : 1), this.on("cursor", (s) => { switch (s) { case "left": case "up": { this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1; const i$1 = this.options[this.cursor]?.group === !0; !N$1(this, d) && i$1 && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1); break; } case "down": case "right": { this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1; const i$1 = this.options[this.cu