@pie-element/simple-cloze 0.1.4-next.17 → 0.1.4-next.19

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.
@@ -168,29 +168,50 @@ function ne(e = {}) {
168
168
  await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([i]), g(i));
169
169
  };
170
170
  }
171
- var k = "@pie-lib/math-rendering", re = "@pie-lib/math-rendering@2", A = null;
172
- function ie() {
173
- return !!window[re]?.opts?.useSingleDollar;
171
+ var re = "@pie-lib/math-rendering", ie = "@pie-lib/math-rendering@2", ae = "pie-print", oe = 50, se = 1e4, ce = null;
172
+ function le() {
173
+ return !!window[ie]?.opts?.useSingleDollar;
174
174
  }
175
- function ae() {
176
- return A ||= ne({ useSingleDollar: ie() }), A;
175
+ function ue() {
176
+ return ce ||= ne({ useSingleDollar: le() }), ce;
177
177
  }
178
- function oe() {
178
+ function de() {
179
179
  if (typeof window > "u") return null;
180
- let e = window[k];
180
+ let e = window[re];
181
181
  return typeof e?.renderMath == "function" ? e : null;
182
182
  }
183
- function se() {
184
- let e = r();
185
- e && n("legacy-renderer-delegation", `window['${k}'] renders this element's math with MathJax ${e}`);
183
+ function fe(e) {
184
+ let t = e;
185
+ for (; t;) {
186
+ if (t instanceof Element && t.localName === ae) return t;
187
+ t = t instanceof ShadowRoot ? t.host : t.parentNode;
188
+ }
189
+ return null;
190
+ }
191
+ function k() {
192
+ let e = window.renderMath;
193
+ return typeof e == "function" ? e : null;
194
+ }
195
+ async function pe(e) {
196
+ let t = fe(e);
197
+ if (!t) return null;
198
+ let n = k();
199
+ if (n || t.mathRenderingModuleUrlImported !== !0) return n;
200
+ let r = Date.now() + se;
201
+ for (; Date.now() < r;) {
202
+ await new Promise((e) => setTimeout(e, oe));
203
+ let e = k();
204
+ if (e) return e;
205
+ }
206
+ return null;
186
207
  }
187
- var ce = async (e) => {
208
+ var me = async (e) => {
188
209
  if (typeof window > "u") return;
189
210
  let t = typeof e == "string", n;
190
211
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
191
- let r = oe();
192
- return r ? (se(), await r.renderMath?.(n)) : await ae()(n), t ? n.innerHTML : void 0;
193
- }, le = {
212
+ let r = de(), i = r || t ? null : await pe(n);
213
+ return r ? await r.renderMath?.(n) : i ? await i(n) : await ue()(n), t ? n.innerHTML : void 0;
214
+ }, he = {
194
215
  translation: {
195
216
  categorize: {
196
217
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -330,7 +351,7 @@ var ce = async (e) => {
330
351
  hideNote: "Hide Note",
331
352
  cancel: "Cancel"
332
353
  }
333
- }, ue = {
354
+ }, ge = {
334
355
  translation: {
335
356
  categorize: {
336
357
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -470,25 +491,25 @@ var ce = async (e) => {
470
491
  hideNote: "Ocultar Nota",
471
492
  cancel: "Cancelar"
472
493
  }
473
- }, j = (e) => typeof e == "string", M = () => {
494
+ }, A = (e) => typeof e == "string", j = () => {
474
495
  let e, t, n = new Promise((n, r) => {
475
496
  e = n, t = r;
476
497
  });
477
498
  return n.resolve = e, n.reject = t, n;
478
- }, N = (e) => e == null ? "" : "" + e, de = (e, t, n) => {
499
+ }, M = (e) => e == null ? "" : "" + e, _e = (e, t, n) => {
479
500
  e.forEach((e) => {
480
501
  t[e] && (n[e] = t[e]);
481
502
  });
482
- }, fe = /###/g, P = (e) => e && e.indexOf("###") > -1 ? e.replace(fe, ".") : e, pe = (e) => !e || j(e), F = (e, t, n) => {
483
- let r = j(t) ? t.split(".") : t, i = 0;
503
+ }, ve = /###/g, N = (e) => e && e.indexOf("###") > -1 ? e.replace(ve, ".") : e, P = (e) => !e || A(e), F = (e, t, n) => {
504
+ let r = A(t) ? t.split(".") : t, i = 0;
484
505
  for (; i < r.length - 1;) {
485
- if (pe(e)) return {};
486
- let t = P(r[i]);
506
+ if (P(e)) return {};
507
+ let t = N(r[i]);
487
508
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
488
509
  }
489
- return pe(e) ? {} : {
510
+ return P(e) ? {} : {
490
511
  obj: e,
491
- k: P(r[i])
512
+ k: N(r[i])
492
513
  };
493
514
  }, I = (e, t, n) => {
494
515
  let { obj: r, k: i } = F(e, t, Object);
@@ -499,26 +520,26 @@ var ce = async (e) => {
499
520
  let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = F(e, o, Object);
500
521
  for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = F(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
501
522
  s.obj[`${s.k}.${a}`] = n;
502
- }, me = (e, t, n, r) => {
523
+ }, ye = (e, t, n, r) => {
503
524
  let { obj: i, k: a } = F(e, t, Object);
504
525
  i[a] = i[a] || [], i[a].push(n);
505
526
  }, L = (e, t) => {
506
527
  let { obj: n, k: r } = F(e, t);
507
528
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
508
- }, he = (e, t, n) => {
529
+ }, be = (e, t, n) => {
509
530
  let r = L(e, n);
510
531
  return r === void 0 ? L(t, n) : r;
511
532
  }, R = (e, t, n) => {
512
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? j(e[r]) || e[r] instanceof String || j(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : R(e[r], t[r], n) : e[r] = t[r]);
533
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? A(e[r]) || e[r] instanceof String || A(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : R(e[r], t[r], n) : e[r] = t[r]);
513
534
  return e;
514
- }, z = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ge = {
535
+ }, z = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), xe = {
515
536
  "&": "&amp;",
516
537
  "<": "&lt;",
517
538
  ">": "&gt;",
518
539
  "\"": "&quot;",
519
540
  "'": "&#39;",
520
541
  "/": "&#x2F;"
521
- }, _e = (e) => j(e) ? e.replace(/[&<>"'\/]/g, (e) => ge[e]) : e, ve = class {
542
+ }, Se = (e) => A(e) ? e.replace(/[&<>"'\/]/g, (e) => xe[e]) : e, Ce = class {
522
543
  constructor(e) {
523
544
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
524
545
  }
@@ -528,17 +549,17 @@ var ce = async (e) => {
528
549
  let n = new RegExp(e);
529
550
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
530
551
  }
531
- }, ye = [
552
+ }, we = [
532
553
  " ",
533
554
  ",",
534
555
  "?",
535
556
  "!",
536
557
  ";"
537
- ], be = new ve(20), xe = (e, t, n) => {
558
+ ], Te = new Ce(20), Ee = (e, t, n) => {
538
559
  t ||= "", n ||= "";
539
- let r = ye.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
560
+ let r = we.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
540
561
  if (r.length === 0) return !0;
541
- let i = be.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
562
+ let i = Te.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
542
563
  if (!a) {
543
564
  let t = e.indexOf(n);
544
565
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
@@ -563,7 +584,7 @@ var ce = async (e) => {
563
584
  i = t;
564
585
  }
565
586
  return i;
566
- }, V = (e) => e?.replace(/_/g, "-"), Se = {
587
+ }, V = (e) => e?.replace(/_/g, "-"), De = {
567
588
  type: "logger",
568
589
  log(e) {
569
590
  this.output("log", e);
@@ -582,7 +603,7 @@ var ce = async (e) => {
582
603
  this.init(e, t);
583
604
  }
584
605
  init(e, t = {}) {
585
- this.prefix = t.prefix || "i18next:", this.logger = e || Se, this.options = t, this.debug = t.debug;
606
+ this.prefix = t.prefix || "i18next:", this.logger = e || De, this.options = t, this.debug = t.debug;
586
607
  }
587
608
  log(...e) {
588
609
  return this.forward(e, "log", "", !0);
@@ -597,7 +618,7 @@ var ce = async (e) => {
597
618
  return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
598
619
  }
599
620
  forward(e, t, n, r) {
600
- return r && !this.debug ? null : (j(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
621
+ return r && !this.debug ? null : (A(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
601
622
  }
602
623
  create(t) {
603
624
  return new e(this.logger, {
@@ -651,16 +672,16 @@ var ce = async (e) => {
651
672
  }
652
673
  getResource(e, t, n, r = {}) {
653
674
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
654
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : j(n) && i ? o.push(...n.split(i)) : o.push(n)));
675
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : A(n) && i ? o.push(...n.split(i)) : o.push(n)));
655
676
  let s = L(this.data, o);
656
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !j(n) ? s : B(this.data?.[e]?.[t], n, i);
677
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !A(n) ? s : B(this.data?.[e]?.[t], n, i);
657
678
  }
658
679
  addResource(e, t, n, r, i = { silent: !1 }) {
659
680
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
660
681
  n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), I(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
661
682
  }
662
683
  addResources(e, t, n, r = { silent: !1 }) {
663
- for (let r in n) (j(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
684
+ for (let r in n) (A(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
664
685
  r.silent || this.emit("added", e, t, n);
665
686
  }
666
687
  addResourceBundle(e, t, n, r, i, a = {
@@ -705,21 +726,21 @@ var ce = async (e) => {
705
726
  }), t;
706
727
  }
707
728
  }, K = Symbol("i18next/PATH_KEY");
708
- function Ce() {
729
+ function Oe() {
709
730
  let e = [], t = Object.create(null), n;
710
731
  return t.get = (r, i) => (n?.revoke?.(), i === K ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
711
732
  }
712
733
  function q(e, t) {
713
- let { [K]: n } = e(Ce()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
734
+ let { [K]: n } = e(Oe()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
714
735
  if (n.length > 1 && i) {
715
736
  let e = t?.ns, a = Array.isArray(e) ? e : null;
716
737
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
717
738
  }
718
739
  return n.join(r);
719
740
  }
720
- var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", we = class e extends U {
741
+ var J = {}, Y = (e) => !A(e) && typeof e != "boolean" && typeof e != "number", ke = class e extends U {
721
742
  constructor(e, t = {}) {
722
- super(), de([
743
+ super(), _e([
723
744
  "resourceStore",
724
745
  "languageUtils",
725
746
  "pluralResolver",
@@ -743,19 +764,19 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
743
764
  extractFromKey(e, t) {
744
765
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
745
766
  n === void 0 && (n = ":");
746
- 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 && !xe(e, n, r);
767
+ 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);
747
768
  if (a && !o) {
748
769
  let t = e.match(this.interpolator.nestingRegexp);
749
770
  if (t && t.length > 0) return {
750
771
  key: e,
751
- namespaces: j(i) ? [i] : i
772
+ namespaces: A(i) ? [i] : i
752
773
  };
753
774
  let a = e.split(n);
754
775
  (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
755
776
  }
756
777
  return {
757
778
  key: e,
758
- namespaces: j(i) ? [i] : i
779
+ namespaces: A(i) ? [i] : i
759
780
  };
760
781
  }
761
782
  translate(t, n, r) {
@@ -790,10 +811,10 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
790
811
  "[object Number]",
791
812
  "[object Function]",
792
813
  "[object RegExp]"
793
- ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !j(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
814
+ ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !A(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
794
815
  y && !m && x && (E = T);
795
816
  let D = Y(E), O = Object.prototype.toString.apply(E);
796
- if (y && E && D && _.indexOf(O) < 0 && !(j(v) && Array.isArray(E))) {
817
+ if (y && E && D && _.indexOf(O) < 0 && !(A(v) && Array.isArray(E))) {
797
818
  if (!i.returnObjects && !this.options.returnObjects) {
798
819
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
799
820
  let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
@@ -819,7 +840,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
819
840
  }
820
841
  m = t;
821
842
  }
822
- } else if (y && j(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
843
+ } else if (y && A(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
823
844
  else {
824
845
  let e = !1, n = !1;
825
846
  !this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
@@ -863,12 +884,12 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
863
884
  ...n.interpolation
864
885
  }
865
886
  });
866
- let a = j(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
887
+ let a = A(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
867
888
  if (a) {
868
889
  let t = e.match(this.interpolator.nestingRegexp);
869
890
  o = t && t.length;
870
891
  }
871
- let s = n.replace && !j(n.replace) ? n.replace : n;
892
+ let s = n.replace && !A(n.replace) ? n.replace : n;
872
893
  if (this.options.interpolation.defaultVariables && (s = {
873
894
  ...this.options.interpolation.defaultVariables,
874
895
  ...s
@@ -878,7 +899,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
878
899
  }
879
900
  !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
880
901
  }
881
- let a = n.postProcess || this.options.postProcess, o = j(a) ? [a] : a;
902
+ let a = n.postProcess || this.options.postProcess, o = A(a) ? [a] : a;
882
903
  return e != null && o?.length && n.applyPostProcessor !== !1 && (e = G.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
883
904
  i18nResolved: {
884
905
  ...r,
@@ -889,7 +910,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
889
910
  }
890
911
  resolve(e, t = {}) {
891
912
  let n, r, i, a, o;
892
- return j(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? q(e, {
913
+ return A(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? q(e, {
893
914
  ...this.options,
894
915
  ...t
895
916
  }) : e)), e.forEach((e) => {
@@ -898,7 +919,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
898
919
  r = c;
899
920
  let l = s.namespaces;
900
921
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
901
- let u = t.count !== void 0 && !j(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (j(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
922
+ let u = t.count !== void 0 && !A(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (A(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
902
923
  l.forEach((e) => {
903
924
  this.isValidLookup(n) || (o = e, !J[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (J[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
904
925
  if (this.isValidLookup(n)) return;
@@ -949,7 +970,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
949
970
  "joinArrays",
950
971
  "postProcess",
951
972
  "interpolation"
952
- ], n = e.replace && !j(e.replace), r = n ? e.replace : e;
973
+ ], n = e.replace && !A(e.replace), r = n ? e.replace : e;
953
974
  if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
954
975
  ...this.options.interpolation.defaultVariables,
955
976
  ...r
@@ -963,7 +984,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
963
984
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
964
985
  return !1;
965
986
  }
966
- }, Te = class {
987
+ }, Ae = class {
967
988
  constructor(e) {
968
989
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = H.create("languageUtils");
969
990
  }
@@ -978,7 +999,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
978
999
  return this.formatLanguageCode(t[0]);
979
1000
  }
980
1001
  formatLanguageCode(e) {
981
- if (j(e) && e.indexOf("-") > -1) {
1002
+ if (A(e) && e.indexOf("-") > -1) {
982
1003
  let t;
983
1004
  try {
984
1005
  t = Intl.getCanonicalLocales(e)[0];
@@ -1010,7 +1031,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1010
1031
  }
1011
1032
  getFallbackCodes(e, t) {
1012
1033
  if (!e) return [];
1013
- if (typeof e == "function" && (e = e(t)), j(e) && (e = [e]), Array.isArray(e)) return e;
1034
+ if (typeof e == "function" && (e = e(t)), A(e) && (e = [e]), Array.isArray(e)) return e;
1014
1035
  if (!t) return e.default || [];
1015
1036
  let n = e[t];
1016
1037
  return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
@@ -1019,21 +1040,21 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1019
1040
  let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
1020
1041
  e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
1021
1042
  };
1022
- return j(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))) : j(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1043
+ return A(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))) : A(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1023
1044
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
1024
1045
  }), r;
1025
1046
  }
1026
- }, Ee = {
1047
+ }, je = {
1027
1048
  zero: 0,
1028
1049
  one: 1,
1029
1050
  two: 2,
1030
1051
  few: 3,
1031
1052
  many: 4,
1032
1053
  other: 5
1033
- }, De = {
1054
+ }, Me = {
1034
1055
  select: (e) => e === 1 ? "one" : "other",
1035
1056
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
1036
- }, Oe = class {
1057
+ }, Ne = class {
1037
1058
  constructor(e, t = {}) {
1038
1059
  this.languageUtils = e, this.options = t, this.logger = H.create("pluralResolver"), this.pluralRulesCache = {};
1039
1060
  }
@@ -1050,8 +1071,8 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1050
1071
  try {
1051
1072
  a = new Intl.PluralRules(n, { type: r });
1052
1073
  } catch {
1053
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), De;
1054
- if (!e.match(/-|_/)) return De;
1074
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Me;
1075
+ if (!e.match(/-|_/)) return Me;
1055
1076
  let n = this.languageUtils.getLanguagePartFromCode(e);
1056
1077
  a = this.getRule(n, t);
1057
1078
  }
@@ -1066,23 +1087,23 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1066
1087
  }
1067
1088
  getSuffixes(e, t = {}) {
1068
1089
  let n = this.getRule(e, t);
1069
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Ee[e] - Ee[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
1090
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => je[e] - je[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
1070
1091
  }
1071
1092
  getSuffix(e, t, n = {}) {
1072
1093
  let r = this.getRule(e, n);
1073
1094
  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));
1074
1095
  }
1075
- }, ke = (e, t, n, r = ".", i = !0) => {
1076
- let a = he(e, t, n);
1077
- return !a && i && j(n) && (a = B(e, n, r), a === void 0 && (a = B(t, n, r))), a;
1078
- }, X = (e) => e.replace(/\$/g, "$$$$"), Ae = class {
1096
+ }, Pe = (e, t, n, r = ".", i = !0) => {
1097
+ let a = be(e, t, n);
1098
+ return !a && i && A(n) && (a = B(e, n, r), a === void 0 && (a = B(t, n, r))), a;
1099
+ }, X = (e) => e.replace(/\$/g, "$$$$"), Fe = class {
1079
1100
  constructor(e = {}) {
1080
1101
  this.logger = H.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
1081
1102
  }
1082
1103
  init(e = {}) {
1083
1104
  e.interpolation ||= { escapeValue: !0 };
1084
1105
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
1085
- this.escape = t === void 0 ? _e : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? z(i) : a || "{{", this.suffix = o ? z(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? z(d) : f || z("$t("), this.nestingSuffix = p ? z(p) : m || z(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1106
+ this.escape = t === void 0 ? Se : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? z(i) : a || "{{", this.suffix = o ? z(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? z(d) : f || z("$t("), this.nestingSuffix = p ? z(p) : m || z(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1086
1107
  }
1087
1108
  reset() {
1088
1109
  this.options && this.init(this.options);
@@ -1094,7 +1115,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1094
1115
  interpolate(e, t, n, r) {
1095
1116
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
1096
1117
  if (e.indexOf(this.formatSeparator) < 0) {
1097
- let i = ke(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
1118
+ let i = Pe(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
1098
1119
  return this.alwaysFormat ? this.format(i, void 0, n, {
1099
1120
  ...r,
1100
1121
  ...t,
@@ -1102,7 +1123,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1102
1123
  }) : i;
1103
1124
  }
1104
1125
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
1105
- return this.format(ke(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
1126
+ return this.format(Pe(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
1106
1127
  ...r,
1107
1128
  ...t,
1108
1129
  interpolationkey: a
@@ -1121,13 +1142,13 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1121
1142
  let n = i[1].trim();
1122
1143
  if (a = c(n), a === void 0) if (typeof l == "function") {
1123
1144
  let t = l(e, i, r);
1124
- a = j(t) ? t : "";
1145
+ a = A(t) ? t : "";
1125
1146
  } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
1126
1147
  else if (u) {
1127
1148
  a = i[0];
1128
1149
  continue;
1129
1150
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
1130
- else !j(a) && !this.useRawValueToEscape && (a = N(a));
1151
+ else !A(a) && !this.useRawValueToEscape && (a = M(a));
1131
1152
  let s = t.safeValue(a);
1132
1153
  if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1133
1154
  }
@@ -1153,17 +1174,17 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1153
1174
  };
1154
1175
  for (; r = this.nestingRegexp.exec(e);) {
1155
1176
  let s = [];
1156
- a = { ...n }, a = a.replace && !j(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1177
+ a = { ...n }, a = a.replace && !A(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1157
1178
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
1158
- if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !j(i)) return i;
1159
- j(i) || (i = N(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, {
1179
+ 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 && !A(i)) return i;
1180
+ A(i) || (i = M(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1160
1181
  ...n,
1161
1182
  interpolationkey: r[1].trim()
1162
1183
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
1163
1184
  }
1164
1185
  return e;
1165
1186
  }
1166
- }, je = (e) => {
1187
+ }, Ie = (e) => {
1167
1188
  let t = e.toLowerCase().trim(), n = {};
1168
1189
  if (e.indexOf("(") > -1) {
1169
1190
  let r = e.split("(");
@@ -1180,7 +1201,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1180
1201
  formatName: t,
1181
1202
  formatOptions: n
1182
1203
  };
1183
- }, Me = (e) => {
1204
+ }, Le = (e) => {
1184
1205
  let t = {};
1185
1206
  return (n, r, i) => {
1186
1207
  let a = i;
@@ -1191,13 +1212,13 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1191
1212
  let o = r + JSON.stringify(a), s = t[o];
1192
1213
  return s || (s = e(V(r), i), t[o] = s), s(n);
1193
1214
  };
1194
- }, Ne = (e) => (t, n, r) => e(V(n), r)(t), Pe = class {
1215
+ }, Re = (e) => (t, n, r) => e(V(n), r)(t), ze = class {
1195
1216
  constructor(e = {}) {
1196
1217
  this.logger = H.create("formatter"), this.options = e, this.init(e);
1197
1218
  }
1198
1219
  init(e, t = { interpolation: {} }) {
1199
1220
  this.formatSeparator = t.interpolation.formatSeparator || ",";
1200
- let n = t.cacheInBuiltFormats ? Me : Ne;
1221
+ let n = t.cacheInBuiltFormats ? Le : Re;
1201
1222
  this.formats = {
1202
1223
  number: n((e, t) => {
1203
1224
  let n = new Intl.NumberFormat(e, { ...t });
@@ -1228,7 +1249,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1228
1249
  this.formats[e.toLowerCase().trim()] = t;
1229
1250
  }
1230
1251
  addCached(e, t) {
1231
- this.formats[e.toLowerCase().trim()] = Me(t);
1252
+ this.formats[e.toLowerCase().trim()] = Le(t);
1232
1253
  }
1233
1254
  format(e, t, n, r = {}) {
1234
1255
  let i = t.split(this.formatSeparator);
@@ -1237,7 +1258,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1237
1258
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
1238
1259
  }
1239
1260
  return i.reduce((e, t) => {
1240
- let { formatName: i, formatOptions: a } = je(t);
1261
+ let { formatName: i, formatOptions: a } = Ie(t);
1241
1262
  if (this.formats[i]) {
1242
1263
  let t = e;
1243
1264
  try {
@@ -1255,9 +1276,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1255
1276
  return e;
1256
1277
  }, e);
1257
1278
  }
1258
- }, Fe = (e, t) => {
1279
+ }, Be = (e, t) => {
1259
1280
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1260
- }, Ie = class extends U {
1281
+ }, Ve = class extends U {
1261
1282
  constructor(e, t, n, r = {}) {
1262
1283
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = H.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1263
1284
  }
@@ -1287,7 +1308,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1287
1308
  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);
1288
1309
  let o = {};
1289
1310
  this.queue.forEach((n) => {
1290
- me(n.loaded, [i], a), Fe(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1311
+ ye(n.loaded, [i], a), Be(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1291
1312
  o[e] || (o[e] = {});
1292
1313
  let t = n.loaded[e];
1293
1314
  t.length && t.forEach((t) => {
@@ -1336,7 +1357,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1336
1357
  }
1337
1358
  prepareLoading(e, t, n = {}, r) {
1338
1359
  if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1339
- j(e) && (e = this.languageUtils.toResolveHierarchy(e)), j(t) && (t = [t]);
1360
+ A(e) && (e = this.languageUtils.toResolveHierarchy(e)), A(t) && (t = [t]);
1340
1361
  let i = this.queueLoad(e, t, n, r);
1341
1362
  if (!i.toLoad.length) return i.pending.length || r(), null;
1342
1363
  i.toLoad.forEach((e) => {
@@ -1412,7 +1433,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1412
1433
  appendNamespaceToCIMode: !1,
1413
1434
  overloadTranslationOptionHandler: (e) => {
1414
1435
  let t = {};
1415
- if (typeof e[1] == "object" && (t = e[1]), j(e[1]) && (t.defaultValue = e[1]), j(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1436
+ if (typeof e[1] == "object" && (t = e[1]), A(e[1]) && (t.defaultValue = e[1]), A(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1416
1437
  let n = e[3] || e[2];
1417
1438
  Object.keys(n).forEach((e) => {
1418
1439
  t[e] = n[e];
@@ -1434,15 +1455,15 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1434
1455
  skipOnVariables: !0
1435
1456
  },
1436
1457
  cacheInBuiltFormats: !0
1437
- }), Le = (e) => (j(e.ns) && (e.ns = [e.ns]), j(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), j(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Q = () => {}, Re = (e) => {
1458
+ }), He = (e) => (A(e.ns) && (e.ns = [e.ns]), A(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), A(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Q = () => {}, Ue = (e) => {
1438
1459
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1439
1460
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
1440
1461
  });
1441
- }, ze = "__i18next_supportNoticeShown", Be = () => !!(typeof globalThis < "u" && globalThis[ze] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ve = () => {
1442
- typeof globalThis < "u" && (globalThis[ze] = !0);
1443
- }, He = (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 U {
1462
+ }, We = "__i18next_supportNoticeShown", Ge = () => !!(typeof globalThis < "u" && globalThis[We] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ke = () => {
1463
+ typeof globalThis < "u" && (globalThis[We] = !0);
1464
+ }, qe = (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 U {
1444
1465
  constructor(e = {}, t) {
1445
- if (super(), this.options = Le(e), this.services = {}, this.logger = H, this.modules = { external: [] }, Re(this), t && !this.isInitialized && !e.isClone) {
1466
+ if (super(), this.options = He(e), this.services = {}, this.logger = H, this.modules = { external: [] }, Ue(this), t && !this.isInitialized && !e.isClone) {
1446
1467
  if (!this.options.initAsync) return this.init(e, t), this;
1447
1468
  setTimeout(() => {
1448
1469
  this.init(e, t);
@@ -1450,30 +1471,30 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1450
1471
  }
1451
1472
  }
1452
1473
  init(e = {}, t) {
1453
- this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (j(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1474
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (A(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1454
1475
  let n = Z();
1455
1476
  this.options = {
1456
1477
  ...n,
1457
1478
  ...this.options,
1458
- ...Le(e)
1479
+ ...He(e)
1459
1480
  }, this.options.interpolation = {
1460
1481
  ...n.interpolation,
1461
1482
  ...this.options.interpolation
1462
- }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !He(this) && !Be() && (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 💙"), Ve());
1483
+ }, 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 && !qe(this) && !Ge() && (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 💙"), Ke());
1463
1484
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1464
1485
  if (!this.options.isClone) {
1465
1486
  this.modules.logger ? H.init(r(this.modules.logger), this.options) : H.init(null, this.options);
1466
1487
  let e;
1467
- e = this.modules.formatter ? this.modules.formatter : Pe;
1468
- let t = new Te(this.options);
1488
+ e = this.modules.formatter ? this.modules.formatter : ze;
1489
+ let t = new Ae(this.options);
1469
1490
  this.store = new W(this.options.resources, this.options);
1470
1491
  let i = this.services;
1471
- i.logger = H, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Oe(t, {
1492
+ i.logger = H, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Ne(t, {
1472
1493
  prepend: this.options.pluralSeparator,
1473
1494
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1474
- }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Ae(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ie(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1495
+ }), 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 Fe(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ve(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1475
1496
  this.emit(e, ...t);
1476
- }), 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 we(this.services, this.options), this.translator.on("*", (e, ...t) => {
1497
+ }), 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 ke(this.services, this.options), this.translator.on("*", (e, ...t) => {
1477
1498
  this.emit(e, ...t);
1478
1499
  }), this.modules.external.forEach((e) => {
1479
1500
  e.init && e.init(this);
@@ -1498,7 +1519,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1498
1519
  ].forEach((e) => {
1499
1520
  this[e] = (...t) => (this.store[e](...t), this);
1500
1521
  });
1501
- let i = M(), a = () => {
1522
+ let i = j(), a = () => {
1502
1523
  let e = (e, n) => {
1503
1524
  this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
1504
1525
  };
@@ -1508,7 +1529,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1508
1529
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1509
1530
  }
1510
1531
  loadResources(e, t = Q) {
1511
- let n = t, r = j(e) ? e : this.language;
1532
+ let n = t, r = A(e) ? e : this.language;
1512
1533
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1513
1534
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1514
1535
  let e = [], t = (t) => {
@@ -1522,7 +1543,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1522
1543
  } else n(null);
1523
1544
  }
1524
1545
  reloadResources(e, t, n) {
1525
- let r = M();
1546
+ let r = j();
1526
1547
  return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Q, this.services.backendConnector.reload(e, t, (e) => {
1527
1548
  r.resolve(), n(e);
1528
1549
  }), r;
@@ -1546,7 +1567,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1546
1567
  }
1547
1568
  changeLanguage(e, t) {
1548
1569
  this.isLanguageChangingTo = e;
1549
- let n = M();
1570
+ let n = j();
1550
1571
  this.emit("languageChanging", e);
1551
1572
  let r = (e) => {
1552
1573
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -1554,7 +1575,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1554
1575
  a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
1555
1576
  }, a = (t) => {
1556
1577
  !e && !t && this.services.languageDetector && (t = []);
1557
- let n = j(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(j(t) ? [t] : t);
1578
+ let n = A(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(A(t) ? [t] : t);
1558
1579
  a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1559
1580
  i(e, a);
1560
1581
  });
@@ -1573,7 +1594,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1573
1594
  let s = this.options.keySeparator || ".", c;
1574
1595
  return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = q(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = q(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1575
1596
  };
1576
- return j(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1597
+ return A(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1577
1598
  }
1578
1599
  t(...e) {
1579
1600
  return this.translator?.translate(...e);
@@ -1600,16 +1621,16 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1600
1621
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1601
1622
  }
1602
1623
  loadNamespaces(e, t) {
1603
- let n = M();
1604
- return this.options.ns ? (j(e) && (e = [e]), e.forEach((e) => {
1624
+ let n = j();
1625
+ return this.options.ns ? (A(e) && (e = [e]), e.forEach((e) => {
1605
1626
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1606
1627
  }), this.loadResources((e) => {
1607
1628
  n.resolve(), t && t(e);
1608
1629
  }), n) : (t && t(), Promise.resolve());
1609
1630
  }
1610
1631
  loadLanguages(e, t) {
1611
- let n = M();
1612
- j(e) && (e = [e]);
1632
+ let n = j();
1633
+ A(e) && (e = [e]);
1613
1634
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1614
1635
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1615
1636
  n.resolve(), t && t(e);
@@ -1624,7 +1645,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1624
1645
  if (e && e.direction) return e.direction;
1625
1646
  }
1626
1647
  } catch {}
1627
- let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Te(Z());
1648
+ 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 Ae(Z());
1628
1649
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1629
1650
  }
1630
1651
  static createInstance(t = {}, n) {
@@ -1654,9 +1675,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1654
1675
  ...i,
1655
1676
  interpolation: e
1656
1677
  };
1657
- a.services.interpolator = new Ae(n);
1678
+ a.services.interpolator = new Fe(n);
1658
1679
  }
1659
- return a.translator = new we(a.services, i), a.translator.on("*", (e, ...t) => {
1680
+ return a.translator = new ke(a.services, i), a.translator.on("*", (e, ...t) => {
1660
1681
  a.emit(e, ...t);
1661
1682
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
1662
1683
  }
@@ -1677,13 +1698,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
1677
1698
  lng: "en",
1678
1699
  showSupportNotice: !1,
1679
1700
  resources: {
1680
- en: le,
1681
- es: ue
1701
+ en: he,
1702
+ es: ge
1682
1703
  }
1683
1704
  });
1684
1705
  //#endregion
1685
1706
  //#region src/i18n.ts
1686
- var { translator: Ue } = {
1707
+ var { translator: Je } = {
1687
1708
  translator: {
1688
1709
  ...$,
1689
1710
  t: (e, t) => {
@@ -1715,13 +1736,13 @@ var { translator: Ue } = {
1715
1736
  label: "Spanish"
1716
1737
  }]
1717
1738
  };
1718
- function We(e, t) {
1719
- return Ue.t(`translation:simpleCloze:${e}`, { lng: t });
1739
+ function Ye(e, t) {
1740
+ return Je.t(`translation:simpleCloze:${e}`, { lng: t });
1720
1741
  }
1721
- function Ge(e, t) {
1722
- return Ue.t(`common:${e}`, { lng: t });
1742
+ function Xe(e, t) {
1743
+ return Je.t(`common:${e}`, { lng: t });
1723
1744
  }
1724
1745
  //#endregion
1725
- export { Ge as n, ce as r, We as t };
1746
+ export { Xe as n, me as r, Ye as t };
1726
1747
 
1727
- //# sourceMappingURL=i18n-C7YV9VIN.js.map
1748
+ //# sourceMappingURL=i18n-CBClmRAq.js.map