gc_i18n 1.1.10 → 1.2.1
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.
- package/lib/gc_i18n.css +1 -1
- package/lib/gc_i18n.js +1343 -1397
- package/lib/gc_i18n.umd.cjs +10 -10
- package/package.json +1 -1
- package/packages/components/config.vue +31 -77
- package/packages/index.js +0 -1
- package/src/router/index.js +0 -5
- package/vite.config.js +6 -2
- package/packages/libs/http.js +0 -64
- package/src/view/test.vue +0 -7
package/lib/gc_i18n.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import './gc_i18n.css';
|
|
2
|
-
import
|
|
3
|
-
import cn, { Message as
|
|
2
|
+
import ka from "keyboardjs";
|
|
3
|
+
import cn, { Message as tt, Tooltip as un } from "view-ui-plus";
|
|
4
4
|
import "view-ui-plus/dist/styles/viewuiplus.css";
|
|
5
|
-
import { defineComponent as Bt, h as jn, getCurrentInstance as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { jws as
|
|
5
|
+
import { defineComponent as Bt, h as jn, getCurrentInstance as Ke, effectScope as Pa, inject as Ra, onMounted as Ma, onUnmounted as Fa, Fragment as Xn, ref as wa, shallowRef as Ua, computed as xe, watch as Rt, isRef as Va, createVNode as q, Text as $a, createTextVNode as He, resolveComponent as oe, createBlock as Ge, openBlock as De, withCtx as be, createElementBlock as Wa, createCommentVNode as xa, createElementVNode as ke, toDisplayString as Ga, createApp as Ya } from "vue";
|
|
6
|
+
import B from "lodash-es";
|
|
7
|
+
import lt from "axios";
|
|
8
|
+
import Oe from "store2";
|
|
9
|
+
import { jws as Ha } from "jsrsasign";
|
|
10
10
|
/*!
|
|
11
11
|
* shared v11.1.3
|
|
12
12
|
* (c) 2025 kazuya kawaguchi
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
16
|
-
let ne,
|
|
15
|
+
const ie = typeof window < "u";
|
|
16
|
+
let ne, ve;
|
|
17
17
|
if (process.env.NODE_ENV !== "production") {
|
|
18
|
-
const e =
|
|
18
|
+
const e = ie && window.performance;
|
|
19
19
|
e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
|
|
20
20
|
e.clearMeasures && (ne = (t) => {
|
|
21
21
|
e.mark(t);
|
|
22
|
-
},
|
|
23
|
-
e.measure(t, n,
|
|
22
|
+
}, ve = (t, n, a) => {
|
|
23
|
+
e.measure(t, n, a), e.clearMarks(n), e.clearMarks(a);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(
|
|
26
|
+
const Ka = /\{([0-9a-zA-Z]+)\}/g;
|
|
27
|
+
function it(e, ...t) {
|
|
28
|
+
return t.length === 1 && M(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Ka, (n, a) => t.hasOwnProperty(a) ? t[a] : "");
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
let
|
|
32
|
-
const
|
|
33
|
-
function
|
|
30
|
+
const fe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Ba = (e, t, n) => ja({ l: e, k: t, s: n }), ja = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), Xa = (e) => jt(e) === "[object Date]", Me = (e) => jt(e) === "[object RegExp]", ct = (e) => R(e) && Object.keys(e).length === 0, Q = Object.assign, Ja = Object.create, $ = (e = null) => Ja(e);
|
|
31
|
+
let fn;
|
|
32
|
+
const Ie = () => fn || (fn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : $());
|
|
33
|
+
function _n(e) {
|
|
34
34
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
function
|
|
38
|
-
return
|
|
36
|
+
const Qa = Object.prototype.hasOwnProperty;
|
|
37
|
+
function le(e, t) {
|
|
38
|
+
return Qa.call(e, t);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const K = Array.isArray, W = (e) => typeof e == "function", I = (e) => typeof e == "string", F = (e) => typeof e == "boolean", M = (e) => e !== null && typeof e == "object", qa = (e) => M(e) && W(e.then) && W(e.catch), Jn = Object.prototype.toString, jt = (e) => Jn.call(e), R = (e) => jt(e) === "[object Object]", Za = (e) => e == null ? "" : K(e) || R(e) && e.toString === Jn ? JSON.stringify(e, null, 2) : String(e);
|
|
41
41
|
function Xt(e, t = "") {
|
|
42
|
-
return e.reduce((n,
|
|
42
|
+
return e.reduce((n, a, s) => s === 0 ? n + a : n + t + a, "");
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
let
|
|
44
|
+
const mn = 2;
|
|
45
|
+
function za(e, t = 0, n = e.length) {
|
|
46
|
+
const a = e.split(/\r?\n/);
|
|
47
|
+
let s = 0;
|
|
48
48
|
const r = [];
|
|
49
|
-
for (let o = 0; o <
|
|
50
|
-
if (
|
|
51
|
-
for (let l = o -
|
|
52
|
-
if (l < 0 || l >=
|
|
49
|
+
for (let o = 0; o < a.length; o++)
|
|
50
|
+
if (s += a[o].length + 1, s >= t) {
|
|
51
|
+
for (let l = o - mn; l <= o + mn || n > s; l++) {
|
|
52
|
+
if (l < 0 || l >= a.length)
|
|
53
53
|
continue;
|
|
54
54
|
const c = l + 1;
|
|
55
|
-
r.push(`${c}${" ".repeat(3 - String(c).length)}| ${
|
|
56
|
-
const _ =
|
|
55
|
+
r.push(`${c}${" ".repeat(3 - String(c).length)}| ${a[l]}`);
|
|
56
|
+
const _ = a[l].length;
|
|
57
57
|
if (l === o) {
|
|
58
|
-
const T = t - (
|
|
58
|
+
const T = t - (s - _) + 1, h = Math.max(1, n > s ? _ - T : n - t);
|
|
59
59
|
r.push(" | " + " ".repeat(T) + "^".repeat(h));
|
|
60
60
|
} else if (l > o) {
|
|
61
|
-
if (n >
|
|
62
|
-
const T = Math.max(Math.min(n -
|
|
61
|
+
if (n > s) {
|
|
62
|
+
const T = Math.max(Math.min(n - s, _), 1);
|
|
63
63
|
r.push(" | " + "^".repeat(T));
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
s += _ + 1;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
break;
|
|
@@ -70,39 +70,39 @@ function zs(e, t = 0, n = e.length) {
|
|
|
70
70
|
return r.join(`
|
|
71
71
|
`);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ee(e, t) {
|
|
74
74
|
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const dn = {};
|
|
77
77
|
function Jt(e) {
|
|
78
|
-
|
|
78
|
+
dn[e] || (dn[e] = !0, Ee(e));
|
|
79
79
|
}
|
|
80
80
|
function Qt() {
|
|
81
81
|
const e = /* @__PURE__ */ new Map();
|
|
82
82
|
return {
|
|
83
83
|
events: e,
|
|
84
|
-
on(n,
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
on(n, a) {
|
|
85
|
+
const s = e.get(n);
|
|
86
|
+
s && s.push(a) || e.set(n, [a]);
|
|
87
87
|
},
|
|
88
|
-
off(n,
|
|
89
|
-
const
|
|
90
|
-
|
|
88
|
+
off(n, a) {
|
|
89
|
+
const s = e.get(n);
|
|
90
|
+
s && s.splice(s.indexOf(a) >>> 0, 1);
|
|
91
91
|
},
|
|
92
|
-
emit(n,
|
|
93
|
-
(e.get(n) || []).slice().map((
|
|
92
|
+
emit(n, a) {
|
|
93
|
+
(e.get(n) || []).slice().map((s) => s(a)), (e.get("*") || []).slice().map((s) => s(n, a));
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
const nt = (e) => !M(e) ||
|
|
97
|
+
const nt = (e) => !M(e) || K(e);
|
|
98
98
|
function rt(e, t) {
|
|
99
99
|
if (nt(e) || nt(t))
|
|
100
100
|
throw new Error("Invalid value");
|
|
101
101
|
const n = [{ src: e, des: t }];
|
|
102
102
|
for (; n.length; ) {
|
|
103
|
-
const { src:
|
|
104
|
-
Object.keys(
|
|
105
|
-
r !== "__proto__" && (M(
|
|
103
|
+
const { src: a, des: s } = n.pop();
|
|
104
|
+
Object.keys(a).forEach((r) => {
|
|
105
|
+
r !== "__proto__" && (M(a[r]) && !M(s[r]) && (s[r] = Array.isArray(a[r]) ? [] : $()), nt(s[r]) || nt(a[r]) ? s[r] = a[r] : n.push({ src: a[r], des: s[r] }));
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -111,7 +111,7 @@ function rt(e, t) {
|
|
|
111
111
|
* (c) 2025 kazuya kawaguchi
|
|
112
112
|
* Released under the MIT License.
|
|
113
113
|
*/
|
|
114
|
-
function
|
|
114
|
+
function es(e, t, n) {
|
|
115
115
|
return { line: e, column: t, offset: n };
|
|
116
116
|
}
|
|
117
117
|
function Mt(e, t, n) {
|
|
@@ -138,7 +138,7 @@ const k = {
|
|
|
138
138
|
UNHANDLED_CODEGEN_NODE_TYPE: 15,
|
|
139
139
|
// minifier error codes
|
|
140
140
|
UNHANDLED_MINIFIER_NODE_TYPE: 16
|
|
141
|
-
},
|
|
141
|
+
}, ts = 17, ns = {
|
|
142
142
|
// tokenizer error messages
|
|
143
143
|
[k.EXPECTED_TOKEN]: "Expected token: '{0}'",
|
|
144
144
|
[k.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
|
|
@@ -160,29 +160,29 @@ const k = {
|
|
|
160
160
|
// minimizer error messages
|
|
161
161
|
[k.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
162
162
|
};
|
|
163
|
-
function
|
|
164
|
-
const { domain:
|
|
165
|
-
return l.code = e, t && (l.location = t), l.domain =
|
|
163
|
+
function we(e, t, n = {}) {
|
|
164
|
+
const { domain: a, messages: s, args: r } = n, o = process.env.NODE_ENV !== "production" ? it((s || ns)[e] || "", ...r || []) : e, l = new SyntaxError(String(o));
|
|
165
|
+
return l.code = e, t && (l.location = t), l.domain = a, l;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function as(e) {
|
|
168
168
|
throw e;
|
|
169
169
|
}
|
|
170
|
-
const
|
|
171
|
-
`,
|
|
172
|
-
function
|
|
170
|
+
const ss = /<\/?[\w\s="/.':;#-\/]+>/, rs = (e) => ss.test(e), me = " ", os = "\r", z = `
|
|
171
|
+
`, ls = "\u2028", is = "\u2029";
|
|
172
|
+
function cs(e) {
|
|
173
173
|
const t = e;
|
|
174
|
-
let n = 0,
|
|
175
|
-
const o = (p) => t[p] ===
|
|
174
|
+
let n = 0, a = 1, s = 1, r = 0;
|
|
175
|
+
const o = (p) => t[p] === os && t[p + 1] === z, l = (p) => t[p] === z, c = (p) => t[p] === is, _ = (p) => t[p] === ls, T = (p) => o(p) || l(p) || c(p) || _(p), h = () => n, E = () => a, A = () => s, C = () => r, y = (p) => o(p) || c(p) || _(p) ? z : t[p], S = () => y(n), f = () => y(n + r);
|
|
176
176
|
function d() {
|
|
177
|
-
return r = 0, T(n) && (
|
|
177
|
+
return r = 0, T(n) && (a++, s = 0), o(n) && n++, n++, s++, t[n];
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function b() {
|
|
180
180
|
return o(n + r) && r++, r++, t[n + r];
|
|
181
181
|
}
|
|
182
182
|
function g() {
|
|
183
|
-
n = 0,
|
|
183
|
+
n = 0, a = 1, s = 1, r = 0;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function O(p = 0) {
|
|
186
186
|
r = p;
|
|
187
187
|
}
|
|
188
188
|
function v() {
|
|
@@ -194,21 +194,21 @@ function ca(e) {
|
|
|
194
194
|
return {
|
|
195
195
|
index: h,
|
|
196
196
|
line: E,
|
|
197
|
-
column:
|
|
197
|
+
column: A,
|
|
198
198
|
peekOffset: C,
|
|
199
199
|
charAt: y,
|
|
200
|
-
currentChar:
|
|
200
|
+
currentChar: S,
|
|
201
201
|
currentPeek: f,
|
|
202
202
|
next: d,
|
|
203
|
-
peek:
|
|
203
|
+
peek: b,
|
|
204
204
|
reset: g,
|
|
205
|
-
resetPeek:
|
|
205
|
+
resetPeek: O,
|
|
206
206
|
skipToPeek: v
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
const
|
|
210
|
-
function
|
|
211
|
-
const n = t.location !== !1,
|
|
209
|
+
const ge = void 0, us = ".", gn = "'", fs = "tokenizer";
|
|
210
|
+
function _s(e, t = {}) {
|
|
211
|
+
const n = t.location !== !1, a = cs(e), s = () => a.index(), r = () => es(a.line(), a.column(), a.index()), o = r(), l = s(), c = {
|
|
212
212
|
currentType: 13,
|
|
213
213
|
offset: l,
|
|
214
214
|
startLoc: o,
|
|
@@ -222,10 +222,10 @@ function _a(e, t = {}) {
|
|
|
222
222
|
text: ""
|
|
223
223
|
}, _ = () => c, { onError: T } = t;
|
|
224
224
|
function h(i, u, N, ...D) {
|
|
225
|
-
const
|
|
225
|
+
const G = _();
|
|
226
226
|
if (u.column += N, u.offset += N, T) {
|
|
227
|
-
const Y = n ? Mt(
|
|
228
|
-
domain:
|
|
227
|
+
const Y = n ? Mt(G.startLoc, u) : null, w = we(i, Y, {
|
|
228
|
+
domain: fs,
|
|
229
229
|
args: D
|
|
230
230
|
});
|
|
231
231
|
T(w);
|
|
@@ -236,7 +236,7 @@ function _a(e, t = {}) {
|
|
|
236
236
|
const D = { type: u };
|
|
237
237
|
return n && (D.loc = Mt(i.startLoc, i.endLoc)), N != null && (D.value = N), D;
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const A = (i) => E(
|
|
240
240
|
i,
|
|
241
241
|
13
|
|
242
242
|
/* TokenTypes.EOF */
|
|
@@ -246,16 +246,16 @@ function _a(e, t = {}) {
|
|
|
246
246
|
}
|
|
247
247
|
function y(i) {
|
|
248
248
|
let u = "";
|
|
249
|
-
for (; i.currentPeek() ===
|
|
249
|
+
for (; i.currentPeek() === me || i.currentPeek() === z; )
|
|
250
250
|
u += i.currentPeek(), i.peek();
|
|
251
251
|
return u;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function S(i) {
|
|
254
254
|
const u = y(i);
|
|
255
255
|
return i.skipToPeek(), u;
|
|
256
256
|
}
|
|
257
257
|
function f(i) {
|
|
258
|
-
if (i ===
|
|
258
|
+
if (i === ge)
|
|
259
259
|
return !1;
|
|
260
260
|
const u = i.charCodeAt(0);
|
|
261
261
|
return u >= 97 && u <= 122 || // a-z
|
|
@@ -263,12 +263,12 @@ function _a(e, t = {}) {
|
|
|
263
263
|
u === 95;
|
|
264
264
|
}
|
|
265
265
|
function d(i) {
|
|
266
|
-
if (i ===
|
|
266
|
+
if (i === ge)
|
|
267
267
|
return !1;
|
|
268
268
|
const u = i.charCodeAt(0);
|
|
269
269
|
return u >= 48 && u <= 57;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function b(i, u) {
|
|
272
272
|
const { currentType: N } = u;
|
|
273
273
|
if (N !== 2)
|
|
274
274
|
return !1;
|
|
@@ -281,15 +281,15 @@ function _a(e, t = {}) {
|
|
|
281
281
|
if (N !== 2)
|
|
282
282
|
return !1;
|
|
283
283
|
y(i);
|
|
284
|
-
const D = i.currentPeek() === "-" ? i.peek() : i.currentPeek(),
|
|
285
|
-
return i.resetPeek(),
|
|
284
|
+
const D = i.currentPeek() === "-" ? i.peek() : i.currentPeek(), G = d(D);
|
|
285
|
+
return i.resetPeek(), G;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function O(i, u) {
|
|
288
288
|
const { currentType: N } = u;
|
|
289
289
|
if (N !== 2)
|
|
290
290
|
return !1;
|
|
291
291
|
y(i);
|
|
292
|
-
const D = i.currentPeek() ===
|
|
292
|
+
const D = i.currentPeek() === gn;
|
|
293
293
|
return i.resetPeek(), D;
|
|
294
294
|
}
|
|
295
295
|
function v(i, u) {
|
|
@@ -322,27 +322,27 @@ function _a(e, t = {}) {
|
|
|
322
322
|
return !1;
|
|
323
323
|
const D = () => {
|
|
324
324
|
const Y = i.currentPeek();
|
|
325
|
-
return Y === "{" ? f(i.peek()) : Y === "@" || Y === "|" || Y === ":" || Y === "." || Y ===
|
|
326
|
-
},
|
|
327
|
-
return i.resetPeek(),
|
|
325
|
+
return Y === "{" ? f(i.peek()) : Y === "@" || Y === "|" || Y === ":" || Y === "." || Y === me || !Y ? !1 : Y === z ? (i.peek(), D()) : re(i, !1);
|
|
326
|
+
}, G = D();
|
|
327
|
+
return i.resetPeek(), G;
|
|
328
328
|
}
|
|
329
329
|
function X(i) {
|
|
330
330
|
y(i);
|
|
331
331
|
const u = i.currentPeek() === "|";
|
|
332
332
|
return i.resetPeek(), u;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
const N = (
|
|
334
|
+
function re(i, u = !0) {
|
|
335
|
+
const N = (G = !1, Y = "") => {
|
|
336
336
|
const w = i.currentPeek();
|
|
337
|
-
return w === "{" || w === "@" || !w ?
|
|
337
|
+
return w === "{" || w === "@" || !w ? G : w === "|" ? !(Y === me || Y === z) : w === me ? (i.peek(), N(!0, me)) : w === z ? (i.peek(), N(!0, z)) : !0;
|
|
338
338
|
}, D = N();
|
|
339
339
|
return u && i.resetPeek(), D;
|
|
340
340
|
}
|
|
341
341
|
function J(i, u) {
|
|
342
342
|
const N = i.currentChar();
|
|
343
|
-
return N ===
|
|
343
|
+
return N === ge ? ge : u(N) ? (i.next(), N) : null;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Se(i) {
|
|
346
346
|
const u = i.charCodeAt(0);
|
|
347
347
|
return u >= 97 && u <= 122 || // a-z
|
|
348
348
|
u >= 65 && u <= 90 || // A-Z
|
|
@@ -350,10 +350,10 @@ function _a(e, t = {}) {
|
|
|
350
350
|
u === 95 || // _
|
|
351
351
|
u === 36;
|
|
352
352
|
}
|
|
353
|
-
function _t(i) {
|
|
354
|
-
return J(i, Pe);
|
|
355
|
-
}
|
|
356
353
|
function mt(i) {
|
|
354
|
+
return J(i, Se);
|
|
355
|
+
}
|
|
356
|
+
function dt(i) {
|
|
357
357
|
const u = i.charCodeAt(0);
|
|
358
358
|
return u >= 97 && u <= 122 || // a-z
|
|
359
359
|
u >= 65 && u <= 90 || // A-Z
|
|
@@ -362,39 +362,39 @@ function _a(e, t = {}) {
|
|
|
362
362
|
u === 36 || // $
|
|
363
363
|
u === 45;
|
|
364
364
|
}
|
|
365
|
-
function dt(i) {
|
|
366
|
-
return J(i, mt);
|
|
367
|
-
}
|
|
368
365
|
function gt(i) {
|
|
369
|
-
|
|
370
|
-
return u >= 48 && u <= 57;
|
|
366
|
+
return J(i, dt);
|
|
371
367
|
}
|
|
372
368
|
function Et(i) {
|
|
373
|
-
|
|
369
|
+
const u = i.charCodeAt(0);
|
|
370
|
+
return u >= 48 && u <= 57;
|
|
374
371
|
}
|
|
375
372
|
function pt(i) {
|
|
373
|
+
return J(i, Et);
|
|
374
|
+
}
|
|
375
|
+
function ht(i) {
|
|
376
376
|
const u = i.charCodeAt(0);
|
|
377
377
|
return u >= 48 && u <= 57 || // 0-9
|
|
378
378
|
u >= 65 && u <= 70 || // A-F
|
|
379
379
|
u >= 97 && u <= 102;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
return J(i,
|
|
381
|
+
function _e(i) {
|
|
382
|
+
return J(i, ht);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Ue(i) {
|
|
385
385
|
let u = "", N = "";
|
|
386
|
-
for (; u =
|
|
386
|
+
for (; u = pt(i); )
|
|
387
387
|
N += u;
|
|
388
388
|
return N;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Nt(i) {
|
|
391
391
|
let u = "";
|
|
392
392
|
for (; ; ) {
|
|
393
393
|
const N = i.currentChar();
|
|
394
394
|
if (N === "{" || N === "}" || N === "@" || N === "|" || !N)
|
|
395
395
|
break;
|
|
396
|
-
if (N ===
|
|
397
|
-
if (
|
|
396
|
+
if (N === me || N === z)
|
|
397
|
+
if (re(i))
|
|
398
398
|
u += N, i.next();
|
|
399
399
|
else {
|
|
400
400
|
if (X(i))
|
|
@@ -406,28 +406,28 @@ function _a(e, t = {}) {
|
|
|
406
406
|
}
|
|
407
407
|
return u;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
|
|
409
|
+
function Tt(i) {
|
|
410
|
+
S(i);
|
|
411
411
|
let u = "", N = "";
|
|
412
|
-
for (; u =
|
|
412
|
+
for (; u = gt(i); )
|
|
413
413
|
N += u;
|
|
414
|
-
return i.currentChar() ===
|
|
414
|
+
return i.currentChar() === ge && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), N;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
416
|
+
function Lt(i) {
|
|
417
|
+
S(i);
|
|
418
418
|
let u = "";
|
|
419
|
-
return i.currentChar() === "-" ? (i.next(), u += `-${
|
|
419
|
+
return i.currentChar() === "-" ? (i.next(), u += `-${Ue(i)}`) : u += Ue(i), i.currentChar() === ge && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), u;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
return i !==
|
|
421
|
+
function bt(i) {
|
|
422
|
+
return i !== gn && i !== z;
|
|
423
423
|
}
|
|
424
424
|
function on(i) {
|
|
425
|
-
|
|
425
|
+
S(i), C(i, "'");
|
|
426
426
|
let u = "", N = "";
|
|
427
|
-
for (; u = J(i,
|
|
427
|
+
for (; u = J(i, bt); )
|
|
428
428
|
u === "\\" ? N += Ot(i) : N += u;
|
|
429
429
|
const D = i.currentChar();
|
|
430
|
-
return D ===
|
|
430
|
+
return D === z || D === ge ? (h(k.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), D === z && (i.next(), C(i, "'")), N) : (C(i, "'"), N);
|
|
431
431
|
}
|
|
432
432
|
function Ot(i) {
|
|
433
433
|
const u = i.currentChar();
|
|
@@ -436,18 +436,18 @@ function _a(e, t = {}) {
|
|
|
436
436
|
case "'":
|
|
437
437
|
return i.next(), `\\${u}`;
|
|
438
438
|
case "u":
|
|
439
|
-
return
|
|
439
|
+
return ze(i, u, 4);
|
|
440
440
|
case "U":
|
|
441
|
-
return
|
|
441
|
+
return ze(i, u, 6);
|
|
442
442
|
default:
|
|
443
443
|
return h(k.UNKNOWN_ESCAPE_SEQUENCE, r(), 0, u), "";
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function ze(i, u, N) {
|
|
447
447
|
C(i, u);
|
|
448
448
|
let D = "";
|
|
449
|
-
for (let
|
|
450
|
-
const Y =
|
|
449
|
+
for (let G = 0; G < N; G++) {
|
|
450
|
+
const Y = _e(i);
|
|
451
451
|
if (!Y) {
|
|
452
452
|
h(k.INVALID_UNICODE_ESCAPE_SEQUENCE, r(), 0, `\\${u}${D}${i.currentChar()}`);
|
|
453
453
|
break;
|
|
@@ -456,37 +456,37 @@ function _a(e, t = {}) {
|
|
|
456
456
|
}
|
|
457
457
|
return `\\${u}${D}`;
|
|
458
458
|
}
|
|
459
|
-
function bt(i) {
|
|
460
|
-
return i !== "{" && i !== "}" && i !== de && i !== Z;
|
|
461
|
-
}
|
|
462
459
|
function It(i) {
|
|
463
|
-
|
|
460
|
+
return i !== "{" && i !== "}" && i !== me && i !== z;
|
|
461
|
+
}
|
|
462
|
+
function vt(i) {
|
|
463
|
+
S(i);
|
|
464
464
|
let u = "", N = "";
|
|
465
|
-
for (; u = J(i,
|
|
465
|
+
for (; u = J(i, It); )
|
|
466
466
|
N += u;
|
|
467
467
|
return N;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function yt(i) {
|
|
470
470
|
let u = "", N = "";
|
|
471
|
-
for (; u =
|
|
471
|
+
for (; u = mt(i); )
|
|
472
472
|
N += u;
|
|
473
473
|
return N;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function At(i) {
|
|
476
476
|
const u = (N) => {
|
|
477
477
|
const D = i.currentChar();
|
|
478
|
-
return D === "{" || D === "@" || D === "|" || D === "(" || D === ")" || !D || D ===
|
|
478
|
+
return D === "{" || D === "@" || D === "|" || D === "(" || D === ")" || !D || D === me ? N : (N += D, i.next(), u(N));
|
|
479
479
|
};
|
|
480
480
|
return u("");
|
|
481
481
|
}
|
|
482
|
-
function
|
|
483
|
-
|
|
482
|
+
function Ve(i) {
|
|
483
|
+
S(i);
|
|
484
484
|
const u = C(
|
|
485
485
|
i,
|
|
486
486
|
"|"
|
|
487
487
|
/* TokenChars.Pipe */
|
|
488
488
|
);
|
|
489
|
-
return
|
|
489
|
+
return S(i), u;
|
|
490
490
|
}
|
|
491
491
|
function $e(i, u) {
|
|
492
492
|
let N = null;
|
|
@@ -497,40 +497,40 @@ function _a(e, t = {}) {
|
|
|
497
497
|
2,
|
|
498
498
|
"{"
|
|
499
499
|
/* TokenChars.BraceLeft */
|
|
500
|
-
),
|
|
500
|
+
), S(i), u.braceNest++, N;
|
|
501
501
|
case "}":
|
|
502
502
|
return u.braceNest > 0 && u.currentType === 2 && h(k.EMPTY_PLACEHOLDER, r(), 0), i.next(), N = E(
|
|
503
503
|
u,
|
|
504
504
|
3,
|
|
505
505
|
"}"
|
|
506
506
|
/* TokenChars.BraceRight */
|
|
507
|
-
), u.braceNest--, u.braceNest > 0 &&
|
|
507
|
+
), u.braceNest--, u.braceNest > 0 && S(i), u.inLinked && u.braceNest === 0 && (u.inLinked = !1), N;
|
|
508
508
|
case "@":
|
|
509
|
-
return u.braceNest > 0 && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), N =
|
|
509
|
+
return u.braceNest > 0 && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), N = Ne(i, u) || A(u), u.braceNest = 0, N;
|
|
510
510
|
default: {
|
|
511
|
-
let
|
|
511
|
+
let G = !0, Y = !0, w = !0;
|
|
512
512
|
if (X(i))
|
|
513
|
-
return u.braceNest > 0 && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), N = E(u, 1,
|
|
513
|
+
return u.braceNest > 0 && h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), N = E(u, 1, Ve(i)), u.braceNest = 0, u.inLinked = !1, N;
|
|
514
514
|
if (u.braceNest > 0 && (u.currentType === 4 || u.currentType === 5 || u.currentType === 6))
|
|
515
|
-
return h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), u.braceNest = 0,
|
|
516
|
-
if (
|
|
517
|
-
return N = E(u, 4,
|
|
515
|
+
return h(k.UNTERMINATED_CLOSING_BRACE, r(), 0), u.braceNest = 0, We(i, u);
|
|
516
|
+
if (G = b(i, u))
|
|
517
|
+
return N = E(u, 4, Tt(i)), S(i), N;
|
|
518
518
|
if (Y = g(i, u))
|
|
519
|
-
return N = E(u, 5,
|
|
520
|
-
if (w =
|
|
521
|
-
return N = E(u, 6, on(i)),
|
|
522
|
-
if (!
|
|
523
|
-
return N = E(u, 12,
|
|
519
|
+
return N = E(u, 5, Lt(i)), S(i), N;
|
|
520
|
+
if (w = O(i, u))
|
|
521
|
+
return N = E(u, 6, on(i)), S(i), N;
|
|
522
|
+
if (!G && !Y && !w)
|
|
523
|
+
return N = E(u, 12, vt(i)), h(k.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, N.value), S(i), N;
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
return N;
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Ne(i, u) {
|
|
530
530
|
const { currentType: N } = u;
|
|
531
531
|
let D = null;
|
|
532
|
-
const
|
|
533
|
-
switch ((N === 7 || N === 8 || N === 11 || N === 9) && (
|
|
532
|
+
const G = i.currentChar();
|
|
533
|
+
switch ((N === 7 || N === 8 || N === 11 || N === 9) && (G === z || G === me) && h(k.INVALID_LINKED_FORMAT, r(), 0), G) {
|
|
534
534
|
case "@":
|
|
535
535
|
return i.next(), D = E(
|
|
536
536
|
u,
|
|
@@ -539,35 +539,35 @@ function _a(e, t = {}) {
|
|
|
539
539
|
/* TokenChars.LinkedAlias */
|
|
540
540
|
), u.inLinked = !0, D;
|
|
541
541
|
case ".":
|
|
542
|
-
return
|
|
542
|
+
return S(i), i.next(), E(
|
|
543
543
|
u,
|
|
544
544
|
8,
|
|
545
545
|
"."
|
|
546
546
|
/* TokenChars.LinkedDot */
|
|
547
547
|
);
|
|
548
548
|
case ":":
|
|
549
|
-
return
|
|
549
|
+
return S(i), i.next(), E(
|
|
550
550
|
u,
|
|
551
551
|
9,
|
|
552
552
|
":"
|
|
553
553
|
/* TokenChars.LinkedDelimiter */
|
|
554
554
|
);
|
|
555
555
|
default:
|
|
556
|
-
return X(i) ? (D = E(u, 1,
|
|
556
|
+
return X(i) ? (D = E(u, 1, Ve(i)), u.braceNest = 0, u.inLinked = !1, D) : v(i, u) || P(i, u) ? (S(i), Ne(i, u)) : p(i, u) ? (S(i), E(u, 11, yt(i))) : U(i, u) ? (S(i), G === "{" ? $e(i, u) || D : E(u, 10, At(i))) : (N === 7 && h(k.INVALID_LINKED_FORMAT, r(), 0), u.braceNest = 0, u.inLinked = !1, We(i, u));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function We(i, u) {
|
|
560
560
|
let N = {
|
|
561
561
|
type: 13
|
|
562
562
|
/* TokenTypes.EOF */
|
|
563
563
|
};
|
|
564
564
|
if (u.braceNest > 0)
|
|
565
|
-
return $e(i, u) ||
|
|
565
|
+
return $e(i, u) || A(u);
|
|
566
566
|
if (u.inLinked)
|
|
567
|
-
return
|
|
567
|
+
return Ne(i, u) || A(u);
|
|
568
568
|
switch (i.currentChar()) {
|
|
569
569
|
case "{":
|
|
570
|
-
return $e(i, u) ||
|
|
570
|
+
return $e(i, u) || A(u);
|
|
571
571
|
case "}":
|
|
572
572
|
return h(k.UNBALANCED_CLOSING_BRACE, r(), 0), i.next(), E(
|
|
573
573
|
u,
|
|
@@ -576,12 +576,12 @@ function _a(e, t = {}) {
|
|
|
576
576
|
/* TokenChars.BraceRight */
|
|
577
577
|
);
|
|
578
578
|
case "@":
|
|
579
|
-
return
|
|
579
|
+
return Ne(i, u) || A(u);
|
|
580
580
|
default: {
|
|
581
581
|
if (X(i))
|
|
582
|
-
return N = E(u, 1,
|
|
583
|
-
if (
|
|
584
|
-
return E(u, 0,
|
|
582
|
+
return N = E(u, 1, Ve(i)), u.braceNest = 0, u.inLinked = !1, N;
|
|
583
|
+
if (re(i))
|
|
584
|
+
return E(u, 0, Nt(i));
|
|
585
585
|
break;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
@@ -589,21 +589,21 @@ function _a(e, t = {}) {
|
|
|
589
589
|
}
|
|
590
590
|
function St() {
|
|
591
591
|
const { currentType: i, offset: u, startLoc: N, endLoc: D } = c;
|
|
592
|
-
return c.lastType = i, c.lastOffset = u, c.lastStartLoc = N, c.lastEndLoc = D, c.offset =
|
|
592
|
+
return c.lastType = i, c.lastOffset = u, c.lastStartLoc = N, c.lastEndLoc = D, c.offset = s(), c.startLoc = r(), a.currentChar() === ge ? E(
|
|
593
593
|
c,
|
|
594
594
|
13
|
|
595
595
|
/* TokenTypes.EOF */
|
|
596
|
-
) :
|
|
596
|
+
) : We(a, c);
|
|
597
597
|
}
|
|
598
598
|
return {
|
|
599
599
|
nextToken: St,
|
|
600
|
-
currentOffset:
|
|
600
|
+
currentOffset: s,
|
|
601
601
|
currentPosition: r,
|
|
602
602
|
context: _
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
const
|
|
606
|
-
function
|
|
605
|
+
const ms = "parser", ds = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
606
|
+
function gs(e, t, n) {
|
|
607
607
|
switch (e) {
|
|
608
608
|
case "\\\\":
|
|
609
609
|
return "\\";
|
|
@@ -611,169 +611,169 @@ function ga(e, t, n) {
|
|
|
611
611
|
case "\\'":
|
|
612
612
|
return "'";
|
|
613
613
|
default: {
|
|
614
|
-
const
|
|
615
|
-
return
|
|
614
|
+
const a = parseInt(t || n, 16);
|
|
615
|
+
return a <= 55295 || a >= 57344 ? String.fromCodePoint(a) : "�";
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Es(e = {}) {
|
|
620
620
|
const t = e.location !== !1, { onError: n } = e;
|
|
621
|
-
function
|
|
621
|
+
function a(f, d, b, g, ...O) {
|
|
622
622
|
const v = f.currentPosition();
|
|
623
623
|
if (v.offset += g, v.column += g, n) {
|
|
624
|
-
const p = t ? Mt(
|
|
625
|
-
domain:
|
|
626
|
-
args:
|
|
624
|
+
const p = t ? Mt(b, v) : null, P = we(d, p, {
|
|
625
|
+
domain: ms,
|
|
626
|
+
args: O
|
|
627
627
|
});
|
|
628
628
|
n(P);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function s(f, d, b) {
|
|
632
632
|
const g = { type: f };
|
|
633
|
-
return t && (g.start = d, g.end = d, g.loc = { start:
|
|
633
|
+
return t && (g.start = d, g.end = d, g.loc = { start: b, end: b }), g;
|
|
634
634
|
}
|
|
635
|
-
function r(f, d,
|
|
636
|
-
t && (f.end = d, f.loc && (f.loc.end =
|
|
635
|
+
function r(f, d, b, g) {
|
|
636
|
+
t && (f.end = d, f.loc && (f.loc.end = b));
|
|
637
637
|
}
|
|
638
638
|
function o(f, d) {
|
|
639
|
-
const
|
|
639
|
+
const b = f.context(), g = s(3, b.offset, b.startLoc);
|
|
640
640
|
return g.value = d, r(g, f.currentOffset(), f.currentPosition()), g;
|
|
641
641
|
}
|
|
642
642
|
function l(f, d) {
|
|
643
|
-
const
|
|
643
|
+
const b = f.context(), { lastOffset: g, lastStartLoc: O } = b, v = s(5, g, O);
|
|
644
644
|
return v.index = parseInt(d, 10), f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
645
645
|
}
|
|
646
646
|
function c(f, d) {
|
|
647
|
-
const
|
|
647
|
+
const b = f.context(), { lastOffset: g, lastStartLoc: O } = b, v = s(4, g, O);
|
|
648
648
|
return v.key = d, f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
649
649
|
}
|
|
650
650
|
function _(f, d) {
|
|
651
|
-
const
|
|
652
|
-
return v.value = d.replace(
|
|
651
|
+
const b = f.context(), { lastOffset: g, lastStartLoc: O } = b, v = s(9, g, O);
|
|
652
|
+
return v.value = d.replace(ds, gs), f.nextToken(), r(v, f.currentOffset(), f.currentPosition()), v;
|
|
653
653
|
}
|
|
654
654
|
function T(f) {
|
|
655
|
-
const d = f.nextToken(),
|
|
656
|
-
return d.type !== 11 ? (
|
|
655
|
+
const d = f.nextToken(), b = f.context(), { lastOffset: g, lastStartLoc: O } = b, v = s(8, g, O);
|
|
656
|
+
return d.type !== 11 ? (a(f, k.UNEXPECTED_EMPTY_LINKED_MODIFIER, b.lastStartLoc, 0), v.value = "", r(v, g, O), {
|
|
657
657
|
nextConsumeToken: d,
|
|
658
658
|
node: v
|
|
659
|
-
}) : (d.value == null &&
|
|
659
|
+
}) : (d.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, ce(d)), v.value = d.value || "", r(v, f.currentOffset(), f.currentPosition()), {
|
|
660
660
|
node: v
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
function h(f, d) {
|
|
664
|
-
const
|
|
664
|
+
const b = f.context(), g = s(7, b.offset, b.startLoc);
|
|
665
665
|
return g.value = d, r(g, f.currentOffset(), f.currentPosition()), g;
|
|
666
666
|
}
|
|
667
667
|
function E(f) {
|
|
668
|
-
const d = f.context(),
|
|
668
|
+
const d = f.context(), b = s(6, d.offset, d.startLoc);
|
|
669
669
|
let g = f.nextToken();
|
|
670
670
|
if (g.type === 8) {
|
|
671
|
-
const
|
|
672
|
-
|
|
671
|
+
const O = T(f);
|
|
672
|
+
b.modifier = O.node, g = O.nextConsumeToken || f.nextToken();
|
|
673
673
|
}
|
|
674
|
-
switch (g.type !== 9 &&
|
|
674
|
+
switch (g.type !== 9 && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(g)), g = f.nextToken(), g.type === 2 && (g = f.nextToken()), g.type) {
|
|
675
675
|
case 10:
|
|
676
|
-
g.value == null &&
|
|
676
|
+
g.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(g)), b.key = h(f, g.value || "");
|
|
677
677
|
break;
|
|
678
678
|
case 4:
|
|
679
|
-
g.value == null &&
|
|
679
|
+
g.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(g)), b.key = c(f, g.value || "");
|
|
680
680
|
break;
|
|
681
681
|
case 5:
|
|
682
|
-
g.value == null &&
|
|
682
|
+
g.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(g)), b.key = l(f, g.value || "");
|
|
683
683
|
break;
|
|
684
684
|
case 6:
|
|
685
|
-
g.value == null &&
|
|
685
|
+
g.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(g)), b.key = _(f, g.value || "");
|
|
686
686
|
break;
|
|
687
687
|
default: {
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
return v.value = "", r(v,
|
|
688
|
+
a(f, k.UNEXPECTED_EMPTY_LINKED_KEY, d.lastStartLoc, 0);
|
|
689
|
+
const O = f.context(), v = s(7, O.offset, O.startLoc);
|
|
690
|
+
return v.value = "", r(v, O.offset, O.startLoc), b.key = v, r(b, O.offset, O.startLoc), {
|
|
691
691
|
nextConsumeToken: g,
|
|
692
|
-
node:
|
|
692
|
+
node: b
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
return r(
|
|
697
|
-
node:
|
|
696
|
+
return r(b, f.currentOffset(), f.currentPosition()), {
|
|
697
|
+
node: b
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
const d = f.context(),
|
|
702
|
-
|
|
700
|
+
function A(f) {
|
|
701
|
+
const d = f.context(), b = d.currentType === 1 ? f.currentOffset() : d.offset, g = d.currentType === 1 ? d.endLoc : d.startLoc, O = s(2, b, g);
|
|
702
|
+
O.items = [];
|
|
703
703
|
let v = null;
|
|
704
704
|
do {
|
|
705
705
|
const U = v || f.nextToken();
|
|
706
706
|
switch (v = null, U.type) {
|
|
707
707
|
case 0:
|
|
708
|
-
U.value == null &&
|
|
708
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(U)), O.items.push(o(f, U.value || ""));
|
|
709
709
|
break;
|
|
710
710
|
case 5:
|
|
711
|
-
U.value == null &&
|
|
711
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(U)), O.items.push(l(f, U.value || ""));
|
|
712
712
|
break;
|
|
713
713
|
case 4:
|
|
714
|
-
U.value == null &&
|
|
714
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(U)), O.items.push(c(f, U.value || ""));
|
|
715
715
|
break;
|
|
716
716
|
case 6:
|
|
717
|
-
U.value == null &&
|
|
717
|
+
U.value == null && a(f, k.UNEXPECTED_LEXICAL_ANALYSIS, d.lastStartLoc, 0, ce(U)), O.items.push(_(f, U.value || ""));
|
|
718
718
|
break;
|
|
719
719
|
case 7: {
|
|
720
720
|
const X = E(f);
|
|
721
|
-
|
|
721
|
+
O.items.push(X.node), v = X.nextConsumeToken || null;
|
|
722
722
|
break;
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
} while (d.currentType !== 13 && d.currentType !== 1);
|
|
726
726
|
const p = d.currentType === 1 ? d.lastOffset : f.currentOffset(), P = d.currentType === 1 ? d.lastEndLoc : f.currentPosition();
|
|
727
|
-
return r(
|
|
727
|
+
return r(O, p, P), O;
|
|
728
728
|
}
|
|
729
|
-
function C(f, d,
|
|
730
|
-
const
|
|
729
|
+
function C(f, d, b, g) {
|
|
730
|
+
const O = f.context();
|
|
731
731
|
let v = g.items.length === 0;
|
|
732
|
-
const p =
|
|
732
|
+
const p = s(1, d, b);
|
|
733
733
|
p.cases = [], p.cases.push(g);
|
|
734
734
|
do {
|
|
735
|
-
const P =
|
|
735
|
+
const P = A(f);
|
|
736
736
|
v || (v = P.items.length === 0), p.cases.push(P);
|
|
737
|
-
} while (
|
|
738
|
-
return v &&
|
|
737
|
+
} while (O.currentType !== 13);
|
|
738
|
+
return v && a(f, k.MUST_HAVE_MESSAGES_IN_PLURAL, b, 0), r(p, f.currentOffset(), f.currentPosition()), p;
|
|
739
739
|
}
|
|
740
740
|
function y(f) {
|
|
741
|
-
const d = f.context(), { offset:
|
|
742
|
-
return d.currentType === 13 ?
|
|
741
|
+
const d = f.context(), { offset: b, startLoc: g } = d, O = A(f);
|
|
742
|
+
return d.currentType === 13 ? O : C(f, b, g, O);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
const d =
|
|
746
|
-
return t && g.loc && (g.loc.source = f), g.body = y(d), e.onCacheKey && (g.cacheKey = e.onCacheKey(f)),
|
|
744
|
+
function S(f) {
|
|
745
|
+
const d = _s(f, Q({}, e)), b = d.context(), g = s(0, b.offset, b.startLoc);
|
|
746
|
+
return t && g.loc && (g.loc.source = f), g.body = y(d), e.onCacheKey && (g.cacheKey = e.onCacheKey(f)), b.currentType !== 13 && a(d, k.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, f[b.offset] || ""), r(g, d.currentOffset(), d.currentPosition()), g;
|
|
747
747
|
}
|
|
748
|
-
return { parse:
|
|
748
|
+
return { parse: S };
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function ce(e) {
|
|
751
751
|
if (e.type === 13)
|
|
752
752
|
return "EOF";
|
|
753
753
|
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
754
754
|
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function ps(e, t = {}) {
|
|
757
757
|
const n = {
|
|
758
758
|
ast: e,
|
|
759
759
|
helpers: /* @__PURE__ */ new Set()
|
|
760
760
|
};
|
|
761
761
|
return { context: () => n, helper: (r) => (n.helpers.add(r), r) };
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function En(e, t) {
|
|
764
764
|
for (let n = 0; n < e.length; n++)
|
|
765
765
|
qt(e[n], t);
|
|
766
766
|
}
|
|
767
767
|
function qt(e, t) {
|
|
768
768
|
switch (e.type) {
|
|
769
769
|
case 1:
|
|
770
|
-
|
|
770
|
+
En(e.cases, t), t.helper(
|
|
771
771
|
"plural"
|
|
772
772
|
/* HelperNameMap.PLURAL */
|
|
773
773
|
);
|
|
774
774
|
break;
|
|
775
775
|
case 2:
|
|
776
|
-
|
|
776
|
+
En(e.items, t);
|
|
777
777
|
break;
|
|
778
778
|
case 6: {
|
|
779
779
|
qt(e.key, t), t.helper(
|
|
@@ -805,59 +805,59 @@ function qt(e, t) {
|
|
|
805
805
|
break;
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
function
|
|
809
|
-
const n =
|
|
808
|
+
function hs(e, t = {}) {
|
|
809
|
+
const n = ps(e);
|
|
810
810
|
n.helper(
|
|
811
811
|
"normalize"
|
|
812
812
|
/* HelperNameMap.NORMALIZE */
|
|
813
813
|
), e.body && qt(e.body, n);
|
|
814
|
-
const
|
|
815
|
-
e.helpers = Array.from(
|
|
814
|
+
const a = n.context();
|
|
815
|
+
e.helpers = Array.from(a.helpers);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Ns(e) {
|
|
818
818
|
const t = e.body;
|
|
819
|
-
return t.type === 2 ?
|
|
819
|
+
return t.type === 2 ? pn(t) : t.cases.forEach((n) => pn(n)), e;
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function pn(e) {
|
|
822
822
|
if (e.items.length === 1) {
|
|
823
823
|
const t = e.items[0];
|
|
824
824
|
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
825
825
|
} else {
|
|
826
826
|
const t = [];
|
|
827
827
|
for (let n = 0; n < e.items.length; n++) {
|
|
828
|
-
const
|
|
829
|
-
if (!(
|
|
828
|
+
const a = e.items[n];
|
|
829
|
+
if (!(a.type === 3 || a.type === 9) || a.value == null)
|
|
830
830
|
break;
|
|
831
|
-
t.push(
|
|
831
|
+
t.push(a.value);
|
|
832
832
|
}
|
|
833
833
|
if (t.length === e.items.length) {
|
|
834
834
|
e.static = Xt(t);
|
|
835
835
|
for (let n = 0; n < e.items.length; n++) {
|
|
836
|
-
const
|
|
837
|
-
(
|
|
836
|
+
const a = e.items[n];
|
|
837
|
+
(a.type === 3 || a.type === 9) && delete a.value;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
const
|
|
843
|
-
function
|
|
842
|
+
const Ts = "minifier";
|
|
843
|
+
function Re(e) {
|
|
844
844
|
switch (e.t = e.type, e.type) {
|
|
845
845
|
case 0: {
|
|
846
846
|
const t = e;
|
|
847
|
-
|
|
847
|
+
Re(t.body), t.b = t.body, delete t.body;
|
|
848
848
|
break;
|
|
849
849
|
}
|
|
850
850
|
case 1: {
|
|
851
851
|
const t = e, n = t.cases;
|
|
852
|
-
for (let
|
|
853
|
-
|
|
852
|
+
for (let a = 0; a < n.length; a++)
|
|
853
|
+
Re(n[a]);
|
|
854
854
|
t.c = n, delete t.cases;
|
|
855
855
|
break;
|
|
856
856
|
}
|
|
857
857
|
case 2: {
|
|
858
858
|
const t = e, n = t.items;
|
|
859
|
-
for (let
|
|
860
|
-
|
|
859
|
+
for (let a = 0; a < n.length; a++)
|
|
860
|
+
Re(n[a]);
|
|
861
861
|
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
862
862
|
break;
|
|
863
863
|
}
|
|
@@ -871,7 +871,7 @@ function Fe(e) {
|
|
|
871
871
|
}
|
|
872
872
|
case 6: {
|
|
873
873
|
const t = e;
|
|
874
|
-
|
|
874
|
+
Re(t.key), t.k = t.key, delete t.key, t.modifier && (Re(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
875
875
|
break;
|
|
876
876
|
}
|
|
877
877
|
case 5: {
|
|
@@ -886,42 +886,42 @@ function Fe(e) {
|
|
|
886
886
|
}
|
|
887
887
|
default:
|
|
888
888
|
if (process.env.NODE_ENV !== "production")
|
|
889
|
-
throw
|
|
890
|
-
domain:
|
|
889
|
+
throw we(k.UNHANDLED_MINIFIER_NODE_TYPE, null, {
|
|
890
|
+
domain: Ts,
|
|
891
891
|
args: [e.type]
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
894
|
delete e.type;
|
|
895
895
|
}
|
|
896
|
-
const
|
|
897
|
-
function
|
|
898
|
-
const { filename: n, breakLineCode:
|
|
896
|
+
const Ls = "parser";
|
|
897
|
+
function bs(e, t) {
|
|
898
|
+
const { filename: n, breakLineCode: a, needIndent: s } = t, r = t.location !== !1, o = {
|
|
899
899
|
filename: n,
|
|
900
900
|
code: "",
|
|
901
901
|
column: 1,
|
|
902
902
|
line: 1,
|
|
903
903
|
offset: 0,
|
|
904
904
|
map: void 0,
|
|
905
|
-
breakLineCode:
|
|
906
|
-
needIndent:
|
|
905
|
+
breakLineCode: a,
|
|
906
|
+
needIndent: s,
|
|
907
907
|
indentLevel: 0
|
|
908
908
|
};
|
|
909
909
|
r && e.loc && (o.source = e.loc.source);
|
|
910
910
|
const l = () => o;
|
|
911
|
-
function c(y,
|
|
911
|
+
function c(y, S) {
|
|
912
912
|
o.code += y;
|
|
913
913
|
}
|
|
914
|
-
function _(y,
|
|
915
|
-
const f =
|
|
916
|
-
c(
|
|
914
|
+
function _(y, S = !0) {
|
|
915
|
+
const f = S ? a : "";
|
|
916
|
+
c(s ? f + " ".repeat(y) : f);
|
|
917
917
|
}
|
|
918
918
|
function T(y = !0) {
|
|
919
|
-
const
|
|
920
|
-
y && _(
|
|
919
|
+
const S = ++o.indentLevel;
|
|
920
|
+
y && _(S);
|
|
921
921
|
}
|
|
922
922
|
function h(y = !0) {
|
|
923
|
-
const
|
|
924
|
-
y && _(
|
|
923
|
+
const S = --o.indentLevel;
|
|
924
|
+
y && _(S);
|
|
925
925
|
}
|
|
926
926
|
function E() {
|
|
927
927
|
_(o.indentLevel);
|
|
@@ -936,54 +936,54 @@ function Oa(e, t) {
|
|
|
936
936
|
needIndent: () => o.needIndent
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Os(e, t) {
|
|
940
940
|
const { helper: n } = e;
|
|
941
941
|
e.push(`${n(
|
|
942
942
|
"linked"
|
|
943
943
|
/* HelperNameMap.LINKED */
|
|
944
|
-
)}(`),
|
|
944
|
+
)}(`), Fe(e, t.key), t.modifier ? (e.push(", "), Fe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
const { helper: n, needIndent:
|
|
946
|
+
function Is(e, t) {
|
|
947
|
+
const { helper: n, needIndent: a } = e;
|
|
948
948
|
e.push(`${n(
|
|
949
949
|
"normalize"
|
|
950
950
|
/* HelperNameMap.NORMALIZE */
|
|
951
|
-
)}([`), e.indent(
|
|
952
|
-
const
|
|
953
|
-
for (let r = 0; r <
|
|
951
|
+
)}([`), e.indent(a());
|
|
952
|
+
const s = t.items.length;
|
|
953
|
+
for (let r = 0; r < s && (Fe(e, t.items[r]), r !== s - 1); r++)
|
|
954
954
|
e.push(", ");
|
|
955
|
-
e.deindent(
|
|
955
|
+
e.deindent(a()), e.push("])");
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
const { helper: n, needIndent:
|
|
957
|
+
function vs(e, t) {
|
|
958
|
+
const { helper: n, needIndent: a } = e;
|
|
959
959
|
if (t.cases.length > 1) {
|
|
960
960
|
e.push(`${n(
|
|
961
961
|
"plural"
|
|
962
962
|
/* HelperNameMap.PLURAL */
|
|
963
|
-
)}([`), e.indent(
|
|
964
|
-
const
|
|
965
|
-
for (let r = 0; r <
|
|
963
|
+
)}([`), e.indent(a());
|
|
964
|
+
const s = t.cases.length;
|
|
965
|
+
for (let r = 0; r < s && (Fe(e, t.cases[r]), r !== s - 1); r++)
|
|
966
966
|
e.push(", ");
|
|
967
|
-
e.deindent(
|
|
967
|
+
e.deindent(a()), e.push("])");
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
t.body ?
|
|
970
|
+
function ys(e, t) {
|
|
971
|
+
t.body ? Fe(e, t.body) : e.push("null");
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function Fe(e, t) {
|
|
974
974
|
const { helper: n } = e;
|
|
975
975
|
switch (t.type) {
|
|
976
976
|
case 0:
|
|
977
|
-
|
|
977
|
+
ys(e, t);
|
|
978
978
|
break;
|
|
979
979
|
case 1:
|
|
980
|
-
|
|
980
|
+
vs(e, t);
|
|
981
981
|
break;
|
|
982
982
|
case 2:
|
|
983
|
-
|
|
983
|
+
Is(e, t);
|
|
984
984
|
break;
|
|
985
985
|
case 6:
|
|
986
|
-
|
|
986
|
+
Os(e, t);
|
|
987
987
|
break;
|
|
988
988
|
case 8:
|
|
989
989
|
e.push(JSON.stringify(t.value), t);
|
|
@@ -1017,22 +1017,22 @@ function Ue(e, t) {
|
|
|
1017
1017
|
break;
|
|
1018
1018
|
default:
|
|
1019
1019
|
if (process.env.NODE_ENV !== "production")
|
|
1020
|
-
throw
|
|
1021
|
-
domain:
|
|
1020
|
+
throw we(k.UNHANDLED_CODEGEN_NODE_TYPE, null, {
|
|
1021
|
+
domain: Ls,
|
|
1022
1022
|
args: [t.type]
|
|
1023
1023
|
});
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1027
|
-
const n = I(t.mode) ? t.mode : "normal",
|
|
1026
|
+
const As = (e, t = {}) => {
|
|
1027
|
+
const n = I(t.mode) ? t.mode : "normal", a = I(t.filename) ? t.filename : "message.intl";
|
|
1028
1028
|
t.sourceMap;
|
|
1029
|
-
const
|
|
1030
|
-
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l =
|
|
1031
|
-
filename:
|
|
1032
|
-
breakLineCode:
|
|
1029
|
+
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1030
|
+
`, r = t.needIndent ? t.needIndent : n !== "arrow", o = e.helpers || [], l = bs(e, {
|
|
1031
|
+
filename: a,
|
|
1032
|
+
breakLineCode: s,
|
|
1033
1033
|
needIndent: r
|
|
1034
1034
|
});
|
|
1035
|
-
l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(r), o.length > 0 && (l.push(`const { ${Xt(o.map((T) => `${T}: _${T}`), ", ")} } = ctx`), l.newline()), l.push("return "),
|
|
1035
|
+
l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(r), o.length > 0 && (l.push(`const { ${Xt(o.map((T) => `${T}: _${T}`), ", ")} } = ctx`), l.newline()), l.push("return "), Fe(l, e), l.deindent(r), l.push("}"), delete e.helpers;
|
|
1036
1036
|
const { code: c, map: _ } = l.context();
|
|
1037
1037
|
return {
|
|
1038
1038
|
ast: e,
|
|
@@ -1041,202 +1041,202 @@ const Sa = (e, t = {}) => {
|
|
|
1041
1041
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1042
1042
|
};
|
|
1043
1043
|
};
|
|
1044
|
-
function
|
|
1045
|
-
const n = Q({}, t),
|
|
1046
|
-
return
|
|
1044
|
+
function Ss(e, t = {}) {
|
|
1045
|
+
const n = Q({}, t), a = !!n.jit, s = !!n.minify, r = n.optimize == null ? !0 : n.optimize, l = Es(n).parse(e);
|
|
1046
|
+
return a ? (r && Ns(l), s && Re(l), { ast: l, code: "" }) : (hs(l, n), As(l, n));
|
|
1047
1047
|
}
|
|
1048
1048
|
/*!
|
|
1049
1049
|
* core-base v11.1.3
|
|
1050
1050
|
* (c) 2025 kazuya kawaguchi
|
|
1051
1051
|
* Released under the MIT License.
|
|
1052
1052
|
*/
|
|
1053
|
-
function
|
|
1054
|
-
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (
|
|
1053
|
+
function Cs() {
|
|
1054
|
+
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ie().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ie().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return M(e) && Zt(e) === 0 && (
|
|
1056
|
+
function se(e) {
|
|
1057
|
+
return M(e) && Zt(e) === 0 && (le(e, "b") || le(e, "body"));
|
|
1058
1058
|
}
|
|
1059
1059
|
const Qn = ["b", "body"];
|
|
1060
|
-
function
|
|
1061
|
-
return
|
|
1060
|
+
function Ds(e) {
|
|
1061
|
+
return pe(e, Qn);
|
|
1062
1062
|
}
|
|
1063
1063
|
const qn = ["c", "cases"];
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1064
|
+
function ks(e) {
|
|
1065
|
+
return pe(e, qn, []);
|
|
1066
1066
|
}
|
|
1067
1067
|
const Zn = ["s", "static"];
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1068
|
+
function Ps(e) {
|
|
1069
|
+
return pe(e, Zn);
|
|
1070
1070
|
}
|
|
1071
1071
|
const zn = ["i", "items"];
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1072
|
+
function Rs(e) {
|
|
1073
|
+
return pe(e, zn, []);
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const ea = ["t", "type"];
|
|
1076
1076
|
function Zt(e) {
|
|
1077
|
-
return
|
|
1077
|
+
return pe(e, ea);
|
|
1078
1078
|
}
|
|
1079
|
-
const
|
|
1080
|
-
function
|
|
1081
|
-
const n =
|
|
1079
|
+
const ta = ["v", "value"];
|
|
1080
|
+
function at(e, t) {
|
|
1081
|
+
const n = pe(e, ta);
|
|
1082
1082
|
if (n != null)
|
|
1083
1083
|
return n;
|
|
1084
|
-
throw
|
|
1084
|
+
throw Be(t);
|
|
1085
1085
|
}
|
|
1086
|
-
const
|
|
1087
|
-
function
|
|
1088
|
-
return
|
|
1086
|
+
const na = ["m", "modifier"];
|
|
1087
|
+
function Ms(e) {
|
|
1088
|
+
return pe(e, na);
|
|
1089
1089
|
}
|
|
1090
|
-
const
|
|
1091
|
-
function
|
|
1092
|
-
const t =
|
|
1090
|
+
const aa = ["k", "key"];
|
|
1091
|
+
function Fs(e) {
|
|
1092
|
+
const t = pe(e, aa);
|
|
1093
1093
|
if (t)
|
|
1094
1094
|
return t;
|
|
1095
|
-
throw
|
|
1095
|
+
throw Be(
|
|
1096
1096
|
6
|
|
1097
1097
|
/* NodeTypes.Linked */
|
|
1098
1098
|
);
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
for (let
|
|
1102
|
-
const
|
|
1103
|
-
if (
|
|
1104
|
-
return e[
|
|
1100
|
+
function pe(e, t, n) {
|
|
1101
|
+
for (let a = 0; a < t.length; a++) {
|
|
1102
|
+
const s = t[a];
|
|
1103
|
+
if (le(e, s) && e[s] != null)
|
|
1104
|
+
return e[s];
|
|
1105
1105
|
}
|
|
1106
1106
|
return n;
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1108
|
+
const sa = [
|
|
1109
1109
|
...Qn,
|
|
1110
1110
|
...qn,
|
|
1111
1111
|
...Zn,
|
|
1112
1112
|
...zn,
|
|
1113
|
-
...
|
|
1114
|
-
...
|
|
1115
|
-
...
|
|
1116
|
-
...
|
|
1113
|
+
...aa,
|
|
1114
|
+
...na,
|
|
1115
|
+
...ta,
|
|
1116
|
+
...ea
|
|
1117
1117
|
];
|
|
1118
|
-
function
|
|
1118
|
+
function Be(e) {
|
|
1119
1119
|
return new Error(`unhandled node type: ${e}`);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return (n) =>
|
|
1121
|
+
function Ct(e) {
|
|
1122
|
+
return (n) => ws(n, e);
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const n =
|
|
1124
|
+
function ws(e, t) {
|
|
1125
|
+
const n = Ds(t);
|
|
1126
1126
|
if (n == null)
|
|
1127
|
-
throw
|
|
1127
|
+
throw Be(
|
|
1128
1128
|
0
|
|
1129
1129
|
/* NodeTypes.Resource */
|
|
1130
1130
|
);
|
|
1131
1131
|
if (Zt(n) === 1) {
|
|
1132
|
-
const r =
|
|
1132
|
+
const r = ks(n);
|
|
1133
1133
|
return e.plural(r.reduce((o, l) => [
|
|
1134
1134
|
...o,
|
|
1135
|
-
|
|
1135
|
+
hn(e, l)
|
|
1136
1136
|
], []));
|
|
1137
1137
|
} else
|
|
1138
|
-
return
|
|
1138
|
+
return hn(e, n);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const n =
|
|
1140
|
+
function hn(e, t) {
|
|
1141
|
+
const n = Ps(t);
|
|
1142
1142
|
if (n != null)
|
|
1143
1143
|
return e.type === "text" ? n : e.normalize([n]);
|
|
1144
1144
|
{
|
|
1145
|
-
const
|
|
1146
|
-
return e.normalize(
|
|
1145
|
+
const a = Rs(t).reduce((s, r) => [...s, Ft(e, r)], []);
|
|
1146
|
+
return e.normalize(a);
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
1149
|
function Ft(e, t) {
|
|
1150
1150
|
const n = Zt(t);
|
|
1151
1151
|
switch (n) {
|
|
1152
1152
|
case 3:
|
|
1153
|
-
return
|
|
1153
|
+
return at(t, n);
|
|
1154
1154
|
case 9:
|
|
1155
|
-
return
|
|
1155
|
+
return at(t, n);
|
|
1156
1156
|
case 4: {
|
|
1157
|
-
const
|
|
1158
|
-
if (
|
|
1159
|
-
return e.interpolate(e.named(
|
|
1160
|
-
if (
|
|
1161
|
-
return e.interpolate(e.named(
|
|
1162
|
-
throw
|
|
1157
|
+
const a = t;
|
|
1158
|
+
if (le(a, "k") && a.k)
|
|
1159
|
+
return e.interpolate(e.named(a.k));
|
|
1160
|
+
if (le(a, "key") && a.key)
|
|
1161
|
+
return e.interpolate(e.named(a.key));
|
|
1162
|
+
throw Be(n);
|
|
1163
1163
|
}
|
|
1164
1164
|
case 5: {
|
|
1165
|
-
const
|
|
1166
|
-
if (
|
|
1167
|
-
return e.interpolate(e.list(
|
|
1168
|
-
if (
|
|
1169
|
-
return e.interpolate(e.list(
|
|
1170
|
-
throw
|
|
1165
|
+
const a = t;
|
|
1166
|
+
if (le(a, "i") && j(a.i))
|
|
1167
|
+
return e.interpolate(e.list(a.i));
|
|
1168
|
+
if (le(a, "index") && j(a.index))
|
|
1169
|
+
return e.interpolate(e.list(a.index));
|
|
1170
|
+
throw Be(n);
|
|
1171
1171
|
}
|
|
1172
1172
|
case 6: {
|
|
1173
|
-
const
|
|
1174
|
-
return e.linked(Ft(e, r),
|
|
1173
|
+
const a = t, s = Ms(a), r = Fs(a);
|
|
1174
|
+
return e.linked(Ft(e, r), s ? Ft(e, s) : void 0, e.type);
|
|
1175
1175
|
}
|
|
1176
1176
|
case 7:
|
|
1177
|
-
return
|
|
1177
|
+
return at(t, n);
|
|
1178
1178
|
case 8:
|
|
1179
|
-
return
|
|
1179
|
+
return at(t, n);
|
|
1180
1180
|
default:
|
|
1181
1181
|
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
1186
|
-
t &&
|
|
1184
|
+
const Us = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
|
|
1185
|
+
function Vs(e, t) {
|
|
1186
|
+
t && rs(e) && Ee(it(Us, { source: e }));
|
|
1187
1187
|
}
|
|
1188
|
-
const
|
|
1189
|
-
let
|
|
1190
|
-
function
|
|
1188
|
+
const $s = (e) => e;
|
|
1189
|
+
let st = $();
|
|
1190
|
+
function Ws(e, t = {}) {
|
|
1191
1191
|
let n = !1;
|
|
1192
|
-
const
|
|
1193
|
-
return t.onError = (
|
|
1194
|
-
n = !0, s
|
|
1195
|
-
}, { ...
|
|
1192
|
+
const a = t.onError || as;
|
|
1193
|
+
return t.onError = (s) => {
|
|
1194
|
+
n = !0, a(s);
|
|
1195
|
+
}, { ...Ss(e, t), detectError: n };
|
|
1196
1196
|
}
|
|
1197
1197
|
// @__NO_SIDE_EFFECTS__
|
|
1198
|
-
function
|
|
1198
|
+
function xs(e, t) {
|
|
1199
1199
|
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && I(e)) {
|
|
1200
1200
|
const n = F(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
|
|
1201
|
-
process.env.NODE_ENV !== "production" &&
|
|
1202
|
-
const
|
|
1201
|
+
process.env.NODE_ENV !== "production" && Vs(e, n);
|
|
1202
|
+
const s = (t.onCacheKey || $s)(e), r = st[s];
|
|
1203
1203
|
if (r)
|
|
1204
1204
|
return r;
|
|
1205
|
-
const { ast: o, detectError: l } =
|
|
1205
|
+
const { ast: o, detectError: l } = Ws(e, {
|
|
1206
1206
|
...t,
|
|
1207
1207
|
location: process.env.NODE_ENV !== "production",
|
|
1208
1208
|
jit: !0
|
|
1209
|
-
}), c =
|
|
1210
|
-
return l ? c :
|
|
1209
|
+
}), c = Ct(o);
|
|
1210
|
+
return l ? c : st[s] = c;
|
|
1211
1211
|
} else {
|
|
1212
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1213
|
-
return
|
|
1212
|
+
if (process.env.NODE_ENV !== "production" && !se(e))
|
|
1213
|
+
return Ee(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e;
|
|
1214
1214
|
const n = e.cacheKey;
|
|
1215
1215
|
if (n) {
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1216
|
+
const a = st[n];
|
|
1217
|
+
return a || (st[n] = Ct(e));
|
|
1218
1218
|
} else
|
|
1219
|
-
return
|
|
1219
|
+
return Ct(e);
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
let
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1222
|
+
let je = null;
|
|
1223
|
+
function Gs(e) {
|
|
1224
|
+
je = e;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1226
|
+
function Ys(e, t, n) {
|
|
1227
|
+
je && je.emit("i18n:init", {
|
|
1228
1228
|
timestamp: Date.now(),
|
|
1229
1229
|
i18n: e,
|
|
1230
1230
|
version: t,
|
|
1231
1231
|
meta: n
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1235
|
-
function
|
|
1236
|
-
return (t) =>
|
|
1234
|
+
const Hs = /* @__PURE__ */ Ks("function:translate");
|
|
1235
|
+
function Ks(e) {
|
|
1236
|
+
return (t) => je && je.emit(e, t);
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1239
|
-
INVALID_ARGUMENT:
|
|
1238
|
+
const Z = {
|
|
1239
|
+
INVALID_ARGUMENT: ts,
|
|
1240
1240
|
// 17
|
|
1241
1241
|
INVALID_DATE_ARGUMENT: 18,
|
|
1242
1242
|
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
@@ -1244,87 +1244,87 @@ const q = {
|
|
|
1244
1244
|
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1245
1245
|
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1246
1246
|
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1247
|
-
},
|
|
1248
|
-
function
|
|
1249
|
-
return
|
|
1250
|
-
}
|
|
1251
|
-
const
|
|
1252
|
-
[
|
|
1253
|
-
[
|
|
1254
|
-
[
|
|
1255
|
-
[
|
|
1256
|
-
[
|
|
1257
|
-
[
|
|
1258
|
-
[
|
|
1247
|
+
}, Bs = 24;
|
|
1248
|
+
function de(e) {
|
|
1249
|
+
return we(e, null, process.env.NODE_ENV !== "production" ? { messages: js } : void 0);
|
|
1250
|
+
}
|
|
1251
|
+
const js = {
|
|
1252
|
+
[Z.INVALID_ARGUMENT]: "Invalid arguments",
|
|
1253
|
+
[Z.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
|
|
1254
|
+
[Z.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
|
|
1255
|
+
[Z.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
|
|
1256
|
+
[Z.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
|
|
1257
|
+
[Z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
|
|
1258
|
+
[Z.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
|
|
1259
1259
|
};
|
|
1260
1260
|
function zt(e, t) {
|
|
1261
|
-
return t.locale != null ?
|
|
1261
|
+
return t.locale != null ? Nn(t.locale) : Nn(e.locale);
|
|
1262
1262
|
}
|
|
1263
|
-
let
|
|
1264
|
-
function
|
|
1263
|
+
let Dt;
|
|
1264
|
+
function Nn(e) {
|
|
1265
1265
|
if (I(e))
|
|
1266
1266
|
return e;
|
|
1267
1267
|
if (W(e)) {
|
|
1268
|
-
if (e.resolvedOnce &&
|
|
1269
|
-
return
|
|
1268
|
+
if (e.resolvedOnce && Dt != null)
|
|
1269
|
+
return Dt;
|
|
1270
1270
|
if (e.constructor.name === "Function") {
|
|
1271
1271
|
const t = e();
|
|
1272
|
-
if (
|
|
1273
|
-
throw
|
|
1274
|
-
return
|
|
1272
|
+
if (qa(t))
|
|
1273
|
+
throw de(Z.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1274
|
+
return Dt = t;
|
|
1275
1275
|
} else
|
|
1276
|
-
throw
|
|
1276
|
+
throw de(Z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1277
1277
|
} else
|
|
1278
|
-
throw
|
|
1278
|
+
throw de(Z.NOT_SUPPORT_LOCALE_TYPE);
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Xs(e, t, n) {
|
|
1281
1281
|
return [.../* @__PURE__ */ new Set([
|
|
1282
1282
|
n,
|
|
1283
|
-
...
|
|
1283
|
+
...K(t) ? t : M(t) ? Object.keys(t) : I(t) ? [t] : [n]
|
|
1284
1284
|
])];
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
let r =
|
|
1286
|
+
function ra(e, t, n) {
|
|
1287
|
+
const a = I(n) ? n : Xe, s = e;
|
|
1288
|
+
s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1289
|
+
let r = s.__localeChainCache.get(a);
|
|
1290
1290
|
if (!r) {
|
|
1291
1291
|
r = [];
|
|
1292
1292
|
let o = [n];
|
|
1293
|
-
for (;
|
|
1294
|
-
o =
|
|
1295
|
-
const l =
|
|
1296
|
-
o = I(l) ? [l] : l,
|
|
1293
|
+
for (; K(o); )
|
|
1294
|
+
o = Tn(r, o, t);
|
|
1295
|
+
const l = K(t) || !R(t) ? t : t.default ? t.default : null;
|
|
1296
|
+
o = I(l) ? [l] : l, K(o) && Tn(r, o, !1), s.__localeChainCache.set(a, r);
|
|
1297
1297
|
}
|
|
1298
1298
|
return r;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
let
|
|
1302
|
-
for (let
|
|
1303
|
-
const r = t[
|
|
1304
|
-
I(r) && (
|
|
1300
|
+
function Tn(e, t, n) {
|
|
1301
|
+
let a = !0;
|
|
1302
|
+
for (let s = 0; s < t.length && F(a); s++) {
|
|
1303
|
+
const r = t[s];
|
|
1304
|
+
I(r) && (a = Js(e, t[s], n));
|
|
1305
1305
|
}
|
|
1306
|
-
return
|
|
1306
|
+
return a;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
let
|
|
1310
|
-
const
|
|
1308
|
+
function Js(e, t, n) {
|
|
1309
|
+
let a;
|
|
1310
|
+
const s = t.split("-");
|
|
1311
1311
|
do {
|
|
1312
|
-
const r =
|
|
1313
|
-
|
|
1314
|
-
} while (
|
|
1315
|
-
return
|
|
1312
|
+
const r = s.join("-");
|
|
1313
|
+
a = Qs(e, r, n), s.splice(-1, 1);
|
|
1314
|
+
} while (s.length && a === !0);
|
|
1315
|
+
return a;
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
let
|
|
1319
|
-
if (!e.includes(t) && (
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
e.push(
|
|
1317
|
+
function Qs(e, t, n) {
|
|
1318
|
+
let a = !1;
|
|
1319
|
+
if (!e.includes(t) && (a = !0, t)) {
|
|
1320
|
+
a = t[t.length - 1] !== "!";
|
|
1321
|
+
const s = t.replace(/!/g, "");
|
|
1322
|
+
e.push(s), (K(n) || R(n)) && n[s] && (a = n[s]);
|
|
1323
1323
|
}
|
|
1324
|
-
return
|
|
1324
|
+
return a;
|
|
1325
1325
|
}
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1326
|
+
const he = [];
|
|
1327
|
+
he[
|
|
1328
1328
|
0
|
|
1329
1329
|
/* States.BEFORE_PATH */
|
|
1330
1330
|
] = {
|
|
@@ -1346,7 +1346,7 @@ Te[
|
|
|
1346
1346
|
/* States.AFTER_PATH */
|
|
1347
1347
|
]
|
|
1348
1348
|
};
|
|
1349
|
-
|
|
1349
|
+
he[
|
|
1350
1350
|
1
|
|
1351
1351
|
/* States.IN_PATH */
|
|
1352
1352
|
] = {
|
|
@@ -1367,7 +1367,7 @@ Te[
|
|
|
1367
1367
|
/* States.AFTER_PATH */
|
|
1368
1368
|
]
|
|
1369
1369
|
};
|
|
1370
|
-
|
|
1370
|
+
he[
|
|
1371
1371
|
2
|
|
1372
1372
|
/* States.BEFORE_IDENT */
|
|
1373
1373
|
] = {
|
|
@@ -1386,7 +1386,7 @@ Te[
|
|
|
1386
1386
|
/* Actions.APPEND */
|
|
1387
1387
|
]
|
|
1388
1388
|
};
|
|
1389
|
-
|
|
1389
|
+
he[
|
|
1390
1390
|
3
|
|
1391
1391
|
/* States.IN_IDENT */
|
|
1392
1392
|
] = {
|
|
@@ -1421,7 +1421,7 @@ Te[
|
|
|
1421
1421
|
/* Actions.PUSH */
|
|
1422
1422
|
]
|
|
1423
1423
|
};
|
|
1424
|
-
|
|
1424
|
+
he[
|
|
1425
1425
|
4
|
|
1426
1426
|
/* States.IN_SUB_PATH */
|
|
1427
1427
|
] = {
|
|
@@ -1452,7 +1452,7 @@ Te[
|
|
|
1452
1452
|
/* Actions.APPEND */
|
|
1453
1453
|
]
|
|
1454
1454
|
};
|
|
1455
|
-
|
|
1455
|
+
he[
|
|
1456
1456
|
5
|
|
1457
1457
|
/* States.IN_SINGLE_QUOTE */
|
|
1458
1458
|
] = {
|
|
@@ -1468,7 +1468,7 @@ Te[
|
|
|
1468
1468
|
/* Actions.APPEND */
|
|
1469
1469
|
]
|
|
1470
1470
|
};
|
|
1471
|
-
|
|
1471
|
+
he[
|
|
1472
1472
|
6
|
|
1473
1473
|
/* States.IN_DOUBLE_QUOTE */
|
|
1474
1474
|
] = {
|
|
@@ -1484,11 +1484,11 @@ Te[
|
|
|
1484
1484
|
/* Actions.APPEND */
|
|
1485
1485
|
]
|
|
1486
1486
|
};
|
|
1487
|
-
const
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1487
|
+
const qs = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1488
|
+
function Zs(e) {
|
|
1489
|
+
return qs.test(e);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function zs(e) {
|
|
1492
1492
|
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1493
1493
|
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1494
1494
|
}
|
|
@@ -1531,11 +1531,11 @@ function er(e) {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
function tr(e) {
|
|
1533
1533
|
const t = e.trim();
|
|
1534
|
-
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 :
|
|
1534
|
+
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Zs(t) ? zs(t) : "*" + t;
|
|
1535
1535
|
}
|
|
1536
1536
|
function nr(e) {
|
|
1537
1537
|
const t = [];
|
|
1538
|
-
let n = -1,
|
|
1538
|
+
let n = -1, a = 0, s = 0, r, o, l, c, _, T, h;
|
|
1539
1539
|
const E = [];
|
|
1540
1540
|
E[
|
|
1541
1541
|
0
|
|
@@ -1554,18 +1554,18 @@ function nr(e) {
|
|
|
1554
1554
|
E[
|
|
1555
1555
|
0
|
|
1556
1556
|
/* Actions.APPEND */
|
|
1557
|
-
](),
|
|
1557
|
+
](), s++;
|
|
1558
1558
|
}, E[
|
|
1559
1559
|
3
|
|
1560
1560
|
/* Actions.PUSH_SUB_PATH */
|
|
1561
1561
|
] = () => {
|
|
1562
|
-
if (
|
|
1563
|
-
|
|
1562
|
+
if (s > 0)
|
|
1563
|
+
s--, a = 4, E[
|
|
1564
1564
|
0
|
|
1565
1565
|
/* Actions.APPEND */
|
|
1566
1566
|
]();
|
|
1567
1567
|
else {
|
|
1568
|
-
if (
|
|
1568
|
+
if (s = 0, o === void 0 || (o = tr(o), o === !1))
|
|
1569
1569
|
return !1;
|
|
1570
1570
|
E[
|
|
1571
1571
|
1
|
|
@@ -1573,46 +1573,46 @@ function nr(e) {
|
|
|
1573
1573
|
]();
|
|
1574
1574
|
}
|
|
1575
1575
|
};
|
|
1576
|
-
function
|
|
1576
|
+
function A() {
|
|
1577
1577
|
const C = e[n + 1];
|
|
1578
|
-
if (
|
|
1578
|
+
if (a === 5 && C === "'" || a === 6 && C === '"')
|
|
1579
1579
|
return n++, l = "\\" + C, E[
|
|
1580
1580
|
0
|
|
1581
1581
|
/* Actions.APPEND */
|
|
1582
1582
|
](), !0;
|
|
1583
1583
|
}
|
|
1584
|
-
for (;
|
|
1585
|
-
if (n++, r = e[n], !(r === "\\" &&
|
|
1586
|
-
if (c = er(r), h =
|
|
1584
|
+
for (; a !== null; )
|
|
1585
|
+
if (n++, r = e[n], !(r === "\\" && A())) {
|
|
1586
|
+
if (c = er(r), h = he[a], _ = h[c] || h.l || 8, _ === 8 || (a = _[0], _[1] !== void 0 && (T = E[_[1]], T && (l = r, T() === !1))))
|
|
1587
1587
|
return;
|
|
1588
|
-
if (
|
|
1588
|
+
if (a === 7)
|
|
1589
1589
|
return t;
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
const
|
|
1593
|
-
function
|
|
1592
|
+
const Ln = /* @__PURE__ */ new Map();
|
|
1593
|
+
function ar(e, t) {
|
|
1594
1594
|
return M(e) ? e[t] : null;
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function sr(e, t) {
|
|
1597
1597
|
if (!M(e))
|
|
1598
1598
|
return null;
|
|
1599
|
-
let n =
|
|
1600
|
-
if (n || (n = nr(t), n &&
|
|
1599
|
+
let n = Ln.get(t);
|
|
1600
|
+
if (n || (n = nr(t), n && Ln.set(t, n)), !n)
|
|
1601
1601
|
return null;
|
|
1602
|
-
const
|
|
1603
|
-
let
|
|
1604
|
-
for (; r <
|
|
1602
|
+
const a = n.length;
|
|
1603
|
+
let s = e, r = 0;
|
|
1604
|
+
for (; r < a; ) {
|
|
1605
1605
|
const o = n[r];
|
|
1606
|
-
if (
|
|
1606
|
+
if (sa.includes(o) && se(s))
|
|
1607
1607
|
return null;
|
|
1608
|
-
const l =
|
|
1609
|
-
if (l === void 0 || W(
|
|
1608
|
+
const l = s[o];
|
|
1609
|
+
if (l === void 0 || W(s))
|
|
1610
1610
|
return null;
|
|
1611
|
-
|
|
1611
|
+
s = l, r++;
|
|
1612
1612
|
}
|
|
1613
|
-
return
|
|
1613
|
+
return s;
|
|
1614
1614
|
}
|
|
1615
|
-
const
|
|
1615
|
+
const ee = {
|
|
1616
1616
|
NOT_FOUND_KEY: 1,
|
|
1617
1617
|
FALLBACK_TO_TRANSLATE: 2,
|
|
1618
1618
|
CANNOT_FORMAT_NUMBER: 3,
|
|
@@ -1621,137 +1621,137 @@ const z = {
|
|
|
1621
1621
|
FALLBACK_TO_DATE_FORMAT: 6,
|
|
1622
1622
|
EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
|
|
1623
1623
|
}, rr = 8, or = {
|
|
1624
|
-
[
|
|
1625
|
-
[
|
|
1626
|
-
[
|
|
1627
|
-
[
|
|
1628
|
-
[
|
|
1629
|
-
[
|
|
1630
|
-
[
|
|
1624
|
+
[ee.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
|
|
1625
|
+
[ee.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
|
|
1626
|
+
[ee.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
|
|
1627
|
+
[ee.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
|
|
1628
|
+
[ee.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
|
|
1629
|
+
[ee.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
|
|
1630
|
+
[ee.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."
|
|
1631
1631
|
};
|
|
1632
|
-
function
|
|
1633
|
-
return
|
|
1632
|
+
function ye(e, ...t) {
|
|
1633
|
+
return it(or[e], ...t);
|
|
1634
1634
|
}
|
|
1635
|
-
const lr = "11.1.3",
|
|
1635
|
+
const lr = "11.1.3", ut = -1, Xe = "en-US", ot = "", bn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1636
1636
|
function ir() {
|
|
1637
1637
|
return {
|
|
1638
1638
|
upper: (e, t) => t === "text" && I(e) ? e.toUpperCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1639
1639
|
lower: (e, t) => t === "text" && I(e) ? e.toLowerCase() : t === "vnode" && M(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1640
|
-
capitalize: (e, t) => t === "text" && I(e) ?
|
|
1640
|
+
capitalize: (e, t) => t === "text" && I(e) ? bn(e) : t === "vnode" && M(e) && "__v_isVNode" in e ? bn(e.children) : e
|
|
1641
1641
|
};
|
|
1642
1642
|
}
|
|
1643
|
-
let
|
|
1643
|
+
let oa;
|
|
1644
1644
|
function cr(e) {
|
|
1645
|
-
|
|
1645
|
+
oa = e;
|
|
1646
1646
|
}
|
|
1647
|
-
let
|
|
1647
|
+
let la;
|
|
1648
1648
|
function ur(e) {
|
|
1649
|
-
|
|
1649
|
+
la = e;
|
|
1650
1650
|
}
|
|
1651
|
-
let
|
|
1651
|
+
let ia;
|
|
1652
1652
|
function fr(e) {
|
|
1653
|
-
|
|
1653
|
+
ia = e;
|
|
1654
1654
|
}
|
|
1655
|
-
let
|
|
1655
|
+
let ca = null;
|
|
1656
1656
|
const _r = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1657
|
-
|
|
1658
|
-
}, mr = /* @__NO_SIDE_EFFECTS__ */ () =>
|
|
1659
|
-
let
|
|
1657
|
+
ca = e;
|
|
1658
|
+
}, mr = /* @__NO_SIDE_EFFECTS__ */ () => ca;
|
|
1659
|
+
let ua = null;
|
|
1660
1660
|
const On = (e) => {
|
|
1661
|
-
|
|
1662
|
-
}, dr = () =>
|
|
1663
|
-
let
|
|
1661
|
+
ua = e;
|
|
1662
|
+
}, dr = () => ua;
|
|
1663
|
+
let In = 0;
|
|
1664
1664
|
function gr(e = {}) {
|
|
1665
|
-
const t = W(e.onWarn) ? e.onWarn :
|
|
1666
|
-
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Jt(
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1665
|
+
const t = W(e.onWarn) ? e.onWarn : Ee, n = I(e.version) ? e.version : lr, a = I(e.locale) || W(e.locale) ? e.locale : Xe, s = W(a) ? Xe : a, r = K(e.fallbackLocale) || R(e.fallbackLocale) || I(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, o = R(e.messages) ? e.messages : kt(s), l = R(e.datetimeFormats) ? e.datetimeFormats : kt(s), c = R(e.numberFormats) ? e.numberFormats : kt(s), _ = Q($(), e.modifiers, ir()), T = e.pluralRules || $(), h = W(e.missing) ? e.missing : null, E = F(e.missingWarn) || Me(e.missingWarn) ? e.missingWarn : !0, A = F(e.fallbackWarn) || Me(e.fallbackWarn) ? e.fallbackWarn : !0, C = !!e.fallbackFormat, y = !!e.unresolving, S = W(e.postTranslation) ? e.postTranslation : null, f = R(e.processor) ? e.processor : null, d = F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, b = !!e.escapeParameter, g = W(e.messageCompiler) ? e.messageCompiler : oa;
|
|
1666
|
+
process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Jt(ye(ee.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
1667
|
+
const O = W(e.messageResolver) ? e.messageResolver : la || ar, v = W(e.localeFallbacker) ? e.localeFallbacker : ia || Xs, p = M(e.fallbackContext) ? e.fallbackContext : void 0, P = e, U = M(P.__datetimeFormatters) ? P.__datetimeFormatters : /* @__PURE__ */ new Map(), X = M(P.__numberFormatters) ? P.__numberFormatters : /* @__PURE__ */ new Map(), re = M(P.__meta) ? P.__meta : {};
|
|
1668
|
+
In++;
|
|
1669
1669
|
const J = {
|
|
1670
1670
|
version: n,
|
|
1671
|
-
cid:
|
|
1672
|
-
locale:
|
|
1671
|
+
cid: In,
|
|
1672
|
+
locale: a,
|
|
1673
1673
|
fallbackLocale: r,
|
|
1674
1674
|
messages: o,
|
|
1675
1675
|
modifiers: _,
|
|
1676
1676
|
pluralRules: T,
|
|
1677
1677
|
missing: h,
|
|
1678
1678
|
missingWarn: E,
|
|
1679
|
-
fallbackWarn:
|
|
1679
|
+
fallbackWarn: A,
|
|
1680
1680
|
fallbackFormat: C,
|
|
1681
1681
|
unresolving: y,
|
|
1682
|
-
postTranslation:
|
|
1682
|
+
postTranslation: S,
|
|
1683
1683
|
processor: f,
|
|
1684
1684
|
warnHtmlMessage: d,
|
|
1685
|
-
escapeParameter:
|
|
1685
|
+
escapeParameter: b,
|
|
1686
1686
|
messageCompiler: g,
|
|
1687
|
-
messageResolver:
|
|
1687
|
+
messageResolver: O,
|
|
1688
1688
|
localeFallbacker: v,
|
|
1689
1689
|
fallbackContext: p,
|
|
1690
1690
|
onWarn: t,
|
|
1691
|
-
__meta:
|
|
1691
|
+
__meta: re
|
|
1692
1692
|
};
|
|
1693
|
-
return J.datetimeFormats = l, J.numberFormats = c, J.__datetimeFormatters = U, J.__numberFormatters = X, process.env.NODE_ENV !== "production" && (J.__v_emitter = P.__v_emitter != null ? P.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) &&
|
|
1693
|
+
return J.datetimeFormats = l, J.numberFormats = c, J.__datetimeFormatters = U, J.__numberFormatters = X, process.env.NODE_ENV !== "production" && (J.__v_emitter = P.__v_emitter != null ? P.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && Ys(J, n, re), J;
|
|
1694
1694
|
}
|
|
1695
|
-
const
|
|
1696
|
-
function
|
|
1695
|
+
const kt = (e) => ({ [e]: $() });
|
|
1696
|
+
function ft(e, t) {
|
|
1697
1697
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function fa(e, t) {
|
|
1700
1700
|
return e instanceof RegExp ? e.test(t) : e;
|
|
1701
1701
|
}
|
|
1702
|
-
function en(e, t, n,
|
|
1702
|
+
function en(e, t, n, a, s) {
|
|
1703
1703
|
const { missing: r, onWarn: o } = e;
|
|
1704
1704
|
if (process.env.NODE_ENV !== "production") {
|
|
1705
1705
|
const l = e.__v_emitter;
|
|
1706
1706
|
l && l.emit("missing", {
|
|
1707
1707
|
locale: n,
|
|
1708
1708
|
key: t,
|
|
1709
|
-
type:
|
|
1710
|
-
groupId: `${
|
|
1709
|
+
type: s,
|
|
1710
|
+
groupId: `${s}:${t}`
|
|
1711
1711
|
});
|
|
1712
1712
|
}
|
|
1713
1713
|
if (r !== null) {
|
|
1714
|
-
const l = r(e, n, t,
|
|
1714
|
+
const l = r(e, n, t, s);
|
|
1715
1715
|
return I(l) ? l : t;
|
|
1716
1716
|
} else
|
|
1717
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1717
|
+
return process.env.NODE_ENV !== "production" && fa(a, t) && o(ye(ee.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
1718
1718
|
}
|
|
1719
|
-
function
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1719
|
+
function Ye(e, t, n) {
|
|
1720
|
+
const a = e;
|
|
1721
|
+
a.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function _a(e, t) {
|
|
1724
1724
|
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1725
1725
|
}
|
|
1726
1726
|
function Er(e, t) {
|
|
1727
1727
|
const n = t.indexOf(e);
|
|
1728
1728
|
if (n === -1)
|
|
1729
1729
|
return !1;
|
|
1730
|
-
for (let
|
|
1731
|
-
if (
|
|
1730
|
+
for (let a = n + 1; a < t.length; a++)
|
|
1731
|
+
if (_a(e, t[a]))
|
|
1732
1732
|
return !0;
|
|
1733
1733
|
return !1;
|
|
1734
1734
|
}
|
|
1735
|
-
const
|
|
1736
|
-
dateTimeFormat:
|
|
1737
|
-
numberFormat:
|
|
1735
|
+
const vn = typeof Intl < "u", ma = {
|
|
1736
|
+
dateTimeFormat: vn && typeof Intl.DateTimeFormat < "u",
|
|
1737
|
+
numberFormat: vn && typeof Intl.NumberFormat < "u"
|
|
1738
1738
|
};
|
|
1739
|
-
function
|
|
1740
|
-
const { datetimeFormats: n, unresolving:
|
|
1741
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1742
|
-
return r(
|
|
1743
|
-
const [c, _, T, h] = wt(...t), E = F(T.missingWarn) ? T.missingWarn : e.missingWarn,
|
|
1739
|
+
function yn(e, ...t) {
|
|
1740
|
+
const { datetimeFormats: n, unresolving: a, fallbackLocale: s, onWarn: r, localeFallbacker: o } = e, { __datetimeFormatters: l } = e;
|
|
1741
|
+
if (process.env.NODE_ENV !== "production" && !ma.dateTimeFormat)
|
|
1742
|
+
return r(ye(ee.CANNOT_FORMAT_DATE)), ot;
|
|
1743
|
+
const [c, _, T, h] = wt(...t), E = F(T.missingWarn) ? T.missingWarn : e.missingWarn, A = F(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn, C = !!T.part, y = zt(e, T), S = o(
|
|
1744
1744
|
e,
|
|
1745
1745
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1746
|
-
|
|
1746
|
+
s,
|
|
1747
1747
|
y
|
|
1748
1748
|
);
|
|
1749
1749
|
if (!I(c) || c === "")
|
|
1750
1750
|
return new Intl.DateTimeFormat(y, h).format(_);
|
|
1751
|
-
let f = {}, d,
|
|
1751
|
+
let f = {}, d, b = null, g = y, O = null;
|
|
1752
1752
|
const v = "datetime format";
|
|
1753
|
-
for (let U = 0; U <
|
|
1754
|
-
if (d =
|
|
1753
|
+
for (let U = 0; U < S.length; U++) {
|
|
1754
|
+
if (d = O = S[U], process.env.NODE_ENV !== "production" && y !== d && ft(A, c) && r(ye(ee.FALLBACK_TO_DATE_FORMAT, {
|
|
1755
1755
|
key: c,
|
|
1756
1756
|
target: d
|
|
1757
1757
|
})), process.env.NODE_ENV !== "production" && y !== d) {
|
|
@@ -1760,22 +1760,22 @@ function vn(e, ...t) {
|
|
|
1760
1760
|
type: v,
|
|
1761
1761
|
key: c,
|
|
1762
1762
|
from: g,
|
|
1763
|
-
to:
|
|
1763
|
+
to: O,
|
|
1764
1764
|
groupId: `${v}:${c}`
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
|
-
if (f = n[d] || {},
|
|
1767
|
+
if (f = n[d] || {}, b = f[c], R(b))
|
|
1768
1768
|
break;
|
|
1769
|
-
en(e, c, d, E, v), g =
|
|
1769
|
+
en(e, c, d, E, v), g = O;
|
|
1770
1770
|
}
|
|
1771
|
-
if (!R(
|
|
1772
|
-
return
|
|
1771
|
+
if (!R(b) || !I(d))
|
|
1772
|
+
return a ? ut : c;
|
|
1773
1773
|
let p = `${d}__${c}`;
|
|
1774
|
-
|
|
1774
|
+
ct(h) || (p = `${p}__${JSON.stringify(h)}`);
|
|
1775
1775
|
let P = l.get(p);
|
|
1776
|
-
return P || (P = new Intl.DateTimeFormat(d, Q({},
|
|
1776
|
+
return P || (P = new Intl.DateTimeFormat(d, Q({}, b, h)), l.set(p, P)), C ? P.formatToParts(_) : P.format(_);
|
|
1777
1777
|
}
|
|
1778
|
-
const
|
|
1778
|
+
const da = [
|
|
1779
1779
|
"localeMatcher",
|
|
1780
1780
|
"weekday",
|
|
1781
1781
|
"era",
|
|
@@ -1798,54 +1798,54 @@ const ds = [
|
|
|
1798
1798
|
"fractionalSecondDigits"
|
|
1799
1799
|
];
|
|
1800
1800
|
function wt(...e) {
|
|
1801
|
-
const [t, n,
|
|
1802
|
-
let o =
|
|
1801
|
+
const [t, n, a, s] = e, r = $();
|
|
1802
|
+
let o = $(), l;
|
|
1803
1803
|
if (I(t)) {
|
|
1804
1804
|
const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
1805
1805
|
if (!c)
|
|
1806
|
-
throw
|
|
1806
|
+
throw de(Z.INVALID_ISO_DATE_ARGUMENT);
|
|
1807
1807
|
const _ = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
|
|
1808
1808
|
l = new Date(_);
|
|
1809
1809
|
try {
|
|
1810
1810
|
l.toISOString();
|
|
1811
1811
|
} catch {
|
|
1812
|
-
throw
|
|
1812
|
+
throw de(Z.INVALID_ISO_DATE_ARGUMENT);
|
|
1813
1813
|
}
|
|
1814
|
-
} else if (
|
|
1814
|
+
} else if (Xa(t)) {
|
|
1815
1815
|
if (isNaN(t.getTime()))
|
|
1816
|
-
throw
|
|
1816
|
+
throw de(Z.INVALID_DATE_ARGUMENT);
|
|
1817
1817
|
l = t;
|
|
1818
1818
|
} else if (j(t))
|
|
1819
1819
|
l = t;
|
|
1820
1820
|
else
|
|
1821
|
-
throw
|
|
1821
|
+
throw de(Z.INVALID_ARGUMENT);
|
|
1822
1822
|
return I(n) ? r.key = n : R(n) && Object.keys(n).forEach((c) => {
|
|
1823
|
-
|
|
1824
|
-
}), I(
|
|
1823
|
+
da.includes(c) ? o[c] = n[c] : r[c] = n[c];
|
|
1824
|
+
}), I(a) ? r.locale = a : R(a) && (o = a), R(s) && (o = s), [r.key || "", l, r, o];
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1827
|
-
const
|
|
1828
|
-
for (const
|
|
1829
|
-
const r = `${t}__${
|
|
1830
|
-
|
|
1826
|
+
function An(e, t, n) {
|
|
1827
|
+
const a = e;
|
|
1828
|
+
for (const s in n) {
|
|
1829
|
+
const r = `${t}__${s}`;
|
|
1830
|
+
a.__datetimeFormatters.has(r) && a.__datetimeFormatters.delete(r);
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
1833
|
function Sn(e, ...t) {
|
|
1834
|
-
const { numberFormats: n, unresolving:
|
|
1835
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1836
|
-
return r(
|
|
1837
|
-
const [c, _, T, h] = Ut(...t), E = F(T.missingWarn) ? T.missingWarn : e.missingWarn,
|
|
1834
|
+
const { numberFormats: n, unresolving: a, fallbackLocale: s, onWarn: r, localeFallbacker: o } = e, { __numberFormatters: l } = e;
|
|
1835
|
+
if (process.env.NODE_ENV !== "production" && !ma.numberFormat)
|
|
1836
|
+
return r(ye(ee.CANNOT_FORMAT_NUMBER)), ot;
|
|
1837
|
+
const [c, _, T, h] = Ut(...t), E = F(T.missingWarn) ? T.missingWarn : e.missingWarn, A = F(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn, C = !!T.part, y = zt(e, T), S = o(
|
|
1838
1838
|
e,
|
|
1839
1839
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1840
|
-
|
|
1840
|
+
s,
|
|
1841
1841
|
y
|
|
1842
1842
|
);
|
|
1843
1843
|
if (!I(c) || c === "")
|
|
1844
1844
|
return new Intl.NumberFormat(y, h).format(_);
|
|
1845
|
-
let f = {}, d,
|
|
1845
|
+
let f = {}, d, b = null, g = y, O = null;
|
|
1846
1846
|
const v = "number format";
|
|
1847
|
-
for (let U = 0; U <
|
|
1848
|
-
if (d =
|
|
1847
|
+
for (let U = 0; U < S.length; U++) {
|
|
1848
|
+
if (d = O = S[U], process.env.NODE_ENV !== "production" && y !== d && ft(A, c) && r(ye(ee.FALLBACK_TO_NUMBER_FORMAT, {
|
|
1849
1849
|
key: c,
|
|
1850
1850
|
target: d
|
|
1851
1851
|
})), process.env.NODE_ENV !== "production" && y !== d) {
|
|
@@ -1854,22 +1854,22 @@ function Sn(e, ...t) {
|
|
|
1854
1854
|
type: v,
|
|
1855
1855
|
key: c,
|
|
1856
1856
|
from: g,
|
|
1857
|
-
to:
|
|
1857
|
+
to: O,
|
|
1858
1858
|
groupId: `${v}:${c}`
|
|
1859
1859
|
});
|
|
1860
1860
|
}
|
|
1861
|
-
if (f = n[d] || {},
|
|
1861
|
+
if (f = n[d] || {}, b = f[c], R(b))
|
|
1862
1862
|
break;
|
|
1863
|
-
en(e, c, d, E, v), g =
|
|
1863
|
+
en(e, c, d, E, v), g = O;
|
|
1864
1864
|
}
|
|
1865
|
-
if (!R(
|
|
1866
|
-
return
|
|
1865
|
+
if (!R(b) || !I(d))
|
|
1866
|
+
return a ? ut : c;
|
|
1867
1867
|
let p = `${d}__${c}`;
|
|
1868
|
-
|
|
1868
|
+
ct(h) || (p = `${p}__${JSON.stringify(h)}`);
|
|
1869
1869
|
let P = l.get(p);
|
|
1870
|
-
return P || (P = new Intl.NumberFormat(d, Q({},
|
|
1870
|
+
return P || (P = new Intl.NumberFormat(d, Q({}, b, h)), l.set(p, P)), C ? P.formatToParts(_) : P.format(_);
|
|
1871
1871
|
}
|
|
1872
|
-
const
|
|
1872
|
+
const ga = [
|
|
1873
1873
|
"localeMatcher",
|
|
1874
1874
|
"style",
|
|
1875
1875
|
"currency",
|
|
@@ -1892,201 +1892,201 @@ const gs = [
|
|
|
1892
1892
|
"trailingZeroDisplay"
|
|
1893
1893
|
];
|
|
1894
1894
|
function Ut(...e) {
|
|
1895
|
-
const [t, n,
|
|
1896
|
-
let o =
|
|
1895
|
+
const [t, n, a, s] = e, r = $();
|
|
1896
|
+
let o = $();
|
|
1897
1897
|
if (!j(t))
|
|
1898
|
-
throw
|
|
1898
|
+
throw de(Z.INVALID_ARGUMENT);
|
|
1899
1899
|
const l = t;
|
|
1900
1900
|
return I(n) ? r.key = n : R(n) && Object.keys(n).forEach((c) => {
|
|
1901
|
-
|
|
1902
|
-
}), I(
|
|
1901
|
+
ga.includes(c) ? o[c] = n[c] : r[c] = n[c];
|
|
1902
|
+
}), I(a) ? r.locale = a : R(a) && (o = a), R(s) && (o = s), [r.key || "", l, r, o];
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1905
|
-
const
|
|
1906
|
-
for (const
|
|
1907
|
-
const r = `${t}__${
|
|
1908
|
-
|
|
1904
|
+
function Cn(e, t, n) {
|
|
1905
|
+
const a = e;
|
|
1906
|
+
for (const s in n) {
|
|
1907
|
+
const r = `${t}__${s}`;
|
|
1908
|
+
a.__numberFormatters.has(r) && a.__numberFormatters.delete(r);
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
const pr = (e) => e, hr = (e) => "", Nr = "text", Tr = (e) => e.length === 0 ? "" : Xt(e), Lr =
|
|
1912
|
-
function
|
|
1911
|
+
const pr = (e) => e, hr = (e) => "", Nr = "text", Tr = (e) => e.length === 0 ? "" : Xt(e), Lr = Za;
|
|
1912
|
+
function Dn(e, t) {
|
|
1913
1913
|
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function br(e) {
|
|
1916
1916
|
const t = j(e.pluralIndex) ? e.pluralIndex : -1;
|
|
1917
1917
|
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;
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1919
|
+
function Or(e, t) {
|
|
1920
1920
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
1921
1921
|
}
|
|
1922
1922
|
function Ir(e = {}) {
|
|
1923
|
-
const t = e.locale, n =
|
|
1924
|
-
j(e.pluralIndex) &&
|
|
1923
|
+
const t = e.locale, n = br(e), a = M(e.pluralRules) && I(t) && W(e.pluralRules[t]) ? e.pluralRules[t] : Dn, s = M(e.pluralRules) && I(t) && W(e.pluralRules[t]) ? Dn : void 0, r = (f) => f[a(n, f.length, s)], o = e.list || [], l = (f) => o[f], c = e.named || $();
|
|
1924
|
+
j(e.pluralIndex) && Or(n, c);
|
|
1925
1925
|
const _ = (f) => c[f];
|
|
1926
1926
|
function T(f, d) {
|
|
1927
|
-
const
|
|
1928
|
-
return
|
|
1927
|
+
const b = W(e.messages) ? e.messages(f, !!d) : M(e.messages) ? e.messages[f] : !1;
|
|
1928
|
+
return b || (e.parent ? e.parent.message(f) : hr);
|
|
1929
1929
|
}
|
|
1930
|
-
const h = (f) => e.modifiers ? e.modifiers[f] : pr, E = R(e.processor) && W(e.processor.normalize) ? e.processor.normalize : Tr,
|
|
1930
|
+
const h = (f) => e.modifiers ? e.modifiers[f] : pr, E = R(e.processor) && W(e.processor.normalize) ? e.processor.normalize : Tr, A = R(e.processor) && W(e.processor.interpolate) ? e.processor.interpolate : Lr, C = R(e.processor) && I(e.processor.type) ? e.processor.type : Nr, S = {
|
|
1931
1931
|
list: l,
|
|
1932
1932
|
named: _,
|
|
1933
1933
|
plural: r,
|
|
1934
1934
|
linked: (f, ...d) => {
|
|
1935
|
-
const [
|
|
1936
|
-
let
|
|
1937
|
-
d.length === 1 ? M(
|
|
1938
|
-
const p = T(f, !0)(
|
|
1935
|
+
const [b, g] = d;
|
|
1936
|
+
let O = "text", v = "";
|
|
1937
|
+
d.length === 1 ? M(b) ? (v = b.modifier || v, O = b.type || O) : I(b) && (v = b || v) : d.length === 2 && (I(b) && (v = b || v), I(g) && (O = g || O));
|
|
1938
|
+
const p = T(f, !0)(S), P = (
|
|
1939
1939
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
1940
|
-
|
|
1940
|
+
O === "vnode" && K(p) && v ? p[0] : p
|
|
1941
1941
|
);
|
|
1942
|
-
return v ? h(v)(P,
|
|
1942
|
+
return v ? h(v)(P, O) : P;
|
|
1943
1943
|
},
|
|
1944
1944
|
message: T,
|
|
1945
1945
|
type: C,
|
|
1946
|
-
interpolate:
|
|
1946
|
+
interpolate: A,
|
|
1947
1947
|
normalize: E,
|
|
1948
|
-
values: Q(
|
|
1948
|
+
values: Q($(), o, c)
|
|
1949
1949
|
};
|
|
1950
|
-
return
|
|
1950
|
+
return S;
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
const { fallbackFormat: n, postTranslation:
|
|
1952
|
+
const kn = () => "", ae = (e) => W(e);
|
|
1953
|
+
function Pn(e, ...t) {
|
|
1954
|
+
const { fallbackFormat: n, postTranslation: a, unresolving: s, messageCompiler: r, fallbackLocale: o, messages: l } = e, [c, _] = Vt(...t), T = F(_.missingWarn) ? _.missingWarn : e.missingWarn, h = F(_.fallbackWarn) ? _.fallbackWarn : e.fallbackWarn, E = F(_.escapeParameter) ? _.escapeParameter : e.escapeParameter, A = !!_.resolvedMessage, C = I(_.default) || F(_.default) ? F(_.default) ? r ? c : () => c : _.default : n ? r ? c : () => c : null, y = n || C != null && (I(C) || W(C)), S = zt(e, _);
|
|
1955
1955
|
E && vr(_);
|
|
1956
|
-
let [f, d,
|
|
1956
|
+
let [f, d, b] = A ? [
|
|
1957
1957
|
c,
|
|
1958
|
-
|
|
1959
|
-
l[
|
|
1960
|
-
] :
|
|
1961
|
-
if (!
|
|
1962
|
-
return
|
|
1958
|
+
S,
|
|
1959
|
+
l[S] || $()
|
|
1960
|
+
] : Ea(e, c, S, o, h, T), g = f, O = c;
|
|
1961
|
+
if (!A && !(I(g) || se(g) || ae(g)) && y && (g = C, O = g), !A && (!(I(g) || se(g) || ae(g)) || !I(d)))
|
|
1962
|
+
return s ? ut : c;
|
|
1963
1963
|
if (process.env.NODE_ENV !== "production" && I(g) && e.messageCompiler == null)
|
|
1964
|
-
return
|
|
1964
|
+
return Ee(`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;
|
|
1965
1965
|
let v = !1;
|
|
1966
1966
|
const p = () => {
|
|
1967
1967
|
v = !0;
|
|
1968
|
-
}, P = ae(g) ? g :
|
|
1968
|
+
}, P = ae(g) ? g : pa(e, c, d, g, O, p);
|
|
1969
1969
|
if (v)
|
|
1970
1970
|
return g;
|
|
1971
|
-
const U = Cr(e, d,
|
|
1971
|
+
const U = Cr(e, d, b, _), X = Ir(U), re = yr(e, P, X), J = a ? a(re, c) : re;
|
|
1972
1972
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
1973
|
-
const
|
|
1973
|
+
const Se = {
|
|
1974
1974
|
timestamp: Date.now(),
|
|
1975
1975
|
key: I(c) ? c : ae(g) ? g.key : "",
|
|
1976
1976
|
locale: d || (ae(g) ? g.locale : ""),
|
|
1977
1977
|
format: I(g) ? g : ae(g) ? g.source : "",
|
|
1978
1978
|
message: J
|
|
1979
1979
|
};
|
|
1980
|
-
|
|
1980
|
+
Se.meta = Q({}, e.__meta, /* @__PURE__ */ mr() || {}), Hs(Se);
|
|
1981
1981
|
}
|
|
1982
1982
|
return J;
|
|
1983
1983
|
}
|
|
1984
1984
|
function vr(e) {
|
|
1985
|
-
|
|
1986
|
-
I(e.named[t]) && (e.named[t] =
|
|
1985
|
+
K(e.list) ? e.list = e.list.map((t) => I(t) ? _n(t) : t) : M(e.named) && Object.keys(e.named).forEach((t) => {
|
|
1986
|
+
I(e.named[t]) && (e.named[t] = _n(e.named[t]));
|
|
1987
1987
|
});
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1990
|
-
const { messages: o, onWarn: l, messageResolver: c, localeFallbacker: _ } = e, T = _(e,
|
|
1991
|
-
let h =
|
|
1992
|
-
const
|
|
1989
|
+
function Ea(e, t, n, a, s, r) {
|
|
1990
|
+
const { messages: o, onWarn: l, messageResolver: c, localeFallbacker: _ } = e, T = _(e, a, n);
|
|
1991
|
+
let h = $(), E, A = null, C = n, y = null;
|
|
1992
|
+
const S = "translate";
|
|
1993
1993
|
for (let f = 0; f < T.length; f++) {
|
|
1994
|
-
if (E = y = T[f], process.env.NODE_ENV !== "production" && n !== E && !
|
|
1994
|
+
if (E = y = T[f], process.env.NODE_ENV !== "production" && n !== E && !_a(n, E) && ft(s, t) && l(ye(ee.FALLBACK_TO_TRANSLATE, {
|
|
1995
1995
|
key: t,
|
|
1996
1996
|
target: E
|
|
1997
1997
|
})), process.env.NODE_ENV !== "production" && n !== E) {
|
|
1998
|
-
const
|
|
1999
|
-
|
|
2000
|
-
type:
|
|
1998
|
+
const O = e.__v_emitter;
|
|
1999
|
+
O && O.emit("fallback", {
|
|
2000
|
+
type: S,
|
|
2001
2001
|
key: t,
|
|
2002
2002
|
from: C,
|
|
2003
2003
|
to: y,
|
|
2004
|
-
groupId: `${
|
|
2004
|
+
groupId: `${S}:${t}`
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
|
-
h = o[E] ||
|
|
2008
|
-
let d = null,
|
|
2009
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2010
|
-
const
|
|
2011
|
-
v && d &&
|
|
2007
|
+
h = o[E] || $();
|
|
2008
|
+
let d = null, b, g;
|
|
2009
|
+
if (process.env.NODE_ENV !== "production" && ie && (d = window.performance.now(), b = "intlify-message-resolve-start", g = "intlify-message-resolve-end", ne && ne(b)), (A = c(h, t)) === null && (A = h[t]), process.env.NODE_ENV !== "production" && ie) {
|
|
2010
|
+
const O = window.performance.now(), v = e.__v_emitter;
|
|
2011
|
+
v && d && A && v.emit("message-resolve", {
|
|
2012
2012
|
type: "message-resolve",
|
|
2013
2013
|
key: t,
|
|
2014
|
-
message:
|
|
2015
|
-
time:
|
|
2016
|
-
groupId: `${
|
|
2017
|
-
}),
|
|
2014
|
+
message: A,
|
|
2015
|
+
time: O - d,
|
|
2016
|
+
groupId: `${S}:${t}`
|
|
2017
|
+
}), b && g && ne && ve && (ne(g), ve("intlify message resolve", b, g));
|
|
2018
2018
|
}
|
|
2019
|
-
if (I(
|
|
2019
|
+
if (I(A) || se(A) || ae(A))
|
|
2020
2020
|
break;
|
|
2021
2021
|
if (!Er(E, T)) {
|
|
2022
|
-
const
|
|
2022
|
+
const O = en(
|
|
2023
2023
|
e,
|
|
2024
2024
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2025
2025
|
t,
|
|
2026
2026
|
E,
|
|
2027
2027
|
r,
|
|
2028
|
-
|
|
2028
|
+
S
|
|
2029
2029
|
);
|
|
2030
|
-
|
|
2030
|
+
O !== t && (A = O);
|
|
2031
2031
|
}
|
|
2032
2032
|
C = y;
|
|
2033
2033
|
}
|
|
2034
|
-
return [
|
|
2034
|
+
return [A, E, h];
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function pa(e, t, n, a, s, r) {
|
|
2037
2037
|
const { messageCompiler: o, warnHtmlMessage: l } = e;
|
|
2038
|
-
if (ae(
|
|
2039
|
-
const E =
|
|
2038
|
+
if (ae(a)) {
|
|
2039
|
+
const E = a;
|
|
2040
2040
|
return E.locale = E.locale || n, E.key = E.key || t, E;
|
|
2041
2041
|
}
|
|
2042
2042
|
if (o == null) {
|
|
2043
|
-
const E = () =>
|
|
2043
|
+
const E = () => a;
|
|
2044
2044
|
return E.locale = n, E.key = t, E;
|
|
2045
2045
|
}
|
|
2046
2046
|
let c = null, _, T;
|
|
2047
|
-
process.env.NODE_ENV !== "production" &&
|
|
2048
|
-
const h = o(
|
|
2049
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2050
|
-
const E = window.performance.now(),
|
|
2051
|
-
|
|
2047
|
+
process.env.NODE_ENV !== "production" && ie && (c = window.performance.now(), _ = "intlify-message-compilation-start", T = "intlify-message-compilation-end", ne && ne(_));
|
|
2048
|
+
const h = o(a, Ar(e, n, s, a, l, r));
|
|
2049
|
+
if (process.env.NODE_ENV !== "production" && ie) {
|
|
2050
|
+
const E = window.performance.now(), A = e.__v_emitter;
|
|
2051
|
+
A && c && A.emit("message-compilation", {
|
|
2052
2052
|
type: "message-compilation",
|
|
2053
|
-
message:
|
|
2053
|
+
message: a,
|
|
2054
2054
|
time: E - c,
|
|
2055
2055
|
groupId: `translate:${t}`
|
|
2056
|
-
}), _ && T && ne &&
|
|
2056
|
+
}), _ && T && ne && ve && (ne(T), ve("intlify message compilation", _, T));
|
|
2057
2057
|
}
|
|
2058
|
-
return h.locale = n, h.key = t, h.source =
|
|
2058
|
+
return h.locale = n, h.key = t, h.source = a, h;
|
|
2059
2059
|
}
|
|
2060
2060
|
function yr(e, t, n) {
|
|
2061
|
-
let
|
|
2062
|
-
process.env.NODE_ENV !== "production" &&
|
|
2061
|
+
let a = null, s, r;
|
|
2062
|
+
process.env.NODE_ENV !== "production" && ie && (a = window.performance.now(), s = "intlify-message-evaluation-start", r = "intlify-message-evaluation-end", ne && ne(s));
|
|
2063
2063
|
const o = t(n);
|
|
2064
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2064
|
+
if (process.env.NODE_ENV !== "production" && ie) {
|
|
2065
2065
|
const l = window.performance.now(), c = e.__v_emitter;
|
|
2066
|
-
c &&
|
|
2066
|
+
c && a && c.emit("message-evaluation", {
|
|
2067
2067
|
type: "message-evaluation",
|
|
2068
2068
|
value: o,
|
|
2069
|
-
time: l -
|
|
2069
|
+
time: l - a,
|
|
2070
2070
|
groupId: `translate:${t.key}`
|
|
2071
|
-
}),
|
|
2071
|
+
}), s && r && ne && ve && (ne(r), ve("intlify message evaluation", s, r));
|
|
2072
2072
|
}
|
|
2073
2073
|
return o;
|
|
2074
2074
|
}
|
|
2075
2075
|
function Vt(...e) {
|
|
2076
|
-
const [t, n,
|
|
2077
|
-
if (!I(t) && !j(t) && !ae(t) && !
|
|
2078
|
-
throw
|
|
2076
|
+
const [t, n, a] = e, s = $();
|
|
2077
|
+
if (!I(t) && !j(t) && !ae(t) && !se(t))
|
|
2078
|
+
throw de(Z.INVALID_ARGUMENT);
|
|
2079
2079
|
const r = j(t) ? String(t) : (ae(t), t);
|
|
2080
|
-
return j(n) ?
|
|
2080
|
+
return j(n) ? s.plural = n : I(n) ? s.default = n : R(n) && !ct(n) ? s.named = n : K(n) && (s.list = n), j(a) ? s.plural = a : I(a) ? s.default = a : R(a) && Q(s, a), [r, s];
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function Ar(e, t, n, a, s, r) {
|
|
2083
2083
|
return {
|
|
2084
2084
|
locale: t,
|
|
2085
2085
|
key: n,
|
|
2086
|
-
warnHtmlMessage:
|
|
2086
|
+
warnHtmlMessage: s,
|
|
2087
2087
|
onError: (o) => {
|
|
2088
2088
|
if (r && r(o), process.env.NODE_ENV !== "production") {
|
|
2089
|
-
const l =
|
|
2089
|
+
const l = Sr(a), c = `Message compilation error: ${o.message}`, _ = o.location && l && za(l, o.location.start.offset, o.location.end.offset), T = e.__v_emitter;
|
|
2090
2090
|
T && l && T.emit("compile-error", {
|
|
2091
2091
|
message: l,
|
|
2092
2092
|
error: o.message,
|
|
@@ -2098,74 +2098,74 @@ ${_}` : c);
|
|
|
2098
2098
|
} else
|
|
2099
2099
|
throw o;
|
|
2100
2100
|
},
|
|
2101
|
-
onCacheKey: (o) =>
|
|
2101
|
+
onCacheKey: (o) => Ba(t, n, o)
|
|
2102
2102
|
};
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function Sr(e) {
|
|
2105
2105
|
if (I(e))
|
|
2106
2106
|
return e;
|
|
2107
2107
|
if (e.loc && e.loc.source)
|
|
2108
2108
|
return e.loc.source;
|
|
2109
2109
|
}
|
|
2110
|
-
function Cr(e, t, n,
|
|
2111
|
-
const { modifiers:
|
|
2110
|
+
function Cr(e, t, n, a) {
|
|
2111
|
+
const { modifiers: s, pluralRules: r, messageResolver: o, fallbackLocale: l, fallbackWarn: c, missingWarn: _, fallbackContext: T } = e, E = {
|
|
2112
2112
|
locale: t,
|
|
2113
|
-
modifiers:
|
|
2113
|
+
modifiers: s,
|
|
2114
2114
|
pluralRules: r,
|
|
2115
|
-
messages: (
|
|
2116
|
-
let y = o(n,
|
|
2115
|
+
messages: (A, C) => {
|
|
2116
|
+
let y = o(n, A);
|
|
2117
2117
|
if (y == null && (T || C)) {
|
|
2118
|
-
const [, ,
|
|
2118
|
+
const [, , S] = Ea(
|
|
2119
2119
|
T || e,
|
|
2120
2120
|
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2121
|
-
|
|
2121
|
+
A,
|
|
2122
2122
|
t,
|
|
2123
2123
|
l,
|
|
2124
2124
|
c,
|
|
2125
2125
|
_
|
|
2126
2126
|
);
|
|
2127
|
-
y = o(
|
|
2127
|
+
y = o(S, A);
|
|
2128
2128
|
}
|
|
2129
|
-
if (I(y) ||
|
|
2130
|
-
let
|
|
2131
|
-
const d =
|
|
2132
|
-
|
|
2129
|
+
if (I(y) || se(y)) {
|
|
2130
|
+
let S = !1;
|
|
2131
|
+
const d = pa(e, A, t, y, A, () => {
|
|
2132
|
+
S = !0;
|
|
2133
2133
|
});
|
|
2134
|
-
return
|
|
2135
|
-
} else return ae(y) ? y :
|
|
2134
|
+
return S ? kn : d;
|
|
2135
|
+
} else return ae(y) ? y : kn;
|
|
2136
2136
|
}
|
|
2137
2137
|
};
|
|
2138
|
-
return e.processor && (E.processor = e.processor),
|
|
2138
|
+
return e.processor && (E.processor = e.processor), a.list && (E.list = a.list), a.named && (E.named = a.named), j(a.plural) && (E.pluralIndex = a.plural), E;
|
|
2139
2139
|
}
|
|
2140
|
-
|
|
2140
|
+
Cs();
|
|
2141
2141
|
function Dr() {
|
|
2142
|
-
return
|
|
2142
|
+
return ha().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
2143
2143
|
}
|
|
2144
|
-
function
|
|
2144
|
+
function ha() {
|
|
2145
2145
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
2146
2146
|
}
|
|
2147
2147
|
const kr = typeof Proxy == "function", Pr = "devtools-plugin:setup", Rr = "plugin:settings:set";
|
|
2148
|
-
let
|
|
2148
|
+
let Pe, $t;
|
|
2149
2149
|
function Mr() {
|
|
2150
2150
|
var e;
|
|
2151
|
-
return
|
|
2151
|
+
return Pe !== void 0 || (typeof window < "u" && window.performance ? (Pe = !0, $t = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (Pe = !0, $t = globalThis.perf_hooks.performance) : Pe = !1), Pe;
|
|
2152
2152
|
}
|
|
2153
2153
|
function Fr() {
|
|
2154
|
-
return Mr() ?
|
|
2154
|
+
return Mr() ? $t.now() : Date.now();
|
|
2155
2155
|
}
|
|
2156
2156
|
class wr {
|
|
2157
2157
|
constructor(t, n) {
|
|
2158
2158
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
2159
|
-
const
|
|
2159
|
+
const a = {};
|
|
2160
2160
|
if (t.settings)
|
|
2161
2161
|
for (const o in t.settings) {
|
|
2162
2162
|
const l = t.settings[o];
|
|
2163
|
-
|
|
2163
|
+
a[o] = l.defaultValue;
|
|
2164
2164
|
}
|
|
2165
|
-
const
|
|
2166
|
-
let r = Object.assign({},
|
|
2165
|
+
const s = `__vue-devtools-plugin-settings__${t.id}`;
|
|
2166
|
+
let r = Object.assign({}, a);
|
|
2167
2167
|
try {
|
|
2168
|
-
const o = localStorage.getItem(
|
|
2168
|
+
const o = localStorage.getItem(s), l = JSON.parse(o);
|
|
2169
2169
|
Object.assign(r, l);
|
|
2170
2170
|
} catch {
|
|
2171
2171
|
}
|
|
@@ -2175,7 +2175,7 @@ class wr {
|
|
|
2175
2175
|
},
|
|
2176
2176
|
setSettings(o) {
|
|
2177
2177
|
try {
|
|
2178
|
-
localStorage.setItem(
|
|
2178
|
+
localStorage.setItem(s, JSON.stringify(o));
|
|
2179
2179
|
} catch {
|
|
2180
2180
|
}
|
|
2181
2181
|
r = o;
|
|
@@ -2216,12 +2216,12 @@ class wr {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
2218
|
function Ur(e, t) {
|
|
2219
|
-
const n = e,
|
|
2220
|
-
if (
|
|
2221
|
-
|
|
2219
|
+
const n = e, a = ha(), s = Dr(), r = kr && n.enableEarlyProxy;
|
|
2220
|
+
if (s && (a.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
2221
|
+
s.emit(Pr, e, t);
|
|
2222
2222
|
else {
|
|
2223
|
-
const o = r ? new wr(n,
|
|
2224
|
-
(
|
|
2223
|
+
const o = r ? new wr(n, s) : null;
|
|
2224
|
+
(a.__VUE_DEVTOOLS_PLUGINS__ = a.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
2225
2225
|
pluginDescriptor: n,
|
|
2226
2226
|
setupFn: t,
|
|
2227
2227
|
proxy: o
|
|
@@ -2234,12 +2234,12 @@ function Ur(e, t) {
|
|
|
2234
2234
|
* Released under the MIT License.
|
|
2235
2235
|
*/
|
|
2236
2236
|
const Vr = "11.1.3";
|
|
2237
|
-
function
|
|
2238
|
-
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (
|
|
2237
|
+
function $r() {
|
|
2238
|
+
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ie().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ie().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ie().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ie().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
2239
2239
|
}
|
|
2240
|
-
const
|
|
2240
|
+
const x = {
|
|
2241
2241
|
// composer module errors
|
|
2242
|
-
UNEXPECTED_RETURN_TYPE:
|
|
2242
|
+
UNEXPECTED_RETURN_TYPE: Bs,
|
|
2243
2243
|
// 24
|
|
2244
2244
|
// legacy module errors
|
|
2245
2245
|
INVALID_ARGUMENT: 25,
|
|
@@ -2259,22 +2259,22 @@ const G = {
|
|
|
2259
2259
|
// Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
|
|
2260
2260
|
NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
|
|
2261
2261
|
};
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2262
|
+
function te(e, ...t) {
|
|
2263
|
+
return we(e, null, process.env.NODE_ENV !== "production" ? { messages: Wr, args: t } : void 0);
|
|
2264
2264
|
}
|
|
2265
2265
|
const Wr = {
|
|
2266
|
-
[
|
|
2267
|
-
[
|
|
2268
|
-
[
|
|
2269
|
-
[
|
|
2270
|
-
[
|
|
2271
|
-
[
|
|
2272
|
-
[
|
|
2273
|
-
[
|
|
2274
|
-
[
|
|
2275
|
-
[
|
|
2276
|
-
[
|
|
2277
|
-
}, Wt = /* @__PURE__ */
|
|
2266
|
+
[x.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
|
|
2267
|
+
[x.INVALID_ARGUMENT]: "Invalid argument",
|
|
2268
|
+
[x.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
|
|
2269
|
+
[x.NOT_INSTALLED]: "Need to install with `app.use` function",
|
|
2270
|
+
[x.UNEXPECTED_ERROR]: "Unexpected error",
|
|
2271
|
+
[x.REQUIRED_VALUE]: "Required in value: {0}",
|
|
2272
|
+
[x.INVALID_VALUE]: "Invalid value",
|
|
2273
|
+
[x.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
|
|
2274
|
+
[x.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
2275
|
+
[x.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
2276
|
+
[x.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
2277
|
+
}, Wt = /* @__PURE__ */ fe("__translateVNode"), xt = /* @__PURE__ */ fe("__datetimeParts"), Gt = /* @__PURE__ */ fe("__numberParts"), Ae = /* @__PURE__ */ fe("__enableEmitter"), Je = /* @__PURE__ */ fe("__disableEmitter"), Na = fe("__setPluralRules"), Ta = /* @__PURE__ */ fe("__injectWithOption"), Yt = /* @__PURE__ */ fe("__dispose"), ue = {
|
|
2278
2278
|
FALLBACK_TO_ROOT: rr,
|
|
2279
2279
|
// 8
|
|
2280
2280
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
@@ -2287,76 +2287,76 @@ const Wr = {
|
|
|
2287
2287
|
* @deprecated will be removed at vue-i18n v12
|
|
2288
2288
|
*/
|
|
2289
2289
|
DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12
|
|
2290
|
-
},
|
|
2291
|
-
[
|
|
2292
|
-
[
|
|
2293
|
-
[
|
|
2290
|
+
}, xr = {
|
|
2291
|
+
[ue.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
|
|
2292
|
+
[ue.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
|
|
2293
|
+
[ue.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
|
|
2294
2294
|
/**
|
|
2295
2295
|
* @deprecated will be removed at vue-i18n v12
|
|
2296
2296
|
*/
|
|
2297
|
-
[
|
|
2297
|
+
[ue.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
2298
2298
|
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
|
|
2299
2299
|
/**
|
|
2300
2300
|
* @deprecated will be removed at vue-i18n v12
|
|
2301
2301
|
*/
|
|
2302
|
-
[
|
|
2302
|
+
[ue.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."
|
|
2303
2303
|
};
|
|
2304
|
-
function
|
|
2305
|
-
return
|
|
2304
|
+
function Ze(e, ...t) {
|
|
2305
|
+
return it(xr[e], ...t);
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2308
|
-
if (!M(e) ||
|
|
2307
|
+
function Qe(e) {
|
|
2308
|
+
if (!M(e) || se(e))
|
|
2309
2309
|
return e;
|
|
2310
2310
|
for (const t in e)
|
|
2311
|
-
if (
|
|
2311
|
+
if (le(e, t))
|
|
2312
2312
|
if (!t.includes("."))
|
|
2313
|
-
M(e[t]) &&
|
|
2313
|
+
M(e[t]) && Qe(e[t]);
|
|
2314
2314
|
else {
|
|
2315
|
-
const n = t.split("."),
|
|
2316
|
-
let
|
|
2317
|
-
for (let o = 0; o <
|
|
2315
|
+
const n = t.split("."), a = n.length - 1;
|
|
2316
|
+
let s = e, r = !1;
|
|
2317
|
+
for (let o = 0; o < a; o++) {
|
|
2318
2318
|
if (n[o] === "__proto__")
|
|
2319
2319
|
throw new Error(`unsafe key: ${n[o]}`);
|
|
2320
|
-
if (n[o] in
|
|
2321
|
-
process.env.NODE_ENV !== "production" &&
|
|
2320
|
+
if (n[o] in s || (s[n[o]] = $()), !M(s[n[o]])) {
|
|
2321
|
+
process.env.NODE_ENV !== "production" && Ee(Ze(ue.IGNORE_OBJ_FLATTEN, {
|
|
2322
2322
|
key: n[o]
|
|
2323
2323
|
})), r = !0;
|
|
2324
2324
|
break;
|
|
2325
2325
|
}
|
|
2326
|
-
|
|
2326
|
+
s = s[n[o]];
|
|
2327
2327
|
}
|
|
2328
|
-
if (r || (
|
|
2329
|
-
const o =
|
|
2330
|
-
M(o) &&
|
|
2328
|
+
if (r || (se(s) ? sa.includes(n[a]) || delete e[t] : (s[n[a]] = e[t], delete e[t])), !se(s)) {
|
|
2329
|
+
const o = s[n[a]];
|
|
2330
|
+
M(o) && Qe(o);
|
|
2331
2331
|
}
|
|
2332
2332
|
}
|
|
2333
2333
|
return e;
|
|
2334
2334
|
}
|
|
2335
2335
|
function tn(e, t) {
|
|
2336
|
-
const { messages: n, __i18n:
|
|
2337
|
-
if (
|
|
2336
|
+
const { messages: n, __i18n: a, messageResolver: s, flatJson: r } = t, o = R(n) ? n : K(a) ? $() : { [e]: $() };
|
|
2337
|
+
if (K(a) && a.forEach((l) => {
|
|
2338
2338
|
if ("locale" in l && "resource" in l) {
|
|
2339
2339
|
const { locale: c, resource: _ } = l;
|
|
2340
|
-
c ? (o[c] = o[c] ||
|
|
2340
|
+
c ? (o[c] = o[c] || $(), rt(_, o[c])) : rt(_, o);
|
|
2341
2341
|
} else
|
|
2342
2342
|
I(l) && rt(JSON.parse(l), o);
|
|
2343
|
-
}),
|
|
2343
|
+
}), s == null && r)
|
|
2344
2344
|
for (const l in o)
|
|
2345
|
-
|
|
2345
|
+
le(o, l) && Qe(o[l]);
|
|
2346
2346
|
return o;
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function La(e) {
|
|
2349
2349
|
return e.type;
|
|
2350
2350
|
}
|
|
2351
|
-
function
|
|
2352
|
-
let
|
|
2353
|
-
"__i18nGlobal" in n && (
|
|
2354
|
-
messages:
|
|
2351
|
+
function ba(e, t, n) {
|
|
2352
|
+
let a = M(t.messages) ? t.messages : $();
|
|
2353
|
+
"__i18nGlobal" in n && (a = tn(e.locale.value, {
|
|
2354
|
+
messages: a,
|
|
2355
2355
|
__i18n: n.__i18nGlobal
|
|
2356
2356
|
}));
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2359
|
-
e.mergeLocaleMessage(r,
|
|
2357
|
+
const s = Object.keys(a);
|
|
2358
|
+
s.length && s.forEach((r) => {
|
|
2359
|
+
e.mergeLocaleMessage(r, a[r]);
|
|
2360
2360
|
});
|
|
2361
2361
|
{
|
|
2362
2362
|
if (M(t.datetimeFormats)) {
|
|
@@ -2373,48 +2373,48 @@ function Os(e, t, n) {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2376
|
+
function Rn(e) {
|
|
2377
|
+
return q($a, null, e, 0);
|
|
2378
2378
|
}
|
|
2379
|
-
const
|
|
2380
|
-
let
|
|
2381
|
-
function
|
|
2382
|
-
return (t, n,
|
|
2379
|
+
const Mn = "__INTLIFY_META__", Fn = () => [], Gr = () => !1;
|
|
2380
|
+
let wn = 0;
|
|
2381
|
+
function Un(e) {
|
|
2382
|
+
return (t, n, a, s) => e(n, a, Ke() || void 0, s);
|
|
2383
2383
|
}
|
|
2384
|
-
const
|
|
2385
|
-
const e =
|
|
2384
|
+
const Yr = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
2385
|
+
const e = Ke();
|
|
2386
2386
|
let t = null;
|
|
2387
|
-
return e && (t =
|
|
2387
|
+
return e && (t = La(e)[Mn]) ? { [Mn]: t } : null;
|
|
2388
2388
|
};
|
|
2389
2389
|
function nn(e = {}) {
|
|
2390
|
-
const { __root: t, __injectWithOption: n } = e,
|
|
2390
|
+
const { __root: t, __injectWithOption: n } = e, a = t === void 0, s = e.flatJson, r = ie ? wa : Ua;
|
|
2391
2391
|
let o = F(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2392
2392
|
const l = r(
|
|
2393
2393
|
// prettier-ignore
|
|
2394
|
-
t && o ? t.locale.value : I(e.locale) ? e.locale :
|
|
2394
|
+
t && o ? t.locale.value : I(e.locale) ? e.locale : Xe
|
|
2395
2395
|
), c = r(
|
|
2396
2396
|
// prettier-ignore
|
|
2397
|
-
t && o ? t.fallbackLocale.value : I(e.fallbackLocale) ||
|
|
2397
|
+
t && o ? t.fallbackLocale.value : I(e.fallbackLocale) || K(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l.value
|
|
2398
2398
|
), _ = r(tn(l.value, e)), T = r(R(e.datetimeFormats) ? e.datetimeFormats : { [l.value]: {} }), h = r(R(e.numberFormats) ? e.numberFormats : { [l.value]: {} });
|
|
2399
|
-
let E = t ? t.missingWarn : F(e.missingWarn) ||
|
|
2400
|
-
const
|
|
2399
|
+
let E = t ? t.missingWarn : F(e.missingWarn) || Me(e.missingWarn) ? e.missingWarn : !0, A = t ? t.fallbackWarn : F(e.fallbackWarn) || Me(e.fallbackWarn) ? e.fallbackWarn : !0, C = t ? t.fallbackRoot : F(e.fallbackRoot) ? e.fallbackRoot : !0, y = !!e.fallbackFormat, S = W(e.missing) ? e.missing : null, f = W(e.missing) ? Un(e.missing) : null, d = W(e.postTranslation) ? e.postTranslation : null, b = t ? t.warnHtmlMessage : F(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, g = !!e.escapeParameter;
|
|
2400
|
+
const O = t ? t.modifiers : R(e.modifiers) ? e.modifiers : {};
|
|
2401
2401
|
let v = e.pluralRules || t && t.pluralRules, p;
|
|
2402
2402
|
p = (() => {
|
|
2403
|
-
|
|
2403
|
+
a && On(null);
|
|
2404
2404
|
const m = {
|
|
2405
2405
|
version: Vr,
|
|
2406
2406
|
locale: l.value,
|
|
2407
2407
|
fallbackLocale: c.value,
|
|
2408
2408
|
messages: _.value,
|
|
2409
|
-
modifiers:
|
|
2409
|
+
modifiers: O,
|
|
2410
2410
|
pluralRules: v,
|
|
2411
2411
|
missing: f === null ? void 0 : f,
|
|
2412
2412
|
missingWarn: E,
|
|
2413
|
-
fallbackWarn:
|
|
2413
|
+
fallbackWarn: A,
|
|
2414
2414
|
fallbackFormat: y,
|
|
2415
2415
|
unresolving: !0,
|
|
2416
2416
|
postTranslation: d === null ? void 0 : d,
|
|
2417
|
-
warnHtmlMessage:
|
|
2417
|
+
warnHtmlMessage: b,
|
|
2418
2418
|
escapeParameter: g,
|
|
2419
2419
|
messageResolver: e.messageResolver,
|
|
2420
2420
|
messageCompiler: e.messageCompiler,
|
|
@@ -2422,8 +2422,8 @@ function nn(e = {}) {
|
|
|
2422
2422
|
};
|
|
2423
2423
|
m.datetimeFormats = T.value, m.numberFormats = h.value, m.__datetimeFormatters = R(p) ? p.__datetimeFormatters : void 0, m.__numberFormatters = R(p) ? p.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (m.__v_emitter = R(p) ? p.__v_emitter : void 0);
|
|
2424
2424
|
const L = gr(m);
|
|
2425
|
-
return
|
|
2426
|
-
})(),
|
|
2425
|
+
return a && On(L), L;
|
|
2426
|
+
})(), Ye(p, l.value, c.value);
|
|
2427
2427
|
function U() {
|
|
2428
2428
|
return [
|
|
2429
2429
|
l.value,
|
|
@@ -2433,138 +2433,138 @@ function nn(e = {}) {
|
|
|
2433
2433
|
h.value
|
|
2434
2434
|
];
|
|
2435
2435
|
}
|
|
2436
|
-
const X =
|
|
2436
|
+
const X = xe({
|
|
2437
2437
|
get: () => l.value,
|
|
2438
2438
|
set: (m) => {
|
|
2439
2439
|
p.locale = m, l.value = m;
|
|
2440
2440
|
}
|
|
2441
|
-
}),
|
|
2441
|
+
}), re = xe({
|
|
2442
2442
|
get: () => c.value,
|
|
2443
2443
|
set: (m) => {
|
|
2444
|
-
p.fallbackLocale = m, c.value = m,
|
|
2444
|
+
p.fallbackLocale = m, c.value = m, Ye(p, l.value, m);
|
|
2445
2445
|
}
|
|
2446
|
-
}), J =
|
|
2447
|
-
function
|
|
2446
|
+
}), J = xe(() => _.value), Se = /* @__PURE__ */ xe(() => T.value), mt = /* @__PURE__ */ xe(() => h.value);
|
|
2447
|
+
function dt() {
|
|
2448
2448
|
return W(d) ? d : null;
|
|
2449
2449
|
}
|
|
2450
|
-
function
|
|
2450
|
+
function gt(m) {
|
|
2451
2451
|
d = m, p.postTranslation = m;
|
|
2452
2452
|
}
|
|
2453
|
-
function
|
|
2454
|
-
return
|
|
2453
|
+
function Et() {
|
|
2454
|
+
return S;
|
|
2455
2455
|
}
|
|
2456
|
-
function
|
|
2457
|
-
m !== null && (f =
|
|
2456
|
+
function pt(m) {
|
|
2457
|
+
m !== null && (f = Un(m)), S = m, p.missing = f;
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function ht(m, L) {
|
|
2460
2460
|
return m !== "translate" || !L.resolvedMessage;
|
|
2461
2461
|
}
|
|
2462
|
-
const
|
|
2462
|
+
const _e = (m, L, V, H, Te, et) => {
|
|
2463
2463
|
U();
|
|
2464
|
-
let
|
|
2464
|
+
let Ce;
|
|
2465
2465
|
try {
|
|
2466
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__,
|
|
2466
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (p.fallbackContext = t ? dr() : void 0), Ce = m(p);
|
|
2467
2467
|
} finally {
|
|
2468
|
-
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__,
|
|
2468
|
+
process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, a || (p.fallbackContext = void 0);
|
|
2469
2469
|
}
|
|
2470
2470
|
if (V !== "translate exists" && // for not `te` (e.g `t`)
|
|
2471
|
-
j(
|
|
2472
|
-
const [
|
|
2473
|
-
if (process.env.NODE_ENV !== "production" && t && I(
|
|
2474
|
-
key:
|
|
2471
|
+
j(Ce) && Ce === ut || V === "translate exists" && !Ce) {
|
|
2472
|
+
const [Le, Da] = L();
|
|
2473
|
+
if (process.env.NODE_ENV !== "production" && t && I(Le) && ht(V, Da) && (C && (ft(A, Le) || fa(E, Le)) && Ee(Ze(ue.FALLBACK_TO_ROOT, {
|
|
2474
|
+
key: Le,
|
|
2475
2475
|
type: V
|
|
2476
2476
|
})), process.env.NODE_ENV !== "production")) {
|
|
2477
2477
|
const { __v_emitter: ln } = p;
|
|
2478
2478
|
ln && C && ln.emit("fallback", {
|
|
2479
2479
|
type: V,
|
|
2480
|
-
key:
|
|
2480
|
+
key: Le,
|
|
2481
2481
|
to: "global",
|
|
2482
|
-
groupId: `${V}:${
|
|
2482
|
+
groupId: `${V}:${Le}`
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
2485
|
-
return t && C ? H(t) :
|
|
2485
|
+
return t && C ? H(t) : Te(Le);
|
|
2486
2486
|
} else {
|
|
2487
|
-
if (
|
|
2488
|
-
return
|
|
2489
|
-
throw
|
|
2487
|
+
if (et(Ce))
|
|
2488
|
+
return Ce;
|
|
2489
|
+
throw te(x.UNEXPECTED_RETURN_TYPE);
|
|
2490
2490
|
}
|
|
2491
2491
|
};
|
|
2492
|
-
function
|
|
2493
|
-
return
|
|
2492
|
+
function Ue(...m) {
|
|
2493
|
+
return _e((L) => Reflect.apply(Pn, null, [L, ...m]), () => Vt(...m), "translate", (L) => Reflect.apply(L.t, L, [...m]), (L) => L, (L) => I(L));
|
|
2494
2494
|
}
|
|
2495
|
-
function
|
|
2495
|
+
function Nt(...m) {
|
|
2496
2496
|
const [L, V, H] = m;
|
|
2497
2497
|
if (H && !M(H))
|
|
2498
|
-
throw
|
|
2499
|
-
return
|
|
2500
|
-
}
|
|
2501
|
-
function Nt(...m) {
|
|
2502
|
-
return me((L) => Reflect.apply(vn, null, [L, ...m]), () => wt(...m), "datetime format", (L) => Reflect.apply(L.d, L, [...m]), () => ot, (L) => I(L));
|
|
2498
|
+
throw te(x.INVALID_ARGUMENT);
|
|
2499
|
+
return Ue(L, V, Q({ resolvedMessage: !0 }, H || {}));
|
|
2503
2500
|
}
|
|
2504
2501
|
function Tt(...m) {
|
|
2505
|
-
return
|
|
2502
|
+
return _e((L) => Reflect.apply(yn, null, [L, ...m]), () => wt(...m), "datetime format", (L) => Reflect.apply(L.d, L, [...m]), () => ot, (L) => I(L));
|
|
2506
2503
|
}
|
|
2507
|
-
function Lt(m) {
|
|
2508
|
-
return
|
|
2504
|
+
function Lt(...m) {
|
|
2505
|
+
return _e((L) => Reflect.apply(Sn, null, [L, ...m]), () => Ut(...m), "number format", (L) => Reflect.apply(L.n, L, [...m]), () => ot, (L) => I(L));
|
|
2506
|
+
}
|
|
2507
|
+
function bt(m) {
|
|
2508
|
+
return m.map((L) => I(L) || j(L) || F(L) ? Rn(String(L)) : L);
|
|
2509
2509
|
}
|
|
2510
2510
|
const Ot = {
|
|
2511
|
-
normalize:
|
|
2511
|
+
normalize: bt,
|
|
2512
2512
|
interpolate: (m) => m,
|
|
2513
2513
|
type: "vnode"
|
|
2514
2514
|
};
|
|
2515
|
-
function
|
|
2516
|
-
return
|
|
2515
|
+
function ze(...m) {
|
|
2516
|
+
return _e((L) => {
|
|
2517
2517
|
let V;
|
|
2518
2518
|
const H = L;
|
|
2519
2519
|
try {
|
|
2520
|
-
H.processor = Ot, V = Reflect.apply(
|
|
2520
|
+
H.processor = Ot, V = Reflect.apply(Pn, null, [H, ...m]);
|
|
2521
2521
|
} finally {
|
|
2522
2522
|
H.processor = null;
|
|
2523
2523
|
}
|
|
2524
2524
|
return V;
|
|
2525
|
-
}, () => Vt(...m), "translate", (L) => L[Wt](...m), (L) => [
|
|
2526
|
-
}
|
|
2527
|
-
function bt(...m) {
|
|
2528
|
-
return me((L) => Reflect.apply(Sn, null, [L, ...m]), () => Ut(...m), "number format", (L) => L[Gt](...m), Mn, (L) => I(L) || B(L));
|
|
2525
|
+
}, () => Vt(...m), "translate", (L) => L[Wt](...m), (L) => [Rn(L)], (L) => K(L));
|
|
2529
2526
|
}
|
|
2530
2527
|
function It(...m) {
|
|
2531
|
-
return
|
|
2528
|
+
return _e((L) => Reflect.apply(Sn, null, [L, ...m]), () => Ut(...m), "number format", (L) => L[Gt](...m), Fn, (L) => I(L) || K(L));
|
|
2532
2529
|
}
|
|
2533
|
-
function vt(m) {
|
|
2530
|
+
function vt(...m) {
|
|
2531
|
+
return _e((L) => Reflect.apply(yn, null, [L, ...m]), () => wt(...m), "datetime format", (L) => L[xt](...m), Fn, (L) => I(L) || K(L));
|
|
2532
|
+
}
|
|
2533
|
+
function yt(m) {
|
|
2534
2534
|
v = m, p.pluralRules = v;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2537
|
-
return
|
|
2536
|
+
function At(m, L) {
|
|
2537
|
+
return _e(() => {
|
|
2538
2538
|
if (!m)
|
|
2539
2539
|
return !1;
|
|
2540
|
-
const V = I(L) ? L : l.value, H =
|
|
2541
|
-
return
|
|
2540
|
+
const V = I(L) ? L : l.value, H = Ne(V), Te = p.messageResolver(H, m);
|
|
2541
|
+
return se(Te) || ae(Te) || I(Te);
|
|
2542
2542
|
}, () => [m], "translate exists", (V) => Reflect.apply(V.te, V, [m, L]), Gr, (V) => F(V));
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function Ve(m) {
|
|
2545
2545
|
let L = null;
|
|
2546
|
-
const V =
|
|
2546
|
+
const V = ra(p, c.value, l.value);
|
|
2547
2547
|
for (let H = 0; H < V.length; H++) {
|
|
2548
|
-
const
|
|
2549
|
-
if (
|
|
2550
|
-
L =
|
|
2548
|
+
const Te = _.value[V[H]] || {}, et = p.messageResolver(Te, m);
|
|
2549
|
+
if (et != null) {
|
|
2550
|
+
L = et;
|
|
2551
2551
|
break;
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
return L;
|
|
2555
2555
|
}
|
|
2556
2556
|
function $e(m) {
|
|
2557
|
-
const L =
|
|
2557
|
+
const L = Ve(m);
|
|
2558
2558
|
return L ?? (t ? t.tm(m) || {} : {});
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Ne(m) {
|
|
2561
2561
|
return _.value[m] || {};
|
|
2562
2562
|
}
|
|
2563
|
-
function
|
|
2564
|
-
if (
|
|
2563
|
+
function We(m, L) {
|
|
2564
|
+
if (s) {
|
|
2565
2565
|
const V = { [m]: L };
|
|
2566
2566
|
for (const H in V)
|
|
2567
|
-
|
|
2567
|
+
le(V, H) && Qe(V[H]);
|
|
2568
2568
|
L = V[m];
|
|
2569
2569
|
}
|
|
2570
2570
|
_.value[m] = L, p.messages = _.value;
|
|
@@ -2572,56 +2572,56 @@ function nn(e = {}) {
|
|
|
2572
2572
|
function St(m, L) {
|
|
2573
2573
|
_.value[m] = _.value[m] || {};
|
|
2574
2574
|
const V = { [m]: L };
|
|
2575
|
-
if (
|
|
2575
|
+
if (s)
|
|
2576
2576
|
for (const H in V)
|
|
2577
|
-
|
|
2577
|
+
le(V, H) && Qe(V[H]);
|
|
2578
2578
|
L = V[m], rt(L, _.value[m]), p.messages = _.value;
|
|
2579
2579
|
}
|
|
2580
2580
|
function i(m) {
|
|
2581
2581
|
return T.value[m] || {};
|
|
2582
2582
|
}
|
|
2583
2583
|
function u(m, L) {
|
|
2584
|
-
T.value[m] = L, p.datetimeFormats = T.value,
|
|
2584
|
+
T.value[m] = L, p.datetimeFormats = T.value, An(p, m, L);
|
|
2585
2585
|
}
|
|
2586
2586
|
function N(m, L) {
|
|
2587
|
-
T.value[m] = Q(T.value[m] || {}, L), p.datetimeFormats = T.value,
|
|
2587
|
+
T.value[m] = Q(T.value[m] || {}, L), p.datetimeFormats = T.value, An(p, m, L);
|
|
2588
2588
|
}
|
|
2589
2589
|
function D(m) {
|
|
2590
2590
|
return h.value[m] || {};
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2593
|
-
h.value[m] = L, p.numberFormats = h.value,
|
|
2592
|
+
function G(m, L) {
|
|
2593
|
+
h.value[m] = L, p.numberFormats = h.value, Cn(p, m, L);
|
|
2594
2594
|
}
|
|
2595
2595
|
function Y(m, L) {
|
|
2596
|
-
h.value[m] = Q(h.value[m] || {}, L), p.numberFormats = h.value,
|
|
2596
|
+
h.value[m] = Q(h.value[m] || {}, L), p.numberFormats = h.value, Cn(p, m, L);
|
|
2597
2597
|
}
|
|
2598
|
-
|
|
2599
|
-
o && (l.value = m, p.locale = m,
|
|
2600
|
-
}),
|
|
2601
|
-
o && (c.value = m, p.fallbackLocale = m,
|
|
2598
|
+
wn++, t && ie && (Rt(t.locale, (m) => {
|
|
2599
|
+
o && (l.value = m, p.locale = m, Ye(p, l.value, c.value));
|
|
2600
|
+
}), Rt(t.fallbackLocale, (m) => {
|
|
2601
|
+
o && (c.value = m, p.fallbackLocale = m, Ye(p, l.value, c.value));
|
|
2602
2602
|
}));
|
|
2603
2603
|
const w = {
|
|
2604
|
-
id:
|
|
2604
|
+
id: wn,
|
|
2605
2605
|
locale: X,
|
|
2606
|
-
fallbackLocale:
|
|
2606
|
+
fallbackLocale: re,
|
|
2607
2607
|
get inheritLocale() {
|
|
2608
2608
|
return o;
|
|
2609
2609
|
},
|
|
2610
2610
|
set inheritLocale(m) {
|
|
2611
|
-
o = m, m && t && (l.value = t.locale.value, c.value = t.fallbackLocale.value,
|
|
2611
|
+
o = m, m && t && (l.value = t.locale.value, c.value = t.fallbackLocale.value, Ye(p, l.value, c.value));
|
|
2612
2612
|
},
|
|
2613
2613
|
get availableLocales() {
|
|
2614
2614
|
return Object.keys(_.value).sort();
|
|
2615
2615
|
},
|
|
2616
2616
|
messages: J,
|
|
2617
2617
|
get modifiers() {
|
|
2618
|
-
return
|
|
2618
|
+
return O;
|
|
2619
2619
|
},
|
|
2620
2620
|
get pluralRules() {
|
|
2621
2621
|
return v || {};
|
|
2622
2622
|
},
|
|
2623
2623
|
get isGlobal() {
|
|
2624
|
-
return
|
|
2624
|
+
return a;
|
|
2625
2625
|
},
|
|
2626
2626
|
get missingWarn() {
|
|
2627
2627
|
return E;
|
|
@@ -2630,10 +2630,10 @@ function nn(e = {}) {
|
|
|
2630
2630
|
E = m, p.missingWarn = E;
|
|
2631
2631
|
},
|
|
2632
2632
|
get fallbackWarn() {
|
|
2633
|
-
return
|
|
2633
|
+
return A;
|
|
2634
2634
|
},
|
|
2635
2635
|
set fallbackWarn(m) {
|
|
2636
|
-
|
|
2636
|
+
A = m, p.fallbackWarn = A;
|
|
2637
2637
|
},
|
|
2638
2638
|
get fallbackRoot() {
|
|
2639
2639
|
return C;
|
|
@@ -2648,10 +2648,10 @@ function nn(e = {}) {
|
|
|
2648
2648
|
y = m, p.fallbackFormat = y;
|
|
2649
2649
|
},
|
|
2650
2650
|
get warnHtmlMessage() {
|
|
2651
|
-
return
|
|
2651
|
+
return b;
|
|
2652
2652
|
},
|
|
2653
2653
|
set warnHtmlMessage(m) {
|
|
2654
|
-
|
|
2654
|
+
b = m, p.warnHtmlMessage = m;
|
|
2655
2655
|
},
|
|
2656
2656
|
get escapeParameter() {
|
|
2657
2657
|
return g;
|
|
@@ -2659,99 +2659,99 @@ function nn(e = {}) {
|
|
|
2659
2659
|
set escapeParameter(m) {
|
|
2660
2660
|
g = m, p.escapeParameter = m;
|
|
2661
2661
|
},
|
|
2662
|
-
t:
|
|
2663
|
-
getLocaleMessage:
|
|
2664
|
-
setLocaleMessage:
|
|
2662
|
+
t: Ue,
|
|
2663
|
+
getLocaleMessage: Ne,
|
|
2664
|
+
setLocaleMessage: We,
|
|
2665
2665
|
mergeLocaleMessage: St,
|
|
2666
|
-
getPostTranslationHandler:
|
|
2667
|
-
setPostTranslationHandler:
|
|
2668
|
-
getMissingHandler:
|
|
2669
|
-
setMissingHandler:
|
|
2670
|
-
[
|
|
2666
|
+
getPostTranslationHandler: dt,
|
|
2667
|
+
setPostTranslationHandler: gt,
|
|
2668
|
+
getMissingHandler: Et,
|
|
2669
|
+
setMissingHandler: pt,
|
|
2670
|
+
[Na]: yt
|
|
2671
2671
|
};
|
|
2672
|
-
return w.datetimeFormats =
|
|
2672
|
+
return w.datetimeFormats = Se, w.numberFormats = mt, w.rt = Nt, w.te = At, w.tm = $e, w.d = Tt, w.n = Lt, w.getDateTimeFormat = i, w.setDateTimeFormat = u, w.mergeDateTimeFormat = N, w.getNumberFormat = D, w.setNumberFormat = G, w.mergeNumberFormat = Y, w[Ta] = n, w[Wt] = ze, w[xt] = vt, w[Gt] = It, process.env.NODE_ENV !== "production" && (w[Ae] = (m) => {
|
|
2673
2673
|
p.__v_emitter = m;
|
|
2674
|
-
}, w[
|
|
2674
|
+
}, w[Je] = () => {
|
|
2675
2675
|
p.__v_emitter = void 0;
|
|
2676
2676
|
}), w;
|
|
2677
2677
|
}
|
|
2678
|
-
const
|
|
2678
|
+
const Oa = "vue-i18n: composer properties", Pt = {
|
|
2679
2679
|
"vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
|
|
2680
2680
|
"vue-i18n-resource-inspector": "Vue I18n DevTools",
|
|
2681
2681
|
"vue-i18n-timeline": "Vue I18n"
|
|
2682
|
-
}, Yr = {
|
|
2683
|
-
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2684
2682
|
}, Hr = {
|
|
2683
|
+
"vue-i18n-resource-inspector": "Search for scopes ..."
|
|
2684
|
+
}, Kr = {
|
|
2685
2685
|
"vue-i18n-timeline": 16764185
|
|
2686
2686
|
};
|
|
2687
|
-
let
|
|
2687
|
+
let Ht;
|
|
2688
2688
|
async function Br(e, t) {
|
|
2689
|
-
return new Promise((n,
|
|
2689
|
+
return new Promise((n, a) => {
|
|
2690
2690
|
try {
|
|
2691
2691
|
Ur({
|
|
2692
2692
|
id: "vue-devtools-plugin-vue-i18n",
|
|
2693
|
-
label:
|
|
2693
|
+
label: Pt["vue-devtools-plugin-vue-i18n"],
|
|
2694
2694
|
packageName: "vue-i18n",
|
|
2695
2695
|
homepage: "https://vue-i18n.intlify.dev",
|
|
2696
2696
|
logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
|
|
2697
|
-
componentStateTypes: [
|
|
2697
|
+
componentStateTypes: [Oa],
|
|
2698
2698
|
app: e
|
|
2699
2699
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2700
|
-
}, (
|
|
2701
|
-
|
|
2700
|
+
}, (s) => {
|
|
2701
|
+
Ht = s, s.on.visitComponentTree(({ componentInstance: o, treeNode: l }) => {
|
|
2702
2702
|
jr(o, l, t);
|
|
2703
|
-
}),
|
|
2704
|
-
o.vnode.el && o.vnode.el.__VUE_I18N__ && l && (t.mode === "legacy" ? o.vnode.el.__VUE_I18N__ !== t.global.__composer &&
|
|
2705
|
-
}),
|
|
2703
|
+
}), s.on.inspectComponent(({ componentInstance: o, instanceData: l }) => {
|
|
2704
|
+
o.vnode.el && o.vnode.el.__VUE_I18N__ && l && (t.mode === "legacy" ? o.vnode.el.__VUE_I18N__ !== t.global.__composer && Vn(l, o.vnode.el.__VUE_I18N__) : Vn(l, o.vnode.el.__VUE_I18N__));
|
|
2705
|
+
}), s.addInspector({
|
|
2706
2706
|
id: "vue-i18n-resource-inspector",
|
|
2707
|
-
label:
|
|
2707
|
+
label: Pt["vue-i18n-resource-inspector"],
|
|
2708
2708
|
icon: "language",
|
|
2709
|
-
treeFilterPlaceholder:
|
|
2710
|
-
}),
|
|
2709
|
+
treeFilterPlaceholder: Hr["vue-i18n-resource-inspector"]
|
|
2710
|
+
}), s.on.getInspectorTree((o) => {
|
|
2711
2711
|
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && Zr(o, t);
|
|
2712
2712
|
});
|
|
2713
2713
|
const r = /* @__PURE__ */ new Map();
|
|
2714
|
-
|
|
2714
|
+
s.on.getInspectorState(async (o) => {
|
|
2715
2715
|
if (o.app === e && o.inspectorId === "vue-i18n-resource-inspector")
|
|
2716
|
-
if (
|
|
2716
|
+
if (s.unhighlightElement(), eo(o, t), o.nodeId === "global") {
|
|
2717
2717
|
if (!r.has(o.app)) {
|
|
2718
|
-
const [l] = await
|
|
2718
|
+
const [l] = await s.getComponentInstances(o.app);
|
|
2719
2719
|
r.set(o.app, l);
|
|
2720
2720
|
}
|
|
2721
|
-
|
|
2721
|
+
s.highlightElement(r.get(o.app));
|
|
2722
2722
|
} else {
|
|
2723
2723
|
const l = zr(o.nodeId, t);
|
|
2724
|
-
l &&
|
|
2724
|
+
l && s.highlightElement(l);
|
|
2725
2725
|
}
|
|
2726
|
-
}),
|
|
2726
|
+
}), s.on.editInspectorState((o) => {
|
|
2727
2727
|
o.app === e && o.inspectorId === "vue-i18n-resource-inspector" && no(o, t);
|
|
2728
|
-
}),
|
|
2728
|
+
}), s.addTimelineLayer({
|
|
2729
2729
|
id: "vue-i18n-timeline",
|
|
2730
|
-
label:
|
|
2731
|
-
color:
|
|
2730
|
+
label: Pt["vue-i18n-timeline"],
|
|
2731
|
+
color: Kr["vue-i18n-timeline"]
|
|
2732
2732
|
}), n(!0);
|
|
2733
2733
|
});
|
|
2734
|
-
} catch (
|
|
2735
|
-
console.error(
|
|
2734
|
+
} catch (s) {
|
|
2735
|
+
console.error(s), a(!1);
|
|
2736
2736
|
}
|
|
2737
2737
|
});
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2739
|
+
function Ia(e) {
|
|
2740
2740
|
return e.type.name || e.type.displayName || e.type.__file || "Anonymous";
|
|
2741
2741
|
}
|
|
2742
2742
|
function jr(e, t, n) {
|
|
2743
|
-
const
|
|
2744
|
-
if (e && e.vnode.el && e.vnode.el.__VUE_I18N__ && e.vnode.el.__VUE_I18N__ !==
|
|
2745
|
-
const
|
|
2746
|
-
label: `i18n (${
|
|
2743
|
+
const a = n.mode === "composition" ? n.global : n.global.__composer;
|
|
2744
|
+
if (e && e.vnode.el && e.vnode.el.__VUE_I18N__ && e.vnode.el.__VUE_I18N__ !== a) {
|
|
2745
|
+
const s = {
|
|
2746
|
+
label: `i18n (${Ia(e)} Scope)`,
|
|
2747
2747
|
textColor: 0,
|
|
2748
2748
|
backgroundColor: 16764185
|
|
2749
2749
|
};
|
|
2750
|
-
t.tags.push(
|
|
2750
|
+
t.tags.push(s);
|
|
2751
2751
|
}
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2754
|
-
const n =
|
|
2753
|
+
function Vn(e, t) {
|
|
2754
|
+
const n = Oa;
|
|
2755
2755
|
e.state.push({
|
|
2756
2756
|
type: n,
|
|
2757
2757
|
key: "locale",
|
|
@@ -2776,7 +2776,7 @@ function Un(e, t) {
|
|
|
2776
2776
|
type: n,
|
|
2777
2777
|
key: "messages",
|
|
2778
2778
|
editable: !1,
|
|
2779
|
-
value:
|
|
2779
|
+
value: an(t.messages.value)
|
|
2780
2780
|
}), e.state.push({
|
|
2781
2781
|
type: n,
|
|
2782
2782
|
key: "datetimeFormats",
|
|
@@ -2789,11 +2789,11 @@ function Un(e, t) {
|
|
|
2789
2789
|
value: t.numberFormats.value
|
|
2790
2790
|
});
|
|
2791
2791
|
}
|
|
2792
|
-
function
|
|
2792
|
+
function an(e) {
|
|
2793
2793
|
const t = {};
|
|
2794
2794
|
return Object.keys(e).forEach((n) => {
|
|
2795
|
-
const
|
|
2796
|
-
W(
|
|
2795
|
+
const a = e[n];
|
|
2796
|
+
W(a) && "source" in a ? t[n] = qr(a) : se(a) && a.loc && a.loc.source ? t[n] = a.loc.source : M(a) ? t[n] = an(a) : t[n] = a;
|
|
2797
2797
|
}), t;
|
|
2798
2798
|
}
|
|
2799
2799
|
const Xr = {
|
|
@@ -2822,39 +2822,39 @@ function Zr(e, t) {
|
|
|
2822
2822
|
label: "Global Scope"
|
|
2823
2823
|
});
|
|
2824
2824
|
const n = t.mode === "composition" ? t.global : t.global.__composer;
|
|
2825
|
-
for (const [
|
|
2826
|
-
const r = t.mode === "composition" ?
|
|
2825
|
+
for (const [a, s] of t.__instances) {
|
|
2826
|
+
const r = t.mode === "composition" ? s : s.__composer;
|
|
2827
2827
|
n !== r && e.rootNodes.push({
|
|
2828
2828
|
id: r.id.toString(),
|
|
2829
|
-
label: `${
|
|
2829
|
+
label: `${Ia(a)} Scope`
|
|
2830
2830
|
});
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
2833
|
function zr(e, t) {
|
|
2834
2834
|
let n = null;
|
|
2835
2835
|
if (e !== "global") {
|
|
2836
|
-
for (const [
|
|
2837
|
-
if (
|
|
2838
|
-
n =
|
|
2836
|
+
for (const [a, s] of t.__instances.entries())
|
|
2837
|
+
if (s.id.toString() === e) {
|
|
2838
|
+
n = a;
|
|
2839
2839
|
break;
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
2842
|
return n;
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2844
|
+
function va(e, t) {
|
|
2845
2845
|
if (e === "global")
|
|
2846
2846
|
return t.mode === "composition" ? t.global : t.global.__composer;
|
|
2847
2847
|
{
|
|
2848
|
-
const n = Array.from(t.__instances.values()).find((
|
|
2848
|
+
const n = Array.from(t.__instances.values()).find((a) => a.id.toString() === e);
|
|
2849
2849
|
return n ? t.mode === "composition" ? n : n.__composer : null;
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
2852
|
function eo(e, t) {
|
|
2853
|
-
const n =
|
|
2853
|
+
const n = va(e.nodeId, t);
|
|
2854
2854
|
return n && (e.state = to(n)), null;
|
|
2855
2855
|
}
|
|
2856
2856
|
function to(e) {
|
|
2857
|
-
const t = {}, n = "Locale related info",
|
|
2857
|
+
const t = {}, n = "Locale related info", a = [
|
|
2858
2858
|
{
|
|
2859
2859
|
type: n,
|
|
2860
2860
|
key: "locale",
|
|
@@ -2880,16 +2880,16 @@ function to(e) {
|
|
|
2880
2880
|
value: e.inheritLocale
|
|
2881
2881
|
}
|
|
2882
2882
|
];
|
|
2883
|
-
t[n] =
|
|
2884
|
-
const
|
|
2883
|
+
t[n] = a;
|
|
2884
|
+
const s = "Locale messages info", r = [
|
|
2885
2885
|
{
|
|
2886
|
-
type:
|
|
2886
|
+
type: s,
|
|
2887
2887
|
key: "messages",
|
|
2888
2888
|
editable: !1,
|
|
2889
|
-
value:
|
|
2889
|
+
value: an(e.messages.value)
|
|
2890
2890
|
}
|
|
2891
2891
|
];
|
|
2892
|
-
t[
|
|
2892
|
+
t[s] = r;
|
|
2893
2893
|
{
|
|
2894
2894
|
const o = "Datetime formats info", l = [
|
|
2895
2895
|
{
|
|
@@ -2912,10 +2912,10 @@ function to(e) {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
return t;
|
|
2914
2914
|
}
|
|
2915
|
-
function
|
|
2916
|
-
if (
|
|
2915
|
+
function qe(e, t) {
|
|
2916
|
+
if (Ht) {
|
|
2917
2917
|
let n;
|
|
2918
|
-
t && "groupId" in t && (n = t.groupId, delete t.groupId),
|
|
2918
|
+
t && "groupId" in t && (n = t.groupId, delete t.groupId), Ht.addTimelineEvent({
|
|
2919
2919
|
layerId: "vue-i18n-timeline",
|
|
2920
2920
|
event: {
|
|
2921
2921
|
title: e,
|
|
@@ -2929,32 +2929,32 @@ function Ze(e, t) {
|
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
2931
|
function no(e, t) {
|
|
2932
|
-
const n =
|
|
2932
|
+
const n = va(e.nodeId, t);
|
|
2933
2933
|
if (n) {
|
|
2934
|
-
const [
|
|
2935
|
-
|
|
2934
|
+
const [a] = e.path;
|
|
2935
|
+
a === "locale" && I(e.state.value) ? n.locale.value = e.state.value : a === "fallbackLocale" && (I(e.state.value) || K(e.state.value) || M(e.state.value)) ? n.fallbackLocale.value = e.state.value : a === "inheritLocale" && F(e.state.value) && (n.inheritLocale = e.state.value);
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
const t = I(e.locale) ? e.locale :
|
|
2938
|
+
function ao(e) {
|
|
2939
|
+
const t = I(e.locale) ? e.locale : Xe, n = I(e.fallbackLocale) || K(e.fallbackLocale) || R(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, a = W(e.missing) ? e.missing : void 0, s = F(e.silentTranslationWarn) || Me(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, r = F(e.silentFallbackWarn) || Me(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, o = F(e.fallbackRoot) ? e.fallbackRoot : !0, l = !!e.formatFallbackMessages, c = R(e.modifiers) ? e.modifiers : {}, _ = e.pluralizationRules, T = W(e.postTranslation) ? e.postTranslation : void 0, h = I(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, E = !!e.escapeParameterHtml, A = F(e.sync) ? e.sync : !0;
|
|
2940
2940
|
let C = e.messages;
|
|
2941
2941
|
if (R(e.sharedMessages)) {
|
|
2942
|
-
const
|
|
2943
|
-
C = Object.keys(
|
|
2942
|
+
const O = e.sharedMessages;
|
|
2943
|
+
C = Object.keys(O).reduce((p, P) => {
|
|
2944
2944
|
const U = p[P] || (p[P] = {});
|
|
2945
|
-
return Q(U,
|
|
2945
|
+
return Q(U, O[P]), p;
|
|
2946
2946
|
}, C || {});
|
|
2947
2947
|
}
|
|
2948
|
-
const { __i18n: y, __root:
|
|
2948
|
+
const { __i18n: y, __root: S, __injectWithOption: f } = e, d = e.datetimeFormats, b = e.numberFormats, g = e.flatJson;
|
|
2949
2949
|
return {
|
|
2950
2950
|
locale: t,
|
|
2951
2951
|
fallbackLocale: n,
|
|
2952
2952
|
messages: C,
|
|
2953
2953
|
flatJson: g,
|
|
2954
2954
|
datetimeFormats: d,
|
|
2955
|
-
numberFormats:
|
|
2956
|
-
missing:
|
|
2957
|
-
missingWarn:
|
|
2955
|
+
numberFormats: b,
|
|
2956
|
+
missing: a,
|
|
2957
|
+
missingWarn: s,
|
|
2958
2958
|
fallbackWarn: r,
|
|
2959
2959
|
fallbackRoot: o,
|
|
2960
2960
|
fallbackFormat: l,
|
|
@@ -2964,29 +2964,29 @@ function so(e) {
|
|
|
2964
2964
|
warnHtmlMessage: h,
|
|
2965
2965
|
escapeParameter: E,
|
|
2966
2966
|
messageResolver: e.messageResolver,
|
|
2967
|
-
inheritLocale:
|
|
2967
|
+
inheritLocale: A,
|
|
2968
2968
|
__i18n: y,
|
|
2969
|
-
__root:
|
|
2969
|
+
__root: S,
|
|
2970
2970
|
__injectWithOption: f
|
|
2971
2971
|
};
|
|
2972
2972
|
}
|
|
2973
|
-
function
|
|
2974
|
-
const t = nn(
|
|
2973
|
+
function Kt(e = {}) {
|
|
2974
|
+
const t = nn(ao(e)), { __extender: n } = e, a = {
|
|
2975
2975
|
// id
|
|
2976
2976
|
id: t.id,
|
|
2977
2977
|
// locale
|
|
2978
2978
|
get locale() {
|
|
2979
2979
|
return t.locale.value;
|
|
2980
2980
|
},
|
|
2981
|
-
set locale(
|
|
2982
|
-
t.locale.value =
|
|
2981
|
+
set locale(s) {
|
|
2982
|
+
t.locale.value = s;
|
|
2983
2983
|
},
|
|
2984
2984
|
// fallbackLocale
|
|
2985
2985
|
get fallbackLocale() {
|
|
2986
2986
|
return t.fallbackLocale.value;
|
|
2987
2987
|
},
|
|
2988
|
-
set fallbackLocale(
|
|
2989
|
-
t.fallbackLocale.value =
|
|
2988
|
+
set fallbackLocale(s) {
|
|
2989
|
+
t.fallbackLocale.value = s;
|
|
2990
2990
|
},
|
|
2991
2991
|
// messages
|
|
2992
2992
|
get messages() {
|
|
@@ -3008,22 +3008,22 @@ function Ht(e = {}) {
|
|
|
3008
3008
|
get missing() {
|
|
3009
3009
|
return t.getMissingHandler();
|
|
3010
3010
|
},
|
|
3011
|
-
set missing(
|
|
3012
|
-
t.setMissingHandler(
|
|
3011
|
+
set missing(s) {
|
|
3012
|
+
t.setMissingHandler(s);
|
|
3013
3013
|
},
|
|
3014
3014
|
// silentTranslationWarn
|
|
3015
3015
|
get silentTranslationWarn() {
|
|
3016
3016
|
return F(t.missingWarn) ? !t.missingWarn : t.missingWarn;
|
|
3017
3017
|
},
|
|
3018
|
-
set silentTranslationWarn(
|
|
3019
|
-
t.missingWarn = F(
|
|
3018
|
+
set silentTranslationWarn(s) {
|
|
3019
|
+
t.missingWarn = F(s) ? !s : s;
|
|
3020
3020
|
},
|
|
3021
3021
|
// silentFallbackWarn
|
|
3022
3022
|
get silentFallbackWarn() {
|
|
3023
3023
|
return F(t.fallbackWarn) ? !t.fallbackWarn : t.fallbackWarn;
|
|
3024
3024
|
},
|
|
3025
|
-
set silentFallbackWarn(
|
|
3026
|
-
t.fallbackWarn = F(
|
|
3025
|
+
set silentFallbackWarn(s) {
|
|
3026
|
+
t.fallbackWarn = F(s) ? !s : s;
|
|
3027
3027
|
},
|
|
3028
3028
|
// modifiers
|
|
3029
3029
|
get modifiers() {
|
|
@@ -3033,36 +3033,36 @@ function Ht(e = {}) {
|
|
|
3033
3033
|
get formatFallbackMessages() {
|
|
3034
3034
|
return t.fallbackFormat;
|
|
3035
3035
|
},
|
|
3036
|
-
set formatFallbackMessages(
|
|
3037
|
-
t.fallbackFormat =
|
|
3036
|
+
set formatFallbackMessages(s) {
|
|
3037
|
+
t.fallbackFormat = s;
|
|
3038
3038
|
},
|
|
3039
3039
|
// postTranslation
|
|
3040
3040
|
get postTranslation() {
|
|
3041
3041
|
return t.getPostTranslationHandler();
|
|
3042
3042
|
},
|
|
3043
|
-
set postTranslation(
|
|
3044
|
-
t.setPostTranslationHandler(
|
|
3043
|
+
set postTranslation(s) {
|
|
3044
|
+
t.setPostTranslationHandler(s);
|
|
3045
3045
|
},
|
|
3046
3046
|
// sync
|
|
3047
3047
|
get sync() {
|
|
3048
3048
|
return t.inheritLocale;
|
|
3049
3049
|
},
|
|
3050
|
-
set sync(
|
|
3051
|
-
t.inheritLocale =
|
|
3050
|
+
set sync(s) {
|
|
3051
|
+
t.inheritLocale = s;
|
|
3052
3052
|
},
|
|
3053
3053
|
// warnInHtmlMessage
|
|
3054
3054
|
get warnHtmlInMessage() {
|
|
3055
3055
|
return t.warnHtmlMessage ? "warn" : "off";
|
|
3056
3056
|
},
|
|
3057
|
-
set warnHtmlInMessage(
|
|
3058
|
-
t.warnHtmlMessage =
|
|
3057
|
+
set warnHtmlInMessage(s) {
|
|
3058
|
+
t.warnHtmlMessage = s !== "off";
|
|
3059
3059
|
},
|
|
3060
3060
|
// escapeParameterHtml
|
|
3061
3061
|
get escapeParameterHtml() {
|
|
3062
3062
|
return t.escapeParameter;
|
|
3063
3063
|
},
|
|
3064
|
-
set escapeParameterHtml(
|
|
3065
|
-
t.escapeParameter =
|
|
3064
|
+
set escapeParameterHtml(s) {
|
|
3065
|
+
t.escapeParameter = s;
|
|
3066
3066
|
},
|
|
3067
3067
|
// pluralizationRules
|
|
3068
3068
|
get pluralizationRules() {
|
|
@@ -3071,96 +3071,96 @@ function Ht(e = {}) {
|
|
|
3071
3071
|
// for internal
|
|
3072
3072
|
__composer: t,
|
|
3073
3073
|
// t
|
|
3074
|
-
t(...
|
|
3075
|
-
return Reflect.apply(t.t, t, [...
|
|
3074
|
+
t(...s) {
|
|
3075
|
+
return Reflect.apply(t.t, t, [...s]);
|
|
3076
3076
|
},
|
|
3077
3077
|
// rt
|
|
3078
|
-
rt(...
|
|
3079
|
-
return Reflect.apply(t.rt, t, [...
|
|
3078
|
+
rt(...s) {
|
|
3079
|
+
return Reflect.apply(t.rt, t, [...s]);
|
|
3080
3080
|
},
|
|
3081
3081
|
// te
|
|
3082
|
-
te(
|
|
3083
|
-
return t.te(
|
|
3082
|
+
te(s, r) {
|
|
3083
|
+
return t.te(s, r);
|
|
3084
3084
|
},
|
|
3085
3085
|
// tm
|
|
3086
|
-
tm(
|
|
3087
|
-
return t.tm(
|
|
3086
|
+
tm(s) {
|
|
3087
|
+
return t.tm(s);
|
|
3088
3088
|
},
|
|
3089
3089
|
// getLocaleMessage
|
|
3090
|
-
getLocaleMessage(
|
|
3091
|
-
return t.getLocaleMessage(
|
|
3090
|
+
getLocaleMessage(s) {
|
|
3091
|
+
return t.getLocaleMessage(s);
|
|
3092
3092
|
},
|
|
3093
3093
|
// setLocaleMessage
|
|
3094
|
-
setLocaleMessage(
|
|
3095
|
-
t.setLocaleMessage(
|
|
3094
|
+
setLocaleMessage(s, r) {
|
|
3095
|
+
t.setLocaleMessage(s, r);
|
|
3096
3096
|
},
|
|
3097
3097
|
// mergeLocaleMessage
|
|
3098
|
-
mergeLocaleMessage(
|
|
3099
|
-
t.mergeLocaleMessage(
|
|
3098
|
+
mergeLocaleMessage(s, r) {
|
|
3099
|
+
t.mergeLocaleMessage(s, r);
|
|
3100
3100
|
},
|
|
3101
3101
|
// d
|
|
3102
|
-
d(...
|
|
3103
|
-
return Reflect.apply(t.d, t, [...
|
|
3102
|
+
d(...s) {
|
|
3103
|
+
return Reflect.apply(t.d, t, [...s]);
|
|
3104
3104
|
},
|
|
3105
3105
|
// getDateTimeFormat
|
|
3106
|
-
getDateTimeFormat(
|
|
3107
|
-
return t.getDateTimeFormat(
|
|
3106
|
+
getDateTimeFormat(s) {
|
|
3107
|
+
return t.getDateTimeFormat(s);
|
|
3108
3108
|
},
|
|
3109
3109
|
// setDateTimeFormat
|
|
3110
|
-
setDateTimeFormat(
|
|
3111
|
-
t.setDateTimeFormat(
|
|
3110
|
+
setDateTimeFormat(s, r) {
|
|
3111
|
+
t.setDateTimeFormat(s, r);
|
|
3112
3112
|
},
|
|
3113
3113
|
// mergeDateTimeFormat
|
|
3114
|
-
mergeDateTimeFormat(
|
|
3115
|
-
t.mergeDateTimeFormat(
|
|
3114
|
+
mergeDateTimeFormat(s, r) {
|
|
3115
|
+
t.mergeDateTimeFormat(s, r);
|
|
3116
3116
|
},
|
|
3117
3117
|
// n
|
|
3118
|
-
n(...
|
|
3119
|
-
return Reflect.apply(t.n, t, [...
|
|
3118
|
+
n(...s) {
|
|
3119
|
+
return Reflect.apply(t.n, t, [...s]);
|
|
3120
3120
|
},
|
|
3121
3121
|
// getNumberFormat
|
|
3122
|
-
getNumberFormat(
|
|
3123
|
-
return t.getNumberFormat(
|
|
3122
|
+
getNumberFormat(s) {
|
|
3123
|
+
return t.getNumberFormat(s);
|
|
3124
3124
|
},
|
|
3125
3125
|
// setNumberFormat
|
|
3126
|
-
setNumberFormat(
|
|
3127
|
-
t.setNumberFormat(
|
|
3126
|
+
setNumberFormat(s, r) {
|
|
3127
|
+
t.setNumberFormat(s, r);
|
|
3128
3128
|
},
|
|
3129
3129
|
// mergeNumberFormat
|
|
3130
|
-
mergeNumberFormat(
|
|
3131
|
-
t.mergeNumberFormat(
|
|
3130
|
+
mergeNumberFormat(s, r) {
|
|
3131
|
+
t.mergeNumberFormat(s, r);
|
|
3132
3132
|
}
|
|
3133
3133
|
};
|
|
3134
|
-
return
|
|
3134
|
+
return a.__extender = n, process.env.NODE_ENV !== "production" && (a.__enableEmitter = (s) => {
|
|
3135
3135
|
const r = t;
|
|
3136
|
-
r[
|
|
3137
|
-
},
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3140
|
-
}),
|
|
3136
|
+
r[Ae] && r[Ae](s);
|
|
3137
|
+
}, a.__disableEmitter = () => {
|
|
3138
|
+
const s = t;
|
|
3139
|
+
s[Je] && s[Je]();
|
|
3140
|
+
}), a;
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3142
|
+
function so(e, t, n) {
|
|
3143
3143
|
return {
|
|
3144
3144
|
beforeCreate() {
|
|
3145
|
-
const
|
|
3146
|
-
if (!
|
|
3147
|
-
throw
|
|
3148
|
-
const
|
|
3149
|
-
if (
|
|
3150
|
-
const r =
|
|
3151
|
-
if (
|
|
3152
|
-
this.$i18n =
|
|
3145
|
+
const a = Ke();
|
|
3146
|
+
if (!a)
|
|
3147
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3148
|
+
const s = this.$options;
|
|
3149
|
+
if (s.i18n) {
|
|
3150
|
+
const r = s.i18n;
|
|
3151
|
+
if (s.__i18n && (r.__i18n = s.__i18n), r.__root = t, this === this.$root)
|
|
3152
|
+
this.$i18n = $n(e, r);
|
|
3153
3153
|
else {
|
|
3154
|
-
r.__injectWithOption = !0, r.__extender = n.__vueI18nExtend, this.$i18n =
|
|
3154
|
+
r.__injectWithOption = !0, r.__extender = n.__vueI18nExtend, this.$i18n = Kt(r);
|
|
3155
3155
|
const o = this.$i18n;
|
|
3156
3156
|
o.__extender && (o.__disposer = o.__extender(this.$i18n));
|
|
3157
3157
|
}
|
|
3158
|
-
} else if (
|
|
3158
|
+
} else if (s.__i18n)
|
|
3159
3159
|
if (this === this.$root)
|
|
3160
|
-
this.$i18n =
|
|
3160
|
+
this.$i18n = $n(e, s);
|
|
3161
3161
|
else {
|
|
3162
|
-
this.$i18n =
|
|
3163
|
-
__i18n:
|
|
3162
|
+
this.$i18n = Kt({
|
|
3163
|
+
__i18n: s.__i18n,
|
|
3164
3164
|
__injectWithOption: !0,
|
|
3165
3165
|
__extender: n.__vueI18nExtend,
|
|
3166
3166
|
__root: t
|
|
@@ -3170,34 +3170,34 @@ function ao(e, t, n) {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
else
|
|
3172
3172
|
this.$i18n = e;
|
|
3173
|
-
|
|
3173
|
+
s.__i18nGlobal && ba(t, s, s), this.$t = (...r) => this.$i18n.t(...r), this.$rt = (...r) => this.$i18n.rt(...r), this.$te = (r, o) => this.$i18n.te(r, o), this.$d = (...r) => this.$i18n.d(...r), this.$n = (...r) => this.$i18n.n(...r), this.$tm = (r) => this.$i18n.tm(r), n.__setInstance(a, this.$i18n);
|
|
3174
3174
|
},
|
|
3175
3175
|
mounted() {
|
|
3176
3176
|
if (process.env.NODE_ENV !== "production" && this.$el && this.$i18n) {
|
|
3177
|
-
const
|
|
3178
|
-
this.$el.__VUE_I18N__ =
|
|
3179
|
-
const
|
|
3180
|
-
|
|
3177
|
+
const a = this.$i18n;
|
|
3178
|
+
this.$el.__VUE_I18N__ = a.__composer;
|
|
3179
|
+
const s = this.__v_emitter = Qt();
|
|
3180
|
+
a.__enableEmitter && a.__enableEmitter(s), s.on("*", qe);
|
|
3181
3181
|
}
|
|
3182
3182
|
},
|
|
3183
3183
|
unmounted() {
|
|
3184
|
-
const
|
|
3185
|
-
if (!
|
|
3186
|
-
throw
|
|
3187
|
-
const
|
|
3188
|
-
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*",
|
|
3184
|
+
const a = Ke();
|
|
3185
|
+
if (!a)
|
|
3186
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3187
|
+
const s = this.$i18n;
|
|
3188
|
+
process.env.NODE_ENV !== "production" && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", qe), delete this.__v_emitter), this.$i18n && (s.__disableEmitter && s.__disableEmitter(), delete this.$el.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, s.__disposer && (s.__disposer(), delete s.__disposer, delete s.__extender), n.__deleteInstance(a), delete this.$i18n;
|
|
3189
3189
|
}
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
3192
|
-
function
|
|
3193
|
-
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[
|
|
3192
|
+
function $n(e, t) {
|
|
3193
|
+
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[Na](t.pluralizationRules || e.pluralizationRules);
|
|
3194
3194
|
const n = tn(e.locale, {
|
|
3195
3195
|
messages: t.messages,
|
|
3196
3196
|
__i18n: t.__i18n
|
|
3197
3197
|
});
|
|
3198
|
-
return Object.keys(n).forEach((
|
|
3198
|
+
return Object.keys(n).forEach((a) => e.mergeLocaleMessage(a, n[a])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((a) => e.mergeDateTimeFormat(a, t.datetimeFormats[a])), t.numberFormats && Object.keys(t.numberFormats).forEach((a) => e.mergeNumberFormat(a, t.numberFormats[a])), e;
|
|
3199
3199
|
}
|
|
3200
|
-
const
|
|
3200
|
+
const sn = {
|
|
3201
3201
|
tag: {
|
|
3202
3202
|
type: [String, Object]
|
|
3203
3203
|
},
|
|
@@ -3216,16 +3216,16 @@ const an = {
|
|
|
3216
3216
|
}
|
|
3217
3217
|
};
|
|
3218
3218
|
function ro({ slots: e }, t) {
|
|
3219
|
-
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((
|
|
3220
|
-
...
|
|
3219
|
+
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((a, s) => [
|
|
3220
|
+
...a,
|
|
3221
3221
|
// prettier-ignore
|
|
3222
|
-
...
|
|
3223
|
-
], []) : t.reduce((n,
|
|
3224
|
-
const
|
|
3225
|
-
return
|
|
3226
|
-
},
|
|
3222
|
+
...s.type === Xn ? s.children : [s]
|
|
3223
|
+
], []) : t.reduce((n, a) => {
|
|
3224
|
+
const s = e[a];
|
|
3225
|
+
return s && (n[a] = s()), n;
|
|
3226
|
+
}, $());
|
|
3227
3227
|
}
|
|
3228
|
-
function
|
|
3228
|
+
function ya() {
|
|
3229
3229
|
return Xn;
|
|
3230
3230
|
}
|
|
3231
3231
|
const oo = /* @__PURE__ */ Bt({
|
|
@@ -3240,38 +3240,38 @@ const oo = /* @__PURE__ */ Bt({
|
|
|
3240
3240
|
type: [Number, String],
|
|
3241
3241
|
validator: (e) => j(e) || !isNaN(e)
|
|
3242
3242
|
}
|
|
3243
|
-
},
|
|
3243
|
+
}, sn),
|
|
3244
3244
|
/* eslint-enable */
|
|
3245
3245
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3246
3246
|
setup(e, t) {
|
|
3247
|
-
const { slots: n, attrs:
|
|
3247
|
+
const { slots: n, attrs: a } = t, s = e.i18n || rn({
|
|
3248
3248
|
useScope: e.scope,
|
|
3249
3249
|
__useComponent: !0
|
|
3250
3250
|
});
|
|
3251
3251
|
return () => {
|
|
3252
|
-
const r = Object.keys(n).filter((h) => h !== "_"), o =
|
|
3252
|
+
const r = Object.keys(n).filter((h) => h !== "_"), o = $();
|
|
3253
3253
|
e.locale && (o.locale = e.locale), e.plural !== void 0 && (o.plural = I(e.plural) ? +e.plural : e.plural);
|
|
3254
|
-
const l = ro(t, r), c =
|
|
3254
|
+
const l = ro(t, r), c = s[Wt](e.keypath, l, o), _ = Q($(), a), T = I(e.tag) || M(e.tag) ? e.tag : ya();
|
|
3255
3255
|
return jn(T, _, c);
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
|
-
}),
|
|
3258
|
+
}), Wn = oo;
|
|
3259
3259
|
function lo(e) {
|
|
3260
|
-
return
|
|
3260
|
+
return K(e) && !I(e[0]);
|
|
3261
3261
|
}
|
|
3262
|
-
function
|
|
3263
|
-
const { slots:
|
|
3262
|
+
function Aa(e, t, n, a) {
|
|
3263
|
+
const { slots: s, attrs: r } = t;
|
|
3264
3264
|
return () => {
|
|
3265
3265
|
const o = { part: !0 };
|
|
3266
|
-
let l =
|
|
3267
|
-
e.locale && (o.locale = e.locale), I(e.format) ? o.key = e.format : M(e.format) && (I(e.format.key) && (o.key = e.format.key), l = Object.keys(e.format).reduce((E,
|
|
3268
|
-
const c =
|
|
3266
|
+
let l = $();
|
|
3267
|
+
e.locale && (o.locale = e.locale), I(e.format) ? o.key = e.format : M(e.format) && (I(e.format.key) && (o.key = e.format.key), l = Object.keys(e.format).reduce((E, A) => n.includes(A) ? Q($(), E, { [A]: e.format[A] }) : E, $()));
|
|
3268
|
+
const c = a(e.value, o, l);
|
|
3269
3269
|
let _ = [o.key];
|
|
3270
|
-
|
|
3271
|
-
const C =
|
|
3272
|
-
return lo(y) && (y[0].key = `${E.type}-${
|
|
3270
|
+
K(c) ? _ = c.map((E, A) => {
|
|
3271
|
+
const C = s[E.type], y = C ? C({ [E.type]: E.value, index: A, parts: c }) : [E.value];
|
|
3272
|
+
return lo(y) && (y[0].key = `${E.type}-${A}`), y;
|
|
3273
3273
|
}) : I(c) && (_ = [c]);
|
|
3274
|
-
const T = Q(
|
|
3274
|
+
const T = Q($(), r), h = I(e.tag) || M(e.tag) ? e.tag : ya();
|
|
3275
3275
|
return jn(h, T, _);
|
|
3276
3276
|
};
|
|
3277
3277
|
}
|
|
@@ -3286,7 +3286,7 @@ const io = /* @__PURE__ */ Bt({
|
|
|
3286
3286
|
format: {
|
|
3287
3287
|
type: [String, Object]
|
|
3288
3288
|
}
|
|
3289
|
-
},
|
|
3289
|
+
}, sn),
|
|
3290
3290
|
/* eslint-enable */
|
|
3291
3291
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3292
3292
|
setup(e, t) {
|
|
@@ -3294,48 +3294,48 @@ const io = /* @__PURE__ */ Bt({
|
|
|
3294
3294
|
useScope: e.scope,
|
|
3295
3295
|
__useComponent: !0
|
|
3296
3296
|
});
|
|
3297
|
-
return
|
|
3297
|
+
return Aa(e, t, ga, (...a) => (
|
|
3298
3298
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3299
|
-
n[Gt](...
|
|
3299
|
+
n[Gt](...a)
|
|
3300
3300
|
));
|
|
3301
3301
|
}
|
|
3302
|
-
}),
|
|
3302
|
+
}), xn = io;
|
|
3303
3303
|
function co(e, t) {
|
|
3304
3304
|
const n = e;
|
|
3305
3305
|
if (e.mode === "composition")
|
|
3306
3306
|
return n.__getInstance(t) || e.global;
|
|
3307
3307
|
{
|
|
3308
|
-
const
|
|
3309
|
-
return
|
|
3308
|
+
const a = n.__getInstance(t);
|
|
3309
|
+
return a != null ? a.__composer : e.global.__composer;
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
3312
|
function uo(e) {
|
|
3313
3313
|
const t = (o) => {
|
|
3314
|
-
process.env.NODE_ENV !== "production" && Jt(
|
|
3314
|
+
process.env.NODE_ENV !== "production" && Jt(Ze(ue.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
|
|
3315
3315
|
const { instance: l, value: c } = o;
|
|
3316
3316
|
if (!l || !l.$)
|
|
3317
|
-
throw
|
|
3318
|
-
const _ = co(e, l.$), T =
|
|
3317
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3318
|
+
const _ = co(e, l.$), T = Gn(c);
|
|
3319
3319
|
return [
|
|
3320
|
-
Reflect.apply(_.t, _, [...
|
|
3320
|
+
Reflect.apply(_.t, _, [...Yn(T)]),
|
|
3321
3321
|
_
|
|
3322
3322
|
];
|
|
3323
3323
|
};
|
|
3324
3324
|
return {
|
|
3325
3325
|
created: (o, l) => {
|
|
3326
3326
|
const [c, _] = t(l);
|
|
3327
|
-
|
|
3327
|
+
ie && e.global === _ && (o.__i18nWatcher = Rt(_.locale, () => {
|
|
3328
3328
|
l.instance && l.instance.$forceUpdate();
|
|
3329
3329
|
})), o.__composer = _, o.textContent = c;
|
|
3330
3330
|
},
|
|
3331
3331
|
unmounted: (o) => {
|
|
3332
|
-
|
|
3332
|
+
ie && o.__i18nWatcher && (o.__i18nWatcher(), o.__i18nWatcher = void 0, delete o.__i18nWatcher), o.__composer && (o.__composer = void 0, delete o.__composer);
|
|
3333
3333
|
},
|
|
3334
3334
|
beforeUpdate: (o, { value: l }) => {
|
|
3335
3335
|
if (o.__composer) {
|
|
3336
|
-
const c = o.__composer, _ =
|
|
3336
|
+
const c = o.__composer, _ = Gn(l);
|
|
3337
3337
|
o.textContent = Reflect.apply(c.t, c, [
|
|
3338
|
-
...
|
|
3338
|
+
...Yn(_)
|
|
3339
3339
|
]);
|
|
3340
3340
|
}
|
|
3341
3341
|
},
|
|
@@ -3345,37 +3345,37 @@ function uo(e) {
|
|
|
3345
3345
|
}
|
|
3346
3346
|
};
|
|
3347
3347
|
}
|
|
3348
|
-
function
|
|
3348
|
+
function Gn(e) {
|
|
3349
3349
|
if (I(e))
|
|
3350
3350
|
return { path: e };
|
|
3351
3351
|
if (R(e)) {
|
|
3352
3352
|
if (!("path" in e))
|
|
3353
|
-
throw
|
|
3353
|
+
throw te(x.REQUIRED_VALUE, "path");
|
|
3354
3354
|
return e;
|
|
3355
3355
|
} else
|
|
3356
|
-
throw
|
|
3356
|
+
throw te(x.INVALID_VALUE);
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3359
|
-
const { path: t, locale: n, args:
|
|
3360
|
-
return I(n) && (o.locale = n), j(
|
|
3358
|
+
function Yn(e) {
|
|
3359
|
+
const { path: t, locale: n, args: a, choice: s, plural: r } = e, o = {}, l = a || {};
|
|
3360
|
+
return I(n) && (o.locale = n), j(s) && (o.plural = s), j(r) && (o.plural = r), [t, l, o];
|
|
3361
3361
|
}
|
|
3362
3362
|
function fo(e, t, ...n) {
|
|
3363
|
-
const
|
|
3364
|
-
(F(
|
|
3363
|
+
const a = R(n[0]) ? n[0] : {};
|
|
3364
|
+
(F(a.globalInstall) ? a.globalInstall : !0) && ([Wn.name, "I18nT"].forEach((r) => e.component(r, Wn)), [xn.name, "I18nN"].forEach((r) => e.component(r, xn)), [Kn.name, "I18nD"].forEach((r) => e.component(r, Kn))), e.directive("t", uo(t));
|
|
3365
3365
|
}
|
|
3366
|
-
const _o = /* @__PURE__ */
|
|
3366
|
+
const _o = /* @__PURE__ */ fe("global-vue-i18n");
|
|
3367
3367
|
function mo(e = {}) {
|
|
3368
3368
|
const t = __VUE_I18N_LEGACY_API__ && F(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__;
|
|
3369
|
-
process.env.NODE_ENV !== "production" && t && Jt(
|
|
3370
|
-
const n = F(e.globalInjection) ? e.globalInjection : !0,
|
|
3369
|
+
process.env.NODE_ENV !== "production" && t && Jt(Ze(ue.DEPRECATE_LEGACY_MODE));
|
|
3370
|
+
const n = F(e.globalInjection) ? e.globalInjection : !0, a = /* @__PURE__ */ new Map(), [s, r] = go(e, t), o = /* @__PURE__ */ fe(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
|
|
3371
3371
|
function l(h) {
|
|
3372
|
-
return
|
|
3372
|
+
return a.get(h) || null;
|
|
3373
3373
|
}
|
|
3374
3374
|
function c(h, E) {
|
|
3375
|
-
|
|
3375
|
+
a.set(h, E);
|
|
3376
3376
|
}
|
|
3377
3377
|
function _(h) {
|
|
3378
|
-
|
|
3378
|
+
a.delete(h);
|
|
3379
3379
|
}
|
|
3380
3380
|
const T = {
|
|
3381
3381
|
// mode
|
|
@@ -3388,23 +3388,23 @@ function mo(e = {}) {
|
|
|
3388
3388
|
const y = E[0];
|
|
3389
3389
|
T.__composerExtend = y.__composerExtend, T.__vueI18nExtend = y.__vueI18nExtend;
|
|
3390
3390
|
}
|
|
3391
|
-
let
|
|
3392
|
-
!t && n && (
|
|
3391
|
+
let A = null;
|
|
3392
|
+
!t && n && (A = Oo(h, T.global)), __VUE_I18N_FULL_INSTALL__ && fo(h, T, ...E), __VUE_I18N_LEGACY_API__ && t && h.mixin(so(r, r.__composer, T));
|
|
3393
3393
|
const C = h.unmount;
|
|
3394
3394
|
if (h.unmount = () => {
|
|
3395
|
-
|
|
3395
|
+
A && A(), T.dispose(), C();
|
|
3396
3396
|
}, process.env.NODE_ENV !== "production") {
|
|
3397
3397
|
if (!await Br(h, T))
|
|
3398
|
-
throw
|
|
3399
|
-
const
|
|
3398
|
+
throw te(x.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
|
|
3399
|
+
const S = Qt();
|
|
3400
3400
|
if (t) {
|
|
3401
3401
|
const f = r;
|
|
3402
|
-
f.__enableEmitter && f.__enableEmitter(
|
|
3402
|
+
f.__enableEmitter && f.__enableEmitter(S);
|
|
3403
3403
|
} else {
|
|
3404
3404
|
const f = r;
|
|
3405
|
-
f[
|
|
3405
|
+
f[Ae] && f[Ae](S);
|
|
3406
3406
|
}
|
|
3407
|
-
|
|
3407
|
+
S.on("*", qe);
|
|
3408
3408
|
}
|
|
3409
3409
|
},
|
|
3410
3410
|
// global accessor
|
|
@@ -3412,10 +3412,10 @@ function mo(e = {}) {
|
|
|
3412
3412
|
return r;
|
|
3413
3413
|
},
|
|
3414
3414
|
dispose() {
|
|
3415
|
-
|
|
3415
|
+
s.stop();
|
|
3416
3416
|
},
|
|
3417
3417
|
// @internal
|
|
3418
|
-
__instances:
|
|
3418
|
+
__instances: a,
|
|
3419
3419
|
// @internal
|
|
3420
3420
|
__getInstance: l,
|
|
3421
3421
|
// @internal
|
|
@@ -3426,92 +3426,92 @@ function mo(e = {}) {
|
|
|
3426
3426
|
return T;
|
|
3427
3427
|
}
|
|
3428
3428
|
function rn(e = {}) {
|
|
3429
|
-
const t =
|
|
3429
|
+
const t = Ke();
|
|
3430
3430
|
if (t == null)
|
|
3431
|
-
throw
|
|
3431
|
+
throw te(x.MUST_BE_CALL_SETUP_TOP);
|
|
3432
3432
|
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
3433
|
-
throw
|
|
3434
|
-
const n = Eo(t),
|
|
3433
|
+
throw te(x.NOT_INSTALLED);
|
|
3434
|
+
const n = Eo(t), a = ho(n), s = La(t), r = po(e, s);
|
|
3435
3435
|
if (r === "global")
|
|
3436
|
-
return
|
|
3436
|
+
return ba(a, e, s), a;
|
|
3437
3437
|
if (r === "parent") {
|
|
3438
3438
|
let c = No(n, t, e.__useComponent);
|
|
3439
|
-
return c == null && (process.env.NODE_ENV !== "production" &&
|
|
3439
|
+
return c == null && (process.env.NODE_ENV !== "production" && Ee(Ze(ue.NOT_FOUND_PARENT_SCOPE)), c = a), c;
|
|
3440
3440
|
}
|
|
3441
3441
|
const o = n;
|
|
3442
3442
|
let l = o.__getInstance(t);
|
|
3443
3443
|
if (l == null) {
|
|
3444
3444
|
const c = Q({}, e);
|
|
3445
|
-
"__i18n" in
|
|
3445
|
+
"__i18n" in s && (c.__i18n = s.__i18n), a && (c.__root = a), l = nn(c), o.__composerExtend && (l[Yt] = o.__composerExtend(l)), Lo(o, t, l), o.__setInstance(t, l);
|
|
3446
3446
|
}
|
|
3447
3447
|
return l;
|
|
3448
3448
|
}
|
|
3449
3449
|
function go(e, t) {
|
|
3450
|
-
const n =
|
|
3451
|
-
if (
|
|
3452
|
-
throw
|
|
3453
|
-
return [n,
|
|
3450
|
+
const n = Pa(), a = __VUE_I18N_LEGACY_API__ && t ? n.run(() => Kt(e)) : n.run(() => nn(e));
|
|
3451
|
+
if (a == null)
|
|
3452
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3453
|
+
return [n, a];
|
|
3454
3454
|
}
|
|
3455
3455
|
function Eo(e) {
|
|
3456
|
-
const t =
|
|
3456
|
+
const t = Ra(e.isCE ? _o : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
3457
3457
|
if (!t)
|
|
3458
|
-
throw
|
|
3458
|
+
throw te(e.isCE ? x.NOT_INSTALLED_WITH_PROVIDE : x.UNEXPECTED_ERROR);
|
|
3459
3459
|
return t;
|
|
3460
3460
|
}
|
|
3461
3461
|
function po(e, t) {
|
|
3462
|
-
return
|
|
3462
|
+
return ct(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
3463
3463
|
}
|
|
3464
3464
|
function ho(e) {
|
|
3465
3465
|
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
3466
3466
|
}
|
|
3467
3467
|
function No(e, t, n = !1) {
|
|
3468
|
-
let
|
|
3469
|
-
const
|
|
3468
|
+
let a = null;
|
|
3469
|
+
const s = t.root;
|
|
3470
3470
|
let r = To(t, n);
|
|
3471
3471
|
for (; r != null; ) {
|
|
3472
3472
|
const o = e;
|
|
3473
3473
|
if (e.mode === "composition")
|
|
3474
|
-
|
|
3474
|
+
a = o.__getInstance(r);
|
|
3475
3475
|
else if (__VUE_I18N_LEGACY_API__) {
|
|
3476
3476
|
const l = o.__getInstance(r);
|
|
3477
|
-
l != null && (
|
|
3477
|
+
l != null && (a = l.__composer, n && a && !a[Ta] && (a = null));
|
|
3478
3478
|
}
|
|
3479
|
-
if (
|
|
3479
|
+
if (a != null || s === r)
|
|
3480
3480
|
break;
|
|
3481
3481
|
r = r.parent;
|
|
3482
3482
|
}
|
|
3483
|
-
return
|
|
3483
|
+
return a;
|
|
3484
3484
|
}
|
|
3485
3485
|
function To(e, t = !1) {
|
|
3486
3486
|
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
3487
3487
|
}
|
|
3488
3488
|
function Lo(e, t, n) {
|
|
3489
|
-
let
|
|
3490
|
-
|
|
3489
|
+
let a = null;
|
|
3490
|
+
Ma(() => {
|
|
3491
3491
|
if (process.env.NODE_ENV !== "production" && t.vnode.el) {
|
|
3492
|
-
t.vnode.el.__VUE_I18N__ = n,
|
|
3493
|
-
const
|
|
3494
|
-
|
|
3492
|
+
t.vnode.el.__VUE_I18N__ = n, a = Qt();
|
|
3493
|
+
const s = n;
|
|
3494
|
+
s[Ae] && s[Ae](a), a.on("*", qe);
|
|
3495
3495
|
}
|
|
3496
|
-
}, t),
|
|
3497
|
-
const
|
|
3498
|
-
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (
|
|
3499
|
-
const r =
|
|
3500
|
-
r && (r(), delete
|
|
3496
|
+
}, t), Fa(() => {
|
|
3497
|
+
const s = n;
|
|
3498
|
+
process.env.NODE_ENV !== "production" && t.vnode.el && t.vnode.el.__VUE_I18N__ && (a && a.off("*", qe), s[Je] && s[Je](), delete t.vnode.el.__VUE_I18N__), e.__deleteInstance(t);
|
|
3499
|
+
const r = s[Yt];
|
|
3500
|
+
r && (r(), delete s[Yt]);
|
|
3501
3501
|
}, t);
|
|
3502
3502
|
}
|
|
3503
|
-
const
|
|
3503
|
+
const bo = [
|
|
3504
3504
|
"locale",
|
|
3505
3505
|
"fallbackLocale",
|
|
3506
3506
|
"availableLocales"
|
|
3507
|
-
],
|
|
3508
|
-
function
|
|
3507
|
+
], Hn = ["t", "rt", "d", "n", "tm", "te"];
|
|
3508
|
+
function Oo(e, t) {
|
|
3509
3509
|
const n = /* @__PURE__ */ Object.create(null);
|
|
3510
|
-
return
|
|
3511
|
-
const r = Object.getOwnPropertyDescriptor(t,
|
|
3510
|
+
return bo.forEach((s) => {
|
|
3511
|
+
const r = Object.getOwnPropertyDescriptor(t, s);
|
|
3512
3512
|
if (!r)
|
|
3513
|
-
throw
|
|
3514
|
-
const o =
|
|
3513
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3514
|
+
const o = Va(r.value) ? {
|
|
3515
3515
|
get() {
|
|
3516
3516
|
return r.value.value;
|
|
3517
3517
|
},
|
|
@@ -3524,15 +3524,15 @@ function bo(e, t) {
|
|
|
3524
3524
|
return r.get && r.get();
|
|
3525
3525
|
}
|
|
3526
3526
|
};
|
|
3527
|
-
Object.defineProperty(n,
|
|
3528
|
-
}), e.config.globalProperties.$i18n = n,
|
|
3529
|
-
const r = Object.getOwnPropertyDescriptor(t,
|
|
3527
|
+
Object.defineProperty(n, s, o);
|
|
3528
|
+
}), e.config.globalProperties.$i18n = n, Hn.forEach((s) => {
|
|
3529
|
+
const r = Object.getOwnPropertyDescriptor(t, s);
|
|
3530
3530
|
if (!r || !r.value)
|
|
3531
|
-
throw
|
|
3532
|
-
Object.defineProperty(e.config.globalProperties, `$${
|
|
3531
|
+
throw te(x.UNEXPECTED_ERROR);
|
|
3532
|
+
Object.defineProperty(e.config.globalProperties, `$${s}`, r);
|
|
3533
3533
|
}), () => {
|
|
3534
|
-
delete e.config.globalProperties.$i18n,
|
|
3535
|
-
delete e.config.globalProperties[`$${
|
|
3534
|
+
delete e.config.globalProperties.$i18n, Hn.forEach((s) => {
|
|
3535
|
+
delete e.config.globalProperties[`$${s}`];
|
|
3536
3536
|
});
|
|
3537
3537
|
};
|
|
3538
3538
|
}
|
|
@@ -3547,7 +3547,7 @@ const Io = /* @__PURE__ */ Bt({
|
|
|
3547
3547
|
format: {
|
|
3548
3548
|
type: [String, Object]
|
|
3549
3549
|
}
|
|
3550
|
-
},
|
|
3550
|
+
}, sn),
|
|
3551
3551
|
/* eslint-enable */
|
|
3552
3552
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3553
3553
|
setup(e, t) {
|
|
@@ -3555,19 +3555,19 @@ const Io = /* @__PURE__ */ Bt({
|
|
|
3555
3555
|
useScope: e.scope,
|
|
3556
3556
|
__useComponent: !0
|
|
3557
3557
|
});
|
|
3558
|
-
return
|
|
3558
|
+
return Aa(e, t, da, (...a) => (
|
|
3559
3559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3560
|
-
n[
|
|
3560
|
+
n[xt](...a)
|
|
3561
3561
|
));
|
|
3562
3562
|
}
|
|
3563
|
-
}),
|
|
3564
|
-
|
|
3565
|
-
cr(
|
|
3566
|
-
ur(
|
|
3567
|
-
fr(
|
|
3563
|
+
}), Kn = Io;
|
|
3564
|
+
$r();
|
|
3565
|
+
cr(xs);
|
|
3566
|
+
ur(sr);
|
|
3567
|
+
fr(ra);
|
|
3568
3568
|
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
3569
|
-
const e =
|
|
3570
|
-
e.__INTLIFY__ = !0,
|
|
3569
|
+
const e = Ie();
|
|
3570
|
+
e.__INTLIFY__ = !0, Gs(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
3571
3571
|
}
|
|
3572
3572
|
process.env.NODE_ENV;
|
|
3573
3573
|
const vo = (e) => {
|
|
@@ -3576,70 +3576,70 @@ const vo = (e) => {
|
|
|
3576
3576
|
t[n.key] = n.value;
|
|
3577
3577
|
return t;
|
|
3578
3578
|
}, yo = (e, t) => (t.forEach((n) => {
|
|
3579
|
-
const
|
|
3580
|
-
|
|
3581
|
-
}), e),
|
|
3579
|
+
const a = B.find(e, { key: n.key });
|
|
3580
|
+
a ? B.merge(a, n) : e.push(n);
|
|
3581
|
+
}), e), _t = "https://test.ihotel.cn", Sa = async (e) => lt.get(_t + "/i18n-web/sysoption/getsupportedlangs", {
|
|
3582
3582
|
headers: {
|
|
3583
3583
|
Authorization: e
|
|
3584
3584
|
}
|
|
3585
|
-
}),
|
|
3585
|
+
}), Bn = async ({
|
|
3586
3586
|
appCode: e,
|
|
3587
3587
|
language: t = "zh-CN",
|
|
3588
3588
|
page: n,
|
|
3589
|
-
lastPullDate:
|
|
3590
|
-
token:
|
|
3589
|
+
lastPullDate: a,
|
|
3590
|
+
token: s
|
|
3591
3591
|
}) => new Promise(async (r, o) => {
|
|
3592
|
-
const l =
|
|
3592
|
+
const l = _t + "/i18n-web/kv_translate/kv_translates", c = a ? l + "?lastPullDate=" + a : l, _ = await lt({
|
|
3593
3593
|
url: c,
|
|
3594
3594
|
method: "GET",
|
|
3595
3595
|
headers: {
|
|
3596
3596
|
appCode: e,
|
|
3597
3597
|
page: n,
|
|
3598
3598
|
language: t,
|
|
3599
|
-
Authorization:
|
|
3599
|
+
Authorization: s
|
|
3600
3600
|
}
|
|
3601
3601
|
});
|
|
3602
3602
|
_.data && _.data.result == 0 ? r(_.data.retVal) : r(_);
|
|
3603
|
-
}),
|
|
3604
|
-
url:
|
|
3603
|
+
}), Ao = async (e, t) => lt({
|
|
3604
|
+
url: _t + "/i18n-web/kv_translate/kv_translates",
|
|
3605
3605
|
method: "POST",
|
|
3606
3606
|
data: e,
|
|
3607
3607
|
headers: { Authorization: t }
|
|
3608
|
-
}), So = async (e, t) =>
|
|
3609
|
-
url:
|
|
3608
|
+
}), So = async (e, t) => lt({
|
|
3609
|
+
url: _t + "/i18n-web/kv_translate/batch",
|
|
3610
3610
|
method: "POST",
|
|
3611
3611
|
data: e,
|
|
3612
3612
|
headers: {
|
|
3613
3613
|
Authorization: t
|
|
3614
3614
|
}
|
|
3615
|
-
}),
|
|
3616
|
-
const r =
|
|
3615
|
+
}), Co = async ({ appCode: e, language: t = "zh-CN", token: n }) => new Promise(async (a, s) => {
|
|
3616
|
+
const r = Oe.namespace(`I18N_${B.toUpper(e)}`), o = {
|
|
3617
3617
|
appCode: e,
|
|
3618
3618
|
language: t,
|
|
3619
3619
|
token: n
|
|
3620
3620
|
}, l = r.get(t);
|
|
3621
3621
|
if (!l || !l.lastPullDate) {
|
|
3622
|
-
const c = await
|
|
3623
|
-
c && (r.set(t, c),
|
|
3622
|
+
const c = await Bn(o);
|
|
3623
|
+
c && (r.set(t, c), a(c.translatesDTOs));
|
|
3624
3624
|
} else {
|
|
3625
|
-
const { lastPullDate: c } = l, _ = await
|
|
3625
|
+
const { lastPullDate: c } = l, _ = await Bn({
|
|
3626
3626
|
...o,
|
|
3627
3627
|
lastPullDate: c
|
|
3628
3628
|
});
|
|
3629
3629
|
if (_) {
|
|
3630
|
-
const T =
|
|
3631
|
-
if (
|
|
3632
|
-
|
|
3630
|
+
const T = B.get(l, "translatesDTOs");
|
|
3631
|
+
if (B.isEmpty(_.translatesDTOs))
|
|
3632
|
+
a(T);
|
|
3633
3633
|
else {
|
|
3634
3634
|
const h = yo(T, _.translatesDTOs), E = {
|
|
3635
3635
|
lastPullDate: _.lastPullDate,
|
|
3636
3636
|
translatesDTOs: h
|
|
3637
3637
|
};
|
|
3638
|
-
|
|
3638
|
+
Oe.namespace(`I18N_${B.toUpper(e)}`).set(t, E, ":"), a(h);
|
|
3639
3639
|
}
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
|
-
}),
|
|
3642
|
+
}), Do = {
|
|
3643
3643
|
data() {
|
|
3644
3644
|
return {
|
|
3645
3645
|
isModalVisible: !1,
|
|
@@ -3665,32 +3665,41 @@ const vo = (e) => {
|
|
|
3665
3665
|
columns() {
|
|
3666
3666
|
let e = this.type === "pageData" ? [{
|
|
3667
3667
|
title: "状态",
|
|
3668
|
-
width:
|
|
3668
|
+
width: 100,
|
|
3669
3669
|
key: "icon",
|
|
3670
3670
|
fixed: "left",
|
|
3671
3671
|
render: (t, {
|
|
3672
3672
|
row: n
|
|
3673
|
-
}) => n.localhost ?
|
|
3673
|
+
}) => n.localhost ? q("span", {
|
|
3674
3674
|
style: {
|
|
3675
3675
|
color: "red"
|
|
3676
3676
|
}
|
|
3677
|
-
}, [
|
|
3677
|
+
}, [q("span", {
|
|
3678
3678
|
style: {
|
|
3679
3679
|
marginRight: "2px"
|
|
3680
3680
|
}
|
|
3681
|
-
}, [
|
|
3681
|
+
}, [He("本地")]), q(un, {
|
|
3682
3682
|
content: "该字段未在翻译数据库中",
|
|
3683
3683
|
placement: "top",
|
|
3684
3684
|
transfer: !0
|
|
3685
3685
|
}, {
|
|
3686
|
-
default: () => [
|
|
3686
|
+
default: () => [q(oe("Icon"), {
|
|
3687
3687
|
type: "ios-alert-outline"
|
|
3688
3688
|
}, null)]
|
|
3689
|
-
})]) :
|
|
3689
|
+
})]) : n.page === this.name ? q("span", {
|
|
3690
3690
|
style: {
|
|
3691
3691
|
color: "green"
|
|
3692
3692
|
}
|
|
3693
|
-
}, [
|
|
3693
|
+
}, [He("当前页")]) : q("span", null, [He("全局"), " ", q(un, {
|
|
3694
|
+
maxWidth: 150,
|
|
3695
|
+
content: "编辑该字段转化为当前页,不会覆盖全局",
|
|
3696
|
+
placement: "top",
|
|
3697
|
+
transfer: !0
|
|
3698
|
+
}, {
|
|
3699
|
+
default: () => [q(oe("Icon"), {
|
|
3700
|
+
type: "ios-alert-outline"
|
|
3701
|
+
}, null)]
|
|
3702
|
+
})])
|
|
3694
3703
|
}, {
|
|
3695
3704
|
title: "关键词",
|
|
3696
3705
|
fixed: "left",
|
|
@@ -3710,30 +3719,30 @@ const vo = (e) => {
|
|
|
3710
3719
|
width: 80,
|
|
3711
3720
|
key: "dictKey"
|
|
3712
3721
|
}];
|
|
3713
|
-
return
|
|
3722
|
+
return B.map(this.languages, (t) => {
|
|
3714
3723
|
const n = t.code;
|
|
3715
3724
|
return e.push({
|
|
3716
3725
|
title: t.name,
|
|
3717
3726
|
key: n,
|
|
3718
|
-
render: (
|
|
3719
|
-
row:
|
|
3727
|
+
render: (a, {
|
|
3728
|
+
row: s,
|
|
3720
3729
|
index: r
|
|
3721
3730
|
}) => {
|
|
3722
|
-
const o =
|
|
3731
|
+
const o = s[n], {
|
|
3723
3732
|
localhost: l
|
|
3724
|
-
} =
|
|
3725
|
-
return l ? null :
|
|
3733
|
+
} = s;
|
|
3734
|
+
return l ? null : q(oe("Input"), {
|
|
3726
3735
|
modelValue: o,
|
|
3727
3736
|
onOnChange: (c) => {
|
|
3728
3737
|
const _ = c.target.value, {
|
|
3729
3738
|
dictKey: T
|
|
3730
|
-
} =
|
|
3739
|
+
} = s;
|
|
3731
3740
|
console.log("dictKey", T);
|
|
3732
|
-
const h =
|
|
3741
|
+
const h = B.findIndex(this.mySaveData, {
|
|
3733
3742
|
dictKey: T
|
|
3734
3743
|
});
|
|
3735
3744
|
h > -1 ? this.mySaveData[h][n] = _ : this.mySaveData.push({
|
|
3736
|
-
...
|
|
3745
|
+
...s,
|
|
3737
3746
|
[n]: _,
|
|
3738
3747
|
page: this.type === "pageData" ? this.name : "common"
|
|
3739
3748
|
});
|
|
@@ -3765,189 +3774,157 @@ const vo = (e) => {
|
|
|
3765
3774
|
this.isModalVisible || (this.isModalVisible = !0, this.name = e, this.init());
|
|
3766
3775
|
},
|
|
3767
3776
|
findShallowStringDiff(e) {
|
|
3768
|
-
return
|
|
3777
|
+
return B.find(e, ["_isEdit", !0]);
|
|
3769
3778
|
},
|
|
3770
3779
|
async saveData({
|
|
3771
3780
|
msg: e = "保存成功"
|
|
3772
3781
|
}, t = !0) {
|
|
3773
3782
|
const n = [];
|
|
3774
|
-
if (
|
|
3775
|
-
|
|
3783
|
+
if (B.map(this.mySaveData, (s) => {
|
|
3784
|
+
B.map(this.languages, (r) => {
|
|
3776
3785
|
n.push({
|
|
3777
|
-
key:
|
|
3778
|
-
page:
|
|
3786
|
+
key: s.dictKey,
|
|
3787
|
+
page: s.page,
|
|
3779
3788
|
lang: r.code,
|
|
3780
|
-
value:
|
|
3789
|
+
value: s[r.code]
|
|
3781
3790
|
});
|
|
3782
3791
|
});
|
|
3783
|
-
}),
|
|
3784
|
-
|
|
3792
|
+
}), B.isEmpty(n)) {
|
|
3793
|
+
tt.error({
|
|
3785
3794
|
content: "没有需要保存的数据"
|
|
3786
3795
|
});
|
|
3787
3796
|
return;
|
|
3788
3797
|
}
|
|
3789
|
-
const
|
|
3798
|
+
const a = await So({
|
|
3790
3799
|
appCode: this.appCode,
|
|
3791
3800
|
isLocal: "F",
|
|
3792
3801
|
data: n
|
|
3793
3802
|
}, this.token);
|
|
3794
|
-
|
|
3795
|
-
content: e ||
|
|
3796
|
-
}), this.setLanguage(), this.initialData =
|
|
3797
|
-
content:
|
|
3803
|
+
a && a.data.result === 0 ? (tt.success({
|
|
3804
|
+
content: e || a.data.msg
|
|
3805
|
+
}), this.setLanguage(), this.initialData = B.cloneDeep(this.data.datas), t && this.closeModal(), this.mySaveData = []) : tt.error({
|
|
3806
|
+
content: a.data.msg || "保存失败"
|
|
3798
3807
|
});
|
|
3799
3808
|
},
|
|
3800
3809
|
async saveNoEqual() {
|
|
3801
|
-
|
|
3810
|
+
B.isEmpty(this.mySaveData) || this.saveData({
|
|
3802
3811
|
msg: "已为您自动保存"
|
|
3803
3812
|
}, !1);
|
|
3804
3813
|
},
|
|
3805
3814
|
changePage(e) {
|
|
3806
|
-
this.saveNoEqual(), this.type === "pageData" ? this.getPageData(
|
|
3815
|
+
this.saveNoEqual(), this.type === "pageData" ? this.getPageData({
|
|
3816
|
+
firstResult: (e - 1) * this.page.pageSize
|
|
3817
|
+
}) : this.search({
|
|
3807
3818
|
firstResult: (e - 1) * this.page.pageSize
|
|
3808
3819
|
});
|
|
3809
3820
|
},
|
|
3810
|
-
async getPageData(e
|
|
3811
|
-
this.
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
commaSeparatedKeys: this.translationKeys.toString(),
|
|
3816
|
-
commaSeparatedLangs: $.map(this.languages, "code").toString(),
|
|
3817
|
-
firstResult: 0,
|
|
3818
|
-
pageSize: 99999
|
|
3819
|
-
}, this.token);
|
|
3820
|
-
if (t) {
|
|
3821
|
-
let n = [];
|
|
3822
|
-
$.forEach(this.translationKeys, (s) => {
|
|
3823
|
-
const a = $.find(t.data.retVal.datas, {
|
|
3824
|
-
dictKey: s,
|
|
3825
|
-
page: this.name
|
|
3826
|
-
});
|
|
3827
|
-
if (a)
|
|
3828
|
-
n.push(a);
|
|
3829
|
-
else {
|
|
3830
|
-
const r = $.find(t.data.retVal.datas, {
|
|
3831
|
-
dictKey: s,
|
|
3832
|
-
page: "common"
|
|
3833
|
-
});
|
|
3834
|
-
if (r)
|
|
3835
|
-
n.push({
|
|
3836
|
-
...r,
|
|
3837
|
-
page: this.name,
|
|
3838
|
-
common: !0
|
|
3839
|
-
});
|
|
3840
|
-
else {
|
|
3841
|
-
if (this.searchText)
|
|
3842
|
-
return;
|
|
3843
|
-
n.push({
|
|
3844
|
-
dictKey: s,
|
|
3845
|
-
page: this.name,
|
|
3846
|
-
"zh-CN": s,
|
|
3847
|
-
localhost: !0
|
|
3848
|
-
});
|
|
3849
|
-
}
|
|
3850
|
-
}
|
|
3851
|
-
}), this.pageData = $.cloneDeep(n), this.initialData = $.cloneDeep(this.pageData), this.pageDataShow = n.slice((e - 1) * this.page.pageSize, e * this.page.pageSize), this.loading = !1;
|
|
3852
|
-
}
|
|
3821
|
+
async getPageData(e) {
|
|
3822
|
+
this.search({
|
|
3823
|
+
...e,
|
|
3824
|
+
commaSeparatedKeys: this.translationKeys.toString()
|
|
3825
|
+
}, "pageData");
|
|
3853
3826
|
},
|
|
3854
3827
|
async search(e, t) {
|
|
3855
3828
|
this.loading = !0;
|
|
3856
|
-
const n = await
|
|
3829
|
+
const n = await Ao({
|
|
3857
3830
|
appCode: this.appCode,
|
|
3858
|
-
page: "common",
|
|
3859
3831
|
searchBlur: this.searchText,
|
|
3860
|
-
commaSeparatedLangs:
|
|
3861
|
-
|
|
3832
|
+
commaSeparatedLangs: B.map(this.languages, "code").toString(),
|
|
3833
|
+
commaSeparatedPages: t === "pageData" ? `${this.name},common` : "common",
|
|
3862
3834
|
pageSize: 10,
|
|
3863
3835
|
...e
|
|
3864
3836
|
}, this.token);
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3837
|
+
if (n) {
|
|
3838
|
+
this.initialData = B.cloneDeep(n.data.retVal.datas);
|
|
3839
|
+
let a = n.data.retVal.datas;
|
|
3840
|
+
this.data = B.cloneDeep(a), this.page = {
|
|
3841
|
+
firstResult: n.data.retVal.firstResult,
|
|
3842
|
+
pageSize: n.data.retVal.pageSize,
|
|
3843
|
+
totalRows: n.data.retVal.totalRows
|
|
3844
|
+
};
|
|
3845
|
+
}
|
|
3846
|
+
this.loading = !1;
|
|
3870
3847
|
},
|
|
3871
3848
|
changeTab(e) {
|
|
3872
3849
|
this.type = e, e === "data" ? this.search() : this.getPageData();
|
|
3873
3850
|
},
|
|
3874
3851
|
async init() {
|
|
3875
|
-
const e = await
|
|
3876
|
-
e && e.data.result == 0 ? (this.languages = e.data.retVal, this.getPageData()) :
|
|
3852
|
+
const e = await Sa(this.token);
|
|
3853
|
+
e && e.data.result == 0 ? (this.languages = e.data.retVal, this.getPageData()) : tt.error("获取语言失败,出错了");
|
|
3877
3854
|
}
|
|
3878
3855
|
}
|
|
3879
|
-
},
|
|
3856
|
+
}, ko = (e, t) => {
|
|
3880
3857
|
const n = e.__vccOpts || e;
|
|
3881
|
-
for (const [
|
|
3882
|
-
n[
|
|
3858
|
+
for (const [a, s] of t)
|
|
3859
|
+
n[a] = s;
|
|
3883
3860
|
return n;
|
|
3884
|
-
},
|
|
3885
|
-
function
|
|
3886
|
-
const o =
|
|
3887
|
-
return
|
|
3888
|
-
modelValue:
|
|
3889
|
-
"onUpdate:modelValue": t[
|
|
3861
|
+
}, Po = { key: 0 }, Ro = { class: "extra" }, Mo = { class: "gc_i18n_page" }, Fo = { style: { display: "flex" } };
|
|
3862
|
+
function wo(e, t, n, a, s, r) {
|
|
3863
|
+
const o = oe("Spin"), l = oe("Table"), c = oe("TabPane"), _ = oe("Input"), T = oe("Tabs"), h = oe("Page"), E = oe("Button"), A = oe("Modal");
|
|
3864
|
+
return De(), Ge(A, {
|
|
3865
|
+
modelValue: s.isModalVisible,
|
|
3866
|
+
"onUpdate:modelValue": t[3] || (t[3] = (C) => s.isModalVisible = C),
|
|
3890
3867
|
"mask-closable": !1,
|
|
3891
3868
|
width: 70,
|
|
3892
3869
|
title: "多语言管理中心",
|
|
3893
3870
|
"footer-hide": "",
|
|
3894
3871
|
onOnCancel: r.closeModal
|
|
3895
3872
|
}, {
|
|
3896
|
-
default:
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
modelValue:
|
|
3900
|
-
"onUpdate:modelValue": t[1] || (t[1] = (C) =>
|
|
3873
|
+
default: be(() => [
|
|
3874
|
+
s.isModalVisible ? (De(), Wa("div", Po, [
|
|
3875
|
+
q(T, {
|
|
3876
|
+
modelValue: s.type,
|
|
3877
|
+
"onUpdate:modelValue": t[1] || (t[1] = (C) => s.type = C),
|
|
3901
3878
|
type: "card",
|
|
3902
3879
|
class: "gc_i18n_tabs",
|
|
3903
3880
|
onOnClick: r.changeTab
|
|
3904
3881
|
}, {
|
|
3905
|
-
extra:
|
|
3906
|
-
|
|
3907
|
-
|
|
3882
|
+
extra: be(() => [
|
|
3883
|
+
ke("div", Ro, [
|
|
3884
|
+
q(_, {
|
|
3908
3885
|
prefix: "ios-search",
|
|
3909
3886
|
placeholder: "请输入搜索内容",
|
|
3910
|
-
modelValue:
|
|
3911
|
-
"onUpdate:modelValue": t[0] || (t[0] = (C) =>
|
|
3887
|
+
modelValue: s.searchText,
|
|
3888
|
+
"onUpdate:modelValue": t[0] || (t[0] = (C) => s.searchText = C),
|
|
3912
3889
|
clearable: "",
|
|
3913
3890
|
onOnEnter: r.inputSearch,
|
|
3914
3891
|
onOnClear: r.inputSearch
|
|
3915
3892
|
}, null, 8, ["modelValue", "onOnEnter", "onOnClear"])
|
|
3916
3893
|
])
|
|
3917
3894
|
]),
|
|
3918
|
-
default:
|
|
3919
|
-
|
|
3895
|
+
default: be(() => [
|
|
3896
|
+
q(c, {
|
|
3920
3897
|
name: "pageData",
|
|
3921
3898
|
label: "当前页面"
|
|
3922
3899
|
}, {
|
|
3923
|
-
default:
|
|
3924
|
-
|
|
3900
|
+
default: be(() => [
|
|
3901
|
+
s.loading ? (De(), Ge(o, {
|
|
3925
3902
|
key: 0,
|
|
3926
3903
|
class: "gc_i18n_spin"
|
|
3927
|
-
})) : (
|
|
3904
|
+
})) : (De(), Ge(l, {
|
|
3928
3905
|
key: 1,
|
|
3929
3906
|
border: "",
|
|
3930
3907
|
height: 380,
|
|
3931
3908
|
columns: r.columns,
|
|
3932
|
-
data:
|
|
3909
|
+
data: s.data
|
|
3933
3910
|
}, null, 8, ["columns", "data"]))
|
|
3934
3911
|
]),
|
|
3935
3912
|
_: 1
|
|
3936
3913
|
}),
|
|
3937
|
-
|
|
3914
|
+
q(c, {
|
|
3938
3915
|
name: "data",
|
|
3939
3916
|
label: "当前应用"
|
|
3940
3917
|
}, {
|
|
3941
|
-
default:
|
|
3942
|
-
|
|
3918
|
+
default: be(() => [
|
|
3919
|
+
s.loading ? (De(), Ge(o, {
|
|
3943
3920
|
key: 0,
|
|
3944
3921
|
class: "gc_i18n_spin"
|
|
3945
|
-
})) : (
|
|
3922
|
+
})) : (De(), Ge(l, {
|
|
3946
3923
|
key: 1,
|
|
3947
3924
|
border: "",
|
|
3948
3925
|
height: 380,
|
|
3949
3926
|
columns: r.columns,
|
|
3950
|
-
data:
|
|
3927
|
+
data: s.data
|
|
3951
3928
|
}, null, 8, ["columns", "data"]))
|
|
3952
3929
|
]),
|
|
3953
3930
|
_: 1
|
|
@@ -3955,141 +3932,110 @@ function Fo(e, t, n, s, a, r) {
|
|
|
3955
3932
|
]),
|
|
3956
3933
|
_: 1
|
|
3957
3934
|
}, 8, ["modelValue", "onOnClick"]),
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
key: 0,
|
|
3935
|
+
ke("div", Mo, [
|
|
3936
|
+
ke("div", Fo, [
|
|
3937
|
+
q(h, {
|
|
3962
3938
|
modelValue: r.firstResult,
|
|
3963
3939
|
"onUpdate:modelValue": t[2] || (t[2] = (C) => r.firstResult = C),
|
|
3964
|
-
total:
|
|
3940
|
+
total: s.page.totalRows,
|
|
3965
3941
|
"page-size": 10,
|
|
3966
3942
|
simple: "",
|
|
3967
3943
|
"show-total": "",
|
|
3968
3944
|
onOnChange: r.changePage
|
|
3969
|
-
}, null, 8, ["modelValue", "total", "onOnChange"])
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
total: a.page.totalRows,
|
|
3974
|
-
"page-size": 10,
|
|
3975
|
-
simple: "",
|
|
3976
|
-
"show-total": "",
|
|
3977
|
-
onOnChange: r.changePage
|
|
3978
|
-
}, null, 8, ["modelValue", "total", "onOnChange"])),
|
|
3979
|
-
Ye("div", null, " 共 " + Gs(a.type === "pageData" ? n.translationKeys.length : a.page.totalRows) + " 项数据 ", 1)
|
|
3945
|
+
}, null, 8, ["modelValue", "total", "onOnChange"]),
|
|
3946
|
+
ke("div", null, [
|
|
3947
|
+
ke("span", null, " 共 " + Ga(s.page.totalRows) + " 项当前页数据 ", 1)
|
|
3948
|
+
])
|
|
3980
3949
|
]),
|
|
3981
|
-
|
|
3982
|
-
|
|
3950
|
+
ke("div", null, [
|
|
3951
|
+
q(E, {
|
|
3983
3952
|
style: { "margin-right": "10px" },
|
|
3984
3953
|
onClick: r.closeModal
|
|
3985
3954
|
}, {
|
|
3986
|
-
default:
|
|
3987
|
-
|
|
3955
|
+
default: be(() => t[4] || (t[4] = [
|
|
3956
|
+
He("关闭")
|
|
3988
3957
|
])),
|
|
3989
3958
|
_: 1
|
|
3990
3959
|
}, 8, ["onClick"]),
|
|
3991
|
-
|
|
3960
|
+
q(E, {
|
|
3992
3961
|
type: "primary",
|
|
3993
3962
|
onClick: r.saveData
|
|
3994
3963
|
}, {
|
|
3995
|
-
default:
|
|
3996
|
-
|
|
3964
|
+
default: be(() => t[5] || (t[5] = [
|
|
3965
|
+
He("保存")
|
|
3997
3966
|
])),
|
|
3998
3967
|
_: 1
|
|
3999
3968
|
}, 8, ["onClick"])
|
|
4000
3969
|
])
|
|
4001
3970
|
])
|
|
4002
|
-
])) :
|
|
3971
|
+
])) : xa("", !0)
|
|
4003
3972
|
]),
|
|
4004
3973
|
_: 1
|
|
4005
3974
|
}, 8, ["modelValue", "onOnCancel"]);
|
|
4006
3975
|
}
|
|
4007
|
-
const
|
|
4008
|
-
function
|
|
3976
|
+
const Uo = /* @__PURE__ */ ko(Do, [["render", wo], ["__scopeId", "data-v-c80bef0d"]]);
|
|
3977
|
+
function Ca(e) {
|
|
4009
3978
|
const t = [], n = /(?:\$t|_ctx\.\$t)\s*\(\s*(['"])([^'"]+?)\1/gs;
|
|
4010
3979
|
if (e.template) {
|
|
4011
|
-
let s;
|
|
4012
|
-
for (; (s = n.exec(e.template)) !== null; )
|
|
4013
|
-
t.push(s[2]);
|
|
4014
|
-
}
|
|
4015
|
-
if (e.render) {
|
|
4016
|
-
const s = e.render.toString();
|
|
4017
3980
|
let a;
|
|
4018
|
-
for (; (a = n.exec(
|
|
3981
|
+
for (; (a = n.exec(e.template)) !== null; )
|
|
4019
3982
|
t.push(a[2]);
|
|
4020
3983
|
}
|
|
3984
|
+
if (e.render) {
|
|
3985
|
+
const a = e.render.toString();
|
|
3986
|
+
let s;
|
|
3987
|
+
for (; (s = n.exec(a)) !== null; )
|
|
3988
|
+
t.push(s[2]);
|
|
3989
|
+
}
|
|
4021
3990
|
if (e.setup) {
|
|
4022
|
-
const
|
|
4023
|
-
let
|
|
4024
|
-
for (; (
|
|
4025
|
-
t.push(
|
|
3991
|
+
const a = e.setup.toString();
|
|
3992
|
+
let s;
|
|
3993
|
+
for (; (s = n.exec(a)) !== null; )
|
|
3994
|
+
t.push(s[2]);
|
|
4026
3995
|
}
|
|
4027
3996
|
if (e.methods)
|
|
4028
|
-
for (const
|
|
4029
|
-
const
|
|
3997
|
+
for (const a in e.methods) {
|
|
3998
|
+
const s = e.methods[a].toString();
|
|
4030
3999
|
let r;
|
|
4031
|
-
for (; (r = n.exec(
|
|
4000
|
+
for (; (r = n.exec(s)) !== null; )
|
|
4032
4001
|
t.push(r[2]);
|
|
4033
4002
|
}
|
|
4034
4003
|
if (e.components)
|
|
4035
|
-
for (const
|
|
4036
|
-
const
|
|
4037
|
-
t.push(...
|
|
4004
|
+
for (const a in e.components) {
|
|
4005
|
+
const s = e.components[a];
|
|
4006
|
+
t.push(...Ca(s));
|
|
4038
4007
|
}
|
|
4039
4008
|
return [...new Set(t)];
|
|
4040
4009
|
}
|
|
4041
|
-
|
|
4042
|
-
duration: 3
|
|
4043
|
-
});
|
|
4044
|
-
ke.defaults.timeout = 6e4;
|
|
4045
|
-
ke.interceptors.request.use(
|
|
4046
|
-
(e) => (e.headers["Content-Type"] = "application/json", e),
|
|
4047
|
-
(e) => (se.error({
|
|
4048
|
-
content: "请求超时!"
|
|
4049
|
-
}), Promise.resolve(e))
|
|
4050
|
-
);
|
|
4051
|
-
ke.interceptors.response.use(
|
|
4052
|
-
(e) => {
|
|
4053
|
-
const { nomsg: t } = e.config.headers;
|
|
4054
|
-
return e.status && e.status != 200 ? t || se.error({
|
|
4055
|
-
content: e.data.message || "未知错误"
|
|
4056
|
-
}) : e.data.success = !0, e;
|
|
4057
|
-
},
|
|
4058
|
-
(e) => (e.response ? e.response.status == 504 || e.response.status == 404 ? se.error({ content: "服务器被吃了⊙﹏⊙∥" }) : e.response.status == 403 ? se.error({ content: "权限不足,请联系管理员!" }) : se.error({
|
|
4059
|
-
content: `${e.response.status}:${e.response.statusText || e.response.error}`
|
|
4060
|
-
}) : e.code === "ECONNABORTED" && e.message.indexOf("timeout") !== -1 ? se.error({
|
|
4061
|
-
content: "请求超时!"
|
|
4062
|
-
}) : se.error({ content: e.message || "未知错误!" }), Promise.resolve(e))
|
|
4063
|
-
);
|
|
4064
|
-
function Uo(e) {
|
|
4010
|
+
function Vo(e) {
|
|
4065
4011
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
|
|
4066
|
-
var
|
|
4067
|
-
|
|
4012
|
+
var a = e.get(t);
|
|
4013
|
+
a ? a.push(n) : e.set(t, [n]);
|
|
4068
4014
|
}, off: function(t, n) {
|
|
4069
|
-
var
|
|
4070
|
-
|
|
4015
|
+
var a = e.get(t);
|
|
4016
|
+
a && (n ? a.splice(a.indexOf(n) >>> 0, 1) : e.set(t, []));
|
|
4071
4017
|
}, emit: function(t, n) {
|
|
4072
|
-
var
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
}), (
|
|
4076
|
-
|
|
4018
|
+
var a = e.get(t);
|
|
4019
|
+
a && a.slice().map(function(s) {
|
|
4020
|
+
s(n);
|
|
4021
|
+
}), (a = e.get("*")) && a.slice().map(function(s) {
|
|
4022
|
+
s(t, n);
|
|
4077
4023
|
});
|
|
4078
4024
|
} };
|
|
4079
4025
|
}
|
|
4080
|
-
function
|
|
4026
|
+
function $o(e) {
|
|
4081
4027
|
const t = {
|
|
4082
4028
|
alg: "HS512"
|
|
4083
4029
|
// 算法
|
|
4084
4030
|
}, n = {
|
|
4085
4031
|
orgCode: e
|
|
4086
|
-
},
|
|
4087
|
-
return
|
|
4032
|
+
}, a = JSON.stringify(t), s = JSON.stringify(n);
|
|
4033
|
+
return Ha.JWS.sign("HS512", a, s, "");
|
|
4088
4034
|
}
|
|
4089
|
-
class
|
|
4035
|
+
class Xo {
|
|
4090
4036
|
constructor(t = {}) {
|
|
4091
|
-
const { router: n, appCode:
|
|
4092
|
-
this.token = r ||
|
|
4037
|
+
const { router: n, appCode: a, messages: s, token: r, orgCode: o } = t;
|
|
4038
|
+
this.token = r || $o(o), this.loadI18n = !0, this.appCode = a, this.router = n, this.locale = Oe.get("I18N_LANGUAGE") || navigator.language || "zh-CN", this.name = "", this.messages = s || {}, this.translationKeys = [], this.initRouterGuards(), this.initI18n(t), ka.bind("shift > t", (l) => {
|
|
4093
4039
|
this.configInstance || (this.configInstance = this.createModal(this.name), this.configInstance.openModal({ name: this.name }));
|
|
4094
4040
|
}), this.setupLanguageChangeListener();
|
|
4095
4041
|
}
|
|
@@ -4102,9 +4048,9 @@ class jo {
|
|
|
4102
4048
|
}
|
|
4103
4049
|
// 初始化路由守卫
|
|
4104
4050
|
initRouterGuards() {
|
|
4105
|
-
this.router.beforeEach(async (t, n,
|
|
4106
|
-
const { language:
|
|
4107
|
-
if (this.configInstance && this.configInstance.closeModal(), this.name = t.name, r && this.setToken(r), this.loadI18n && await this.setLanguage(
|
|
4051
|
+
this.router.beforeEach(async (t, n, a) => {
|
|
4052
|
+
const { language: s, token: r } = t.query;
|
|
4053
|
+
if (this.configInstance && this.configInstance.closeModal(), this.name = t.name, r && this.setToken(r), this.loadI18n && await this.setLanguage(s || this.locale), this.loadI18n = !1, t.matched.length > 0) {
|
|
4108
4054
|
const o = [];
|
|
4109
4055
|
for (const l of t.matched) {
|
|
4110
4056
|
let c = l.components.default;
|
|
@@ -4112,17 +4058,17 @@ class jo {
|
|
|
4112
4058
|
try {
|
|
4113
4059
|
c = await c(), c = c.default;
|
|
4114
4060
|
} catch (_) {
|
|
4115
|
-
console.error("加载异步组件时出错:", _),
|
|
4061
|
+
console.error("加载异步组件时出错:", _), a();
|
|
4116
4062
|
return;
|
|
4117
4063
|
}
|
|
4118
4064
|
if (c) {
|
|
4119
|
-
const _ =
|
|
4065
|
+
const _ = Ca(c);
|
|
4120
4066
|
o.push(..._);
|
|
4121
4067
|
}
|
|
4122
4068
|
}
|
|
4123
4069
|
this.translationKeys = o;
|
|
4124
4070
|
}
|
|
4125
|
-
|
|
4071
|
+
a();
|
|
4126
4072
|
});
|
|
4127
4073
|
}
|
|
4128
4074
|
// 初始化 i18n 实例
|
|
@@ -4138,69 +4084,69 @@ class jo {
|
|
|
4138
4084
|
...t
|
|
4139
4085
|
});
|
|
4140
4086
|
const n = this.i18n.global.t;
|
|
4141
|
-
globalThis.$t = this.i18n.global.t = (
|
|
4087
|
+
globalThis.$t = this.i18n.global.t = (a, s) => {
|
|
4142
4088
|
var o, l, c;
|
|
4143
4089
|
const r = (c = (l = (o = this.router) == null ? void 0 : o.currentRoute) == null ? void 0 : l.value) == null ? void 0 : c.name;
|
|
4144
4090
|
if (r) {
|
|
4145
|
-
const _ = `${r}.${
|
|
4091
|
+
const _ = `${r}.${a}`, T = n(_);
|
|
4146
4092
|
if (T !== _)
|
|
4147
4093
|
return T;
|
|
4148
4094
|
{
|
|
4149
|
-
const h = `common.${
|
|
4150
|
-
return E !== h ? E : n(
|
|
4095
|
+
const h = `common.${a}`, E = n(h);
|
|
4096
|
+
return E !== h ? E : n(a, s);
|
|
4151
4097
|
}
|
|
4152
4098
|
} else
|
|
4153
|
-
return n(
|
|
4154
|
-
}, globalThis.$deepScan = function(
|
|
4155
|
-
return
|
|
4156
|
-
}, globalThis.$changeLocale = this.changeLocale = this.i18n.global.changeLocale = async (
|
|
4157
|
-
await this.setLanguage(
|
|
4099
|
+
return n(a, s);
|
|
4100
|
+
}, globalThis.$deepScan = function(a) {
|
|
4101
|
+
return a;
|
|
4102
|
+
}, globalThis.$changeLocale = this.changeLocale = this.i18n.global.changeLocale = async (a) => {
|
|
4103
|
+
await this.setLanguage(a || this.locale);
|
|
4158
4104
|
};
|
|
4159
4105
|
}
|
|
4160
4106
|
setToken(t) {
|
|
4161
4107
|
this.token = t;
|
|
4162
4108
|
}
|
|
4163
4109
|
getLanguage(t) {
|
|
4164
|
-
return
|
|
4110
|
+
return Oe.get("I18N_TEST.zh-TW");
|
|
4165
4111
|
}
|
|
4166
4112
|
async getLanguages(t = !1) {
|
|
4167
|
-
const n =
|
|
4113
|
+
const n = Oe.get("I18N_LANGUAGES");
|
|
4168
4114
|
if (n && !t)
|
|
4169
4115
|
return n;
|
|
4170
4116
|
{
|
|
4171
|
-
const
|
|
4117
|
+
const a = await Sa({
|
|
4172
4118
|
appCode: this.appCode,
|
|
4173
4119
|
token: this.token
|
|
4174
4120
|
});
|
|
4175
|
-
if (
|
|
4176
|
-
const
|
|
4177
|
-
return
|
|
4121
|
+
if (a.data) {
|
|
4122
|
+
const s = B.get(a.data, "retVal");
|
|
4123
|
+
return Oe.set("I18N_LANGUAGES", s), s;
|
|
4178
4124
|
}
|
|
4179
4125
|
}
|
|
4180
4126
|
}
|
|
4181
4127
|
async setLanguage(t) {
|
|
4182
|
-
return new Promise(async (n,
|
|
4183
|
-
const
|
|
4128
|
+
return new Promise(async (n, a) => {
|
|
4129
|
+
const s = await Co({
|
|
4184
4130
|
appCode: this.appCode,
|
|
4185
4131
|
language: t || this.locale,
|
|
4186
4132
|
token: this.token
|
|
4187
4133
|
});
|
|
4188
|
-
if (
|
|
4189
|
-
const r = vo(
|
|
4134
|
+
if (s) {
|
|
4135
|
+
const r = vo(s), o = B.assign(
|
|
4190
4136
|
{},
|
|
4191
|
-
|
|
4137
|
+
B.get(this.messages, t),
|
|
4192
4138
|
r
|
|
4193
4139
|
);
|
|
4194
4140
|
this.i18n.global.setLocaleMessage(t, o);
|
|
4195
4141
|
}
|
|
4196
|
-
this.locale = t, this.i18n.global.locale.value = t,
|
|
4142
|
+
this.locale = t, this.i18n.global.locale.value = t, Oe.set("I18N_LANGUAGE", t), n(!0);
|
|
4197
4143
|
});
|
|
4198
4144
|
}
|
|
4199
4145
|
createModal(t) {
|
|
4200
|
-
const n =
|
|
4201
|
-
return n.on("closeModal", (
|
|
4146
|
+
const n = Vo();
|
|
4147
|
+
return n.on("closeModal", (a) => {
|
|
4202
4148
|
this.configInstance = null;
|
|
4203
|
-
}),
|
|
4149
|
+
}), Ya(Uo, {
|
|
4204
4150
|
appCode: this.appCode,
|
|
4205
4151
|
token: this.token,
|
|
4206
4152
|
setLanguage: this.setLanguage.bind(this, this.locale),
|
|
@@ -4217,5 +4163,5 @@ class jo {
|
|
|
4217
4163
|
}
|
|
4218
4164
|
}
|
|
4219
4165
|
export {
|
|
4220
|
-
|
|
4166
|
+
Xo as default
|
|
4221
4167
|
};
|