@pie-element/simple-cloze 0.1.4-next.10 → 0.1.4-next.11

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.
@@ -1,7 +1,10 @@
1
1
  //#region ../../shared/math-rendering-mathjax/dist/index.js
2
- var e = null;
2
+ var e = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
3
3
  function t(t) {
4
- return typeof window > "u" || window.MathJax?.typesetPromise ? Promise.resolve() : e || (e = new Promise((e, n) => {
4
+ if (typeof window > "u" || window.MathJax?.typesetPromise) return Promise.resolve();
5
+ let n = globalThis, r = n[e];
6
+ if (r) return r;
7
+ let i = new Promise((e, n) => {
5
8
  let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = t, s = {
6
9
  loader: { load: i ? ["a11y/assistive-mml"] : [] },
7
10
  tex: {
@@ -36,7 +39,8 @@ function t(t) {
36
39
  }, c.onerror = () => {
37
40
  n(/* @__PURE__ */ Error("Failed to load MathJax"));
38
41
  }, document.head.appendChild(c);
39
- }), e);
42
+ });
43
+ return n[e] = i, i;
40
44
  }
41
45
  function n() {
42
46
  let e = window.MathJax?.startup?.document;
@@ -55,25 +59,25 @@ function r(e = {}) {
55
59
  await window.MathJax.typesetPromise([r]), n();
56
60
  };
57
61
  }
58
- var i = null;
59
- function a() {
60
- return i ||= r({
62
+ var i = "@pie-lib/math-rendering", a = null;
63
+ function o() {
64
+ return a ||= r({
61
65
  accessibility: !0,
62
66
  useSingleDollar: !0
63
- }), i;
67
+ }), a;
64
68
  }
65
- function o() {
69
+ function s() {
66
70
  if (typeof window > "u") return null;
67
- let e = window["@pie-lib/math-rendering"];
71
+ let e = window[i];
68
72
  return typeof e?.renderMath == "function" ? e : null;
69
73
  }
70
- var s = async (e) => {
74
+ var c = async (e) => {
71
75
  if (typeof window > "u") return;
72
76
  let t = typeof e == "string", n;
73
77
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
74
- let r = o();
75
- return r ? await r.renderMath?.(n) : await a()(n), t ? n.innerHTML : void 0;
76
- }, c = {
78
+ let r = s();
79
+ return r ? await r.renderMath?.(n) : await o()(n), t ? n.innerHTML : void 0;
80
+ }, l = {
77
81
  translation: {
78
82
  categorize: {
79
83
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -213,7 +217,7 @@ var s = async (e) => {
213
217
  hideNote: "Hide Note",
214
218
  cancel: "Cancel"
215
219
  }
216
- }, l = {
220
+ }, u = {
217
221
  translation: {
218
222
  categorize: {
219
223
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -353,55 +357,55 @@ var s = async (e) => {
353
357
  hideNote: "Ocultar Nota",
354
358
  cancel: "Cancelar"
355
359
  }
356
- }, u = (e) => typeof e == "string", d = () => {
360
+ }, d = (e) => typeof e == "string", f = () => {
357
361
  let e, t, n = new Promise((n, r) => {
358
362
  e = n, t = r;
359
363
  });
360
364
  return n.resolve = e, n.reject = t, n;
361
- }, f = (e) => e == null ? "" : "" + e, p = (e, t, n) => {
365
+ }, p = (e) => e == null ? "" : "" + e, m = (e, t, n) => {
362
366
  e.forEach((e) => {
363
367
  t[e] && (n[e] = t[e]);
364
368
  });
365
- }, m = /###/g, h = (e) => e && e.indexOf("###") > -1 ? e.replace(m, ".") : e, g = (e) => !e || u(e), _ = (e, t, n) => {
366
- let r = u(t) ? t.split(".") : t, i = 0;
369
+ }, h = /###/g, g = (e) => e && e.indexOf("###") > -1 ? e.replace(h, ".") : e, _ = (e) => !e || d(e), v = (e, t, n) => {
370
+ let r = d(t) ? t.split(".") : t, i = 0;
367
371
  for (; i < r.length - 1;) {
368
- if (g(e)) return {};
369
- let t = h(r[i]);
372
+ if (_(e)) return {};
373
+ let t = g(r[i]);
370
374
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
371
375
  }
372
- return g(e) ? {} : {
376
+ return _(e) ? {} : {
373
377
  obj: e,
374
- k: h(r[i])
378
+ k: g(r[i])
375
379
  };
376
- }, v = (e, t, n) => {
377
- let { obj: r, k: i } = _(e, t, Object);
380
+ }, y = (e, t, n) => {
381
+ let { obj: r, k: i } = v(e, t, Object);
378
382
  if (r !== void 0 || t.length === 1) {
379
383
  r[i] = n;
380
384
  return;
381
385
  }
382
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = _(e, o, Object);
383
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = _(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
386
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = v(e, o, Object);
387
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = v(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
384
388
  s.obj[`${s.k}.${a}`] = n;
385
- }, y = (e, t, n, r) => {
386
- let { obj: i, k: a } = _(e, t, Object);
389
+ }, b = (e, t, n, r) => {
390
+ let { obj: i, k: a } = v(e, t, Object);
387
391
  i[a] = i[a] || [], i[a].push(n);
388
- }, b = (e, t) => {
389
- let { obj: n, k: r } = _(e, t);
392
+ }, x = (e, t) => {
393
+ let { obj: n, k: r } = v(e, t);
390
394
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
391
- }, x = (e, t, n) => {
392
- let r = b(e, n);
393
- return r === void 0 ? b(t, n) : r;
394
395
  }, S = (e, t, n) => {
395
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? u(e[r]) || e[r] instanceof String || u(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : S(e[r], t[r], n) : e[r] = t[r]);
396
+ let r = x(e, n);
397
+ return r === void 0 ? x(t, n) : r;
398
+ }, C = (e, t, n) => {
399
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? d(e[r]) || e[r] instanceof String || d(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : C(e[r], t[r], n) : e[r] = t[r]);
396
400
  return e;
397
- }, C = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), w = {
401
+ }, w = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), T = {
398
402
  "&": "&amp;",
399
403
  "<": "&lt;",
400
404
  ">": "&gt;",
401
405
  "\"": "&quot;",
402
406
  "'": "&#39;",
403
407
  "/": "&#x2F;"
404
- }, T = (e) => u(e) ? e.replace(/[&<>"'\/]/g, (e) => w[e]) : e, E = class {
408
+ }, E = (e) => d(e) ? e.replace(/[&<>"'\/]/g, (e) => T[e]) : e, D = class {
405
409
  constructor(e) {
406
410
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
407
411
  }
@@ -411,17 +415,17 @@ var s = async (e) => {
411
415
  let n = new RegExp(e);
412
416
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
413
417
  }
414
- }, D = [
418
+ }, O = [
415
419
  " ",
416
420
  ",",
417
421
  "?",
418
422
  "!",
419
423
  ";"
420
- ], O = new E(20), k = (e, t, n) => {
424
+ ], k = new D(20), ee = (e, t, n) => {
421
425
  t ||= "", n ||= "";
422
- let r = D.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
426
+ let r = O.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
423
427
  if (r.length === 0) return !0;
424
- let i = O.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
428
+ let i = k.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
425
429
  if (!a) {
426
430
  let t = e.indexOf(n);
427
431
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
@@ -446,7 +450,7 @@ var s = async (e) => {
446
450
  i = t;
447
451
  }
448
452
  return i;
449
- }, j = (e) => e?.replace(/_/g, "-"), ee = {
453
+ }, j = (e) => e?.replace(/_/g, "-"), te = {
450
454
  type: "logger",
451
455
  log(e) {
452
456
  this.output("log", e);
@@ -465,7 +469,7 @@ var s = async (e) => {
465
469
  this.init(e, t);
466
470
  }
467
471
  init(e, t = {}) {
468
- this.prefix = t.prefix || "i18next:", this.logger = e || ee, this.options = t, this.debug = t.debug;
472
+ this.prefix = t.prefix || "i18next:", this.logger = e || te, this.options = t, this.debug = t.debug;
469
473
  }
470
474
  log(...e) {
471
475
  return this.forward(e, "log", "", !0);
@@ -480,7 +484,7 @@ var s = async (e) => {
480
484
  return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
481
485
  }
482
486
  forward(e, t, n, r) {
483
- return r && !this.debug ? null : (u(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
487
+ return r && !this.debug ? null : (d(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
484
488
  }
485
489
  create(t) {
486
490
  return new e(this.logger, {
@@ -534,16 +538,16 @@ var s = async (e) => {
534
538
  }
535
539
  getResource(e, t, n, r = {}) {
536
540
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
537
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : u(n) && i ? o.push(...n.split(i)) : o.push(n)));
538
- let s = b(this.data, o);
539
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !u(n) ? s : A(this.data?.[e]?.[t], n, i);
541
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : d(n) && i ? o.push(...n.split(i)) : o.push(n)));
542
+ let s = x(this.data, o);
543
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !d(n) ? s : A(this.data?.[e]?.[t], n, i);
540
544
  }
541
545
  addResource(e, t, n, r, i = { silent: !1 }) {
542
546
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
543
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), v(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
547
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), y(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
544
548
  }
545
549
  addResources(e, t, n, r = { silent: !1 }) {
546
- for (let r in n) (u(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
550
+ for (let r in n) (d(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
547
551
  r.silent || this.emit("added", e, t, n);
548
552
  }
549
553
  addResourceBundle(e, t, n, r, i, a = {
@@ -552,11 +556,11 @@ var s = async (e) => {
552
556
  }) {
553
557
  let o = [e, t];
554
558
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
555
- let s = b(this.data, o) || {};
556
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? S(s, n, i) : s = {
559
+ let s = x(this.data, o) || {};
560
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? C(s, n, i) : s = {
557
561
  ...s,
558
562
  ...n
559
- }, v(this.data, o, s), a.silent || this.emit("added", e, t, n);
563
+ }, y(this.data, o, s), a.silent || this.emit("added", e, t, n);
560
564
  }
561
565
  removeResourceBundle(e, t) {
562
566
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -588,21 +592,21 @@ var s = async (e) => {
588
592
  }), t;
589
593
  }
590
594
  }, I = Symbol("i18next/PATH_KEY");
591
- function te() {
595
+ function ne() {
592
596
  let e = [], t = Object.create(null), n;
593
597
  return t.get = (r, i) => (n?.revoke?.(), i === I ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
594
598
  }
595
599
  function L(e, t) {
596
- let { [I]: n } = e(te()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
600
+ let { [I]: n } = e(ne()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
597
601
  if (n.length > 1 && i) {
598
602
  let e = t?.ns, a = Array.isArray(e) ? e : null;
599
603
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
600
604
  }
601
605
  return n.join(r);
602
606
  }
603
- var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B = class e extends N {
607
+ var R = {}, z = (e) => !d(e) && typeof e != "boolean" && typeof e != "number", B = class e extends N {
604
608
  constructor(e, t = {}) {
605
- super(), p([
609
+ super(), m([
606
610
  "resourceStore",
607
611
  "languageUtils",
608
612
  "pluralResolver",
@@ -626,19 +630,19 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
626
630
  extractFromKey(e, t) {
627
631
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
628
632
  n === void 0 && (n = ":");
629
- 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 && !k(e, n, r);
633
+ 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 && !ee(e, n, r);
630
634
  if (a && !o) {
631
635
  let t = e.match(this.interpolator.nestingRegexp);
632
636
  if (t && t.length > 0) return {
633
637
  key: e,
634
- namespaces: u(i) ? [i] : i
638
+ namespaces: d(i) ? [i] : i
635
639
  };
636
640
  let a = e.split(n);
637
641
  (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
638
642
  }
639
643
  return {
640
644
  key: e,
641
- namespaces: u(i) ? [i] : i
645
+ namespaces: d(i) ? [i] : i
642
646
  };
643
647
  }
644
648
  translate(t, n, r) {
@@ -651,17 +655,17 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
651
655
  ...this.options,
652
656
  ...i
653
657
  }) : String(e));
654
- let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], d = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
655
- d === void 0 && (d = ":");
658
+ let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], u = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
659
+ u === void 0 && (u = ":");
656
660
  let f = i.lng || this.language, p = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
657
661
  if (f?.toLowerCase() === "cimode") return p ? a ? {
658
- res: `${l}${d}${s}`,
662
+ res: `${l}${u}${s}`,
659
663
  usedKey: s,
660
664
  exactUsedKey: s,
661
665
  usedLng: f,
662
666
  usedNS: l,
663
667
  usedParams: this.getUsedParamsDetails(i)
664
- } : `${l}${d}${s}` : a ? {
668
+ } : `${l}${u}${s}` : a ? {
665
669
  res: s,
666
670
  usedKey: s,
667
671
  exactUsedKey: s,
@@ -673,10 +677,10 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
673
677
  "[object Number]",
674
678
  "[object Function]",
675
679
  "[object RegExp]"
676
- ], y = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !u(i.count), S = e.hasDefaultValue(i), C = x ? this.pluralResolver.getSuffix(f, i.count, i) : "", w = i.ordinal && x ? this.pluralResolver.getSuffix(f, i.count, { ordinal: !1 }) : "", T = x && !i.ordinal && i.count === 0, E = T && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${C}`] || i[`defaultValue${w}`] || i.defaultValue, D = h;
680
+ ], y = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !d(i.count), S = e.hasDefaultValue(i), C = x ? this.pluralResolver.getSuffix(f, i.count, i) : "", w = i.ordinal && x ? this.pluralResolver.getSuffix(f, i.count, { ordinal: !1 }) : "", T = x && !i.ordinal && i.count === 0, E = T && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${C}`] || i[`defaultValue${w}`] || i.defaultValue, D = h;
677
681
  b && !h && S && (D = E);
678
682
  let O = z(D), k = Object.prototype.toString.apply(D);
679
- if (b && D && O && v.indexOf(k) < 0 && !(u(y) && Array.isArray(D))) {
683
+ if (b && D && O && v.indexOf(k) < 0 && !(d(y) && Array.isArray(D))) {
680
684
  if (!i.returnObjects && !this.options.returnObjects) {
681
685
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
682
686
  let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, D, {
@@ -702,7 +706,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
702
706
  }
703
707
  h = t;
704
708
  }
705
- } else if (b && u(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, i, r);
709
+ } else if (b && d(y) && Array.isArray(h)) h = h.join(y), h &&= this.extendTranslation(h, t, i, r);
706
710
  else {
707
711
  let e = !1, n = !1;
708
712
  !this.isValidLookup(h) && S && (e = !0, h = E), this.isValidLookup(h) || (n = !0, h = s);
@@ -729,7 +733,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
729
733
  });
730
734
  }) : n(e, s, E));
731
735
  }
732
- h = this.extendTranslation(h, t, i, m, r), n && h === s && this.options.appendNamespaceToMissingKey && (h = `${l}${d}${s}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${d}${s}` : s, e ? h : void 0, i));
736
+ h = this.extendTranslation(h, t, i, m, r), n && h === s && this.options.appendNamespaceToMissingKey && (h = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? h : void 0, i));
733
737
  }
734
738
  return a ? (m.res = h, m.usedParams = this.getUsedParamsDetails(i), m) : h;
735
739
  }
@@ -746,12 +750,12 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
746
750
  ...n.interpolation
747
751
  }
748
752
  });
749
- let a = u(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
753
+ let a = d(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
750
754
  if (a) {
751
755
  let t = e.match(this.interpolator.nestingRegexp);
752
756
  o = t && t.length;
753
757
  }
754
- let s = n.replace && !u(n.replace) ? n.replace : n;
758
+ let s = n.replace && !d(n.replace) ? n.replace : n;
755
759
  if (this.options.interpolation.defaultVariables && (s = {
756
760
  ...this.options.interpolation.defaultVariables,
757
761
  ...s
@@ -761,7 +765,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
761
765
  }
762
766
  !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();
763
767
  }
764
- let a = n.postProcess || this.options.postProcess, o = u(a) ? [a] : a;
768
+ let a = n.postProcess || this.options.postProcess, o = d(a) ? [a] : a;
765
769
  return e != null && o?.length && n.applyPostProcessor !== !1 && (e = F.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
766
770
  i18nResolved: {
767
771
  ...r,
@@ -772,7 +776,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
772
776
  }
773
777
  resolve(e, t = {}) {
774
778
  let n, r, i, a, o;
775
- return u(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? L(e, {
779
+ return d(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? L(e, {
776
780
  ...this.options,
777
781
  ...t
778
782
  }) : e)), e.forEach((e) => {
@@ -781,7 +785,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
781
785
  r = c;
782
786
  let l = s.namespaces;
783
787
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
784
- let d = t.count !== void 0 && !u(t.count), f = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (u(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
788
+ let u = t.count !== void 0 && !d(t.count), f = u && !t.ordinal && t.count === 0, p = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
785
789
  l.forEach((e) => {
786
790
  this.isValidLookup(n) || (o = e, !R[`${m[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (R[`${m[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((r) => {
787
791
  if (this.isValidLookup(n)) return;
@@ -790,11 +794,11 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
790
794
  if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
791
795
  else {
792
796
  let e;
793
- d && (e = this.pluralResolver.getSuffix(r, t.count, t));
797
+ u && (e = this.pluralResolver.getSuffix(r, t.count, t));
794
798
  let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
795
- if (d && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), f && o.push(c + n)), p) {
799
+ if (u && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), f && o.push(c + n)), p) {
796
800
  let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
797
- o.push(r), d && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), f && o.push(r + n));
801
+ o.push(r), u && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), f && o.push(r + n));
798
802
  }
799
803
  }
800
804
  let s;
@@ -832,7 +836,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
832
836
  "joinArrays",
833
837
  "postProcess",
834
838
  "interpolation"
835
- ], n = e.replace && !u(e.replace), r = n ? e.replace : e;
839
+ ], n = e.replace && !d(e.replace), r = n ? e.replace : e;
836
840
  if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
837
841
  ...this.options.interpolation.defaultVariables,
838
842
  ...r
@@ -861,7 +865,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
861
865
  return this.formatLanguageCode(t[0]);
862
866
  }
863
867
  formatLanguageCode(e) {
864
- if (u(e) && e.indexOf("-") > -1) {
868
+ if (d(e) && e.indexOf("-") > -1) {
865
869
  let t;
866
870
  try {
867
871
  t = Intl.getCanonicalLocales(e)[0];
@@ -893,7 +897,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
893
897
  }
894
898
  getFallbackCodes(e, t) {
895
899
  if (!e) return [];
896
- if (typeof e == "function" && (e = e(t)), u(e) && (e = [e]), Array.isArray(e)) return e;
900
+ if (typeof e == "function" && (e = e(t)), d(e) && (e = [e]), Array.isArray(e)) return e;
897
901
  if (!t) return e.default || [];
898
902
  let n = e[t];
899
903
  return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
@@ -902,7 +906,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
902
906
  let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
903
907
  e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
904
908
  };
905
- return u(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : u(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
909
+ return d(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))) : d(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
906
910
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
907
911
  }), r;
908
912
  }
@@ -916,7 +920,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
916
920
  }, U = {
917
921
  select: (e) => e === 1 ? "one" : "other",
918
922
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
919
- }, ne = class {
923
+ }, re = class {
920
924
  constructor(e, t = {}) {
921
925
  this.languageUtils = e, this.options = t, this.logger = M.create("pluralResolver"), this.pluralRulesCache = {};
922
926
  }
@@ -956,8 +960,8 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
956
960
  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));
957
961
  }
958
962
  }, W = (e, t, n, r = ".", i = !0) => {
959
- let a = x(e, t, n);
960
- return !a && i && u(n) && (a = A(e, n, r), a === void 0 && (a = A(t, n, r))), a;
963
+ let a = S(e, t, n);
964
+ return !a && i && d(n) && (a = A(e, n, r), a === void 0 && (a = A(t, n, r))), a;
961
965
  }, G = (e) => e.replace(/\$/g, "$$$$"), K = class {
962
966
  constructor(e = {}) {
963
967
  this.logger = M.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
@@ -965,7 +969,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
965
969
  init(e = {}) {
966
970
  e.interpolation ||= { escapeValue: !0 };
967
971
  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;
968
- this.escape = t === void 0 ? T : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? C(i) : a || "{{", this.suffix = o ? C(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? C(d) : f || C("$t("), this.nestingSuffix = p ? C(p) : m || C(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
972
+ this.escape = t === void 0 ? E : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? w(i) : a || "{{", this.suffix = o ? w(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? w(d) : f || w("$t("), this.nestingSuffix = p ? w(p) : m || w(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
969
973
  }
970
974
  reset() {
971
975
  this.options && this.init(this.options);
@@ -992,7 +996,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
992
996
  });
993
997
  };
994
998
  this.resetRegExp();
995
- let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, d = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
999
+ let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
996
1000
  return [{
997
1001
  regex: this.regexpUnescape,
998
1002
  safeValue: (e) => G(e)
@@ -1004,15 +1008,15 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1004
1008
  let n = i[1].trim();
1005
1009
  if (a = c(n), a === void 0) if (typeof l == "function") {
1006
1010
  let t = l(e, i, r);
1007
- a = u(t) ? t : "";
1011
+ a = d(t) ? t : "";
1008
1012
  } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
1009
- else if (d) {
1013
+ else if (u) {
1010
1014
  a = i[0];
1011
1015
  continue;
1012
1016
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
1013
- else !u(a) && !this.useRawValueToEscape && (a = f(a));
1017
+ else !d(a) && !this.useRawValueToEscape && (a = p(a));
1014
1018
  let s = t.safeValue(a);
1015
- if (e = e.replace(i[0], s), d ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1019
+ 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;
1016
1020
  }
1017
1021
  }), e;
1018
1022
  }
@@ -1020,7 +1024,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1020
1024
  let r, i, a, o = (e, t) => {
1021
1025
  let n = this.nestingOptionsSeparator;
1022
1026
  if (e.indexOf(n) < 0) return e;
1023
- let r = e.split(RegExp(`${C(n)}[ ]*{`)), i = `{${r[1]}`;
1027
+ let r = e.split(RegExp(`${w(n)}[ ]*{`)), i = `{${r[1]}`;
1024
1028
  e = r[0], i = this.interpolate(i, a);
1025
1029
  let o = i.match(/'/g), s = i.match(/"/g);
1026
1030
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -1036,17 +1040,17 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1036
1040
  };
1037
1041
  for (; r = this.nestingRegexp.exec(e);) {
1038
1042
  let s = [];
1039
- a = { ...n }, a = a.replace && !u(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1043
+ a = { ...n }, a = a.replace && !d(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1040
1044
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
1041
- if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !u(i)) return i;
1042
- u(i) || (i = f(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1045
+ 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 && !d(i)) return i;
1046
+ d(i) || (i = p(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, {
1043
1047
  ...n,
1044
1048
  interpolationkey: r[1].trim()
1045
1049
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
1046
1050
  }
1047
1051
  return e;
1048
1052
  }
1049
- }, re = (e) => {
1053
+ }, ie = (e) => {
1050
1054
  let t = e.toLowerCase().trim(), n = {};
1051
1055
  if (e.indexOf("(") > -1) {
1052
1056
  let r = e.split("(");
@@ -1074,13 +1078,13 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1074
1078
  let o = r + JSON.stringify(a), s = t[o];
1075
1079
  return s || (s = e(j(r), i), t[o] = s), s(n);
1076
1080
  };
1077
- }, ie = (e) => (t, n, r) => e(j(n), r)(t), ae = class {
1081
+ }, ae = (e) => (t, n, r) => e(j(n), r)(t), oe = class {
1078
1082
  constructor(e = {}) {
1079
1083
  this.logger = M.create("formatter"), this.options = e, this.init(e);
1080
1084
  }
1081
1085
  init(e, t = { interpolation: {} }) {
1082
1086
  this.formatSeparator = t.interpolation.formatSeparator || ",";
1083
- let n = t.cacheInBuiltFormats ? q : ie;
1087
+ let n = t.cacheInBuiltFormats ? q : ae;
1084
1088
  this.formats = {
1085
1089
  number: n((e, t) => {
1086
1090
  let n = new Intl.NumberFormat(e, { ...t });
@@ -1120,7 +1124,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1120
1124
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
1121
1125
  }
1122
1126
  return i.reduce((e, t) => {
1123
- let { formatName: i, formatOptions: a } = re(t);
1127
+ let { formatName: i, formatOptions: a } = ie(t);
1124
1128
  if (this.formats[i]) {
1125
1129
  let t = e;
1126
1130
  try {
@@ -1138,9 +1142,9 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1138
1142
  return e;
1139
1143
  }, e);
1140
1144
  }
1141
- }, oe = (e, t) => {
1145
+ }, se = (e, t) => {
1142
1146
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1143
- }, se = class extends N {
1147
+ }, ce = class extends N {
1144
1148
  constructor(e, t, n, r = {}) {
1145
1149
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = M.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);
1146
1150
  }
@@ -1170,7 +1174,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1170
1174
  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);
1171
1175
  let o = {};
1172
1176
  this.queue.forEach((n) => {
1173
- y(n.loaded, [i], a), oe(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1177
+ b(n.loaded, [i], a), se(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1174
1178
  o[e] || (o[e] = {});
1175
1179
  let t = n.loaded[e];
1176
1180
  t.length && t.forEach((t) => {
@@ -1219,7 +1223,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1219
1223
  }
1220
1224
  prepareLoading(e, t, n = {}, r) {
1221
1225
  if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1222
- u(e) && (e = this.languageUtils.toResolveHierarchy(e)), u(t) && (t = [t]);
1226
+ d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
1223
1227
  let i = this.queueLoad(e, t, n, r);
1224
1228
  if (!i.toLoad.length) return i.pending.length || r(), null;
1225
1229
  i.toLoad.forEach((e) => {
@@ -1295,7 +1299,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1295
1299
  appendNamespaceToCIMode: !1,
1296
1300
  overloadTranslationOptionHandler: (e) => {
1297
1301
  let t = {};
1298
- if (typeof e[1] == "object" && (t = e[1]), u(e[1]) && (t.defaultValue = e[1]), u(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1302
+ if (typeof e[1] == "object" && (t = e[1]), d(e[1]) && (t.defaultValue = e[1]), d(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1299
1303
  let n = e[3] || e[2];
1300
1304
  Object.keys(n).forEach((e) => {
1301
1305
  t[e] = n[e];
@@ -1317,15 +1321,15 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1317
1321
  skipOnVariables: !0
1318
1322
  },
1319
1323
  cacheInBuiltFormats: !0
1320
- }), Y = (e) => (u(e.ns) && (e.ns = [e.ns]), u(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), u(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), X = () => {}, ce = (e) => {
1324
+ }), Y = (e) => (d(e.ns) && (e.ns = [e.ns]), d(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), d(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), X = () => {}, le = (e) => {
1321
1325
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1322
1326
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
1323
1327
  });
1324
- }, Z = "__i18next_supportNoticeShown", le = () => !!(typeof globalThis < "u" && globalThis[Z] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ue = () => {
1328
+ }, Z = "__i18next_supportNoticeShown", ue = () => !!(typeof globalThis < "u" && globalThis[Z] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), de = () => {
1325
1329
  typeof globalThis < "u" && (globalThis[Z] = !0);
1326
- }, de = (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)), Q = class e extends N {
1330
+ }, fe = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Q = class e extends N {
1327
1331
  constructor(e = {}, t) {
1328
- if (super(), this.options = Y(e), this.services = {}, this.logger = M, this.modules = { external: [] }, ce(this), t && !this.isInitialized && !e.isClone) {
1332
+ if (super(), this.options = Y(e), this.services = {}, this.logger = M, this.modules = { external: [] }, le(this), t && !this.isInitialized && !e.isClone) {
1329
1333
  if (!this.options.initAsync) return this.init(e, t), this;
1330
1334
  setTimeout(() => {
1331
1335
  this.init(e, t);
@@ -1333,7 +1337,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1333
1337
  }
1334
1338
  }
1335
1339
  init(e = {}, t) {
1336
- this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (u(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1340
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (d(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1337
1341
  let n = J();
1338
1342
  this.options = {
1339
1343
  ...n,
@@ -1342,19 +1346,19 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1342
1346
  }, this.options.interpolation = {
1343
1347
  ...n.interpolation,
1344
1348
  ...this.options.interpolation
1345
- }, 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 && !de(this) && !le() && (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 💙"), ue());
1349
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !fe(this) && !ue() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), de());
1346
1350
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1347
1351
  if (!this.options.isClone) {
1348
1352
  this.modules.logger ? M.init(r(this.modules.logger), this.options) : M.init(null, this.options);
1349
1353
  let e;
1350
- e = this.modules.formatter ? this.modules.formatter : ae;
1354
+ e = this.modules.formatter ? this.modules.formatter : oe;
1351
1355
  let t = new V(this.options);
1352
1356
  this.store = new P(this.options.resources, this.options);
1353
1357
  let i = this.services;
1354
- i.logger = M, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ne(t, {
1358
+ i.logger = M, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new re(t, {
1355
1359
  prepend: this.options.pluralSeparator,
1356
1360
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1357
- }), 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 K(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new se(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1361
+ }), 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 K(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new ce(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1358
1362
  this.emit(e, ...t);
1359
1363
  }), 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 B(this.services, this.options), this.translator.on("*", (e, ...t) => {
1360
1364
  this.emit(e, ...t);
@@ -1381,7 +1385,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1381
1385
  ].forEach((e) => {
1382
1386
  this[e] = (...t) => (this.store[e](...t), this);
1383
1387
  });
1384
- let i = d(), a = () => {
1388
+ let i = f(), a = () => {
1385
1389
  let e = (e, n) => {
1386
1390
  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);
1387
1391
  };
@@ -1391,7 +1395,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1391
1395
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1392
1396
  }
1393
1397
  loadResources(e, t = X) {
1394
- let n = t, r = u(e) ? e : this.language;
1398
+ let n = t, r = d(e) ? e : this.language;
1395
1399
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1396
1400
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1397
1401
  let e = [], t = (t) => {
@@ -1405,7 +1409,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1405
1409
  } else n(null);
1406
1410
  }
1407
1411
  reloadResources(e, t, n) {
1408
- let r = d();
1412
+ let r = f();
1409
1413
  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 ||= X, this.services.backendConnector.reload(e, t, (e) => {
1410
1414
  r.resolve(), n(e);
1411
1415
  }), r;
@@ -1429,7 +1433,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1429
1433
  }
1430
1434
  changeLanguage(e, t) {
1431
1435
  this.isLanguageChangingTo = e;
1432
- let n = d();
1436
+ let n = f();
1433
1437
  this.emit("languageChanging", e);
1434
1438
  let r = (e) => {
1435
1439
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -1437,7 +1441,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1437
1441
  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));
1438
1442
  }, a = (t) => {
1439
1443
  !e && !t && this.services.languageDetector && (t = []);
1440
- let n = u(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(u(t) ? [t] : t);
1444
+ let n = d(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(d(t) ? [t] : t);
1441
1445
  a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1442
1446
  i(e, a);
1443
1447
  });
@@ -1456,7 +1460,7 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1456
1460
  let s = this.options.keySeparator || ".", c;
1457
1461
  return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = L(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = L(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1458
1462
  };
1459
- return u(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1463
+ return d(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1460
1464
  }
1461
1465
  t(...e) {
1462
1466
  return this.translator?.translate(...e);
@@ -1483,16 +1487,16 @@ var R = {}, z = (e) => !u(e) && typeof e != "boolean" && typeof e != "number", B
1483
1487
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1484
1488
  }
1485
1489
  loadNamespaces(e, t) {
1486
- let n = d();
1487
- return this.options.ns ? (u(e) && (e = [e]), e.forEach((e) => {
1490
+ let n = f();
1491
+ return this.options.ns ? (d(e) && (e = [e]), e.forEach((e) => {
1488
1492
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1489
1493
  }), this.loadResources((e) => {
1490
1494
  n.resolve(), t && t(e);
1491
1495
  }), n) : (t && t(), Promise.resolve());
1492
1496
  }
1493
1497
  loadLanguages(e, t) {
1494
- let n = d();
1495
- u(e) && (e = [e]);
1498
+ let n = f();
1499
+ d(e) && (e = [e]);
1496
1500
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1497
1501
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1498
1502
  n.resolve(), t && t(e);
@@ -1560,8 +1564,8 @@ Q.createInstance, Q.dir, Q.init, Q.loadResources, Q.reloadResources, Q.use, Q.ch
1560
1564
  lng: "en",
1561
1565
  showSupportNotice: !1,
1562
1566
  resources: {
1563
- en: c,
1564
- es: l
1567
+ en: l,
1568
+ es: u
1565
1569
  }
1566
1570
  });
1567
1571
  //#endregion
@@ -1598,13 +1602,13 @@ var { translator: $ } = {
1598
1602
  label: "Spanish"
1599
1603
  }]
1600
1604
  };
1601
- function fe(e, t) {
1605
+ function pe(e, t) {
1602
1606
  return $.t(`translation:simpleCloze:${e}`, { lng: t });
1603
1607
  }
1604
- function pe(e, t) {
1608
+ function me(e, t) {
1605
1609
  return $.t(`common:${e}`, { lng: t });
1606
1610
  }
1607
1611
  //#endregion
1608
- export { pe as n, s as r, fe as t };
1612
+ export { me as n, c as r, pe as t };
1609
1613
 
1610
- //# sourceMappingURL=i18n-BaF24Jzw.js.map
1614
+ //# sourceMappingURL=i18n-BDkxR45Z.js.map