@1024pix/epreuves-components 0.9.5 → 0.9.7
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/{NavigationButton.ce-qPk4D7sx.js → ButtonTooltip.ce-DJWPmZEW.js} +497 -551
- package/dist/{ImageQuiz.ce-CyuIHq11.js → ImageQuiz.ce-CoHr8kTK.js} +14 -14
- package/dist/LLMMessage.ce-DHyl5CcV.js +89 -0
- package/dist/Loading.ce-B_mSjXBH.js +14 -0
- package/dist/NavigationButton.ce-CObYL4XH.js +59 -0
- package/dist/_plugin-vue_export-helper-OrrhezDE.js +4178 -0
- package/dist/components/complete-phrase.ce.js.js +102 -0
- package/dist/components/image-quiz.ce.js.js +2 -2
- package/dist/components/image-quizzes.ce.js.js +2 -2
- package/dist/components/llm-compare-messages.ce.js.js +9 -8
- package/dist/components/llm-messages.ce.js.js +5 -4
- package/dist/components/llm-prompt-select.ce.js.js +1 -1
- package/dist/components/message-conversation.ce.js.js +52 -55
- package/dist/components/pix-carousel.ce.js.js +140 -139
- package/dist/components/pix-cursor.ce.js.js +90 -89
- package/dist/index.js +1 -0
- package/dist/metadata.js +11 -8
- package/dist/shadow-dom-Bfma-Uia.js +9 -0
- package/package.json +1 -1
- package/dist/LLMMessage.ce-CrEM5b3d.js +0 -3158
- package/dist/_plugin-vue_export-helper-CGraGJnO.js +0 -4184
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { s as Oe, n as Le, a as xe, q as Ce, r as Re, v as $e, c as Pe, o as ke, f as ee, x as Ne, y as te, t as Ee, m as Fe, z as je, A as Ie, _ as Te } from "./_plugin-vue_export-helper-OrrhezDE.js";
|
|
2
|
+
const d = (o) => typeof o == "string", K = () => {
|
|
3
3
|
let o, e;
|
|
4
|
-
const t = new Promise((
|
|
5
|
-
o =
|
|
4
|
+
const t = new Promise((i, s) => {
|
|
5
|
+
o = i, e = s;
|
|
6
6
|
});
|
|
7
7
|
return t.resolve = o, t.reject = e, t;
|
|
8
|
-
},
|
|
9
|
-
o.forEach((
|
|
10
|
-
e[
|
|
8
|
+
}, se = (o) => o == null ? "" : "" + o, De = (o, e, t) => {
|
|
9
|
+
o.forEach((i) => {
|
|
10
|
+
e[i] && (t[i] = e[i]);
|
|
11
11
|
});
|
|
12
|
-
},
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
for (;
|
|
16
|
-
if (
|
|
17
|
-
const n =
|
|
18
|
-
!o[n] && t && (o[n] = new t()), Object.prototype.hasOwnProperty.call(o, n) ? o = o[n] : o = {}, ++
|
|
19
|
-
}
|
|
20
|
-
return
|
|
12
|
+
}, Ve = /###/g, ie = (o) => o && o.indexOf("###") > -1 ? o.replace(Ve, ".") : o, ne = (o) => !o || d(o), A = (o, e, t) => {
|
|
13
|
+
const i = d(e) ? e.split(".") : e;
|
|
14
|
+
let s = 0;
|
|
15
|
+
for (; s < i.length - 1; ) {
|
|
16
|
+
if (ne(o)) return {};
|
|
17
|
+
const n = ie(i[s]);
|
|
18
|
+
!o[n] && t && (o[n] = new t()), Object.prototype.hasOwnProperty.call(o, n) ? o = o[n] : o = {}, ++s;
|
|
19
|
+
}
|
|
20
|
+
return ne(o) ? {} : {
|
|
21
21
|
obj: o,
|
|
22
|
-
k:
|
|
22
|
+
k: ie(i[s])
|
|
23
23
|
};
|
|
24
|
-
},
|
|
24
|
+
}, re = (o, e, t) => {
|
|
25
25
|
const {
|
|
26
|
-
obj:
|
|
27
|
-
k:
|
|
28
|
-
} =
|
|
29
|
-
if (
|
|
30
|
-
s
|
|
26
|
+
obj: i,
|
|
27
|
+
k: s
|
|
28
|
+
} = A(o, e, Object);
|
|
29
|
+
if (i !== void 0 || e.length === 1) {
|
|
30
|
+
i[s] = t;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
let n = e[e.length - 1], a = e.slice(0, e.length - 1), r =
|
|
33
|
+
let n = e[e.length - 1], a = e.slice(0, e.length - 1), r = A(o, a, Object);
|
|
34
34
|
for (; r.obj === void 0 && a.length; )
|
|
35
|
-
n = `${a[a.length - 1]}.${n}`, a = a.slice(0, a.length - 1), r =
|
|
35
|
+
n = `${a[a.length - 1]}.${n}`, a = a.slice(0, a.length - 1), r = A(o, a, Object), r?.obj && typeof r.obj[`${r.k}.${n}`] < "u" && (r.obj = void 0);
|
|
36
36
|
r.obj[`${r.k}.${n}`] = t;
|
|
37
|
-
},
|
|
37
|
+
}, Ke = (o, e, t, i) => {
|
|
38
38
|
const {
|
|
39
|
-
obj:
|
|
39
|
+
obj: s,
|
|
40
40
|
k: n
|
|
41
|
-
} =
|
|
42
|
-
|
|
43
|
-
},
|
|
41
|
+
} = A(o, e, Object);
|
|
42
|
+
s[n] = s[n] || [], s[n].push(t);
|
|
43
|
+
}, H = (o, e) => {
|
|
44
44
|
const {
|
|
45
45
|
obj: t,
|
|
46
|
-
k:
|
|
47
|
-
} =
|
|
48
|
-
if (t && Object.prototype.hasOwnProperty.call(t,
|
|
49
|
-
return t[
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
},
|
|
54
|
-
for (const
|
|
55
|
-
|
|
46
|
+
k: i
|
|
47
|
+
} = A(o, e);
|
|
48
|
+
if (t && Object.prototype.hasOwnProperty.call(t, i))
|
|
49
|
+
return t[i];
|
|
50
|
+
}, Ae = (o, e, t) => {
|
|
51
|
+
const i = H(o, t);
|
|
52
|
+
return i !== void 0 ? i : H(e, t);
|
|
53
|
+
}, ye = (o, e, t) => {
|
|
54
|
+
for (const i in e)
|
|
55
|
+
i !== "__proto__" && i !== "constructor" && (i in o ? d(o[i]) || o[i] instanceof String || d(e[i]) || e[i] instanceof String ? t && (o[i] = e[i]) : ye(o[i], e[i], t) : o[i] = e[i]);
|
|
56
56
|
return o;
|
|
57
57
|
}, T = (o) => o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
58
|
-
var
|
|
58
|
+
var Me = {
|
|
59
59
|
"&": "&",
|
|
60
60
|
"<": "<",
|
|
61
61
|
">": ">",
|
|
@@ -63,7 +63,7 @@ var Ue = {
|
|
|
63
63
|
"'": "'",
|
|
64
64
|
"/": "/"
|
|
65
65
|
};
|
|
66
|
-
const
|
|
66
|
+
const Ue = (o) => d(o) ? o.replace(/[&<>"'\/]/g, (e) => Me[e]) : o;
|
|
67
67
|
class ze {
|
|
68
68
|
constructor(e) {
|
|
69
69
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -72,42 +72,42 @@ class ze {
|
|
|
72
72
|
const t = this.regExpMap.get(e);
|
|
73
73
|
if (t !== void 0)
|
|
74
74
|
return t;
|
|
75
|
-
const
|
|
76
|
-
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e,
|
|
75
|
+
const i = new RegExp(e);
|
|
76
|
+
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, i), this.regExpQueue.push(e), i;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Be = [" ", ",", "?", "!", ";"], He = new ze(20), Je = (o, e, t) => {
|
|
80
80
|
e = e || "", t = t || "";
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
let n = !
|
|
81
|
+
const i = Be.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
|
|
82
|
+
if (i.length === 0) return !0;
|
|
83
|
+
const s = He.getRegExp(`(${i.map((a) => a === "?" ? "\\?" : a).join("|")})`);
|
|
84
|
+
let n = !s.test(o);
|
|
85
85
|
if (!n) {
|
|
86
86
|
const a = o.indexOf(t);
|
|
87
|
-
a > 0 && !
|
|
87
|
+
a > 0 && !s.test(o.substring(0, a)) && (n = !0);
|
|
88
88
|
}
|
|
89
89
|
return n;
|
|
90
|
-
},
|
|
90
|
+
}, Q = (o, e, t = ".") => {
|
|
91
91
|
if (!o) return;
|
|
92
92
|
if (o[e])
|
|
93
93
|
return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : void 0;
|
|
94
|
-
const
|
|
95
|
-
let
|
|
96
|
-
for (let n = 0; n <
|
|
97
|
-
if (!
|
|
94
|
+
const i = e.split(t);
|
|
95
|
+
let s = o;
|
|
96
|
+
for (let n = 0; n < i.length; ) {
|
|
97
|
+
if (!s || typeof s != "object")
|
|
98
98
|
return;
|
|
99
99
|
let a, r = "";
|
|
100
|
-
for (let l = n; l <
|
|
101
|
-
if (l !== n && (r += t), r +=
|
|
102
|
-
if (["string", "number", "boolean"].indexOf(typeof a) > -1 && l <
|
|
100
|
+
for (let l = n; l < i.length; ++l)
|
|
101
|
+
if (l !== n && (r += t), r += i[l], a = s[r], a !== void 0) {
|
|
102
|
+
if (["string", "number", "boolean"].indexOf(typeof a) > -1 && l < i.length - 1)
|
|
103
103
|
continue;
|
|
104
104
|
n += l - n + 1;
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
s = a;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
110
|
-
},
|
|
109
|
+
return s;
|
|
110
|
+
}, M = (o) => o?.replace("_", "-"), _e = {
|
|
111
111
|
type: "logger",
|
|
112
112
|
log(o) {
|
|
113
113
|
this.output("log", o);
|
|
@@ -122,12 +122,12 @@ const _e = [" ", ",", "?", "!", ";"], Je = new ze(20), Ye = (o, e, t) => {
|
|
|
122
122
|
console?.[o]?.apply?.(console, e);
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
class
|
|
125
|
+
class J {
|
|
126
126
|
constructor(e, t = {}) {
|
|
127
127
|
this.init(e, t);
|
|
128
128
|
}
|
|
129
129
|
init(e, t = {}) {
|
|
130
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
130
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || _e, this.options = t, this.debug = t.debug;
|
|
131
131
|
}
|
|
132
132
|
log(...e) {
|
|
133
133
|
return this.forward(e, "log", "", !0);
|
|
@@ -141,29 +141,29 @@ class Y {
|
|
|
141
141
|
deprecate(...e) {
|
|
142
142
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
143
143
|
}
|
|
144
|
-
forward(e, t,
|
|
145
|
-
return
|
|
144
|
+
forward(e, t, i, s) {
|
|
145
|
+
return s && !this.debug ? null : (d(e[0]) && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
146
146
|
}
|
|
147
147
|
create(e) {
|
|
148
|
-
return new
|
|
148
|
+
return new J(this.logger, {
|
|
149
149
|
prefix: `${this.prefix}:${e}:`,
|
|
150
150
|
...this.options
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
clone(e) {
|
|
154
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
154
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new J(this.logger, e);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
var
|
|
158
|
-
class
|
|
157
|
+
var $ = new J();
|
|
158
|
+
class Y {
|
|
159
159
|
constructor() {
|
|
160
160
|
this.observers = {};
|
|
161
161
|
}
|
|
162
162
|
on(e, t) {
|
|
163
|
-
return e.split(" ").forEach((
|
|
164
|
-
this.observers[
|
|
165
|
-
const
|
|
166
|
-
this.observers[
|
|
163
|
+
return e.split(" ").forEach((i) => {
|
|
164
|
+
this.observers[i] || (this.observers[i] = /* @__PURE__ */ new Map());
|
|
165
|
+
const s = this.observers[i].get(t) || 0;
|
|
166
|
+
this.observers[i].set(t, s + 1);
|
|
167
167
|
}), this;
|
|
168
168
|
}
|
|
169
169
|
off(e, t) {
|
|
@@ -176,16 +176,16 @@ class G {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
emit(e, ...t) {
|
|
179
|
-
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([
|
|
179
|
+
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, n]) => {
|
|
180
180
|
for (let a = 0; a < n; a++)
|
|
181
|
-
|
|
182
|
-
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([
|
|
181
|
+
s(...t);
|
|
182
|
+
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, n]) => {
|
|
183
183
|
for (let a = 0; a < n; a++)
|
|
184
|
-
|
|
184
|
+
s.apply(s, [e, ...t]);
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class ae extends Y {
|
|
189
189
|
constructor(e, t = {
|
|
190
190
|
ns: ["translation"],
|
|
191
191
|
defaultNS: "translation"
|
|
@@ -199,40 +199,40 @@ class he extends G {
|
|
|
199
199
|
const t = this.options.ns.indexOf(e);
|
|
200
200
|
t > -1 && this.options.ns.splice(t, 1);
|
|
201
201
|
}
|
|
202
|
-
getResource(e, t,
|
|
203
|
-
const n =
|
|
202
|
+
getResource(e, t, i, s = {}) {
|
|
203
|
+
const n = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, a = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
204
204
|
let r;
|
|
205
|
-
e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t],
|
|
206
|
-
const l =
|
|
207
|
-
return !l && !t && !
|
|
205
|
+
e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t], i && (Array.isArray(i) ? r.push(...i) : d(i) && n ? r.push(...i.split(n)) : r.push(i)));
|
|
206
|
+
const l = H(this.data, r);
|
|
207
|
+
return !l && !t && !i && e.indexOf(".") > -1 && (e = r[0], t = r[1], i = r.slice(2).join(".")), l || !a || !d(i) ? l : Q(this.data?.[e]?.[t], i, n);
|
|
208
208
|
}
|
|
209
|
-
addResource(e, t,
|
|
209
|
+
addResource(e, t, i, s, n = {
|
|
210
210
|
silent: !1
|
|
211
211
|
}) {
|
|
212
212
|
const a = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
213
213
|
let r = [e, t];
|
|
214
|
-
|
|
214
|
+
i && (r = r.concat(a ? i.split(a) : i)), e.indexOf(".") > -1 && (r = e.split("."), s = t, t = r[1]), this.addNamespaces(t), re(this.data, r, s), n.silent || this.emit("added", e, t, i, s);
|
|
215
215
|
}
|
|
216
|
-
addResources(e, t,
|
|
216
|
+
addResources(e, t, i, s = {
|
|
217
217
|
silent: !1
|
|
218
218
|
}) {
|
|
219
|
-
for (const n in
|
|
220
|
-
(
|
|
219
|
+
for (const n in i)
|
|
220
|
+
(d(i[n]) || Array.isArray(i[n])) && this.addResource(e, t, n, i[n], {
|
|
221
221
|
silent: !0
|
|
222
222
|
});
|
|
223
|
-
|
|
223
|
+
s.silent || this.emit("added", e, t, i);
|
|
224
224
|
}
|
|
225
|
-
addResourceBundle(e, t,
|
|
225
|
+
addResourceBundle(e, t, i, s, n, a = {
|
|
226
226
|
silent: !1,
|
|
227
227
|
skipCopy: !1
|
|
228
228
|
}) {
|
|
229
229
|
let r = [e, t];
|
|
230
|
-
e.indexOf(".") > -1 && (r = e.split("."),
|
|
231
|
-
let l =
|
|
232
|
-
a.skipCopy || (
|
|
230
|
+
e.indexOf(".") > -1 && (r = e.split("."), s = i, i = t, t = r[1]), this.addNamespaces(t);
|
|
231
|
+
let l = H(this.data, r) || {};
|
|
232
|
+
a.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? ye(l, i, n) : l = {
|
|
233
233
|
...l,
|
|
234
|
-
...
|
|
235
|
-
},
|
|
234
|
+
...i
|
|
235
|
+
}, re(this.data, r, l), a.silent || this.emit("added", e, t, i);
|
|
236
236
|
}
|
|
237
237
|
removeResourceBundle(e, t) {
|
|
238
238
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -248,27 +248,27 @@ class he extends G {
|
|
|
248
248
|
}
|
|
249
249
|
hasLanguageSomeTranslations(e) {
|
|
250
250
|
const t = this.getDataByLanguage(e);
|
|
251
|
-
return !!(t && Object.keys(t) || []).find((
|
|
251
|
+
return !!(t && Object.keys(t) || []).find((s) => t[s] && Object.keys(t[s]).length > 0);
|
|
252
252
|
}
|
|
253
253
|
toJSON() {
|
|
254
254
|
return this.data;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
var
|
|
257
|
+
var be = {
|
|
258
258
|
processors: {},
|
|
259
259
|
addPostProcessor(o) {
|
|
260
260
|
this.processors[o.name] = o;
|
|
261
261
|
},
|
|
262
|
-
handle(o, e, t,
|
|
262
|
+
handle(o, e, t, i, s) {
|
|
263
263
|
return o.forEach((n) => {
|
|
264
|
-
e = this.processors[n]?.process(e, t,
|
|
264
|
+
e = this.processors[n]?.process(e, t, i, s) ?? e;
|
|
265
265
|
}), e;
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
|
-
const
|
|
269
|
-
class
|
|
268
|
+
const oe = {}, le = (o) => !d(o) && typeof o != "boolean" && typeof o != "number";
|
|
269
|
+
class _ extends Y {
|
|
270
270
|
constructor(e, t = {}) {
|
|
271
|
-
super(),
|
|
271
|
+
super(), De(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = $.create("translator");
|
|
272
272
|
}
|
|
273
273
|
changeLanguage(e) {
|
|
274
274
|
e && (this.language = e);
|
|
@@ -276,47 +276,47 @@ class W extends G {
|
|
|
276
276
|
exists(e, t = {
|
|
277
277
|
interpolation: {}
|
|
278
278
|
}) {
|
|
279
|
-
const
|
|
279
|
+
const i = {
|
|
280
280
|
...t
|
|
281
281
|
};
|
|
282
|
-
return e == null ? !1 : this.resolve(e,
|
|
282
|
+
return e == null ? !1 : this.resolve(e, i)?.res !== void 0;
|
|
283
283
|
}
|
|
284
284
|
extractFromKey(e, t) {
|
|
285
|
-
let
|
|
286
|
-
|
|
287
|
-
const
|
|
285
|
+
let i = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
286
|
+
i === void 0 && (i = ":");
|
|
287
|
+
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
288
288
|
let n = t.ns || this.options.defaultNS || [];
|
|
289
|
-
const a =
|
|
289
|
+
const a = i && e.indexOf(i) > -1, r = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Je(e, i, s);
|
|
290
290
|
if (a && !r) {
|
|
291
291
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
292
292
|
if (l && l.length > 0)
|
|
293
293
|
return {
|
|
294
294
|
key: e,
|
|
295
|
-
namespaces:
|
|
295
|
+
namespaces: d(n) ? [n] : n
|
|
296
296
|
};
|
|
297
|
-
const u = e.split(
|
|
298
|
-
(
|
|
297
|
+
const u = e.split(i);
|
|
298
|
+
(i !== s || i === s && this.options.ns.indexOf(u[0]) > -1) && (n = u.shift()), e = u.join(s);
|
|
299
299
|
}
|
|
300
300
|
return {
|
|
301
301
|
key: e,
|
|
302
|
-
namespaces:
|
|
302
|
+
namespaces: d(n) ? [n] : n
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
translate(e, t,
|
|
306
|
-
let
|
|
305
|
+
translate(e, t, i) {
|
|
306
|
+
let s = typeof t == "object" ? {
|
|
307
307
|
...t
|
|
308
308
|
} : t;
|
|
309
|
-
if (typeof
|
|
310
|
-
...
|
|
311
|
-
}),
|
|
309
|
+
if (typeof s != "object" && this.options.overloadTranslationOptionHandler && (s = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (s = {
|
|
310
|
+
...s
|
|
311
|
+
}), s || (s = {}), e == null) return "";
|
|
312
312
|
Array.isArray(e) || (e = [String(e)]);
|
|
313
|
-
const n =
|
|
313
|
+
const n = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
314
314
|
key: r,
|
|
315
315
|
namespaces: l
|
|
316
|
-
} = this.extractFromKey(e[e.length - 1],
|
|
317
|
-
let h =
|
|
316
|
+
} = this.extractFromKey(e[e.length - 1], s), u = l[l.length - 1];
|
|
317
|
+
let h = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
318
318
|
h === void 0 && (h = ":");
|
|
319
|
-
const f =
|
|
319
|
+
const f = s.lng || this.language, g = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
320
320
|
if (f?.toLowerCase() === "cimode")
|
|
321
321
|
return g ? n ? {
|
|
322
322
|
res: `${u}${h}${r}`,
|
|
@@ -324,159 +324,159 @@ class W extends G {
|
|
|
324
324
|
exactUsedKey: r,
|
|
325
325
|
usedLng: f,
|
|
326
326
|
usedNS: u,
|
|
327
|
-
usedParams: this.getUsedParamsDetails(
|
|
327
|
+
usedParams: this.getUsedParamsDetails(s)
|
|
328
328
|
} : `${u}${h}${r}` : n ? {
|
|
329
329
|
res: r,
|
|
330
330
|
usedKey: r,
|
|
331
331
|
exactUsedKey: r,
|
|
332
332
|
usedLng: f,
|
|
333
333
|
usedNS: u,
|
|
334
|
-
usedParams: this.getUsedParamsDetails(
|
|
334
|
+
usedParams: this.getUsedParamsDetails(s)
|
|
335
335
|
} : r;
|
|
336
|
-
const p = this.resolve(e,
|
|
337
|
-
let
|
|
338
|
-
const x = p?.usedKey || r, b = p?.exactUsedKey || r, v = ["[object Number]", "[object Function]", "[object RegExp]"], y =
|
|
336
|
+
const p = this.resolve(e, s);
|
|
337
|
+
let c = p?.res;
|
|
338
|
+
const x = p?.usedKey || r, b = p?.exactUsedKey || r, v = ["[object Number]", "[object Function]", "[object RegExp]"], y = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, E = !this.i18nFormat || this.i18nFormat.handleAsObject, w = s.count !== void 0 && !d(s.count), k = _.hasDefaultValue(s), j = w ? this.pluralResolver.getSuffix(f, s.count, s) : "", I = s.ordinal && w ? this.pluralResolver.getSuffix(f, s.count, {
|
|
339
339
|
ordinal: !1
|
|
340
|
-
}) : "",
|
|
341
|
-
let
|
|
342
|
-
E && !
|
|
343
|
-
const
|
|
344
|
-
if (E &&
|
|
345
|
-
if (!
|
|
340
|
+
}) : "", G = w && !s.ordinal && s.count === 0, N = G && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${j}`] || s[`defaultValue${I}`] || s.defaultValue;
|
|
341
|
+
let L = c;
|
|
342
|
+
E && !c && k && (L = N);
|
|
343
|
+
const we = le(L), ve = Object.prototype.toString.apply(L);
|
|
344
|
+
if (E && L && we && v.indexOf(ve) < 0 && !(d(y) && Array.isArray(L))) {
|
|
345
|
+
if (!s.returnObjects && !this.options.returnObjects) {
|
|
346
346
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
347
|
-
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x,
|
|
348
|
-
...
|
|
347
|
+
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, L, {
|
|
348
|
+
...s,
|
|
349
349
|
ns: l
|
|
350
350
|
}) : `key '${r} (${this.language})' returned an object instead of string.`;
|
|
351
|
-
return n ? (p.res = C, p.usedParams = this.getUsedParamsDetails(
|
|
351
|
+
return n ? (p.res = C, p.usedParams = this.getUsedParamsDetails(s), p) : C;
|
|
352
352
|
}
|
|
353
353
|
if (a) {
|
|
354
|
-
const C = Array.isArray(
|
|
355
|
-
for (const
|
|
356
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
357
|
-
const P = `${
|
|
358
|
-
k && !
|
|
359
|
-
...
|
|
360
|
-
defaultValue:
|
|
354
|
+
const C = Array.isArray(L), O = C ? [] : {}, Z = C ? b : x;
|
|
355
|
+
for (const R in L)
|
|
356
|
+
if (Object.prototype.hasOwnProperty.call(L, R)) {
|
|
357
|
+
const P = `${Z}${a}${R}`;
|
|
358
|
+
k && !c ? O[R] = this.translate(P, {
|
|
359
|
+
...s,
|
|
360
|
+
defaultValue: le(N) ? N[R] : void 0,
|
|
361
361
|
joinArrays: !1,
|
|
362
362
|
ns: l
|
|
363
|
-
}) :
|
|
364
|
-
...
|
|
363
|
+
}) : O[R] = this.translate(P, {
|
|
364
|
+
...s,
|
|
365
365
|
joinArrays: !1,
|
|
366
366
|
ns: l
|
|
367
|
-
}),
|
|
367
|
+
}), O[R] === P && (O[R] = L[R]);
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
c = O;
|
|
370
370
|
}
|
|
371
|
-
} else if (E &&
|
|
372
|
-
|
|
371
|
+
} else if (E && d(y) && Array.isArray(c))
|
|
372
|
+
c = c.join(y), c && (c = this.extendTranslation(c, e, s, i));
|
|
373
373
|
else {
|
|
374
|
-
let C = !1,
|
|
375
|
-
!this.isValidLookup(
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
378
|
-
if (this.logger.log(P ? "updateKey" : "missingKey", f, u, r, P ? N :
|
|
379
|
-
const
|
|
380
|
-
...
|
|
374
|
+
let C = !1, O = !1;
|
|
375
|
+
!this.isValidLookup(c) && k && (C = !0, c = N), this.isValidLookup(c) || (O = !0, c = r);
|
|
376
|
+
const R = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && O ? void 0 : c, P = k && N !== c && this.options.updateMissing;
|
|
377
|
+
if (O || C || P) {
|
|
378
|
+
if (this.logger.log(P ? "updateKey" : "missingKey", f, u, r, P ? N : c), a) {
|
|
379
|
+
const S = this.resolve(r, {
|
|
380
|
+
...s,
|
|
381
381
|
keySeparator: !1
|
|
382
382
|
});
|
|
383
|
-
|
|
383
|
+
S && S.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.");
|
|
384
384
|
}
|
|
385
|
-
let
|
|
386
|
-
const
|
|
387
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
388
|
-
for (let
|
|
389
|
-
|
|
390
|
-
else this.options.saveMissingTo === "all" ?
|
|
391
|
-
const
|
|
392
|
-
const
|
|
393
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(
|
|
385
|
+
let D = [];
|
|
386
|
+
const z = this.languageUtils.getFallbackCodes(this.options.fallbackLng, s.lng || this.language);
|
|
387
|
+
if (this.options.saveMissingTo === "fallback" && z && z[0])
|
|
388
|
+
for (let S = 0; S < z.length; S++)
|
|
389
|
+
D.push(z[S]);
|
|
390
|
+
else this.options.saveMissingTo === "all" ? D = this.languageUtils.toResolveHierarchy(s.lng || this.language) : D.push(s.lng || this.language);
|
|
391
|
+
const q = (S, F, V) => {
|
|
392
|
+
const X = k && V !== c ? V : R;
|
|
393
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(S, u, F, X, P, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(S, u, F, X, P, s), this.emit("missingKey", S, u, F, c);
|
|
394
394
|
};
|
|
395
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
396
|
-
const F = this.pluralResolver.getSuffixes(
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && w ? D.forEach((S) => {
|
|
396
|
+
const F = this.pluralResolver.getSuffixes(S, s);
|
|
397
|
+
G && s[`defaultValue${this.options.pluralSeparator}zero`] && F.indexOf(`${this.options.pluralSeparator}zero`) < 0 && F.push(`${this.options.pluralSeparator}zero`), F.forEach((V) => {
|
|
398
|
+
q([S], r + V, s[`defaultValue${V}`] || N);
|
|
399
399
|
});
|
|
400
|
-
}) :
|
|
400
|
+
}) : q(D, r, N));
|
|
401
401
|
}
|
|
402
|
-
|
|
402
|
+
c = this.extendTranslation(c, e, s, p, i), O && c === r && this.options.appendNamespaceToMissingKey && (c = `${u}${h}${r}`), (O || C) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}${h}${r}` : r, C ? c : void 0, s));
|
|
403
403
|
}
|
|
404
|
-
return n ? (p.res =
|
|
404
|
+
return n ? (p.res = c, p.usedParams = this.getUsedParamsDetails(s), p) : c;
|
|
405
405
|
}
|
|
406
|
-
extendTranslation(e, t,
|
|
406
|
+
extendTranslation(e, t, i, s, n) {
|
|
407
407
|
if (this.i18nFormat?.parse)
|
|
408
408
|
e = this.i18nFormat.parse(e, {
|
|
409
409
|
...this.options.interpolation.defaultVariables,
|
|
410
|
-
...
|
|
411
|
-
},
|
|
412
|
-
resolved:
|
|
410
|
+
...i
|
|
411
|
+
}, i.lng || this.language || s.usedLng, s.usedNS, s.usedKey, {
|
|
412
|
+
resolved: s
|
|
413
413
|
});
|
|
414
|
-
else if (!
|
|
415
|
-
|
|
416
|
-
...
|
|
414
|
+
else if (!i.skipInterpolation) {
|
|
415
|
+
i.interpolation && this.interpolator.init({
|
|
416
|
+
...i,
|
|
417
417
|
interpolation: {
|
|
418
418
|
...this.options.interpolation,
|
|
419
|
-
...
|
|
419
|
+
...i.interpolation
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
|
-
const l =
|
|
422
|
+
const l = d(e) && (i?.interpolation?.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
423
423
|
let u;
|
|
424
424
|
if (l) {
|
|
425
425
|
const f = e.match(this.interpolator.nestingRegexp);
|
|
426
426
|
u = f && f.length;
|
|
427
427
|
}
|
|
428
|
-
let h =
|
|
428
|
+
let h = i.replace && !d(i.replace) ? i.replace : i;
|
|
429
429
|
if (this.options.interpolation.defaultVariables && (h = {
|
|
430
430
|
...this.options.interpolation.defaultVariables,
|
|
431
431
|
...h
|
|
432
|
-
}), e = this.interpolator.interpolate(e, h,
|
|
432
|
+
}), e = this.interpolator.interpolate(e, h, i.lng || this.language || s.usedLng, i), l) {
|
|
433
433
|
const f = e.match(this.interpolator.nestingRegexp), g = f && f.length;
|
|
434
|
-
u < g && (
|
|
434
|
+
u < g && (i.nest = !1);
|
|
435
435
|
}
|
|
436
|
-
!
|
|
436
|
+
!i.lng && s && s.res && (i.lng = this.language || s.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, (...f) => n?.[0] === f[0] && !i.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), i)), i.interpolation && this.interpolator.reset();
|
|
437
437
|
}
|
|
438
|
-
const a =
|
|
439
|
-
return e != null && r?.length &&
|
|
438
|
+
const a = i.postProcess || this.options.postProcess, r = d(a) ? [a] : a;
|
|
439
|
+
return e != null && r?.length && i.applyPostProcessor !== !1 && (e = be.handle(r, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
440
440
|
i18nResolved: {
|
|
441
|
-
...
|
|
442
|
-
usedParams: this.getUsedParamsDetails(
|
|
441
|
+
...s,
|
|
442
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
443
443
|
},
|
|
444
|
-
...
|
|
445
|
-
} :
|
|
444
|
+
...i
|
|
445
|
+
} : i, this)), e;
|
|
446
446
|
}
|
|
447
447
|
resolve(e, t = {}) {
|
|
448
|
-
let
|
|
449
|
-
return
|
|
450
|
-
if (this.isValidLookup(
|
|
448
|
+
let i, s, n, a, r;
|
|
449
|
+
return d(e) && (e = [e]), e.forEach((l) => {
|
|
450
|
+
if (this.isValidLookup(i)) return;
|
|
451
451
|
const u = this.extractFromKey(l, t), h = u.key;
|
|
452
|
-
|
|
452
|
+
s = h;
|
|
453
453
|
let f = u.namespaces;
|
|
454
454
|
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
455
|
-
const g = t.count !== void 0 && !
|
|
455
|
+
const g = t.count !== void 0 && !d(t.count), p = g && !t.ordinal && t.count === 0, c = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", x = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
456
456
|
f.forEach((b) => {
|
|
457
|
-
this.isValidLookup(
|
|
458
|
-
if (this.isValidLookup(
|
|
457
|
+
this.isValidLookup(i) || (r = b, !oe[`${x[0]}-${b}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(r) && (oe[`${x[0]}-${b}`] = !0, this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${r}" 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!!!")), x.forEach((v) => {
|
|
458
|
+
if (this.isValidLookup(i)) return;
|
|
459
459
|
a = v;
|
|
460
460
|
const y = [h];
|
|
461
461
|
if (this.i18nFormat?.addLookupKeys)
|
|
462
462
|
this.i18nFormat.addLookupKeys(y, h, v, b, t);
|
|
463
463
|
else {
|
|
464
|
-
let
|
|
465
|
-
g && (
|
|
464
|
+
let w;
|
|
465
|
+
g && (w = this.pluralResolver.getSuffix(v, t.count, t));
|
|
466
466
|
const k = `${this.options.pluralSeparator}zero`, j = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
467
|
-
if (g && (
|
|
468
|
-
const I = `${h}${this.options.contextSeparator}${t.context}`;
|
|
469
|
-
y.push(I), g && (
|
|
467
|
+
if (g && (t.ordinal && w.indexOf(j) === 0 && y.push(h + w.replace(j, this.options.pluralSeparator)), y.push(h + w), p && y.push(h + k)), c) {
|
|
468
|
+
const I = `${h}${this.options.contextSeparator || "_"}${t.context}`;
|
|
469
|
+
y.push(I), g && (t.ordinal && w.indexOf(j) === 0 && y.push(I + w.replace(j, this.options.pluralSeparator)), y.push(I + w), p && y.push(I + k));
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
let E;
|
|
473
473
|
for (; E = y.pop(); )
|
|
474
|
-
this.isValidLookup(
|
|
474
|
+
this.isValidLookup(i) || (n = E, i = this.getResource(v, b, E, t));
|
|
475
475
|
}));
|
|
476
476
|
});
|
|
477
477
|
}), {
|
|
478
|
-
res:
|
|
479
|
-
usedKey:
|
|
478
|
+
res: i,
|
|
479
|
+
usedKey: s,
|
|
480
480
|
exactUsedKey: n,
|
|
481
481
|
usedLng: a,
|
|
482
482
|
usedNS: r
|
|
@@ -485,48 +485,48 @@ class W extends G {
|
|
|
485
485
|
isValidLookup(e) {
|
|
486
486
|
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
487
487
|
}
|
|
488
|
-
getResource(e, t,
|
|
489
|
-
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t,
|
|
488
|
+
getResource(e, t, i, s = {}) {
|
|
489
|
+
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, i, s) : this.resourceStore.getResource(e, t, i, s);
|
|
490
490
|
}
|
|
491
491
|
getUsedParamsDetails(e = {}) {
|
|
492
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"],
|
|
493
|
-
let
|
|
494
|
-
if (
|
|
492
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && !d(e.replace);
|
|
493
|
+
let s = i ? e.replace : e;
|
|
494
|
+
if (i && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
495
495
|
...this.options.interpolation.defaultVariables,
|
|
496
|
-
...
|
|
497
|
-
}), !
|
|
498
|
-
|
|
499
|
-
...
|
|
496
|
+
...s
|
|
497
|
+
}), !i) {
|
|
498
|
+
s = {
|
|
499
|
+
...s
|
|
500
500
|
};
|
|
501
501
|
for (const n of t)
|
|
502
|
-
delete
|
|
502
|
+
delete s[n];
|
|
503
503
|
}
|
|
504
|
-
return
|
|
504
|
+
return s;
|
|
505
505
|
}
|
|
506
506
|
static hasDefaultValue(e) {
|
|
507
507
|
const t = "defaultValue";
|
|
508
|
-
for (const
|
|
509
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
508
|
+
for (const i in e)
|
|
509
|
+
if (Object.prototype.hasOwnProperty.call(e, i) && t === i.substring(0, t.length) && e[i] !== void 0)
|
|
510
510
|
return !0;
|
|
511
511
|
return !1;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
class
|
|
514
|
+
class ue {
|
|
515
515
|
constructor(e) {
|
|
516
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
516
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = $.create("languageUtils");
|
|
517
517
|
}
|
|
518
518
|
getScriptPartFromCode(e) {
|
|
519
|
-
if (e =
|
|
519
|
+
if (e = M(e), !e || e.indexOf("-") < 0) return null;
|
|
520
520
|
const t = e.split("-");
|
|
521
521
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
522
522
|
}
|
|
523
523
|
getLanguagePartFromCode(e) {
|
|
524
|
-
if (e =
|
|
524
|
+
if (e = M(e), !e || e.indexOf("-") < 0) return e;
|
|
525
525
|
const t = e.split("-");
|
|
526
526
|
return this.formatLanguageCode(t[0]);
|
|
527
527
|
}
|
|
528
528
|
formatLanguageCode(e) {
|
|
529
|
-
if (
|
|
529
|
+
if (d(e) && e.indexOf("-") > -1) {
|
|
530
530
|
let t;
|
|
531
531
|
try {
|
|
532
532
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -542,15 +542,15 @@ class pe {
|
|
|
542
542
|
getBestMatchFromCodes(e) {
|
|
543
543
|
if (!e) return null;
|
|
544
544
|
let t;
|
|
545
|
-
return e.forEach((
|
|
545
|
+
return e.forEach((i) => {
|
|
546
546
|
if (t) return;
|
|
547
|
-
const
|
|
548
|
-
(!this.options.supportedLngs || this.isSupportedCode(
|
|
549
|
-
}), !t && this.options.supportedLngs && e.forEach((
|
|
547
|
+
const s = this.formatLanguageCode(i);
|
|
548
|
+
(!this.options.supportedLngs || this.isSupportedCode(s)) && (t = s);
|
|
549
|
+
}), !t && this.options.supportedLngs && e.forEach((i) => {
|
|
550
550
|
if (t) return;
|
|
551
|
-
const
|
|
552
|
-
if (this.isSupportedCode(
|
|
553
|
-
const n = this.getLanguagePartFromCode(
|
|
551
|
+
const s = this.getScriptPartFromCode(i);
|
|
552
|
+
if (this.isSupportedCode(s)) return t = s;
|
|
553
|
+
const n = this.getLanguagePartFromCode(i);
|
|
554
554
|
if (this.isSupportedCode(n)) return t = n;
|
|
555
555
|
t = this.options.supportedLngs.find((a) => {
|
|
556
556
|
if (a === n) return a;
|
|
@@ -561,36 +561,36 @@ class pe {
|
|
|
561
561
|
}
|
|
562
562
|
getFallbackCodes(e, t) {
|
|
563
563
|
if (!e) return [];
|
|
564
|
-
if (typeof e == "function" && (e = e(t)),
|
|
564
|
+
if (typeof e == "function" && (e = e(t)), d(e) && (e = [e]), Array.isArray(e)) return e;
|
|
565
565
|
if (!t) return e.default || [];
|
|
566
|
-
let
|
|
567
|
-
return
|
|
566
|
+
let i = e[t];
|
|
567
|
+
return i || (i = e[this.getScriptPartFromCode(t)]), i || (i = e[this.formatLanguageCode(t)]), i || (i = e[this.getLanguagePartFromCode(t)]), i || (i = e.default), i || [];
|
|
568
568
|
}
|
|
569
569
|
toResolveHierarchy(e, t) {
|
|
570
|
-
const
|
|
571
|
-
a && (this.isSupportedCode(a) ?
|
|
570
|
+
const i = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], n = (a) => {
|
|
571
|
+
a && (this.isSupportedCode(a) ? s.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
|
|
572
572
|
};
|
|
573
|
-
return
|
|
574
|
-
|
|
575
|
-
}),
|
|
573
|
+
return d(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && n(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && n(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && n(this.getLanguagePartFromCode(e))) : d(e) && n(this.formatLanguageCode(e)), i.forEach((a) => {
|
|
574
|
+
s.indexOf(a) < 0 && n(this.formatLanguageCode(a));
|
|
575
|
+
}), s;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
const
|
|
578
|
+
const fe = {
|
|
579
579
|
zero: 0,
|
|
580
580
|
one: 1,
|
|
581
581
|
two: 2,
|
|
582
582
|
few: 3,
|
|
583
583
|
many: 4,
|
|
584
584
|
other: 5
|
|
585
|
-
},
|
|
585
|
+
}, he = {
|
|
586
586
|
select: (o) => o === 1 ? "one" : "other",
|
|
587
587
|
resolvedOptions: () => ({
|
|
588
588
|
pluralCategories: ["one", "other"]
|
|
589
589
|
})
|
|
590
590
|
};
|
|
591
|
-
class
|
|
591
|
+
class Ye {
|
|
592
592
|
constructor(e, t = {}) {
|
|
593
|
-
this.languageUtils = e, this.options = t, this.logger =
|
|
593
|
+
this.languageUtils = e, this.options = t, this.logger = $.create("pluralResolver"), this.pluralRulesCache = {};
|
|
594
594
|
}
|
|
595
595
|
addRule(e, t) {
|
|
596
596
|
this.rules[e] = t;
|
|
@@ -599,49 +599,49 @@ class Qe {
|
|
|
599
599
|
this.pluralRulesCache = {};
|
|
600
600
|
}
|
|
601
601
|
getRule(e, t = {}) {
|
|
602
|
-
const
|
|
603
|
-
cleanedCode:
|
|
604
|
-
type:
|
|
602
|
+
const i = M(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
|
|
603
|
+
cleanedCode: i,
|
|
604
|
+
type: s
|
|
605
605
|
});
|
|
606
606
|
if (n in this.pluralRulesCache)
|
|
607
607
|
return this.pluralRulesCache[n];
|
|
608
608
|
let a;
|
|
609
609
|
try {
|
|
610
|
-
a = new Intl.PluralRules(
|
|
611
|
-
type:
|
|
610
|
+
a = new Intl.PluralRules(i, {
|
|
611
|
+
type: s
|
|
612
612
|
});
|
|
613
613
|
} catch {
|
|
614
614
|
if (!Intl)
|
|
615
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
616
|
-
if (!e.match(/-|_/)) return
|
|
615
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), he;
|
|
616
|
+
if (!e.match(/-|_/)) return he;
|
|
617
617
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
618
618
|
a = this.getRule(l, t);
|
|
619
619
|
}
|
|
620
620
|
return this.pluralRulesCache[n] = a, a;
|
|
621
621
|
}
|
|
622
622
|
needsPlural(e, t = {}) {
|
|
623
|
-
let
|
|
624
|
-
return
|
|
623
|
+
let i = this.getRule(e, t);
|
|
624
|
+
return i || (i = this.getRule("dev", t)), i?.resolvedOptions().pluralCategories.length > 1;
|
|
625
625
|
}
|
|
626
|
-
getPluralFormsOfKey(e, t,
|
|
627
|
-
return this.getSuffixes(e,
|
|
626
|
+
getPluralFormsOfKey(e, t, i = {}) {
|
|
627
|
+
return this.getSuffixes(e, i).map((s) => `${t}${s}`);
|
|
628
628
|
}
|
|
629
629
|
getSuffixes(e, t = {}) {
|
|
630
|
-
let
|
|
631
|
-
return
|
|
630
|
+
let i = this.getRule(e, t);
|
|
631
|
+
return i || (i = this.getRule("dev", t)), i ? i.resolvedOptions().pluralCategories.sort((s, n) => fe[s] - fe[n]).map((s) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : [];
|
|
632
632
|
}
|
|
633
|
-
getSuffix(e, t,
|
|
634
|
-
const
|
|
635
|
-
return
|
|
633
|
+
getSuffix(e, t, i = {}) {
|
|
634
|
+
const s = this.getRule(e, i);
|
|
635
|
+
return s ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, i));
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
const
|
|
639
|
-
let n =
|
|
640
|
-
return !n &&
|
|
641
|
-
},
|
|
642
|
-
class
|
|
638
|
+
const ce = (o, e, t, i = ".", s = !0) => {
|
|
639
|
+
let n = Ae(o, e, t);
|
|
640
|
+
return !n && s && d(t) && (n = Q(o, t, i), n === void 0 && (n = Q(e, t, i))), n;
|
|
641
|
+
}, W = (o) => o.replace(/\$/g, "$$$$");
|
|
642
|
+
class We {
|
|
643
643
|
constructor(e = {}) {
|
|
644
|
-
this.logger =
|
|
644
|
+
this.logger = $.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e);
|
|
645
645
|
}
|
|
646
646
|
init(e = {}) {
|
|
647
647
|
e.interpolation || (e.interpolation = {
|
|
@@ -649,8 +649,8 @@ class Ge {
|
|
|
649
649
|
});
|
|
650
650
|
const {
|
|
651
651
|
escape: t,
|
|
652
|
-
escapeValue:
|
|
653
|
-
useRawValueToEscape:
|
|
652
|
+
escapeValue: i,
|
|
653
|
+
useRawValueToEscape: s,
|
|
654
654
|
prefix: n,
|
|
655
655
|
prefixEscaped: a,
|
|
656
656
|
suffix: r,
|
|
@@ -660,78 +660,78 @@ class Ge {
|
|
|
660
660
|
unescapePrefix: f,
|
|
661
661
|
nestingPrefix: g,
|
|
662
662
|
nestingPrefixEscaped: p,
|
|
663
|
-
nestingSuffix:
|
|
663
|
+
nestingSuffix: c,
|
|
664
664
|
nestingSuffixEscaped: x,
|
|
665
665
|
nestingOptionsSeparator: b,
|
|
666
666
|
maxReplaces: v,
|
|
667
667
|
alwaysFormat: y
|
|
668
668
|
} = e.interpolation;
|
|
669
|
-
this.escape = t !== void 0 ? t :
|
|
669
|
+
this.escape = t !== void 0 ? t : Ue, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = n ? T(n) : a || "{{", this.suffix = r ? T(r) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = h ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = g ? T(g) : p || T("$t("), this.nestingSuffix = c ? T(c) : x || T(")"), this.nestingOptionsSeparator = b || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
|
|
670
670
|
}
|
|
671
671
|
reset() {
|
|
672
672
|
this.options && this.init(this.options);
|
|
673
673
|
}
|
|
674
674
|
resetRegExp() {
|
|
675
|
-
const e = (t,
|
|
675
|
+
const e = (t, i) => t?.source === i ? (t.lastIndex = 0, t) : new RegExp(i, "g");
|
|
676
676
|
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}`);
|
|
677
677
|
}
|
|
678
|
-
interpolate(e, t,
|
|
678
|
+
interpolate(e, t, i, s) {
|
|
679
679
|
let n, a, r;
|
|
680
680
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (p) => {
|
|
681
681
|
if (p.indexOf(this.formatSeparator) < 0) {
|
|
682
|
-
const v =
|
|
683
|
-
return this.alwaysFormat ? this.format(v, void 0,
|
|
684
|
-
...
|
|
682
|
+
const v = ce(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
683
|
+
return this.alwaysFormat ? this.format(v, void 0, i, {
|
|
684
|
+
...s,
|
|
685
685
|
...t,
|
|
686
686
|
interpolationkey: p
|
|
687
687
|
}) : v;
|
|
688
688
|
}
|
|
689
|
-
const
|
|
690
|
-
return this.format(
|
|
691
|
-
...
|
|
689
|
+
const c = p.split(this.formatSeparator), x = c.shift().trim(), b = c.join(this.formatSeparator).trim();
|
|
690
|
+
return this.format(ce(t, l, x, this.options.keySeparator, this.options.ignoreJSONStructure), b, i, {
|
|
691
|
+
...s,
|
|
692
692
|
...t,
|
|
693
693
|
interpolationkey: x
|
|
694
694
|
});
|
|
695
695
|
};
|
|
696
696
|
this.resetRegExp();
|
|
697
|
-
const h =
|
|
697
|
+
const h = s?.missingInterpolationHandler || this.options.missingInterpolationHandler, f = s?.interpolation?.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
698
698
|
return [{
|
|
699
699
|
regex: this.regexpUnescape,
|
|
700
|
-
safeValue: (p) =>
|
|
700
|
+
safeValue: (p) => W(p)
|
|
701
701
|
}, {
|
|
702
702
|
regex: this.regexp,
|
|
703
|
-
safeValue: (p) => this.escapeValue ?
|
|
703
|
+
safeValue: (p) => this.escapeValue ? W(this.escape(p)) : W(p)
|
|
704
704
|
}].forEach((p) => {
|
|
705
705
|
for (r = 0; n = p.regex.exec(e); ) {
|
|
706
|
-
const
|
|
707
|
-
if (a = u(
|
|
706
|
+
const c = n[1].trim();
|
|
707
|
+
if (a = u(c), a === void 0)
|
|
708
708
|
if (typeof h == "function") {
|
|
709
|
-
const b = h(e, n,
|
|
710
|
-
a =
|
|
711
|
-
} else if (
|
|
709
|
+
const b = h(e, n, s);
|
|
710
|
+
a = d(b) ? b : "";
|
|
711
|
+
} else if (s && Object.prototype.hasOwnProperty.call(s, c))
|
|
712
712
|
a = "";
|
|
713
713
|
else if (f) {
|
|
714
714
|
a = n[0];
|
|
715
715
|
continue;
|
|
716
716
|
} else
|
|
717
|
-
this.logger.warn(`missed to pass in variable ${
|
|
718
|
-
else !
|
|
717
|
+
this.logger.warn(`missed to pass in variable ${c} for interpolating ${e}`), a = "";
|
|
718
|
+
else !d(a) && !this.useRawValueToEscape && (a = se(a));
|
|
719
719
|
const x = p.safeValue(a);
|
|
720
720
|
if (e = e.replace(n[0], x), f ? (p.regex.lastIndex += a.length, p.regex.lastIndex -= n[0].length) : p.regex.lastIndex = 0, r++, r >= this.maxReplaces)
|
|
721
721
|
break;
|
|
722
722
|
}
|
|
723
723
|
}), e;
|
|
724
724
|
}
|
|
725
|
-
nest(e, t,
|
|
726
|
-
let
|
|
725
|
+
nest(e, t, i = {}) {
|
|
726
|
+
let s, n, a;
|
|
727
727
|
const r = (l, u) => {
|
|
728
728
|
const h = this.nestingOptionsSeparator;
|
|
729
729
|
if (l.indexOf(h) < 0) return l;
|
|
730
730
|
const f = l.split(new RegExp(`${h}[ ]*{`));
|
|
731
731
|
let g = `{${f[1]}`;
|
|
732
732
|
l = f[0], g = this.interpolate(g, a);
|
|
733
|
-
const p = g.match(/'/g),
|
|
734
|
-
((p?.length ?? 0) % 2 === 0 && !
|
|
733
|
+
const p = g.match(/'/g), c = g.match(/"/g);
|
|
734
|
+
((p?.length ?? 0) % 2 === 0 && !c || c.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
|
|
735
735
|
try {
|
|
736
736
|
a = JSON.parse(g), u && (a = {
|
|
737
737
|
...u,
|
|
@@ -742,29 +742,29 @@ class Ge {
|
|
|
742
742
|
}
|
|
743
743
|
return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, l;
|
|
744
744
|
};
|
|
745
|
-
for (;
|
|
745
|
+
for (; s = this.nestingRegexp.exec(e); ) {
|
|
746
746
|
let l = [];
|
|
747
747
|
a = {
|
|
748
|
-
...
|
|
749
|
-
}, a = a.replace && !
|
|
750
|
-
const u = /{.*}/.test(
|
|
751
|
-
if (u !== -1 && (l =
|
|
752
|
-
|
|
753
|
-
...
|
|
754
|
-
interpolationkey:
|
|
755
|
-
}), n.trim())), e = e.replace(
|
|
748
|
+
...i
|
|
749
|
+
}, a = a.replace && !d(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
750
|
+
const u = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator);
|
|
751
|
+
if (u !== -1 && (l = s[1].slice(u).split(this.formatSeparator).map((h) => h.trim()).filter(Boolean), s[1] = s[1].slice(0, u)), n = t(r.call(this, s[1].trim(), a), a), n && s[0] === e && !d(n)) return n;
|
|
752
|
+
d(n) || (n = se(n)), n || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), n = ""), l.length && (n = l.reduce((h, f) => this.format(h, f, i.lng, {
|
|
753
|
+
...i,
|
|
754
|
+
interpolationkey: s[1].trim()
|
|
755
|
+
}), n.trim())), e = e.replace(s[0], n), this.regexp.lastIndex = 0;
|
|
756
756
|
}
|
|
757
757
|
return e;
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
const
|
|
760
|
+
const Qe = (o) => {
|
|
761
761
|
let e = o.toLowerCase().trim();
|
|
762
762
|
const t = {};
|
|
763
763
|
if (o.indexOf("(") > -1) {
|
|
764
|
-
const
|
|
765
|
-
e =
|
|
766
|
-
const
|
|
767
|
-
e === "currency" &&
|
|
764
|
+
const i = o.split("(");
|
|
765
|
+
e = i[0].toLowerCase().trim();
|
|
766
|
+
const s = i[1].substring(0, i[1].length - 1);
|
|
767
|
+
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((a) => {
|
|
768
768
|
if (a) {
|
|
769
769
|
const [r, ...l] = a.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), h = r.trim();
|
|
770
770
|
t[h] || (t[h] = u), u === "false" && (t[h] = !1), u === "true" && (t[h] = !0), isNaN(u) || (t[h] = parseInt(u, 10));
|
|
@@ -775,56 +775,56 @@ const Ze = (o) => {
|
|
|
775
775
|
formatName: e,
|
|
776
776
|
formatOptions: t
|
|
777
777
|
};
|
|
778
|
-
},
|
|
778
|
+
}, de = (o) => {
|
|
779
779
|
const e = {};
|
|
780
|
-
return (t,
|
|
781
|
-
let n =
|
|
782
|
-
|
|
780
|
+
return (t, i, s) => {
|
|
781
|
+
let n = s;
|
|
782
|
+
s && s.interpolationkey && s.formatParams && s.formatParams[s.interpolationkey] && s[s.interpolationkey] && (n = {
|
|
783
783
|
...n,
|
|
784
|
-
[
|
|
784
|
+
[s.interpolationkey]: void 0
|
|
785
785
|
});
|
|
786
|
-
const a =
|
|
786
|
+
const a = i + JSON.stringify(n);
|
|
787
787
|
let r = e[a];
|
|
788
|
-
return r || (r = o(
|
|
788
|
+
return r || (r = o(M(i), s), e[a] = r), r(t);
|
|
789
789
|
};
|
|
790
|
-
},
|
|
791
|
-
class
|
|
790
|
+
}, Ge = (o) => (e, t, i) => o(M(t), i)(e);
|
|
791
|
+
class Ze {
|
|
792
792
|
constructor(e = {}) {
|
|
793
|
-
this.logger =
|
|
793
|
+
this.logger = $.create("formatter"), this.options = e, this.init(e);
|
|
794
794
|
}
|
|
795
795
|
init(e, t = {
|
|
796
796
|
interpolation: {}
|
|
797
797
|
}) {
|
|
798
798
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
799
|
-
const
|
|
799
|
+
const i = t.cacheInBuiltFormats ? de : Ge;
|
|
800
800
|
this.formats = {
|
|
801
|
-
number:
|
|
802
|
-
const a = new Intl.NumberFormat(
|
|
801
|
+
number: i((s, n) => {
|
|
802
|
+
const a = new Intl.NumberFormat(s, {
|
|
803
803
|
...n
|
|
804
804
|
});
|
|
805
805
|
return (r) => a.format(r);
|
|
806
806
|
}),
|
|
807
|
-
currency:
|
|
808
|
-
const a = new Intl.NumberFormat(
|
|
807
|
+
currency: i((s, n) => {
|
|
808
|
+
const a = new Intl.NumberFormat(s, {
|
|
809
809
|
...n,
|
|
810
810
|
style: "currency"
|
|
811
811
|
});
|
|
812
812
|
return (r) => a.format(r);
|
|
813
813
|
}),
|
|
814
|
-
datetime:
|
|
815
|
-
const a = new Intl.DateTimeFormat(
|
|
814
|
+
datetime: i((s, n) => {
|
|
815
|
+
const a = new Intl.DateTimeFormat(s, {
|
|
816
816
|
...n
|
|
817
817
|
});
|
|
818
818
|
return (r) => a.format(r);
|
|
819
819
|
}),
|
|
820
|
-
relativetime:
|
|
821
|
-
const a = new Intl.RelativeTimeFormat(
|
|
820
|
+
relativetime: i((s, n) => {
|
|
821
|
+
const a = new Intl.RelativeTimeFormat(s, {
|
|
822
822
|
...n
|
|
823
823
|
});
|
|
824
824
|
return (r) => a.format(r, n.range || "day");
|
|
825
825
|
}),
|
|
826
|
-
list:
|
|
827
|
-
const a = new Intl.ListFormat(
|
|
826
|
+
list: i((s, n) => {
|
|
827
|
+
const a = new Intl.ListFormat(s, {
|
|
828
828
|
...n
|
|
829
829
|
});
|
|
830
830
|
return (r) => a.format(r);
|
|
@@ -835,9 +835,9 @@ class Xe {
|
|
|
835
835
|
this.formats[e.toLowerCase().trim()] = t;
|
|
836
836
|
}
|
|
837
837
|
addCached(e, t) {
|
|
838
|
-
this.formats[e.toLowerCase().trim()] =
|
|
838
|
+
this.formats[e.toLowerCase().trim()] = de(t);
|
|
839
839
|
}
|
|
840
|
-
format(e, t,
|
|
840
|
+
format(e, t, i, s = {}) {
|
|
841
841
|
const n = t.split(this.formatSeparator);
|
|
842
842
|
if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((r) => r.indexOf(")") > -1)) {
|
|
843
843
|
const r = n.findIndex((l) => l.indexOf(")") > -1);
|
|
@@ -847,14 +847,14 @@ class Xe {
|
|
|
847
847
|
const {
|
|
848
848
|
formatName: u,
|
|
849
849
|
formatOptions: h
|
|
850
|
-
} =
|
|
850
|
+
} = Qe(l);
|
|
851
851
|
if (this.formats[u]) {
|
|
852
852
|
let f = r;
|
|
853
853
|
try {
|
|
854
|
-
const g =
|
|
854
|
+
const g = s?.formatParams?.[s.interpolationkey] || {}, p = g.locale || g.lng || s.locale || s.lng || i;
|
|
855
855
|
f = this.formats[u](r, p, {
|
|
856
856
|
...h,
|
|
857
|
-
...
|
|
857
|
+
...s,
|
|
858
858
|
...g
|
|
859
859
|
});
|
|
860
860
|
} catch (g) {
|
|
@@ -867,27 +867,27 @@ class Xe {
|
|
|
867
867
|
}, e);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
const
|
|
870
|
+
const qe = (o, e) => {
|
|
871
871
|
o.pending[e] !== void 0 && (delete o.pending[e], o.pendingCount--);
|
|
872
872
|
};
|
|
873
|
-
class
|
|
874
|
-
constructor(e, t,
|
|
875
|
-
super(), this.backend = e, this.store = t, this.services =
|
|
873
|
+
class Xe extends Y {
|
|
874
|
+
constructor(e, t, i, s = {}) {
|
|
875
|
+
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger = $.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(i, s.backend, s);
|
|
876
876
|
}
|
|
877
|
-
queueLoad(e, t,
|
|
877
|
+
queueLoad(e, t, i, s) {
|
|
878
878
|
const n = {}, a = {}, r = {}, l = {};
|
|
879
879
|
return e.forEach((u) => {
|
|
880
880
|
let h = !0;
|
|
881
881
|
t.forEach((f) => {
|
|
882
882
|
const g = `${u}|${f}`;
|
|
883
|
-
!
|
|
883
|
+
!i.reload && this.store.hasResourceBundle(u, f) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? a[g] === void 0 && (a[g] = !0) : (this.state[g] = 1, h = !1, a[g] === void 0 && (a[g] = !0), n[g] === void 0 && (n[g] = !0), l[f] === void 0 && (l[f] = !0)));
|
|
884
884
|
}), h || (r[u] = !0);
|
|
885
885
|
}), (Object.keys(n).length || Object.keys(a).length) && this.queue.push({
|
|
886
886
|
pending: a,
|
|
887
887
|
pendingCount: Object.keys(a).length,
|
|
888
888
|
loaded: {},
|
|
889
889
|
errors: [],
|
|
890
|
-
callback:
|
|
890
|
+
callback: s
|
|
891
891
|
}), {
|
|
892
892
|
toLoad: Object.keys(n),
|
|
893
893
|
pending: Object.keys(a),
|
|
@@ -895,14 +895,14 @@ class tt extends G {
|
|
|
895
895
|
toLoadNamespaces: Object.keys(l)
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
loaded(e, t,
|
|
899
|
-
const
|
|
900
|
-
t && this.emit("failedLoading", n, a, t), !t &&
|
|
898
|
+
loaded(e, t, i) {
|
|
899
|
+
const s = e.split("|"), n = s[0], a = s[1];
|
|
900
|
+
t && this.emit("failedLoading", n, a, t), !t && i && this.store.addResourceBundle(n, a, i, void 0, void 0, {
|
|
901
901
|
skipCopy: !0
|
|
902
|
-
}), this.state[e] = t ? -1 : 2, t &&
|
|
902
|
+
}), this.state[e] = t ? -1 : 2, t && i && (this.state[e] = 0);
|
|
903
903
|
const r = {};
|
|
904
904
|
this.queue.forEach((l) => {
|
|
905
|
-
|
|
905
|
+
Ke(l.loaded, [n], a), qe(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
|
|
906
906
|
r[u] || (r[u] = {});
|
|
907
907
|
const h = l.loaded[u];
|
|
908
908
|
h.length && h.forEach((f) => {
|
|
@@ -911,14 +911,14 @@ class tt extends G {
|
|
|
911
911
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
912
912
|
}), this.emit("loaded", r), this.queue = this.queue.filter((l) => !l.done);
|
|
913
913
|
}
|
|
914
|
-
read(e, t,
|
|
914
|
+
read(e, t, i, s = 0, n = this.retryTimeout, a) {
|
|
915
915
|
if (!e.length) return a(null, {});
|
|
916
916
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
917
917
|
this.waitingReads.push({
|
|
918
918
|
lng: e,
|
|
919
919
|
ns: t,
|
|
920
|
-
fcName:
|
|
921
|
-
tried:
|
|
920
|
+
fcName: i,
|
|
921
|
+
tried: s,
|
|
922
922
|
wait: n,
|
|
923
923
|
callback: a
|
|
924
924
|
});
|
|
@@ -930,14 +930,14 @@ class tt extends G {
|
|
|
930
930
|
const f = this.waitingReads.shift();
|
|
931
931
|
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
932
932
|
}
|
|
933
|
-
if (u && h &&
|
|
933
|
+
if (u && h && s < this.maxRetries) {
|
|
934
934
|
setTimeout(() => {
|
|
935
|
-
this.read.call(this, e, t,
|
|
935
|
+
this.read.call(this, e, t, i, s + 1, n * 2, a);
|
|
936
936
|
}, n);
|
|
937
937
|
return;
|
|
938
938
|
}
|
|
939
939
|
a(u, h);
|
|
940
|
-
}, l = this.backend[
|
|
940
|
+
}, l = this.backend[i].bind(this.backend);
|
|
941
941
|
if (l.length === 2) {
|
|
942
942
|
try {
|
|
943
943
|
const u = l(e, t);
|
|
@@ -949,38 +949,38 @@ class tt extends G {
|
|
|
949
949
|
}
|
|
950
950
|
return l(e, t, r);
|
|
951
951
|
}
|
|
952
|
-
prepareLoading(e, t,
|
|
952
|
+
prepareLoading(e, t, i = {}, s) {
|
|
953
953
|
if (!this.backend)
|
|
954
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
|
|
955
|
-
|
|
956
|
-
const n = this.queueLoad(e, t,
|
|
954
|
+
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
955
|
+
d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
|
|
956
|
+
const n = this.queueLoad(e, t, i, s);
|
|
957
957
|
if (!n.toLoad.length)
|
|
958
|
-
return n.pending.length ||
|
|
958
|
+
return n.pending.length || s(), null;
|
|
959
959
|
n.toLoad.forEach((a) => {
|
|
960
960
|
this.loadOne(a);
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
|
-
load(e, t,
|
|
964
|
-
this.prepareLoading(e, t, {},
|
|
963
|
+
load(e, t, i) {
|
|
964
|
+
this.prepareLoading(e, t, {}, i);
|
|
965
965
|
}
|
|
966
|
-
reload(e, t,
|
|
966
|
+
reload(e, t, i) {
|
|
967
967
|
this.prepareLoading(e, t, {
|
|
968
968
|
reload: !0
|
|
969
|
-
},
|
|
969
|
+
}, i);
|
|
970
970
|
}
|
|
971
971
|
loadOne(e, t = "") {
|
|
972
|
-
const
|
|
973
|
-
this.read(
|
|
974
|
-
a && this.logger.warn(`${t}loading namespace ${n} for language ${
|
|
972
|
+
const i = e.split("|"), s = i[0], n = i[1];
|
|
973
|
+
this.read(s, n, "read", void 0, void 0, (a, r) => {
|
|
974
|
+
a && this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`, a), !a && r && this.logger.log(`${t}loaded namespace ${n} for language ${s}`, r), this.loaded(e, a, r);
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
|
-
saveMissing(e, t,
|
|
977
|
+
saveMissing(e, t, i, s, n, a = {}, r = () => {
|
|
978
978
|
}) {
|
|
979
979
|
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
|
|
980
|
-
this.logger.warn(`did not save key "${
|
|
980
|
+
this.logger.warn(`did not save key "${i}" as the namespace "${t}" 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!!!");
|
|
981
981
|
return;
|
|
982
982
|
}
|
|
983
|
-
if (!(
|
|
983
|
+
if (!(i == null || i === "")) {
|
|
984
984
|
if (this.backend?.create) {
|
|
985
985
|
const l = {
|
|
986
986
|
...a,
|
|
@@ -989,18 +989,18 @@ class tt extends G {
|
|
|
989
989
|
if (u.length < 6)
|
|
990
990
|
try {
|
|
991
991
|
let h;
|
|
992
|
-
u.length === 5 ? h = u(e, t,
|
|
992
|
+
u.length === 5 ? h = u(e, t, i, s, l) : h = u(e, t, i, s), h && typeof h.then == "function" ? h.then((f) => r(null, f)).catch(r) : r(null, h);
|
|
993
993
|
} catch (h) {
|
|
994
994
|
r(h);
|
|
995
995
|
}
|
|
996
996
|
else
|
|
997
|
-
u(e, t,
|
|
997
|
+
u(e, t, i, s, r, l);
|
|
998
998
|
}
|
|
999
|
-
!e || !e[0] || this.store.addResource(e[0], t,
|
|
999
|
+
!e || !e[0] || this.store.addResource(e[0], t, i, s);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1003
|
+
const pe = () => ({
|
|
1004
1004
|
debug: !1,
|
|
1005
1005
|
initAsync: !0,
|
|
1006
1006
|
ns: ["translation"],
|
|
@@ -1035,10 +1035,10 @@ const be = () => ({
|
|
|
1035
1035
|
appendNamespaceToCIMode: !1,
|
|
1036
1036
|
overloadTranslationOptionHandler: (o) => {
|
|
1037
1037
|
let e = {};
|
|
1038
|
-
if (typeof o[1] == "object" && (e = o[1]),
|
|
1038
|
+
if (typeof o[1] == "object" && (e = o[1]), d(o[1]) && (e.defaultValue = o[1]), d(o[2]) && (e.tDescription = o[2]), typeof o[2] == "object" || typeof o[3] == "object") {
|
|
1039
1039
|
const t = o[3] || o[2];
|
|
1040
|
-
Object.keys(t).forEach((
|
|
1041
|
-
e[
|
|
1040
|
+
Object.keys(t).forEach((i) => {
|
|
1041
|
+
e[i] = t[i];
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
return e;
|
|
@@ -1057,17 +1057,17 @@ const be = () => ({
|
|
|
1057
1057
|
skipOnVariables: !0
|
|
1058
1058
|
},
|
|
1059
1059
|
cacheInBuiltFormats: !0
|
|
1060
|
-
}),
|
|
1061
|
-
},
|
|
1060
|
+
}), ge = (o) => (d(o.ns) && (o.ns = [o.ns]), d(o.fallbackLng) && (o.fallbackLng = [o.fallbackLng]), d(o.fallbackNS) && (o.fallbackNS = [o.fallbackNS]), o.supportedLngs?.indexOf?.("cimode") < 0 && (o.supportedLngs = o.supportedLngs.concat(["cimode"])), typeof o.initImmediate == "boolean" && (o.initAsync = o.initImmediate), o), B = () => {
|
|
1061
|
+
}, et = (o) => {
|
|
1062
1062
|
Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((t) => {
|
|
1063
1063
|
typeof o[t] == "function" && (o[t] = o[t].bind(o));
|
|
1064
1064
|
});
|
|
1065
1065
|
};
|
|
1066
|
-
class U extends
|
|
1066
|
+
class U extends Y {
|
|
1067
1067
|
constructor(e = {}, t) {
|
|
1068
|
-
if (super(), this.options =
|
|
1068
|
+
if (super(), this.options = ge(e), this.services = {}, this.logger = $, this.modules = {
|
|
1069
1069
|
external: []
|
|
1070
|
-
},
|
|
1070
|
+
}, et(this), t && !this.isInitialized && !e.isClone) {
|
|
1071
1071
|
if (!this.options.initAsync)
|
|
1072
1072
|
return this.init(e, t), this;
|
|
1073
1073
|
setTimeout(() => {
|
|
@@ -1076,38 +1076,38 @@ class U extends G {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
init(e = {}, t) {
|
|
1079
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
1080
|
-
const
|
|
1079
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (d(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1080
|
+
const i = pe();
|
|
1081
1081
|
this.options = {
|
|
1082
|
-
...
|
|
1082
|
+
...i,
|
|
1083
1083
|
...this.options,
|
|
1084
|
-
...
|
|
1084
|
+
...ge(e)
|
|
1085
1085
|
}, this.options.interpolation = {
|
|
1086
|
-
...
|
|
1086
|
+
...i.interpolation,
|
|
1087
1087
|
...this.options.interpolation
|
|
1088
1088
|
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator);
|
|
1089
|
-
const
|
|
1089
|
+
const s = (u) => u ? typeof u == "function" ? new u() : u : null;
|
|
1090
1090
|
if (!this.options.isClone) {
|
|
1091
|
-
this.modules.logger ?
|
|
1091
|
+
this.modules.logger ? $.init(s(this.modules.logger), this.options) : $.init(null, this.options);
|
|
1092
1092
|
let u;
|
|
1093
|
-
this.modules.formatter ? u = this.modules.formatter : u =
|
|
1094
|
-
const h = new
|
|
1095
|
-
this.store = new
|
|
1093
|
+
this.modules.formatter ? u = this.modules.formatter : u = Ze;
|
|
1094
|
+
const h = new ue(this.options);
|
|
1095
|
+
this.store = new ae(this.options.resources, this.options);
|
|
1096
1096
|
const f = this.services;
|
|
1097
|
-
f.logger =
|
|
1097
|
+
f.logger = $, f.resourceStore = this.store, f.languageUtils = h, f.pluralResolver = new Ye(h, {
|
|
1098
1098
|
prepend: this.options.pluralSeparator,
|
|
1099
1099
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1100
|
-
}), this.options.interpolation.format && this.options.interpolation.format !==
|
|
1100
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== i.interpolation.format && this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), u && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (f.formatter = s(u), f.formatter.init && f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new We(this.options), f.utils = {
|
|
1101
1101
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1102
|
-
}, f.backendConnector = new
|
|
1103
|
-
this.emit(p, ...
|
|
1104
|
-
}), this.modules.languageDetector && (f.languageDetector =
|
|
1105
|
-
this.emit(p, ...
|
|
1102
|
+
}, f.backendConnector = new Xe(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (p, ...c) => {
|
|
1103
|
+
this.emit(p, ...c);
|
|
1104
|
+
}), this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new _(this.services, this.options), this.translator.on("*", (p, ...c) => {
|
|
1105
|
+
this.emit(p, ...c);
|
|
1106
1106
|
}), this.modules.external.forEach((p) => {
|
|
1107
1107
|
p.init && p.init(this);
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
|
-
if (this.format = this.options.interpolation.format, t || (t =
|
|
1110
|
+
if (this.format = this.options.interpolation.format, t || (t = B), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1111
1111
|
const u = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1112
1112
|
u.length > 0 && u[0] !== "dev" && (this.options.lng = u[0]);
|
|
1113
1113
|
}
|
|
@@ -1116,7 +1116,7 @@ class U extends G {
|
|
|
1116
1116
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((u) => {
|
|
1117
1117
|
this[u] = (...h) => (this.store[u](...h), this);
|
|
1118
1118
|
});
|
|
1119
|
-
const r =
|
|
1119
|
+
const r = K(), l = () => {
|
|
1120
1120
|
const u = (h, f) => {
|
|
1121
1121
|
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), r.resolve(f), t(h, f);
|
|
1122
1122
|
};
|
|
@@ -1125,40 +1125,40 @@ class U extends G {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), r;
|
|
1127
1127
|
}
|
|
1128
|
-
loadResources(e, t =
|
|
1129
|
-
let
|
|
1130
|
-
const
|
|
1131
|
-
if (typeof e == "function" && (
|
|
1132
|
-
if (
|
|
1128
|
+
loadResources(e, t = B) {
|
|
1129
|
+
let i = t;
|
|
1130
|
+
const s = d(e) ? e : this.language;
|
|
1131
|
+
if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1132
|
+
if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
|
|
1133
1133
|
const n = [], a = (r) => {
|
|
1134
1134
|
if (!r || r === "cimode") return;
|
|
1135
1135
|
this.services.languageUtils.toResolveHierarchy(r).forEach((u) => {
|
|
1136
1136
|
u !== "cimode" && n.indexOf(u) < 0 && n.push(u);
|
|
1137
1137
|
});
|
|
1138
1138
|
};
|
|
1139
|
-
|
|
1140
|
-
!r && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
|
|
1139
|
+
s ? a(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => a(l)), this.options.preload?.forEach?.((r) => a(r)), this.services.backendConnector.load(n, this.options.ns, (r) => {
|
|
1140
|
+
!r && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(r);
|
|
1141
1141
|
});
|
|
1142
1142
|
} else
|
|
1143
|
-
|
|
1143
|
+
i(null);
|
|
1144
1144
|
}
|
|
1145
|
-
reloadResources(e, t,
|
|
1146
|
-
const
|
|
1147
|
-
return typeof e == "function" && (
|
|
1148
|
-
|
|
1149
|
-
}),
|
|
1145
|
+
reloadResources(e, t, i) {
|
|
1146
|
+
const s = K();
|
|
1147
|
+
return typeof e == "function" && (i = e, e = void 0), typeof t == "function" && (i = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), i || (i = B), this.services.backendConnector.reload(e, t, (n) => {
|
|
1148
|
+
s.resolve(), i(n);
|
|
1149
|
+
}), s;
|
|
1150
1150
|
}
|
|
1151
1151
|
use(e) {
|
|
1152
1152
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1153
1153
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1154
|
-
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" &&
|
|
1154
|
+
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" && be.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1155
1155
|
}
|
|
1156
1156
|
setResolvedLanguage(e) {
|
|
1157
1157
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
1158
1158
|
for (let t = 0; t < this.languages.length; t++) {
|
|
1159
|
-
const
|
|
1160
|
-
if (!(["cimode", "dev"].indexOf(
|
|
1161
|
-
this.resolvedLanguage =
|
|
1159
|
+
const i = this.languages[t];
|
|
1160
|
+
if (!(["cimode", "dev"].indexOf(i) > -1) && this.store.hasLanguageSomeTranslations(i)) {
|
|
1161
|
+
this.resolvedLanguage = i;
|
|
1162
1162
|
break;
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
@@ -1167,32 +1167,32 @@ class U extends G {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
changeLanguage(e, t) {
|
|
1169
1169
|
this.isLanguageChangingTo = e;
|
|
1170
|
-
const
|
|
1170
|
+
const i = K();
|
|
1171
1171
|
this.emit("languageChanging", e);
|
|
1172
|
-
const
|
|
1172
|
+
const s = (r) => {
|
|
1173
1173
|
this.language = r, this.languages = this.services.languageUtils.toResolveHierarchy(r), this.resolvedLanguage = void 0, this.setResolvedLanguage(r);
|
|
1174
1174
|
}, n = (r, l) => {
|
|
1175
|
-
l ? this.isLanguageChangingTo === e && (
|
|
1175
|
+
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, i.resolve((...u) => this.t(...u)), t && t(r, (...u) => this.t(...u));
|
|
1176
1176
|
}, a = (r) => {
|
|
1177
1177
|
!e && !r && this.services.languageDetector && (r = []);
|
|
1178
|
-
const l =
|
|
1179
|
-
u && (this.language ||
|
|
1178
|
+
const l = d(r) ? r : r && r[0], u = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(d(r) ? [r] : r);
|
|
1179
|
+
u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector?.cacheUserLanguage?.(u)), this.loadResources(u, (h) => {
|
|
1180
1180
|
n(h, u);
|
|
1181
1181
|
});
|
|
1182
1182
|
};
|
|
1183
|
-
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),
|
|
1183
|
+
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), i;
|
|
1184
1184
|
}
|
|
1185
|
-
getFixedT(e, t,
|
|
1186
|
-
const
|
|
1185
|
+
getFixedT(e, t, i) {
|
|
1186
|
+
const s = (n, a, ...r) => {
|
|
1187
1187
|
let l;
|
|
1188
1188
|
typeof a != "object" ? l = this.options.overloadTranslationOptionHandler([n, a].concat(r)) : l = {
|
|
1189
1189
|
...a
|
|
1190
|
-
}, l.lng = l.lng ||
|
|
1190
|
+
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || i || s.keyPrefix);
|
|
1191
1191
|
const u = this.options.keySeparator || ".";
|
|
1192
1192
|
let h;
|
|
1193
1193
|
return l.keyPrefix && Array.isArray(n) ? h = n.map((f) => `${l.keyPrefix}${u}${f}`) : h = l.keyPrefix ? `${l.keyPrefix}${u}${n}` : n, this.t(h, l);
|
|
1194
1194
|
};
|
|
1195
|
-
return
|
|
1195
|
+
return d(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = i, s;
|
|
1196
1196
|
}
|
|
1197
1197
|
t(...e) {
|
|
1198
1198
|
return this.translator?.translate(...e);
|
|
@@ -1208,8 +1208,8 @@ class U extends G {
|
|
|
1208
1208
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1209
1209
|
if (!this.languages || !this.languages.length)
|
|
1210
1210
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1211
|
-
const
|
|
1212
|
-
if (
|
|
1211
|
+
const i = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
|
|
1212
|
+
if (i.toLowerCase() === "cimode") return !0;
|
|
1213
1213
|
const a = (r, l) => {
|
|
1214
1214
|
const u = this.services.backendConnector.state[`${r}|${l}`];
|
|
1215
1215
|
return u === -1 || u === 0 || u === 2;
|
|
@@ -1218,65 +1218,65 @@ class U extends G {
|
|
|
1218
1218
|
const r = t.precheck(this, a);
|
|
1219
1219
|
if (r !== void 0) return r;
|
|
1220
1220
|
}
|
|
1221
|
-
return !!(this.hasResourceBundle(
|
|
1221
|
+
return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(i, e) && (!s || a(n, e)));
|
|
1222
1222
|
}
|
|
1223
1223
|
loadNamespaces(e, t) {
|
|
1224
|
-
const
|
|
1225
|
-
return this.options.ns ? (
|
|
1226
|
-
this.options.ns.indexOf(
|
|
1227
|
-
}), this.loadResources((
|
|
1228
|
-
|
|
1229
|
-
}),
|
|
1224
|
+
const i = K();
|
|
1225
|
+
return this.options.ns ? (d(e) && (e = [e]), e.forEach((s) => {
|
|
1226
|
+
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
1227
|
+
}), this.loadResources((s) => {
|
|
1228
|
+
i.resolve(), t && t(s);
|
|
1229
|
+
}), i) : (t && t(), Promise.resolve());
|
|
1230
1230
|
}
|
|
1231
1231
|
loadLanguages(e, t) {
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
return n.length ? (this.options.preload =
|
|
1236
|
-
|
|
1237
|
-
}),
|
|
1232
|
+
const i = K();
|
|
1233
|
+
d(e) && (e = [e]);
|
|
1234
|
+
const s = this.options.preload || [], n = e.filter((a) => s.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
|
|
1235
|
+
return n.length ? (this.options.preload = s.concat(n), this.loadResources((a) => {
|
|
1236
|
+
i.resolve(), t && t(a);
|
|
1237
|
+
}), i) : (t && t(), Promise.resolve());
|
|
1238
1238
|
}
|
|
1239
1239
|
dir(e) {
|
|
1240
1240
|
if (e || (e = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
1241
1241
|
try {
|
|
1242
|
-
const
|
|
1243
|
-
if (
|
|
1244
|
-
const n =
|
|
1242
|
+
const s = new Intl.Locale(e);
|
|
1243
|
+
if (s && s.getTextInfo) {
|
|
1244
|
+
const n = s.getTextInfo();
|
|
1245
1245
|
if (n && n.direction) return n.direction;
|
|
1246
1246
|
}
|
|
1247
1247
|
} catch {
|
|
1248
1248
|
}
|
|
1249
|
-
const t = ["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"],
|
|
1250
|
-
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(
|
|
1249
|
+
const t = ["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"], i = this.services?.languageUtils || new ue(pe());
|
|
1250
|
+
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1251
1251
|
}
|
|
1252
1252
|
static createInstance(e = {}, t) {
|
|
1253
1253
|
return new U(e, t);
|
|
1254
1254
|
}
|
|
1255
|
-
cloneInstance(e = {}, t =
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1255
|
+
cloneInstance(e = {}, t = B) {
|
|
1256
|
+
const i = e.forkResourceStore;
|
|
1257
|
+
i && delete e.forkResourceStore;
|
|
1258
|
+
const s = {
|
|
1259
1259
|
...this.options,
|
|
1260
1260
|
...e,
|
|
1261
1261
|
isClone: !0
|
|
1262
|
-
}, n = new U(
|
|
1262
|
+
}, n = new U(s);
|
|
1263
1263
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((r) => {
|
|
1264
1264
|
n[r] = this[r];
|
|
1265
1265
|
}), n.services = {
|
|
1266
1266
|
...this.services
|
|
1267
1267
|
}, n.services.utils = {
|
|
1268
1268
|
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1269
|
-
},
|
|
1269
|
+
}, i) {
|
|
1270
1270
|
const r = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
|
|
1271
1271
|
...this.store.data[u]
|
|
1272
1272
|
}, l[u] = Object.keys(l[u]).reduce((h, f) => (h[f] = {
|
|
1273
1273
|
...l[u][f]
|
|
1274
1274
|
}, h), l[u]), l), {});
|
|
1275
|
-
n.store = new
|
|
1275
|
+
n.store = new ae(r, s), n.services.resourceStore = n.store;
|
|
1276
1276
|
}
|
|
1277
|
-
return n.translator = new
|
|
1277
|
+
return n.translator = new _(n.services, s), n.translator.on("*", (r, ...l) => {
|
|
1278
1278
|
n.emit(r, ...l);
|
|
1279
|
-
}), n.init(
|
|
1279
|
+
}), n.init(s, t), n.translator.options = s, n.translator.backendConnector.services.utils = {
|
|
1280
1280
|
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1281
1281
|
}, n;
|
|
1282
1282
|
}
|
|
@@ -1306,14 +1306,14 @@ m.setDefaultNamespace;
|
|
|
1306
1306
|
m.hasLoadedNamespace;
|
|
1307
1307
|
m.loadNamespaces;
|
|
1308
1308
|
m.loadLanguages;
|
|
1309
|
-
var
|
|
1310
|
-
function
|
|
1309
|
+
var Se = Symbol();
|
|
1310
|
+
function dt(o, {
|
|
1311
1311
|
i18next: e,
|
|
1312
1312
|
rerenderOn: t = ["languageChanged", "loaded", "added", "removed"],
|
|
1313
|
-
slotStart:
|
|
1314
|
-
slotEnd:
|
|
1313
|
+
slotStart: i = "{",
|
|
1314
|
+
slotEnd: s = "}"
|
|
1315
1315
|
}) {
|
|
1316
|
-
const n =
|
|
1316
|
+
const n = Oe(/* @__PURE__ */ new Date()), a = () => Le(() => {
|
|
1317
1317
|
n.value = /* @__PURE__ */ new Date();
|
|
1318
1318
|
}), r = () => n.value;
|
|
1319
1319
|
t.forEach((h) => {
|
|
@@ -1327,9 +1327,9 @@ function $t(o, {
|
|
|
1327
1327
|
e.on(h, a);
|
|
1328
1328
|
break;
|
|
1329
1329
|
}
|
|
1330
|
-
}), o.component("i18next",
|
|
1330
|
+
}), o.component("i18next", it);
|
|
1331
1331
|
const l = () => e.isInitialized;
|
|
1332
|
-
o.config.globalProperties.$t =
|
|
1332
|
+
o.config.globalProperties.$t = me(
|
|
1333
1333
|
e.t.bind(e),
|
|
1334
1334
|
r,
|
|
1335
1335
|
l
|
|
@@ -1339,34 +1339,34 @@ function $t(o, {
|
|
|
1339
1339
|
return r(), Reflect.get(h, f);
|
|
1340
1340
|
}
|
|
1341
1341
|
});
|
|
1342
|
-
o.config.globalProperties.$i18next = u, o.provide(
|
|
1342
|
+
o.config.globalProperties.$i18next = u, o.provide(Se, {
|
|
1343
1343
|
i18next: u,
|
|
1344
|
-
slotPattern:
|
|
1344
|
+
slotPattern: st(i, s),
|
|
1345
1345
|
withAccessRecording(h, f) {
|
|
1346
|
-
return
|
|
1346
|
+
return me(h, r, f);
|
|
1347
1347
|
}
|
|
1348
1348
|
});
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function me(o, e, t) {
|
|
1351
1351
|
return new Proxy(o, {
|
|
1352
|
-
apply: function(
|
|
1353
|
-
return e(), t() ? Reflect.apply(
|
|
1352
|
+
apply: function(i, s, n) {
|
|
1353
|
+
return e(), t() ? Reflect.apply(i, s, n) : "";
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
const o =
|
|
1357
|
+
function tt() {
|
|
1358
|
+
const o = Ce(Se);
|
|
1359
1359
|
if (!o)
|
|
1360
1360
|
throw new Error(
|
|
1361
1361
|
"i18next-vue: Make sure to register the i18next-vue plugin using app.use(...)."
|
|
1362
1362
|
);
|
|
1363
1363
|
return o;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function st(o, e) {
|
|
1366
1366
|
const t = `${o}\\s*([a-z0-9\\-]+)\\s*${e}`;
|
|
1367
1367
|
return new RegExp(t, "gi");
|
|
1368
1368
|
}
|
|
1369
|
-
var
|
|
1369
|
+
var it = xe({
|
|
1370
1370
|
props: {
|
|
1371
1371
|
translation: {
|
|
1372
1372
|
type: String,
|
|
@@ -1374,33 +1374,33 @@ var rt = ee({
|
|
|
1374
1374
|
}
|
|
1375
1375
|
},
|
|
1376
1376
|
setup(o, { slots: e }) {
|
|
1377
|
-
const { slotPattern: t } =
|
|
1377
|
+
const { slotPattern: t } = tt();
|
|
1378
1378
|
return () => {
|
|
1379
|
-
const
|
|
1379
|
+
const i = o.translation, s = [];
|
|
1380
1380
|
let n, a = 0;
|
|
1381
|
-
for (; (n = t.exec(
|
|
1382
|
-
|
|
1381
|
+
for (; (n = t.exec(i)) !== null; ) {
|
|
1382
|
+
s.push(i.substring(a, n.index));
|
|
1383
1383
|
const r = e[n[1]];
|
|
1384
|
-
r ?
|
|
1384
|
+
r ? s.push(...r()) : s.push(n[0]), a = t.lastIndex;
|
|
1385
1385
|
}
|
|
1386
|
-
return
|
|
1386
|
+
return s.push(i.substring(a)), s;
|
|
1387
1387
|
};
|
|
1388
1388
|
}
|
|
1389
1389
|
});
|
|
1390
|
-
const
|
|
1391
|
-
async function
|
|
1390
|
+
const nt = "translation";
|
|
1391
|
+
async function pt(o) {
|
|
1392
1392
|
for (const [e, t] of Object.entries(o)) {
|
|
1393
|
-
const
|
|
1394
|
-
await
|
|
1393
|
+
const i = e.match(/\/(\w+)\.json$/)[1];
|
|
1394
|
+
await rt(i, t);
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
async function
|
|
1398
|
-
await
|
|
1397
|
+
async function rt(o, e) {
|
|
1398
|
+
await at(), m.addResourceBundle(o, nt, e, !0, !0);
|
|
1399
1399
|
}
|
|
1400
|
-
async function
|
|
1400
|
+
async function at() {
|
|
1401
1401
|
m.isInitialized || await m.init();
|
|
1402
1402
|
}
|
|
1403
|
-
const
|
|
1403
|
+
const ot = { class: "tooltip-container" }, lt = ["id"], ut = ["aria-labelledby", "aria-disabled"], ft = /* @__PURE__ */ xe({
|
|
1404
1404
|
inheritAttrs: !1,
|
|
1405
1405
|
__name: "ButtonTooltip.ce",
|
|
1406
1406
|
props: {
|
|
@@ -1410,93 +1410,39 @@ const ut = { class: "tooltip-container" }, ft = ["id"], ht = ["aria-labelledby",
|
|
|
1410
1410
|
},
|
|
1411
1411
|
emits: ["click"],
|
|
1412
1412
|
setup(o, { emit: e }) {
|
|
1413
|
-
const t =
|
|
1413
|
+
const t = Re(!0), i = $e(), s = e;
|
|
1414
1414
|
function n(r) {
|
|
1415
1415
|
t.value = r;
|
|
1416
1416
|
}
|
|
1417
1417
|
function a() {
|
|
1418
|
-
o.disabled ||
|
|
1418
|
+
o.disabled || s("click");
|
|
1419
1419
|
}
|
|
1420
|
-
return (r, l) => (
|
|
1421
|
-
|
|
1422
|
-
id:
|
|
1423
|
-
class:
|
|
1420
|
+
return (r, l) => (ke(), Pe("div", ot, [
|
|
1421
|
+
ee("p", {
|
|
1422
|
+
id: te(i),
|
|
1423
|
+
class: Ne(["tooltip", {
|
|
1424
1424
|
"sr-only": t.value || r.disabled,
|
|
1425
1425
|
[`${r.tooltipPosition}`]: !0
|
|
1426
1426
|
}])
|
|
1427
|
-
},
|
|
1428
|
-
|
|
1427
|
+
}, Ee(r.label), 11, lt),
|
|
1428
|
+
ee("button", Fe(r.$attrs, {
|
|
1429
1429
|
onMouseenter: l[0] || (l[0] = (u) => n(!1)),
|
|
1430
1430
|
onMouseleave: l[1] || (l[1] = (u) => n(!0)),
|
|
1431
1431
|
onFocusin: l[2] || (l[2] = (u) => n(!1)),
|
|
1432
1432
|
onFocusout: l[3] || (l[3] = (u) => n(!0)),
|
|
1433
|
-
onClick:
|
|
1434
|
-
"aria-labelledby":
|
|
1433
|
+
onClick: je(a, ["stop"]),
|
|
1434
|
+
"aria-labelledby": te(i),
|
|
1435
1435
|
"aria-disabled": r.disabled,
|
|
1436
1436
|
class: { disabled: r.disabled }
|
|
1437
1437
|
}), [
|
|
1438
|
-
|
|
1439
|
-
], 16,
|
|
1438
|
+
Ie(r.$slots, "default")
|
|
1439
|
+
], 16, ut)
|
|
1440
1440
|
]));
|
|
1441
1441
|
}
|
|
1442
|
-
}),
|
|
1443
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1444
|
-
width: "16",
|
|
1445
|
-
height: "16",
|
|
1446
|
-
viewBox: "0 0 16 16",
|
|
1447
|
-
fill: "inherit"
|
|
1448
|
-
};
|
|
1449
|
-
function xt(o, e) {
|
|
1450
|
-
return D(), te("svg", mt, e[0] || (e[0] = [
|
|
1451
|
-
_("path", {
|
|
1452
|
-
d: "M10.5642 8.75826H3.28958C3.07681 8.75826 2.89719 8.68509 2.75075 8.53875C2.60442 8.39231 2.53125 8.2127 2.53125 7.99992C2.53125 7.78714 2.60442 7.60753 2.75075 7.46109C2.89719 7.31475 3.07681 7.24159 3.28958 7.24159H10.5642L7.45292 4.13042C7.30103 3.97842 7.22719 3.80025 7.23142 3.59592C7.23564 3.39159 7.31369 3.21348 7.46558 3.06159C7.61758 2.9207 7.79575 2.84814 8.00008 2.84392C8.20442 2.8397 8.38258 2.91353 8.53458 3.06542L12.9346 7.46542C13.0091 7.54009 13.0636 7.62298 13.0981 7.71409C13.1325 7.80509 13.1498 7.90037 13.1498 7.99992C13.1498 8.09948 13.1325 8.19475 13.0981 8.28575C13.0636 8.37687 13.0091 8.45975 12.9346 8.53442L8.53058 12.9383C8.38703 13.0818 8.21164 13.1536 8.00442 13.1536C7.79719 13.1536 7.61758 13.0818 7.46558 12.9383C7.31369 12.7864 7.23775 12.6061 7.23775 12.3976C7.23775 12.189 7.31369 12.0088 7.46558 11.8568L10.5642 8.75826Z",
|
|
1453
|
-
fill: "inherit"
|
|
1454
|
-
}, null, -1)
|
|
1455
|
-
]));
|
|
1456
|
-
}
|
|
1457
|
-
const yt = /* @__PURE__ */ Q(gt, [["render", xt]]), bt = {}, wt = {
|
|
1458
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1459
|
-
width: "16",
|
|
1460
|
-
height: "16",
|
|
1461
|
-
viewBox: "0 0 16 16",
|
|
1462
|
-
fill: "inherit"
|
|
1463
|
-
};
|
|
1464
|
-
function St(o, e) {
|
|
1465
|
-
return D(), te("svg", wt, e[0] || (e[0] = [
|
|
1466
|
-
_("path", {
|
|
1467
|
-
d: "M5.4356 8.75868L8.54693 11.8698C8.69882 12.0218 8.77265 12.2 8.76843 12.4043C8.76421 12.6087 8.68615 12.7868 8.53426 12.9387C8.38226 13.0796 8.2041 13.1521 7.99976 13.1563C7.79543 13.1606 7.61726 13.0867 7.46526 12.9348L3.06526 8.53485C2.99071 8.46018 2.93621 8.37729 2.90176 8.28618C2.86732 8.19518 2.8501 8.0999 2.8501 8.00035C2.8501 7.90079 2.86732 7.80551 2.90176 7.71451C2.93621 7.6234 2.99071 7.54051 3.06526 7.46585L7.46926 3.06201C7.61282 2.91846 7.78821 2.84668 7.99543 2.84668C8.20265 2.84668 8.38226 2.91846 8.53426 3.06201C8.68615 3.2139 8.7621 3.39412 8.7621 3.60268C8.7621 3.81124 8.68615 3.99151 8.53426 4.14351L5.4356 7.24201H12.7103C12.923 7.24201 13.1027 7.31518 13.2491 7.46151C13.3954 7.60796 13.4686 7.78757 13.4686 8.00035C13.4686 8.21312 13.3954 8.39274 13.2491 8.53918C13.1027 8.68551 12.923 8.75868 12.7103 8.75868H5.4356Z",
|
|
1468
|
-
fill: "inherit"
|
|
1469
|
-
}, null, -1)
|
|
1470
|
-
]));
|
|
1471
|
-
}
|
|
1472
|
-
const vt = /* @__PURE__ */ Q(bt, [["render", St]]), Lt = /* @__PURE__ */ ee({
|
|
1473
|
-
__name: "NavigationButton.ce",
|
|
1474
|
-
props: {
|
|
1475
|
-
disabled: { type: Boolean },
|
|
1476
|
-
label: { type: String },
|
|
1477
|
-
tooltipPosition: { type: String },
|
|
1478
|
-
direction: { type: String }
|
|
1479
|
-
},
|
|
1480
|
-
emits: ["click"],
|
|
1481
|
-
setup(o) {
|
|
1482
|
-
return (e, t) => (D(), Z(pt, {
|
|
1483
|
-
class: "button",
|
|
1484
|
-
onClick: t[0] || (t[0] = (s) => e.$emit("click")),
|
|
1485
|
-
"tooltip-position": e.tooltipPosition,
|
|
1486
|
-
label: e.label,
|
|
1487
|
-
disabled: e.disabled
|
|
1488
|
-
}, {
|
|
1489
|
-
default: Ve(() => [
|
|
1490
|
-
e.direction === "next" ? (D(), Z(yt, { key: 0 })) : (D(), Z(vt, { key: 1 }))
|
|
1491
|
-
]),
|
|
1492
|
-
_: 1
|
|
1493
|
-
}, 8, ["tooltip-position", "label", "disabled"]));
|
|
1494
|
-
}
|
|
1495
|
-
}), Ot = "*{--pix-neutral-800: #253858;color:var(--pix-neutral-800)}.button{border-radius:100%;padding:4px;width:32px;height:32px;background:transparent;border:1px var(--pix-neutral-800) solid;aspect-ratio:1/1;fill:var(--pix-neutral-800);display:flex;align-items:center;justify-content:center}.button:hover{background:#c3d0ff}.button:active{background:#cdd1d9}", Pt = /* @__PURE__ */ Q(Lt, [["styles", [Ot]]]);
|
|
1442
|
+
}), ht = '*{--pix-neutral-800: #253858}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tooltip-container{position:relative;display:grid}.tooltip-container .tooltip{position:absolute;padding:5px 7px;background:var(--pix-neutral-800);color:#fff;border-radius:4px;z-index:400;margin:0;--horizontal-shift: 12px;--tooltip-gap: 1px;--arrow-height: 6px;--arrow-width: 5px}.tooltip-container .tooltip:before{content:"";position:absolute}.tooltip-container .tooltip.top{bottom:calc(100% + var(--tooltip-gap) + var(--arrow-height));left:50%;transform:translate(calc(var(--horizontal-shift) * -1))}.tooltip-container .tooltip.top:before{top:100%;left:calc(var(--horizontal-shift) - var(--arrow-width));border-right:var(--arrow-width) solid transparent;border-left:var(--arrow-width) solid transparent;border-top:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.bottom{top:calc(100% + var(--tooltip-gap) + var(--arrow-height));left:50%;transform:translate(calc(var(--horizontal-shift) * -1))}.tooltip-container .tooltip.bottom:before{bottom:100%;left:calc(var(--horizontal-shift) - var(--arrow-width));border-right:var(--arrow-width) solid transparent;border-left:var(--arrow-width) solid transparent;border-bottom:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.left{right:calc(100% + var(--tooltip-gap) + var(--arrow-height));top:50%;transform:translateY(-50%)}.tooltip-container .tooltip.left:before{left:100%;top:50%;transform:translateY(-50%);border-top:var(--arrow-width) solid transparent;border-bottom:var(--arrow-width) solid transparent;border-left:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.right{left:calc(100% + var(--tooltip-gap) + var(--arrow-height));top:50%;transform:translateY(-50%)}.tooltip-container .tooltip.right:before{right:100%;top:50%;transform:translateY(-50%);border-top:var(--arrow-width) solid transparent;border-bottom:var(--arrow-width) solid transparent;border-right:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container button:hover{cursor:pointer}.tooltip-container button.disabled{color:#797e89;cursor:not-allowed;border-color:transparent;background:transparent}', gt = /* @__PURE__ */ Te(ft, [["styles", [ht]]]);
|
|
1496
1443
|
export {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
$t as b,
|
|
1444
|
+
gt as B,
|
|
1445
|
+
pt as a,
|
|
1446
|
+
dt as b,
|
|
1501
1447
|
m as i
|
|
1502
1448
|
};
|