@linagora/linid-im-front-corelib 0.0.21 → 0.0.23
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/dist/core-lib.es.js +293 -275
- package/dist/core-lib.umd.js +8 -8
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useScopedI18n.d.ts +19 -0
- package/dist/types/src/lifecycle/skeleton.d.ts +10 -5
- package/dist/types/src/services/linidModuleConfigurationService.d.ts +3 -2
- package/dist/types/src/types/module.d.ts +9 -2
- package/dist/types/src/types/moduleLifecycle.d.ts +10 -5
- package/package.json +1 -1
package/dist/core-lib.es.js
CHANGED
|
@@ -86,39 +86,39 @@ function Tn(e) {
|
|
|
86
86
|
return !!(Ke(e) && e.effect);
|
|
87
87
|
}
|
|
88
88
|
function In(e, t, n, r) {
|
|
89
|
-
const { state: s, actions: o, getters: i } = t,
|
|
90
|
-
let
|
|
89
|
+
const { state: s, actions: o, getters: i } = t, u = n.state.value[e];
|
|
90
|
+
let c;
|
|
91
91
|
function p() {
|
|
92
|
-
!
|
|
93
|
-
const
|
|
92
|
+
!u && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = s ? s() : {});
|
|
93
|
+
const O = process.env.NODE_ENV !== "production" && r ? (
|
|
94
94
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
95
95
|
gn(je(s ? s() : {}).value)
|
|
96
96
|
) : gn(n.state.value[e]);
|
|
97
|
-
return re(
|
|
97
|
+
return re(O, o, Object.keys(i || {}).reduce((T, g) => (process.env.NODE_ENV !== "production" && g in O && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), T[g] = xe(ge(() => {
|
|
98
98
|
ct(n);
|
|
99
99
|
const v = n._s.get(e);
|
|
100
100
|
return i[g].call(v, v);
|
|
101
101
|
})), T), {}));
|
|
102
102
|
}
|
|
103
|
-
return
|
|
103
|
+
return c = Bt(e, p, t, n, r, !0), c;
|
|
104
104
|
}
|
|
105
105
|
function Bt(e, t, n = {}, r, s, o) {
|
|
106
106
|
let i;
|
|
107
|
-
const
|
|
107
|
+
const u = re({ actions: {} }, n);
|
|
108
108
|
if (process.env.NODE_ENV !== "production" && !r._e.active)
|
|
109
109
|
throw new Error("Pinia destroyed");
|
|
110
|
-
const
|
|
111
|
-
process.env.NODE_ENV !== "production" && (
|
|
110
|
+
const c = { deep: !0 };
|
|
111
|
+
process.env.NODE_ENV !== "production" && (c.onTrigger = (b) => {
|
|
112
112
|
p ? v = b : p == !1 && !f._hotUpdating && (Array.isArray(v) ? v.push(b) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
113
113
|
});
|
|
114
|
-
let p,
|
|
114
|
+
let p, O, T = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), v;
|
|
115
115
|
const R = r.state.value[e];
|
|
116
116
|
!o && !R && (process.env.NODE_ENV === "production" || !s) && (r.state.value[e] = {});
|
|
117
117
|
const S = je({});
|
|
118
118
|
let D;
|
|
119
119
|
function _(b) {
|
|
120
120
|
let A;
|
|
121
|
-
p =
|
|
121
|
+
p = O = !1, process.env.NODE_ENV !== "production" && (v = []), typeof b == "function" ? (b(r.state.value[e]), A = {
|
|
122
122
|
type: Be.patchFunction,
|
|
123
123
|
storeId: e,
|
|
124
124
|
events: v
|
|
@@ -131,7 +131,7 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
131
131
|
const M = D = Symbol();
|
|
132
132
|
Nn().then(() => {
|
|
133
133
|
D === M && (p = !0);
|
|
134
|
-
}),
|
|
134
|
+
}), O = !0, Re(T, A, r.state.value[e]);
|
|
135
135
|
}
|
|
136
136
|
const E = o ? function() {
|
|
137
137
|
const { state: A } = n, M = A ? A() : {};
|
|
@@ -189,12 +189,12 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
189
189
|
$reset: E,
|
|
190
190
|
$subscribe(b, A = {}) {
|
|
191
191
|
const M = Ln(T, b, A.detached, () => X()), X = i.run(() => Ht(() => r.state.value[e], (fe) => {
|
|
192
|
-
(A.flush === "sync" ?
|
|
192
|
+
(A.flush === "sync" ? O : p) && b({
|
|
193
193
|
storeId: e,
|
|
194
194
|
type: Be.direct,
|
|
195
195
|
events: v
|
|
196
196
|
}, fe);
|
|
197
|
-
}, re({},
|
|
197
|
+
}, re({}, c, A)));
|
|
198
198
|
return M;
|
|
199
199
|
},
|
|
200
200
|
$dispose: h
|
|
@@ -216,7 +216,7 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
216
216
|
process.env.NODE_ENV !== "production" && s ? S.value[b] = Ft(F, b) : o || (R && ss(A) && (Ke(A) ? A.value = R[b] : xt(A, R[b])), r.state.value[e][b] = A), process.env.NODE_ENV !== "production" && I.state.push(b);
|
|
217
217
|
else if (typeof A == "function") {
|
|
218
218
|
const M = process.env.NODE_ENV !== "production" && s ? A : m(A, b);
|
|
219
|
-
F[b] = M, process.env.NODE_ENV !== "production" && (I.actions[b] = A),
|
|
219
|
+
F[b] = M, process.env.NODE_ENV !== "production" && (I.actions[b] = A), u.actions[b] = A;
|
|
220
220
|
} else process.env.NODE_ENV !== "production" && Tn(A) && (I.getters[b] = o ? (
|
|
221
221
|
// @ts-expect-error
|
|
222
222
|
n.getters[b]
|
|
@@ -241,7 +241,7 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
241
241
|
f[A] = Ft(b.$state, A);
|
|
242
242
|
}), Object.keys(f.$state).forEach((A) => {
|
|
243
243
|
A in b.$state || delete f[A];
|
|
244
|
-
}), p = !1,
|
|
244
|
+
}), p = !1, O = !1, r.state.value[e] = Ft(b._hmrPayload, "hotState"), O = !0, Nn().then(() => {
|
|
245
245
|
p = !0;
|
|
246
246
|
});
|
|
247
247
|
for (const A in b._hmrPayload.actions) {
|
|
@@ -279,7 +279,7 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
279
279
|
store: f,
|
|
280
280
|
app: r._a,
|
|
281
281
|
pinia: r,
|
|
282
|
-
options:
|
|
282
|
+
options: u
|
|
283
283
|
}));
|
|
284
284
|
Object.keys(A || {}).forEach((M) => f._customProperties.add(M)), re(f, A);
|
|
285
285
|
} else
|
|
@@ -287,36 +287,36 @@ function Bt(e, t, n = {}, r, s, o) {
|
|
|
287
287
|
store: f,
|
|
288
288
|
app: r._a,
|
|
289
289
|
pinia: r,
|
|
290
|
-
options:
|
|
290
|
+
options: u
|
|
291
291
|
})));
|
|
292
292
|
}), process.env.NODE_ENV !== "production" && f.$state && typeof f.$state == "object" && typeof f.$state.constructor == "function" && !f.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
293
293
|
state: () => new MyClass()
|
|
294
|
-
Found in store "${f.$id}".`), R && o && n.hydrate && n.hydrate(f.$state, R), p = !0,
|
|
294
|
+
Found in store "${f.$id}".`), R && o && n.hydrate && n.hydrate(f.$state, R), p = !0, O = !0, f;
|
|
295
295
|
}
|
|
296
296
|
// @__NO_SIDE_EFFECTS__
|
|
297
297
|
function sn(e, t, n) {
|
|
298
298
|
let r;
|
|
299
299
|
const s = typeof t == "function";
|
|
300
300
|
r = s ? n : t;
|
|
301
|
-
function o(i,
|
|
302
|
-
const
|
|
301
|
+
function o(i, u) {
|
|
302
|
+
const c = Gt();
|
|
303
303
|
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
|
304
304
|
// pinia instance with getActivePinia()
|
|
305
|
-
(process.env.NODE_ENV === "test" && Ce && Ce._testing ? null : i) || (
|
|
305
|
+
(process.env.NODE_ENV === "test" && Ce && Ce._testing ? null : i) || (c ? at(Yt, null) : null), i && ct(i), process.env.NODE_ENV !== "production" && !Ce)
|
|
306
306
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
307
307
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
308
308
|
This will fail in production.`);
|
|
309
309
|
i = Ce, i._s.has(e) || (s ? Bt(e, t, r, i) : In(e, r, i), process.env.NODE_ENV !== "production" && (o._pinia = i));
|
|
310
310
|
const p = i._s.get(e);
|
|
311
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
312
|
-
const
|
|
313
|
-
|
|
311
|
+
if (process.env.NODE_ENV !== "production" && u) {
|
|
312
|
+
const O = "__hot:" + e, T = s ? Bt(O, t, r, i, !0) : In(O, re({}, r), i, !0);
|
|
313
|
+
u._hotUpdate(T), delete i.state.value[O], i._s.delete(O);
|
|
314
314
|
}
|
|
315
315
|
if (process.env.NODE_ENV !== "production" && Me) {
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
!
|
|
319
|
-
const T =
|
|
316
|
+
const O = Fr();
|
|
317
|
+
if (O && O.proxy && // avoid adding stores that are just built for hot module replacement
|
|
318
|
+
!u) {
|
|
319
|
+
const T = O.proxy, g = "_pStores" in T ? T._pStores : T._pStores = {};
|
|
320
320
|
g[e] = p;
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -372,9 +372,9 @@ const os = () => as(on()), as = /* @__PURE__ */ sn("linidZoneStore", {
|
|
|
372
372
|
s.value = !0;
|
|
373
373
|
});
|
|
374
374
|
}), (o, i) => (wt(), On(it, null, [
|
|
375
|
-
(wt(!0), On(it, null, xr(r.value, (
|
|
376
|
-
key:
|
|
377
|
-
}, { ref_for: !0 },
|
|
375
|
+
(wt(!0), On(it, null, xr(r.value, (u, c) => (wt(), Br(jr(u.component), Kr({
|
|
376
|
+
key: u.plugin + c
|
|
377
|
+
}, { ref_for: !0 }, u.props), null, 16))), 128)),
|
|
378
378
|
s.value && r.value.length === 0 ? Hr(o.$slots, "default", { key: 0 }, () => [
|
|
379
379
|
i[0] || (i[0] = Xr("div", null, "No components to render in this zone.", -1))
|
|
380
380
|
]) : Yr("", !0)
|
|
@@ -458,19 +458,19 @@ function Ns(e, t = 0, n = e.length) {
|
|
|
458
458
|
const o = [];
|
|
459
459
|
for (let i = 0; i < r.length; i++)
|
|
460
460
|
if (s += r[i].length + 1, s >= t) {
|
|
461
|
-
for (let
|
|
462
|
-
if (
|
|
461
|
+
for (let u = i - Sn; u <= i + Sn || n > s; u++) {
|
|
462
|
+
if (u < 0 || u >= r.length)
|
|
463
463
|
continue;
|
|
464
|
-
const
|
|
465
|
-
o.push(`${
|
|
466
|
-
const p = r[
|
|
467
|
-
if (
|
|
468
|
-
const
|
|
469
|
-
o.push(" | " + " ".repeat(
|
|
470
|
-
} else if (
|
|
464
|
+
const c = u + 1;
|
|
465
|
+
o.push(`${c}${" ".repeat(3 - String(c).length)}| ${r[u]}`);
|
|
466
|
+
const p = r[u].length;
|
|
467
|
+
if (u === i) {
|
|
468
|
+
const O = t - (s - p) + 1, T = Math.max(1, n > s ? p - O : n - t);
|
|
469
|
+
o.push(" | " + " ".repeat(O) + "^".repeat(T));
|
|
470
|
+
} else if (u > i) {
|
|
471
471
|
if (n > s) {
|
|
472
|
-
const
|
|
473
|
-
o.push(" | " + "^".repeat(
|
|
472
|
+
const O = Math.max(Math.min(n - s, p), 1);
|
|
473
|
+
o.push(" | " + "^".repeat(O));
|
|
474
474
|
}
|
|
475
475
|
s += p + 1;
|
|
476
476
|
}
|
|
@@ -559,8 +559,8 @@ const k = {
|
|
|
559
559
|
[k.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
|
|
560
560
|
};
|
|
561
561
|
function we(e, t, n = {}) {
|
|
562
|
-
const { domain: r, messages: s, args: o } = n, i = process.env.NODE_ENV !== "production" ? Lt((s || hs)[e] || "", ...o || []) : e,
|
|
563
|
-
return
|
|
562
|
+
const { domain: r, messages: s, args: o } = n, i = process.env.NODE_ENV !== "production" ? Lt((s || hs)[e] || "", ...o || []) : e, u = new SyntaxError(String(i));
|
|
563
|
+
return u.code = e, t && (u.location = t), u.domain = r, u;
|
|
564
564
|
}
|
|
565
565
|
function Ts(e) {
|
|
566
566
|
throw e;
|
|
@@ -570,9 +570,9 @@ const Is = /<\/?[\w\s="/.':;#-\/]+>/, bs = (e) => Is.test(e), ie = " ", Cs = "\r
|
|
|
570
570
|
function Ss(e) {
|
|
571
571
|
const t = e;
|
|
572
572
|
let n = 0, r = 1, s = 1, o = 0;
|
|
573
|
-
const i = (f) => t[f] === Cs && t[f + 1] === z,
|
|
573
|
+
const i = (f) => t[f] === Cs && t[f + 1] === z, u = (f) => t[f] === z, c = (f) => t[f] === vs, p = (f) => t[f] === As, O = (f) => i(f) || u(f) || c(f) || p(f), T = () => n, g = () => r, v = () => s, R = () => o, S = (f) => i(f) || c(f) || p(f) ? z : t[f], D = () => S(n), _ = () => S(n + o);
|
|
574
574
|
function E() {
|
|
575
|
-
return o = 0,
|
|
575
|
+
return o = 0, O(n) && (r++, s = 0), i(n) && n++, n++, s++, t[n];
|
|
576
576
|
}
|
|
577
577
|
function h() {
|
|
578
578
|
return i(n + o) && o++, o++, t[n + o];
|
|
@@ -606,27 +606,27 @@ function Ss(e) {
|
|
|
606
606
|
}
|
|
607
607
|
const me = void 0, ys = ".", yn = "'", Ps = "tokenizer";
|
|
608
608
|
function Ds(e, t = {}) {
|
|
609
|
-
const n = t.location !== !1, r = Ss(e), s = () => r.index(), o = () => Os(r.line(), r.column(), r.index()), i = o(),
|
|
609
|
+
const n = t.location !== !1, r = Ss(e), s = () => r.index(), o = () => Os(r.line(), r.column(), r.index()), i = o(), u = s(), c = {
|
|
610
610
|
currentType: 13,
|
|
611
|
-
offset:
|
|
611
|
+
offset: u,
|
|
612
612
|
startLoc: i,
|
|
613
613
|
endLoc: i,
|
|
614
614
|
lastType: 13,
|
|
615
|
-
lastOffset:
|
|
615
|
+
lastOffset: u,
|
|
616
616
|
lastStartLoc: i,
|
|
617
617
|
lastEndLoc: i,
|
|
618
618
|
braceNest: 0,
|
|
619
619
|
inLinked: !1,
|
|
620
620
|
text: ""
|
|
621
|
-
}, p = () =>
|
|
621
|
+
}, p = () => c, { onError: O } = t;
|
|
622
622
|
function T(a, l, N, ...P) {
|
|
623
623
|
const H = p();
|
|
624
|
-
if (l.column += N, l.offset += N,
|
|
624
|
+
if (l.column += N, l.offset += N, O) {
|
|
625
625
|
const x = n ? jt(H.startLoc, l) : null, U = we(a, x, {
|
|
626
626
|
domain: Ps,
|
|
627
627
|
args: P
|
|
628
628
|
});
|
|
629
|
-
|
|
629
|
+
O(U);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
function g(a, l, N) {
|
|
@@ -991,12 +991,12 @@ function Ds(e, t = {}) {
|
|
|
991
991
|
return N;
|
|
992
992
|
}
|
|
993
993
|
function kt() {
|
|
994
|
-
const { currentType: a, offset: l, startLoc: N, endLoc: P } =
|
|
995
|
-
return
|
|
996
|
-
|
|
994
|
+
const { currentType: a, offset: l, startLoc: N, endLoc: P } = c;
|
|
995
|
+
return c.lastType = a, c.lastOffset = l, c.lastStartLoc = N, c.lastEndLoc = P, c.offset = s(), c.startLoc = o(), r.currentChar() === me ? g(
|
|
996
|
+
c,
|
|
997
997
|
13
|
|
998
998
|
/* TokenTypes.EOF */
|
|
999
|
-
) : He(r,
|
|
999
|
+
) : He(r, c);
|
|
1000
1000
|
}
|
|
1001
1001
|
return {
|
|
1002
1002
|
nextToken: kt,
|
|
@@ -1042,11 +1042,11 @@ function Fs(e = {}) {
|
|
|
1042
1042
|
const h = _.context(), m = s(3, h.offset, h.startLoc);
|
|
1043
1043
|
return m.value = E, o(m, _.currentOffset(), _.currentPosition()), m;
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function u(_, E) {
|
|
1046
1046
|
const h = _.context(), { lastOffset: m, lastStartLoc: I } = h, C = s(5, m, I);
|
|
1047
1047
|
return C.index = parseInt(E, 10), _.nextToken(), o(C, _.currentOffset(), _.currentPosition()), C;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function c(_, E) {
|
|
1050
1050
|
const h = _.context(), { lastOffset: m, lastStartLoc: I } = h, C = s(4, m, I);
|
|
1051
1051
|
return C.key = E, _.nextToken(), o(C, _.currentOffset(), _.currentPosition()), C;
|
|
1052
1052
|
}
|
|
@@ -1054,7 +1054,7 @@ function Fs(e = {}) {
|
|
|
1054
1054
|
const h = _.context(), { lastOffset: m, lastStartLoc: I } = h, C = s(9, m, I);
|
|
1055
1055
|
return C.value = E.replace(ks, Ms), _.nextToken(), o(C, _.currentOffset(), _.currentPosition()), C;
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function O(_) {
|
|
1058
1058
|
const E = _.nextToken(), h = _.context(), { lastOffset: m, lastStartLoc: I } = h, C = s(8, m, I);
|
|
1059
1059
|
return E.type !== 11 ? (r(_, k.UNEXPECTED_EMPTY_LINKED_MODIFIER, h.lastStartLoc, 0), C.value = "", o(C, m, I), {
|
|
1060
1060
|
nextConsumeToken: E,
|
|
@@ -1071,7 +1071,7 @@ function Fs(e = {}) {
|
|
|
1071
1071
|
const E = _.context(), h = s(6, E.offset, E.startLoc);
|
|
1072
1072
|
let m = _.nextToken();
|
|
1073
1073
|
if (m.type === 8) {
|
|
1074
|
-
const I =
|
|
1074
|
+
const I = O(_);
|
|
1075
1075
|
h.modifier = I.node, m = I.nextConsumeToken || _.nextToken();
|
|
1076
1076
|
}
|
|
1077
1077
|
switch (m.type !== 9 && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), m = _.nextToken(), m.type === 2 && (m = _.nextToken()), m.type) {
|
|
@@ -1079,10 +1079,10 @@ function Fs(e = {}) {
|
|
|
1079
1079
|
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key = T(_, m.value || "");
|
|
1080
1080
|
break;
|
|
1081
1081
|
case 4:
|
|
1082
|
-
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key =
|
|
1082
|
+
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key = c(_, m.value || "");
|
|
1083
1083
|
break;
|
|
1084
1084
|
case 5:
|
|
1085
|
-
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key =
|
|
1085
|
+
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key = u(_, m.value || "");
|
|
1086
1086
|
break;
|
|
1087
1087
|
case 6:
|
|
1088
1088
|
m.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(m)), h.key = p(_, m.value || "");
|
|
@@ -1111,10 +1111,10 @@ function Fs(e = {}) {
|
|
|
1111
1111
|
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(i(_, F.value || ""));
|
|
1112
1112
|
break;
|
|
1113
1113
|
case 5:
|
|
1114
|
-
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(
|
|
1114
|
+
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(u(_, F.value || ""));
|
|
1115
1115
|
break;
|
|
1116
1116
|
case 4:
|
|
1117
|
-
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(
|
|
1117
|
+
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(c(_, F.value || ""));
|
|
1118
1118
|
break;
|
|
1119
1119
|
case 6:
|
|
1120
1120
|
F.value == null && r(_, k.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, le(F)), I.items.push(p(_, F.value || ""));
|
|
@@ -1310,15 +1310,15 @@ function Gs(e, t) {
|
|
|
1310
1310
|
indentLevel: 0
|
|
1311
1311
|
};
|
|
1312
1312
|
o && e.loc && (i.source = e.loc.source);
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1313
|
+
const u = () => i;
|
|
1314
|
+
function c(S, D) {
|
|
1315
1315
|
i.code += S;
|
|
1316
1316
|
}
|
|
1317
1317
|
function p(S, D = !0) {
|
|
1318
1318
|
const _ = D ? r : "";
|
|
1319
|
-
|
|
1319
|
+
c(s ? _ + " ".repeat(S) : _);
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function O(S = !0) {
|
|
1322
1322
|
const D = ++i.indentLevel;
|
|
1323
1323
|
S && p(D);
|
|
1324
1324
|
}
|
|
@@ -1330,9 +1330,9 @@ function Gs(e, t) {
|
|
|
1330
1330
|
p(i.indentLevel);
|
|
1331
1331
|
}
|
|
1332
1332
|
return {
|
|
1333
|
-
context:
|
|
1334
|
-
push:
|
|
1335
|
-
indent:
|
|
1333
|
+
context: u,
|
|
1334
|
+
push: c,
|
|
1335
|
+
indent: O,
|
|
1336
1336
|
deindent: T,
|
|
1337
1337
|
newline: g,
|
|
1338
1338
|
helper: (S) => `_${S}`,
|
|
@@ -1430,23 +1430,23 @@ const js = (e, t = {}) => {
|
|
|
1430
1430
|
const n = y(t.mode) ? t.mode : "normal", r = y(t.filename) ? t.filename : "message.intl";
|
|
1431
1431
|
t.sourceMap;
|
|
1432
1432
|
const s = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
1433
|
-
`, o = t.needIndent ? t.needIndent : n !== "arrow", i = e.helpers || [],
|
|
1433
|
+
`, o = t.needIndent ? t.needIndent : n !== "arrow", i = e.helpers || [], u = Gs(e, {
|
|
1434
1434
|
filename: r,
|
|
1435
1435
|
breakLineCode: s,
|
|
1436
1436
|
needIndent: o
|
|
1437
1437
|
});
|
|
1438
|
-
|
|
1439
|
-
const { code:
|
|
1438
|
+
u.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), u.indent(o), i.length > 0 && (u.push(`const { ${ln(i.map((O) => `${O}: _${O}`), ", ")} } = ctx`), u.newline()), u.push("return "), Fe(u, e), u.deindent(o), u.push("}"), delete e.helpers;
|
|
1439
|
+
const { code: c, map: p } = u.context();
|
|
1440
1440
|
return {
|
|
1441
1441
|
ast: e,
|
|
1442
|
-
code:
|
|
1442
|
+
code: c,
|
|
1443
1443
|
map: p ? p.toJSON() : void 0
|
|
1444
1444
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1445
1445
|
};
|
|
1446
1446
|
};
|
|
1447
1447
|
function Ks(e, t = {}) {
|
|
1448
|
-
const n = Q({}, t), r = !!n.jit, s = !!n.minify, o = n.optimize == null ? !0 : n.optimize,
|
|
1449
|
-
return r ? (o && Vs(
|
|
1448
|
+
const n = Q({}, t), r = !!n.jit, s = !!n.minify, o = n.optimize == null ? !0 : n.optimize, u = Fs(n).parse(e);
|
|
1449
|
+
return r ? (o && Vs(u), s && ke(u), { ast: u, code: "" }) : (Us(u, n), js(u, n));
|
|
1450
1450
|
}
|
|
1451
1451
|
function Xs() {
|
|
1452
1452
|
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ae().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ae().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
@@ -1528,9 +1528,9 @@ function to(e, t) {
|
|
|
1528
1528
|
);
|
|
1529
1529
|
if (un(n) === 1) {
|
|
1530
1530
|
const o = Qs(n);
|
|
1531
|
-
return e.plural(o.reduce((i,
|
|
1531
|
+
return e.plural(o.reduce((i, u) => [
|
|
1532
1532
|
...i,
|
|
1533
|
-
Rn(e,
|
|
1533
|
+
Rn(e, u)
|
|
1534
1534
|
], []));
|
|
1535
1535
|
} else
|
|
1536
1536
|
return Rn(e, n);
|
|
@@ -1600,12 +1600,12 @@ function ao(e, t) {
|
|
|
1600
1600
|
const s = (t.onCacheKey || so)(e), o = st[s];
|
|
1601
1601
|
if (o)
|
|
1602
1602
|
return o;
|
|
1603
|
-
const { ast: i, detectError:
|
|
1603
|
+
const { ast: i, detectError: u } = oo(e, {
|
|
1604
1604
|
...t,
|
|
1605
1605
|
location: process.env.NODE_ENV !== "production",
|
|
1606
1606
|
jit: !0
|
|
1607
|
-
}),
|
|
1608
|
-
return
|
|
1607
|
+
}), c = Vt(i);
|
|
1608
|
+
return u ? c : st[s] = c;
|
|
1609
1609
|
} else {
|
|
1610
1610
|
if (process.env.NODE_ENV !== "production" && !ae(e))
|
|
1611
1611
|
return ue(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
|
|
@@ -1690,8 +1690,8 @@ function mr(e, t, n) {
|
|
|
1690
1690
|
let i = [n];
|
|
1691
1691
|
for (; K(i); )
|
|
1692
1692
|
i = Mn(o, i, t);
|
|
1693
|
-
const
|
|
1694
|
-
i = y(
|
|
1693
|
+
const u = K(t) || !V(t) ? t : t.default ? t.default : null;
|
|
1694
|
+
i = y(u) ? [u] : u, K(i) && Mn(o, i, !1), s.__localeChainCache.set(r, o);
|
|
1695
1695
|
}
|
|
1696
1696
|
return o;
|
|
1697
1697
|
}
|
|
@@ -1933,13 +1933,13 @@ function ho(e) {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
function To(e) {
|
|
1935
1935
|
const t = [];
|
|
1936
|
-
let n = -1, r = 0, s = 0, o, i,
|
|
1936
|
+
let n = -1, r = 0, s = 0, o, i, u, c, p, O, T;
|
|
1937
1937
|
const g = [];
|
|
1938
1938
|
g[
|
|
1939
1939
|
0
|
|
1940
1940
|
/* Actions.APPEND */
|
|
1941
1941
|
] = () => {
|
|
1942
|
-
i === void 0 ? i =
|
|
1942
|
+
i === void 0 ? i = u : i += u;
|
|
1943
1943
|
}, g[
|
|
1944
1944
|
1
|
|
1945
1945
|
/* Actions.PUSH */
|
|
@@ -1974,14 +1974,14 @@ function To(e) {
|
|
|
1974
1974
|
function v() {
|
|
1975
1975
|
const R = e[n + 1];
|
|
1976
1976
|
if (r === 5 && R === "'" || r === 6 && R === '"')
|
|
1977
|
-
return n++,
|
|
1977
|
+
return n++, u = "\\" + R, g[
|
|
1978
1978
|
0
|
|
1979
1979
|
/* Actions.APPEND */
|
|
1980
1980
|
](), !0;
|
|
1981
1981
|
}
|
|
1982
1982
|
for (; r !== null; )
|
|
1983
1983
|
if (n++, o = e[n], !(o === "\\" && v())) {
|
|
1984
|
-
if (
|
|
1984
|
+
if (c = Lo(o), T = Le[r], p = T[c] || T.l || 8, p === 8 || (r = p[0], p[1] !== void 0 && (O = g[p[1]], O && (u = o, O() === !1))))
|
|
1985
1985
|
return;
|
|
1986
1986
|
if (r === 7)
|
|
1987
1987
|
return t;
|
|
@@ -2003,10 +2003,10 @@ function bo(e, t) {
|
|
|
2003
2003
|
const i = n[o];
|
|
2004
2004
|
if (dr.includes(i) && ae(s))
|
|
2005
2005
|
return null;
|
|
2006
|
-
const
|
|
2007
|
-
if (
|
|
2006
|
+
const u = s[i];
|
|
2007
|
+
if (u === void 0 || Y(s))
|
|
2008
2008
|
return null;
|
|
2009
|
-
s =
|
|
2009
|
+
s = u, o++;
|
|
2010
2010
|
}
|
|
2011
2011
|
return s;
|
|
2012
2012
|
}
|
|
@@ -2060,7 +2060,7 @@ const Un = (e) => {
|
|
|
2060
2060
|
}, Mo = () => Or;
|
|
2061
2061
|
let Vn = 0;
|
|
2062
2062
|
function Fo(e = {}) {
|
|
2063
|
-
const t = Y(e.onWarn) ? e.onWarn : ue, n = y(e.version) ? e.version : vo, r = y(e.locale) || Y(e.locale) ? e.locale : _t, s = Y(r) ? _t : r, o = K(e.fallbackLocale) || V(e.fallbackLocale) || y(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, i = V(e.messages) ? e.messages : Wt(s),
|
|
2063
|
+
const t = Y(e.onWarn) ? e.onWarn : ue, n = y(e.version) ? e.version : vo, r = y(e.locale) || Y(e.locale) ? e.locale : _t, s = Y(r) ? _t : r, o = K(e.fallbackLocale) || V(e.fallbackLocale) || y(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s, i = V(e.messages) ? e.messages : Wt(s), u = V(e.datetimeFormats) ? e.datetimeFormats : Wt(s), c = V(e.numberFormats) ? e.numberFormats : Wt(s), p = Q(G(), e.modifiers, So()), O = e.pluralRules || G(), T = Y(e.missing) ? e.missing : null, g = j(e.missingWarn) || ft(e.missingWarn) ? e.missingWarn : !0, v = j(e.fallbackWarn) || ft(e.fallbackWarn) ? e.fallbackWarn : !0, R = !!e.fallbackFormat, S = !!e.unresolving, D = Y(e.postTranslation) ? e.postTranslation : null, _ = V(e.processor) ? e.processor : null, E = j(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, h = !!e.escapeParameter, m = Y(e.messageCompiler) ? e.messageCompiler : Er;
|
|
2064
2064
|
process.env.NODE_ENV !== "production" && Y(e.messageCompiler) && is(ye(te.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
2065
2065
|
const I = Y(e.messageResolver) ? e.messageResolver : pr || Io, C = Y(e.localeFallbacker) ? e.localeFallbacker : Nr || mo, f = $(e.fallbackContext) ? e.fallbackContext : void 0, w = e, F = $(w.__datetimeFormatters) ? w.__datetimeFormatters : /* @__PURE__ */ new Map(), b = $(w.__numberFormatters) ? w.__numberFormatters : /* @__PURE__ */ new Map(), A = $(w.__meta) ? w.__meta : {};
|
|
2066
2066
|
Vn++;
|
|
@@ -2071,7 +2071,7 @@ function Fo(e = {}) {
|
|
|
2071
2071
|
fallbackLocale: o,
|
|
2072
2072
|
messages: i,
|
|
2073
2073
|
modifiers: p,
|
|
2074
|
-
pluralRules:
|
|
2074
|
+
pluralRules: O,
|
|
2075
2075
|
missing: T,
|
|
2076
2076
|
missingWarn: g,
|
|
2077
2077
|
fallbackWarn: v,
|
|
@@ -2088,7 +2088,7 @@ function Fo(e = {}) {
|
|
|
2088
2088
|
onWarn: t,
|
|
2089
2089
|
__meta: A
|
|
2090
2090
|
};
|
|
2091
|
-
return M.datetimeFormats =
|
|
2091
|
+
return M.datetimeFormats = u, M.numberFormats = c, M.__datetimeFormatters = F, M.__numberFormatters = b, process.env.NODE_ENV !== "production" && (M.__v_emitter = w.__v_emitter != null ? w.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && lo(M, n, A), M;
|
|
2092
2092
|
}
|
|
2093
2093
|
const Wt = (e) => ({ [e]: G() });
|
|
2094
2094
|
function It(e, t) {
|
|
@@ -2100,8 +2100,8 @@ function Lr(e, t) {
|
|
|
2100
2100
|
function _n(e, t, n, r, s) {
|
|
2101
2101
|
const { missing: o, onWarn: i } = e;
|
|
2102
2102
|
if (process.env.NODE_ENV !== "production") {
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2103
|
+
const u = e.__v_emitter;
|
|
2104
|
+
u && u.emit("missing", {
|
|
2105
2105
|
locale: n,
|
|
2106
2106
|
key: t,
|
|
2107
2107
|
type: s,
|
|
@@ -2109,8 +2109,8 @@ function _n(e, t, n, r, s) {
|
|
|
2109
2109
|
});
|
|
2110
2110
|
}
|
|
2111
2111
|
if (o !== null) {
|
|
2112
|
-
const
|
|
2113
|
-
return y(
|
|
2112
|
+
const u = o(e, n, t, s);
|
|
2113
|
+
return y(u) ? u : t;
|
|
2114
2114
|
} else
|
|
2115
2115
|
return process.env.NODE_ENV !== "production" && Lr(r, t) && i(ye(te.NOT_FOUND_KEY, { key: t, locale: n })), t;
|
|
2116
2116
|
}
|
|
@@ -2135,43 +2135,43 @@ const $n = typeof Intl < "u", Tr = {
|
|
|
2135
2135
|
numberFormat: $n && typeof Intl.NumberFormat < "u"
|
|
2136
2136
|
};
|
|
2137
2137
|
function Wn(e, ...t) {
|
|
2138
|
-
const { datetimeFormats: n, unresolving: r, fallbackLocale: s, onWarn: o, localeFallbacker: i } = e, { __datetimeFormatters:
|
|
2138
|
+
const { datetimeFormats: n, unresolving: r, fallbackLocale: s, onWarn: o, localeFallbacker: i } = e, { __datetimeFormatters: u } = e;
|
|
2139
2139
|
if (process.env.NODE_ENV !== "production" && !Tr.dateTimeFormat)
|
|
2140
2140
|
return o(ye(te.CANNOT_FORMAT_DATE)), dt;
|
|
2141
|
-
const [
|
|
2141
|
+
const [c, p, O, T] = Xt(...t), g = j(O.missingWarn) ? O.missingWarn : e.missingWarn, v = j(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn, R = !!O.part, S = fn(e, O), D = i(
|
|
2142
2142
|
e,
|
|
2143
2143
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2144
2144
|
s,
|
|
2145
2145
|
S
|
|
2146
2146
|
);
|
|
2147
|
-
if (!y(
|
|
2147
|
+
if (!y(c) || c === "")
|
|
2148
2148
|
return new Intl.DateTimeFormat(S, T).format(p);
|
|
2149
2149
|
let _ = {}, E, h = null, m = S, I = null;
|
|
2150
2150
|
const C = "datetime format";
|
|
2151
2151
|
for (let F = 0; F < D.length; F++) {
|
|
2152
|
-
if (E = I = D[F], process.env.NODE_ENV !== "production" && S !== E && It(v,
|
|
2153
|
-
key:
|
|
2152
|
+
if (E = I = D[F], process.env.NODE_ENV !== "production" && S !== E && It(v, c) && o(ye(te.FALLBACK_TO_DATE_FORMAT, {
|
|
2153
|
+
key: c,
|
|
2154
2154
|
target: E
|
|
2155
2155
|
})), process.env.NODE_ENV !== "production" && S !== E) {
|
|
2156
2156
|
const b = e.__v_emitter;
|
|
2157
2157
|
b && b.emit("fallback", {
|
|
2158
2158
|
type: C,
|
|
2159
|
-
key:
|
|
2159
|
+
key: c,
|
|
2160
2160
|
from: m,
|
|
2161
2161
|
to: I,
|
|
2162
|
-
groupId: `${C}:${
|
|
2162
|
+
groupId: `${C}:${c}`
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
|
-
if (_ = n[E] || {}, h = _[
|
|
2165
|
+
if (_ = n[E] || {}, h = _[c], V(h))
|
|
2166
2166
|
break;
|
|
2167
|
-
_n(e,
|
|
2167
|
+
_n(e, c, E, g, C), m = I;
|
|
2168
2168
|
}
|
|
2169
2169
|
if (!V(h) || !y(E))
|
|
2170
|
-
return r ? Tt :
|
|
2171
|
-
let f = `${E}__${
|
|
2170
|
+
return r ? Tt : c;
|
|
2171
|
+
let f = `${E}__${c}`;
|
|
2172
2172
|
ht(T) || (f = `${f}__${JSON.stringify(T)}`);
|
|
2173
|
-
let w =
|
|
2174
|
-
return w || (w = new Intl.DateTimeFormat(E, Q({}, h, T)),
|
|
2173
|
+
let w = u.get(f);
|
|
2174
|
+
return w || (w = new Intl.DateTimeFormat(E, Q({}, h, T)), u.set(f, w)), R ? w.formatToParts(p) : w.format(p);
|
|
2175
2175
|
}
|
|
2176
2176
|
const Ir = [
|
|
2177
2177
|
"localeMatcher",
|
|
@@ -2197,29 +2197,29 @@ const Ir = [
|
|
|
2197
2197
|
];
|
|
2198
2198
|
function Xt(...e) {
|
|
2199
2199
|
const [t, n, r, s] = e, o = G();
|
|
2200
|
-
let i = G(),
|
|
2200
|
+
let i = G(), u;
|
|
2201
2201
|
if (y(t)) {
|
|
2202
|
-
const
|
|
2203
|
-
if (!
|
|
2202
|
+
const c = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
2203
|
+
if (!c)
|
|
2204
2204
|
throw Ee(ee.INVALID_ISO_DATE_ARGUMENT);
|
|
2205
|
-
const p =
|
|
2206
|
-
|
|
2205
|
+
const p = c[3] ? c[3].trim().startsWith("T") ? `${c[1].trim()}${c[3].trim()}` : `${c[1].trim()}T${c[3].trim()}` : c[1].trim();
|
|
2206
|
+
u = new Date(p);
|
|
2207
2207
|
try {
|
|
2208
|
-
|
|
2208
|
+
u.toISOString();
|
|
2209
2209
|
} catch {
|
|
2210
2210
|
throw Ee(ee.INVALID_ISO_DATE_ARGUMENT);
|
|
2211
2211
|
}
|
|
2212
2212
|
} else if (fs(t)) {
|
|
2213
2213
|
if (isNaN(t.getTime()))
|
|
2214
2214
|
throw Ee(ee.INVALID_DATE_ARGUMENT);
|
|
2215
|
-
|
|
2215
|
+
u = t;
|
|
2216
2216
|
} else if (q(t))
|
|
2217
|
-
|
|
2217
|
+
u = t;
|
|
2218
2218
|
else
|
|
2219
2219
|
throw Ee(ee.INVALID_ARGUMENT);
|
|
2220
|
-
return y(n) ? o.key = n : V(n) && Object.keys(n).forEach((
|
|
2221
|
-
Ir.includes(
|
|
2222
|
-
}), y(r) ? o.locale = r : V(r) && (i = r), V(s) && (i = s), [o.key || "",
|
|
2220
|
+
return y(n) ? o.key = n : V(n) && Object.keys(n).forEach((c) => {
|
|
2221
|
+
Ir.includes(c) ? i[c] = n[c] : o[c] = n[c];
|
|
2222
|
+
}), y(r) ? o.locale = r : V(r) && (i = r), V(s) && (i = s), [o.key || "", u, o, i];
|
|
2223
2223
|
}
|
|
2224
2224
|
function Gn(e, t, n) {
|
|
2225
2225
|
const r = e;
|
|
@@ -2229,43 +2229,43 @@ function Gn(e, t, n) {
|
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
2231
|
function Hn(e, ...t) {
|
|
2232
|
-
const { numberFormats: n, unresolving: r, fallbackLocale: s, onWarn: o, localeFallbacker: i } = e, { __numberFormatters:
|
|
2232
|
+
const { numberFormats: n, unresolving: r, fallbackLocale: s, onWarn: o, localeFallbacker: i } = e, { __numberFormatters: u } = e;
|
|
2233
2233
|
if (process.env.NODE_ENV !== "production" && !Tr.numberFormat)
|
|
2234
2234
|
return o(ye(te.CANNOT_FORMAT_NUMBER)), dt;
|
|
2235
|
-
const [
|
|
2235
|
+
const [c, p, O, T] = qt(...t), g = j(O.missingWarn) ? O.missingWarn : e.missingWarn, v = j(O.fallbackWarn) ? O.fallbackWarn : e.fallbackWarn, R = !!O.part, S = fn(e, O), D = i(
|
|
2236
2236
|
e,
|
|
2237
2237
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
2238
2238
|
s,
|
|
2239
2239
|
S
|
|
2240
2240
|
);
|
|
2241
|
-
if (!y(
|
|
2241
|
+
if (!y(c) || c === "")
|
|
2242
2242
|
return new Intl.NumberFormat(S, T).format(p);
|
|
2243
2243
|
let _ = {}, E, h = null, m = S, I = null;
|
|
2244
2244
|
const C = "number format";
|
|
2245
2245
|
for (let F = 0; F < D.length; F++) {
|
|
2246
|
-
if (E = I = D[F], process.env.NODE_ENV !== "production" && S !== E && It(v,
|
|
2247
|
-
key:
|
|
2246
|
+
if (E = I = D[F], process.env.NODE_ENV !== "production" && S !== E && It(v, c) && o(ye(te.FALLBACK_TO_NUMBER_FORMAT, {
|
|
2247
|
+
key: c,
|
|
2248
2248
|
target: E
|
|
2249
2249
|
})), process.env.NODE_ENV !== "production" && S !== E) {
|
|
2250
2250
|
const b = e.__v_emitter;
|
|
2251
2251
|
b && b.emit("fallback", {
|
|
2252
2252
|
type: C,
|
|
2253
|
-
key:
|
|
2253
|
+
key: c,
|
|
2254
2254
|
from: m,
|
|
2255
2255
|
to: I,
|
|
2256
|
-
groupId: `${C}:${
|
|
2256
|
+
groupId: `${C}:${c}`
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
|
-
if (_ = n[E] || {}, h = _[
|
|
2259
|
+
if (_ = n[E] || {}, h = _[c], V(h))
|
|
2260
2260
|
break;
|
|
2261
|
-
_n(e,
|
|
2261
|
+
_n(e, c, E, g, C), m = I;
|
|
2262
2262
|
}
|
|
2263
2263
|
if (!V(h) || !y(E))
|
|
2264
|
-
return r ? Tt :
|
|
2265
|
-
let f = `${E}__${
|
|
2264
|
+
return r ? Tt : c;
|
|
2265
|
+
let f = `${E}__${c}`;
|
|
2266
2266
|
ht(T) || (f = `${f}__${JSON.stringify(T)}`);
|
|
2267
|
-
let w =
|
|
2268
|
-
return w || (w = new Intl.NumberFormat(E, Q({}, h, T)),
|
|
2267
|
+
let w = u.get(f);
|
|
2268
|
+
return w || (w = new Intl.NumberFormat(E, Q({}, h, T)), u.set(f, w)), R ? w.formatToParts(p) : w.format(p);
|
|
2269
2269
|
}
|
|
2270
2270
|
const br = [
|
|
2271
2271
|
"localeMatcher",
|
|
@@ -2294,10 +2294,10 @@ function qt(...e) {
|
|
|
2294
2294
|
let i = G();
|
|
2295
2295
|
if (!q(t))
|
|
2296
2296
|
throw Ee(ee.INVALID_ARGUMENT);
|
|
2297
|
-
const
|
|
2298
|
-
return y(n) ? o.key = n : V(n) && Object.keys(n).forEach((
|
|
2299
|
-
br.includes(
|
|
2300
|
-
}), y(r) ? o.locale = r : V(r) && (i = r), V(s) && (i = s), [o.key || "",
|
|
2297
|
+
const u = t;
|
|
2298
|
+
return y(n) ? o.key = n : V(n) && Object.keys(n).forEach((c) => {
|
|
2299
|
+
br.includes(c) ? i[c] = n[c] : o[c] = n[c];
|
|
2300
|
+
}), y(r) ? o.locale = r : V(r) && (i = r), V(s) && (i = s), [o.key || "", u, o, i];
|
|
2301
2301
|
}
|
|
2302
2302
|
function Yn(e, t, n) {
|
|
2303
2303
|
const r = e;
|
|
@@ -2318,60 +2318,60 @@ function Yo(e, t) {
|
|
|
2318
2318
|
t.count || (t.count = e), t.n || (t.n = e);
|
|
2319
2319
|
}
|
|
2320
2320
|
function xo(e = {}) {
|
|
2321
|
-
const t = e.locale, n = Ho(e), r = $(e.pluralRules) && y(t) && Y(e.pluralRules[t]) ? e.pluralRules[t] : xn, s = $(e.pluralRules) && y(t) && Y(e.pluralRules[t]) ? xn : void 0, o = (_) => _[r(n, _.length, s)], i = e.list || [],
|
|
2322
|
-
q(e.pluralIndex) && Yo(n,
|
|
2323
|
-
const p = (_) =>
|
|
2324
|
-
function
|
|
2321
|
+
const t = e.locale, n = Ho(e), r = $(e.pluralRules) && y(t) && Y(e.pluralRules[t]) ? e.pluralRules[t] : xn, s = $(e.pluralRules) && y(t) && Y(e.pluralRules[t]) ? xn : void 0, o = (_) => _[r(n, _.length, s)], i = e.list || [], u = (_) => i[_], c = e.named || G();
|
|
2322
|
+
q(e.pluralIndex) && Yo(n, c);
|
|
2323
|
+
const p = (_) => c[_];
|
|
2324
|
+
function O(_, E) {
|
|
2325
2325
|
const h = Y(e.messages) ? e.messages(_, !!E) : $(e.messages) ? e.messages[_] : !1;
|
|
2326
2326
|
return h || (e.parent ? e.parent.message(_) : Vo);
|
|
2327
2327
|
}
|
|
2328
2328
|
const T = (_) => e.modifiers ? e.modifiers[_] : Uo, g = V(e.processor) && Y(e.processor.normalize) ? e.processor.normalize : Wo, v = V(e.processor) && Y(e.processor.interpolate) ? e.processor.interpolate : Go, R = V(e.processor) && y(e.processor.type) ? e.processor.type : $o, D = {
|
|
2329
|
-
list:
|
|
2329
|
+
list: u,
|
|
2330
2330
|
named: p,
|
|
2331
2331
|
plural: o,
|
|
2332
2332
|
linked: (_, ...E) => {
|
|
2333
2333
|
const [h, m] = E;
|
|
2334
2334
|
let I = "text", C = "";
|
|
2335
2335
|
E.length === 1 ? $(h) ? (C = h.modifier || C, I = h.type || I) : y(h) && (C = h || C) : E.length === 2 && (y(h) && (C = h || C), y(m) && (I = m || I));
|
|
2336
|
-
const f =
|
|
2336
|
+
const f = O(_, !0)(D), w = (
|
|
2337
2337
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
2338
2338
|
I === "vnode" && K(f) && C ? f[0] : f
|
|
2339
2339
|
);
|
|
2340
2340
|
return C ? T(C)(w, I) : w;
|
|
2341
2341
|
},
|
|
2342
|
-
message:
|
|
2342
|
+
message: O,
|
|
2343
2343
|
type: R,
|
|
2344
2344
|
interpolate: v,
|
|
2345
2345
|
normalize: g,
|
|
2346
|
-
values: Q(G(), i,
|
|
2346
|
+
values: Q(G(), i, c)
|
|
2347
2347
|
};
|
|
2348
2348
|
return D;
|
|
2349
2349
|
}
|
|
2350
2350
|
const Bn = () => "", se = (e) => Y(e);
|
|
2351
2351
|
function jn(e, ...t) {
|
|
2352
|
-
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: o, fallbackLocale: i, messages:
|
|
2352
|
+
const { fallbackFormat: n, postTranslation: r, unresolving: s, messageCompiler: o, fallbackLocale: i, messages: u } = e, [c, p] = Qt(...t), O = j(p.missingWarn) ? p.missingWarn : e.missingWarn, T = j(p.fallbackWarn) ? p.fallbackWarn : e.fallbackWarn, g = j(p.escapeParameter) ? p.escapeParameter : e.escapeParameter, v = !!p.resolvedMessage, R = y(p.default) || j(p.default) ? j(p.default) ? o ? c : () => c : p.default : n ? o ? c : () => c : null, S = n || R != null && (y(R) || Y(R)), D = fn(e, p);
|
|
2353
2353
|
g && Bo(p);
|
|
2354
2354
|
let [_, E, h] = v ? [
|
|
2355
|
-
|
|
2355
|
+
c,
|
|
2356
2356
|
D,
|
|
2357
|
-
|
|
2358
|
-
] : Cr(e,
|
|
2357
|
+
u[D] || G()
|
|
2358
|
+
] : Cr(e, c, D, i, T, O), m = _, I = c;
|
|
2359
2359
|
if (!v && !(y(m) || ae(m) || se(m)) && S && (m = R, I = m), !v && (!(y(m) || ae(m) || se(m)) || !y(E)))
|
|
2360
|
-
return s ? Tt :
|
|
2360
|
+
return s ? Tt : c;
|
|
2361
2361
|
if (process.env.NODE_ENV !== "production" && y(m) && e.messageCompiler == null)
|
|
2362
|
-
return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${
|
|
2362
|
+
return ue(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`), c;
|
|
2363
2363
|
let C = !1;
|
|
2364
2364
|
const f = () => {
|
|
2365
2365
|
C = !0;
|
|
2366
|
-
}, w = se(m) ? m : Ar(e,
|
|
2366
|
+
}, w = se(m) ? m : Ar(e, c, E, m, I, f);
|
|
2367
2367
|
if (C)
|
|
2368
2368
|
return m;
|
|
2369
2369
|
const F = qo(e, E, h, p), b = xo(F), A = jo(e, w, b);
|
|
2370
|
-
let M = r ? r(A,
|
|
2370
|
+
let M = r ? r(A, c) : A;
|
|
2371
2371
|
if (g && y(M) && (M = ds(M)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
2372
2372
|
const X = {
|
|
2373
2373
|
timestamp: Date.now(),
|
|
2374
|
-
key: y(
|
|
2374
|
+
key: y(c) ? c : se(m) ? m.key : "",
|
|
2375
2375
|
locale: E || (se(m) ? m.locale : ""),
|
|
2376
2376
|
format: y(m) ? m : se(m) ? m.source : "",
|
|
2377
2377
|
message: M
|
|
@@ -2386,11 +2386,11 @@ function Bo(e) {
|
|
|
2386
2386
|
});
|
|
2387
2387
|
}
|
|
2388
2388
|
function Cr(e, t, n, r, s, o) {
|
|
2389
|
-
const { messages: i, onWarn:
|
|
2389
|
+
const { messages: i, onWarn: u, messageResolver: c, localeFallbacker: p } = e, O = p(e, r, n);
|
|
2390
2390
|
let T = G(), g, v = null, R = n, S = null;
|
|
2391
2391
|
const D = "translate";
|
|
2392
|
-
for (let _ = 0; _ <
|
|
2393
|
-
if (g = S =
|
|
2392
|
+
for (let _ = 0; _ < O.length; _++) {
|
|
2393
|
+
if (g = S = O[_], process.env.NODE_ENV !== "production" && n !== g && !hr(n, g) && It(s, t) && u(ye(te.FALLBACK_TO_TRANSLATE, {
|
|
2394
2394
|
key: t,
|
|
2395
2395
|
target: g
|
|
2396
2396
|
})), process.env.NODE_ENV !== "production" && n !== g) {
|
|
@@ -2405,7 +2405,7 @@ function Cr(e, t, n, r, s, o) {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
T = i[g] || G();
|
|
2407
2407
|
let E = null, h, m;
|
|
2408
|
-
if (process.env.NODE_ENV !== "production" && pe && (E = window.performance.now(), h = "intlify-message-resolve-start", m = "intlify-message-resolve-end", ne && ne(h)), (v =
|
|
2408
|
+
if (process.env.NODE_ENV !== "production" && pe && (E = window.performance.now(), h = "intlify-message-resolve-start", m = "intlify-message-resolve-end", ne && ne(h)), (v = c(T, t)) === null && (v = T[t]), process.env.NODE_ENV !== "production" && pe) {
|
|
2409
2409
|
const I = window.performance.now(), C = e.__v_emitter;
|
|
2410
2410
|
C && E && v && C.emit("message-resolve", {
|
|
2411
2411
|
type: "message-resolve",
|
|
@@ -2417,7 +2417,7 @@ function Cr(e, t, n, r, s, o) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
if (y(v) || ae(v) || se(v))
|
|
2419
2419
|
break;
|
|
2420
|
-
if (!wo(g,
|
|
2420
|
+
if (!wo(g, O)) {
|
|
2421
2421
|
const I = _n(
|
|
2422
2422
|
e,
|
|
2423
2423
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -2433,7 +2433,7 @@ function Cr(e, t, n, r, s, o) {
|
|
|
2433
2433
|
return [v, g, T];
|
|
2434
2434
|
}
|
|
2435
2435
|
function Ar(e, t, n, r, s, o) {
|
|
2436
|
-
const { messageCompiler: i, warnHtmlMessage:
|
|
2436
|
+
const { messageCompiler: i, warnHtmlMessage: u } = e;
|
|
2437
2437
|
if (se(r)) {
|
|
2438
2438
|
const g = r;
|
|
2439
2439
|
return g.locale = g.locale || n, g.key = g.key || t, g;
|
|
@@ -2442,17 +2442,17 @@ function Ar(e, t, n, r, s, o) {
|
|
|
2442
2442
|
const g = (() => r);
|
|
2443
2443
|
return g.locale = n, g.key = t, g;
|
|
2444
2444
|
}
|
|
2445
|
-
let
|
|
2446
|
-
process.env.NODE_ENV !== "production" && pe && (
|
|
2447
|
-
const T = i(r, Ko(e, n, s, r,
|
|
2445
|
+
let c = null, p, O;
|
|
2446
|
+
process.env.NODE_ENV !== "production" && pe && (c = window.performance.now(), p = "intlify-message-compilation-start", O = "intlify-message-compilation-end", ne && ne(p));
|
|
2447
|
+
const T = i(r, Ko(e, n, s, r, u, o));
|
|
2448
2448
|
if (process.env.NODE_ENV !== "production" && pe) {
|
|
2449
2449
|
const g = window.performance.now(), v = e.__v_emitter;
|
|
2450
|
-
v &&
|
|
2450
|
+
v && c && v.emit("message-compilation", {
|
|
2451
2451
|
type: "message-compilation",
|
|
2452
2452
|
message: r,
|
|
2453
|
-
time: g -
|
|
2453
|
+
time: g - c,
|
|
2454
2454
|
groupId: `translate:${t}`
|
|
2455
|
-
}), p &&
|
|
2455
|
+
}), p && O && ne && Se && (ne(O), Se("intlify message compilation", p, O));
|
|
2456
2456
|
}
|
|
2457
2457
|
return T.locale = n, T.key = t, T.source = r, T;
|
|
2458
2458
|
}
|
|
@@ -2461,11 +2461,11 @@ function jo(e, t, n) {
|
|
|
2461
2461
|
process.env.NODE_ENV !== "production" && pe && (r = window.performance.now(), s = "intlify-message-evaluation-start", o = "intlify-message-evaluation-end", ne && ne(s));
|
|
2462
2462
|
const i = t(n);
|
|
2463
2463
|
if (process.env.NODE_ENV !== "production" && pe) {
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2464
|
+
const u = window.performance.now(), c = e.__v_emitter;
|
|
2465
|
+
c && r && c.emit("message-evaluation", {
|
|
2466
2466
|
type: "message-evaluation",
|
|
2467
2467
|
value: i,
|
|
2468
|
-
time:
|
|
2468
|
+
time: u - r,
|
|
2469
2469
|
groupId: `translate:${t.key}`
|
|
2470
2470
|
}), s && o && ne && Se && (ne(o), Se("intlify message evaluation", s, o));
|
|
2471
2471
|
}
|
|
@@ -2485,15 +2485,15 @@ function Ko(e, t, n, r, s, o) {
|
|
|
2485
2485
|
warnHtmlMessage: s,
|
|
2486
2486
|
onError: (i) => {
|
|
2487
2487
|
if (o && o(i), process.env.NODE_ENV !== "production") {
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
message:
|
|
2488
|
+
const u = Xo(r), c = `Message compilation error: ${i.message}`, p = i.location && u && Ns(u, i.location.start.offset, i.location.end.offset), O = e.__v_emitter;
|
|
2489
|
+
O && u && O.emit("compile-error", {
|
|
2490
|
+
message: u,
|
|
2491
2491
|
error: i.message,
|
|
2492
2492
|
start: i.location && i.location.start.offset,
|
|
2493
2493
|
end: i.location && i.location.end.offset,
|
|
2494
2494
|
groupId: `translate:${n}`
|
|
2495
|
-
}), console.error(p ? `${
|
|
2496
|
-
${p}` :
|
|
2495
|
+
}), console.error(p ? `${c}
|
|
2496
|
+
${p}` : c);
|
|
2497
2497
|
} else
|
|
2498
2498
|
throw i;
|
|
2499
2499
|
},
|
|
@@ -2507,20 +2507,20 @@ function Xo(e) {
|
|
|
2507
2507
|
return e.loc.source;
|
|
2508
2508
|
}
|
|
2509
2509
|
function qo(e, t, n, r) {
|
|
2510
|
-
const { modifiers: s, pluralRules: o, messageResolver: i, fallbackLocale:
|
|
2510
|
+
const { modifiers: s, pluralRules: o, messageResolver: i, fallbackLocale: u, fallbackWarn: c, missingWarn: p, fallbackContext: O } = e, g = {
|
|
2511
2511
|
locale: t,
|
|
2512
2512
|
modifiers: s,
|
|
2513
2513
|
pluralRules: o,
|
|
2514
2514
|
messages: (v, R) => {
|
|
2515
2515
|
let S = i(n, v);
|
|
2516
|
-
if (S == null && (
|
|
2516
|
+
if (S == null && (O || R)) {
|
|
2517
2517
|
const [, , D] = Cr(
|
|
2518
|
-
|
|
2518
|
+
O || e,
|
|
2519
2519
|
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
2520
2520
|
v,
|
|
2521
2521
|
t,
|
|
2522
|
-
c,
|
|
2523
2522
|
u,
|
|
2523
|
+
c,
|
|
2524
2524
|
p
|
|
2525
2525
|
);
|
|
2526
2526
|
S = i(D, v);
|
|
@@ -2641,15 +2641,15 @@ function Je(e) {
|
|
|
2641
2641
|
}
|
|
2642
2642
|
function Sr(e, t) {
|
|
2643
2643
|
const { messages: n, __i18n: r, messageResolver: s, flatJson: o } = t, i = V(n) ? n : K(r) ? G() : { [e]: G() };
|
|
2644
|
-
if (K(r) && r.forEach((
|
|
2645
|
-
if ("locale" in
|
|
2646
|
-
const { locale:
|
|
2647
|
-
|
|
2644
|
+
if (K(r) && r.forEach((u) => {
|
|
2645
|
+
if ("locale" in u && "resource" in u) {
|
|
2646
|
+
const { locale: c, resource: p } = u;
|
|
2647
|
+
c ? (i[c] = i[c] || G(), ot(p, i[c])) : ot(p, i);
|
|
2648
2648
|
} else
|
|
2649
|
-
y(
|
|
2649
|
+
y(u) && ot(JSON.parse(u), i);
|
|
2650
2650
|
}), s == null && o)
|
|
2651
|
-
for (const
|
|
2652
|
-
oe(i,
|
|
2651
|
+
for (const u in i)
|
|
2652
|
+
oe(i, u) && Je(i[u]);
|
|
2653
2653
|
return i;
|
|
2654
2654
|
}
|
|
2655
2655
|
function yr(e) {
|
|
@@ -2699,13 +2699,13 @@ const ra = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
|
2699
2699
|
function sa(e = {}) {
|
|
2700
2700
|
const { __root: t, __injectWithOption: n } = e, r = t === void 0, s = e.flatJson, o = pe ? je : qr;
|
|
2701
2701
|
let i = j(e.inheritLocale) ? e.inheritLocale : !0;
|
|
2702
|
-
const
|
|
2702
|
+
const u = o(
|
|
2703
2703
|
// prettier-ignore
|
|
2704
2704
|
t && i ? t.locale.value : y(e.locale) ? e.locale : _t
|
|
2705
|
-
),
|
|
2705
|
+
), c = o(
|
|
2706
2706
|
// prettier-ignore
|
|
2707
|
-
t && i ? t.fallbackLocale.value : y(e.fallbackLocale) || K(e.fallbackLocale) || V(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale :
|
|
2708
|
-
), p = o(Sr(
|
|
2707
|
+
t && i ? t.fallbackLocale.value : y(e.fallbackLocale) || K(e.fallbackLocale) || V(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : u.value
|
|
2708
|
+
), p = o(Sr(u.value, e)), O = o(V(e.datetimeFormats) ? e.datetimeFormats : { [u.value]: {} }), T = o(V(e.numberFormats) ? e.numberFormats : { [u.value]: {} });
|
|
2709
2709
|
let g = t ? t.missingWarn : j(e.missingWarn) || ft(e.missingWarn) ? e.missingWarn : !0, v = t ? t.fallbackWarn : j(e.fallbackWarn) || ft(e.fallbackWarn) ? e.fallbackWarn : !0, R = t ? t.fallbackRoot : j(e.fallbackRoot) ? e.fallbackRoot : !0, S = !!e.fallbackFormat, D = Y(e.missing) ? e.missing : null, _ = Y(e.missing) ? Jn(e.missing) : null, E = Y(e.postTranslation) ? e.postTranslation : null, h = t ? t.warnHtmlMessage : j(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, m = !!e.escapeParameter;
|
|
2710
2710
|
const I = t ? t.modifiers : V(e.modifiers) ? e.modifiers : {};
|
|
2711
2711
|
let C = e.pluralRules || t && t.pluralRules, f;
|
|
@@ -2713,8 +2713,8 @@ function sa(e = {}) {
|
|
|
2713
2713
|
r && Un(null);
|
|
2714
2714
|
const d = {
|
|
2715
2715
|
version: Qo,
|
|
2716
|
-
locale:
|
|
2717
|
-
fallbackLocale:
|
|
2716
|
+
locale: u.value,
|
|
2717
|
+
fallbackLocale: c.value,
|
|
2718
2718
|
messages: p.value,
|
|
2719
2719
|
modifiers: I,
|
|
2720
2720
|
pluralRules: C,
|
|
@@ -2730,30 +2730,30 @@ function sa(e = {}) {
|
|
|
2730
2730
|
messageCompiler: e.messageCompiler,
|
|
2731
2731
|
__meta: { framework: "vue" }
|
|
2732
2732
|
};
|
|
2733
|
-
d.datetimeFormats =
|
|
2734
|
-
const
|
|
2735
|
-
return r && Un(
|
|
2736
|
-
})(), Ye(f,
|
|
2733
|
+
d.datetimeFormats = O.value, d.numberFormats = T.value, d.__datetimeFormatters = V(f) ? f.__datetimeFormatters : void 0, d.__numberFormatters = V(f) ? f.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (d.__v_emitter = V(f) ? f.__v_emitter : void 0);
|
|
2734
|
+
const L = Fo(d);
|
|
2735
|
+
return r && Un(L), L;
|
|
2736
|
+
})(), Ye(f, u.value, c.value);
|
|
2737
2737
|
function F() {
|
|
2738
2738
|
return [
|
|
2739
|
-
c.value,
|
|
2740
2739
|
u.value,
|
|
2740
|
+
c.value,
|
|
2741
2741
|
p.value,
|
|
2742
|
-
|
|
2742
|
+
O.value,
|
|
2743
2743
|
T.value
|
|
2744
2744
|
];
|
|
2745
2745
|
}
|
|
2746
2746
|
const b = ge({
|
|
2747
|
-
get: () =>
|
|
2747
|
+
get: () => u.value,
|
|
2748
2748
|
set: (d) => {
|
|
2749
|
-
f.locale = d,
|
|
2749
|
+
f.locale = d, u.value = d;
|
|
2750
2750
|
}
|
|
2751
2751
|
}), A = ge({
|
|
2752
|
-
get: () =>
|
|
2752
|
+
get: () => c.value,
|
|
2753
2753
|
set: (d) => {
|
|
2754
|
-
f.fallbackLocale = d,
|
|
2754
|
+
f.fallbackLocale = d, c.value = d, Ye(f, u.value, d);
|
|
2755
2755
|
}
|
|
2756
|
-
}), M = ge(() => p.value), X = /* @__PURE__ */ ge(() =>
|
|
2756
|
+
}), M = ge(() => p.value), X = /* @__PURE__ */ ge(() => O.value), fe = /* @__PURE__ */ ge(() => T.value);
|
|
2757
2757
|
function he() {
|
|
2758
2758
|
return Y(E) ? E : null;
|
|
2759
2759
|
}
|
|
@@ -2766,10 +2766,10 @@ function sa(e = {}) {
|
|
|
2766
2766
|
function _e(d) {
|
|
2767
2767
|
d !== null && (_ = Jn(d)), D = d, f.missing = _;
|
|
2768
2768
|
}
|
|
2769
|
-
function Z(d,
|
|
2770
|
-
return d !== "translate" || !
|
|
2769
|
+
function Z(d, L) {
|
|
2770
|
+
return d !== "translate" || !L.resolvedMessage;
|
|
2771
2771
|
}
|
|
2772
|
-
const de = (d,
|
|
2772
|
+
const de = (d, L, W, B, Ie, tt) => {
|
|
2773
2773
|
F();
|
|
2774
2774
|
let De;
|
|
2775
2775
|
try {
|
|
@@ -2779,7 +2779,7 @@ function sa(e = {}) {
|
|
|
2779
2779
|
}
|
|
2780
2780
|
if (W !== "translate exists" && // for not `te` (e.g `t`)
|
|
2781
2781
|
q(De) && De === Tt || W === "translate exists" && !De) {
|
|
2782
|
-
const [be, kr] =
|
|
2782
|
+
const [be, kr] = L();
|
|
2783
2783
|
if (process.env.NODE_ENV !== "production" && t && y(be) && Z(W, kr) && (R && (It(v, be) || Lr(g, be)) && ue(mt(ce.FALLBACK_TO_ROOT, {
|
|
2784
2784
|
key: be,
|
|
2785
2785
|
type: W
|
|
@@ -2800,22 +2800,22 @@ function sa(e = {}) {
|
|
|
2800
2800
|
}
|
|
2801
2801
|
};
|
|
2802
2802
|
function $e(...d) {
|
|
2803
|
-
return de((
|
|
2803
|
+
return de((L) => Reflect.apply(jn, null, [L, ...d]), () => Qt(...d), "translate", (L) => Reflect.apply(L.t, L, [...d]), (L) => L, (L) => y(L));
|
|
2804
2804
|
}
|
|
2805
2805
|
function Ct(...d) {
|
|
2806
|
-
const [
|
|
2806
|
+
const [L, W, B] = d;
|
|
2807
2807
|
if (B && !$(B))
|
|
2808
2808
|
throw Qe(J.INVALID_ARGUMENT);
|
|
2809
|
-
return $e(
|
|
2809
|
+
return $e(L, W, Q({ resolvedMessage: !0 }, B || {}));
|
|
2810
2810
|
}
|
|
2811
2811
|
function At(...d) {
|
|
2812
|
-
return de((
|
|
2812
|
+
return de((L) => Reflect.apply(Wn, null, [L, ...d]), () => Xt(...d), "datetime format", (L) => Reflect.apply(L.d, L, [...d]), () => dt, (L) => y(L) || K(L));
|
|
2813
2813
|
}
|
|
2814
2814
|
function vt(...d) {
|
|
2815
|
-
return de((
|
|
2815
|
+
return de((L) => Reflect.apply(Hn, null, [L, ...d]), () => qt(...d), "number format", (L) => Reflect.apply(L.n, L, [...d]), () => dt, (L) => y(L) || K(L));
|
|
2816
2816
|
}
|
|
2817
2817
|
function St(d) {
|
|
2818
|
-
return d.map((
|
|
2818
|
+
return d.map((L) => y(L) || q(L) || j(L) ? Kn(String(L)) : L);
|
|
2819
2819
|
}
|
|
2820
2820
|
const yt = {
|
|
2821
2821
|
normalize: St,
|
|
@@ -2823,92 +2823,92 @@ function sa(e = {}) {
|
|
|
2823
2823
|
type: "vnode"
|
|
2824
2824
|
};
|
|
2825
2825
|
function ze(...d) {
|
|
2826
|
-
return de((
|
|
2826
|
+
return de((L) => {
|
|
2827
2827
|
let W;
|
|
2828
|
-
const B =
|
|
2828
|
+
const B = L;
|
|
2829
2829
|
try {
|
|
2830
2830
|
B.processor = yt, W = Reflect.apply(jn, null, [B, ...d]);
|
|
2831
2831
|
} finally {
|
|
2832
2832
|
B.processor = null;
|
|
2833
2833
|
}
|
|
2834
2834
|
return W;
|
|
2835
|
-
}, () => Qt(...d), "translate", (
|
|
2835
|
+
}, () => Qt(...d), "translate", (L) => L[Jt](...d), (L) => [Kn(L)], (L) => K(L));
|
|
2836
2836
|
}
|
|
2837
2837
|
function Pt(...d) {
|
|
2838
|
-
return de((
|
|
2838
|
+
return de((L) => Reflect.apply(Hn, null, [L, ...d]), () => qt(...d), "number format", (L) => L[zt](...d), qn, (L) => y(L) || K(L));
|
|
2839
2839
|
}
|
|
2840
2840
|
function et(...d) {
|
|
2841
|
-
return de((
|
|
2841
|
+
return de((L) => Reflect.apply(Wn, null, [L, ...d]), () => Xt(...d), "datetime format", (L) => L[Zt](...d), qn, (L) => y(L) || K(L));
|
|
2842
2842
|
}
|
|
2843
2843
|
function Dt(d) {
|
|
2844
2844
|
C = d, f.pluralRules = C;
|
|
2845
2845
|
}
|
|
2846
|
-
function Rt(d,
|
|
2846
|
+
function Rt(d, L) {
|
|
2847
2847
|
return de(() => {
|
|
2848
2848
|
if (!d)
|
|
2849
2849
|
return !1;
|
|
2850
|
-
const W = y(
|
|
2850
|
+
const W = y(L) ? L : u.value, B = Te(W), Ie = f.messageResolver(B, d);
|
|
2851
2851
|
return ae(Ie) || se(Ie) || y(Ie);
|
|
2852
|
-
}, () => [d], "translate exists", (W) => Reflect.apply(W.te, W, [d,
|
|
2852
|
+
}, () => [d], "translate exists", (W) => Reflect.apply(W.te, W, [d, L]), na, (W) => j(W));
|
|
2853
2853
|
}
|
|
2854
2854
|
function We(d) {
|
|
2855
|
-
let
|
|
2856
|
-
const W = mr(f,
|
|
2855
|
+
let L = null;
|
|
2856
|
+
const W = mr(f, c.value, u.value);
|
|
2857
2857
|
for (let B = 0; B < W.length; B++) {
|
|
2858
2858
|
const Ie = p.value[W[B]] || {}, tt = f.messageResolver(Ie, d);
|
|
2859
2859
|
if (tt != null) {
|
|
2860
|
-
|
|
2860
|
+
L = tt;
|
|
2861
2861
|
break;
|
|
2862
2862
|
}
|
|
2863
2863
|
}
|
|
2864
|
-
return
|
|
2864
|
+
return L;
|
|
2865
2865
|
}
|
|
2866
2866
|
function Ge(d) {
|
|
2867
|
-
const
|
|
2868
|
-
return
|
|
2867
|
+
const L = We(d);
|
|
2868
|
+
return L ?? (t ? t.tm(d) || {} : {});
|
|
2869
2869
|
}
|
|
2870
2870
|
function Te(d) {
|
|
2871
2871
|
return p.value[d] || {};
|
|
2872
2872
|
}
|
|
2873
|
-
function He(d,
|
|
2873
|
+
function He(d, L) {
|
|
2874
2874
|
if (s) {
|
|
2875
|
-
const W = { [d]:
|
|
2875
|
+
const W = { [d]: L };
|
|
2876
2876
|
for (const B in W)
|
|
2877
2877
|
oe(W, B) && Je(W[B]);
|
|
2878
|
-
|
|
2878
|
+
L = W[d];
|
|
2879
2879
|
}
|
|
2880
|
-
p.value[d] =
|
|
2880
|
+
p.value[d] = L, f.messages = p.value;
|
|
2881
2881
|
}
|
|
2882
|
-
function kt(d,
|
|
2882
|
+
function kt(d, L) {
|
|
2883
2883
|
p.value[d] = p.value[d] || {};
|
|
2884
|
-
const W = { [d]:
|
|
2884
|
+
const W = { [d]: L };
|
|
2885
2885
|
if (s)
|
|
2886
2886
|
for (const B in W)
|
|
2887
2887
|
oe(W, B) && Je(W[B]);
|
|
2888
|
-
|
|
2888
|
+
L = W[d], ot(L, p.value[d]), f.messages = p.value;
|
|
2889
2889
|
}
|
|
2890
2890
|
function a(d) {
|
|
2891
|
-
return
|
|
2891
|
+
return O.value[d] || {};
|
|
2892
2892
|
}
|
|
2893
|
-
function l(d,
|
|
2894
|
-
|
|
2893
|
+
function l(d, L) {
|
|
2894
|
+
O.value[d] = L, f.datetimeFormats = O.value, Gn(f, d, L);
|
|
2895
2895
|
}
|
|
2896
|
-
function N(d,
|
|
2897
|
-
|
|
2896
|
+
function N(d, L) {
|
|
2897
|
+
O.value[d] = Q(O.value[d] || {}, L), f.datetimeFormats = O.value, Gn(f, d, L);
|
|
2898
2898
|
}
|
|
2899
2899
|
function P(d) {
|
|
2900
2900
|
return T.value[d] || {};
|
|
2901
2901
|
}
|
|
2902
|
-
function H(d,
|
|
2903
|
-
T.value[d] =
|
|
2902
|
+
function H(d, L) {
|
|
2903
|
+
T.value[d] = L, f.numberFormats = T.value, Yn(f, d, L);
|
|
2904
2904
|
}
|
|
2905
|
-
function x(d,
|
|
2906
|
-
T.value[d] = Q(T.value[d] || {},
|
|
2905
|
+
function x(d, L) {
|
|
2906
|
+
T.value[d] = Q(T.value[d] || {}, L), f.numberFormats = T.value, Yn(f, d, L);
|
|
2907
2907
|
}
|
|
2908
2908
|
Qn++, t && pe && (Ht(t.locale, (d) => {
|
|
2909
|
-
i && (
|
|
2909
|
+
i && (u.value = d, f.locale = d, Ye(f, u.value, c.value));
|
|
2910
2910
|
}), Ht(t.fallbackLocale, (d) => {
|
|
2911
|
-
i && (
|
|
2911
|
+
i && (c.value = d, f.fallbackLocale = d, Ye(f, u.value, c.value));
|
|
2912
2912
|
}));
|
|
2913
2913
|
const U = {
|
|
2914
2914
|
id: Qn,
|
|
@@ -2918,7 +2918,7 @@ function sa(e = {}) {
|
|
|
2918
2918
|
return i;
|
|
2919
2919
|
},
|
|
2920
2920
|
set inheritLocale(d) {
|
|
2921
|
-
i = d, d && t && (
|
|
2921
|
+
i = d, d && t && (u.value = t.locale.value, c.value = t.fallbackLocale.value, Ye(f, u.value, c.value));
|
|
2922
2922
|
},
|
|
2923
2923
|
get availableLocales() {
|
|
2924
2924
|
return Object.keys(p.value).sort();
|
|
@@ -3035,16 +3035,16 @@ function Dr(e, t, n, r) {
|
|
|
3035
3035
|
const { slots: s, attrs: o } = t;
|
|
3036
3036
|
return () => {
|
|
3037
3037
|
const i = { part: !0 };
|
|
3038
|
-
let
|
|
3039
|
-
e.locale && (i.locale = e.locale), y(e.format) ? i.key = e.format : $(e.format) && (y(e.format.key) && (i.key = e.format.key),
|
|
3040
|
-
const
|
|
3038
|
+
let u = G();
|
|
3039
|
+
e.locale && (i.locale = e.locale), y(e.format) ? i.key = e.format : $(e.format) && (y(e.format.key) && (i.key = e.format.key), u = Object.keys(e.format).reduce((g, v) => n.includes(v) ? Q(G(), g, { [v]: e.format[v] }) : g, G()));
|
|
3040
|
+
const c = r(e.value, i, u);
|
|
3041
3041
|
let p = [i.key];
|
|
3042
|
-
K(
|
|
3043
|
-
const R = s[g.type], S = R ? R({ [g.type]: g.value, index: v, parts:
|
|
3042
|
+
K(c) ? p = c.map((g, v) => {
|
|
3043
|
+
const R = s[g.type], S = R ? R({ [g.type]: g.value, index: v, parts: c }) : [g.value];
|
|
3044
3044
|
return aa(S) && (S[0].key = `${g.type}-${v}`), S;
|
|
3045
|
-
}) : y(
|
|
3046
|
-
const
|
|
3047
|
-
return tr(T,
|
|
3045
|
+
}) : y(c) && (p = [c]);
|
|
3046
|
+
const O = Q(G(), o), T = y(e.tag) || $(e.tag) ? e.tag : Pr();
|
|
3047
|
+
return tr(T, O, p);
|
|
3048
3048
|
};
|
|
3049
3049
|
}
|
|
3050
3050
|
Q({
|
|
@@ -3067,17 +3067,17 @@ function bt(e = {}) {
|
|
|
3067
3067
|
if (o === "global")
|
|
3068
3068
|
return ta(r, e, s), r;
|
|
3069
3069
|
if (o === "parent") {
|
|
3070
|
-
let
|
|
3071
|
-
return
|
|
3070
|
+
let c = fa(n, t, e.__useComponent);
|
|
3071
|
+
return c == null && (process.env.NODE_ENV !== "production" && ue(mt(ce.NOT_FOUND_PARENT_SCOPE)), c = r), c;
|
|
3072
3072
|
}
|
|
3073
3073
|
const i = n;
|
|
3074
|
-
let
|
|
3075
|
-
if (
|
|
3076
|
-
const
|
|
3077
|
-
"__i18n" in s && (
|
|
3074
|
+
let u = i.__getInstance(t);
|
|
3075
|
+
if (u == null) {
|
|
3076
|
+
const c = Q({}, e);
|
|
3077
|
+
"__i18n" in s && (c.__i18n = s.__i18n), r && (c.__root = r), u = sa(c), i.__composerExtend && (u[nn] = i.__composerExtend(u)), da(i, t, u), i.__setInstance(t, u);
|
|
3078
3078
|
} else
|
|
3079
3079
|
process.env.NODE_ENV !== "production" && o === "local" && ue(mt(ce.DUPLICATE_USE_I18N_CALLING));
|
|
3080
|
-
return
|
|
3080
|
+
return u;
|
|
3081
3081
|
}
|
|
3082
3082
|
function la(e) {
|
|
3083
3083
|
const t = at(e.isCE ? ia : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
@@ -3100,8 +3100,8 @@ function fa(e, t, n = !1) {
|
|
|
3100
3100
|
if (e.mode === "composition")
|
|
3101
3101
|
r = i.__getInstance(o);
|
|
3102
3102
|
else if (__VUE_I18N_LEGACY_API__) {
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3103
|
+
const u = i.__getInstance(o);
|
|
3104
|
+
u != null && (r = u.__composer, n && r && !r[vr] && (r = null));
|
|
3105
3105
|
}
|
|
3106
3106
|
if (r != null || s === o)
|
|
3107
3107
|
break;
|
|
@@ -3163,15 +3163,29 @@ function ma() {
|
|
|
3163
3163
|
return Et;
|
|
3164
3164
|
}
|
|
3165
3165
|
function Ba(e) {
|
|
3166
|
-
const { t } = bt({
|
|
3166
|
+
const { t, te: n, tm: r } = bt({
|
|
3167
3167
|
useScope: "global",
|
|
3168
3168
|
__i18n: ma().global
|
|
3169
3169
|
});
|
|
3170
|
-
function
|
|
3171
|
-
const [
|
|
3172
|
-
return t(typeof
|
|
3170
|
+
function s(...c) {
|
|
3171
|
+
const [p, O, T] = c;
|
|
3172
|
+
return t(typeof O == "number" ? `${e}.${p}` : `${e}.${p}`, O, T);
|
|
3173
|
+
}
|
|
3174
|
+
function o(c) {
|
|
3175
|
+
return n(`${e}.${c}`);
|
|
3176
|
+
}
|
|
3177
|
+
function i(c) {
|
|
3178
|
+
return r(`${e}.${c}`);
|
|
3173
3179
|
}
|
|
3174
|
-
|
|
3180
|
+
function u(c, ...p) {
|
|
3181
|
+
return o(p[0]) ? s(...p) : c;
|
|
3182
|
+
}
|
|
3183
|
+
return {
|
|
3184
|
+
t: s,
|
|
3185
|
+
te: o,
|
|
3186
|
+
tm: i,
|
|
3187
|
+
translateOrDefault: u
|
|
3188
|
+
};
|
|
3175
3189
|
}
|
|
3176
3190
|
let pt = null;
|
|
3177
3191
|
function ja(e) {
|
|
@@ -3376,9 +3390,9 @@ function Ka() {
|
|
|
3376
3390
|
const e = ge(() => Ea());
|
|
3377
3391
|
function t(n, r, s) {
|
|
3378
3392
|
const o = Da(r), i = {};
|
|
3379
|
-
for (const
|
|
3380
|
-
const
|
|
3381
|
-
|
|
3393
|
+
for (const u of o) {
|
|
3394
|
+
const c = s?.[u] ?? Pa(e.value, n, `${r}.${String(u)}`);
|
|
3395
|
+
c !== void 0 && (i[u] = c);
|
|
3382
3396
|
}
|
|
3383
3397
|
return i;
|
|
3384
3398
|
}
|
|
@@ -3511,8 +3525,8 @@ function ri(e) {
|
|
|
3511
3525
|
for (const [n, r] of Object.entries(e)) {
|
|
3512
3526
|
const s = n.split(".");
|
|
3513
3527
|
let o = t;
|
|
3514
|
-
s.forEach((i,
|
|
3515
|
-
|
|
3528
|
+
s.forEach((i, u) => {
|
|
3529
|
+
u === s.length - 1 ? o[i] = r : (gt(o[i]) || (o[i] = {}), o = o[i]);
|
|
3516
3530
|
});
|
|
3517
3531
|
}
|
|
3518
3532
|
return t;
|
|
@@ -3580,6 +3594,7 @@ class si {
|
|
|
3580
3594
|
* Default implementation returns success.
|
|
3581
3595
|
* Override this method to add custom configuration logic.
|
|
3582
3596
|
* @param config - Module-specific configuration from host.
|
|
3597
|
+
* Contains module-specific options of type T.
|
|
3583
3598
|
* @returns Promise resolving to the lifecycle result.
|
|
3584
3599
|
*/
|
|
3585
3600
|
async configure(t) {
|
|
@@ -3594,6 +3609,7 @@ class si {
|
|
|
3594
3609
|
* Default implementation returns success.
|
|
3595
3610
|
* Override this method to add custom initialization logic.
|
|
3596
3611
|
* @param config - Module-specific configuration from host.
|
|
3612
|
+
* Contains module-specific options of type T.
|
|
3597
3613
|
* @returns Promise resolving to the lifecycle result.
|
|
3598
3614
|
*/
|
|
3599
3615
|
async initialize(t) {
|
|
@@ -3608,6 +3624,7 @@ class si {
|
|
|
3608
3624
|
* Default implementation returns success.
|
|
3609
3625
|
* Override this method to add custom ready logic.
|
|
3610
3626
|
* @param config - Module-specific configuration from host.
|
|
3627
|
+
* Contains module-specific options of type T.
|
|
3611
3628
|
* @returns Promise resolving to the lifecycle result.
|
|
3612
3629
|
*/
|
|
3613
3630
|
async ready(t) {
|
|
@@ -3622,6 +3639,7 @@ class si {
|
|
|
3622
3639
|
* Default implementation returns success.
|
|
3623
3640
|
* Override this method to add custom post-init logic.
|
|
3624
3641
|
* @param config - Module-specific configuration from host.
|
|
3642
|
+
* Contains module-specific options of type T.
|
|
3625
3643
|
* @returns Promise resolving to the lifecycle result.
|
|
3626
3644
|
*/
|
|
3627
3645
|
async postInit(t) {
|