@prosopo/procaptcha-bundle 3.0.9 → 3.0.10

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.
Files changed (151) hide show
  1. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +1 -0
  2. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  3. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -0
  4. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  5. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -0
  6. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +2 -1
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +1 -1
  9. package/CHANGELOG.md +31 -0
  10. package/dist/bundle/ProcaptchaWidget-48FxVPQd.js +187 -0
  11. package/dist/bundle/ProcaptchaWidget-B2BzhXLv.js +992 -0
  12. package/dist/bundle/builder-DNHtDoNG.js +44 -0
  13. package/dist/bundle/{captchaComponentProvider-CZppE3Vb.js → captchaComponentProvider-B7Vxx339.js} +256 -99
  14. package/dist/bundle/{captchaRenderer-CY8KuZK-.js → captchaRenderer-DdOlOCKw.js} +3 -3
  15. package/dist/bundle/{commonChunk-24zMb_mF.js → commonChunk-HCVkoCqn.js} +9 -12
  16. package/dist/bundle/{emotion-element-5486c51c.browser.esm-PRDDgd_k.js → emotion-element-5486c51c.browser.esm-D7qvHZDV.js} +1 -1
  17. package/dist/bundle/{fp.esm-BADUiinQ.js → fp.esm-DYWeNGcH.js} +648 -548
  18. package/dist/bundle/index-7Xh-Mf8v.js +1318 -0
  19. package/dist/bundle/{index-BiwZ4wVT.js → index-C00_J7av.js} +48 -12
  20. package/dist/bundle/{index-BzOMq-ud.js → index-DyYmvHVN.js} +1 -1
  21. package/dist/bundle/locales/ar/translation.json +12 -11
  22. package/dist/bundle/locales/az/translation.json +12 -11
  23. package/dist/bundle/locales/cs/translation.json +12 -11
  24. package/dist/bundle/locales/de/translation.json +12 -11
  25. package/dist/bundle/locales/el/translation.json +12 -11
  26. package/dist/bundle/locales/en/translation.json +4 -3
  27. package/dist/bundle/locales/es/translation.json +12 -11
  28. package/dist/bundle/locales/fi/translation.json +29 -28
  29. package/dist/bundle/locales/fr/translation.json +12 -11
  30. package/dist/bundle/locales/hi/translation.json +41 -40
  31. package/dist/bundle/locales/hu/translation.json +12 -11
  32. package/dist/bundle/locales/id/translation.json +12 -11
  33. package/dist/bundle/locales/it/translation.json +12 -11
  34. package/dist/bundle/locales/ja/translation.json +12 -11
  35. package/dist/bundle/locales/jv/translation.json +12 -11
  36. package/dist/bundle/locales/ko/translation.json +7 -6
  37. package/dist/bundle/locales/ml/translation.json +12 -11
  38. package/dist/bundle/locales/ms/translation.json +12 -11
  39. package/dist/bundle/locales/nl/translation.json +12 -11
  40. package/dist/bundle/locales/no/translation.json +12 -11
  41. package/dist/bundle/locales/pl/translation.json +12 -11
  42. package/dist/bundle/locales/pt/translation.json +12 -11
  43. package/dist/bundle/locales/pt-BR/translation.json +12 -11
  44. package/dist/bundle/locales/ro/translation.json +12 -11
  45. package/dist/bundle/locales/ru/translation.json +12 -11
  46. package/dist/bundle/locales/sr/translation.json +12 -11
  47. package/dist/bundle/locales/sv/translation.json +12 -11
  48. package/dist/bundle/locales/th/translation.json +12 -11
  49. package/dist/bundle/locales/tr/translation.json +7 -6
  50. package/dist/bundle/locales/uk/translation.json +12 -11
  51. package/dist/bundle/locales/vi/translation.json +12 -11
  52. package/dist/bundle/locales/zh-CN/translation.json +12 -11
  53. package/dist/bundle/nobleChunk-Qozzkbsq.js +3648 -0
  54. package/dist/bundle/procaptcha.bundle.js +2 -2
  55. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts +1 -0
  56. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  57. package/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -0
  58. package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  59. package/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -0
  60. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  61. package/dist/bundle/util/captcha/captchaType.d.ts +2 -1
  62. package/dist/bundle/util/captcha/captchaType.d.ts.map +1 -1
  63. package/dist/bundle/{utilCryptoChunk-CIPUtfoO.js → utilCryptoChunk-qm-BM2eT.js} +618 -647
  64. package/dist/bundle/{web2Chunk-7Vd8yt2r.js → web2Chunk-DCsWA5PR.js} +1150 -994
  65. package/dist/bundle/{web3Chunk-DrUvbVNW.js → web3Chunk-B8txCqUJ.js} +3 -3
  66. package/dist/index.js +142 -108
  67. package/dist/util/captcha/captchaComponentProvider.js +18 -10
  68. package/dist/util/captcha/captchaComponentsList.js +6 -5
  69. package/dist/util/captcha/captchaRenderer.js +58 -40
  70. package/dist/util/captcha/captchaType.js +9 -5
  71. package/dist/util/captcha/components/frictionlessCaptcha.js +19 -9
  72. package/dist/util/captcha/components/imageCaptcha.js +13 -5
  73. package/dist/util/captcha/components/powCaptcha.js +13 -5
  74. package/dist/util/config.js +15 -12
  75. package/dist/util/configCreator.js +21 -22
  76. package/dist/util/language.js +14 -13
  77. package/dist/util/timeout.js +13 -8
  78. package/dist/util/widgetFactory.js +77 -55
  79. package/dist/util/widgetThemeResolver.js +14 -17
  80. package/package.json +23 -20
  81. package/stats.html +1 -1
  82. package/vite.cjs.config.ts +2 -3
  83. package/vite.esm.config.ts +20 -0
  84. package/vite.test.config.ts +9 -5
  85. package/dist/bundle/ProcaptchaWidget-D_kzGjgO.js +0 -612
  86. package/dist/bundle/ProcaptchaWidget-DlrcrISF.js +0 -148
  87. package/dist/bundle/builder-CQlqPNRd.js +0 -37
  88. package/dist/bundle/index-BRg_gWPo.js +0 -1328
  89. package/dist/bundle/nobleChunk-Xl5XLrx3.js +0 -3635
  90. package/dist/components.d.ts +0 -5
  91. package/dist/components.d.ts.map +0 -1
  92. package/dist/components.js +0 -5
  93. package/dist/components.js.map +0 -1
  94. package/dist/index.d.ts +0 -16
  95. package/dist/index.d.ts.map +0 -1
  96. package/dist/index.js.map +0 -1
  97. package/dist/tests/util/captchaType.test.d.ts +0 -2
  98. package/dist/tests/util/captchaType.test.d.ts.map +0 -1
  99. package/dist/tests/util/captchaType.test.js +0 -36
  100. package/dist/tests/util/captchaType.test.js.map +0 -1
  101. package/dist/tests/util/config.test.d.ts +0 -2
  102. package/dist/tests/util/config.test.d.ts.map +0 -1
  103. package/dist/tests/util/config.test.js +0 -69
  104. package/dist/tests/util/config.test.js.map +0 -1
  105. package/dist/tests/util/renderLogic.test.d.ts +0 -2
  106. package/dist/tests/util/renderLogic.test.d.ts.map +0 -1
  107. package/dist/tests/util/renderLogic.test.js +0 -126
  108. package/dist/tests/util/renderLogic.test.js.map +0 -1
  109. package/dist/util/captcha/captchaComponentProvider.d.ts +0 -8
  110. package/dist/util/captcha/captchaComponentProvider.d.ts.map +0 -1
  111. package/dist/util/captcha/captchaComponentProvider.js.map +0 -1
  112. package/dist/util/captcha/captchaComponentsList.d.ts +0 -6
  113. package/dist/util/captcha/captchaComponentsList.d.ts.map +0 -1
  114. package/dist/util/captcha/captchaComponentsList.js.map +0 -1
  115. package/dist/util/captcha/captchaProps.d.ts +0 -9
  116. package/dist/util/captcha/captchaProps.d.ts.map +0 -1
  117. package/dist/util/captcha/captchaProps.js +0 -2
  118. package/dist/util/captcha/captchaProps.js.map +0 -1
  119. package/dist/util/captcha/captchaRenderer.d.ts +0 -24
  120. package/dist/util/captcha/captchaRenderer.d.ts.map +0 -1
  121. package/dist/util/captcha/captchaRenderer.js.map +0 -1
  122. package/dist/util/captcha/captchaType.d.ts +0 -3
  123. package/dist/util/captcha/captchaType.d.ts.map +0 -1
  124. package/dist/util/captcha/captchaType.js.map +0 -1
  125. package/dist/util/captcha/components/frictionlessCaptcha.d.ts +0 -4
  126. package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
  127. package/dist/util/captcha/components/frictionlessCaptcha.js.map +0 -1
  128. package/dist/util/captcha/components/imageCaptcha.d.ts +0 -4
  129. package/dist/util/captcha/components/imageCaptcha.d.ts.map +0 -1
  130. package/dist/util/captcha/components/imageCaptcha.js.map +0 -1
  131. package/dist/util/captcha/components/powCaptcha.d.ts +0 -4
  132. package/dist/util/captcha/components/powCaptcha.d.ts.map +0 -1
  133. package/dist/util/captcha/components/powCaptcha.js.map +0 -1
  134. package/dist/util/config.d.ts +0 -6
  135. package/dist/util/config.d.ts.map +0 -1
  136. package/dist/util/config.js.map +0 -1
  137. package/dist/util/configCreator.d.ts +0 -5
  138. package/dist/util/configCreator.d.ts.map +0 -1
  139. package/dist/util/configCreator.js.map +0 -1
  140. package/dist/util/language.d.ts +0 -3
  141. package/dist/util/language.d.ts.map +0 -1
  142. package/dist/util/language.js.map +0 -1
  143. package/dist/util/timeout.d.ts +0 -3
  144. package/dist/util/timeout.d.ts.map +0 -1
  145. package/dist/util/timeout.js.map +0 -1
  146. package/dist/util/widgetFactory.d.ts +0 -18
  147. package/dist/util/widgetFactory.d.ts.map +0 -1
  148. package/dist/util/widgetFactory.js.map +0 -1
  149. package/dist/util/widgetThemeResolver.d.ts +0 -9
  150. package/dist/util/widgetThemeResolver.d.ts.map +0 -1
  151. package/dist/util/widgetThemeResolver.js.map +0 -1
@@ -1,10 +1,15 @@
1
- import { q as _r } from "./nobleChunk-Xl5XLrx3.js";
2
- import { g as Mr } from "./bnChunk-DRlDxTFg.js";
3
- import { z as R, n as Te, o as y, a as S, b as K, s as h, c as Hr, u as _e, d as Dt, e as Me, f as Ft, g as Xe, r as In, l as _t } from "./zodChunk-wTu9ZHzV.js";
4
- import { h as Vr } from "./commonChunk-24zMb_mF.js";
5
- import { r as rt, b as dt, o as Rn, u as ht, a as Mt, t as Br, i as Kr, c as je, k as it, s as $n } from "./utilChunk-sqstc6C5.js";
6
- import { j as qr, s as zr, n as Wr, a as Jr, c as Gr, d as Xr, e as Yr, f as Qr, g as Zr, h as ei, k as ti, i as jn, l as An, _ as N, m as Ae, o as ni, p as Ie, q as ri, r as ii, t as oi } from "./utilCryptoChunk-CIPUtfoO.js";
7
- function si(n, e) {
1
+ var Rt = (n) => {
2
+ throw TypeError(n);
3
+ };
4
+ var $t = (n, e, t) => e.has(n) || Rt("Cannot " + t);
5
+ var U = (n, e, t) => ($t(n, e, "read from private field"), t ? t.call(n) : e.get(n)), pe = (n, e, t) => e.has(n) ? Rt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), he = (n, e, t, r) => ($t(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t);
6
+ import { q as Ur } from "./nobleChunk-Qozzkbsq.js";
7
+ import { g as Ar } from "./bnChunk-DRlDxTFg.js";
8
+ import { z as R, n as Ce, o as y, a as S, b as K, s as p, c as Dr, u as Ae, d as jt, e as De, f as Nt, g as ze, r as Sn, l as Ut } from "./zodChunk-wTu9ZHzV.js";
9
+ import { h as Fr } from "./commonChunk-HCVkoCqn.js";
10
+ import { j as _r, s as Mr, n as Hr, a as Vr, c as Br, d as Kr, e as qr, f as zr, g as Wr, h as Jr, k as Xr, i as xn, l as On, m as $e, o as Gr, p as Yr, q as Qr, r as Zr } from "./utilCryptoChunk-qm-BM2eT.js";
11
+ import { r as et, b as lt, o as En, u as ct, a as At, t as ei, i as ti, c as je, k as tt, s as Tn } from "./utilChunk-sqstc6C5.js";
12
+ function ni(n, e) {
8
13
  for (var t = 0; t < e.length; t++) {
9
14
  const r = e[t];
10
15
  if (typeof r != "string" && !Array.isArray(r)) {
@@ -20,17 +25,17 @@ function si(n, e) {
20
25
  }
21
26
  return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
22
27
  }
23
- const ha = (n) => new Promise((e) => setTimeout(e, n)), pa = (n, e) => {
28
+ const ha = (n) => new Promise((e) => setTimeout(e, n)), ga = (n, e) => {
24
29
  let t = 0;
25
30
  const r = "0".repeat(e);
26
31
  for (; ; ) {
27
32
  const i = new TextEncoder().encode(t + n);
28
- if (ai(_r(i)).startsWith(r))
33
+ if (ri(Ur(i)).startsWith(r))
29
34
  return t;
30
35
  t += 1;
31
36
  }
32
- }, ai = (n) => Array.from(n).map((e) => e.toString(16).padStart(2, "0")).join("");
33
- function ga(n, e, t) {
37
+ }, ri = (n) => Array.from(n).map((e) => e.toString(16).padStart(2, "0")).join("");
38
+ function ma(n, e, t) {
34
39
  if (n.length === 0)
35
40
  throw new Error("Array is empty");
36
41
  if (!Number.isFinite(e))
@@ -41,66 +46,56 @@ function ga(n, e, t) {
41
46
  throw new Error(`Index ${e} smaller than 0`);
42
47
  return n[e];
43
48
  }
44
- const ui = (n) => Array.isArray(n) && n !== null, li = "dev", He = new Array(256), Nn = new Array(256 * 256);
49
+ const ii = (n) => Array.isArray(n) && n !== null, oi = "dev", Fe = new Array(256), Cn = new Array(256 * 256);
45
50
  for (let n = 0; n < 256; n++)
46
- He[n] = n.toString(16).padStart(2, "0");
51
+ Fe[n] = n.toString(16).padStart(2, "0");
47
52
  for (let n = 0; n < 256; n++) {
48
53
  const e = n << 8;
49
54
  for (let t = 0; t < 256; t++)
50
- Nn[e | t] = He[n] + He[t];
55
+ Cn[e | t] = Fe[n] + Fe[t];
51
56
  }
52
- function ot(n, e) {
57
+ function nt(n, e) {
53
58
  const t = n.length % 2 | 0, r = n.length - t | 0;
54
59
  for (let i = 0; i < r; i += 2)
55
- e += Nn[n[i] << 8 | n[i + 1]];
56
- return t && (e += He[n[r] | 0]), e;
60
+ e += Cn[n[i] << 8 | n[i + 1]];
61
+ return t && (e += Fe[n[r] | 0]), e;
57
62
  }
58
- function Ye(n, e = -1, t = !0) {
63
+ function We(n, e = -1, t = !0) {
59
64
  const r = t ? "0x" : "";
60
65
  if (!(n != null && n.length))
61
66
  return r;
62
67
  if (e > 0) {
63
68
  const i = Math.ceil(e / 8);
64
69
  if (n.length > i)
65
- return `${ot(n.subarray(0, i / 2), r)}…${ot(n.subarray(n.length - i / 2), "")}`;
66
- }
67
- return ot(n, r);
68
- }
69
- const ma = (n) => ui(n) ? Ye(new Uint8Array(n)) : n.toString();
70
- var p;
71
- (function(n) {
72
- n.datasetId = "datasetId", n.user = "user", n.dapp = "dapp", n.provider = "provider", n.blockNumber = "blockNumber", n.requestHash = "requestHash", n.captchas = "captchas", n.commitmentId = "commitmentId", n.proof = "proof", n.dappSignature = "dappSignature", n.dappUserSignature = "dappUserSignature", n.providerUrl = "providerUrl", n.procaptchaResponse = "procaptcha-response", n.verifiedTimeout = "verifiedTimeout", n.maxVerifiedTime = "maxVerifiedTime", n.verified = "verified", n.status = "status", n.challenge = "challenge", n.difficulty = "difficulty", n.nonce = "nonce", n.timeouts = "timeouts", n.token = "token", n.secret = "secret", n.timestamp = "timestamp", n.signature = "signature", n.error = "error", n.siteKey = "siteKey", n.captchaType = "captchaType", n.sessionId = "sessionId", n.settings = "settings", n.domains = "domains", n.frictionlessThreshold = "frictionlessThreshold", n.powDifficulty = "powDifficulty", n.score = "score", n.tier = "tier", n.detectorKey = "detectorKey", n.ip = "ip";
73
- })(p || (p = {}));
74
- var Ve;
75
- (function(n) {
76
- n.Free = "free", n.Professional = "professional", n.Enterprise = "enterprise";
77
- })(Ve || (Ve = {}));
78
- R.nativeEnum(Ve);
79
- var be;
80
- (function(n) {
81
- n.image = "image", n.pow = "pow", n.frictionless = "frictionless", n.invisible = "invisible";
82
- })(be || (be = {}));
83
- R.nativeEnum(be);
84
- const ci = Te(be), fi = be.frictionless, di = [], hi = 0.5, pi = 4, gi = 0.8, mi = y({
85
- captchaType: ci.optional().default(fi),
86
- domains: K(h()).optional().default([...di]),
87
- frictionlessThreshold: S().optional().default(hi),
88
- powDifficulty: S().optional().default(pi),
89
- imageThreshold: S().optional().default(gi)
70
+ return `${nt(n.subarray(0, i / 2), r)}…${nt(n.subarray(n.length - i / 2), "")}`;
71
+ }
72
+ return nt(n, r);
73
+ }
74
+ const ya = (n) => ii(n) ? We(new Uint8Array(n)) : n.toString();
75
+ var h = /* @__PURE__ */ ((n) => (n.datasetId = "datasetId", n.user = "user", n.dapp = "dapp", n.provider = "provider", n.blockNumber = "blockNumber", n.requestHash = "requestHash", n.captchas = "captchas", n.commitmentId = "commitmentId", n.proof = "proof", n.dappSignature = "dappSignature", n.dappUserSignature = "dappUserSignature", n.providerUrl = "providerUrl", n.procaptchaResponse = "procaptcha-response", n.verifiedTimeout = "verifiedTimeout", n.maxVerifiedTime = "maxVerifiedTime", n.verified = "verified", n.status = "status", n.challenge = "challenge", n.difficulty = "difficulty", n.nonce = "nonce", n.timeouts = "timeouts", n.token = "token", n.secret = "secret", n.timestamp = "timestamp", n.signature = "signature", n.error = "error", n.siteKey = "siteKey", n.captchaType = "captchaType", n.sessionId = "sessionId", n.settings = "settings", n.domains = "domains", n.frictionlessThreshold = "frictionlessThreshold", n.powDifficulty = "powDifficulty", n.score = "score", n.tier = "tier", n.detectorKey = "detectorKey", n.ip = "ip", n))(h || {}), wt = /* @__PURE__ */ ((n) => (n.Free = "free", n.Professional = "professional", n.Enterprise = "enterprise", n))(wt || {});
76
+ R.nativeEnum(wt);
77
+ var Je = /* @__PURE__ */ ((n) => (n.image = "image", n.pow = "pow", n.frictionless = "frictionless", n.invisible = "invisible", n))(Je || {});
78
+ R.nativeEnum(Je);
79
+ const si = Ce(Je), ai = Je.frictionless, ui = [], li = 0.5, ci = 4, fi = 0.8, di = y({
80
+ captchaType: si.optional().default(ai),
81
+ domains: K(p()).optional().default([...ui]),
82
+ frictionlessThreshold: S().optional().default(li),
83
+ powDifficulty: S().optional().default(ci),
84
+ imageThreshold: S().optional().default(fi)
90
85
  });
91
- let st;
92
- async function ya(n) {
86
+ let rt;
87
+ async function va(n) {
93
88
  return new Promise((e, t) => {
94
89
  try {
95
- Promise.resolve().then(() => es).then(({ default: r }) => {
96
- st || (st = r()), e(st);
90
+ Promise.resolve().then(() => Go).then(({ default: r }) => {
91
+ rt ? e(rt) : rt = r(e);
97
92
  });
98
93
  } catch (r) {
99
94
  t(r);
100
95
  }
101
96
  });
102
97
  }
103
- const Un = {
98
+ const Ln = {
104
99
  arabic: "ar",
105
100
  azerbaijani: "az",
106
101
  czech: "cs",
@@ -133,43 +128,45 @@ const Un = {
133
128
  ukrainian: "uk",
134
129
  vietnamese: "vi",
135
130
  chinese: "zh-CN"
136
- }, Dn = R.enum(Object.values(Un));
137
- var Fn = { exports: {} }, x = {};
138
- var ke = Symbol.for("react.element"), yi = Symbol.for("react.portal"), vi = Symbol.for("react.fragment"), wi = Symbol.for("react.strict_mode"), bi = Symbol.for("react.profiler"), Si = Symbol.for("react.provider"), xi = Symbol.for("react.context"), Oi = Symbol.for("react.forward_ref"), Ei = Symbol.for("react.suspense"), Ci = Symbol.for("react.memo"), Ti = Symbol.for("react.lazy"), Ht = Symbol.iterator;
139
- function ki(n) {
140
- return n === null || typeof n != "object" ? null : (n = Ht && n[Ht] || n["@@iterator"], typeof n == "function" ? n : null);
141
- }
142
- var _n = { isMounted: function() {
131
+ }, kn = R.enum(
132
+ Object.values(Ln)
133
+ );
134
+ var Pn = { exports: {} }, x = {};
135
+ var Le = Symbol.for("react.element"), pi = Symbol.for("react.portal"), hi = Symbol.for("react.fragment"), gi = Symbol.for("react.strict_mode"), mi = Symbol.for("react.profiler"), yi = Symbol.for("react.provider"), vi = Symbol.for("react.context"), wi = Symbol.for("react.forward_ref"), bi = Symbol.for("react.suspense"), Si = Symbol.for("react.memo"), xi = Symbol.for("react.lazy"), Dt = Symbol.iterator;
136
+ function Oi(n) {
137
+ return n === null || typeof n != "object" ? null : (n = Dt && n[Dt] || n["@@iterator"], typeof n == "function" ? n : null);
138
+ }
139
+ var In = { isMounted: function() {
143
140
  return !1;
144
141
  }, enqueueForceUpdate: function() {
145
142
  }, enqueueReplaceState: function() {
146
143
  }, enqueueSetState: function() {
147
- } }, Mn = Object.assign, Hn = {};
148
- function le(n, e, t) {
149
- this.props = n, this.context = e, this.refs = Hn, this.updater = t || _n;
144
+ } }, Rn = Object.assign, $n = {};
145
+ function ce(n, e, t) {
146
+ this.props = n, this.context = e, this.refs = $n, this.updater = t || In;
150
147
  }
151
- le.prototype.isReactComponent = {};
152
- le.prototype.setState = function(n, e) {
148
+ ce.prototype.isReactComponent = {};
149
+ ce.prototype.setState = function(n, e) {
153
150
  if (typeof n != "object" && typeof n != "function" && n != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
154
151
  this.updater.enqueueSetState(this, n, e, "setState");
155
152
  };
156
- le.prototype.forceUpdate = function(n) {
153
+ ce.prototype.forceUpdate = function(n) {
157
154
  this.updater.enqueueForceUpdate(this, n, "forceUpdate");
158
155
  };
159
- function Vn() {
160
- }
161
- Vn.prototype = le.prototype;
162
- function Tt(n, e, t) {
163
- this.props = n, this.context = e, this.refs = Hn, this.updater = t || _n;
164
- }
165
- var kt = Tt.prototype = new Vn();
166
- kt.constructor = Tt;
167
- Mn(kt, le.prototype);
168
- kt.isPureReactComponent = !0;
169
- var Vt = Array.isArray, Bn = Object.prototype.hasOwnProperty, Pt = { current: null }, Kn = { key: !0, ref: !0, __self: !0, __source: !0 };
170
- function qn(n, e, t) {
156
+ function jn() {
157
+ }
158
+ jn.prototype = ce.prototype;
159
+ function bt(n, e, t) {
160
+ this.props = n, this.context = e, this.refs = $n, this.updater = t || In;
161
+ }
162
+ var St = bt.prototype = new jn();
163
+ St.constructor = bt;
164
+ Rn(St, ce.prototype);
165
+ St.isPureReactComponent = !0;
166
+ var Ft = Array.isArray, Nn = Object.prototype.hasOwnProperty, xt = { current: null }, Un = { key: !0, ref: !0, __self: !0, __source: !0 };
167
+ function An(n, e, t) {
171
168
  var r, i = {}, o = null, s = null;
172
- if (e != null) for (r in e.ref !== void 0 && (s = e.ref), e.key !== void 0 && (o = "" + e.key), e) Bn.call(e, r) && !Kn.hasOwnProperty(r) && (i[r] = e[r]);
169
+ if (e != null) for (r in e.ref !== void 0 && (s = e.ref), e.key !== void 0 && (o = "" + e.key), e) Nn.call(e, r) && !Un.hasOwnProperty(r) && (i[r] = e[r]);
173
170
  var a = arguments.length - 2;
174
171
  if (a === 1) i.children = t;
175
172
  else if (1 < a) {
@@ -177,23 +174,23 @@ function qn(n, e, t) {
177
174
  i.children = u;
178
175
  }
179
176
  if (n && n.defaultProps) for (r in a = n.defaultProps, a) i[r] === void 0 && (i[r] = a[r]);
180
- return { $$typeof: ke, type: n, key: o, ref: s, props: i, _owner: Pt.current };
177
+ return { $$typeof: Le, type: n, key: o, ref: s, props: i, _owner: xt.current };
181
178
  }
182
- function Pi(n, e) {
183
- return { $$typeof: ke, type: n.type, key: e, ref: n.ref, props: n.props, _owner: n._owner };
179
+ function Ei(n, e) {
180
+ return { $$typeof: Le, type: n.type, key: e, ref: n.ref, props: n.props, _owner: n._owner };
184
181
  }
185
- function Lt(n) {
186
- return typeof n == "object" && n !== null && n.$$typeof === ke;
182
+ function Ot(n) {
183
+ return typeof n == "object" && n !== null && n.$$typeof === Le;
187
184
  }
188
- function Li(n) {
185
+ function Ti(n) {
189
186
  var e = { "=": "=0", ":": "=2" };
190
187
  return "$" + n.replace(/[=:]/g, function(t) {
191
188
  return e[t];
192
189
  });
193
190
  }
194
- var Bt = /\/+/g;
195
- function at(n, e) {
196
- return typeof n == "object" && n !== null && n.key != null ? Li("" + n.key) : e.toString(36);
191
+ var _t = /\/+/g;
192
+ function it(n, e) {
193
+ return typeof n == "object" && n !== null && n.key != null ? Ti("" + n.key) : e.toString(36);
197
194
  }
198
195
  function Ne(n, e, t, r, i) {
199
196
  var o = typeof n;
@@ -207,31 +204,31 @@ function Ne(n, e, t, r, i) {
207
204
  break;
208
205
  case "object":
209
206
  switch (n.$$typeof) {
210
- case ke:
211
- case yi:
207
+ case Le:
208
+ case pi:
212
209
  s = !0;
213
210
  }
214
211
  }
215
- if (s) return s = n, i = i(s), n = r === "" ? "." + at(s, 0) : r, Vt(i) ? (t = "", n != null && (t = n.replace(Bt, "$&/") + "/"), Ne(i, e, t, "", function(c) {
212
+ if (s) return s = n, i = i(s), n = r === "" ? "." + it(s, 0) : r, Ft(i) ? (t = "", n != null && (t = n.replace(_t, "$&/") + "/"), Ne(i, e, t, "", function(c) {
216
213
  return c;
217
- })) : i != null && (Lt(i) && (i = Pi(i, t + (!i.key || s && s.key === i.key ? "" : ("" + i.key).replace(Bt, "$&/") + "/") + n)), e.push(i)), 1;
218
- if (s = 0, r = r === "" ? "." : r + ":", Vt(n)) for (var a = 0; a < n.length; a++) {
214
+ })) : i != null && (Ot(i) && (i = Ei(i, t + (!i.key || s && s.key === i.key ? "" : ("" + i.key).replace(_t, "$&/") + "/") + n)), e.push(i)), 1;
215
+ if (s = 0, r = r === "" ? "." : r + ":", Ft(n)) for (var a = 0; a < n.length; a++) {
219
216
  o = n[a];
220
- var u = r + at(o, a);
217
+ var u = r + it(o, a);
221
218
  s += Ne(o, e, t, u, i);
222
219
  }
223
- else if (u = ki(n), typeof u == "function") for (n = u.call(n), a = 0; !(o = n.next()).done; ) o = o.value, u = r + at(o, a++), s += Ne(o, e, t, u, i);
220
+ else if (u = Oi(n), typeof u == "function") for (n = u.call(n), a = 0; !(o = n.next()).done; ) o = o.value, u = r + it(o, a++), s += Ne(o, e, t, u, i);
224
221
  else if (o === "object") throw e = String(n), Error("Objects are not valid as a React child (found: " + (e === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : e) + "). If you meant to render a collection of children, use an array instead.");
225
222
  return s;
226
223
  }
227
- function Re(n, e, t) {
224
+ function Ie(n, e, t) {
228
225
  if (n == null) return n;
229
226
  var r = [], i = 0;
230
227
  return Ne(n, r, "", "", function(o) {
231
228
  return e.call(t, o, i++);
232
229
  }), r;
233
230
  }
234
- function Ii(n) {
231
+ function Ci(n) {
235
232
  if (n._status === -1) {
236
233
  var e = n._result;
237
234
  e = e(), e.then(function(t) {
@@ -243,41 +240,41 @@ function Ii(n) {
243
240
  if (n._status === 1) return n._result.default;
244
241
  throw n._result;
245
242
  }
246
- var $ = { current: null }, Ue = { transition: null }, Ri = { ReactCurrentDispatcher: $, ReactCurrentBatchConfig: Ue, ReactCurrentOwner: Pt };
247
- function zn() {
243
+ var $ = { current: null }, Ue = { transition: null }, Li = { ReactCurrentDispatcher: $, ReactCurrentBatchConfig: Ue, ReactCurrentOwner: xt };
244
+ function Dn() {
248
245
  throw Error("act(...) is not supported in production builds of React.");
249
246
  }
250
- x.Children = { map: Re, forEach: function(n, e, t) {
251
- Re(n, function() {
247
+ x.Children = { map: Ie, forEach: function(n, e, t) {
248
+ Ie(n, function() {
252
249
  e.apply(this, arguments);
253
250
  }, t);
254
251
  }, count: function(n) {
255
252
  var e = 0;
256
- return Re(n, function() {
253
+ return Ie(n, function() {
257
254
  e++;
258
255
  }), e;
259
256
  }, toArray: function(n) {
260
- return Re(n, function(e) {
257
+ return Ie(n, function(e) {
261
258
  return e;
262
259
  }) || [];
263
260
  }, only: function(n) {
264
- if (!Lt(n)) throw Error("React.Children.only expected to receive a single React element child.");
261
+ if (!Ot(n)) throw Error("React.Children.only expected to receive a single React element child.");
265
262
  return n;
266
263
  } };
267
- x.Component = le;
268
- x.Fragment = vi;
269
- x.Profiler = bi;
270
- x.PureComponent = Tt;
271
- x.StrictMode = wi;
272
- x.Suspense = Ei;
273
- x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ri;
274
- x.act = zn;
264
+ x.Component = ce;
265
+ x.Fragment = hi;
266
+ x.Profiler = mi;
267
+ x.PureComponent = bt;
268
+ x.StrictMode = gi;
269
+ x.Suspense = bi;
270
+ x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Li;
271
+ x.act = Dn;
275
272
  x.cloneElement = function(n, e, t) {
276
273
  if (n == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + n + ".");
277
- var r = Mn({}, n.props), i = n.key, o = n.ref, s = n._owner;
274
+ var r = Rn({}, n.props), i = n.key, o = n.ref, s = n._owner;
278
275
  if (e != null) {
279
- if (e.ref !== void 0 && (o = e.ref, s = Pt.current), e.key !== void 0 && (i = "" + e.key), n.type && n.type.defaultProps) var a = n.type.defaultProps;
280
- for (u in e) Bn.call(e, u) && !Kn.hasOwnProperty(u) && (r[u] = e[u] === void 0 && a !== void 0 ? a[u] : e[u]);
276
+ if (e.ref !== void 0 && (o = e.ref, s = xt.current), e.key !== void 0 && (i = "" + e.key), n.type && n.type.defaultProps) var a = n.type.defaultProps;
277
+ for (u in e) Nn.call(e, u) && !Un.hasOwnProperty(u) && (r[u] = e[u] === void 0 && a !== void 0 ? a[u] : e[u]);
281
278
  }
282
279
  var u = arguments.length - 2;
283
280
  if (u === 1) r.children = t;
@@ -286,28 +283,28 @@ x.cloneElement = function(n, e, t) {
286
283
  for (var c = 0; c < u; c++) a[c] = arguments[c + 2];
287
284
  r.children = a;
288
285
  }
289
- return { $$typeof: ke, type: n.type, key: i, ref: o, props: r, _owner: s };
286
+ return { $$typeof: Le, type: n.type, key: i, ref: o, props: r, _owner: s };
290
287
  };
291
288
  x.createContext = function(n) {
292
- return n = { $$typeof: xi, _currentValue: n, _currentValue2: n, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, n.Provider = { $$typeof: Si, _context: n }, n.Consumer = n;
289
+ return n = { $$typeof: vi, _currentValue: n, _currentValue2: n, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, n.Provider = { $$typeof: yi, _context: n }, n.Consumer = n;
293
290
  };
294
- x.createElement = qn;
291
+ x.createElement = An;
295
292
  x.createFactory = function(n) {
296
- var e = qn.bind(null, n);
293
+ var e = An.bind(null, n);
297
294
  return e.type = n, e;
298
295
  };
299
296
  x.createRef = function() {
300
297
  return { current: null };
301
298
  };
302
299
  x.forwardRef = function(n) {
303
- return { $$typeof: Oi, render: n };
300
+ return { $$typeof: wi, render: n };
304
301
  };
305
- x.isValidElement = Lt;
302
+ x.isValidElement = Ot;
306
303
  x.lazy = function(n) {
307
- return { $$typeof: Ti, _payload: { _status: -1, _result: n }, _init: Ii };
304
+ return { $$typeof: xi, _payload: { _status: -1, _result: n }, _init: Ci };
308
305
  };
309
306
  x.memo = function(n, e) {
310
- return { $$typeof: Ci, type: n, compare: e === void 0 ? null : e };
307
+ return { $$typeof: Si, type: n, compare: e === void 0 ? null : e };
311
308
  };
312
309
  x.startTransition = function(n) {
313
310
  var e = Ue.transition;
@@ -318,7 +315,7 @@ x.startTransition = function(n) {
318
315
  Ue.transition = e;
319
316
  }
320
317
  };
321
- x.unstable_act = zn;
318
+ x.unstable_act = Dn;
322
319
  x.useCallback = function(n, e) {
323
320
  return $.current.useCallback(n, e);
324
321
  };
@@ -364,12 +361,12 @@ x.useTransition = function() {
364
361
  return $.current.useTransition();
365
362
  };
366
363
  x.version = "18.3.1";
367
- Fn.exports = x;
368
- var _ = Fn.exports;
369
- const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
364
+ Pn.exports = x;
365
+ var F = Pn.exports;
366
+ const ki = /* @__PURE__ */ Ar(F), wa = /* @__PURE__ */ ni({
370
367
  __proto__: null,
371
- default: $i
372
- }, [_]), ji = (n, e, t, r) => {
368
+ default: ki
369
+ }, [F]), Pi = (n, e, t, r) => {
373
370
  var o, s, a, u;
374
371
  const i = [t, {
375
372
  code: e,
@@ -378,9 +375,9 @@ const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
378
375
  if ((s = (o = n == null ? void 0 : n.services) == null ? void 0 : o.logger) != null && s.forward)
379
376
  return n.services.logger.forward(i, "warn", "react-i18next::", !0);
380
377
  Q(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), (u = (a = n == null ? void 0 : n.services) == null ? void 0 : a.logger) != null && u.warn ? n.services.logger.warn(...i) : console != null && console.warn && [...i];
381
- }, Kt = {}, pt = (n, e, t, r) => {
382
- Q(t) && Kt[t] || (Q(t) && (Kt[t] = /* @__PURE__ */ new Date()), ji(n, e, t, r));
383
- }, Wn = (n, e) => () => {
378
+ }, Mt = {}, ft = (n, e, t, r) => {
379
+ Q(t) && Mt[t] || (Q(t) && (Mt[t] = /* @__PURE__ */ new Date()), Pi(n, e, t, r));
380
+ }, Fn = (n, e) => () => {
384
381
  if (n.isInitialized)
385
382
  e();
386
383
  else {
@@ -391,14 +388,14 @@ const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
391
388
  };
392
389
  n.on("initialized", t);
393
390
  }
394
- }, gt = (n, e, t) => {
395
- n.loadNamespaces(e, Wn(n, t));
396
- }, qt = (n, e, t, r) => {
397
- if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return gt(n, t, r);
391
+ }, dt = (n, e, t) => {
392
+ n.loadNamespaces(e, Fn(n, t));
393
+ }, Ht = (n, e, t, r) => {
394
+ if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return dt(n, t, r);
398
395
  t.forEach((i) => {
399
396
  n.options.ns.indexOf(i) < 0 && n.options.ns.push(i);
400
- }), n.loadLanguages(e, Wn(n, r));
401
- }, Ai = (n, e, t = {}) => !e.languages || !e.languages.length ? (pt(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
397
+ }), n.loadLanguages(e, Fn(n, r));
398
+ }, Ii = (n, e, t = {}) => !e.languages || !e.languages.length ? (ft(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
402
399
  languages: e.languages
403
400
  }), !0) : e.hasLoadedNamespace(n, {
404
401
  lng: t.lng,
@@ -406,7 +403,7 @@ const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
406
403
  var o;
407
404
  if (((o = t.bindI18n) == null ? void 0 : o.indexOf("languageChanging")) > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !i(r.isLanguageChangingTo, n)) return !1;
408
405
  }
409
- }), Q = (n) => typeof n == "string", Ni = (n) => typeof n == "object" && n !== null, Ui = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Di = {
406
+ }), Q = (n) => typeof n == "string", Ri = (n) => typeof n == "object" && n !== null, $i = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, ji = {
410
407
  "&amp;": "&",
411
408
  "&#38;": "&",
412
409
  "&lt;": "<",
@@ -427,8 +424,8 @@ const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
427
424
  "&#8230;": "…",
428
425
  "&#x2F;": "/",
429
426
  "&#47;": "/"
430
- }, Fi = (n) => Di[n], _i = (n) => n.replace(Ui, Fi);
431
- let mt = {
427
+ }, Ni = (n) => ji[n], Ui = (n) => n.replace($i, Ni);
428
+ let pt = {
432
429
  bindI18n: "languageChanged",
433
430
  bindI18nStore: "",
434
431
  transEmptyNodeValue: "",
@@ -436,24 +433,24 @@ let mt = {
436
433
  transWrapTextNodes: "",
437
434
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
438
435
  useSuspense: !0,
439
- unescape: _i
436
+ unescape: Ui
440
437
  };
441
- const Mi = (n = {}) => {
442
- mt = {
443
- ...mt,
438
+ const Ai = (n = {}) => {
439
+ pt = {
440
+ ...pt,
444
441
  ...n
445
442
  };
446
- }, Hi = () => mt;
447
- let Jn;
448
- const Vi = (n) => {
449
- Jn = n;
450
- }, Bi = () => Jn, Ki = {
443
+ }, Di = () => pt;
444
+ let _n;
445
+ const Fi = (n) => {
446
+ _n = n;
447
+ }, _i = () => _n, Mi = {
451
448
  type: "3rdParty",
452
449
  init(n) {
453
- Mi(n.options.react), Vi(n);
450
+ Ai(n.options.react), Fi(n);
454
451
  }
455
- }, qi = _.createContext();
456
- class zi {
452
+ }, Hi = F.createContext();
453
+ class Vi {
457
454
  constructor() {
458
455
  this.usedNamespaces = {};
459
456
  }
@@ -466,120 +463,120 @@ class zi {
466
463
  return Object.keys(this.usedNamespaces);
467
464
  }
468
465
  }
469
- const Wi = (n, e) => {
470
- const t = _.useRef();
471
- return _.useEffect(() => {
466
+ const Bi = (n, e) => {
467
+ const t = F.useRef();
468
+ return F.useEffect(() => {
472
469
  t.current = n;
473
470
  }, [n, e]), t.current;
474
- }, Gn = (n, e, t, r) => n.getFixedT(e, t, r), Ji = (n, e, t, r) => _.useCallback(Gn(n, e, t, r), [n, e, t, r]), Gi = (n, e = {}) => {
475
- var j, W, J, P;
471
+ }, Mn = (n, e, t, r) => n.getFixedT(e, t, r), Ki = (n, e, t, r) => F.useCallback(Mn(n, e, t, r), [n, e, t, r]), qi = (n, e = {}) => {
472
+ var j, z, W, k;
476
473
  const {
477
474
  i18n: t
478
475
  } = e, {
479
476
  i18n: r,
480
477
  defaultNS: i
481
- } = _.useContext(qi) || {}, o = t || r || Bi();
482
- if (o && !o.reportNamespaces && (o.reportNamespaces = new zi()), !o) {
483
- pt(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
484
- const O = (I, C) => Q(C) ? C : Ni(C) && Q(C.defaultValue) ? C.defaultValue : Array.isArray(I) ? I[I.length - 1] : I, L = [O, {}, !1];
485
- return L.t = O, L.i18n = {}, L.ready = !1, L;
478
+ } = F.useContext(Hi) || {}, o = t || r || _i();
479
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new Vi()), !o) {
480
+ ft(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
481
+ const O = (I, T) => Q(T) ? T : Ri(T) && Q(T.defaultValue) ? T.defaultValue : Array.isArray(I) ? I[I.length - 1] : I, P = [O, {}, !1];
482
+ return P.t = O, P.i18n = {}, P.ready = !1, P;
486
483
  }
487
- (j = o.options.react) != null && j.wait && pt(o, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
484
+ (j = o.options.react) != null && j.wait && ft(o, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
488
485
  const s = {
489
- ...Hi(),
486
+ ...Di(),
490
487
  ...o.options.react,
491
488
  ...e
492
489
  }, {
493
490
  useSuspense: a,
494
491
  keyPrefix: u
495
492
  } = s;
496
- let c = n || i || ((W = o.options) == null ? void 0 : W.defaultNS);
497
- c = Q(c) ? [c] : c || ["translation"], (P = (J = o.reportNamespaces).addUsedNamespaces) == null || P.call(J, c);
498
- const l = (o.isInitialized || o.initializedStoreOnce) && c.every((O) => Ai(O, o, s)), f = Ji(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), d = () => f, g = () => Gn(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), [m, v] = _.useState(d);
493
+ let c = n || i || ((z = o.options) == null ? void 0 : z.defaultNS);
494
+ c = Q(c) ? [c] : c || ["translation"], (k = (W = o.reportNamespaces).addUsedNamespaces) == null || k.call(W, c);
495
+ const l = (o.isInitialized || o.initializedStoreOnce) && c.every((O) => Ii(O, o, s)), f = Ki(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), d = () => f, g = () => Mn(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), [m, v] = F.useState(d);
499
496
  let w = c.join();
500
497
  e.lng && (w = `${e.lng}${w}`);
501
- const k = Wi(w), E = _.useRef(!0);
502
- _.useEffect(() => {
498
+ const L = Bi(w), E = F.useRef(!0);
499
+ F.useEffect(() => {
503
500
  const {
504
501
  bindI18n: O,
505
- bindI18nStore: L
502
+ bindI18nStore: P
506
503
  } = s;
507
- E.current = !0, !l && !a && (e.lng ? qt(o, e.lng, c, () => {
504
+ E.current = !0, !l && !a && (e.lng ? Ht(o, e.lng, c, () => {
508
505
  E.current && v(g);
509
- }) : gt(o, c, () => {
506
+ }) : dt(o, c, () => {
510
507
  E.current && v(g);
511
- })), l && k && k !== w && E.current && v(g);
508
+ })), l && L && L !== w && E.current && v(g);
512
509
  const I = () => {
513
510
  E.current && v(g);
514
511
  };
515
- return O && (o == null || o.on(O, I)), L && (o == null || o.store.on(L, I)), () => {
516
- E.current = !1, o && (O == null || O.split(" ").forEach((C) => o.off(C, I))), L && o && L.split(" ").forEach((C) => o.store.off(C, I));
512
+ return O && (o == null || o.on(O, I)), P && (o == null || o.store.on(P, I)), () => {
513
+ E.current = !1, o && (O == null || O.split(" ").forEach((T) => o.off(T, I))), P && o && P.split(" ").forEach((T) => o.store.off(T, I));
517
514
  };
518
- }, [o, w]), _.useEffect(() => {
515
+ }, [o, w]), F.useEffect(() => {
519
516
  E.current && l && v(d);
520
517
  }, [o, u, l]);
521
- const T = [m, o, l];
522
- if (T.t = m, T.i18n = o, T.ready = l, l || !l && !a) return T;
518
+ const C = [m, o, l];
519
+ if (C.t = m, C.i18n = o, C.ready = l, l || !l && !a) return C;
523
520
  throw new Promise((O) => {
524
- e.lng ? qt(o, e.lng, c, () => O()) : gt(o, c, () => O());
521
+ e.lng ? Ht(o, e.lng, c, () => O()) : dt(o, c, () => O());
525
522
  });
526
- }, b = (n) => typeof n == "string", de = () => {
523
+ }, b = (n) => typeof n == "string", ge = () => {
527
524
  let n, e;
528
525
  const t = new Promise((r, i) => {
529
526
  n = r, e = i;
530
527
  });
531
528
  return t.resolve = n, t.reject = e, t;
532
- }, zt = (n) => n == null ? "" : "" + n, Xi = (n, e, t) => {
529
+ }, Vt = (n) => n == null ? "" : "" + n, zi = (n, e, t) => {
533
530
  n.forEach((r) => {
534
531
  e[r] && (t[r] = e[r]);
535
532
  });
536
- }, Yi = /###/g, Wt = (n) => n && n.indexOf("###") > -1 ? n.replace(Yi, ".") : n, Jt = (n) => !n || b(n), ve = (n, e, t) => {
533
+ }, Wi = /###/g, Bt = (n) => n && n.indexOf("###") > -1 ? n.replace(Wi, ".") : n, Kt = (n) => !n || b(n), be = (n, e, t) => {
537
534
  const r = b(e) ? e.split(".") : e;
538
535
  let i = 0;
539
536
  for (; i < r.length - 1; ) {
540
- if (Jt(n)) return {};
541
- const o = Wt(r[i]);
537
+ if (Kt(n)) return {};
538
+ const o = Bt(r[i]);
542
539
  !n[o] && t && (n[o] = new t()), Object.prototype.hasOwnProperty.call(n, o) ? n = n[o] : n = {}, ++i;
543
540
  }
544
- return Jt(n) ? {} : {
541
+ return Kt(n) ? {} : {
545
542
  obj: n,
546
- k: Wt(r[i])
543
+ k: Bt(r[i])
547
544
  };
548
- }, Gt = (n, e, t) => {
545
+ }, qt = (n, e, t) => {
549
546
  const {
550
547
  obj: r,
551
548
  k: i
552
- } = ve(n, e, Object);
549
+ } = be(n, e, Object);
553
550
  if (r !== void 0 || e.length === 1) {
554
551
  r[i] = t;
555
552
  return;
556
553
  }
557
- let o = e[e.length - 1], s = e.slice(0, e.length - 1), a = ve(n, s, Object);
554
+ let o = e[e.length - 1], s = e.slice(0, e.length - 1), a = be(n, s, Object);
558
555
  for (; a.obj === void 0 && s.length; )
559
- o = `${s[s.length - 1]}.${o}`, s = s.slice(0, s.length - 1), a = ve(n, s, Object), a != null && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
556
+ o = `${s[s.length - 1]}.${o}`, s = s.slice(0, s.length - 1), a = be(n, s, Object), a != null && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
560
557
  a.obj[`${a.k}.${o}`] = t;
561
- }, Qi = (n, e, t, r) => {
558
+ }, Ji = (n, e, t, r) => {
562
559
  const {
563
560
  obj: i,
564
561
  k: o
565
- } = ve(n, e, Object);
562
+ } = be(n, e, Object);
566
563
  i[o] = i[o] || [], i[o].push(t);
567
- }, Be = (n, e) => {
564
+ }, _e = (n, e) => {
568
565
  const {
569
566
  obj: t,
570
567
  k: r
571
- } = ve(n, e);
568
+ } = be(n, e);
572
569
  if (t && Object.prototype.hasOwnProperty.call(t, r))
573
570
  return t[r];
574
- }, Zi = (n, e, t) => {
575
- const r = Be(n, t);
576
- return r !== void 0 ? r : Be(e, t);
577
- }, Xn = (n, e, t) => {
571
+ }, Xi = (n, e, t) => {
572
+ const r = _e(n, t);
573
+ return r !== void 0 ? r : _e(e, t);
574
+ }, Hn = (n, e, t) => {
578
575
  for (const r in e)
579
- r !== "__proto__" && r !== "constructor" && (r in n ? b(n[r]) || n[r] instanceof String || b(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Xn(n[r], e[r], t) : n[r] = e[r]);
576
+ r !== "__proto__" && r !== "constructor" && (r in n ? b(n[r]) || n[r] instanceof String || b(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Hn(n[r], e[r], t) : n[r] = e[r]);
580
577
  return n;
581
578
  }, te = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
582
- var eo = {
579
+ var Gi = {
583
580
  "&": "&amp;",
584
581
  "<": "&lt;",
585
582
  ">": "&gt;",
@@ -587,8 +584,8 @@ var eo = {
587
584
  "'": "&#39;",
588
585
  "/": "&#x2F;"
589
586
  };
590
- const to = (n) => b(n) ? n.replace(/[&<>"'\/]/g, (e) => eo[e]) : n;
591
- class no {
587
+ const Yi = (n) => b(n) ? n.replace(/[&<>"'\/]/g, (e) => Gi[e]) : n;
588
+ class Qi {
592
589
  constructor(e) {
593
590
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
594
591
  }
@@ -600,18 +597,18 @@ class no {
600
597
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
601
598
  }
602
599
  }
603
- const ro = [" ", ",", "?", "!", ";"], io = new no(20), oo = (n, e, t) => {
600
+ const Zi = [" ", ",", "?", "!", ";"], eo = new Qi(20), to = (n, e, t) => {
604
601
  e = e || "", t = t || "";
605
- const r = ro.filter((s) => e.indexOf(s) < 0 && t.indexOf(s) < 0);
602
+ const r = Zi.filter((s) => e.indexOf(s) < 0 && t.indexOf(s) < 0);
606
603
  if (r.length === 0) return !0;
607
- const i = io.getRegExp(`(${r.map((s) => s === "?" ? "\\?" : s).join("|")})`);
604
+ const i = eo.getRegExp(`(${r.map((s) => s === "?" ? "\\?" : s).join("|")})`);
608
605
  let o = !i.test(n);
609
606
  if (!o) {
610
607
  const s = n.indexOf(t);
611
608
  s > 0 && !i.test(n.substring(0, s)) && (o = !0);
612
609
  }
613
610
  return o;
614
- }, yt = function(n, e) {
611
+ }, ht = function(n, e) {
615
612
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
616
613
  if (!n) return;
617
614
  if (n[e])
@@ -632,7 +629,7 @@ const ro = [" ", ",", "?", "!", ";"], io = new no(20), oo = (n, e, t) => {
632
629
  i = s;
633
630
  }
634
631
  return i;
635
- }, Ke = (n) => n == null ? void 0 : n.replace("_", "-"), so = {
632
+ }, Me = (n) => n == null ? void 0 : n.replace("_", "-"), no = {
636
633
  type: "logger",
637
634
  log(n) {
638
635
  this.output("log", n);
@@ -648,14 +645,14 @@ const ro = [" ", ",", "?", "!", ";"], io = new no(20), oo = (n, e, t) => {
648
645
  (r = (t = console == null ? void 0 : console[n]) == null ? void 0 : t.apply) == null || r.call(t, console, e);
649
646
  }
650
647
  };
651
- class qe {
648
+ class He {
652
649
  constructor(e) {
653
650
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
654
651
  this.init(e, t);
655
652
  }
656
653
  init(e) {
657
654
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
658
- this.prefix = t.prefix || "i18next:", this.logger = e || so, this.options = t, this.debug = t.debug;
655
+ this.prefix = t.prefix || "i18next:", this.logger = e || no, this.options = t, this.debug = t.debug;
659
656
  }
660
657
  log() {
661
658
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
@@ -681,17 +678,17 @@ class qe {
681
678
  return i && !this.debug ? null : (b(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
682
679
  }
683
680
  create(e) {
684
- return new qe(this.logger, {
681
+ return new He(this.logger, {
685
682
  prefix: `${this.prefix}:${e}:`,
686
683
  ...this.options
687
684
  });
688
685
  }
689
686
  clone(e) {
690
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new qe(this.logger, e);
687
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new He(this.logger, e);
691
688
  }
692
689
  }
693
- var B = new qe();
694
- class Qe {
690
+ var B = new He();
691
+ class Xe {
695
692
  constructor() {
696
693
  this.observers = {};
697
694
  }
@@ -725,7 +722,7 @@ class Qe {
725
722
  });
726
723
  }
727
724
  }
728
- class Xt extends Qe {
725
+ class zt extends Xe {
729
726
  constructor(e) {
730
727
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
731
728
  ns: ["translation"],
@@ -746,8 +743,8 @@ class Xt extends Qe {
746
743
  const o = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, s = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
747
744
  let a;
748
745
  e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], r && (Array.isArray(r) ? a.push(...r) : b(r) && o ? a.push(...r.split(o)) : a.push(r)));
749
- const u = Be(this.data, a);
750
- return !u && !t && !r && e.indexOf(".") > -1 && (e = a[0], t = a[1], r = a.slice(2).join(".")), u || !s || !b(r) ? u : yt((l = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : l[t], r, o);
746
+ const u = _e(this.data, a);
747
+ return !u && !t && !r && e.indexOf(".") > -1 && (e = a[0], t = a[1], r = a.slice(2).join(".")), u || !s || !b(r) ? u : ht((l = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : l[t], r, o);
751
748
  }
752
749
  addResource(e, t, r, i) {
753
750
  let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -755,7 +752,7 @@ class Xt extends Qe {
755
752
  };
756
753
  const s = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator;
757
754
  let a = [e, t];
758
- r && (a = a.concat(s ? r.split(s) : r)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), Gt(this.data, a, i), o.silent || this.emit("added", e, t, r, i);
755
+ r && (a = a.concat(s ? r.split(s) : r)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), qt(this.data, a, i), o.silent || this.emit("added", e, t, r, i);
759
756
  }
760
757
  addResources(e, t, r) {
761
758
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
@@ -773,11 +770,11 @@ class Xt extends Qe {
773
770
  skipCopy: !1
774
771
  }, a = [e, t];
775
772
  e.indexOf(".") > -1 && (a = e.split("."), i = r, r = t, t = a[1]), this.addNamespaces(t);
776
- let u = Be(this.data, a) || {};
777
- s.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Xn(u, r, o) : u = {
773
+ let u = _e(this.data, a) || {};
774
+ s.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Hn(u, r, o) : u = {
778
775
  ...u,
779
776
  ...r
780
- }, Gt(this.data, a, u), s.silent || this.emit("added", e, t, r);
777
+ }, qt(this.data, a, u), s.silent || this.emit("added", e, t, r);
781
778
  }
782
779
  removeResourceBundle(e, t) {
783
780
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -799,7 +796,7 @@ class Xt extends Qe {
799
796
  return this.data;
800
797
  }
801
798
  }
802
- var Yn = {
799
+ var Vn = {
803
800
  processors: {},
804
801
  addPostProcessor(n) {
805
802
  this.processors[n.name] = n;
@@ -811,11 +808,11 @@ var Yn = {
811
808
  }), e;
812
809
  }
813
810
  };
814
- const Yt = {}, Qt = (n) => !b(n) && typeof n != "boolean" && typeof n != "number";
815
- class ze extends Qe {
811
+ const Wt = {}, Jt = (n) => !b(n) && typeof n != "boolean" && typeof n != "number";
812
+ class Ve extends Xe {
816
813
  constructor(e) {
817
814
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
818
- super(), Xi(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = B.create("translator");
815
+ super(), zi(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = B.create("translator");
819
816
  }
820
817
  changeLanguage(e) {
821
818
  e && (this.language = e);
@@ -834,7 +831,7 @@ class ze extends Qe {
834
831
  r === void 0 && (r = ":");
835
832
  const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
836
833
  let o = t.ns || this.options.defaultNS || [];
837
- const s = r && e.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !oo(e, r, i);
834
+ const s = r && e.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !to(e, r, i);
838
835
  if (s && !a) {
839
836
  const u = e.match(this.interpolator.nestingRegexp);
840
837
  if (u && u.length > 0)
@@ -861,15 +858,15 @@ class ze extends Qe {
861
858
  } = this.extractFromKey(e[e.length - 1], t), u = a[a.length - 1], c = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
862
859
  if ((c == null ? void 0 : c.toLowerCase()) === "cimode") {
863
860
  if (l) {
864
- const C = t.nsSeparator || this.options.nsSeparator;
861
+ const T = t.nsSeparator || this.options.nsSeparator;
865
862
  return i ? {
866
- res: `${u}${C}${s}`,
863
+ res: `${u}${T}${s}`,
867
864
  usedKey: s,
868
865
  exactUsedKey: s,
869
866
  usedLng: c,
870
867
  usedNS: u,
871
868
  usedParams: this.getUsedParamsDetails(t)
872
- } : `${u}${C}${s}`;
869
+ } : `${u}${T}${s}`;
873
870
  }
874
871
  return i ? {
875
872
  res: s,
@@ -882,72 +879,72 @@ class ze extends Qe {
882
879
  }
883
880
  const f = this.resolve(e, t);
884
881
  let d = f == null ? void 0 : f.res;
885
- const g = (f == null ? void 0 : f.usedKey) || s, m = (f == null ? void 0 : f.exactUsedKey) || s, v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, k = !this.i18nFormat || this.i18nFormat.handleAsObject, E = t.count !== void 0 && !b(t.count), T = ze.hasDefaultValue(t), j = E ? this.pluralResolver.getSuffix(c, t.count, t) : "", W = t.ordinal && E ? this.pluralResolver.getSuffix(c, t.count, {
882
+ const g = (f == null ? void 0 : f.usedKey) || s, m = (f == null ? void 0 : f.exactUsedKey) || s, v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, L = !this.i18nFormat || this.i18nFormat.handleAsObject, E = t.count !== void 0 && !b(t.count), C = Ve.hasDefaultValue(t), j = E ? this.pluralResolver.getSuffix(c, t.count, t) : "", z = t.ordinal && E ? this.pluralResolver.getSuffix(c, t.count, {
886
883
  ordinal: !1
887
- }) : "", J = E && !t.ordinal && t.count === 0, P = J && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${j}`] || t[`defaultValue${W}`] || t.defaultValue;
884
+ }) : "", W = E && !t.ordinal && t.count === 0, k = W && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${j}`] || t[`defaultValue${z}`] || t.defaultValue;
888
885
  let O = d;
889
- k && !d && T && (O = P);
890
- const L = Qt(O), I = Object.prototype.toString.apply(O);
891
- if (k && O && L && v.indexOf(I) < 0 && !(b(w) && Array.isArray(O))) {
886
+ L && !d && C && (O = k);
887
+ const P = Jt(O), I = Object.prototype.toString.apply(O);
888
+ if (L && O && P && v.indexOf(I) < 0 && !(b(w) && Array.isArray(O))) {
892
889
  if (!t.returnObjects && !this.options.returnObjects) {
893
890
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
894
- const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, O, {
891
+ const T = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, O, {
895
892
  ...t,
896
893
  ns: a
897
894
  }) : `key '${s} (${this.language})' returned an object instead of string.`;
898
- return i ? (f.res = C, f.usedParams = this.getUsedParamsDetails(t), f) : C;
895
+ return i ? (f.res = T, f.usedParams = this.getUsedParamsDetails(t), f) : T;
899
896
  }
900
897
  if (o) {
901
- const C = Array.isArray(O), D = C ? [] : {}, jt = C ? m : g;
902
- for (const M in O)
903
- if (Object.prototype.hasOwnProperty.call(O, M)) {
904
- const q = `${jt}${o}${M}`;
905
- T && !d ? D[M] = this.translate(q, {
898
+ const T = Array.isArray(O), D = T ? [] : {}, Lt = T ? m : g;
899
+ for (const _ in O)
900
+ if (Object.prototype.hasOwnProperty.call(O, _)) {
901
+ const q = `${Lt}${o}${_}`;
902
+ C && !d ? D[_] = this.translate(q, {
906
903
  ...t,
907
- defaultValue: Qt(P) ? P[M] : void 0,
904
+ defaultValue: Jt(k) ? k[_] : void 0,
908
905
  joinArrays: !1,
909
906
  ns: a
910
- }) : D[M] = this.translate(q, {
907
+ }) : D[_] = this.translate(q, {
911
908
  ...t,
912
909
  joinArrays: !1,
913
910
  ns: a
914
- }), D[M] === q && (D[M] = O[M]);
911
+ }), D[_] === q && (D[_] = O[_]);
915
912
  }
916
913
  d = D;
917
914
  }
918
- } else if (k && b(w) && Array.isArray(d))
915
+ } else if (L && b(w) && Array.isArray(d))
919
916
  d = d.join(w), d && (d = this.extendTranslation(d, e, t, r));
920
917
  else {
921
- let C = !1, D = !1;
922
- !this.isValidLookup(d) && T && (C = !0, d = P), this.isValidLookup(d) || (D = !0, d = s);
923
- const M = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : d, q = T && P !== d && this.options.updateMissing;
924
- if (D || C || q) {
925
- if (this.logger.log(q ? "updateKey" : "missingKey", c, u, s, q ? P : d), o) {
926
- const A = this.resolve(s, {
918
+ let T = !1, D = !1;
919
+ !this.isValidLookup(d) && C && (T = !0, d = k), this.isValidLookup(d) || (D = !0, d = s);
920
+ const _ = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : d, q = C && k !== d && this.options.updateMissing;
921
+ if (D || T || q) {
922
+ if (this.logger.log(q ? "updateKey" : "missingKey", c, u, s, q ? k : d), o) {
923
+ const N = this.resolve(s, {
927
924
  ...t,
928
925
  keySeparator: !1
929
926
  });
930
- A && A.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
927
+ N && N.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
931
928
  }
932
- let ce = [];
933
- const Le = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
934
- if (this.options.saveMissingTo === "fallback" && Le && Le[0])
935
- for (let A = 0; A < Le.length; A++)
936
- ce.push(Le[A]);
937
- else this.options.saveMissingTo === "all" ? ce = this.languageUtils.toResolveHierarchy(t.lng || this.language) : ce.push(t.lng || this.language);
938
- const At = (A, Y, fe) => {
939
- var Ut;
940
- const Nt = T && fe !== d ? fe : M;
941
- this.options.missingKeyHandler ? this.options.missingKeyHandler(A, u, Y, Nt, q, t) : (Ut = this.backendConnector) != null && Ut.saveMissing && this.backendConnector.saveMissing(A, u, Y, Nt, q, t), this.emit("missingKey", A, u, Y, d);
929
+ let fe = [];
930
+ const Pe = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
931
+ if (this.options.saveMissingTo === "fallback" && Pe && Pe[0])
932
+ for (let N = 0; N < Pe.length; N++)
933
+ fe.push(Pe[N]);
934
+ else this.options.saveMissingTo === "all" ? fe = this.languageUtils.toResolveHierarchy(t.lng || this.language) : fe.push(t.lng || this.language);
935
+ const kt = (N, G, de) => {
936
+ var It;
937
+ const Pt = C && de !== d ? de : _;
938
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(N, u, G, Pt, q, t) : (It = this.backendConnector) != null && It.saveMissing && this.backendConnector.saveMissing(N, u, G, Pt, q, t), this.emit("missingKey", N, u, G, d);
942
939
  };
943
- this.options.saveMissing && (this.options.saveMissingPlurals && E ? ce.forEach((A) => {
944
- const Y = this.pluralResolver.getSuffixes(A, t);
945
- J && t[`defaultValue${this.options.pluralSeparator}zero`] && Y.indexOf(`${this.options.pluralSeparator}zero`) < 0 && Y.push(`${this.options.pluralSeparator}zero`), Y.forEach((fe) => {
946
- At([A], s + fe, t[`defaultValue${fe}`] || P);
940
+ this.options.saveMissing && (this.options.saveMissingPlurals && E ? fe.forEach((N) => {
941
+ const G = this.pluralResolver.getSuffixes(N, t);
942
+ W && t[`defaultValue${this.options.pluralSeparator}zero`] && G.indexOf(`${this.options.pluralSeparator}zero`) < 0 && G.push(`${this.options.pluralSeparator}zero`), G.forEach((de) => {
943
+ kt([N], s + de, t[`defaultValue${de}`] || k);
947
944
  });
948
- }) : At(ce, s, P));
945
+ }) : kt(fe, s, k));
949
946
  }
950
- d = this.extendTranslation(d, e, t, f, r), D && d === s && this.options.appendNamespaceToMissingKey && (d = `${u}:${s}`), (D || C) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${s}` : s, C ? d : void 0));
947
+ d = this.extendTranslation(d, e, t, f, r), D && d === s && this.options.appendNamespaceToMissingKey && (d = `${u}:${s}`), (D || T) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${s}` : s, T ? d : void 0));
951
948
  }
952
949
  return i ? (f.res = d, f.usedParams = this.getUsedParamsDetails(t), f) : d;
953
950
  }
@@ -990,7 +987,7 @@ class ze extends Qe {
990
987
  }, r)), r.interpolation && this.interpolator.reset();
991
988
  }
992
989
  const a = r.postProcess || this.options.postProcess, u = b(a) ? [a] : a;
993
- return e != null && (u != null && u.length) && r.applyPostProcessor !== !1 && (e = Yn.handle(u, e, t, this.options && this.options.postProcessPassResolved ? {
990
+ return e != null && (u != null && u.length) && r.applyPostProcessor !== !1 && (e = Vn.handle(u, e, t, this.options && this.options.postProcessPassResolved ? {
994
991
  i18nResolved: {
995
992
  ...i,
996
993
  usedParams: this.getUsedParamsDetails(r)
@@ -1008,26 +1005,26 @@ class ze extends Qe {
1008
1005
  this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
1009
1006
  const d = t.count !== void 0 && !b(t.count), g = d && !t.ordinal && t.count === 0, m = t.context !== void 0 && (b(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
1010
1007
  f.forEach((w) => {
1011
- var k, E;
1012
- this.isValidLookup(r) || (a = w, !Yt[`${v[0]}-${w}`] && ((k = this.utils) != null && k.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(a)) && (Yt[`${v[0]}-${w}`] = !0, this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" 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!!!")), v.forEach((T) => {
1013
- var J;
1008
+ var L, E;
1009
+ this.isValidLookup(r) || (a = w, !Wt[`${v[0]}-${w}`] && ((L = this.utils) != null && L.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(a)) && (Wt[`${v[0]}-${w}`] = !0, this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" 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!!!")), v.forEach((C) => {
1010
+ var W;
1014
1011
  if (this.isValidLookup(r)) return;
1015
- s = T;
1012
+ s = C;
1016
1013
  const j = [l];
1017
- if ((J = this.i18nFormat) != null && J.addLookupKeys)
1018
- this.i18nFormat.addLookupKeys(j, l, T, w, t);
1014
+ if ((W = this.i18nFormat) != null && W.addLookupKeys)
1015
+ this.i18nFormat.addLookupKeys(j, l, C, w, t);
1019
1016
  else {
1020
- let P;
1021
- d && (P = this.pluralResolver.getSuffix(T, t.count, t));
1022
- const O = `${this.options.pluralSeparator}zero`, L = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1023
- if (d && (j.push(l + P), t.ordinal && P.indexOf(L) === 0 && j.push(l + P.replace(L, this.options.pluralSeparator)), g && j.push(l + O)), m) {
1017
+ let k;
1018
+ d && (k = this.pluralResolver.getSuffix(C, t.count, t));
1019
+ const O = `${this.options.pluralSeparator}zero`, P = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1020
+ if (d && (j.push(l + k), t.ordinal && k.indexOf(P) === 0 && j.push(l + k.replace(P, this.options.pluralSeparator)), g && j.push(l + O)), m) {
1024
1021
  const I = `${l}${this.options.contextSeparator}${t.context}`;
1025
- j.push(I), d && (j.push(I + P), t.ordinal && P.indexOf(L) === 0 && j.push(I + P.replace(L, this.options.pluralSeparator)), g && j.push(I + O));
1022
+ j.push(I), d && (j.push(I + k), t.ordinal && k.indexOf(P) === 0 && j.push(I + k.replace(P, this.options.pluralSeparator)), g && j.push(I + O));
1026
1023
  }
1027
1024
  }
1028
- let W;
1029
- for (; W = j.pop(); )
1030
- this.isValidLookup(r) || (o = W, r = this.getResource(T, w, W, t));
1025
+ let z;
1026
+ for (; z = j.pop(); )
1027
+ this.isValidLookup(r) || (o = z, r = this.getResource(C, w, z, t));
1031
1028
  }));
1032
1029
  });
1033
1030
  }), {
@@ -1070,17 +1067,17 @@ class ze extends Qe {
1070
1067
  return !1;
1071
1068
  }
1072
1069
  }
1073
- class Zt {
1070
+ class Xt {
1074
1071
  constructor(e) {
1075
1072
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = B.create("languageUtils");
1076
1073
  }
1077
1074
  getScriptPartFromCode(e) {
1078
- if (e = Ke(e), !e || e.indexOf("-") < 0) return null;
1075
+ if (e = Me(e), !e || e.indexOf("-") < 0) return null;
1079
1076
  const t = e.split("-");
1080
1077
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
1081
1078
  }
1082
1079
  getLanguagePartFromCode(e) {
1083
- if (e = Ke(e), !e || e.indexOf("-") < 0) return e;
1080
+ if (e = Me(e), !e || e.indexOf("-") < 0) return e;
1084
1081
  const t = e.split("-");
1085
1082
  return this.formatLanguageCode(t[0]);
1086
1083
  }
@@ -1132,20 +1129,20 @@ class Zt {
1132
1129
  }), i;
1133
1130
  }
1134
1131
  }
1135
- const en = {
1132
+ const Gt = {
1136
1133
  zero: 0,
1137
1134
  one: 1,
1138
1135
  two: 2,
1139
1136
  few: 3,
1140
1137
  many: 4,
1141
1138
  other: 5
1142
- }, tn = {
1139
+ }, Yt = {
1143
1140
  select: (n) => n === 1 ? "one" : "other",
1144
1141
  resolvedOptions: () => ({
1145
1142
  pluralCategories: ["one", "other"]
1146
1143
  })
1147
1144
  };
1148
- class ao {
1145
+ class ro {
1149
1146
  constructor(e) {
1150
1147
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1151
1148
  this.languageUtils = e, this.options = t, this.logger = B.create("pluralResolver"), this.pluralRulesCache = {};
@@ -1158,7 +1155,7 @@ class ao {
1158
1155
  }
1159
1156
  getRule(e) {
1160
1157
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1161
- const r = Ke(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", o = JSON.stringify({
1158
+ const r = Me(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", o = JSON.stringify({
1162
1159
  cleanedCode: r,
1163
1160
  type: i
1164
1161
  });
@@ -1171,8 +1168,8 @@ class ao {
1171
1168
  });
1172
1169
  } catch {
1173
1170
  if (!Intl)
1174
- return this.logger.error("No Intl support, please use an Intl polyfill!"), tn;
1175
- if (!e.match(/-|_/)) return tn;
1171
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), Yt;
1172
+ if (!e.match(/-|_/)) return Yt;
1176
1173
  const u = this.languageUtils.getLanguagePartFromCode(e);
1177
1174
  s = this.getRule(u, t);
1178
1175
  }
@@ -1188,7 +1185,7 @@ class ao {
1188
1185
  }
1189
1186
  getSuffixes(e) {
1190
1187
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = this.getRule(e, t);
1191
- return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((i, o) => en[i] - en[o]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
1188
+ return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((i, o) => Gt[i] - Gt[o]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
1192
1189
  }
1193
1190
  getSuffix(e, t) {
1194
1191
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -1196,11 +1193,11 @@ class ao {
1196
1193
  return i ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
1197
1194
  }
1198
1195
  }
1199
- const nn = function(n, e, t) {
1200
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = Zi(n, e, t);
1201
- return !o && i && b(t) && (o = yt(n, t, r), o === void 0 && (o = yt(e, t, r))), o;
1202
- }, ut = (n) => n.replace(/\$/g, "$$$$");
1203
- class uo {
1196
+ const Qt = function(n, e, t) {
1197
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = Xi(n, e, t);
1198
+ return !o && i && b(t) && (o = ht(n, t, r), o === void 0 && (o = ht(e, t, r))), o;
1199
+ }, ot = (n) => n.replace(/\$/g, "$$$$");
1200
+ class io {
1204
1201
  constructor() {
1205
1202
  var t;
1206
1203
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1227,10 +1224,10 @@ class uo {
1227
1224
  nestingSuffix: m,
1228
1225
  nestingSuffixEscaped: v,
1229
1226
  nestingOptionsSeparator: w,
1230
- maxReplaces: k,
1227
+ maxReplaces: L,
1231
1228
  alwaysFormat: E
1232
1229
  } = e.interpolation;
1233
- this.escape = t !== void 0 ? t : to, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = o ? te(o) : s || "{{", this.suffix = a ? te(a) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? te(d) : g || te("$t("), this.nestingSuffix = m ? te(m) : v || te(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = k || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
1230
+ this.escape = t !== void 0 ? t : Yi, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = o ? te(o) : s || "{{", this.suffix = a ? te(a) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? te(d) : g || te("$t("), this.nestingSuffix = m ? te(m) : v || te(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = L || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
1234
1231
  }
1235
1232
  reset() {
1236
1233
  this.options && this.init(this.options);
@@ -1244,15 +1241,15 @@ class uo {
1244
1241
  let o, s, a;
1245
1242
  const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
1246
1243
  if (m.indexOf(this.formatSeparator) < 0) {
1247
- const E = nn(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
1244
+ const E = Qt(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
1248
1245
  return this.alwaysFormat ? this.format(E, void 0, r, {
1249
1246
  ...i,
1250
1247
  ...t,
1251
1248
  interpolationkey: m
1252
1249
  }) : E;
1253
1250
  }
1254
- const v = m.split(this.formatSeparator), w = v.shift().trim(), k = v.join(this.formatSeparator).trim();
1255
- return this.format(nn(t, u, w, this.options.keySeparator, this.options.ignoreJSONStructure), k, r, {
1251
+ const v = m.split(this.formatSeparator), w = v.shift().trim(), L = v.join(this.formatSeparator).trim();
1252
+ return this.format(Qt(t, u, w, this.options.keySeparator, this.options.ignoreJSONStructure), L, r, {
1256
1253
  ...i,
1257
1254
  ...t,
1258
1255
  interpolationkey: w
@@ -1262,17 +1259,17 @@ class uo {
1262
1259
  const l = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((g = i == null ? void 0 : i.interpolation) == null ? void 0 : g.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1263
1260
  return [{
1264
1261
  regex: this.regexpUnescape,
1265
- safeValue: (m) => ut(m)
1262
+ safeValue: (m) => ot(m)
1266
1263
  }, {
1267
1264
  regex: this.regexp,
1268
- safeValue: (m) => this.escapeValue ? ut(this.escape(m)) : ut(m)
1265
+ safeValue: (m) => this.escapeValue ? ot(this.escape(m)) : ot(m)
1269
1266
  }].forEach((m) => {
1270
1267
  for (a = 0; o = m.regex.exec(e); ) {
1271
1268
  const v = o[1].trim();
1272
1269
  if (s = c(v), s === void 0)
1273
1270
  if (typeof l == "function") {
1274
- const k = l(e, o, i);
1275
- s = b(k) ? k : "";
1271
+ const L = l(e, o, i);
1272
+ s = b(L) ? L : "";
1276
1273
  } else if (i && Object.prototype.hasOwnProperty.call(i, v))
1277
1274
  s = "";
1278
1275
  else if (f) {
@@ -1280,7 +1277,7 @@ class uo {
1280
1277
  continue;
1281
1278
  } else
1282
1279
  this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), s = "";
1283
- else !b(s) && !this.useRawValueToEscape && (s = zt(s));
1280
+ else !b(s) && !this.useRawValueToEscape && (s = Vt(s));
1284
1281
  const w = m.safeValue(s);
1285
1282
  if (e = e.replace(o[0], w), f ? (m.regex.lastIndex += s.length, m.regex.lastIndex -= o[0].length) : m.regex.lastIndex = 0, a++, a >= this.maxReplaces)
1286
1283
  break;
@@ -1318,7 +1315,7 @@ class uo {
1318
1315
  i[1] = l.shift(), u = l, c = !0;
1319
1316
  }
1320
1317
  if (o = t(a.call(this, i[1].trim(), s), s), o && i[0] === e && !b(o)) return o;
1321
- b(o) || (o = zt(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), o = ""), c && (o = u.reduce((l, f) => this.format(l, f, r.lng, {
1318
+ b(o) || (o = Vt(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), o = ""), c && (o = u.reduce((l, f) => this.format(l, f, r.lng, {
1322
1319
  ...r,
1323
1320
  interpolationkey: i[1].trim()
1324
1321
  }), o.trim())), e = e.replace(i[0], o), this.regexp.lastIndex = 0;
@@ -1326,7 +1323,7 @@ class uo {
1326
1323
  return e;
1327
1324
  }
1328
1325
  }
1329
- const lo = (n) => {
1326
+ const oo = (n) => {
1330
1327
  let e = n.toLowerCase().trim();
1331
1328
  const t = {};
1332
1329
  if (n.indexOf("(") > -1) {
@@ -1354,10 +1351,10 @@ const lo = (n) => {
1354
1351
  });
1355
1352
  const s = r + JSON.stringify(o);
1356
1353
  let a = e[s];
1357
- return a || (a = n(Ke(r), i), e[s] = a), a(t);
1354
+ return a || (a = n(Me(r), i), e[s] = a), a(t);
1358
1355
  };
1359
1356
  };
1360
- class co {
1357
+ class so {
1361
1358
  constructor() {
1362
1359
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1363
1360
  this.logger = B.create("formatter"), this.options = e, this.formats = {
@@ -1418,7 +1415,7 @@ class co {
1418
1415
  const {
1419
1416
  formatName: c,
1420
1417
  formatOptions: l
1421
- } = lo(u);
1418
+ } = oo(u);
1422
1419
  if (this.formats[c]) {
1423
1420
  let d = a;
1424
1421
  try {
@@ -1438,10 +1435,10 @@ class co {
1438
1435
  }, e);
1439
1436
  }
1440
1437
  }
1441
- const fo = (n, e) => {
1438
+ const ao = (n, e) => {
1442
1439
  n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
1443
1440
  };
1444
- class ho extends Qe {
1441
+ class uo extends Xe {
1445
1442
  constructor(e, t, r) {
1446
1443
  var o, s;
1447
1444
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
@@ -1475,7 +1472,7 @@ class ho extends Qe {
1475
1472
  }), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
1476
1473
  const a = {};
1477
1474
  this.queue.forEach((u) => {
1478
- Qi(u.loaded, [o], s), fo(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
1475
+ Ji(u.loaded, [o], s), ao(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
1479
1476
  a[c] || (a[c] = {});
1480
1477
  const l = u.loaded[c];
1481
1478
  l.length && l.forEach((f) => {
@@ -1578,7 +1575,7 @@ class ho extends Qe {
1578
1575
  }
1579
1576
  }
1580
1577
  }
1581
- const rn = () => ({
1578
+ const Zt = () => ({
1582
1579
  debug: !1,
1583
1580
  initAsync: !0,
1584
1581
  ns: ["translation"],
@@ -1634,21 +1631,21 @@ const rn = () => ({
1634
1631
  maxReplaces: 1e3,
1635
1632
  skipOnVariables: !0
1636
1633
  }
1637
- }), on = (n) => {
1634
+ }), en = (n) => {
1638
1635
  var e, t;
1639
1636
  return b(n.ns) && (n.ns = [n.ns]), b(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), b(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
1640
- }, $e = () => {
1641
- }, po = (n) => {
1637
+ }, Re = () => {
1638
+ }, lo = (n) => {
1642
1639
  Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
1643
1640
  typeof n[t] == "function" && (n[t] = n[t].bind(n));
1644
1641
  });
1645
1642
  };
1646
- class Se extends Qe {
1643
+ class Se extends Xe {
1647
1644
  constructor() {
1648
1645
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1649
- if (super(), this.options = on(e), this.services = {}, this.logger = B, this.modules = {
1646
+ if (super(), this.options = en(e), this.services = {}, this.logger = B, this.modules = {
1650
1647
  external: []
1651
- }, po(this), t && !this.isInitialized && !e.isClone) {
1648
+ }, lo(this), t && !this.isInitialized && !e.isClone) {
1652
1649
  if (!this.options.initAsync)
1653
1650
  return this.init(e, t), this;
1654
1651
  setTimeout(() => {
@@ -1660,11 +1657,11 @@ class Se extends Qe {
1660
1657
  var e = this;
1661
1658
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
1662
1659
  this.isInitializing = !0, typeof t == "function" && (r = t, t = {}), t.defaultNS == null && t.ns && (b(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1663
- const i = rn();
1660
+ const i = Zt();
1664
1661
  this.options = {
1665
1662
  ...i,
1666
1663
  ...this.options,
1667
- ...on(t)
1664
+ ...en(t)
1668
1665
  }, this.options.interpolation = {
1669
1666
  ...i.interpolation,
1670
1667
  ...this.options.interpolation
@@ -1673,20 +1670,20 @@ class Se extends Qe {
1673
1670
  if (!this.options.isClone) {
1674
1671
  this.modules.logger ? B.init(o(this.modules.logger), this.options) : B.init(null, this.options);
1675
1672
  let l;
1676
- this.modules.formatter ? l = this.modules.formatter : l = co;
1677
- const f = new Zt(this.options);
1678
- this.store = new Xt(this.options.resources, this.options);
1673
+ this.modules.formatter ? l = this.modules.formatter : l = so;
1674
+ const f = new Xt(this.options);
1675
+ this.store = new zt(this.options.resources, this.options);
1679
1676
  const d = this.services;
1680
- d.logger = B, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new ao(f, {
1677
+ d.logger = B, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new ro(f, {
1681
1678
  prepend: this.options.pluralSeparator,
1682
1679
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1683
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (d.formatter = o(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new uo(this.options), d.utils = {
1680
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (d.formatter = o(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new io(this.options), d.utils = {
1684
1681
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1685
- }, d.backendConnector = new ho(o(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(g) {
1682
+ }, d.backendConnector = new uo(o(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(g) {
1686
1683
  for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1687
1684
  v[w - 1] = arguments[w];
1688
1685
  e.emit(g, ...v);
1689
- }), this.modules.languageDetector && (d.languageDetector = o(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = o(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new ze(this.services, this.options), this.translator.on("*", function(g) {
1686
+ }), this.modules.languageDetector && (d.languageDetector = o(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = o(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new Ve(this.services, this.options), this.translator.on("*", function(g) {
1690
1687
  for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1691
1688
  v[w - 1] = arguments[w];
1692
1689
  e.emit(g, ...v);
@@ -1694,7 +1691,7 @@ class Se extends Qe {
1694
1691
  g.init && g.init(this);
1695
1692
  });
1696
1693
  }
1697
- if (this.format = this.options.interpolation.format, r || (r = $e), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1694
+ if (this.format = this.options.interpolation.format, r || (r = Re), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1698
1695
  const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1699
1696
  l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
1700
1697
  }
@@ -1707,7 +1704,7 @@ class Se extends Qe {
1707
1704
  return e.store[l](...arguments), e;
1708
1705
  };
1709
1706
  });
1710
- const u = de(), c = () => {
1707
+ const u = ge(), c = () => {
1711
1708
  const l = (f, d) => {
1712
1709
  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), u.resolve(d), r(f, d);
1713
1710
  };
@@ -1718,7 +1715,7 @@ class Se extends Qe {
1718
1715
  }
1719
1716
  loadResources(e) {
1720
1717
  var o, s;
1721
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : $e;
1718
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Re;
1722
1719
  const i = b(e) ? e : this.language;
1723
1720
  if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
1724
1721
  if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
@@ -1735,15 +1732,15 @@ class Se extends Qe {
1735
1732
  r(null);
1736
1733
  }
1737
1734
  reloadResources(e, t, r) {
1738
- const i = de();
1739
- return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = $e), this.services.backendConnector.reload(e, t, (o) => {
1735
+ const i = ge();
1736
+ return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = Re), this.services.backendConnector.reload(e, t, (o) => {
1740
1737
  i.resolve(), r(o);
1741
1738
  }), i;
1742
1739
  }
1743
1740
  use(e) {
1744
1741
  if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1745
1742
  if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1746
- return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Yn.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1743
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Vn.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1747
1744
  }
1748
1745
  setResolvedLanguage(e) {
1749
1746
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
@@ -1758,7 +1755,7 @@ class Se extends Qe {
1758
1755
  changeLanguage(e, t) {
1759
1756
  var r = this;
1760
1757
  this.isLanguageChangingTo = e;
1761
- const i = de();
1758
+ const i = ge();
1762
1759
  this.emit("languageChanging", e);
1763
1760
  const o = (u) => {
1764
1761
  this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
@@ -1831,7 +1828,7 @@ class Se extends Qe {
1831
1828
  return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || s(r, e) && (!i || s(o, e)));
1832
1829
  }
1833
1830
  loadNamespaces(e, t) {
1834
- const r = de();
1831
+ const r = ge();
1835
1832
  return this.options.ns ? (b(e) && (e = [e]), e.forEach((i) => {
1836
1833
  this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1837
1834
  }), this.loadResources((i) => {
@@ -1839,7 +1836,7 @@ class Se extends Qe {
1839
1836
  }), r) : (t && t(), Promise.resolve());
1840
1837
  }
1841
1838
  loadLanguages(e, t) {
1842
- const r = de();
1839
+ const r = ge();
1843
1840
  b(e) && (e = [e]);
1844
1841
  const i = this.options.preload || [], o = e.filter((s) => i.indexOf(s) < 0 && this.services.languageUtils.isSupportedCode(s));
1845
1842
  return o.length ? (this.options.preload = i.concat(o), this.loadResources((s) => {
@@ -1849,7 +1846,7 @@ class Se extends Qe {
1849
1846
  dir(e) {
1850
1847
  var i, o;
1851
1848
  if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1852
- const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = ((o = this.services) == null ? void 0 : o.languageUtils) || new Zt(rn());
1849
+ const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = ((o = this.services) == null ? void 0 : o.languageUtils) || new Xt(Zt());
1853
1850
  return t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1854
1851
  }
1855
1852
  static createInstance() {
@@ -1857,7 +1854,7 @@ class Se extends Qe {
1857
1854
  return new Se(e, t);
1858
1855
  }
1859
1856
  cloneInstance() {
1860
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : $e;
1857
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Re;
1861
1858
  const r = e.forkResourceStore;
1862
1859
  r && delete e.forkResourceStore;
1863
1860
  const i = {
@@ -1877,9 +1874,9 @@ class Se extends Qe {
1877
1874
  }, Object.keys(u[c]).reduce((l, f) => (l[f] = {
1878
1875
  ...u[c][f]
1879
1876
  }, l), {})), {});
1880
- o.store = new Xt(a, i), o.services.resourceStore = o.store;
1877
+ o.store = new zt(a, i), o.services.resourceStore = o.store;
1881
1878
  }
1882
- return o.translator = new ze(o.services, i), o.translator.on("*", function(a) {
1879
+ return o.translator = new Ve(o.services, i), o.translator.on("*", function(a) {
1883
1880
  for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), l = 1; l < u; l++)
1884
1881
  c[l - 1] = arguments[l];
1885
1882
  o.emit(a, ...c);
@@ -1897,20 +1894,20 @@ class Se extends Qe {
1897
1894
  };
1898
1895
  }
1899
1896
  }
1900
- const De = Se.createInstance();
1901
- De.createInstance = Se.createInstance;
1897
+ const re = Se.createInstance();
1898
+ re.createInstance = Se.createInstance;
1902
1899
  const {
1903
- slice: go,
1904
- forEach: mo
1900
+ slice: co,
1901
+ forEach: fo
1905
1902
  } = [];
1906
- function yo(n) {
1907
- return mo.call(go.call(arguments, 1), (e) => {
1903
+ function po(n) {
1904
+ return fo.call(co.call(arguments, 1), (e) => {
1908
1905
  if (e)
1909
1906
  for (const t in e)
1910
1907
  n[t] === void 0 && (n[t] = e[t]);
1911
1908
  }), n;
1912
1909
  }
1913
- const sn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vo = function(n, e) {
1910
+ const tn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ho = function(n, e) {
1914
1911
  const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
1915
1912
  path: "/"
1916
1913
  }, i = encodeURIComponent(e);
@@ -1921,12 +1918,12 @@ const sn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vo = function(n, e) {
1921
1918
  o += `; Max-Age=${Math.floor(s)}`;
1922
1919
  }
1923
1920
  if (r.domain) {
1924
- if (!sn.test(r.domain))
1921
+ if (!tn.test(r.domain))
1925
1922
  throw new TypeError("option domain is invalid");
1926
1923
  o += `; Domain=${r.domain}`;
1927
1924
  }
1928
1925
  if (r.path) {
1929
- if (!sn.test(r.path))
1926
+ if (!tn.test(r.path))
1930
1927
  throw new TypeError("option path is invalid");
1931
1928
  o += `; Path=${r.path}`;
1932
1929
  }
@@ -1953,13 +1950,13 @@ const sn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vo = function(n, e) {
1953
1950
  throw new TypeError("option sameSite is invalid");
1954
1951
  }
1955
1952
  return o;
1956
- }, an = {
1953
+ }, nn = {
1957
1954
  create(n, e, t, r) {
1958
1955
  let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
1959
1956
  path: "/",
1960
1957
  sameSite: "strict"
1961
1958
  };
1962
- t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), r && (i.domain = r), document.cookie = vo(n, encodeURIComponent(e), i);
1959
+ t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), r && (i.domain = r), document.cookie = ho(n, encodeURIComponent(e), i);
1963
1960
  },
1964
1961
  read(n) {
1965
1962
  const e = `${n}=`, t = document.cookie.split(";");
@@ -1974,7 +1971,7 @@ const sn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vo = function(n, e) {
1974
1971
  this.create(n, "", -1);
1975
1972
  }
1976
1973
  };
1977
- var wo = {
1974
+ var go = {
1978
1975
  name: "cookie",
1979
1976
  // Deconstruct the options object and extract the lookupCookie property
1980
1977
  lookup(n) {
@@ -1982,7 +1979,7 @@ var wo = {
1982
1979
  lookupCookie: e
1983
1980
  } = n;
1984
1981
  if (e && typeof document < "u")
1985
- return an.read(e) || void 0;
1982
+ return nn.read(e) || void 0;
1986
1983
  },
1987
1984
  // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
1988
1985
  cacheUserLanguage(n, e) {
@@ -1992,9 +1989,9 @@ var wo = {
1992
1989
  cookieDomain: i,
1993
1990
  cookieOptions: o
1994
1991
  } = e;
1995
- t && typeof document < "u" && an.create(t, n, r, i, o);
1992
+ t && typeof document < "u" && nn.create(t, n, r, i, o);
1996
1993
  }
1997
- }, bo = {
1994
+ }, mo = {
1998
1995
  name: "querystring",
1999
1996
  // Deconstruct the options object and extract the lookupQuerystring property
2000
1997
  lookup(n) {
@@ -2016,26 +2013,26 @@ var wo = {
2016
2013
  return t;
2017
2014
  }
2018
2015
  };
2019
- let he = null;
2020
- const un = () => {
2021
- if (he !== null) return he;
2016
+ let me = null;
2017
+ const rn = () => {
2018
+ if (me !== null) return me;
2022
2019
  try {
2023
- he = window !== "undefined" && window.localStorage !== null;
2020
+ me = window !== "undefined" && window.localStorage !== null;
2024
2021
  const n = "i18next.translate.boo";
2025
2022
  window.localStorage.setItem(n, "foo"), window.localStorage.removeItem(n);
2026
2023
  } catch {
2027
- he = !1;
2024
+ me = !1;
2028
2025
  }
2029
- return he;
2026
+ return me;
2030
2027
  };
2031
- var So = {
2028
+ var yo = {
2032
2029
  name: "localStorage",
2033
2030
  // Deconstruct the options object and extract the lookupLocalStorage property
2034
2031
  lookup(n) {
2035
2032
  let {
2036
2033
  lookupLocalStorage: e
2037
2034
  } = n;
2038
- if (e && un())
2035
+ if (e && rn())
2039
2036
  return window.localStorage.getItem(e) || void 0;
2040
2037
  },
2041
2038
  // Deconstruct the options object and extract the lookupLocalStorage property
@@ -2043,37 +2040,37 @@ var So = {
2043
2040
  let {
2044
2041
  lookupLocalStorage: t
2045
2042
  } = e;
2046
- t && un() && window.localStorage.setItem(t, n);
2043
+ t && rn() && window.localStorage.setItem(t, n);
2047
2044
  }
2048
2045
  };
2049
- let pe = null;
2050
- const ln = () => {
2051
- if (pe !== null) return pe;
2046
+ let ye = null;
2047
+ const on = () => {
2048
+ if (ye !== null) return ye;
2052
2049
  try {
2053
- pe = window !== "undefined" && window.sessionStorage !== null;
2050
+ ye = window !== "undefined" && window.sessionStorage !== null;
2054
2051
  const n = "i18next.translate.boo";
2055
2052
  window.sessionStorage.setItem(n, "foo"), window.sessionStorage.removeItem(n);
2056
2053
  } catch {
2057
- pe = !1;
2054
+ ye = !1;
2058
2055
  }
2059
- return pe;
2056
+ return ye;
2060
2057
  };
2061
- var xo = {
2058
+ var vo = {
2062
2059
  name: "sessionStorage",
2063
2060
  lookup(n) {
2064
2061
  let {
2065
2062
  lookupSessionStorage: e
2066
2063
  } = n;
2067
- if (e && ln())
2064
+ if (e && on())
2068
2065
  return window.sessionStorage.getItem(e) || void 0;
2069
2066
  },
2070
2067
  cacheUserLanguage(n, e) {
2071
2068
  let {
2072
2069
  lookupSessionStorage: t
2073
2070
  } = e;
2074
- t && ln() && window.sessionStorage.setItem(t, n);
2071
+ t && on() && window.sessionStorage.setItem(t, n);
2075
2072
  }
2076
- }, Oo = {
2073
+ }, wo = {
2077
2074
  name: "navigator",
2078
2075
  lookup(n) {
2079
2076
  const e = [];
@@ -2090,7 +2087,7 @@ var xo = {
2090
2087
  }
2091
2088
  return e.length > 0 ? e : void 0;
2092
2089
  }
2093
- }, Eo = {
2090
+ }, bo = {
2094
2091
  name: "htmlTag",
2095
2092
  // Deconstruct the options object and extract the htmlTag property
2096
2093
  lookup(n) {
@@ -2100,7 +2097,7 @@ var xo = {
2100
2097
  const r = e || (typeof document < "u" ? document.documentElement : null);
2101
2098
  return r && typeof r.getAttribute == "function" && (t = r.getAttribute("lang")), t;
2102
2099
  }
2103
- }, Co = {
2100
+ }, So = {
2104
2101
  name: "path",
2105
2102
  // Deconstruct the options object and extract the lookupFromPathIndex property
2106
2103
  lookup(n) {
@@ -2112,7 +2109,7 @@ var xo = {
2112
2109
  const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2113
2110
  return Array.isArray(t) ? (i = t[typeof e == "number" ? e : 0]) == null ? void 0 : i.replace("/", "") : void 0;
2114
2111
  }
2115
- }, To = {
2112
+ }, xo = {
2116
2113
  name: "subdomain",
2117
2114
  lookup(n) {
2118
2115
  var i, o;
@@ -2124,15 +2121,15 @@ var xo = {
2124
2121
  return r[t];
2125
2122
  }
2126
2123
  };
2127
- let Qn = !1;
2124
+ let Bn = !1;
2128
2125
  try {
2129
- Qn = !0;
2126
+ Bn = !0;
2130
2127
  } catch {
2131
2128
  }
2132
- const Zn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
2133
- Qn || Zn.splice(1, 1);
2134
- const ko = () => ({
2135
- order: Zn,
2129
+ const Kn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
2130
+ Bn || Kn.splice(1, 1);
2131
+ const Oo = () => ({
2132
+ order: Kn,
2136
2133
  lookupQuerystring: "lng",
2137
2134
  lookupCookie: "i18next",
2138
2135
  lookupLocalStorage: "i18nextLng",
@@ -2144,7 +2141,7 @@ const ko = () => ({
2144
2141
  // cookieDomain: 'myDomain'
2145
2142
  convertDetectedLanguage: (n) => n
2146
2143
  });
2147
- class er {
2144
+ class qn {
2148
2145
  constructor(e) {
2149
2146
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2150
2147
  this.type = "languageDetector", this.detectors = {}, this.init(e, t);
@@ -2153,7 +2150,7 @@ class er {
2153
2150
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
2154
2151
  languageUtils: {}
2155
2152
  }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2156
- this.services = e, this.options = yo(t, this.options || {}, ko()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(wo), this.addDetector(bo), this.addDetector(So), this.addDetector(xo), this.addDetector(Oo), this.addDetector(Eo), this.addDetector(Co), this.addDetector(To);
2153
+ this.services = e, this.options = po(t, this.options || {}, Oo()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(go), this.addDetector(mo), this.addDetector(yo), this.addDetector(vo), this.addDetector(wo), this.addDetector(bo), this.addDetector(So), this.addDetector(xo);
2157
2154
  }
2158
2155
  addDetector(e) {
2159
2156
  return this.detectors[e.name] = e, this;
@@ -2174,8 +2171,8 @@ class er {
2174
2171
  }));
2175
2172
  }
2176
2173
  }
2177
- er.type = "languageDetector";
2178
- function Po(n, e) {
2174
+ qn.type = "languageDetector";
2175
+ function Eo(n, e) {
2179
2176
  if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2180
2177
  }
2181
2178
  function xe(n) {
@@ -2186,7 +2183,7 @@ function xe(n) {
2186
2183
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2187
2184
  }, xe(n);
2188
2185
  }
2189
- function Lo(n, e) {
2186
+ function To(n, e) {
2190
2187
  if (xe(n) != "object" || !n) return n;
2191
2188
  var t = n[Symbol.toPrimitive];
2192
2189
  if (t !== void 0) {
@@ -2196,33 +2193,33 @@ function Lo(n, e) {
2196
2193
  }
2197
2194
  return String(n);
2198
2195
  }
2199
- function Io(n) {
2200
- var e = Lo(n, "string");
2196
+ function Co(n) {
2197
+ var e = To(n, "string");
2201
2198
  return xe(e) == "symbol" ? e : e + "";
2202
2199
  }
2203
- function Ro(n, e) {
2200
+ function Lo(n, e) {
2204
2201
  for (var t = 0; t < e.length; t++) {
2205
2202
  var r = e[t];
2206
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Io(r.key), r);
2203
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Co(r.key), r);
2207
2204
  }
2208
2205
  }
2209
- function $o(n, e, t) {
2210
- return e && Ro(n.prototype, e), Object.defineProperty(n, "prototype", {
2206
+ function ko(n, e, t) {
2207
+ return e && Lo(n.prototype, e), Object.defineProperty(n, "prototype", {
2211
2208
  writable: !1
2212
2209
  }), n;
2213
2210
  }
2214
- var tr = [], jo = tr.forEach, Ao = tr.slice;
2215
- function No(n) {
2216
- return jo.call(Ao.call(arguments, 1), function(e) {
2211
+ var zn = [], Po = zn.forEach, Io = zn.slice;
2212
+ function Ro(n) {
2213
+ return Po.call(Io.call(arguments, 1), function(e) {
2217
2214
  if (e)
2218
2215
  for (var t in e)
2219
2216
  n[t] === void 0 && (n[t] = e[t]);
2220
2217
  }), n;
2221
2218
  }
2222
- function Uo(n) {
2219
+ function $o(n) {
2223
2220
  return n ? typeof n == "function" ? new n() : n : null;
2224
2221
  }
2225
- function Do() {
2222
+ function jo() {
2226
2223
  return {
2227
2224
  handleEmptyResourcesAsFailed: !0,
2228
2225
  cacheHitMode: "none"
@@ -2230,7 +2227,7 @@ function Do() {
2230
2227
  // refreshExpirationTime: 60 * 60 * 1000
2231
2228
  };
2232
2229
  }
2233
- function cn(n, e, t, r) {
2230
+ function sn(n, e, t, r) {
2234
2231
  var i = n.read.bind(n);
2235
2232
  if (i.length === 2) {
2236
2233
  try {
@@ -2245,17 +2242,17 @@ function cn(n, e, t, r) {
2245
2242
  }
2246
2243
  i(e, t, r);
2247
2244
  }
2248
- var nr = /* @__PURE__ */ function() {
2245
+ var Wn = /* @__PURE__ */ function() {
2249
2246
  function n(e) {
2250
2247
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2251
- Po(this, n), this.backends = [], this.type = "backend", this.allOptions = r, this.init(e, t);
2248
+ Eo(this, n), this.backends = [], this.type = "backend", this.allOptions = r, this.init(e, t);
2252
2249
  }
2253
- return $o(n, [{
2250
+ return ko(n, [{
2254
2251
  key: "init",
2255
2252
  value: function(t) {
2256
2253
  var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2257
- this.services = t, this.options = No(i, this.options || {}, Do()), this.allOptions = o, this.options.backends && this.options.backends.forEach(function(s, a) {
2258
- r.backends[a] = r.backends[a] || Uo(s), r.backends[a].init(t, r.options.backendOptions && r.options.backendOptions[a] || {}, o);
2254
+ this.services = t, this.options = Ro(i, this.options || {}, jo()), this.allOptions = o, this.options.backends && this.options.backends.forEach(function(s, a) {
2255
+ r.backends[a] = r.backends[a] || $o(s), r.backends[a].init(t, r.options.backendOptions && r.options.backendOptions[a] || {}, o);
2259
2256
  }), this.services && this.options.reloadInterval && setInterval(function() {
2260
2257
  return r.reload();
2261
2258
  }, this.options.reloadInterval);
@@ -2266,13 +2263,13 @@ var nr = /* @__PURE__ */ function() {
2266
2263
  var o = this, s = this.backends.length, a = function c(l) {
2267
2264
  if (l >= s) return i(new Error("non of the backend loaded data", !0));
2268
2265
  var f = l === s - 1, d = o.options.handleEmptyResourcesAsFailed && !f ? 0 : -1, g = o.backends[l];
2269
- g.read ? cn(g, t, r, function(m, v, w) {
2266
+ g.read ? sn(g, t, r, function(m, v, w) {
2270
2267
  if (!m && v && Object.keys(v).length > d) {
2271
2268
  if (i(null, v, l), u(l - 1, v), g.save && o.options.cacheHitMode && ["refresh", "refreshAndUpdateStore"].indexOf(o.options.cacheHitMode) > -1) {
2272
2269
  if (w && o.options.refreshExpirationTime && w + o.options.refreshExpirationTime > Date.now()) return;
2273
- var k = o.backends[l + 1];
2274
- k && k.read && cn(k, t, r, function(E, T) {
2275
- E || T && (Object.keys(T).length <= d || (u(l, T), o.options.cacheHitMode === "refreshAndUpdateStore" && o.services && o.services.resourceStore && o.services.resourceStore.addResourceBundle(t, r, T)));
2270
+ var L = o.backends[l + 1];
2271
+ L && L.read && sn(L, t, r, function(E, C) {
2272
+ E || C && (Object.keys(C).length <= d || (u(l, C), o.options.cacheHitMode === "refreshAndUpdateStore" && o.services && o.services.resourceStore && o.services.resourceStore.addResourceBundle(t, r, C)));
2276
2273
  });
2277
2274
  }
2278
2275
  } else
@@ -2333,25 +2330,25 @@ var nr = /* @__PURE__ */ function() {
2333
2330
  }
2334
2331
  }]), n;
2335
2332
  }();
2336
- nr.type = "backend";
2337
- function vt(n) {
2333
+ Wn.type = "backend";
2334
+ function gt(n) {
2338
2335
  "@babel/helpers - typeof";
2339
- return vt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2336
+ return gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2340
2337
  return typeof e;
2341
2338
  } : function(e) {
2342
2339
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2343
- }, vt(n);
2340
+ }, gt(n);
2344
2341
  }
2345
- function rr() {
2346
- return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : vt(XMLHttpRequest)) === "object";
2342
+ function Jn() {
2343
+ return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : gt(XMLHttpRequest)) === "object";
2347
2344
  }
2348
- function Fo(n) {
2345
+ function No(n) {
2349
2346
  return !!n && typeof n.then == "function";
2350
2347
  }
2351
- function _o(n) {
2352
- return Fo(n) ? n : Promise.resolve(n);
2348
+ function Uo(n) {
2349
+ return No(n) ? n : Promise.resolve(n);
2353
2350
  }
2354
- function fn(n, e) {
2351
+ function an(n, e) {
2355
2352
  var t = Object.keys(n);
2356
2353
  if (Object.getOwnPropertySymbols) {
2357
2354
  var r = Object.getOwnPropertySymbols(n);
@@ -2361,25 +2358,25 @@ function fn(n, e) {
2361
2358
  }
2362
2359
  return t;
2363
2360
  }
2364
- function dn(n) {
2361
+ function un(n) {
2365
2362
  for (var e = 1; e < arguments.length; e++) {
2366
2363
  var t = arguments[e] != null ? arguments[e] : {};
2367
- e % 2 ? fn(Object(t), !0).forEach(function(r) {
2368
- Mo(n, r, t[r]);
2369
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : fn(Object(t)).forEach(function(r) {
2364
+ e % 2 ? an(Object(t), !0).forEach(function(r) {
2365
+ Ao(n, r, t[r]);
2366
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : an(Object(t)).forEach(function(r) {
2370
2367
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2371
2368
  });
2372
2369
  }
2373
2370
  return n;
2374
2371
  }
2375
- function Mo(n, e, t) {
2376
- return (e = Ho(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2372
+ function Ao(n, e, t) {
2373
+ return (e = Do(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2377
2374
  }
2378
- function Ho(n) {
2379
- var e = Vo(n, "string");
2375
+ function Do(n) {
2376
+ var e = Fo(n, "string");
2380
2377
  return Z(e) == "symbol" ? e : e + "";
2381
2378
  }
2382
- function Vo(n, e) {
2379
+ function Fo(n, e) {
2383
2380
  if (Z(n) != "object" || !n) return n;
2384
2381
  var t = n[Symbol.toPrimitive];
2385
2382
  if (t !== void 0) {
@@ -2397,22 +2394,22 @@ function Z(n) {
2397
2394
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2398
2395
  }, Z(n);
2399
2396
  }
2400
- var G = typeof fetch == "function" ? fetch : void 0;
2401
- typeof global < "u" && global.fetch ? G = global.fetch : typeof window < "u" && window.fetch && (G = window.fetch);
2397
+ var J = typeof fetch == "function" ? fetch : void 0;
2398
+ typeof global < "u" && global.fetch ? J = global.fetch : typeof window < "u" && window.fetch && (J = window.fetch);
2402
2399
  var Oe;
2403
- rr() && (typeof global < "u" && global.XMLHttpRequest ? Oe = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Oe = window.XMLHttpRequest));
2404
- var We;
2405
- typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? We = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (We = window.ActiveXObject));
2406
- typeof G != "function" && (G = void 0);
2407
- if (!G && !Oe && !We)
2400
+ Jn() && (typeof global < "u" && global.XMLHttpRequest ? Oe = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Oe = window.XMLHttpRequest));
2401
+ var Be;
2402
+ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Be = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Be = window.ActiveXObject));
2403
+ typeof J != "function" && (J = void 0);
2404
+ if (!J && !Oe && !Be)
2408
2405
  try {
2409
2406
  import("./browser-ponyfill-CvzSbL_o.js").then((n) => n.b).then(function(n) {
2410
- G = n.default;
2407
+ J = n.default;
2411
2408
  }).catch(function() {
2412
2409
  });
2413
2410
  } catch {
2414
2411
  }
2415
- var wt = function(e, t) {
2412
+ var mt = function(e, t) {
2416
2413
  if (t && Z(t) === "object") {
2417
2414
  var r = "";
2418
2415
  for (var i in t)
@@ -2421,7 +2418,7 @@ var wt = function(e, t) {
2421
2418
  e = e + (e.indexOf("?") !== -1 ? "&" : "?") + r.slice(1);
2422
2419
  }
2423
2420
  return e;
2424
- }, hn = function(e, t, r, i) {
2421
+ }, ln = function(e, t, r, i) {
2425
2422
  var o = function(u) {
2426
2423
  if (!u.ok) return r(u.statusText || "Error", {
2427
2424
  status: u.status
@@ -2440,33 +2437,33 @@ var wt = function(e, t) {
2440
2437
  return;
2441
2438
  }
2442
2439
  }
2443
- typeof fetch == "function" ? fetch(e, t).then(o).catch(r) : G(e, t).then(o).catch(r);
2444
- }, pn = !1, Bo = function(e, t, r, i) {
2445
- e.queryStringParams && (t = wt(t, e.queryStringParams));
2446
- var o = dn({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
2440
+ typeof fetch == "function" ? fetch(e, t).then(o).catch(r) : J(e, t).then(o).catch(r);
2441
+ }, cn = !1, _o = function(e, t, r, i) {
2442
+ e.queryStringParams && (t = mt(t, e.queryStringParams));
2443
+ var o = un({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
2447
2444
  typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), r && (o["Content-Type"] = "application/json");
2448
- var s = typeof e.requestOptions == "function" ? e.requestOptions(r) : e.requestOptions, a = dn({
2445
+ var s = typeof e.requestOptions == "function" ? e.requestOptions(r) : e.requestOptions, a = un({
2449
2446
  method: r ? "POST" : "GET",
2450
2447
  body: r ? e.stringify(r) : void 0,
2451
2448
  headers: o
2452
- }, pn ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
2449
+ }, cn ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
2453
2450
  try {
2454
- hn(t, a, i, u);
2451
+ ln(t, a, i, u);
2455
2452
  } catch (c) {
2456
2453
  if (!s || Object.keys(s).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
2457
2454
  return i(c);
2458
2455
  try {
2459
2456
  Object.keys(s).forEach(function(l) {
2460
2457
  delete a[l];
2461
- }), hn(t, a, i, u), pn = !0;
2458
+ }), ln(t, a, i, u), cn = !0;
2462
2459
  } catch (l) {
2463
2460
  i(l);
2464
2461
  }
2465
2462
  }
2466
- }, Ko = function(e, t, r, i) {
2467
- r && Z(r) === "object" && (r = wt("", r).slice(1)), e.queryStringParams && (t = wt(t, e.queryStringParams));
2463
+ }, Mo = function(e, t, r, i) {
2464
+ r && Z(r) === "object" && (r = mt("", r).slice(1)), e.queryStringParams && (t = mt(t, e.queryStringParams));
2468
2465
  try {
2469
- var o = Oe ? new Oe() : new We("MSXML2.XMLHTTP.3.0");
2466
+ var o = Oe ? new Oe() : new Be("MSXML2.XMLHTTP.3.0");
2470
2467
  o.open(r ? "POST" : "GET", t, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, r && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
2471
2468
  var s = e.customHeaders;
2472
2469
  if (s = typeof s == "function" ? s() : s, s)
@@ -2480,23 +2477,23 @@ var wt = function(e, t) {
2480
2477
  }, o.send(r);
2481
2478
  } catch (u) {
2482
2479
  }
2483
- }, qo = function(e, t, r, i) {
2480
+ }, Ho = function(e, t, r, i) {
2484
2481
  if (typeof r == "function" && (i = r, r = void 0), i = i || function() {
2485
- }, G && t.indexOf("file:") !== 0)
2486
- return Bo(e, t, r, i);
2487
- if (rr() || typeof ActiveXObject == "function")
2488
- return Ko(e, t, r, i);
2482
+ }, J && t.indexOf("file:") !== 0)
2483
+ return _o(e, t, r, i);
2484
+ if (Jn() || typeof ActiveXObject == "function")
2485
+ return Mo(e, t, r, i);
2489
2486
  i(new Error("No fetch and no xhr implementation found!"));
2490
2487
  };
2491
- function ae(n) {
2488
+ function ue(n) {
2492
2489
  "@babel/helpers - typeof";
2493
- return ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2490
+ return ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2494
2491
  return typeof e;
2495
2492
  } : function(e) {
2496
2493
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2497
- }, ae(n);
2494
+ }, ue(n);
2498
2495
  }
2499
- function gn(n, e) {
2496
+ function fn(n, e) {
2500
2497
  var t = Object.keys(n);
2501
2498
  if (Object.getOwnPropertySymbols) {
2502
2499
  var r = Object.getOwnPropertySymbols(n);
@@ -2506,47 +2503,47 @@ function gn(n, e) {
2506
2503
  }
2507
2504
  return t;
2508
2505
  }
2509
- function lt(n) {
2506
+ function st(n) {
2510
2507
  for (var e = 1; e < arguments.length; e++) {
2511
2508
  var t = arguments[e] != null ? arguments[e] : {};
2512
- e % 2 ? gn(Object(t), !0).forEach(function(r) {
2513
- ir(n, r, t[r]);
2514
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : gn(Object(t)).forEach(function(r) {
2509
+ e % 2 ? fn(Object(t), !0).forEach(function(r) {
2510
+ Xn(n, r, t[r]);
2511
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : fn(Object(t)).forEach(function(r) {
2515
2512
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2516
2513
  });
2517
2514
  }
2518
2515
  return n;
2519
2516
  }
2520
- function zo(n, e) {
2517
+ function Vo(n, e) {
2521
2518
  if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2522
2519
  }
2523
- function Wo(n, e) {
2520
+ function Bo(n, e) {
2524
2521
  for (var t = 0; t < e.length; t++) {
2525
2522
  var r = e[t];
2526
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, or(r.key), r);
2523
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Gn(r.key), r);
2527
2524
  }
2528
2525
  }
2529
- function Jo(n, e, t) {
2530
- return e && Wo(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
2526
+ function Ko(n, e, t) {
2527
+ return e && Bo(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
2531
2528
  }
2532
- function ir(n, e, t) {
2533
- return (e = or(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2529
+ function Xn(n, e, t) {
2530
+ return (e = Gn(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2534
2531
  }
2535
- function or(n) {
2536
- var e = Go(n, "string");
2537
- return ae(e) == "symbol" ? e : e + "";
2532
+ function Gn(n) {
2533
+ var e = qo(n, "string");
2534
+ return ue(e) == "symbol" ? e : e + "";
2538
2535
  }
2539
- function Go(n, e) {
2540
- if (ae(n) != "object" || !n) return n;
2536
+ function qo(n, e) {
2537
+ if (ue(n) != "object" || !n) return n;
2541
2538
  var t = n[Symbol.toPrimitive];
2542
2539
  if (t !== void 0) {
2543
2540
  var r = t.call(n, e);
2544
- if (ae(r) != "object") return r;
2541
+ if (ue(r) != "object") return r;
2545
2542
  throw new TypeError("@@toPrimitive must return a primitive value.");
2546
2543
  }
2547
2544
  return String(n);
2548
2545
  }
2549
- var Xo = function() {
2546
+ var zo = function() {
2550
2547
  return {
2551
2548
  loadPath: "/locales/{{lng}}/{{ns}}.json",
2552
2549
  addPath: "/locales/add/{{lng}}/{{ns}}",
@@ -2555,11 +2552,11 @@ var Xo = function() {
2555
2552
  },
2556
2553
  stringify: JSON.stringify,
2557
2554
  parsePayload: function(t, r, i) {
2558
- return ir({}, r, i || "");
2555
+ return Xn({}, r, i || "");
2559
2556
  },
2560
2557
  parseLoadPayload: function(t, r) {
2561
2558
  },
2562
- request: qo,
2559
+ request: Ho,
2563
2560
  reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
2564
2561
  customHeaders: {},
2565
2562
  queryStringParams: {},
@@ -2572,20 +2569,20 @@ var Xo = function() {
2572
2569
  cache: "default"
2573
2570
  }
2574
2571
  };
2575
- }, sr = function() {
2572
+ }, Yn = function() {
2576
2573
  function n(e) {
2577
2574
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2578
- zo(this, n), this.services = e, this.options = t, this.allOptions = r, this.type = "backend", this.init(e, t, r);
2575
+ Vo(this, n), this.services = e, this.options = t, this.allOptions = r, this.type = "backend", this.init(e, t, r);
2579
2576
  }
2580
- return Jo(n, [{
2577
+ return Ko(n, [{
2581
2578
  key: "init",
2582
2579
  value: function(t) {
2583
2580
  var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2584
- if (this.services = t, this.options = lt(lt(lt({}, Xo()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
2581
+ if (this.services = t, this.options = st(st(st({}, zo()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
2585
2582
  var s = setInterval(function() {
2586
2583
  return r.reload();
2587
2584
  }, this.options.reloadInterval);
2588
- ae(s) === "object" && typeof s.unref == "function" && s.unref();
2585
+ ue(s) === "object" && typeof s.unref == "function" && s.unref();
2589
2586
  }
2590
2587
  }
2591
2588
  }, {
@@ -2602,7 +2599,7 @@ var Xo = function() {
2602
2599
  key: "_readAny",
2603
2600
  value: function(t, r, i, o, s) {
2604
2601
  var a = this, u = this.options.loadPath;
2605
- typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, i)), u = _o(u), u.then(function(c) {
2602
+ typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, i)), u = Uo(u), u.then(function(c) {
2606
2603
  if (!c) return s(null, {});
2607
2604
  var l = a.services.interpolator.interpolate(c, {
2608
2605
  lng: t.join("+"),
@@ -2680,8 +2677,8 @@ var Xo = function() {
2680
2677
  }
2681
2678
  }]);
2682
2679
  }();
2683
- sr.type = "backend";
2684
- var Yo = function(e) {
2680
+ Yn.type = "backend";
2681
+ var Wo = function(e) {
2685
2682
  return {
2686
2683
  type: "backend",
2687
2684
  init: function(r, i, o) {
@@ -2706,13 +2703,13 @@ var Yo = function(e) {
2706
2703
  }
2707
2704
  };
2708
2705
  };
2709
- const Qo = {
2706
+ const Jo = {
2710
2707
  debug: !1,
2711
- fallbackLng: Dn.enum.en,
2708
+ fallbackLng: kn.enum.en,
2712
2709
  namespace: "translation",
2713
- supportedLngs: Object.values(Un),
2710
+ supportedLngs: Object.values(Ln),
2714
2711
  nonExplicitSupportedLngs: !1
2715
- }, Zo = {
2712
+ }, Xo = {
2716
2713
  react: {
2717
2714
  useSuspense: !0
2718
2715
  },
@@ -2720,128 +2717,111 @@ const Qo = {
2720
2717
  order: ["navigator", "htmlTag", "path", "subdomain"],
2721
2718
  caches: ["localStorage", "cookie"]
2722
2719
  }
2723
- }, mn = (n, e) => {
2720
+ }, dn = (n, e) => {
2724
2721
  const t = import.meta.url.split("/").pop();
2725
2722
  return `${import.meta.url.replace(`/${t}`, "")}/locales/${n}/${e}.json`;
2726
2723
  };
2727
- function bt() {
2728
- return De.isInitialized || De.use(nr).use(new er(null, {
2729
- order: ["cookie", "localStorage", "navigator"],
2730
- lookupQuerystring: "lng",
2731
- lookupCookie: "i18next",
2732
- lookupLocalStorage: "i18nextLng",
2733
- caches: ["localStorage", "cookie"]
2734
- })).use(Ki).init({
2735
- ...Qo,
2724
+ function yt(n) {
2725
+ return re.isInitialized || (re.use(Wn).use(
2726
+ new qn(null, {
2727
+ order: ["cookie", "localStorage", "navigator"],
2728
+ lookupQuerystring: "lng",
2729
+ lookupCookie: "i18next",
2730
+ lookupLocalStorage: "i18nextLng",
2731
+ caches: ["localStorage", "cookie"]
2732
+ })
2733
+ ).use(Mi).init({
2734
+ ...Jo,
2736
2735
  backend: {
2737
2736
  backends: [
2738
- sr,
2739
- Yo((n, e) => import(mn(n, e)))
2737
+ Yn,
2738
+ // if a namespace can't be loaded via normal http-backend loadPath, then the inMemoryLocalBackend will try to return the correct resources
2739
+ // with dynamic import, you have to use the "default" key of the module ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#importing_defaults )
2740
+ Wo(
2741
+ (e, t) => import(dn(e, t))
2742
+ )
2740
2743
  ],
2741
2744
  backendOptions: [
2742
2745
  {
2743
- loadPath: mn("{{lng}}", "{{ns}}")
2746
+ loadPath: dn("{{lng}}", "{{ns}}")
2744
2747
  }
2745
2748
  ]
2746
2749
  },
2747
- ...Zo
2748
- }), De;
2750
+ ...Xo
2751
+ }), re.on("loaded", () => {
2752
+ n == null || n(re);
2753
+ })), re;
2749
2754
  }
2750
- const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2755
+ const Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2751
2756
  __proto__: null,
2752
- default: bt,
2753
- initializeI18n: bt
2757
+ default: yt,
2758
+ initializeI18n: yt
2754
2759
  }, Symbol.toStringTag, { value: "Module" }));
2755
- function wa(n) {
2756
- const e = bt();
2757
- return Gi("translation", { i18n: e, ...n });
2758
- }
2759
- const It = 60 * 1e3, Pe = It, ar = Pe * 2, ur = Pe * 3, Rt = Pe * 15, Ze = It, et = Ze * 2, lr = Ze * 3, cr = It * 15;
2760
- var St;
2761
- (function(n) {
2762
- n.SelectAll = "SelectAll";
2763
- })(St || (St = {}));
2764
- var xt;
2765
- (function(n) {
2766
- n.Text = "text", n.Image = "image";
2767
- })(xt || (xt = {}));
2768
- var yn;
2769
- (function(n) {
2770
- n.Solved = "solved", n.Unsolved = "unsolved";
2771
- })(yn || (yn = {}));
2772
- var vn;
2773
- (function(n) {
2774
- n.pending = "Pending", n.approved = "Approved", n.disapproved = "Disapproved";
2775
- })(vn || (vn = {}));
2776
- var wn;
2777
- (function(n) {
2778
- n.notStored = "notStored", n.userSubmitted = "userSubmitted", n.serverChecked = "serverChecked", n.stored = "stored";
2779
- })(wn || (wn = {}));
2780
- var bn;
2781
- (function(n) {
2782
- n.active = "Active", n.inactive = "Inactive";
2783
- })(bn || (bn = {}));
2784
- var Sn;
2785
- (function(n) {
2786
- n.provider = "Provider", n.dapp = "Dapp", n.any = "Any";
2787
- })(Sn || (Sn = {}));
2760
+ function ba(n) {
2761
+ const e = yt();
2762
+ return qi("translation", { i18n: e, ...n });
2763
+ }
2764
+ const Et = 60 * 1e3, ke = Et, Qn = ke * 2, Zn = ke * 3, Tt = ke * 15, Ge = Et, Ye = Ge * 2, er = Ge * 3, tr = Et * 15;
2765
+ var nr = /* @__PURE__ */ ((n) => (n.SelectAll = "SelectAll", n))(nr || {}), rr = /* @__PURE__ */ ((n) => (n.Text = "text", n.Image = "image", n))(rr || {});
2788
2766
  S();
2789
- const ts = "___", ns = Hr((n) => {
2790
- const e = n.split(ts);
2767
+ const Yo = "___", Qo = Dr((n) => {
2768
+ const e = n.split(Yo);
2791
2769
  try {
2792
2770
  return e.length === 4;
2793
2771
  } catch {
2794
2772
  return !1;
2795
2773
  }
2796
- }), rs = y({
2797
- captchaId: _e([h(), Dt()]),
2798
- captchaContentId: _e([h(), Dt()]),
2799
- salt: h().min(34),
2774
+ }), Zo = y({
2775
+ captchaId: Ae([p(), jt()]),
2776
+ captchaContentId: Ae([p(), jt()]),
2777
+ salt: p().min(34),
2800
2778
  solution: S().array().optional(),
2801
2779
  unlabelled: S().array().optional(),
2802
2780
  timeLimit: S().optional()
2803
- }), fr = y({
2804
- hash: h(),
2805
- data: h(),
2806
- type: Te(xt)
2807
- }), dr = fr.extend({
2808
- hash: h()
2809
- }), is = dr.extend({
2810
- label: h()
2811
- }), os = dr.extend({
2812
- label: h().optional()
2813
- }), hr = rs.extend({
2814
- items: K(fr),
2815
- target: h()
2816
- }), ss = hr.extend({
2817
- solution: h().array().optional(),
2818
- unlabelled: h().array().optional()
2819
- }), as = ss.extend({
2781
+ }), ir = y({
2782
+ hash: p(),
2783
+ data: p(),
2784
+ type: Ce(rr)
2785
+ }), or = ir.extend({
2786
+ hash: p()
2787
+ }), es = or.extend({
2788
+ label: p()
2789
+ }), ts = or.extend({
2790
+ label: p().optional()
2791
+ }), sr = Zo.extend({
2792
+ items: K(ir),
2793
+ target: p()
2794
+ }), ns = sr.extend({
2795
+ solution: p().array().optional(),
2796
+ unlabelled: p().array().optional()
2797
+ }), rs = ns.extend({
2820
2798
  solution: S().array().optional(),
2821
2799
  unlabelled: S().array().optional()
2822
- }), us = K(hr);
2823
- K(as);
2824
- const pr = y({
2825
- captchaId: h(),
2826
- captchaContentId: h(),
2827
- solution: h().array(),
2828
- salt: h().min(34)
2800
+ }), is = K(sr);
2801
+ K(
2802
+ rs
2803
+ );
2804
+ const ar = y({
2805
+ captchaId: p(),
2806
+ captchaContentId: p(),
2807
+ solution: p().array(),
2808
+ salt: p().min(34)
2829
2809
  });
2830
- K(pr);
2810
+ K(ar);
2831
2811
  y({
2832
- items: K(os)
2812
+ items: K(ts)
2833
2813
  });
2834
2814
  y({
2835
- items: K(is)
2815
+ items: K(es)
2836
2816
  });
2837
2817
  y({
2838
- captchas: us,
2839
- format: Te(St)
2818
+ captchas: is,
2819
+ format: Ce(nr)
2840
2820
  });
2841
2821
  y({
2842
- labels: K(h())
2822
+ labels: K(p())
2843
2823
  });
2844
- var ls = Object.defineProperty, cs = (n, e, t) => e in n ? ls(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, xn = (n, e, t) => (cs(n, typeof e != "symbol" ? e + "" : e, t), t), ct = {
2824
+ var os = Object.defineProperty, ss = (n, e, t) => e in n ? os(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, pn = (n, e, t) => (ss(n, typeof e != "symbol" ? e + "" : e, t), t), at = {
2845
2825
  0: 0,
2846
2826
  1: 1,
2847
2827
  2: 2,
@@ -2865,20 +2845,20 @@ var ls = Object.defineProperty, cs = (n, e, t) => e in n ? ls(n, e, { enumerable
2865
2845
  E: 14,
2866
2846
  F: 15
2867
2847
  };
2868
- function fs(n) {
2848
+ function as(n) {
2869
2849
  const e = n.length % 2, t = (n[1] === "x" ? 2 : 0) + e, r = (n.length - t) / 2 + e, i = new Uint8Array(r);
2870
- e && (i[0] = 0 | ct[n[2]]);
2850
+ e && (i[0] = 0 | at[n[2]]);
2871
2851
  for (let o = 0; o < r; ) {
2872
- const s = t + o * 2, a = ct[n[s]], u = ct[n[s + 1]];
2852
+ const s = t + o * 2, a = at[n[s]], u = at[n[s + 1]];
2873
2853
  i[e + o++] = a << 4 | u;
2874
2854
  }
2875
2855
  return i;
2876
2856
  }
2877
- var On = class extends Uint8Array {
2857
+ var hn = class extends Uint8Array {
2878
2858
  constructor(n) {
2879
- super(n), xn(this, "i", 0), xn(this, "v"), this.v = new DataView(n);
2859
+ super(n), pn(this, "i", 0), pn(this, "v"), this.v = new DataView(n);
2880
2860
  }
2881
- }, ee = (n) => (e) => n(e instanceof On ? e : new On(e instanceof Uint8Array ? e.buffer : typeof e == "string" ? fs(e).buffer : e)), tt = (n) => {
2861
+ }, ee = (n) => (e) => n(e instanceof hn ? e : new hn(e instanceof Uint8Array ? e.buffer : typeof e == "string" ? as(e).buffer : e)), Qe = (n) => {
2882
2862
  const e = n.length;
2883
2863
  let t = 0;
2884
2864
  for (let i = 0; i < e; i++)
@@ -2890,7 +2870,7 @@ var On = class extends Uint8Array {
2890
2870
  }
2891
2871
  return r;
2892
2872
  };
2893
- function En(n, e) {
2873
+ function gn(n, e) {
2894
2874
  const t = Object.keys(n), r = t.length, i = {};
2895
2875
  for (let o = 0; o < r; o++) {
2896
2876
  const s = t[o];
@@ -2898,306 +2878,302 @@ function En(n, e) {
2898
2878
  }
2899
2879
  return i;
2900
2880
  }
2901
- var U = (n, e) => {
2881
+ var A = (n, e) => {
2902
2882
  const t = [n, e];
2903
2883
  return t.enc = n, t.dec = e, t;
2904
- }, gr = (n, e) => (t) => n(e(t)), mr = (n, e) => (t) => e(n(t)), ds = ([n, e], t, r) => U(gr(n, t), mr(e, r));
2905
- function hs(n, e) {
2884
+ }, ur = (n, e) => (t) => n(e(t)), lr = (n, e) => (t) => e(n(t)), us = ([n, e], t, r) => A(ur(n, t), lr(e, r));
2885
+ function ls(n, e) {
2906
2886
  return ee((t) => {
2907
2887
  const r = t.v[e](t.i, !0);
2908
2888
  return t.i += n, r;
2909
2889
  });
2910
2890
  }
2911
- function ps(n, e) {
2891
+ function cs(n, e) {
2912
2892
  return (t) => {
2913
2893
  const r = new Uint8Array(n);
2914
2894
  return new DataView(r.buffer)[e](0, t, !0), r;
2915
2895
  };
2916
2896
  }
2917
2897
  function X(n, e, t) {
2918
- return U(ps(n, t), hs(n, e));
2898
+ return A(cs(n, t), ls(n, e));
2919
2899
  }
2920
- var ue = X(1, "getUint8", "setUint8"), Je = X(2, "getUint16", "setUint16"), Ee = X(4, "getUint32", "setUint32"), yr = X(8, "getBigUint64", "setBigUint64");
2900
+ var le = X(1, "getUint8", "setUint8"), Ke = X(2, "getUint16", "setUint16"), Ee = X(4, "getUint32", "setUint32"), cr = X(8, "getBigUint64", "setBigUint64");
2921
2901
  X(1, "getInt8", "setInt8");
2922
2902
  X(2, "getInt16", "setInt16");
2923
2903
  X(4, "getInt32", "setInt32");
2924
2904
  X(8, "getBigInt64", "setBigInt64");
2925
- var vr = (n) => {
2905
+ var fr = (n) => {
2926
2906
  const e = new Uint8Array(16), t = new DataView(e.buffer);
2927
2907
  return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), e;
2928
- }, wr = (n) => ee((e) => {
2908
+ }, dr = (n) => ee((e) => {
2929
2909
  const { v: t, i: r } = e, i = t.getBigUint64(r, !0), o = t[n](r + 8, !0);
2930
2910
  return e.i += 16, o << 64n | i;
2931
2911
  });
2932
- U(vr, wr("getBigUint64"));
2933
- U(vr, wr("getBigInt64"));
2934
- var br = (n) => {
2912
+ A(fr, dr("getBigUint64"));
2913
+ A(fr, dr("getBigInt64"));
2914
+ var pr = (n) => {
2935
2915
  const e = new Uint8Array(32), t = new DataView(e.buffer);
2936
2916
  return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), t.setBigInt64(16, n >> 128n, !0), t.setBigInt64(24, n >> 192n, !0), e;
2937
- }, Sr = (n) => ee((e) => {
2917
+ }, hr = (n) => ee((e) => {
2938
2918
  let t = e.v.getBigUint64(e.i, !0);
2939
2919
  return e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 64n, e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 128n, e.i += 8, t |= e.v[n](e.i, !0) << 192n, e.i += 8, t;
2940
2920
  });
2941
- U(br, Sr("getBigUint64"));
2942
- U(br, Sr("getBigInt64"));
2943
- var xr = ds(ue, (n) => n ? 1 : 0, Boolean), gs = [ue[1], Je[1], Ee[1]], ms = ee((n) => {
2921
+ A(pr, hr("getBigUint64"));
2922
+ A(pr, hr("getBigInt64"));
2923
+ var gr = us(le, (n) => n ? 1 : 0, Boolean), fs = [le[1], Ke[1], Ee[1]], ds = ee((n) => {
2944
2924
  const e = n[n.i], t = e & 3;
2945
2925
  if (t < 3)
2946
- return gs[t](n) >>> 2;
2926
+ return fs[t](n) >>> 2;
2947
2927
  const r = (e >>> 2) + 4;
2948
2928
  n.i++;
2949
2929
  let i = 0n;
2950
2930
  const o = r / 8 | 0;
2951
2931
  let s = 0n;
2952
2932
  for (let u = 0; u < o; u++)
2953
- i = yr[1](n) << s | i, s += 64n;
2933
+ i = cr[1](n) << s | i, s += 64n;
2954
2934
  let a = r % 8;
2955
- return a > 3 && (i = BigInt(Ee[1](n)) << s | i, s += 32n, a -= 4), a > 1 && (i = BigInt(Je[1](n)) << s | i, s += 16n, a -= 2), a && (i = BigInt(ue[1](n)) << s | i), i;
2956
- }), ys = 1n << 56n, vs = 1 << 24, ws = 256, bs = 4294967295n, Ss = 64, xs = 16384, Os = 1 << 30, Es = (n) => {
2935
+ return a > 3 && (i = BigInt(Ee[1](n)) << s | i, s += 32n, a -= 4), a > 1 && (i = BigInt(Ke[1](n)) << s | i, s += 16n, a -= 2), a && (i = BigInt(le[1](n)) << s | i), i;
2936
+ }), ps = 1n << 56n, hs = 1 << 24, gs = 256, ms = 4294967295n, ys = 64, vs = 16384, ws = 1 << 30, bs = (n) => {
2957
2937
  if (n < 0)
2958
2938
  throw new Error(`Wrong compact input (${n})`);
2959
2939
  const e = Number(n) << 2;
2960
- if (n < Ss)
2961
- return ue[0](e);
2962
- if (n < xs)
2963
- return Je[0](e | 1);
2964
- if (n < Os)
2940
+ if (n < ys)
2941
+ return le[0](e);
2942
+ if (n < vs)
2943
+ return Ke[0](e | 1);
2944
+ if (n < ws)
2965
2945
  return Ee[0](e | 2);
2966
2946
  let t = [new Uint8Array(1)], r = BigInt(n);
2967
- for (; r >= ys; )
2968
- t.push(yr[0](r)), r >>= 64n;
2969
- r >= vs && (t.push(Ee[0](Number(r & bs))), r >>= 32n);
2947
+ for (; r >= ps; )
2948
+ t.push(cr[0](r)), r >>= 64n;
2949
+ r >= hs && (t.push(Ee[0](Number(r & ms))), r >>= 32n);
2970
2950
  let i = Number(r);
2971
- i >= ws && (t.push(Je[0](i)), i >>= 16), i && t.push(ue[0](i));
2972
- const o = tt(t);
2951
+ i >= gs && (t.push(Ke[0](i)), i >>= 16), i && t.push(le[0](i));
2952
+ const o = Qe(t);
2973
2953
  return o[0] = o.length - 5 << 2 | 3, o;
2974
- }, Or = U(Es, ms), Cs = new TextEncoder(), Ts = (n) => {
2975
- const e = Cs.encode(n);
2976
- return tt([Or.enc(e.length), e]);
2977
- }, ks = new TextDecoder(), Ps = ee((n) => {
2978
- let e = Or.dec(n);
2954
+ }, mr = A(bs, ds), Ss = new TextEncoder(), xs = (n) => {
2955
+ const e = Ss.encode(n);
2956
+ return Qe([mr.enc(e.length), e]);
2957
+ }, Os = new TextDecoder(), Es = ee((n) => {
2958
+ let e = mr.dec(n);
2979
2959
  const t = new DataView(n.buffer, n.i, e);
2980
- return n.i += e, ks.decode(t);
2981
- }), H = U(Ts, Ps), Ls = () => {
2982
- }, Is = new Uint8Array(0);
2983
- U(() => Is, Ls);
2984
- var Er = (n) => ee((e) => {
2985
- const t = ue.dec(e);
2960
+ return n.i += e, Os.decode(t);
2961
+ }), M = A(xs, Es), Ts = () => {
2962
+ }, Cs = new Uint8Array(0);
2963
+ A(() => Cs, Ts);
2964
+ var yr = (n) => ee((e) => {
2965
+ const t = le.dec(e);
2986
2966
  if (t !== 0)
2987
- return n === xr[1] ? t === 1 : n(e);
2988
- }), Cr = (n) => (e) => {
2967
+ return n === gr[1] ? t === 1 : n(e);
2968
+ }), vr = (n) => (e) => {
2989
2969
  const t = new Uint8Array(1);
2990
- return e === void 0 ? (t[0] = 0, t) : (t[0] = 1, n === xr[0] ? (t[0] = e ? 1 : 2, t) : tt([t, n(e)]));
2991
- }, V = (n) => U(Cr(n[0]), Er(n[1]));
2992
- V.enc = Cr;
2993
- V.dec = Er;
2994
- var Tr = (...n) => ee((e) => n.map((t) => t(e))), kr = (...n) => (e) => tt(n.map((t, r) => t(e[r]))), nt = (...n) => U(kr(...n.map(([e]) => e)), Tr(...n.map(([, e]) => e)));
2995
- nt.enc = kr;
2996
- nt.dec = Tr;
2997
- var Pr = (n) => {
2970
+ return e === void 0 ? (t[0] = 0, t) : (t[0] = 1, n === gr[0] ? (t[0] = e ? 1 : 2, t) : Qe([t, n(e)]));
2971
+ }, H = (n) => A(vr(n[0]), yr(n[1]));
2972
+ H.enc = vr;
2973
+ H.dec = yr;
2974
+ var wr = (...n) => ee((e) => n.map((t) => t(e))), br = (...n) => (e) => Qe(n.map((t, r) => t(e[r]))), Ze = (...n) => A(br(...n.map(([e]) => e)), wr(...n.map(([, e]) => e)));
2975
+ Ze.enc = br;
2976
+ Ze.dec = wr;
2977
+ var Sr = (n) => {
2998
2978
  const e = Object.keys(n);
2999
- return gr(nt.enc(...Object.values(n)), (t) => e.map((r) => t[r]));
3000
- }, Lr = (n) => {
2979
+ return ur(Ze.enc(...Object.values(n)), (t) => e.map((r) => t[r]));
2980
+ }, xr = (n) => {
3001
2981
  const e = Object.keys(n);
3002
- return mr(nt.dec(...Object.values(n)), (t) => Object.fromEntries(t.map((r, i) => [e[i], r])));
3003
- }, se = (n) => U(Pr(En(n, (e) => e[0])), Lr(En(n, (e) => e[1])));
3004
- se.enc = Pr;
3005
- se.dec = Lr;
3006
- const Rs = y({
3007
- [p.requestHash]: h()
2982
+ return lr(Ze.dec(...Object.values(n)), (t) => Object.fromEntries(t.map((r, i) => [e[i], r])));
2983
+ }, se = (n) => A(Sr(gn(n, (e) => e[0])), xr(gn(n, (e) => e[1])));
2984
+ se.enc = Sr;
2985
+ se.dec = xr;
2986
+ const Ls = y({
2987
+ [h.requestHash]: p()
3008
2988
  });
3009
2989
  y({
3010
- [p.challenge]: h()
2990
+ [h.challenge]: p()
3011
2991
  });
3012
- const $s = y({
3013
- [p.timestamp]: h()
3014
- }), Cn = y({
3015
- [p.challenge]: h().optional(),
3016
- [p.requestHash]: h().optional(),
3017
- [p.timestamp]: h().optional()
2992
+ const ks = y({
2993
+ [h.timestamp]: p()
2994
+ }), mn = y({
2995
+ [h.challenge]: p().optional(),
2996
+ [h.requestHash]: p().optional(),
2997
+ [h.timestamp]: p().optional()
3018
2998
  });
3019
2999
  y({
3020
- [p.commitmentId]: h().optional(),
3021
- [p.providerUrl]: h().optional(),
3022
- [p.dapp]: h(),
3023
- [p.user]: h(),
3024
- [p.challenge]: h().optional(),
3025
- [p.nonce]: S().optional(),
3026
- [p.timestamp]: h(),
3027
- [p.signature]: y({
3028
- [p.provider]: Cn,
3029
- [p.user]: Cn
3000
+ [h.commitmentId]: p().optional(),
3001
+ [h.providerUrl]: p().optional(),
3002
+ [h.dapp]: p(),
3003
+ [h.user]: p(),
3004
+ [h.challenge]: p().optional(),
3005
+ [h.nonce]: S().optional(),
3006
+ [h.timestamp]: p(),
3007
+ [h.signature]: y({
3008
+ [h.provider]: mn,
3009
+ [h.user]: mn
3030
3010
  })
3031
3011
  });
3032
- const js = se({
3033
- [p.commitmentId]: V(H),
3034
- [p.providerUrl]: V(H),
3035
- [p.dapp]: H,
3036
- [p.user]: H,
3037
- [p.challenge]: V(H),
3038
- [p.nonce]: V(Ee),
3039
- [p.timestamp]: H,
3040
- [p.signature]: se({
3041
- [p.provider]: se({
3042
- [p.challenge]: V(H),
3043
- [p.requestHash]: V(H)
3012
+ const Ps = se({
3013
+ [h.commitmentId]: H(M),
3014
+ [h.providerUrl]: H(M),
3015
+ [h.dapp]: M,
3016
+ [h.user]: M,
3017
+ [h.challenge]: H(M),
3018
+ [h.nonce]: H(Ee),
3019
+ [h.timestamp]: M,
3020
+ [h.signature]: se({
3021
+ [h.provider]: se({
3022
+ [h.challenge]: H(M),
3023
+ [h.requestHash]: H(M)
3044
3024
  }),
3045
- [p.user]: se({
3046
- [p.timestamp]: V(H),
3047
- [p.requestHash]: V(H)
3025
+ [h.user]: se({
3026
+ [h.timestamp]: H(M),
3027
+ [h.requestHash]: H(M)
3048
3028
  })
3049
3029
  })
3050
- }), Ir = h().startsWith("0x"), ba = (n) => {
3030
+ }), Or = p().startsWith("0x"), Sa = (n) => {
3051
3031
  var e, t, r, i;
3052
- return Ye(js.enc({
3053
- [p.commitmentId]: void 0,
3054
- [p.providerUrl]: void 0,
3055
- [p.challenge]: void 0,
3056
- [p.nonce]: void 0,
3057
- ...n,
3058
- signature: {
3059
- provider: {
3060
- challenge: ((e = n.signature.provider) == null ? void 0 : e.challenge) || void 0,
3061
- requestHash: ((t = n.signature.provider) == null ? void 0 : t.requestHash) || void 0
3062
- },
3063
- user: {
3064
- timestamp: ((r = n.signature.user) == null ? void 0 : r.timestamp) || void 0,
3065
- requestHash: ((i = n.signature.user) == null ? void 0 : i.requestHash) || void 0
3032
+ return We(
3033
+ Ps.enc({
3034
+ [h.commitmentId]: void 0,
3035
+ [h.providerUrl]: void 0,
3036
+ [h.challenge]: void 0,
3037
+ [h.nonce]: void 0,
3038
+ // override any optional fields by spreading the procaptchaOutput
3039
+ ...n,
3040
+ signature: {
3041
+ provider: {
3042
+ challenge: ((e = n.signature.provider) == null ? void 0 : e.challenge) || void 0,
3043
+ requestHash: ((t = n.signature.provider) == null ? void 0 : t.requestHash) || void 0
3044
+ },
3045
+ user: {
3046
+ timestamp: ((r = n.signature.user) == null ? void 0 : r.timestamp) || void 0,
3047
+ requestHash: ((i = n.signature.user) == null ? void 0 : i.requestHash) || void 0
3048
+ }
3066
3049
  }
3067
- }
3068
- }));
3069
- };
3070
- var F;
3071
- (function(n) {
3072
- n.GetImageCaptchaChallenge = "/v1/prosopo/provider/client/captcha/image", n.GetPowCaptchaChallenge = "/v1/prosopo/provider/client/captcha/pow", n.GetFrictionlessCaptchaChallenge = "/v1/prosopo/provider/client/captcha/frictionless", n.SubmitImageCaptchaSolution = "/v1/prosopo/provider/client/solution", n.SubmitPowCaptchaSolution = "/v1/prosopo/provider/client/pow/solution", n.VerifyPowCaptchaSolution = "/v1/prosopo/provider/client/pow/verify", n.VerifyImageCaptchaSolutionDapp = "/v1/prosopo/provider/client/image/dapp/verify", n.GetProviderStatus = "/v1/prosopo/provider/client/status", n.SubmitUserEvents = "/v1/prosopo/provider/client/events";
3073
- })(F || (F = {}));
3074
- var Ot;
3075
- (function(n) {
3076
- n.Healthz = "/healthz", n.GetProviderDetails = "/v1/prosopo/provider/public/details";
3077
- })(Ot || (Ot = {}));
3078
- var we;
3079
- (function(n) {
3080
- n.SiteKeyRegister = "/v1/prosopo/provider/admin/sitekey/register", n.UpdateDetectorKey = "/v1/prosopo/provider/admin/detector/update", n.RemoveDetectorKey = "/v1/prosopo/provider/admin/detector/remove";
3081
- })(we || (we = {}));
3082
- const Rr = {
3083
- [F.GetImageCaptchaChallenge]: { windowMs: 6e4, limit: 30 },
3084
- [F.GetPowCaptchaChallenge]: { windowMs: 6e4, limit: 60 },
3085
- [F.SubmitImageCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3086
- [F.GetFrictionlessCaptchaChallenge]: {
3050
+ })
3051
+ );
3052
+ }, Er = 2, Tr = 0;
3053
+ var Is = /* @__PURE__ */ ((n) => (n.GetImageCaptchaChallenge = "/v1/prosopo/provider/client/captcha/image", n.GetPowCaptchaChallenge = "/v1/prosopo/provider/client/captcha/pow", n.GetFrictionlessCaptchaChallenge = "/v1/prosopo/provider/client/captcha/frictionless", n.SubmitImageCaptchaSolution = "/v1/prosopo/provider/client/solution", n.SubmitPowCaptchaSolution = "/v1/prosopo/provider/client/pow/solution", n.VerifyPowCaptchaSolution = "/v1/prosopo/provider/client/pow/verify", n.VerifyImageCaptchaSolutionDapp = "/v1/prosopo/provider/client/image/dapp/verify", n.GetProviderStatus = "/v1/prosopo/provider/client/status", n.SubmitUserEvents = "/v1/prosopo/provider/client/events", n))(Is || {}), Rs = /* @__PURE__ */ ((n) => (n.Healthz = "/healthz", n.GetProviderDetails = "/v1/prosopo/provider/public/details", n))(Rs || {}), $s = /* @__PURE__ */ ((n) => (n.SiteKeyRegister = "/v1/prosopo/provider/admin/sitekey/register", n.UpdateDetectorKey = "/v1/prosopo/provider/admin/detector/update", n.RemoveDetectorKey = "/v1/prosopo/provider/admin/detector/remove", n))($s || {});
3054
+ const Cr = {
3055
+ "/v1/prosopo/provider/client/captcha/image": { windowMs: 6e4, limit: 30 },
3056
+ "/v1/prosopo/provider/client/captcha/pow": { windowMs: 6e4, limit: 60 },
3057
+ "/v1/prosopo/provider/client/solution": { windowMs: 6e4, limit: 60 },
3058
+ "/v1/prosopo/provider/client/captcha/frictionless": {
3087
3059
  windowMs: 6e4,
3088
3060
  limit: 60
3089
3061
  },
3090
- [F.SubmitPowCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3091
- [F.VerifyPowCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3092
- [F.VerifyImageCaptchaSolutionDapp]: {
3062
+ "/v1/prosopo/provider/client/pow/solution": { windowMs: 6e4, limit: 60 },
3063
+ "/v1/prosopo/provider/client/pow/verify": { windowMs: 6e4, limit: 60 },
3064
+ "/v1/prosopo/provider/client/image/dapp/verify": {
3093
3065
  windowMs: 6e4,
3094
3066
  limit: 60
3095
3067
  },
3096
- [F.GetProviderStatus]: { windowMs: 6e4, limit: 60 },
3097
- [Ot.GetProviderDetails]: { windowMs: 6e4, limit: 60 },
3098
- [F.SubmitUserEvents]: { windowMs: 6e4, limit: 60 },
3099
- [we.SiteKeyRegister]: { windowMs: 6e4, limit: 5 },
3100
- [we.UpdateDetectorKey]: { windowMs: 6e4, limit: 5 },
3101
- [we.RemoveDetectorKey]: { windowMs: 6e4, limit: 5 }
3102
- }, As = (n) => y(Object.entries(n).reduce((e, [t, r]) => {
3103
- const i = t;
3104
- return e[i] = y({
3105
- windowMs: Ft.number().optional().default(r.windowMs),
3106
- limit: Ft.number().optional().default(r.limit)
3107
- }), e;
3108
- }, {})), Ns = As(Rr);
3068
+ "/v1/prosopo/provider/client/status": { windowMs: 6e4, limit: 60 },
3069
+ "/v1/prosopo/provider/public/details": { windowMs: 6e4, limit: 60 },
3070
+ "/v1/prosopo/provider/client/events": { windowMs: 6e4, limit: 60 },
3071
+ "/v1/prosopo/provider/admin/sitekey/register": { windowMs: 6e4, limit: 5 },
3072
+ "/v1/prosopo/provider/admin/detector/update": { windowMs: 6e4, limit: 5 },
3073
+ "/v1/prosopo/provider/admin/detector/remove": { windowMs: 6e4, limit: 5 }
3074
+ }, js = (n) => y(
3075
+ Object.entries(n).reduce(
3076
+ (e, [t, r]) => {
3077
+ const i = t;
3078
+ return e[i] = y({
3079
+ windowMs: Nt.number().optional().default(r.windowMs),
3080
+ limit: Nt.number().optional().default(r.limit)
3081
+ }), e;
3082
+ },
3083
+ {}
3084
+ )
3085
+ ), Ns = js(
3086
+ Cr
3087
+ );
3109
3088
  y({
3110
- [p.user]: h(),
3111
- [p.dapp]: h(),
3112
- [p.datasetId]: _e([h(), K(S())]),
3113
- [p.sessionId]: h().optional()
3089
+ [h.user]: p(),
3090
+ [h.dapp]: p(),
3091
+ [h.datasetId]: Ae([p(), K(S())]),
3092
+ [h.sessionId]: p().optional()
3114
3093
  });
3115
3094
  y({
3116
- [p.user]: h(),
3117
- [p.dapp]: h(),
3118
- [p.captchas]: K(pr),
3119
- [p.requestHash]: h(),
3120
- [p.timestamp]: h(),
3121
- [p.signature]: y({
3122
- [p.user]: $s,
3123
- [p.provider]: Rs
3095
+ [h.user]: p(),
3096
+ [h.dapp]: p(),
3097
+ [h.captchas]: K(ar),
3098
+ [h.requestHash]: p(),
3099
+ [h.timestamp]: p(),
3100
+ [h.signature]: y({
3101
+ [h.user]: ks,
3102
+ [h.provider]: Ls
3124
3103
  })
3125
3104
  });
3126
3105
  y({
3127
- [p.token]: Ir,
3128
- [p.dappSignature]: h(),
3129
- [p.maxVerifiedTime]: S().optional().default(Rt),
3130
- [p.ip]: h().optional()
3106
+ [h.token]: Or,
3107
+ [h.dappSignature]: p(),
3108
+ [h.maxVerifiedTime]: S().optional().default(Tt),
3109
+ [h.ip]: p().optional()
3131
3110
  });
3132
3111
  y({
3133
- [p.token]: Ir,
3134
- [p.dappSignature]: h(),
3135
- [p.verifiedTimeout]: S().optional().default(et),
3136
- [p.ip]: h().optional()
3112
+ [h.token]: Or,
3113
+ [h.dappSignature]: p(),
3114
+ [h.verifiedTimeout]: S().optional().default(Ye),
3115
+ [h.ip]: p().optional()
3137
3116
  });
3138
3117
  y({
3139
- [p.user]: h(),
3140
- [p.dapp]: h(),
3141
- [p.sessionId]: h().optional()
3118
+ [h.user]: p(),
3119
+ [h.dapp]: p(),
3120
+ [h.sessionId]: p().optional()
3142
3121
  });
3143
- const Sa = y({
3144
- [p.challenge]: ns,
3145
- [p.difficulty]: S(),
3146
- [p.signature]: y({
3147
- [p.user]: y({
3148
- [p.timestamp]: h()
3122
+ const xa = y({
3123
+ [h.challenge]: Qo,
3124
+ [h.difficulty]: S(),
3125
+ [h.signature]: y({
3126
+ [h.user]: y({
3127
+ [h.timestamp]: p()
3149
3128
  }),
3150
- [p.provider]: y({
3151
- [p.challenge]: h()
3129
+ [h.provider]: y({
3130
+ [h.challenge]: p()
3152
3131
  })
3153
3132
  }),
3154
- [p.user]: h(),
3155
- [p.dapp]: h(),
3156
- [p.nonce]: S(),
3157
- [p.verifiedTimeout]: S().optional().default(et)
3133
+ [h.user]: p(),
3134
+ [h.dapp]: p(),
3135
+ [h.nonce]: S(),
3136
+ [h.verifiedTimeout]: S().optional().default(Ye)
3158
3137
  });
3159
3138
  y({
3160
- [p.dapp]: h(),
3161
- [p.token]: h(),
3162
- [p.user]: h()
3139
+ [h.dapp]: p(),
3140
+ [h.token]: p(),
3141
+ [h.user]: p()
3163
3142
  });
3164
3143
  y({
3165
- [p.siteKey]: h()
3144
+ [h.siteKey]: p()
3166
3145
  });
3167
3146
  y({
3168
- [p.siteKey]: h(),
3169
- [p.tier]: Te(Ve),
3170
- [p.settings]: mi.optional()
3147
+ [h.siteKey]: p(),
3148
+ [h.tier]: Ce(wt),
3149
+ [h.settings]: di.optional()
3171
3150
  });
3172
- const xa = y({
3173
- [p.detectorKey]: h()
3174
- }), $r = y({
3151
+ const Oa = y({
3152
+ [h.detectorKey]: p()
3153
+ }), Lr = y({
3175
3154
  solved: y({
3176
3155
  count: S().positive()
3177
- }).optional().default({ count: 1 }),
3156
+ }).optional().default({ count: Er }),
3178
3157
  unsolved: y({
3179
3158
  count: S().nonnegative()
3180
- }).optional().default({ count: 0 })
3159
+ }).optional().default({ count: Tr })
3181
3160
  });
3182
- var Et;
3183
- (function(n) {
3184
- n.ipAddress = "ipAddress", n.userAccount = "userAccount";
3185
- })(Et || (Et = {}));
3186
- const Us = Te(Et);
3161
+ var kr = /* @__PURE__ */ ((n) => (n.ipAddress = "ipAddress", n.userAccount = "userAccount", n))(kr || {});
3162
+ const Us = Ce(kr);
3187
3163
  y({
3188
- global: Me(),
3189
- hardBlock: Me(),
3164
+ global: De(),
3165
+ hardBlock: De(),
3190
3166
  type: Us,
3191
- dappAccount: h().optional(),
3192
- captchaConfig: $r.optional()
3167
+ dappAccount: p().optional(),
3168
+ captchaConfig: Lr.optional()
3193
3169
  });
3194
3170
  y({
3195
- [p.dapp]: h()
3171
+ [h.dapp]: p()
3196
3172
  });
3197
- const Ds = y({
3173
+ const As = y({
3198
3174
  PENALTY_OLD_TIMESTAMP: S().positive().optional().default(0.2),
3199
3175
  PENALTY_ACCESS_RULE: S().positive().optional().default(0.5)
3200
- }), Tn = Xe([
3176
+ }), yn = ze([
3201
3177
  "trace",
3202
3178
  "debug",
3203
3179
  "info",
@@ -3206,29 +3182,35 @@ const Ds = y({
3206
3182
  "fatal",
3207
3183
  "log"
3208
3184
  ]);
3209
- Xe([
3185
+ ze([
3210
3186
  "mongo",
3211
3187
  "mongoMemory",
3212
3188
  "provider",
3213
3189
  "client",
3214
3190
  "captcha"
3215
3191
  ]);
3216
- const Ct = Xe([
3192
+ const vt = ze([
3217
3193
  "development",
3218
3194
  "staging",
3219
3195
  "production"
3220
- ]), Fs = In(Ct, y({
3221
- type: h(),
3222
- endpoint: h(),
3223
- dbname: h().default("prosopo"),
3224
- authSource: h().default("admin")
3225
- })), _s = y({
3226
- logLevel: Tn.optional().default(Tn.enum.info),
3227
- defaultEnvironment: Ct.default(Ct.Values.production),
3196
+ ]), Ds = Sn(
3197
+ vt,
3198
+ y({
3199
+ type: p(),
3200
+ endpoint: p(),
3201
+ dbname: p().default("prosopo"),
3202
+ authSource: p().default("admin")
3203
+ })
3204
+ ), Fs = y({
3205
+ logLevel: yn.optional().default(yn.enum.info),
3206
+ defaultEnvironment: vt.default(
3207
+ vt.Values.production
3208
+ ),
3209
+ // The account with which to query the contract.merge sign transactions
3228
3210
  account: y({
3229
- address: h().optional(),
3230
- secret: h().optional(),
3231
- password: h().optional()
3211
+ address: p().optional(),
3212
+ secret: p().optional(),
3213
+ password: p().optional()
3232
3214
  })
3233
3215
  });
3234
3216
  R.object({
@@ -3245,11 +3227,13 @@ R.object({
3245
3227
  whenCreated: R.number()
3246
3228
  })
3247
3229
  });
3248
- const jr = _s.merge(y({
3249
- database: Fs.optional(),
3250
- devOnlyWatchEvents: Me().optional()
3251
- })), Ms = y({
3252
- baseURL: h().url(),
3230
+ const Pr = Fs.merge(
3231
+ y({
3232
+ database: Ds.optional(),
3233
+ devOnlyWatchEvents: De().optional()
3234
+ })
3235
+ ), _s = y({
3236
+ baseURL: p().url(),
3253
3237
  port: S().optional().default(9229)
3254
3238
  });
3255
3239
  y({
@@ -3257,47 +3241,53 @@ y({
3257
3241
  solutionWinningPercentage: S().positive().max(100),
3258
3242
  captchaBlockRecency: S().positive().min(2)
3259
3243
  });
3260
- const Ar = jr.merge(y({
3261
- userAccountAddress: h().optional(),
3262
- web2: Me().optional().default(!0),
3263
- solutionThreshold: S().positive().max(100).optional().default(80),
3264
- dappName: h().optional().default("ProsopoClientDapp"),
3265
- serverUrl: h().optional()
3266
- })), Nr = {
3267
- challengeTimeout: Pe,
3268
- solutionTimeout: ar,
3269
- verifiedTimeout: ur,
3270
- cachedTimeout: Rt
3271
- }, Ur = {
3272
- challengeTimeout: et,
3273
- solutionTimeout: Ze,
3274
- cachedTimeout: lr
3275
- }, Dr = {
3276
- maxVerifiedTime: cr
3277
- }, $t = {
3278
- image: Nr,
3279
- pow: Ur,
3280
- contract: Dr
3281
- }, Fr = y({
3244
+ const Ir = Pr.merge(
3245
+ y({
3246
+ userAccountAddress: p().optional(),
3247
+ web2: De().optional().default(!0),
3248
+ solutionThreshold: S().positive().max(100).optional().default(80),
3249
+ dappName: p().optional().default("ProsopoClientDapp"),
3250
+ serverUrl: p().optional()
3251
+ })
3252
+ ), Rr = {
3253
+ challengeTimeout: ke,
3254
+ solutionTimeout: Qn,
3255
+ verifiedTimeout: Zn,
3256
+ cachedTimeout: Tt
3257
+ }, $r = {
3258
+ challengeTimeout: Ye,
3259
+ solutionTimeout: Ge,
3260
+ cachedTimeout: er
3261
+ }, jr = {
3262
+ maxVerifiedTime: tr
3263
+ }, Ct = {
3264
+ image: Rr,
3265
+ pow: $r,
3266
+ contract: jr
3267
+ }, Nr = y({
3282
3268
  image: y({
3283
- challengeTimeout: S().positive().optional().default(Pe),
3284
- solutionTimeout: S().positive().optional().default(ar),
3285
- verifiedTimeout: S().positive().optional().default(ur),
3286
- cachedTimeout: S().positive().optional().default(Rt)
3287
- }).default(Nr),
3269
+ // Set this to a default value for the frontend
3270
+ challengeTimeout: S().positive().optional().default(ke),
3271
+ // Set this to a default value for the frontend
3272
+ solutionTimeout: S().positive().optional().default(Qn),
3273
+ verifiedTimeout: S().positive().optional().default(Zn),
3274
+ cachedTimeout: S().positive().optional().default(Tt)
3275
+ }).default(Rr),
3288
3276
  pow: y({
3289
- verifiedTimeout: S().positive().optional().default(et),
3290
- solutionTimeout: S().positive().optional().default(Ze),
3291
- cachedTimeout: S().positive().optional().default(lr)
3292
- }).default(Ur),
3277
+ verifiedTimeout: S().positive().optional().default(Ye),
3278
+ solutionTimeout: S().positive().optional().default(Ge),
3279
+ cachedTimeout: S().positive().optional().default(er)
3280
+ }).default($r),
3293
3281
  contract: y({
3294
- maxVerifiedTime: S().positive().optional().default(cr)
3295
- }).default(Dr)
3296
- }).default($t);
3297
- Ar.merge(y({
3298
- serverUrl: h().url().optional(),
3299
- timeouts: Fr.optional().default($t)
3300
- }));
3282
+ maxVerifiedTime: S().positive().optional().default(tr)
3283
+ }).default(jr)
3284
+ }).default(Ct);
3285
+ Ir.merge(
3286
+ y({
3287
+ serverUrl: p().url().optional(),
3288
+ timeouts: Nr.optional().default(Ct)
3289
+ })
3290
+ );
3301
3291
  y({
3302
3292
  area: y({
3303
3293
  width: S().positive(),
@@ -3310,49 +3300,57 @@ y({
3310
3300
  numberOfRounds: S().positive(),
3311
3301
  seed: S().positive()
3312
3302
  });
3313
- const Hs = _e([_t("light"), _t("dark")]);
3314
- var Ce;
3315
- (function(n) {
3316
- n.visible = "visible", n.invisible = "invisible";
3317
- })(Ce || (Ce = {}));
3318
- const Vs = Xe([Ce.visible, Ce.invisible]).optional(), Oa = Ar.and(y({
3319
- theme: Hs.optional().default("light"),
3320
- captchas: Fr.optional().default($t),
3321
- language: Dn.optional(),
3322
- mode: Vs.optional().default(Ce.visible)
3323
- }));
3324
- jr.merge(y({
3325
- captchas: $r.optional().default({
3326
- solved: { count: 1 },
3327
- unsolved: { count: 0 }
3328
- }),
3329
- penalties: Ds,
3330
- scheduledTasks: y({
3331
- captchaScheduler: y({
3332
- schedule: h().optional()
3303
+ const Ms = Ae([Ut("light"), Ut("dark")]);
3304
+ var Hs = /* @__PURE__ */ ((n) => (n.visible = "visible", n.invisible = "invisible", n))(Hs || {});
3305
+ const Vs = ze([
3306
+ "visible",
3307
+ "invisible"
3308
+ /* invisible */
3309
+ ]).optional(), Ea = Ir.and(
3310
+ y({
3311
+ theme: Ms.optional().default("light"),
3312
+ captchas: Nr.optional().default(Ct),
3313
+ language: kn.optional(),
3314
+ mode: Vs.optional().default(
3315
+ "visible"
3316
+ /* visible */
3317
+ )
3318
+ })
3319
+ );
3320
+ Pr.merge(
3321
+ y({
3322
+ captchas: Lr.optional().default({
3323
+ solved: { count: Er },
3324
+ unsolved: { count: Tr }
3325
+ }),
3326
+ penalties: As,
3327
+ scheduledTasks: y({
3328
+ captchaScheduler: y({
3329
+ schedule: p().optional()
3330
+ }).optional(),
3331
+ clientListScheduler: y({
3332
+ schedule: p().optional()
3333
+ }).optional()
3333
3334
  }).optional(),
3334
- clientListScheduler: y({
3335
- schedule: h().optional()
3336
- }).optional()
3337
- }).optional(),
3338
- server: Ms,
3339
- mongoEventsUri: h().optional(),
3340
- mongoCaptchaUri: h().optional(),
3341
- mongoClientUri: h().optional(),
3342
- redisConnection: y({
3343
- url: h(),
3344
- password: h()
3345
- }),
3346
- rateLimits: Ns.default(Rr),
3347
- proxyCount: S().optional().default(0),
3348
- lRules: In(h(), S()).optional(),
3349
- authAccount: y({
3350
- address: h().optional(),
3351
- secret: h().optional(),
3352
- password: h().optional()
3335
+ server: _s,
3336
+ mongoEventsUri: p().optional(),
3337
+ mongoCaptchaUri: p().optional(),
3338
+ mongoClientUri: p().optional(),
3339
+ redisConnection: y({
3340
+ url: p(),
3341
+ password: p()
3342
+ }),
3343
+ rateLimits: Ns.default(Cr),
3344
+ proxyCount: S().optional().default(0),
3345
+ lRules: Sn(p(), S()).optional(),
3346
+ authAccount: y({
3347
+ address: p().optional(),
3348
+ secret: p().optional(),
3349
+ password: p().optional()
3350
+ })
3353
3351
  })
3354
- }));
3355
- const Bs = async () => (await import("./fp.esm-BADUiinQ.js")).default, Ks = async () => (await (await (await Bs()).load()).get()).visitorId, re = new Uint8Array([161, 35, 3, 33, 0]), Ge = new Uint8Array([
3352
+ );
3353
+ const Bs = async () => (await import("./fp.esm-DYWeNGcH.js")).default, Ks = async () => (await (await (await Bs()).load()).get()).visitorId, ie = new Uint8Array([161, 35, 3, 33, 0]), qe = new Uint8Array([
3356
3354
  48,
3357
3355
  83,
3358
3356
  2,
@@ -3369,15 +3367,15 @@ const Bs = async () => (await import("./fp.esm-BADUiinQ.js")).default, Ks = asyn
3369
3367
  34,
3370
3368
  4,
3371
3369
  32
3372
- ]), qs = 32, kn = 64, zs = 32, ge = Ge.length;
3370
+ ]), qs = 32, vn = 64, zs = 32, ve = qe.length;
3373
3371
  function Ws(n, e, t) {
3374
- const r = Array.isArray(t) || t === void 0 ? t : [t], i = qr(e, n, r), o = i.subarray(0, Ge.length);
3375
- if (!rt(o, Ge))
3372
+ const r = Array.isArray(t) || t === void 0 ? t : [t], i = _r(e, n, r), o = i.subarray(0, qe.length);
3373
+ if (!et(o, qe))
3376
3374
  throw new Error("Invalid encoding header found in body");
3377
- let s = i.subarray(ge, ge + kn), a = ge + kn, u = i.subarray(a, a + re.length);
3378
- if (!rt(u, re) && (a = ge + zs, s = i.subarray(ge, a), u = i.subarray(a, a + re.length), !rt(u, re)))
3375
+ let s = i.subarray(ve, ve + vn), a = ve + vn, u = i.subarray(a, a + ie.length);
3376
+ if (!et(u, ie) && (a = ve + zs, s = i.subarray(ve, a), u = i.subarray(a, a + ie.length), !et(u, ie)))
3379
3377
  throw new Error("Invalid encoding divider found in body");
3380
- const c = a + re.length;
3378
+ const c = a + ie.length;
3381
3379
  return {
3382
3380
  publicKey: i.subarray(c, c + qs),
3383
3381
  secretKey: s
@@ -3386,20 +3384,23 @@ function Ws(n, e, t) {
3386
3384
  function Js({ publicKey: n, secretKey: e }, t) {
3387
3385
  if (!e)
3388
3386
  throw new Error("Expected a valid secretKey to be passed to encode");
3389
- const r = dt(Ge, e, re, n);
3387
+ const r = lt(qe, e, ie, n);
3390
3388
  if (!t)
3391
3389
  return r;
3392
- const { params: i, password: o, salt: s } = zr(t), { encrypted: a, nonce: u } = Wr(r, o.subarray(0, 32));
3393
- return dt(Jr(s, i), u, a);
3394
- }
3395
- function Gs(n, { address: e, meta: t }, r, i) {
3396
- return Rn(Gr(r, ["pkcs8", n], i), {
3397
- address: e,
3398
- meta: t
3399
- });
3390
+ const { params: i, password: o, salt: s } = Mr(t), { encrypted: a, nonce: u } = Hr(r, o.subarray(0, 32));
3391
+ return lt(Vr(s, i), u, a);
3392
+ }
3393
+ function Xs(n, { address: e, meta: t }, r, i) {
3394
+ return En(
3395
+ Br(r, ["pkcs8", n], i),
3396
+ {
3397
+ address: e,
3398
+ meta: t
3399
+ }
3400
+ );
3400
3401
  }
3401
- const Xs = new Uint8Array([]), Ys = {
3402
- sr25519: An,
3402
+ const Gs = new Uint8Array([]), Ys = {
3403
+ sr25519: On,
3403
3404
  ed25519: () => {
3404
3405
  throw new Error("Not Implemented");
3405
3406
  },
@@ -3415,7 +3416,7 @@ const Xs = new Uint8Array([]), Ys = {
3415
3416
  ethereum: new Uint8Array([2]),
3416
3417
  sr25519: new Uint8Array([1])
3417
3418
  }, Zs = {
3418
- sr25519: ei,
3419
+ sr25519: Jr,
3419
3420
  ed25519: () => {
3420
3421
  throw new Error("Not Implemented");
3421
3422
  },
@@ -3425,7 +3426,7 @@ const Xs = new Uint8Array([]), Ys = {
3425
3426
  ethereum: () => {
3426
3427
  throw new Error("Not Implemented");
3427
3428
  }
3428
- }, ft = {
3429
+ }, ut = {
3429
3430
  sr25519: (n) => n,
3430
3431
  ed25519: () => {
3431
3432
  throw new Error("Not Implemented");
@@ -3437,10 +3438,10 @@ const Xs = new Uint8Array([]), Ys = {
3437
3438
  throw new Error("Not Implemented");
3438
3439
  }
3439
3440
  };
3440
- function me(n) {
3441
- return !n || Br(n);
3441
+ function we(n) {
3442
+ return !n || ei(n);
3442
3443
  }
3443
- function ie({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o = null, s) {
3444
+ function oe({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o = null, s) {
3444
3445
  const a = (l, f) => {
3445
3446
  const d = Ws(l, f || o, s);
3446
3447
  if (d.secretKey.length === 64)
@@ -3449,8 +3450,8 @@ function ie({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3449
3450
  const g = Ys[e](d.secretKey);
3450
3451
  t = g.publicKey, r = g.secretKey;
3451
3452
  }
3452
- }, u = (l) => (me(r) && o && a(l, o), o = Js({ publicKey: t, secretKey: r }, l), s = void 0, o), c = () => {
3453
- const l = ft[e](t);
3453
+ }, u = (l) => (we(r) && o && a(l, o), o = Js({ publicKey: t, secretKey: r }, l), s = void 0, o), c = () => {
3454
+ const l = ut[e](t);
3454
3455
  return n(l);
3455
3456
  };
3456
3457
  return {
@@ -3458,10 +3459,10 @@ function ie({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3458
3459
  return c();
3459
3460
  },
3460
3461
  get addressRaw() {
3461
- return ft[e](t);
3462
+ return ut[e](t);
3462
3463
  },
3463
3464
  get isLocked() {
3464
- return me(r);
3465
+ return we(r);
3465
3466
  },
3466
3467
  get meta() {
3467
3468
  return i;
@@ -3472,66 +3473,80 @@ function ie({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3472
3473
  get type() {
3473
3474
  return e;
3474
3475
  },
3476
+ // eslint-disable-next-line sort-keys
3475
3477
  decodePkcs8: a,
3476
3478
  derive: (l, f) => {
3477
- if (me(r))
3479
+ if (we(r))
3478
3480
  throw new Error("Cannot derive on a locked keypair");
3479
- const { path: d } = ti(l), g = jn({ publicKey: t, secretKey: r }, d, e);
3480
- return ie({ toSS58: n, type: e }, g, f, null);
3481
+ const { path: d } = Xr(l), g = xn({ publicKey: t, secretKey: r }, d, e);
3482
+ return oe({ toSS58: n, type: e }, g, f, null);
3481
3483
  },
3482
3484
  encodePkcs8: (l) => u(l),
3483
3485
  lock: () => {
3484
3486
  r = new Uint8Array([]);
3485
3487
  },
3486
3488
  setMeta: (l) => {
3487
- i = Rn({}, i, l);
3489
+ i = En({}, i, l);
3488
3490
  },
3489
3491
  sign: (l, f = {}) => {
3490
- if (me(r))
3492
+ if (we(r))
3491
3493
  throw new Error("Cannot sign with a locked key pair");
3492
- return dt(f.withType ? Qs[e] : Xs, Zs[e](ht(l), { publicKey: t, secretKey: r }));
3494
+ return lt(
3495
+ f.withType ? Qs[e] : Gs,
3496
+ Zs[e](ct(l), { publicKey: t, secretKey: r })
3497
+ );
3493
3498
  },
3494
3499
  toJson: (l) => {
3495
- const f = ["ecdsa", "ethereum"].includes(e) ? t.length === 20 ? Mt(t) : Mt(Zr(t)) : c();
3496
- return Gs(e, { address: f, meta: i }, u(l), !!l);
3500
+ const f = ["ecdsa", "ethereum"].includes(e) ? t.length === 20 ? At(t) : At(Wr(t)) : c();
3501
+ return Xs(
3502
+ e,
3503
+ { address: f, meta: i },
3504
+ u(l),
3505
+ !!l
3506
+ );
3497
3507
  },
3498
3508
  unlock: (l) => {
3499
3509
  a(l);
3500
3510
  },
3501
- verify: (l, f, d) => Qr(l, f, ft[e](ht(d))).isValid,
3511
+ verify: (l, f, d) => zr(
3512
+ l,
3513
+ f,
3514
+ ut[e](ct(d))
3515
+ ).isValid,
3502
3516
  vrfSign: (l, f, d) => {
3503
- if (me(r))
3517
+ if (we(r))
3504
3518
  throw new Error("Cannot sign with a locked key pair");
3505
- return Yr(l, { secretKey: r }, f, d);
3519
+ return qr(l, { secretKey: r }, f, d);
3506
3520
  },
3507
- vrfVerify: (l, f, d, g, m) => Xr(l, f, t, g, m)
3521
+ vrfVerify: (l, f, d, g, m) => Kr(l, f, t, g, m)
3508
3522
  };
3509
3523
  }
3510
- var oe;
3524
+ var Y;
3511
3525
  class ea {
3512
3526
  constructor() {
3513
- oe.set(this, {});
3527
+ pe(this, Y, {});
3514
3528
  }
3515
3529
  add(e) {
3516
- return N(this, oe, "f")[Ae(e.address).toString()] = e, e;
3530
+ return U(this, Y)[$e(e.address).toString()] = e, e;
3517
3531
  }
3518
3532
  all() {
3519
- return Object.values(N(this, oe, "f"));
3533
+ return Object.values(U(this, Y));
3520
3534
  }
3521
3535
  get(e) {
3522
- const t = N(this, oe, "f")[Ae(e).toString()];
3536
+ const t = U(this, Y)[$e(e).toString()];
3523
3537
  if (!t)
3524
- throw new Error(`Unable to retrieve keypair '${Kr(e) || je(e) ? Ye(ht(e)) : e}'`);
3538
+ throw new Error(
3539
+ `Unable to retrieve keypair '${ti(e) || je(e) ? We(ct(e)) : e}'`
3540
+ );
3525
3541
  return t;
3526
3542
  }
3527
3543
  remove(e) {
3528
- delete N(this, oe, "f")[Ae(e).toString()];
3544
+ delete U(this, Y)[$e(e).toString()];
3529
3545
  }
3530
3546
  }
3531
- oe = /* @__PURE__ */ new WeakMap();
3532
- var z, Fe, ye;
3533
- const ta = "bottom drive obey lake curtain smoke basket hold race lonely fit walk", Pn = {
3534
- sr25519: (n) => An(n),
3547
+ Y = new WeakMap();
3548
+ const ta = "bottom drive obey lake curtain smoke basket hold race lonely fit walk", wn = {
3549
+ sr25519: (n) => On(n),
3535
3550
  ed25519: () => {
3536
3551
  throw new Error("Not Implemented");
3537
3552
  },
@@ -3545,102 +3560,242 @@ const ta = "bottom drive obey lake curtain smoke basket hold race lonely fit wal
3545
3560
  function na({ publicKey: n }) {
3546
3561
  return n;
3547
3562
  }
3563
+ var V, Te, ae;
3548
3564
  class ra {
3549
3565
  constructor(e = {}) {
3550
- if (z.set(this, void 0), Fe.set(this, void 0), ye.set(this, void 0), this.decodeAddress = Ae, this.encodeAddress = (t, r) => ni(t, r ?? N(this, ye, "f")), e.type = e.type || "sr25519", !["sr25519"].includes(e.type || "undefined"))
3551
- throw new Error(`Expected a keyring type of either 'sr25519', found '${e.type || "unknown"}`);
3552
- Ie(this, z, new ea(), "f"), Ie(this, ye, e.ss58Format, "f"), Ie(this, Fe, e.type, "f");
3553
- }
3566
+ pe(this, V);
3567
+ pe(this, Te);
3568
+ pe(this, ae);
3569
+ if (this.decodeAddress = $e, this.encodeAddress = (t, r) => Gr(t, r ?? U(this, ae)), e.type = e.type || "sr25519", !["sr25519"].includes(e.type || "undefined"))
3570
+ throw new Error(
3571
+ `Expected a keyring type of either 'sr25519', found '${e.type || "unknown"}`
3572
+ );
3573
+ he(this, V, new ea()), he(this, ae, e.ss58Format), he(this, Te, e.type);
3574
+ }
3575
+ /**
3576
+ * @description retrieve the pairs (alias for getPairs)
3577
+ */
3554
3578
  get pairs() {
3555
3579
  return this.getPairs();
3556
3580
  }
3581
+ /**
3582
+ * @description retrieve the publicKeys (alias for getPublicKeys)
3583
+ */
3557
3584
  get publicKeys() {
3558
3585
  return this.getPublicKeys();
3559
3586
  }
3587
+ /**
3588
+ * @description Returns the type of the keyring, ed25519, sr25519 or ecdsa
3589
+ */
3560
3590
  get type() {
3561
- return N(this, Fe, "f");
3591
+ return U(this, Te);
3562
3592
  }
3593
+ /**
3594
+ * @name addPair
3595
+ * @summary Stores an account, given a keyring pair, as a Key/Value (public key, pair) in Keyring Pair Dictionary
3596
+ */
3563
3597
  addPair(e) {
3564
- return N(this, z, "f").add(e);
3565
- }
3598
+ return U(this, V).add(e);
3599
+ }
3600
+ /**
3601
+ * @name addFromAddress
3602
+ * @summary Stores an account, given an account address, as a Key/Value (public key, pair) in Keyring Pair Dictionary
3603
+ * @description Allows user to explicitly provide separate inputs including account address or public key, and optionally
3604
+ * the associated account metadata, and the default encoded value as arguments (that may be obtained from the json file
3605
+ * of an account backup), and then generates a keyring pair from them that it passes to
3606
+ * `addPair` to stores in a keyring pair dictionary the public key of the generated pair as a key and the pair as the associated value.
3607
+ */
3566
3608
  addFromAddress(e, t = {}, r = null, i = this.type, o, s) {
3567
3609
  const a = this.decodeAddress(e, o);
3568
- return this.addPair(ie({ toSS58: this.encodeAddress, type: i }, { publicKey: a, secretKey: new Uint8Array() }, t, r, s));
3569
- }
3610
+ return this.addPair(
3611
+ oe(
3612
+ { toSS58: this.encodeAddress, type: i },
3613
+ { publicKey: a, secretKey: new Uint8Array() },
3614
+ t,
3615
+ r,
3616
+ s
3617
+ )
3618
+ );
3619
+ }
3620
+ /**
3621
+ * @name addFromJson
3622
+ * @summary Stores an account, given JSON data, as a Key/Value (public key, pair) in Keyring Pair Dictionary
3623
+ * @description Allows user to provide a json object argument that contains account information (that may be obtained from the json file
3624
+ * of an account backup), and then generates a keyring pair from it that it passes to
3625
+ * `addPair` to stores in a keyring pair dictionary the public key of the generated pair as a key and the pair as the associated value.
3626
+ */
3570
3627
  addFromJson(e, t) {
3571
3628
  return this.addPair(this.createFromJson(e, t));
3572
3629
  }
3630
+ /**
3631
+ * @name addFromMnemonic
3632
+ * @summary Stores an account, given a mnemonic, as a Key/Value (public key, pair) in Keyring Pair Dictionary
3633
+ * @description Allows user to provide a mnemonic (seed phrase that is provided when account is originally created)
3634
+ * argument and a metadata argument that contains account information (that may be obtained from the json file
3635
+ * of an account backup), and then generates a keyring pair from it that it passes to
3636
+ * `addPair` to stores in a keyring pair dictionary the public key of the generated pair as a key and the pair as the associated value.
3637
+ */
3573
3638
  addFromMnemonic(e, t = {}, r = this.type) {
3574
3639
  return this.addFromUri(e, t, r);
3575
3640
  }
3641
+ /**
3642
+ * @name addFromPair
3643
+ * @summary Stores an account created from an explicit publicKey/secreteKey combination
3644
+ */
3576
3645
  addFromPair(e, t = {}, r = this.type) {
3577
3646
  return this.addPair(this.createFromPair(e, t, r));
3578
3647
  }
3648
+ /**
3649
+ * @name addFromSeed
3650
+ * @summary Stores an account, given seed data, as a Key/Value (public key, pair) in Keyring Pair Dictionary
3651
+ * @description Stores in a keyring pair dictionary the public key of the pair as a key and the pair as the associated value.
3652
+ * Allows user to provide the account seed as an argument, and then generates a keyring pair from it that it passes to
3653
+ * `addPair` to store in a keyring pair dictionary the public key of the generated pair as a key and the pair as the associated value.
3654
+ */
3579
3655
  addFromSeed(e, t = {}, r = this.type) {
3580
- return this.addPair(ie({ toSS58: this.encodeAddress, type: r }, Pn[r](e), t, null));
3581
- }
3656
+ return this.addPair(
3657
+ oe(
3658
+ { toSS58: this.encodeAddress, type: r },
3659
+ wn[r](e),
3660
+ t,
3661
+ null
3662
+ )
3663
+ );
3664
+ }
3665
+ /**
3666
+ * @name addFromUri
3667
+ * @summary Creates an account via an suri
3668
+ * @description Extracts the phrase, path and password from a SURI format for specifying secret keys `<secret>/<soft-key>//<hard-key>///<password>` (the `///password` may be omitted, and `/<soft-key>` and `//<hard-key>` maybe repeated and mixed). The secret can be a hex string, mnemonic phrase or a string (to be padded)
3669
+ */
3582
3670
  addFromUri(e, t = {}, r = this.type) {
3583
3671
  return this.addPair(this.createFromUri(e, t, r));
3584
3672
  }
3585
- createFromJson({ address: e, encoded: t, encoding: { content: r, type: i, version: o }, meta: s }, a) {
3673
+ /**
3674
+ * @name createFromJson
3675
+ * @description Creates a pair from a JSON keyfile
3676
+ */
3677
+ createFromJson({
3678
+ address: e,
3679
+ encoded: t,
3680
+ encoding: { content: r, type: i, version: o },
3681
+ meta: s
3682
+ }, a) {
3586
3683
  if (o === "3" && r[0] !== "pkcs8")
3587
- throw new Error(`Unable to decode non-pkcs8 type, [${r.join(",")}] found}`);
3684
+ throw new Error(
3685
+ `Unable to decode non-pkcs8 type, [${r.join(",")}] found}`
3686
+ );
3588
3687
  const u = o === "0" || !Array.isArray(r) ? this.type : r[1];
3589
3688
  if (!u)
3590
3689
  throw new Error("cryptoType is undefined");
3591
3690
  const c = Array.isArray(i) ? i : [i];
3592
3691
  if (!["sr25519"].includes(u))
3593
3692
  throw new Error(`Unknown crypto type ${u}`);
3594
- const l = je(e) ? it(e) : this.decodeAddress(e, a), f = je(t) ? it(t) : ri(t);
3595
- return ie({ toSS58: this.encodeAddress, type: u }, { publicKey: l, secretKey: new Uint8Array() }, s, f, c);
3596
- }
3693
+ const l = je(e) ? tt(e) : this.decodeAddress(e, a), f = je(t) ? tt(t) : Yr(t);
3694
+ return oe(
3695
+ { toSS58: this.encodeAddress, type: u },
3696
+ { publicKey: l, secretKey: new Uint8Array() },
3697
+ s,
3698
+ f,
3699
+ c
3700
+ );
3701
+ }
3702
+ /**
3703
+ * @name createFromPair
3704
+ * @summary Creates a pair from an explicit publicKey/secreteKey combination
3705
+ */
3597
3706
  createFromPair(e, t = {}, r = this.type) {
3598
- return ie({ toSS58: this.encodeAddress, type: r }, e, t, null);
3707
+ return oe({ toSS58: this.encodeAddress, type: r }, e, t, null);
3599
3708
  }
3709
+ /**
3710
+ * @name createFromUri
3711
+ * @summary Creates a Keypair from an suri
3712
+ * @description This creates a pair from the suri, but does not add it to the keyring
3713
+ */
3600
3714
  createFromUri(e, t = {}, r = this.type) {
3601
- const i = e.startsWith("//") ? `${ta}${e}` : e, { password: o, path: s, phrase: a } = ii(i);
3715
+ const i = e.startsWith("//") ? `${ta}${e}` : e, { password: o, path: s, phrase: a } = Qr(i);
3602
3716
  let u;
3603
3717
  if (je(a, 256))
3604
- u = it(a);
3718
+ u = tt(a);
3605
3719
  else {
3606
3720
  const f = a.split(" ");
3607
3721
  if ([12, 15, 18, 21, 24].includes(f.length))
3608
3722
  u = r === "ethereum" ? (() => {
3609
- throw new Error("Not implemented - Prosopo Keyring supports sr25519 only");
3610
- })() : oi(a, o);
3723
+ throw new Error(
3724
+ "Not implemented - Prosopo Keyring supports sr25519 only"
3725
+ );
3726
+ })() : Zr(a, o);
3611
3727
  else {
3612
3728
  if (a.length > 32)
3613
- throw new Error("specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes");
3614
- u = $n(a.padEnd(32));
3729
+ throw new Error(
3730
+ "specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes"
3731
+ );
3732
+ u = Tn(a.padEnd(32));
3615
3733
  }
3616
3734
  }
3617
- const l = jn(Pn[r](u), s, r);
3618
- return ie({ toSS58: this.encodeAddress, type: r }, l, t, null);
3619
- }
3735
+ const l = xn(wn[r](u), s, r);
3736
+ return oe(
3737
+ { toSS58: this.encodeAddress, type: r },
3738
+ l,
3739
+ t,
3740
+ null
3741
+ );
3742
+ }
3743
+ /**
3744
+ * @name getPair
3745
+ * @summary Retrieves an account keyring pair from the Keyring Pair Dictionary, given an account address
3746
+ * @description Returns a keyring pair value from the keyring pair dictionary by performing
3747
+ * a key lookup using the provided account address or public key (after decoding it).
3748
+ */
3620
3749
  getPair(e) {
3621
- return N(this, z, "f").get(e);
3750
+ return U(this, V).get(e);
3622
3751
  }
3752
+ /**
3753
+ * @name getPairs
3754
+ * @summary Retrieves all account keyring pairs from the Keyring Pair Dictionary
3755
+ * @description Returns an array list of all the keyring pair values that are stored in the keyring pair dictionary.
3756
+ */
3623
3757
  getPairs() {
3624
- return N(this, z, "f").all();
3758
+ return U(this, V).all();
3625
3759
  }
3760
+ /**
3761
+ * @name getPublicKeys
3762
+ * @summary Retrieves Public Keys of all Keyring Pairs stored in the Keyring Pair Dictionary
3763
+ * @description Returns an array list of all the public keys associated with each of the keyring pair values that are stored in the keyring pair dictionary.
3764
+ */
3626
3765
  getPublicKeys() {
3627
- return N(this, z, "f").all().map(na);
3766
+ return U(this, V).all().map(na);
3628
3767
  }
3768
+ /**
3769
+ * @name removePair
3770
+ * @description Deletes the provided input address or public key from the stored Keyring Pair Dictionary.
3771
+ */
3629
3772
  removePair(e) {
3630
- N(this, z, "f").remove(e);
3773
+ U(this, V).remove(e);
3631
3774
  }
3775
+ /**
3776
+ * @name setSS58Format;
3777
+ * @description Sets the ss58 format for the keyring
3778
+ */
3632
3779
  setSS58Format(e) {
3633
- Ie(this, ye, e, "f");
3634
- }
3780
+ he(this, ae, e);
3781
+ }
3782
+ /**
3783
+ * @name toJson
3784
+ * @summary Returns a JSON object associated with the input argument that contains metadata assocated with an account
3785
+ * @description Returns a JSON object containing the metadata associated with an account
3786
+ * when valid address or public key and when the account passphrase is provided if the account secret
3787
+ * is not already unlocked and available in memory. Note that in [Polkadot-JS Apps](https://github.com/polkadot-js/apps) the user
3788
+ * may backup their account to a JSON file that contains this information.
3789
+ */
3635
3790
  toJson(e, t) {
3636
- return N(this, z, "f").get(e).toJson(t);
3791
+ return U(this, V).get(e).toJson(t);
3637
3792
  }
3638
3793
  }
3639
- z = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap();
3794
+ V = new WeakMap(), Te = new WeakMap(), ae = new WeakMap();
3640
3795
  class ia {
3641
3796
  }
3642
- const oa = async () => (await import("./Signer-DP9drQ55.js")).default, sa = async () => (await import("./utilCryptoChunk-CIPUtfoO.js").then((n) => n.A)).entropyToMnemonic;
3643
- class Ln extends ia {
3797
+ const oa = async () => (await import("./Signer-DP9drQ55.js")).default, sa = async () => (await import("./utilCryptoChunk-qm-BM2eT.js").then((n) => n.v)).entropyToMnemonic;
3798
+ class bn extends ia {
3644
3799
  async getAccount(e) {
3645
3800
  const t = await this.createAccount(e), r = await this.createExtension(t);
3646
3801
  return {
@@ -3655,7 +3810,8 @@ class Ln extends ia {
3655
3810
  const o = e.keypair.sign(i.data);
3656
3811
  return {
3657
3812
  id: 1,
3658
- signature: Ye(o)
3813
+ // the id of the request to sign. This should be incremented each time and adjust the signature, but we're hacking around this. Hence the signature will always be the same given the same payload.
3814
+ signature: We(o)
3659
3815
  };
3660
3816
  }, {
3661
3817
  accounts: {
@@ -3664,12 +3820,12 @@ class Ln extends ia {
3664
3820
  }
3665
3821
  },
3666
3822
  name: "procaptcha-web2",
3667
- version: li,
3823
+ version: oi,
3668
3824
  signer: r
3669
3825
  };
3670
3826
  }
3671
3827
  async createAccount(e) {
3672
- const t = await Ks(), r = Vr(t, 128).slice(2), i = $n(r), s = (await sa())(i), a = "sr25519", c = new ra({
3828
+ const t = await Ks(), r = Fr(t, 128).slice(2), i = Tn(r), s = (await sa())(i), a = "sr25519", c = new ra({
3673
3829
  type: a
3674
3830
  }).addFromMnemonic(s), l = c.address;
3675
3831
  return {
@@ -3679,33 +3835,33 @@ class Ln extends ia {
3679
3835
  };
3680
3836
  }
3681
3837
  }
3682
- const Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3838
+ const Ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3683
3839
  __proto__: null,
3684
- ExtensionWeb2: Ln,
3685
- default: Ln
3840
+ ExtensionWeb2: bn,
3841
+ default: bn
3686
3842
  }, Symbol.toStringTag, { value: "Module" }));
3687
3843
  export {
3688
- p as A,
3689
- be as C,
3844
+ h as A,
3845
+ Je as C,
3690
3846
  ia as E,
3691
- Dn as L,
3692
- Ce as M,
3693
- Oa as P,
3694
- va as R,
3695
- Sa as S,
3696
- xa as U,
3697
- ga as a,
3698
- Ct as b,
3699
- F as c,
3700
- Ot as d,
3701
- we as e,
3702
- ba as f,
3703
- $i as g,
3704
- ma as h,
3705
- pa as i,
3706
- Ea as j,
3707
- ya as l,
3708
- _ as r,
3847
+ kn as L,
3848
+ Hs as M,
3849
+ Ea as P,
3850
+ wa as R,
3851
+ xa as S,
3852
+ Oa as U,
3853
+ ma as a,
3854
+ vt as b,
3855
+ Is as c,
3856
+ Rs as d,
3857
+ $s as e,
3858
+ Sa as f,
3859
+ ki as g,
3860
+ ya as h,
3861
+ ga as i,
3862
+ Ta as j,
3863
+ va as l,
3864
+ F as r,
3709
3865
  ha as s,
3710
- wa as u
3866
+ ba as u
3711
3867
  };