UNPKG

vue-component-toolkit

Version:

A Vue3 component toolkit library

1,807 lines 215 kB
var Js = Object.defineProperty; var Qs = (e, t, r) => t in e ? Js(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r; var be = (e, t, r) => Qs(e, typeof t != "symbol" ? t + "" : t, r); import { useSlots as It, ref as $, onMounted as Fe, openBlock as y, createElementBlock as k, renderSlot as z, createCommentVNode as D, Fragment as Q, renderList as ie, createBlock as q, resolveDynamicComponent as Le, mergeProps as ft, computed as j, normalizeStyle as J, normalizeClass as Z, createElementVNode as T, createTextVNode as Me, toDisplayString as B, defineComponent as Kn, h as Zr, getCurrentInstance as Xn, inject as es, onUnmounted as ts, watch as xn, shallowRef as Zs, createVNode as ue, Text as eo, render as to, toRaw as He, mergeModels as zt, useModel as ns, withCtx as Ne, withKeys as ct, withModifiers as no, Teleport as rs, provide as ss, resolveComponent as ro, unref as Qe, nextTick as so, useTemplateRef as oo, onBeforeUnmount as ao, useAttrs as lo, withDirectives as io, vShow as co, normalizeProps as ur, guardReactiveProps as uo } from "vue"; const fo = { class: "comp-accordion bg-gray-100 p-4 rounded-lg shadow-md flex flex-col" }, xf = { __name: "Accordion", props: { selected: { type: Number, default: 0 } }, setup(e) { const t = e, r = It(), n = $(null), s = $(t.selected), o = (a) => { s.value = a; }; return Fe(() => { var a; n.value = (a = r.default) == null ? void 0 : a.call(r); }), (a, l) => (y(), k("div", fo, [ n.value ? D("", !0) : z(a.$slots, "default", { key: 0 }), n.value ? (y(!0), k(Q, { key: 1 }, ie(n.value, (i, u) => (y(), q(Le(i), ft({ key: u, ref_for: !0 }, i.props, { id: u, selected: u === s.value, onSelect: o }), null, 16, ["id", "selected"]))), 128)) : D("", !0) ])); } }, H = (e, t) => { const r = e.__vccOpts || e; for (const [n, s] of t) r[n] = s; return r; }, po = ["disabled"], mo = { class: "horizontal" }, _o = { __name: "Button", props: { variant: { type: String, default: "primary" // Options: 'primary', 'secondary', 'danger' }, size: { type: String, default: "md" // Options: 'sm', 'md', 'lg' }, disabled: { type: Boolean, default: !1 }, off: { type: Boolean, default: !1 }, text: { type: String }, onClick: { type: Function }, icon: { type: Object }, style: { type: Object } }, setup(e) { const t = e, r = j(() => t.style), n = j(() => t.text ? "px-4" : "px-2"), s = j(() => { const a = { primary: "bg-blue-500 text-white hover:bg-blue-600 active:bg-blue-700 focus:ring-blue-500", secondary: "bg-gray-500 text-white hover:bg-gray-600 active:bg-gray-700 focus:ring-gray-500", danger: "bg-red-500 text-white hover:bg-red-600 active:bg-red-700 focus:ring-red-500" }; return a[t.variant] || a.primary; }), o = j(() => { const a = { sm: "text-sm", md: "text-base", lg: "text-lg" }; return a[t.size] || a.md; }); return (a, l) => (y(), k("button", { style: J(r.value), class: Z([ "py-2 rounded-lg font-medium rounded-md transition-colors duration-300 active:opacity-80 active:scale-95", n.value, s.value, o.value, { "opacity-50 cursor-not-allowed": e.disabled }, { "opacity-50 ": e.off } ]), disabled: e.disabled, onClick: l[0] || (l[0] = (i) => !e.disabled && a.$emit("click")) }, [ T("div", mo, [ Me(B(e.text) + " ", 1), e.icon ? (y(), q(Le(e.icon), { key: 0, class: "px-1" })) : D("", !0) ]) ], 14, po)); } }, Af = /* @__PURE__ */ H(_o, [["__scopeId", "data-v-b0896a09"]]), ho = { class: "comp-card w-full p-6 border rounded-lg bg-gray-100 shadow flex flex-col" }, go = { key: 0, class: "text-xl font-semibold text-gray-800" }, yo = { key: 1, class: "text-gray-600 mt-2" }, vo = { __name: "Card", props: { title: { type: String, required: !1 }, description: { type: String, required: !1 } }, setup(e) { const t = e; return (r, n) => (y(), k("div", ho, [ t.title ? (y(), k("h3", go, B(t.title), 1)) : D("", !0), t.description ? (y(), k("p", yo, B(t.description), 1)) : D("", !0), T("div", { class: "slot", style: J(t.title || t.description ? { "margin-top": "16px" } : {}) }, [ z(r.$slots, "default", {}, void 0, !0) ], 4) ])); } }, If = /* @__PURE__ */ H(vo, [["__scopeId", "data-v-55aff5c1"]]), bo = { class: "flex flex-col items-center w-full" }, Eo = { class: "relative w-40 h-40" }, wo = { class: "w-full h-full transform -rotate-90" }, No = ["stroke-dasharray", "stroke-dashoffset"], Oo = { class: "absolute inset-0 flex flex-col items-center justify-center" }, To = { class: "text-2xl font-bold text-gray-800" }, ko = { class: "mt-4 flex items-center gap-4" }, bn = 100, So = "°C", Co = 40, Lo = "#00C853", xo = "#D32F2F", Rf = { __name: "CircularGauge", setup(e) { const t = $(50), r = j(() => 2 * Math.PI * Co), n = (l, i, u, d, _) => { const f = (l - i) / (u - i), v = (c, h) => Math.round(c + (h - c) * f).toString(16).padStart(2, "0"), E = v(parseInt(d.slice(1, 3), 16), parseInt(_.slice(1, 3), 16)), w = v(parseInt(d.slice(3, 5), 16), parseInt(_.slice(3, 5), 16)), g = v(parseInt(d.slice(5, 7), 16), parseInt(_.slice(5, 7), 16)); return `#${E}${w}${g}`; }, s = j(() => n(t.value, 0, bn, Lo, xo)), o = () => { t.value < bn && (t.value += 5); }, a = () => { t.value > 0 && (t.value -= 5); }; return (l, i) => (y(), k("div", bo, [ T("div", Eo, [ (y(), k("svg", wo, [ i[0] || (i[0] = T("circle", { class: "text-gray-300", stroke: "currentColor", "stroke-width": "10", fill: "transparent", r: "40", cx: "50%", cy: "50%" }, null, -1)), T("circle", { style: J({ stroke: s.value }), class: "transition-all duration-300", "stroke-dasharray": r.value, "stroke-dashoffset": r.value - t.value / bn * r.value, "stroke-width": "10", fill: "transparent", r: "40", cx: "50%", cy: "50%" }, null, 12, No) ])), T("div", Oo, [ T("span", To, B(t.value), 1), T("span", { class: "text-sm text-gray-500" }, B(So)) ]) ]), T("div", ko, [ T("button", { onClick: a, class: "px-4 py-2 bg-gray-300 rounded-full hover:bg-gray-400 transition" }, " - "), T("button", { onClick: o, class: "px-4 py-2 text-white rounded-full transition", style: J({ backgroundColor: s.value }) }, " + ", 4) ]) ])); } }, Ao = { class: "flex flex-col items-center w-full" }, Io = { class: "relative w-40 h-40" }, Ro = { class: "w-full h-full", viewBox: "0 0 100 100" }, Do = ["x", "y"], Po = ["x2", "y2"], Mo = ["x2", "y2"], Fo = ["x2", "y2"], $o = { class: "mt-4 text-xl font-semibold text-gray-800" }, Df = { __name: "Clock", setup(e) { const t = $(/* @__PURE__ */ new Date()), r = () => { t.value = /* @__PURE__ */ new Date(); }; Fe(() => { setInterval(r, 1e3); }); const n = (f, v) => { const E = (f - 90) * (Math.PI / 180); return { x: 50 + v * Math.cos(E), y: 50 + v * Math.sin(E) }; }, s = (f) => 50 + 38 * Math.cos((f * 30 - 90) * (Math.PI / 180)), o = (f) => 50 + 38 * Math.sin((f * 30 - 90) * (Math.PI / 180)) + 2, a = $({}), l = $({}), i = $({}), u = () => { const f = t.value, v = f.getHours() % 12, E = f.getMinutes(), w = f.getSeconds(); a.value = n((v + E / 60) * 30, 20), l.value = n(E * 6, 30), i.value = n(w * 6, 38); }; u(), setInterval(u, 1e3); const d = $(""); return setInterval(() => { d.value = t.value.toLocaleTimeString(); }, 1e3), (f, v) => (y(), k("div", Ao, [ T("div", Io, [ (y(), k("svg", Ro, [ v[0] || (v[0] = T("circle", { cx: "50", cy: "50", r: "48", stroke: "currentColor", "stroke-width": "4", fill: "transparent", class: "text-gray-300" }, null, -1)), (y(), k(Q, null, ie(12, (E) => T("text", { key: E, x: s(E), y: o(E), "text-anchor": "middle", class: "text-sm font-bold text-gray-800" }, B(E), 9, Do)), 64)), T("line", { x1: 50, y1: 50, x2: a.value.x, y2: a.value.y, stroke: "currentColor", "stroke-width": "4", class: "text-gray-700 transition-all duration-300" }, null, 8, Po), T("line", { x1: 50, y1: 50, x2: l.value.x, y2: l.value.y, stroke: "currentColor", "stroke-width": "3", class: "text-gray-900 transition-all duration-300" }, null, 8, Mo), T("line", { x1: 50, y1: 50, x2: i.value.x, y2: i.value.y, stroke: "red", "stroke-width": "2", class: "transition-all duration-100" }, null, 8, Fo), v[1] || (v[1] = T("circle", { cx: "50", cy: "50", r: "2", fill: "black" }, null, -1)) ])) ]), T("div", $o, B(d.value), 1) ])); } }; /*! * shared v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ const Be = typeof window < "u"; let Oe, rt; if (process.env.NODE_ENV !== "production") { const e = Be && window.performance; e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat e.clearMeasures && (Oe = (t) => { e.mark(t); }, rt = (t, r, n) => { e.measure(t, r, n), e.clearMarks(r), e.clearMarks(n); }); } const Uo = /\{([0-9a-zA-Z]+)\}/g; function rn(e, ...t) { return t.length === 1 && K(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Uo, (r, n) => t.hasOwnProperty(n) ? t[n] : ""); } const qe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Vo = (e, t, r) => Bo({ l: e, k: t, s: r }), Bo = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), fe = (e) => typeof e == "number" && isFinite(e), qo = (e) => zn(e) === "[object Date]", Jt = (e) => zn(e) === "[object RegExp]", sn = (e) => Y(e) && Object.keys(e).length === 0, pe = Object.assign, jo = Object.create, ee = (e = null) => jo(e); let dr; const Ze = () => dr || (dr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : ee()); function fr(e) { return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;"); } const Ho = Object.prototype.hasOwnProperty; function Ae(e, t) { return Ho.call(e, t); } const de = Array.isArray, te = (e) => typeof e == "function", R = (e) => typeof e == "string", le = (e) => typeof e == "boolean", K = (e) => e !== null && typeof e == "object", Wo = (e) => K(e) && te(e.then) && te(e.catch), os = Object.prototype.toString, zn = (e) => os.call(e), Y = (e) => zn(e) === "[object Object]", Go = (e) => e == null ? "" : de(e) || Y(e) && e.toString === os ? JSON.stringify(e, null, 2) : String(e); function Jn(e, t = "") { return e.reduce((r, n, s) => s === 0 ? r + n : r + t + n, ""); } const pr = 2; function Yo(e, t = 0, r = e.length) { const n = e.split(/\r?\n/); let s = 0; const o = []; for (let a = 0; a < n.length; a++) if (s += n[a].length + 1, s >= t) { for (let l = a - pr; l <= a + pr || r > s; l++) { if (l < 0 || l >= n.length) continue; const i = l + 1; o.push(`${i}${" ".repeat(3 - String(i).length)}| ${n[l]}`); const u = n[l].length; if (l === a) { const d = t - (s - u) + 1, _ = Math.max(1, r > s ? u - d : r - t); o.push(" | " + " ".repeat(d) + "^".repeat(_)); } else if (l > a) { if (r > s) { const d = Math.max(Math.min(r - s, u), 1); o.push(" | " + "^".repeat(d)); } s += u + 1; } } break; } return o.join(` `); } function We(e, t) { typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack)); } const mr = {}; function Ko(e) { mr[e] || (mr[e] = !0, We(e)); } function Xo() { const e = /* @__PURE__ */ new Map(); return { events: e, on(r, n) { const s = e.get(r); s && s.push(n) || e.set(r, [n]); }, off(r, n) { const s = e.get(r); s && s.splice(s.indexOf(n) >>> 0, 1); }, emit(r, n) { (e.get(r) || []).slice().map((s) => s(n)), (e.get("*") || []).slice().map((s) => s(r, n)); } }; } const $t = (e) => !K(e) || de(e); function Wt(e, t) { if ($t(e) || $t(t)) throw new Error("Invalid value"); const r = [{ src: e, des: t }]; for (; r.length; ) { const { src: n, des: s } = r.pop(); Object.keys(n).forEach((o) => { o !== "__proto__" && (K(n[o]) && !K(s[o]) && (s[o] = Array.isArray(n[o]) ? [] : ee()), $t(s[o]) || $t(n[o]) ? s[o] = n[o] : r.push({ src: n[o], des: s[o] })); }); } } /*! * message-compiler v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ function zo(e, t, r) { return { line: e, column: t, offset: r }; } function An(e, t, r) { return { start: e, end: t }; } const U = { // tokenizer error codes EXPECTED_TOKEN: 1, INVALID_TOKEN_IN_PLACEHOLDER: 2, UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3, UNKNOWN_ESCAPE_SEQUENCE: 4, INVALID_UNICODE_ESCAPE_SEQUENCE: 5, UNBALANCED_CLOSING_BRACE: 6, UNTERMINATED_CLOSING_BRACE: 7, EMPTY_PLACEHOLDER: 8, NOT_ALLOW_NEST_PLACEHOLDER: 9, INVALID_LINKED_FORMAT: 10, // parser error codes MUST_HAVE_MESSAGES_IN_PLURAL: 11, UNEXPECTED_EMPTY_LINKED_MODIFIER: 12, UNEXPECTED_EMPTY_LINKED_KEY: 13, UNEXPECTED_LEXICAL_ANALYSIS: 14, // generator error codes UNHANDLED_CODEGEN_NODE_TYPE: 15, // minifier error codes UNHANDLED_MINIFIER_NODE_TYPE: 16 }, Jo = 17, Qo = { // tokenizer error messages [U.EXPECTED_TOKEN]: "Expected token: '{0}'", [U.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'", [U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder", [U.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}", [U.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}", [U.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace", [U.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace", [U.EMPTY_PLACEHOLDER]: "Empty placeholder", [U.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder", [U.INVALID_LINKED_FORMAT]: "Invalid linked format", // parser error messages [U.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages", [U.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier", [U.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key", [U.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'", // generator error messages [U.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'", // minimizer error messages [U.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'" }; function mt(e, t, r = {}) { const { domain: n, messages: s, args: o } = r, a = process.env.NODE_ENV !== "production" ? rn((s || Qo)[e] || "", ...o || []) : e, l = new SyntaxError(String(a)); return l.code = e, t && (l.location = t), l.domain = n, l; } function Zo(e) { throw e; } const ea = /<\/?[\w\s="/.':;#-\/]+>/, ta = (e) => ea.test(e), Ue = " ", na = "\r", ye = ` `, ra = "\u2028", sa = "\u2029"; function oa(e) { const t = e; let r = 0, n = 1, s = 1, o = 0; const a = (S) => t[S] === na && t[S + 1] === ye, l = (S) => t[S] === ye, i = (S) => t[S] === sa, u = (S) => t[S] === ra, d = (S) => a(S) || l(S) || i(S) || u(S), _ = () => r, f = () => n, v = () => s, E = () => o, w = (S) => a(S) || i(S) || u(S) ? ye : t[S], g = () => w(r), c = () => w(r + o); function h() { return o = 0, d(r) && (n++, s = 0), a(r) && r++, r++, s++, t[r]; } function b() { return a(r + o) && o++, o++, t[r + o]; } function O() { r = 0, n = 1, s = 1, o = 0; } function x(S = 0) { o = S; } function A() { const S = r + o; for (; S !== r; ) h(); o = 0; } return { index: _, line: f, column: v, peekOffset: E, charAt: w, currentChar: g, currentPeek: c, next: h, peek: b, reset: O, resetPeek: x, skipToPeek: A }; } const je = void 0, aa = ".", _r = "'", la = "tokenizer"; function ia(e, t = {}) { const r = t.location !== !1, n = oa(e), s = () => n.index(), o = () => zo(n.line(), n.column(), n.index()), a = o(), l = s(), i = { currentType: 13, offset: l, startLoc: a, endLoc: a, lastType: 13, lastOffset: l, lastStartLoc: a, lastEndLoc: a, braceNest: 0, inLinked: !1, text: "" }, u = () => i, { onError: d } = t; function _(p, m, L, ...M) { const se = u(); if (m.column += L, m.offset += L, d) { const oe = r ? An(se.startLoc, m) : null, G = mt(p, oe, { domain: la, args: M }); d(G); } } function f(p, m, L) { p.endLoc = o(), p.currentType = m; const M = { type: m }; return r && (M.loc = An(p.startLoc, p.endLoc)), L != null && (M.value = L), M; } const v = (p) => f( p, 13 /* TokenTypes.EOF */ ); function E(p, m) { return p.currentChar() === m ? (p.next(), m) : (_(U.EXPECTED_TOKEN, o(), 0, m), ""); } function w(p) { let m = ""; for (; p.currentPeek() === Ue || p.currentPeek() === ye; ) m += p.currentPeek(), p.peek(); return m; } function g(p) { const m = w(p); return p.skipToPeek(), m; } function c(p) { if (p === je) return !1; const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m === 95; } function h(p) { if (p === je) return !1; const m = p.charCodeAt(0); return m >= 48 && m <= 57; } function b(p, m) { const { currentType: L } = m; if (L !== 2) return !1; w(p); const M = c(p.currentPeek()); return p.resetPeek(), M; } function O(p, m) { const { currentType: L } = m; if (L !== 2) return !1; w(p); const M = p.currentPeek() === "-" ? p.peek() : p.currentPeek(), se = h(M); return p.resetPeek(), se; } function x(p, m) { const { currentType: L } = m; if (L !== 2) return !1; w(p); const M = p.currentPeek() === _r; return p.resetPeek(), M; } function A(p, m) { const { currentType: L } = m; if (L !== 7) return !1; w(p); const M = p.currentPeek() === "."; return p.resetPeek(), M; } function S(p, m) { const { currentType: L } = m; if (L !== 8) return !1; w(p); const M = c(p.currentPeek()); return p.resetPeek(), M; } function P(p, m) { const { currentType: L } = m; if (!(L === 7 || L === 11)) return !1; w(p); const M = p.currentPeek() === ":"; return p.resetPeek(), M; } function W(p, m) { const { currentType: L } = m; if (L !== 9) return !1; const M = () => { const oe = p.currentPeek(); return oe === "{" ? c(p.peek()) : oe === "@" || oe === "|" || oe === ":" || oe === "." || oe === Ue || !oe ? !1 : oe === ye ? (p.peek(), M()) : ve(p, !1); }, se = M(); return p.resetPeek(), se; } function ne(p) { w(p); const m = p.currentPeek() === "|"; return p.resetPeek(), m; } function ve(p, m = !0) { const L = (se = !1, oe = "") => { const G = p.currentPeek(); return G === "{" || G === "@" || !G ? se : G === "|" ? !(oe === Ue || oe === ye) : G === Ue ? (p.peek(), L(!0, Ue)) : G === ye ? (p.peek(), L(!0, ye)) : !0; }, M = L(); return m && p.resetPeek(), M; } function re(p, m) { const L = p.currentChar(); return L === je ? je : m(L) ? (p.next(), L) : null; } function Re(p) { const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m >= 48 && m <= 57 || // 0-9 m === 95 || // _ m === 36; } function gt(p) { return re(p, Re); } function $e(p) { const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m >= 48 && m <= 57 || // 0-9 m === 95 || // _ m === 36 || // $ m === 45; } function lt(p) { return re(p, $e); } function F(p) { const m = p.charCodeAt(0); return m >= 48 && m <= 57; } function ge(p) { return re(p, F); } function Se(p) { const m = p.charCodeAt(0); return m >= 48 && m <= 57 || // 0-9 m >= 65 && m <= 70 || // A-F m >= 97 && m <= 102; } function xe(p) { return re(p, Se); } function Ke(p) { let m = "", L = ""; for (; m = ge(p); ) L += m; return L; } function yt(p) { let m = ""; for (; ; ) { const L = p.currentChar(); if (L === "{" || L === "}" || L === "@" || L === "|" || !L) break; if (L === Ue || L === ye) if (ve(p)) m += L, p.next(); else { if (ne(p)) break; m += L, p.next(); } else m += L, p.next(); } return m; } function vt(p) { g(p); let m = "", L = ""; for (; m = lt(p); ) L += m; return p.currentChar() === je && _(U.UNTERMINATED_CLOSING_BRACE, o(), 0), L; } function bt(p) { g(p); let m = ""; return p.currentChar() === "-" ? (p.next(), m += `-${Ke(p)}`) : m += Ke(p), p.currentChar() === je && _(U.UNTERMINATED_CLOSING_BRACE, o(), 0), m; } function Et(p) { return p !== _r && p !== ye; } function ir(p) { g(p), E(p, "'"); let m = "", L = ""; for (; m = re(p, Et); ) m === "\\" ? L += mn(p) : L += m; const M = p.currentChar(); return M === ye || M === je ? (_(U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, o(), 0), M === ye && (p.next(), E(p, "'")), L) : (E(p, "'"), L); } function mn(p) { const m = p.currentChar(); switch (m) { case "\\": case "'": return p.next(), `\\${m}`; case "u": return Mt(p, m, 4); case "U": return Mt(p, m, 6); default: return _(U.UNKNOWN_ESCAPE_SEQUENCE, o(), 0, m), ""; } } function Mt(p, m, L) { E(p, m); let M = ""; for (let se = 0; se < L; se++) { const oe = xe(p); if (!oe) { _(U.INVALID_UNICODE_ESCAPE_SEQUENCE, o(), 0, `\\${m}${M}${p.currentChar()}`); break; } M += oe; } return `\\${m}${M}`; } function _n(p) { return p !== "{" && p !== "}" && p !== Ue && p !== ye; } function hn(p) { g(p); let m = "", L = ""; for (; m = re(p, _n); ) L += m; return L; } function gn(p) { let m = "", L = ""; for (; m = gt(p); ) L += m; return L; } function yn(p) { const m = (L) => { const M = p.currentChar(); return M === "{" || M === "@" || M === "|" || M === "(" || M === ")" || !M || M === Ue ? L : (L += M, p.next(), m(L)); }; return m(""); } function wt(p) { g(p); const m = E( p, "|" /* TokenChars.Pipe */ ); return g(p), m; } function Nt(p, m) { let L = null; switch (p.currentChar()) { case "{": return m.braceNest >= 1 && _(U.NOT_ALLOW_NEST_PLACEHOLDER, o(), 0), p.next(), L = f( m, 2, "{" /* TokenChars.BraceLeft */ ), g(p), m.braceNest++, L; case "}": return m.braceNest > 0 && m.currentType === 2 && _(U.EMPTY_PLACEHOLDER, o(), 0), p.next(), L = f( m, 3, "}" /* TokenChars.BraceRight */ ), m.braceNest--, m.braceNest > 0 && g(p), m.inLinked && m.braceNest === 0 && (m.inLinked = !1), L; case "@": return m.braceNest > 0 && _(U.UNTERMINATED_CLOSING_BRACE, o(), 0), L = Xe(p, m) || v(m), m.braceNest = 0, L; default: { let se = !0, oe = !0, G = !0; if (ne(p)) return m.braceNest > 0 && _(U.UNTERMINATED_CLOSING_BRACE, o(), 0), L = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, L; if (m.braceNest > 0 && (m.currentType === 4 || m.currentType === 5 || m.currentType === 6)) return _(U.UNTERMINATED_CLOSING_BRACE, o(), 0), m.braceNest = 0, Ot(p, m); if (se = b(p, m)) return L = f(m, 4, vt(p)), g(p), L; if (oe = O(p, m)) return L = f(m, 5, bt(p)), g(p), L; if (G = x(p, m)) return L = f(m, 6, ir(p)), g(p), L; if (!se && !oe && !G) return L = f(m, 12, hn(p)), _(U.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, L.value), g(p), L; break; } } return L; } function Xe(p, m) { const { currentType: L } = m; let M = null; const se = p.currentChar(); switch ((L === 7 || L === 8 || L === 11 || L === 9) && (se === ye || se === Ue) && _(U.INVALID_LINKED_FORMAT, o(), 0), se) { case "@": return p.next(), M = f( m, 7, "@" /* TokenChars.LinkedAlias */ ), m.inLinked = !0, M; case ".": return g(p), p.next(), f( m, 8, "." /* TokenChars.LinkedDot */ ); case ":": return g(p), p.next(), f( m, 9, ":" /* TokenChars.LinkedDelimiter */ ); default: return ne(p) ? (M = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, M) : A(p, m) || P(p, m) ? (g(p), Xe(p, m)) : S(p, m) ? (g(p), f(m, 11, gn(p))) : W(p, m) ? (g(p), se === "{" ? Nt(p, m) || M : f(m, 10, yn(p))) : (L === 7 && _(U.INVALID_LINKED_FORMAT, o(), 0), m.braceNest = 0, m.inLinked = !1, Ot(p, m)); } } function Ot(p, m) { let L = { type: 13 /* TokenTypes.EOF */ }; if (m.braceNest > 0) return Nt(p, m) || v(m); if (m.inLinked) return Xe(p, m) || v(m); switch (p.currentChar()) { case "{": return Nt(p, m) || v(m); case "}": return _(U.UNBALANCED_CLOSING_BRACE, o(), 0), p.next(), f( m, 3, "}" /* TokenChars.BraceRight */ ); case "@": return Xe(p, m) || v(m); default: { if (ne(p)) return L = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, L; if (ve(p)) return f(m, 0, yt(p)); break; } } return L; } function vn() { const { currentType: p, offset: m, startLoc: L, endLoc: M } = i; return i.lastType = p, i.lastOffset = m, i.lastStartLoc = L, i.lastEndLoc = M, i.offset = s(), i.startLoc = o(), n.currentChar() === je ? f( i, 13 /* TokenTypes.EOF */ ) : Ot(n, i); } return { nextToken: vn, currentOffset: s, currentPosition: o, context: u }; } const ca = "parser", ua = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g; function da(e, t, r) { switch (e) { case "\\\\": return "\\"; case "\\'": return "'"; default: { const n = parseInt(t || r, 16); return n <= 55295 || n >= 57344 ? String.fromCodePoint(n) : "�"; } } } function fa(e = {}) { const t = e.location !== !1, { onError: r } = e; function n(c, h, b, O, ...x) { const A = c.currentPosition(); if (A.offset += O, A.column += O, r) { const S = t ? An(b, A) : null, P = mt(h, S, { domain: ca, args: x }); r(P); } } function s(c, h, b) { const O = { type: c }; return t && (O.start = h, O.end = h, O.loc = { start: b, end: b }), O; } function o(c, h, b, O) { t && (c.end = h, c.loc && (c.loc.end = b)); } function a(c, h) { const b = c.context(), O = s(3, b.offset, b.startLoc); return O.value = h, o(O, c.currentOffset(), c.currentPosition()), O; } function l(c, h) { const b = c.context(), { lastOffset: O, lastStartLoc: x } = b, A = s(5, O, x); return A.index = parseInt(h, 10), c.nextToken(), o(A, c.currentOffset(), c.currentPosition()), A; } function i(c, h) { const b = c.context(), { lastOffset: O, lastStartLoc: x } = b, A = s(4, O, x); return A.key = h, c.nextToken(), o(A, c.currentOffset(), c.currentPosition()), A; } function u(c, h) { const b = c.context(), { lastOffset: O, lastStartLoc: x } = b, A = s(9, O, x); return A.value = h.replace(ua, da), c.nextToken(), o(A, c.currentOffset(), c.currentPosition()), A; } function d(c) { const h = c.nextToken(), b = c.context(), { lastOffset: O, lastStartLoc: x } = b, A = s(8, O, x); return h.type !== 11 ? (n(c, U.UNEXPECTED_EMPTY_LINKED_MODIFIER, b.lastStartLoc, 0), A.value = "", o(A, O, x), { nextConsumeToken: h, node: A }) : (h.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, De(h)), A.value = h.value || "", o(A, c.currentOffset(), c.currentPosition()), { node: A }); } function _(c, h) { const b = c.context(), O = s(7, b.offset, b.startLoc); return O.value = h, o(O, c.currentOffset(), c.currentPosition()), O; } function f(c) { const h = c.context(), b = s(6, h.offset, h.startLoc); let O = c.nextToken(); if (O.type === 8) { const x = d(c); b.modifier = x.node, O = x.nextConsumeToken || c.nextToken(); } switch (O.type !== 9 && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(O)), O = c.nextToken(), O.type === 2 && (O = c.nextToken()), O.type) { case 10: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(O)), b.key = _(c, O.value || ""); break; case 4: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(O)), b.key = i(c, O.value || ""); break; case 5: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(O)), b.key = l(c, O.value || ""); break; case 6: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(O)), b.key = u(c, O.value || ""); break; default: { n(c, U.UNEXPECTED_EMPTY_LINKED_KEY, h.lastStartLoc, 0); const x = c.context(), A = s(7, x.offset, x.startLoc); return A.value = "", o(A, x.offset, x.startLoc), b.key = A, o(b, x.offset, x.startLoc), { nextConsumeToken: O, node: b }; } } return o(b, c.currentOffset(), c.currentPosition()), { node: b }; } function v(c) { const h = c.context(), b = h.currentType === 1 ? c.currentOffset() : h.offset, O = h.currentType === 1 ? h.endLoc : h.startLoc, x = s(2, b, O); x.items = []; let A = null; do { const W = A || c.nextToken(); switch (A = null, W.type) { case 0: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(W)), x.items.push(a(c, W.value || "")); break; case 5: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(W)), x.items.push(l(c, W.value || "")); break; case 4: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(W)), x.items.push(i(c, W.value || "")); break; case 6: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, De(W)), x.items.push(u(c, W.value || "")); break; case 7: { const ne = f(c); x.items.push(ne.node), A = ne.nextConsumeToken || null; break; } } } while (h.currentType !== 13 && h.currentType !== 1); const S = h.currentType === 1 ? h.lastOffset : c.currentOffset(), P = h.currentType === 1 ? h.lastEndLoc : c.currentPosition(); return o(x, S, P), x; } function E(c, h, b, O) { const x = c.context(); let A = O.items.length === 0; const S = s(1, h, b); S.cases = [], S.cases.push(O); do { const P = v(c); A || (A = P.items.length === 0), S.cases.push(P); } while (x.currentType !== 13); return A && n(c, U.MUST_HAVE_MESSAGES_IN_PLURAL, b, 0), o(S, c.currentOffset(), c.currentPosition()), S; } function w(c) { const h = c.context(), { offset: b, startLoc: O } = h, x = v(c); return h.currentType === 13 ? x : E(c, b, O, x); } function g(c) { const h = ia(c, pe({}, e)), b = h.context(), O = s(0, b.offset, b.startLoc); return t && O.loc && (O.loc.source = c), O.body = w(h), e.onCacheKey && (O.cacheKey = e.onCacheKey(c)), b.currentType !== 13 && n(h, U.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, c[b.offset] || ""), o(O, h.currentOffset(), h.currentPosition()), O; } return { parse: g }; } function De(e) { if (e.type === 13) return "EOF"; const t = (e.value || "").replace(/\r?\n/gu, "\\n"); return t.length > 10 ? t.slice(0, 9) + "…" : t; } function pa(e, t = {}) { const r = { ast: e, helpers: /* @__PURE__ */ new Set() }; return { context: () => r, helper: (o) => (r.helpers.add(o), o) }; } function hr(e, t) { for (let r = 0; r < e.length; r++) Qn(e[r], t); } function Qn(e, t) { switch (e.type) { case 1: hr(e.cases, t), t.helper( "plural" /* HelperNameMap.PLURAL */ ); break; case 2: hr(e.items, t); break; case 6: { Qn(e.key, t), t.helper( "linked" /* HelperNameMap.LINKED */ ), t.helper( "type" /* HelperNameMap.TYPE */ ); break; } case 5: t.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ), t.helper( "list" /* HelperNameMap.LIST */ ); break; case 4: t.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ), t.helper( "named" /* HelperNameMap.NAMED */ ); break; } } function ma(e, t = {}) { const r = pa(e); r.helper( "normalize" /* HelperNameMap.NORMALIZE */ ), e.body && Qn(e.body, r); const n = r.context(); e.helpers = Array.from(n.helpers); } function _a(e) { const t = e.body; return t.type === 2 ? gr(t) : t.cases.forEach((r) => gr(r)), e; } function gr(e) { if (e.items.length === 1) { const t = e.items[0]; (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value); } else { const t = []; for (let r = 0; r < e.items.length; r++) { const n = e.items[r]; if (!(n.type === 3 || n.type === 9) || n.value == null) break; t.push(n.value); } if (t.length === e.items.length) { e.static = Jn(t); for (let r = 0; r < e.items.length; r++) { const n = e.items[r]; (n.type === 3 || n.type === 9) && delete n.value; } } } } const ha = "minifier"; function ut(e) { switch (e.t = e.type, e.type) { case 0: { const t = e; ut(t.body), t.b = t.body, delete t.body; break; } case 1: { const t = e, r = t.cases; for (let n = 0; n < r.length; n++) ut(r[n]); t.c = r, delete t.cases; break; } case 2: { const t = e, r = t.items; for (let n = 0; n < r.length; n++) ut(r[n]); t.i = r, delete t.items, t.static && (t.s = t.static, delete t.static); break; } case 3: case 9: case 8: case 7: { const t = e; t.value && (t.v = t.value, delete t.value); break; } case 6: { const t = e; ut(t.key), t.k = t.key, delete t.key, t.modifier && (ut(t.modifier), t.m = t.modifier, delete t.modifier); break; } case 5: { const t = e; t.i = t.index, delete t.index; break; } case 4: { const t = e; t.k = t.key, delete t.key; break; } default: if (process.env.NODE_ENV !== "production") throw mt(U.UNHANDLED_MINIFIER_NODE_TYPE, null, { domain: ha, args: [e.type] }); } delete e.type; } const ga = "parser"; function ya(e, t) { const { sourceMap: r, filename: n, breakLineCode: s, needIndent: o } = t, a = t.location !== !1, l = { filename: n, code: "", column: 1, line: 1, offset: 0, map: void 0, breakLineCode: s, needIndent: o, indentLevel: 0 }; a && e.loc && (l.source = e.loc.source); const i = () => l; function u(g, c) { l.code += g; } function d(g, c = !0) { const h = c ? s : ""; u(o ? h + " ".repeat(g) : h); } function _(g = !0) { const c = ++l.indentLevel; g && d(c); } function f(g = !0) { const c = --l.indentLevel; g && d(c); } function v() { d(l.indentLevel); } return { context: i, push: u, indent: _, deindent: f, newline: v, helper: (g) => `_${g}`, needIndent: () => l.needIndent }; } function va(e, t) { const { helper: r } = e; e.push(`${r( "linked" /* HelperNameMap.LINKED */ )}(`), pt(e, t.key), t.modifier ? (e.push(", "), pt(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")"); } function ba(e, t) { const { helper: r, needIndent: n } = e; e.push(`${r( "normalize" /* HelperNameMap.NORMALIZE */ )}([`), e.indent(n()); const s = t.items.length; for (let o = 0; o < s && (pt(e, t.items[o]), o !== s - 1); o++) e.push(", "); e.deindent(n()), e.push("])"); } function Ea(e, t) { const { helper: r, needIndent: n } = e; if (t.cases.length > 1) { e.push(`${r( "plural" /* HelperNameMap.PLURAL */ )}([`), e.indent(n()); const s = t.cases.length; for (let o = 0; o < s && (pt(e, t.cases[o]), o !== s - 1); o++) e.push(", "); e.deindent(n()), e.push("])"); } } function wa(e, t) { t.body ? pt(e, t.body) : e.push("null"); } function pt(e, t) { const { helper: r } = e; switch (t.type) { case 0: wa(e, t); break; case 1: Ea(e, t); break; case 2: ba(e, t); break; case 6: va(e, t); break; case 8: e.push(JSON.stringify(t.value), t); break; case 7: e.push(JSON.stringify(t.value), t); break; case 5: e.push(`${r( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${r( "list" /* HelperNameMap.LIST */ )}(${t.index}))`, t); break; case 4: e.push(`${r( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${r( "named" /* HelperNameMap.NAMED */ )}(${JSON.stringify(t.key)}))`, t); break; case 9: e.push(JSON.stringify(t.value), t); break; case 3: e.push(JSON.stringify(t.value), t); break; default: if (process.env.NODE_ENV !== "production") throw mt(U.UNHANDLED_CODEGEN_NODE_TYPE, null, { domain: ga, args: [t.type] }); } } const Na = (e, t = {}) => { const r = R(t.mode) ? t.mode : "normal", n = R(t.filename) ? t.filename : "message.intl", s = !!t.sourceMap, o = t.breakLineCode != null ? t.breakLineCode : r === "arrow" ? ";" : ` `, a = t.needIndent ? t.needIndent : r !== "arrow", l = e.helpers || [], i = ya(e, { mode: r, filename: n, sourceMap: s, breakLineCode: o, needIndent: a }); i.push(r === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), l.length > 0 && (i.push(`const { ${Jn(l.map((_) => `${_}: _${_}`), ", ")} } = ctx`), i.newline()), i.push("return "), pt(i, e), i.deindent(a), i.push("}"), delete e.helpers; const { code: u, map: d } = i.context(); return { ast: e, code: u, map: d ? d.toJSON() : void 0 // eslint-disable-line @typescript-eslint/no-explicit-any }; }; function Oa(e, t = {}) { const r = pe({}, t), n = !!r.jit, s = !!r.minify, o = r.optimize == null ? !0 : r.optimize, l = fa(r).parse(e); return n ? (o && _a(l), s && ut(l), { ast: l, code: "" }) : (ma(l, r), Na(l, r)); } /*! * core-base v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ function Ta() { typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ze().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ze().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1); } function En(e) { return (r) => ka(r, e); } function ka(e, t) { const r = Ca(t); if (r == null) throw St( 0 /* NodeTypes.Resource */ ); if (Zn(r) === 1) { const o = xa(r); return e.plural(o.reduce((a, l) => [ ...a, yr(e, l) ], [])); } else return yr(e, r); } const Sa = ["b", "body"]; function Ca(e) { return Ge(e, Sa); } const La = ["c", "cases"]; function xa(e) { return Ge(e, La, []); } function yr(e, t) { const r = Ia(t); if (r != null) return e.type === "text" ? r : e.normalize([r]); { const n = Da(t).reduce((s, o) => [...s, In(e, o)], []); return e.normalize(n); } } const Aa = ["s", "static"]; function Ia(e) { return Ge(e, Aa); } const Ra = ["i", "items"]; function Da(e) { return Ge(e, Ra, []); } function In(e, t) { const r = Zn(t); switch (r) { case 3: return Ut(t, r); case 9: return Ut(t, r); case 4: { const n = t; if (Ae(n, "k") && n.k) return e.interpolate(e.named(n.k)); if (Ae(n, "key") && n.key) return e.interpolate(e.named(n.key)); throw St(r); } case 5: { const n = t; if (Ae(n, "i") && fe(n.i)) return e.interpolate(e.list(n.i)); if (Ae(n, "index") && fe(n.index)) return e.interpolate(e.list(n.index)); throw St(r); } case 6: { const n = t, s = $a(n), o = Va(n); return e.linked(In(e, o), s ? In(e, s) : void 0, e.type); } case 7: return Ut(t, r); case 8: return Ut(t, r); default: throw new Error(`unhandled node on format message part: ${r}`); } } const Pa = ["t", "type"]; function Zn(e) { return Ge(e, Pa); } const Ma = ["v", "value"]; function Ut(e, t) { const r = Ge(e, Ma); if (r) return r; throw St(t); } const Fa = ["m", "modifier"]; function $a(e) { return Ge(e, Fa); } const Ua = ["k", "key"]; function Va(e) { const t = Ge(e, Ua); if (t) return t; throw St( 6 /* NodeTypes.Linked */ ); } function Ge(e, t, r) { for (let n = 0; n < t.length; n++) { const s = t[n]; if (Ae(e, s) && e[s] != null) return e[s]; } return r; } function St(e) { return new Error(`unhandled node type: ${e}`); } const Ba = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS."; function qa(e, t) { t && ta(e) && We(rn(Ba, { source: e })); } const ja = (e) => e; let Vt = ee(); function st(e) { return K(e) && Zn(e) === 0 && (Ae(e, "b") || Ae(e, "body")); } function Ha(e, t = {}) { let r = !1; const n = t.onError || Zo; return t.onError = (s) => { r = !0, n(s); }, { ...Oa(e, t), detectError: r }; } // @__NO_SIDE_EFFECTS__ function Wa(e, t) { if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && R(e)) { const r = le(t.warnHtmlMessage) ? t.warnHtmlMessage : !0; process.env.NODE_ENV !== "production" && qa(e, r); const s = (t.onCacheKey || ja)(e), o = Vt[s]; if (o) return o; const { ast: a, detectError: l } = Ha(e, { ...t, location: process.env.NODE_ENV !== "production", jit: !0 }), i = En(a); return l ? i : Vt[s] = i; } else { if (process.env.NODE_ENV !== "production" && !st(e)) return We(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e; const r = e.cacheKey; if (r) { const n = Vt[r]; return n || (Vt[r] = En(e)); } else return En(e); } } let Ct = null; function Ga(e) { Ct = e; } function Ya(e, t, r) { Ct && Ct.emit("i18n:init", { timestamp: Date.now(), i18n: e, version: t, meta: r }); } const Ka = /* @__PURE__ */ Xa("function:translate"); function Xa(e) { return (t) => Ct && Ct.emit(e, t); } const _e = { INVALID_ARGUMENT: Jo, // 17 INVALID_DATE_ARGUMENT: 18, INVALID_ISO_DATE_ARGUMENT: 19, NOT_SUPPORT_NON_STRING_MESSAGE: 20, NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21, NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22, NOT_SUPPORT_LOCALE_TYPE: 23 }, za = 24; function Ve(e) { return mt(e, null, process.env.NODE_ENV !== "production" ? { messages: Ja } : void 0); } const Ja = { [_e.INVALID_ARGUMENT]: "Invalid arguments", [_e.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.", [_e.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string", [_e.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message", [_e.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value", [_e.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function", [_e.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type" }; function er(e, t) { return t.locale != null ? vr(t.locale) : vr(e.locale); } let wn; function vr(e) { if (R(e)) return e; if (te(e)) { if (e.resolvedOnce && wn != null) return wn; if (e.constructor.name === "Function") { const t = e(); if (Wo(t)) throw Ve(_e.NOT_SUPPORT_LOCALE_PROMISE_VALUE); return wn = t; } else throw Ve(_e.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION); } else throw Ve(_e.NOT_SUPPORT_LOCALE_TYPE); } function Qa(e, t, r) { return [.../* @__PURE__ */ new Set([ r, ...de(t) ? t : K(t) ? Object.keys(t) : R(t) ? [t] : [r] ])]; } function as(e, t, r) { const n = R(r) ? r : Qt, s = e; s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map()); let o = s.__localeChainCache.get(n); if (!o) { o = []; let a = [r]; for (; de(a); ) a = br(o, a, t); const l = de(t) || !Y(t) ? t : t.default ? t.default : null; a = R(l) ? [l] : l, de(a) && br(o, a, !1), s.__localeChainCache.set(n, o); } return o; } function br(e, t, r) { let n = !0; for (let s = 0; s < t.length && le(n); s++) { const o = t[s]; R(o) && (n = Za(e, t[s], r)); } return n; } function Za(e, t, r) { let n; const s = t.split("-"); do { const o = s.join("-"); n = el(e, o, r), s.splice(-1, 1); } while (s.length && n === !0); return n; } function el(e, t, r) { let n = !1; if (!e.includes(t) && (n = !0, t)) { n = t[t.length - 1] !== "!"; const s = t.replace(/!/g, ""); e.push(s), (de(r) || Y(r)) && r[s] && (n = r[s]); } return n; } const Ye = []; Ye[ 0 /* States.BEFORE_PATH */ ] = { w: [ 0 /* States.BEFORE_PATH */ ], i: [ 3, 0 /* Actions.APPEND */ ], "[": [ 4 /* States.IN_SUB_PATH */ ], o: [ 7 /* States.AFTER_PATH */ ] }; Ye[ 1 /* States.IN_PATH */ ] = { w: [ 1 /* States.IN_PATH */ ], ".": [ 2 /* States.BEFORE_IDENT */ ], "[": [ 4 /* States.IN_SUB_PATH */ ], o: [ 7 /* States.AFTER_PATH */ ] }; Ye[ 2 /* States.BEFORE_IDENT */ ] = { w: [ 2 /* States.BEFORE_IDENT */ ], i: [ 3, 0 /* Actions.APPEND */ ], 0: [ 3, 0 /* Actions.APPEND */ ] }; Ye[ 3 /* States.IN_IDENT */ ] = { i: [ 3, 0 /* Actions.APPEND */ ], 0: [ 3, 0 /* Actions.APPEND */ ], w: [ 1, 1 /* Actions.PUSH */ ], ".": [ 2, 1 /* Actions.PUSH */ ], "[": [ 4, 1 /* Actions.PUSH */ ], o: [ 7, 1 /* Actions.PUSH */ ] }; Ye[ 4 /* States.IN_SUB_PATH */ ] = { "'": [ 5, 0 /* Actions.APPEND */ ], '"': [ 6, 0 /* Actions.APPEND */ ], "[": [ 4, 2 /* Actions.INC_SUB_PATH_DEPTH */ ], "]": [ 1, 3 /* Actions.PUSH_SUB_PATH */ ], o: 8, l: [ 4, 0 /* Actions.APPEND */ ] }; Ye[ 5 /* States.IN_SINGLE_QUOTE */ ] = { "'": [ 4, 0 /* Actions.APPEND */ ], o: 8, l: [ 5, 0 /* Actions.APPEND */ ] }; Ye[ 6 /* States.IN_DOUBLE_QUOTE */ ] = { '"': [ 4, 0 /* Actions.APPEND */ ], o: 8, l: [ 6, 0 /* Actions.APPEND */ ] }; const tl = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function nl(e) { return tl.test(e); } function rl(e) { const t = e.charCodeAt(0), r = e.charCodeAt(e.length - 1); return t === r && (t === 34 || t === 39) ? e.slice(1, -1) : e; } function sl(e) { if (e == null) return "o"; switch (e.charCodeAt(0)) { case 91: case 93: case 46: case 34: case 39: return e; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function ol(e) { const t = e.trim(); return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : nl(t) ? rl(t) : "*" + t; } function al(e) { const t = []; let r = -1, n = 0, s = 0, o, a, l, i, u, d, _; const f = []; f[ 0 /* Actions.APPEND */ ] = () => { a === void 0 ? a = l : a += l; }, f[ 1 /* Actions.PUSH */ ] = () => { a !== void 0 && (t.push(a), a = void 0); }, f[ 2 /* Actions.INC_SUB_PATH_DEPTH */ ] = () => { f[ 0 /* Actions.APPEND */ ](), s++; }, f[ 3 /* Actions.PUSH_SUB_PATH */ ] = () => { if (s > 0) s--,