@pie-element/simple-cloze 0.1.4-next.12 → 0.1.4-next.14

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/module/print.js CHANGED
@@ -2067,92 +2067,131 @@ function Hr(e, t, n, r, i, a) {
2067
2067
  }
2068
2068
  //#endregion
2069
2069
  //#region ../../shared/math-rendering-mathjax/dist/index.js
2070
- var Ur = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
2071
- function Wr(e) {
2072
- if (typeof window > "u" || window.MathJax?.typesetPromise) return Promise.resolve();
2073
- let t = globalThis, n = t[Ur];
2074
- if (n) return n;
2075
- let r = new Promise((t, n) => {
2070
+ var Ur = {
2071
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
2072
+ overarc: "\\overparen",
2073
+ napprox: "\\not\\approx",
2074
+ longdiv: "\\enclose{longdiv}",
2075
+ abs: ["\\left|#1\\right|", 1]
2076
+ }, Wr = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Gr = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Kr = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, qr = /\\embed\{newLine\}\[\]/g, Jr = [
2077
+ ["$$", "$$"],
2078
+ ["$", "$"],
2079
+ ["\\[", "\\]"],
2080
+ ["\\(", "\\)"]
2081
+ ], Yr = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
2082
+ function Xr() {
2083
+ return window.MathJax;
2084
+ }
2085
+ function Zr(e) {
2086
+ let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
2087
+ for (let [e, n] of Jr) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
2088
+ return t;
2089
+ }
2090
+ function Qr(e) {
2091
+ for (let t of e.querySelectorAll("[data-latex]")) {
2092
+ if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
2093
+ let e = t.textContent;
2094
+ e && (t.textContent = `\\(${Zr(e)}\\)`.replace(qr, "\\newline "), t.dataset.mathHandled = "true");
2095
+ }
2096
+ }
2097
+ function $r(e, t) {
2098
+ for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
2099
+ return (t ? Kr : Gr).test(e.textContent ?? "");
2100
+ }
2101
+ function ei(e) {
2102
+ return new Promise((t, n) => {
2076
2103
  let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = {
2077
- loader: { load: i ? ["a11y/assistive-mml"] : [] },
2078
- tex: {
2079
- packages: [
2080
- "base",
2081
- "ams",
2082
- "autoload"
2083
- ],
2084
- macros: {
2085
- parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
2086
- overarc: "\\overparen",
2087
- napprox: "\\not\\approx",
2088
- longdiv: "\\enclose{longdiv}"
2104
+ loader: {
2105
+ load: i ? ["a11y/assistive-mml"] : [],
2106
+ failed: (e) => n(e)
2107
+ },
2108
+ startup: {
2109
+ typeset: !1,
2110
+ ready: () => {
2111
+ let e = Xr()?.startup;
2112
+ e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
2089
2113
  }
2090
2114
  },
2115
+ tex: { macros: { ...Ur } },
2091
2116
  options: {
2092
2117
  enableMenu: i,
2093
- enableExplorer: i,
2094
- enableAssistiveMml: i
2095
- },
2096
- startup: {
2097
- ready: () => {
2098
- window.MathJax?.startup.defaultReady && (window.MathJax.startup.defaultReady(), t());
2099
- },
2100
- defaultReady: () => {}
2118
+ menuOptions: { settings: {
2119
+ assistiveMml: i,
2120
+ enrich: !1,
2121
+ inTabOrder: !1
2122
+ } }
2101
2123
  }
2102
2124
  };
2103
- r && s.tex && (s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
2125
+ r && s.tex && (console.warn(Wr), s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
2104
2126
  let c = document.createElement("script");
2105
- c.src = o || "https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js", c.async = !0, c.onload = () => {
2106
- setTimeout(t, 100);
2107
- }, c.onerror = () => {
2108
- n(/* @__PURE__ */ Error("Failed to load MathJax"));
2109
- }, document.head.appendChild(c);
2127
+ c.src = o || "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", c.async = !0, c.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(c);
2110
2128
  });
2111
- return t[Ur] = r, r;
2112
2129
  }
2113
- function Gr() {
2114
- let e = window.MathJax?.startup?.document;
2115
- if (typeof e?.assistiveMml == "function") try {
2116
- e.assistiveMml().updateDocument?.();
2117
- } catch (e) {
2118
- console.warn("[mathjax-renderer] Failed to attach assistive MathML:", e);
2119
- }
2130
+ function ti(e) {
2131
+ return new Promise((t, n) => {
2132
+ let r = e.startup ?? {};
2133
+ e.startup = r;
2134
+ let i = r.ready;
2135
+ r.ready = () => {
2136
+ let e = Xr()?.startup;
2137
+ i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
2138
+ };
2139
+ });
2120
2140
  }
2121
- function Kr(e = {}) {
2122
- return async (t) => {
2123
- if (await Wr(e), !window.MathJax?.typesetPromise) {
2124
- console.warn("[mathjax-renderer] MathJax not loaded or missing typesetPromise.");
2141
+ function ni(e) {
2142
+ let t = Xr();
2143
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : ti(t) : ei(e);
2144
+ }
2145
+ function ri(e) {
2146
+ return ni(e).then(() => {
2147
+ typeof Xr()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
2148
+ });
2149
+ }
2150
+ function ii(e) {
2151
+ let t = globalThis, n = t[Yr];
2152
+ return n || (n = ri(e), t[Yr] = n), n;
2153
+ }
2154
+ function ai(e = {}) {
2155
+ let t = e.useSingleDollar ?? !1;
2156
+ return async (n) => {
2157
+ if (typeof window > "u") return;
2158
+ Qr(n);
2159
+ let r = ii(e);
2160
+ if (!$r(n, t)) {
2161
+ r.catch(() => {});
2125
2162
  return;
2126
2163
  }
2127
- await window.MathJax.typesetPromise([t]), Gr();
2164
+ await r;
2165
+ let i = Xr();
2166
+ await i?.startup?.promise, typeof i?.typesetPromise == "function" && await i.typesetPromise([n]);
2128
2167
  };
2129
2168
  }
2130
- var qr = "@pie-lib/math-rendering", Jr = null;
2131
- function Yr() {
2132
- return Jr ||= Kr({
2133
- accessibility: !0,
2134
- useSingleDollar: !0
2135
- }), Jr;
2169
+ var oi = "@pie-lib/math-rendering", si = "@pie-lib/math-rendering@2", ci = null;
2170
+ function li() {
2171
+ return !!window[si]?.opts?.useSingleDollar;
2136
2172
  }
2137
- function Xr() {
2173
+ function ui() {
2174
+ return ci ||= ai({ useSingleDollar: li() }), ci;
2175
+ }
2176
+ function di() {
2138
2177
  if (typeof window > "u") return null;
2139
- let e = window[qr];
2178
+ let e = window[oi];
2140
2179
  return typeof e?.renderMath == "function" ? e : null;
2141
2180
  }
2142
- var Zr = async (e) => {
2181
+ var fi = async (e) => {
2143
2182
  if (typeof window > "u") return;
2144
2183
  let t = typeof e == "string", n;
2145
2184
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
2146
- let r = Xr();
2147
- return r ? await r.renderMath?.(n) : await Yr()(n), t ? n.innerHTML : void 0;
2148
- }, Qr = [
2185
+ let r = di();
2186
+ return r ? await r.renderMath?.(n) : await ui()(n), t ? n.innerHTML : void 0;
2187
+ }, pi = [
2149
2188
  "nbsp iexcl cent pound curren yen brvbar sect uml copy ordf laquo not shy reg macr",
2150
2189
  "deg plusmn sup2 sup3 acute micro para middot cedil sup1 ordm raquo frac14 frac12 frac34 iquest",
2151
2190
  "Agrave Aacute Acirc Atilde Auml Aring AElig Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml",
2152
2191
  "ETH Ntilde Ograve Oacute Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig",
2153
2192
  "agrave aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute icirc iuml",
2154
2193
  "eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute ucirc uuml yacute thorn yuml"
2155
- ].join(" "), $r = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", ei = new Map(Object.entries({
2194
+ ].join(" "), mi = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", hi = new Map(Object.entries({
2156
2195
  quot: 34,
2157
2196
  amp: 38,
2158
2197
  apos: 39,
@@ -2183,16 +2222,16 @@ var Zr = async (e) => {
2183
2222
  le: 8804,
2184
2223
  ge: 8805
2185
2224
  }));
2186
- for (let [e, t] of Qr.split(" ").entries()) ei.set(t, 160 + e);
2187
- for (let [e, t] of $r.split(" ").entries()) ei.set(t, 945 + e), t !== "sigmaf" && ei.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2188
- var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, ri = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, ii = (e, t) => {
2225
+ for (let [e, t] of pi.split(" ").entries()) hi.set(t, 160 + e);
2226
+ for (let [e, t] of mi.split(" ").entries()) hi.set(t, 945 + e), t !== "sigmaf" && hi.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2227
+ var gi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, _i = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, vi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, yi = (e, t) => {
2189
2228
  if (t[0] === "#") {
2190
2229
  let e = t[1] === "x" || t[1] === "X", n = Number.parseInt(t.slice(e ? 2 : 1), e ? 16 : 10), r = n > 0 && n <= 1114111 && (n < 55296 || n > 57343);
2191
2230
  return String.fromCodePoint(r ? n : 65533);
2192
2231
  }
2193
- let n = ei.get(t);
2232
+ let n = hi.get(t);
2194
2233
  return n === void 0 ? e : String.fromCodePoint(n);
2195
- }, ai = (e) => typeof e == "string" ? e.replace(ti, " ").replace(ni, "").replace(ri, ii).replace(/\s+/g, " ").trim() : "", oi = {
2234
+ }, bi = (e) => typeof e == "string" ? e.replace(gi, " ").replace(_i, "").replace(vi, yi).replace(/\s+/g, " ").trim() : "", xi = {
2196
2235
  translation: {
2197
2236
  categorize: {
2198
2237
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -2332,7 +2371,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2332
2371
  hideNote: "Hide Note",
2333
2372
  cancel: "Cancel"
2334
2373
  }
2335
- }, si = {
2374
+ }, Si = {
2336
2375
  translation: {
2337
2376
  categorize: {
2338
2377
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -2472,55 +2511,55 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2472
2511
  hideNote: "Ocultar Nota",
2473
2512
  cancel: "Cancelar"
2474
2513
  }
2475
- }, Z = (e) => typeof e == "string", ci = () => {
2514
+ }, Z = (e) => typeof e == "string", Ci = () => {
2476
2515
  let e, t, n = new Promise((n, r) => {
2477
2516
  e = n, t = r;
2478
2517
  });
2479
2518
  return n.resolve = e, n.reject = t, n;
2480
- }, li = (e) => e == null ? "" : "" + e, ui = (e, t, n) => {
2519
+ }, wi = (e) => e == null ? "" : "" + e, Ti = (e, t, n) => {
2481
2520
  e.forEach((e) => {
2482
2521
  t[e] && (n[e] = t[e]);
2483
2522
  });
2484
- }, di = /###/g, fi = (e) => e && e.indexOf("###") > -1 ? e.replace(di, ".") : e, pi = (e) => !e || Z(e), mi = (e, t, n) => {
2523
+ }, Ei = /###/g, Di = (e) => e && e.indexOf("###") > -1 ? e.replace(Ei, ".") : e, Oi = (e) => !e || Z(e), ki = (e, t, n) => {
2485
2524
  let r = Z(t) ? t.split(".") : t, i = 0;
2486
2525
  for (; i < r.length - 1;) {
2487
- if (pi(e)) return {};
2488
- let t = fi(r[i]);
2526
+ if (Oi(e)) return {};
2527
+ let t = Di(r[i]);
2489
2528
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
2490
2529
  }
2491
- return pi(e) ? {} : {
2530
+ return Oi(e) ? {} : {
2492
2531
  obj: e,
2493
- k: fi(r[i])
2532
+ k: Di(r[i])
2494
2533
  };
2495
- }, hi = (e, t, n) => {
2496
- let { obj: r, k: i } = mi(e, t, Object);
2534
+ }, Ai = (e, t, n) => {
2535
+ let { obj: r, k: i } = ki(e, t, Object);
2497
2536
  if (r !== void 0 || t.length === 1) {
2498
2537
  r[i] = n;
2499
2538
  return;
2500
2539
  }
2501
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = mi(e, o, Object);
2502
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = mi(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2540
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = ki(e, o, Object);
2541
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = ki(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2503
2542
  s.obj[`${s.k}.${a}`] = n;
2504
- }, gi = (e, t, n, r) => {
2505
- let { obj: i, k: a } = mi(e, t, Object);
2543
+ }, ji = (e, t, n, r) => {
2544
+ let { obj: i, k: a } = ki(e, t, Object);
2506
2545
  i[a] = i[a] || [], i[a].push(n);
2507
- }, _i = (e, t) => {
2508
- let { obj: n, k: r } = mi(e, t);
2546
+ }, Mi = (e, t) => {
2547
+ let { obj: n, k: r } = ki(e, t);
2509
2548
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
2510
- }, vi = (e, t, n) => {
2511
- let r = _i(e, n);
2512
- return r === void 0 ? _i(t, n) : r;
2513
- }, yi = (e, t, n) => {
2514
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : yi(e[r], t[r], n) : e[r] = t[r]);
2549
+ }, Ni = (e, t, n) => {
2550
+ let r = Mi(e, n);
2551
+ return r === void 0 ? Mi(t, n) : r;
2552
+ }, Pi = (e, t, n) => {
2553
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : Pi(e[r], t[r], n) : e[r] = t[r]);
2515
2554
  return e;
2516
- }, bi = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), xi = {
2555
+ }, Fi = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Ii = {
2517
2556
  "&": "&amp;",
2518
2557
  "<": "&lt;",
2519
2558
  ">": "&gt;",
2520
2559
  "\"": "&quot;",
2521
2560
  "'": "&#39;",
2522
2561
  "/": "&#x2F;"
2523
- }, Si = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => xi[e]) : e, Ci = class {
2562
+ }, Li = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => Ii[e]) : e, Ri = class {
2524
2563
  constructor(e) {
2525
2564
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2526
2565
  }
@@ -2530,23 +2569,23 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2530
2569
  let n = new RegExp(e);
2531
2570
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
2532
2571
  }
2533
- }, wi = [
2572
+ }, zi = [
2534
2573
  " ",
2535
2574
  ",",
2536
2575
  "?",
2537
2576
  "!",
2538
2577
  ";"
2539
- ], Ti = new Ci(20), Ei = (e, t, n) => {
2578
+ ], Bi = new Ri(20), Vi = (e, t, n) => {
2540
2579
  t ||= "", n ||= "";
2541
- let r = wi.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2580
+ let r = zi.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2542
2581
  if (r.length === 0) return !0;
2543
- let i = Ti.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2582
+ let i = Bi.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2544
2583
  if (!a) {
2545
2584
  let t = e.indexOf(n);
2546
2585
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
2547
2586
  }
2548
2587
  return a;
2549
- }, Di = (e, t, n = ".") => {
2588
+ }, Hi = (e, t, n = ".") => {
2550
2589
  if (!e) return;
2551
2590
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
2552
2591
  let r = t.split(n), i = e;
@@ -2565,7 +2604,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2565
2604
  i = t;
2566
2605
  }
2567
2606
  return i;
2568
- }, Oi = (e) => e?.replace(/_/g, "-"), ki = {
2607
+ }, Ui = (e) => e?.replace(/_/g, "-"), Wi = {
2569
2608
  type: "logger",
2570
2609
  log(e) {
2571
2610
  this.output("log", e);
@@ -2584,7 +2623,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2584
2623
  this.init(e, t);
2585
2624
  }
2586
2625
  init(e, t = {}) {
2587
- this.prefix = t.prefix || "i18next:", this.logger = e || ki, this.options = t, this.debug = t.debug;
2626
+ this.prefix = t.prefix || "i18next:", this.logger = e || Wi, this.options = t, this.debug = t.debug;
2588
2627
  }
2589
2628
  log(...e) {
2590
2629
  return this.forward(e, "log", "", !0);
@@ -2610,7 +2649,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2610
2649
  clone(t) {
2611
2650
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
2612
2651
  }
2613
- }(), Ai = class {
2652
+ }(), Gi = class {
2614
2653
  constructor() {
2615
2654
  this.observers = {};
2616
2655
  }
@@ -2637,7 +2676,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2637
2676
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
2638
2677
  });
2639
2678
  }
2640
- }, ji = class extends Ai {
2679
+ }, Ki = class extends Gi {
2641
2680
  constructor(e, t = {
2642
2681
  ns: ["translation"],
2643
2682
  defaultNS: "translation"
@@ -2654,12 +2693,12 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2654
2693
  getResource(e, t, n, r = {}) {
2655
2694
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
2656
2695
  e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : Z(n) && i ? o.push(...n.split(i)) : o.push(n)));
2657
- let s = _i(this.data, o);
2658
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : Di(this.data?.[e]?.[t], n, i);
2696
+ let s = Mi(this.data, o);
2697
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : Hi(this.data?.[e]?.[t], n, i);
2659
2698
  }
2660
2699
  addResource(e, t, n, r, i = { silent: !1 }) {
2661
2700
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
2662
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), hi(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2701
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Ai(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2663
2702
  }
2664
2703
  addResources(e, t, n, r = { silent: !1 }) {
2665
2704
  for (let r in n) (Z(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
@@ -2671,11 +2710,11 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2671
2710
  }) {
2672
2711
  let o = [e, t];
2673
2712
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
2674
- let s = _i(this.data, o) || {};
2675
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? yi(s, n, i) : s = {
2713
+ let s = Mi(this.data, o) || {};
2714
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? Pi(s, n, i) : s = {
2676
2715
  ...s,
2677
2716
  ...n
2678
- }, hi(this.data, o, s), a.silent || this.emit("added", e, t, n);
2717
+ }, Ai(this.data, o, s), a.silent || this.emit("added", e, t, n);
2679
2718
  }
2680
2719
  removeResourceBundle(e, t) {
2681
2720
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -2696,7 +2735,7 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2696
2735
  toJSON() {
2697
2736
  return this.data;
2698
2737
  }
2699
- }, Mi = {
2738
+ }, qi = {
2700
2739
  processors: {},
2701
2740
  addPostProcessor(e) {
2702
2741
  this.processors[e.name] = e;
@@ -2706,22 +2745,22 @@ var ti = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, ni = /<
2706
2745
  t = this.processors[e]?.process(t, n, r, i) ?? t;
2707
2746
  }), t;
2708
2747
  }
2709
- }, Ni = Symbol("i18next/PATH_KEY");
2710
- function Pi() {
2748
+ }, Ji = Symbol("i18next/PATH_KEY");
2749
+ function Yi() {
2711
2750
  let e = [], t = Object.create(null), n;
2712
- return t.get = (r, i) => (n?.revoke?.(), i === Ni ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2751
+ return t.get = (r, i) => (n?.revoke?.(), i === Ji ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2713
2752
  }
2714
- function Fi(e, t) {
2715
- let { [Ni]: n } = e(Pi()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2753
+ function Xi(e, t) {
2754
+ let { [Ji]: n } = e(Yi()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2716
2755
  if (n.length > 1 && i) {
2717
2756
  let e = t?.ns, a = Array.isArray(e) ? e : null;
2718
2757
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
2719
2758
  }
2720
2759
  return n.join(r);
2721
2760
  }
2722
- var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", Ri = class e extends Ai {
2761
+ var Zi = {}, Qi = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", $i = class e extends Gi {
2723
2762
  constructor(e, t = {}) {
2724
- super(), ui([
2763
+ super(), Ti([
2725
2764
  "resourceStore",
2726
2765
  "languageUtils",
2727
2766
  "pluralResolver",
@@ -2739,13 +2778,13 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2739
2778
  if (e == null) return !1;
2740
2779
  let r = this.resolve(e, n);
2741
2780
  if (r?.res === void 0) return !1;
2742
- let i = Li(r.res);
2781
+ let i = Qi(r.res);
2743
2782
  return !(n.returnObjects === !1 && i);
2744
2783
  }
2745
2784
  extractFromKey(e, t) {
2746
2785
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
2747
2786
  n === void 0 && (n = ":");
2748
- let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ei(e, n, r);
2787
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Vi(e, n, r);
2749
2788
  if (a && !o) {
2750
2789
  let t = e.match(this.interpolator.nestingRegexp);
2751
2790
  if (t && t.length > 0) return {
@@ -2763,10 +2802,10 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2763
2802
  translate(t, n, r) {
2764
2803
  let i = typeof n == "object" ? { ...n } : n;
2765
2804
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
2766
- typeof t == "function" && (t = Fi(t, {
2805
+ typeof t == "function" && (t = Xi(t, {
2767
2806
  ...this.options,
2768
2807
  ...i
2769
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? Fi(e, {
2808
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? Xi(e, {
2770
2809
  ...this.options,
2771
2810
  ...i
2772
2811
  }) : String(e));
@@ -2794,7 +2833,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2794
2833
  "[object RegExp]"
2795
2834
  ], _ = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, v = !this.i18nFormat || this.i18nFormat.handleAsObject, y = i.count !== void 0 && !Z(i.count), b = e.hasDefaultValue(i), te = y ? this.pluralResolver.getSuffix(d, i.count, i) : "", ne = i.ordinal && y ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", re = y && !i.ordinal && i.count === 0, x = re && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${te}`] || i[`defaultValue${ne}`] || i.defaultValue, S = m;
2796
2835
  v && !m && b && (S = x);
2797
- let ie = Li(S), ae = Object.prototype.toString.apply(S);
2836
+ let ie = Qi(S), ae = Object.prototype.toString.apply(S);
2798
2837
  if (v && S && ie && ee.indexOf(ae) < 0 && !(Z(_) && Array.isArray(S))) {
2799
2838
  if (!i.returnObjects && !this.options.returnObjects) {
2800
2839
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -2810,7 +2849,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2810
2849
  let r = `${n}${o}${e}`;
2811
2850
  b && !m ? t[e] = this.translate(r, {
2812
2851
  ...i,
2813
- defaultValue: Li(x) ? x[e] : void 0,
2852
+ defaultValue: Qi(x) ? x[e] : void 0,
2814
2853
  joinArrays: !1,
2815
2854
  ns: c
2816
2855
  }) : t[e] = this.translate(r, {
@@ -2881,7 +2920,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2881
2920
  !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();
2882
2921
  }
2883
2922
  let a = n.postProcess || this.options.postProcess, o = Z(a) ? [a] : a;
2884
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = Mi.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
2923
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = qi.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
2885
2924
  i18nResolved: {
2886
2925
  ...r,
2887
2926
  usedParams: this.getUsedParamsDetails(n)
@@ -2891,7 +2930,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2891
2930
  }
2892
2931
  resolve(e, t = {}) {
2893
2932
  let n, r, i, a, o;
2894
- return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? Fi(e, {
2933
+ return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? Xi(e, {
2895
2934
  ...this.options,
2896
2935
  ...t
2897
2936
  }) : e)), e.forEach((e) => {
@@ -2902,7 +2941,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2902
2941
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
2903
2942
  let u = t.count !== void 0 && !Z(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (Z(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2904
2943
  l.forEach((e) => {
2905
- this.isValidLookup(n) || (o = e, !Ii[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Ii[`${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) => {
2944
+ this.isValidLookup(n) || (o = e, !Zi[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Zi[`${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) => {
2906
2945
  if (this.isValidLookup(n)) return;
2907
2946
  a = r;
2908
2947
  let o = [c];
@@ -2965,17 +3004,17 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2965
3004
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
2966
3005
  return !1;
2967
3006
  }
2968
- }, zi = class {
3007
+ }, ea = class {
2969
3008
  constructor(e) {
2970
3009
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Q.create("languageUtils");
2971
3010
  }
2972
3011
  getScriptPartFromCode(e) {
2973
- if (e = Oi(e), !e || e.indexOf("-") < 0) return null;
3012
+ if (e = Ui(e), !e || e.indexOf("-") < 0) return null;
2974
3013
  let t = e.split("-");
2975
3014
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
2976
3015
  }
2977
3016
  getLanguagePartFromCode(e) {
2978
- if (e = Oi(e), !e || e.indexOf("-") < 0) return e;
3017
+ if (e = Ui(e), !e || e.indexOf("-") < 0) return e;
2979
3018
  let t = e.split("-");
2980
3019
  return this.formatLanguageCode(t[0]);
2981
3020
  }
@@ -3025,17 +3064,17 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3025
3064
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
3026
3065
  }), r;
3027
3066
  }
3028
- }, Bi = {
3067
+ }, ta = {
3029
3068
  zero: 0,
3030
3069
  one: 1,
3031
3070
  two: 2,
3032
3071
  few: 3,
3033
3072
  many: 4,
3034
3073
  other: 5
3035
- }, Vi = {
3074
+ }, na = {
3036
3075
  select: (e) => e === 1 ? "one" : "other",
3037
3076
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
3038
- }, Hi = class {
3077
+ }, ra = class {
3039
3078
  constructor(e, t = {}) {
3040
3079
  this.languageUtils = e, this.options = t, this.logger = Q.create("pluralResolver"), this.pluralRulesCache = {};
3041
3080
  }
@@ -3043,7 +3082,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3043
3082
  this.pluralRulesCache = {};
3044
3083
  }
3045
3084
  getRule(e, t = {}) {
3046
- let n = Oi(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3085
+ let n = Ui(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3047
3086
  cleanedCode: n,
3048
3087
  type: r
3049
3088
  });
@@ -3052,8 +3091,8 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3052
3091
  try {
3053
3092
  a = new Intl.PluralRules(n, { type: r });
3054
3093
  } catch {
3055
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Vi;
3056
- if (!e.match(/-|_/)) return Vi;
3094
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), na;
3095
+ if (!e.match(/-|_/)) return na;
3057
3096
  let n = this.languageUtils.getLanguagePartFromCode(e);
3058
3097
  a = this.getRule(n, t);
3059
3098
  }
@@ -3068,23 +3107,23 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3068
3107
  }
3069
3108
  getSuffixes(e, t = {}) {
3070
3109
  let n = this.getRule(e, t);
3071
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Bi[e] - Bi[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3110
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => ta[e] - ta[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3072
3111
  }
3073
3112
  getSuffix(e, t, n = {}) {
3074
3113
  let r = this.getRule(e, n);
3075
3114
  return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
3076
3115
  }
3077
- }, Ui = (e, t, n, r = ".", i = !0) => {
3078
- let a = vi(e, t, n);
3079
- return !a && i && Z(n) && (a = Di(e, n, r), a === void 0 && (a = Di(t, n, r))), a;
3080
- }, Wi = (e) => e.replace(/\$/g, "$$$$"), Gi = class {
3116
+ }, ia = (e, t, n, r = ".", i = !0) => {
3117
+ let a = Ni(e, t, n);
3118
+ return !a && i && Z(n) && (a = Hi(e, n, r), a === void 0 && (a = Hi(t, n, r))), a;
3119
+ }, aa = (e) => e.replace(/\$/g, "$$$$"), oa = class {
3081
3120
  constructor(e = {}) {
3082
3121
  this.logger = Q.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
3083
3122
  }
3084
3123
  init(e = {}) {
3085
3124
  e.interpolation ||= { escapeValue: !0 };
3086
3125
  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: ee } = e.interpolation;
3087
- this.escape = t === void 0 ? Si : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? bi(i) : a || "{{", this.suffix = o ? bi(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? bi(d) : f || bi("$t("), this.nestingSuffix = p ? bi(p) : m || bi(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3126
+ this.escape = t === void 0 ? Li : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? Fi(i) : a || "{{", this.suffix = o ? Fi(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? Fi(d) : f || Fi("$t("), this.nestingSuffix = p ? Fi(p) : m || Fi(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3088
3127
  }
3089
3128
  reset() {
3090
3129
  this.options && this.init(this.options);
@@ -3096,7 +3135,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3096
3135
  interpolate(e, t, n, r) {
3097
3136
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
3098
3137
  if (e.indexOf(this.formatSeparator) < 0) {
3099
- let i = Ui(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3138
+ let i = ia(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3100
3139
  return this.alwaysFormat ? this.format(i, void 0, n, {
3101
3140
  ...r,
3102
3141
  ...t,
@@ -3104,7 +3143,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3104
3143
  }) : i;
3105
3144
  }
3106
3145
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
3107
- return this.format(Ui(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3146
+ return this.format(ia(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3108
3147
  ...r,
3109
3148
  ...t,
3110
3149
  interpolationkey: a
@@ -3114,10 +3153,10 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3114
3153
  let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
3115
3154
  return [{
3116
3155
  regex: this.regexpUnescape,
3117
- safeValue: (e) => Wi(e)
3156
+ safeValue: (e) => aa(e)
3118
3157
  }, {
3119
3158
  regex: this.regexp,
3120
- safeValue: (e) => this.escapeValue ? Wi(this.escape(e)) : Wi(e)
3159
+ safeValue: (e) => this.escapeValue ? aa(this.escape(e)) : aa(e)
3121
3160
  }].forEach((t) => {
3122
3161
  for (o = 0; i = t.regex.exec(e);) {
3123
3162
  let n = i[1].trim();
@@ -3129,7 +3168,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3129
3168
  a = i[0];
3130
3169
  continue;
3131
3170
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
3132
- else !Z(a) && !this.useRawValueToEscape && (a = li(a));
3171
+ else !Z(a) && !this.useRawValueToEscape && (a = wi(a));
3133
3172
  let s = t.safeValue(a);
3134
3173
  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;
3135
3174
  }
@@ -3139,7 +3178,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3139
3178
  let r, i, a, o = (e, t) => {
3140
3179
  let n = this.nestingOptionsSeparator;
3141
3180
  if (e.indexOf(n) < 0) return e;
3142
- let r = e.split(RegExp(`${bi(n)}[ ]*{`)), i = `{${r[1]}`;
3181
+ let r = e.split(RegExp(`${Fi(n)}[ ]*{`)), i = `{${r[1]}`;
3143
3182
  e = r[0], i = this.interpolate(i, a);
3144
3183
  let o = i.match(/'/g), s = i.match(/"/g);
3145
3184
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -3158,14 +3197,14 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3158
3197
  a = { ...n }, a = a.replace && !Z(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
3159
3198
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
3160
3199
  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 && !Z(i)) return i;
3161
- Z(i) || (i = li(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, {
3200
+ Z(i) || (i = wi(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, {
3162
3201
  ...n,
3163
3202
  interpolationkey: r[1].trim()
3164
3203
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
3165
3204
  }
3166
3205
  return e;
3167
3206
  }
3168
- }, Ki = (e) => {
3207
+ }, sa = (e) => {
3169
3208
  let t = e.toLowerCase().trim(), n = {};
3170
3209
  if (e.indexOf("(") > -1) {
3171
3210
  let r = e.split("(");
@@ -3182,7 +3221,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3182
3221
  formatName: t,
3183
3222
  formatOptions: n
3184
3223
  };
3185
- }, qi = (e) => {
3224
+ }, ca = (e) => {
3186
3225
  let t = {};
3187
3226
  return (n, r, i) => {
3188
3227
  let a = i;
@@ -3191,15 +3230,15 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3191
3230
  [i.interpolationkey]: void 0
3192
3231
  });
3193
3232
  let o = r + JSON.stringify(a), s = t[o];
3194
- return s || (s = e(Oi(r), i), t[o] = s), s(n);
3233
+ return s || (s = e(Ui(r), i), t[o] = s), s(n);
3195
3234
  };
3196
- }, Ji = (e) => (t, n, r) => e(Oi(n), r)(t), Yi = class {
3235
+ }, la = (e) => (t, n, r) => e(Ui(n), r)(t), ua = class {
3197
3236
  constructor(e = {}) {
3198
3237
  this.logger = Q.create("formatter"), this.options = e, this.init(e);
3199
3238
  }
3200
3239
  init(e, t = { interpolation: {} }) {
3201
3240
  this.formatSeparator = t.interpolation.formatSeparator || ",";
3202
- let n = t.cacheInBuiltFormats ? qi : Ji;
3241
+ let n = t.cacheInBuiltFormats ? ca : la;
3203
3242
  this.formats = {
3204
3243
  number: n((e, t) => {
3205
3244
  let n = new Intl.NumberFormat(e, { ...t });
@@ -3230,7 +3269,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3230
3269
  this.formats[e.toLowerCase().trim()] = t;
3231
3270
  }
3232
3271
  addCached(e, t) {
3233
- this.formats[e.toLowerCase().trim()] = qi(t);
3272
+ this.formats[e.toLowerCase().trim()] = ca(t);
3234
3273
  }
3235
3274
  format(e, t, n, r = {}) {
3236
3275
  let i = t.split(this.formatSeparator);
@@ -3239,7 +3278,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3239
3278
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
3240
3279
  }
3241
3280
  return i.reduce((e, t) => {
3242
- let { formatName: i, formatOptions: a } = Ki(t);
3281
+ let { formatName: i, formatOptions: a } = sa(t);
3243
3282
  if (this.formats[i]) {
3244
3283
  let t = e;
3245
3284
  try {
@@ -3257,9 +3296,9 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3257
3296
  return e;
3258
3297
  }, e);
3259
3298
  }
3260
- }, Xi = (e, t) => {
3299
+ }, da = (e, t) => {
3261
3300
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
3262
- }, Zi = class extends Ai {
3301
+ }, fa = class extends Gi {
3263
3302
  constructor(e, t, n, r = {}) {
3264
3303
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Q.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);
3265
3304
  }
@@ -3289,7 +3328,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3289
3328
  t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
3290
3329
  let o = {};
3291
3330
  this.queue.forEach((n) => {
3292
- gi(n.loaded, [i], a), Xi(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3331
+ ji(n.loaded, [i], a), da(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3293
3332
  o[e] || (o[e] = {});
3294
3333
  let t = n.loaded[e];
3295
3334
  t.length && t.forEach((t) => {
@@ -3379,7 +3418,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3379
3418
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
3380
3419
  }
3381
3420
  }
3382
- }, Qi = () => ({
3421
+ }, pa = () => ({
3383
3422
  debug: !1,
3384
3423
  initAsync: !0,
3385
3424
  ns: ["translation"],
@@ -3436,15 +3475,15 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3436
3475
  skipOnVariables: !0
3437
3476
  },
3438
3477
  cacheInBuiltFormats: !0
3439
- }), $i = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), ea = () => {}, ta = (e) => {
3478
+ }), ma = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), ha = () => {}, ga = (e) => {
3440
3479
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
3441
3480
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
3442
3481
  });
3443
- }, na = "__i18next_supportNoticeShown", ra = () => !!(typeof globalThis < "u" && globalThis[na] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ia = () => {
3444
- typeof globalThis < "u" && (globalThis[na] = !0);
3445
- }, aa = (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 Ai {
3482
+ }, _a = "__i18next_supportNoticeShown", va = () => !!(typeof globalThis < "u" && globalThis[_a] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ya = () => {
3483
+ typeof globalThis < "u" && (globalThis[_a] = !0);
3484
+ }, ba = (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 Gi {
3446
3485
  constructor(e = {}, t) {
3447
- if (super(), this.options = $i(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, ta(this), t && !this.isInitialized && !e.isClone) {
3486
+ if (super(), this.options = ma(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, ga(this), t && !this.isInitialized && !e.isClone) {
3448
3487
  if (!this.options.initAsync) return this.init(e, t), this;
3449
3488
  setTimeout(() => {
3450
3489
  this.init(e, t);
@@ -3453,35 +3492,35 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3453
3492
  }
3454
3493
  init(e = {}, t) {
3455
3494
  this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (Z(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3456
- let n = Qi();
3495
+ let n = pa();
3457
3496
  this.options = {
3458
3497
  ...n,
3459
3498
  ...this.options,
3460
- ...$i(e)
3499
+ ...ma(e)
3461
3500
  }, this.options.interpolation = {
3462
3501
  ...n.interpolation,
3463
3502
  ...this.options.interpolation
3464
- }, 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 && !aa(this) && !ra() && (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 💙"), ia());
3503
+ }, 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 && !ba(this) && !va() && (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 💙"), ya());
3465
3504
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
3466
3505
  if (!this.options.isClone) {
3467
3506
  this.modules.logger ? Q.init(r(this.modules.logger), this.options) : Q.init(null, this.options);
3468
3507
  let e;
3469
- e = this.modules.formatter ? this.modules.formatter : Yi;
3470
- let t = new zi(this.options);
3471
- this.store = new ji(this.options.resources, this.options);
3508
+ e = this.modules.formatter ? this.modules.formatter : ua;
3509
+ let t = new ea(this.options);
3510
+ this.store = new Ki(this.options.resources, this.options);
3472
3511
  let i = this.services;
3473
- i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Hi(t, {
3512
+ i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ra(t, {
3474
3513
  prepend: this.options.pluralSeparator,
3475
3514
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
3476
- }), 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 Gi(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Zi(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3515
+ }), 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 oa(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new fa(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3477
3516
  this.emit(e, ...t);
3478
- }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Ri(this.services, this.options), this.translator.on("*", (e, ...t) => {
3517
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new $i(this.services, this.options), this.translator.on("*", (e, ...t) => {
3479
3518
  this.emit(e, ...t);
3480
3519
  }), this.modules.external.forEach((e) => {
3481
3520
  e.init && e.init(this);
3482
3521
  });
3483
3522
  }
3484
- if (this.format = this.options.interpolation.format, t ||= ea, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3523
+ if (this.format = this.options.interpolation.format, t ||= ha, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3485
3524
  let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3486
3525
  e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
3487
3526
  }
@@ -3500,7 +3539,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3500
3539
  ].forEach((e) => {
3501
3540
  this[e] = (...t) => (this.store[e](...t), this);
3502
3541
  });
3503
- let i = ci(), a = () => {
3542
+ let i = Ci(), a = () => {
3504
3543
  let e = (e, n) => {
3505
3544
  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);
3506
3545
  };
@@ -3509,7 +3548,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3509
3548
  };
3510
3549
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
3511
3550
  }
3512
- loadResources(e, t = ea) {
3551
+ loadResources(e, t = ha) {
3513
3552
  let n = t, r = Z(e) ? e : this.language;
3514
3553
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
3515
3554
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -3524,15 +3563,15 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3524
3563
  } else n(null);
3525
3564
  }
3526
3565
  reloadResources(e, t, n) {
3527
- let r = ci();
3528
- 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 ||= ea, this.services.backendConnector.reload(e, t, (e) => {
3566
+ let r = Ci();
3567
+ 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 ||= ha, this.services.backendConnector.reload(e, t, (e) => {
3529
3568
  r.resolve(), n(e);
3530
3569
  }), r;
3531
3570
  }
3532
3571
  use(e) {
3533
3572
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3534
3573
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3535
- 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" && Mi.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3574
+ 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" && qi.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3536
3575
  }
3537
3576
  setResolvedLanguage(e) {
3538
3577
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -3548,7 +3587,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3548
3587
  }
3549
3588
  changeLanguage(e, t) {
3550
3589
  this.isLanguageChangingTo = e;
3551
- let n = ci();
3590
+ let n = Ci();
3552
3591
  this.emit("languageChanging", e);
3553
3592
  let r = (e) => {
3554
3593
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -3571,9 +3610,9 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3571
3610
  ...this.options,
3572
3611
  ...a
3573
3612
  };
3574
- typeof a.keyPrefix == "function" && (a.keyPrefix = Fi(a.keyPrefix, o));
3613
+ typeof a.keyPrefix == "function" && (a.keyPrefix = Xi(a.keyPrefix, o));
3575
3614
  let s = this.options.keySeparator || ".", c;
3576
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = Fi(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = Fi(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3615
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = Xi(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = Xi(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3577
3616
  };
3578
3617
  return Z(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3579
3618
  }
@@ -3602,7 +3641,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3602
3641
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
3603
3642
  }
3604
3643
  loadNamespaces(e, t) {
3605
- let n = ci();
3644
+ let n = Ci();
3606
3645
  return this.options.ns ? (Z(e) && (e = [e]), e.forEach((e) => {
3607
3646
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
3608
3647
  }), this.loadResources((e) => {
@@ -3610,7 +3649,7 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3610
3649
  }), n) : (t && t(), Promise.resolve());
3611
3650
  }
3612
3651
  loadLanguages(e, t) {
3613
- let n = ci();
3652
+ let n = Ci();
3614
3653
  Z(e) && (e = [e]);
3615
3654
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
3616
3655
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
@@ -3626,14 +3665,14 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3626
3665
  if (e && e.direction) return e.direction;
3627
3666
  }
3628
3667
  } catch {}
3629
- 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 zi(Qi());
3668
+ 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 ea(pa());
3630
3669
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3631
3670
  }
3632
3671
  static createInstance(t = {}, n) {
3633
3672
  let r = new e(t, n);
3634
3673
  return r.createInstance = e.createInstance, r;
3635
3674
  }
3636
- cloneInstance(t = {}, n = ea) {
3675
+ cloneInstance(t = {}, n = ha) {
3637
3676
  let r = t.forkResourceStore;
3638
3677
  r && delete t.forkResourceStore;
3639
3678
  let i = {
@@ -3647,18 +3686,18 @@ var Ii = {}, Li = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3647
3686
  "language"
3648
3687
  ].forEach((e) => {
3649
3688
  a[e] = this[e];
3650
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new ji(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) {
3689
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new Ki(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) {
3651
3690
  let e = {
3652
- ...Qi().interpolation,
3691
+ ...pa().interpolation,
3653
3692
  ...this.options.interpolation,
3654
3693
  ...t.interpolation
3655
3694
  }, n = {
3656
3695
  ...i,
3657
3696
  interpolation: e
3658
3697
  };
3659
- a.services.interpolator = new Gi(n);
3698
+ a.services.interpolator = new oa(n);
3660
3699
  }
3661
- return a.translator = new Ri(a.services, i), a.translator.on("*", (e, ...t) => {
3700
+ return a.translator = new $i(a.services, i), a.translator.on("*", (e, ...t) => {
3662
3701
  a.emit(e, ...t);
3663
3702
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
3664
3703
  }
@@ -3679,13 +3718,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
3679
3718
  lng: "en",
3680
3719
  showSupportNotice: !1,
3681
3720
  resources: {
3682
- en: oi,
3683
- es: si
3721
+ en: xi,
3722
+ es: Si
3684
3723
  }
3685
3724
  });
3686
3725
  //#endregion
3687
3726
  //#region src/i18n.ts
3688
- var { translator: oa } = {
3727
+ var { translator: xa } = {
3689
3728
  translator: {
3690
3729
  ...$,
3691
3730
  t: (e, t) => {
@@ -3717,23 +3756,23 @@ var { translator: oa } = {
3717
3756
  label: "Spanish"
3718
3757
  }]
3719
3758
  };
3720
- function sa(e, t) {
3721
- return oa.t(`translation:simpleCloze:${e}`, { lng: t });
3759
+ function Sa(e, t) {
3760
+ return xa.t(`translation:simpleCloze:${e}`, { lng: t });
3722
3761
  }
3723
3762
  //#endregion
3724
3763
  //#region src/print/Print.svelte
3725
- var ca = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), la = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), ua = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), da = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), fa = /* @__PURE__ */ cr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), pa = {
3764
+ var Ca = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), wa = /* @__PURE__ */ cr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Ta = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Ea = /* @__PURE__ */ cr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), Da = /* @__PURE__ */ cr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), Oa = {
3726
3765
  hash: "svelte-1fx5wwa",
3727
3766
  code: "\n /* Self-contained: print players ship no Tailwind or CSS reset. */.simple-cloze-print.svelte-1fx5wwa {padding:1rem;color:var(--pie-text, black);}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa,\n .simple-cloze-print-prompt.svelte-1fx5wwa {margin-bottom:1rem;}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa p,\n .simple-cloze-print-prompt.svelte-1fx5wwa p {margin:0.5em 0;}.simple-cloze-print-prompt.svelte-1fx5wwa strong {font-weight:600;}.simple-cloze-print-response.svelte-1fx5wwa {display:inline-flex;align-items:baseline;gap:0.5rem;}.simple-cloze-print-key-label.svelte-1fx5wwa {font-size:0.875rem;line-height:1.25rem;font-weight:600;}.simple-cloze-print-blank.svelte-1fx5wwa {display:inline-block;min-width:12rem;min-height:1.5rem;padding:0.5rem 0.75rem;border-bottom:2px solid var(--pie-text, black);}.simple-cloze-print-blank--key.svelte-1fx5wwa {min-width:6rem;font-weight:600;}\n\n @media print {.simple-cloze-print.svelte-1fx5wwa {padding:0;}\n }"
3728
3767
  };
3729
- function ma(e, t) {
3730
- Ge(t, !0), Er(e, pa);
3731
- let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ pt(() => r()?.role === "instructor"), a = /* @__PURE__ */ pt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ pt(() => ai(n()?.correctAnswer)), s = /* @__PURE__ */ pt(() => X(i) && !!X(o)), c = /* @__PURE__ */ pt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3768
+ function ka(e, t) {
3769
+ Ge(t, !0), Er(e, Oa);
3770
+ let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ pt(() => r()?.role === "instructor"), a = /* @__PURE__ */ pt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ pt(() => bi(n()?.correctAnswer)), s = /* @__PURE__ */ pt(() => X(i) && !!X(o)), c = /* @__PURE__ */ pt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3732
3771
  pn(() => {
3733
3772
  if (!X(l) || !X(a)) return;
3734
3773
  let e = (e) => console.warn("simple-cloze: MathJax render failed", e);
3735
3774
  try {
3736
- Promise.resolve(Zr(X(l))).catch(e);
3775
+ Promise.resolve(fi(X(l))).catch(e);
3737
3776
  } catch (t) {
3738
3777
  e(t);
3739
3778
  }
@@ -3751,41 +3790,41 @@ function ma(e, t) {
3751
3790
  set options(e = null) {
3752
3791
  r(e), At();
3753
3792
  }
3754
- }, d = fa(), f = $t(d), p = (e) => {
3755
- var t = ca();
3793
+ }, d = Da(), f = $t(d), p = (e) => {
3794
+ var t = Ca();
3756
3795
  Tr(t, () => X(c), !0), Ee(t), lr(e, t);
3757
3796
  };
3758
3797
  wr(f, (e) => {
3759
3798
  X(c) && e(p);
3760
3799
  });
3761
3800
  var m = nn(f, 2), h = (e) => {
3762
- var t = la();
3801
+ var t = wa();
3763
3802
  Tr(t, () => X(a), !0), Ee(t), Fr(t, (e) => N(l, e), () => X(l)), lr(e, t);
3764
3803
  };
3765
3804
  wr(m, (e) => {
3766
3805
  X(a) && e(h);
3767
3806
  });
3768
3807
  var g = nn(m, 2), ee = $t(g), _ = (e) => {
3769
- var t = ua(), r = en(t), i = tn(r, !0), a = tn(nn(r, 2), !0);
3808
+ var t = Ta(), r = en(t), i = tn(r, !0), a = tn(nn(r, 2), !0);
3770
3809
  bn((e) => {
3771
3810
  gr(i, e), gr(a, X(o));
3772
- }, [() => sa("printCorrectAnswer", n()?.language)]), lr(e, t);
3811
+ }, [() => Sa("printCorrectAnswer", n()?.language)]), lr(e, t);
3773
3812
  }, v = (e) => {
3774
- var t = da();
3775
- bn((e) => Ar(t, "aria-label", e), [() => sa("printAnswerBlank", n()?.language)]), lr(e, t);
3813
+ var t = Ea();
3814
+ bn((e) => Ar(t, "aria-label", e), [() => Sa("printAnswerBlank", n()?.language)]), lr(e, t);
3776
3815
  };
3777
3816
  return wr(ee, (e) => {
3778
3817
  X(s) ? e(_) : e(v, -1);
3779
3818
  }), Ee(g), Ee(d), lr(e, d), Ke(u);
3780
3819
  }
3781
- Hr(ma, {
3820
+ Hr(ka, {
3782
3821
  model: { type: "Object" },
3783
3822
  options: { type: "Object" }
3784
3823
  }, [], []);
3785
3824
  //#endregion
3786
3825
  //#region src/print/index.ts
3787
- var ha = ma.element;
3826
+ var Aa = ka.element;
3788
3827
  //#endregion
3789
- export { ha as default };
3828
+ export { Aa as default };
3790
3829
 
3791
3830
  //# sourceMappingURL=print.js.map