���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules.1
/
nuxi
/
dist
/
shared
/
Viewing: nuxi.fefc5017.mjs
import { formatWithOptions } from 'node:util'; import { sep } from 'node:path'; import process$1 from 'node:process'; import * as tty from 'node:tty'; import { fileURLToPath } from 'node:url'; const LogLevels = { silent: Number.NEGATIVE_INFINITY, fatal: 0, error: 0, warn: 1, log: 2, info: 3, success: 3, fail: 3, ready: 3, start: 3, box: 3, debug: 4, trace: 5, verbose: Number.POSITIVE_INFINITY }; const LogTypes = { // Silent silent: { level: -1 }, // Level 0 fatal: { level: LogLevels.fatal }, error: { level: LogLevels.error }, // Level 1 warn: { level: LogLevels.warn }, // Level 2 log: { level: LogLevels.log }, // Level 3 info: { level: LogLevels.info }, success: { level: LogLevels.success }, fail: { level: LogLevels.fail }, ready: { level: LogLevels.info }, start: { level: LogLevels.info }, box: { level: LogLevels.info }, // Level 4 debug: { level: LogLevels.debug }, // Level 5 trace: { level: LogLevels.trace }, // Verbose verbose: { level: LogLevels.verbose } }; function isObject(value) { return value !== null && typeof value === "object"; } function _defu(baseObject, defaults, namespace = ".", merger) { if (!isObject(defaults)) { return _defu(baseObject, {}, namespace, merger); } const object = Object.assign({}, defaults); for (const key in baseObject) { if (key === "__proto__" || key === "constructor") { continue; } const value = baseObject[key]; if (value === null || value === void 0) { continue; } if (merger && merger(object, key, value, namespace)) { continue; } if (Array.isArray(value) && Array.isArray(object[key])) { object[key] = [...value, ...object[key]]; } else if (isObject(value) && isObject(object[key])) { object[key] = _defu( value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger ); } else { object[key] = value; } } return object; } function createDefu(merger) { return (...arguments_) => ( // eslint-disable-next-line unicorn/no-array-reduce arguments_.reduce((p, c) => _defu(p, c, "", merger), {}) ); } const defu = createDefu(); function isPlainObject(obj) { return Object.prototype.toString.call(obj) === "[object Object]"; } function isLogObj(arg) { if (!isPlainObject(arg)) { return false; } if (!arg.message && !arg.args) { return false; } if (arg.stack) { return false; } return true; } let paused = false; const queue = []; class Consola { constructor(options = {}) { const types = options.types || LogTypes; this.options = defu( { ...options, defaults: { ...options.defaults }, level: _normalizeLogLevel(options.level, types), reporters: [...options.reporters || []] }, { types: LogTypes, throttle: 1e3, throttleMin: 5, formatOptions: { date: true, colors: false, compact: true } } ); for (const type in types) { const defaults = { type, ...this.options.defaults, ...types[type] }; this[type] = this._wrapLogFn(defaults); this[type].raw = this._wrapLogFn( defaults, true ); } if (this.options.mockFn) { this.mockTypes(); } this._lastLog = {}; } get level() { return this.options.level; } set level(level) { this.options.level = _normalizeLogLevel( level, this.options.types, this.options.level ); } prompt(message, opts) { if (!this.options.prompt) { throw new Error("prompt is not supported!"); } return this.options.prompt(message, opts); } create(options) { const instance = new Consola({ ...this.options, ...options }); if (this._mockFn) { instance.mockTypes(this._mockFn); } return instance; } withDefaults(defaults) { return this.create({ ...this.options, defaults: { ...this.options.defaults, ...defaults } }); } withTag(tag) { return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag }); } addReporter(reporter) { this.options.reporters.push(reporter); return this; } removeReporter(reporter) { if (reporter) { const i = this.options.reporters.indexOf(reporter); if (i >= 0) { return this.options.reporters.splice(i, 1); } } else { this.options.reporters.splice(0); } return this; } setReporters(reporters) { this.options.reporters = Array.isArray(reporters) ? reporters : [reporters]; return this; } wrapAll() { this.wrapConsole(); this.wrapStd(); } restoreAll() { this.restoreConsole(); this.restoreStd(); } wrapConsole() { for (const type in this.options.types) { if (!console["__" + type]) { console["__" + type] = console[type]; } console[type] = this[type].raw; } } restoreConsole() { for (const type in this.options.types) { if (console["__" + type]) { console[type] = console["__" + type]; delete console["__" + type]; } } } wrapStd() { this._wrapStream(this.options.stdout, "log"); this._wrapStream(this.options.stderr, "log"); } _wrapStream(stream, type) { if (!stream) { return; } if (!stream.__write) { stream.__write = stream.write; } stream.write = (data) => { this[type].raw(String(data).trim()); }; } restoreStd() { this._restoreStream(this.options.stdout); this._restoreStream(this.options.stderr); } _restoreStream(stream) { if (!stream) { return; } if (stream.__write) { stream.write = stream.__write; delete stream.__write; } } pauseLogs() { paused = true; } resumeLogs() { paused = false; const _queue = queue.splice(0); for (const item of _queue) { item[0]._logFn(item[1], item[2]); } } mockTypes(mockFn) { const _mockFn = mockFn || this.options.mockFn; this._mockFn = _mockFn; if (typeof _mockFn !== "function") { return; } for (const type in this.options.types) { this[type] = _mockFn(type, this.options.types[type]) || this[type]; this[type].raw = this[type]; } } _wrapLogFn(defaults, isRaw) { return (...args) => { if (paused) { queue.push([this, defaults, args, isRaw]); return; } return this._logFn(defaults, args, isRaw); }; } _logFn(defaults, args, isRaw) { if ((defaults.level || 0) > this.level) { return false; } const logObj = { date: /* @__PURE__ */ new Date(), args: [], ...defaults, level: _normalizeLogLevel(defaults.level, this.options.types) }; if (!isRaw && args.length === 1 && isLogObj(args[0])) { Object.assign(logObj, args[0]); } else { logObj.args = [...args]; } if (logObj.message) { logObj.args.unshift(logObj.message); delete logObj.message; } if (logObj.additional) { if (!Array.isArray(logObj.additional)) { logObj.additional = logObj.additional.split("\n"); } logObj.args.push("\n" + logObj.additional.join("\n")); delete logObj.additional; } logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log"; logObj.tag = typeof logObj.tag === "string" ? logObj.tag : ""; const resolveLog = (newLog = false) => { const repeated = (this._lastLog.count || 0) - this.options.throttleMin; if (this._lastLog.object && repeated > 0) { const args2 = [...this._lastLog.object.args]; if (repeated > 1) { args2.push(`(repeated ${repeated} times)`); } this._log({ ...this._lastLog.object, args: args2 }); this._lastLog.count = 1; } if (newLog) { this._lastLog.object = logObj; this._log(logObj); } }; clearTimeout(this._lastLog.timeout); const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0; this._lastLog.time = logObj.date; if (diffTime < this.options.throttle) { try { const serializedLog = JSON.stringify([ logObj.type, logObj.tag, logObj.args ]); const isSameLog = this._lastLog.serialized === serializedLog; this._lastLog.serialized = serializedLog; if (isSameLog) { this._lastLog.count = (this._lastLog.count || 0) + 1; if (this._lastLog.count > this.options.throttleMin) { this._lastLog.timeout = setTimeout( resolveLog, this.options.throttle ); return; } } } catch { } } resolveLog(true); } _log(logObj) { for (const reporter of this.options.reporters) { reporter.log(logObj, { options: this.options }); } } } function _normalizeLogLevel(input, types = {}, defaultLevel = 3) { if (input === void 0) { return defaultLevel; } if (typeof input === "number") { return input; } if (types[input] && types[input].level !== void 0) { return types[input].level; } return defaultLevel; } Consola.prototype.add = Consola.prototype.addReporter; Consola.prototype.remove = Consola.prototype.removeReporter; Consola.prototype.clear = Consola.prototype.removeReporter; Consola.prototype.withScope = Consola.prototype.withTag; Consola.prototype.mock = Consola.prototype.mockTypes; Consola.prototype.pause = Consola.prototype.pauseLogs; Consola.prototype.resume = Consola.prototype.resumeLogs; function createConsola$1(options = {}) { return new Consola(options); } function parseStack(stack) { const cwd = process.cwd() + sep; const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, "")); return lines; } function writeStream(data, stream) { const write = stream.__write || stream.write; return write.call(stream, data); } const bracket = (x) => x ? `[${x}]` : ""; class BasicReporter { formatStack(stack, opts) { return " " + parseStack(stack).join("\n "); } formatArgs(args, opts) { const _args = args.map((arg) => { if (arg && typeof arg.stack === "string") { return arg.message + "\n" + this.formatStack(arg.stack, opts); } return arg; }); return formatWithOptions(opts, ..._args); } formatDate(date, opts) { return opts.date ? date.toLocaleTimeString() : ""; } filterAndJoin(arr) { return arr.filter(Boolean).join(" "); } formatLogObj(logObj, opts) { const message = this.formatArgs(logObj.args, opts); if (logObj.type === "box") { return "\n" + [ bracket(logObj.tag), logObj.title && logObj.title, ...message.split("\n") ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n"; } return this.filterAndJoin([ bracket(logObj.type), bracket(logObj.tag), message ]); } log(logObj, ctx) { const line = this.formatLogObj(logObj, { columns: ctx.options.stdout.columns || 0, ...ctx.options.formatOptions }); return writeStream( line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout ); } } const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process; const isDisabled = "NO_COLOR" in env || argv.includes("--no-color"); const isForced = "FORCE_COLOR" in env || argv.includes("--color"); const isWindows = platform === "win32"; const isDumbTerminal = env.TERM === "dumb"; const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal; const isCI$1 = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env); const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1); function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) { return head + (next < 0 ? tail : replaceClose(next, tail, close, replace)); } function clearBleed(index, string, open, close, replace) { return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close; } function filterEmpty(open, close, replace = open, at = open.length + 1) { return (string) => string || !(string === "" || string === void 0) ? clearBleed( ("" + string).indexOf(close, at), string, open, close, replace ) : ""; } function init(open, close, replace) { return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace); } const colorDefs = { reset: init(0, 0), bold: init(1, 22, "\x1B[22m\x1B[1m"), dim: init(2, 22, "\x1B[22m\x1B[2m"), italic: init(3, 23), underline: init(4, 24), inverse: init(7, 27), hidden: init(8, 28), strikethrough: init(9, 29), black: init(30, 39), red: init(31, 39), green: init(32, 39), yellow: init(33, 39), blue: init(34, 39), magenta: init(35, 39), cyan: init(36, 39), white: init(37, 39), gray: init(90, 39), bgBlack: init(40, 49), bgRed: init(41, 49), bgGreen: init(42, 49), bgYellow: init(43, 49), bgBlue: init(44, 49), bgMagenta: init(45, 49), bgCyan: init(46, 49), bgWhite: init(47, 49), blackBright: init(90, 39), redBright: init(91, 39), greenBright: init(92, 39), yellowBright: init(93, 39), blueBright: init(94, 39), magentaBright: init(95, 39), cyanBright: init(96, 39), whiteBright: init(97, 39), bgBlackBright: init(100, 49), bgRedBright: init(101, 49), bgGreenBright: init(102, 49), bgYellowBright: init(103, 49), bgBlueBright: init(104, 49), bgMagentaBright: init(105, 49), bgCyanBright: init(106, 49), bgWhiteBright: init(107, 49) }; function createColors(useColor = isColorSupported) { return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String])); } const colors = createColors(); function getColor$1(color, fallback = "reset") { return colors[color] || colors[fallback]; } const ansiRegex$1 = [ "[\\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=><~]))" ].join("|"); function stripAnsi$1(text) { return text.replace(new RegExp(ansiRegex$1, "g"), ""); } const boxStylePresets = { solid: { tl: "\u250C", tr: "\u2510", bl: "\u2514", br: "\u2518", h: "\u2500", v: "\u2502" }, double: { tl: "\u2554", tr: "\u2557", bl: "\u255A", br: "\u255D", h: "\u2550", v: "\u2551" }, doubleSingle: { tl: "\u2553", tr: "\u2556", bl: "\u2559", br: "\u255C", h: "\u2500", v: "\u2551" }, doubleSingleRounded: { tl: "\u256D", tr: "\u256E", bl: "\u2570", br: "\u256F", h: "\u2500", v: "\u2551" }, singleThick: { tl: "\u250F", tr: "\u2513", bl: "\u2517", br: "\u251B", h: "\u2501", v: "\u2503" }, singleDouble: { tl: "\u2552", tr: "\u2555", bl: "\u2558", br: "\u255B", h: "\u2550", v: "\u2502" }, singleDoubleRounded: { tl: "\u256D", tr: "\u256E", bl: "\u2570", br: "\u256F", h: "\u2550", v: "\u2502" }, rounded: { tl: "\u256D", tr: "\u256E", bl: "\u2570", br: "\u256F", h: "\u2500", v: "\u2502" } }; const defaultStyle = { borderColor: "white", borderStyle: "rounded", valign: "center", padding: 2, marginLeft: 1, marginTop: 1, marginBottom: 1 }; function box(text, _opts = {}) { const opts = { ..._opts, style: { ...defaultStyle, ..._opts.style } }; const textLines = text.split("\n"); const boxLines = []; const _color = getColor$1(opts.style.borderColor); const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle }; if (_color) { for (const key in borderStyle) { borderStyle[key] = _color( borderStyle[key] ); } } const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1; const height = textLines.length + paddingOffset; const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset; const widthOffset = width + paddingOffset; const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : ""; if (opts.style.marginTop > 0) { boxLines.push("".repeat(opts.style.marginTop)); } if (opts.title) { const left = borderStyle.h.repeat( Math.floor((width - stripAnsi$1(opts.title).length) / 2) ); const right = borderStyle.h.repeat( width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset ); boxLines.push( `${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}` ); } else { boxLines.push( `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}` ); } const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length; for (let i = 0; i < height; i++) { if (i < valignOffset || i >= valignOffset + textLines.length) { boxLines.push( `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}` ); } else { const line = textLines[i - valignOffset]; const left = " ".repeat(paddingOffset); const right = " ".repeat(width - stripAnsi$1(line).length); boxLines.push( `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}` ); } } boxLines.push( `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}` ); if (opts.style.marginBottom > 0) { boxLines.push("".repeat(opts.style.marginBottom)); } return boxLines.join("\n"); } const providers = [ ["APPVEYOR"], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"] ]; function detectProvider(env) { for (const provider of providers) { const envName = provider[1] || provider[0]; if (env[envName]) { return { name: provider[0].toLowerCase(), ...provider[2] }; } } if (env.SHELL && env.SHELL === "/bin/jsh") { return { name: "stackblitz", ci: false }; } return { name: "", ci: false }; } const processShim = typeof process !== "undefined" ? process : {}; const envShim = processShim.env || {}; const providerInfo = detectProvider(envShim); const nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || ""; processShim.platform; providerInfo.name; const isCI = toBoolean(envShim.CI) || providerInfo.ci !== false; const hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY); const isDebug = toBoolean(envShim.DEBUG); const isTest = nodeENV === "test" || toBoolean(envShim.TEST); toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY; function toBoolean(val) { return val ? val !== "false" : false; } function ansiRegex({onlyFirst = false} = {}) { const pattern = [ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); return new RegExp(pattern, onlyFirst ? undefined : 'g'); } const regex = ansiRegex(); function stripAnsi(string) { if (typeof string !== 'string') { throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); } // Even though the regex is global, we don't need to reset the `.lastIndex` // because unlike `.exec()` and `.test()`, `.replace()` does it automatically // and doing it manually has a performance penalty. return string.replace(regex, ''); } function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } var eastasianwidth = {exports: {}}; (function (module) { var eaw = {}; { module.exports = eaw; } eaw.eastAsianWidth = function(character) { var x = character.charCodeAt(0); var y = (character.length == 2) ? character.charCodeAt(1) : 0; var codePoint = x; if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) { x &= 0x3FF; y &= 0x3FF; codePoint = (x << 10) | y; codePoint += 0x10000; } if ((0x3000 == codePoint) || (0xFF01 <= codePoint && codePoint <= 0xFF60) || (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) { return 'F'; } if ((0x20A9 == codePoint) || (0xFF61 <= codePoint && codePoint <= 0xFFBE) || (0xFFC2 <= codePoint && codePoint <= 0xFFC7) || (0xFFCA <= codePoint && codePoint <= 0xFFCF) || (0xFFD2 <= codePoint && codePoint <= 0xFFD7) || (0xFFDA <= codePoint && codePoint <= 0xFFDC) || (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) { return 'H'; } if ((0x1100 <= codePoint && codePoint <= 0x115F) || (0x11A3 <= codePoint && codePoint <= 0x11A7) || (0x11FA <= codePoint && codePoint <= 0x11FF) || (0x2329 <= codePoint && codePoint <= 0x232A) || (0x2E80 <= codePoint && codePoint <= 0x2E99) || (0x2E9B <= codePoint && codePoint <= 0x2EF3) || (0x2F00 <= codePoint && codePoint <= 0x2FD5) || (0x2FF0 <= codePoint && codePoint <= 0x2FFB) || (0x3001 <= codePoint && codePoint <= 0x303E) || (0x3041 <= codePoint && codePoint <= 0x3096) || (0x3099 <= codePoint && codePoint <= 0x30FF) || (0x3105 <= codePoint && codePoint <= 0x312D) || (0x3131 <= codePoint && codePoint <= 0x318E) || (0x3190 <= codePoint && codePoint <= 0x31BA) || (0x31C0 <= codePoint && codePoint <= 0x31E3) || (0x31F0 <= codePoint && codePoint <= 0x321E) || (0x3220 <= codePoint && codePoint <= 0x3247) || (0x3250 <= codePoint && codePoint <= 0x32FE) || (0x3300 <= codePoint && codePoint <= 0x4DBF) || (0x4E00 <= codePoint && codePoint <= 0xA48C) || (0xA490 <= codePoint && codePoint <= 0xA4C6) || (0xA960 <= codePoint && codePoint <= 0xA97C) || (0xAC00 <= codePoint && codePoint <= 0xD7A3) || (0xD7B0 <= codePoint && codePoint <= 0xD7C6) || (0xD7CB <= codePoint && codePoint <= 0xD7FB) || (0xF900 <= codePoint && codePoint <= 0xFAFF) || (0xFE10 <= codePoint && codePoint <= 0xFE19) || (0xFE30 <= codePoint && codePoint <= 0xFE52) || (0xFE54 <= codePoint && codePoint <= 0xFE66) || (0xFE68 <= codePoint && codePoint <= 0xFE6B) || (0x1B000 <= codePoint && codePoint <= 0x1B001) || (0x1F200 <= codePoint && codePoint <= 0x1F202) || (0x1F210 <= codePoint && codePoint <= 0x1F23A) || (0x1F240 <= codePoint && codePoint <= 0x1F248) || (0x1F250 <= codePoint && codePoint <= 0x1F251) || (0x20000 <= codePoint && codePoint <= 0x2F73F) || (0x2B740 <= codePoint && codePoint <= 0x2FFFD) || (0x30000 <= codePoint && codePoint <= 0x3FFFD)) { return 'W'; } if ((0x0020 <= codePoint && codePoint <= 0x007E) || (0x00A2 <= codePoint && codePoint <= 0x00A3) || (0x00A5 <= codePoint && codePoint <= 0x00A6) || (0x00AC == codePoint) || (0x00AF == codePoint) || (0x27E6 <= codePoint && codePoint <= 0x27ED) || (0x2985 <= codePoint && codePoint <= 0x2986)) { return 'Na'; } if ((0x00A1 == codePoint) || (0x00A4 == codePoint) || (0x00A7 <= codePoint && codePoint <= 0x00A8) || (0x00AA == codePoint) || (0x00AD <= codePoint && codePoint <= 0x00AE) || (0x00B0 <= codePoint && codePoint <= 0x00B4) || (0x00B6 <= codePoint && codePoint <= 0x00BA) || (0x00BC <= codePoint && codePoint <= 0x00BF) || (0x00C6 == codePoint) || (0x00D0 == codePoint) || (0x00D7 <= codePoint && codePoint <= 0x00D8) || (0x00DE <= codePoint && codePoint <= 0x00E1) || (0x00E6 == codePoint) || (0x00E8 <= codePoint && codePoint <= 0x00EA) || (0x00EC <= codePoint && codePoint <= 0x00ED) || (0x00F0 == codePoint) || (0x00F2 <= codePoint && codePoint <= 0x00F3) || (0x00F7 <= codePoint && codePoint <= 0x00FA) || (0x00FC == codePoint) || (0x00FE == codePoint) || (0x0101 == codePoint) || (0x0111 == codePoint) || (0x0113 == codePoint) || (0x011B == codePoint) || (0x0126 <= codePoint && codePoint <= 0x0127) || (0x012B == codePoint) || (0x0131 <= codePoint && codePoint <= 0x0133) || (0x0138 == codePoint) || (0x013F <= codePoint && codePoint <= 0x0142) || (0x0144 == codePoint) || (0x0148 <= codePoint && codePoint <= 0x014B) || (0x014D == codePoint) || (0x0152 <= codePoint && codePoint <= 0x0153) || (0x0166 <= codePoint && codePoint <= 0x0167) || (0x016B == codePoint) || (0x01CE == codePoint) || (0x01D0 == codePoint) || (0x01D2 == codePoint) || (0x01D4 == codePoint) || (0x01D6 == codePoint) || (0x01D8 == codePoint) || (0x01DA == codePoint) || (0x01DC == codePoint) || (0x0251 == codePoint) || (0x0261 == codePoint) || (0x02C4 == codePoint) || (0x02C7 == codePoint) || (0x02C9 <= codePoint && codePoint <= 0x02CB) || (0x02CD == codePoint) || (0x02D0 == codePoint) || (0x02D8 <= codePoint && codePoint <= 0x02DB) || (0x02DD == codePoint) || (0x02DF == codePoint) || (0x0300 <= codePoint && codePoint <= 0x036F) || (0x0391 <= codePoint && codePoint <= 0x03A1) || (0x03A3 <= codePoint && codePoint <= 0x03A9) || (0x03B1 <= codePoint && codePoint <= 0x03C1) || (0x03C3 <= codePoint && codePoint <= 0x03C9) || (0x0401 == codePoint) || (0x0410 <= codePoint && codePoint <= 0x044F) || (0x0451 == codePoint) || (0x2010 == codePoint) || (0x2013 <= codePoint && codePoint <= 0x2016) || (0x2018 <= codePoint && codePoint <= 0x2019) || (0x201C <= codePoint && codePoint <= 0x201D) || (0x2020 <= codePoint && codePoint <= 0x2022) || (0x2024 <= codePoint && codePoint <= 0x2027) || (0x2030 == codePoint) || (0x2032 <= codePoint && codePoint <= 0x2033) || (0x2035 == codePoint) || (0x203B == codePoint) || (0x203E == codePoint) || (0x2074 == codePoint) || (0x207F == codePoint) || (0x2081 <= codePoint && codePoint <= 0x2084) || (0x20AC == codePoint) || (0x2103 == codePoint) || (0x2105 == codePoint) || (0x2109 == codePoint) || (0x2113 == codePoint) || (0x2116 == codePoint) || (0x2121 <= codePoint && codePoint <= 0x2122) || (0x2126 == codePoint) || (0x212B == codePoint) || (0x2153 <= codePoint && codePoint <= 0x2154) || (0x215B <= codePoint && codePoint <= 0x215E) || (0x2160 <= codePoint && codePoint <= 0x216B) || (0x2170 <= codePoint && codePoint <= 0x2179) || (0x2189 == codePoint) || (0x2190 <= codePoint && codePoint <= 0x2199) || (0x21B8 <= codePoint && codePoint <= 0x21B9) || (0x21D2 == codePoint) || (0x21D4 == codePoint) || (0x21E7 == codePoint) || (0x2200 == codePoint) || (0x2202 <= codePoint && codePoint <= 0x2203) || (0x2207 <= codePoint && codePoint <= 0x2208) || (0x220B == codePoint) || (0x220F == codePoint) || (0x2211 == codePoint) || (0x2215 == codePoint) || (0x221A == codePoint) || (0x221D <= codePoint && codePoint <= 0x2220) || (0x2223 == codePoint) || (0x2225 == codePoint) || (0x2227 <= codePoint && codePoint <= 0x222C) || (0x222E == codePoint) || (0x2234 <= codePoint && codePoint <= 0x2237) || (0x223C <= codePoint && codePoint <= 0x223D) || (0x2248 == codePoint) || (0x224C == codePoint) || (0x2252 == codePoint) || (0x2260 <= codePoint && codePoint <= 0x2261) || (0x2264 <= codePoint && codePoint <= 0x2267) || (0x226A <= codePoint && codePoint <= 0x226B) || (0x226E <= codePoint && codePoint <= 0x226F) || (0x2282 <= codePoint && codePoint <= 0x2283) || (0x2286 <= codePoint && codePoint <= 0x2287) || (0x2295 == codePoint) || (0x2299 == codePoint) || (0x22A5 == codePoint) || (0x22BF == codePoint) || (0x2312 == codePoint) || (0x2460 <= codePoint && codePoint <= 0x24E9) || (0x24EB <= codePoint && codePoint <= 0x254B) || (0x2550 <= codePoint && codePoint <= 0x2573) || (0x2580 <= codePoint && codePoint <= 0x258F) || (0x2592 <= codePoint && codePoint <= 0x2595) || (0x25A0 <= codePoint && codePoint <= 0x25A1) || (0x25A3 <= codePoint && codePoint <= 0x25A9) || (0x25B2 <= codePoint && codePoint <= 0x25B3) || (0x25B6 <= codePoint && codePoint <= 0x25B7) || (0x25BC <= codePoint && codePoint <= 0x25BD) || (0x25C0 <= codePoint && codePoint <= 0x25C1) || (0x25C6 <= codePoint && codePoint <= 0x25C8) || (0x25CB == codePoint) || (0x25CE <= codePoint && codePoint <= 0x25D1) || (0x25E2 <= codePoint && codePoint <= 0x25E5) || (0x25EF == codePoint) || (0x2605 <= codePoint && codePoint <= 0x2606) || (0x2609 == codePoint) || (0x260E <= codePoint && codePoint <= 0x260F) || (0x2614 <= codePoint && codePoint <= 0x2615) || (0x261C == codePoint) || (0x261E == codePoint) || (0x2640 == codePoint) || (0x2642 == codePoint) || (0x2660 <= codePoint && codePoint <= 0x2661) || (0x2663 <= codePoint && codePoint <= 0x2665) || (0x2667 <= codePoint && codePoint <= 0x266A) || (0x266C <= codePoint && codePoint <= 0x266D) || (0x266F == codePoint) || (0x269E <= codePoint && codePoint <= 0x269F) || (0x26BE <= codePoint && codePoint <= 0x26BF) || (0x26C4 <= codePoint && codePoint <= 0x26CD) || (0x26CF <= codePoint && codePoint <= 0x26E1) || (0x26E3 == codePoint) || (0x26E8 <= codePoint && codePoint <= 0x26FF) || (0x273D == codePoint) || (0x2757 == codePoint) || (0x2776 <= codePoint && codePoint <= 0x277F) || (0x2B55 <= codePoint && codePoint <= 0x2B59) || (0x3248 <= codePoint && codePoint <= 0x324F) || (0xE000 <= codePoint && codePoint <= 0xF8FF) || (0xFE00 <= codePoint && codePoint <= 0xFE0F) || (0xFFFD == codePoint) || (0x1F100 <= codePoint && codePoint <= 0x1F10A) || (0x1F110 <= codePoint && codePoint <= 0x1F12D) || (0x1F130 <= codePoint && codePoint <= 0x1F169) || (0x1F170 <= codePoint && codePoint <= 0x1F19A) || (0xE0100 <= codePoint && codePoint <= 0xE01EF) || (0xF0000 <= codePoint && codePoint <= 0xFFFFD) || (0x100000 <= codePoint && codePoint <= 0x10FFFD)) { return 'A'; } return 'N'; }; eaw.characterLength = function(character) { var code = this.eastAsianWidth(character); if (code == 'F' || code == 'W' || code == 'A') { return 2; } else { return 1; } }; // Split a string considering surrogate-pairs. function stringToArray(string) { return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; } eaw.length = function(string) { var characters = stringToArray(string); var len = 0; for (var i = 0; i < characters.length; i++) { len = len + this.characterLength(characters[i]); } return len; }; eaw.slice = function(text, start, end) { textLen = eaw.length(text); start = start ? start : 0; end = end ? end : 1; if (start < 0) { start = textLen + start; } if (end < 0) { end = textLen + end; } var result = ''; var eawLen = 0; var chars = stringToArray(text); for (var i = 0; i < chars.length; i++) { var char = chars[i]; var charLen = eaw.length(char); if (eawLen >= start - (charLen == 2 ? 1 : 0)) { if (eawLen + charLen <= end) { result += char; } else { break; } } eawLen += charLen; } return result; }; } (eastasianwidth)); var eastasianwidthExports = eastasianwidth.exports; const eastAsianWidth = /*@__PURE__*/getDefaultExportFromCjs(eastasianwidthExports); const emojiRegex = () => { // https://mths.be/emoji 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\u26D3\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\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]|\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-\uDDF5\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]|\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(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\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-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\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-\uDDB3\uDDBC\uDDBD])|\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-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; }; function stringWidth$1(string, options) { if (typeof string !== 'string' || string.length === 0) { return 0; } options = { ambiguousIsNarrow: true, countAnsiEscapeCodes: false, ...options, }; if (!options.countAnsiEscapeCodes) { string = stripAnsi(string); } if (string.length === 0) { return 0; } const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2; let width = 0; for (const {segment: character} of new Intl.Segmenter().segment(string)) { const codePoint = character.codePointAt(0); // Ignore control characters if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { continue; } // Ignore combining characters if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) { continue; } if (emojiRegex().test(character)) { width += 2; continue; } const code = eastAsianWidth.eastAsianWidth(character); switch (code) { case 'F': case 'W': { width += 2; break; } case 'A': { width += ambiguousCharacterWidth; break; } default: { width += 1; } } } return width; } function isUnicodeSupported() { if (process$1.platform !== 'win32') { return process$1.env.TERM !== 'linux'; // Linux console (kernel) } return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) // Windows Terminal || Boolean(process$1.env.TERMINUS_SUBLIME) // Terminus (<0.2.27) || process$1.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder || process$1.env.TERM_PROGRAM === 'Terminus-Sublime' || process$1.env.TERM_PROGRAM === 'vscode' || process$1.env.TERM === 'xterm-256color' || process$1.env.TERM === 'alacritty' || process$1.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm'; } const TYPE_COLOR_MAP = { info: "cyan", fail: "red", success: "green", ready: "green", start: "magenta" }; const LEVEL_COLOR_MAP = { 0: "red", 1: "yellow" }; const unicode = isUnicodeSupported(); const s$1 = (c, fallback) => unicode ? c : fallback; const TYPE_ICONS = { error: s$1("\u2716", "\xD7"), fatal: s$1("\u2716", "\xD7"), ready: s$1("\u2714", "\u221A"), warn: s$1("\u26A0", "\u203C"), info: s$1("\u2139", "i"), success: s$1("\u2714", "\u221A"), debug: s$1("\u2699", "D"), trace: s$1("\u2192", "\u2192"), fail: s$1("\u2716", "\xD7"), start: s$1("\u25D0", "o"), log: "" }; function stringWidth(str) { if (!Intl.Segmenter) { return stripAnsi$1(str).length; } return stringWidth$1(str); } class FancyReporter extends BasicReporter { formatStack(stack) { return "\n" + parseStack(stack).map( (line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`) ).join("\n"); } formatType(logObj, isBadge, opts) { const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray"; if (isBadge) { return getBgColor(typeColor)( colors.black(` ${logObj.type.toUpperCase()} `) ); } const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type; return _type ? getColor(typeColor)(_type) : ""; } formatLogObj(logObj, opts) { const [message, ...additional] = this.formatArgs(logObj.args, opts).split( "\n" ); if (logObj.type === "box") { return box( characterFormat( message + (additional.length > 0 ? "\n" + additional.join("\n") : "") ), { title: logObj.title ? characterFormat(logObj.title) : void 0, style: logObj.style } ); } const date = this.formatDate(logObj.date, opts); const coloredDate = date && colors.gray(date); const isBadge = logObj.badge ?? logObj.level < 2; const type = this.formatType(logObj, isBadge, opts); const tag = logObj.tag ? colors.gray(logObj.tag) : ""; let line; const left = this.filterAndJoin([type, characterFormat(message)]); const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]); const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2; line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left; line += characterFormat( additional.length > 0 ? "\n" + additional.join("\n") : "" ); if (logObj.type === "trace") { const _err = new Error("Trace: " + logObj.message); line += this.formatStack(_err.stack || ""); } return isBadge ? "\n" + line + "\n" : line; } } function characterFormat(str) { return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `); } function getColor(color = "white") { return colors[color] || colors.white; } function getBgColor(color = "bgWhite") { return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite; } function createConsola(options = {}) { let level = _getDefaultLogLevel(); if (process.env.CONSOLA_LEVEL) { level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level; } const consola2 = createConsola$1({ level, defaults: { level }, stdout: process.stdout, stderr: process.stderr, prompt: (...args) => import('../chunks/prompt.mjs').then((m) => m.prompt(...args)), reporters: options.reporters || [ options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter() ], ...options }); return consola2; } function _getDefaultLogLevel() { if (isDebug) { return LogLevels.debug; } if (isTest) { return LogLevels.warn; } return LogLevels.info; } const consola = createConsola(); function toArray(val) { if (Array.isArray(val)) { return val; } return val === void 0 ? [] : [val]; } function formatLineColumns(lines, linePrefix = "") { const maxLengh = []; for (const line of lines) { for (const [i, element] of line.entries()) { maxLengh[i] = Math.max(maxLengh[i] || 0, element.length); } } return lines.map( (l) => l.map( (c, i) => linePrefix + c[i === 0 ? "padStart" : "padEnd"](maxLengh[i]) ).join(" ") ).join("\n"); } function resolveValue(input) { return typeof input === "function" ? input() : input; } class CLIError extends Error { constructor(message, code) { super(message); this.code = code; this.name = "CLIError"; } } const NUMBER_CHAR_RE = /\d/; const STR_SPLITTERS = ["-", "_", "/", "."]; function isUppercase(char = "") { if (NUMBER_CHAR_RE.test(char)) { return void 0; } return char !== char.toLowerCase(); } function splitByCase(str, separators) { const splitters = separators ?? STR_SPLITTERS; const parts = []; if (!str || typeof str !== "string") { return parts; } let buff = ""; let previousUpper; let previousSplitter; for (const char of str) { const isSplitter = splitters.includes(char); if (isSplitter === true) { parts.push(buff); buff = ""; previousUpper = void 0; continue; } const isUpper = isUppercase(char); if (previousSplitter === false) { if (previousUpper === false && isUpper === true) { parts.push(buff); buff = char; previousUpper = isUpper; continue; } if (previousUpper === true && isUpper === false && buff.length > 1) { const lastChar = buff.at(-1); parts.push(buff.slice(0, Math.max(0, buff.length - 1))); buff = lastChar + char; previousUpper = isUpper; continue; } } buff += char; previousUpper = isUpper; previousSplitter = isSplitter; } parts.push(buff); return parts; } function upperFirst(str) { return str ? str[0].toUpperCase() + str.slice(1) : ""; } function lowerFirst(str) { return str ? str[0].toLowerCase() + str.slice(1) : ""; } function pascalCase(str, opts) { return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : ""; } function camelCase(str, opts) { return lowerFirst(pascalCase(str || "", opts)); } function kebabCase(str, joiner) { return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : ""; } function toArr(any) { return any == void 0 ? [] : Array.isArray(any) ? any : [any]; } function toVal(out, key, val, opts) { let x; const old = out[key]; const nxt = ~opts.string.indexOf(key) ? val == void 0 || val === true ? "" : String(val) : typeof val === "boolean" ? val : ~opts.boolean.indexOf(key) ? val === "false" ? false : val === "true" || (out._.push((x = +val, x * 0 === 0) ? x : val), !!val) : (x = +val, x * 0 === 0) ? x : val; out[key] = old == void 0 ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt]; } function parseRawArgs(args = [], opts = {}) { let k; let arr; let arg; let name; let val; const out = { _: [] }; let i = 0; let j = 0; let idx = 0; const len = args.length; const alibi = opts.alias !== void 0; const strict = opts.unknown !== void 0; const defaults = opts.default !== void 0; opts.alias = opts.alias || {}; opts.string = toArr(opts.string); opts.boolean = toArr(opts.boolean); if (alibi) { for (k in opts.alias) { arr = opts.alias[k] = toArr(opts.alias[k]); for (i = 0; i < arr.length; i++) { (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1); } } } for (i = opts.boolean.length; i-- > 0; ) { arr = opts.alias[opts.boolean[i]] || []; for (j = arr.length; j-- > 0; ) { opts.boolean.push(arr[j]); } } for (i = opts.string.length; i-- > 0; ) { arr = opts.alias[opts.string[i]] || []; for (j = arr.length; j-- > 0; ) { opts.string.push(arr[j]); } } if (defaults) { for (k in opts.default) { name = typeof opts.default[k]; arr = opts.alias[k] = opts.alias[k] || []; if (opts[name] !== void 0) { opts[name].push(k); for (i = 0; i < arr.length; i++) { opts[name].push(arr[i]); } } } } const keys = strict ? Object.keys(opts.alias) : []; for (i = 0; i < len; i++) { arg = args[i]; if (arg === "--") { out._ = out._.concat(args.slice(++i)); break; } for (j = 0; j < arg.length; j++) { if (arg.charCodeAt(j) !== 45) { break; } } if (j === 0) { out._.push(arg); } else if (arg.substring(j, j + 3) === "no-") { name = arg.slice(Math.max(0, j + 3)); if (strict && !~keys.indexOf(name)) { return opts.unknown(arg); } out[name] = false; } else { for (idx = j + 1; idx < arg.length; idx++) { if (arg.charCodeAt(idx) === 61) { break; } } name = arg.substring(j, idx); val = arg.slice(Math.max(0, ++idx)) || i + 1 === len || ("" + args[i + 1]).charCodeAt(0) === 45 || args[++i]; arr = j === 2 ? [name] : name; for (idx = 0; idx < arr.length; idx++) { name = arr[idx]; if (strict && !~keys.indexOf(name)) { return opts.unknown("-".repeat(j) + name); } toVal(out, name, idx + 1 < arr.length || val, opts); } } } if (defaults) { for (k in opts.default) { if (out[k] === void 0) { out[k] = opts.default[k]; } } } if (alibi) { for (k in out) { arr = opts.alias[k] || []; while (arr.length > 0) { out[arr.shift()] = out[k]; } } } return out; } function parseArgs(rawArgs, argsDef) { const parseOptions = { boolean: [], string: [], mixed: [], alias: {}, default: {} }; const args = resolveArgs(argsDef); for (const arg of args) { if (arg.type === "positional") { continue; } if (arg.type === "string") { parseOptions.string.push(arg.name); } else if (arg.type === "boolean") { parseOptions.boolean.push(arg.name); } if (arg.default !== void 0) { parseOptions.default[arg.name] = arg.default; } if (arg.alias) { parseOptions.alias[arg.name] = arg.alias; } } const parsed = parseRawArgs(rawArgs, parseOptions); const [...positionalArguments] = parsed._; const parsedArgsProxy = new Proxy(parsed, { get(target, prop) { return target[prop] ?? target[camelCase(prop)] ?? target[kebabCase(prop)]; } }); for (const [, arg] of args.entries()) { if (arg.type === "positional") { const nextPositionalArgument = positionalArguments.shift(); if (nextPositionalArgument !== void 0) { parsedArgsProxy[arg.name] = nextPositionalArgument; } else if (arg.default === void 0 && arg.required !== false) { throw new CLIError( `Missing required positional argument: ${arg.name.toUpperCase()}`, "EARG" ); } else { parsedArgsProxy[arg.name] = arg.default; } } else if (arg.required && parsedArgsProxy[arg.name] === void 0) { throw new CLIError(`Missing required argument: --${arg.name}`, "EARG"); } } return parsedArgsProxy; } function resolveArgs(argsDef) { const args = []; for (const [name, argDef] of Object.entries(argsDef || {})) { args.push({ ...argDef, name, alias: toArray(argDef.alias) }); } return args; } function defineCommand(def) { return def; } async function runCommand$1(cmd, opts) { const cmdArgs = await resolveValue(cmd.args || {}); const parsedArgs = parseArgs(opts.rawArgs, cmdArgs); const context = { rawArgs: opts.rawArgs, args: parsedArgs, data: opts.data, cmd }; if (typeof cmd.setup === "function") { await cmd.setup(context); } let result; try { const subCommands = await resolveValue(cmd.subCommands); if (subCommands && Object.keys(subCommands).length > 0) { const subCommandArgIndex = opts.rawArgs.findIndex( (arg) => !arg.startsWith("-") ); const subCommandName = opts.rawArgs[subCommandArgIndex]; if (subCommandName) { if (!subCommands[subCommandName]) { throw new CLIError( `Unknown command \`${subCommandName}\``, "E_UNKNOWN_COMMAND" ); } const subCommand = await resolveValue(subCommands[subCommandName]); if (subCommand) { await runCommand$1(subCommand, { rawArgs: opts.rawArgs.slice(subCommandArgIndex + 1) }); } } else if (!cmd.run) { throw new CLIError(`No command specified.`, "E_NO_COMMAND"); } } if (typeof cmd.run === "function") { result = await cmd.run(context); } } finally { if (typeof cmd.cleanup === "function") { await cmd.cleanup(context); } } return { result }; } async function resolveSubCommand(cmd, rawArgs, parent) { const subCommands = await resolveValue(cmd.subCommands); if (subCommands && Object.keys(subCommands).length > 0) { const subCommandArgIndex = rawArgs.findIndex((arg) => !arg.startsWith("-")); const subCommandName = rawArgs[subCommandArgIndex]; const subCommand = await resolveValue(subCommands[subCommandName]); if (subCommand) { return resolveSubCommand( subCommand, rawArgs.slice(subCommandArgIndex + 1), cmd ); } } return [cmd, parent]; } async function showUsage(cmd, parent) { try { consola.log(await renderUsage(cmd, parent) + "\n"); } catch (error) { consola.error(error); } } async function renderUsage(cmd, parent) { const cmdMeta = await resolveValue(cmd.meta || {}); const cmdArgs = resolveArgs(await resolveValue(cmd.args || {})); const parentMeta = await resolveValue(parent?.meta || {}); const commandName = `${parentMeta.name ? `${parentMeta.name} ` : ""}` + (cmdMeta.name || process.argv[1]); const argLines = []; const posLines = []; const commandsLines = []; const usageLine = []; for (const arg of cmdArgs) { if (arg.type === "positional") { const name = arg.name.toUpperCase(); const isRequired = arg.required !== false && arg.default === void 0; const defaultHint = arg.default ? `="${arg.default}"` : ""; posLines.push([ "`" + name + defaultHint + "`", arg.description || "", arg.valueHint ? `<${arg.valueHint}>` : "" ]); usageLine.push(isRequired ? `<${name}>` : `[${name}]`); } else { const isRequired = arg.required === true && arg.default === void 0; const argStr = (arg.type === "boolean" && arg.default === true ? [ ...(arg.alias || []).map((a) => `--no-${a}`), `--no-${arg.name}` ].join(", ") : [...(arg.alias || []).map((a) => `-${a}`), `--${arg.name}`].join( ", " )) + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : ""); argLines.push([ "`" + argStr + (isRequired ? " (required)" : "") + "`", arg.description || "" ]); if (isRequired) { usageLine.push(argStr); } } } if (cmd.subCommands) { const commandNames = []; const subCommands = await resolveValue(cmd.subCommands); for (const [name, sub] of Object.entries(subCommands)) { const subCmd = await resolveValue(sub); const meta = await resolveValue(subCmd?.meta); commandsLines.push([`\`${name}\``, meta?.description || ""]); commandNames.push(name); } usageLine.push(commandNames.join("|")); } const usageLines = []; const version = cmdMeta.version || parentMeta.version; usageLines.push( colors.gray( `${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})` ), "" ); const hasOptions = argLines.length > 0 || posLines.length > 0; usageLines.push( `${colors.underline(colors.bold("USAGE"))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(" ")}\``, "" ); if (posLines.length > 0) { usageLines.push(colors.underline(colors.bold("ARGUMENTS")), ""); usageLines.push(formatLineColumns(posLines, " ")); usageLines.push(""); } if (argLines.length > 0) { usageLines.push(colors.underline(colors.bold("OPTIONS")), ""); usageLines.push(formatLineColumns(argLines, " ")); usageLines.push(""); } if (commandsLines.length > 0) { usageLines.push(colors.underline(colors.bold("COMMANDS")), ""); usageLines.push(formatLineColumns(commandsLines, " ")); usageLines.push( "", `Use \`${commandName} <command> --help\` for more information about a command.` ); } return usageLines.filter((l) => typeof l === "string").join("\n"); } async function runMain$1(cmd, opts = {}) { const rawArgs = opts.rawArgs || process.argv.slice(2); const showUsage$1 = opts.showUsage || showUsage; try { if (rawArgs.includes("--help") || rawArgs.includes("-h")) { await showUsage$1(...await resolveSubCommand(cmd, rawArgs)); process.exit(0); } else if (rawArgs.length === 1 && rawArgs[0] === "--version") { const meta = typeof cmd.meta === "function" ? await cmd.meta() : await cmd.meta; if (!meta?.version) { throw new CLIError("No version specified", "E_NO_VERSION"); } consola.log(meta.version); } else { await runCommand$1(cmd, { rawArgs }); } } catch (error) { const isCLIError = error instanceof CLIError; if (!isCLIError) { consola.error(error, "\n"); } if (isCLIError) { await showUsage$1(...await resolveSubCommand(cmd, rawArgs)); } consola.error(error.message); process.exit(1); } } const r=Object.create(null),E=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return E()[o]??r[o]},has(e,o){const i=E();return o in i||o in r},set(e,o,i){const g=E(!0);return g[o]=i,!0},deleteProperty(e,o){if(!o)return !1;const i=E(!0);return delete i[o],!0},ownKeys(){const e=E(!0);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",p=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"]];function B(){if(globalThis.process?.env)for(const e of p){const o=e[1]||e[0];if(globalThis.process?.env[o])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const l=B(),d=l.name;function n(e){return e?e!=="false":!1}const I=globalThis.process?.platform||"",T=n(s.CI)||l.ci!==!1,R=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),h=n(s.DEBUG),C=t==="test"||n(s.TEST),v=t==="dev"||t==="development";n(s.MINIMAL)||T||C||!R;const a=/^win/i.test(I);!n(s.NO_COLOR)&&(n(s.FORCE_COLOR)||(R||a)&&s.TERM!=="dumb"||T);const _=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(_?.split(".")[0])||null;const W=globalThis.process||Object.create(null),c={versions:{}};new Proxy(W,{get(e,o){if(o==="env")return s;if(o in e)return e[o];if(o in c)return c[o]}});const A=globalThis.process?.release?.name==="node",L=!!globalThis.Bun||!!globalThis.process?.versions?.bun,D=!!globalThis.Deno,O=!!globalThis.fastly,S=!!globalThis.Netlify,N=!!globalThis.EdgeRuntime,u=globalThis.navigator?.userAgent==="Cloudflare-Workers",b=!!globalThis.__lagon__,F=[[S,"netlify"],[N,"edge-light"],[u,"workerd"],[O,"fastly"],[D,"deno"],[L,"bun"],[A,"node"],[b,"lagon"]];function G(){const e=F.find(o=>o[0]);if(e)return {name:e[1]}}const P=G();P?.name||""; const name = "nuxi"; const version = "3.13.1"; const description = "⚡️ Nuxt Generation CLI Experience"; const repository = "nuxt/cli"; const license = "MIT"; const type = "module"; const exports = { ".": "./dist/index.mjs", "./cli": "./bin/nuxi.mjs" }; const types = "./dist/index.d.ts"; const bin = { nuxi: "./bin/nuxi.mjs", "nuxi-ng": "./bin/nuxi.mjs", nuxt: "./bin/nuxi.mjs", "nuxt-cli": "./bin/nuxi.mjs" }; const files = [ "bin", "dist" ]; const scripts = { "dev:prepare": "unbuild --stub", build: "unbuild", "build:stub": "unbuild --stub", dev: "node ./bin/nuxi.mjs dev ./playground", "dev:bun": "bun --bun ./bin/nuxi.mjs dev ./playground", lint: "eslint .", "lint:fix": "eslint --fix .", nuxi: "node ./bin/nuxi.mjs", "nuxi-bun": "bun --bun ./bin/nuxi.mjs", prepack: "unbuild", release: "pnpm test && changelogen --release && npm publish && git push --follow-tags", test: "pnpm lint && pnpm test:types && pnpm build && pnpm test:dist", "test:dist": "node ./bin/nuxi.mjs info ./playground", "test:types": "tsc --noEmit" }; const devDependencies = { "@nuxt/eslint-config": "^0.5.3", "@nuxt/kit": "^3.13.0", "@nuxt/schema": "^3.13.0", "@nuxt/test-utils": "^3.14.1", "@types/http-proxy": "^1.17.15", "@types/node": "^20.16.2", "@types/semver": "^7.5.8", "@types/ws": "^8.5.12", c12: "^1.11.1", changelogen: "^0.5.5", chokidar: "^3.6.0", citty: "^0.1.6", clipboardy: "^4.0.0", colorette: "^2.0.20", consola: "^3.2.3", destr: "^2.0.3", eslint: "^9.9.1", execa: "^9.3.1", "fuse.js": "^7.0.0", giget: "^1.2.3", h3: "^1.12.0", httpxy: "^0.1.5", jiti: "^1.21.6", listhen: "^1.7.2", magicast: "^0.3.5", mlly: "^1.7.1", nuxt: "^3.13.0", nypm: "^0.3.11", ofetch: "^1.3.4", pathe: "^1.1.2", "perfect-debounce": "^1.0.0", "pkg-types": "^1.2.0", scule: "^1.3.0", semver: "^7.6.3", unbuild: "^2.0.0", "unplugin-purge-polyfills": "^0.0.5", unws: "^0.2.4", "vue-tsc": "^2.0.29", ws: "^8.18.0" }; const optionalDependencies = { fsevents: "~2.3.3" }; const resolutions = { h3: "^1.12.0", nitropack: "npm:nitropack-nightly", nuxt: "^3.13.0" }; const packageManager = "pnpm@9.9.0"; const engines = { node: "^16.10.0 || >=18.0.0" }; const nuxiPkg = { name: name, version: version, description: description, repository: repository, license: license, type: type, exports: exports, types: types, bin: bin, files: files, scripts: scripts, devDependencies: devDependencies, optionalDependencies: optionalDependencies, resolutions: resolutions, packageManager: packageManager, engines: engines }; const _rDefault = (r) => r.default || r; const commands = { "add": () => import('../chunks/add.mjs').then(_rDefault), "analyze": () => import('../chunks/analyze.mjs').then(_rDefault), "build-module": () => import('../chunks/build-module.mjs').then(_rDefault), "build": () => import('../chunks/build.mjs').then(_rDefault), "cleanup": () => import('../chunks/cleanup.mjs').then(_rDefault), "_dev": () => import('../chunks/dev-child.mjs').then(_rDefault), "dev": () => import('../chunks/dev.mjs').then(_rDefault), "devtools": () => import('../chunks/devtools.mjs').then(_rDefault), "generate": () => import('../chunks/generate.mjs').then(_rDefault), "info": () => import('../chunks/info.mjs').then(_rDefault), "init": () => import('../chunks/init.mjs').then(function (n) { return n.i; }).then(_rDefault), "module": () => import('../chunks/index.mjs').then(_rDefault), "prepare": () => import('../chunks/prepare.mjs').then(_rDefault), "preview": () => import('../chunks/preview.mjs').then(_rDefault), "start": () => import('../chunks/preview.mjs').then(_rDefault), "test": () => import('../chunks/test.mjs').then(_rDefault), "typecheck": () => import('../chunks/typecheck.mjs').then(_rDefault), "upgrade": () => import('../chunks/upgrade.mjs').then(_rDefault) }; const wrapReporter = (reporter) => ({ log(logObj, ctx) { if (!logObj.args || !logObj.args.length) { return; } const msg = logObj.args[0]; if (typeof msg === "string" && !process.env.DEBUG) { if (msg.startsWith( "[Vue Router warn]: No match found for location with path" )) { return; } if (msg.includes( "ExperimentalWarning: The Fetch API is an experimental feature" )) { return; } if (msg.startsWith("Sourcemap") && msg.includes("node_modules")) { return; } } return reporter.log(logObj, ctx); } }); function setupGlobalConsole(opts = {}) { consola.options.reporters = consola.options.reporters.map(wrapReporter); if (opts.dev) { consola.wrapAll(); } else { consola.wrapConsole(); } process.on( "unhandledRejection", (err) => consola.error("[unhandledRejection]", err) ); process.on( "uncaughtException", (err) => consola.error("[uncaughtException]", err) ); } async function checkEngines() { const satisfies = await import('../chunks/satisfies.mjs').then(function (n) { return n.s; }).then( (r) => r.default || r ); const currentNode = process.versions.node; const nodeRange = ">= 18.0.0"; if (!satisfies(currentNode, nodeRange)) { console.warn( `Current version of Node.js (\`${currentNode}\`) is unsupported and might cause issues. Please upgrade to a compatible version \`${nodeRange}\`.` ); } } const main = defineCommand({ meta: { name: nuxiPkg.name, version: nuxiPkg.version, description: nuxiPkg.description }, subCommands: commands, async setup(ctx) { const command = ctx.args._[0]; const dev = command === "dev"; setupGlobalConsole({ dev }); let backgroundTasks; if (command !== "_dev" && d !== "stackblitz") { backgroundTasks = Promise.all([ checkEngines() // checkForUpdates(), ]).catch((err) => console.error(err)); } if (command === "init") { await backgroundTasks; } } }); globalThis.__nuxt_cli__ = globalThis.__nuxt_cli__ || { // Programmatic usage fallback startTime: Date.now(), entry: fileURLToPath( new URL( import.meta.url.endsWith(".ts") ? "../bin/nuxi.mjs" : "../../bin/nuxi.mjs", import.meta.url ) ) }; const runMain = () => runMain$1(main); async function runCommand(name, argv = process.argv.slice(2), data = {}) { argv.push("--no-clear"); if (!(name in commands)) { throw new Error(`Invalid command ${name}`); } return await runCommand$1(await commands[name](), { rawArgs: argv, data: { overrides: data.overrides || {} } }); } export { C, L, colors as a, d as b, consola as c, defineCommand as d, box as e, getDefaultExportFromCjs as f, getColor$1 as g, h, isUnicodeSupported as i, runMain as j, main as m, nuxiPkg as n, runCommand as r, v };
Coded With 💗 by
0x6ick Mod By V1rus_Alfa