china-mobile-international-custom-components 0.0.48 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +24 -0
  2. package/es/ApplicationTypeTag.mjs +1 -1
  3. package/es/AvailableRangePreview.mjs +1 -1
  4. package/es/AvailableRangeSetting.mjs +2 -2
  5. package/es/CommonTagsList.mjs +3 -3
  6. package/es/DialogContainer.mjs +21 -21
  7. package/es/FileUploader.mjs +134 -135
  8. package/es/ParameterTable.mjs +1 -1
  9. package/es/SourcePublish.mjs +6 -6
  10. package/es/Table.mjs +2 -2
  11. package/es/assets/AddOrEditSupplierDialog.css +1 -0
  12. package/es/assets/index3.css +1 -1
  13. package/es/chunks/{BackBar.DwhmSL-a.js → BackBar.DnDtQBAg.js} +96 -96
  14. package/es/chunks/{BackBar.9Pp2SYB-.js → BackBar.eaUb1JvV.js} +1 -1
  15. package/es/chunks/{config.DVEvXGIL.js → config.CvOtShOj.js} +2 -2
  16. package/es/chunks/config.DkSRacA9.js +435 -0
  17. package/es/chunks/{i18n.DMVLcyDY.js → i18n.Bd7hh14j.js} +2 -2
  18. package/es/chunks/index.B_T3qY7U.js +1008 -0
  19. package/es/chunks/{index.CZTB65ge.js → index.CHlFhI6c.js} +1 -1
  20. package/es/chunks/index.D9VEEedZ.js +1005 -0
  21. package/es/chunks/index.DHcry2-T.js +1010 -0
  22. package/es/chunks/index.JtDVXCay.js +1008 -0
  23. package/es/chunks/index.o4gC5-Xq.js +1011 -0
  24. package/es/chunks/index.qAljoMis.js +976 -0
  25. package/es/index.mjs +227 -188
  26. package/lib/AddOrEditSupplierDialog.js +1 -0
  27. package/lib/ApplicationTypeTag.js +1 -1
  28. package/lib/AvailableRangePreview.js +1 -1
  29. package/lib/AvailableRangeSetting.js +1 -1
  30. package/lib/CommonTagsList.js +1 -1
  31. package/lib/DialogContainer.js +1 -1
  32. package/lib/FileUploader.js +1 -1
  33. package/lib/ParameterTable.js +1 -1
  34. package/lib/SourcePublish.js +1 -1
  35. package/lib/Table.js +1 -1
  36. package/lib/assets/AddOrEditSupplierDialog.css +1 -0
  37. package/lib/assets/index3.css +1 -1
  38. package/lib/chunks/{BackBar.DFDSVp2a.js → BackBar.CaaASGvb.js} +1 -1
  39. package/lib/chunks/BackBar.DhaZZIoV.js +1 -0
  40. package/lib/chunks/{config.Dwnp4fRZ.js → config.CqfpM51B.js} +1 -1
  41. package/lib/chunks/{i18n.Bzvn6t8H.js → i18n.D3L1FBDI.js} +2 -2
  42. package/lib/chunks/index.BhoAcBeE.js +1 -0
  43. package/lib/chunks/index.CE91RC0G.js +1 -0
  44. package/lib/chunks/index.Cv1roodm.js +1 -0
  45. package/lib/chunks/{index.DO3h_zf2.js → index.D-pFPuUr.js} +1 -1
  46. package/lib/chunks/index.D32cNfAI.js +1 -0
  47. package/lib/chunks/index.DtleLxiH.js +1 -0
  48. package/lib/chunks/index.DusP0A6s.js +1 -0
  49. package/lib/index.js +1 -1
  50. package/package.json +5 -3
  51. package/es/chunks/i18n.BNeBD4gR.js +0 -4028
  52. package/es/chunks/i18n.DUrvNBQz.js +0 -4028
  53. package/es/chunks/index.BcLVH95_.js +0 -4058
  54. package/es/chunks/index.CSPp4g5C.js +0 -303
  55. package/es/chunks/index.ClqvUq64.js +0 -302
  56. package/es/chunks/index.Dh5IGfxO.js +0 -290
  57. package/es/chunks/index.Doax01RQ.js +0 -254
  58. package/es/chunks/layout.C0EtkrZg.js +0 -639
  59. package/lib/chunks/BackBar.CYThcqhK.js +0 -1
  60. package/lib/chunks/i18n.D-d0yyXi.js +0 -6
  61. package/lib/chunks/i18n.Giy85Rng.js +0 -6
  62. package/lib/chunks/index.6X8xsqRJ.js +0 -1
  63. package/lib/chunks/index.Bk55us0s.js +0 -1
  64. package/lib/chunks/index.CP9rhXZ5.js +0 -1
  65. package/lib/chunks/index.CSLWrMRE.js +0 -1
  66. package/lib/chunks/index.CV29Us4A.js +0 -6
  67. package/lib/chunks/layout.BO1q-dAZ.js +0 -1
@@ -1,4028 +0,0 @@
1
- import * as Nt from "vue";
2
- import { effectScope as Lr, ref as Tr, shallowRef as br, computed as Ue, watch as Ot, isRef as Or, defineComponent as wt, h as Mn, Fragment as wn, inject as Ir, onMounted as vr, onUnmounted as Cr, createVNode as Dr, Text as Ar, getCurrentInstance as Fr } from "vue";
3
- import { ElMessageBox as Sr } from "element-plus";
4
- import yr from "js-cookie";
5
- function ue(e, t) {
6
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
7
- }
8
- const Zt = {};
9
- function Ut(e) {
10
- Zt[e] || (Zt[e] = !0, ue(e));
11
- }
12
- const oe = typeof window < "u";
13
- let ee, Le;
14
- if (process.env.NODE_ENV !== "production") {
15
- const e = oe && window.performance;
16
- e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
17
- e.clearMeasures && (ee = (t) => {
18
- e.mark(t);
19
- }, Le = (t, n, r) => {
20
- e.measure(t, n, r), e.clearMarks(n), e.clearMarks(r);
21
- });
22
- }
23
- const Pr = /\{([0-9a-zA-Z]+)\}/g;
24
- function ze(e, ...t) {
25
- return t.length === 1 && R(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Pr, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
26
- }
27
- const ce = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), kr = (e, t, n) => Rr({ l: e, k: t, s: n }), Rr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), Mr = (e) => Vt(e) === "[object Date]", Fe = (e) => Vt(e) === "[object RegExp]", et = (e) => k(e) && Object.keys(e).length === 0, J = Object.assign, wr = Object.create, $ = (e = null) => wr(e);
28
- let zt;
29
- const he = () => zt || (zt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : $());
30
- function en(e) {
31
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\//g, "&#x2F;").replace(/=/g, "&#x3D;");
32
- }
33
- function tn(e) {
34
- return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
35
- }
36
- function Ur(e) {
37
- return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (r, a, s) => `${a}="${tn(s)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (r, a, s) => `${a}='${tn(s)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && ue("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."), e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")), [
38
- // In href, src, action, formaction attributes
39
- /(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
40
- // In style attributes within url()
41
- /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
42
- ].forEach((r) => {
43
- e = e.replace(r, "$1javascript&#58;");
44
- }), e;
45
- }
46
- const Vr = Object.prototype.hasOwnProperty;
47
- function se(e, t) {
48
- return Vr.call(e, t);
49
- }
50
- const G = Array.isArray, x = (e) => typeof e == "function", O = (e) => typeof e == "string", M = (e) => typeof e == "boolean", R = (e) => e !== null && typeof e == "object", $r = (e) => R(e) && x(e.then) && x(e.catch), Un = Object.prototype.toString, Vt = (e) => Un.call(e), k = (e) => Vt(e) === "[object Object]", xr = (e) => e == null ? "" : G(e) || k(e) && e.toString === Un ? JSON.stringify(e, null, 2) : String(e);
51
- function $t(e, t = "") {
52
- return e.reduce((n, r, a) => a === 0 ? n + r : n + t + r, "");
53
- }
54
- const nn = 2;
55
- function Wr(e, t = 0, n = e.length) {
56
- const r = e.split(/\r?\n/);
57
- let a = 0;
58
- const s = [];
59
- for (let o = 0; o < r.length; o++)
60
- if (a += r[o].length + 1, a >= t) {
61
- for (let i = o - nn; i <= o + nn || n > a; i++) {
62
- if (i < 0 || i >= r.length)
63
- continue;
64
- const c = i + 1;
65
- s.push(`${c}${" ".repeat(3 - String(c).length)}| ${r[i]}`);
66
- const E = r[i].length;
67
- if (i === o) {
68
- const b = t - (a - E) + 1, L = Math.max(1, n > a ? E - b : n - t);
69
- s.push(" | " + " ".repeat(b) + "^".repeat(L));
70
- } else if (i > o) {
71
- if (n > a) {
72
- const b = Math.max(Math.min(n - a, E), 1);
73
- s.push(" | " + "^".repeat(b));
74
- }
75
- a += E + 1;
76
- }
77
- }
78
- break;
79
- }
80
- return s.join(`
81
- `);
82
- }
83
- function xt() {
84
- const e = /* @__PURE__ */ new Map();
85
- return {
86
- events: e,
87
- on(n, r) {
88
- const a = e.get(n);
89
- a && a.push(r) || e.set(n, [r]);
90
- },
91
- off(n, r) {
92
- const a = e.get(n);
93
- a && a.splice(a.indexOf(r) >>> 0, 1);
94
- },
95
- emit(n, r) {
96
- (e.get(n) || []).slice().map((a) => a(r)), (e.get("*") || []).slice().map((a) => a(n, r));
97
- }
98
- };
99
- }
100
- const Xe = (e) => !R(e) || G(e);
101
- function qe(e, t) {
102
- if (Xe(e) || Xe(t))
103
- throw new Error("Invalid value");
104
- const n = [{ src: e, des: t }];
105
- for (; n.length; ) {
106
- const { src: r, des: a } = n.pop();
107
- Object.keys(r).forEach((s) => {
108
- s !== "__proto__" && (R(r[s]) && !R(a[s]) && (a[s] = Array.isArray(r[s]) ? [] : $()), Xe(a[s]) || Xe(r[s]) ? a[s] = r[s] : n.push({ src: r[s], des: a[s] }));
109
- });
110
- }
111
- }
112
- function Br(e, t, n) {
113
- return { line: e, column: t, offset: n };
114
- }
115
- function It(e, t, n) {
116
- return { start: e, end: t };
117
- }
118
- const S = {
119
- // tokenizer error codes
120
- EXPECTED_TOKEN: 1,
121
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
122
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
123
- UNKNOWN_ESCAPE_SEQUENCE: 4,
124
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
125
- UNBALANCED_CLOSING_BRACE: 6,
126
- UNTERMINATED_CLOSING_BRACE: 7,
127
- EMPTY_PLACEHOLDER: 8,
128
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
129
- INVALID_LINKED_FORMAT: 10,
130
- // parser error codes
131
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
132
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
133
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
134
- UNEXPECTED_LEXICAL_ANALYSIS: 14,
135
- // generator error codes
136
- UNHANDLED_CODEGEN_NODE_TYPE: 15,
137
- // minifier error codes
138
- UNHANDLED_MINIFIER_NODE_TYPE: 16
139
- }, Gr = 17, Yr = {
140
- // tokenizer error messages
141
- [S.EXPECTED_TOKEN]: "Expected token: '{0}'",
142
- [S.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
143
- [S.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
144
- [S.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
145
- [S.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
146
- [S.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
147
- [S.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
148
- [S.EMPTY_PLACEHOLDER]: "Empty placeholder",
149
- [S.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
150
- [S.INVALID_LINKED_FORMAT]: "Invalid linked format",
151
- // parser error messages
152
- [S.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
153
- [S.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
154
- [S.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
155
- [S.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
156
- // generator error messages
157
- [S.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
158
- // minimizer error messages
159
- [S.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
160
- };
161
- function Pe(e, t, n = {}) {
162
- const { domain: r, messages: a, args: s } = n, o = process.env.NODE_ENV !== "production" ? ze((a || Yr)[e] || "", ...s || []) : e, i = new SyntaxError(String(o));
163
- return i.code = e, t && (i.location = t), i.domain = r, i;
164
- }
165
- function Hr(e) {
166
- throw e;
167
- }
168
- const Kr = /<\/?[\w\s="/.':;#-\/]+>/, jr = (e) => Kr.test(e), le = " ", Xr = "\r", Q = `
169
- `, Jr = "\u2028", Qr = "\u2029";
170
- function qr(e) {
171
- const t = e;
172
- let n = 0, r = 1, a = 1, s = 0;
173
- const o = (g) => t[g] === Xr && t[g + 1] === Q, i = (g) => t[g] === Q, c = (g) => t[g] === Qr, E = (g) => t[g] === Jr, b = (g) => o(g) || i(g) || c(g) || E(g), L = () => n, N = () => r, D = () => a, y = () => s, C = (g) => o(g) || c(g) || E(g) ? Q : t[g], A = () => C(n), f = () => C(n + s);
174
- function m() {
175
- return s = 0, b(n) && (r++, a = 0), o(n) && n++, n++, a++, t[n];
176
- }
177
- function T() {
178
- return o(n + s) && s++, s++, t[n + s];
179
- }
180
- function d() {
181
- n = 0, r = 1, a = 1, s = 0;
182
- }
183
- function I(g = 0) {
184
- s = g;
185
- }
186
- function v() {
187
- const g = n + s;
188
- for (; g !== n; )
189
- m();
190
- s = 0;
191
- }
192
- return {
193
- index: L,
194
- line: N,
195
- column: D,
196
- peekOffset: y,
197
- charAt: C,
198
- currentChar: A,
199
- currentPeek: f,
200
- next: m,
201
- peek: T,
202
- reset: d,
203
- resetPeek: I,
204
- skipToPeek: v
205
- };
206
- }
207
- const _e = void 0, Zr = ".", rn = "'", zr = "tokenizer";
208
- function ea(e, t = {}) {
209
- const n = t.location !== !1, r = qr(e), a = () => r.index(), s = () => Br(r.line(), r.column(), r.index()), o = s(), i = a(), c = {
210
- currentType: 13,
211
- offset: i,
212
- startLoc: o,
213
- endLoc: o,
214
- lastType: 13,
215
- lastOffset: i,
216
- lastStartLoc: o,
217
- lastEndLoc: o,
218
- braceNest: 0,
219
- inLinked: !1,
220
- text: ""
221
- }, E = () => c, { onError: b } = t;
222
- function L(l, u, p, ...F) {
223
- const B = E();
224
- if (u.column += p, u.offset += p, b) {
225
- const H = n ? It(B.startLoc, u) : null, w = Pe(l, H, {
226
- domain: zr,
227
- args: F
228
- });
229
- b(w);
230
- }
231
- }
232
- function N(l, u, p) {
233
- l.endLoc = s(), l.currentType = u;
234
- const F = { type: u };
235
- return n && (F.loc = It(l.startLoc, l.endLoc)), p != null && (F.value = p), F;
236
- }
237
- const D = (l) => N(
238
- l,
239
- 13
240
- /* TokenTypes.EOF */
241
- );
242
- function y(l, u) {
243
- return l.currentChar() === u ? (l.next(), u) : (L(S.EXPECTED_TOKEN, s(), 0, u), "");
244
- }
245
- function C(l) {
246
- let u = "";
247
- for (; l.currentPeek() === le || l.currentPeek() === Q; )
248
- u += l.currentPeek(), l.peek();
249
- return u;
250
- }
251
- function A(l) {
252
- const u = C(l);
253
- return l.skipToPeek(), u;
254
- }
255
- function f(l) {
256
- if (l === _e)
257
- return !1;
258
- const u = l.charCodeAt(0);
259
- return u >= 97 && u <= 122 || // a-z
260
- u >= 65 && u <= 90 || // A-Z
261
- u === 95;
262
- }
263
- function m(l) {
264
- if (l === _e)
265
- return !1;
266
- const u = l.charCodeAt(0);
267
- return u >= 48 && u <= 57;
268
- }
269
- function T(l, u) {
270
- const { currentType: p } = u;
271
- if (p !== 2)
272
- return !1;
273
- C(l);
274
- const F = f(l.currentPeek());
275
- return l.resetPeek(), F;
276
- }
277
- function d(l, u) {
278
- const { currentType: p } = u;
279
- if (p !== 2)
280
- return !1;
281
- C(l);
282
- const F = l.currentPeek() === "-" ? l.peek() : l.currentPeek(), B = m(F);
283
- return l.resetPeek(), B;
284
- }
285
- function I(l, u) {
286
- const { currentType: p } = u;
287
- if (p !== 2)
288
- return !1;
289
- C(l);
290
- const F = l.currentPeek() === rn;
291
- return l.resetPeek(), F;
292
- }
293
- function v(l, u) {
294
- const { currentType: p } = u;
295
- if (p !== 7)
296
- return !1;
297
- C(l);
298
- const F = l.currentPeek() === ".";
299
- return l.resetPeek(), F;
300
- }
301
- function g(l, u) {
302
- const { currentType: p } = u;
303
- if (p !== 8)
304
- return !1;
305
- C(l);
306
- const F = f(l.currentPeek());
307
- return l.resetPeek(), F;
308
- }
309
- function P(l, u) {
310
- const { currentType: p } = u;
311
- if (!(p === 7 || p === 11))
312
- return !1;
313
- C(l);
314
- const F = l.currentPeek() === ":";
315
- return l.resetPeek(), F;
316
- }
317
- function U(l, u) {
318
- const { currentType: p } = u;
319
- if (p !== 9)
320
- return !1;
321
- const F = () => {
322
- const H = l.currentPeek();
323
- return H === "{" ? f(l.peek()) : H === "@" || H === "|" || H === ":" || H === "." || H === le || !H ? !1 : H === Q ? (l.peek(), F()) : ae(l, !1);
324
- }, B = F();
325
- return l.resetPeek(), B;
326
- }
327
- function X(l) {
328
- C(l);
329
- const u = l.currentPeek() === "|";
330
- return l.resetPeek(), u;
331
- }
332
- function ae(l, u = !0) {
333
- const p = (B = !1, H = "") => {
334
- const w = l.currentPeek();
335
- return w === "{" || w === "@" || !w ? B : w === "|" ? !(H === le || H === Q) : w === le ? (l.peek(), p(!0, le)) : w === Q ? (l.peek(), p(!0, Q)) : !0;
336
- }, F = p();
337
- return u && l.resetPeek(), F;
338
- }
339
- function Y(l, u) {
340
- const p = l.currentChar();
341
- return p === _e ? _e : u(p) ? (l.next(), p) : null;
342
- }
343
- function Ie(l) {
344
- const u = l.charCodeAt(0);
345
- return u >= 97 && u <= 122 || // a-z
346
- u >= 65 && u <= 90 || // A-Z
347
- u >= 48 && u <= 57 || // 0-9
348
- u === 95 || // _
349
- u === 36;
350
- }
351
- function rt(l) {
352
- return Y(l, Ie);
353
- }
354
- function at(l) {
355
- const u = l.charCodeAt(0);
356
- return u >= 97 && u <= 122 || // a-z
357
- u >= 65 && u <= 90 || // A-Z
358
- u >= 48 && u <= 57 || // 0-9
359
- u === 95 || // _
360
- u === 36 || // $
361
- u === 45;
362
- }
363
- function st(l) {
364
- return Y(l, at);
365
- }
366
- function ot(l) {
367
- const u = l.charCodeAt(0);
368
- return u >= 48 && u <= 57;
369
- }
370
- function lt(l) {
371
- return Y(l, ot);
372
- }
373
- function it(l) {
374
- const u = l.charCodeAt(0);
375
- return u >= 48 && u <= 57 || // 0-9
376
- u >= 65 && u <= 70 || // A-F
377
- u >= 97 && u <= 102;
378
- }
379
- function fe(l) {
380
- return Y(l, it);
381
- }
382
- function ke(l) {
383
- let u = "", p = "";
384
- for (; u = lt(l); )
385
- p += u;
386
- return p;
387
- }
388
- function ut(l) {
389
- let u = "";
390
- for (; ; ) {
391
- const p = l.currentChar();
392
- if (p === "{" || p === "}" || p === "@" || p === "|" || !p)
393
- break;
394
- if (p === le || p === Q)
395
- if (ae(l))
396
- u += p, l.next();
397
- else {
398
- if (X(l))
399
- break;
400
- u += p, l.next();
401
- }
402
- else
403
- u += p, l.next();
404
- }
405
- return u;
406
- }
407
- function ct(l) {
408
- A(l);
409
- let u = "", p = "";
410
- for (; u = st(l); )
411
- p += u;
412
- const F = l.currentChar();
413
- if (F && F !== "}" && F !== _e && F !== le && F !== Q && F !== " ") {
414
- const B = Ke(l);
415
- return L(S.INVALID_TOKEN_IN_PLACEHOLDER, s(), 0, p + B), p + B;
416
- }
417
- return l.currentChar() === _e && L(S.UNTERMINATED_CLOSING_BRACE, s(), 0), p;
418
- }
419
- function ft(l) {
420
- A(l);
421
- let u = "";
422
- return l.currentChar() === "-" ? (l.next(), u += `-${ke(l)}`) : u += ke(l), l.currentChar() === _e && L(S.UNTERMINATED_CLOSING_BRACE, s(), 0), u;
423
- }
424
- function _t(l) {
425
- return l !== rn && l !== Q;
426
- }
427
- function Qt(l) {
428
- A(l), y(l, "'");
429
- let u = "", p = "";
430
- for (; u = Y(l, _t); )
431
- u === "\\" ? p += mt(l) : p += u;
432
- const F = l.currentChar();
433
- return F === Q || F === _e ? (L(S.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, s(), 0), F === Q && (l.next(), y(l, "'")), p) : (y(l, "'"), p);
434
- }
435
- function mt(l) {
436
- const u = l.currentChar();
437
- switch (u) {
438
- case "\\":
439
- case "'":
440
- return l.next(), `\\${u}`;
441
- case "u":
442
- return He(l, u, 4);
443
- case "U":
444
- return He(l, u, 6);
445
- default:
446
- return L(S.UNKNOWN_ESCAPE_SEQUENCE, s(), 0, u), "";
447
- }
448
- }
449
- function He(l, u, p) {
450
- y(l, u);
451
- let F = "";
452
- for (let B = 0; B < p; B++) {
453
- const H = fe(l);
454
- if (!H) {
455
- L(S.INVALID_UNICODE_ESCAPE_SEQUENCE, s(), 0, `\\${u}${F}${l.currentChar()}`);
456
- break;
457
- }
458
- F += H;
459
- }
460
- return `\\${u}${F}`;
461
- }
462
- function dt(l) {
463
- return l !== "{" && l !== "}" && l !== le && l !== Q;
464
- }
465
- function Ke(l) {
466
- A(l);
467
- let u = "", p = "";
468
- for (; u = Y(l, dt); )
469
- p += u;
470
- return p;
471
- }
472
- function Et(l) {
473
- let u = "", p = "";
474
- for (; u = rt(l); )
475
- p += u;
476
- return p;
477
- }
478
- function gt(l) {
479
- const u = (p) => {
480
- const F = l.currentChar();
481
- return F === "{" || F === "@" || F === "|" || F === "(" || F === ")" || !F || F === le ? p : (p += F, l.next(), u(p));
482
- };
483
- return u("");
484
- }
485
- function Re(l) {
486
- A(l);
487
- const u = y(
488
- l,
489
- "|"
490
- /* TokenChars.Pipe */
491
- );
492
- return A(l), u;
493
- }
494
- function Me(l, u) {
495
- let p = null;
496
- switch (l.currentChar()) {
497
- case "{":
498
- return u.braceNest >= 1 && L(S.NOT_ALLOW_NEST_PLACEHOLDER, s(), 0), l.next(), p = N(
499
- u,
500
- 2,
501
- "{"
502
- /* TokenChars.BraceLeft */
503
- ), A(l), u.braceNest++, p;
504
- case "}":
505
- return u.braceNest > 0 && u.currentType === 2 && L(S.EMPTY_PLACEHOLDER, s(), 0), l.next(), p = N(
506
- u,
507
- 3,
508
- "}"
509
- /* TokenChars.BraceRight */
510
- ), u.braceNest--, u.braceNest > 0 && A(l), u.inLinked && u.braceNest === 0 && (u.inLinked = !1), p;
511
- case "@":
512
- return u.braceNest > 0 && L(S.UNTERMINATED_CLOSING_BRACE, s(), 0), p = ge(l, u) || D(u), u.braceNest = 0, p;
513
- default: {
514
- let B = !0, H = !0, w = !0;
515
- if (X(l))
516
- return u.braceNest > 0 && L(S.UNTERMINATED_CLOSING_BRACE, s(), 0), p = N(u, 1, Re(l)), u.braceNest = 0, u.inLinked = !1, p;
517
- if (u.braceNest > 0 && (u.currentType === 4 || u.currentType === 5 || u.currentType === 6))
518
- return L(S.UNTERMINATED_CLOSING_BRACE, s(), 0), u.braceNest = 0, we(l, u);
519
- if (B = T(l, u))
520
- return p = N(u, 4, ct(l)), A(l), p;
521
- if (H = d(l, u))
522
- return p = N(u, 5, ft(l)), A(l), p;
523
- if (w = I(l, u))
524
- return p = N(u, 6, Qt(l)), A(l), p;
525
- if (!B && !H && !w)
526
- return p = N(u, 12, Ke(l)), L(S.INVALID_TOKEN_IN_PLACEHOLDER, s(), 0, p.value), A(l), p;
527
- break;
528
- }
529
- }
530
- return p;
531
- }
532
- function ge(l, u) {
533
- const { currentType: p } = u;
534
- let F = null;
535
- const B = l.currentChar();
536
- switch ((p === 7 || p === 8 || p === 11 || p === 9) && (B === Q || B === le) && L(S.INVALID_LINKED_FORMAT, s(), 0), B) {
537
- case "@":
538
- return l.next(), F = N(
539
- u,
540
- 7,
541
- "@"
542
- /* TokenChars.LinkedAlias */
543
- ), u.inLinked = !0, F;
544
- case ".":
545
- return A(l), l.next(), N(
546
- u,
547
- 8,
548
- "."
549
- /* TokenChars.LinkedDot */
550
- );
551
- case ":":
552
- return A(l), l.next(), N(
553
- u,
554
- 9,
555
- ":"
556
- /* TokenChars.LinkedDelimiter */
557
- );
558
- default:
559
- return X(l) ? (F = N(u, 1, Re(l)), u.braceNest = 0, u.inLinked = !1, F) : v(l, u) || P(l, u) ? (A(l), ge(l, u)) : g(l, u) ? (A(l), N(u, 11, Et(l))) : U(l, u) ? (A(l), B === "{" ? Me(l, u) || F : N(u, 10, gt(l))) : (p === 7 && L(S.INVALID_LINKED_FORMAT, s(), 0), u.braceNest = 0, u.inLinked = !1, we(l, u));
560
- }
561
- }
562
- function we(l, u) {
563
- let p = {
564
- type: 13
565
- /* TokenTypes.EOF */
566
- };
567
- if (u.braceNest > 0)
568
- return Me(l, u) || D(u);
569
- if (u.inLinked)
570
- return ge(l, u) || D(u);
571
- switch (l.currentChar()) {
572
- case "{":
573
- return Me(l, u) || D(u);
574
- case "}":
575
- return L(S.UNBALANCED_CLOSING_BRACE, s(), 0), l.next(), N(
576
- u,
577
- 3,
578
- "}"
579
- /* TokenChars.BraceRight */
580
- );
581
- case "@":
582
- return ge(l, u) || D(u);
583
- default: {
584
- if (X(l))
585
- return p = N(u, 1, Re(l)), u.braceNest = 0, u.inLinked = !1, p;
586
- if (ae(l))
587
- return N(u, 0, ut(l));
588
- break;
589
- }
590
- }
591
- return p;
592
- }
593
- function pt() {
594
- const { currentType: l, offset: u, startLoc: p, endLoc: F } = c;
595
- return c.lastType = l, c.lastOffset = u, c.lastStartLoc = p, c.lastEndLoc = F, c.offset = a(), c.startLoc = s(), r.currentChar() === _e ? N(
596
- c,
597
- 13
598
- /* TokenTypes.EOF */
599
- ) : we(r, c);
600
- }
601
- return {
602
- nextToken: pt,
603
- currentOffset: a,
604
- currentPosition: s,
605
- context: E
606
- };
607
- }
608
- const ta = "parser", na = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
609
- function ra(e, t, n) {
610
- switch (e) {
611
- case "\\\\":
612
- return "\\";
613
- // eslint-disable-next-line no-useless-escape
614
- case "\\'":
615
- return "'";
616
- default: {
617
- const r = parseInt(t || n, 16);
618
- return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
619
- }
620
- }
621
- }
622
- function aa(e = {}) {
623
- const t = e.location !== !1, { onError: n } = e;
624
- function r(f, m, T, d, ...I) {
625
- const v = f.currentPosition();
626
- if (v.offset += d, v.column += d, n) {
627
- const g = t ? It(T, v) : null, P = Pe(m, g, {
628
- domain: ta,
629
- args: I
630
- });
631
- n(P);
632
- }
633
- }
634
- function a(f, m, T) {
635
- const d = { type: f };
636
- return t && (d.start = m, d.end = m, d.loc = { start: T, end: T }), d;
637
- }
638
- function s(f, m, T, d) {
639
- t && (f.end = m, f.loc && (f.loc.end = T));
640
- }
641
- function o(f, m) {
642
- const T = f.context(), d = a(3, T.offset, T.startLoc);
643
- return d.value = m, s(d, f.currentOffset(), f.currentPosition()), d;
644
- }
645
- function i(f, m) {
646
- const T = f.context(), { lastOffset: d, lastStartLoc: I } = T, v = a(5, d, I);
647
- return v.index = parseInt(m, 10), f.nextToken(), s(v, f.currentOffset(), f.currentPosition()), v;
648
- }
649
- function c(f, m) {
650
- const T = f.context(), { lastOffset: d, lastStartLoc: I } = T, v = a(4, d, I);
651
- return v.key = m, f.nextToken(), s(v, f.currentOffset(), f.currentPosition()), v;
652
- }
653
- function E(f, m) {
654
- const T = f.context(), { lastOffset: d, lastStartLoc: I } = T, v = a(9, d, I);
655
- return v.value = m.replace(na, ra), f.nextToken(), s(v, f.currentOffset(), f.currentPosition()), v;
656
- }
657
- function b(f) {
658
- const m = f.nextToken(), T = f.context(), { lastOffset: d, lastStartLoc: I } = T, v = a(8, d, I);
659
- return m.type !== 11 ? (r(f, S.UNEXPECTED_EMPTY_LINKED_MODIFIER, T.lastStartLoc, 0), v.value = "", s(v, d, I), {
660
- nextConsumeToken: m,
661
- node: v
662
- }) : (m.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, T.lastStartLoc, 0, ie(m)), v.value = m.value || "", s(v, f.currentOffset(), f.currentPosition()), {
663
- node: v
664
- });
665
- }
666
- function L(f, m) {
667
- const T = f.context(), d = a(7, T.offset, T.startLoc);
668
- return d.value = m, s(d, f.currentOffset(), f.currentPosition()), d;
669
- }
670
- function N(f) {
671
- const m = f.context(), T = a(6, m.offset, m.startLoc);
672
- let d = f.nextToken();
673
- if (d.type === 8) {
674
- const I = b(f);
675
- T.modifier = I.node, d = I.nextConsumeToken || f.nextToken();
676
- }
677
- switch (d.type !== 9 && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(d)), d = f.nextToken(), d.type === 2 && (d = f.nextToken()), d.type) {
678
- case 10:
679
- d.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(d)), T.key = L(f, d.value || "");
680
- break;
681
- case 4:
682
- d.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(d)), T.key = c(f, d.value || "");
683
- break;
684
- case 5:
685
- d.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(d)), T.key = i(f, d.value || "");
686
- break;
687
- case 6:
688
- d.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(d)), T.key = E(f, d.value || "");
689
- break;
690
- default: {
691
- r(f, S.UNEXPECTED_EMPTY_LINKED_KEY, m.lastStartLoc, 0);
692
- const I = f.context(), v = a(7, I.offset, I.startLoc);
693
- return v.value = "", s(v, I.offset, I.startLoc), T.key = v, s(T, I.offset, I.startLoc), {
694
- nextConsumeToken: d,
695
- node: T
696
- };
697
- }
698
- }
699
- return s(T, f.currentOffset(), f.currentPosition()), {
700
- node: T
701
- };
702
- }
703
- function D(f) {
704
- const m = f.context(), T = m.currentType === 1 ? f.currentOffset() : m.offset, d = m.currentType === 1 ? m.endLoc : m.startLoc, I = a(2, T, d);
705
- I.items = [];
706
- let v = null;
707
- do {
708
- const U = v || f.nextToken();
709
- switch (v = null, U.type) {
710
- case 0:
711
- U.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(U)), I.items.push(o(f, U.value || ""));
712
- break;
713
- case 5:
714
- U.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(U)), I.items.push(i(f, U.value || ""));
715
- break;
716
- case 4:
717
- U.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(U)), I.items.push(c(f, U.value || ""));
718
- break;
719
- case 6:
720
- U.value == null && r(f, S.UNEXPECTED_LEXICAL_ANALYSIS, m.lastStartLoc, 0, ie(U)), I.items.push(E(f, U.value || ""));
721
- break;
722
- case 7: {
723
- const X = N(f);
724
- I.items.push(X.node), v = X.nextConsumeToken || null;
725
- break;
726
- }
727
- }
728
- } while (m.currentType !== 13 && m.currentType !== 1);
729
- const g = m.currentType === 1 ? m.lastOffset : f.currentOffset(), P = m.currentType === 1 ? m.lastEndLoc : f.currentPosition();
730
- return s(I, g, P), I;
731
- }
732
- function y(f, m, T, d) {
733
- const I = f.context();
734
- let v = d.items.length === 0;
735
- const g = a(1, m, T);
736
- g.cases = [], g.cases.push(d);
737
- do {
738
- const P = D(f);
739
- v || (v = P.items.length === 0), g.cases.push(P);
740
- } while (I.currentType !== 13);
741
- return v && r(f, S.MUST_HAVE_MESSAGES_IN_PLURAL, T, 0), s(g, f.currentOffset(), f.currentPosition()), g;
742
- }
743
- function C(f) {
744
- const m = f.context(), { offset: T, startLoc: d } = m, I = D(f);
745
- return m.currentType === 13 ? I : y(f, T, d, I);
746
- }
747
- function A(f) {
748
- const m = ea(f, J({}, e)), T = m.context(), d = a(0, T.offset, T.startLoc);
749
- return t && d.loc && (d.loc.source = f), d.body = C(m), e.onCacheKey && (d.cacheKey = e.onCacheKey(f)), T.currentType !== 13 && r(m, S.UNEXPECTED_LEXICAL_ANALYSIS, T.lastStartLoc, 0, f[T.offset] || ""), s(d, m.currentOffset(), m.currentPosition()), d;
750
- }
751
- return { parse: A };
752
- }
753
- function ie(e) {
754
- if (e.type === 13)
755
- return "EOF";
756
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
757
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
758
- }
759
- function sa(e, t = {}) {
760
- const n = {
761
- ast: e,
762
- helpers: /* @__PURE__ */ new Set()
763
- };
764
- return { context: () => n, helper: (s) => (n.helpers.add(s), s) };
765
- }
766
- function an(e, t) {
767
- for (let n = 0; n < e.length; n++)
768
- Wt(e[n], t);
769
- }
770
- function Wt(e, t) {
771
- switch (e.type) {
772
- case 1:
773
- an(e.cases, t), t.helper(
774
- "plural"
775
- /* HelperNameMap.PLURAL */
776
- );
777
- break;
778
- case 2:
779
- an(e.items, t);
780
- break;
781
- case 6: {
782
- Wt(e.key, t), t.helper(
783
- "linked"
784
- /* HelperNameMap.LINKED */
785
- ), t.helper(
786
- "type"
787
- /* HelperNameMap.TYPE */
788
- );
789
- break;
790
- }
791
- case 5:
792
- t.helper(
793
- "interpolate"
794
- /* HelperNameMap.INTERPOLATE */
795
- ), t.helper(
796
- "list"
797
- /* HelperNameMap.LIST */
798
- );
799
- break;
800
- case 4:
801
- t.helper(
802
- "interpolate"
803
- /* HelperNameMap.INTERPOLATE */
804
- ), t.helper(
805
- "named"
806
- /* HelperNameMap.NAMED */
807
- );
808
- break;
809
- }
810
- }
811
- function oa(e, t = {}) {
812
- const n = sa(e);
813
- n.helper(
814
- "normalize"
815
- /* HelperNameMap.NORMALIZE */
816
- ), e.body && Wt(e.body, n);
817
- const r = n.context();
818
- e.helpers = Array.from(r.helpers);
819
- }
820
- function la(e) {
821
- const t = e.body;
822
- return t.type === 2 ? sn(t) : t.cases.forEach((n) => sn(n)), e;
823
- }
824
- function sn(e) {
825
- if (e.items.length === 1) {
826
- const t = e.items[0];
827
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
828
- } else {
829
- const t = [];
830
- for (let n = 0; n < e.items.length; n++) {
831
- const r = e.items[n];
832
- if (!(r.type === 3 || r.type === 9) || r.value == null)
833
- break;
834
- t.push(r.value);
835
- }
836
- if (t.length === e.items.length) {
837
- e.static = $t(t);
838
- for (let n = 0; n < e.items.length; n++) {
839
- const r = e.items[n];
840
- (r.type === 3 || r.type === 9) && delete r.value;
841
- }
842
- }
843
- }
844
- }
845
- const ia = "minifier";
846
- function De(e) {
847
- switch (e.t = e.type, e.type) {
848
- case 0: {
849
- const t = e;
850
- De(t.body), t.b = t.body, delete t.body;
851
- break;
852
- }
853
- case 1: {
854
- const t = e, n = t.cases;
855
- for (let r = 0; r < n.length; r++)
856
- De(n[r]);
857
- t.c = n, delete t.cases;
858
- break;
859
- }
860
- case 2: {
861
- const t = e, n = t.items;
862
- for (let r = 0; r < n.length; r++)
863
- De(n[r]);
864
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
865
- break;
866
- }
867
- case 3:
868
- case 9:
869
- case 8:
870
- case 7: {
871
- const t = e;
872
- t.value && (t.v = t.value, delete t.value);
873
- break;
874
- }
875
- case 6: {
876
- const t = e;
877
- De(t.key), t.k = t.key, delete t.key, t.modifier && (De(t.modifier), t.m = t.modifier, delete t.modifier);
878
- break;
879
- }
880
- case 5: {
881
- const t = e;
882
- t.i = t.index, delete t.index;
883
- break;
884
- }
885
- case 4: {
886
- const t = e;
887
- t.k = t.key, delete t.key;
888
- break;
889
- }
890
- default:
891
- if (process.env.NODE_ENV !== "production")
892
- throw Pe(S.UNHANDLED_MINIFIER_NODE_TYPE, null, {
893
- domain: ia,
894
- args: [e.type]
895
- });
896
- }
897
- delete e.type;
898
- }
899
- const ua = "parser";
900
- function ca(e, t) {
901
- const { filename: n, breakLineCode: r, needIndent: a } = t, s = t.location !== !1, o = {
902
- filename: n,
903
- code: "",
904
- column: 1,
905
- line: 1,
906
- offset: 0,
907
- map: void 0,
908
- breakLineCode: r,
909
- needIndent: a,
910
- indentLevel: 0
911
- };
912
- s && e.loc && (o.source = e.loc.source);
913
- const i = () => o;
914
- function c(C, A) {
915
- o.code += C;
916
- }
917
- function E(C, A = !0) {
918
- const f = A ? r : "";
919
- c(a ? f + " ".repeat(C) : f);
920
- }
921
- function b(C = !0) {
922
- const A = ++o.indentLevel;
923
- C && E(A);
924
- }
925
- function L(C = !0) {
926
- const A = --o.indentLevel;
927
- C && E(A);
928
- }
929
- function N() {
930
- E(o.indentLevel);
931
- }
932
- return {
933
- context: i,
934
- push: c,
935
- indent: b,
936
- deindent: L,
937
- newline: N,
938
- helper: (C) => `_${C}`,
939
- needIndent: () => o.needIndent
940
- };
941
- }
942
- function fa(e, t) {
943
- const { helper: n } = e;
944
- e.push(`${n(
945
- "linked"
946
- /* HelperNameMap.LINKED */
947
- )}(`), Se(e, t.key), t.modifier ? (e.push(", "), Se(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
948
- }
949
- function _a(e, t) {
950
- const { helper: n, needIndent: r } = e;
951
- e.push(`${n(
952
- "normalize"
953
- /* HelperNameMap.NORMALIZE */
954
- )}([`), e.indent(r());
955
- const a = t.items.length;
956
- for (let s = 0; s < a && (Se(e, t.items[s]), s !== a - 1); s++)
957
- e.push(", ");
958
- e.deindent(r()), e.push("])");
959
- }
960
- function ma(e, t) {
961
- const { helper: n, needIndent: r } = e;
962
- if (t.cases.length > 1) {
963
- e.push(`${n(
964
- "plural"
965
- /* HelperNameMap.PLURAL */
966
- )}([`), e.indent(r());
967
- const a = t.cases.length;
968
- for (let s = 0; s < a && (Se(e, t.cases[s]), s !== a - 1); s++)
969
- e.push(", ");
970
- e.deindent(r()), e.push("])");
971
- }
972
- }
973
- function da(e, t) {
974
- t.body ? Se(e, t.body) : e.push("null");
975
- }
976
- function Se(e, t) {
977
- const { helper: n } = e;
978
- switch (t.type) {
979
- case 0:
980
- da(e, t);
981
- break;
982
- case 1:
983
- ma(e, t);
984
- break;
985
- case 2:
986
- _a(e, t);
987
- break;
988
- case 6:
989
- fa(e, t);
990
- break;
991
- case 8:
992
- e.push(JSON.stringify(t.value), t);
993
- break;
994
- case 7:
995
- e.push(JSON.stringify(t.value), t);
996
- break;
997
- case 5:
998
- e.push(`${n(
999
- "interpolate"
1000
- /* HelperNameMap.INTERPOLATE */
1001
- )}(${n(
1002
- "list"
1003
- /* HelperNameMap.LIST */
1004
- )}(${t.index}))`, t);
1005
- break;
1006
- case 4:
1007
- e.push(`${n(
1008
- "interpolate"
1009
- /* HelperNameMap.INTERPOLATE */
1010
- )}(${n(
1011
- "named"
1012
- /* HelperNameMap.NAMED */
1013
- )}(${JSON.stringify(t.key)}))`, t);
1014
- break;
1015
- case 9:
1016
- e.push(JSON.stringify(t.value), t);
1017
- break;
1018
- case 3:
1019
- e.push(JSON.stringify(t.value), t);
1020
- break;
1021
- default:
1022
- if (process.env.NODE_ENV !== "production")
1023
- throw Pe(S.UNHANDLED_CODEGEN_NODE_TYPE, null, {
1024
- domain: ua,
1025
- args: [t.type]
1026
- });
1027
- }
1028
- }
1029
- const Ea = (e, t = {}) => {
1030
- const n = O(t.mode) ? t.mode : "normal", r = O(t.filename) ? t.filename : "message.intl";
1031
- t.sourceMap;
1032
- const a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
1033
- `, s = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], i = ca(e, {
1034
- filename: r,
1035
- breakLineCode: a,
1036
- needIndent: s
1037
- });
1038
- i.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(s), o.length > 0 && (i.push(`const { ${$t(o.map((b) => `${b}: _${b}`), ", ")} } = ctx`), i.newline()), i.push("return "), Se(i, e), i.deindent(s), i.push("}"), delete e.helpers;
1039
- const { code: c, map: E } = i.context();
1040
- return {
1041
- ast: e,
1042
- code: c,
1043
- map: E ? E.toJSON() : void 0
1044
- // eslint-disable-line @typescript-eslint/no-explicit-any
1045
- };
1046
- };
1047
- function ga(e, t = {}) {
1048
- const n = J({}, t), r = !!n.jit, a = !!n.minify, s = n.optimize == null ? !0 : n.optimize, i = aa(n).parse(e);
1049
- return r ? (s && la(i), a && De(i), { ast: i, code: "" }) : (oa(i, n), Ea(i, n));
1050
- }
1051
- function pa() {
1052
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
1053
- }
1054
- function re(e) {
1055
- return R(e) && Bt(e) === 0 && (se(e, "b") || se(e, "body"));
1056
- }
1057
- const Vn = ["b", "body"];
1058
- function Na(e) {
1059
- return de(e, Vn);
1060
- }
1061
- const $n = ["c", "cases"];
1062
- function ha(e) {
1063
- return de(e, $n, []);
1064
- }
1065
- const xn = ["s", "static"];
1066
- function La(e) {
1067
- return de(e, xn);
1068
- }
1069
- const Wn = ["i", "items"];
1070
- function Ta(e) {
1071
- return de(e, Wn, []);
1072
- }
1073
- const Bn = ["t", "type"];
1074
- function Bt(e) {
1075
- return de(e, Bn);
1076
- }
1077
- const Gn = ["v", "value"];
1078
- function Je(e, t) {
1079
- const n = de(e, Gn);
1080
- if (n != null)
1081
- return n;
1082
- throw $e(t);
1083
- }
1084
- const Yn = ["m", "modifier"];
1085
- function ba(e) {
1086
- return de(e, Yn);
1087
- }
1088
- const Hn = ["k", "key"];
1089
- function Oa(e) {
1090
- const t = de(e, Hn);
1091
- if (t)
1092
- return t;
1093
- throw $e(
1094
- 6
1095
- /* NodeTypes.Linked */
1096
- );
1097
- }
1098
- function de(e, t, n) {
1099
- for (let r = 0; r < t.length; r++) {
1100
- const a = t[r];
1101
- if (se(e, a) && e[a] != null)
1102
- return e[a];
1103
- }
1104
- return n;
1105
- }
1106
- const Kn = [
1107
- ...Vn,
1108
- ...$n,
1109
- ...xn,
1110
- ...Wn,
1111
- ...Hn,
1112
- ...Yn,
1113
- ...Gn,
1114
- ...Bn
1115
- ];
1116
- function $e(e) {
1117
- return new Error(`unhandled node type: ${e}`);
1118
- }
1119
- function ht(e) {
1120
- return (n) => Ia(n, e);
1121
- }
1122
- function Ia(e, t) {
1123
- const n = Na(t);
1124
- if (n == null)
1125
- throw $e(
1126
- 0
1127
- /* NodeTypes.Resource */
1128
- );
1129
- if (Bt(n) === 1) {
1130
- const s = ha(n);
1131
- return e.plural(s.reduce((o, i) => [
1132
- ...o,
1133
- on(e, i)
1134
- ], []));
1135
- } else
1136
- return on(e, n);
1137
- }
1138
- function on(e, t) {
1139
- const n = La(t);
1140
- if (n != null)
1141
- return e.type === "text" ? n : e.normalize([n]);
1142
- {
1143
- const r = Ta(t).reduce((a, s) => [...a, vt(e, s)], []);
1144
- return e.normalize(r);
1145
- }
1146
- }
1147
- function vt(e, t) {
1148
- const n = Bt(t);
1149
- switch (n) {
1150
- case 3:
1151
- return Je(t, n);
1152
- case 9:
1153
- return Je(t, n);
1154
- case 4: {
1155
- const r = t;
1156
- if (se(r, "k") && r.k)
1157
- return e.interpolate(e.named(r.k));
1158
- if (se(r, "key") && r.key)
1159
- return e.interpolate(e.named(r.key));
1160
- throw $e(n);
1161
- }
1162
- case 5: {
1163
- const r = t;
1164
- if (se(r, "i") && j(r.i))
1165
- return e.interpolate(e.list(r.i));
1166
- if (se(r, "index") && j(r.index))
1167
- return e.interpolate(e.list(r.index));
1168
- throw $e(n);
1169
- }
1170
- case 6: {
1171
- const r = t, a = ba(r), s = Oa(r);
1172
- return e.linked(vt(e, s), a ? vt(e, a) : void 0, e.type);
1173
- }
1174
- case 7:
1175
- return Je(t, n);
1176
- case 8:
1177
- return Je(t, n);
1178
- default:
1179
- throw new Error(`unhandled node on format message part: ${n}`);
1180
- }
1181
- }
1182
- const va = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
1183
- function Ca(e, t) {
1184
- t && jr(e) && ue(ze(va, { source: e }));
1185
- }
1186
- const Da = (e) => e;
1187
- let Qe = $();
1188
- function Aa(e, t = {}) {
1189
- let n = !1;
1190
- const r = t.onError || Hr;
1191
- return t.onError = (a) => {
1192
- n = !0, r(a);
1193
- }, { ...ga(e, t), detectError: n };
1194
- }
1195
- // @__NO_SIDE_EFFECTS__
1196
- function Fa(e, t) {
1197
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && O(e)) {
1198
- const n = M(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
1199
- process.env.NODE_ENV !== "production" && Ca(e, n);
1200
- const a = (t.onCacheKey || Da)(e), s = Qe[a];
1201
- if (s)
1202
- return s;
1203
- const { ast: o, detectError: i } = Aa(e, {
1204
- ...t,
1205
- location: process.env.NODE_ENV !== "production",
1206
- jit: !0
1207
- }), c = ht(o);
1208
- return i ? c : Qe[a] = c;
1209
- } else {
1210
- if (process.env.NODE_ENV !== "production" && !re(e))
1211
- return ue(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
1212
- const n = e.cacheKey;
1213
- if (n) {
1214
- const r = Qe[n];
1215
- return r || (Qe[n] = ht(e));
1216
- } else
1217
- return ht(e);
1218
- }
1219
- }
1220
- let xe = null;
1221
- function Sa(e) {
1222
- xe = e;
1223
- }
1224
- function ya(e, t, n) {
1225
- xe && xe.emit("i18n:init", {
1226
- timestamp: Date.now(),
1227
- i18n: e,
1228
- version: t,
1229
- meta: n
1230
- });
1231
- }
1232
- const Pa = /* @__PURE__ */ ka("function:translate");
1233
- function ka(e) {
1234
- return (t) => xe && xe.emit(e, t);
1235
- }
1236
- const q = {
1237
- INVALID_ARGUMENT: Gr,
1238
- // 17
1239
- INVALID_DATE_ARGUMENT: 18,
1240
- INVALID_ISO_DATE_ARGUMENT: 19,
1241
- NOT_SUPPORT_NON_STRING_MESSAGE: 20,
1242
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1243
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1244
- NOT_SUPPORT_LOCALE_TYPE: 23
1245
- }, Ra = 24;
1246
- function me(e) {
1247
- return Pe(e, null, process.env.NODE_ENV !== "production" ? { messages: Ma } : void 0);
1248
- }
1249
- const Ma = {
1250
- [q.INVALID_ARGUMENT]: "Invalid arguments",
1251
- [q.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
1252
- [q.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
1253
- [q.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
1254
- [q.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
1255
- [q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
1256
- [q.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
1257
- };
1258
- function Gt(e, t) {
1259
- return t.locale != null ? ln(t.locale) : ln(e.locale);
1260
- }
1261
- let Lt;
1262
- function ln(e) {
1263
- if (O(e))
1264
- return e;
1265
- if (x(e)) {
1266
- if (e.resolvedOnce && Lt != null)
1267
- return Lt;
1268
- if (e.constructor.name === "Function") {
1269
- const t = e();
1270
- if ($r(t))
1271
- throw me(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1272
- return Lt = t;
1273
- } else
1274
- throw me(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1275
- } else
1276
- throw me(q.NOT_SUPPORT_LOCALE_TYPE);
1277
- }
1278
- function wa(e, t, n) {
1279
- return [.../* @__PURE__ */ new Set([
1280
- n,
1281
- ...G(t) ? t : R(t) ? Object.keys(t) : O(t) ? [t] : [n]
1282
- ])];
1283
- }
1284
- function jn(e, t, n) {
1285
- const r = O(n) ? n : We, a = e;
1286
- a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
1287
- let s = a.__localeChainCache.get(r);
1288
- if (!s) {
1289
- s = [];
1290
- let o = [n];
1291
- for (; G(o); )
1292
- o = un(s, o, t);
1293
- const i = G(t) || !k(t) ? t : t.default ? t.default : null;
1294
- o = O(i) ? [i] : i, G(o) && un(s, o, !1), a.__localeChainCache.set(r, s);
1295
- }
1296
- return s;
1297
- }
1298
- function un(e, t, n) {
1299
- let r = !0;
1300
- for (let a = 0; a < t.length && M(r); a++) {
1301
- const s = t[a];
1302
- O(s) && (r = Ua(e, t[a], n));
1303
- }
1304
- return r;
1305
- }
1306
- function Ua(e, t, n) {
1307
- let r;
1308
- const a = t.split("-");
1309
- do {
1310
- const s = a.join("-");
1311
- r = Va(e, s, n), a.splice(-1, 1);
1312
- } while (a.length && r === !0);
1313
- return r;
1314
- }
1315
- function Va(e, t, n) {
1316
- let r = !1;
1317
- if (!e.includes(t) && (r = !0, t)) {
1318
- r = t[t.length - 1] !== "!";
1319
- const a = t.replace(/!/g, "");
1320
- e.push(a), (G(n) || k(n)) && n[a] && (r = n[a]);
1321
- }
1322
- return r;
1323
- }
1324
- const Ee = [];
1325
- Ee[
1326
- 0
1327
- /* States.BEFORE_PATH */
1328
- ] = {
1329
- w: [
1330
- 0
1331
- /* States.BEFORE_PATH */
1332
- ],
1333
- i: [
1334
- 3,
1335
- 0
1336
- /* Actions.APPEND */
1337
- ],
1338
- "[": [
1339
- 4
1340
- /* States.IN_SUB_PATH */
1341
- ],
1342
- o: [
1343
- 7
1344
- /* States.AFTER_PATH */
1345
- ]
1346
- };
1347
- Ee[
1348
- 1
1349
- /* States.IN_PATH */
1350
- ] = {
1351
- w: [
1352
- 1
1353
- /* States.IN_PATH */
1354
- ],
1355
- ".": [
1356
- 2
1357
- /* States.BEFORE_IDENT */
1358
- ],
1359
- "[": [
1360
- 4
1361
- /* States.IN_SUB_PATH */
1362
- ],
1363
- o: [
1364
- 7
1365
- /* States.AFTER_PATH */
1366
- ]
1367
- };
1368
- Ee[
1369
- 2
1370
- /* States.BEFORE_IDENT */
1371
- ] = {
1372
- w: [
1373
- 2
1374
- /* States.BEFORE_IDENT */
1375
- ],
1376
- i: [
1377
- 3,
1378
- 0
1379
- /* Actions.APPEND */
1380
- ],
1381
- 0: [
1382
- 3,
1383
- 0
1384
- /* Actions.APPEND */
1385
- ]
1386
- };
1387
- Ee[
1388
- 3
1389
- /* States.IN_IDENT */
1390
- ] = {
1391
- i: [
1392
- 3,
1393
- 0
1394
- /* Actions.APPEND */
1395
- ],
1396
- 0: [
1397
- 3,
1398
- 0
1399
- /* Actions.APPEND */
1400
- ],
1401
- w: [
1402
- 1,
1403
- 1
1404
- /* Actions.PUSH */
1405
- ],
1406
- ".": [
1407
- 2,
1408
- 1
1409
- /* Actions.PUSH */
1410
- ],
1411
- "[": [
1412
- 4,
1413
- 1
1414
- /* Actions.PUSH */
1415
- ],
1416
- o: [
1417
- 7,
1418
- 1
1419
- /* Actions.PUSH */
1420
- ]
1421
- };
1422
- Ee[
1423
- 4
1424
- /* States.IN_SUB_PATH */
1425
- ] = {
1426
- "'": [
1427
- 5,
1428
- 0
1429
- /* Actions.APPEND */
1430
- ],
1431
- '"': [
1432
- 6,
1433
- 0
1434
- /* Actions.APPEND */
1435
- ],
1436
- "[": [
1437
- 4,
1438
- 2
1439
- /* Actions.INC_SUB_PATH_DEPTH */
1440
- ],
1441
- "]": [
1442
- 1,
1443
- 3
1444
- /* Actions.PUSH_SUB_PATH */
1445
- ],
1446
- o: 8,
1447
- l: [
1448
- 4,
1449
- 0
1450
- /* Actions.APPEND */
1451
- ]
1452
- };
1453
- Ee[
1454
- 5
1455
- /* States.IN_SINGLE_QUOTE */
1456
- ] = {
1457
- "'": [
1458
- 4,
1459
- 0
1460
- /* Actions.APPEND */
1461
- ],
1462
- o: 8,
1463
- l: [
1464
- 5,
1465
- 0
1466
- /* Actions.APPEND */
1467
- ]
1468
- };
1469
- Ee[
1470
- 6
1471
- /* States.IN_DOUBLE_QUOTE */
1472
- ] = {
1473
- '"': [
1474
- 4,
1475
- 0
1476
- /* Actions.APPEND */
1477
- ],
1478
- o: 8,
1479
- l: [
1480
- 6,
1481
- 0
1482
- /* Actions.APPEND */
1483
- ]
1484
- };
1485
- const $a = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1486
- function xa(e) {
1487
- return $a.test(e);
1488
- }
1489
- function Wa(e) {
1490
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1491
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1492
- }
1493
- function Ba(e) {
1494
- if (e == null)
1495
- return "o";
1496
- switch (e.charCodeAt(0)) {
1497
- case 91:
1498
- // [
1499
- case 93:
1500
- // ]
1501
- case 46:
1502
- // .
1503
- case 34:
1504
- // "
1505
- case 39:
1506
- return e;
1507
- case 95:
1508
- // _
1509
- case 36:
1510
- // $
1511
- case 45:
1512
- return "i";
1513
- case 9:
1514
- // Tab (HT)
1515
- case 10:
1516
- // Newline (LF)
1517
- case 13:
1518
- // Return (CR)
1519
- case 160:
1520
- // No-break space (NBSP)
1521
- case 65279:
1522
- // Byte Order Mark (BOM)
1523
- case 8232:
1524
- // Line Separator (LS)
1525
- case 8233:
1526
- return "w";
1527
- }
1528
- return "i";
1529
- }
1530
- function Ga(e) {
1531
- const t = e.trim();
1532
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : xa(t) ? Wa(t) : "*" + t;
1533
- }
1534
- function Ya(e) {
1535
- const t = [];
1536
- let n = -1, r = 0, a = 0, s, o, i, c, E, b, L;
1537
- const N = [];
1538
- N[
1539
- 0
1540
- /* Actions.APPEND */
1541
- ] = () => {
1542
- o === void 0 ? o = i : o += i;
1543
- }, N[
1544
- 1
1545
- /* Actions.PUSH */
1546
- ] = () => {
1547
- o !== void 0 && (t.push(o), o = void 0);
1548
- }, N[
1549
- 2
1550
- /* Actions.INC_SUB_PATH_DEPTH */
1551
- ] = () => {
1552
- N[
1553
- 0
1554
- /* Actions.APPEND */
1555
- ](), a++;
1556
- }, N[
1557
- 3
1558
- /* Actions.PUSH_SUB_PATH */
1559
- ] = () => {
1560
- if (a > 0)
1561
- a--, r = 4, N[
1562
- 0
1563
- /* Actions.APPEND */
1564
- ]();
1565
- else {
1566
- if (a = 0, o === void 0 || (o = Ga(o), o === !1))
1567
- return !1;
1568
- N[
1569
- 1
1570
- /* Actions.PUSH */
1571
- ]();
1572
- }
1573
- };
1574
- function D() {
1575
- const y = e[n + 1];
1576
- if (r === 5 && y === "'" || r === 6 && y === '"')
1577
- return n++, i = "\\" + y, N[
1578
- 0
1579
- /* Actions.APPEND */
1580
- ](), !0;
1581
- }
1582
- for (; r !== null; )
1583
- if (n++, s = e[n], !(s === "\\" && D())) {
1584
- if (c = Ba(s), L = Ee[r], E = L[c] || L.l || 8, E === 8 || (r = E[0], E[1] !== void 0 && (b = N[E[1]], b && (i = s, b() === !1))))
1585
- return;
1586
- if (r === 7)
1587
- return t;
1588
- }
1589
- }
1590
- const cn = /* @__PURE__ */ new Map();
1591
- function Ha(e, t) {
1592
- return R(e) ? e[t] : null;
1593
- }
1594
- function Ka(e, t) {
1595
- if (!R(e))
1596
- return null;
1597
- let n = cn.get(t);
1598
- if (n || (n = Ya(t), n && cn.set(t, n)), !n)
1599
- return null;
1600
- const r = n.length;
1601
- let a = e, s = 0;
1602
- for (; s < r; ) {
1603
- const o = n[s];
1604
- if (Kn.includes(o) && re(a))
1605
- return null;
1606
- const i = a[o];
1607
- if (i === void 0 || x(a))
1608
- return null;
1609
- a = i, s++;
1610
- }
1611
- return a;
1612
- }
1613
- const Z = {
1614
- NOT_FOUND_KEY: 1,
1615
- FALLBACK_TO_TRANSLATE: 2,
1616
- CANNOT_FORMAT_NUMBER: 3,
1617
- FALLBACK_TO_NUMBER_FORMAT: 4,
1618
- CANNOT_FORMAT_DATE: 5,
1619
- FALLBACK_TO_DATE_FORMAT: 6,
1620
- EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
1621
- }, ja = 8, Xa = {
1622
- [Z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
1623
- [Z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
1624
- [Z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
1625
- [Z.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
1626
- [Z.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
1627
- [Z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
1628
- [Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
1629
- };
1630
- function Te(e, ...t) {
1631
- return ze(Xa[e], ...t);
1632
- }
1633
- const Ja = "11.2.7", tt = -1, We = "en-US", Ze = "", fn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1634
- function Qa() {
1635
- return {
1636
- upper: (e, t) => t === "text" && O(e) ? e.toUpperCase() : t === "vnode" && R(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1637
- lower: (e, t) => t === "text" && O(e) ? e.toLowerCase() : t === "vnode" && R(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1638
- capitalize: (e, t) => t === "text" && O(e) ? fn(e) : t === "vnode" && R(e) && "__v_isVNode" in e ? fn(e.children) : e
1639
- };
1640
- }
1641
- let Xn;
1642
- function qa(e) {
1643
- Xn = e;
1644
- }
1645
- let Jn;
1646
- function Za(e) {
1647
- Jn = e;
1648
- }
1649
- let Qn;
1650
- function za(e) {
1651
- Qn = e;
1652
- }
1653
- let qn = null;
1654
- const es = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1655
- qn = e;
1656
- }, ts = /* @__NO_SIDE_EFFECTS__ */ () => qn;
1657
- let Zn = null;
1658
- const _n = (e) => {
1659
- Zn = e;
1660
- }, ns = () => Zn;
1661
- let mn = 0;
1662
- function rs(e = {}) {
1663
- const t = x(e.onWarn) ? e.onWarn : ue, n = O(e.version) ? e.version : Ja, r = O(e.locale) || x(e.locale) ? e.locale : We, a = x(r) ? We : r, s = G(e.fallbackLocale) || k(e.fallbackLocale) || O(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, o = k(e.messages) ? e.messages : Tt(a), i = k(e.datetimeFormats) ? e.datetimeFormats : Tt(a), c = k(e.numberFormats) ? e.numberFormats : Tt(a), E = J($(), e.modifiers, Qa()), b = e.pluralRules || $(), L = x(e.missing) ? e.missing : null, N = M(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, D = M(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, y = !!e.fallbackFormat, C = !!e.unresolving, A = x(e.postTranslation) ? e.postTranslation : null, f = k(e.processor) ? e.processor : null, m = M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, T = !!e.escapeParameter, d = x(e.messageCompiler) ? e.messageCompiler : Xn;
1664
- process.env.NODE_ENV !== "production" && x(e.messageCompiler) && Ut(Te(Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
1665
- const I = x(e.messageResolver) ? e.messageResolver : Jn || Ha, v = x(e.localeFallbacker) ? e.localeFallbacker : Qn || wa, g = R(e.fallbackContext) ? e.fallbackContext : void 0, P = e, U = R(P.__datetimeFormatters) ? P.__datetimeFormatters : /* @__PURE__ */ new Map(), X = R(P.__numberFormatters) ? P.__numberFormatters : /* @__PURE__ */ new Map(), ae = R(P.__meta) ? P.__meta : {};
1666
- mn++;
1667
- const Y = {
1668
- version: n,
1669
- cid: mn,
1670
- locale: r,
1671
- fallbackLocale: s,
1672
- messages: o,
1673
- modifiers: E,
1674
- pluralRules: b,
1675
- missing: L,
1676
- missingWarn: N,
1677
- fallbackWarn: D,
1678
- fallbackFormat: y,
1679
- unresolving: C,
1680
- postTranslation: A,
1681
- processor: f,
1682
- warnHtmlMessage: m,
1683
- escapeParameter: T,
1684
- messageCompiler: d,
1685
- messageResolver: I,
1686
- localeFallbacker: v,
1687
- fallbackContext: g,
1688
- onWarn: t,
1689
- __meta: ae
1690
- };
1691
- return Y.datetimeFormats = i, Y.numberFormats = c, Y.__datetimeFormatters = U, Y.__numberFormatters = X, process.env.NODE_ENV !== "production" && (Y.__v_emitter = P.__v_emitter != null ? P.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && ya(Y, n, ae), Y;
1692
- }
1693
- const Tt = (e) => ({ [e]: $() });
1694
- function nt(e, t) {
1695
- return e instanceof RegExp ? e.test(t) : e;
1696
- }
1697
- function zn(e, t) {
1698
- return e instanceof RegExp ? e.test(t) : e;
1699
- }
1700
- function Yt(e, t, n, r, a) {
1701
- const { missing: s, onWarn: o } = e;
1702
- if (process.env.NODE_ENV !== "production") {
1703
- const i = e.__v_emitter;
1704
- i && i.emit("missing", {
1705
- locale: n,
1706
- key: t,
1707
- type: a,
1708
- groupId: `${a}:${t}`
1709
- });
1710
- }
1711
- if (s !== null) {
1712
- const i = s(e, n, t, a);
1713
- return O(i) ? i : t;
1714
- } else
1715
- return process.env.NODE_ENV !== "production" && zn(r, t) && o(Te(Z.NOT_FOUND_KEY, { key: t, locale: n })), t;
1716
- }
1717
- function Ve(e, t, n) {
1718
- const r = e;
1719
- r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1720
- }
1721
- function er(e, t) {
1722
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1723
- }
1724
- function as(e, t) {
1725
- const n = t.indexOf(e);
1726
- if (n === -1)
1727
- return !1;
1728
- for (let r = n + 1; r < t.length; r++)
1729
- if (er(e, t[r]))
1730
- return !0;
1731
- return !1;
1732
- }
1733
- const dn = typeof Intl < "u", tr = {
1734
- dateTimeFormat: dn && typeof Intl.DateTimeFormat < "u",
1735
- numberFormat: dn && typeof Intl.NumberFormat < "u"
1736
- };
1737
- function En(e, ...t) {
1738
- const { datetimeFormats: n, unresolving: r, fallbackLocale: a, onWarn: s, localeFallbacker: o } = e, { __datetimeFormatters: i } = e;
1739
- if (process.env.NODE_ENV !== "production" && !tr.dateTimeFormat)
1740
- return s(Te(Z.CANNOT_FORMAT_DATE)), Ze;
1741
- const [c, E, b, L] = Ct(...t), N = M(b.missingWarn) ? b.missingWarn : e.missingWarn, D = M(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, y = !!b.part, C = Gt(e, b), A = o(
1742
- e,
1743
- // eslint-disable-line @typescript-eslint/no-explicit-any
1744
- a,
1745
- C
1746
- );
1747
- if (!O(c) || c === "")
1748
- return new Intl.DateTimeFormat(C, L).format(E);
1749
- let f = {}, m, T = null, d = C, I = null;
1750
- const v = "datetime format";
1751
- for (let U = 0; U < A.length; U++) {
1752
- if (m = I = A[U], process.env.NODE_ENV !== "production" && C !== m && nt(D, c) && s(Te(Z.FALLBACK_TO_DATE_FORMAT, {
1753
- key: c,
1754
- target: m
1755
- })), process.env.NODE_ENV !== "production" && C !== m) {
1756
- const X = e.__v_emitter;
1757
- X && X.emit("fallback", {
1758
- type: v,
1759
- key: c,
1760
- from: d,
1761
- to: I,
1762
- groupId: `${v}:${c}`
1763
- });
1764
- }
1765
- if (f = n[m] || {}, T = f[c], k(T))
1766
- break;
1767
- Yt(e, c, m, N, v), d = I;
1768
- }
1769
- if (!k(T) || !O(m))
1770
- return r ? tt : c;
1771
- let g = `${m}__${c}`;
1772
- et(L) || (g = `${g}__${JSON.stringify(L)}`);
1773
- let P = i.get(g);
1774
- return P || (P = new Intl.DateTimeFormat(m, J({}, T, L)), i.set(g, P)), y ? P.formatToParts(E) : P.format(E);
1775
- }
1776
- const nr = [
1777
- "localeMatcher",
1778
- "weekday",
1779
- "era",
1780
- "year",
1781
- "month",
1782
- "day",
1783
- "hour",
1784
- "minute",
1785
- "second",
1786
- "timeZoneName",
1787
- "formatMatcher",
1788
- "hour12",
1789
- "timeZone",
1790
- "dateStyle",
1791
- "timeStyle",
1792
- "calendar",
1793
- "dayPeriod",
1794
- "numberingSystem",
1795
- "hourCycle",
1796
- "fractionalSecondDigits"
1797
- ];
1798
- function Ct(...e) {
1799
- const [t, n, r, a] = e, s = $();
1800
- let o = $(), i;
1801
- if (O(t)) {
1802
- const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1803
- if (!c)
1804
- throw me(q.INVALID_ISO_DATE_ARGUMENT);
1805
- const E = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
1806
- i = new Date(E);
1807
- try {
1808
- i.toISOString();
1809
- } catch {
1810
- throw me(q.INVALID_ISO_DATE_ARGUMENT);
1811
- }
1812
- } else if (Mr(t)) {
1813
- if (isNaN(t.getTime()))
1814
- throw me(q.INVALID_DATE_ARGUMENT);
1815
- i = t;
1816
- } else if (j(t))
1817
- i = t;
1818
- else
1819
- throw me(q.INVALID_ARGUMENT);
1820
- return O(n) ? s.key = n : k(n) && Object.keys(n).forEach((c) => {
1821
- nr.includes(c) ? o[c] = n[c] : s[c] = n[c];
1822
- }), O(r) ? s.locale = r : k(r) && (o = r), k(a) && (o = a), [s.key || "", i, s, o];
1823
- }
1824
- function gn(e, t, n) {
1825
- const r = e;
1826
- for (const a in n) {
1827
- const s = `${t}__${a}`;
1828
- r.__datetimeFormatters.has(s) && r.__datetimeFormatters.delete(s);
1829
- }
1830
- }
1831
- function pn(e, ...t) {
1832
- const { numberFormats: n, unresolving: r, fallbackLocale: a, onWarn: s, localeFallbacker: o } = e, { __numberFormatters: i } = e;
1833
- if (process.env.NODE_ENV !== "production" && !tr.numberFormat)
1834
- return s(Te(Z.CANNOT_FORMAT_NUMBER)), Ze;
1835
- const [c, E, b, L] = Dt(...t), N = M(b.missingWarn) ? b.missingWarn : e.missingWarn, D = M(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, y = !!b.part, C = Gt(e, b), A = o(
1836
- e,
1837
- // eslint-disable-line @typescript-eslint/no-explicit-any
1838
- a,
1839
- C
1840
- );
1841
- if (!O(c) || c === "")
1842
- return new Intl.NumberFormat(C, L).format(E);
1843
- let f = {}, m, T = null, d = C, I = null;
1844
- const v = "number format";
1845
- for (let U = 0; U < A.length; U++) {
1846
- if (m = I = A[U], process.env.NODE_ENV !== "production" && C !== m && nt(D, c) && s(Te(Z.FALLBACK_TO_NUMBER_FORMAT, {
1847
- key: c,
1848
- target: m
1849
- })), process.env.NODE_ENV !== "production" && C !== m) {
1850
- const X = e.__v_emitter;
1851
- X && X.emit("fallback", {
1852
- type: v,
1853
- key: c,
1854
- from: d,
1855
- to: I,
1856
- groupId: `${v}:${c}`
1857
- });
1858
- }
1859
- if (f = n[m] || {}, T = f[c], k(T))
1860
- break;
1861
- Yt(e, c, m, N, v), d = I;
1862
- }
1863
- if (!k(T) || !O(m))
1864
- return r ? tt : c;
1865
- let g = `${m}__${c}`;
1866
- et(L) || (g = `${g}__${JSON.stringify(L)}`);
1867
- let P = i.get(g);
1868
- return P || (P = new Intl.NumberFormat(m, J({}, T, L)), i.set(g, P)), y ? P.formatToParts(E) : P.format(E);
1869
- }
1870
- const rr = [
1871
- "localeMatcher",
1872
- "style",
1873
- "currency",
1874
- "currencyDisplay",
1875
- "currencySign",
1876
- "useGrouping",
1877
- "minimumIntegerDigits",
1878
- "minimumFractionDigits",
1879
- "maximumFractionDigits",
1880
- "minimumSignificantDigits",
1881
- "maximumSignificantDigits",
1882
- "compactDisplay",
1883
- "notation",
1884
- "signDisplay",
1885
- "unit",
1886
- "unitDisplay",
1887
- "roundingMode",
1888
- "roundingPriority",
1889
- "roundingIncrement",
1890
- "trailingZeroDisplay"
1891
- ];
1892
- function Dt(...e) {
1893
- const [t, n, r, a] = e, s = $();
1894
- let o = $();
1895
- if (!j(t))
1896
- throw me(q.INVALID_ARGUMENT);
1897
- const i = t;
1898
- return O(n) ? s.key = n : k(n) && Object.keys(n).forEach((c) => {
1899
- rr.includes(c) ? o[c] = n[c] : s[c] = n[c];
1900
- }), O(r) ? s.locale = r : k(r) && (o = r), k(a) && (o = a), [s.key || "", i, s, o];
1901
- }
1902
- function Nn(e, t, n) {
1903
- const r = e;
1904
- for (const a in n) {
1905
- const s = `${t}__${a}`;
1906
- r.__numberFormatters.has(s) && r.__numberFormatters.delete(s);
1907
- }
1908
- }
1909
- const ss = (e) => e, os = (e) => "", ls = "text", is = (e) => e.length === 0 ? "" : $t(e), us = xr;
1910
- function hn(e, t) {
1911
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1912
- }
1913
- function cs(e) {
1914
- const t = j(e.pluralIndex) ? e.pluralIndex : -1;
1915
- return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
1916
- }
1917
- function fs(e, t) {
1918
- t.count || (t.count = e), t.n || (t.n = e);
1919
- }
1920
- function _s(e = {}) {
1921
- const t = e.locale, n = cs(e), r = R(e.pluralRules) && O(t) && x(e.pluralRules[t]) ? e.pluralRules[t] : hn, a = R(e.pluralRules) && O(t) && x(e.pluralRules[t]) ? hn : void 0, s = (f) => f[r(n, f.length, a)], o = e.list || [], i = (f) => o[f], c = e.named || $();
1922
- j(e.pluralIndex) && fs(n, c);
1923
- const E = (f) => c[f];
1924
- function b(f, m) {
1925
- const T = x(e.messages) ? e.messages(f, !!m) : R(e.messages) ? e.messages[f] : !1;
1926
- return T || (e.parent ? e.parent.message(f) : os);
1927
- }
1928
- const L = (f) => e.modifiers ? e.modifiers[f] : ss, N = k(e.processor) && x(e.processor.normalize) ? e.processor.normalize : is, D = k(e.processor) && x(e.processor.interpolate) ? e.processor.interpolate : us, y = k(e.processor) && O(e.processor.type) ? e.processor.type : ls, A = {
1929
- list: i,
1930
- named: E,
1931
- plural: s,
1932
- linked: (f, ...m) => {
1933
- const [T, d] = m;
1934
- let I = "text", v = "";
1935
- m.length === 1 ? R(T) ? (v = T.modifier || v, I = T.type || I) : O(T) && (v = T || v) : m.length === 2 && (O(T) && (v = T || v), O(d) && (I = d || I));
1936
- const g = b(f, !0)(A), P = (
1937
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
1938
- I === "vnode" && G(g) && v ? g[0] : g
1939
- );
1940
- return v ? L(v)(P, I) : P;
1941
- },
1942
- message: b,
1943
- type: y,
1944
- interpolate: D,
1945
- normalize: N,
1946
- values: J($(), o, c)
1947
- };
1948
- return A;
1949
- }
1950
- const Ln = () => "", te = (e) => x(e);
1951
- function Tn(e, ...t) {
1952
- const { fallbackFormat: n, postTranslation: r, unresolving: a, messageCompiler: s, fallbackLocale: o, messages: i } = e, [c, E] = At(...t), b = M(E.missingWarn) ? E.missingWarn : e.missingWarn, L = M(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn, N = M(E.escapeParameter) ? E.escapeParameter : e.escapeParameter, D = !!E.resolvedMessage, y = O(E.default) || M(E.default) ? M(E.default) ? s ? c : () => c : E.default : n ? s ? c : () => c : null, C = n || y != null && (O(y) || x(y)), A = Gt(e, E);
1953
- N && ms(E);
1954
- let [f, m, T] = D ? [
1955
- c,
1956
- A,
1957
- i[A] || $()
1958
- ] : ar(e, c, A, o, L, b), d = f, I = c;
1959
- if (!D && !(O(d) || re(d) || te(d)) && C && (d = y, I = d), !D && (!(O(d) || re(d) || te(d)) || !O(m)))
1960
- return a ? tt : c;
1961
- if (process.env.NODE_ENV !== "production" && O(d) && e.messageCompiler == null)
1962
- return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`), c;
1963
- let v = !1;
1964
- const g = () => {
1965
- v = !0;
1966
- }, P = te(d) ? d : sr(e, c, m, d, I, g);
1967
- if (v)
1968
- return d;
1969
- const U = ps(e, m, T, E), X = _s(U), ae = ds(e, P, X);
1970
- let Y = r ? r(ae, c) : ae;
1971
- if (N && O(Y) && (Y = Ur(Y)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
1972
- const Ie = {
1973
- timestamp: Date.now(),
1974
- key: O(c) ? c : te(d) ? d.key : "",
1975
- locale: m || (te(d) ? d.locale : ""),
1976
- format: O(d) ? d : te(d) ? d.source : "",
1977
- message: Y
1978
- };
1979
- Ie.meta = J({}, e.__meta, /* @__PURE__ */ ts() || {}), Pa(Ie);
1980
- }
1981
- return Y;
1982
- }
1983
- function ms(e) {
1984
- G(e.list) ? e.list = e.list.map((t) => O(t) ? en(t) : t) : R(e.named) && Object.keys(e.named).forEach((t) => {
1985
- O(e.named[t]) && (e.named[t] = en(e.named[t]));
1986
- });
1987
- }
1988
- function ar(e, t, n, r, a, s) {
1989
- const { messages: o, onWarn: i, messageResolver: c, localeFallbacker: E } = e, b = E(e, r, n);
1990
- let L = $(), N, D = null, y = n, C = null;
1991
- const A = "translate";
1992
- for (let f = 0; f < b.length; f++) {
1993
- if (N = C = b[f], process.env.NODE_ENV !== "production" && n !== N && !er(n, N) && nt(a, t) && i(Te(Z.FALLBACK_TO_TRANSLATE, {
1994
- key: t,
1995
- target: N
1996
- })), process.env.NODE_ENV !== "production" && n !== N) {
1997
- const I = e.__v_emitter;
1998
- I && I.emit("fallback", {
1999
- type: A,
2000
- key: t,
2001
- from: y,
2002
- to: C,
2003
- groupId: `${A}:${t}`
2004
- });
2005
- }
2006
- L = o[N] || $();
2007
- let m = null, T, d;
2008
- if (process.env.NODE_ENV !== "production" && oe && (m = window.performance.now(), T = "intlify-message-resolve-start", d = "intlify-message-resolve-end", ee && ee(T)), (D = c(L, t)) === null && (D = L[t]), process.env.NODE_ENV !== "production" && oe) {
2009
- const I = window.performance.now(), v = e.__v_emitter;
2010
- v && m && D && v.emit("message-resolve", {
2011
- type: "message-resolve",
2012
- key: t,
2013
- message: D,
2014
- time: I - m,
2015
- groupId: `${A}:${t}`
2016
- }), T && d && ee && Le && (ee(d), Le("intlify message resolve", T, d));
2017
- }
2018
- if (O(D) || re(D) || te(D))
2019
- break;
2020
- if (!as(N, b)) {
2021
- const I = Yt(
2022
- e,
2023
- // eslint-disable-line @typescript-eslint/no-explicit-any
2024
- t,
2025
- N,
2026
- s,
2027
- A
2028
- );
2029
- I !== t && (D = I);
2030
- }
2031
- y = C;
2032
- }
2033
- return [D, N, L];
2034
- }
2035
- function sr(e, t, n, r, a, s) {
2036
- const { messageCompiler: o, warnHtmlMessage: i } = e;
2037
- if (te(r)) {
2038
- const N = r;
2039
- return N.locale = N.locale || n, N.key = N.key || t, N;
2040
- }
2041
- if (o == null) {
2042
- const N = (() => r);
2043
- return N.locale = n, N.key = t, N;
2044
- }
2045
- let c = null, E, b;
2046
- process.env.NODE_ENV !== "production" && oe && (c = window.performance.now(), E = "intlify-message-compilation-start", b = "intlify-message-compilation-end", ee && ee(E));
2047
- const L = o(r, Es(e, n, a, r, i, s));
2048
- if (process.env.NODE_ENV !== "production" && oe) {
2049
- const N = window.performance.now(), D = e.__v_emitter;
2050
- D && c && D.emit("message-compilation", {
2051
- type: "message-compilation",
2052
- message: r,
2053
- time: N - c,
2054
- groupId: `translate:${t}`
2055
- }), E && b && ee && Le && (ee(b), Le("intlify message compilation", E, b));
2056
- }
2057
- return L.locale = n, L.key = t, L.source = r, L;
2058
- }
2059
- function ds(e, t, n) {
2060
- let r = null, a, s;
2061
- process.env.NODE_ENV !== "production" && oe && (r = window.performance.now(), a = "intlify-message-evaluation-start", s = "intlify-message-evaluation-end", ee && ee(a));
2062
- const o = t(n);
2063
- if (process.env.NODE_ENV !== "production" && oe) {
2064
- const i = window.performance.now(), c = e.__v_emitter;
2065
- c && r && c.emit("message-evaluation", {
2066
- type: "message-evaluation",
2067
- value: o,
2068
- time: i - r,
2069
- groupId: `translate:${t.key}`
2070
- }), a && s && ee && Le && (ee(s), Le("intlify message evaluation", a, s));
2071
- }
2072
- return o;
2073
- }
2074
- function At(...e) {
2075
- const [t, n, r] = e, a = $();
2076
- if (!O(t) && !j(t) && !te(t) && !re(t))
2077
- throw me(q.INVALID_ARGUMENT);
2078
- const s = j(t) ? String(t) : (te(t), t);
2079
- return j(n) ? a.plural = n : O(n) ? a.default = n : k(n) && !et(n) ? a.named = n : G(n) && (a.list = n), j(r) ? a.plural = r : O(r) ? a.default = r : k(r) && J(a, r), [s, a];
2080
- }
2081
- function Es(e, t, n, r, a, s) {
2082
- return {
2083
- locale: t,
2084
- key: n,
2085
- warnHtmlMessage: a,
2086
- onError: (o) => {
2087
- if (s && s(o), process.env.NODE_ENV !== "production") {
2088
- const i = gs(r), c = `Message compilation error: ${o.message}`, E = o.location && i && Wr(i, o.location.start.offset, o.location.end.offset), b = e.__v_emitter;
2089
- b && i && b.emit("compile-error", {
2090
- message: i,
2091
- error: o.message,
2092
- start: o.location && o.location.start.offset,
2093
- end: o.location && o.location.end.offset,
2094
- groupId: `translate:${n}`
2095
- }), console.error(E ? `${c}
2096
- ${E}` : c);
2097
- } else
2098
- throw o;
2099
- },
2100
- onCacheKey: (o) => kr(t, n, o)
2101
- };
2102
- }
2103
- function gs(e) {
2104
- if (O(e))
2105
- return e;
2106
- if (e.loc && e.loc.source)
2107
- return e.loc.source;
2108
- }
2109
- function ps(e, t, n, r) {
2110
- const { modifiers: a, pluralRules: s, messageResolver: o, fallbackLocale: i, fallbackWarn: c, missingWarn: E, fallbackContext: b } = e, N = {
2111
- locale: t,
2112
- modifiers: a,
2113
- pluralRules: s,
2114
- messages: (D, y) => {
2115
- let C = o(n, D);
2116
- if (C == null && (b || y)) {
2117
- const [, , A] = ar(
2118
- b || e,
2119
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
2120
- D,
2121
- t,
2122
- i,
2123
- c,
2124
- E
2125
- );
2126
- C = o(A, D);
2127
- }
2128
- if (O(C) || re(C)) {
2129
- let A = !1;
2130
- const m = sr(e, D, t, C, D, () => {
2131
- A = !0;
2132
- });
2133
- return A ? Ln : m;
2134
- } else return te(C) ? C : Ln;
2135
- }
2136
- };
2137
- return e.processor && (N.processor = e.processor), r.list && (N.list = r.list), r.named && (N.named = r.named), j(r.plural) && (N.pluralIndex = r.plural), N;
2138
- }
2139
- pa();
2140
- function Ns() {
2141
- return or().__VUE_DEVTOOLS_GLOBAL_HOOK__;
2142
- }
2143
- function or() {
2144
- return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
2145
- }
2146
- const hs = typeof Proxy == "function", Ls = "devtools-plugin:setup", Ts = "plugin:settings:set";
2147
- let Ce, Ft;
2148
- function bs() {
2149
- var e;
2150
- return Ce !== void 0 || (typeof window < "u" && window.performance ? (Ce = !0, Ft = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (Ce = !0, Ft = globalThis.perf_hooks.performance) : Ce = !1), Ce;
2151
- }
2152
- function Os() {
2153
- return bs() ? Ft.now() : Date.now();
2154
- }
2155
- class Is {
2156
- constructor(t, n) {
2157
- this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
2158
- const r = {};
2159
- if (t.settings)
2160
- for (const o in t.settings) {
2161
- const i = t.settings[o];
2162
- r[o] = i.defaultValue;
2163
- }
2164
- const a = `__vue-devtools-plugin-settings__${t.id}`;
2165
- let s = Object.assign({}, r);
2166
- try {
2167
- const o = localStorage.getItem(a), i = JSON.parse(o);
2168
- Object.assign(s, i);
2169
- } catch {
2170
- }
2171
- this.fallbacks = {
2172
- getSettings() {
2173
- return s;
2174
- },
2175
- setSettings(o) {
2176
- try {
2177
- localStorage.setItem(a, JSON.stringify(o));
2178
- } catch {
2179
- }
2180
- s = o;
2181
- },
2182
- now() {
2183
- return Os();
2184
- }
2185
- }, n && n.on(Ts, (o, i) => {
2186
- o === this.plugin.id && this.fallbacks.setSettings(i);
2187
- }), this.proxiedOn = new Proxy({}, {
2188
- get: (o, i) => this.target ? this.target.on[i] : (...c) => {
2189
- this.onQueue.push({
2190
- method: i,
2191
- args: c
2192
- });
2193
- }
2194
- }), this.proxiedTarget = new Proxy({}, {
2195
- get: (o, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...c) => (this.targetQueue.push({
2196
- method: i,
2197
- args: c,
2198
- resolve: () => {
2199
- }
2200
- }), this.fallbacks[i](...c)) : (...c) => new Promise((E) => {
2201
- this.targetQueue.push({
2202
- method: i,
2203
- args: c,
2204
- resolve: E
2205
- });
2206
- })
2207
- });
2208
- }
2209
- async setRealTarget(t) {
2210
- this.target = t;
2211
- for (const n of this.onQueue)
2212
- this.target.on[n.method](...n.args);
2213
- for (const n of this.targetQueue)
2214
- n.resolve(await this.target[n.method](...n.args));
2215
- }
2216
- }
2217
- function vs(e, t) {
2218
- const n = e, r = or(), a = Ns(), s = hs && n.enableEarlyProxy;
2219
- if (a && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
2220
- a.emit(Ls, e, t);
2221
- else {
2222
- const o = s ? new Is(n, a) : null;
2223
- (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
2224
- pluginDescriptor: n,
2225
- setupFn: t,
2226
- proxy: o
2227
- }), o && t(o.proxiedTarget);
2228
- }
2229
- }
2230
- const Cs = "11.2.7";
2231
- function Ds() {
2232
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (he().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (he().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (he().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (he().__INTLIFY_PROD_DEVTOOLS__ = !1);
2233
- }
2234
- const W = {
2235
- // composer module errors
2236
- UNEXPECTED_RETURN_TYPE: Ra,
2237
- // 24
2238
- // legacy module errors
2239
- INVALID_ARGUMENT: 25,
2240
- // i18n module errors
2241
- MUST_BE_CALL_SETUP_TOP: 26,
2242
- NOT_INSTALLED: 27,
2243
- // directive module errors
2244
- REQUIRED_VALUE: 28,
2245
- INVALID_VALUE: 29,
2246
- // vue-devtools errors
2247
- CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
2248
- NOT_INSTALLED_WITH_PROVIDE: 31,
2249
- // unexpected error
2250
- UNEXPECTED_ERROR: 32,
2251
- // not compatible legacy vue-i18n constructor
2252
- NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
2253
- // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
2254
- NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
2255
- };
2256
- function z(e, ...t) {
2257
- return Pe(e, null, process.env.NODE_ENV !== "production" ? { messages: As, args: t } : void 0);
2258
- }
2259
- const As = {
2260
- [W.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
2261
- [W.INVALID_ARGUMENT]: "Invalid argument",
2262
- [W.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
2263
- [W.NOT_INSTALLED]: "Need to install with `app.use` function",
2264
- [W.UNEXPECTED_ERROR]: "Unexpected error",
2265
- [W.REQUIRED_VALUE]: "Required in value: {0}",
2266
- [W.INVALID_VALUE]: "Invalid value",
2267
- [W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
2268
- [W.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
2269
- [W.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
2270
- [W.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
2271
- }, St = /* @__PURE__ */ ce("__translateVNode"), yt = /* @__PURE__ */ ce("__datetimeParts"), Pt = /* @__PURE__ */ ce("__numberParts"), be = /* @__PURE__ */ ce("__enableEmitter"), Be = /* @__PURE__ */ ce("__disableEmitter"), lr = ce("__setPluralRules"), ir = /* @__PURE__ */ ce("__injectWithOption"), kt = /* @__PURE__ */ ce("__dispose"), ne = {
2272
- FALLBACK_TO_ROOT: ja,
2273
- // 8
2274
- NOT_FOUND_PARENT_SCOPE: 9,
2275
- IGNORE_OBJ_FLATTEN: 10,
2276
- /**
2277
- * @deprecated will be removed at vue-i18n v12
2278
- */
2279
- DEPRECATE_LEGACY_MODE: 11,
2280
- /**
2281
- * @deprecated will be removed at vue-i18n v12
2282
- */
2283
- DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
2284
- // duplicate `useI18n` calling
2285
- DUPLICATE_USE_I18N_CALLING: 13
2286
- }, Fs = {
2287
- [ne.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
2288
- [ne.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
2289
- [ne.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
2290
- /**
2291
- * @deprecated will be removed at vue-i18n v12
2292
- */
2293
- [ne.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
2294
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
2295
- /**
2296
- * @deprecated will be removed at vue-i18n v12
2297
- */
2298
- [ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
2299
- [ne.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
2300
- };
2301
- function ye(e, ...t) {
2302
- return ze(Fs[e], ...t);
2303
- }
2304
- function Ge(e) {
2305
- if (!R(e) || re(e))
2306
- return e;
2307
- for (const t in e)
2308
- if (se(e, t))
2309
- if (!t.includes("."))
2310
- R(e[t]) && Ge(e[t]);
2311
- else {
2312
- const n = t.split("."), r = n.length - 1;
2313
- let a = e, s = !1;
2314
- for (let o = 0; o < r; o++) {
2315
- if (n[o] === "__proto__")
2316
- throw new Error(`unsafe key: ${n[o]}`);
2317
- if (n[o] in a || (a[n[o]] = $()), !R(a[n[o]])) {
2318
- process.env.NODE_ENV !== "production" && ue(ye(ne.IGNORE_OBJ_FLATTEN, {
2319
- key: n[o]
2320
- })), s = !0;
2321
- break;
2322
- }
2323
- a = a[n[o]];
2324
- }
2325
- if (s || (re(a) ? Kn.includes(n[r]) || delete e[t] : (a[n[r]] = e[t], delete e[t])), !re(a)) {
2326
- const o = a[n[r]];
2327
- R(o) && Ge(o);
2328
- }
2329
- }
2330
- return e;
2331
- }
2332
- function Ht(e, t) {
2333
- const { messages: n, __i18n: r, messageResolver: a, flatJson: s } = t, o = k(n) ? n : G(r) ? $() : { [e]: $() };
2334
- if (G(r) && r.forEach((i) => {
2335
- if ("locale" in i && "resource" in i) {
2336
- const { locale: c, resource: E } = i;
2337
- c ? (o[c] = o[c] || $(), qe(E, o[c])) : qe(E, o);
2338
- } else
2339
- O(i) && qe(JSON.parse(i), o);
2340
- }), a == null && s)
2341
- for (const i in o)
2342
- se(o, i) && Ge(o[i]);
2343
- return o;
2344
- }
2345
- function ur(e) {
2346
- return e.type;
2347
- }
2348
- function cr(e, t, n) {
2349
- let r = R(t.messages) ? t.messages : $();
2350
- "__i18nGlobal" in n && (r = Ht(e.locale.value, {
2351
- messages: r,
2352
- __i18n: n.__i18nGlobal
2353
- }));
2354
- const a = Object.keys(r);
2355
- a.length && a.forEach((s) => {
2356
- e.mergeLocaleMessage(s, r[s]);
2357
- });
2358
- {
2359
- if (R(t.datetimeFormats)) {
2360
- const s = Object.keys(t.datetimeFormats);
2361
- s.length && s.forEach((o) => {
2362
- e.mergeDateTimeFormat(o, t.datetimeFormats[o]);
2363
- });
2364
- }
2365
- if (R(t.numberFormats)) {
2366
- const s = Object.keys(t.numberFormats);
2367
- s.length && s.forEach((o) => {
2368
- e.mergeNumberFormat(o, t.numberFormats[o]);
2369
- });
2370
- }
2371
- }
2372
- }
2373
- function bn(e) {
2374
- return Dr(Ar, null, e, 0);
2375
- }
2376
- function Ae() {
2377
- const e = "currentInstance";
2378
- return e in Nt ? Nt[e] : Nt.getCurrentInstance();
2379
- }
2380
- const On = "__INTLIFY_META__", In = () => [], Ss = () => !1;
2381
- let vn = 0;
2382
- function Cn(e) {
2383
- return ((t, n, r, a) => e(n, r, Ae() || void 0, a));
2384
- }
2385
- const ys = /* @__NO_SIDE_EFFECTS__ */ () => {
2386
- const e = Ae();
2387
- let t = null;
2388
- return e && (t = ur(e)[On]) ? { [On]: t } : null;
2389
- };
2390
- function Kt(e = {}) {
2391
- const { __root: t, __injectWithOption: n } = e, r = t === void 0, a = e.flatJson, s = oe ? Tr : br;
2392
- let o = M(e.inheritLocale) ? e.inheritLocale : !0;
2393
- const i = s(
2394
- // prettier-ignore
2395
- t && o ? t.locale.value : O(e.locale) ? e.locale : We
2396
- ), c = s(
2397
- // prettier-ignore
2398
- t && o ? t.fallbackLocale.value : O(e.fallbackLocale) || G(e.fallbackLocale) || k(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i.value
2399
- ), E = s(Ht(i.value, e)), b = s(k(e.datetimeFormats) ? e.datetimeFormats : { [i.value]: {} }), L = s(k(e.numberFormats) ? e.numberFormats : { [i.value]: {} });
2400
- let N = t ? t.missingWarn : M(e.missingWarn) || Fe(e.missingWarn) ? e.missingWarn : !0, D = t ? t.fallbackWarn : M(e.fallbackWarn) || Fe(e.fallbackWarn) ? e.fallbackWarn : !0, y = t ? t.fallbackRoot : M(e.fallbackRoot) ? e.fallbackRoot : !0, C = !!e.fallbackFormat, A = x(e.missing) ? e.missing : null, f = x(e.missing) ? Cn(e.missing) : null, m = x(e.postTranslation) ? e.postTranslation : null, T = t ? t.warnHtmlMessage : M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, d = !!e.escapeParameter;
2401
- const I = t ? t.modifiers : k(e.modifiers) ? e.modifiers : {};
2402
- let v = e.pluralRules || t && t.pluralRules, g;
2403
- g = (() => {
2404
- r && _n(null);
2405
- const _ = {
2406
- version: Cs,
2407
- locale: i.value,
2408
- fallbackLocale: c.value,
2409
- messages: E.value,
2410
- modifiers: I,
2411
- pluralRules: v,
2412
- missing: f === null ? void 0 : f,
2413
- missingWarn: N,
2414
- fallbackWarn: D,
2415
- fallbackFormat: C,
2416
- unresolving: !0,
2417
- postTranslation: m === null ? void 0 : m,
2418
- warnHtmlMessage: T,
2419
- escapeParameter: d,
2420
- messageResolver: e.messageResolver,
2421
- messageCompiler: e.messageCompiler,
2422
- __meta: { framework: "vue" }
2423
- };
2424
- _.datetimeFormats = b.value, _.numberFormats = L.value, _.__datetimeFormatters = k(g) ? g.__datetimeFormatters : void 0, _.__numberFormatters = k(g) ? g.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (_.__v_emitter = k(g) ? g.__v_emitter : void 0);
2425
- const h = rs(_);
2426
- return r && _n(h), h;
2427
- })(), Ve(g, i.value, c.value);
2428
- function U() {
2429
- return [
2430
- i.value,
2431
- c.value,
2432
- E.value,
2433
- b.value,
2434
- L.value
2435
- ];
2436
- }
2437
- const X = Ue({
2438
- get: () => i.value,
2439
- set: (_) => {
2440
- g.locale = _, i.value = _;
2441
- }
2442
- }), ae = Ue({
2443
- get: () => c.value,
2444
- set: (_) => {
2445
- g.fallbackLocale = _, c.value = _, Ve(g, i.value, _);
2446
- }
2447
- }), Y = Ue(() => E.value), Ie = /* @__PURE__ */ Ue(() => b.value), rt = /* @__PURE__ */ Ue(() => L.value);
2448
- function at() {
2449
- return x(m) ? m : null;
2450
- }
2451
- function st(_) {
2452
- m = _, g.postTranslation = _;
2453
- }
2454
- function ot() {
2455
- return A;
2456
- }
2457
- function lt(_) {
2458
- _ !== null && (f = Cn(_)), A = _, g.missing = f;
2459
- }
2460
- function it(_, h) {
2461
- return _ !== "translate" || !h.resolvedMessage;
2462
- }
2463
- const fe = (_, h, V, K, pe, je) => {
2464
- U();
2465
- let ve;
2466
- try {
2467
- process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (g.fallbackContext = t ? ns() : void 0), ve = _(g);
2468
- } finally {
2469
- process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (g.fallbackContext = void 0);
2470
- }
2471
- if (V !== "translate exists" && // for not `te` (e.g `t`)
2472
- j(ve) && ve === tt || V === "translate exists" && !ve) {
2473
- const [Ne, hr] = h();
2474
- if (process.env.NODE_ENV !== "production" && t && O(Ne) && it(V, hr) && (y && (nt(D, Ne) || zn(N, Ne)) && ue(ye(ne.FALLBACK_TO_ROOT, {
2475
- key: Ne,
2476
- type: V
2477
- })), process.env.NODE_ENV !== "production")) {
2478
- const { __v_emitter: qt } = g;
2479
- qt && y && qt.emit("fallback", {
2480
- type: V,
2481
- key: Ne,
2482
- to: "global",
2483
- groupId: `${V}:${Ne}`
2484
- });
2485
- }
2486
- return t && y ? K(t) : pe(Ne);
2487
- } else {
2488
- if (je(ve))
2489
- return ve;
2490
- throw z(W.UNEXPECTED_RETURN_TYPE);
2491
- }
2492
- };
2493
- function ke(..._) {
2494
- return fe((h) => Reflect.apply(Tn, null, [h, ..._]), () => At(..._), "translate", (h) => Reflect.apply(h.t, h, [..._]), (h) => h, (h) => O(h));
2495
- }
2496
- function ut(..._) {
2497
- const [h, V, K] = _;
2498
- if (K && !R(K))
2499
- throw z(W.INVALID_ARGUMENT);
2500
- return ke(h, V, J({ resolvedMessage: !0 }, K || {}));
2501
- }
2502
- function ct(..._) {
2503
- return fe((h) => Reflect.apply(En, null, [h, ..._]), () => Ct(..._), "datetime format", (h) => Reflect.apply(h.d, h, [..._]), () => Ze, (h) => O(h) || G(h));
2504
- }
2505
- function ft(..._) {
2506
- return fe((h) => Reflect.apply(pn, null, [h, ..._]), () => Dt(..._), "number format", (h) => Reflect.apply(h.n, h, [..._]), () => Ze, (h) => O(h) || G(h));
2507
- }
2508
- function _t(_) {
2509
- return _.map((h) => O(h) || j(h) || M(h) ? bn(String(h)) : h);
2510
- }
2511
- const mt = {
2512
- normalize: _t,
2513
- interpolate: (_) => _,
2514
- type: "vnode"
2515
- };
2516
- function He(..._) {
2517
- return fe((h) => {
2518
- let V;
2519
- const K = h;
2520
- try {
2521
- K.processor = mt, V = Reflect.apply(Tn, null, [K, ..._]);
2522
- } finally {
2523
- K.processor = null;
2524
- }
2525
- return V;
2526
- }, () => At(..._), "translate", (h) => h[St](..._), (h) => [bn(h)], (h) => G(h));
2527
- }
2528
- function dt(..._) {
2529
- return fe((h) => Reflect.apply(pn, null, [h, ..._]), () => Dt(..._), "number format", (h) => h[Pt](..._), In, (h) => O(h) || G(h));
2530
- }
2531
- function Ke(..._) {
2532
- return fe((h) => Reflect.apply(En, null, [h, ..._]), () => Ct(..._), "datetime format", (h) => h[yt](..._), In, (h) => O(h) || G(h));
2533
- }
2534
- function Et(_) {
2535
- v = _, g.pluralRules = v;
2536
- }
2537
- function gt(_, h) {
2538
- return fe(() => {
2539
- if (!_)
2540
- return !1;
2541
- const V = O(h) ? h : i.value, K = ge(V), pe = g.messageResolver(K, _);
2542
- return re(pe) || te(pe) || O(pe);
2543
- }, () => [_], "translate exists", (V) => Reflect.apply(V.te, V, [_, h]), Ss, (V) => M(V));
2544
- }
2545
- function Re(_) {
2546
- let h = null;
2547
- const V = jn(g, c.value, i.value);
2548
- for (let K = 0; K < V.length; K++) {
2549
- const pe = E.value[V[K]] || {}, je = g.messageResolver(pe, _);
2550
- if (je != null) {
2551
- h = je;
2552
- break;
2553
- }
2554
- }
2555
- return h;
2556
- }
2557
- function Me(_) {
2558
- const h = Re(_);
2559
- return h ?? (t ? t.tm(_) || {} : {});
2560
- }
2561
- function ge(_) {
2562
- return E.value[_] || {};
2563
- }
2564
- function we(_, h) {
2565
- if (a) {
2566
- const V = { [_]: h };
2567
- for (const K in V)
2568
- se(V, K) && Ge(V[K]);
2569
- h = V[_];
2570
- }
2571
- E.value[_] = h, g.messages = E.value;
2572
- }
2573
- function pt(_, h) {
2574
- E.value[_] = E.value[_] || {};
2575
- const V = { [_]: h };
2576
- if (a)
2577
- for (const K in V)
2578
- se(V, K) && Ge(V[K]);
2579
- h = V[_], qe(h, E.value[_]), g.messages = E.value;
2580
- }
2581
- function l(_) {
2582
- return b.value[_] || {};
2583
- }
2584
- function u(_, h) {
2585
- b.value[_] = h, g.datetimeFormats = b.value, gn(g, _, h);
2586
- }
2587
- function p(_, h) {
2588
- b.value[_] = J(b.value[_] || {}, h), g.datetimeFormats = b.value, gn(g, _, h);
2589
- }
2590
- function F(_) {
2591
- return L.value[_] || {};
2592
- }
2593
- function B(_, h) {
2594
- L.value[_] = h, g.numberFormats = L.value, Nn(g, _, h);
2595
- }
2596
- function H(_, h) {
2597
- L.value[_] = J(L.value[_] || {}, h), g.numberFormats = L.value, Nn(g, _, h);
2598
- }
2599
- vn++, t && oe && (Ot(t.locale, (_) => {
2600
- o && (i.value = _, g.locale = _, Ve(g, i.value, c.value));
2601
- }), Ot(t.fallbackLocale, (_) => {
2602
- o && (c.value = _, g.fallbackLocale = _, Ve(g, i.value, c.value));
2603
- }));
2604
- const w = {
2605
- id: vn,
2606
- locale: X,
2607
- fallbackLocale: ae,
2608
- get inheritLocale() {
2609
- return o;
2610
- },
2611
- set inheritLocale(_) {
2612
- o = _, _ && t && (i.value = t.locale.value, c.value = t.fallbackLocale.value, Ve(g, i.value, c.value));
2613
- },
2614
- get availableLocales() {
2615
- return Object.keys(E.value).sort();
2616
- },
2617
- messages: Y,
2618
- get modifiers() {
2619
- return I;
2620
- },
2621
- get pluralRules() {
2622
- return v || {};
2623
- },
2624
- get isGlobal() {
2625
- return r;
2626
- },
2627
- get missingWarn() {
2628
- return N;
2629
- },
2630
- set missingWarn(_) {
2631
- N = _, g.missingWarn = N;
2632
- },
2633
- get fallbackWarn() {
2634
- return D;
2635
- },
2636
- set fallbackWarn(_) {
2637
- D = _, g.fallbackWarn = D;
2638
- },
2639
- get fallbackRoot() {
2640
- return y;
2641
- },
2642
- set fallbackRoot(_) {
2643
- y = _;
2644
- },
2645
- get fallbackFormat() {
2646
- return C;
2647
- },
2648
- set fallbackFormat(_) {
2649
- C = _, g.fallbackFormat = C;
2650
- },
2651
- get warnHtmlMessage() {
2652
- return T;
2653
- },
2654
- set warnHtmlMessage(_) {
2655
- T = _, g.warnHtmlMessage = _;
2656
- },
2657
- get escapeParameter() {
2658
- return d;
2659
- },
2660
- set escapeParameter(_) {
2661
- d = _, g.escapeParameter = _;
2662
- },
2663
- t: ke,
2664
- getLocaleMessage: ge,
2665
- setLocaleMessage: we,
2666
- mergeLocaleMessage: pt,
2667
- getPostTranslationHandler: at,
2668
- setPostTranslationHandler: st,
2669
- getMissingHandler: ot,
2670
- setMissingHandler: lt,
2671
- [lr]: Et
2672
- };
2673
- return w.datetimeFormats = Ie, w.numberFormats = rt, w.rt = ut, w.te = gt, w.tm = Me, w.d = ct, w.n = ft, w.getDateTimeFormat = l, w.setDateTimeFormat = u, w.mergeDateTimeFormat = p, w.getNumberFormat = F, w.setNumberFormat = B, w.mergeNumberFormat = H, w[ir] = n, w[St] = He, w[yt] = Ke, w[Pt] = dt, process.env.NODE_ENV !== "production" && (w[be] = (_) => {
2674
- g.__v_emitter = _;
2675
- }, w[Be] = () => {
2676
- g.__v_emitter = void 0;
2677
- }), w;
2678
- }
2679
- const fr = "vue-i18n: composer properties", bt = {
2680
- "vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
2681
- "vue-i18n-resource-inspector": "Vue I18n DevTools",
2682
- "vue-i18n-timeline": "Vue I18n"
2683
- }, Ps = {
2684
- "vue-i18n-resource-inspector": "Search for scopes ..."
2685
- }, ks = {
2686
- "vue-i18n-timeline": 16764185
2687
- };
2688
- let Rt;
2689
- async function Rs(e, t) {
2690
- return new Promise((n, r) => {
2691
- try {
2692
- vs({
2693
- id: "vue-devtools-plugin-vue-i18n",
2694
- label: bt["vue-devtools-plugin-vue-i18n"],
2695
- packageName: "vue-i18n",
2696
- homepage: "https://vue-i18n.intlify.dev",
2697
- logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
2698
- componentStateTypes: [fr],
2699
- app: e
2700
- // eslint-disable-line @typescript-eslint/no-explicit-any
2701
- }, (a) => {
2702
- Rt = a, a.on.visitComponentTree(({ componentInstance: o, treeNode: i }) => {
2703
- Ms(o, i, t);
2704
- }), a.on.inspectComponent(({ componentInstance: o, instanceData: i }) => {
2705
- o.__VUE_I18N__ && i && (t.mode === "legacy" ? o.__VUE_I18N__ !== t.global.__composer && Dn(i, o.__VUE_I18N__) : Dn(i, o.__VUE_I18N__));
2706
- }), a.addInspector({
2707
- id: "vue-i18n-resource-inspector",
2708
- label: bt["vue-i18n-resource-inspector"],
2709
- icon: "language",
2710
- treeFilterPlaceholder: Ps["vue-i18n-resource-inspector"]
2711
- }), a.on.getInspectorTree((o) => {
2712
- o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && xs(o, t);
2713
- });
2714
- const s = /* @__PURE__ */ new Map();
2715
- a.on.getInspectorState(async (o) => {
2716
- if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
2717
- if (a.unhighlightElement(), Bs(o, t), o.nodeId === "global") {
2718
- if (!s.has(o.app)) {
2719
- const [i] = await a.getComponentInstances(o.app);
2720
- s.set(o.app, i);
2721
- }
2722
- a.highlightElement(s.get(o.app));
2723
- } else {
2724
- const i = Ws(o.nodeId, t);
2725
- i && a.highlightElement(i);
2726
- }
2727
- }), a.on.editInspectorState((o) => {
2728
- o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && Ys(o, t);
2729
- }), a.addTimelineLayer({
2730
- id: "vue-i18n-timeline",
2731
- label: bt["vue-i18n-timeline"],
2732
- color: ks["vue-i18n-timeline"]
2733
- }), n(!0);
2734
- });
2735
- } catch (a) {
2736
- console.error(a), r(!1);
2737
- }
2738
- });
2739
- }
2740
- function _r(e) {
2741
- return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
2742
- }
2743
- function Ms(e, t, n) {
2744
- const r = n.mode === "composition" ? n.global : n.global.__composer;
2745
- if (e && e.__VUE_I18N__ && e.__VUE_I18N__ !== r) {
2746
- const a = {
2747
- label: `i18n (${_r(e)} Scope)`,
2748
- textColor: 0,
2749
- backgroundColor: 16764185
2750
- };
2751
- t.tags.push(a);
2752
- }
2753
- }
2754
- function Dn(e, t) {
2755
- const n = fr;
2756
- e.state.push({
2757
- type: n,
2758
- key: "locale",
2759
- editable: !0,
2760
- value: t.locale.value
2761
- }), e.state.push({
2762
- type: n,
2763
- key: "availableLocales",
2764
- editable: !1,
2765
- value: t.availableLocales
2766
- }), e.state.push({
2767
- type: n,
2768
- key: "fallbackLocale",
2769
- editable: !0,
2770
- value: t.fallbackLocale.value
2771
- }), e.state.push({
2772
- type: n,
2773
- key: "inheritLocale",
2774
- editable: !0,
2775
- value: t.inheritLocale
2776
- }), e.state.push({
2777
- type: n,
2778
- key: "messages",
2779
- editable: !1,
2780
- value: jt(t.messages.value)
2781
- }), e.state.push({
2782
- type: n,
2783
- key: "datetimeFormats",
2784
- editable: !1,
2785
- value: t.datetimeFormats.value
2786
- }), e.state.push({
2787
- type: n,
2788
- key: "numberFormats",
2789
- editable: !1,
2790
- value: t.numberFormats.value
2791
- });
2792
- }
2793
- function jt(e) {
2794
- const t = {};
2795
- return Object.keys(e).forEach((n) => {
2796
- const r = e[n];
2797
- x(r) && "source" in r ? t[n] = $s(r) : re(r) && r.loc && r.loc.source ? t[n] = r.loc.source : R(r) ? t[n] = jt(r) : t[n] = r;
2798
- }), t;
2799
- }
2800
- const ws = {
2801
- "<": "&lt;",
2802
- ">": "&gt;",
2803
- '"': "&quot;",
2804
- "&": "&amp;"
2805
- };
2806
- function Us(e) {
2807
- return e.replace(/[<>"&]/g, Vs);
2808
- }
2809
- function Vs(e) {
2810
- return ws[e] || e;
2811
- }
2812
- function $s(e) {
2813
- return {
2814
- _custom: {
2815
- type: "function",
2816
- display: `<span>ƒ</span> ${e.source ? `("${Us(e.source)}")` : "(?)"}`
2817
- }
2818
- };
2819
- }
2820
- function xs(e, t) {
2821
- e.rootNodes.push({
2822
- id: "global",
2823
- label: "Global Scope"
2824
- });
2825
- const n = t.mode === "composition" ? t.global : t.global.__composer;
2826
- for (const [r, a] of t.__instances) {
2827
- const s = t.mode === "composition" ? a : a.__composer;
2828
- n !== s && e.rootNodes.push({
2829
- id: s.id.toString(),
2830
- label: `${_r(r)} Scope`
2831
- });
2832
- }
2833
- }
2834
- function Ws(e, t) {
2835
- let n = null;
2836
- if (e !== "global") {
2837
- for (const [r, a] of t.__instances.entries())
2838
- if (a.id.toString() === e) {
2839
- n = r;
2840
- break;
2841
- }
2842
- }
2843
- return n;
2844
- }
2845
- function mr(e, t) {
2846
- if (e === "global")
2847
- return t.mode === "composition" ? t.global : t.global.__composer;
2848
- {
2849
- const n = Array.from(t.__instances.values()).find((r) => r.id.toString() === e);
2850
- return n ? t.mode === "composition" ? n : n.__composer : null;
2851
- }
2852
- }
2853
- function Bs(e, t) {
2854
- const n = mr(e.nodeId, t);
2855
- return n && (e.state = Gs(n)), null;
2856
- }
2857
- function Gs(e) {
2858
- const t = {}, n = "Locale related info", r = [
2859
- {
2860
- type: n,
2861
- key: "locale",
2862
- editable: !0,
2863
- value: e.locale.value
2864
- },
2865
- {
2866
- type: n,
2867
- key: "fallbackLocale",
2868
- editable: !0,
2869
- value: e.fallbackLocale.value
2870
- },
2871
- {
2872
- type: n,
2873
- key: "availableLocales",
2874
- editable: !1,
2875
- value: e.availableLocales
2876
- },
2877
- {
2878
- type: n,
2879
- key: "inheritLocale",
2880
- editable: !0,
2881
- value: e.inheritLocale
2882
- }
2883
- ];
2884
- t[n] = r;
2885
- const a = "Locale messages info", s = [
2886
- {
2887
- type: a,
2888
- key: "messages",
2889
- editable: !1,
2890
- value: jt(e.messages.value)
2891
- }
2892
- ];
2893
- t[a] = s;
2894
- {
2895
- const o = "Datetime formats info", i = [
2896
- {
2897
- type: o,
2898
- key: "datetimeFormats",
2899
- editable: !1,
2900
- value: e.datetimeFormats.value
2901
- }
2902
- ];
2903
- t[o] = i;
2904
- const c = "Datetime formats info", E = [
2905
- {
2906
- type: c,
2907
- key: "numberFormats",
2908
- editable: !1,
2909
- value: e.numberFormats.value
2910
- }
2911
- ];
2912
- t[c] = E;
2913
- }
2914
- return t;
2915
- }
2916
- function Ye(e, t) {
2917
- if (Rt) {
2918
- let n;
2919
- t && "groupId" in t && (n = t.groupId, delete t.groupId), Rt.addTimelineEvent({
2920
- layerId: "vue-i18n-timeline",
2921
- event: {
2922
- title: e,
2923
- groupId: n,
2924
- time: Date.now(),
2925
- meta: {},
2926
- data: t || {},
2927
- logType: e === "compile-error" ? "error" : e === "fallback" || e === "missing" ? "warning" : "default"
2928
- }
2929
- });
2930
- }
2931
- }
2932
- function Ys(e, t) {
2933
- const n = mr(e.nodeId, t);
2934
- if (n) {
2935
- const [r] = e.path;
2936
- r === "locale" && O(e.state.value) ? n.locale.value = e.state.value : r === "fallbackLocale" && (O(e.state.value) || G(e.state.value) || R(e.state.value)) ? n.fallbackLocale.value = e.state.value : r === "inheritLocale" && M(e.state.value) && (n.inheritLocale = e.state.value);
2937
- }
2938
- }
2939
- function Hs(e) {
2940
- const t = O(e.locale) ? e.locale : We, n = O(e.fallbackLocale) || G(e.fallbackLocale) || k(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = x(e.missing) ? e.missing : void 0, a = M(e.silentTranslationWarn) || Fe(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, s = M(e.silentFallbackWarn) || Fe(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = M(e.fallbackRoot) ? e.fallbackRoot : !0, i = !!e.formatFallbackMessages, c = k(e.modifiers) ? e.modifiers : {}, E = e.pluralizationRules, b = x(e.postTranslation) ? e.postTranslation : void 0, L = O(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, N = !!e.escapeParameterHtml, D = M(e.sync) ? e.sync : !0;
2941
- let y = e.messages;
2942
- if (k(e.sharedMessages)) {
2943
- const I = e.sharedMessages;
2944
- y = Object.keys(I).reduce((g, P) => {
2945
- const U = g[P] || (g[P] = {});
2946
- return J(U, I[P]), g;
2947
- }, y || {});
2948
- }
2949
- const { __i18n: C, __root: A, __injectWithOption: f } = e, m = e.datetimeFormats, T = e.numberFormats, d = e.flatJson;
2950
- return {
2951
- locale: t,
2952
- fallbackLocale: n,
2953
- messages: y,
2954
- flatJson: d,
2955
- datetimeFormats: m,
2956
- numberFormats: T,
2957
- missing: r,
2958
- missingWarn: a,
2959
- fallbackWarn: s,
2960
- fallbackRoot: o,
2961
- fallbackFormat: i,
2962
- modifiers: c,
2963
- pluralRules: E,
2964
- postTranslation: b,
2965
- warnHtmlMessage: L,
2966
- escapeParameter: N,
2967
- messageResolver: e.messageResolver,
2968
- inheritLocale: D,
2969
- __i18n: C,
2970
- __root: A,
2971
- __injectWithOption: f
2972
- };
2973
- }
2974
- function Mt(e = {}) {
2975
- const t = Kt(Hs(e)), { __extender: n } = e, r = {
2976
- // id
2977
- id: t.id,
2978
- // locale
2979
- get locale() {
2980
- return t.locale.value;
2981
- },
2982
- set locale(a) {
2983
- t.locale.value = a;
2984
- },
2985
- // fallbackLocale
2986
- get fallbackLocale() {
2987
- return t.fallbackLocale.value;
2988
- },
2989
- set fallbackLocale(a) {
2990
- t.fallbackLocale.value = a;
2991
- },
2992
- // messages
2993
- get messages() {
2994
- return t.messages.value;
2995
- },
2996
- // datetimeFormats
2997
- get datetimeFormats() {
2998
- return t.datetimeFormats.value;
2999
- },
3000
- // numberFormats
3001
- get numberFormats() {
3002
- return t.numberFormats.value;
3003
- },
3004
- // availableLocales
3005
- get availableLocales() {
3006
- return t.availableLocales;
3007
- },
3008
- // missing
3009
- get missing() {
3010
- return t.getMissingHandler();
3011
- },
3012
- set missing(a) {
3013
- t.setMissingHandler(a);
3014
- },
3015
- // silentTranslationWarn
3016
- get silentTranslationWarn() {
3017
- return M(t.missingWarn) ? !t.missingWarn : t.missingWarn;
3018
- },
3019
- set silentTranslationWarn(a) {
3020
- t.missingWarn = M(a) ? !a : a;
3021
- },
3022
- // silentFallbackWarn
3023
- get silentFallbackWarn() {
3024
- return M(t.fallbackWarn) ? !t.fallbackWarn : t.fallbackWarn;
3025
- },
3026
- set silentFallbackWarn(a) {
3027
- t.fallbackWarn = M(a) ? !a : a;
3028
- },
3029
- // modifiers
3030
- get modifiers() {
3031
- return t.modifiers;
3032
- },
3033
- // formatFallbackMessages
3034
- get formatFallbackMessages() {
3035
- return t.fallbackFormat;
3036
- },
3037
- set formatFallbackMessages(a) {
3038
- t.fallbackFormat = a;
3039
- },
3040
- // postTranslation
3041
- get postTranslation() {
3042
- return t.getPostTranslationHandler();
3043
- },
3044
- set postTranslation(a) {
3045
- t.setPostTranslationHandler(a);
3046
- },
3047
- // sync
3048
- get sync() {
3049
- return t.inheritLocale;
3050
- },
3051
- set sync(a) {
3052
- t.inheritLocale = a;
3053
- },
3054
- // warnInHtmlMessage
3055
- get warnHtmlInMessage() {
3056
- return t.warnHtmlMessage ? "warn" : "off";
3057
- },
3058
- set warnHtmlInMessage(a) {
3059
- t.warnHtmlMessage = a !== "off";
3060
- },
3061
- // escapeParameterHtml
3062
- get escapeParameterHtml() {
3063
- return t.escapeParameter;
3064
- },
3065
- set escapeParameterHtml(a) {
3066
- t.escapeParameter = a;
3067
- },
3068
- // pluralizationRules
3069
- get pluralizationRules() {
3070
- return t.pluralRules || {};
3071
- },
3072
- // for internal
3073
- __composer: t,
3074
- // t
3075
- t(...a) {
3076
- return Reflect.apply(t.t, t, [...a]);
3077
- },
3078
- // rt
3079
- rt(...a) {
3080
- return Reflect.apply(t.rt, t, [...a]);
3081
- },
3082
- // te
3083
- te(a, s) {
3084
- return t.te(a, s);
3085
- },
3086
- // tm
3087
- tm(a) {
3088
- return t.tm(a);
3089
- },
3090
- // getLocaleMessage
3091
- getLocaleMessage(a) {
3092
- return t.getLocaleMessage(a);
3093
- },
3094
- // setLocaleMessage
3095
- setLocaleMessage(a, s) {
3096
- t.setLocaleMessage(a, s);
3097
- },
3098
- // mergeLocaleMessage
3099
- mergeLocaleMessage(a, s) {
3100
- t.mergeLocaleMessage(a, s);
3101
- },
3102
- // d
3103
- d(...a) {
3104
- return Reflect.apply(t.d, t, [...a]);
3105
- },
3106
- // getDateTimeFormat
3107
- getDateTimeFormat(a) {
3108
- return t.getDateTimeFormat(a);
3109
- },
3110
- // setDateTimeFormat
3111
- setDateTimeFormat(a, s) {
3112
- t.setDateTimeFormat(a, s);
3113
- },
3114
- // mergeDateTimeFormat
3115
- mergeDateTimeFormat(a, s) {
3116
- t.mergeDateTimeFormat(a, s);
3117
- },
3118
- // n
3119
- n(...a) {
3120
- return Reflect.apply(t.n, t, [...a]);
3121
- },
3122
- // getNumberFormat
3123
- getNumberFormat(a) {
3124
- return t.getNumberFormat(a);
3125
- },
3126
- // setNumberFormat
3127
- setNumberFormat(a, s) {
3128
- t.setNumberFormat(a, s);
3129
- },
3130
- // mergeNumberFormat
3131
- mergeNumberFormat(a, s) {
3132
- t.mergeNumberFormat(a, s);
3133
- }
3134
- };
3135
- return r.__extender = n, process.env.NODE_ENV !== "production" && (r.__enableEmitter = (a) => {
3136
- const s = t;
3137
- s[be] && s[be](a);
3138
- }, r.__disableEmitter = () => {
3139
- const a = t;
3140
- a[Be] && a[Be]();
3141
- }), r;
3142
- }
3143
- function Ks(e, t, n) {
3144
- return {
3145
- beforeCreate() {
3146
- const r = Ae();
3147
- if (!r)
3148
- throw z(W.UNEXPECTED_ERROR);
3149
- const a = this.$options;
3150
- if (a.i18n) {
3151
- const s = a.i18n;
3152
- if (a.__i18n && (s.__i18n = a.__i18n), s.__root = t, this === this.$root)
3153
- this.$i18n = An(e, s);
3154
- else {
3155
- s.__injectWithOption = !0, s.__extender = n.__vueI18nExtend, this.$i18n = Mt(s);
3156
- const o = this.$i18n;
3157
- o.__extender && (o.__disposer = o.__extender(this.$i18n));
3158
- }
3159
- } else if (a.__i18n)
3160
- if (this === this.$root)
3161
- this.$i18n = An(e, a);
3162
- else {
3163
- this.$i18n = Mt({
3164
- __i18n: a.__i18n,
3165
- __injectWithOption: !0,
3166
- __extender: n.__vueI18nExtend,
3167
- __root: t
3168
- });
3169
- const s = this.$i18n;
3170
- s.__extender && (s.__disposer = s.__extender(this.$i18n));
3171
- }
3172
- else
3173
- this.$i18n = e;
3174
- a.__i18nGlobal && cr(t, a, a), this.$t = (...s) => this.$i18n.t(...s), this.$rt = (...s) => this.$i18n.rt(...s), this.$te = (s, o) => this.$i18n.te(s, o), this.$d = (...s) => this.$i18n.d(...s), this.$n = (...s) => this.$i18n.n(...s), this.$tm = (s) => this.$i18n.tm(s), n.__setInstance(r, this.$i18n);
3175
- },
3176
- mounted() {
3177
- if (process.env.NODE_ENV !== "production" && this.$i18n) {
3178
- const r = Ae();
3179
- if (!r)
3180
- return;
3181
- const a = this.$i18n;
3182
- r.__VUE_I18N__ = a.__composer;
3183
- const s = this.__v_emitter = xt();
3184
- a.__enableEmitter && a.__enableEmitter(s), s.on("*", Ye);
3185
- }
3186
- },
3187
- unmounted() {
3188
- const r = Ae();
3189
- if (!r)
3190
- throw z(W.UNEXPECTED_ERROR);
3191
- const a = this.$i18n;
3192
- process.env.NODE_ENV !== "production" && r.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", Ye), delete this.__v_emitter), this.$i18n && (a.__disableEmitter && a.__disableEmitter(), delete r.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, a.__disposer && (a.__disposer(), delete a.__disposer, delete a.__extender), n.__deleteInstance(r), delete this.$i18n;
3193
- }
3194
- };
3195
- }
3196
- function An(e, t) {
3197
- e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[lr](t.pluralizationRules || e.pluralizationRules);
3198
- const n = Ht(e.locale, {
3199
- messages: t.messages,
3200
- __i18n: t.__i18n
3201
- });
3202
- return Object.keys(n).forEach((r) => e.mergeLocaleMessage(r, n[r])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((r) => e.mergeDateTimeFormat(r, t.datetimeFormats[r])), t.numberFormats && Object.keys(t.numberFormats).forEach((r) => e.mergeNumberFormat(r, t.numberFormats[r])), e;
3203
- }
3204
- const Xt = {
3205
- tag: {
3206
- type: [String, Object]
3207
- },
3208
- locale: {
3209
- type: String
3210
- },
3211
- scope: {
3212
- type: String,
3213
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
3214
- validator: (e) => e === "parent" || e === "global",
3215
- default: "parent"
3216
- /* ComponentI18nScope */
3217
- },
3218
- i18n: {
3219
- type: Object
3220
- }
3221
- };
3222
- function js({ slots: e }, t) {
3223
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, a) => [
3224
- ...r,
3225
- // prettier-ignore
3226
- ...a.type === wn ? a.children : [a]
3227
- ], []) : t.reduce((n, r) => {
3228
- const a = e[r];
3229
- return a && (n[r] = a()), n;
3230
- }, $());
3231
- }
3232
- function dr() {
3233
- return wn;
3234
- }
3235
- const Xs = /* @__PURE__ */ wt({
3236
- /* eslint-disable */
3237
- name: "i18n-t",
3238
- props: J({
3239
- keypath: {
3240
- type: String,
3241
- required: !0
3242
- },
3243
- plural: {
3244
- type: [Number, String],
3245
- validator: (e) => j(e) || !isNaN(e)
3246
- }
3247
- }, Xt),
3248
- /* eslint-enable */
3249
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3250
- setup(e, t) {
3251
- const { slots: n, attrs: r } = t, a = e.i18n || Jt({
3252
- useScope: e.scope,
3253
- __useComponent: !0
3254
- });
3255
- return () => {
3256
- const s = Object.keys(n).filter((L) => L[0] !== "_"), o = $();
3257
- e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = O(e.plural) ? +e.plural : e.plural);
3258
- const i = js(t, s), c = a[St](e.keypath, i, o), E = J($(), r), b = O(e.tag) || R(e.tag) ? e.tag : dr();
3259
- return Mn(b, E, c);
3260
- };
3261
- }
3262
- }), Fn = Xs;
3263
- function Js(e) {
3264
- return G(e) && !O(e[0]);
3265
- }
3266
- function Er(e, t, n, r) {
3267
- const { slots: a, attrs: s } = t;
3268
- return () => {
3269
- const o = { part: !0 };
3270
- let i = $();
3271
- e.locale && (o.locale = e.locale), O(e.format) ? o.key = e.format : R(e.format) && (O(e.format.key) && (o.key = e.format.key), i = Object.keys(e.format).reduce((N, D) => n.includes(D) ? J($(), N, { [D]: e.format[D] }) : N, $()));
3272
- const c = r(e.value, o, i);
3273
- let E = [o.key];
3274
- G(c) ? E = c.map((N, D) => {
3275
- const y = a[N.type], C = y ? y({ [N.type]: N.value, index: D, parts: c }) : [N.value];
3276
- return Js(C) && (C[0].key = `${N.type}-${D}`), C;
3277
- }) : O(c) && (E = [c]);
3278
- const b = J($(), s), L = O(e.tag) || R(e.tag) ? e.tag : dr();
3279
- return Mn(L, b, E);
3280
- };
3281
- }
3282
- const Qs = /* @__PURE__ */ wt({
3283
- /* eslint-disable */
3284
- name: "i18n-n",
3285
- props: J({
3286
- value: {
3287
- type: Number,
3288
- required: !0
3289
- },
3290
- format: {
3291
- type: [String, Object]
3292
- }
3293
- }, Xt),
3294
- /* eslint-enable */
3295
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3296
- setup(e, t) {
3297
- const n = e.i18n || Jt({
3298
- useScope: e.scope,
3299
- __useComponent: !0
3300
- });
3301
- return Er(e, t, rr, (...r) => (
3302
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3303
- n[Pt](...r)
3304
- ));
3305
- }
3306
- }), Sn = Qs;
3307
- function qs(e, t) {
3308
- const n = e;
3309
- if (e.mode === "composition")
3310
- return n.__getInstance(t) || e.global;
3311
- {
3312
- const r = n.__getInstance(t);
3313
- return r != null ? r.__composer : e.global.__composer;
3314
- }
3315
- }
3316
- function Zs(e) {
3317
- const t = (o) => {
3318
- process.env.NODE_ENV !== "production" && Ut(ye(ne.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
3319
- const { instance: i, value: c } = o;
3320
- if (!i || !i.$)
3321
- throw z(W.UNEXPECTED_ERROR);
3322
- const E = qs(e, i.$), b = yn(c);
3323
- return [
3324
- Reflect.apply(E.t, E, [...Pn(b)]),
3325
- E
3326
- ];
3327
- };
3328
- return {
3329
- created: (o, i) => {
3330
- const [c, E] = t(i);
3331
- oe && e.global === E && (o.__i18nWatcher = Ot(E.locale, () => {
3332
- i.instance && i.instance.$forceUpdate();
3333
- })), o.__composer = E, o.textContent = c;
3334
- },
3335
- unmounted: (o) => {
3336
- oe && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
3337
- },
3338
- beforeUpdate: (o, { value: i }) => {
3339
- if (o.__composer) {
3340
- const c = o.__composer, E = yn(i);
3341
- o.textContent = Reflect.apply(c.t, c, [
3342
- ...Pn(E)
3343
- ]);
3344
- }
3345
- },
3346
- getSSRProps: (o) => {
3347
- const [i] = t(o);
3348
- return { textContent: i };
3349
- }
3350
- };
3351
- }
3352
- function yn(e) {
3353
- if (O(e))
3354
- return { path: e };
3355
- if (k(e)) {
3356
- if (!("path" in e))
3357
- throw z(W.REQUIRED_VALUE, "path");
3358
- return e;
3359
- } else
3360
- throw z(W.INVALID_VALUE);
3361
- }
3362
- function Pn(e) {
3363
- const { path: t, locale: n, args: r, choice: a, plural: s } = e, o = {}, i = r || {};
3364
- return O(n) && (o.locale = n), j(a) && (o.plural = a), j(s) && (o.plural = s), [t, i, o];
3365
- }
3366
- function zs(e, t, ...n) {
3367
- const r = k(n[0]) ? n[0] : {};
3368
- (!M(r.globalInstall) || r.globalInstall) && ([Fn.name, "I18nT"].forEach((s) => e.component(s, Fn)), [Sn.name, "I18nN"].forEach((s) => e.component(s, Sn)), [Rn.name, "I18nD"].forEach((s) => e.component(s, Rn))), e.directive("t", Zs(t));
3369
- }
3370
- const eo = /* @__PURE__ */ ce("global-vue-i18n");
3371
- function to(e = {}) {
3372
- const t = __VUE_I18N_LEGACY_API__ && M(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
3373
- process.env.NODE_ENV !== "production" && t && Ut(ye(ne.DEPRECATE_LEGACY_MODE));
3374
- const n = M(e.globalInjection) ? e.globalInjection : !0, r = /* @__PURE__ */ new Map(), [a, s] = no(e, t), o = /* @__PURE__ */ ce(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
3375
- function i(L) {
3376
- return r.get(L) || null;
3377
- }
3378
- function c(L, N) {
3379
- r.set(L, N);
3380
- }
3381
- function E(L) {
3382
- r.delete(L);
3383
- }
3384
- const b = {
3385
- // mode
3386
- get mode() {
3387
- return __VUE_I18N_LEGACY_API__ && t ? "legacy" : "composition";
3388
- },
3389
- // install plugin
3390
- async install(L, ...N) {
3391
- if (process.env.NODE_ENV !== "production" && (L.__VUE_I18N__ = b), L.__VUE_I18N_SYMBOL__ = o, L.provide(L.__VUE_I18N_SYMBOL__, b), k(N[0])) {
3392
- const C = N[0];
3393
- b.__composerExtend = C.__composerExtend, b.__vueI18nExtend = C.__vueI18nExtend;
3394
- }
3395
- let D = null;
3396
- !t && n && (D = co(L, b.global)), __VUE_I18N_FULL_INSTALL__ && zs(L, b, ...N), __VUE_I18N_LEGACY_API__ && t && L.mixin(Ks(s, s.__composer, b));
3397
- const y = L.unmount;
3398
- if (L.unmount = () => {
3399
- D && D(), b.dispose(), y();
3400
- }, process.env.NODE_ENV !== "production") {
3401
- if (!await Rs(L, b))
3402
- throw z(W.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
3403
- const A = xt();
3404
- if (t) {
3405
- const f = s;
3406
- f.__enableEmitter && f.__enableEmitter(A);
3407
- } else {
3408
- const f = s;
3409
- f[be] && f[be](A);
3410
- }
3411
- A.on("*", Ye);
3412
- }
3413
- },
3414
- // global accessor
3415
- get global() {
3416
- return s;
3417
- },
3418
- dispose() {
3419
- a.stop();
3420
- },
3421
- // @internal
3422
- __instances: r,
3423
- // @internal
3424
- __getInstance: i,
3425
- // @internal
3426
- __setInstance: c,
3427
- // @internal
3428
- __deleteInstance: E
3429
- };
3430
- return b;
3431
- }
3432
- function Jt(e = {}) {
3433
- const t = Ae();
3434
- if (t == null)
3435
- throw z(W.MUST_BE_CALL_SETUP_TOP);
3436
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
3437
- throw z(W.NOT_INSTALLED);
3438
- const n = ro(t), r = so(n), a = ur(t), s = ao(e, a);
3439
- if (s === "global")
3440
- return cr(r, e, a), r;
3441
- if (s === "parent") {
3442
- let c = oo(n, t, e.__useComponent);
3443
- return c == null && (process.env.NODE_ENV !== "production" && ue(ye(ne.NOT_FOUND_PARENT_SCOPE)), c = r), c;
3444
- }
3445
- const o = n;
3446
- let i = o.__getInstance(t);
3447
- if (i == null) {
3448
- const c = J({}, e);
3449
- "__i18n" in a && (c.__i18n = a.__i18n), r && (c.__root = r), i = Kt(c), o.__composerExtend && (i[kt] = o.__composerExtend(i)), io(o, t, i), o.__setInstance(t, i);
3450
- } else
3451
- process.env.NODE_ENV !== "production" && s === "local" && ue(ye(ne.DUPLICATE_USE_I18N_CALLING));
3452
- return i;
3453
- }
3454
- function no(e, t) {
3455
- const n = Lr(), r = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Mt(e)) : n.run(() => Kt(e));
3456
- if (r == null)
3457
- throw z(W.UNEXPECTED_ERROR);
3458
- return [n, r];
3459
- }
3460
- function ro(e) {
3461
- const t = Ir(e.isCE ? eo : e.appContext.app.__VUE_I18N_SYMBOL__);
3462
- if (!t)
3463
- throw z(e.isCE ? W.NOT_INSTALLED_WITH_PROVIDE : W.UNEXPECTED_ERROR);
3464
- return t;
3465
- }
3466
- function ao(e, t) {
3467
- return et(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
3468
- }
3469
- function so(e) {
3470
- return e.mode === "composition" ? e.global : e.global.__composer;
3471
- }
3472
- function oo(e, t, n = !1) {
3473
- let r = null;
3474
- const a = t.root;
3475
- let s = lo(t, n);
3476
- for (; s != null; ) {
3477
- const o = e;
3478
- if (e.mode === "composition")
3479
- r = o.__getInstance(s);
3480
- else if (__VUE_I18N_LEGACY_API__) {
3481
- const i = o.__getInstance(s);
3482
- i != null && (r = i.__composer, n && r && !r[ir] && (r = null));
3483
- }
3484
- if (r != null || a === s)
3485
- break;
3486
- s = s.parent;
3487
- }
3488
- return r;
3489
- }
3490
- function lo(e, t = !1) {
3491
- return e == null ? null : t && e.vnode.ctx || e.parent;
3492
- }
3493
- function io(e, t, n) {
3494
- let r = null;
3495
- vr(() => {
3496
- if (process.env.NODE_ENV !== "production") {
3497
- t.__VUE_I18N__ = n, r = xt();
3498
- const a = n;
3499
- a[be] && a[be](r), r.on("*", Ye);
3500
- }
3501
- }, t), Cr(() => {
3502
- const a = n;
3503
- process.env.NODE_ENV !== "production" && (r && r.off("*", Ye), a[Be] && a[Be](), delete t.__VUE_I18N__), e.__deleteInstance(t);
3504
- const s = a[kt];
3505
- s && (s(), delete a[kt]);
3506
- }, t);
3507
- }
3508
- const uo = [
3509
- "locale",
3510
- "fallbackLocale",
3511
- "availableLocales"
3512
- ], kn = ["t", "rt", "d", "n", "tm", "te"];
3513
- function co(e, t) {
3514
- const n = /* @__PURE__ */ Object.create(null);
3515
- return uo.forEach((a) => {
3516
- const s = Object.getOwnPropertyDescriptor(t, a);
3517
- if (!s)
3518
- throw z(W.UNEXPECTED_ERROR);
3519
- const o = Or(s.value) ? {
3520
- get() {
3521
- return s.value.value;
3522
- },
3523
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3524
- set(i) {
3525
- s.value.value = i;
3526
- }
3527
- } : {
3528
- get() {
3529
- return s.get && s.get();
3530
- }
3531
- };
3532
- Object.defineProperty(n, a, o);
3533
- }), e.config.globalProperties.$i18n = n, kn.forEach((a) => {
3534
- const s = Object.getOwnPropertyDescriptor(t, a);
3535
- if (!s || !s.value)
3536
- throw z(W.UNEXPECTED_ERROR);
3537
- Object.defineProperty(e.config.globalProperties, `$${a}`, s);
3538
- }), () => {
3539
- delete e.config.globalProperties.$i18n, kn.forEach((a) => {
3540
- delete e.config.globalProperties[`$${a}`];
3541
- });
3542
- };
3543
- }
3544
- const fo = /* @__PURE__ */ wt({
3545
- /* eslint-disable */
3546
- name: "i18n-d",
3547
- props: J({
3548
- value: {
3549
- type: [Number, Date],
3550
- required: !0
3551
- },
3552
- format: {
3553
- type: [String, Object]
3554
- }
3555
- }, Xt),
3556
- /* eslint-enable */
3557
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3558
- setup(e, t) {
3559
- const n = e.i18n || Jt({
3560
- useScope: e.scope,
3561
- __useComponent: !0
3562
- });
3563
- return Er(e, t, nr, (...r) => (
3564
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3565
- n[yt](...r)
3566
- ));
3567
- }
3568
- }), Rn = fo;
3569
- Ds();
3570
- qa(Fa);
3571
- Za(Ka);
3572
- za(jn);
3573
- if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
3574
- const e = he();
3575
- e.__INTLIFY__ = !0, Sa(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
3576
- }
3577
- process.env.NODE_ENV;
3578
- var gr = {
3579
- name: "zh-cn",
3580
- el: {
3581
- breadcrumb: {
3582
- label: "面包屑"
3583
- },
3584
- colorpicker: {
3585
- confirm: "确定",
3586
- clear: "清空",
3587
- defaultLabel: "颜色选择器",
3588
- description: "当前颜色 {color},按 Enter 键选择新颜色",
3589
- alphaLabel: "选择透明度的值",
3590
- alphaDescription: "透明度 {alpha}, 当前颜色 {color}",
3591
- hueLabel: "选择色相值",
3592
- hueDescription: "色相 {hue}, 当前颜色 {color}",
3593
- svLabel: "选择饱和度与明度的值",
3594
- svDescription: "饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",
3595
- predefineDescription: "选择 {value} 作为颜色"
3596
- },
3597
- datepicker: {
3598
- now: "此刻",
3599
- today: "今天",
3600
- cancel: "取消",
3601
- clear: "清空",
3602
- confirm: "确定",
3603
- dateTablePrompt: "使用方向键与 Enter 键可选择日期",
3604
- monthTablePrompt: "使用方向键与 Enter 键可选择月份",
3605
- yearTablePrompt: "使用方向键与 Enter 键可选择年份",
3606
- selectedDate: "已选日期",
3607
- selectDate: "选择日期",
3608
- selectTime: "选择时间",
3609
- startDate: "开始日期",
3610
- startTime: "开始时间",
3611
- endDate: "结束日期",
3612
- endTime: "结束时间",
3613
- prevYear: "前一年",
3614
- nextYear: "后一年",
3615
- prevMonth: "上个月",
3616
- nextMonth: "下个月",
3617
- year: "年",
3618
- month1: "1 月",
3619
- month2: "2 月",
3620
- month3: "3 月",
3621
- month4: "4 月",
3622
- month5: "5 月",
3623
- month6: "6 月",
3624
- month7: "7 月",
3625
- month8: "8 月",
3626
- month9: "9 月",
3627
- month10: "10 月",
3628
- month11: "11 月",
3629
- month12: "12 月",
3630
- weeks: {
3631
- sun: "日",
3632
- mon: "一",
3633
- tue: "二",
3634
- wed: "三",
3635
- thu: "四",
3636
- fri: "五",
3637
- sat: "六"
3638
- },
3639
- weeksFull: {
3640
- sun: "星期日",
3641
- mon: "星期一",
3642
- tue: "星期二",
3643
- wed: "星期三",
3644
- thu: "星期四",
3645
- fri: "星期五",
3646
- sat: "星期六"
3647
- },
3648
- months: {
3649
- jan: "一月",
3650
- feb: "二月",
3651
- mar: "三月",
3652
- apr: "四月",
3653
- may: "五月",
3654
- jun: "六月",
3655
- jul: "七月",
3656
- aug: "八月",
3657
- sep: "九月",
3658
- oct: "十月",
3659
- nov: "十一月",
3660
- dec: "十二月"
3661
- }
3662
- },
3663
- inputNumber: {
3664
- decrease: "减少数值",
3665
- increase: "增加数值"
3666
- },
3667
- select: {
3668
- loading: "加载中",
3669
- noMatch: "无匹配数据",
3670
- noData: "无数据",
3671
- placeholder: "请选择"
3672
- },
3673
- mention: {
3674
- loading: "加载中"
3675
- },
3676
- dropdown: {
3677
- toggleDropdown: "切换下拉选项"
3678
- },
3679
- cascader: {
3680
- noMatch: "无匹配数据",
3681
- loading: "加载中",
3682
- placeholder: "请选择",
3683
- noData: "暂无数据"
3684
- },
3685
- pagination: {
3686
- goto: "前往",
3687
- pagesize: "条/页",
3688
- total: "共 {total} 条",
3689
- pageClassifier: "页",
3690
- page: "页",
3691
- prev: "上一页",
3692
- next: "下一页",
3693
- currentPage: "第 {pager} 页",
3694
- prevPages: "向前 {pager} 页",
3695
- nextPages: "向后 {pager} 页",
3696
- deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
3697
- },
3698
- dialog: {
3699
- close: "关闭此对话框"
3700
- },
3701
- drawer: {
3702
- close: "关闭此对话框"
3703
- },
3704
- messagebox: {
3705
- title: "提示",
3706
- confirm: "确定",
3707
- cancel: "取消",
3708
- error: "输入的数据不合法!",
3709
- close: "关闭此对话框"
3710
- },
3711
- upload: {
3712
- deleteTip: "按 Delete 键可删除",
3713
- delete: "删除",
3714
- preview: "查看图片",
3715
- continue: "继续上传"
3716
- },
3717
- slider: {
3718
- defaultLabel: "滑块介于 {min} 至 {max}",
3719
- defaultRangeStartLabel: "选择起始值",
3720
- defaultRangeEndLabel: "选择结束值"
3721
- },
3722
- table: {
3723
- emptyText: "暂无数据",
3724
- confirmFilter: "筛选",
3725
- resetFilter: "重置",
3726
- clearFilter: "全部",
3727
- sumText: "合计",
3728
- selectAllLabel: "选择所有行",
3729
- selectRowLabel: "选择当前行",
3730
- expandRowLabel: "展开当前行",
3731
- collapseRowLabel: "收起当前行",
3732
- sortLabel: "按 {column} 排序",
3733
- filterLabel: "按 {column} 过滤"
3734
- },
3735
- tag: {
3736
- close: "关闭此标签"
3737
- },
3738
- tour: {
3739
- next: "下一步",
3740
- previous: "上一步",
3741
- finish: "结束导览",
3742
- close: "关闭此对话框"
3743
- },
3744
- tree: {
3745
- emptyText: "暂无数据"
3746
- },
3747
- transfer: {
3748
- noMatch: "无匹配数据",
3749
- noData: "无数据",
3750
- titles: ["列表 1", "列表 2"],
3751
- filterPlaceholder: "请输入搜索内容",
3752
- noCheckedFormat: "共 {total} 项",
3753
- hasCheckedFormat: "已选 {checked}/{total} 项"
3754
- },
3755
- image: {
3756
- error: "加载失败"
3757
- },
3758
- pageHeader: {
3759
- title: "返回"
3760
- },
3761
- popconfirm: {
3762
- confirmButtonText: "确定",
3763
- cancelButtonText: "取消"
3764
- },
3765
- carousel: {
3766
- leftArrow: "上一张幻灯片",
3767
- rightArrow: "下一张幻灯片",
3768
- indicator: "幻灯片切换至索引 {index}"
3769
- }
3770
- }
3771
- };
3772
- var _o = {
3773
- name: "en",
3774
- el: {
3775
- breadcrumb: {
3776
- label: "Breadcrumb"
3777
- },
3778
- colorpicker: {
3779
- confirm: "OK",
3780
- clear: "Clear",
3781
- defaultLabel: "color picker",
3782
- description: "current color is {color}. press enter to select a new color.",
3783
- alphaLabel: "pick alpha value",
3784
- alphaDescription: "alpha {alpha}, current color is {color}",
3785
- hueLabel: "pick hue value",
3786
- hueDescription: "hue {hue}, current color is {color}",
3787
- svLabel: "pick saturation and brightness value",
3788
- svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
3789
- predefineDescription: "select {value} as the color"
3790
- },
3791
- datepicker: {
3792
- now: "Now",
3793
- today: "Today",
3794
- cancel: "Cancel",
3795
- clear: "Clear",
3796
- confirm: "OK",
3797
- dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
3798
- monthTablePrompt: "Use the arrow keys and enter to select the month",
3799
- yearTablePrompt: "Use the arrow keys and enter to select the year",
3800
- selectedDate: "Selected date",
3801
- selectDate: "Select date",
3802
- selectTime: "Select time",
3803
- startDate: "Start Date",
3804
- startTime: "Start Time",
3805
- endDate: "End Date",
3806
- endTime: "End Time",
3807
- prevYear: "Previous Year",
3808
- nextYear: "Next Year",
3809
- prevMonth: "Previous Month",
3810
- nextMonth: "Next Month",
3811
- year: "",
3812
- month1: "January",
3813
- month2: "February",
3814
- month3: "March",
3815
- month4: "April",
3816
- month5: "May",
3817
- month6: "June",
3818
- month7: "July",
3819
- month8: "August",
3820
- month9: "September",
3821
- month10: "October",
3822
- month11: "November",
3823
- month12: "December",
3824
- weeks: {
3825
- sun: "Sun",
3826
- mon: "Mon",
3827
- tue: "Tue",
3828
- wed: "Wed",
3829
- thu: "Thu",
3830
- fri: "Fri",
3831
- sat: "Sat"
3832
- },
3833
- weeksFull: {
3834
- sun: "Sunday",
3835
- mon: "Monday",
3836
- tue: "Tuesday",
3837
- wed: "Wednesday",
3838
- thu: "Thursday",
3839
- fri: "Friday",
3840
- sat: "Saturday"
3841
- },
3842
- months: {
3843
- jan: "Jan",
3844
- feb: "Feb",
3845
- mar: "Mar",
3846
- apr: "Apr",
3847
- may: "May",
3848
- jun: "Jun",
3849
- jul: "Jul",
3850
- aug: "Aug",
3851
- sep: "Sep",
3852
- oct: "Oct",
3853
- nov: "Nov",
3854
- dec: "Dec"
3855
- }
3856
- },
3857
- inputNumber: {
3858
- decrease: "decrease number",
3859
- increase: "increase number"
3860
- },
3861
- select: {
3862
- loading: "Loading",
3863
- noMatch: "No matching data",
3864
- noData: "No data",
3865
- placeholder: "Select"
3866
- },
3867
- mention: {
3868
- loading: "Loading"
3869
- },
3870
- dropdown: {
3871
- toggleDropdown: "Toggle Dropdown"
3872
- },
3873
- cascader: {
3874
- noMatch: "No matching data",
3875
- loading: "Loading",
3876
- placeholder: "Select",
3877
- noData: "No data"
3878
- },
3879
- pagination: {
3880
- goto: "Go to",
3881
- pagesize: "/page",
3882
- total: "Total {total}",
3883
- pageClassifier: "",
3884
- page: "Page",
3885
- prev: "Go to previous page",
3886
- next: "Go to next page",
3887
- currentPage: "page {pager}",
3888
- prevPages: "Previous {pager} pages",
3889
- nextPages: "Next {pager} pages",
3890
- deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
3891
- },
3892
- dialog: {
3893
- close: "Close this dialog"
3894
- },
3895
- drawer: {
3896
- close: "Close this dialog"
3897
- },
3898
- messagebox: {
3899
- title: "Message",
3900
- confirm: "OK",
3901
- cancel: "Cancel",
3902
- error: "Illegal input",
3903
- close: "Close this dialog"
3904
- },
3905
- upload: {
3906
- deleteTip: "press delete to remove",
3907
- delete: "Delete",
3908
- preview: "Preview",
3909
- continue: "Continue"
3910
- },
3911
- slider: {
3912
- defaultLabel: "slider between {min} and {max}",
3913
- defaultRangeStartLabel: "pick start value",
3914
- defaultRangeEndLabel: "pick end value"
3915
- },
3916
- table: {
3917
- emptyText: "No Data",
3918
- confirmFilter: "Confirm",
3919
- resetFilter: "Reset",
3920
- clearFilter: "All",
3921
- sumText: "Sum",
3922
- selectAllLabel: "Select all rows",
3923
- selectRowLabel: "Select this row",
3924
- expandRowLabel: "Expand this row",
3925
- collapseRowLabel: "Collapse this row",
3926
- sortLabel: "Sort by {column}",
3927
- filterLabel: "Filter by {column}"
3928
- },
3929
- tag: {
3930
- close: "Close this tag"
3931
- },
3932
- tour: {
3933
- next: "Next",
3934
- previous: "Previous",
3935
- finish: "Finish",
3936
- close: "Close this dialog"
3937
- },
3938
- tree: {
3939
- emptyText: "No Data"
3940
- },
3941
- transfer: {
3942
- noMatch: "No matching data",
3943
- noData: "No data",
3944
- titles: ["List 1", "List 2"],
3945
- filterPlaceholder: "Enter keyword",
3946
- noCheckedFormat: "{total} items",
3947
- hasCheckedFormat: "{checked}/{total} checked"
3948
- },
3949
- image: {
3950
- error: "FAILED"
3951
- },
3952
- pageHeader: {
3953
- title: "Back"
3954
- },
3955
- popconfirm: {
3956
- confirmButtonText: "Yes",
3957
- cancelButtonText: "No"
3958
- },
3959
- carousel: {
3960
- leftArrow: "Carousel arrow left",
3961
- rightArrow: "Carousel arrow right",
3962
- indicator: "Carousel switch to index {index}"
3963
- }
3964
- }
3965
- };
3966
- const Oe = {
3967
- zhCn: "zh-cn",
3968
- en: "en"
3969
- }, mo = {
3970
- [Oe.zhCn]: gr,
3971
- [Oe.en]: _o
3972
- }, pr = () => (navigator?.language || navigator?.userLanguage)?.startsWith("zh") ? Oe.zhCn : Oe.en, To = () => {
3973
- const e = pr() || Oe.en;
3974
- return mo[e] || gr;
3975
- }, bo = (e = {}, t = !1) => {
3976
- const n = t ? Oe.zhCn : pr();
3977
- yr.set("lang", n);
3978
- const r = to({
3979
- legacy: !1,
3980
- locale: n,
3981
- fallbackLocale: Oe.zhCn,
3982
- messages: e,
3983
- globalInjection: !0
3984
- });
3985
- return go(!t), r;
3986
- }, Oo = (e) => (t, n = {}) => e.global.t(t, n), Nr = () => {
3987
- setTimeout(async () => {
3988
- Sr.confirm(
3989
- "语言设置已更新<br/>是否重新加载页面以应用新的语言设置",
3990
- "重新加载提醒",
3991
- {
3992
- confirmButtonText: "确定",
3993
- cancelButtonText: "取消",
3994
- type: "warning",
3995
- dangerouslyUseHTMLString: !0,
3996
- customClass: "language-change-confirm"
3997
- }
3998
- ).then(() => {
3999
- window.location.reload();
4000
- });
4001
- }, 0);
4002
- }, Eo = (e = !0) => {
4003
- e && window.addEventListener("languagechange", Nr);
4004
- }, go = (e) => {
4005
- Eo(e);
4006
- }, Io = () => {
4007
- window.removeEventListener("languagechange", Nr);
4008
- }, po = () => {
4009
- const { t: e } = Fr().appContext.config.globalProperties;
4010
- return {
4011
- t: e
4012
- };
4013
- }, vo = (e) => {
4014
- const { t } = po();
4015
- return t(e);
4016
- };
4017
- export {
4018
- mo as a,
4019
- To as b,
4020
- bo as c,
4021
- Oo as d,
4022
- Io as e,
4023
- vo as f,
4024
- pr as g,
4025
- Oe as l,
4026
- Eo as s,
4027
- po as u
4028
- };