@pie-element/simple-cloze 0.1.4-next.17 → 0.1.4-next.18
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/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{i18n-C7YV9VIN.js → i18n-D6nL3i8G.js} +168 -172
- package/dist/browser/editor-runtime/i18n-D6nL3i8G.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +1 -1
- package/dist/browser/{i18n-C7YV9VIN.js → i18n-D6nL3i8G.js} +168 -172
- package/dist/browser/i18n-D6nL3i8G.js.map +1 -0
- package/dist/browser/print/index.js +1 -1
- package/dist/delivery/index.js +3 -7
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +2 -2
- package/dist/print/index.js +3 -7
- package/dist/print/index.js.map +1 -1
- package/module/print.js +147 -151
- package/module/print.js.map +1 -1
- package/package.json +3 -3
- package/dist/browser/editor-runtime/i18n-C7YV9VIN.js.map +0 -1
- package/dist/browser/i18n-C7YV9VIN.js.map +0 -1
|
@@ -67,7 +67,7 @@ function x(e) {
|
|
|
67
67
|
typeset: !1,
|
|
68
68
|
ready: () => {
|
|
69
69
|
let e = _(), r = e?.startup, i = !!e?.version?.startsWith("4.");
|
|
70
|
-
i && S(e), r?.defaultReady?.(), i &&
|
|
70
|
+
i && S(e), r?.defaultReady?.(), i && ee(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
tex: { macros: { ...a } },
|
|
@@ -89,7 +89,7 @@ function S(e) {
|
|
|
89
89
|
let t = e?._?.output?.chtml_ts?.CHTML;
|
|
90
90
|
t && (t.STYLESHEETID = f);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function ee(e) {
|
|
93
93
|
if (!e) return;
|
|
94
94
|
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
95
95
|
let n = e.typesetRoot;
|
|
@@ -103,32 +103,32 @@ function C(e) {
|
|
|
103
103
|
return t && g(t), !1;
|
|
104
104
|
});
|
|
105
105
|
let r = e.outputJax?.chtmlStyles;
|
|
106
|
-
r?.id === p && (r.id = f),
|
|
106
|
+
r?.id === p && (r.id = f), T();
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function C(e) {
|
|
109
109
|
return e instanceof HTMLStyleElement && m.includes(e.id);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function w(e) {
|
|
112
112
|
n("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
let e = document.head, t = [...e.children].find(
|
|
114
|
+
function T() {
|
|
115
|
+
let e = document.head, t = [...e.children].find(C);
|
|
116
116
|
if (t) {
|
|
117
|
-
|
|
117
|
+
w(t);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
let n = new MutationObserver((e) => {
|
|
121
121
|
for (let t of e) {
|
|
122
|
-
let e = [...t.addedNodes].find(
|
|
122
|
+
let e = [...t.addedNodes].find(C);
|
|
123
123
|
if (e) {
|
|
124
|
-
|
|
124
|
+
w(e), n.disconnect();
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
n.observe(e, { childList: !0 });
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function E(e) {
|
|
132
132
|
return new Promise((t, n) => {
|
|
133
133
|
let r = e.startup ?? {};
|
|
134
134
|
e.startup = r;
|
|
@@ -139,26 +139,26 @@ function D(e) {
|
|
|
139
139
|
};
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function D(e) {
|
|
143
143
|
let t = _();
|
|
144
|
-
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() :
|
|
144
|
+
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : E(t) : x(e);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function te(e) {
|
|
147
|
+
return D(e).then(() => {
|
|
148
148
|
typeof _()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ne(e) {
|
|
152
152
|
let t = globalThis, n = t[d];
|
|
153
|
-
return n || (n =
|
|
153
|
+
return n || (n = te(e), t[d] = n), n;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function re(e = {}) {
|
|
156
156
|
let t = e.useSingleDollar ?? !1;
|
|
157
157
|
return async (i) => {
|
|
158
158
|
if (typeof window > "u") return;
|
|
159
159
|
let a = r();
|
|
160
160
|
a && n("mathjax-3-global", `window.MathJax is MathJax ${a}`), y(i);
|
|
161
|
-
let o =
|
|
161
|
+
let o = ne(e);
|
|
162
162
|
if (!b(i, t)) {
|
|
163
163
|
o.catch(() => {});
|
|
164
164
|
return;
|
|
@@ -168,29 +168,25 @@ function ne(e = {}) {
|
|
|
168
168
|
await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([i]), g(i));
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
var
|
|
172
|
-
function
|
|
173
|
-
return !!window[
|
|
171
|
+
var ie = "@pie-lib/math-rendering", ae = "@pie-lib/math-rendering@2", O = null;
|
|
172
|
+
function oe() {
|
|
173
|
+
return !!window[ae]?.opts?.useSingleDollar;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function se() {
|
|
176
|
+
return O ||= re({ useSingleDollar: oe() }), O;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function ce() {
|
|
179
179
|
if (typeof window > "u") return null;
|
|
180
|
-
let e = window[
|
|
180
|
+
let e = window[ie];
|
|
181
181
|
return typeof e?.renderMath == "function" ? e : null;
|
|
182
182
|
}
|
|
183
|
-
|
|
184
|
-
let e = r();
|
|
185
|
-
e && n("legacy-renderer-delegation", `window['${k}'] renders this element's math with MathJax ${e}`);
|
|
186
|
-
}
|
|
187
|
-
var ce = async (e) => {
|
|
183
|
+
var le = async (e) => {
|
|
188
184
|
if (typeof window > "u") return;
|
|
189
185
|
let t = typeof e == "string", n;
|
|
190
186
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
191
|
-
let r =
|
|
192
|
-
return r ?
|
|
193
|
-
},
|
|
187
|
+
let r = ce();
|
|
188
|
+
return r ? await r.renderMath?.(n) : await se()(n), t ? n.innerHTML : void 0;
|
|
189
|
+
}, ue = {
|
|
194
190
|
translation: {
|
|
195
191
|
categorize: {
|
|
196
192
|
limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
|
|
@@ -330,7 +326,7 @@ var ce = async (e) => {
|
|
|
330
326
|
hideNote: "Hide Note",
|
|
331
327
|
cancel: "Cancel"
|
|
332
328
|
}
|
|
333
|
-
},
|
|
329
|
+
}, de = {
|
|
334
330
|
translation: {
|
|
335
331
|
categorize: {
|
|
336
332
|
limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
|
|
@@ -470,55 +466,55 @@ var ce = async (e) => {
|
|
|
470
466
|
hideNote: "Ocultar Nota",
|
|
471
467
|
cancel: "Cancelar"
|
|
472
468
|
}
|
|
473
|
-
},
|
|
469
|
+
}, k = (e) => typeof e == "string", A = () => {
|
|
474
470
|
let e, t, n = new Promise((n, r) => {
|
|
475
471
|
e = n, t = r;
|
|
476
472
|
});
|
|
477
473
|
return n.resolve = e, n.reject = t, n;
|
|
478
|
-
},
|
|
474
|
+
}, j = (e) => e == null ? "" : "" + e, fe = (e, t, n) => {
|
|
479
475
|
e.forEach((e) => {
|
|
480
476
|
t[e] && (n[e] = t[e]);
|
|
481
477
|
});
|
|
482
|
-
},
|
|
483
|
-
let r =
|
|
478
|
+
}, pe = /###/g, M = (e) => e && e.indexOf("###") > -1 ? e.replace(pe, ".") : e, N = (e) => !e || k(e), P = (e, t, n) => {
|
|
479
|
+
let r = k(t) ? t.split(".") : t, i = 0;
|
|
484
480
|
for (; i < r.length - 1;) {
|
|
485
|
-
if (
|
|
486
|
-
let t =
|
|
481
|
+
if (N(e)) return {};
|
|
482
|
+
let t = M(r[i]);
|
|
487
483
|
!e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
|
|
488
484
|
}
|
|
489
|
-
return
|
|
485
|
+
return N(e) ? {} : {
|
|
490
486
|
obj: e,
|
|
491
|
-
k:
|
|
487
|
+
k: M(r[i])
|
|
492
488
|
};
|
|
493
|
-
},
|
|
494
|
-
let { obj: r, k: i } =
|
|
489
|
+
}, F = (e, t, n) => {
|
|
490
|
+
let { obj: r, k: i } = P(e, t, Object);
|
|
495
491
|
if (r !== void 0 || t.length === 1) {
|
|
496
492
|
r[i] = n;
|
|
497
493
|
return;
|
|
498
494
|
}
|
|
499
|
-
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s =
|
|
500
|
-
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s =
|
|
495
|
+
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = P(e, o, Object);
|
|
496
|
+
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = P(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
|
|
501
497
|
s.obj[`${s.k}.${a}`] = n;
|
|
502
498
|
}, me = (e, t, n, r) => {
|
|
503
|
-
let { obj: i, k: a } =
|
|
499
|
+
let { obj: i, k: a } = P(e, t, Object);
|
|
504
500
|
i[a] = i[a] || [], i[a].push(n);
|
|
505
|
-
},
|
|
506
|
-
let { obj: n, k: r } =
|
|
501
|
+
}, I = (e, t) => {
|
|
502
|
+
let { obj: n, k: r } = P(e, t);
|
|
507
503
|
if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
|
|
508
504
|
}, he = (e, t, n) => {
|
|
509
|
-
let r =
|
|
510
|
-
return r === void 0 ?
|
|
511
|
-
},
|
|
512
|
-
for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ?
|
|
505
|
+
let r = I(e, n);
|
|
506
|
+
return r === void 0 ? I(t, n) : r;
|
|
507
|
+
}, L = (e, t, n) => {
|
|
508
|
+
for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? k(e[r]) || e[r] instanceof String || k(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : L(e[r], t[r], n) : e[r] = t[r]);
|
|
513
509
|
return e;
|
|
514
|
-
},
|
|
510
|
+
}, R = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ge = {
|
|
515
511
|
"&": "&",
|
|
516
512
|
"<": "<",
|
|
517
513
|
">": ">",
|
|
518
514
|
"\"": """,
|
|
519
515
|
"'": "'",
|
|
520
516
|
"/": "/"
|
|
521
|
-
}, _e = (e) =>
|
|
517
|
+
}, _e = (e) => k(e) ? e.replace(/[&<>"'\/]/g, (e) => ge[e]) : e, ve = class {
|
|
522
518
|
constructor(e) {
|
|
523
519
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
524
520
|
}
|
|
@@ -544,7 +540,7 @@ var ce = async (e) => {
|
|
|
544
540
|
t > 0 && !i.test(e.substring(0, t)) && (a = !0);
|
|
545
541
|
}
|
|
546
542
|
return a;
|
|
547
|
-
},
|
|
543
|
+
}, z = (e, t, n = ".") => {
|
|
548
544
|
if (!e) return;
|
|
549
545
|
if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
|
|
550
546
|
let r = t.split(n), i = e;
|
|
@@ -563,7 +559,7 @@ var ce = async (e) => {
|
|
|
563
559
|
i = t;
|
|
564
560
|
}
|
|
565
561
|
return i;
|
|
566
|
-
},
|
|
562
|
+
}, B = (e) => e?.replace(/_/g, "-"), Se = {
|
|
567
563
|
type: "logger",
|
|
568
564
|
log(e) {
|
|
569
565
|
this.output("log", e);
|
|
@@ -577,7 +573,7 @@ var ce = async (e) => {
|
|
|
577
573
|
output(e, t) {
|
|
578
574
|
console?.[e]?.apply?.(console, t);
|
|
579
575
|
}
|
|
580
|
-
},
|
|
576
|
+
}, V = new class e {
|
|
581
577
|
constructor(e, t = {}) {
|
|
582
578
|
this.init(e, t);
|
|
583
579
|
}
|
|
@@ -597,7 +593,7 @@ var ce = async (e) => {
|
|
|
597
593
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
598
594
|
}
|
|
599
595
|
forward(e, t, n, r) {
|
|
600
|
-
return r && !this.debug ? null : (
|
|
596
|
+
return r && !this.debug ? null : (k(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
601
597
|
}
|
|
602
598
|
create(t) {
|
|
603
599
|
return new e(this.logger, {
|
|
@@ -608,7 +604,7 @@ var ce = async (e) => {
|
|
|
608
604
|
clone(t) {
|
|
609
605
|
return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
|
|
610
606
|
}
|
|
611
|
-
}(),
|
|
607
|
+
}(), H = class {
|
|
612
608
|
constructor() {
|
|
613
609
|
this.observers = {};
|
|
614
610
|
}
|
|
@@ -635,7 +631,7 @@ var ce = async (e) => {
|
|
|
635
631
|
for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
|
|
636
632
|
});
|
|
637
633
|
}
|
|
638
|
-
},
|
|
634
|
+
}, U = class extends H {
|
|
639
635
|
constructor(e, t = {
|
|
640
636
|
ns: ["translation"],
|
|
641
637
|
defaultNS: "translation"
|
|
@@ -651,16 +647,16 @@ var ce = async (e) => {
|
|
|
651
647
|
}
|
|
652
648
|
getResource(e, t, n, r = {}) {
|
|
653
649
|
let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
|
|
654
|
-
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) :
|
|
655
|
-
let s =
|
|
656
|
-
return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !
|
|
650
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : k(n) && i ? o.push(...n.split(i)) : o.push(n)));
|
|
651
|
+
let s = I(this.data, o);
|
|
652
|
+
return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !k(n) ? s : z(this.data?.[e]?.[t], n, i);
|
|
657
653
|
}
|
|
658
654
|
addResource(e, t, n, r, i = { silent: !1 }) {
|
|
659
655
|
let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
|
|
660
|
-
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t),
|
|
656
|
+
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), F(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
|
|
661
657
|
}
|
|
662
658
|
addResources(e, t, n, r = { silent: !1 }) {
|
|
663
|
-
for (let r in n) (
|
|
659
|
+
for (let r in n) (k(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
|
|
664
660
|
r.silent || this.emit("added", e, t, n);
|
|
665
661
|
}
|
|
666
662
|
addResourceBundle(e, t, n, r, i, a = {
|
|
@@ -669,11 +665,11 @@ var ce = async (e) => {
|
|
|
669
665
|
}) {
|
|
670
666
|
let o = [e, t];
|
|
671
667
|
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
672
|
-
let s =
|
|
673
|
-
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ?
|
|
668
|
+
let s = I(this.data, o) || {};
|
|
669
|
+
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? L(s, n, i) : s = {
|
|
674
670
|
...s,
|
|
675
671
|
...n
|
|
676
|
-
},
|
|
672
|
+
}, F(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
677
673
|
}
|
|
678
674
|
removeResourceBundle(e, t) {
|
|
679
675
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -694,7 +690,7 @@ var ce = async (e) => {
|
|
|
694
690
|
toJSON() {
|
|
695
691
|
return this.data;
|
|
696
692
|
}
|
|
697
|
-
},
|
|
693
|
+
}, W = {
|
|
698
694
|
processors: {},
|
|
699
695
|
addPostProcessor(e) {
|
|
700
696
|
this.processors[e.name] = e;
|
|
@@ -704,22 +700,22 @@ var ce = async (e) => {
|
|
|
704
700
|
t = this.processors[e]?.process(t, n, r, i) ?? t;
|
|
705
701
|
}), t;
|
|
706
702
|
}
|
|
707
|
-
},
|
|
703
|
+
}, G = Symbol("i18next/PATH_KEY");
|
|
708
704
|
function Ce() {
|
|
709
705
|
let e = [], t = Object.create(null), n;
|
|
710
|
-
return t.get = (r, i) => (n?.revoke?.(), i ===
|
|
706
|
+
return t.get = (r, i) => (n?.revoke?.(), i === G ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
|
|
711
707
|
}
|
|
712
|
-
function
|
|
713
|
-
let { [
|
|
708
|
+
function K(e, t) {
|
|
709
|
+
let { [G]: n } = e(Ce()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
|
|
714
710
|
if (n.length > 1 && i) {
|
|
715
711
|
let e = t?.ns, a = Array.isArray(e) ? e : null;
|
|
716
712
|
if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
|
|
717
713
|
}
|
|
718
714
|
return n.join(r);
|
|
719
715
|
}
|
|
720
|
-
var
|
|
716
|
+
var q = {}, J = (e) => !k(e) && typeof e != "boolean" && typeof e != "number", we = class e extends H {
|
|
721
717
|
constructor(e, t = {}) {
|
|
722
|
-
super(),
|
|
718
|
+
super(), fe([
|
|
723
719
|
"resourceStore",
|
|
724
720
|
"languageUtils",
|
|
725
721
|
"pluralResolver",
|
|
@@ -727,7 +723,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
727
723
|
"backendConnector",
|
|
728
724
|
"i18nFormat",
|
|
729
725
|
"utils"
|
|
730
|
-
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger =
|
|
726
|
+
], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = V.create("translator");
|
|
731
727
|
}
|
|
732
728
|
changeLanguage(e) {
|
|
733
729
|
e && (this.language = e);
|
|
@@ -737,7 +733,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
737
733
|
if (e == null) return !1;
|
|
738
734
|
let r = this.resolve(e, n);
|
|
739
735
|
if (r?.res === void 0) return !1;
|
|
740
|
-
let i =
|
|
736
|
+
let i = J(r.res);
|
|
741
737
|
return !(n.returnObjects === !1 && i);
|
|
742
738
|
}
|
|
743
739
|
extractFromKey(e, t) {
|
|
@@ -748,23 +744,23 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
748
744
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
749
745
|
if (t && t.length > 0) return {
|
|
750
746
|
key: e,
|
|
751
|
-
namespaces:
|
|
747
|
+
namespaces: k(i) ? [i] : i
|
|
752
748
|
};
|
|
753
749
|
let a = e.split(n);
|
|
754
750
|
(n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
|
|
755
751
|
}
|
|
756
752
|
return {
|
|
757
753
|
key: e,
|
|
758
|
-
namespaces:
|
|
754
|
+
namespaces: k(i) ? [i] : i
|
|
759
755
|
};
|
|
760
756
|
}
|
|
761
757
|
translate(t, n, r) {
|
|
762
758
|
let i = typeof n == "object" ? { ...n } : n;
|
|
763
759
|
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
|
|
764
|
-
typeof t == "function" && (t =
|
|
760
|
+
typeof t == "function" && (t = K(t, {
|
|
765
761
|
...this.options,
|
|
766
762
|
...i
|
|
767
|
-
})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ?
|
|
763
|
+
})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? K(e, {
|
|
768
764
|
...this.options,
|
|
769
765
|
...i
|
|
770
766
|
}) : String(e));
|
|
@@ -790,42 +786,42 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
790
786
|
"[object Number]",
|
|
791
787
|
"[object Function]",
|
|
792
788
|
"[object RegExp]"
|
|
793
|
-
], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !
|
|
794
|
-
y && !m && x && (
|
|
795
|
-
let
|
|
796
|
-
if (y &&
|
|
789
|
+
], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !k(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", ee = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", C = b && !i.ordinal && i.count === 0, w = C && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${ee}`] || i.defaultValue, T = m;
|
|
790
|
+
y && !m && x && (T = w);
|
|
791
|
+
let E = J(T), D = Object.prototype.toString.apply(T);
|
|
792
|
+
if (y && T && E && _.indexOf(D) < 0 && !(k(v) && Array.isArray(T))) {
|
|
797
793
|
if (!i.returnObjects && !this.options.returnObjects) {
|
|
798
794
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
799
|
-
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h,
|
|
795
|
+
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, T, {
|
|
800
796
|
...i,
|
|
801
797
|
ns: c
|
|
802
798
|
}) : `key '${s} (${this.language})' returned an object instead of string.`;
|
|
803
799
|
return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
|
|
804
800
|
}
|
|
805
801
|
if (o) {
|
|
806
|
-
let e = Array.isArray(
|
|
807
|
-
for (let e in
|
|
802
|
+
let e = Array.isArray(T), t = e ? [] : {}, n = e ? g : h;
|
|
803
|
+
for (let e in T) if (Object.prototype.hasOwnProperty.call(T, e)) {
|
|
808
804
|
let r = `${n}${o}${e}`;
|
|
809
805
|
x && !m ? t[e] = this.translate(r, {
|
|
810
806
|
...i,
|
|
811
|
-
defaultValue:
|
|
807
|
+
defaultValue: J(w) ? w[e] : void 0,
|
|
812
808
|
joinArrays: !1,
|
|
813
809
|
ns: c
|
|
814
810
|
}) : t[e] = this.translate(r, {
|
|
815
811
|
...i,
|
|
816
812
|
joinArrays: !1,
|
|
817
813
|
ns: c
|
|
818
|
-
}), t[e] === r && (t[e] =
|
|
814
|
+
}), t[e] === r && (t[e] = T[e]);
|
|
819
815
|
}
|
|
820
816
|
m = t;
|
|
821
817
|
}
|
|
822
|
-
} else if (y &&
|
|
818
|
+
} else if (y && k(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
|
|
823
819
|
else {
|
|
824
820
|
let e = !1, n = !1;
|
|
825
|
-
!this.isValidLookup(m) && x && (e = !0, m =
|
|
826
|
-
let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x &&
|
|
821
|
+
!this.isValidLookup(m) && x && (e = !0, m = w), this.isValidLookup(m) || (n = !0, m = s);
|
|
822
|
+
let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && w !== m && this.options.updateMissing;
|
|
827
823
|
if (n || e || c) {
|
|
828
|
-
if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ?
|
|
824
|
+
if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? w : m), o) {
|
|
829
825
|
let e = this.resolve(s, {
|
|
830
826
|
...i,
|
|
831
827
|
keySeparator: !1
|
|
@@ -841,10 +837,10 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
841
837
|
};
|
|
842
838
|
this.options.saveMissing && (this.options.saveMissingPlurals && b ? e.forEach((e) => {
|
|
843
839
|
let t = this.pluralResolver.getSuffixes(e, i);
|
|
844
|
-
|
|
845
|
-
n([e], s + t, i[`defaultValue${t}`] ||
|
|
840
|
+
C && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
|
|
841
|
+
n([e], s + t, i[`defaultValue${t}`] || w);
|
|
846
842
|
});
|
|
847
|
-
}) : n(e, s,
|
|
843
|
+
}) : n(e, s, w));
|
|
848
844
|
}
|
|
849
845
|
m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
|
|
850
846
|
}
|
|
@@ -863,12 +859,12 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
863
859
|
...n.interpolation
|
|
864
860
|
}
|
|
865
861
|
});
|
|
866
|
-
let a =
|
|
862
|
+
let a = k(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
|
|
867
863
|
if (a) {
|
|
868
864
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
869
865
|
o = t && t.length;
|
|
870
866
|
}
|
|
871
|
-
let s = n.replace && !
|
|
867
|
+
let s = n.replace && !k(n.replace) ? n.replace : n;
|
|
872
868
|
if (this.options.interpolation.defaultVariables && (s = {
|
|
873
869
|
...this.options.interpolation.defaultVariables,
|
|
874
870
|
...s
|
|
@@ -878,8 +874,8 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
878
874
|
}
|
|
879
875
|
!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();
|
|
880
876
|
}
|
|
881
|
-
let a = n.postProcess || this.options.postProcess, o =
|
|
882
|
-
return e != null && o?.length && n.applyPostProcessor !== !1 && (e =
|
|
877
|
+
let a = n.postProcess || this.options.postProcess, o = k(a) ? [a] : a;
|
|
878
|
+
return e != null && o?.length && n.applyPostProcessor !== !1 && (e = W.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
883
879
|
i18nResolved: {
|
|
884
880
|
...r,
|
|
885
881
|
usedParams: this.getUsedParamsDetails(n)
|
|
@@ -889,7 +885,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
889
885
|
}
|
|
890
886
|
resolve(e, t = {}) {
|
|
891
887
|
let n, r, i, a, o;
|
|
892
|
-
return
|
|
888
|
+
return k(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? K(e, {
|
|
893
889
|
...this.options,
|
|
894
890
|
...t
|
|
895
891
|
}) : e)), e.forEach((e) => {
|
|
@@ -898,9 +894,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
898
894
|
r = c;
|
|
899
895
|
let l = s.namespaces;
|
|
900
896
|
this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
|
|
901
|
-
let u = t.count !== void 0 && !
|
|
897
|
+
let u = t.count !== void 0 && !k(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (k(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
902
898
|
l.forEach((e) => {
|
|
903
|
-
this.isValidLookup(n) || (o = e, !
|
|
899
|
+
this.isValidLookup(n) || (o = e, !q[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (q[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.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!!!")), p.forEach((r) => {
|
|
904
900
|
if (this.isValidLookup(n)) return;
|
|
905
901
|
a = r;
|
|
906
902
|
let o = [c];
|
|
@@ -949,7 +945,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
949
945
|
"joinArrays",
|
|
950
946
|
"postProcess",
|
|
951
947
|
"interpolation"
|
|
952
|
-
], n = e.replace && !
|
|
948
|
+
], n = e.replace && !k(e.replace), r = n ? e.replace : e;
|
|
953
949
|
if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
|
|
954
950
|
...this.options.interpolation.defaultVariables,
|
|
955
951
|
...r
|
|
@@ -965,20 +961,20 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
965
961
|
}
|
|
966
962
|
}, Te = class {
|
|
967
963
|
constructor(e) {
|
|
968
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
964
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = V.create("languageUtils");
|
|
969
965
|
}
|
|
970
966
|
getScriptPartFromCode(e) {
|
|
971
|
-
if (e =
|
|
967
|
+
if (e = B(e), !e || e.indexOf("-") < 0) return null;
|
|
972
968
|
let t = e.split("-");
|
|
973
969
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
974
970
|
}
|
|
975
971
|
getLanguagePartFromCode(e) {
|
|
976
|
-
if (e =
|
|
972
|
+
if (e = B(e), !e || e.indexOf("-") < 0) return e;
|
|
977
973
|
let t = e.split("-");
|
|
978
974
|
return this.formatLanguageCode(t[0]);
|
|
979
975
|
}
|
|
980
976
|
formatLanguageCode(e) {
|
|
981
|
-
if (
|
|
977
|
+
if (k(e) && e.indexOf("-") > -1) {
|
|
982
978
|
let t;
|
|
983
979
|
try {
|
|
984
980
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -1010,7 +1006,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1010
1006
|
}
|
|
1011
1007
|
getFallbackCodes(e, t) {
|
|
1012
1008
|
if (!e) return [];
|
|
1013
|
-
if (typeof e == "function" && (e = e(t)),
|
|
1009
|
+
if (typeof e == "function" && (e = e(t)), k(e) && (e = [e]), Array.isArray(e)) return e;
|
|
1014
1010
|
if (!t) return e.default || [];
|
|
1015
1011
|
let n = e[t];
|
|
1016
1012
|
return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
|
|
@@ -1019,7 +1015,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1019
1015
|
let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
|
|
1020
1016
|
e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
|
|
1021
1017
|
};
|
|
1022
|
-
return
|
|
1018
|
+
return k(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))) : k(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
|
|
1023
1019
|
r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
|
|
1024
1020
|
}), r;
|
|
1025
1021
|
}
|
|
@@ -1035,13 +1031,13 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1035
1031
|
resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
|
|
1036
1032
|
}, Oe = class {
|
|
1037
1033
|
constructor(e, t = {}) {
|
|
1038
|
-
this.languageUtils = e, this.options = t, this.logger =
|
|
1034
|
+
this.languageUtils = e, this.options = t, this.logger = V.create("pluralResolver"), this.pluralRulesCache = {};
|
|
1039
1035
|
}
|
|
1040
1036
|
clearCache() {
|
|
1041
1037
|
this.pluralRulesCache = {};
|
|
1042
1038
|
}
|
|
1043
1039
|
getRule(e, t = {}) {
|
|
1044
|
-
let n =
|
|
1040
|
+
let n = B(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
1045
1041
|
cleanedCode: n,
|
|
1046
1042
|
type: r
|
|
1047
1043
|
});
|
|
@@ -1074,15 +1070,15 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1074
1070
|
}
|
|
1075
1071
|
}, ke = (e, t, n, r = ".", i = !0) => {
|
|
1076
1072
|
let a = he(e, t, n);
|
|
1077
|
-
return !a && i &&
|
|
1078
|
-
},
|
|
1073
|
+
return !a && i && k(n) && (a = z(e, n, r), a === void 0 && (a = z(t, n, r))), a;
|
|
1074
|
+
}, Y = (e) => e.replace(/\$/g, "$$$$"), Ae = class {
|
|
1079
1075
|
constructor(e = {}) {
|
|
1080
|
-
this.logger =
|
|
1076
|
+
this.logger = V.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
|
|
1081
1077
|
}
|
|
1082
1078
|
init(e = {}) {
|
|
1083
1079
|
e.interpolation ||= { escapeValue: !0 };
|
|
1084
1080
|
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;
|
|
1085
|
-
this.escape = t === void 0 ? _e : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ?
|
|
1081
|
+
this.escape = t === void 0 ? _e : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? R(i) : a || "{{", this.suffix = o ? R(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? R(d) : f || R("$t("), this.nestingSuffix = p ? R(p) : m || R(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
|
|
1086
1082
|
}
|
|
1087
1083
|
reset() {
|
|
1088
1084
|
this.options && this.init(this.options);
|
|
@@ -1112,22 +1108,22 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1112
1108
|
let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
|
|
1113
1109
|
return [{
|
|
1114
1110
|
regex: this.regexpUnescape,
|
|
1115
|
-
safeValue: (e) =>
|
|
1111
|
+
safeValue: (e) => Y(e)
|
|
1116
1112
|
}, {
|
|
1117
1113
|
regex: this.regexp,
|
|
1118
|
-
safeValue: (e) => this.escapeValue ?
|
|
1114
|
+
safeValue: (e) => this.escapeValue ? Y(this.escape(e)) : Y(e)
|
|
1119
1115
|
}].forEach((t) => {
|
|
1120
1116
|
for (o = 0; i = t.regex.exec(e);) {
|
|
1121
1117
|
let n = i[1].trim();
|
|
1122
1118
|
if (a = c(n), a === void 0) if (typeof l == "function") {
|
|
1123
1119
|
let t = l(e, i, r);
|
|
1124
|
-
a =
|
|
1120
|
+
a = k(t) ? t : "";
|
|
1125
1121
|
} else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
|
|
1126
1122
|
else if (u) {
|
|
1127
1123
|
a = i[0];
|
|
1128
1124
|
continue;
|
|
1129
1125
|
} else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
|
|
1130
|
-
else !
|
|
1126
|
+
else !k(a) && !this.useRawValueToEscape && (a = j(a));
|
|
1131
1127
|
let s = t.safeValue(a);
|
|
1132
1128
|
if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
|
|
1133
1129
|
}
|
|
@@ -1137,7 +1133,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1137
1133
|
let r, i, a, o = (e, t) => {
|
|
1138
1134
|
let n = this.nestingOptionsSeparator;
|
|
1139
1135
|
if (e.indexOf(n) < 0) return e;
|
|
1140
|
-
let r = e.split(RegExp(`${
|
|
1136
|
+
let r = e.split(RegExp(`${R(n)}[ ]*{`)), i = `{${r[1]}`;
|
|
1141
1137
|
e = r[0], i = this.interpolate(i, a);
|
|
1142
1138
|
let o = i.match(/'/g), s = i.match(/"/g);
|
|
1143
1139
|
((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
|
|
@@ -1153,10 +1149,10 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1153
1149
|
};
|
|
1154
1150
|
for (; r = this.nestingRegexp.exec(e);) {
|
|
1155
1151
|
let s = [];
|
|
1156
|
-
a = { ...n }, a = a.replace && !
|
|
1152
|
+
a = { ...n }, a = a.replace && !k(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
1157
1153
|
let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
|
|
1158
|
-
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 && !
|
|
1159
|
-
|
|
1154
|
+
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 && !k(i)) return i;
|
|
1155
|
+
k(i) || (i = j(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, {
|
|
1160
1156
|
...n,
|
|
1161
1157
|
interpolationkey: r[1].trim()
|
|
1162
1158
|
}), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
|
|
@@ -1189,11 +1185,11 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1189
1185
|
[i.interpolationkey]: void 0
|
|
1190
1186
|
});
|
|
1191
1187
|
let o = r + JSON.stringify(a), s = t[o];
|
|
1192
|
-
return s || (s = e(
|
|
1188
|
+
return s || (s = e(B(r), i), t[o] = s), s(n);
|
|
1193
1189
|
};
|
|
1194
|
-
}, Ne = (e) => (t, n, r) => e(
|
|
1190
|
+
}, Ne = (e) => (t, n, r) => e(B(n), r)(t), Pe = class {
|
|
1195
1191
|
constructor(e = {}) {
|
|
1196
|
-
this.logger =
|
|
1192
|
+
this.logger = V.create("formatter"), this.options = e, this.init(e);
|
|
1197
1193
|
}
|
|
1198
1194
|
init(e, t = { interpolation: {} }) {
|
|
1199
1195
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
@@ -1257,9 +1253,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1257
1253
|
}
|
|
1258
1254
|
}, Fe = (e, t) => {
|
|
1259
1255
|
e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
|
|
1260
|
-
}, Ie = class extends
|
|
1256
|
+
}, Ie = class extends H {
|
|
1261
1257
|
constructor(e, t, n, r = {}) {
|
|
1262
|
-
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger =
|
|
1258
|
+
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = V.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);
|
|
1263
1259
|
}
|
|
1264
1260
|
queueLoad(e, t, n, r) {
|
|
1265
1261
|
let i = {}, a = {}, o = {}, s = {};
|
|
@@ -1336,7 +1332,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1336
1332
|
}
|
|
1337
1333
|
prepareLoading(e, t, n = {}, r) {
|
|
1338
1334
|
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
|
|
1339
|
-
|
|
1335
|
+
k(e) && (e = this.languageUtils.toResolveHierarchy(e)), k(t) && (t = [t]);
|
|
1340
1336
|
let i = this.queueLoad(e, t, n, r);
|
|
1341
1337
|
if (!i.toLoad.length) return i.pending.length || r(), null;
|
|
1342
1338
|
i.toLoad.forEach((e) => {
|
|
@@ -1377,7 +1373,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1377
1373
|
!e || !e[0] || this.store.addResource(e[0], t, n, r);
|
|
1378
1374
|
}
|
|
1379
1375
|
}
|
|
1380
|
-
},
|
|
1376
|
+
}, X = () => ({
|
|
1381
1377
|
debug: !1,
|
|
1382
1378
|
initAsync: !0,
|
|
1383
1379
|
ns: ["translation"],
|
|
@@ -1412,7 +1408,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1412
1408
|
appendNamespaceToCIMode: !1,
|
|
1413
1409
|
overloadTranslationOptionHandler: (e) => {
|
|
1414
1410
|
let t = {};
|
|
1415
|
-
if (typeof e[1] == "object" && (t = e[1]),
|
|
1411
|
+
if (typeof e[1] == "object" && (t = e[1]), k(e[1]) && (t.defaultValue = e[1]), k(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
|
|
1416
1412
|
let n = e[3] || e[2];
|
|
1417
1413
|
Object.keys(n).forEach((e) => {
|
|
1418
1414
|
t[e] = n[e];
|
|
@@ -1434,15 +1430,15 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1434
1430
|
skipOnVariables: !0
|
|
1435
1431
|
},
|
|
1436
1432
|
cacheInBuiltFormats: !0
|
|
1437
|
-
}),
|
|
1433
|
+
}), Z = (e) => (k(e.ns) && (e.ns = [e.ns]), k(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), k(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), Q = () => {}, Le = (e) => {
|
|
1438
1434
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
|
|
1439
1435
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
1440
1436
|
});
|
|
1441
|
-
},
|
|
1442
|
-
typeof globalThis < "u" && (globalThis[
|
|
1443
|
-
},
|
|
1437
|
+
}, Re = "__i18next_supportNoticeShown", ze = () => !!(typeof globalThis < "u" && globalThis[Re] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Be = () => {
|
|
1438
|
+
typeof globalThis < "u" && (globalThis[Re] = !0);
|
|
1439
|
+
}, Ve = (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)), $ = class e extends H {
|
|
1444
1440
|
constructor(e = {}, t) {
|
|
1445
|
-
if (super(), this.options =
|
|
1441
|
+
if (super(), this.options = Z(e), this.services = {}, this.logger = V, this.modules = { external: [] }, Le(this), t && !this.isInitialized && !e.isClone) {
|
|
1446
1442
|
if (!this.options.initAsync) return this.init(e, t), this;
|
|
1447
1443
|
setTimeout(() => {
|
|
1448
1444
|
this.init(e, t);
|
|
@@ -1450,25 +1446,25 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1450
1446
|
}
|
|
1451
1447
|
}
|
|
1452
1448
|
init(e = {}, t) {
|
|
1453
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
1454
|
-
let n =
|
|
1449
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (k(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1450
|
+
let n = X();
|
|
1455
1451
|
this.options = {
|
|
1456
1452
|
...n,
|
|
1457
1453
|
...this.options,
|
|
1458
|
-
...
|
|
1454
|
+
...Z(e)
|
|
1459
1455
|
}, this.options.interpolation = {
|
|
1460
1456
|
...n.interpolation,
|
|
1461
1457
|
...this.options.interpolation
|
|
1462
|
-
}, 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 && !
|
|
1458
|
+
}, 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 && !Ve(this) && !ze() && (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 💙"), Be());
|
|
1463
1459
|
let r = (e) => e ? typeof e == "function" ? new e() : e : null;
|
|
1464
1460
|
if (!this.options.isClone) {
|
|
1465
|
-
this.modules.logger ?
|
|
1461
|
+
this.modules.logger ? V.init(r(this.modules.logger), this.options) : V.init(null, this.options);
|
|
1466
1462
|
let e;
|
|
1467
1463
|
e = this.modules.formatter ? this.modules.formatter : Pe;
|
|
1468
1464
|
let t = new Te(this.options);
|
|
1469
|
-
this.store = new
|
|
1465
|
+
this.store = new U(this.options.resources, this.options);
|
|
1470
1466
|
let i = this.services;
|
|
1471
|
-
i.logger =
|
|
1467
|
+
i.logger = V, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Oe(t, {
|
|
1472
1468
|
prepend: this.options.pluralSeparator,
|
|
1473
1469
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1474
1470
|
}), 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 Ae(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ie(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
|
|
@@ -1498,7 +1494,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1498
1494
|
].forEach((e) => {
|
|
1499
1495
|
this[e] = (...t) => (this.store[e](...t), this);
|
|
1500
1496
|
});
|
|
1501
|
-
let i =
|
|
1497
|
+
let i = A(), a = () => {
|
|
1502
1498
|
let e = (e, n) => {
|
|
1503
1499
|
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);
|
|
1504
1500
|
};
|
|
@@ -1508,7 +1504,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1508
1504
|
return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
|
|
1509
1505
|
}
|
|
1510
1506
|
loadResources(e, t = Q) {
|
|
1511
|
-
let n = t, r =
|
|
1507
|
+
let n = t, r = k(e) ? e : this.language;
|
|
1512
1508
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1513
1509
|
if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
1514
1510
|
let e = [], t = (t) => {
|
|
@@ -1522,7 +1518,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1522
1518
|
} else n(null);
|
|
1523
1519
|
}
|
|
1524
1520
|
reloadResources(e, t, n) {
|
|
1525
|
-
let r =
|
|
1521
|
+
let r = A();
|
|
1526
1522
|
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 ||= Q, this.services.backendConnector.reload(e, t, (e) => {
|
|
1527
1523
|
r.resolve(), n(e);
|
|
1528
1524
|
}), r;
|
|
@@ -1530,7 +1526,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1530
1526
|
use(e) {
|
|
1531
1527
|
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1532
1528
|
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1533
|
-
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" &&
|
|
1529
|
+
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" && W.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1534
1530
|
}
|
|
1535
1531
|
setResolvedLanguage(e) {
|
|
1536
1532
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1546,7 +1542,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1546
1542
|
}
|
|
1547
1543
|
changeLanguage(e, t) {
|
|
1548
1544
|
this.isLanguageChangingTo = e;
|
|
1549
|
-
let n =
|
|
1545
|
+
let n = A();
|
|
1550
1546
|
this.emit("languageChanging", e);
|
|
1551
1547
|
let r = (e) => {
|
|
1552
1548
|
this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
|
|
@@ -1554,7 +1550,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1554
1550
|
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));
|
|
1555
1551
|
}, a = (t) => {
|
|
1556
1552
|
!e && !t && this.services.languageDetector && (t = []);
|
|
1557
|
-
let n =
|
|
1553
|
+
let n = k(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(k(t) ? [t] : t);
|
|
1558
1554
|
a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
|
|
1559
1555
|
i(e, a);
|
|
1560
1556
|
});
|
|
@@ -1569,11 +1565,11 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1569
1565
|
...this.options,
|
|
1570
1566
|
...a
|
|
1571
1567
|
};
|
|
1572
|
-
typeof a.keyPrefix == "function" && (a.keyPrefix =
|
|
1568
|
+
typeof a.keyPrefix == "function" && (a.keyPrefix = K(a.keyPrefix, o));
|
|
1573
1569
|
let s = this.options.keySeparator || ".", c;
|
|
1574
|
-
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e =
|
|
1570
|
+
return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = K(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = K(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
|
|
1575
1571
|
};
|
|
1576
|
-
return
|
|
1572
|
+
return k(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
|
|
1577
1573
|
}
|
|
1578
1574
|
t(...e) {
|
|
1579
1575
|
return this.translator?.translate(...e);
|
|
@@ -1600,16 +1596,16 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1600
1596
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
|
|
1601
1597
|
}
|
|
1602
1598
|
loadNamespaces(e, t) {
|
|
1603
|
-
let n =
|
|
1604
|
-
return this.options.ns ? (
|
|
1599
|
+
let n = A();
|
|
1600
|
+
return this.options.ns ? (k(e) && (e = [e]), e.forEach((e) => {
|
|
1605
1601
|
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
1606
1602
|
}), this.loadResources((e) => {
|
|
1607
1603
|
n.resolve(), t && t(e);
|
|
1608
1604
|
}), n) : (t && t(), Promise.resolve());
|
|
1609
1605
|
}
|
|
1610
1606
|
loadLanguages(e, t) {
|
|
1611
|
-
let n =
|
|
1612
|
-
|
|
1607
|
+
let n = A();
|
|
1608
|
+
k(e) && (e = [e]);
|
|
1613
1609
|
let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
|
|
1614
1610
|
return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
|
|
1615
1611
|
n.resolve(), t && t(e);
|
|
@@ -1624,7 +1620,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1624
1620
|
if (e && e.direction) return e.direction;
|
|
1625
1621
|
}
|
|
1626
1622
|
} catch {}
|
|
1627
|
-
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 Te(
|
|
1623
|
+
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 Te(X());
|
|
1628
1624
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1629
1625
|
}
|
|
1630
1626
|
static createInstance(t = {}, n) {
|
|
@@ -1645,9 +1641,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
|
|
|
1645
1641
|
"language"
|
|
1646
1642
|
].forEach((e) => {
|
|
1647
1643
|
a[e] = this[e];
|
|
1648
|
-
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new
|
|
1644
|
+
}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new U(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) {
|
|
1649
1645
|
let e = {
|
|
1650
|
-
...
|
|
1646
|
+
...X().interpolation,
|
|
1651
1647
|
...this.options.interpolation,
|
|
1652
1648
|
...t.interpolation
|
|
1653
1649
|
}, n = {
|
|
@@ -1677,13 +1673,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
|
|
|
1677
1673
|
lng: "en",
|
|
1678
1674
|
showSupportNotice: !1,
|
|
1679
1675
|
resources: {
|
|
1680
|
-
en:
|
|
1681
|
-
es:
|
|
1676
|
+
en: ue,
|
|
1677
|
+
es: de
|
|
1682
1678
|
}
|
|
1683
1679
|
});
|
|
1684
1680
|
//#endregion
|
|
1685
1681
|
//#region src/i18n.ts
|
|
1686
|
-
var { translator:
|
|
1682
|
+
var { translator: He } = {
|
|
1687
1683
|
translator: {
|
|
1688
1684
|
...$,
|
|
1689
1685
|
t: (e, t) => {
|
|
@@ -1715,13 +1711,13 @@ var { translator: Ue } = {
|
|
|
1715
1711
|
label: "Spanish"
|
|
1716
1712
|
}]
|
|
1717
1713
|
};
|
|
1718
|
-
function
|
|
1719
|
-
return
|
|
1714
|
+
function Ue(e, t) {
|
|
1715
|
+
return He.t(`translation:simpleCloze:${e}`, { lng: t });
|
|
1720
1716
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1717
|
+
function We(e, t) {
|
|
1718
|
+
return He.t(`common:${e}`, { lng: t });
|
|
1723
1719
|
}
|
|
1724
1720
|
//#endregion
|
|
1725
|
-
export {
|
|
1721
|
+
export { We as n, le as r, Ue as t };
|
|
1726
1722
|
|
|
1727
|
-
//# sourceMappingURL=i18n-
|
|
1723
|
+
//# sourceMappingURL=i18n-D6nL3i8G.js.map
|