@elia-assistant/chatui 1.0.19 → 1.0.20
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/chat-store.js +1 -1
- package/dist/chatui.iife.js +25 -25
- package/dist/chunks/{i18n-fqYdUrSg.js → i18n-5KV_0_J2.js} +438 -422
- package/dist/chunks/{middleware-DgE1WAsA.js → middleware-Brf3TxqP.js} +1 -1
- package/dist/chunks/{settingsStore-BROU9g7x.js → settingsStore-863nT7r2.js} +3 -3
- package/dist/chunks/{translation-LFv38Ne3.js → translation-BWX2qtSY.js} +1 -1
- package/dist/chunks/{translation-KUznr2y2.js → translation-CfAg14N6.js} +1 -1
- package/dist/index.js +2688 -2703
- package/dist/store.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/i18n-DjvGLExc.js +0 -2
|
@@ -1,53 +1,69 @@
|
|
|
1
|
-
//#region
|
|
2
|
-
var e = (e) =>
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : a, n)), u = (e) => typeof e == "string", d = () => {
|
|
3
19
|
let e, t, n = new Promise((n, r) => {
|
|
4
20
|
e = n, t = r;
|
|
5
21
|
});
|
|
6
22
|
return n.resolve = e, n.reject = t, n;
|
|
7
|
-
},
|
|
23
|
+
}, f = (e) => e == null ? "" : "" + e, p = (e, t, n) => {
|
|
8
24
|
e.forEach((e) => {
|
|
9
25
|
t[e] && (n[e] = t[e]);
|
|
10
26
|
});
|
|
11
|
-
},
|
|
12
|
-
let
|
|
13
|
-
for (;
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
!t
|
|
17
|
-
}
|
|
18
|
-
return
|
|
19
|
-
obj:
|
|
20
|
-
k:
|
|
27
|
+
}, m = /###/g, h = (e) => e && e.indexOf("###") > -1 ? e.replace(m, ".") : e, g = (e) => !e || u(e), _ = (e, t, n) => {
|
|
28
|
+
let r = u(t) ? t.split(".") : t, i = 0;
|
|
29
|
+
for (; i < r.length - 1;) {
|
|
30
|
+
if (g(e)) return {};
|
|
31
|
+
let t = h(r[i]);
|
|
32
|
+
!e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
|
|
33
|
+
}
|
|
34
|
+
return g(e) ? {} : {
|
|
35
|
+
obj: e,
|
|
36
|
+
k: h(r[i])
|
|
21
37
|
};
|
|
22
|
-
},
|
|
23
|
-
let { obj: r, k: i } =
|
|
38
|
+
}, v = (e, t, n) => {
|
|
39
|
+
let { obj: r, k: i } = _(e, t, Object);
|
|
24
40
|
if (r !== void 0 || t.length === 1) {
|
|
25
41
|
r[i] = n;
|
|
26
42
|
return;
|
|
27
43
|
}
|
|
28
|
-
let a = t[t.length - 1], o = t.slice(0, t.length - 1),
|
|
29
|
-
for (;
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
let { obj: i, k: a } =
|
|
44
|
+
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = _(e, o, Object);
|
|
45
|
+
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = _(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
|
|
46
|
+
s.obj[`${s.k}.${a}`] = n;
|
|
47
|
+
}, y = (e, t, n, r) => {
|
|
48
|
+
let { obj: i, k: a } = _(e, t, Object);
|
|
33
49
|
i[a] = i[a] || [], i[a].push(n);
|
|
34
|
-
},
|
|
35
|
-
let { obj: n, k: r } =
|
|
50
|
+
}, b = (e, t) => {
|
|
51
|
+
let { obj: n, k: r } = _(e, t);
|
|
36
52
|
if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
|
|
37
|
-
},
|
|
38
|
-
let r =
|
|
39
|
-
return r === void 0 ?
|
|
40
|
-
},
|
|
41
|
-
for (let
|
|
42
|
-
return
|
|
43
|
-
},
|
|
53
|
+
}, x = (e, t, n) => {
|
|
54
|
+
let r = b(e, n);
|
|
55
|
+
return r === void 0 ? b(t, n) : r;
|
|
56
|
+
}, S = (e, t, n) => {
|
|
57
|
+
for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? u(e[r]) || e[r] instanceof String || u(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : S(e[r], t[r], n) : e[r] = t[r]);
|
|
58
|
+
return e;
|
|
59
|
+
}, C = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), w = {
|
|
44
60
|
"&": "&",
|
|
45
61
|
"<": "<",
|
|
46
62
|
">": ">",
|
|
47
63
|
"\"": """,
|
|
48
64
|
"'": "'",
|
|
49
65
|
"/": "/"
|
|
50
|
-
},
|
|
66
|
+
}, T = (e) => u(e) ? e.replace(/[&<>"'\/]/g, (e) => w[e]) : e, E = class {
|
|
51
67
|
constructor(e) {
|
|
52
68
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
53
69
|
}
|
|
@@ -57,23 +73,23 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
57
73
|
let n = new RegExp(e);
|
|
58
74
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
59
75
|
}
|
|
60
|
-
},
|
|
76
|
+
}, D = [
|
|
61
77
|
" ",
|
|
62
78
|
",",
|
|
63
79
|
"?",
|
|
64
80
|
"!",
|
|
65
81
|
";"
|
|
66
|
-
],
|
|
82
|
+
], ee = new E(20), O = (e, t, n) => {
|
|
67
83
|
t ||= "", n ||= "";
|
|
68
|
-
let r =
|
|
84
|
+
let r = D.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
|
|
69
85
|
if (r.length === 0) return !0;
|
|
70
|
-
let i =
|
|
86
|
+
let i = ee.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
|
|
71
87
|
if (!a) {
|
|
72
88
|
let t = e.indexOf(n);
|
|
73
89
|
t > 0 && !i.test(e.substring(0, t)) && (a = !0);
|
|
74
90
|
}
|
|
75
91
|
return a;
|
|
76
|
-
},
|
|
92
|
+
}, k = (e, t, n = ".") => {
|
|
77
93
|
if (!e) return;
|
|
78
94
|
if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
|
|
79
95
|
let r = t.split(n), i = e;
|
|
@@ -92,7 +108,7 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
92
108
|
i = t;
|
|
93
109
|
}
|
|
94
110
|
return i;
|
|
95
|
-
},
|
|
111
|
+
}, A = (e) => e?.replace(/_/g, "-"), te = {
|
|
96
112
|
type: "logger",
|
|
97
113
|
log(e) {
|
|
98
114
|
this.output("log", e);
|
|
@@ -106,12 +122,12 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
106
122
|
output(e, t) {
|
|
107
123
|
console?.[e]?.apply?.(console, t);
|
|
108
124
|
}
|
|
109
|
-
},
|
|
125
|
+
}, j = new class e {
|
|
110
126
|
constructor(e, t = {}) {
|
|
111
127
|
this.init(e, t);
|
|
112
128
|
}
|
|
113
129
|
init(e, t = {}) {
|
|
114
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
130
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || te, this.options = t, this.debug = t.debug;
|
|
115
131
|
}
|
|
116
132
|
log(...e) {
|
|
117
133
|
return this.forward(e, "log", "", !0);
|
|
@@ -125,19 +141,19 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
125
141
|
deprecate(...e) {
|
|
126
142
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
127
143
|
}
|
|
128
|
-
forward(t, n, r
|
|
129
|
-
return
|
|
144
|
+
forward(e, t, n, r) {
|
|
145
|
+
return r && !this.debug ? null : (u(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
130
146
|
}
|
|
131
|
-
create(
|
|
132
|
-
return new
|
|
133
|
-
prefix: `${this.prefix}:${
|
|
147
|
+
create(t) {
|
|
148
|
+
return new e(this.logger, {
|
|
149
|
+
prefix: `${this.prefix}:${t}:`,
|
|
134
150
|
...this.options
|
|
135
151
|
});
|
|
136
152
|
}
|
|
137
|
-
clone(
|
|
138
|
-
return
|
|
153
|
+
clone(t) {
|
|
154
|
+
return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
|
|
139
155
|
}
|
|
140
|
-
}(),
|
|
156
|
+
}(), M = class {
|
|
141
157
|
constructor() {
|
|
142
158
|
this.observers = {};
|
|
143
159
|
}
|
|
@@ -164,7 +180,7 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
164
180
|
for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
|
|
165
181
|
});
|
|
166
182
|
}
|
|
167
|
-
},
|
|
183
|
+
}, N = class extends M {
|
|
168
184
|
constructor(e, t = {
|
|
169
185
|
ns: ["translation"],
|
|
170
186
|
defaultNS: "translation"
|
|
@@ -178,19 +194,19 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
178
194
|
let t = this.options.ns.indexOf(e);
|
|
179
195
|
t > -1 && this.options.ns.splice(t, 1);
|
|
180
196
|
}
|
|
181
|
-
getResource(t, n, r
|
|
182
|
-
let
|
|
183
|
-
|
|
184
|
-
let
|
|
185
|
-
return !
|
|
197
|
+
getResource(e, t, n, r = {}) {
|
|
198
|
+
let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
|
|
199
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : u(n) && i ? o.push(...n.split(i)) : o.push(n)));
|
|
200
|
+
let s = b(this.data, o);
|
|
201
|
+
return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !u(n) ? s : k(this.data?.[e]?.[t], n, i);
|
|
186
202
|
}
|
|
187
203
|
addResource(e, t, n, r, i = { silent: !1 }) {
|
|
188
204
|
let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
|
|
189
|
-
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t),
|
|
205
|
+
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), v(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
|
|
190
206
|
}
|
|
191
|
-
addResources(t, n, r
|
|
192
|
-
for (let
|
|
193
|
-
|
|
207
|
+
addResources(e, t, n, r = { silent: !1 }) {
|
|
208
|
+
for (let r in n) (u(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
|
|
209
|
+
r.silent || this.emit("added", e, t, n);
|
|
194
210
|
}
|
|
195
211
|
addResourceBundle(e, t, n, r, i, a = {
|
|
196
212
|
silent: !1,
|
|
@@ -198,11 +214,11 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
198
214
|
}) {
|
|
199
215
|
let o = [e, t];
|
|
200
216
|
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
201
|
-
let s =
|
|
202
|
-
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ?
|
|
217
|
+
let s = b(this.data, o) || {};
|
|
218
|
+
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? S(s, n, i) : s = {
|
|
203
219
|
...s,
|
|
204
220
|
...n
|
|
205
|
-
},
|
|
221
|
+
}, v(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
206
222
|
}
|
|
207
223
|
removeResourceBundle(e, t) {
|
|
208
224
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -223,7 +239,7 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
223
239
|
toJSON() {
|
|
224
240
|
return this.data;
|
|
225
241
|
}
|
|
226
|
-
},
|
|
242
|
+
}, P = {
|
|
227
243
|
processors: {},
|
|
228
244
|
addPostProcessor(e) {
|
|
229
245
|
this.processors[e.name] = e;
|
|
@@ -233,22 +249,22 @@ var e = (e) => typeof e == "string", t = () => {
|
|
|
233
249
|
t = this.processors[e]?.process(t, n, r, i) ?? t;
|
|
234
250
|
}), t;
|
|
235
251
|
}
|
|
236
|
-
},
|
|
237
|
-
function
|
|
252
|
+
}, F = Symbol("i18next/PATH_KEY");
|
|
253
|
+
function ne() {
|
|
238
254
|
let e = [], t = Object.create(null), n;
|
|
239
|
-
return t.get = (r, i) => (n?.revoke?.(), i ===
|
|
255
|
+
return t.get = (r, i) => (n?.revoke?.(), i === F ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
|
|
240
256
|
}
|
|
241
|
-
function
|
|
242
|
-
let { [
|
|
257
|
+
function I(e, t) {
|
|
258
|
+
let { [F]: n } = e(ne()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
|
|
243
259
|
if (n.length > 1 && i) {
|
|
244
260
|
let e = t?.ns, a = Array.isArray(e) ? e : null;
|
|
245
261
|
if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
|
|
246
262
|
}
|
|
247
263
|
return n.join(r);
|
|
248
264
|
}
|
|
249
|
-
var
|
|
265
|
+
var L = {}, R = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", z = class e extends M {
|
|
250
266
|
constructor(e, t = {}) {
|
|
251
|
-
super(),
|
|
267
|
+
super(), p([
|
|
252
268
|
"resourceStore",
|
|
253
269
|
"languageUtils",
|
|
254
270
|
"pluralResolver",
|
|
@@ -256,7 +272,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
256
272
|
"backendConnector",
|
|
257
273
|
"i18nFormat",
|
|
258
274
|
"utils"
|
|
259
|
-
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger =
|
|
275
|
+
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = j.create("translator");
|
|
260
276
|
}
|
|
261
277
|
changeLanguage(e) {
|
|
262
278
|
e && (this.language = e);
|
|
@@ -266,193 +282,193 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
266
282
|
if (e == null) return !1;
|
|
267
283
|
let r = this.resolve(e, n);
|
|
268
284
|
if (r?.res === void 0) return !1;
|
|
269
|
-
let i =
|
|
285
|
+
let i = R(r.res);
|
|
270
286
|
return !(n.returnObjects === !1 && i);
|
|
271
287
|
}
|
|
272
|
-
extractFromKey(
|
|
273
|
-
let
|
|
274
|
-
|
|
275
|
-
let
|
|
276
|
-
if (
|
|
277
|
-
let
|
|
278
|
-
if (
|
|
279
|
-
key:
|
|
280
|
-
namespaces:
|
|
288
|
+
extractFromKey(e, t) {
|
|
289
|
+
let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
|
|
290
|
+
n === void 0 && (n = ":");
|
|
291
|
+
let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !O(e, n, r);
|
|
292
|
+
if (a && !o) {
|
|
293
|
+
let t = e.match(this.interpolator.nestingRegexp);
|
|
294
|
+
if (t && t.length > 0) return {
|
|
295
|
+
key: e,
|
|
296
|
+
namespaces: u(i) ? [i] : i
|
|
281
297
|
};
|
|
282
|
-
let
|
|
283
|
-
(
|
|
298
|
+
let a = e.split(n);
|
|
299
|
+
(n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
|
|
284
300
|
}
|
|
285
301
|
return {
|
|
286
|
-
key:
|
|
287
|
-
namespaces:
|
|
302
|
+
key: e,
|
|
303
|
+
namespaces: u(i) ? [i] : i
|
|
288
304
|
};
|
|
289
305
|
}
|
|
290
|
-
translate(n, r
|
|
291
|
-
let
|
|
292
|
-
if (typeof
|
|
293
|
-
typeof
|
|
306
|
+
translate(t, n, r) {
|
|
307
|
+
let i = typeof n == "object" ? { ...n } : n;
|
|
308
|
+
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
|
|
309
|
+
typeof t == "function" && (t = I(t, {
|
|
294
310
|
...this.options,
|
|
295
|
-
...
|
|
296
|
-
})), Array.isArray(
|
|
311
|
+
...i
|
|
312
|
+
})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? I(e, {
|
|
297
313
|
...this.options,
|
|
298
|
-
...
|
|
314
|
+
...i
|
|
299
315
|
}) : String(e));
|
|
300
|
-
let
|
|
316
|
+
let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], d = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
|
|
301
317
|
d === void 0 && (d = ":");
|
|
302
|
-
let f =
|
|
303
|
-
if (f?.toLowerCase() === "cimode") return p ?
|
|
304
|
-
res: `${
|
|
305
|
-
usedKey:
|
|
306
|
-
exactUsedKey:
|
|
318
|
+
let f = i.lng || this.language, p = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
319
|
+
if (f?.toLowerCase() === "cimode") return p ? a ? {
|
|
320
|
+
res: `${l}${d}${s}`,
|
|
321
|
+
usedKey: s,
|
|
322
|
+
exactUsedKey: s,
|
|
307
323
|
usedLng: f,
|
|
308
|
-
usedNS:
|
|
309
|
-
usedParams: this.getUsedParamsDetails(
|
|
310
|
-
} : `${
|
|
311
|
-
res:
|
|
312
|
-
usedKey:
|
|
313
|
-
exactUsedKey:
|
|
324
|
+
usedNS: l,
|
|
325
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
326
|
+
} : `${l}${d}${s}` : a ? {
|
|
327
|
+
res: s,
|
|
328
|
+
usedKey: s,
|
|
329
|
+
exactUsedKey: s,
|
|
314
330
|
usedLng: f,
|
|
315
|
-
usedNS:
|
|
316
|
-
usedParams: this.getUsedParamsDetails(
|
|
317
|
-
} :
|
|
318
|
-
let m = this.resolve(
|
|
331
|
+
usedNS: l,
|
|
332
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
333
|
+
} : s;
|
|
334
|
+
let m = this.resolve(t, i), h = m?.res, g = m?.usedKey || s, _ = m?.exactUsedKey || s, v = [
|
|
319
335
|
"[object Number]",
|
|
320
336
|
"[object Function]",
|
|
321
337
|
"[object RegExp]"
|
|
322
|
-
], y =
|
|
338
|
+
], y = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !u(i.count), S = e.hasDefaultValue(i), C = x ? this.pluralResolver.getSuffix(f, i.count, i) : "", w = i.ordinal && x ? this.pluralResolver.getSuffix(f, i.count, { ordinal: !1 }) : "", T = x && !i.ordinal && i.count === 0, E = T && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${C}`] || i[`defaultValue${w}`] || i.defaultValue, D = h;
|
|
323
339
|
b && !h && S && (D = E);
|
|
324
|
-
let
|
|
325
|
-
if (b && D &&
|
|
326
|
-
if (!
|
|
340
|
+
let ee = R(D), O = Object.prototype.toString.apply(D);
|
|
341
|
+
if (b && D && ee && v.indexOf(O) < 0 && !(u(y) && Array.isArray(D))) {
|
|
342
|
+
if (!i.returnObjects && !this.options.returnObjects) {
|
|
327
343
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
328
344
|
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, D, {
|
|
329
|
-
...
|
|
330
|
-
ns:
|
|
331
|
-
}) : `key '${
|
|
332
|
-
return
|
|
345
|
+
...i,
|
|
346
|
+
ns: c
|
|
347
|
+
}) : `key '${s} (${this.language})' returned an object instead of string.`;
|
|
348
|
+
return a ? (m.res = e, m.usedParams = this.getUsedParamsDetails(i), m) : e;
|
|
333
349
|
}
|
|
334
|
-
if (
|
|
350
|
+
if (o) {
|
|
335
351
|
let e = Array.isArray(D), t = e ? [] : {}, n = e ? _ : g;
|
|
336
352
|
for (let e in D) if (Object.prototype.hasOwnProperty.call(D, e)) {
|
|
337
|
-
let r = `${n}${
|
|
353
|
+
let r = `${n}${o}${e}`;
|
|
338
354
|
S && !h ? t[e] = this.translate(r, {
|
|
339
|
-
...
|
|
340
|
-
defaultValue:
|
|
355
|
+
...i,
|
|
356
|
+
defaultValue: R(E) ? E[e] : void 0,
|
|
341
357
|
joinArrays: !1,
|
|
342
|
-
ns:
|
|
358
|
+
ns: c
|
|
343
359
|
}) : t[e] = this.translate(r, {
|
|
344
|
-
...
|
|
360
|
+
...i,
|
|
345
361
|
joinArrays: !1,
|
|
346
|
-
ns:
|
|
362
|
+
ns: c
|
|
347
363
|
}), t[e] === r && (t[e] = D[e]);
|
|
348
364
|
}
|
|
349
365
|
h = t;
|
|
350
366
|
}
|
|
351
|
-
} else if (b &&
|
|
367
|
+
} else if (b && u(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, i, r);
|
|
352
368
|
else {
|
|
353
|
-
let e = !1,
|
|
354
|
-
!this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (
|
|
355
|
-
let
|
|
356
|
-
if (
|
|
357
|
-
if (this.logger.log(
|
|
358
|
-
let e = this.resolve(
|
|
359
|
-
...
|
|
369
|
+
let e = !1, n = !1;
|
|
370
|
+
!this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (n = !0, h = s);
|
|
371
|
+
let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : h, c = S && E !== h && this.options.updateMissing;
|
|
372
|
+
if (n || e || c) {
|
|
373
|
+
if (this.logger.log(c ? "updateKey" : "missingKey", f, l, s, c ? E : h), o) {
|
|
374
|
+
let e = this.resolve(s, {
|
|
375
|
+
...i,
|
|
360
376
|
keySeparator: !1
|
|
361
377
|
});
|
|
362
378
|
e && e.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
363
379
|
}
|
|
364
|
-
let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng,
|
|
380
|
+
let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
|
|
365
381
|
if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
|
|
366
|
-
else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(
|
|
382
|
+
else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
|
|
367
383
|
let n = (e, t, n) => {
|
|
368
|
-
let
|
|
369
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(e,
|
|
384
|
+
let r = S && n !== h ? n : a;
|
|
385
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, h);
|
|
370
386
|
};
|
|
371
387
|
this.options.saveMissing && (this.options.saveMissingPlurals && x ? e.forEach((e) => {
|
|
372
|
-
let t = this.pluralResolver.getSuffixes(e,
|
|
373
|
-
T &&
|
|
374
|
-
n([e],
|
|
388
|
+
let t = this.pluralResolver.getSuffixes(e, i);
|
|
389
|
+
T && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
|
|
390
|
+
n([e], s + t, i[`defaultValue${t}`] || E);
|
|
375
391
|
});
|
|
376
|
-
}) : n(e,
|
|
392
|
+
}) : n(e, s, E));
|
|
377
393
|
}
|
|
378
|
-
h = this.extendTranslation(h,
|
|
394
|
+
h = this.extendTranslation(h, t, i, m, r), n && h === s && this.options.appendNamespaceToMissingKey && (h = `${l}${d}${s}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${d}${s}` : s, e ? h : void 0, i));
|
|
379
395
|
}
|
|
380
|
-
return
|
|
396
|
+
return a ? (m.res = h, m.usedParams = this.getUsedParamsDetails(i), m) : h;
|
|
381
397
|
}
|
|
382
|
-
extendTranslation(t, n, r, i
|
|
383
|
-
if (this.i18nFormat?.parse)
|
|
398
|
+
extendTranslation(e, t, n, r, i) {
|
|
399
|
+
if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
|
|
384
400
|
...this.options.interpolation.defaultVariables,
|
|
385
|
-
...
|
|
386
|
-
},
|
|
387
|
-
else if (!
|
|
388
|
-
|
|
389
|
-
...
|
|
401
|
+
...n
|
|
402
|
+
}, n.lng || this.language || r.usedLng, r.usedNS, r.usedKey, { resolved: r });
|
|
403
|
+
else if (!n.skipInterpolation) {
|
|
404
|
+
n.interpolation && this.interpolator.init({
|
|
405
|
+
...n,
|
|
390
406
|
interpolation: {
|
|
391
407
|
...this.options.interpolation,
|
|
392
|
-
...
|
|
408
|
+
...n.interpolation
|
|
393
409
|
}
|
|
394
410
|
});
|
|
395
|
-
let
|
|
396
|
-
if (
|
|
397
|
-
let
|
|
398
|
-
|
|
411
|
+
let a = u(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
|
|
412
|
+
if (a) {
|
|
413
|
+
let t = e.match(this.interpolator.nestingRegexp);
|
|
414
|
+
o = t && t.length;
|
|
399
415
|
}
|
|
400
|
-
let
|
|
401
|
-
if (this.options.interpolation.defaultVariables && (
|
|
416
|
+
let s = n.replace && !u(n.replace) ? n.replace : n;
|
|
417
|
+
if (this.options.interpolation.defaultVariables && (s = {
|
|
402
418
|
...this.options.interpolation.defaultVariables,
|
|
403
|
-
...
|
|
404
|
-
}),
|
|
405
|
-
let
|
|
406
|
-
|
|
419
|
+
...s
|
|
420
|
+
}), e = this.interpolator.interpolate(e, s, n.lng || this.language || r.usedLng, n), a) {
|
|
421
|
+
let t = e.match(this.interpolator.nestingRegexp), r = t && t.length;
|
|
422
|
+
o < r && (n.nest = !1);
|
|
407
423
|
}
|
|
408
|
-
!
|
|
424
|
+
!n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
|
|
409
425
|
}
|
|
410
|
-
let
|
|
411
|
-
return
|
|
426
|
+
let a = n.postProcess || this.options.postProcess, o = u(a) ? [a] : a;
|
|
427
|
+
return e != null && o?.length && n.applyPostProcessor !== !1 && (e = P.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
412
428
|
i18nResolved: {
|
|
413
|
-
...
|
|
414
|
-
usedParams: this.getUsedParamsDetails(
|
|
429
|
+
...r,
|
|
430
|
+
usedParams: this.getUsedParamsDetails(n)
|
|
415
431
|
},
|
|
416
|
-
...
|
|
417
|
-
} :
|
|
432
|
+
...n
|
|
433
|
+
} : n, this)), e;
|
|
418
434
|
}
|
|
419
|
-
resolve(
|
|
420
|
-
let r, i, a, o
|
|
421
|
-
return e
|
|
435
|
+
resolve(e, t = {}) {
|
|
436
|
+
let n, r, i, a, o;
|
|
437
|
+
return u(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? I(e, {
|
|
422
438
|
...this.options,
|
|
423
|
-
...
|
|
424
|
-
}) : e)),
|
|
425
|
-
if (this.isValidLookup(
|
|
426
|
-
let
|
|
427
|
-
|
|
428
|
-
let
|
|
429
|
-
this.options.fallbackNS && (
|
|
430
|
-
let d =
|
|
431
|
-
|
|
432
|
-
this.isValidLookup(
|
|
433
|
-
if (this.isValidLookup(
|
|
434
|
-
|
|
435
|
-
let
|
|
436
|
-
if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(
|
|
439
|
+
...t
|
|
440
|
+
}) : e)), e.forEach((e) => {
|
|
441
|
+
if (this.isValidLookup(n)) return;
|
|
442
|
+
let s = this.extractFromKey(e, t), c = s.key;
|
|
443
|
+
r = c;
|
|
444
|
+
let l = s.namespaces;
|
|
445
|
+
this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
|
|
446
|
+
let d = t.count !== void 0 && !u(t.count), f = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (u(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
447
|
+
l.forEach((e) => {
|
|
448
|
+
this.isValidLookup(n) || (o = e, !L[`${m[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (L[`${m[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((r) => {
|
|
449
|
+
if (this.isValidLookup(n)) return;
|
|
450
|
+
a = r;
|
|
451
|
+
let o = [c];
|
|
452
|
+
if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
|
|
437
453
|
else {
|
|
438
454
|
let e;
|
|
439
|
-
d && (e = this.pluralResolver.getSuffix(
|
|
440
|
-
let
|
|
441
|
-
if (d && (
|
|
442
|
-
let
|
|
443
|
-
|
|
455
|
+
d && (e = this.pluralResolver.getSuffix(r, t.count, t));
|
|
456
|
+
let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
457
|
+
if (d && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), f && o.push(c + n)), p) {
|
|
458
|
+
let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
|
|
459
|
+
o.push(r), d && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), f && o.push(r + n));
|
|
444
460
|
}
|
|
445
461
|
}
|
|
446
462
|
let s;
|
|
447
|
-
for (; s =
|
|
463
|
+
for (; s = o.pop();) this.isValidLookup(n) || (i = s, n = this.getResource(r, e, s, t));
|
|
448
464
|
}));
|
|
449
465
|
});
|
|
450
466
|
}), {
|
|
451
|
-
res:
|
|
452
|
-
usedKey:
|
|
453
|
-
exactUsedKey:
|
|
454
|
-
usedLng:
|
|
455
|
-
usedNS:
|
|
467
|
+
res: n,
|
|
468
|
+
usedKey: r,
|
|
469
|
+
exactUsedKey: i,
|
|
470
|
+
usedLng: a,
|
|
471
|
+
usedNS: o
|
|
456
472
|
};
|
|
457
473
|
}
|
|
458
474
|
isValidLookup(e) {
|
|
@@ -461,8 +477,8 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
461
477
|
getResource(e, t, n, r = {}) {
|
|
462
478
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
|
|
463
479
|
}
|
|
464
|
-
getUsedParamsDetails(
|
|
465
|
-
let
|
|
480
|
+
getUsedParamsDetails(e = {}) {
|
|
481
|
+
let t = [
|
|
466
482
|
"defaultValue",
|
|
467
483
|
"ordinal",
|
|
468
484
|
"context",
|
|
@@ -478,43 +494,43 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
478
494
|
"joinArrays",
|
|
479
495
|
"postProcess",
|
|
480
496
|
"interpolation"
|
|
481
|
-
],
|
|
482
|
-
if (
|
|
497
|
+
], n = e.replace && !u(e.replace), r = n ? e.replace : e;
|
|
498
|
+
if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
|
|
483
499
|
...this.options.interpolation.defaultVariables,
|
|
484
|
-
...
|
|
485
|
-
}), !
|
|
486
|
-
|
|
487
|
-
for (let e of
|
|
500
|
+
...r
|
|
501
|
+
}), !n) {
|
|
502
|
+
r = { ...r };
|
|
503
|
+
for (let e of t) delete r[e];
|
|
488
504
|
}
|
|
489
|
-
return
|
|
505
|
+
return r;
|
|
490
506
|
}
|
|
491
507
|
static hasDefaultValue(e) {
|
|
492
508
|
for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
|
|
493
509
|
return !1;
|
|
494
510
|
}
|
|
495
|
-
},
|
|
511
|
+
}, B = class {
|
|
496
512
|
constructor(e) {
|
|
497
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
513
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = j.create("languageUtils");
|
|
498
514
|
}
|
|
499
515
|
getScriptPartFromCode(e) {
|
|
500
|
-
if (e =
|
|
516
|
+
if (e = A(e), !e || e.indexOf("-") < 0) return null;
|
|
501
517
|
let t = e.split("-");
|
|
502
518
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
503
519
|
}
|
|
504
520
|
getLanguagePartFromCode(e) {
|
|
505
|
-
if (e =
|
|
521
|
+
if (e = A(e), !e || e.indexOf("-") < 0) return e;
|
|
506
522
|
let t = e.split("-");
|
|
507
523
|
return this.formatLanguageCode(t[0]);
|
|
508
524
|
}
|
|
509
|
-
formatLanguageCode(
|
|
510
|
-
if (e
|
|
511
|
-
let
|
|
525
|
+
formatLanguageCode(e) {
|
|
526
|
+
if (u(e) && e.indexOf("-") > -1) {
|
|
527
|
+
let t;
|
|
512
528
|
try {
|
|
513
|
-
|
|
529
|
+
t = Intl.getCanonicalLocales(e)[0];
|
|
514
530
|
} catch {}
|
|
515
|
-
return
|
|
531
|
+
return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
|
|
516
532
|
}
|
|
517
|
-
return this.options.cleanCode || this.options.lowerCaseLng ?
|
|
533
|
+
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
518
534
|
}
|
|
519
535
|
isSupportedCode(e) {
|
|
520
536
|
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
|
|
@@ -537,40 +553,40 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
537
553
|
});
|
|
538
554
|
}), t ||= this.getFallbackCodes(this.options.fallbackLng)[0], t;
|
|
539
555
|
}
|
|
540
|
-
getFallbackCodes(
|
|
541
|
-
if (!
|
|
542
|
-
if (typeof
|
|
543
|
-
if (!
|
|
544
|
-
let
|
|
545
|
-
return
|
|
556
|
+
getFallbackCodes(e, t) {
|
|
557
|
+
if (!e) return [];
|
|
558
|
+
if (typeof e == "function" && (e = e(t)), u(e) && (e = [e]), Array.isArray(e)) return e;
|
|
559
|
+
if (!t) return e.default || [];
|
|
560
|
+
let n = e[t];
|
|
561
|
+
return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
|
|
546
562
|
}
|
|
547
|
-
toResolveHierarchy(
|
|
548
|
-
let
|
|
549
|
-
e && (this.isSupportedCode(e) ?
|
|
563
|
+
toResolveHierarchy(e, t) {
|
|
564
|
+
let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
|
|
565
|
+
e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
|
|
550
566
|
};
|
|
551
|
-
return e
|
|
552
|
-
|
|
553
|
-
}),
|
|
567
|
+
return u(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : u(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
|
|
568
|
+
r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
|
|
569
|
+
}), r;
|
|
554
570
|
}
|
|
555
|
-
},
|
|
571
|
+
}, V = {
|
|
556
572
|
zero: 0,
|
|
557
573
|
one: 1,
|
|
558
574
|
two: 2,
|
|
559
575
|
few: 3,
|
|
560
576
|
many: 4,
|
|
561
577
|
other: 5
|
|
562
|
-
},
|
|
578
|
+
}, H = {
|
|
563
579
|
select: (e) => e === 1 ? "one" : "other",
|
|
564
580
|
resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
|
|
565
|
-
},
|
|
581
|
+
}, re = class {
|
|
566
582
|
constructor(e, t = {}) {
|
|
567
|
-
this.languageUtils = e, this.options = t, this.logger =
|
|
583
|
+
this.languageUtils = e, this.options = t, this.logger = j.create("pluralResolver"), this.pluralRulesCache = {};
|
|
568
584
|
}
|
|
569
585
|
clearCache() {
|
|
570
586
|
this.pluralRulesCache = {};
|
|
571
587
|
}
|
|
572
588
|
getRule(e, t = {}) {
|
|
573
|
-
let n =
|
|
589
|
+
let n = A(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
574
590
|
cleanedCode: n,
|
|
575
591
|
type: r
|
|
576
592
|
});
|
|
@@ -579,8 +595,8 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
579
595
|
try {
|
|
580
596
|
a = new Intl.PluralRules(n, { type: r });
|
|
581
597
|
} catch {
|
|
582
|
-
if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
583
|
-
if (!e.match(/-|_/)) return
|
|
598
|
+
if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), H;
|
|
599
|
+
if (!e.match(/-|_/)) return H;
|
|
584
600
|
let n = this.languageUtils.getLanguagePartFromCode(e);
|
|
585
601
|
a = this.getRule(n, t);
|
|
586
602
|
}
|
|
@@ -595,23 +611,23 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
595
611
|
}
|
|
596
612
|
getSuffixes(e, t = {}) {
|
|
597
613
|
let n = this.getRule(e, t);
|
|
598
|
-
return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) =>
|
|
614
|
+
return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => V[e] - V[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
|
|
599
615
|
}
|
|
600
616
|
getSuffix(e, t, n = {}) {
|
|
601
617
|
let r = this.getRule(e, n);
|
|
602
618
|
return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
603
619
|
}
|
|
604
|
-
},
|
|
605
|
-
let
|
|
606
|
-
return !
|
|
607
|
-
},
|
|
620
|
+
}, U = (e, t, n, r = ".", i = !0) => {
|
|
621
|
+
let a = x(e, t, n);
|
|
622
|
+
return !a && i && u(n) && (a = k(e, n, r), a === void 0 && (a = k(t, n, r))), a;
|
|
623
|
+
}, W = (e) => e.replace(/\$/g, "$$$$"), G = class {
|
|
608
624
|
constructor(e = {}) {
|
|
609
|
-
this.logger =
|
|
625
|
+
this.logger = j.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
|
|
610
626
|
}
|
|
611
627
|
init(e = {}) {
|
|
612
628
|
e.interpolation ||= { escapeValue: !0 };
|
|
613
|
-
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix:
|
|
614
|
-
this.escape = t === void 0 ?
|
|
629
|
+
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
|
|
630
|
+
this.escape = t === void 0 ? T : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? C(i) : a || "{{", this.suffix = o ? C(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? C(d) : f || C("$t("), this.nestingSuffix = p ? C(p) : m || C(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ === void 0 ? !1 : _, this.resetRegExp();
|
|
615
631
|
}
|
|
616
632
|
reset() {
|
|
617
633
|
this.options && this.init(this.options);
|
|
@@ -620,79 +636,79 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
620
636
|
let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
|
|
621
637
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
622
638
|
}
|
|
623
|
-
interpolate(
|
|
624
|
-
let
|
|
639
|
+
interpolate(e, t, n, r) {
|
|
640
|
+
let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
|
|
625
641
|
if (e.indexOf(this.formatSeparator) < 0) {
|
|
626
|
-
let
|
|
627
|
-
return this.alwaysFormat ? this.format(
|
|
628
|
-
...a,
|
|
642
|
+
let i = U(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
643
|
+
return this.alwaysFormat ? this.format(i, void 0, n, {
|
|
629
644
|
...r,
|
|
645
|
+
...t,
|
|
630
646
|
interpolationkey: e
|
|
631
|
-
}) :
|
|
647
|
+
}) : i;
|
|
632
648
|
}
|
|
633
|
-
let
|
|
634
|
-
return this.format(
|
|
635
|
-
...a,
|
|
649
|
+
let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
|
|
650
|
+
return this.format(U(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
|
|
636
651
|
...r,
|
|
637
|
-
|
|
652
|
+
...t,
|
|
653
|
+
interpolationkey: a
|
|
638
654
|
});
|
|
639
655
|
};
|
|
640
656
|
this.resetRegExp();
|
|
641
|
-
let
|
|
657
|
+
let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, d = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
|
|
642
658
|
return [{
|
|
643
659
|
regex: this.regexpUnescape,
|
|
644
|
-
safeValue: (e) =>
|
|
660
|
+
safeValue: (e) => W(e)
|
|
645
661
|
}, {
|
|
646
662
|
regex: this.regexp,
|
|
647
|
-
safeValue: (e) => this.escapeValue ?
|
|
648
|
-
}].forEach((
|
|
649
|
-
for (
|
|
650
|
-
let
|
|
651
|
-
if (
|
|
652
|
-
let
|
|
653
|
-
|
|
654
|
-
} else if (
|
|
655
|
-
else if (
|
|
656
|
-
|
|
663
|
+
safeValue: (e) => this.escapeValue ? W(this.escape(e)) : W(e)
|
|
664
|
+
}].forEach((t) => {
|
|
665
|
+
for (o = 0; i = t.regex.exec(e);) {
|
|
666
|
+
let n = i[1].trim();
|
|
667
|
+
if (a = c(n), a === void 0) if (typeof l == "function") {
|
|
668
|
+
let t = l(e, i, r);
|
|
669
|
+
a = u(t) ? t : "";
|
|
670
|
+
} else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
|
|
671
|
+
else if (d) {
|
|
672
|
+
a = i[0];
|
|
657
673
|
continue;
|
|
658
|
-
} else this.logger.warn(`missed to pass in variable ${
|
|
659
|
-
else !
|
|
660
|
-
let
|
|
661
|
-
if (
|
|
674
|
+
} else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
|
|
675
|
+
else !u(a) && !this.useRawValueToEscape && (a = f(a));
|
|
676
|
+
let s = t.safeValue(a);
|
|
677
|
+
if (e = e.replace(i[0], s), d ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
|
|
662
678
|
}
|
|
663
|
-
}),
|
|
679
|
+
}), e;
|
|
664
680
|
}
|
|
665
|
-
nest(
|
|
666
|
-
let
|
|
681
|
+
nest(e, t, n = {}) {
|
|
682
|
+
let r, i, a, o = (e, t) => {
|
|
667
683
|
let n = this.nestingOptionsSeparator;
|
|
668
684
|
if (e.indexOf(n) < 0) return e;
|
|
669
|
-
let r = e.split(RegExp(`${
|
|
670
|
-
e = r[0], i = this.interpolate(i,
|
|
671
|
-
let
|
|
672
|
-
((
|
|
685
|
+
let r = e.split(RegExp(`${C(n)}[ ]*{`)), i = `{${r[1]}`;
|
|
686
|
+
e = r[0], i = this.interpolate(i, a);
|
|
687
|
+
let o = i.match(/'/g), s = i.match(/"/g);
|
|
688
|
+
((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
|
|
673
689
|
try {
|
|
674
|
-
|
|
690
|
+
a = JSON.parse(i), t && (a = {
|
|
675
691
|
...t,
|
|
676
|
-
...
|
|
692
|
+
...a
|
|
677
693
|
});
|
|
678
694
|
} catch (t) {
|
|
679
695
|
return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
|
|
680
696
|
}
|
|
681
|
-
return
|
|
697
|
+
return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, e;
|
|
682
698
|
};
|
|
683
|
-
for (;
|
|
684
|
-
let
|
|
685
|
-
|
|
686
|
-
let
|
|
687
|
-
if (
|
|
688
|
-
|
|
689
|
-
...
|
|
690
|
-
interpolationkey:
|
|
691
|
-
}),
|
|
699
|
+
for (; r = this.nestingRegexp.exec(e);) {
|
|
700
|
+
let s = [];
|
|
701
|
+
a = { ...n }, a = a.replace && !u(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
702
|
+
let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
|
|
703
|
+
if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !u(i)) return i;
|
|
704
|
+
u(i) || (i = f(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
|
|
705
|
+
...n,
|
|
706
|
+
interpolationkey: r[1].trim()
|
|
707
|
+
}), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
|
|
692
708
|
}
|
|
693
|
-
return
|
|
709
|
+
return e;
|
|
694
710
|
}
|
|
695
|
-
},
|
|
711
|
+
}, ie = (e) => {
|
|
696
712
|
let t = e.toLowerCase().trim(), n = {};
|
|
697
713
|
if (e.indexOf("(") > -1) {
|
|
698
714
|
let r = e.split("(");
|
|
@@ -709,7 +725,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
709
725
|
formatName: t,
|
|
710
726
|
formatOptions: n
|
|
711
727
|
};
|
|
712
|
-
},
|
|
728
|
+
}, K = (e) => {
|
|
713
729
|
let t = {};
|
|
714
730
|
return (n, r, i) => {
|
|
715
731
|
let a = i;
|
|
@@ -718,15 +734,15 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
718
734
|
[i.interpolationkey]: void 0
|
|
719
735
|
});
|
|
720
736
|
let o = r + JSON.stringify(a), s = t[o];
|
|
721
|
-
return s || (s = e(
|
|
737
|
+
return s || (s = e(A(r), i), t[o] = s), s(n);
|
|
722
738
|
};
|
|
723
|
-
},
|
|
739
|
+
}, ae = (e) => (t, n, r) => e(A(n), r)(t), oe = class {
|
|
724
740
|
constructor(e = {}) {
|
|
725
|
-
this.logger =
|
|
741
|
+
this.logger = j.create("formatter"), this.options = e, this.init(e);
|
|
726
742
|
}
|
|
727
743
|
init(e, t = { interpolation: {} }) {
|
|
728
744
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
729
|
-
let n = t.cacheInBuiltFormats ?
|
|
745
|
+
let n = t.cacheInBuiltFormats ? K : ae;
|
|
730
746
|
this.formats = {
|
|
731
747
|
number: n((e, t) => {
|
|
732
748
|
let n = new Intl.NumberFormat(e, { ...t });
|
|
@@ -757,7 +773,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
757
773
|
this.formats[e.toLowerCase().trim()] = t;
|
|
758
774
|
}
|
|
759
775
|
addCached(e, t) {
|
|
760
|
-
this.formats[e.toLowerCase().trim()] =
|
|
776
|
+
this.formats[e.toLowerCase().trim()] = K(t);
|
|
761
777
|
}
|
|
762
778
|
format(e, t, n, r = {}) {
|
|
763
779
|
let i = t.split(this.formatSeparator);
|
|
@@ -766,7 +782,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
766
782
|
i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
|
|
767
783
|
}
|
|
768
784
|
return i.reduce((e, t) => {
|
|
769
|
-
let { formatName: i, formatOptions: a } =
|
|
785
|
+
let { formatName: i, formatOptions: a } = ie(t);
|
|
770
786
|
if (this.formats[i]) {
|
|
771
787
|
let t = e;
|
|
772
788
|
try {
|
|
@@ -784,11 +800,11 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
784
800
|
return e;
|
|
785
801
|
}, e);
|
|
786
802
|
}
|
|
787
|
-
},
|
|
803
|
+
}, se = (e, t) => {
|
|
788
804
|
e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
|
|
789
|
-
},
|
|
805
|
+
}, ce = class extends M {
|
|
790
806
|
constructor(e, t, n, r = {}) {
|
|
791
|
-
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger =
|
|
807
|
+
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = j.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
|
|
792
808
|
}
|
|
793
809
|
queueLoad(e, t, n, r) {
|
|
794
810
|
let i = {}, a = {}, o = {}, s = {};
|
|
@@ -816,7 +832,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
816
832
|
t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
817
833
|
let o = {};
|
|
818
834
|
this.queue.forEach((n) => {
|
|
819
|
-
|
|
835
|
+
y(n.loaded, [i], a), se(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
|
|
820
836
|
o[e] || (o[e] = {});
|
|
821
837
|
let t = n.loaded[e];
|
|
822
838
|
t.length && t.forEach((t) => {
|
|
@@ -863,12 +879,12 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
863
879
|
}
|
|
864
880
|
return s(e, t, o);
|
|
865
881
|
}
|
|
866
|
-
prepareLoading(t, n
|
|
867
|
-
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
|
|
868
|
-
e
|
|
869
|
-
let
|
|
870
|
-
if (!
|
|
871
|
-
|
|
882
|
+
prepareLoading(e, t, n = {}, r) {
|
|
883
|
+
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
|
|
884
|
+
u(e) && (e = this.languageUtils.toResolveHierarchy(e)), u(t) && (t = [t]);
|
|
885
|
+
let i = this.queueLoad(e, t, n, r);
|
|
886
|
+
if (!i.toLoad.length) return i.pending.length || r(), null;
|
|
887
|
+
i.toLoad.forEach((e) => {
|
|
872
888
|
this.loadOne(e);
|
|
873
889
|
});
|
|
874
890
|
}
|
|
@@ -906,7 +922,7 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
906
922
|
!e || !e[0] || this.store.addResource(e[0], t, n, r);
|
|
907
923
|
}
|
|
908
924
|
}
|
|
909
|
-
},
|
|
925
|
+
}, q = () => ({
|
|
910
926
|
debug: !1,
|
|
911
927
|
initAsync: !0,
|
|
912
928
|
ns: ["translation"],
|
|
@@ -939,15 +955,15 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
939
955
|
parseMissingKeyHandler: !1,
|
|
940
956
|
appendNamespaceToMissingKey: !1,
|
|
941
957
|
appendNamespaceToCIMode: !1,
|
|
942
|
-
overloadTranslationOptionHandler: (
|
|
943
|
-
let
|
|
944
|
-
if (typeof
|
|
945
|
-
let
|
|
946
|
-
Object.keys(
|
|
947
|
-
|
|
958
|
+
overloadTranslationOptionHandler: (e) => {
|
|
959
|
+
let t = {};
|
|
960
|
+
if (typeof e[1] == "object" && (t = e[1]), u(e[1]) && (t.defaultValue = e[1]), u(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
|
|
961
|
+
let n = e[3] || e[2];
|
|
962
|
+
Object.keys(n).forEach((e) => {
|
|
963
|
+
t[e] = n[e];
|
|
948
964
|
});
|
|
949
965
|
}
|
|
950
|
-
return
|
|
966
|
+
return t;
|
|
951
967
|
},
|
|
952
968
|
interpolation: {
|
|
953
969
|
escapeValue: !0,
|
|
@@ -963,52 +979,52 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
963
979
|
skipOnVariables: !0
|
|
964
980
|
},
|
|
965
981
|
cacheInBuiltFormats: !0
|
|
966
|
-
}),
|
|
982
|
+
}), J = (e) => (u(e.ns) && (e.ns = [e.ns]), u(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), u(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Y = () => {}, le = (e) => {
|
|
967
983
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
|
|
968
984
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
969
985
|
});
|
|
970
|
-
},
|
|
971
|
-
typeof globalThis < "u" && (globalThis[
|
|
972
|
-
},
|
|
986
|
+
}, X = "__i18next_supportNoticeShown", ue = () => !!(typeof globalThis < "u" && globalThis[X] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env && process.env.NODE_ENV === "production"), de = () => {
|
|
987
|
+
typeof globalThis < "u" && (globalThis[X] = !0);
|
|
988
|
+
}, fe = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Z = class e extends M {
|
|
973
989
|
constructor(e = {}, t) {
|
|
974
|
-
if (super(), this.options =
|
|
990
|
+
if (super(), this.options = J(e), this.services = {}, this.logger = j, this.modules = { external: [] }, le(this), t && !this.isInitialized && !e.isClone) {
|
|
975
991
|
if (!this.options.initAsync) return this.init(e, t), this;
|
|
976
992
|
setTimeout(() => {
|
|
977
993
|
this.init(e, t);
|
|
978
994
|
}, 0);
|
|
979
995
|
}
|
|
980
996
|
}
|
|
981
|
-
init(
|
|
982
|
-
this.isInitializing = !0, typeof
|
|
983
|
-
let
|
|
997
|
+
init(e = {}, t) {
|
|
998
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (u(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
999
|
+
let n = q();
|
|
984
1000
|
this.options = {
|
|
985
|
-
...
|
|
1001
|
+
...n,
|
|
986
1002
|
...this.options,
|
|
987
|
-
...
|
|
1003
|
+
...J(e)
|
|
988
1004
|
}, this.options.interpolation = {
|
|
989
|
-
...
|
|
1005
|
+
...n.interpolation,
|
|
990
1006
|
...this.options.interpolation
|
|
991
|
-
},
|
|
992
|
-
let
|
|
1007
|
+
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !fe(this) && !ue() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), de());
|
|
1008
|
+
let r = (e) => e ? typeof e == "function" ? new e() : e : null;
|
|
993
1009
|
if (!this.options.isClone) {
|
|
994
|
-
this.modules.logger ?
|
|
1010
|
+
this.modules.logger ? j.init(r(this.modules.logger), this.options) : j.init(null, this.options);
|
|
995
1011
|
let e;
|
|
996
|
-
e = this.modules.formatter ? this.modules.formatter :
|
|
997
|
-
let t = new
|
|
998
|
-
this.store = new
|
|
999
|
-
let
|
|
1000
|
-
|
|
1012
|
+
e = this.modules.formatter ? this.modules.formatter : oe;
|
|
1013
|
+
let t = new B(this.options);
|
|
1014
|
+
this.store = new N(this.options.resources, this.options);
|
|
1015
|
+
let i = this.services;
|
|
1016
|
+
i.logger = j, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new re(t, {
|
|
1001
1017
|
prepend: this.options.pluralSeparator,
|
|
1002
1018
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1003
|
-
}), this.options.interpolation.format && this.options.interpolation.format !==
|
|
1019
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new G(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new ce(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
|
|
1004
1020
|
this.emit(e, ...t);
|
|
1005
|
-
}), this.modules.languageDetector && (
|
|
1021
|
+
}), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new z(this.services, this.options), this.translator.on("*", (e, ...t) => {
|
|
1006
1022
|
this.emit(e, ...t);
|
|
1007
1023
|
}), this.modules.external.forEach((e) => {
|
|
1008
1024
|
e.init && e.init(this);
|
|
1009
1025
|
});
|
|
1010
1026
|
}
|
|
1011
|
-
if (this.format = this.options.interpolation.format,
|
|
1027
|
+
if (this.format = this.options.interpolation.format, t ||= Y, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1012
1028
|
let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1013
1029
|
e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
|
|
1014
1030
|
}
|
|
@@ -1027,39 +1043,39 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
1027
1043
|
].forEach((e) => {
|
|
1028
1044
|
this[e] = (...t) => (this.store[e](...t), this);
|
|
1029
1045
|
});
|
|
1030
|
-
let
|
|
1031
|
-
let e = (e,
|
|
1032
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options),
|
|
1046
|
+
let i = d(), a = () => {
|
|
1047
|
+
let e = (e, n) => {
|
|
1048
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
|
|
1033
1049
|
};
|
|
1034
1050
|
if (this.languages && !this.isInitialized) return e(null, this.t.bind(this));
|
|
1035
1051
|
this.changeLanguage(this.options.lng, e);
|
|
1036
1052
|
};
|
|
1037
|
-
return this.options.resources || !this.options.initAsync ?
|
|
1053
|
+
return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
|
|
1038
1054
|
}
|
|
1039
|
-
loadResources(
|
|
1040
|
-
let
|
|
1041
|
-
if (typeof
|
|
1042
|
-
if (
|
|
1055
|
+
loadResources(e, t = Y) {
|
|
1056
|
+
let n = t, r = u(e) ? e : this.language;
|
|
1057
|
+
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1058
|
+
if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
1043
1059
|
let e = [], t = (t) => {
|
|
1044
1060
|
t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
|
|
1045
1061
|
t !== "cimode" && e.indexOf(t) < 0 && e.push(t);
|
|
1046
1062
|
});
|
|
1047
1063
|
};
|
|
1048
|
-
|
|
1049
|
-
!e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
|
|
1064
|
+
r ? t(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
|
|
1065
|
+
!e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(e);
|
|
1050
1066
|
});
|
|
1051
|
-
} else
|
|
1067
|
+
} else n(null);
|
|
1052
1068
|
}
|
|
1053
|
-
reloadResources(e,
|
|
1054
|
-
let
|
|
1055
|
-
return typeof e == "function" && (
|
|
1056
|
-
|
|
1057
|
-
}),
|
|
1069
|
+
reloadResources(e, t, n) {
|
|
1070
|
+
let r = d();
|
|
1071
|
+
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Y, this.services.backendConnector.reload(e, t, (e) => {
|
|
1072
|
+
r.resolve(), n(e);
|
|
1073
|
+
}), r;
|
|
1058
1074
|
}
|
|
1059
1075
|
use(e) {
|
|
1060
1076
|
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1061
1077
|
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1062
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1078
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && P.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1063
1079
|
}
|
|
1064
1080
|
setResolvedLanguage(e) {
|
|
1065
1081
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1073,36 +1089,36 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
1073
1089
|
!this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
|
|
1074
1090
|
}
|
|
1075
1091
|
}
|
|
1076
|
-
changeLanguage(
|
|
1077
|
-
this.isLanguageChangingTo =
|
|
1078
|
-
let
|
|
1079
|
-
this.emit("languageChanging",
|
|
1080
|
-
let
|
|
1092
|
+
changeLanguage(e, t) {
|
|
1093
|
+
this.isLanguageChangingTo = e;
|
|
1094
|
+
let n = d();
|
|
1095
|
+
this.emit("languageChanging", e);
|
|
1096
|
+
let r = (e) => {
|
|
1081
1097
|
this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
|
|
1082
|
-
},
|
|
1083
|
-
|
|
1084
|
-
},
|
|
1085
|
-
!
|
|
1086
|
-
let
|
|
1087
|
-
|
|
1088
|
-
|
|
1098
|
+
}, i = (i, a) => {
|
|
1099
|
+
a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
|
|
1100
|
+
}, a = (t) => {
|
|
1101
|
+
!e && !t && this.services.languageDetector && (t = []);
|
|
1102
|
+
let n = u(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(u(t) ? [t] : t);
|
|
1103
|
+
a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
|
|
1104
|
+
i(e, a);
|
|
1089
1105
|
});
|
|
1090
1106
|
};
|
|
1091
|
-
return !
|
|
1107
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
|
|
1092
1108
|
}
|
|
1093
|
-
getFixedT(t, n
|
|
1094
|
-
let
|
|
1109
|
+
getFixedT(e, t, n) {
|
|
1110
|
+
let r = (e, t, ...i) => {
|
|
1095
1111
|
let a;
|
|
1096
|
-
a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(
|
|
1112
|
+
a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(i)), a.lng = a.lng || r.lng, a.lngs = a.lngs || r.lngs, a.ns = a.ns || r.ns, a.keyPrefix !== "" && (a.keyPrefix = a.keyPrefix || n || r.keyPrefix);
|
|
1097
1113
|
let o = {
|
|
1098
1114
|
...this.options,
|
|
1099
1115
|
...a
|
|
1100
1116
|
};
|
|
1101
|
-
typeof a.keyPrefix == "function" && (a.keyPrefix =
|
|
1117
|
+
typeof a.keyPrefix == "function" && (a.keyPrefix = I(a.keyPrefix, o));
|
|
1102
1118
|
let s = this.options.keySeparator || ".", c;
|
|
1103
|
-
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e =
|
|
1119
|
+
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = I(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = I(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
|
|
1104
1120
|
};
|
|
1105
|
-
return e
|
|
1121
|
+
return u(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
|
|
1106
1122
|
}
|
|
1107
1123
|
t(...e) {
|
|
1108
1124
|
return this.translator?.translate(...e);
|
|
@@ -1128,21 +1144,21 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
1128
1144
|
}
|
|
1129
1145
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
|
|
1130
1146
|
}
|
|
1131
|
-
loadNamespaces(
|
|
1132
|
-
let
|
|
1133
|
-
return this.options.ns ? (e
|
|
1147
|
+
loadNamespaces(e, t) {
|
|
1148
|
+
let n = d();
|
|
1149
|
+
return this.options.ns ? (u(e) && (e = [e]), e.forEach((e) => {
|
|
1134
1150
|
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
1135
1151
|
}), this.loadResources((e) => {
|
|
1136
|
-
|
|
1137
|
-
}),
|
|
1152
|
+
n.resolve(), t && t(e);
|
|
1153
|
+
}), n) : (t && t(), Promise.resolve());
|
|
1138
1154
|
}
|
|
1139
|
-
loadLanguages(
|
|
1140
|
-
let
|
|
1141
|
-
e
|
|
1142
|
-
let
|
|
1143
|
-
return
|
|
1144
|
-
|
|
1145
|
-
}),
|
|
1155
|
+
loadLanguages(e, t) {
|
|
1156
|
+
let n = d();
|
|
1157
|
+
u(e) && (e = [e]);
|
|
1158
|
+
let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
|
|
1159
|
+
return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
|
|
1160
|
+
n.resolve(), t && t(e);
|
|
1161
|
+
}), n) : (t && t(), Promise.resolve());
|
|
1146
1162
|
}
|
|
1147
1163
|
dir(e) {
|
|
1148
1164
|
if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
|
|
@@ -1153,41 +1169,41 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
1153
1169
|
if (e && e.direction) return e.direction;
|
|
1154
1170
|
}
|
|
1155
1171
|
} catch {}
|
|
1156
|
-
let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new
|
|
1172
|
+
let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new B(q());
|
|
1157
1173
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1158
1174
|
}
|
|
1159
|
-
static createInstance(
|
|
1160
|
-
let r = new
|
|
1161
|
-
return r.createInstance =
|
|
1175
|
+
static createInstance(t = {}, n) {
|
|
1176
|
+
let r = new e(t, n);
|
|
1177
|
+
return r.createInstance = e.createInstance, r;
|
|
1162
1178
|
}
|
|
1163
|
-
cloneInstance(
|
|
1164
|
-
let r =
|
|
1165
|
-
r && delete
|
|
1179
|
+
cloneInstance(t = {}, n = Y) {
|
|
1180
|
+
let r = t.forkResourceStore;
|
|
1181
|
+
r && delete t.forkResourceStore;
|
|
1166
1182
|
let i = {
|
|
1167
1183
|
...this.options,
|
|
1168
|
-
...
|
|
1184
|
+
...t,
|
|
1169
1185
|
isClone: !0
|
|
1170
|
-
}, a = new
|
|
1171
|
-
if ((
|
|
1186
|
+
}, a = new e(i);
|
|
1187
|
+
if ((t.debug !== void 0 || t.prefix !== void 0) && (a.logger = a.logger.clone(t)), [
|
|
1172
1188
|
"store",
|
|
1173
1189
|
"services",
|
|
1174
1190
|
"language"
|
|
1175
1191
|
].forEach((e) => {
|
|
1176
1192
|
a[e] = this[e];
|
|
1177
|
-
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new
|
|
1178
|
-
let
|
|
1179
|
-
...
|
|
1193
|
+
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new N(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
|
|
1194
|
+
let e = {
|
|
1195
|
+
...q().interpolation,
|
|
1180
1196
|
...this.options.interpolation,
|
|
1181
|
-
...
|
|
1197
|
+
...t.interpolation
|
|
1182
1198
|
}, n = {
|
|
1183
1199
|
...i,
|
|
1184
|
-
interpolation:
|
|
1200
|
+
interpolation: e
|
|
1185
1201
|
};
|
|
1186
|
-
a.services.interpolator = new
|
|
1202
|
+
a.services.interpolator = new G(n);
|
|
1187
1203
|
}
|
|
1188
|
-
return a.translator = new
|
|
1204
|
+
return a.translator = new z(a.services, i), a.translator.on("*", (e, ...t) => {
|
|
1189
1205
|
a.emit(e, ...t);
|
|
1190
|
-
}), a.init(i,
|
|
1206
|
+
}), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
|
|
1191
1207
|
}
|
|
1192
1208
|
toJSON() {
|
|
1193
1209
|
return {
|
|
@@ -1199,10 +1215,10 @@ var A = {}, j = (t) => !e(t) && typeof t != "boolean" && typeof t != "number", M
|
|
|
1199
1215
|
};
|
|
1200
1216
|
}
|
|
1201
1217
|
}.createInstance();
|
|
1202
|
-
|
|
1218
|
+
Z.createInstance, Z.dir, Z.init, Z.loadResources, Z.reloadResources, Z.use, Z.changeLanguage, Z.getFixedT, Z.t, Z.exists, Z.setDefaultNamespace, Z.hasLoadedNamespace, Z.loadNamespaces, Z.loadLanguages;
|
|
1203
1219
|
//#endregion
|
|
1204
1220
|
//#region node_modules/react-i18next/dist/es/unescape.js
|
|
1205
|
-
var
|
|
1221
|
+
var pe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, me = {
|
|
1206
1222
|
"&": "&",
|
|
1207
1223
|
"&": "&",
|
|
1208
1224
|
"<": "<",
|
|
@@ -1223,7 +1239,7 @@ var oe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
1223
1239
|
"…": "…",
|
|
1224
1240
|
"/": "/",
|
|
1225
1241
|
"/": "/"
|
|
1226
|
-
},
|
|
1242
|
+
}, he = (e) => me[e], Q = (e) => e.replace(pe, he), $ = {
|
|
1227
1243
|
bindI18n: "languageChanged",
|
|
1228
1244
|
bindI18nStore: "",
|
|
1229
1245
|
transEmptyNodeValue: "",
|
|
@@ -1236,21 +1252,21 @@ var oe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
1236
1252
|
"p"
|
|
1237
1253
|
],
|
|
1238
1254
|
useSuspense: !0,
|
|
1239
|
-
unescape:
|
|
1255
|
+
unescape: Q,
|
|
1240
1256
|
transDefaultProps: void 0
|
|
1241
|
-
},
|
|
1242
|
-
|
|
1243
|
-
|
|
1257
|
+
}, ge = (e = {}) => {
|
|
1258
|
+
$ = {
|
|
1259
|
+
...$,
|
|
1244
1260
|
...e
|
|
1245
1261
|
};
|
|
1246
|
-
},
|
|
1247
|
-
|
|
1248
|
-
},
|
|
1262
|
+
}, _e = () => $, ve, ye = (e) => {
|
|
1263
|
+
ve = e;
|
|
1264
|
+
}, be = () => ve, xe = {
|
|
1249
1265
|
type: "3rdParty",
|
|
1250
1266
|
init(e) {
|
|
1251
|
-
|
|
1267
|
+
ge(e.options.react), ye(e);
|
|
1252
1268
|
}
|
|
1253
|
-
},
|
|
1269
|
+
}, Se = function(e) {
|
|
1254
1270
|
return {
|
|
1255
1271
|
type: "backend",
|
|
1256
1272
|
init: function(e, t, n) {},
|
|
@@ -1273,11 +1289,11 @@ var oe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
1273
1289
|
r(null, e && e[t] && e[t][n]);
|
|
1274
1290
|
}
|
|
1275
1291
|
};
|
|
1276
|
-
},
|
|
1277
|
-
"./locales/en/translation.json": () => import("./translation-
|
|
1278
|
-
"./locales/sk/translation.json": () => import("./translation-
|
|
1279
|
-
}),
|
|
1280
|
-
function
|
|
1292
|
+
}, Ce = /* @__PURE__ */ s({ default: () => De }), we = /* #__PURE__ */ Object.assign({
|
|
1293
|
+
"./locales/en/translation.json": () => import("./translation-BWX2qtSY.js"),
|
|
1294
|
+
"./locales/sk/translation.json": () => import("./translation-CfAg14N6.js")
|
|
1295
|
+
}), Te = Array.from(new Set(Object.keys(we).map((e) => e.split("/")[2]).filter((e) => !!e)));
|
|
1296
|
+
function Ee() {
|
|
1281
1297
|
try {
|
|
1282
1298
|
let e = localStorage.getItem("chatui-settings");
|
|
1283
1299
|
if (e) {
|
|
@@ -1287,18 +1303,18 @@ function he() {
|
|
|
1287
1303
|
} catch {}
|
|
1288
1304
|
return "en";
|
|
1289
1305
|
}
|
|
1290
|
-
|
|
1291
|
-
let n =
|
|
1306
|
+
Z.use(Se(async (e, t) => {
|
|
1307
|
+
let n = we[`./locales/${e}/${t}.json`];
|
|
1292
1308
|
if (!n) throw Error(`Missing locale bundle: ${e}/${t}`);
|
|
1293
1309
|
return (await n()).default;
|
|
1294
|
-
})).use(
|
|
1295
|
-
lng:
|
|
1310
|
+
})).use(xe).init({
|
|
1311
|
+
lng: Ee(),
|
|
1296
1312
|
fallbackLng: "en",
|
|
1297
|
-
supportedLngs:
|
|
1313
|
+
supportedLngs: Te,
|
|
1298
1314
|
interpolation: { escapeValue: !1 }
|
|
1299
1315
|
});
|
|
1300
|
-
var
|
|
1316
|
+
var De = Z;
|
|
1301
1317
|
//#endregion
|
|
1302
|
-
export {
|
|
1318
|
+
export { I as a, l as c, Q as i, be as n, o, _e as r, s, Ce as t };
|
|
1303
1319
|
|
|
1304
|
-
//# sourceMappingURL=i18n-
|
|
1320
|
+
//# sourceMappingURL=i18n-5KV_0_J2.js.map
|